@pie-element/rubric 8.1.2-next.25 → 8.1.2-next.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/author/index.js +698 -692
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +3 -3
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{dist-WceXc3o-.js → dist-BVrRc-cO.js} +377 -381
- package/dist/browser/{dist-WceXc3o-.js.map → dist-BVrRc-cO.js.map} +1 -1
- package/dist/browser/editor-runtime/author/index.js +16 -10
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +3 -3
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/{dist-BQFXNa7h.js → dist-JSpQV6Mr.js} +377 -381
- package/dist/browser/editor-runtime/{dist-BQFXNa7h.js.map → dist-JSpQV6Mr.js.map} +1 -1
- package/dist/browser/editor-runtime/{main-8mAHdbfs.js → main-CW6jUmrC.js} +2 -2
- package/dist/browser/editor-runtime/{main-8mAHdbfs.js.map → main-CW6jUmrC.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +6 -4
- package/dist/browser/editor-runtime/print/index.js.map +1 -1
- package/dist/browser/{main-CJZRevao.js → main-Bjg4r2Yy.js} +2 -2
- package/dist/browser/{main-CJZRevao.js.map → main-Bjg4r2Yy.js.map} +1 -1
- package/dist/browser/print/index.js +6 -4
- package/dist/browser/print/index.js.map +1 -1
- package/dist/delivery/index.js +1 -1
- package/dist/index.iife.js +7 -7
- package/dist/print/index.js +4 -2
- package/module/print.js +228 -230
- package/module/print.js.map +1 -1
- package/package.json +8 -8
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
})([["cb0f0518b022d739", (url) => "@font-face{font-family:Symbola;src:local(Symbola Regular),local(Symbola),url(\"" + url(() => new URL("../assets/Symbola-4c507403.woff2", import.meta.url)) + "\")format(\"woff2\")}.mq-editable-field{display:inline-block}.mq-editable-field .mq-cursor{z-index:1;border-left:1px solid #000;margin-left:-1px;padding:0;display:inline-block;position:relative}.mq-editable-field .mq-cursor.mq-blink{visibility:hidden}.mq-editable-field,.mq-math-mode .mq-editable-field{border:1px solid gray}.mq-editable-field.mq-focused,.mq-math-mode .mq-editable-field.mq-focused{border-color:#709ac0;border-radius:1px;box-shadow:0 0 1px 2px #8bd,inset 0 0 2px #6ae}.mq-math-mode .mq-editable-field{margin:1px}.mq-editable-field .mq-latex-command-input{color:inherit;border:1px solid gray;margin-left:2px;margin-right:1px;padding-right:1px;font-family:Courier New,monospace}.mq-editable-field .mq-latex-command-input.mq-empty{background:0 0}.mq-editable-field .mq-latex-command-input.mq-hasCursor{border-color:activeborder}.mq-editable-field.mq-empty:after,.mq-editable-field.mq-text-mode:after,.mq-math-mode .mq-empty:after,.mq-editable-field .mq-cursor:only-child:after,.mq-editable-field .mq-textarea+.mq-cursor:last-child:after{visibility:hidden;content:\"c\"}.mq-editable-field .mq-text-mode .mq-cursor:only-child:after{content:\"\"}.mq-editable-field.mq-text-mode{overflow:auto hidden}.mq-root-block,.mq-math-mode .mq-root-block{box-sizing:border-box;white-space:nowrap;vertical-align:middle;width:100%;padding:2px;display:inline-block;overflow:hidden}.mq-math-mode{font-variant:normal;font-size:115%;font-style:normal;font-weight:400;line-height:1;display:inline-block}.mq-math-mode .mq-non-leaf,.mq-math-mode .mq-scaled{display:inline-block}.mq-math-mode var,.mq-math-mode .mq-text-mode,.mq-math-mode .mq-nonSymbola{font-family:Times New Roman,Symbola,serif;line-height:.9}.mq-math-mode *{font-size:inherit;line-height:inherit;-webkit-user-select:none;user-select:none;box-sizing:border-box;border-color:#000;margin:0;padding:0}.mq-math-mode .mq-empty,.mq-math-mode.mq-empty{background:0 0}.mq-math-mode .mq-text-mode{white-space:pre;display:inline-block}.mq-math-mode .mq-text-mode.mq-hasCursor{min-width:1ex;margin:0 -.1em;padding:0 .1em;box-shadow:inset 0 .1em .2em #a9a9a9}.mq-math-mode .mq-font{font:1em Times New Roman,Symbola,serif}.mq-math-mode .mq-font *{font-family:inherit;font-style:inherit}.mq-math-mode b,.mq-math-mode b.mq-font{font-weight:bolder}.mq-math-mode var,.mq-math-mode i,.mq-math-mode i.mq-font{font-style:italic}.mq-math-mode var.mq-f{margin-left:.1em;margin-right:.2em}.mq-math-mode .mq-roman var.mq-f{margin:0}.mq-math-mode big{font-size:200%}.mq-math-mode .mq-int>big{vertical-align:-.16em;display:inline-block;transform:scaleX(.7)}.mq-math-mode .mq-int>.mq-supsub{vertical-align:-1.1em;padding-right:.2em;font-size:80%}.mq-math-mode .mq-int>.mq-supsub>.mq-sup>.mq-sup-inner{vertical-align:1.3em}.mq-math-mode .mq-int>.mq-supsub>.mq-sub{margin-left:-.35em}.mq-math-mode .mq-roman{font-style:normal}.mq-math-mode .mq-sans-serif{font-family:sans-serif,Symbola,serif}.mq-math-mode .mq-monospace{font-family:monospace,Symbola,serif}.mq-math-mode .mq-overleftrightarrow{margin-top:.35em;position:relative}.mq-math-mode .mq-overleftrightarrow .mq-overleftrightarrow-inner{text-align:center;border-top:.14em solid #4d4d4d;min-width:1em;margin:0 .1em;padding-top:.35em;display:inline-block;position:relative}.mq-math-mode .mq-overleftrightarrow .mq-overleftrightarrow-inner .mq-empty{min-width:1em;margin-top:.1em;display:inline-block}.mq-math-mode .mq-overleftrightarrow .mq-overleftrightarrow-inner .mq-overleftrightarrow-inner-right{text-align:right;font-family:LearnosityIconsRegular;font-size:.75em;line-height:1em;display:block;position:absolute;top:-.562em;right:-.4em}.mq-math-mode .mq-overleftrightarrow .mq-overleftrightarrow-inner .mq-overleftrightarrow-inner-left{text-align:left;font-family:LearnosityIconsRegular;font-size:.75em;line-height:1em;display:block;position:absolute;top:-.562em;left:-.4em}.mq-math-mode .mq-overline .mq-overline-inner{text-align:center;border-top:.14em solid #4d4d4d;margin-left:.1em;padding-top:.2em;padding-right:.1em;display:inline-block}.mq-math-mode .mq-overline .mq-overline-inner .mq-empty{min-width:1em;margin-top:.1em;display:inline-block}.mq-math-mode .mq-overline .mq-overline-inner .mq-overline-inner-right,.mq-math-mode .mq-overline .mq-overline-inner .mq-overline-inner-left{display:none}.mq-math-mode .mq-longdiv{padding-top:.2em}.mq-math-mode .mq-longdiv .mq-longdiv-curve-border{border-top-right-radius:100em;border-bottom-right-radius:100em;width:2px;max-width:2px;margin-right:-.12em;padding-top:.2em;font-size:1.4em;display:inline}.mq-math-mode .mq-longdiv .mq-longdiv-inner{text-align:center;border-top:1px solid gray;border-radius:0 0 0 10px;min-width:1em;margin-left:-.2em;margin-right:.15em;padding-top:.19em;padding-left:.44em;font-size:1em;display:inline}.mq-math-mode .mq-longdiv .mq-longdiv-inner .mq-empty{min-width:1.5em;display:inline-block}.mq-math-mode .mq-underline{border-bottom:1px solid #000;margin-bottom:1px}.mq-math-mode .mq-underline.mq-empty{min-width:1em}.mq-math-mode .mq-overarc{-moz-border-radius-topright:50% .3em;-moz-border-radius-topleft:50% .3em;border-top:1px solid #000;border-top-left-radius:50% .3em;border-top-right-radius:50% .3em;margin-top:1px;padding-top:.15em}.mq-math-mode .mq-overarrow{margin-top:.35em;position:relative}.mq-math-mode .mq-overarrow .mq-overarrow-inner{text-align:center;border-top:.14em solid #4d4d4d;min-width:1em;margin:0 .1em;padding-top:.35em;display:inline-block;position:relative}.mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty{min-width:1em;margin-top:.1em;display:inline-block}.mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-overarrow-inner-right{text-align:right;font-family:LearnosityIconsRegular;font-size:.75em;line-height:1em;display:block;position:absolute;top:-.562em;right:-.4em}.mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-overarrow-inner-left{text-align:left;font-family:LearnosityIconsRegular;font-size:.75em;line-height:1em;display:none;position:absolute;top:-.562em;left:-.4em}.mq-math-mode .mq-overarrow.mq-arrow-left .mq-overarrow-inner .mq-overarrow-inner-right{display:none}.mq-math-mode .mq-overarrow.mq-arrow-left .mq-overarrow-inner .mq-overarrow-inner-left{display:block}.mq-math-mode .mq-overarrow.mq-arrow-both{vertical-align:text-bottom}.mq-math-mode .mq-overarrow.mq-arrow-both.mq-empty{min-height:1.23em}.mq-math-mode .mq-overarrow.mq-arrow-both.mq-empty:after{top:-.34em}.mq-math-mode .mq-overarrow.mq-arrow-both:before{filter:FlipH;-ms-filter:\"FlipH\";transform:scaleX(-1)}.mq-math-mode .mq-overarrow.mq-arrow-both:after{content:\"➤\";visibility:visible;text-align:right;font-size:.5em;line-height:0;display:block;position:relative;top:-2.3em}.mq-math-mode .mq-xarrow{text-align:center;vertical-align:.9em;padding:0 .2em;font-size:70%;position:relative}.mq-math-mode .mq-xarrow .mq-xarrow-over{border-bottom:1px solid #000;padding:.1em .1em .2em;display:block;position:relative}.mq-math-mode .mq-xarrow .mq-xarrow-under{float:left;margin-bottom:.2em;padding:0 .1em .2em;position:relative;top:.2em}.mq-math-mode .mq-xarrow .mq-xarrow-over:before{content:\"➤\";height:1em;font-size:.6em;display:block;position:absolute;bottom:-.62em;right:-.3em}.mq-math-mode .mq-xarrow.mq-arrow-left .mq-xarrow-over:before{filter:FlipH;-ms-filter:\"FlipH\";left:-.3em;right:auto;transform:scaleX(-1)}.mq-math-mode .mq-binary-operator{padding:0 .2em;display:inline-block}.mq-math-mode .mq-supsub{text-align:left;vertical-align:-.5em;font-size:90%}.mq-math-mode .mq-supsub.mq-sup-only{vertical-align:.5em}.mq-math-mode .mq-supsub.mq-sup-only .mq-sup{vertical-align:text-bottom;display:inline-block}.mq-math-mode .mq-supsub .mq-sup{display:block}.mq-math-mode .mq-supsub .mq-sub{float:left;display:block}.mq-math-mode .mq-supsub .mq-binary-operator{padding:0 .1em}.mq-math-mode .mq-supsub .mq-fraction{font-size:70%}.mq-math-mode sup.mq-nthroot{vertical-align:.8em;min-width:.5em;margin-left:.2em;margin-right:-.6em;font-size:80%}.mq-math-mode .mq-paren{vertical-align:top;transform-origin:50% .06em;padding:0 .1em}.mq-math-mode .mq-paren.mq-ghost{color:silver}.mq-math-mode .mq-paren+span{margin-top:.1em;margin-bottom:.1em}.mq-math-mode .mq-array{vertical-align:middle;text-align:center}.mq-math-mode .mq-array>span{display:block}.mq-math-mode .mq-operator-name{font-family:Symbola,Times New Roman,serif;font-style:normal;line-height:.9}.mq-math-mode var.mq-operator-name.mq-first{padding-left:.2em}.mq-math-mode var.mq-operator-name.mq-last,.mq-math-mode .mq-supsub.mq-after-operator-name{padding-right:.2em}.mq-math-mode .mq-fraction{text-align:center;vertical-align:-.4em;padding:0 .2em;font-size:90%}.mq-math-mode .mq-fraction,.mq-math-mode .mq-large-operator{display:-moz-groupbox}.mq-math-mode x:-moz-any-link{display:-moz-groupbox}.mq-math-mode .mq-fraction,.mq-math-mode .mq-large-operator,.mq-math-mode x:default{display:inline-block}.mq-math-mode x:-moz-any-link{display:inline-block}.mq-math-mode .mq-underset.mq-tilde-vector .mq-under{line-height:.6em}.mq-math-mode .mq-numerator,.mq-math-mode .mq-denominator,.mq-math-mode .mq-dot-recurring,.mq-math-mode .mq-over,.mq-math-mode .mq-under{display:block}.mq-math-mode .mq-numerator,.mq-math-mode .mq-over{margin-bottom:.2em;padding:0 .1em}.mq-math-mode .mq-denominator{float:right;border-top:1px solid;width:100%;padding:.3em .1em .1em}.mq-math-mode .mq-dot-recurring{text-align:center;height:.6em}.mq-math-mode .mq-overunder{text-align:center;position:relative;top:.01em}.mq-math-mode .mq-overunder .mq-font{font-family:inherit}.mq-math-mode .mq-overunder.mq-underset{vertical-align:text-top}.mq-math-mode .mq-overunder.mq-underset .mq-under,.mq-math-mode .mq-overunder.mq-overset .mq-over{font-size:.7em;display:block}.mq-math-mode .mq-sqrt-prefix{vertical-align:top;transform-origin:top;padding-top:0;position:relative;top:.1em}.mq-math-mode .mq-sqrt-stem{border-top:1px solid;margin-top:1px;margin-right:.1em;padding-top:1px;padding-left:.15em;padding-right:.2em}.mq-math-mode .mq-diacritic-above{text-align:center;line-height:.4em;display:block}.mq-math-mode .mq-diacritic-stem{text-align:center;display:block}.mq-math-mode .mq-hat-prefix{text-align:center;margin-bottom:-.7em;line-height:.95em;display:block;transform:scaleX(1.5)}.mq-math-mode .mq-hat-stem{display:block}.mq-math-mode .mq-large-operator{vertical-align:-.2em;text-align:center;vertical-align:middle;padding:.2em}.mq-math-mode .mq-large-operator .mq-from,.mq-math-mode .mq-large-operator big,.mq-math-mode .mq-large-operator .mq-to{display:block}.mq-math-mode .mq-large-operator .mq-from,.mq-math-mode .mq-large-operator .mq-to{font-size:80%}.mq-math-mode .mq-large-operator .mq-from{float:right;width:100%}.mq-math-mode .mq-lim{text-align:center}.mq-math-mode .mq-lim span{display:block}.mq-math-mode .mq-lim .mq-approaches{float:right;width:100%;font-size:80%}.mq-math-mode .mq-lim .mq-approaches span>span{display:inline}.mq-math-mode .mq-matrix{vertical-align:middle;margin-left:.1em;margin-right:.1em}.mq-math-mode .mq-matrix table{border-spacing:3px;border-collapse:separate;border-bottom:none;width:auto}.mq-math-mode .mq-matrix table.mq-rows-1{vertical-align:middle;margin-bottom:1px}.mq-math-mode .mq-matrix td{vertical-align:baseline;border:1px dotted #fff;width:auto;padding:.1em .3em}.mq-math-mode .mq-matrix td.mq-empty{border:1px dotted #000}.mq-math-mode .mq-abs{border-left:1px solid #000;border-right:1px solid #000;margin-left:.1em;margin-right:.1em;padding-left:.2em;padding-right:.2em}.mq-math-mode .mq-lrnplaceholder{margin-left:.05em;margin-right:.05em}.mq-math-mode .mq-parallelogram{margin-top:-.5em;line-height:1em;position:relative;overflow:hidden}.mq-math-mode .mq-parallelogram .mq-parallelogram-inner{font-size:2em;position:relative;top:.23em}.mq-math-mode,.mq-math-mode .mq-editable-field{cursor:text;font-family:Symbola,Times New Roman,serif}.mq-math-mode .mq-longdiv .mq-longdiv-curve-border,.mq-math-mode .mq-editable-field .mq-longdiv .mq-longdiv-curve-border{font-size:1.33em}.mq-overarrow{text-align:center;border-top:1px solid #000;min-width:.5em;margin-top:1px;padding-top:.2em}.mq-overarrow:before{content:\"➤\";text-align:right;font-size:.5em;line-height:0;display:block;position:relative;top:-.34em}.mq-overarrow.mq-arrow-left:before{filter:FlipH;-ms-filter:\"FlipH\";transform:scaleX(-1)}.mq-overarrow.mq-arrow-both{vertical-align:text-bottom}.mq-overarrow.mq-arrow-both.mq-empty{min-height:1.23em}.mq-overarrow.mq-arrow-both.mq-empty:after{top:-.34em}.mq-overarrow.mq-arrow-both:before{filter:FlipH;-ms-filter:\"FlipH\";transform:scaleX(-1)}.mq-overarrow.mq-arrow-both:after{content:\"➤\";visibility:visible;text-align:right;font-size:.5em;line-height:0;display:block;position:relative;top:-2.3em}.mq-math-mode .mq-selection,.mq-editable-field .mq-selection,.mq-math-mode .mq-selection .mq-non-leaf,.mq-editable-field .mq-selection .mq-non-leaf,.mq-math-mode .mq-selection .mq-scaled,.mq-editable-field .mq-selection .mq-scaled{color:highlighttext;border-color:highlighttext;background:highlight!important}.mq-math-mode .mq-selection .mq-matrixed,.mq-editable-field .mq-selection .mq-matrixed{background:#39f!important}.mq-math-mode .mq-selection .mq-matrixed-container,.mq-editable-field .mq-selection .mq-matrixed-container{filter:progid:DXImageTransform.Microsoft.Chroma(color=\"#3399FF\")!important}.mq-math-mode .mq-selection.mq-blur,.mq-editable-field .mq-selection.mq-blur,.mq-math-mode .mq-selection.mq-blur .mq-non-leaf,.mq-editable-field .mq-selection.mq-blur .mq-non-leaf,.mq-math-mode .mq-selection.mq-blur .mq-scaled,.mq-editable-field .mq-selection.mq-blur .mq-scaled,.mq-math-mode .mq-selection.mq-blur .mq-matrixed,.mq-editable-field .mq-selection.mq-blur .mq-matrixed{color:#000;border-color:#000;background:#d4d4d4!important}.mq-math-mode .mq-selection.mq-blur .mq-matrixed-container,.mq-editable-field .mq-selection.mq-blur .mq-matrixed-container{filter:progid:DXImageTransform.Microsoft.Chroma(color=\"#D4D4D4\")!important}.mq-editable-field .mq-textarea,.mq-math-mode .mq-textarea{-webkit-user-select:text;user-select:text;position:relative}.mq-editable-field .mq-textarea>textarea,.mq-math-mode .mq-textarea>textarea{opacity:0;overflow:hidden}.mq-editable-field .mq-textarea *,.mq-math-mode .mq-textarea *,.mq-editable-field .mq-selectable,.mq-math-mode .mq-selectable{-webkit-user-select:text;user-select:text;clip:rect(1em 1em 1em 1em);resize:none;box-sizing:content-box;width:1px;height:1px;position:absolute;transform:scale(0)}.mq-math-mode .mq-matrixed{background:#fff;display:inline-block}.mq-math-mode .mq-matrixed-container{filter:progid:DXImageTransform.Microsoft.Chroma(color=\"white\");margin-top:-.1em}.mq-math-mode .mq-matrix table{border-spacing:2px}button .mq-math-mode .mq-matrix table.mq-rows-2 td,button .mq-math-mode .mq-matrix table.mq-rows-3 td{width:.9em;font-size:.3em}button .mq-math-mode .mq-matrix table.mq-rows-2{margin-bottom:-2px}button .mq-math-mode .mq-matrix table.mq-rows-1{margin-bottom:3px}button .mq-math-mode .mq-matrix table.mq-rows-1 td{width:1.1em;margin-bottom:3px;font-size:.6em}button .mq-math-mode .mq-matrix .matrix-edit-content-row{text-align:center;vertical-align:middle;display:inline-block}button .mq-math-mode .mq-matrix .matrix-edit-content-row p{font-size:.7em}button .mq-math-mode .mq-matrix .matrix-edit-content-col{text-align:center;vertical-align:middle;display:inline-block}button .mq-math-mode .mq-matrix .matrix-edit-content-col p{padding:0 .15em;font-size:.7em}button .mq-math-mode .mq-matrix .mq-paren{padding:0;display:inline-block;transform:scale(1.13,1.77)}button .matrix-edit .mq-empty{width:.8em;margin:.1em;padding:.1em;font-size:.4em}\n"]]);
|
|
19
19
|
import { i as e, r as t, t as n } from "../rolldown-runtime-CWhphoD1.js";
|
|
20
|
-
import { $ as r, A as i, B as a, C as o, Ct as s, D as c, E as l, F as u, G as d, H as f, I as p, J as m, K as h, L as g, M as _, N as v, O as y, P as b, Q as x, R as S, S as C, St as ee, T as te, Tt as w, U as ne, V as re, W as ie, X as ae, Y as oe, Z as T, _ as se, _t as ce, a as le, at as ue, b as de, bt as fe, c as pe, ct as me, d as he, dt as ge, et as _e, ft as E, g as ve, gt as ye, h as be, ht as xe, i as Se, it as Ce, j as we, k as Te, l as Ee, lt as De, m as Oe, mt as ke, n as Ae, nt as je, o as Me, ot as Ne, p as Pe, pt as D, q as Fe, r as Ie, rt as Le, s as Re, st as ze, t as Be, tt as O, u as Ve, ut as He, v as Ue, vt as We, w as Ge, wt as Ke, x as qe, xt as Je, y as Ye, yt as Xe, z as Ze } from "../dist-
|
|
20
|
+
import { $ as r, A as i, B as a, C as o, Ct as s, D as c, E as l, F as u, G as d, H as f, I as p, J as m, K as h, L as g, M as _, N as v, O as y, P as b, Q as x, R as S, S as C, St as ee, T as te, Tt as w, U as ne, V as re, W as ie, X as ae, Y as oe, Z as T, _ as se, _t as ce, a as le, at as ue, b as de, bt as fe, c as pe, ct as me, d as he, dt as ge, et as _e, ft as E, g as ve, gt as ye, h as be, ht as xe, i as Se, it as Ce, j as we, k as Te, l as Ee, lt as De, m as Oe, mt as ke, n as Ae, nt as je, o as Me, ot as Ne, p as Pe, pt as D, q as Fe, r as Ie, rt as Le, s as Re, st as ze, t as Be, tt as O, u as Ve, ut as He, v as Ue, vt as We, w as Ge, wt as Ke, x as qe, xt as Je, y as Ye, yt as Xe, z as Ze } from "../dist-BVrRc-cO.js";
|
|
21
21
|
import { a as Qe, c as $e, d as et, f as tt, i as nt, l as rt, n as it, o as at, p as ot, r as st, s as ct, t as lt, u as ut } from "../dist-B8zq6W6A.js";
|
|
22
22
|
import * as k from "react";
|
|
23
23
|
import A, { Component as dt, createContext as ft, createElement as pt, createRef as mt, forwardRef as ht, memo as gt, useCallback as _t, useContext as vt, useDebugValue as yt, useEffect as bt, useLayoutEffect as xt, useMemo as St, useRef as j, useState as Ct, version as wt } from "react";
|
|
@@ -22247,7 +22247,7 @@ function Jj({ n: e, children: t, isDragging: n, isOver: r, dragItem: i, value: a
|
|
|
22247
22247
|
bt(() => (document.addEventListener("click", u), () => {
|
|
22248
22248
|
document.removeEventListener("click", u);
|
|
22249
22249
|
}), []), bt(() => {
|
|
22250
|
-
l.current && typeof
|
|
22250
|
+
l.current && typeof se == "function" && se(l.current);
|
|
22251
22251
|
}, [
|
|
22252
22252
|
a?.value,
|
|
22253
22253
|
r,
|
|
@@ -22461,7 +22461,7 @@ var $j = (e) => {
|
|
|
22461
22461
|
]);
|
|
22462
22462
|
let ee = (e) => e.clientX > document.documentElement.clientWidth || e.clientY > document.documentElement.clientHeight || e.target === document.documentElement;
|
|
22463
22463
|
return bt(() => {
|
|
22464
|
-
m.current && typeof
|
|
22464
|
+
m.current && typeof se == "function" && se(m.current);
|
|
22465
22465
|
}, [s]), bt(() => {
|
|
22466
22466
|
let e = document.body.getBoundingClientRect(), { from: n } = t.state.selection, r = t.view.coordsAtPos(n);
|
|
22467
22467
|
y({
|
|
@@ -23015,7 +23015,7 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23015
23015
|
7: "seven",
|
|
23016
23016
|
8: "eight",
|
|
23017
23017
|
9: "nine"
|
|
23018
|
-
},
|
|
23018
|
+
}, W = rt(10, String).map((e) => ({
|
|
23019
23019
|
name: eP[e],
|
|
23020
23020
|
write: e,
|
|
23021
23021
|
label: e,
|
|
@@ -23033,28 +23033,28 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23033
23033
|
write: ".",
|
|
23034
23034
|
category: "digit"
|
|
23035
23035
|
}
|
|
23036
|
-
}),
|
|
23036
|
+
}), tP = cM("logic"), nP = tP({
|
|
23037
23037
|
name: "Therefore",
|
|
23038
23038
|
label: "∴",
|
|
23039
23039
|
write: "∴"
|
|
23040
|
-
}),
|
|
23040
|
+
}), rP = tP({
|
|
23041
23041
|
name: "Long division",
|
|
23042
23042
|
latex: "\\longdiv{}",
|
|
23043
23043
|
command: "\\longdiv"
|
|
23044
|
-
}),
|
|
23044
|
+
}), iP = cM("navigation"), aP = iP({
|
|
23045
23045
|
label: "◀",
|
|
23046
23046
|
keystroke: "Left",
|
|
23047
23047
|
ariaLabel: "Move cursor left"
|
|
23048
|
-
}),
|
|
23048
|
+
}), oP = iP({
|
|
23049
23049
|
label: "▶",
|
|
23050
23050
|
keystroke: "Right",
|
|
23051
23051
|
ariaLabel: "Move cursor right"
|
|
23052
|
-
}),
|
|
23052
|
+
}), sP = {
|
|
23053
23053
|
label: "⌫",
|
|
23054
23054
|
category: "edit",
|
|
23055
23055
|
keystroke: "Backspace",
|
|
23056
23056
|
ariaLabel: "Delete"
|
|
23057
|
-
},
|
|
23057
|
+
}, cP = [
|
|
23058
23058
|
[
|
|
23059
23059
|
yM,
|
|
23060
23060
|
PM,
|
|
@@ -23090,23 +23090,23 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23090
23090
|
XM,
|
|
23091
23091
|
gN
|
|
23092
23092
|
]
|
|
23093
|
-
],
|
|
23094
|
-
let e = [...
|
|
23093
|
+
], lP = (() => {
|
|
23094
|
+
let e = [...cP.map((e) => [...e])];
|
|
23095
23095
|
return e[0].push({
|
|
23096
23096
|
name: "i",
|
|
23097
23097
|
latex: "i",
|
|
23098
23098
|
write: "i"
|
|
23099
23099
|
}), e[1].push(kN), e[2].push(AN), e[3].push(jN), e[4].push(UM), e;
|
|
23100
|
-
})(),
|
|
23101
|
-
let e = [...
|
|
23100
|
+
})(), uP = (() => {
|
|
23101
|
+
let e = [...cP.map((e) => [...e])];
|
|
23102
23102
|
return e[0].push(BN), e[1].push(RN), e[2].push(zN), e[3].push(VN), e[4].push(HN), e;
|
|
23103
|
-
})(),
|
|
23103
|
+
})(), dP = [
|
|
23104
23104
|
{
|
|
23105
23105
|
predicate: (e) => e >= 3 && e <= 5,
|
|
23106
23106
|
set: [
|
|
23107
23107
|
[iM, aM],
|
|
23108
23108
|
[bM, xM],
|
|
23109
|
-
[mM,
|
|
23109
|
+
[mM, rP],
|
|
23110
23110
|
[wM, TM]
|
|
23111
23111
|
]
|
|
23112
23112
|
},
|
|
@@ -23145,28 +23145,28 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23145
23145
|
},
|
|
23146
23146
|
{
|
|
23147
23147
|
predicate: (e) => e >= 8 || e === "HS",
|
|
23148
|
-
set:
|
|
23148
|
+
set: cP
|
|
23149
23149
|
},
|
|
23150
23150
|
{
|
|
23151
23151
|
predicate: "non-negative-integers",
|
|
23152
23152
|
set: [
|
|
23153
23153
|
[
|
|
23154
|
-
|
|
23155
|
-
|
|
23156
|
-
|
|
23154
|
+
W.seven,
|
|
23155
|
+
W.eight,
|
|
23156
|
+
W.nine
|
|
23157
23157
|
],
|
|
23158
23158
|
[
|
|
23159
|
-
|
|
23160
|
-
|
|
23161
|
-
|
|
23159
|
+
W.four,
|
|
23160
|
+
W.five,
|
|
23161
|
+
W.six
|
|
23162
23162
|
],
|
|
23163
23163
|
[
|
|
23164
|
-
|
|
23165
|
-
|
|
23166
|
-
|
|
23164
|
+
W.one,
|
|
23165
|
+
W.two,
|
|
23166
|
+
W.three
|
|
23167
23167
|
],
|
|
23168
23168
|
[
|
|
23169
|
-
|
|
23169
|
+
W.zero,
|
|
23170
23170
|
{
|
|
23171
23171
|
name: "",
|
|
23172
23172
|
latex: "",
|
|
@@ -23179,9 +23179,9 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23179
23179
|
}
|
|
23180
23180
|
],
|
|
23181
23181
|
[
|
|
23182
|
+
aP,
|
|
23182
23183
|
oP,
|
|
23183
|
-
sP
|
|
23184
|
-
cP
|
|
23184
|
+
sP
|
|
23185
23185
|
]
|
|
23186
23186
|
]
|
|
23187
23187
|
},
|
|
@@ -23189,22 +23189,22 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23189
23189
|
predicate: "integers",
|
|
23190
23190
|
set: [
|
|
23191
23191
|
[
|
|
23192
|
-
|
|
23193
|
-
|
|
23194
|
-
|
|
23192
|
+
W.seven,
|
|
23193
|
+
W.eight,
|
|
23194
|
+
W.nine
|
|
23195
23195
|
],
|
|
23196
23196
|
[
|
|
23197
|
-
|
|
23198
|
-
|
|
23199
|
-
|
|
23197
|
+
W.four,
|
|
23198
|
+
W.five,
|
|
23199
|
+
W.six
|
|
23200
23200
|
],
|
|
23201
23201
|
[
|
|
23202
|
-
|
|
23203
|
-
|
|
23204
|
-
|
|
23202
|
+
W.one,
|
|
23203
|
+
W.two,
|
|
23204
|
+
W.three
|
|
23205
23205
|
],
|
|
23206
23206
|
[
|
|
23207
|
-
|
|
23207
|
+
W.zero,
|
|
23208
23208
|
{
|
|
23209
23209
|
name: "",
|
|
23210
23210
|
latex: "",
|
|
@@ -23213,9 +23213,9 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23213
23213
|
qN
|
|
23214
23214
|
],
|
|
23215
23215
|
[
|
|
23216
|
+
aP,
|
|
23216
23217
|
oP,
|
|
23217
|
-
sP
|
|
23218
|
-
cP
|
|
23218
|
+
sP
|
|
23219
23219
|
]
|
|
23220
23220
|
]
|
|
23221
23221
|
},
|
|
@@ -23223,29 +23223,29 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23223
23223
|
predicate: "decimals",
|
|
23224
23224
|
set: [
|
|
23225
23225
|
[
|
|
23226
|
-
|
|
23227
|
-
|
|
23228
|
-
|
|
23226
|
+
W.seven,
|
|
23227
|
+
W.eight,
|
|
23228
|
+
W.nine
|
|
23229
23229
|
],
|
|
23230
23230
|
[
|
|
23231
|
-
|
|
23232
|
-
|
|
23233
|
-
|
|
23231
|
+
W.four,
|
|
23232
|
+
W.five,
|
|
23233
|
+
W.six
|
|
23234
23234
|
],
|
|
23235
23235
|
[
|
|
23236
|
-
|
|
23237
|
-
|
|
23238
|
-
|
|
23236
|
+
W.one,
|
|
23237
|
+
W.two,
|
|
23238
|
+
W.three
|
|
23239
23239
|
],
|
|
23240
23240
|
[
|
|
23241
|
-
|
|
23242
|
-
|
|
23241
|
+
W.zero,
|
|
23242
|
+
W.decimalPoint,
|
|
23243
23243
|
qN
|
|
23244
23244
|
],
|
|
23245
23245
|
[
|
|
23246
|
+
aP,
|
|
23246
23247
|
oP,
|
|
23247
|
-
sP
|
|
23248
|
-
cP
|
|
23248
|
+
sP
|
|
23249
23249
|
]
|
|
23250
23250
|
]
|
|
23251
23251
|
},
|
|
@@ -23253,29 +23253,29 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23253
23253
|
predicate: "fractions",
|
|
23254
23254
|
set: [
|
|
23255
23255
|
[
|
|
23256
|
-
|
|
23257
|
-
|
|
23258
|
-
|
|
23256
|
+
W.seven,
|
|
23257
|
+
W.eight,
|
|
23258
|
+
W.nine
|
|
23259
23259
|
],
|
|
23260
23260
|
[
|
|
23261
|
-
|
|
23262
|
-
|
|
23263
|
-
|
|
23261
|
+
W.four,
|
|
23262
|
+
W.five,
|
|
23263
|
+
W.six
|
|
23264
23264
|
],
|
|
23265
23265
|
[
|
|
23266
|
-
|
|
23267
|
-
|
|
23268
|
-
|
|
23266
|
+
W.one,
|
|
23267
|
+
W.two,
|
|
23268
|
+
W.three
|
|
23269
23269
|
],
|
|
23270
23270
|
[
|
|
23271
|
-
|
|
23271
|
+
W.zero,
|
|
23272
23272
|
yM,
|
|
23273
23273
|
qN
|
|
23274
23274
|
],
|
|
23275
23275
|
[
|
|
23276
|
+
aP,
|
|
23276
23277
|
oP,
|
|
23277
|
-
sP
|
|
23278
|
-
cP
|
|
23278
|
+
sP
|
|
23279
23279
|
]
|
|
23280
23280
|
]
|
|
23281
23281
|
},
|
|
@@ -23326,11 +23326,11 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23326
23326
|
},
|
|
23327
23327
|
{
|
|
23328
23328
|
predicate: "advanced-algebra",
|
|
23329
|
-
set:
|
|
23329
|
+
set: lP
|
|
23330
23330
|
},
|
|
23331
23331
|
{
|
|
23332
23332
|
predicate: "statistics",
|
|
23333
|
-
set:
|
|
23333
|
+
set: uP
|
|
23334
23334
|
},
|
|
23335
23335
|
{
|
|
23336
23336
|
predicate: "item-authoring",
|
|
@@ -23338,7 +23338,7 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23338
23338
|
[
|
|
23339
23339
|
JN,
|
|
23340
23340
|
yM,
|
|
23341
|
-
|
|
23341
|
+
rP,
|
|
23342
23342
|
GM,
|
|
23343
23343
|
wM,
|
|
23344
23344
|
EM,
|
|
@@ -23380,7 +23380,7 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23380
23380
|
jM,
|
|
23381
23381
|
HN,
|
|
23382
23382
|
BN,
|
|
23383
|
-
|
|
23383
|
+
nP,
|
|
23384
23384
|
VN,
|
|
23385
23385
|
wN,
|
|
23386
23386
|
JM,
|
|
@@ -23421,17 +23421,17 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23421
23421
|
predicate: (e) => e >= 1 && e <= 2,
|
|
23422
23422
|
set: []
|
|
23423
23423
|
}
|
|
23424
|
-
],
|
|
23424
|
+
], fP = (e) => {
|
|
23425
23425
|
let t = parseInt(e, 10);
|
|
23426
23426
|
if (e = isNaN(t) ? e : t, !e) return [];
|
|
23427
|
-
let n =
|
|
23427
|
+
let n = dP.find((t) => typeof t.predicate == "string" ? t.predicate === e : t.predicate(e));
|
|
23428
23428
|
if (n) return n.set || [];
|
|
23429
|
-
if (e !== "language") return
|
|
23430
|
-
},
|
|
23429
|
+
if (e !== "language") return dP[2].set;
|
|
23430
|
+
}, pP = [
|
|
23431
23431
|
...Object.values(UN),
|
|
23432
23432
|
...Object.values(nM),
|
|
23433
23433
|
...Object.values(BM),
|
|
23434
|
-
...Object.values(
|
|
23434
|
+
...Object.values(W),
|
|
23435
23435
|
...Object.values(SM),
|
|
23436
23436
|
...Object.values(_M),
|
|
23437
23437
|
...Object.values(eN),
|
|
@@ -23443,45 +23443,45 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23443
23443
|
...Object.values(MN),
|
|
23444
23444
|
...Object.values(KM),
|
|
23445
23445
|
...Object.values(fM)
|
|
23446
|
-
],
|
|
23447
|
-
let { latex: t } = e, n = (
|
|
23446
|
+
], mP = (e) => (e || []).map((e) => {
|
|
23447
|
+
let { latex: t } = e, n = (pP || []).find((e) => t === e.latex || t === e.write || t === e.command || t === e.otherNotation);
|
|
23448
23448
|
return t && n || e;
|
|
23449
|
-
}),
|
|
23449
|
+
}), hP = () => {
|
|
23450
23450
|
(Array.from(document.querySelectorAll("span[mathquill-command-id]")) || []).forEach((e) => {
|
|
23451
23451
|
e && e.innerText === "∥" && e.className !== "mq-editable-field" && (e.style.fontSize = "32px"), (e.innerText === "′" || e.innerText === "′′") && !e.hasAttribute("data-prime") && e.setAttribute("data-prime", "true");
|
|
23452
23452
|
});
|
|
23453
|
-
}, { one:
|
|
23453
|
+
}, { one: gP, two: _P, three: vP, four: yP, five: bP, six: xP, seven: SP, eight: CP, nine: wP, zero: TP, comma: EP, decimalPoint: DP } = W, OP = [
|
|
23454
23454
|
[
|
|
23455
|
+
SP,
|
|
23455
23456
|
CP,
|
|
23456
23457
|
wP,
|
|
23457
|
-
TP,
|
|
23458
23458
|
JN
|
|
23459
23459
|
],
|
|
23460
23460
|
[
|
|
23461
|
+
yP,
|
|
23461
23462
|
bP,
|
|
23462
23463
|
xP,
|
|
23463
|
-
SP,
|
|
23464
23464
|
YN
|
|
23465
23465
|
],
|
|
23466
23466
|
[
|
|
23467
|
+
gP,
|
|
23467
23468
|
_P,
|
|
23468
23469
|
vP,
|
|
23469
|
-
yP,
|
|
23470
23470
|
qN
|
|
23471
23471
|
],
|
|
23472
23472
|
[
|
|
23473
|
-
|
|
23474
|
-
OP,
|
|
23473
|
+
TP,
|
|
23475
23474
|
DP,
|
|
23475
|
+
EP,
|
|
23476
23476
|
KN
|
|
23477
23477
|
],
|
|
23478
23478
|
[
|
|
23479
|
+
aP,
|
|
23479
23480
|
oP,
|
|
23480
23481
|
sP,
|
|
23481
|
-
cP,
|
|
23482
23482
|
GN
|
|
23483
23483
|
]
|
|
23484
|
-
],
|
|
23484
|
+
], kP = function(e) {
|
|
23485
23485
|
e.registerEmbed("newLine", () => ({
|
|
23486
23486
|
htmlString: "<div class=\"newLine\"></div>",
|
|
23487
23487
|
text: () => "testText",
|
|
@@ -23490,101 +23490,101 @@ var eM = Object.defineProperty, tM = (e, t) => {
|
|
|
23490
23490
|
};
|
|
23491
23491
|
//#endregion
|
|
23492
23492
|
//#region ../../../node_modules/.bun/@pie-framework+mathquill@1.2.1-beta.1/node_modules/@pie-framework/mathquill/build/mathquill.esm.js
|
|
23493
|
-
function
|
|
23493
|
+
function G(e) {
|
|
23494
23494
|
this.elements = Array.isArray(e) ? e : [e].filter(Boolean), this.length = this.elements.length;
|
|
23495
23495
|
for (var t = 0; t < this.elements.length; t++) this[t] = this.elements[t];
|
|
23496
23496
|
}
|
|
23497
|
-
|
|
23497
|
+
G.prototype.addClass = function(e) {
|
|
23498
23498
|
var t = (e || "").split(/\s+/).filter(Boolean);
|
|
23499
23499
|
return this.elements.forEach(function(e) {
|
|
23500
23500
|
t.forEach(function(t) {
|
|
23501
23501
|
e.classList.add(t);
|
|
23502
23502
|
});
|
|
23503
23503
|
}), this;
|
|
23504
|
-
},
|
|
23504
|
+
}, G.prototype.removeClass = function(e) {
|
|
23505
23505
|
return this.elements.forEach(function(t) {
|
|
23506
23506
|
e ? (e || "").split(/\s+/).filter(Boolean).forEach(function(e) {
|
|
23507
23507
|
t.classList.remove(e);
|
|
23508
23508
|
}) : t.className = "";
|
|
23509
23509
|
}), this;
|
|
23510
|
-
},
|
|
23510
|
+
}, G.prototype.toggleClass = function(e, t) {
|
|
23511
23511
|
var n = (e || "").split(/\s+/).filter(Boolean), r = arguments.length > 1 ? !!t : null;
|
|
23512
23512
|
return this.elements.forEach(function(e) {
|
|
23513
23513
|
n.forEach(function(t) {
|
|
23514
23514
|
r === null ? e.classList.toggle(t) : e.classList.toggle(t, r);
|
|
23515
23515
|
});
|
|
23516
23516
|
}), this;
|
|
23517
|
-
},
|
|
23518
|
-
return t ===
|
|
23517
|
+
}, G.prototype.attr = function(e, t) {
|
|
23518
|
+
return t === PP ? this.elements[0] ? this.elements[0].getAttribute(e) : PP : (this.elements.forEach(function(n) {
|
|
23519
23519
|
n.setAttribute(e, t);
|
|
23520
23520
|
}), this);
|
|
23521
|
-
},
|
|
23522
|
-
return e ===
|
|
23521
|
+
}, G.prototype.html = function(e) {
|
|
23522
|
+
return e === PP ? this.elements[0] ? this.elements[0].innerHTML : "" : (this.elements.forEach(function(t) {
|
|
23523
23523
|
t.innerHTML = e;
|
|
23524
23524
|
}), this);
|
|
23525
|
-
},
|
|
23526
|
-
var t = e instanceof
|
|
23525
|
+
}, G.prototype.append = function(e) {
|
|
23526
|
+
var t = e instanceof G ? e.elements[0] : e;
|
|
23527
23527
|
return this.elements.forEach(function(e) {
|
|
23528
23528
|
e.appendChild(t);
|
|
23529
23529
|
}), this;
|
|
23530
|
-
},
|
|
23531
|
-
var t = e instanceof
|
|
23530
|
+
}, G.prototype.prepend = function(e) {
|
|
23531
|
+
var t = e instanceof G ? e.elements[0] : e;
|
|
23532
23532
|
return this.elements.forEach(function(e, n) {
|
|
23533
23533
|
var r = n === 0 ? t : t.cloneNode(!0);
|
|
23534
23534
|
e.insertBefore(r, e.firstChild);
|
|
23535
23535
|
}), this;
|
|
23536
|
-
},
|
|
23536
|
+
}, G.prototype.wrapAll = function(e) {
|
|
23537
23537
|
if (!this.elements.length) return this;
|
|
23538
23538
|
var t;
|
|
23539
23539
|
if (typeof e == "string" && e.trim().indexOf("<") === 0) {
|
|
23540
23540
|
var n = document.createElement("div");
|
|
23541
23541
|
n.innerHTML = e.trim(), t = n.firstChild;
|
|
23542
|
-
} else if (e instanceof
|
|
23542
|
+
} else if (e instanceof G) t = e.elements[0];
|
|
23543
23543
|
else if (e && e.nodeType) t = e;
|
|
23544
23544
|
else return this;
|
|
23545
23545
|
var r = this.elements[0], i = r.parentNode;
|
|
23546
23546
|
return i && (i.insertBefore(t, r), this.elements.forEach(function(e) {
|
|
23547
23547
|
t.appendChild(e);
|
|
23548
23548
|
})), this;
|
|
23549
|
-
},
|
|
23550
|
-
var t = e instanceof
|
|
23549
|
+
}, G.prototype.appendTo = function(e) {
|
|
23550
|
+
var t = e instanceof G ? e.elements[0] : e;
|
|
23551
23551
|
return t && this.elements.forEach(function(e) {
|
|
23552
23552
|
t.appendChild(e);
|
|
23553
23553
|
}), this;
|
|
23554
|
-
},
|
|
23555
|
-
var t = e instanceof
|
|
23554
|
+
}, G.prototype.prependTo = function(e) {
|
|
23555
|
+
var t = e instanceof G ? e.elements[0] : e;
|
|
23556
23556
|
if (!t) return this;
|
|
23557
23557
|
var n = t.firstChild;
|
|
23558
23558
|
return this.elements.forEach(function(e) {
|
|
23559
23559
|
t.insertBefore(e, n), n = e;
|
|
23560
23560
|
}), this;
|
|
23561
|
-
},
|
|
23562
|
-
var t = e instanceof
|
|
23561
|
+
}, G.prototype.insertBefore = function(e) {
|
|
23562
|
+
var t = e instanceof G ? e.elements[0] : e;
|
|
23563
23563
|
if (!t) return this;
|
|
23564
23564
|
var n = t.parentNode;
|
|
23565
23565
|
return n && this.elements.forEach(function(e) {
|
|
23566
23566
|
n.insertBefore(e, t);
|
|
23567
23567
|
}), this;
|
|
23568
|
-
},
|
|
23569
|
-
var t = e instanceof
|
|
23568
|
+
}, G.prototype.insertAfter = function(e) {
|
|
23569
|
+
var t = e instanceof G ? e.elements[0] : e;
|
|
23570
23570
|
if (!t) return this;
|
|
23571
23571
|
var n = t.parentNode, r = t.nextSibling;
|
|
23572
23572
|
return n && this.elements.forEach(function(e) {
|
|
23573
23573
|
n.insertBefore(e, r), r = e;
|
|
23574
23574
|
}), this;
|
|
23575
|
-
},
|
|
23575
|
+
}, G.prototype.replaceWith = function(e) {
|
|
23576
23576
|
var t = [];
|
|
23577
|
-
return e instanceof
|
|
23577
|
+
return e instanceof G ? t = e.elements.slice() : e && typeof e.length == "number" && !e.tagName ? t = Array.from(e) : e && e.nodeType && (t = [e]), this.elements.forEach(function(e) {
|
|
23578
23578
|
var n = e.parentNode;
|
|
23579
23579
|
n && (t.forEach(function(t) {
|
|
23580
23580
|
n.insertBefore(t, e);
|
|
23581
23581
|
}), n.removeChild(e));
|
|
23582
23582
|
}), this;
|
|
23583
|
-
},
|
|
23583
|
+
}, G.prototype.insDirOf = function(e, t) {
|
|
23584
23584
|
return e === -1 ? this.insertBefore(t.first()) : this.insertAfter(t.last());
|
|
23585
|
-
},
|
|
23585
|
+
}, G.prototype.insAtDirEnd = function(e, t) {
|
|
23586
23586
|
return e === -1 ? this.prependTo(t) : this.appendTo(t);
|
|
23587
|
-
},
|
|
23587
|
+
}, G.prototype.children = function(e) {
|
|
23588
23588
|
var t = [];
|
|
23589
23589
|
return this.elements.forEach(function(n) {
|
|
23590
23590
|
var r;
|
|
@@ -23599,49 +23599,49 @@ W.prototype.addClass = function(e) {
|
|
|
23599
23599
|
} else r = Array.from(n.querySelectorAll(":scope > " + e));
|
|
23600
23600
|
}
|
|
23601
23601
|
t.push.apply(t, r);
|
|
23602
|
-
}), new
|
|
23603
|
-
},
|
|
23602
|
+
}), new G(t);
|
|
23603
|
+
}, G.prototype.find = function(e) {
|
|
23604
23604
|
var t = [];
|
|
23605
23605
|
return this.elements.forEach(function(n) {
|
|
23606
23606
|
var r = Array.from(n.querySelectorAll(e));
|
|
23607
23607
|
t.push.apply(t, r);
|
|
23608
|
-
}), new
|
|
23609
|
-
},
|
|
23610
|
-
return new
|
|
23608
|
+
}), new G(t);
|
|
23609
|
+
}, G.prototype.closest = function(e) {
|
|
23610
|
+
return new G(this.elements.map(function(t) {
|
|
23611
23611
|
return t.closest(e);
|
|
23612
23612
|
}).filter(Boolean));
|
|
23613
|
-
},
|
|
23613
|
+
}, G.prototype.contents = function() {
|
|
23614
23614
|
var e = [];
|
|
23615
23615
|
return this.elements.forEach(function(t) {
|
|
23616
23616
|
var n = Array.from(t.childNodes);
|
|
23617
23617
|
e.push.apply(e, n);
|
|
23618
|
-
}), new
|
|
23619
|
-
},
|
|
23620
|
-
return new
|
|
23618
|
+
}), new G(e);
|
|
23619
|
+
}, G.prototype.filter = function(e) {
|
|
23620
|
+
return new G(this.elements.filter(function(t, n) {
|
|
23621
23621
|
return e(n, t);
|
|
23622
23622
|
}));
|
|
23623
|
-
},
|
|
23623
|
+
}, G.prototype.detach = function() {
|
|
23624
23624
|
return this.elements.forEach(function(e) {
|
|
23625
23625
|
e.parentNode && e.parentNode.removeChild(e);
|
|
23626
23626
|
}), this;
|
|
23627
|
-
},
|
|
23627
|
+
}, G.prototype.remove = function() {
|
|
23628
23628
|
return this.elements.forEach(function(e) {
|
|
23629
23629
|
e.remove();
|
|
23630
23630
|
}), this;
|
|
23631
|
-
},
|
|
23631
|
+
}, G.prototype.empty = function() {
|
|
23632
23632
|
return this.elements.forEach(function(e) {
|
|
23633
23633
|
e.innerHTML = "";
|
|
23634
23634
|
}), this;
|
|
23635
23635
|
};
|
|
23636
|
-
function
|
|
23636
|
+
function AP(e) {
|
|
23637
23637
|
return (e || "").split(".")[0];
|
|
23638
23638
|
}
|
|
23639
|
-
|
|
23640
|
-
var n =
|
|
23639
|
+
G.prototype.on = function(e, t) {
|
|
23640
|
+
var n = AP(e);
|
|
23641
23641
|
return this.elements.forEach(function(e) {
|
|
23642
23642
|
e.addEventListener(n, t);
|
|
23643
23643
|
}), this;
|
|
23644
|
-
},
|
|
23644
|
+
}, G.prototype.bind = function(e, t, n) {
|
|
23645
23645
|
var r = this;
|
|
23646
23646
|
if (typeof e == "object") {
|
|
23647
23647
|
for (var i in e) e.hasOwnProperty(i) && r.bind(i, e[i]);
|
|
@@ -23651,41 +23651,41 @@ W.prototype.on = function(e, t) {
|
|
|
23651
23651
|
return a === !1 && (a = function(e) {
|
|
23652
23652
|
e.preventDefault();
|
|
23653
23653
|
}), (e || "").split(/\s+/).filter(Boolean).forEach(function(e) {
|
|
23654
|
-
var t =
|
|
23654
|
+
var t = AP(e);
|
|
23655
23655
|
r.elements.forEach(function(e) {
|
|
23656
23656
|
e.addEventListener(t, a);
|
|
23657
23657
|
});
|
|
23658
23658
|
}), this;
|
|
23659
|
-
},
|
|
23660
|
-
var n =
|
|
23659
|
+
}, G.prototype.off = function(e, t) {
|
|
23660
|
+
var n = AP(e);
|
|
23661
23661
|
return this.elements.forEach(function(e) {
|
|
23662
23662
|
e.removeEventListener(n, t);
|
|
23663
23663
|
}), this;
|
|
23664
|
-
},
|
|
23664
|
+
}, G.prototype.unbind = function(e, t) {
|
|
23665
23665
|
if (e && e.includes(".")) this.elements.forEach(function(e) {
|
|
23666
23666
|
var t = e.cloneNode(!0);
|
|
23667
23667
|
e.parentNode && e.parentNode.replaceChild(t, e);
|
|
23668
23668
|
});
|
|
23669
23669
|
else if (e && t) {
|
|
23670
|
-
var n =
|
|
23670
|
+
var n = AP(e);
|
|
23671
23671
|
this.elements.forEach(function(e) {
|
|
23672
23672
|
e.removeEventListener(n, t);
|
|
23673
23673
|
});
|
|
23674
23674
|
}
|
|
23675
23675
|
return this;
|
|
23676
|
-
},
|
|
23677
|
-
var t = new Event(
|
|
23676
|
+
}, G.prototype.trigger = function(e) {
|
|
23677
|
+
var t = new Event(AP(e), {
|
|
23678
23678
|
bubbles: !0,
|
|
23679
23679
|
cancelable: !0
|
|
23680
23680
|
});
|
|
23681
23681
|
return this.elements.forEach(function(e) {
|
|
23682
23682
|
e.dispatchEvent(t);
|
|
23683
23683
|
}), this;
|
|
23684
|
-
},
|
|
23684
|
+
}, G.prototype.focus = function(e) {
|
|
23685
23685
|
return typeof e == "function" ? this.on("focus", e) : (this.elements.forEach(function(e) {
|
|
23686
23686
|
e.focus && e.focus();
|
|
23687
23687
|
}), this);
|
|
23688
|
-
},
|
|
23688
|
+
}, G.prototype.blur = function(e) {
|
|
23689
23689
|
return typeof e == "function" ? this.on("blur", e) : (this.elements.forEach(function(e) {
|
|
23690
23690
|
e.blur && e.blur();
|
|
23691
23691
|
}), this);
|
|
@@ -23706,26 +23706,26 @@ W.prototype.on = function(e, t) {
|
|
|
23706
23706
|
"input",
|
|
23707
23707
|
"load"
|
|
23708
23708
|
].forEach(function(e) {
|
|
23709
|
-
|
|
23709
|
+
G.prototype[e] = function(t) {
|
|
23710
23710
|
return this.on(e, t);
|
|
23711
23711
|
};
|
|
23712
|
-
}),
|
|
23713
|
-
return new
|
|
23712
|
+
}), G.prototype.next = function(e) {
|
|
23713
|
+
return new G(this.elements.map(function(e) {
|
|
23714
23714
|
return e.nextElementSibling;
|
|
23715
23715
|
}).filter(function(t) {
|
|
23716
23716
|
return !e || t && t.matches(e);
|
|
23717
23717
|
}));
|
|
23718
|
-
},
|
|
23719
|
-
return new
|
|
23718
|
+
}, G.prototype.prev = function(e) {
|
|
23719
|
+
return new G(this.elements.map(function(e) {
|
|
23720
23720
|
return e.previousElementSibling;
|
|
23721
23721
|
}).filter(function(t) {
|
|
23722
23722
|
return !e || t && t.matches(e);
|
|
23723
23723
|
}));
|
|
23724
|
-
},
|
|
23725
|
-
return new
|
|
23724
|
+
}, G.prototype.parent = function() {
|
|
23725
|
+
return new G(this.elements.map(function(e) {
|
|
23726
23726
|
return e.parentElement;
|
|
23727
23727
|
}).filter(Boolean));
|
|
23728
|
-
},
|
|
23728
|
+
}, G.prototype.offset = function() {
|
|
23729
23729
|
if (!this.elements[0]) return {
|
|
23730
23730
|
top: 0,
|
|
23731
23731
|
left: 0
|
|
@@ -23735,89 +23735,89 @@ W.prototype.on = function(e, t) {
|
|
|
23735
23735
|
top: e.top + (window.pageYOffset || document.documentElement.scrollTop),
|
|
23736
23736
|
left: e.left + (window.pageXOffset || document.documentElement.scrollLeft)
|
|
23737
23737
|
};
|
|
23738
|
-
},
|
|
23738
|
+
}, G.prototype.width = function() {
|
|
23739
23739
|
var e = this.elements[0];
|
|
23740
23740
|
if (!e) return 0;
|
|
23741
23741
|
var t = window.getComputedStyle(e);
|
|
23742
23742
|
return parseFloat(t.width) || e.getBoundingClientRect().width;
|
|
23743
|
-
},
|
|
23743
|
+
}, G.prototype.height = function() {
|
|
23744
23744
|
var e = this.elements[0];
|
|
23745
23745
|
if (!e) return 0;
|
|
23746
23746
|
var t = window.getComputedStyle(e);
|
|
23747
23747
|
return parseFloat(t.height) || e.getBoundingClientRect().height;
|
|
23748
|
-
},
|
|
23748
|
+
}, G.prototype.outerWidth = function() {
|
|
23749
23749
|
return this.elements[0] ? this.elements[0].offsetWidth : 0;
|
|
23750
|
-
},
|
|
23750
|
+
}, G.prototype.outerHeight = function() {
|
|
23751
23751
|
return this.elements[0] ? this.elements[0].offsetHeight : 0;
|
|
23752
|
-
},
|
|
23752
|
+
}, G.prototype.innerWidth = function() {
|
|
23753
23753
|
return this.elements[0] ? this.elements[0].clientWidth : 0;
|
|
23754
|
-
},
|
|
23754
|
+
}, G.prototype.innerHeight = function() {
|
|
23755
23755
|
return this.elements[0] ? this.elements[0].clientHeight : 0;
|
|
23756
|
-
},
|
|
23757
|
-
if (t ===
|
|
23756
|
+
}, G.prototype.css = function(e, t) {
|
|
23757
|
+
if (t === PP) {
|
|
23758
23758
|
if (typeof e == "string") {
|
|
23759
23759
|
var n = this.elements[0];
|
|
23760
|
-
return n ? window.getComputedStyle(n).getPropertyValue(e.replace(/([A-Z])/g, "-$1").toLowerCase()) :
|
|
23760
|
+
return n ? window.getComputedStyle(n).getPropertyValue(e.replace(/([A-Z])/g, "-$1").toLowerCase()) : PP;
|
|
23761
23761
|
}
|
|
23762
23762
|
} else this.elements.forEach(function(n) {
|
|
23763
23763
|
n.style[e] = t;
|
|
23764
23764
|
});
|
|
23765
23765
|
return this;
|
|
23766
|
-
},
|
|
23766
|
+
}, G.prototype.scrollTop = function(e) {
|
|
23767
23767
|
var t = this.elements[0];
|
|
23768
|
-
return e ===
|
|
23768
|
+
return e === PP ? t ? t === window ? window.pageYOffset || document.documentElement.scrollTop : t.scrollTop : 0 : (t === window ? window.scrollTo(window.pageXOffset || 0, e) : this.elements.forEach(function(t) {
|
|
23769
23769
|
t.scrollTop = e;
|
|
23770
23770
|
}), this);
|
|
23771
|
-
},
|
|
23771
|
+
}, G.prototype.scrollLeft = function(e) {
|
|
23772
23772
|
var t = this.elements[0];
|
|
23773
|
-
return e ===
|
|
23773
|
+
return e === PP ? t ? t === window ? window.pageXOffset || document.documentElement.scrollLeft : t.scrollLeft : 0 : (t === window ? window.scrollTo(e, window.pageYOffset || 0) : this.elements.forEach(function(t) {
|
|
23774
23774
|
t.scrollLeft = e;
|
|
23775
23775
|
}), this);
|
|
23776
|
-
},
|
|
23776
|
+
}, G.prototype.each = function(e) {
|
|
23777
23777
|
return this.elements.forEach(function(t, n) {
|
|
23778
23778
|
e.call(t, n, t);
|
|
23779
23779
|
}), this;
|
|
23780
|
-
},
|
|
23781
|
-
return new
|
|
23782
|
-
},
|
|
23783
|
-
return e ===
|
|
23784
|
-
},
|
|
23780
|
+
}, G.prototype.eq = function(e) {
|
|
23781
|
+
return new G([this.elements[e]]);
|
|
23782
|
+
}, G.prototype.get = function(e) {
|
|
23783
|
+
return e === PP ? this.elements : e < 0 ? this.elements[this.elements.length + e] : this.elements[e];
|
|
23784
|
+
}, G.prototype.add = function(e) {
|
|
23785
23785
|
var t = this.elements.slice();
|
|
23786
|
-
return e instanceof
|
|
23787
|
-
},
|
|
23788
|
-
return new
|
|
23789
|
-
},
|
|
23790
|
-
return new
|
|
23791
|
-
},
|
|
23786
|
+
return e instanceof G ? t.push.apply(t, e.elements) : Array.isArray(e) ? t.push.apply(t, e) : e && e.nodeType && t.push(e), new G(t);
|
|
23787
|
+
}, G.prototype.first = function() {
|
|
23788
|
+
return new G([this.elements[0]]);
|
|
23789
|
+
}, G.prototype.last = function() {
|
|
23790
|
+
return new G([this.elements[this.elements.length - 1]]);
|
|
23791
|
+
}, G.prototype.index = function(e) {
|
|
23792
23792
|
if (!e) {
|
|
23793
23793
|
var t = this.elements[0] && this.elements[0].parentElement;
|
|
23794
23794
|
return t ? Array.from(t.children).indexOf(this.elements[0]) : -1;
|
|
23795
23795
|
}
|
|
23796
|
-
var n = e instanceof
|
|
23796
|
+
var n = e instanceof G ? e.elements[0] : e;
|
|
23797
23797
|
return this.elements.indexOf(n);
|
|
23798
|
-
},
|
|
23798
|
+
}, G.prototype.is = function(e) {
|
|
23799
23799
|
return this.elements.some(function(t) {
|
|
23800
23800
|
return t.matches(e);
|
|
23801
23801
|
});
|
|
23802
|
-
},
|
|
23803
|
-
return e ===
|
|
23802
|
+
}, G.prototype.text = function(e) {
|
|
23803
|
+
return e === PP ? this.elements.map(function(e) {
|
|
23804
23804
|
return e.textContent;
|
|
23805
23805
|
}).join("") : (this.elements.forEach(function(t) {
|
|
23806
23806
|
t.textContent = e;
|
|
23807
23807
|
}), this);
|
|
23808
|
-
},
|
|
23808
|
+
}, G.prototype.val = function(e) {
|
|
23809
23809
|
var t = this.elements[0];
|
|
23810
|
-
return t ? e ===
|
|
23811
|
-
t.value ===
|
|
23812
|
-
}), this) :
|
|
23810
|
+
return t ? e === PP ? t.value === PP ? t.textContent : t.value : (this.elements.forEach(function(t) {
|
|
23811
|
+
t.value === PP ? t.textContent = e : t.value = e;
|
|
23812
|
+
}), this) : PP;
|
|
23813
23813
|
};
|
|
23814
|
-
function
|
|
23815
|
-
var t = Array.isArray(e) ? e : [e].filter(Boolean), n = Object.create(
|
|
23814
|
+
function jP(e) {
|
|
23815
|
+
var t = Array.isArray(e) ? e : [e].filter(Boolean), n = Object.create(G.prototype);
|
|
23816
23816
|
n.elements = t, n.length = t.length;
|
|
23817
23817
|
for (var r = 0; r < t.length; r++) n[r] = t[r];
|
|
23818
23818
|
return n;
|
|
23819
23819
|
}
|
|
23820
|
-
var
|
|
23820
|
+
var MP = function(e, t) {
|
|
23821
23821
|
var n;
|
|
23822
23822
|
if (!e) n = [];
|
|
23823
23823
|
else if (e === window || e === document) n = [e];
|
|
@@ -23827,46 +23827,46 @@ var NP = function(e, t) {
|
|
|
23827
23827
|
var r = document.createElement("div");
|
|
23828
23828
|
r.innerHTML = e.trim(), n = Array.from(r.children);
|
|
23829
23829
|
} else if (typeof e == "string") {
|
|
23830
|
-
var i = t instanceof
|
|
23830
|
+
var i = t instanceof G ? t.elements[0] : t || document;
|
|
23831
23831
|
n = Array.from(i.querySelectorAll(e));
|
|
23832
|
-
} else n = e instanceof
|
|
23833
|
-
return
|
|
23832
|
+
} else n = e instanceof G ? e.elements : e.length === PP ? [] : Array.from(e);
|
|
23833
|
+
return jP(n);
|
|
23834
23834
|
};
|
|
23835
|
-
|
|
23835
|
+
MP.contains = function(e, t) {
|
|
23836
23836
|
return e !== t && e.contains(t);
|
|
23837
23837
|
};
|
|
23838
|
-
var
|
|
23839
|
-
function
|
|
23840
|
-
var
|
|
23841
|
-
function
|
|
23838
|
+
var NP = MP, PP, FP = "mathquill-command-id", IP = "mathquill-block-id", LP = Math.min, RP = Math.max;
|
|
23839
|
+
function zP() {}
|
|
23840
|
+
var BP = [].slice;
|
|
23841
|
+
function VP(e) {
|
|
23842
23842
|
var t = e.length - 1;
|
|
23843
23843
|
return function() {
|
|
23844
|
-
var n =
|
|
23844
|
+
var n = BP.call(arguments, 0, t), r = BP.call(arguments, t);
|
|
23845
23845
|
return e.apply(this, n.concat([r]));
|
|
23846
23846
|
};
|
|
23847
23847
|
}
|
|
23848
|
-
var
|
|
23849
|
-
return
|
|
23848
|
+
var HP = VP(function(e, t) {
|
|
23849
|
+
return VP(function(n, r) {
|
|
23850
23850
|
if (e in n) return n[e].apply(n, t.concat(r));
|
|
23851
23851
|
});
|
|
23852
23852
|
});
|
|
23853
|
-
function
|
|
23854
|
-
return
|
|
23855
|
-
return typeof t != "function" && (t =
|
|
23853
|
+
function UP(e) {
|
|
23854
|
+
return VP(function(t, n) {
|
|
23855
|
+
return typeof t != "function" && (t = HP(t)), e.call(this, function(e) {
|
|
23856
23856
|
return t.apply(e, [e].concat(n));
|
|
23857
23857
|
});
|
|
23858
23858
|
});
|
|
23859
23859
|
}
|
|
23860
|
-
function
|
|
23861
|
-
var t =
|
|
23860
|
+
function K(e) {
|
|
23861
|
+
var t = BP.call(arguments, 1);
|
|
23862
23862
|
return function() {
|
|
23863
23863
|
return e.apply(this, t);
|
|
23864
23864
|
};
|
|
23865
23865
|
}
|
|
23866
|
-
function
|
|
23866
|
+
function WP(e, t) {
|
|
23867
23867
|
if (!t) throw Error("prayer failed: " + e);
|
|
23868
23868
|
}
|
|
23869
|
-
var
|
|
23869
|
+
var q = (function(e, t, n) {
|
|
23870
23870
|
function r(e) {
|
|
23871
23871
|
return typeof e == "object";
|
|
23872
23872
|
}
|
|
@@ -23890,154 +23890,154 @@ var K = (function(e, t, n) {
|
|
|
23890
23890
|
return i(f.init) || (f.init = s), l;
|
|
23891
23891
|
})(c);
|
|
23892
23892
|
};
|
|
23893
|
-
})("prototype", {}.hasOwnProperty),
|
|
23894
|
-
function
|
|
23895
|
-
|
|
23893
|
+
})("prototype", {}.hasOwnProperty), J = -1, Y = 1;
|
|
23894
|
+
function GP(e) {
|
|
23895
|
+
WP("a direction was passed", e === J || e === Y);
|
|
23896
23896
|
}
|
|
23897
|
-
var
|
|
23898
|
-
e.parent = 0, e[
|
|
23899
|
-
this.parent = e, this[
|
|
23897
|
+
var KP = q(function(e) {
|
|
23898
|
+
e.parent = 0, e[J] = 0, e[Y] = 0, e.init = function(e, t, n) {
|
|
23899
|
+
this.parent = e, this[J] = t, this[Y] = n;
|
|
23900
23900
|
}, this.copy = function(e) {
|
|
23901
|
-
return
|
|
23901
|
+
return KP(e.parent, e[J], e[Y]);
|
|
23902
23902
|
};
|
|
23903
|
-
}),
|
|
23904
|
-
e[
|
|
23903
|
+
}), qP = q(function(e) {
|
|
23904
|
+
e[J] = 0, e[Y] = 0, e.parent = 0;
|
|
23905
23905
|
var t = 0;
|
|
23906
23906
|
function n() {
|
|
23907
23907
|
return t += 1;
|
|
23908
23908
|
}
|
|
23909
23909
|
this.byId = {}, e.init = function() {
|
|
23910
|
-
this.id = n(),
|
|
23910
|
+
this.id = n(), qP.byId[this.id] = this, this.ends = {}, this.ends[J] = 0, this.ends[Y] = 0;
|
|
23911
23911
|
}, e.dispose = function() {
|
|
23912
|
-
delete
|
|
23912
|
+
delete qP.byId[this.id];
|
|
23913
23913
|
}, e.toString = function() {
|
|
23914
23914
|
return "{{ MathQuill Node #" + this.id + " }}";
|
|
23915
|
-
}, e.jQ =
|
|
23915
|
+
}, e.jQ = MP(), e.jQadd = function(e) {
|
|
23916
23916
|
return this.jQ = this.jQ.add(e);
|
|
23917
23917
|
}, e.jQize = function(e) {
|
|
23918
|
-
var e =
|
|
23918
|
+
var e = MP(e || this.html());
|
|
23919
23919
|
function t(e) {
|
|
23920
23920
|
if (e.getAttribute) {
|
|
23921
23921
|
var n = e.getAttribute("mathquill-command-id"), r = e.getAttribute("mathquill-block-id");
|
|
23922
|
-
n &&
|
|
23922
|
+
n && qP.byId[n].jQadd(e), r && qP.byId[r].jQadd(e);
|
|
23923
23923
|
}
|
|
23924
23924
|
for (e = e.firstChild; e; e = e.nextSibling) t(e);
|
|
23925
23925
|
}
|
|
23926
23926
|
for (var n = 0; n < e.length; n += 1) t(e[n]);
|
|
23927
23927
|
return e;
|
|
23928
23928
|
}, e.createDir = function(e, t) {
|
|
23929
|
-
|
|
23929
|
+
GP(e);
|
|
23930
23930
|
var n = this;
|
|
23931
|
-
return n.jQize(), n.jQ.insDirOf(e, t.jQ), t[e] = n.adopt(t.parent, t[
|
|
23931
|
+
return n.jQize(), n.jQ.insDirOf(e, t.jQ), t[e] = n.adopt(t.parent, t[J], t[Y]), n;
|
|
23932
23932
|
}, e.createLeftOf = function(e) {
|
|
23933
|
-
return this.createDir(
|
|
23933
|
+
return this.createDir(J, e);
|
|
23934
23934
|
}, e.selectChildren = function(e, t) {
|
|
23935
|
-
return
|
|
23936
|
-
}, e.bubble =
|
|
23935
|
+
return $P(e, t);
|
|
23936
|
+
}, e.bubble = UP(function(e) {
|
|
23937
23937
|
for (var t = this; t && e(t) !== !1; t = t.parent);
|
|
23938
23938
|
return this;
|
|
23939
|
-
}), e.postOrder =
|
|
23939
|
+
}), e.postOrder = UP(function(e) {
|
|
23940
23940
|
return (function t(n) {
|
|
23941
23941
|
n.eachChild(t), e(n);
|
|
23942
23942
|
})(this), this;
|
|
23943
23943
|
}), e.isEmpty = function() {
|
|
23944
|
-
return this.ends[
|
|
23944
|
+
return this.ends[J] === 0 && this.ends[Y] === 0;
|
|
23945
23945
|
}, e.isStyleBlock = function() {
|
|
23946
23946
|
return !1;
|
|
23947
23947
|
}, e.children = function() {
|
|
23948
|
-
return
|
|
23948
|
+
return YP(this.ends[J], this.ends[Y]);
|
|
23949
23949
|
}, e.eachChild = function() {
|
|
23950
23950
|
var e = this.children();
|
|
23951
23951
|
return e.each.apply(e, arguments), this;
|
|
23952
23952
|
}, e.foldChildren = function(e, t) {
|
|
23953
23953
|
return this.children().fold(e, t);
|
|
23954
23954
|
}, e.withDirAdopt = function(e, t, n, r) {
|
|
23955
|
-
return
|
|
23955
|
+
return YP(this, this).withDirAdopt(e, t, n, r), this;
|
|
23956
23956
|
}, e.adopt = function(e, t, n) {
|
|
23957
|
-
return
|
|
23957
|
+
return YP(this, this).adopt(e, t, n), this;
|
|
23958
23958
|
}, e.disown = function() {
|
|
23959
|
-
return
|
|
23959
|
+
return YP(this, this).disown(), this;
|
|
23960
23960
|
}, e.remove = function() {
|
|
23961
23961
|
return this.jQ.remove(), this.postOrder("dispose"), this.disown();
|
|
23962
23962
|
};
|
|
23963
23963
|
});
|
|
23964
|
-
function
|
|
23965
|
-
|
|
23966
|
-
return t ? t[
|
|
23967
|
-
})()),
|
|
23968
|
-
return n ? n[
|
|
23964
|
+
function JP(e, t, n) {
|
|
23965
|
+
WP("a parent is always present", e), t && (t[Y] !== n && (t[Y] = n), t.parent !== e && (t.parent = e)), n && (n[J] !== t && (n[J] = t), n.parent !== e && (n.parent = e)), WP("leftward is properly set up", (function() {
|
|
23966
|
+
return t ? t[Y] === n && t.parent === e : e.ends[J] === n;
|
|
23967
|
+
})()), WP("rightward is properly set up", (function() {
|
|
23968
|
+
return n ? n[J] === t && n.parent === e : e.ends[Y] === t;
|
|
23969
23969
|
})());
|
|
23970
23970
|
}
|
|
23971
|
-
var
|
|
23971
|
+
var YP = q(function(e) {
|
|
23972
23972
|
e.init = function(e, t, n) {
|
|
23973
|
-
if (n ===
|
|
23974
|
-
|
|
23973
|
+
if (n === PP && (n = J), GP(n), WP("no half-empty fragments", !e == !t), this.ends = {}, e) {
|
|
23974
|
+
WP("withDir is passed to Fragment", e instanceof qP), WP("oppDir is passed to Fragment", t instanceof qP), WP("withDir and oppDir have the same parent", e.parent === t.parent), this.ends[n] = e, this.ends[-n] = t;
|
|
23975
23975
|
var r = this.fold([], function(e, t) {
|
|
23976
23976
|
return e.push.apply(e, t.jQ.get()), e;
|
|
23977
23977
|
});
|
|
23978
23978
|
this.jQ = this.jQ.add(r);
|
|
23979
23979
|
}
|
|
23980
|
-
}, e.jQ =
|
|
23981
|
-
return e ===
|
|
23980
|
+
}, e.jQ = MP(), e.withDirAdopt = function(e, t, n, r) {
|
|
23981
|
+
return e === J ? this.adopt(t, n, r) : this.adopt(t, r, n);
|
|
23982
23982
|
}, e.adopt = function(e, t, n) {
|
|
23983
|
-
|
|
23983
|
+
JP(e, t, n);
|
|
23984
23984
|
var r = this;
|
|
23985
23985
|
r.disowned = !1;
|
|
23986
|
-
var i = r.ends[
|
|
23986
|
+
var i = r.ends[J];
|
|
23987
23987
|
if (!i) return this;
|
|
23988
|
-
var a = r.ends[
|
|
23989
|
-
return t || (e.ends[
|
|
23990
|
-
n[
|
|
23988
|
+
var a = r.ends[Y];
|
|
23989
|
+
return t || (e.ends[J] = i), n ? n[J] = a : e.ends[Y] = a, r.ends[Y][Y] = n, r.each(function(n) {
|
|
23990
|
+
n[J] = t, n.parent = e, t && (t[Y] = n), t = n;
|
|
23991
23991
|
}), r;
|
|
23992
23992
|
}, e.disown = function() {
|
|
23993
|
-
var e = this, t = e.ends[
|
|
23993
|
+
var e = this, t = e.ends[J];
|
|
23994
23994
|
if (!t || e.disowned) return e;
|
|
23995
23995
|
e.disowned = !0;
|
|
23996
|
-
var n = e.ends[
|
|
23997
|
-
return
|
|
23996
|
+
var n = e.ends[Y], r = t.parent;
|
|
23997
|
+
return JP(r, t[J], t), JP(r, n, n[Y]), t[J] ? t[J][Y] = n[Y] : r.ends[J] = n[Y], n[Y] ? n[Y][J] = t[J] : r.ends[Y] = t[J], e;
|
|
23998
23998
|
}, e.remove = function() {
|
|
23999
23999
|
return this.jQ.remove(), this.each("postOrder", "dispose"), this.disown();
|
|
24000
|
-
}, e.each =
|
|
24001
|
-
var t = this, n = t.ends[
|
|
24000
|
+
}, e.each = UP(function(e) {
|
|
24001
|
+
var t = this, n = t.ends[J];
|
|
24002
24002
|
if (!n) return t;
|
|
24003
|
-
for (; n !== t.ends[
|
|
24003
|
+
for (; n !== t.ends[Y][Y] && e(n) !== !1; n = n[Y]);
|
|
24004
24004
|
return t;
|
|
24005
24005
|
}), e.fold = function(e, t) {
|
|
24006
24006
|
return this.each(function(n) {
|
|
24007
24007
|
e = t.call(this, e, n);
|
|
24008
24008
|
}), e;
|
|
24009
24009
|
};
|
|
24010
|
-
}),
|
|
24010
|
+
}), X = {}, XP = {}, ZP = {}, QP = q(KP, function(e) {
|
|
24011
24011
|
e.init = function(e, t) {
|
|
24012
24012
|
this.parent = e, this.options = t;
|
|
24013
|
-
var n = this.jQ = this._jQ =
|
|
24013
|
+
var n = this.jQ = this._jQ = MP("<span class=\"mq-cursor\">​</span>");
|
|
24014
24014
|
this.blink = function() {
|
|
24015
24015
|
n.toggleClass("mq-blink");
|
|
24016
24016
|
}, this.upDownCache = {};
|
|
24017
24017
|
}, e.show = function() {
|
|
24018
|
-
return this.jQ = this._jQ.removeClass("mq-blink"), "intervalId" in this ? clearInterval(this.intervalId) : (this[
|
|
24018
|
+
return this.jQ = this._jQ.removeClass("mq-blink"), "intervalId" in this ? clearInterval(this.intervalId) : (this[Y] ? this.selection && this.selection.ends[J][J] === this[J] ? this.jQ.insertBefore(this.selection.jQ) : this.jQ.insertBefore(this[Y].jQ.first()) : this.jQ.appendTo(this.parent.jQ), this.parent.focus()), this.intervalId = setInterval(this.blink, 500), this;
|
|
24019
24019
|
}, e.hide = function() {
|
|
24020
|
-
return "intervalId" in this && clearInterval(this.intervalId), delete this.intervalId, this.jQ.detach(), this.jQ =
|
|
24020
|
+
return "intervalId" in this && clearInterval(this.intervalId), delete this.intervalId, this.jQ.detach(), this.jQ = MP(), this;
|
|
24021
24021
|
}, e.withDirInsertAt = function(e, t, n, r) {
|
|
24022
24022
|
var i = this.parent;
|
|
24023
24023
|
this.parent = t, this[e] = n, this[-e] = r, i !== t && i.blur && i.blur(this);
|
|
24024
24024
|
}, e.insDirOf = function(e, t) {
|
|
24025
|
-
return
|
|
24025
|
+
return GP(e), !t || !t.jQ ? this : (this.jQ.insDirOf(e, t.jQ), this.withDirInsertAt(e, t.parent, t[e], t), this.parent.jQ.addClass("mq-hasCursor"), this);
|
|
24026
24026
|
}, e.insLeftOf = function(e) {
|
|
24027
|
-
return this.insDirOf(q, e);
|
|
24028
|
-
}, e.insRightOf = function(e) {
|
|
24029
24027
|
return this.insDirOf(J, e);
|
|
24028
|
+
}, e.insRightOf = function(e) {
|
|
24029
|
+
return this.insDirOf(Y, e);
|
|
24030
24030
|
}, e.insAtDirEnd = function(e, t) {
|
|
24031
|
-
return
|
|
24031
|
+
return GP(e), this.jQ.insAtDirEnd(e, t.jQ), this.withDirInsertAt(e, t, 0, t.ends[e]), t.focus(), this;
|
|
24032
24032
|
}, e.insAtLeftEnd = function(e) {
|
|
24033
|
-
return this.insAtDirEnd(q, e);
|
|
24034
|
-
}, e.insAtRightEnd = function(e) {
|
|
24035
24033
|
return this.insAtDirEnd(J, e);
|
|
24034
|
+
}, e.insAtRightEnd = function(e) {
|
|
24035
|
+
return this.insAtDirEnd(Y, e);
|
|
24036
24036
|
}, e.jumpUpDown = function(e, t) {
|
|
24037
24037
|
var n = this;
|
|
24038
|
-
n.upDownCache[e.id] =
|
|
24038
|
+
n.upDownCache[e.id] = KP.copy(n);
|
|
24039
24039
|
var r = n.upDownCache[t.id];
|
|
24040
|
-
if (r) r[
|
|
24040
|
+
if (r) r[Y] ? n.insLeftOf(r[Y]) : n.insAtRightEnd(r.parent);
|
|
24041
24041
|
else {
|
|
24042
24042
|
var i = n.offset().left;
|
|
24043
24043
|
t.seek(i, n);
|
|
@@ -24046,50 +24046,50 @@ var XP = K(function(e) {
|
|
|
24046
24046
|
var e = this, t = e.jQ.removeClass("mq-cursor").offset();
|
|
24047
24047
|
return e.jQ.addClass("mq-cursor"), t;
|
|
24048
24048
|
}, e.unwrapGramp = function() {
|
|
24049
|
-
var e = this.parent.parent, t = e.parent, n = e[
|
|
24049
|
+
var e = this.parent.parent, t = e.parent, n = e[Y], r = this, i = e[J];
|
|
24050
24050
|
if (e.disown().eachChild(function(r) {
|
|
24051
24051
|
r.isEmpty() || (r.children().adopt(t, i, n).each(function(t) {
|
|
24052
24052
|
t.jQ.insertBefore(e.jQ.first());
|
|
24053
|
-
}), i = r.ends[
|
|
24054
|
-
}), !this[
|
|
24055
|
-
else for (; !this[
|
|
24053
|
+
}), i = r.ends[Y]);
|
|
24054
|
+
}), !this[Y]) if (this[J]) this[Y] = this[J][Y];
|
|
24055
|
+
else for (; !this[Y];) if (this.parent = this.parent[Y], this.parent) this[Y] = this.parent.ends[J];
|
|
24056
24056
|
else {
|
|
24057
|
-
this[
|
|
24057
|
+
this[Y] = e[Y], this.parent = t;
|
|
24058
24058
|
break;
|
|
24059
24059
|
}
|
|
24060
|
-
this[
|
|
24060
|
+
this[Y] ? this.insLeftOf(this[Y]) : this.insAtRightEnd(t), e.jQ.remove(), e[J].siblingDeleted && e[J].siblingDeleted(r.options, Y), e[Y].siblingDeleted && e[Y].siblingDeleted(r.options, J);
|
|
24061
24061
|
}, e.startSelection = function() {
|
|
24062
|
-
for (var e = this.anticursor =
|
|
24062
|
+
for (var e = this.anticursor = KP.copy(this), t = e.ancestors = {}, n = e; n.parent; n = n.parent) t[n.parent.id] = n;
|
|
24063
24063
|
}, e.endSelection = function() {
|
|
24064
24064
|
delete this.anticursor;
|
|
24065
24065
|
}, e.select = function() {
|
|
24066
24066
|
var e = this.anticursor;
|
|
24067
|
-
if (!e || !e.ancestors || this[
|
|
24067
|
+
if (!e || !e.ancestors || this[J] === e[J] && this.parent === e.parent) return !1;
|
|
24068
24068
|
for (var t, n = this; n.parent; n = n.parent) if (n.parent.id in e.ancestors) {
|
|
24069
24069
|
t = n.parent;
|
|
24070
24070
|
break;
|
|
24071
24071
|
}
|
|
24072
24072
|
if (!t) return !1;
|
|
24073
|
-
var r = e.ancestors[t.id], i, a, o =
|
|
24074
|
-
if (n[
|
|
24075
|
-
for (var s = n; s; s = s[
|
|
24076
|
-
o =
|
|
24073
|
+
var r = e.ancestors[t.id], i, a, o = Y;
|
|
24074
|
+
if (n[J] !== r) {
|
|
24075
|
+
for (var s = n; s; s = s[Y]) if (s[Y] === r[Y]) {
|
|
24076
|
+
o = J, i = n, a = r;
|
|
24077
24077
|
break;
|
|
24078
24078
|
}
|
|
24079
24079
|
}
|
|
24080
|
-
return o ===
|
|
24080
|
+
return o === Y && (i = r, a = n), i instanceof KP && (i = i[Y]), a instanceof KP && (a = a[J]), !i || !a ? !1 : (this.hide().selection = t.selectChildren(i, a), this.insDirOf(o, this.selection.ends[o]), this.selectionChanged(), !0);
|
|
24081
24081
|
}, e.clearSelection = function() {
|
|
24082
24082
|
return this.selection && (this.selection.clear(), delete this.selection, this.selectionChanged()), this;
|
|
24083
24083
|
}, e.deleteSelection = function() {
|
|
24084
|
-
this.selection && (this[
|
|
24084
|
+
this.selection && (this[J] = this.selection.ends[J][J], this[Y] = this.selection.ends[Y][Y], this.selection.remove(), this.selectionChanged(), delete this.selection);
|
|
24085
24085
|
}, e.replaceSelection = function() {
|
|
24086
24086
|
var e = this.selection;
|
|
24087
|
-
return e && (this[
|
|
24087
|
+
return e && (this[J] = e.ends[J][J], this[Y] = e.ends[Y][Y], delete this.selection), e;
|
|
24088
24088
|
}, e.depth = function() {
|
|
24089
24089
|
for (var e = this, t = 0; e = e.parent;) t += +(e instanceof bF);
|
|
24090
24090
|
return t;
|
|
24091
24091
|
}, e.isTooDeep = function(e) {
|
|
24092
|
-
if (this.options.maxDepth !==
|
|
24092
|
+
if (this.options.maxDepth !== PP) return this.depth() + (e || 0) > this.options.maxDepth;
|
|
24093
24093
|
}, e.howDeep = function() {
|
|
24094
24094
|
for (var e = 0, t = this; t = t.parent;) e++;
|
|
24095
24095
|
return 1 + Math.floor(e / 2);
|
|
@@ -24097,7 +24097,7 @@ var XP = K(function(e) {
|
|
|
24097
24097
|
var e = this.options.maxDepth;
|
|
24098
24098
|
return e && this.howDeep() > e;
|
|
24099
24099
|
};
|
|
24100
|
-
}),
|
|
24100
|
+
}), $P = q(YP, function(e, t) {
|
|
24101
24101
|
e.init = function() {
|
|
24102
24102
|
t.init.apply(this, arguments), this.jQ = this.jQ.wrapAll("<span class=\"mq-selection\"></span>").parent();
|
|
24103
24103
|
}, e.adopt = function() {
|
|
@@ -24110,14 +24110,14 @@ var XP = K(function(e) {
|
|
|
24110
24110
|
return t + n[e]();
|
|
24111
24111
|
});
|
|
24112
24112
|
};
|
|
24113
|
-
}),
|
|
24113
|
+
}), eF = q(function(e) {
|
|
24114
24114
|
e.init = function(e, t, n) {
|
|
24115
|
-
this.id = e.id, this.data = {}, this.root = e, this.container = t, this.options = n, e.controller = this, this.cursor = e.cursor =
|
|
24115
|
+
this.id = e.id, this.data = {}, this.root = e, this.container = t, this.options = n, e.controller = this, this.cursor = e.cursor = QP(e, n);
|
|
24116
24116
|
}, e.handle = function(e, t) {
|
|
24117
24117
|
var n = this.options.handlers;
|
|
24118
24118
|
if (n && n.fns[e]) {
|
|
24119
24119
|
var r = n.APIClasses[this.KIND_OF_MQ](this);
|
|
24120
|
-
t ===
|
|
24120
|
+
t === J || t === Y ? n.fns[e](t, r) : n.fns[e](r);
|
|
24121
24121
|
}
|
|
24122
24122
|
};
|
|
24123
24123
|
var t = [];
|
|
@@ -24127,46 +24127,46 @@ var XP = K(function(e) {
|
|
|
24127
24127
|
for (var e = 0; e < t.length; e += 1) t[e].apply(this.cursor, arguments);
|
|
24128
24128
|
return this;
|
|
24129
24129
|
};
|
|
24130
|
-
}),
|
|
24131
|
-
function
|
|
24130
|
+
}), tF = {}, nF = q(), rF = {}, iF = q(), aF = {};
|
|
24131
|
+
function oF() {
|
|
24132
24132
|
window.console && console.warn("You are using the MathQuill API without specifying an interface version, which will fail in v1.0.0. Easiest fix is to do the following before doing anything else:\n\n MathQuill = MathQuill.getInterface(1);\n // now MathQuill.MathField() works like it used to\n\nSee also the \"`dev` branch (2014–2015) → v0.10.0 Migration Guide\" at\n https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide");
|
|
24133
24133
|
}
|
|
24134
|
-
function
|
|
24135
|
-
return
|
|
24134
|
+
function sF(e) {
|
|
24135
|
+
return oF(), _I(e);
|
|
24136
24136
|
}
|
|
24137
|
-
|
|
24137
|
+
sF.prototype = iF.p, sF.VERSION = "v1.2.1-beta.1", sF.interfaceVersion = function(e) {
|
|
24138
24138
|
if (e !== 1) throw "Only interface version 1 supported. You specified: " + e;
|
|
24139
|
-
return
|
|
24139
|
+
return oF = function() {
|
|
24140
24140
|
window.console && console.warn("You called MathQuill.interfaceVersion(1); to specify the interface version, which will fail in v1.0.0. You can fix this easily by doing this before doing anything else:\n\n MathQuill = MathQuill.getInterface(1);\n // now MathQuill.MathField() works like it used to\n\nSee also the \"`dev` branch (2014–2015) → v0.10.0 Migration Guide\" at\n https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide");
|
|
24141
|
-
},
|
|
24142
|
-
},
|
|
24143
|
-
var
|
|
24144
|
-
function
|
|
24145
|
-
if (!(
|
|
24141
|
+
}, oF(), sF;
|
|
24142
|
+
}, sF.getInterface = uF;
|
|
24143
|
+
var cF = uF.MIN = 1, lF = uF.MAX = 3;
|
|
24144
|
+
function uF(e) {
|
|
24145
|
+
if (!(cF <= e && e <= lF)) throw "Only interface versions between " + cF + " and " + lF + " supported. You specified: " + e;
|
|
24146
24146
|
if (e < 3 && typeof window < "u" && !window.jQuery) throw "MathQuill interface version " + e + " requires jQuery 1.5.2+ to be loaded first";
|
|
24147
24147
|
function t(e) {
|
|
24148
24148
|
if (!e || !e.nodeType) return null;
|
|
24149
|
-
var t =
|
|
24149
|
+
var t = MP(e).children(".mq-root-block").attr(IP), r = t && qP.byId[t].controller;
|
|
24150
24150
|
return r ? n[r.KIND_OF_MQ](r) : null;
|
|
24151
24151
|
}
|
|
24152
24152
|
var n = {};
|
|
24153
|
-
t.L =
|
|
24153
|
+
t.L = J, t.R = Y, t.saneKeyboardEvents = mF;
|
|
24154
24154
|
function r(e, t) {
|
|
24155
24155
|
for (var r in t && t.handlers && (t.handlers = {
|
|
24156
24156
|
fns: t.handlers,
|
|
24157
24157
|
APIClasses: n
|
|
24158
24158
|
}), t) if (t.hasOwnProperty(r)) {
|
|
24159
|
-
var i = t[r], a =
|
|
24159
|
+
var i = t[r], a = rF[r];
|
|
24160
24160
|
e[r] = a ? a(i) : i;
|
|
24161
24161
|
}
|
|
24162
24162
|
}
|
|
24163
24163
|
t.config = function(e) {
|
|
24164
|
-
return r(
|
|
24164
|
+
return r(nF.p, e), this;
|
|
24165
24165
|
}, t.registerEmbed = function(e, t) {
|
|
24166
24166
|
if (!/^[a-z][a-z0-9]*$/i.test(e)) throw "Embed name must start with letter and be only letters and digits";
|
|
24167
|
-
|
|
24167
|
+
aF[e] = t;
|
|
24168
24168
|
};
|
|
24169
|
-
var i = n.AbstractMathQuill =
|
|
24169
|
+
var i = n.AbstractMathQuill = q(iF, function(t) {
|
|
24170
24170
|
t.init = function(e) {
|
|
24171
24171
|
this.__controller = e, this.__options = e.options, this.id = e.id, this.data = e.data;
|
|
24172
24172
|
}, t.parseLatex = function(e) {
|
|
@@ -24175,7 +24175,7 @@ function dF(e) {
|
|
|
24175
24175
|
var n = this.__controller, r = n.root, i = n.container;
|
|
24176
24176
|
n.createTextarea();
|
|
24177
24177
|
var a = i.addClass(t).contents().detach();
|
|
24178
|
-
r.jQ =
|
|
24178
|
+
r.jQ = MP("<span class=\"mq-root-block\"/>").attr(IP, r.id).appendTo(i), this.latex(a.text()), this.revert = function() {
|
|
24179
24179
|
var t = i.empty().unbind(".mathquill").removeClass("mq-editable-field mq-math-mode mq-text-mode").append(a);
|
|
24180
24180
|
return e >= 3 ? t[0] : t;
|
|
24181
24181
|
};
|
|
@@ -24193,7 +24193,7 @@ function dF(e) {
|
|
|
24193
24193
|
return this.__controller.root.postOrder("reflow"), this;
|
|
24194
24194
|
};
|
|
24195
24195
|
});
|
|
24196
|
-
for (var a in t.prototype = i.prototype, n.EditableField =
|
|
24196
|
+
for (var a in t.prototype = i.prototype, n.EditableField = q(i, function(e, t) {
|
|
24197
24197
|
e.__mathquillify = function() {
|
|
24198
24198
|
return t.__mathquillify.apply(this, arguments), this.__controller.editable = !0, this.__controller.delegateMouseEvents(), this.__controller.editablesTextareaEvents(), this;
|
|
24199
24199
|
}, e.focus = function() {
|
|
@@ -24204,62 +24204,62 @@ function dF(e) {
|
|
|
24204
24204
|
return this.__controller.writeLatex(e), this.__controller.scrollHoriz(), this.__controller.blurred && this.__controller.cursor.hide().parent.blur(), this;
|
|
24205
24205
|
}, e.empty = function() {
|
|
24206
24206
|
var e = this.__controller.root, t = this.__controller.cursor;
|
|
24207
|
-
return e.eachChild("postOrder", "dispose"), e.ends[
|
|
24207
|
+
return e.eachChild("postOrder", "dispose"), e.ends[J] = e.ends[Y] = 0, e.jQ.empty(), delete t.selection, t.insAtRightEnd(e), this;
|
|
24208
24208
|
}, e.cmd = function(e) {
|
|
24209
24209
|
var t = this.__controller.notify(), n = t.cursor;
|
|
24210
24210
|
if (/^\\[a-z]+$/i.test(e) && !n.isTooDeep()) {
|
|
24211
24211
|
e = e.slice(1);
|
|
24212
|
-
var r =
|
|
24212
|
+
var r = X[e];
|
|
24213
24213
|
r && (e = r(e), n.selection && e.replaces(n.replaceSelection()), e.createLeftOf(n.show()), this.__controller.scrollHoriz());
|
|
24214
24214
|
} else n.parent.write(n, e);
|
|
24215
24215
|
return t.blurred && n.hide().parent.blur(), this;
|
|
24216
24216
|
}, e.select = function() {
|
|
24217
24217
|
var e = this.__controller;
|
|
24218
|
-
for (e.notify("move").cursor.insAtRightEnd(e.root); e.cursor[
|
|
24218
|
+
for (e.notify("move").cursor.insAtRightEnd(e.root); e.cursor[J];) e.selectLeft();
|
|
24219
24219
|
return this;
|
|
24220
24220
|
}, e.clearSelection = function() {
|
|
24221
24221
|
return this.__controller.cursor.clearSelection(), this;
|
|
24222
24222
|
}, e.moveToDirEnd = function(e) {
|
|
24223
24223
|
return this.__controller.notify("move").cursor.insAtDirEnd(e, this.__controller.root), this;
|
|
24224
24224
|
}, e.moveToLeftEnd = function() {
|
|
24225
|
-
return this.moveToDirEnd(q);
|
|
24226
|
-
}, e.moveToRightEnd = function() {
|
|
24227
24225
|
return this.moveToDirEnd(J);
|
|
24226
|
+
}, e.moveToRightEnd = function() {
|
|
24227
|
+
return this.moveToDirEnd(Y);
|
|
24228
24228
|
}, e.keystroke = function(e) {
|
|
24229
|
-
for (var e = e.replace(/^\s+|\s+$/g, "").split(/\s+/), t = 0; t < e.length; t += 1) this.__controller.keystroke(e[t], { preventDefault:
|
|
24229
|
+
for (var e = e.replace(/^\s+|\s+$/g, "").split(/\s+/), t = 0; t < e.length; t += 1) this.__controller.keystroke(e[t], { preventDefault: zP });
|
|
24230
24230
|
return this;
|
|
24231
24231
|
}, e.typedText = function(e) {
|
|
24232
24232
|
for (var t = 0; t < e.length; t += 1) this.__controller.typedText(e.charAt(t));
|
|
24233
24233
|
return this;
|
|
24234
24234
|
}, e.dropEmbedded = function(e, t, n) {
|
|
24235
|
-
var r = e -
|
|
24236
|
-
this.__controller.seek(
|
|
24235
|
+
var r = e - MP(window).scrollLeft(), i = t - MP(window).scrollTop(), a = document.elementFromPoint(r, i);
|
|
24236
|
+
this.__controller.seek(MP(a), e, t), hI().setOptions(n).createLeftOf(this.__controller.cursor);
|
|
24237
24237
|
}, e.clickAt = function(e, t, n) {
|
|
24238
24238
|
n ||= document.elementFromPoint(e, t);
|
|
24239
24239
|
var r = this.__controller, i = r.root;
|
|
24240
|
-
return
|
|
24240
|
+
return NP.contains(i.jQ[0], n) || (n = i.jQ[0]), r.seek(MP(n), e + pageXOffset, t + pageYOffset), r.blurred && this.focus(), this;
|
|
24241
24241
|
}, e.ignoreNextMousedown = function(e) {
|
|
24242
24242
|
return this.__controller.cursor.options.ignoreNextMousedown = e, this;
|
|
24243
24243
|
};
|
|
24244
24244
|
}), t.EditableField = function() {
|
|
24245
24245
|
throw "wtf don't call me, I'm 'abstract'";
|
|
24246
|
-
}, t.EditableField.prototype = n.EditableField.prototype,
|
|
24246
|
+
}, t.EditableField.prototype = n.EditableField.prototype, tF) (function(r, i) {
|
|
24247
24247
|
var a = n[r] = i(n);
|
|
24248
24248
|
t[r] = function(n, i) {
|
|
24249
24249
|
var o = t(n);
|
|
24250
24250
|
if (o instanceof a || !n || !n.nodeType) return o;
|
|
24251
|
-
var s =
|
|
24251
|
+
var s = eF(a.RootBlock(), MP(n), nF());
|
|
24252
24252
|
return s.KIND_OF_MQ = r, a(s).__mathquillify(i, e);
|
|
24253
24253
|
}, t[r].prototype = a.prototype;
|
|
24254
|
-
})(a,
|
|
24254
|
+
})(a, tF[a]);
|
|
24255
24255
|
return t;
|
|
24256
24256
|
}
|
|
24257
|
-
|
|
24258
|
-
return window.MathQuill =
|
|
24257
|
+
sF.noConflict = function() {
|
|
24258
|
+
return window.MathQuill = dF, sF;
|
|
24259
24259
|
};
|
|
24260
|
-
var
|
|
24261
|
-
window.MathQuill =
|
|
24262
|
-
function
|
|
24260
|
+
var dF = window.MathQuill;
|
|
24261
|
+
window.MathQuill = sF;
|
|
24262
|
+
function fF(e) {
|
|
24263
24263
|
for (var t = "moveOutOf deleteOutOf selectOutOf upOutOf downOutOf".split(" "), n = 0; n < t.length; n += 1) (function(t) {
|
|
24264
24264
|
e[t] = function(e) {
|
|
24265
24265
|
this.controller.handle(t, e);
|
|
@@ -24269,7 +24269,7 @@ function pF(e) {
|
|
|
24269
24269
|
this.controller.handle("reflow"), this.controller.handle("edited"), this.controller.handle("edit");
|
|
24270
24270
|
};
|
|
24271
24271
|
}
|
|
24272
|
-
var
|
|
24272
|
+
var pF = q(function(e, t, n) {
|
|
24273
24273
|
function r(e, t) {
|
|
24274
24274
|
throw e = e ? "'" + e + "'" : "EOF", "Parse Error: " + t + " at " + e;
|
|
24275
24275
|
}
|
|
@@ -24281,7 +24281,7 @@ var X = K(function(e, t, n) {
|
|
|
24281
24281
|
return t;
|
|
24282
24282
|
}
|
|
24283
24283
|
}, e.or = function(e) {
|
|
24284
|
-
|
|
24284
|
+
WP("or is passed a parser", e instanceof n);
|
|
24285
24285
|
var t = this;
|
|
24286
24286
|
return n(function(n, r, i) {
|
|
24287
24287
|
return t._(n, r, a);
|
|
@@ -24295,7 +24295,7 @@ var X = K(function(e, t, n) {
|
|
|
24295
24295
|
return t._(r, o, a);
|
|
24296
24296
|
function o(t, r) {
|
|
24297
24297
|
var o = e instanceof n ? e : e(r);
|
|
24298
|
-
return
|
|
24298
|
+
return WP("a parser is returned", o instanceof n), o._(t, i, a);
|
|
24299
24299
|
}
|
|
24300
24300
|
});
|
|
24301
24301
|
}, e.many = function() {
|
|
@@ -24354,7 +24354,7 @@ var X = K(function(e, t, n) {
|
|
|
24354
24354
|
});
|
|
24355
24355
|
};
|
|
24356
24356
|
var i = this.regex = function(e) {
|
|
24357
|
-
|
|
24357
|
+
WP("regexp parser is anchored", e.toString().charAt(1) === "^");
|
|
24358
24358
|
var t = "expected " + e;
|
|
24359
24359
|
return n(function(n, r, i) {
|
|
24360
24360
|
var a = e.exec(n);
|
|
@@ -24409,20 +24409,20 @@ var X = K(function(e, t, n) {
|
|
|
24409
24409
|
return t.ctrlKey && a.push("Ctrl"), t.originalEvent && t.originalEvent.metaKey && a.push("Meta"), t.altKey && a.push("Alt"), t.shiftKey && a.push("Shift"), i = r || String.fromCharCode(n), !a.length && !r ? i : (a.push(i), a.join("-"));
|
|
24410
24410
|
}
|
|
24411
24411
|
return function(e, n) {
|
|
24412
|
-
var r = null, i = null, a =
|
|
24412
|
+
var r = null, i = null, a = NP(e), o = NP(n.container || a), s = zP, c;
|
|
24413
24413
|
function l(e) {
|
|
24414
24414
|
s = e, clearTimeout(c), c = setTimeout(e);
|
|
24415
24415
|
}
|
|
24416
24416
|
function u(e) {
|
|
24417
24417
|
l(function(t) {
|
|
24418
|
-
s =
|
|
24418
|
+
s = zP, clearTimeout(c), e(t);
|
|
24419
24419
|
});
|
|
24420
24420
|
}
|
|
24421
24421
|
o.bind("keydown keypress input keyup focusout paste", function(e) {
|
|
24422
24422
|
s(e);
|
|
24423
24423
|
});
|
|
24424
24424
|
function d(e) {
|
|
24425
|
-
s(), s =
|
|
24425
|
+
s(), s = zP, clearTimeout(c), a.val(e), e && a[0] && a[0].select && a[0].select(), f = !!e;
|
|
24426
24426
|
}
|
|
24427
24427
|
var f = !1;
|
|
24428
24428
|
function p() {
|
|
@@ -24478,13 +24478,13 @@ var X = K(function(e, t, n) {
|
|
|
24478
24478
|
}), { select: d };
|
|
24479
24479
|
};
|
|
24480
24480
|
}();
|
|
24481
|
-
|
|
24481
|
+
eF.open(function(e, t) {
|
|
24482
24482
|
e.exportText = function() {
|
|
24483
24483
|
return this.root.foldChildren("", function(e, t) {
|
|
24484
24484
|
return e + t.text();
|
|
24485
24485
|
});
|
|
24486
24486
|
};
|
|
24487
|
-
}),
|
|
24487
|
+
}), eF.open(function(e) {
|
|
24488
24488
|
e.focusBlurEvents = function() {
|
|
24489
24489
|
var e = this, t = e.root, n = e.cursor, r;
|
|
24490
24490
|
e.textarea.focus(function() {
|
|
@@ -24492,27 +24492,27 @@ tF.open(function(e, t) {
|
|
|
24492
24492
|
}).blur(function() {
|
|
24493
24493
|
e.blurred = !0, r = setTimeout(function() {
|
|
24494
24494
|
t.postOrder("intentionalBlur"), n.clearSelection().endSelection(), a();
|
|
24495
|
-
}),
|
|
24495
|
+
}), MP(window).bind("blur", i);
|
|
24496
24496
|
});
|
|
24497
24497
|
function i() {
|
|
24498
24498
|
clearTimeout(r), n.selection && n.selection.jQ.addClass("mq-blur"), a();
|
|
24499
24499
|
}
|
|
24500
24500
|
function a() {
|
|
24501
|
-
n.hide().parent.blur(), e.container.removeClass("mq-focused"),
|
|
24501
|
+
n.hide().parent.blur(), e.container.removeClass("mq-focused"), MP(window).unbind("blur", i);
|
|
24502
24502
|
}
|
|
24503
24503
|
e.blurred = !0, n.hide().parent.blur();
|
|
24504
24504
|
};
|
|
24505
|
-
}),
|
|
24505
|
+
}), eF.open(function(e) {
|
|
24506
24506
|
e.keystroke = function(e, t) {
|
|
24507
24507
|
this.cursor.parent.keystroke(e, t, this);
|
|
24508
24508
|
};
|
|
24509
|
-
}),
|
|
24509
|
+
}), qP.open(function(e) {
|
|
24510
24510
|
e.keystroke = function(e, t, n) {
|
|
24511
24511
|
var r = n.cursor;
|
|
24512
24512
|
switch (e) {
|
|
24513
24513
|
case "Ctrl-Shift-Backspace":
|
|
24514
24514
|
case "Ctrl-Backspace":
|
|
24515
|
-
n.ctrlDeleteDir(
|
|
24515
|
+
n.ctrlDeleteDir(J);
|
|
24516
24516
|
break;
|
|
24517
24517
|
case "Shift-Backspace":
|
|
24518
24518
|
case "Backspace":
|
|
@@ -24520,11 +24520,11 @@ tF.open(function(e, t) {
|
|
|
24520
24520
|
break;
|
|
24521
24521
|
case "Esc":
|
|
24522
24522
|
case "Tab":
|
|
24523
|
-
n.escapeDir(
|
|
24523
|
+
n.escapeDir(Y, e, t);
|
|
24524
24524
|
return;
|
|
24525
24525
|
case "Shift-Tab":
|
|
24526
24526
|
case "Shift-Esc":
|
|
24527
|
-
n.escapeDir(
|
|
24527
|
+
n.escapeDir(J, e, t);
|
|
24528
24528
|
return;
|
|
24529
24529
|
case "End":
|
|
24530
24530
|
n.notify("move").cursor.insAtRightEnd(r.parent);
|
|
@@ -24533,10 +24533,10 @@ tF.open(function(e, t) {
|
|
|
24533
24533
|
n.notify("move").cursor.insAtRightEnd(n.root);
|
|
24534
24534
|
break;
|
|
24535
24535
|
case "Shift-End":
|
|
24536
|
-
for (; r[
|
|
24536
|
+
for (; r[Y];) n.selectRight();
|
|
24537
24537
|
break;
|
|
24538
24538
|
case "Ctrl-Shift-End":
|
|
24539
|
-
for (; r[
|
|
24539
|
+
for (; r[Y] || r.parent !== n.root;) n.selectRight();
|
|
24540
24540
|
break;
|
|
24541
24541
|
case "Home":
|
|
24542
24542
|
n.notify("move").cursor.insAtLeftEnd(r.parent);
|
|
@@ -24545,10 +24545,10 @@ tF.open(function(e, t) {
|
|
|
24545
24545
|
n.notify("move").cursor.insAtLeftEnd(n.root);
|
|
24546
24546
|
break;
|
|
24547
24547
|
case "Shift-Home":
|
|
24548
|
-
for (; r[
|
|
24548
|
+
for (; r[J];) n.selectLeft();
|
|
24549
24549
|
break;
|
|
24550
24550
|
case "Ctrl-Shift-Home":
|
|
24551
|
-
for (; r[
|
|
24551
|
+
for (; r[J] || r.parent !== n.root;) n.selectLeft();
|
|
24552
24552
|
break;
|
|
24553
24553
|
case "Left":
|
|
24554
24554
|
n.moveLeft();
|
|
@@ -24570,15 +24570,15 @@ tF.open(function(e, t) {
|
|
|
24570
24570
|
case "Down":
|
|
24571
24571
|
n.moveDown();
|
|
24572
24572
|
break;
|
|
24573
|
-
case "Shift-Up": if (r[
|
|
24573
|
+
case "Shift-Up": if (r[J]) for (; r[J];) n.selectLeft();
|
|
24574
24574
|
else n.selectLeft();
|
|
24575
|
-
case "Shift-Down": if (r[
|
|
24575
|
+
case "Shift-Down": if (r[Y]) for (; r[Y];) n.selectRight();
|
|
24576
24576
|
else n.selectRight();
|
|
24577
24577
|
case "Ctrl-Up": break;
|
|
24578
24578
|
case "Ctrl-Down": break;
|
|
24579
24579
|
case "Ctrl-Shift-Del":
|
|
24580
24580
|
case "Ctrl-Del":
|
|
24581
|
-
n.ctrlDeleteDir(
|
|
24581
|
+
n.ctrlDeleteDir(Y);
|
|
24582
24582
|
break;
|
|
24583
24583
|
case "Shift-Del":
|
|
24584
24584
|
case "Del":
|
|
@@ -24586,32 +24586,32 @@ tF.open(function(e, t) {
|
|
|
24586
24586
|
break;
|
|
24587
24587
|
case "Meta-A":
|
|
24588
24588
|
case "Ctrl-A":
|
|
24589
|
-
for (n.notify("move").cursor.insAtRightEnd(n.root); r[
|
|
24589
|
+
for (n.notify("move").cursor.insAtRightEnd(n.root); r[J];) n.selectLeft();
|
|
24590
24590
|
break;
|
|
24591
24591
|
default: return;
|
|
24592
24592
|
}
|
|
24593
24593
|
t.preventDefault(), n.scrollHoriz();
|
|
24594
24594
|
}, e.moveOutOf = e.moveTowards = e.deleteOutOf = e.deleteTowards = e.unselectInto = e.selectOutOf = e.selectTowards = function() {
|
|
24595
|
-
|
|
24595
|
+
WP("overridden or never called on this node");
|
|
24596
24596
|
};
|
|
24597
|
-
}),
|
|
24597
|
+
}), eF.open(function(e) {
|
|
24598
24598
|
this.onNotify(function(e) {
|
|
24599
24599
|
(e === "move" || e === "upDown") && this.show().clearSelection();
|
|
24600
24600
|
}), e.escapeDir = function(e, t, n) {
|
|
24601
|
-
|
|
24601
|
+
GP(e);
|
|
24602
24602
|
var r = this.cursor;
|
|
24603
24603
|
if (r.parent !== this.root && n.preventDefault(), r.parent !== this.root) return r.parent.moveOutOf(e, r), this.notify("move");
|
|
24604
|
-
},
|
|
24604
|
+
}, rF.leftRightIntoCmdGoes = function(e) {
|
|
24605
24605
|
if (e && e !== "up" && e !== "down") throw "\"up\" or \"down\" required for leftRightIntoCmdGoes option, got \"" + e + "\"";
|
|
24606
24606
|
return e;
|
|
24607
24607
|
}, e.moveDir = function(e) {
|
|
24608
|
-
|
|
24608
|
+
GP(e);
|
|
24609
24609
|
var t = this.cursor, n = t.options.leftRightIntoCmdGoes;
|
|
24610
24610
|
return t.selection ? t.insDirOf(e, t.selection.ends[e]) : t[e] ? t[e].moveTowards(e, t, n) : t.parent.moveOutOf(e, t, n), this.notify("move");
|
|
24611
24611
|
}, e.moveLeft = function() {
|
|
24612
|
-
return this.moveDir(q);
|
|
24613
|
-
}, e.moveRight = function() {
|
|
24614
24612
|
return this.moveDir(J);
|
|
24613
|
+
}, e.moveRight = function() {
|
|
24614
|
+
return this.moveDir(Y);
|
|
24615
24615
|
}, e.moveUp = function() {
|
|
24616
24616
|
return t(this, "up");
|
|
24617
24617
|
}, e.moveDown = function() {
|
|
@@ -24619,9 +24619,9 @@ tF.open(function(e, t) {
|
|
|
24619
24619
|
};
|
|
24620
24620
|
function t(e, t) {
|
|
24621
24621
|
var n = e.notify("upDown").cursor, r = t + "Into", i = t + "OutOf";
|
|
24622
|
-
return n[
|
|
24622
|
+
return n[Y][r] ? n.insAtLeftEnd(n[Y][r]) : n[J][r] ? n.insAtRightEnd(n[J][r]) : n.parent.bubble(function(e) {
|
|
24623
24623
|
var t = e[i];
|
|
24624
|
-
if (t && (typeof t == "function" && (t = e[i](n)), t instanceof
|
|
24624
|
+
if (t && (typeof t == "function" && (t = e[i](n)), t instanceof qP && n.jumpUpDown(e, t), t !== !0)) return !1;
|
|
24625
24625
|
}), e;
|
|
24626
24626
|
}
|
|
24627
24627
|
this.onNotify(function(e) {
|
|
@@ -24629,28 +24629,28 @@ tF.open(function(e, t) {
|
|
|
24629
24629
|
}), this.onNotify(function(e) {
|
|
24630
24630
|
e === "edit" && this.show().deleteSelection();
|
|
24631
24631
|
}), e.deleteDir = function(e) {
|
|
24632
|
-
|
|
24632
|
+
GP(e);
|
|
24633
24633
|
var t = this.cursor, n = t.selection;
|
|
24634
|
-
return this.notify("edit"), n || (t[e] ? t[e].deleteTowards(e, t) : t.parent.deleteOutOf(e, t)), t[
|
|
24634
|
+
return this.notify("edit"), n || (t[e] ? t[e].deleteTowards(e, t) : t.parent.deleteOutOf(e, t)), t[J].siblingDeleted && t[J].siblingDeleted(t.options, Y), t[Y].siblingDeleted && t[Y].siblingDeleted(t.options, J), t.parent.bubble("reflow"), this;
|
|
24635
24635
|
}, e.ctrlDeleteDir = function(e) {
|
|
24636
|
-
|
|
24636
|
+
GP(e);
|
|
24637
24637
|
var t = this.cursor;
|
|
24638
|
-
return !t[e] || t.selection ? this.deleteDir(e) : (this.notify("edit"), e ===
|
|
24638
|
+
return !t[e] || t.selection ? this.deleteDir(e) : (this.notify("edit"), e === J ? YP(t.parent.ends[J], t[J]).remove() : YP(t[Y], t.parent.ends[Y]).remove(), t.insAtDirEnd(e, t.parent), t[J].siblingDeleted && t[J].siblingDeleted(t.options, Y), t[Y].siblingDeleted && t[Y].siblingDeleted(t.options, J), t.parent.bubble("reflow"), this);
|
|
24639
24639
|
}, e.backspace = function() {
|
|
24640
|
-
return this.deleteDir(q);
|
|
24641
|
-
}, e.deleteForward = function() {
|
|
24642
24640
|
return this.deleteDir(J);
|
|
24641
|
+
}, e.deleteForward = function() {
|
|
24642
|
+
return this.deleteDir(Y);
|
|
24643
24643
|
}, this.onNotify(function(e) {
|
|
24644
24644
|
e !== "select" && this.endSelection();
|
|
24645
24645
|
}), e.selectDir = function(e) {
|
|
24646
24646
|
var t = this.notify("select").cursor, n = t.selection;
|
|
24647
|
-
|
|
24647
|
+
GP(e), t.anticursor || t.startSelection();
|
|
24648
24648
|
var r = t[e];
|
|
24649
24649
|
r ? n && n.ends[e] === r && t.anticursor[-e] !== r ? r.unselectInto(e, t) : r.selectTowards(e, t) : t.parent.selectOutOf(e, t), t.clearSelection(), t.select() || t.show();
|
|
24650
24650
|
}, e.selectLeft = function() {
|
|
24651
|
-
return this.selectDir(q);
|
|
24652
|
-
}, e.selectRight = function() {
|
|
24653
24651
|
return this.selectDir(J);
|
|
24652
|
+
}, e.selectRight = function() {
|
|
24653
|
+
return this.selectDir(Y);
|
|
24654
24654
|
};
|
|
24655
24655
|
});
|
|
24656
24656
|
var hF = /[\\]{2,}/gm, gF = (function() {
|
|
@@ -24659,18 +24659,18 @@ var hF = /[\\]{2,}/gm, gF = (function() {
|
|
|
24659
24659
|
return e.adopt(t, 0, 0), t;
|
|
24660
24660
|
}
|
|
24661
24661
|
function t(e) {
|
|
24662
|
-
for (var t = e[0] || bF(), n = 1; n < e.length; n += 1) e[n].children().adopt(t, t.ends[
|
|
24662
|
+
for (var t = e[0] || bF(), n = 1; n < e.length; n += 1) e[n].children().adopt(t, t.ends[Y], 0);
|
|
24663
24663
|
return t;
|
|
24664
24664
|
}
|
|
24665
|
-
var n =
|
|
24665
|
+
var n = pF.string, r = pF.regex, i = pF.letter, a = pF.any, o = pF.optWhitespace, s = pF.succeed, c = pF.fail, l = i.map(function(e) {
|
|
24666
24666
|
return kF(e);
|
|
24667
24667
|
}), u = r(/^[^${}\\_^]/).map(function(e) {
|
|
24668
24668
|
return Z(e);
|
|
24669
24669
|
}), d = r(/^\\not\\[a-z]+/).then(function(e) {
|
|
24670
|
-
return
|
|
24670
|
+
return ZP[e] && ZP[e]().parser() || c("unknown compound command: " + e);
|
|
24671
24671
|
}), f = r(/^[^\\a-eg-zA-Z]/).or(n("\\").then(r(/^begin\{.?matrix\}/).or(r(/^[a-z]+/i)).or(r(/^\s+/).result(" ")).or(a))).then(function(e) {
|
|
24672
24672
|
e = e.replace(/^begin\{(.?matrix)\}$/, "$1");
|
|
24673
|
-
var t =
|
|
24673
|
+
var t = X[e];
|
|
24674
24674
|
return t ? t(e).parser() : c("unknown command: \\" + e);
|
|
24675
24675
|
}), p = d.or(f).or(l).or(u), m = n("{").then(function() {
|
|
24676
24676
|
return g;
|
|
@@ -24679,22 +24679,22 @@ var hF = /[\\]{2,}/gm, gF = (function() {
|
|
|
24679
24679
|
}).many().map(t).skip(o)).skip(n("]")), v = g;
|
|
24680
24680
|
return v.block = h, v.optBlock = _, v;
|
|
24681
24681
|
})();
|
|
24682
|
-
|
|
24682
|
+
eF.open(function(e, t) {
|
|
24683
24683
|
e.exportLatex = function() {
|
|
24684
24684
|
return this.root.latex().replace(/(\\[a-z]+) (?![a-z])/gi, "$1");
|
|
24685
24685
|
}, e.parseLatex = function(e) {
|
|
24686
|
-
return gF.parse(e).postOrder("finalizeTree",
|
|
24687
|
-
},
|
|
24688
|
-
return typeof e == "number" ? e :
|
|
24686
|
+
return gF.parse(e).postOrder("finalizeTree", nF.p).join("latex").trim();
|
|
24687
|
+
}, rF.maxDepth = function(e) {
|
|
24688
|
+
return typeof e == "number" ? e : PP;
|
|
24689
24689
|
}, e.writeLatex = function(e) {
|
|
24690
|
-
var t = this.notify("edit").cursor, n =
|
|
24691
|
-
return i && !i.isEmpty() && i.prepareInsertionAt(t) && (i.children().adopt(t.parent, t[
|
|
24690
|
+
var t = this.notify("edit").cursor, n = pF.all, r = pF.eof, i = gF.skip(r).or(n.result(!1)).parse(e);
|
|
24691
|
+
return i && !i.isEmpty() && i.prepareInsertionAt(t) && (i.children().adopt(t.parent, t[J], t[Y]), i.jQize().insertBefore(t.jQ), t[J] = i.ends[Y], i.finalizeInsert(t.options, t), i.ends[Y][Y].siblingCreated && i.ends[Y][Y].siblingCreated(t.options, J), i.ends[J][J].siblingCreated && i.ends[J][J].siblingCreated(t.options, Y), t.parent.bubble("reflow")), this;
|
|
24692
24692
|
}, e.renderLatexMath = function(e) {
|
|
24693
24693
|
e && e.replace && (e = e.replace(hF, "\\"));
|
|
24694
24694
|
var t = this.root, n = this.cursor;
|
|
24695
24695
|
n.options;
|
|
24696
|
-
var r = t.jQ, i =
|
|
24697
|
-
if (t.eachChild("postOrder", "dispose"), t.ends[
|
|
24696
|
+
var r = t.jQ, i = pF.all, a = pF.eof, o = gF.skip(a).or(i.result(!1)).parse(e);
|
|
24697
|
+
if (t.eachChild("postOrder", "dispose"), t.ends[J] = t.ends[Y] = 0, o && o.prepareInsertionAt(n)) {
|
|
24698
24698
|
o.children().adopt(t, 0, 0);
|
|
24699
24699
|
var s = o.join("html");
|
|
24700
24700
|
r.html(s), t.jQize(r.children()), t.finalizeInsert(n.options);
|
|
@@ -24702,59 +24702,59 @@ tF.open(function(e, t) {
|
|
|
24702
24702
|
delete n.selection, n.insAtRightEnd(t);
|
|
24703
24703
|
}, e.renderLatexText = function(e) {
|
|
24704
24704
|
var t = this.root, n = this.cursor;
|
|
24705
|
-
t.jQ.children().slice(1).remove(), t.eachChild("postOrder", "dispose"), t.ends[
|
|
24706
|
-
var r =
|
|
24705
|
+
t.jQ.children().slice(1).remove(), t.eachChild("postOrder", "dispose"), t.ends[J] = t.ends[Y] = 0, delete n.selection, n.show().insAtRightEnd(t);
|
|
24706
|
+
var r = pF.regex, i = pF.string, a = pF.eof, o = pF.all, s = i("$").then(gF).skip(i("$").or(a)).map(function(e) {
|
|
24707
24707
|
var t = TF(n);
|
|
24708
24708
|
t.createBlocks();
|
|
24709
|
-
var r = t.ends[
|
|
24709
|
+
var r = t.ends[J];
|
|
24710
24710
|
return e.children().adopt(r, 0, 0), t;
|
|
24711
24711
|
}), c = i("\\$").result("$").or(r(/^[^$]/)).map(Z), l = s.or(c).many().skip(a).or(o.result(!1)).parse(e);
|
|
24712
24712
|
if (l) {
|
|
24713
|
-
for (var u = 0; u < l.length; u += 1) l[u].adopt(t, t.ends[
|
|
24713
|
+
for (var u = 0; u < l.length; u += 1) l[u].adopt(t, t.ends[Y], 0);
|
|
24714
24714
|
t.jQize().appendTo(t.jQ), t.finalizeInsert(n.options);
|
|
24715
24715
|
}
|
|
24716
24716
|
};
|
|
24717
|
-
}),
|
|
24718
|
-
|
|
24717
|
+
}), eF.open(function(e) {
|
|
24718
|
+
nF.p.ignoreNextMousedown = zP, e.delegateMouseEvents = function() {
|
|
24719
24719
|
var e = this.root.jQ;
|
|
24720
24720
|
this.container.bind("mousedown.mathquill", function(t) {
|
|
24721
|
-
var n =
|
|
24721
|
+
var n = MP(t.target).closest(".mq-root-block"), r = qP.byId[n.attr(IP) || e.attr(IP)].controller, i = r.cursor;
|
|
24722
24722
|
i.blink;
|
|
24723
24723
|
var a = r.textareaSpan, o = r.textarea;
|
|
24724
24724
|
if (t.preventDefault(), t.target.unselectable = !0, i.options.ignoreNextMousedown(t)) return;
|
|
24725
|
-
i.options.ignoreNextMousedown =
|
|
24725
|
+
i.options.ignoreNextMousedown = zP;
|
|
24726
24726
|
function s(e) {
|
|
24727
|
-
i.anticursor || i.startSelection(), r.seek(
|
|
24727
|
+
i.anticursor || i.startSelection(), r.seek(MP(e.target), e.pageX, e.pageY).cursor.select(), e.target && MP(e.target.ownerDocument).unbind("mousemove", c);
|
|
24728
24728
|
}
|
|
24729
24729
|
function c(e) {
|
|
24730
24730
|
return delete e.target, s(e);
|
|
24731
24731
|
}
|
|
24732
24732
|
function l(e) {
|
|
24733
|
-
!i.selection && !r.editable && a.detach(), n.unbind("mousemove", s),
|
|
24733
|
+
!i.selection && !r.editable && a.detach(), n.unbind("mousemove", s), MP(e.target.ownerDocument).unbind("mousemove", c).unbind("mouseup", l);
|
|
24734
24734
|
}
|
|
24735
24735
|
if (a.parent().length === 0) return !1;
|
|
24736
|
-
r.blurred && (r.editable || n.prepend(a), document.body.focus(), o.focus()), t.preventDefault(), t.target.unselectable = !0, i.show(), r.seek(
|
|
24736
|
+
r.blurred && (r.editable || n.prepend(a), document.body.focus(), o.focus()), t.preventDefault(), t.target.unselectable = !0, i.show(), r.seek(MP(t.target), t.pageX, t.pageY).cursor.startSelection(), n.mousemove(s), MP(t.target.ownerDocument).mousemove(c).mouseup(l);
|
|
24737
24737
|
});
|
|
24738
24738
|
};
|
|
24739
|
-
}),
|
|
24739
|
+
}), eF.open(function(e) {
|
|
24740
24740
|
e.seek = function(e, t, n) {
|
|
24741
24741
|
var r = this.notify("select").cursor;
|
|
24742
24742
|
if (e) {
|
|
24743
|
-
var i = e.attr(
|
|
24743
|
+
var i = e.attr(IP) || e.attr(FP);
|
|
24744
24744
|
if (!i) {
|
|
24745
24745
|
var a = e.parent();
|
|
24746
|
-
i = a.attr(
|
|
24746
|
+
i = a.attr(IP) || a.attr(FP);
|
|
24747
24747
|
}
|
|
24748
24748
|
}
|
|
24749
|
-
var o = i &&
|
|
24749
|
+
var o = i && qP.byId[i] ? qP.byId[i] : this.root;
|
|
24750
24750
|
return r.clearSelection().show(), o.seek(t, r), this.scrollHoriz(), this;
|
|
24751
24751
|
};
|
|
24752
|
-
}),
|
|
24752
|
+
}), eF.open(function(e) {
|
|
24753
24753
|
e.scrollHoriz = function() {
|
|
24754
24754
|
var e = this.cursor, t = e.selection, n = this.root.jQ[0].getBoundingClientRect();
|
|
24755
24755
|
if (t) {
|
|
24756
24756
|
var r = t.jQ[0].getBoundingClientRect(), i = r.left - (n.left + 20), a = r.right - (n.right - 20);
|
|
24757
|
-
if (t.ends[
|
|
24757
|
+
if (t.ends[J] === e[Y]) if (i < 0) var o = i;
|
|
24758
24758
|
else if (a > 0) if (r.left - a < n.left + 20) var o = i;
|
|
24759
24759
|
else var o = a;
|
|
24760
24760
|
else return;
|
|
@@ -24770,31 +24770,31 @@ tF.open(function(e, t) {
|
|
|
24770
24770
|
}
|
|
24771
24771
|
this.root.jQ.stop && typeof this.root.jQ.stop == "function" && this.root.jQ.stop().animate({ scrollLeft: "+=" + o }, 100);
|
|
24772
24772
|
};
|
|
24773
|
-
}),
|
|
24774
|
-
|
|
24775
|
-
return
|
|
24773
|
+
}), eF.open(function(e) {
|
|
24774
|
+
nF.p.substituteTextarea = function() {
|
|
24775
|
+
return MP("<textarea autocapitalize=off autocomplete=off autocorrect=off spellcheck=false x-palm-disable-ste-all=true />")[0];
|
|
24776
24776
|
}, e.createTextarea = function() {
|
|
24777
|
-
var e = this.textareaSpan =
|
|
24777
|
+
var e = this.textareaSpan = MP("<span class=\"mq-textarea\"></span>"), t = this.options.substituteTextarea();
|
|
24778
24778
|
if (!t.nodeType) throw "substituteTextarea() must return a DOM element, got " + t;
|
|
24779
|
-
t = this.textarea =
|
|
24779
|
+
t = this.textarea = MP(t).appendTo(e);
|
|
24780
24780
|
var n = this;
|
|
24781
24781
|
n.cursor.selectionChanged = function() {
|
|
24782
24782
|
n.selectionChanged();
|
|
24783
24783
|
};
|
|
24784
24784
|
}, e.selectionChanged = function() {
|
|
24785
24785
|
var e = this;
|
|
24786
|
-
UF(e.container[0]), e.textareaSelectionTimeout ===
|
|
24786
|
+
UF(e.container[0]), e.textareaSelectionTimeout === PP && (e.textareaSelectionTimeout = setTimeout(function() {
|
|
24787
24787
|
e.setTextareaSelection();
|
|
24788
24788
|
}));
|
|
24789
24789
|
}, e.setTextareaSelection = function() {
|
|
24790
|
-
this.textareaSelectionTimeout =
|
|
24790
|
+
this.textareaSelectionTimeout = PP;
|
|
24791
24791
|
var e = "";
|
|
24792
24792
|
this.cursor.selection && (e = this.cursor.selection.join("latex"), this.options.statelessClipboard && (e = "$" + e + "$")), this.selectFn(e);
|
|
24793
24793
|
}, e.staticMathTextareaEvents = function() {
|
|
24794
24794
|
var e = this;
|
|
24795
24795
|
e.root;
|
|
24796
24796
|
var t = e.cursor, n = e.textarea, r = e.textareaSpan;
|
|
24797
|
-
this.container.prepend(
|
|
24797
|
+
this.container.prepend(NP("<span class=\"mq-selectable\">").text("$" + e.exportLatex() + "$")), e.blurred = !0, n.bind("cut paste", !1).bind("copy", function() {
|
|
24798
24798
|
e.setTextareaSelection();
|
|
24799
24799
|
}).focus(function() {
|
|
24800
24800
|
e.blurred = !1;
|
|
@@ -24807,7 +24807,7 @@ tF.open(function(e, t) {
|
|
|
24807
24807
|
e.selectFn = function(e) {
|
|
24808
24808
|
n.val(e), e && n.select();
|
|
24809
24809
|
};
|
|
24810
|
-
},
|
|
24810
|
+
}, nF.p.substituteKeyboardEvents = mF, e.editablesTextareaEvents = function() {
|
|
24811
24811
|
var e = this, t = e.textarea, n = e.textareaSpan, r = this.options.substituteKeyboardEvents(t, this);
|
|
24812
24812
|
this.selectFn = function(e) {
|
|
24813
24813
|
r.select(e);
|
|
@@ -24827,13 +24827,13 @@ tF.open(function(e, t) {
|
|
|
24827
24827
|
this.options.statelessClipboard && (e = e.slice(0, 1) === "$" && e.slice(-1) === "$" ? e.slice(1, -1) : "\\text{" + e + "}"), this.writeLatex(e).cursor.show();
|
|
24828
24828
|
};
|
|
24829
24829
|
});
|
|
24830
|
-
var _F =
|
|
24830
|
+
var _F = q(qP, function(e, t) {
|
|
24831
24831
|
e.finalizeInsert = function(e, t) {
|
|
24832
24832
|
var n = this;
|
|
24833
|
-
n.postOrder("finalizeTree", e), n.postOrder("contactWeld", t), n.postOrder("blur"), n.postOrder("reflow"), n[
|
|
24833
|
+
n.postOrder("finalizeTree", e), n.postOrder("contactWeld", t), n.postOrder("blur"), n.postOrder("reflow"), n[Y].siblingCreated && n[Y].siblingCreated(e, J), n[J].siblingCreated && n[J].siblingCreated(e, Y), n.bubble("reflow");
|
|
24834
24834
|
}, e.prepareInsertionAt = function(e) {
|
|
24835
24835
|
var t = e.options.maxDepth;
|
|
24836
|
-
if (t !==
|
|
24836
|
+
if (t !== PP) {
|
|
24837
24837
|
var n = e.depth();
|
|
24838
24838
|
if (n > t) return !1;
|
|
24839
24839
|
this.removeNodesDeeperThan(t - n);
|
|
@@ -24845,7 +24845,7 @@ var _F = K(JP, function(e, t) {
|
|
|
24845
24845
|
t = r[1] + a, t <= e ? n.push([i, t]) : (a ? i.children() : i).remove();
|
|
24846
24846
|
});
|
|
24847
24847
|
};
|
|
24848
|
-
}), vF =
|
|
24848
|
+
}), vF = q(_F, function(e, t) {
|
|
24849
24849
|
e.init = function(e, n, r) {
|
|
24850
24850
|
var i = this;
|
|
24851
24851
|
t.init.call(i), i.ctrlSeq ||= e, n && (i.htmlTemplate = n), r && (i.textTemplate = r);
|
|
@@ -24859,16 +24859,16 @@ var _F = K(JP, function(e, t) {
|
|
|
24859
24859
|
var e = gF.block, t = this;
|
|
24860
24860
|
return e.times(t.numBlocks()).map(function(e) {
|
|
24861
24861
|
t.blocks = e;
|
|
24862
|
-
for (var n = 0; n < e.length; n += 1) e[n].adopt(t, t.ends[
|
|
24862
|
+
for (var n = 0; n < e.length; n += 1) e[n].adopt(t, t.ends[Y], 0);
|
|
24863
24863
|
return t;
|
|
24864
24864
|
});
|
|
24865
24865
|
}, e.createLeftOf = function(e) {
|
|
24866
24866
|
var n = this, r = n.replacedFragment;
|
|
24867
|
-
n.createBlocks(), t.createLeftOf.call(n, e), r && (r.adopt(n.ends[
|
|
24867
|
+
n.createBlocks(), t.createLeftOf.call(n, e), r && (r.adopt(n.ends[J], 0, 0), r.jQ.appendTo(n.ends[J].jQ), n.placeCursor(e), n.prepareInsertionAt(e)), n.finalizeInsert(e.options), n.placeCursor(e);
|
|
24868
24868
|
}, e.createBlocks = function() {
|
|
24869
|
-
for (var e = this, t = e.numBlocks(), n = e.blocks = Array(t), r = 0; r < t; r += 1) (n[r] = bF()).adopt(e, e.ends[
|
|
24869
|
+
for (var e = this, t = e.numBlocks(), n = e.blocks = Array(t), r = 0; r < t; r += 1) (n[r] = bF()).adopt(e, e.ends[Y], 0);
|
|
24870
24870
|
}, e.placeCursor = function(e) {
|
|
24871
|
-
e.insAtRightEnd(this.foldChildren(this.ends[
|
|
24871
|
+
e.insAtRightEnd(this.foldChildren(this.ends[J], function(e, t) {
|
|
24872
24872
|
return e.isEmpty() ? e : t;
|
|
24873
24873
|
}));
|
|
24874
24874
|
}, e.moveTowards = function(e, t, n) {
|
|
@@ -24879,22 +24879,22 @@ var _F = K(JP, function(e, t) {
|
|
|
24879
24879
|
}, e.selectTowards = function(e, t) {
|
|
24880
24880
|
t[-e] = this, t[e] = this[e];
|
|
24881
24881
|
}, e.selectChildren = function() {
|
|
24882
|
-
return
|
|
24882
|
+
return $P(this, this);
|
|
24883
24883
|
}, e.unselectInto = function(e, t) {
|
|
24884
24884
|
t.insAtDirEnd(-e, t.anticursor.ancestors[this.id]);
|
|
24885
24885
|
}, e.seek = function(e, t) {
|
|
24886
24886
|
function n(e) {
|
|
24887
24887
|
var t = {};
|
|
24888
|
-
return t[
|
|
24888
|
+
return t[J] = e.jQ.offset().left, t[Y] = t[J] + e.jQ.outerWidth(), t;
|
|
24889
24889
|
}
|
|
24890
24890
|
var r = this, i = n(r);
|
|
24891
|
-
if (e < i[
|
|
24892
|
-
if (e > i[
|
|
24893
|
-
var a = i[
|
|
24891
|
+
if (e < i[J]) return t.insLeftOf(r);
|
|
24892
|
+
if (e > i[Y]) return t.insRightOf(r);
|
|
24893
|
+
var a = i[J];
|
|
24894
24894
|
r.eachChild(function(o) {
|
|
24895
24895
|
var s = n(o);
|
|
24896
|
-
if (e < s[
|
|
24897
|
-
if (e > s[
|
|
24896
|
+
if (e < s[J]) return e - a < s[J] - e ? o[J] ? t.insAtRightEnd(o[J]) : t.insLeftOf(r) : t.insAtLeftEnd(o), !1;
|
|
24897
|
+
if (e > s[Y]) o[Y] ? a = s[Y] : i[Y] - e < e - s[Y] ? t.insRightOf(r) : t.insAtRightEnd(o);
|
|
24898
24898
|
else return o.seek(e, t), !1;
|
|
24899
24899
|
});
|
|
24900
24900
|
}, e.numBlocks = function() {
|
|
@@ -24902,13 +24902,13 @@ var _F = K(JP, function(e, t) {
|
|
|
24902
24902
|
return e ? e.length : 0;
|
|
24903
24903
|
}, e.html = function() {
|
|
24904
24904
|
var e = this, t = e.blocks, n = " mathquill-command-id=" + e.id, r = e.htmlTemplate.match(/<[^<>]+>|[^<>]+/g);
|
|
24905
|
-
|
|
24905
|
+
WP("no unmatched angle brackets", r.join("") === this.htmlTemplate);
|
|
24906
24906
|
for (var i = 0, a = r[0]; a; i += 1, a = r[i]) if (a.slice(-2) === "/>") r[i] = a.slice(0, -2) + n + "/>";
|
|
24907
24907
|
else if (a.charAt(0) === "<") {
|
|
24908
|
-
|
|
24908
|
+
WP("not an unmatched top-level close tag", a.charAt(1) !== "/"), r[i] = a.slice(0, -1) + n + ">";
|
|
24909
24909
|
var o = 1;
|
|
24910
24910
|
do
|
|
24911
|
-
i += 1, a = r[i],
|
|
24911
|
+
i += 1, a = r[i], WP("no missing close tags", a), a.slice(0, 2) === "</" ? --o : a.charAt(0) === "<" && a.slice(-2) !== "/>" && (o += 1);
|
|
24912
24912
|
while (o > 0);
|
|
24913
24913
|
}
|
|
24914
24914
|
return r.join("").replace(/>&(\d+)/g, function(e, n) {
|
|
@@ -24926,16 +24926,16 @@ var _F = K(JP, function(e, t) {
|
|
|
24926
24926
|
return n && e.textTemplate[t] === "(" && i[0] === "(" && i.slice(-1) === ")" ? n + i.slice(1, -1) + e.textTemplate[t] : n + i + (e.textTemplate[t] || "");
|
|
24927
24927
|
});
|
|
24928
24928
|
};
|
|
24929
|
-
}), yF =
|
|
24929
|
+
}), yF = q(vF, function(e, t) {
|
|
24930
24930
|
e.init = function(e, n, r) {
|
|
24931
24931
|
r ||= e && e.length > 1 ? e.slice(1) : e, t.init.call(this, e, n, [r]);
|
|
24932
24932
|
}, e.parser = function() {
|
|
24933
|
-
return
|
|
24933
|
+
return pF.succeed(this);
|
|
24934
24934
|
}, e.numBlocks = function() {
|
|
24935
24935
|
return 0;
|
|
24936
24936
|
}, e.replaces = function(e) {
|
|
24937
24937
|
e.remove();
|
|
24938
|
-
}, e.createBlocks =
|
|
24938
|
+
}, e.createBlocks = zP, e.moveTowards = function(e, t) {
|
|
24939
24939
|
t.jQ.insDirOf(e, this.jQ), t[-e] = this, t[e] = this[e];
|
|
24940
24940
|
}, e.deleteTowards = function(e, t) {
|
|
24941
24941
|
t[e] = this.remove()[e];
|
|
@@ -24945,18 +24945,18 @@ var _F = K(JP, function(e, t) {
|
|
|
24945
24945
|
return this.ctrlSeq;
|
|
24946
24946
|
}, e.text = function() {
|
|
24947
24947
|
return this.textTemplate;
|
|
24948
|
-
}, e.placeCursor =
|
|
24948
|
+
}, e.placeCursor = zP, e.isEmpty = function() {
|
|
24949
24949
|
return !0;
|
|
24950
24950
|
};
|
|
24951
|
-
}), Z =
|
|
24951
|
+
}), Z = q(yF, function(e, t) {
|
|
24952
24952
|
e.init = function(e, n) {
|
|
24953
24953
|
t.init.call(this, e, "<span>" + (n || e) + "</span>");
|
|
24954
24954
|
};
|
|
24955
|
-
}), Q =
|
|
24955
|
+
}), Q = q(yF, function(e, t) {
|
|
24956
24956
|
e.init = function(e, n, r) {
|
|
24957
24957
|
t.init.call(this, e, "<span class=\"mq-binary-operator\">" + n + "</span>", r);
|
|
24958
24958
|
};
|
|
24959
|
-
}), bF =
|
|
24959
|
+
}), bF = q(_F, function(e, t) {
|
|
24960
24960
|
e.join = function(e) {
|
|
24961
24961
|
return this.foldChildren("", function(t, n) {
|
|
24962
24962
|
return t + n[e]();
|
|
@@ -24966,10 +24966,10 @@ var _F = K(JP, function(e, t) {
|
|
|
24966
24966
|
}, e.latex = function() {
|
|
24967
24967
|
return this.join("latex");
|
|
24968
24968
|
}, e.text = function() {
|
|
24969
|
-
return this.ends[
|
|
24969
|
+
return this.ends[J] === this.ends[Y] && this.ends[J] !== 0 ? this.ends[J].text() : this.join("text");
|
|
24970
24970
|
}, e.keystroke = function(e, n, r) {
|
|
24971
24971
|
if (r.options.spaceBehavesLikeTab && (e === "Spacebar" || e === "Shift-Spacebar")) {
|
|
24972
|
-
n.preventDefault(), r.escapeDir(e === "Shift-Spacebar" ?
|
|
24972
|
+
n.preventDefault(), r.escapeDir(e === "Shift-Spacebar" ? J : Y, e, n);
|
|
24973
24973
|
return;
|
|
24974
24974
|
}
|
|
24975
24975
|
return t.keystroke.apply(this, arguments);
|
|
@@ -24980,14 +24980,14 @@ var _F = K(JP, function(e, t) {
|
|
|
24980
24980
|
}, e.deleteOutOf = function(e, t) {
|
|
24981
24981
|
t.unwrapGramp();
|
|
24982
24982
|
}, e.seek = function(e, t) {
|
|
24983
|
-
var n = this.ends[
|
|
24983
|
+
var n = this.ends[Y];
|
|
24984
24984
|
if (!n || n.jQ.offset().left + n.jQ.outerWidth() < e) return t.insAtRightEnd(this);
|
|
24985
|
-
if (e < this.ends[
|
|
24986
|
-
for (; e < n.jQ.offset().left;) n = n[
|
|
24985
|
+
if (e < this.ends[J].jQ.offset().left) return t.insAtLeftEnd(this);
|
|
24986
|
+
for (; e < n.jQ.offset().left;) n = n[J];
|
|
24987
24987
|
return n.seek(e, t);
|
|
24988
24988
|
}, e.chToCmd = function(e, t) {
|
|
24989
24989
|
var n;
|
|
24990
|
-
return e.match(/^[a-eg-zA-Z]$/) ? kF(e) : /^\d$/.test(e) ? DF(e) : t && t.typingSlashWritesDivisionSymbol && e === "/" ?
|
|
24990
|
+
return e.match(/^[a-eg-zA-Z]$/) ? kF(e) : /^\d$/.test(e) ? DF(e) : t && t.typingSlashWritesDivisionSymbol && e === "/" ? X["÷"](e) : t && t.typingAsteriskWritesTimesSymbol && e === "*" ? X["×"](e) : (n = XP[e] || X[e]) ? n(e) : Z(e);
|
|
24991
24991
|
}, e.write = function(e, t) {
|
|
24992
24992
|
var n;
|
|
24993
24993
|
if (e.tooDeep()) return !1;
|
|
@@ -24998,8 +24998,8 @@ var _F = K(JP, function(e, t) {
|
|
|
24998
24998
|
return this.jQ.removeClass("mq-hasCursor"), this.isEmpty() && this.jQ.addClass("mq-empty"), this;
|
|
24999
24999
|
};
|
|
25000
25000
|
});
|
|
25001
|
-
|
|
25002
|
-
return
|
|
25001
|
+
nF.p.mouseEvents = !0, tF.StaticMath = function(e) {
|
|
25002
|
+
return q(e.AbstractMathQuill, function(t, n) {
|
|
25003
25003
|
this.RootBlock = bF, t.__mathquillify = function(e, t) {
|
|
25004
25004
|
return this.config(e), n.__mathquillify.call(this, "mq-math-mode"), this.__options.mouseEvents && (this.__controller.delegateMouseEvents(), this.__controller.staticMathTextareaEvents()), this;
|
|
25005
25005
|
}, t.init = function() {
|
|
@@ -25010,26 +25010,26 @@ rF.p.mouseEvents = !0, nF.StaticMath = function(e) {
|
|
|
25010
25010
|
};
|
|
25011
25011
|
});
|
|
25012
25012
|
};
|
|
25013
|
-
var xF =
|
|
25014
|
-
|
|
25015
|
-
return
|
|
25013
|
+
var xF = q(bF, fF);
|
|
25014
|
+
tF.MathField = function(e) {
|
|
25015
|
+
return q(e.EditableField, function(e, t) {
|
|
25016
25016
|
this.RootBlock = xF, e.__mathquillify = function(e, n) {
|
|
25017
|
-
return this.config(e), n > 1 && (this.__controller.root.reflow =
|
|
25017
|
+
return this.config(e), n > 1 && (this.__controller.root.reflow = zP), t.__mathquillify.call(this, "mq-editable-field mq-math-mode"), delete this.__controller.root.reflow, this;
|
|
25018
25018
|
};
|
|
25019
25019
|
});
|
|
25020
25020
|
};
|
|
25021
|
-
var SF =
|
|
25021
|
+
var SF = q(qP, function(e, t) {
|
|
25022
25022
|
e.ctrlSeq = "\\text", e.replaces = function(e) {
|
|
25023
|
-
e instanceof
|
|
25023
|
+
e instanceof YP ? this.replacedText = e.remove().jQ.text() : typeof e == "string" && (this.replacedText = e);
|
|
25024
25024
|
}, e.jQadd = function(e) {
|
|
25025
|
-
t.jQadd.call(this, e), this.ends[
|
|
25025
|
+
t.jQadd.call(this, e), this.ends[J] && this.ends[J].jQadd(this.jQ[0].firstChild);
|
|
25026
25026
|
}, e.createLeftOf = function(e) {
|
|
25027
25027
|
var n = this;
|
|
25028
|
-
if (t.createLeftOf.call(this, e), n[
|
|
25028
|
+
if (t.createLeftOf.call(this, e), n[Y].siblingCreated && n[Y].siblingCreated(e.options, J), n[J].siblingCreated && n[J].siblingCreated(e.options, Y), n.bubble("reflow"), e.insAtRightEnd(n), n.replacedText) for (var r = 0; r < n.replacedText.length; r += 1) n.write(e, n.replacedText.charAt(r));
|
|
25029
25029
|
}, e.parser = function() {
|
|
25030
|
-
var e = this, t =
|
|
25031
|
-
return
|
|
25032
|
-
return t.length === 0 ?
|
|
25030
|
+
var e = this, t = pF.string, n = pF.regex;
|
|
25031
|
+
return pF.optWhitespace.then(t("{")).then(n(/^[^}]*/)).skip(t("}")).map(function(t) {
|
|
25032
|
+
return t.length === 0 ? YP() : (CF(t).adopt(e, 0, 0), e);
|
|
25033
25033
|
});
|
|
25034
25034
|
}, e.textContents = function() {
|
|
25035
25035
|
return this.foldChildren("", function(e, t) {
|
|
@@ -25051,49 +25051,49 @@ var SF = K(JP, function(e, t) {
|
|
|
25051
25051
|
}, e.deleteOutOf = function(e, t) {
|
|
25052
25052
|
this.isEmpty() && t.insRightOf(this);
|
|
25053
25053
|
}, e.write = function(e, n) {
|
|
25054
|
-
if (e.show().deleteSelection(), n !== "$") e[
|
|
25054
|
+
if (e.show().deleteSelection(), n !== "$") e[J] ? (e[J].appendText(n), this.bubble("reflow")) : CF(n).createLeftOf(e);
|
|
25055
25055
|
else if (this.isEmpty()) e.insRightOf(this), Z("\\$", "$").createLeftOf(e);
|
|
25056
|
-
else if (!e[
|
|
25057
|
-
else if (!e[
|
|
25056
|
+
else if (!e[Y]) e.insRightOf(this);
|
|
25057
|
+
else if (!e[J]) e.insLeftOf(this);
|
|
25058
25058
|
else {
|
|
25059
|
-
var r = SF(), i = this.ends[
|
|
25059
|
+
var r = SF(), i = this.ends[J];
|
|
25060
25060
|
i.disown().jQ.detach(), i.adopt(r, 0, 0), e.insLeftOf(this), t.createLeftOf.call(r, e);
|
|
25061
25061
|
}
|
|
25062
25062
|
}, e.seek = function(e, t) {
|
|
25063
25063
|
t.hide();
|
|
25064
25064
|
var r = n(this), i = this.jQ.width() / this.text.length, a = Math.round((e - this.jQ.offset().left) / i);
|
|
25065
25065
|
a <= 0 ? t.insAtLeftEnd(this) : a >= r.text.length ? t.insAtRightEnd(this) : t.insLeftOf(r.splitRight(a));
|
|
25066
|
-
for (var o = e - t.show().offset().left, s = o && o < 0 ?
|
|
25067
|
-
if (s * o < -s * c && t[-s].moveTowards(-s, t), !t.anticursor) this.anticursorPosition = t[
|
|
25066
|
+
for (var o = e - t.show().offset().left, s = o && o < 0 ? J : Y, c = s; t[s] && o * c > 0;) t[s].moveTowards(s, t), c = o, o = e - t.offset().left;
|
|
25067
|
+
if (s * o < -s * c && t[-s].moveTowards(-s, t), !t.anticursor) this.anticursorPosition = t[J] && t[J].text.length;
|
|
25068
25068
|
else if (t.anticursor.parent === this) {
|
|
25069
|
-
var l = t[
|
|
25070
|
-
if (this.anticursorPosition === l) t.anticursor =
|
|
25069
|
+
var l = t[J] && t[J].text.length;
|
|
25070
|
+
if (this.anticursorPosition === l) t.anticursor = KP.copy(t);
|
|
25071
25071
|
else {
|
|
25072
25072
|
if (this.anticursorPosition < l) {
|
|
25073
|
-
var u = t[
|
|
25074
|
-
t[
|
|
25075
|
-
} else var u = t[
|
|
25076
|
-
t.anticursor =
|
|
25073
|
+
var u = t[J].splitRight(this.anticursorPosition);
|
|
25074
|
+
t[J] = u;
|
|
25075
|
+
} else var u = t[Y].splitRight(this.anticursorPosition - l);
|
|
25076
|
+
t.anticursor = KP(this, u[J], u);
|
|
25077
25077
|
}
|
|
25078
25078
|
}
|
|
25079
25079
|
}, e.blur = function(e) {
|
|
25080
|
-
bF.prototype.blur.call(this), e && (this.textContents() === "" ? (this.remove(), e[
|
|
25080
|
+
bF.prototype.blur.call(this), e && (this.textContents() === "" ? (this.remove(), e[J] === this ? e[J] = this[J] : e[Y] === this && (e[Y] = this[Y])) : n(this));
|
|
25081
25081
|
};
|
|
25082
25082
|
function n(e) {
|
|
25083
25083
|
e.jQ[0].normalize();
|
|
25084
25084
|
var t = e.jQ.contents().filter(function(e, t) {
|
|
25085
25085
|
return t.nodeType === 3;
|
|
25086
25086
|
})[0];
|
|
25087
|
-
t ||= { data: "" },
|
|
25087
|
+
t ||= { data: "" }, WP("only node in TextBlock span is Text node", t.nodeType === 3);
|
|
25088
25088
|
var n = CF(t.data);
|
|
25089
25089
|
return n.jQadd(t), e.children().disown(), n.adopt(e, 0, 0);
|
|
25090
25090
|
}
|
|
25091
25091
|
e.focus = bF.prototype.focus;
|
|
25092
|
-
}), CF =
|
|
25092
|
+
}), CF = q(qP, function(e, t) {
|
|
25093
25093
|
e.init = function(e) {
|
|
25094
25094
|
t.init.call(this), this.text = e;
|
|
25095
25095
|
}, e.jQadd = function(e) {
|
|
25096
|
-
this.dom = e, this.jQ =
|
|
25096
|
+
this.dom = e, this.jQ = MP(e);
|
|
25097
25097
|
}, e.jQize = function() {
|
|
25098
25098
|
return this.jQadd(document.createTextNode(this.text));
|
|
25099
25099
|
}, e.appendText = function(e) {
|
|
@@ -25101,24 +25101,24 @@ var SF = K(JP, function(e, t) {
|
|
|
25101
25101
|
}, e.prependText = function(e) {
|
|
25102
25102
|
this.text = e + this.text, this.dom.insertData(0, e);
|
|
25103
25103
|
}, e.insTextAtDirEnd = function(e, t) {
|
|
25104
|
-
|
|
25104
|
+
GP(t), t === Y ? this.appendText(e) : this.prependText(e);
|
|
25105
25105
|
}, e.splitRight = function(e) {
|
|
25106
|
-
var t = CF(this.text.slice(e)).adopt(this.parent, this, this[
|
|
25106
|
+
var t = CF(this.text.slice(e)).adopt(this.parent, this, this[Y]);
|
|
25107
25107
|
return t.jQadd(this.dom.splitText(e)), this.text = this.text.slice(0, e), t;
|
|
25108
25108
|
};
|
|
25109
25109
|
function n(e, t) {
|
|
25110
|
-
return t.charAt(e ===
|
|
25110
|
+
return t.charAt(e === J ? 0 : -1 + t.length);
|
|
25111
25111
|
}
|
|
25112
25112
|
e.moveTowards = function(e, t) {
|
|
25113
|
-
|
|
25113
|
+
GP(e);
|
|
25114
25114
|
var r = n(-e, this.text), i = this[-e];
|
|
25115
25115
|
return i ? i.insTextAtDirEnd(r, e) : CF(r).createDir(-e, t), this.deleteTowards(e, t);
|
|
25116
25116
|
}, e.latex = function() {
|
|
25117
25117
|
return this.text;
|
|
25118
25118
|
}, e.deleteTowards = function(e, t) {
|
|
25119
|
-
this.text.length > 1 ? e ===
|
|
25119
|
+
this.text.length > 1 ? e === Y ? (this.dom.deleteData(0, 1), this.text = this.text.slice(1)) : (this.dom.deleteData(-1 + this.text.length, 1), this.text = this.text.slice(0, -1)) : (this.remove(), this.jQ.remove(), t[e] = this[e]);
|
|
25120
25120
|
}, e.selectTowards = function(e, t) {
|
|
25121
|
-
|
|
25121
|
+
GP(e);
|
|
25122
25122
|
var r = t.anticursor, i = n(-e, this.text);
|
|
25123
25123
|
if (r[e] === this) {
|
|
25124
25124
|
var a = CF(i).createDir(e, t);
|
|
@@ -25135,25 +25135,25 @@ var SF = K(JP, function(e, t) {
|
|
|
25135
25135
|
return this.deleteTowards(e, t);
|
|
25136
25136
|
};
|
|
25137
25137
|
});
|
|
25138
|
-
|
|
25138
|
+
X.text = X.textnormal = X.textrm = X.textup = X.textmd = SF;
|
|
25139
25139
|
function wF(e, t, n) {
|
|
25140
|
-
return
|
|
25140
|
+
return q(SF, {
|
|
25141
25141
|
ctrlSeq: e,
|
|
25142
25142
|
htmlTemplate: "<" + t + " " + n + ">&0</" + t + ">"
|
|
25143
25143
|
});
|
|
25144
25144
|
}
|
|
25145
|
-
|
|
25146
|
-
var TF =
|
|
25145
|
+
X.em = X.italic = X.italics = X.emph = X.textit = X.textsl = wF("\\textit", "i", "class=\"mq-text-mode\""), X.strong = X.bold = X.textbf = wF("\\textbf", "b", "class=\"mq-text-mode\""), X.sf = X.textsf = wF("\\textsf", "span", "class=\"mq-sans-serif mq-text-mode\""), X.tt = X.texttt = wF("\\texttt", "span", "class=\"mq-monospace mq-text-mode\""), X.textsc = wF("\\textsc", "span", "style=\"font-variant:small-caps\" class=\"mq-text-mode\""), X.uppercase = wF("\\uppercase", "span", "style=\"text-transform:uppercase\" class=\"mq-text-mode\""), X.lowercase = wF("\\lowercase", "span", "style=\"text-transform:lowercase\" class=\"mq-text-mode\"");
|
|
25146
|
+
var TF = q(vF, function(e, t) {
|
|
25147
25147
|
e.init = function(e) {
|
|
25148
25148
|
t.init.call(this, "$"), this.cursor = e;
|
|
25149
25149
|
}, e.htmlTemplate = "<span class=\"mq-math-mode\">&0</span>", e.createBlocks = function() {
|
|
25150
|
-
t.createBlocks.call(this), this.ends[
|
|
25151
|
-
t === "$" ? this.isEmpty() ? (e.insRightOf(this.parent), this.parent.deleteTowards(dir, e), Z("\\$", "$").createLeftOf(e.show())) : e[
|
|
25150
|
+
t.createBlocks.call(this), this.ends[J].cursor = this.cursor, this.ends[J].write = function(e, t) {
|
|
25151
|
+
t === "$" ? this.isEmpty() ? (e.insRightOf(this.parent), this.parent.deleteTowards(dir, e), Z("\\$", "$").createLeftOf(e.show())) : e[Y] ? e[J] ? bF.prototype.write.call(this, e, t) : e.insLeftOf(this.parent) : e.insRightOf(this.parent) : bF.prototype.write.call(this, e, t);
|
|
25152
25152
|
};
|
|
25153
25153
|
}, e.latex = function() {
|
|
25154
|
-
return "$" + this.ends[
|
|
25154
|
+
return "$" + this.ends[J].latex() + "$";
|
|
25155
25155
|
};
|
|
25156
|
-
}), EF =
|
|
25156
|
+
}), EF = q(xF, function(e, t) {
|
|
25157
25157
|
e.keystroke = function(e) {
|
|
25158
25158
|
if (!(e === "Spacebar" || e === "Shift-Spacebar")) return t.keystroke.apply(this, arguments);
|
|
25159
25159
|
}, e.write = function(e, t) {
|
|
@@ -25164,27 +25164,27 @@ var TF = K(vF, function(e, t) {
|
|
|
25164
25164
|
}
|
|
25165
25165
|
};
|
|
25166
25166
|
});
|
|
25167
|
-
|
|
25168
|
-
return
|
|
25167
|
+
tF.TextField = function(e) {
|
|
25168
|
+
return q(e.EditableField, function(e, t) {
|
|
25169
25169
|
this.RootBlock = EF, e.__mathquillify = function() {
|
|
25170
25170
|
return t.__mathquillify.call(this, "mq-editable-field mq-text-mode");
|
|
25171
25171
|
}, e.latex = function(e) {
|
|
25172
25172
|
return arguments.length > 0 ? (this.__controller.renderLatexText(e), this.__controller.blurred && this.__controller.cursor.hide().parent.blur(), this) : this.__controller.exportLatex();
|
|
25173
25173
|
};
|
|
25174
25174
|
});
|
|
25175
|
-
},
|
|
25175
|
+
}, XP["\\"] = q(vF, function(e, t) {
|
|
25176
25176
|
e.ctrlSeq = "\\", e.replaces = function(e) {
|
|
25177
25177
|
this._replacedFragment = e.disown(), this.isEmpty = function() {
|
|
25178
25178
|
return !1;
|
|
25179
25179
|
};
|
|
25180
25180
|
}, e.htmlTemplate = "<span class=\"mq-latex-command-input mq-non-leaf\">\\<span>&0</span></span>", e.textTemplate = ["\\"], e.createBlocks = function() {
|
|
25181
|
-
t.createBlocks.call(this), this.ends[
|
|
25181
|
+
t.createBlocks.call(this), this.ends[J].focus = function() {
|
|
25182
25182
|
return this.parent.jQ.addClass("mq-hasCursor"), this.isEmpty() && this.parent.jQ.removeClass("mq-empty"), this;
|
|
25183
|
-
}, this.ends[
|
|
25183
|
+
}, this.ends[J].blur = function() {
|
|
25184
25184
|
return this.parent.jQ.removeClass("mq-hasCursor"), this.isEmpty() && this.parent.jQ.addClass("mq-empty"), this;
|
|
25185
|
-
}, this.ends[
|
|
25185
|
+
}, this.ends[J].write = function(e, t) {
|
|
25186
25186
|
e.show().deleteSelection(), t.match(/[a-z]/i) ? Z(t).createLeftOf(e) : (this.parent.renderCommand(e), (t !== "\\" || !this.isEmpty()) && e.parent.write(e, t));
|
|
25187
|
-
}, this.ends[
|
|
25187
|
+
}, this.ends[J].keystroke = function(e, n, r) {
|
|
25188
25188
|
if (e === "Tab" || e === "Enter" || e === "Spacebar") {
|
|
25189
25189
|
this.parent.renderCommand(r.cursor), n.preventDefault();
|
|
25190
25190
|
return;
|
|
@@ -25195,53 +25195,53 @@ nF.TextField = function(e) {
|
|
|
25195
25195
|
if (t.createLeftOf.call(this, e), this._replacedFragment) {
|
|
25196
25196
|
var n = this.jQ[0];
|
|
25197
25197
|
this.jQ = this._replacedFragment.jQ.addClass("mq-blur").bind("mousedown mousemove", function(e) {
|
|
25198
|
-
return
|
|
25198
|
+
return MP(e.target = n).trigger(e), !1;
|
|
25199
25199
|
}).insertBefore(this.jQ).add(this.jQ);
|
|
25200
25200
|
}
|
|
25201
25201
|
}, e.latex = function() {
|
|
25202
|
-
return "\\" + this.ends[
|
|
25202
|
+
return "\\" + this.ends[J].latex() + " ";
|
|
25203
25203
|
}, e.renderCommand = function(e) {
|
|
25204
|
-
this.jQ = this.jQ.last(), this.remove(), this[
|
|
25205
|
-
var t = this.ends[
|
|
25204
|
+
this.jQ = this.jQ.last(), this.remove(), this[Y] ? e.insLeftOf(this[Y]) : e.insAtRightEnd(this.parent);
|
|
25205
|
+
var t = this.ends[J].latex();
|
|
25206
25206
|
t ||= " ";
|
|
25207
|
-
var n =
|
|
25207
|
+
var n = X[t];
|
|
25208
25208
|
n ? (n = n(t), this._replacedFragment && n.replaces(this._replacedFragment), n.createLeftOf(e)) : (n = SF(), n.replaces(t), n.createLeftOf(e), e.insRightOf(n), this._replacedFragment && this._replacedFragment.remove());
|
|
25209
25209
|
};
|
|
25210
|
-
}),
|
|
25211
|
-
var DF =
|
|
25210
|
+
}), X["∉"] = X.notin = K(Q, "\\notin ", "∉"), X["≅"] = X.cong = K(Q, "\\cong ", "≅"), X["≡"] = X.equiv = K(Q, "\\equiv ", "≡"), X["⊕"] = X.oplus = K(Q, "\\oplus ", "⊕"), X["⊗"] = X.otimes = K(Q, "\\otimes ", "⊗"), X["≠"] = X.ne = X.neq = K(Q, "\\ne ", "≠"), X["≇"] = X.ncong = K(Q, "\\ncong ", "≇"), X["∗"] = X.ast = X.star = X.loast = X.lowast = K(Q, "\\ast ", "∗"), X.therefor = X.therefore = K(Q, "\\therefore ", "∴"), X.cuz = X.because = K(Q, "\\because ", "∵"), X.prop = X.propto = K(Q, "\\propto ", "∝"), X["≈"] = X.asymp = X.approx = K(Q, "\\approx ", "≈"), X["≉"] = X.nasymp = X.napprox = K(Q, "\\napprox ", "≉"), X.isin = X.in = K(Q, "\\in ", "∈"), X.ni = X.contains = K(Q, "\\ni ", "∋"), X.notni = X.niton = X.notcontains = X.doesnotcontain = ZP["\\not\\ni"] = K(Q, "\\not\\ni ", "∌"), X.sub = X.subset = K(Q, "\\subset ", "⊂"), X.sup = X.supset = X.superset = K(Q, "\\supset ", "⊃"), X.nsub = X.notsub = X.nsubset = X.notsubset = ZP["\\not\\subset"] = K(Q, "\\not\\subset ", "⊄"), X.nsup = X.notsup = X.nsupset = X.notsupset = X.nsuperset = X.notsuperset = ZP["\\not\\supset"] = K(Q, "\\not\\supset ", "⊅"), X.sube = X.subeq = X.subsete = X.subseteq = K(Q, "\\subseteq ", "⊆"), X.supe = X.supeq = X.supsete = X.supseteq = X.supersete = X.superseteq = K(Q, "\\supseteq ", "⊇"), X.nsube = X.nsubeq = X.notsube = X.notsubeq = X.nsubsete = X.nsubseteq = X.notsubsete = X.notsubseteq = ZP["\\not\\subseteq"] = K(Q, "\\not\\subseteq ", "⊈"), X.nsupe = X.nsupeq = X.notsupe = X.notsupeq = X.nsupsete = X.nsupseteq = X.notsupsete = X.notsupseteq = X.nsupersete = X.nsuperseteq = X.notsupersete = X.notsuperseteq = ZP["\\not\\supseteq"] = K(Q, "\\not\\supseteq ", "⊉"), X.N = X.naturals = X.Naturals = K(Z, "\\mathbb{N}", "ℕ"), X.P = X.primes = X.Primes = X.projective = X.Projective = X.probability = X.Probability = K(Z, "\\mathbb{P}", "ℙ"), X.Z = X.integers = X.Integers = K(Z, "\\mathbb{Z}", "ℤ"), X.Q = X.rationals = X.Rationals = K(Z, "\\mathbb{Q}", "ℚ"), X.R = X.reals = X.Reals = K(Z, "\\mathbb{R}", "ℝ"), X.C = X.complex = X.Complex = X.complexes = X.Complexes = X.complexplane = X.Complexplane = X.ComplexPlane = K(Z, "\\mathbb{C}", "ℂ"), X.H = X.Hamiltonian = X.quaternions = X.Quaternions = K(Z, "\\mathbb{H}", "ℍ"), X.quad = X.emsp = K(Z, "\\quad ", " "), X.qquad = K(Z, "\\qquad ", " "), X.diamond = K(Z, "\\diamond ", "◇"), X.bigtriangleup = K(Z, "\\bigtriangleup ", "△"), X.ominus = K(Z, "\\ominus ", "⊖"), X.uplus = K(Z, "\\uplus ", "⊎"), X.bigtriangledown = K(Z, "\\bigtriangledown ", "▽"), X.sqcap = K(Z, "\\sqcap ", "⊓"), X.triangleleft = K(Z, "\\triangleleft ", "⊲"), X.sqcup = K(Z, "\\sqcup ", "⊔"), X.triangleright = K(Z, "\\triangleright ", "⊳"), X.odot = X.circledot = K(Z, "\\odot ", "⊙"), X.bigcirc = K(Z, "\\bigcirc ", "◯"), X.dagger = K(Z, "\\dagger ", "†"), X.ddagger = K(Z, "\\ddagger ", "‡"), X.wr = K(Z, "\\wr ", "≀"), X.amalg = K(Z, "\\amalg ", "∐"), X.models = K(Z, "\\models ", "⊨"), X.prec = K(Z, "\\prec ", "≺"), X.succ = K(Z, "\\succ ", "≻"), X.preceq = K(Z, "\\preceq ", "≼"), X.succeq = K(Z, "\\succeq ", "≽"), X.simeq = K(Z, "\\simeq ", "≃"), X.mid = K(Z, "\\mid ", "∣"), X.ll = K(Z, "\\ll ", "≪"), X.gg = K(Z, "\\gg ", "≫"), X.parallel = K(Z, "\\parallel ", "∥"), X.nparallel = K(Z, "\\nparallel ", "∦"), X.bowtie = K(Z, "\\bowtie ", "⋈"), X.sqsubset = K(Z, "\\sqsubset ", "⊏"), X.sqsupset = K(Z, "\\sqsupset ", "⊐"), X.smile = K(Z, "\\smile ", "⌣"), X.sqsubseteq = K(Z, "\\sqsubseteq ", "⊑"), X.sqsupseteq = K(Z, "\\sqsupseteq ", "⊒"), X.doteq = K(Z, "\\doteq ", "≐"), X.frown = K(Z, "\\frown ", "⌢"), X.vdash = K(Z, "\\vdash ", "⊦"), X.dashv = K(Z, "\\dashv ", "⊣"), X.nless = K(Z, "\\nless ", "≮"), X.ngtr = K(Z, "\\ngtr ", "≯"), X.longleftarrow = K(Z, "\\longleftarrow ", "←"), X.longrightarrow = K(Z, "\\longrightarrow ", "→"), X.Longleftarrow = K(Z, "\\Longleftarrow ", "⇐"), X.Longrightarrow = K(Z, "\\Longrightarrow ", "⇒"), X.longleftrightarrow = K(Z, "\\longleftrightarrow ", "↔"), X.updownarrow = K(Z, "\\updownarrow ", "↕"), X.Longleftrightarrow = K(Z, "\\Longleftrightarrow ", "⇔"), X.Updownarrow = K(Z, "\\Updownarrow ", "⇕"), X.mapsto = K(Z, "\\mapsto ", "↦"), X.nearrow = K(Z, "\\nearrow ", "↗"), X.hookleftarrow = K(Z, "\\hookleftarrow ", "↩"), X.hookrightarrow = K(Z, "\\hookrightarrow ", "↪"), X.searrow = K(Z, "\\searrow ", "↘"), X.leftharpoonup = K(Z, "\\leftharpoonup ", "↼"), X.rightharpoonup = K(Z, "\\rightharpoonup ", "⇀"), X.swarrow = K(Z, "\\swarrow ", "↙"), X.leftharpoondown = K(Z, "\\leftharpoondown ", "↽"), X.rightharpoondown = K(Z, "\\rightharpoondown ", "⇁"), X.nwarrow = K(Z, "\\nwarrow ", "↖"), X.ldots = K(Z, "\\ldots ", "…"), X.cdots = K(Z, "\\cdots ", "⋯"), X.vdots = K(Z, "\\vdots ", "⋮"), X.ddots = K(Z, "\\ddots ", "⋱"), X.surd = K(Z, "\\surd ", "√"), X.triangle = K(Z, "\\triangle ", "△"), X.ell = K(Z, "\\ell ", "ℓ"), X.top = K(Z, "\\top ", "⊤"), X.flat = K(Z, "\\flat ", "♭"), X.natural = K(Z, "\\natural ", "♮"), X.sharp = K(Z, "\\sharp ", "♯"), X.wp = K(Z, "\\wp ", "℘"), X.bot = K(Z, "\\bot ", "⊥"), X.clubsuit = K(Z, "\\clubsuit ", "♣"), X.diamondsuit = K(Z, "\\diamondsuit ", "♢"), X.heartsuit = K(Z, "\\heartsuit ", "♡"), X.spadesuit = K(Z, "\\spadesuit ", "♠"), X.circledot = K(Z, "\\circledot ", "⊙"), X.middot = K(Z, "\\middot ", "·"), X.dottedsquare = K(Z, "\\dottedsquare ", "⬚"), X.square = K(Z, "\\square ", "⬜"), X.rectangle = K(Z, "\\rectangle ", "▯"), X.oint = K(Z, "\\oint ", "∮"), X.bigcap = K(Z, "\\bigcap ", "∩"), X.bigcup = K(Z, "\\bigcup ", "∪"), X.bigsqcup = K(Z, "\\bigsqcup ", "⊔"), X.bigvee = K(Z, "\\bigvee ", "∨"), X.bigwedge = K(Z, "\\bigwedge ", "∧"), X.bigodot = K(Z, "\\bigodot ", "⊙"), X.bigotimes = K(Z, "\\bigotimes ", "⊗"), X.bigoplus = K(Z, "\\bigoplus ", "⊕"), X.biguplus = K(Z, "\\biguplus ", "⊎"), X.lfloor = K(Z, "\\lfloor ", "⌊"), X.rfloor = K(Z, "\\rfloor ", "⌋"), X.lceil = K(Z, "\\lceil ", "⌈"), X.rceil = K(Z, "\\rceil ", "⌉"), X.opencurlybrace = X.lbrace = K(Z, "\\lbrace ", "{"), X.closecurlybrace = X.rbrace = K(Z, "\\rbrace ", "}"), X.lbrack = K(Z, "["), X.rbrack = K(Z, "]"), X.mug = K(Z, "\\mug ", "µg"), X.mus = K(Z, "\\mus ", "µs"), X.mum = K(Z, "\\mum ", "µm"), X.muL = K(Z, "\\muL ", "µL"), X.slash = K(Z, "/"), X.vert = K(Z, "|"), X.perp = X.perpendicular = K(Z, "\\perp ", "⊥"), X.nabla = X.del = K(Z, "\\nabla ", "∇"), X.hbar = K(Z, "\\hbar ", "ℏ"), X.AA = X.Angstrom = X.angstrom = K(Z, "\\text\\AA ", "Å"), X.ring = X.circ = X.circle = K(Z, "\\circ ", "∘"), X.bull = X.bullet = K(Z, "\\bullet ", "•"), X.setminus = X.smallsetminus = K(Z, "\\setminus ", "∖"), X.not = X["¬"] = X.neg = K(Z, "\\neg ", "¬"), X["…"] = X.dots = X.ellip = X.hellip = X.ellipsis = X.hellipsis = K(Z, "\\dots ", "…"), X.converges = X.darr = X.dnarr = X.dnarrow = X.downarrow = K(Z, "\\downarrow ", "↓"), X.dArr = X.dnArr = X.dnArrow = X.Downarrow = K(Z, "\\Downarrow ", "⇓"), X.diverges = X.uarr = X.uparrow = K(Z, "\\uparrow ", "↑"), X.uArr = X.Uparrow = K(Z, "\\Uparrow ", "⇑"), X.to = K(Q, "\\to ", "→"), X.rarr = X.rightarrow = K(Z, "\\rightarrow ", "→"), X.implies = K(Q, "\\Rightarrow ", "⇒"), X.rArr = X.Rightarrow = K(Z, "\\Rightarrow ", "⇒"), X.gets = K(Q, "\\gets ", "←"), X.larr = X.leftarrow = K(Z, "\\leftarrow ", "←"), X.impliedby = K(Q, "\\Leftarrow ", "⇐"), X.lArr = X.Leftarrow = K(Z, "\\Leftarrow ", "⇐"), X.harr = X.lrarr = X.leftrightarrow = K(Z, "\\leftrightarrow ", "↔"), X.iff = K(Q, "\\Leftrightarrow ", "⇔"), X.hArr = X.lrArr = X.Leftrightarrow = K(Z, "\\Leftrightarrow ", "⇔"), X.Re = X.Real = X.real = K(Z, "\\Re ", "ℜ"), X.Im = X.imag = X.image = X.imagin = X.imaginary = X.Imaginary = K(Z, "\\Im ", "ℑ"), X.part = X.partial = K(Z, "\\partial ", "∂"), X.infty = X.infin = X.infinity = K(Z, "\\infty ", "∞"), X.pounds = K(Z, "\\pounds ", "£"), X.alef = X.alefsym = X.aleph = X.alephsym = K(Z, "\\aleph ", "ℵ"), X.xist = X.xists = X.exist = X.exists = K(Z, "\\exists ", "∃"), X.nexists = X.nexist = K(Z, "\\nexists ", "∄"), X.and = X.land = X.wedge = K(Q, "\\wedge ", "∧"), X.or = X.lor = X.vee = K(Q, "\\vee ", "∨"), X.o = X.O = X.empty = X.emptyset = X.oslash = X.Oslash = X.nothing = X.varnothing = K(Q, "\\varnothing ", "∅"), X.cup = X.union = K(Q, "\\cup ", "∪"), X.cap = X.intersect = X.intersection = K(Q, "\\cap ", "∩"), X.deg = X.degree = K(Z, "\\degree ", "°"), X.ang = X.angle = K(Z, "\\angle ", "∠"), X.measuredangle = K(Z, "\\measuredangle ", "m∠");
|
|
25211
|
+
var DF = q(Z, function(e, t) {
|
|
25212
25212
|
e.createLeftOf = function(e) {
|
|
25213
|
-
e.options.autoSubscriptNumerals && e.parent !== e.parent.parent.sub && (e[
|
|
25213
|
+
e.options.autoSubscriptNumerals && e.parent !== e.parent.parent.sub && (e[J] instanceof OF && e[J].isItalic !== !1 || e[J] instanceof rI && e[J][J] instanceof OF && e[J][J].isItalic !== !1) ? (X._().createLeftOf(e), t.createLeftOf.call(this, e), e.insRightOf(e.parent.parent)) : t.createLeftOf.call(this, e);
|
|
25214
25214
|
};
|
|
25215
|
-
}), OF =
|
|
25215
|
+
}), OF = q(yF, function(e, t) {
|
|
25216
25216
|
e.init = function(e, n) {
|
|
25217
25217
|
t.init.call(this, e, "<var>" + (n || e) + "</var>");
|
|
25218
25218
|
}, e.text = function() {
|
|
25219
25219
|
var e = this.ctrlSeq;
|
|
25220
|
-
return this.isPartOfOperator ? e[0] == "\\" ? e = e.slice(1, e.length) : e[e.length - 1] == " " && (e = e.slice(0, -1)) : (this[
|
|
25220
|
+
return this.isPartOfOperator ? e[0] == "\\" ? e = e.slice(1, e.length) : e[e.length - 1] == " " && (e = e.slice(0, -1)) : (this[J] && !(this[J] instanceof OF) && !(this[J] instanceof Q) && this[J].ctrlSeq !== "\\ " && (e = "*" + e), this[Y] && !(this[Y] instanceof Q) && !(this[Y] instanceof rI) && (e += "*")), e;
|
|
25221
25221
|
};
|
|
25222
25222
|
});
|
|
25223
|
-
|
|
25223
|
+
nF.p.autoCommands = { _maxLength: 0 }, rF.autoCommands = function(e) {
|
|
25224
25224
|
if (!/^[a-z]+(?: [a-z]+)*$/i.test(e)) throw "\"" + e + "\" not a space-delimited list of only letters";
|
|
25225
25225
|
for (var t = e.split(" "), n = {}, r = 0, i = 0; i < t.length; i += 1) {
|
|
25226
25226
|
var a = t[i];
|
|
25227
25227
|
if (a.length < 2) throw "autocommand \"" + a + "\" not minimum length of 2";
|
|
25228
|
-
if (
|
|
25229
|
-
n[a] = 1, r =
|
|
25228
|
+
if (X[a] === NF) throw "\"" + a + "\" is a built-in operator name";
|
|
25229
|
+
n[a] = 1, r = RP(r, a.length);
|
|
25230
25230
|
}
|
|
25231
25231
|
return n._maxLength = r, n;
|
|
25232
25232
|
};
|
|
25233
|
-
var kF =
|
|
25233
|
+
var kF = q(OF, function(e, t) {
|
|
25234
25234
|
e.init = function(e) {
|
|
25235
25235
|
return t.init.call(this, this.letter = e);
|
|
25236
25236
|
}, e.createLeftOf = function(e) {
|
|
25237
25237
|
t.createLeftOf.apply(this, arguments);
|
|
25238
25238
|
var n = e.options.autoCommands, r = n._maxLength;
|
|
25239
25239
|
if (r > 0) {
|
|
25240
|
-
for (var i = "", a = this, o = 0; a instanceof kF && a.ctrlSeq === a.letter && o < r;) i = a.letter + i, a = a[
|
|
25240
|
+
for (var i = "", a = this, o = 0; a instanceof kF && a.ctrlSeq === a.letter && o < r;) i = a.letter + i, a = a[J], o += 1;
|
|
25241
25241
|
for (; i.length;) {
|
|
25242
25242
|
if (n.hasOwnProperty(i)) {
|
|
25243
|
-
for (var o = 1, a = this; o < i.length; o += 1, a = a[
|
|
25244
|
-
return
|
|
25243
|
+
for (var o = 1, a = this; o < i.length; o += 1, a = a[J]);
|
|
25244
|
+
return YP(a, this).remove(), e[J] = a[J], X[i](i).createLeftOf(e);
|
|
25245
25245
|
}
|
|
25246
25246
|
i = i.slice(1);
|
|
25247
25247
|
}
|
|
@@ -25249,29 +25249,29 @@ var kF = K(OF, function(e, t) {
|
|
|
25249
25249
|
}, e.italicize = function(e) {
|
|
25250
25250
|
return this.isItalic = e, this.isPartOfOperator = !e, this.jQ.toggleClass("mq-operator-name", !e), this;
|
|
25251
25251
|
}, e.finalizeTree = e.siblingDeleted = e.siblingCreated = function(e, t) {
|
|
25252
|
-
t !==
|
|
25252
|
+
t !== J && this[Y] instanceof kF || this.autoUnItalicize(e);
|
|
25253
25253
|
}, e.autoUnItalicize = function(e) {
|
|
25254
25254
|
var t = e.autoOperatorNames;
|
|
25255
25255
|
if (t._maxLength !== 0) {
|
|
25256
|
-
for (var r = this.letter, i = this[
|
|
25257
|
-
for (var a = this[
|
|
25258
|
-
|
|
25256
|
+
for (var r = this.letter, i = this[J]; i instanceof kF; i = i[J]) r = i.letter + r;
|
|
25257
|
+
for (var a = this[Y]; a instanceof kF; a = a[Y]) r += a.letter;
|
|
25258
|
+
YP(i[Y] || this.parent.ends[J], a[J] || this.parent.ends[Y]).each(function(e) {
|
|
25259
25259
|
e.italicize(!0).jQ.removeClass("mq-first mq-last mq-followed-by-supsub"), e.ctrlSeq = e.letter;
|
|
25260
25260
|
});
|
|
25261
|
-
outer: for (var o = 0, s = i[
|
|
25261
|
+
outer: for (var o = 0, s = i[Y] || this.parent.ends[J]; o < r.length; o += 1, s = s[Y]) for (var c = LP(t._maxLength, r.length - o); c > 0; --c) {
|
|
25262
25262
|
var l = r.slice(o, o + c);
|
|
25263
25263
|
if (t.hasOwnProperty(l)) {
|
|
25264
|
-
for (var u = 0, d = s; u < c; u += 1, d = d[
|
|
25264
|
+
for (var u = 0, d = s; u < c; u += 1, d = d[Y]) {
|
|
25265
25265
|
d.italicize(!1);
|
|
25266
25266
|
var f = d;
|
|
25267
25267
|
}
|
|
25268
25268
|
var p = AF.hasOwnProperty(l);
|
|
25269
|
-
if (s.ctrlSeq = (p ? "\\" : "\\operatorname{") + s.ctrlSeq, f.ctrlSeq += p ? " " : "}", MF.hasOwnProperty(l) && f[
|
|
25270
|
-
var m = f[
|
|
25269
|
+
if (s.ctrlSeq = (p ? "\\" : "\\operatorname{") + s.ctrlSeq, f.ctrlSeq += p ? " " : "}", MF.hasOwnProperty(l) && f[J][J][J].jQ.addClass("mq-last"), n(s[J]) || s.jQ.addClass("mq-first"), !n(f[Y])) if (f[Y] instanceof rI) {
|
|
25270
|
+
var m = f[Y];
|
|
25271
25271
|
(m.siblingCreated = m.siblingDeleted = function() {
|
|
25272
|
-
m.jQ.toggleClass("mq-after-operator-name", !(m[
|
|
25272
|
+
m.jQ.toggleClass("mq-after-operator-name", !(m[Y] instanceof fI));
|
|
25273
25273
|
})();
|
|
25274
|
-
} else f.jQ.toggleClass("mq-last", !(f[
|
|
25274
|
+
} else f.jQ.toggleClass("mq-last", !(f[Y] instanceof fI));
|
|
25275
25275
|
o += c - 1, s = f;
|
|
25276
25276
|
continue outer;
|
|
25277
25277
|
}
|
|
@@ -25281,7 +25281,7 @@ var kF = K(OF, function(e, t) {
|
|
|
25281
25281
|
function n(e) {
|
|
25282
25282
|
return !e || e instanceof Q || e instanceof oI;
|
|
25283
25283
|
}
|
|
25284
|
-
}), AF = {}, jF =
|
|
25284
|
+
}), AF = {}, jF = nF.p.autoOperatorNames = { _maxLength: 9 }, MF = {
|
|
25285
25285
|
limsup: 1,
|
|
25286
25286
|
liminf: 1,
|
|
25287
25287
|
projlim: 1,
|
|
@@ -25292,81 +25292,81 @@ var kF = K(OF, function(e, t) {
|
|
|
25292
25292
|
for (var n = "sin cos tan arcsin arccos arctan sinh cosh tanh sec csc cot coth".split(" "), t = 0; t < n.length; t += 1) AF[n[t]] = 1;
|
|
25293
25293
|
for (var r = "sin cos tan sec cosec csc cotan cot ctg".split(" "), t = 0; t < r.length; t += 1) jF[r[t]] = jF["arc" + r[t]] = jF[r[t] + "h"] = jF["ar" + r[t] + "h"] = jF["arc" + r[t] + "h"] = 1;
|
|
25294
25294
|
for (var i = "gcf hcf lcm proj span".split(" "), t = 0; t < i.length; t += 1) jF[i[t]] = 1;
|
|
25295
|
-
})(),
|
|
25295
|
+
})(), rF.autoOperatorNames = function(e) {
|
|
25296
25296
|
if (!/^[a-z]+(?: [a-z]+)*$/i.test(e)) throw "\"" + e + "\" not a space-delimited list of only letters";
|
|
25297
25297
|
for (var t = e.split(" "), n = {}, r = 0, i = 0; i < t.length; i += 1) {
|
|
25298
25298
|
var a = t[i];
|
|
25299
25299
|
if (a.length < 2) throw "\"" + a + "\" not minimum length of 2";
|
|
25300
|
-
n[a] = 1, r =
|
|
25300
|
+
n[a] = 1, r = RP(r, a.length);
|
|
25301
25301
|
}
|
|
25302
25302
|
return n._maxLength = r, n;
|
|
25303
25303
|
};
|
|
25304
|
-
var NF =
|
|
25304
|
+
var NF = q(yF, function(e, t) {
|
|
25305
25305
|
e.init = function(e) {
|
|
25306
25306
|
this.ctrlSeq = e;
|
|
25307
25307
|
}, e.createLeftOf = function(e) {
|
|
25308
25308
|
for (var t = this.ctrlSeq, n = 0; n < t.length; n += 1) kF(t.charAt(n)).createLeftOf(e);
|
|
25309
25309
|
}, e.parser = function() {
|
|
25310
|
-
for (var e = this.ctrlSeq, t = bF(), n = 0; n < e.length; n += 1) kF(e.charAt(n)).adopt(t, t.ends[
|
|
25311
|
-
return
|
|
25310
|
+
for (var e = this.ctrlSeq, t = bF(), n = 0; n < e.length; n += 1) kF(e.charAt(n)).adopt(t, t.ends[Y], 0);
|
|
25311
|
+
return pF.succeed(t.children());
|
|
25312
25312
|
};
|
|
25313
25313
|
});
|
|
25314
|
-
for (var PF in jF) jF.hasOwnProperty(PF) && (
|
|
25315
|
-
|
|
25316
|
-
e.createLeftOf =
|
|
25314
|
+
for (var PF in jF) jF.hasOwnProperty(PF) && (X[PF] = NF);
|
|
25315
|
+
X.operatorname = q(vF, function(e) {
|
|
25316
|
+
e.createLeftOf = zP, e.numBlocks = function() {
|
|
25317
25317
|
return 1;
|
|
25318
25318
|
}, e.parser = function() {
|
|
25319
25319
|
return gF.block.map(function(e) {
|
|
25320
25320
|
return e.children();
|
|
25321
25321
|
});
|
|
25322
25322
|
};
|
|
25323
|
-
}),
|
|
25323
|
+
}), X.f = q(kF, function(e, t) {
|
|
25324
25324
|
e.init = function() {
|
|
25325
25325
|
yF.p.init.call(this, this.letter = "f", "<var class=\"mq-f\">f</var>");
|
|
25326
25326
|
}, e.italicize = function(e) {
|
|
25327
25327
|
return this.jQ.html("f").toggleClass("mq-f", e), t.italicize.apply(this, arguments);
|
|
25328
25328
|
};
|
|
25329
|
-
}),
|
|
25330
|
-
var FF =
|
|
25329
|
+
}), X[" "] = X.space = K(Z, "\\ ", " "), X["'"] = X.prime = K(Z, "'", "′"), X["″"] = X.dprime = K(Z, "″", "″"), X["\""] = X.doublePrime = K(Z, "\"", "″"), X.backslash = K(Z, "\\backslash ", "\\"), XP["\\"] ||= X.backslash, X.$ = K(Z, "\\$", "$");
|
|
25330
|
+
var FF = q(yF, function(e, t) {
|
|
25331
25331
|
e.init = function(e, n) {
|
|
25332
25332
|
t.init.call(this, e, "<span class=\"mq-nonSymbola\">" + (n || e) + "</span>");
|
|
25333
25333
|
};
|
|
25334
25334
|
});
|
|
25335
|
-
|
|
25335
|
+
X["@"] = FF, X["&"] = K(FF, "\\&", "&"), X["%"] = K(FF, "\\%", "%"), X.alpha = X.beta = X.gamma = X.delta = X.zeta = X.eta = X.theta = X.iota = X.kappa = X.mu = X.nu = X.xi = X.rho = X.sigma = X.tau = X.chi = X.psi = X.omega = q(OF, function(e, t) {
|
|
25336
25336
|
e.init = function(e) {
|
|
25337
25337
|
t.init.call(this, "\\" + e + " ", "&" + e + ";");
|
|
25338
25338
|
};
|
|
25339
|
-
}),
|
|
25339
|
+
}), X.phi = K(OF, "\\phi ", "ϕ"), X.phiv = X.varphi = K(OF, "\\varphi ", "φ"), X.epsilon = K(OF, "\\epsilon ", "ϵ"), X.epsiv = X.varepsilon = K(OF, "\\varepsilon ", "ε"), X.piv = X.varpi = K(OF, "\\varpi ", "ϖ"), X.sigmaf = X.sigmav = X.varsigma = K(OF, "\\varsigma ", "ς"), X.thetav = X.vartheta = X.thetasym = K(OF, "\\vartheta ", "ϑ"), X.upsilon = X.upsi = K(OF, "\\upsilon ", "υ"), X.gammad = X.Gammad = X.digamma = K(OF, "\\digamma ", "ϝ"), X.kappav = X.varkappa = K(OF, "\\varkappa ", "ϰ"), X.rhov = X.varrho = K(OF, "\\varrho ", "ϱ"), X.pi = X.π = K(FF, "\\pi ", "π"), X.lambda = K(FF, "\\lambda ", "λ"), X.Upsilon = X.Upsi = X.upsih = X.Upsih = K(yF, "\\Upsilon ", "<var style=\"font-family: serif\">ϒ</var>"), X.Gamma = X.Delta = X.Theta = X.Lambda = X.Xi = X.Pi = X.Sigma = X.Phi = X.Psi = X.Omega = q(Z, function(e, t) {
|
|
25340
25340
|
e.init = function(e) {
|
|
25341
25341
|
t.init.call(this, "\\" + e + " ", "&" + e + ";");
|
|
25342
25342
|
};
|
|
25343
|
-
}),
|
|
25344
|
-
var IF =
|
|
25343
|
+
}), X.forall = X["∀"] = K(Z, "\\forall ", "∀");
|
|
25344
|
+
var IF = q(vF, function(e) {
|
|
25345
25345
|
e.init = function(e) {
|
|
25346
25346
|
this.latex = e;
|
|
25347
25347
|
}, e.createLeftOf = function(e) {
|
|
25348
25348
|
var t = gF.parse(this.latex);
|
|
25349
|
-
t.children().adopt(e.parent, e[
|
|
25349
|
+
t.children().adopt(e.parent, e[J], e[Y]), e[J] = t.ends[Y], t.jQize().insertBefore(e.jQ), t.finalizeInsert(e.options, e), t.ends[Y][Y].siblingCreated && t.ends[Y][Y].siblingCreated(e.options, J), t.ends[J][J].siblingCreated && t.ends[J][J].siblingCreated(e.options, Y), e.parent.bubble("reflow");
|
|
25350
25350
|
}, e.parser = function() {
|
|
25351
25351
|
var e = gF.parse(this.latex).children();
|
|
25352
|
-
return
|
|
25352
|
+
return pF.succeed(e);
|
|
25353
25353
|
};
|
|
25354
25354
|
});
|
|
25355
|
-
|
|
25356
|
-
var LF =
|
|
25355
|
+
X["¹"] = K(IF, "^1"), X["²"] = K(IF, "^2"), X["³"] = K(IF, "^3"), X["¼"] = K(IF, "\\frac14"), X["½"] = K(IF, "\\frac12"), X["¾"] = K(IF, "\\frac34");
|
|
25356
|
+
var LF = q(Q, function(e) {
|
|
25357
25357
|
e.init = Z.prototype.init, e.contactWeld = e.siblingCreated = e.siblingDeleted = function(e, t) {
|
|
25358
25358
|
function n(e) {
|
|
25359
|
-
if (e[
|
|
25360
|
-
if (e[
|
|
25359
|
+
if (e[J]) {
|
|
25360
|
+
if (e[J] instanceof Q || /^[,;:\(\[]$/.test(e[J].ctrlSeq)) return "";
|
|
25361
25361
|
} else if (e.parent && e.parent.parent && e.parent.parent.isStyleBlock()) return n(e.parent.parent);
|
|
25362
25362
|
else return "";
|
|
25363
25363
|
return "mq-binary-operator";
|
|
25364
25364
|
}
|
|
25365
|
-
if (t !==
|
|
25365
|
+
if (t !== Y) return this.jQ[0].className = n(this), this;
|
|
25366
25366
|
};
|
|
25367
25367
|
});
|
|
25368
|
-
|
|
25369
|
-
var RF =
|
|
25368
|
+
X["+"] = K(LF, "+", "+"), X["–"] = X["-"] = K(LF, "-", "−"), X["±"] = X.pm = X.plusmn = X.plusminus = K(LF, "\\pm ", "±"), X.mp = X.mnplus = X.minusplus = K(LF, "\\mp ", "∓"), XP["*"] = X.sdot = X.cdot = K(Q, "\\cdot ", "·", "*");
|
|
25369
|
+
var RF = q(Q, function(e, t) {
|
|
25370
25370
|
e.init = function(e, n) {
|
|
25371
25371
|
this.data = e, this.strict = n;
|
|
25372
25372
|
var r = n ? "Strict" : "";
|
|
@@ -25376,7 +25376,7 @@ var RF = K(Q, function(e, t) {
|
|
|
25376
25376
|
var t = e ? "Strict" : "";
|
|
25377
25377
|
this.ctrlSeq = this.data["ctrlSeq" + t], this.jQ.html(this.data["html" + t]), this.textTemplate = [this.data["text" + t]];
|
|
25378
25378
|
}, e.deleteTowards = function(e, n) {
|
|
25379
|
-
if (e ===
|
|
25379
|
+
if (e === J && !this.strict) {
|
|
25380
25380
|
this.swap(!0), this.bubble("reflow");
|
|
25381
25381
|
return;
|
|
25382
25382
|
}
|
|
@@ -25397,20 +25397,20 @@ var RF = K(Q, function(e, t) {
|
|
|
25397
25397
|
htmlStrict: ">",
|
|
25398
25398
|
textStrict: ">"
|
|
25399
25399
|
};
|
|
25400
|
-
|
|
25401
|
-
var VF =
|
|
25400
|
+
X["<"] = X.lt = K(RF, zF, !0), X[">"] = X.gt = K(RF, BF, !0), X["≤"] = X.le = X.leq = K(RF, zF, !1), X["≥"] = X.ge = X.geq = K(RF, BF, !1);
|
|
25401
|
+
var VF = q(Q, function(e, t) {
|
|
25402
25402
|
e.init = function() {
|
|
25403
25403
|
t.init.call(this, "=", "=");
|
|
25404
25404
|
}, e.createLeftOf = function(e) {
|
|
25405
|
-
if (e[
|
|
25406
|
-
e[
|
|
25405
|
+
if (e[J] instanceof RF && e[J].strict) {
|
|
25406
|
+
e[J].swap(!1), e[J].bubble("reflow");
|
|
25407
25407
|
return;
|
|
25408
25408
|
}
|
|
25409
25409
|
t.createLeftOf.apply(this, arguments);
|
|
25410
25410
|
};
|
|
25411
25411
|
});
|
|
25412
|
-
|
|
25413
|
-
var HF, UF =
|
|
25412
|
+
X["="] = VF, X["×"] = X.times = K(Q, "\\times ", "×", "[x]"), X["÷"] = X.div = X.divide = X.divides = K(Q, "\\div ", "÷", "[/]"), XP["~"] = X.sim = K(Q, "\\sim ", "~", "~"), XP["≁"] = X.nsim = K(Q, "\\nsim ", "≁", "≁"), X.complement = X["∁"] = K(Z, "\\complement ", "∁"), X.nexists = X["∄"] = K(Z, "\\nexists ", "∄"), X.sphericalangle = X["∢"] = K(Z, "\\sphericalangle ", "∢"), X.iint = X["∬"] = K(Z, "\\iint ", "∬"), X.iiint = X["∭"] = K(Z, "\\iiint ", "∭"), X.oiint = X["∯"] = K(Z, "\\oiint ", "∯"), X.oiiint = X["∰"] = K(Z, "\\oiiint ", "∰"), X.backsim = X["∽"] = K(Z, "\\backsim ", "∽"), X.backsimeq = X["⋍"] = K(Z, "\\backsimeq ", "⋍"), X.eqsim = X["≂"] = K(Z, "\\eqsim ", "≂"), X.ncong = X["≇"] = K(Z, "\\ncong ", "≇"), X.approxeq = X["≊"] = K(Z, "\\approxeq ", "≊"), X.bumpeq = X["≏"] = K(Z, "\\bumpeq ", "≏"), X.Bumpeq = X["≎"] = K(Z, "\\Bumpeq ", "≎"), X.doteqdot = X["≑"] = K(Z, "\\doteqdot ", "≑"), X.fallingdotseq = X["≒"] = K(Z, "\\fallingdotseq ", "≒"), X.risingdotseq = X["≓"] = K(Z, "\\risingdotseq ", "≓"), X.eqcirc = X["≖"] = K(Z, "\\eqcirc ", "≖"), X.circeq = X["≗"] = K(Z, "\\circeq ", "≗"), X.triangleq = X["≜"] = K(Z, "\\triangleq ", "≜"), X.leqq = X["≦"] = K(Z, "\\leqq ", "≦"), X.geqq = X["≧"] = K(Z, "\\geqq ", "≧"), X.lneqq = X["≨"] = K(Z, "\\lneqq ", "≨"), X.gneqq = X["≩"] = K(Z, "\\gneqq ", "≩"), X.between = X["≬"] = K(Z, "\\between ", "≬"), X.nleq = X["≰"] = K(Z, "\\nleq ", "≰"), X.ngeq = X["≱"] = K(Z, "\\ngeq ", "≱"), X.lesssim = X["≲"] = K(Z, "\\lesssim ", "≲"), X.gtrsim = X["≳"] = K(Z, "\\gtrsim ", "≳"), X.lessgtr = X["≶"] = K(Z, "\\lessgtr ", "≶"), X.gtrless = X["≷"] = K(Z, "\\gtrless ", "≷"), X.preccurlyeq = X["≼"] = K(Z, "\\preccurlyeq ", "≼"), X.succcurlyeq = X["≽"] = K(Z, "\\succcurlyeq ", "≽"), X.precsim = X["≾"] = K(Z, "\\precsim ", "≾"), X.succsim = X["≿"] = K(Z, "\\succsim ", "≿"), X.nprec = X["⊀"] = K(Z, "\\nprec ", "⊀"), X.nsucc = X["⊁"] = K(Z, "\\nsucc ", "⊁"), X.subsetneq = X["⊊"] = K(Z, "\\subsetneq ", "⊊"), X.supsetneq = X["⊋"] = K(Z, "\\supsetneq ", "⊋"), X.vDash = X["⊨"] = K(Z, "\\vDash ", "⊨"), X.Vdash = X["⊩"] = K(Z, "\\Vdash ", "⊩"), X.Vvdash = X["⊪"] = K(Z, "\\Vvdash ", "⊪"), X.VDash = X["⊫"] = K(Z, "\\VDash ", "⊫"), X.nvdash = X["⊬"] = K(Z, "\\nvdash ", "⊬"), X.nvDash = X["⊭"] = K(Z, "\\nvDash ", "⊭"), X.nVdash = X["⊮"] = K(Z, "\\nVdash ", "⊮"), X.nVDash = X["⊯"] = K(Z, "\\nVDash ", "⊯"), X.vartriangleleft = X["⊲"] = K(Z, "\\vartriangleleft ", "⊲"), X.vartriangleright = X["⊳"] = K(Z, "\\vartriangleright ", "⊳"), X.trianglelefteq = X["⊴"] = K(Z, "\\trianglelefteq ", "⊴"), X.trianglerighteq = X["⊵"] = K(Z, "\\trianglerighteq ", "⊵"), X.multimap = X["⊸"] = K(Z, "\\multimap ", "⊸"), X.Subset = X["⋐"] = K(Z, "\\Subset ", "⋐"), X.Supset = X["⋑"] = K(Z, "\\Supset ", "⋑"), X.Cap = X["⋒"] = K(Z, "\\Cap ", "⋒"), X.Cup = X["⋓"] = K(Z, "\\Cup ", "⋓"), X.pitchfork = X["⋔"] = K(Z, "\\pitchfork ", "⋔"), X.lessdot = X["⋖"] = K(Z, "\\lessdot ", "⋖"), X.gtrdot = X["⋗"] = K(Z, "\\gtrdot ", "⋗"), X.lll = X["⋘"] = K(Z, "\\lll ", "⋘"), X.ggg = X["⋙"] = K(Z, "\\ggg ", "⋙"), X.lesseqgtr = X["⋚"] = K(Z, "\\lesseqgtr ", "⋚"), X.gtreqless = X["⋛"] = K(Z, "\\gtreqless ", "⋛"), X.curlyeqprec = X["⋞"] = K(Z, "\\curlyeqprec ", "⋞"), X.curlyeqsucc = X["⋟"] = K(Z, "\\curlyeqsucc ", "⋟"), X.nsim = X["≁"] = K(Z, "\\nsim ", "≁"), X.lnsim = X["⋦"] = K(Z, "\\lnsim ", "⋦"), X.gnsim = X["⋧"] = K(Z, "\\gnsim ", "⋧"), X.precnsim = X["⋨"] = K(Z, "\\precnsim ", "⋨"), X.succnsim = X["⋩"] = K(Z, "\\succnsim ", "⋩"), X.ntriangleleft = X["⋪"] = K(Z, "\\ntriangleleft ", "⋪"), X.ntriangleright = X["⋫"] = K(Z, "\\ntriangleright ", "⋫"), X.ntrianglelefteq = X["⋬"] = K(Z, "\\ntrianglelefteq ", "⋬"), X.ntrianglerighteq = X["⋭"] = K(Z, "\\ntrianglerighteq ", "⋭"), X.blacksquare = X["∎"] = K(Z, "\\blacksquare ", "∎"), X.colon = X["∶"] = K(Z, "\\colon ", "∶"), X.llcorner = X["∟"] = K(Z, "\\llcorner ", "∟"), X.dotplus = X["∔"] = K(Q, "\\dotplus ", "∔"), X.nmid = X["∤"] = K(Q, "\nmid ", "∤"), X.intercal = X["⊺"] = K(Q, "\\intercal ", "⊺"), X.veebar = X["⊻"] = K(Q, "\\veebar ", "⊻"), X.barwedge = X["⊼"] = K(Q, "\\barwedge ", "⊼"), X.ltimes = X["⋉"] = K(Q, "\\ltimes ", "⋉"), X.rtimes = X["⋊"] = K(Q, "\\rtimes ", "⋊"), X.leftthreetimes = X["⋋"] = K(Q, "\\leftthreetimes ", "⋋"), X.rightthreetimes = X["⋌"] = K(Q, "\\rightthreetimes ", "⋌"), X.curlyvee = X["⋎"] = K(Q, "\\curlyvee ", "⋎"), X.curlywedge = X["⋏"] = K(Q, "\\curlywedge ", "⋏"), X.circledcirc = X["⊚"] = K(Q, "\\circledcirc ", "⊚"), X.circledast = X["⊛"] = K(Q, "\\circledast ", "⊛"), X.circleddash = X["⊝"] = K(Q, "\\circleddash ", "⊝"), X.boxplus = X["⊞"] = K(Q, "\\boxplus ", "⊞"), X.boxminus = X["⊟"] = K(Q, "\\boxminus ", "⊟"), X.boxtimes = X["⊠"] = K(Q, "\\boxtimes ", "⊠"), X.boxdot = X["⊡"] = K(Q, "\\boxdot ", "⊡"), X["∂"] = X.partial, X["∃"] = X.exists, X["∅"] = X.varnothing, X["∆"] = X.triangle, X["∇"] = X.nabla, X["∈"] = X.in, X["∊"] = X.in, X["∋"] = X.ni, X["∌"] = X.notni, X["∍"] = X.ni, X["∐"] = X.amalg, X["−"] = X["-"], X["∓"] = X.mp, X["∖"] = X.setminus, X["∘"] = X.circ, X["∙"] = X.bullet, X["∝"] = X.propto, X["∞"] = X.infty, X["∠"] = X.angle, X["∡"] = X.measuredangle, X["∣"] = X.divides, X["∥"] = X.parallel, X["∦"] = X.nparallel, X["∧"] = X.wedge, X["∨"] = X.vee, X["∩"] = X.cap, X["∪"] = X.cup, X["∮"] = X.oint, X["∴"] = X.therefore, X["∵"] = X.because, X["∼"] = X.sim, X["≀"] = X.wr, X["≃"] = X.simeq, X["≍"] = X.asymp, X["≐"] = X.doteq, X["≪"] = X.ll, X["≫"] = X.gg, X["≺"] = X.prec, X["≻"] = X.succ, X["⊂"] = X.subset, X["⊃"] = X.supset, X["⊆"] = X.subseteq, X["⊇"] = X.supseteq, X["⊈"] = X.nsubseteq, X["⊉"] = X.nsupseteq, X["⊏"] = X.sqsubset, X["⊐"] = X.sqsupset, X["⊓"] = X.sqcap, X["⊔"] = X.sqcup, X["⊖"] = X.ominus, X["⊘"] = X.oslash, X["⊙"] = X.odot, X["⊢"] = X.vdash, X["⊣"] = X.dashv, X["⊤"] = X.top, X["⊥"] = X.bot, X["⊧"] = X.models, X["⋀"] = X.wedge, X["⋁"] = X.vee, X["⋂"] = X.cap, X["⋃"] = X.cup, X["⋄"] = X.diamond, X["⋅"] = X.cdot, X["⋆"] = X.star, X["⋈"] = X.bowtie, X["⋮"] = X.vdots, X["⋯"] = X.cdots, X["⋱"] = X.ddots;
|
|
25413
|
+
var HF, UF = zP, WF = document.createElement("div").style, GF = {
|
|
25414
25414
|
transform: 1,
|
|
25415
25415
|
WebkitTransform: 1,
|
|
25416
25416
|
MozTransform: 1,
|
|
@@ -25433,17 +25433,17 @@ KF ? HF = function(e, t, n) {
|
|
|
25433
25433
|
}
|
|
25434
25434
|
i();
|
|
25435
25435
|
var a = setInterval(i);
|
|
25436
|
-
|
|
25436
|
+
MP(window).load(function() {
|
|
25437
25437
|
clearTimeout(a), i();
|
|
25438
25438
|
});
|
|
25439
25439
|
}) : HF = function(e, t, n) {
|
|
25440
25440
|
e.css("fontSize", n + "em");
|
|
25441
25441
|
};
|
|
25442
|
-
var JF =
|
|
25442
|
+
var JF = q(vF, function(e, t) {
|
|
25443
25443
|
e.init = function(e, n, r) {
|
|
25444
25444
|
t.init.call(this, e, "<" + n + " " + r + ">&0</" + n + ">");
|
|
25445
25445
|
};
|
|
25446
|
-
}), YF =
|
|
25446
|
+
}), YF = q(vF, function(e, t) {
|
|
25447
25447
|
e.init = function(e, n, r) {
|
|
25448
25448
|
this.args = arguments, this.htmlTemplate = "<" + n + " " + r + "><" + n + " class=\"mq-xarrow-over\">&0</" + n + "><" + n + " class=\"mq-xarrow-under\"></" + n + "></" + n + ">", t.init.call(this, e), this.textTemplate = [e.replace("\\", "") + "(", ")"];
|
|
25449
25449
|
}, e.parser = function() {
|
|
@@ -25455,7 +25455,7 @@ var JF = K(vF, function(e, t) {
|
|
|
25455
25455
|
});
|
|
25456
25456
|
}).or(t.parser.call(this));
|
|
25457
25457
|
};
|
|
25458
|
-
}), XF =
|
|
25458
|
+
}), XF = q(YF, function(e, t) {
|
|
25459
25459
|
e.init = function(e, t, n) {
|
|
25460
25460
|
this.htmlTemplate = "<" + t + " " + n + "><" + t + " class=\"mq-xarrow-over\">&1</" + t + "><" + t + " class=\"mq-xarrow-under\">&0</" + t + "></" + t + ">", vF.prototype.init.call(this, e), this.textTemplate = [
|
|
25461
25461
|
e.replace("\\", "") + "[",
|
|
@@ -25463,61 +25463,61 @@ var JF = K(vF, function(e, t) {
|
|
|
25463
25463
|
")"
|
|
25464
25464
|
];
|
|
25465
25465
|
}, e.latex = function() {
|
|
25466
|
-
return this.ctrlSeq + "[" + this.ends[
|
|
25466
|
+
return this.ctrlSeq + "[" + this.ends[J].latex() + "]{" + this.ends[Y].latex() + "}";
|
|
25467
25467
|
}, e.finalizeTree = function() {
|
|
25468
|
-
this.downInto = this.ends[
|
|
25468
|
+
this.downInto = this.ends[J].upOutOf = this.ends[Y], this.upInto = this.ends[Y].downOutOf = this.ends[J];
|
|
25469
25469
|
};
|
|
25470
25470
|
}), ZF = function(e) {
|
|
25471
25471
|
var t = "<span class=\"" + e + "-inner-right\">g</span><span class=\"" + e + "-inner-left\">h</span>";
|
|
25472
|
-
return
|
|
25472
|
+
return q(vF, function(n, r) {
|
|
25473
25473
|
n.init = function(n, i, a) {
|
|
25474
25474
|
r.init.call(this, n, "<" + i + " " + a + "><" + i + " class=\"" + e + "-inner\">" + t + "<span class=\"mq-empty-box\">&0</span></" + i + "></" + i + ">");
|
|
25475
25475
|
};
|
|
25476
25476
|
});
|
|
25477
|
-
}, QF =
|
|
25477
|
+
}, QF = q(vF, function(e, t) {
|
|
25478
25478
|
e.init = function(e, n, r) {
|
|
25479
25479
|
t.init.call(this, e, "<" + n + " " + r + "><span class=\"mq-longdiv-curve-border\">)</span><span class=\"mq-longdiv-inner\"><span class=\"mq-empty\">&0</span></" + n + "></span>");
|
|
25480
25480
|
};
|
|
25481
|
-
}), $F =
|
|
25481
|
+
}), $F = q(vF, function(e, t) {
|
|
25482
25482
|
e.init = function(e, n, r) {
|
|
25483
25483
|
t.init.call(this, e, "<span class=\"mq-matrix\"><span class=\"mq-paren mq-scaled\">[</span><span class=\"matrix-edit-content-row\"><p>" + r + "</p><table class=\"mq-non-leaf mq-rows-3\"><tbody><tr><td class=\"mq-empty\"></td><td class=\"mq-empty\"></td><td class=\"mq-empty\"></td></tr></tbody></table></span><span class=\"mq-paren mq-scaled\">]</span></span>");
|
|
25484
25484
|
};
|
|
25485
|
-
}), eI =
|
|
25485
|
+
}), eI = q(vF, function(e, t) {
|
|
25486
25486
|
e.init = function(e) {
|
|
25487
25487
|
t.init.call(this, e, "<span class=\"mq-non-leaf\"><span class=\"mq-dot-recurring-inner\"><span class=\"mq-dot-recurring\">˙</span><span class=\"mq-empty-box\">&0</span></span></span>");
|
|
25488
25488
|
};
|
|
25489
|
-
}), tI =
|
|
25489
|
+
}), tI = q(vF, function(e, t) {
|
|
25490
25490
|
e.init = function(e, n, r) {
|
|
25491
25491
|
t.init.call(this, e, "<span class=\"mq-matrix\"><span class=\"mq-paren mq-scaled\">[</span><span class=\"matrix-edit-content-col\"><p>" + r + "</p></span><span class=\"matrix-edit-content-col\"><table class=\"mq-non-leaf mq-rows-3\"><tbody><tr><td class=\"mq-empty\"></td></tr><tr><td class=\"mq-empty\"></td></tr><tr><td class=\"mq-empty\"></td></tr></tbody></table></span><span class=\"mq-paren mq-scaled\">]</span></span>");
|
|
25492
25492
|
};
|
|
25493
25493
|
}), nI = function(e, t) {
|
|
25494
|
-
return
|
|
25494
|
+
return q(yF, function(n, r) {
|
|
25495
25495
|
n.init = function(n, i, a) {
|
|
25496
25496
|
r.init.call(this, n, "<" + i + " " + a + "><" + i + " class=\"" + e + "-inner\">" + t + "</" + i + "></" + i + ">");
|
|
25497
25497
|
};
|
|
25498
25498
|
});
|
|
25499
25499
|
};
|
|
25500
|
-
|
|
25500
|
+
X.mathrm = K(JF, "\\mathrm", "span", "class=\"mq-roman mq-font\""), X.mathit = K(JF, "\\mathit", "i", "class=\"mq-font\""), X.mathbf = K(JF, "\\mathbf", "b", "class=\"mq-font\""), X.mathsf = K(JF, "\\mathsf", "span", "class=\"mq-sans-serif mq-font\""), X.mathtt = K(JF, "\\mathtt", "span", "class=\"mq-monospace mq-font\""), X.underline = K(JF, "\\underline", "span", "class=\"mq-non-leaf mq-underline\""), X.overline = X.bar = K(ZF("mq-overline"), "\\overline", "span", "class=\"mq-non-leaf mq-overline\""), X.longdiv = K(QF, "\\longdiv", "span", "class=\"mq-non-leaf mq-longdiv\""), X.overrightarrow = K(ZF("mq-overarrow"), "\\overrightarrow", "span", "class=\"mq-non-leaf mq-overarrow mq-arrow-right\""), X.overleftarrow = K(ZF("mq-overarrow"), "\\overleftarrow", "span", "class=\"mq-non-leaf mq-overarrow mq-arrow-left\""), X.xleftarrow = K(YF, "\\xleftarrow", "span", "class=\"mq-non-leaf mq-xarrow mq-arrow-left\""), X.xrightarrow = K(YF, "\\xrightarrow", "span", "class=\"mq-non-leaf mq-xarrow mq-arrow-right\""), X.overleftrightarrow = K(JF, "\\overleftrightarrow", "span", "class=\"mq-non-leaf mq-overarrow mq-arrow-both\""), X.overarc = K(JF, "\\overarc", "span", "class=\"mq-non-leaf mq-overarc\""), X.dot = q(vF, function(e, t) {
|
|
25501
25501
|
e.init = function() {
|
|
25502
25502
|
t.init.call(this, "\\dot", "<span class=\"mq-non-leaf\"><span class=\"mq-dot-recurring-inner\"><span class=\"mq-dot-recurring\">˙</span><span class=\"mq-empty-box\">&0</span></span></span>");
|
|
25503
25503
|
};
|
|
25504
|
-
}),
|
|
25504
|
+
}), X.addmatrixrow = K($F, "\\addmatrixrow", "span", "+"), X.addmatrixcol = K(tI, "\\addmatrixcol", "span", "+"), X.ngtr = X["≯"] = K(nI("mq-ngtr", "≯"), "\\ngtr ", "span", "class=\"mq-non-leaf mq-ngtr\""), X.nless = X["≮"] = K(nI("mq-nless", "≮"), "\\nless ", "span", "class=\"mq-non-leaf mq-nless\""), X.dot = K(eI, "\\dot"), X.parallelogram = K(nI("mq-parallelogram", "▱"), "\\parallelogram ", "span", "class=\"mq-non-leaf mq-parallelogram\""), X.textcolor = q(vF, function(e, t) {
|
|
25505
25505
|
e.setColor = function(e) {
|
|
25506
25506
|
this.color = e, this.htmlTemplate = "<span class=\"mq-textcolor\" style=\"color:" + e + "\">&0</span>";
|
|
25507
25507
|
}, e.latex = function() {
|
|
25508
25508
|
return "\\textcolor{" + this.color + "}{" + this.blocks[0].latex() + "}";
|
|
25509
25509
|
}, e.parser = function() {
|
|
25510
|
-
var e = this, n =
|
|
25510
|
+
var e = this, n = pF.optWhitespace, r = pF.string, i = pF.regex;
|
|
25511
25511
|
return n.then(r("{")).then(i(/^[#\w\s.,()%-]*/)).skip(r("}")).then(function(n) {
|
|
25512
25512
|
return e.setColor(n), t.parser.call(e);
|
|
25513
25513
|
});
|
|
25514
25514
|
}, e.isStyleBlock = function() {
|
|
25515
25515
|
return !0;
|
|
25516
25516
|
};
|
|
25517
|
-
}),
|
|
25517
|
+
}), X.class = q(vF, function(e, t) {
|
|
25518
25518
|
e.parser = function() {
|
|
25519
|
-
var e = this, n =
|
|
25520
|
-
return
|
|
25519
|
+
var e = this, n = pF.string, r = pF.regex;
|
|
25520
|
+
return pF.optWhitespace.then(n("{")).then(r(/^[-\w\s\\\xA0-\xFF]*/)).skip(n("}")).then(function(n) {
|
|
25521
25521
|
return e.cls = n || "", e.htmlTemplate = "<span class=\"mq-class " + n + "\">&0</span>", t.parser.call(e);
|
|
25522
25522
|
});
|
|
25523
25523
|
}, e.latex = function() {
|
|
@@ -25526,20 +25526,20 @@ Y.mathrm = G(JF, "\\mathrm", "span", "class=\"mq-roman mq-font\""), Y.mathit = G
|
|
|
25526
25526
|
return !0;
|
|
25527
25527
|
};
|
|
25528
25528
|
});
|
|
25529
|
-
var rI =
|
|
25529
|
+
var rI = q(vF, function(e, t) {
|
|
25530
25530
|
e.ctrlSeq = "_{...}^{...}", e.createLeftOf = function(e) {
|
|
25531
|
-
if (!(!this.replacedFragment && !e[
|
|
25531
|
+
if (!(!this.replacedFragment && !e[J] && e.options.supSubsRequireOperand)) return t.createLeftOf.apply(this, arguments);
|
|
25532
25532
|
}, e.contactWeld = function(e) {
|
|
25533
|
-
for (var t =
|
|
25533
|
+
for (var t = J; t; t = t === J && Y) if (this[t] instanceof rI) {
|
|
25534
25534
|
for (var n = "sub"; n; n = n === "sub" && "sup") {
|
|
25535
25535
|
var r = this[n], i = this[t][n];
|
|
25536
25536
|
if (r) {
|
|
25537
25537
|
if (!i) this[t].addBlock(r.disown());
|
|
25538
|
-
else if (r.isEmpty()) var a =
|
|
25538
|
+
else if (r.isEmpty()) var a = KP(i, 0, i.ends[J]);
|
|
25539
25539
|
else {
|
|
25540
25540
|
r.jQ.children().insAtDirEnd(-t, i.jQ);
|
|
25541
|
-
var o = r.children().disown(), a =
|
|
25542
|
-
t ===
|
|
25541
|
+
var o = r.children().disown(), a = KP(i, o.ends[Y], i.ends[J]);
|
|
25542
|
+
t === J ? o.adopt(i, i.ends[Y], 0) : o.adopt(i, 0, i.ends[J]);
|
|
25543
25543
|
}
|
|
25544
25544
|
this.placeCursor = function(e, n) {
|
|
25545
25545
|
return function(r) {
|
|
@@ -25548,24 +25548,24 @@ var rI = K(vF, function(e, t) {
|
|
|
25548
25548
|
}(i, r);
|
|
25549
25549
|
}
|
|
25550
25550
|
}
|
|
25551
|
-
this.remove(), e && e[
|
|
25551
|
+
this.remove(), e && e[J] === this && (t === Y && a ? a[J] ? e.insRightOf(a[J]) : e.insAtLeftEnd(a.parent) : e.insRightOf(this[t]));
|
|
25552
25552
|
break;
|
|
25553
25553
|
}
|
|
25554
|
-
},
|
|
25555
|
-
this.ends[
|
|
25554
|
+
}, nF.p.charsThatBreakOutOfSupSub = "", e.finalizeTree = function() {
|
|
25555
|
+
this.ends[J].write = function(e, t) {
|
|
25556
25556
|
if (e.options.autoSubscriptNumerals && this === this.parent.sub) {
|
|
25557
25557
|
if (t === "_") return;
|
|
25558
25558
|
var n = this.chToCmd(t, e.options);
|
|
25559
25559
|
return n instanceof yF ? e.deleteSelection() : e.clearSelection().insRightOf(this.parent), n.createLeftOf(e.show());
|
|
25560
25560
|
}
|
|
25561
|
-
e[
|
|
25561
|
+
e[J] && !e[Y] && !e.selection && e.options.charsThatBreakOutOfSupSub.indexOf(t) > -1 && e.insRightOf(this.parent), bF.p.write.apply(this, arguments);
|
|
25562
25562
|
};
|
|
25563
25563
|
}, e.moveTowards = function(e, n, r) {
|
|
25564
25564
|
n.options.autoSubscriptNumerals && !this.sup ? n.insDirOf(e, this) : t.moveTowards.apply(this, arguments);
|
|
25565
25565
|
}, e.deleteTowards = function(e, n) {
|
|
25566
25566
|
if (n.options.autoSubscriptNumerals && this.sub) {
|
|
25567
25567
|
var r = this.sub.ends[-e];
|
|
25568
|
-
r instanceof yF ? r.remove() : r && r.deleteTowards(e, n.insAtDirEnd(-e, this.sub)), this.sub.isEmpty() && (this.sub.deleteOutOf(
|
|
25568
|
+
r instanceof yF ? r.remove() : r && r.deleteTowards(e, n.insAtDirEnd(-e, this.sub)), this.sub.isEmpty() && (this.sub.deleteOutOf(J, n.insAtLeftEnd(this.sub)), this.sup && n.insDirOf(-e, this));
|
|
25569
25569
|
} else t.deleteTowards.apply(this, arguments);
|
|
25570
25570
|
}, e.latex = function() {
|
|
25571
25571
|
function e(e, t) {
|
|
@@ -25574,14 +25574,14 @@ var rI = K(vF, function(e, t) {
|
|
|
25574
25574
|
}
|
|
25575
25575
|
return e("_", this.sub) + e("^", this.sup);
|
|
25576
25576
|
}, e.addBlock = function(e) {
|
|
25577
|
-
this.supsub === "sub" ? (this.sup = this.upInto = this.sub.upOutOf = e, e.adopt(this, this.sub, 0).downOutOf = this.sub, e.jQ =
|
|
25577
|
+
this.supsub === "sub" ? (this.sup = this.upInto = this.sub.upOutOf = e, e.adopt(this, this.sub, 0).downOutOf = this.sub, e.jQ = MP("<span class=\"mq-sup\"/>").append(e.jQ.children()).attr(IP, e.id).prependTo(this.jQ)) : (this.sub = this.downInto = this.sup.downOutOf = e, e.adopt(this, 0, this.sup).upOutOf = this.sup, e.jQ = MP("<span class=\"mq-sub\"></span>").append(e.jQ.children()).attr(IP, e.id).appendTo(this.jQ.removeClass("mq-sup-only")), this.jQ.append("<span style=\"display:inline-block;width:0\">​</span>"));
|
|
25578
25578
|
for (var t = 0; t < 2; t += 1) (function(e, t, n, r) {
|
|
25579
25579
|
e[t].deleteOutOf = function(i, a) {
|
|
25580
25580
|
if (a.insDirOf(this[i] ? -i : i, this.parent), !this.isEmpty()) {
|
|
25581
25581
|
var o = this.ends[i];
|
|
25582
25582
|
this.children().disown().withDirAdopt(i, a.parent, a[i], a[-i]).jQ.insDirOf(-i, a.jQ), a[-i] = o;
|
|
25583
25583
|
}
|
|
25584
|
-
e.supsub = n, delete e[t], delete e[r + "Into"], e[n][r + "OutOf"] = iI, delete e[n].deleteOutOf, t === "sub" &&
|
|
25584
|
+
e.supsub = n, delete e[t], delete e[r + "Into"], e[n][r + "OutOf"] = iI, delete e[n].deleteOutOf, t === "sub" && MP(e.jQ.addClass("mq-sup-only")[0].lastChild).remove(), this.remove();
|
|
25585
25585
|
};
|
|
25586
25586
|
})(this, "sub sup".split(" ")[t], "sup sub".split(" ")[t], "down up".split(" ")[t]);
|
|
25587
25587
|
}, e.reflow = function() {
|
|
@@ -25598,33 +25598,33 @@ var rI = K(vF, function(e, t) {
|
|
|
25598
25598
|
function iI(e) {
|
|
25599
25599
|
var t = this.parent, n = e;
|
|
25600
25600
|
do {
|
|
25601
|
-
if (n[
|
|
25601
|
+
if (n[Y]) return e.insLeftOf(t);
|
|
25602
25602
|
n = n.parent.parent;
|
|
25603
25603
|
} while (n !== t);
|
|
25604
25604
|
e.insRightOf(t);
|
|
25605
25605
|
}
|
|
25606
|
-
|
|
25606
|
+
X.subscript = X._ = q(rI, function(e, t) {
|
|
25607
25607
|
e.supsub = "sub", e.htmlTemplate = "<span class=\"mq-supsub mq-non-leaf\"><span class=\"mq-sub\"><span class=\"mq-empty-box\">&0</span></span><span style=\"display:inline-block;width:0\">​</span></span>", e.textTemplate = ["_"], e.finalizeTree = function() {
|
|
25608
|
-
this.downInto = this.sub = this.ends[
|
|
25608
|
+
this.downInto = this.sub = this.ends[J], this.sub.upOutOf = iI, t.finalizeTree.call(this);
|
|
25609
25609
|
};
|
|
25610
|
-
}),
|
|
25610
|
+
}), X.superscript = X.supscript = X["^"] = q(rI, function(e, t) {
|
|
25611
25611
|
e.supsub = "sup", e.htmlTemplate = "<span class=\"mq-supsub mq-non-leaf mq-sup-only\"><span class=\"mq-sup\"><span class=\"mq-empty-box\">&0</span></span></span>", e.textTemplate = ["^"], e.finalizeTree = function() {
|
|
25612
|
-
this.upInto = this.sup = this.ends[
|
|
25612
|
+
this.upInto = this.sup = this.ends[Y], this.sup.downOutOf = iI, t.finalizeTree.call(this);
|
|
25613
25613
|
};
|
|
25614
25614
|
});
|
|
25615
|
-
var aI =
|
|
25615
|
+
var aI = q(vF, function(e, t) {
|
|
25616
25616
|
e.parser = function() {
|
|
25617
|
-
for (var e =
|
|
25617
|
+
for (var e = pF.string, t = pF.optWhitespace, n = pF.succeed, r = gF.block, i = this, a = i.blocks = [bF(), bF()], o = 0; o < a.length; o += 1) a[o].adopt(i, i.ends[Y], 0);
|
|
25618
25618
|
return t.then(e("_").or(e("^"))).then(function(e) {
|
|
25619
25619
|
var t = a[e === "_" ? 0 : 1];
|
|
25620
25620
|
return r.then(function(e) {
|
|
25621
|
-
return e.children().adopt(t, t.ends[
|
|
25621
|
+
return e.children().adopt(t, t.ends[Y], 0), n(i);
|
|
25622
25622
|
});
|
|
25623
25623
|
}).many().result(i);
|
|
25624
25624
|
}, e.finalizeTree = function() {
|
|
25625
|
-
this.downInto = this.ends[
|
|
25625
|
+
this.downInto = this.ends[J], this.upInto = this.ends[Y], this.ends[J].upOutOf = this.ends[Y], this.ends[Y].downOutOf = this.ends[J];
|
|
25626
25626
|
};
|
|
25627
|
-
}), oI =
|
|
25627
|
+
}), oI = q(aI, function(e, t) {
|
|
25628
25628
|
e.init = function(e, t) {
|
|
25629
25629
|
var n = "<span class=\"mq-large-operator mq-non-leaf\"><span class=\"mq-to\"><span>&1</span></span><big>" + t + "</big><span class=\"mq-from\"><span>&0</span></span></span>";
|
|
25630
25630
|
yF.prototype.init.call(this, e, n);
|
|
@@ -25632,60 +25632,60 @@ var aI = K(vF, function(e, t) {
|
|
|
25632
25632
|
function e(e) {
|
|
25633
25633
|
return e.length === 1 ? e : "{" + (e || " ") + "}";
|
|
25634
25634
|
}
|
|
25635
|
-
return this.ctrlSeq + "_" + e(this.ends[
|
|
25635
|
+
return this.ctrlSeq + "_" + e(this.ends[J].latex()) + "^" + e(this.ends[Y].latex());
|
|
25636
25636
|
}, e.createLeftOf = function(e) {
|
|
25637
25637
|
t.createLeftOf.apply(this, arguments), e.options.sumStartsWithNEquals && (kF("n").createLeftOf(e), VF().createLeftOf(e));
|
|
25638
25638
|
};
|
|
25639
25639
|
});
|
|
25640
|
-
|
|
25640
|
+
X["∑"] = X.sum = X.summation = K(oI, "\\sum ", "∑"), X["∏"] = X.prod = X.product = K(oI, "\\prod ", "∏"), X.coprod = X.coproduct = K(oI, "\\coprod ", "∐"), X["∫"] = X.int = X.integral = q(oI, function(e, t) {
|
|
25641
25641
|
e.init = function() {
|
|
25642
25642
|
yF.prototype.init.call(this, "\\int ", "<span class=\"mq-int mq-non-leaf\"><big>∫</big><span class=\"mq-supsub mq-non-leaf\"><span class=\"mq-sup\"><span class=\"mq-sup-inner\">&1</span></span><span class=\"mq-sub\">&0</span><span style=\"display:inline-block;width:0\">​</span></span></span>");
|
|
25643
25643
|
}, e.createLeftOf = vF.p.createLeftOf;
|
|
25644
|
-
}),
|
|
25644
|
+
}), X.lim = X.limit = q(aI, function(e, t) {
|
|
25645
25645
|
e.init = function() {
|
|
25646
25646
|
yF.prototype.init.call(this, "\\lim ", "<span class=\"mq-lim mq-non-leaf\"><span class=\"mq-un-italicized\">lim</span><span class=\"mq-approaches\"><span>&0</span></span></span>");
|
|
25647
25647
|
}, e.latex = function() {
|
|
25648
25648
|
function e(e) {
|
|
25649
25649
|
return e.length === 1 ? e : "{" + (e || " ") + "}";
|
|
25650
25650
|
}
|
|
25651
|
-
return this.ctrlSeq + "_" + e(this.ends[
|
|
25651
|
+
return this.ctrlSeq + "_" + e(this.ends[J].latex());
|
|
25652
25652
|
};
|
|
25653
25653
|
});
|
|
25654
|
-
var sI =
|
|
25654
|
+
var sI = X.over = XP["/"] = q(X.frac = X.dfrac = X.cfrac = X.fraction = q(vF, function(e, t) {
|
|
25655
25655
|
e.ctrlSeq = "\\frac", e.htmlTemplate = "<span class=\"mq-fraction mq-non-leaf\"><span class=\"mq-numerator\"><span class=\"mq-empty-box\">&0</span></span><span class=\"mq-denominator\"><span class=\"mq-empty-box\">&1</span></span><span style=\"display:inline-block;width:0\">​</span></span>", e.textTemplate = [
|
|
25656
25656
|
"(",
|
|
25657
25657
|
")/(",
|
|
25658
25658
|
")"
|
|
25659
25659
|
], e.finalizeTree = function() {
|
|
25660
|
-
this.upInto = this.ends[
|
|
25660
|
+
this.upInto = this.ends[Y].upOutOf = this.ends[J], this.downInto = this.ends[J].downOutOf = this.ends[Y];
|
|
25661
25661
|
};
|
|
25662
25662
|
}), function(e, t) {
|
|
25663
25663
|
e.createLeftOf = function(e) {
|
|
25664
25664
|
if (!this.replacedFragment) {
|
|
25665
|
-
for (var n = e[
|
|
25666
|
-
n instanceof oI && n[
|
|
25665
|
+
for (var n = e[J]; n && !(n instanceof Q || n instanceof (X.text || zP) || n instanceof oI || n.ctrlSeq === "\\ " || /^[,;:]$/.test(n.ctrlSeq));) n = n[J];
|
|
25666
|
+
n instanceof oI && n[Y] instanceof rI && (n = n[Y], n[Y] instanceof rI && n[Y].ctrlSeq != n.ctrlSeq && (n = n[Y])), n !== e[J] && !e.isTooDeep(1) && (this.replaces(YP(n[Y] || e.parent.ends[J], e[J])), e[J] = n);
|
|
25667
25667
|
}
|
|
25668
25668
|
t.createLeftOf.call(this, e);
|
|
25669
25669
|
};
|
|
25670
25670
|
});
|
|
25671
|
-
|
|
25671
|
+
X.underset = q(vF, function(e, t) {
|
|
25672
25672
|
e.ctrlSeq = "\\underset", e.htmlTemplate = "<span class=\"mq-underset mq-overunder mq-non-leaf\"><span class=\"mq-over\">&1</span><span class=\"mq-under\">&0</span></span>", e.textTemplate = [
|
|
25673
25673
|
"[",
|
|
25674
25674
|
"|",
|
|
25675
25675
|
"]"
|
|
25676
25676
|
], e.finalizeTree = function() {
|
|
25677
|
-
this.downInto = this.ends[
|
|
25677
|
+
this.downInto = this.ends[J].upOutOf = this.ends[Y], this.upInto = this.ends[Y].downOutOf = this.ends[J];
|
|
25678
25678
|
};
|
|
25679
|
-
}),
|
|
25679
|
+
}), X.overset = q(vF, function(e, t) {
|
|
25680
25680
|
e.ctrlSeq = "\\overset", e.htmlTemplate = "<span class=\"mq-overset mq-overunder mq-non-leaf\"><span class=\"mq-over\">&0</span><span class=\"mq-under\">&1</span></span>", e.textTemplate = [
|
|
25681
25681
|
"[",
|
|
25682
25682
|
"|",
|
|
25683
25683
|
"]"
|
|
25684
25684
|
], e.finalizeTree = function() {
|
|
25685
|
-
this.downInto = this.ends[
|
|
25685
|
+
this.downInto = this.ends[Y].upOutOf = this.ends[J], this.upInto = this.ends[J].downOutOf = this.ends[Y];
|
|
25686
25686
|
};
|
|
25687
25687
|
});
|
|
25688
|
-
var cI =
|
|
25688
|
+
var cI = X.sqrt = X["√"] = q(vF, function(e, t) {
|
|
25689
25689
|
e.ctrlSeq = "\\sqrt", e.htmlTemplate = "<span class=\"mq-non-leaf\"><span class=\"mq-scaled mq-sqrt-prefix\">√</span><span class=\"mq-non-leaf mq-sqrt-stem\"><span class=\"mq-empty-box\">&0</span></span></span>", e.textTemplate = ["sqrt(", ")"], e.parser = function() {
|
|
25690
25690
|
return gF.optBlock.then(function(e) {
|
|
25691
25691
|
return gF.block.map(function(t) {
|
|
@@ -25694,49 +25694,49 @@ var cI = Y.sqrt = Y["√"] = K(vF, function(e, t) {
|
|
|
25694
25694
|
});
|
|
25695
25695
|
}).or(t.parser.call(this));
|
|
25696
25696
|
}, e.reflow = function() {
|
|
25697
|
-
var e = this.ends[
|
|
25697
|
+
var e = this.ends[Y].jQ.parent();
|
|
25698
25698
|
HF(e.prev(), 1, e.innerHeight() / +e.css("fontSize").slice(0, -2) - .1);
|
|
25699
25699
|
};
|
|
25700
25700
|
});
|
|
25701
|
-
|
|
25701
|
+
X.hat = q(vF, function(e, t) {
|
|
25702
25702
|
e.ctrlSeq = "\\hat", e.htmlTemplate = "<span class=\"mq-non-leaf\"><span class=\"mq-hat-prefix\">^</span><span class=\"mq-hat-stem\">&0</span></span>", e.textTemplate = ["hat(", ")"];
|
|
25703
25703
|
});
|
|
25704
|
-
var lI =
|
|
25704
|
+
var lI = X.nthroot = q(cI, function(e, t) {
|
|
25705
25705
|
e.htmlTemplate = "<sup class=\"mq-nthroot mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></sup><span class=\"mq-scaled\"><span class=\"mq-sqrt-prefix mq-scaled\">√</span><span class=\"mq-sqrt-stem mq-non-leaf\"><span class=\"mq-empty-box\">&1</span></span></span>", e.textTemplate = [
|
|
25706
25706
|
"sqrt[",
|
|
25707
25707
|
"](",
|
|
25708
25708
|
")"
|
|
25709
25709
|
], e.latex = function() {
|
|
25710
|
-
return "\\sqrt[" + this.ends[
|
|
25710
|
+
return "\\sqrt[" + this.ends[J].latex() + "]{" + this.ends[Y].latex() + "}";
|
|
25711
25711
|
};
|
|
25712
|
-
}), uI =
|
|
25712
|
+
}), uI = q(vF, function(e, t) {
|
|
25713
25713
|
e.init = function(e, n, r) {
|
|
25714
25714
|
var i = "<span class=\"mq-non-leaf\"><span class=\"mq-diacritic-above\">" + n + "</span><span class=\"mq-diacritic-stem\">&0</span></span>";
|
|
25715
25715
|
t.init.call(this, e, i, r);
|
|
25716
25716
|
};
|
|
25717
25717
|
});
|
|
25718
|
-
|
|
25718
|
+
X.vec = K(uI, "\\vec", "→", ["vec(", ")"]), X.tilde = K(uI, "\\tilde", "~", ["tilde(", ")"]), X.lrncuberoot = q(cI, function(e, t) {
|
|
25719
25719
|
e.ctrlSeq = "\\lrncuberoot", e.htmlTemplate = "<sup class=\"mq-nthroot mq-non-leaf\"><span class=\"mq-empty-box\">3</span></sup><span class=\"mq-scaled\"><span class=\"mq-sqrt-prefix mq-scaled\">√</span><span class=\"mq-sqrt-stem mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span></span>", e.textTemplate = ["sqrt[3](", ")"], e.latex = function() {
|
|
25720
|
-
return "\\sqrt[3]{" + this.ends[
|
|
25720
|
+
return "\\sqrt[3]{" + this.ends[J].latex() + "}";
|
|
25721
25721
|
};
|
|
25722
|
-
}),
|
|
25722
|
+
}), X.abs = q(vF, function(e) {
|
|
25723
25723
|
e.ctrlSeq = "\\abs", e.htmlTemplate = "<span class=\"mq-abs mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span>", e.textTemplate = ["|", "|"];
|
|
25724
|
-
}),
|
|
25724
|
+
}), X.lrnplaceholder = q(vF, function(e, t) {
|
|
25725
25725
|
e.ctrlSeq = "\\lrnplaceholder", e.htmlTemplate = "<span class=\"mq-lrnplaceholder mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span>", e.textTemplate = [""], e.latex = function() {
|
|
25726
|
-
return this.ends[
|
|
25726
|
+
return this.ends[J].latex();
|
|
25727
25727
|
};
|
|
25728
|
-
}),
|
|
25728
|
+
}), X.lrnexponent = q(vF, function(e, t) {
|
|
25729
25729
|
e.ctrSeq = "\\lrnexponent", e.htmlTemplate = "<span class=\"mq-lrnexponent mq-non-leaf\"><span class=\"mq-lrnplaceholder mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span><span class=\"mq-supsub mq-non-leaf mq-sup-only\"><span class=\"mq-sup\"><span class=\"mq-empty-box\">&1</span></span></span></span>", e.textTemplate = ["", "**"], e.latex = function() {
|
|
25730
|
-
var e = this.ends[
|
|
25731
|
-
return e.length > 1 ? e = "{" + e + "}" : e.length === 0 && (e = "{ }"), this.ends[
|
|
25730
|
+
var e = this.ends[Y].latex();
|
|
25731
|
+
return e.length > 1 ? e = "{" + e + "}" : e.length === 0 && (e = "{ }"), this.ends[J].latex() + "^" + e;
|
|
25732
25732
|
};
|
|
25733
|
-
}),
|
|
25733
|
+
}), X.lrnsquaredexponent = q(vF, function(e, t) {
|
|
25734
25734
|
e.ctrSeq = "\\lrnsquaredexponent", e.htmlTemplate = "<span class=\"mq-lrnexponent mq-non-leaf\"><span class=\"mq-lrnplaceholder mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span><span class=\"mq-supsub mq-non-leaf mq-sup-only\"><span class=\"mq-sup\"><span class=\"mq-empty-box\">2</span></span></span></span>", e.textTemplate = ["", "**2"], e.latex = function() {
|
|
25735
|
-
return this.ends[
|
|
25735
|
+
return this.ends[J].latex() + "^2";
|
|
25736
25736
|
};
|
|
25737
|
-
}),
|
|
25737
|
+
}), X.lrnsubscript = q(vF, function(e, t) {
|
|
25738
25738
|
e.ctrSeq = "\\lrnsubscript", e.htmlTemplate = "<span class=\"mq-lrnexponent mq-non-leaf\"><span class=\"mq-lrnplaceholder mq-non-leaf\"><span class=\"mq-empty-box\">&0</span></span><span class=\"mq-supsub mq-non-leaf\"><span class=\"mq-sub\"><span class=\"mq-empty-box\">&1</span></span><span style=\"display:inline-block;width:0\"> </span></span></span>", e.textTemplate = ["", "_"], e.latex = function() {
|
|
25739
|
-
return this.ends[
|
|
25739
|
+
return this.ends[J].latex() + "_" + this.ends[Y].latex();
|
|
25740
25740
|
};
|
|
25741
25741
|
});
|
|
25742
25742
|
function dI(e, t) {
|
|
@@ -25744,44 +25744,44 @@ function dI(e, t) {
|
|
|
25744
25744
|
t.jQadd.apply(this, arguments), this.delimjQs = this.jQ.children(":first").add(this.jQ.children(":last")), this.contentjQ = this.jQ.children(":eq(1)");
|
|
25745
25745
|
}, e.reflow = function() {
|
|
25746
25746
|
var e = this.contentjQ.outerHeight() / parseFloat(this.contentjQ.css("fontSize"));
|
|
25747
|
-
HF(this.delimjQs,
|
|
25747
|
+
HF(this.delimjQs, LP(1 + .2 * (e - 1), 1.2), 1.2 * e);
|
|
25748
25748
|
};
|
|
25749
25749
|
}
|
|
25750
|
-
var fI =
|
|
25750
|
+
var fI = q(q(vF, dI), function(e, t) {
|
|
25751
25751
|
e.init = function(e, n, r, i, a) {
|
|
25752
|
-
t.init.call(this, "\\left" + i,
|
|
25752
|
+
t.init.call(this, "\\left" + i, PP, [n, r]), this.side = e, this.sides = {}, this.sides[J] = {
|
|
25753
25753
|
ch: n,
|
|
25754
25754
|
ctrlSeq: i
|
|
25755
|
-
}, this.sides[
|
|
25755
|
+
}, this.sides[Y] = {
|
|
25756
25756
|
ch: r,
|
|
25757
25757
|
ctrlSeq: a
|
|
25758
25758
|
};
|
|
25759
25759
|
}, e.numBlocks = function() {
|
|
25760
25760
|
return 1;
|
|
25761
25761
|
}, e.html = function() {
|
|
25762
|
-
return this.htmlTemplate = "<span class=\"mq-non-leaf\"><span class=\"mq-scaled mq-paren" + (this.side ===
|
|
25762
|
+
return this.htmlTemplate = "<span class=\"mq-non-leaf\"><span class=\"mq-scaled mq-paren" + (this.side === Y ? " mq-ghost" : "") + "\">" + this.sides[J].ch + "</span><span class=\"mq-non-leaf\">&0</span><span class=\"mq-scaled mq-paren" + (this.side === J ? " mq-ghost" : "") + "\">" + this.sides[Y].ch + "</span></span>", t.html.call(this);
|
|
25763
25763
|
}, e.latex = function() {
|
|
25764
|
-
return "\\left" + this.sides[
|
|
25764
|
+
return "\\left" + this.sides[J].ctrlSeq + this.ends[J].latex() + "\\right" + this.sides[Y].ctrlSeq;
|
|
25765
25765
|
}, e.matchBrack = function(e, t, n) {
|
|
25766
25766
|
return n instanceof fI && n.side && n.side !== -t && (!e.restrictMismatchedBrackets || pI[this.sides[this.side].ch] === n.sides[n.side].ch || {
|
|
25767
25767
|
"(": "]",
|
|
25768
25768
|
"[": ")"
|
|
25769
|
-
}[this.sides[
|
|
25769
|
+
}[this.sides[J].ch] === n.sides[Y].ch) && n;
|
|
25770
25770
|
}, e.closeOpposing = function(e) {
|
|
25771
|
-
e.side = 0, e.sides[this.side] = this.sides[this.side], e.delimjQs.eq(this.side ===
|
|
25771
|
+
e.side = 0, e.sides[this.side] = this.sides[this.side], e.delimjQs.eq(this.side === J ? 0 : 1).removeClass("mq-ghost").html(this.sides[this.side].ch);
|
|
25772
25772
|
}, e.createLeftOf = function(e) {
|
|
25773
25773
|
if (!this.replacedFragment) {
|
|
25774
25774
|
var n = e.options;
|
|
25775
|
-
if (this.sides[
|
|
25775
|
+
if (this.sides[J].ch === "|") var r = this.matchBrack(n, Y, e[Y]) || this.matchBrack(n, J, e[J]) || this.matchBrack(n, 0, e.parent.parent);
|
|
25776
25776
|
else var r = this.matchBrack(n, -this.side, e[-this.side]) || this.matchBrack(n, -this.side, e.parent.parent);
|
|
25777
25777
|
}
|
|
25778
25778
|
if (r) {
|
|
25779
25779
|
var i = this.side = -r.side;
|
|
25780
|
-
this.closeOpposing(r), r === e.parent.parent && e[i] &&
|
|
25781
|
-
} else r = this, i = r.side, r.replacedFragment ? r.side = 0 : e[-i] && (r.replaces(
|
|
25782
|
-
i ===
|
|
25783
|
-
}, e.placeCursor =
|
|
25784
|
-
this.ends[
|
|
25780
|
+
this.closeOpposing(r), r === e.parent.parent && e[i] && YP(e[i], e.parent.ends[i], -i).disown().withDirAdopt(-i, r.parent, r, r[i]).jQ.insDirOf(i, r.jQ), r.bubble("reflow");
|
|
25781
|
+
} else r = this, i = r.side, r.replacedFragment ? r.side = 0 : e[-i] && (r.replaces(YP(e[-i], e.parent.ends[-i], i)), e[-i] = 0), t.createLeftOf.call(r, e);
|
|
25782
|
+
i === J ? e.insAtLeftEnd(r.ends[J]) : e.insRightOf(r);
|
|
25783
|
+
}, e.placeCursor = zP, e.unwrap = function() {
|
|
25784
|
+
this.ends[J].children().disown().adopt(this.parent, this, this[Y]).jQ.insertAfter(this.jQ), this.remove();
|
|
25785
25785
|
}, e.deleteSide = function(e, t, n) {
|
|
25786
25786
|
var r = this.parent, i = this[e], a = r.ends[e];
|
|
25787
25787
|
if (e === this.side) {
|
|
@@ -25789,9 +25789,9 @@ var fI = K(K(vF, dI), function(e, t) {
|
|
|
25789
25789
|
return;
|
|
25790
25790
|
}
|
|
25791
25791
|
var o = n.options, s = !this.side;
|
|
25792
|
-
if (this.side = -e, this.matchBrack(o, e, this.ends[
|
|
25793
|
-
this.closeOpposing(this.ends[
|
|
25794
|
-
var c = this.ends[
|
|
25792
|
+
if (this.side = -e, this.matchBrack(o, e, this.ends[J].ends[this.side])) {
|
|
25793
|
+
this.closeOpposing(this.ends[J].ends[this.side]);
|
|
25794
|
+
var c = this.ends[J].ends[e];
|
|
25795
25795
|
this.unwrap(), c.siblingCreated && c.siblingCreated(n.options, e), i ? n.insDirOf(-e, i) : n.insAtDirEnd(e, r);
|
|
25796
25796
|
} else {
|
|
25797
25797
|
if (this.matchBrack(o, e, this.parent.parent)) this.parent.parent.closeOpposing(this), this.parent.parent.unwrap();
|
|
@@ -25801,19 +25801,19 @@ var fI = K(K(vF, dI), function(e, t) {
|
|
|
25801
25801
|
} else this.sides[e] = {
|
|
25802
25802
|
ch: pI[this.sides[this.side].ch],
|
|
25803
25803
|
ctrlSeq: pI[this.sides[this.side].ctrlSeq]
|
|
25804
|
-
}, this.delimjQs.removeClass("mq-ghost").eq(e ===
|
|
25804
|
+
}, this.delimjQs.removeClass("mq-ghost").eq(e === J ? 0 : 1).addClass("mq-ghost").html(this.sides[e].ch);
|
|
25805
25805
|
if (i) {
|
|
25806
|
-
var c = this.ends[
|
|
25807
|
-
|
|
25808
|
-
} else t ? n.insDirOf(e, this) : n.insAtDirEnd(e, this.ends[
|
|
25806
|
+
var c = this.ends[J].ends[e];
|
|
25807
|
+
YP(i, a, -e).disown().withDirAdopt(-e, this.ends[J], c, 0).jQ.insAtDirEnd(e, this.ends[J].jQ.removeClass("mq-empty")), c.siblingCreated && c.siblingCreated(n.options, e), n.insDirOf(-e, i);
|
|
25808
|
+
} else t ? n.insDirOf(e, this) : n.insAtDirEnd(e, this.ends[J]);
|
|
25809
25809
|
}
|
|
25810
25810
|
}, e.deleteTowards = function(e, t) {
|
|
25811
25811
|
this.deleteSide(-e, !1, t);
|
|
25812
25812
|
}, e.finalizeTree = function() {
|
|
25813
|
-
this.ends[
|
|
25813
|
+
this.ends[J].deleteOutOf = function(e, t) {
|
|
25814
25814
|
this.parent.deleteSide(e, !0, t);
|
|
25815
25815
|
}, this.finalizeTree = this.intentionalBlur = function() {
|
|
25816
|
-
this.delimjQs.eq(+(this.side ===
|
|
25816
|
+
this.delimjQs.eq(+(this.side === J)).removeClass("mq-ghost"), this.side = 0;
|
|
25817
25817
|
};
|
|
25818
25818
|
}, e.siblingCreated = function(e, t) {
|
|
25819
25819
|
t === -this.side && this.finalizeTree();
|
|
@@ -25837,13 +25837,13 @@ var fI = K(K(vF, dI), function(e, t) {
|
|
|
25837
25837
|
};
|
|
25838
25838
|
function mI(e, t) {
|
|
25839
25839
|
var t = t || e, n = pI[e], r = pI[t];
|
|
25840
|
-
|
|
25840
|
+
XP[e] = K(fI, J, e, n, t, r), XP[n] = K(fI, Y, e, n, t, r);
|
|
25841
25841
|
}
|
|
25842
|
-
mI("("), mI("["), mI("{", "\\{"),
|
|
25842
|
+
mI("("), mI("["), mI("{", "\\{"), X.langle = K(fI, J, "⟨", "⟩", "\\langle ", "\\rangle "), X.rangle = K(fI, Y, "⟨", "⟩", "\\langle ", "\\rangle "), XP["|"] = K(fI, J, "|", "|", "|", "|"), X.lVert = K(fI, J, "∥", "∥", "\\lVert ", "\\rVert "), X.rVert = K(fI, Y, "∥", "∥", "\\lVert ", "\\rVert "), X.left = q(vF, function(e) {
|
|
25843
25843
|
e.parser = function() {
|
|
25844
|
-
var e =
|
|
25845
|
-
|
|
25846
|
-
var n =
|
|
25844
|
+
var e = pF.regex, t = pF.string;
|
|
25845
|
+
pF.succeed;
|
|
25846
|
+
var n = pF.optWhitespace;
|
|
25847
25847
|
return n.then(e(/^(?:[([|]|\\\{|\\langle(?![a-zA-Z])|\\lVert(?![a-zA-Z]))/)).then(function(r) {
|
|
25848
25848
|
var i = r.charAt(0) === "\\" ? r.slice(1) : r;
|
|
25849
25849
|
return r == "\\langle" && (i = "⟨", r += " "), r == "\\lVert" && (i = "∥", r += " "), gF.then(function(a) {
|
|
@@ -25856,11 +25856,11 @@ mI("("), mI("["), mI("{", "\\{"), Y.langle = G(fI, q, "⟨", "⟩", "\\lan
|
|
|
25856
25856
|
});
|
|
25857
25857
|
});
|
|
25858
25858
|
};
|
|
25859
|
-
}),
|
|
25859
|
+
}), X.right = q(vF, function(e) {
|
|
25860
25860
|
e.parser = function() {
|
|
25861
|
-
return
|
|
25861
|
+
return pF.fail("unmatched \\right");
|
|
25862
25862
|
};
|
|
25863
|
-
}),
|
|
25863
|
+
}), X.choose = q(X.binom = X.binomial = q(q(vF, dI), function(e, t) {
|
|
25864
25864
|
e.ctrlSeq = "\\binom", e.htmlTemplate = "<span class=\"mq-non-leaf\"><span class=\"mq-paren mq-scaled\">(</span><span class=\"mq-non-leaf\"><span class=\"mq-array mq-non-leaf\"><span>&0</span><span>&1</span></span></span><span class=\"mq-paren mq-scaled\">)</span></span>", e.textTemplate = [
|
|
25865
25865
|
"choose(",
|
|
25866
25866
|
",",
|
|
@@ -25868,53 +25868,53 @@ mI("("), mI("["), mI("{", "\\{"), Y.langle = G(fI, q, "⟨", "⟩", "\\lan
|
|
|
25868
25868
|
];
|
|
25869
25869
|
}), function(e) {
|
|
25870
25870
|
e.createLeftOf = sI.prototype.createLeftOf;
|
|
25871
|
-
}),
|
|
25871
|
+
}), X.editable = X.MathQuillMathField = q(vF, function(e, t) {
|
|
25872
25872
|
e.ctrlSeq = "\\MathQuillMathField", e.htmlTemplate = "<span class=\"mq-editable-field\"><span class=\"mq-root-block\">&0</span></span>", e.parser = function() {
|
|
25873
|
-
var e = this, n =
|
|
25873
|
+
var e = this, n = pF.string, r = pF.regex, i = pF.succeed;
|
|
25874
25874
|
return n("[").then(r(/^[a-z][a-z0-9]*/i)).skip(n("]")).map(function(t) {
|
|
25875
25875
|
e.name = t;
|
|
25876
25876
|
}).or(i()).then(t.parser.call(e));
|
|
25877
25877
|
}, e.finalizeTree = function(e) {
|
|
25878
|
-
var t =
|
|
25879
|
-
t.KIND_OF_MQ = "MathField", t.editable = !0, t.createTextarea(), t.editablesTextareaEvents(), t.cursor.insAtRightEnd(t.root),
|
|
25878
|
+
var t = eF(this.ends[J], this.jQ, e);
|
|
25879
|
+
t.KIND_OF_MQ = "MathField", t.editable = !0, t.createTextarea(), t.editablesTextareaEvents(), t.cursor.insAtRightEnd(t.root), fF(t.root);
|
|
25880
25880
|
}, e.registerInnerField = function(e, t) {
|
|
25881
|
-
e.push(e[this.name] = t(this.ends[
|
|
25881
|
+
e.push(e[this.name] = t(this.ends[J].controller));
|
|
25882
25882
|
}, e.latex = function() {
|
|
25883
|
-
return this.ends[
|
|
25883
|
+
return this.ends[J].latex();
|
|
25884
25884
|
}, e.text = function() {
|
|
25885
|
-
return this.ends[
|
|
25885
|
+
return this.ends[J].text();
|
|
25886
25886
|
};
|
|
25887
25887
|
});
|
|
25888
|
-
var hI =
|
|
25888
|
+
var hI = X.embed = q(yF, function(e, t) {
|
|
25889
25889
|
e.setOptions = function(e) {
|
|
25890
25890
|
function t() {
|
|
25891
25891
|
return "";
|
|
25892
25892
|
}
|
|
25893
25893
|
return this.text = e.text || t, this.htmlTemplate = e.htmlString || "", this.latex = e.latex || t, this;
|
|
25894
25894
|
}, e.parser = function() {
|
|
25895
|
-
var e = this, t =
|
|
25895
|
+
var e = this, t = pF.string, n = pF.regex, r = pF.succeed;
|
|
25896
25896
|
return t("{").then(n(/^[a-z][a-z0-9]*/i)).skip(t("}")).then(function(i) {
|
|
25897
25897
|
return t("[").then(n(/^[-\w\s]*/)).skip(t("]")).or(r()).map(function(t) {
|
|
25898
|
-
return e.setOptions(
|
|
25898
|
+
return e.setOptions(aF[i](t));
|
|
25899
25899
|
});
|
|
25900
25900
|
});
|
|
25901
25901
|
};
|
|
25902
25902
|
});
|
|
25903
|
-
|
|
25903
|
+
X.MathQuillResponseContainer = q(vF, function(e, t) {
|
|
25904
25904
|
e.ctrlSeq = "\\MathQuillResponseContainer", e.htmlTemplate = "<span class=\"lrn-mq-response-container\"><marker class=\"lrn-qe-keyboard-i-response\"></marker><content>Response</content></span>", e.latex = function() {
|
|
25905
25905
|
return "\\MathQuillResponseContainer";
|
|
25906
25906
|
}, e.text = function() {
|
|
25907
|
-
return this.ends[
|
|
25907
|
+
return this.ends[J].text();
|
|
25908
25908
|
};
|
|
25909
|
-
}),
|
|
25909
|
+
}), X.MathQuillResponseContainerIcon = q(vF, function(e, t) {
|
|
25910
25910
|
e.ctrlSeq = "\\MathQuillResponseContainerIcon", e.htmlTemplate = "<span class=\"lrn-mq-response-container-icon\"><span class=\"lrn-qe-keyboard-i-response\"></span></span>", e.latex = function() {
|
|
25911
25911
|
return "\\MathQuillResponseContainerIcon";
|
|
25912
25912
|
}, e.text = function() {
|
|
25913
|
-
return this.ends[
|
|
25913
|
+
return this.ends[J].text();
|
|
25914
25914
|
};
|
|
25915
25915
|
});
|
|
25916
|
-
var gI =
|
|
25917
|
-
var n =
|
|
25916
|
+
var gI = X.matrix = q(vF, function(e, t) {
|
|
25917
|
+
var n = q(bF, function(e, t) {
|
|
25918
25918
|
e.init = function(e, n) {
|
|
25919
25919
|
return this.column = e, this.row = n, t.init.call(this);
|
|
25920
25920
|
}, e.keystroke = function(e, n, r) {
|
|
@@ -25946,11 +25946,11 @@ var gI = Y.matrix = K(vF, function(e, t) {
|
|
|
25946
25946
|
var e = this, t = e.blocks = [], r, i, a = 0;
|
|
25947
25947
|
this.htmlTemplate.replace(/&\d+/g, function(o, s) {
|
|
25948
25948
|
var c = e.htmlTemplate.substring(0, s).match(/<tr[^>]*>/gi).length - 1;
|
|
25949
|
-
i = r === c ? i + 1 : 0, t[a] = n(i, c), t[a].adopt(e, e.ends[
|
|
25949
|
+
i = r === c ? i + 1 : 0, t[a] = n(i, c), t[a].adopt(e, e.ends[Y], 0), r = c, a++;
|
|
25950
25950
|
});
|
|
25951
25951
|
}, e.reflow = function() {
|
|
25952
25952
|
var e = this.jQ.children("table"), t = e.outerHeight() / +e.css("fontSize").slice(0, -2), n = this.jQ.children(".mq-paren");
|
|
25953
|
-
n.length && HF(n,
|
|
25953
|
+
n.length && HF(n, LP(1 + .2 * (t - 1), 1.2), 1.05 * t);
|
|
25954
25954
|
}, e.latex = function() {
|
|
25955
25955
|
var e = this.getMatrixName(), t = "\\begin{" + e + "}", n, i, a;
|
|
25956
25956
|
for (a = 0; a < this.blocks.length; a++) n = this.blocks[a].row, i !== void 0 && (i === n ? t += r.column : t += r.row), i = n, t += this.blocks[a].latex();
|
|
@@ -25974,7 +25974,7 @@ var gI = Y.matrix = K(vF, function(e, t) {
|
|
|
25974
25974
|
return e ? "<span class=\"mq-paren mq-scaled\">" + e + "</span>" : "";
|
|
25975
25975
|
}
|
|
25976
25976
|
}, e.htmlTemplate = e.generateHtmlTemplate(1, 1), e.parser = function() {
|
|
25977
|
-
var e =
|
|
25977
|
+
var e = pF.regex, t = this, i = this.getMatrixName(), a = RegExp("^(.*?)\\\\end{" + i + "}"), o = RegExp("\\\\end{" + i + "}");
|
|
25978
25978
|
return e(a).then(function(e) {
|
|
25979
25979
|
var i = e.replace(o, ""), a = [], s = i.split(r.row), c = Math.min(s.length, t.maximum.rows), l = 0, u, d;
|
|
25980
25980
|
for (d = 0; d < c; d++) u = s[d].split(r.column), l = Math.max(l, u.length);
|
|
@@ -25982,12 +25982,12 @@ var gI = Y.matrix = K(vF, function(e, t) {
|
|
|
25982
25982
|
u = s[d].split(r.column);
|
|
25983
25983
|
for (var e = 0; e < l; e++) {
|
|
25984
25984
|
var f = n(e, d);
|
|
25985
|
-
gF.parse(u[e] || " ").children().adopt(f, f.ends[
|
|
25985
|
+
gF.parse(u[e] || " ").children().adopt(f, f.ends[Y], 0), a.push(f);
|
|
25986
25986
|
}
|
|
25987
25987
|
}
|
|
25988
25988
|
t.htmlTemplate = t.generateHtmlTemplate(c, l), t.blocks = a;
|
|
25989
|
-
for (var d = 0; d < a.length; d += 1) a[d].adopt(t, t.ends[
|
|
25990
|
-
return
|
|
25989
|
+
for (var d = 0; d < a.length; d += 1) a[d].adopt(t, t.ends[Y], 0);
|
|
25990
|
+
return pF.succeed(t);
|
|
25991
25991
|
});
|
|
25992
25992
|
}, e.finalizeTree = function() {
|
|
25993
25993
|
var e = this.jQ.find("table");
|
|
@@ -25996,37 +25996,37 @@ var gI = Y.matrix = K(vF, function(e, t) {
|
|
|
25996
25996
|
return n && n.join(" ") || "";
|
|
25997
25997
|
}), e.addClass("mq-rows-" + e.find("tr").length));
|
|
25998
25998
|
}, e.relink = function() {
|
|
25999
|
-
var e = this.jQ.find("td"), t =
|
|
25999
|
+
var e = this.jQ.find("td"), t = qP.byId[e.first().attr(IP)], n = qP.byId[e.last().attr(IP)], r = e.eq(0).closest("tr"), i = [];
|
|
26000
26000
|
e.each(function(t) {
|
|
26001
|
-
var n =
|
|
26001
|
+
var n = qP.byId[MP(this).attr(IP)], a = e.eq(t + 1), o = MP(this).closest("tr").next("tr"), s = MP(this).closest("tr").index(), c = MP(this).index(), l;
|
|
26002
26002
|
if (a.length) {
|
|
26003
|
-
var u =
|
|
26004
|
-
n[
|
|
26003
|
+
var u = qP.byId[a.attr(IP)];
|
|
26004
|
+
n[Y] = u, u[J] = n;
|
|
26005
26005
|
}
|
|
26006
26006
|
if (l = o.length ? o.find("td").eq(c) : r.find("td").eq(c + 1), l.length) {
|
|
26007
|
-
var d =
|
|
26007
|
+
var d = qP.byId[l.attr(IP)];
|
|
26008
26008
|
n.downOutOf = d, d.upOutOf = n;
|
|
26009
26009
|
}
|
|
26010
26010
|
n.column = c, n.row = s, i.push(n);
|
|
26011
|
-
}), this.ends[
|
|
26011
|
+
}), this.ends[J] = t, this.ends[Y] = n, t && t[J] && delete t[J], n && n[Y] && delete n[Y], this.blocks = i;
|
|
26012
26012
|
}, e.deleteCell = function(e) {
|
|
26013
26013
|
var t = e.jQ.closest("tr"), n = e.jQ.index(), r = t.index(), i = t.find("td").not(e.jQ), a = this.jQ.find("tr").not(t).map(function() {
|
|
26014
|
-
return
|
|
26014
|
+
return MP(this).find("td")[n];
|
|
26015
26015
|
}), o = this.jQ.find("td").length === 1, s;
|
|
26016
26016
|
function c() {
|
|
26017
|
-
return
|
|
26017
|
+
return qP.byId[MP(this).attr(IP)].isEmpty();
|
|
26018
26018
|
}
|
|
26019
|
-
return i.filter(c).length === i.length && a.length && (i.remove(), e.jQ.remove(), t.remove(), this.finalizeTree()), a.filter(c).length === a.length && i.length && (a.remove(), e.jQ.remove(), this.finalizeTree()), o || (r = Math.min(r, this.jQ.find("tr").length - 1), n = Math.min(n, this.jQ.find("tr").eq(r).find("td").length - 1), s =
|
|
26019
|
+
return i.filter(c).length === i.length && a.length && (i.remove(), e.jQ.remove(), t.remove(), this.finalizeTree()), a.filter(c).length === a.length && i.length && (a.remove(), e.jQ.remove(), this.finalizeTree()), o || (r = Math.min(r, this.jQ.find("tr").length - 1), n = Math.min(n, this.jQ.find("tr").eq(r).find("td").length - 1), s = qP.byId[this.jQ.find("tr").eq(r).find("td").eq(n).attr(IP)]), s;
|
|
26020
26020
|
}, e.addRow = function(e) {
|
|
26021
26021
|
if (!(this.jQ.find("tr").length >= this.maximum.rows)) {
|
|
26022
|
-
for (var t = e.find("td").length, r =
|
|
26022
|
+
for (var t = e.find("td").length, r = MP("<tr></tr>"), i, a, o = 0; o < t; o++) i = n(), i.parent = this, i.jQ = MP("<td class=\"mq-empty\">").attr(IP, i.id), r.append(i.jQ), a ||= i;
|
|
26023
26023
|
return r.insertAfter(e), a;
|
|
26024
26024
|
}
|
|
26025
26025
|
}, e.addColumn = function(e) {
|
|
26026
26026
|
if (!(e.closest("tr").find("td").length >= this.maximum.columns)) {
|
|
26027
26027
|
var t = e.index(), r = e.closest("tr").index(), i = this, a, o = [];
|
|
26028
26028
|
return this.jQ.find("tr").each(function() {
|
|
26029
|
-
a = n(), a.parent = i, a.jQ =
|
|
26029
|
+
a = n(), a.parent = i, a.jQ = MP("<td class=\"mq-empty\">").attr(IP, a.id), a.jQ.insertAfter(MP(this).find("td").eq(t)), o.push(a);
|
|
26030
26030
|
}), o[r];
|
|
26031
26031
|
}
|
|
26032
26032
|
}, e.insertColumn = function(e) {
|
|
@@ -26040,42 +26040,42 @@ var gI = Y.matrix = K(vF, function(e, t) {
|
|
|
26040
26040
|
}
|
|
26041
26041
|
};
|
|
26042
26042
|
});
|
|
26043
|
-
|
|
26043
|
+
X.pmatrix = q(gI, function(e, t) {
|
|
26044
26044
|
e.ctrlSeq = "\\pmatrix", e.parentheses = {
|
|
26045
26045
|
left: "(",
|
|
26046
26046
|
right: ")"
|
|
26047
26047
|
};
|
|
26048
|
-
}),
|
|
26048
|
+
}), X.bmatrix = q(gI, function(e, t) {
|
|
26049
26049
|
e.ctrlSeq = "\\bmatrix", e.parentheses = {
|
|
26050
26050
|
left: "[",
|
|
26051
26051
|
right: "]"
|
|
26052
26052
|
};
|
|
26053
|
-
}),
|
|
26053
|
+
}), X.Bmatrix = q(gI, function(e, t) {
|
|
26054
26054
|
e.ctrlSeq = "\\Bmatrix", e.parentheses = {
|
|
26055
26055
|
left: "{",
|
|
26056
26056
|
right: "}"
|
|
26057
26057
|
};
|
|
26058
|
-
}),
|
|
26058
|
+
}), X.vmatrix = q(gI, function(e, t) {
|
|
26059
26059
|
e.ctrlSeq = "\\vmatrix", e.parentheses = {
|
|
26060
26060
|
left: "|",
|
|
26061
26061
|
right: "|"
|
|
26062
26062
|
};
|
|
26063
|
-
}),
|
|
26063
|
+
}), X.Vmatrix = q(gI, function(e, t) {
|
|
26064
26064
|
e.ctrlSeq = "\\Vmatrix", e.parentheses = {
|
|
26065
26065
|
left: "‖",
|
|
26066
26066
|
right: "‖"
|
|
26067
26067
|
};
|
|
26068
26068
|
});
|
|
26069
|
-
var _I =
|
|
26069
|
+
var _I = uF(3);
|
|
26070
26070
|
for (var vI in _I) (function(e, t) {
|
|
26071
|
-
typeof t == "function" ? (
|
|
26072
|
-
return
|
|
26073
|
-
},
|
|
26071
|
+
typeof t == "function" ? (sF[e] = function() {
|
|
26072
|
+
return oF(), t.apply(this, arguments);
|
|
26073
|
+
}, sF[e].prototype = t.prototype) : sF[e] = t;
|
|
26074
26074
|
})(vI, _I[vI]);
|
|
26075
26075
|
//#endregion
|
|
26076
26076
|
//#region ../../lib-react/math-input/dist/mq/mathquill-instance.js
|
|
26077
26077
|
var yI;
|
|
26078
|
-
typeof window < "u" && (yI =
|
|
26078
|
+
typeof window < "u" && (yI = sF.getInterface(3), yI && yI.registerEmbed && kP(yI));
|
|
26079
26079
|
//#endregion
|
|
26080
26080
|
//#region ../../lib-react/math-input/dist/mq/input.js
|
|
26081
26081
|
var bI = (0, tp.default)("math-input:mq:input"), xI = O("span")({}), SI = class extends A.Component {
|
|
@@ -26181,10 +26181,10 @@ var OI = class extends A.Component {
|
|
|
26181
26181
|
}, this.inputRef = A.createRef();
|
|
26182
26182
|
}
|
|
26183
26183
|
componentDidMount() {
|
|
26184
|
-
this.update(),
|
|
26184
|
+
this.update(), hP(), this.createLiveRegion(), this.addEventListeners();
|
|
26185
26185
|
}
|
|
26186
26186
|
componentDidUpdate() {
|
|
26187
|
-
this.update(),
|
|
26187
|
+
this.update(), hP();
|
|
26188
26188
|
}
|
|
26189
26189
|
componentWillUnmount() {
|
|
26190
26190
|
this.removeLiveRegion(), this.removeEventListeners();
|
|
@@ -26505,7 +26505,7 @@ var RI = (e) => e ? {
|
|
|
26505
26505
|
mode: P.default.oneOfType([P.default.string, P.default.number])
|
|
26506
26506
|
};
|
|
26507
26507
|
static defaultProps = {
|
|
26508
|
-
baseSet:
|
|
26508
|
+
baseSet: OP,
|
|
26509
26509
|
noDecimal: !1
|
|
26510
26510
|
};
|
|
26511
26511
|
constructor(e) {
|
|
@@ -26639,14 +26639,14 @@ var RI = (e) => e ? {
|
|
|
26639
26639
|
t(WI(e));
|
|
26640
26640
|
};
|
|
26641
26641
|
render() {
|
|
26642
|
-
let { mode: e, onFocus: t, controlledKeypadMode: n, noDecimal: r, className: i, additionalKeys: a, layoutForKeyPad: o, setKeypadInteraction: s } = this.props, c =
|
|
26642
|
+
let { mode: e, onFocus: t, controlledKeypadMode: n, noDecimal: r, className: i, additionalKeys: a, layoutForKeyPad: o, setKeypadInteraction: s } = this.props, c = mP(a);
|
|
26643
26643
|
return /* @__PURE__ */ M(UI, {
|
|
26644
26644
|
className: i,
|
|
26645
26645
|
controlledKeypadMode: n,
|
|
26646
26646
|
onFocus: t,
|
|
26647
26647
|
noDecimal: r,
|
|
26648
26648
|
layoutForKeyPad: o,
|
|
26649
|
-
additionalKeys: dM(
|
|
26649
|
+
additionalKeys: dM(fP(e), c),
|
|
26650
26650
|
onPress: this.keypadPress,
|
|
26651
26651
|
mode: e,
|
|
26652
26652
|
setKeypadInteraction: s
|
|
@@ -27160,7 +27160,12 @@ var XI = {}, ZI = (e) => String(e || "").replace(/-/g, "_"), QI = (e) => e && e.
|
|
|
27160
27160
|
};
|
|
27161
27161
|
}
|
|
27162
27162
|
componentDidMount() {
|
|
27163
|
-
this.input && this.props.autoFocus && setTimeout(() =>
|
|
27163
|
+
this.input && this.props.autoFocus && (this.focusTimeout = setTimeout(() => {
|
|
27164
|
+
this.focusTimeout = void 0, this.input?.focus();
|
|
27165
|
+
}, 0));
|
|
27166
|
+
}
|
|
27167
|
+
componentWillUnmount() {
|
|
27168
|
+
this.focusTimeout && clearTimeout(this.focusTimeout);
|
|
27164
27169
|
}
|
|
27165
27170
|
onClick = (e) => {
|
|
27166
27171
|
let { noDecimal: t, noLatexHandling: n, onChange: r } = this.props, i = wL(e);
|
|
@@ -27182,7 +27187,7 @@ var XI = {}, ZI = (e) => String(e || "").replace(/-/g, "_"), QI = (e) => e && e.
|
|
|
27182
27187
|
};
|
|
27183
27188
|
onEditorChange = (e) => {
|
|
27184
27189
|
let { onChange: t, noDecimal: n } = this.props;
|
|
27185
|
-
if (
|
|
27190
|
+
if (hP(), cL(), this.updateDisable(!0), n && (e.indexOf(".") !== -1 || e.indexOf(",") !== -1) && this.input) {
|
|
27186
27191
|
this.input.clear(), this.input.write(e.replace(mL, ""));
|
|
27187
27192
|
return;
|
|
27188
27193
|
}
|
|
@@ -27696,7 +27701,7 @@ var OL = DL, { commonMqFontStyles: kL, longdivStyles: AL, supsubStyles: jL } = P
|
|
|
27696
27701
|
"data-latex": "",
|
|
27697
27702
|
"data-raw": e.latex
|
|
27698
27703
|
},
|
|
27699
|
-
|
|
27704
|
+
Ue(e.latex, e.wrapper)
|
|
27700
27705
|
];
|
|
27701
27706
|
},
|
|
27702
27707
|
addNodeView() {
|
|
@@ -27758,15 +27763,16 @@ var OL = DL, { commonMqFontStyles: kL, longdivStyles: AL, supsubStyles: jL } = P
|
|
|
27758
27763
|
t !== null && cancelAnimationFrame(t), window.removeEventListener("scroll", n, !0), window.removeEventListener("resize", n);
|
|
27759
27764
|
};
|
|
27760
27765
|
}, [r, s]), bt(() => {
|
|
27761
|
-
let e = (
|
|
27762
|
-
|
|
27763
|
-
|
|
27766
|
+
let e = performance.now(), n = (n) => {
|
|
27767
|
+
if (n?.timeStamp < e) return;
|
|
27768
|
+
let i = n?.target, a = (document.querySelectorAll?.("[id^=\"equation-editor-select\"][id*=\"listbox\"], [aria-labelledby=\"equation-editor-label\"][role=\"listbox\"]") || []).length > 0, o = !!(i?.id && i.id.includes("equation-editor-select")) || !!i?.closest?.("[id*=\"equation-editor-select\"]"), s = !!i?.closest?.(`.math-node-${d.current}`);
|
|
27769
|
+
if (l.current && !l.current.contains(i) && !i?.closest?.("[data-inline-node]") && !a && !o && !s) {
|
|
27764
27770
|
c(!1);
|
|
27765
|
-
let e = !!r?.view?.dom?.contains(
|
|
27771
|
+
let e = !!r?.view?.dom?.contains(i);
|
|
27766
27772
|
S(t.attrs.latex, { moveCursorAfterNode: !e });
|
|
27767
27773
|
}
|
|
27768
27774
|
};
|
|
27769
|
-
return s ? document.addEventListener("click",
|
|
27775
|
+
return s ? document.addEventListener("click", n) : document.removeEventListener("click", n), () => document.removeEventListener("click", n);
|
|
27770
27776
|
}, [
|
|
27771
27777
|
r,
|
|
27772
27778
|
s,
|