mathjaxr/ 0000755 0001762 0000144 00000000000 15113345752 012076 5 ustar ligges users mathjaxr/MD5 0000644 0001762 0000144 00000042270 15113345752 012413 0 ustar ligges users a4d9b28aa524b72fdce68ed1f2cfafc6 *DESCRIPTION
b2563da97de523a627abacdde57bef1d *NAMESPACE
5359f90d8a0f2d6930268e122cb659dc *NEWS.md
d452f28887af76954f68ed91c765625a *R/preview_rd.r
8cda84d98ca1f8e54c5605956b64eb7a *README.md
17c4f6a281e7b58f283c0a476625592d *build/mathjaxr.pdf
140ec8e640600e1cda1f1d3111640e27 *build/stage23.rdb
7b5cb15f11b3bdd3236c5375bed7aba5 *inst/doc/R_dark.css
3b83ef96387f14655fc854ddc3c6bd57 *inst/doc/mathjax/LICENSE
2e5404a15d9c6588c438f654c387e10d *inst/doc/mathjax/README.md
7b6ee59cb8ff86bd254fa422c99149ca *inst/doc/mathjax/a11y/assistive-mml.js
bdea0e6116725ed68214b6d5a4bfaa45 *inst/doc/mathjax/a11y/complexity.js
f5065d23cc48d1a53039ca957c494b84 *inst/doc/mathjax/a11y/explorer.js
95d046571a9d9cf458def41a1888ead5 *inst/doc/mathjax/a11y/semantic-enrich.js
26a0f4dfb82df8d349557d6fe2f3a69a *inst/doc/mathjax/a11y/speech.js
70105a9720bc78bcaa3fe1e88a4028c4 *inst/doc/mathjax/a11y/sre.js
774e6f8526b11ba652e593f257be0409 *inst/doc/mathjax/font/chtml.js
f66c8fdf8d9bf018e11304bb188ed3db *inst/doc/mathjax/font/chtml/dynamic/PUA.js
e8dd9c2d8e94f6d9a1490b2b78e840d5 *inst/doc/mathjax/font/chtml/dynamic/accents-b-i.js
c558917802c6baff05cd0fe5c6cfd27f *inst/doc/mathjax/font/chtml/dynamic/accents.js
c172cf9c4ca3eb1bbb83eb1920ea9242 *inst/doc/mathjax/font/chtml/dynamic/arabic.js
3c6e800e9c498f8f8cdbb9aa51b70481 *inst/doc/mathjax/font/chtml/dynamic/arrows.js
2e70d25a05a033c4f9176ca6409922de *inst/doc/mathjax/font/chtml/dynamic/braille-d.js
44c1d6f989a6ae36e46e820a2b226cbc *inst/doc/mathjax/font/chtml/dynamic/braille.js
7d79e3df7c116a81d474fdf00c9dc7ab *inst/doc/mathjax/font/chtml/dynamic/calligraphic.js
5dbc21065c753bf3e29606224a0fb80f *inst/doc/mathjax/font/chtml/dynamic/cherokee.js
08fb345fb6dfd9bceda41083d2520c33 *inst/doc/mathjax/font/chtml/dynamic/cyrillic-ss.js
cfda3b7c18ce01e18a284364b9d48810 *inst/doc/mathjax/font/chtml/dynamic/cyrillic.js
e4647dad5f2e803049431d31183ef497 *inst/doc/mathjax/font/chtml/dynamic/devanagari.js
30907ca5e84dbfe2f9ff699b3049a679 *inst/doc/mathjax/font/chtml/dynamic/double-struck.js
7315f55ce89aabadc1590a1b3e4b54f1 *inst/doc/mathjax/font/chtml/dynamic/fraktur.js
907821b3e712e1a0de92a69f8f924fd1 *inst/doc/mathjax/font/chtml/dynamic/greek-ss.js
c7d0a95dc4c4a38ab239e25c942a3e1f *inst/doc/mathjax/font/chtml/dynamic/greek.js
d5045ae0d1b0bea092edf4f9f067a1e4 *inst/doc/mathjax/font/chtml/dynamic/hebrew.js
f1e29168ddf06a2cb4943b2de3c01729 *inst/doc/mathjax/font/chtml/dynamic/latin-b.js
33029acae900f7a957a0eece62326965 *inst/doc/mathjax/font/chtml/dynamic/latin-bi.js
4a06fb2646531bb26e636f97d6bf9c79 *inst/doc/mathjax/font/chtml/dynamic/latin-i.js
53f90a97b585db531ae3a0bf2be6a5ad *inst/doc/mathjax/font/chtml/dynamic/latin.js
feca73b22e2b3d64b24a688fd48eb233 *inst/doc/mathjax/font/chtml/dynamic/marrows.js
fe4ebc575f7c2507119c79d6832f1825 *inst/doc/mathjax/font/chtml/dynamic/math.js
7006833ca0f652de714054f1b27b8928 *inst/doc/mathjax/font/chtml/dynamic/monospace-ex.js
17a023dafcc7a5af1d3bcd126358aaf4 *inst/doc/mathjax/font/chtml/dynamic/monospace-l.js
28fc37165649abf84ca1897fc70c0a3d *inst/doc/mathjax/font/chtml/dynamic/monospace.js
87a6d73ee4daf9580e471f76497b4a27 *inst/doc/mathjax/font/chtml/dynamic/mshapes.js
25aeb288cb0cd6d65305ea5427c73e99 *inst/doc/mathjax/font/chtml/dynamic/phonetics-ss.js
b6cf187a916cdf740d7fd2e2d9a3b5fe *inst/doc/mathjax/font/chtml/dynamic/phonetics.js
0f9cc6d85580d97d338597552ce0612d *inst/doc/mathjax/font/chtml/dynamic/sans-serif-b.js
0b231fd8d54464ddf07970793ea8fc98 *inst/doc/mathjax/font/chtml/dynamic/sans-serif-bi.js
a3d4252098ee27381cd954b2668b8367 *inst/doc/mathjax/font/chtml/dynamic/sans-serif-ex.js
14a1e3f3e126113383fd962e6af2a330 *inst/doc/mathjax/font/chtml/dynamic/sans-serif-i.js
280e4cc734ff14b66aa356d07e9700da *inst/doc/mathjax/font/chtml/dynamic/sans-serif-r.js
dbdae749a1bc177d4c805dbc0a3900fe *inst/doc/mathjax/font/chtml/dynamic/sans-serif.js
623695aa323cb809ff2a812efb0e7126 *inst/doc/mathjax/font/chtml/dynamic/script.js
e8c0fe2db02c78dd487d7d7e55f32705 *inst/doc/mathjax/font/chtml/dynamic/shapes.js
6b9e8d8a670e4e2b356504a5409b162a *inst/doc/mathjax/font/chtml/dynamic/symbols-b-i.js
f87f5f3fb1b9f468e145f4cf62690536 *inst/doc/mathjax/font/chtml/dynamic/symbols.js
fb565c57cf4b810f7631fefe26908b64 *inst/doc/mathjax/font/chtml/dynamic/variants.js
ce46278e095743d479424bddd6353e84 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ab.woff2
619bae12cc0a61f509773710e0c93e33 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-abi.woff2
47fb3edf9e0f7de0c03dd41ccc78816c *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ai.woff2
1dd3832ac303238055e2b5b89c76f81e *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ar.woff2
f1cc7c306828222b232192fc3bcf8c4d *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-arl.woff2
3224d1956227a933924283f45cae1cb0 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-b.woff2
45d9000b41a9ad0ac5f54dcc2db9493f *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-be.woff2
d4d48bf7219a127d29af81dd968a77d0 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-bi.woff2
738513b68653eca7ec8b9c337e768fc3 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-br.woff2
fd010736ccb795f174e2da22e5aaa280 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-brd.woff2
278ce2b1558be55160bbf5254d95d832 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-brk.woff2
66e511249352cddbf76b59ebaf6f7cea *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-c.woff2
2b9e8639c54b1e1b373112720e9fa8fc *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-cb.woff2
9b6e9c1798dfe32c394aa0221b4c3bde *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ch.woff2
38e0bb813b20c0809b190cd10da34383 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-chb.woff2
1b3f3c3e8fabf5c82dc6bedeea44e3dc *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-chbi.woff2
fdcd1811e5ee69b311781d7ce0c792cc *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-chi.woff2
a630912d4c2ca4023850346db827709b *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-cy.woff2
b5b05ecc8d10de5f822d97ef82f8c54a *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-cyb.woff2
a9ea7341067e843a1dc5eee626ba4dc8 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-cybi.woff2
a14220807b360e38591bae2551976553 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-cyi.woff2
2c1d8a7b87f4ae988292ed6021e8b007 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-cyss.woff2
a9fc31deab223512b7364139c034fa9c *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-cyssb.woff2
6aef6e3c62244b664fe1bd90bc0aeb7b *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-cyssbi.woff2
d0767e66a3ba796d7360237daa09134c *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-cyssi.woff2
451c4f20256c30206edbecaef64ec818 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ds.woff2
de8e29a5af0a1324bea4a1f5411b3534 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-dv.woff2
eb4eabcb97a0d89b3735218aa546723b *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-em.woff2
4daf31aade22f7c5c9368bc2aaf7e834 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-f.woff2
edd7cce6d601fa6c7fcdd6514308dd47 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-fb.woff2
227c3ba994cc35672e2954da32d368fd *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-gk.woff2
90ca7ebb2dcf74d8fe7faf0e02566f52 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-gkb.woff2
113fd686abb01b076a8db53669b4b428 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-gkbi.woff2
57a8448f73a9af25c63198510937fb05 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-gki.woff2
1af80b978f2a01c90c5ce103d98e5413 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-gkss.woff2
e03b2c8ae7f4c6ab2746ad842ddbf947 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-gkssb.woff2
b6a9d686b504b8f4d1e738d640849815 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-gkssbi.woff2
6d098f337a5b76277a941dd41cffc900 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-gkssi.woff2
a1393275fd871e876999ba15c5a8d967 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-he.woff2
0dfabc20bb3148e5292f5d3938affd40 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-heb.woff2
17efcf2ae12253f73d97136bfcf41f91 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-hebi.woff2
e6ff02beb8ceea449eef297840056e31 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-hei.woff2
a240a050a6365a40c08ab9187d4a5969 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-i.woff2
b2be7514ce80b5c6ac06471b9051507a *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-lb.woff2
d8645fdec28a4eb40123ff2e2ddc6c58 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-li.woff2
f6642b036ca7237fd570c397d2affa27 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-lib.woff2
83774a7b9dc5d60c39208890e228999e *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-lo.woff2
f5805196862f453477bc389cbb51f35f *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-lr.woff2
934d52d427228a1bbd64d2710ef85e9b *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-lt.woff2
311ca91fd7249eaf5e49adca50b84d33 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-m.woff2
62cf4f9ad6cabde21db77066fb2617a9 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-mar.woff2
322699a3cad3e3addfe7f0df0eb7ae24 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-mi.woff2
0c2ee14b905a0b3615c0f88a72f540c4 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ml.woff2
7e834d509cc12b89069d9a0ca416e5f0 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-mm.woff2
8de95239d478f204b6b48c17bd61dd69 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-msh.woff2
b35084dc9be3c45066a10b76d47b0eb0 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-mx.woff2
cf50b1041e3b64c244501dcf28fd0cba *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-n.woff2
5e48e3a88f1e8d0e4686a8eba2216681 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ob.woff2
aa5cae048075912dd3396ab67992778b *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-os.woff2
155f52a794d6c25329323b97a8095c95 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ph.woff2
0f6f3a6b8f89bd5efc1a5d4874bfa807 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-phb.woff2
dfa829d8cb2b1eb944d73db907a4a402 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-phbi.woff2
c3a9913786284f632bd8194eb434f506 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-phi.woff2
6a87989f4a728cbfddef71dba0e861a2 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-phss.woff2
42321c33cbebdc8bc626300048260bb3 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-phssb.woff2
b8f2ca1a40318faa6352d4377a43f0e0 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-phssbi.woff2
b4e31f2f9be6b1863fa46d8662c2dc06 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-phssi.woff2
8f5dd4dccce2706d3d4c78f739c8b453 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-pu.woff2
839660d0a658d5bd0e0310b6cbe80f7e *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-pub.woff2
7dbf457867bf5d9926e1d3a834e45494 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-pubi.woff2
1f20a6dd643bffc313125ef33e26a3be *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-pui.woff2
5d0c1c998e185b92ecf1c955c96d2122 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-rb.woff2
e745dfc879bf05a475c171fdaa2e6474 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-s.woff2
0aa712e3f09cbff7e90cf8c2d7433143 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-s3.woff2
1ff681fc5217618bdf045518fec615f3 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-s4.woff2
6bdad8a4d698c23a921033fe68270c69 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-s5.woff2
89917702a4dbc89a6ca09ca8cc163eda *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-s6.woff2
550e3c05373001b3e49b2367dd6fc626 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-s7.woff2
53407ed42b68581ada26c0b87210fb00 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-sb.woff2
48a271e72db7c6430ecb1246d233c7d8 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-sh.woff2
d490d7fb5953cc737de900b06be28810 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-shb.woff2
9820dde9e41cc145008b2308a0de1b90 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-shbi.woff2
ad3b74adcf580567d59cc8416a090126 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-shi.woff2
2de9ea6d207a1d6e93f9a9217815f50a *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-so.woff2
3c3dab05d79f7e557562a9dfa334cd70 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ss.woff2
b6825109c1f875050978f8d2a6108acd *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ssb.woff2
846c6d88ba7942d5a661c1a5f652a0d2 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ssbi.woff2
bffc7a36d85bb239de4e7554b5d5ceeb *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ssbix.woff2
96599a370634d03f20d04ca25ec5e4f1 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ssbx.woff2
83024a57e7bd8457fb8d78650798ac63 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ssi.woff2
117349a1a5ea4dadc6f4a0369ad4aaed *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ssix.woff2
aac2e71f1cd3de5fbf574fbc27e82186 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-sslb.woff2
385f9e76e4be34146a1f1ace79135644 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ssli.woff2
4c826f7cadb7ab6d5a272969f81c5818 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-sslib.woff2
f09f660d1057390c4cbc29ea581ee620 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-sslr.woff2
4852e0dc9f3f413e829b62fb7c482a1a *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ssx.woff2
609c547c95e7a430680823c8ec14ce80 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-sy.woff2
28e95f38d58358c47e779b52a35d1d2a *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-syb.woff2
8246794e320eda698096b7e9c5d0e3e9 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-sybi.woff2
fd8189eddf43861a64bc53c5491fef52 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-syi.woff2
676f9cd240d6fbc81270edda1158ed57 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-u.woff2
f5c7ef03892865f55411f21ca6eb9803 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-ue.woff2
26e2cb46812cb6910c9d4d1f420a2bea *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-v.woff2
f90ec6c9d7856996a1a73d0527f626d6 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-vx.woff2
b6085102ade18332d3efb1b7829b6117 *inst/doc/mathjax/font/chtml/woff2/mjx-ncm-zero.woff2
da82aa7387b195e3f347cd5011703e42 *inst/doc/mathjax/font/def/mathjax-newcm.ts
b92ddc41efd2f0f30bfd44ae883727e5 *inst/doc/mathjax/font/tex-mml-chtml-mathjax-newcm.js
818b498b9a461aea21acec8ad138c938 *inst/doc/mathjax/font/tsconfig/cjs.json
c5bf0ee6fc1554f7dab363d58ea49bc5 *inst/doc/mathjax/font/tsconfig/common.json
1d66ebd5041afe2fbeb0c34d385eba38 *inst/doc/mathjax/font/tsconfig/def.json
72507d8730785373a03c184c61e3ae19 *inst/doc/mathjax/font/tsconfig/mjs.json
ab1d084b6490b5fcbc7a9f26ea3a4567 *inst/doc/mathjax/input/asciimath.js
1aa9bd342eb80070c8869ca911924ee7 *inst/doc/mathjax/input/tex-base.js
10e6d56bc77858b4360f3208f1ac008e *inst/doc/mathjax/input/tex.js
6d3a5dd03a2f9e9bdc05c482954e86f8 *inst/doc/mathjax/input/tex/extensions/action.js
835732db3e185861e03c1c085a28a748 *inst/doc/mathjax/input/tex/extensions/ams.js
e644fd1e3e2905a274f3653f929ec8fb *inst/doc/mathjax/input/tex/extensions/amscd.js
ea8fcba632ed7365e527570e0b110c6b *inst/doc/mathjax/input/tex/extensions/autoload.js
0da39d7ee40c5c48d799434dbcaf61f1 *inst/doc/mathjax/input/tex/extensions/bbm.js
c3e9d8975804f0c4c1baaf656f65de4e *inst/doc/mathjax/input/tex/extensions/bboldx.js
a283256286bb7d41372ce0357cc32936 *inst/doc/mathjax/input/tex/extensions/bbox.js
d868da4b2d97b7016d5da1df8ea898bb *inst/doc/mathjax/input/tex/extensions/begingroup.js
9edae767c3678d363b32cb2201e4a567 *inst/doc/mathjax/input/tex/extensions/boldsymbol.js
9932f33d34e3d5a2f9f2e2167c1cd419 *inst/doc/mathjax/input/tex/extensions/braket.js
587ba72bee02eac7f42831b5a06b49cb *inst/doc/mathjax/input/tex/extensions/bussproofs.js
4ca92e463085673c4552fecb314e166e *inst/doc/mathjax/input/tex/extensions/cancel.js
585df24eb94ddad71bfacbfe598f6fa8 *inst/doc/mathjax/input/tex/extensions/cases.js
6c80d653b419dd2bbed3901f8e173fdf *inst/doc/mathjax/input/tex/extensions/centernot.js
f9ec12b68490740499178c454cef379c *inst/doc/mathjax/input/tex/extensions/color.js
f7986cdfc6cf6a1fa87ba72799d989a0 *inst/doc/mathjax/input/tex/extensions/colortbl.js
60a7979c346a97a8a6d8f31ced363fe9 *inst/doc/mathjax/input/tex/extensions/colorv2.js
dce3d0c885c3f601c41d8a42037e3052 *inst/doc/mathjax/input/tex/extensions/configmacros.js
69fb09ee8755509fd7be7f1cd77cc52a *inst/doc/mathjax/input/tex/extensions/dsfont.js
fa6e79d91c873921f8788d7b6b44e605 *inst/doc/mathjax/input/tex/extensions/empheq.js
3df3aaf0e64381213548917825f837a3 *inst/doc/mathjax/input/tex/extensions/enclose.js
5f300b8f6da30d896bb8afea41631c2d *inst/doc/mathjax/input/tex/extensions/extpfeil.js
c0ae3e4aefe41dabc78bcf54e41b532c *inst/doc/mathjax/input/tex/extensions/gensymb.js
75fbf95f2f117273bd91aef0ceeab9b4 *inst/doc/mathjax/input/tex/extensions/html.js
8cda0fb101c6a2648f2255e41f5eea3c *inst/doc/mathjax/input/tex/extensions/mathtools.js
470d42f2ccd5f76159495c78c79fdfee *inst/doc/mathjax/input/tex/extensions/mhchem.js
39ae1b2432f6099f0c6a7262f93013e4 *inst/doc/mathjax/input/tex/extensions/newcommand.js
c2b827a4a40435c8d552e8b11c7f9a65 *inst/doc/mathjax/input/tex/extensions/noerrors.js
7e56ea18fc8067a81687d9f692143648 *inst/doc/mathjax/input/tex/extensions/noundefined.js
3c11ec2425fadaf86a1bdbf60a9fd373 *inst/doc/mathjax/input/tex/extensions/physics.js
8eb57219899460d32e2773d10649e721 *inst/doc/mathjax/input/tex/extensions/require.js
8749f065bfd9185bda2832610862e2f9 *inst/doc/mathjax/input/tex/extensions/setoptions.js
5853fcef7afc77997bf50626e3f7369c *inst/doc/mathjax/input/tex/extensions/tagformat.js
86411fc55282d96f16f90894ee31b3dc *inst/doc/mathjax/input/tex/extensions/texhtml.js
d43342f59362aa1c6b0d2c4db575cc66 *inst/doc/mathjax/input/tex/extensions/textcomp.js
6c6b476a42c64ad6743bb618ab177e5a *inst/doc/mathjax/input/tex/extensions/textmacros.js
d88dd41a1a9012e428854e098d09c342 *inst/doc/mathjax/input/tex/extensions/unicode.js
ae82a229f0b82a6934ff3c9f4cd30f15 *inst/doc/mathjax/input/tex/extensions/units.js
72dd18f3b1ff7d9f6e1291ce3aae97f8 *inst/doc/mathjax/input/tex/extensions/upgreek.js
7a46aa73558bf688d966e561e34826f8 *inst/doc/mathjax/input/tex/extensions/verb.js
75cf222dfafbf5ef367833453953e44a *inst/doc/mathjax/output/chtml.js
dbd114281503cca5cbca3d85cbf5823e *inst/doc/mathjax/tex-chtml.js
ec9eb0798e9fdbb9ef8efd6186dbe45f *man/macros/mathjax.Rd
e545ff9daef50b9c0da5c801b1beedbc *man/mathjaxr-package.Rd
21df09151e141088a06489f25ce0271a *man/preview_rd.Rd
mathjaxr/R/ 0000755 0001762 0000144 00000000000 13657037177 012311 5 ustar ligges users mathjaxr/R/preview_rd.r 0000644 0001762 0000144 00000016444 14207131663 014636 0 ustar ligges users preview_rd <- function(Rdfile, view = TRUE, type = "html", verbose = FALSE, dark = FALSE, ...) {
if (missing(Rdfile))
stop("Must specify the 'Rdfile' argument.")
type <- match.arg(type, c("html", "txt", "text", "pdf"))
if (type == "text")
type <- "txt"
ddd <- list(...)
# need to load MathJax from the CDN since the \mathjaxr macro
# won't be able to load MathJax from the local installation
mjcdn <- Sys.getenv("MATHJAXR_USECDN")
on.exit(Sys.setenv(MATHJAXR_USECDN = mjcdn))
Sys.setenv(MATHJAXR_USECDN = "TRUE")
# temporarily set working dir to location of Rdfile
wd <- getwd()
dn <- dirname(Rdfile)
setwd(dn)
on.exit(setwd(wd), add=TRUE)
# strip path from Rdfile
Rdfile <- basename(Rdfile)
# list all .Rd and .rd files in the current dir
Rdfiles <- list.files(pattern = ".*\\.Rd$")
rdfiles <- list.files(pattern = ".*\\.rd$")
# do the same for all files in the man subdir
Rdfiles.man <- list.files(path = "man", pattern = ".*\\.Rd$")
rdfiles.man <- list.files(path = "man", pattern = ".*\\.rd$")
# check if Rdfile has an .Rd or .rd extension
noext <- !is.element(substr(Rdfile, nchar(Rdfile)-2, nchar(Rdfile)), c(".Rd", ".rd"))
# try to find the Rdfile first in the man subdir and then in the current dir
if (paste0(Rdfile, ifelse(noext, ".Rd", "")) %in% Rdfiles.man) {
Rdfile.loc <- paste0("man/", Rdfile, ifelse(noext, ".Rd", ""))
} else if (paste0(Rdfile, ifelse(noext, ".rd", "")) %in% rdfiles.man) {
Rdfile.loc <- paste0("man/", Rdfile, ifelse(noext, ".rd", ""))
} else if (paste0(Rdfile, ifelse(noext, ".Rd", "")) %in% Rdfiles) {
Rdfile.loc <- paste0(Rdfile, ifelse(noext, ".Rd", ""))
} else if (paste0(Rdfile, ifelse(noext, ".rd", "")) %in% rdfiles) {
Rdfile.loc <- paste0(Rdfile, ifelse(noext, ".rd", ""))
} else {
stop(paste0("Cannot find the specified Rd file in the current directory or in the 'man' subdirectory."))
}
if (verbose)
message("Found Rd file: ", Rdfile.loc)
# get environment with the mathjaxr, package, and system macros
macros <- tools::loadPkgRdMacros(system.file(package = "mathjaxr"))
macros <- tools::loadPkgRdMacros(ifelse(basename(getwd()) == "man", "..", "."), macros = macros)
macros <- tools::loadRdMacros(file.path(R.home("share"), "Rd", "macros", "system.Rd"), macros = macros)
# generate name of temp file
tmpdir <- tempdir()
outfile <- paste0(file.path(tmpdir, Rdfile), ".", type)
if (verbose)
message("Creating preview file: ", outfile)
if (type == "html") {
if (.Platform$OS.type == "windows") {
prefix <- "file://"
} else {
prefix <- ""
}
if (!is.null(ddd$css)) {
css <- paste0(prefix, ddd$css)
} else {
if (dark) {
css <- paste0(prefix, system.file("doc/R_dark.css", package = "mathjaxr"))
} else {
css <- paste0(prefix, system.file("html/R.css", package = "mathjaxr"))
}
}
# copy figures to tmpdir if there are any
if (file.exists(paste0(dirname(Rdfile.loc), "/figures"))) {
rdtxt <- readLines(Rdfile.loc, warn = FALSE)
figloc <- grep("\\figure{", rdtxt, fixed = TRUE)
if (length(figloc) > 0L) {
figs <- rdtxt[figloc]
figs <- sapply(strsplit(figs, "\\figure{", fixed = TRUE), function(x) x[2])
figs <- sapply(strsplit(figs, "}", fixed = TRUE), function(x) x[1])
status <- TRUE
if (!file.exists(paste0(tmpdir, "/figures")))
status <- dir.create(paste0(tmpdir, "/figures"), showWarnings = FALSE)
if (status) {
if (verbose)
message("Copying figure(s) to: ", paste0(tmpdir, "/figures"))
file.copy(paste0(dirname(Rdfile.loc), "/figures/", figs), paste0(tmpdir, "/figures"), overwrite = TRUE)
}
}
}
# convert Rd to HTML version
html <- tools::Rd2HTML(Rdfile.loc, out = outfile,
macros = macros, permissive = TRUE, dynamic = TRUE,
stylesheet = css, stages = c("build", "install", "render"))
# use viewer if available (as in RStudio); otherwise use browseURL()
viewer <- getOption("viewer")
if (!is.null(viewer)) {
viewer(html)
} else {
if (view)
utils::browseURL(html)
}
}
if (type == "txt") {
# convert Rd to text version and show file
txt <- tools::Rd2txt(Rdfile.loc, out = outfile,
macros = macros, permissive = TRUE)
if (.Platform$GUI == "RStudio") {
# RStudio tries to use its own pager for file.show(), but this doesn't work so well here
# so we just brute-force the display on the console with readLines() and cat() ... :/
out <- readLines(txt)
for (i in seq_along(out)) {
cat(out[i], "\n")
}
} else {
if (view)
file.show(txt)
}
}
if (type == "pdf") {
pkg <- character(0)
# try to get the package name and RdMacros field from DESCRIPTION
if (file.exists(ifelse(basename(getwd()) == "man", "../DESCRIPTION", "DESCRIPTION"))) {
pkg <- suppressWarnings(try(read.dcf(ifelse(basename(getwd()) == "man", "../DESCRIPTION", "DESCRIPTION"), fields="Package"), silent = TRUE))
RdMacros <- suppressWarnings(try(read.dcf(ifelse(basename(getwd()) == "man", "../DESCRIPTION", "DESCRIPTION"), fields="RdMacros"), silent = TRUE))
if (inherits(pkg, "try-error") || is.na(pkg[1]) || !dir.exists(ifelse(basename(getwd()) == "man", "macros", "man/macros"))) # if there is no man/macros dir, the package has no macros
pkg <- character(0)
if (inherits(RdMacros, "try-error") || is.na(RdMacros[1]))
RdMacros <- character(0)
}
if (length(RdMacros) > 0L) {
# remove mathjaxr from RdMacros
RdMacros <- trimws(strsplit(RdMacros, ",", fixed = TRUE)[[1]])
RdMacros <- RdMacros[RdMacros != "mathjaxr"]
if (length(RdMacros) > 1L)
RdMacros <- paste0(RdMacros, collapse=",")
if (length(RdMacros) > 0L) {
RdMacros <- paste0("mathjaxr,", RdMacros)
} else {
RdMacros <- "mathjaxr"
}
} else {
RdMacros <- "mathjaxr"
}
if (length(pkg) > 0L)
RdMacros <- paste0(RdMacros, ",", pkg)
#cmd <- paste0("CMD Rd2pdf --no-index --no-description --force --batch --RdMacros=mathjaxr ", ifelse(view, "", "--no-preview"), " --output=", outfile, " ", Rdfile.loc)
#cmd <- paste0("CMD Rd2pdf --no-index --no-description --force --batch --RdMacros=mathjaxr --no-preview --output=", outfile, " ", Rdfile.loc)
cmd <- paste0("CMD Rd2pdf --no-index --no-description --force --batch --RdMacros=", RdMacros, " --no-preview --output=", outfile, " ", Rdfile.loc)
#system2("R", cmd, wait = TRUE, stderr = if (verbose >=2) "" else NULL, stdout = if (verbose >= 2) "" else tempfile("stdout"))
system2("R", cmd, wait = TRUE, stdout = ifelse(verbose >= 2, "", tempfile("stdout")))
if (.Platform$OS.type == "windows") {
shell.exec(outfile)
} else {
optb <- getOption("browser")
if (is.function(optb)) {
invisible(optb(outfile))
} else {
system(paste0(optb, " '", outfile, "'"))
}
}
}
}
mathjaxr/NAMESPACE 0000644 0001762 0000144 00000000023 13657731606 013320 0 ustar ligges users export(preview_rd)
mathjaxr/NEWS.md 0000644 0001762 0000144 00000003467 15113313655 013203 0 ustar ligges users # mathjaxr 2.0-0 (2025-12-01)
* updated MathJax to version 4.0.0
* removed option to minify the MathJax code via the `js` package (does not work with the current version of MathJax)
* updated instructions for how to handle the less- and greater-than symbols
# mathjaxr 1.8-0 (2025-04-30)
* rebuilt for CRAN due to missing 'build/stage23.rdb' file
# mathjaxr 1.6-0 (2022-02-28)
* upgraded MathJax version to 3.2.0
* updated instructions for making use of the package
* fixed issue with `\mjeqn` coming first in a paragraph (issue #11)
* `preview_rd()` now shows links to local help pages (although they are non-functional) and displays figures (if there are any)
# mathjaxr 1.4-0 (2021-03-01)
* fixed issue with minifying the javascript files upon installation under Windows
* `preview_rd()` now loads package macros
# mathjaxr 1.2-0 (2021-01-30)
* upgraded MathJax version to 3.1.2
* MathJax is now bundled with non-minified javascript files; upon installation from the source package, the javascript files are minified if the `js` package is available
* `preview_rd()` now tries to load any package-specific macros before rendering a help page
* `preview_rd()` gains a `dark` argument (for the option to render HTML pages in dark mode)
# mathjaxr 1.0-1 (2020-06-25)
* added `\mjteqn` and `\mjtdeqn` macros (triple-argument versions)
* added `preview_rd()` function
* environment variable `MATHJAXR_CDN` can now be used to specify an alternative URL for a CDN
* changed name of environment variable from `MATHJAXR.USECDN` to `MATHJAXR_USECDN`
* expanded information provided under 'Issues'
# mathjaxr 0.8-3 (2020-05-08)
* first version released on CRAN
* simplified `ifelse` logic for the `\mjeqn` and `\mjdeqn` macros
* added `\mjseqn` and `\mjsdeqn` macros (single-argument versions)
# mathjaxr 0.8-0 (2020-05-03)
* first version
mathjaxr/inst/ 0000755 0001762 0000144 00000000000 14005023477 013047 5 ustar ligges users mathjaxr/inst/doc/ 0000755 0001762 0000144 00000000000 15113252540 013610 5 ustar ligges users mathjaxr/inst/doc/mathjax/ 0000755 0001762 0000144 00000000000 15112365612 015250 5 ustar ligges users mathjaxr/inst/doc/mathjax/a11y/ 0000755 0001762 0000144 00000000000 15112352605 016021 5 ustar ligges users mathjaxr/inst/doc/mathjax/a11y/complexity.js 0000644 0001762 0000144 00000067570 15112352577 020603 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./components/mjs/a11y/semantic-enrich/lib/a11y/semantic-enrich.js
var semantic_enrich_namespaceObject = {};
__webpack_require__.r(semantic_enrich_namespaceObject);
__webpack_require__.d(semantic_enrich_namespaceObject, {
EnrichHandler: () => (EnrichHandler),
EnrichedMathDocumentMixin: () => (EnrichedMathDocumentMixin),
EnrichedMathItemMixin: () => (EnrichedMathItemMixin),
enrichVisitor: () => (enrichVisitor)
});
// NAMESPACE OBJECT: ./mjs/a11y/complexity/collapse.js
var collapse_namespaceObject = {};
__webpack_require__.r(collapse_namespaceObject);
__webpack_require__.d(collapse_namespaceObject, {
Collapse: () => (Collapse)
});
// NAMESPACE OBJECT: ./mjs/a11y/complexity/visitor.js
var visitor_namespaceObject = {};
__webpack_require__.r(visitor_namespaceObject);
__webpack_require__.d(visitor_namespaceObject, {
ComplexityVisitor: () => (ComplexityVisitor)
});
// NAMESPACE OBJECT: ./mjs/a11y/complexity.js
var complexity_namespaceObject = {};
__webpack_require__.r(complexity_namespaceObject);
__webpack_require__.d(complexity_namespaceObject, {
ComplexityHandler: () => (ComplexityHandler),
ComplexityMathDocumentMixin: () => (ComplexityMathDocumentMixin),
ComplexityMathItemMixin: () => (ComplexityMathItemMixin)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/core/lib/core/MathItem.js
const MathItem_def = MathJax._.core.MathItem;
const protoItem = MathItem_def.protoItem;
const AbstractMathItem = MathItem_def.AbstractMathItem;
const STATE = MathItem_def.STATE;
const newState = MathItem_def.newState;
;// ./components/mjs/a11y/semantic-enrich/lib/a11y/semantic-enrich.js
const semantic_enrich_def = MathJax._.a11y['semantic-enrich'];
const enrichVisitor = semantic_enrich_def.enrichVisitor;
const EnrichedMathItemMixin = semantic_enrich_def.EnrichedMathItemMixin;
const EnrichedMathDocumentMixin = semantic_enrich_def.EnrichedMathDocumentMixin;
const EnrichHandler = semantic_enrich_def.EnrichHandler;
;// ./components/mjs/core/lib/core/MmlTree/MmlVisitor.js
const MmlVisitor_def = MathJax._.core.MmlTree.MmlVisitor;
const DATAMJX = MmlVisitor_def.DATAMJX;
const MmlVisitor = MmlVisitor_def.MmlVisitor;
;// ./mjs/a11y/complexity/collapse.js
class Collapse {
constructor(visitor) {
this.cutoff = {
identifier: 3,
number: 3,
text: 10,
infixop: 15,
relseq: 15,
multirel: 15,
fenced: 18,
bigop: 20,
integral: 20,
fraction: 12,
sqrt: 9,
root: 12,
vector: 15,
matrix: 15,
cases: 15,
superscript: 9,
subscript: 9,
subsup: 9,
punctuated: {
endpunct: Collapse.NOCOLLAPSE,
startpunct: Collapse.NOCOLLAPSE,
value: 12,
},
};
this.marker = {
identifier: 'x',
number: '#',
text: '...',
appl: {
'limit function': 'lim',
value: 'f()',
},
fraction: '/',
sqrt: '\u221A',
root: '\u221A',
superscript: '\u25FD\u02D9',
subscript: '\u25FD.',
subsup: '\u25FD:',
vector: {
binomial: '(:)',
determinant: '|:|',
value: '\u27E8:\u27E9',
},
matrix: {
squarematrix: '[::]',
rowvector: '\u27E8\u22EF\u27E9',
columnvector: '\u27E8\u22EE\u27E9',
determinant: '|::|',
value: '(::)',
},
cases: '{:',
infixop: {
addition: '+',
subtraction: '\u2212',
multiplication: '\u22C5',
implicit: '\u22C5',
value: '+',
},
punctuated: {
text: '...',
value: ',',
},
};
this.collapse = new Map([
[
'fenced',
(node, complexity) => {
complexity = this.uncollapseChild(complexity, node, 1);
if (complexity > this.cutoff.fenced &&
node.attributes.get('data-semantic-role') === 'leftright') {
complexity = this.recordCollapse(node, complexity, this.getText(node.childNodes[0]) +
this.getText(node.childNodes[node.childNodes.length - 1]));
}
return complexity;
},
],
[
'appl',
(node, complexity) => {
if (this.canUncollapse(node, 2, 2)) {
complexity = this.complexity.visitNode(node, false);
const marker = this.marker.appl;
const text = marker[node.attributes.get('data-semantic-role')] ||
marker.value;
complexity = this.recordCollapse(node, complexity, text);
}
return complexity;
},
],
[
'sqrt',
(node, complexity) => {
complexity = this.uncollapseChild(complexity, node, 0);
if (complexity > this.cutoff.sqrt) {
node.setProperty('collapse-variant', true);
complexity = this.recordCollapse(node, complexity, this.marker.sqrt);
}
return complexity;
},
],
[
'root',
(node, complexity) => {
complexity = this.uncollapseChild(complexity, node, 0, 2);
if (complexity > this.cutoff.sqrt) {
node.setProperty('collapse-variant', true);
complexity = this.recordCollapse(node, complexity, this.marker.sqrt);
}
return complexity;
},
],
[
'enclose',
(node, complexity) => {
if (this.splitAttribute(node, 'children').length === 1) {
const child = this.canUncollapse(node, 1);
if (child) {
const marker = child.getProperty('collapse-marker');
this.unrecordCollapse(child);
complexity = this.recordCollapse(node, this.complexity.visitNode(node, false), marker);
}
}
return complexity;
},
],
[
'bigop',
(node, complexity) => {
if (complexity > this.cutoff.bigop || !node.isKind('mo')) {
const id = this.splitAttribute(node, 'content').pop();
const op = this.findChildText(node, id);
complexity = this.recordCollapse(node, complexity, op);
}
return complexity;
},
],
[
'integral',
(node, complexity) => {
if (complexity > this.cutoff.integral ||
!node.isKind('mo')) {
const id = this.splitAttribute(node, 'content').pop();
const op = this.findChildText(node, id);
complexity = this.recordCollapse(node, complexity, op);
}
return complexity;
},
],
[
'relseq',
(node, complexity) => {
if (complexity > this.cutoff.relseq) {
const id = this.splitAttribute(node, 'content')[0];
const text = this.findChildText(node, id);
complexity = this.recordCollapse(node, complexity, text);
}
return complexity;
},
],
[
'multirel',
(node, complexity) => {
if (complexity > this.cutoff.relseq) {
const id = this.splitAttribute(node, 'content')[0];
const text = this.findChildText(node, id) + '\u22EF';
complexity = this.recordCollapse(node, complexity, text);
}
return complexity;
},
],
[
'superscript',
(node, complexity) => {
complexity = this.uncollapseChild(complexity, node, 0, 2);
if (complexity > this.cutoff.superscript) {
complexity = this.recordCollapse(node, complexity, this.marker.superscript);
}
return complexity;
},
],
[
'subscript',
(node, complexity) => {
complexity = this.uncollapseChild(complexity, node, 0, 2);
if (complexity > this.cutoff.subscript) {
complexity = this.recordCollapse(node, complexity, this.marker.subscript);
}
return complexity;
},
],
[
'subsup',
(node, complexity) => {
complexity = this.uncollapseChild(complexity, node, 0, 3);
if (complexity > this.cutoff.subsup) {
complexity = this.recordCollapse(node, complexity, this.marker.subsup);
}
return complexity;
},
],
]);
this.idCount = 0;
this.complexity = visitor;
}
check(node, complexity) {
const type = node.attributes.get('data-semantic-type');
if (this.collapse.has(type)) {
return this.collapse.get(type).call(this, node, complexity);
}
if (Object.hasOwn(this.cutoff, type)) {
return this.defaultCheck(node, complexity, type);
}
return complexity;
}
defaultCheck(node, complexity, type) {
const role = node.attributes.get('data-semantic-role');
const check = this.cutoff[type];
const cutoff = typeof check === 'number' ? check : check[role] || check.value;
if (complexity > cutoff) {
const marker = this.marker[type] || '??';
const text = typeof marker === 'string' ? marker : marker[role] || marker.value;
complexity = this.recordCollapse(node, complexity, text);
}
return complexity;
}
recordCollapse(node, complexity, text) {
text = '\u25C2' + text + '\u25B8';
node.setProperty('collapse-marker', text);
node.setProperty('collapse-complexity', complexity);
return text.length * this.complexity.complexity.text;
}
unrecordCollapse(node) {
const complexity = node.getProperty('collapse-complexity');
if (complexity != null) {
node.attributes.set('data-semantic-complexity', complexity);
node.removeProperty('collapse-complexity');
node.removeProperty('collapse-marker');
}
}
canUncollapse(node, n, m = 1) {
if (this.splitAttribute(node, 'children').length === m) {
const mml = node.childNodes.length === 1 && node.childNodes[0].isInferred
? node.childNodes[0]
: node;
if (mml && mml.childNodes[n]) {
const child = mml.childNodes[n];
if (child.getProperty('collapse-marker')) {
return child;
}
}
}
return null;
}
uncollapseChild(complexity, node, n, m = 1) {
const child = this.canUncollapse(node, n, m);
if (child) {
this.unrecordCollapse(child);
if (child.parent !== node) {
child.parent.attributes.set('data-semantic-complexity', undefined);
}
complexity = this.complexity.visitNode(node, false);
}
return complexity;
}
splitAttribute(node, id) {
return (node.attributes.get('data-semantic-' + id) || '').split(/,/);
}
getText(node) {
if (node.isToken)
return node.getText();
return node.childNodes.map((n) => this.getText(n)).join('');
}
findChildText(node, id) {
const child = this.findChild(node, id);
return this.getText(child.coreMO() || child);
}
findChild(node, id) {
if (!node || node.attributes.get('data-semantic-id') === id)
return node;
if (!node.isToken) {
for (const mml of node.childNodes) {
const child = this.findChild(mml, id);
if (child)
return child;
}
}
return null;
}
makeCollapse(node, id) {
let oldCount = null;
if (id === null) {
id = this.idCount;
}
else {
oldCount = this.idCount;
this.idCount = id;
}
const nodes = [];
node.walkTree((child) => {
if (child.getProperty('collapse-marker')) {
nodes.push(child);
}
});
this.makeActions(nodes);
if (oldCount !== null) {
this.idCount = oldCount;
}
return id;
}
makeActions(nodes) {
for (const node of nodes) {
this.makeAction(node);
}
}
makeId() {
return 'mjx-collapse-' + this.idCount++;
}
makeAction(node) {
if (node.isKind('math')) {
node = this.addMrow(node);
}
const factory = this.complexity.factory;
const marker = node.getProperty('collapse-marker');
const parent = node.parent;
const variant = node.getProperty('collapse-variant')
? { mathvariant: '-tex-variant' }
: {};
const maction = factory.create('maction', {
actiontype: 'toggle',
selection: 2,
'data-collapsible': true,
id: this.makeId(),
'data-semantic-complexity': node.attributes.get('data-semantic-complexity'),
}, [
factory.create('mtext', Object.assign({ mathcolor: 'blue' }, variant), [
factory.create('text').setText(marker),
]),
]);
maction.inheritAttributesFrom(node);
node.attributes.set('data-semantic-complexity', node.getProperty('collapse-complexity'));
node.removeProperty('collapse-marker');
node.removeProperty('collapse-complexity');
parent.replaceChild(maction, node);
maction.appendChild(node);
}
addMrow(node) {
const mrow = this.complexity.factory.create('mrow', null, node.childNodes[0].childNodes);
node.childNodes[0].setChildren([mrow]);
const attributes = node.attributes.getAllAttributes();
for (const name of Object.keys(attributes)) {
if (name.substring(0, 14) === 'data-semantic-' ||
name.substring(0, 12) === 'data-speech-' ||
name.substring(0, 5) === 'aria-' ||
name === 'role') {
mrow.attributes.set(name, attributes[name]);
delete attributes[name];
}
}
mrow.setProperty('collapse-marker', node.getProperty('collapse-marker'));
mrow.setProperty('collapse-complexity', node.getProperty('collapse-complexity'));
node.removeProperty('collapse-marker');
node.removeProperty('collapse-complexity');
return mrow;
}
}
Collapse.NOCOLLAPSE = 10000000;
//# sourceMappingURL=collapse.js.map
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./mjs/a11y/complexity/visitor.js
class ComplexityVisitor extends MmlVisitor {
constructor(factory, options) {
super(factory);
this.complexity = {
text: .5,
token: .5,
child: 1,
script: .8,
sqrt: 2,
subsup: 2,
underover: 2,
fraction: 2,
enclose: 2,
action: 2,
phantom: 0,
xml: 2,
glyph: 2
};
const CLASS = this.constructor;
this.options = userOptions(defaultOptions({}, CLASS.OPTIONS), options);
this.collapse = new this.options.Collapse(this);
this.factory = factory;
}
visitTree(node, id) {
super.visitTree(node, true);
if (this.options.makeCollapsible) {
id = this.collapse.makeCollapse(node, id);
}
return id;
}
visitNode(node, save) {
if (node.attributes.get('data-semantic-complexity'))
return;
return super.visitNode(node, save);
}
visitDefault(node, save) {
let complexity;
if (node.isToken) {
const text = node.getText();
complexity = this.complexity.text * text.length + this.complexity.token;
}
else {
complexity = this.childrenComplexity(node);
}
return this.setComplexity(node, complexity, save);
}
visitMfracNode(node, save) {
const complexity = this.childrenComplexity(node) * this.complexity.script +
this.complexity.fraction;
return this.setComplexity(node, complexity, save);
}
visitMsqrtNode(node, save) {
const complexity = this.childrenComplexity(node) + this.complexity.sqrt;
return this.setComplexity(node, complexity, save);
}
visitMrootNode(node, save) {
const complexity = this.childrenComplexity(node) +
this.complexity.sqrt -
(1 - this.complexity.script) * this.getComplexity(node.childNodes[1]);
return this.setComplexity(node, complexity, save);
}
visitMphantomNode(node, save) {
return this.setComplexity(node, this.complexity.phantom, save);
}
visitMsNode(node, save) {
const text = node.attributes.get('lquote') +
node.getText() +
node.attributes.get('rquote');
const complexity = text.length * this.complexity.text;
return this.setComplexity(node, complexity, save);
}
visitMsubsupNode(node, save) {
super.visitDefault(node, true);
const sub = node.childNodes[node.sub];
const sup = node.childNodes[node.sup];
const base = node.childNodes[node.base];
let complexity = Math.max(sub ? this.getComplexity(sub) : 0, sup ? this.getComplexity(sup) : 0) * this.complexity.script;
complexity += this.complexity.child * ((sub ? 1 : 0) + (sup ? 1 : 0));
complexity += base ? this.getComplexity(base) + this.complexity.child : 0;
complexity += this.complexity.subsup;
return this.setComplexity(node, complexity, save);
}
visitMsubNode(node, save) {
return this.visitMsubsupNode(node, save);
}
visitMsupNode(node, save) {
return this.visitMsubsupNode(node, save);
}
visitMunderoverNode(node, save) {
super.visitDefault(node, true);
const under = node.childNodes[node.under];
const over = node.childNodes[node.over];
const base = node.childNodes[node.base];
let complexity = Math.max(under ? this.getComplexity(under) : 0, over ? this.getComplexity(over) : 0) * this.complexity.script;
if (base) {
complexity = Math.max(this.getComplexity(base), complexity);
}
complexity +=
this.complexity.child *
((under ? 1 : 0) + (over ? 1 : 0) + (base ? 1 : 0));
complexity += this.complexity.underover;
return this.setComplexity(node, complexity, save);
}
visitMunderNode(node, save) {
return this.visitMunderoverNode(node, save);
}
visitMoverNode(node, save) {
return this.visitMunderoverNode(node, save);
}
visitMencloseNode(node, save) {
const complexity = this.childrenComplexity(node) + this.complexity.enclose;
return this.setComplexity(node, complexity, save);
}
visitMactionNode(node, save) {
this.childrenComplexity(node);
const complexity = this.getComplexity(node.selected);
return this.setComplexity(node, complexity, save);
}
visitMsemanticsNode(node, save) {
const child = node.childNodes[0];
let complexity = 0;
if (child) {
this.visitNode(child, true);
complexity = this.getComplexity(child);
}
return this.setComplexity(node, complexity, save);
}
visitAnnotationNode(node, save) {
return this.setComplexity(node, this.complexity.xml, save);
}
visitAnnotation_xmlNode(node, save) {
return this.setComplexity(node, this.complexity.xml, save);
}
visitMglyphNode(node, save) {
return this.setComplexity(node, this.complexity.glyph, save);
}
getComplexity(node) {
const collapsed = node.getProperty('collapsedComplexity');
return (collapsed != null
? collapsed
: node.attributes.get('data-semantic-complexity'));
}
setComplexity(node, complexity, save) {
if (save) {
if (this.options.identifyCollapsible) {
complexity = this.collapse.check(node, complexity);
}
node.attributes.set('data-semantic-complexity', complexity);
}
return complexity;
}
childrenComplexity(node) {
super.visitDefault(node, true);
let complexity = 0;
for (const child of node.childNodes) {
complexity += this.getComplexity(child);
}
if (node.childNodes.length > 1) {
complexity += node.childNodes.length * this.complexity.child;
}
return complexity;
}
}
ComplexityVisitor.OPTIONS = {
identifyCollapsible: true,
makeCollapsible: true,
Collapse: Collapse
};
//# sourceMappingURL=visitor.js.map
;// ./mjs/a11y/complexity.js
newState('COMPLEXITY', 40);
function ComplexityMathItemMixin(BaseMathItem, computeComplexity) {
return class extends BaseMathItem {
constructor() {
super(...arguments);
this.initialID = null;
}
complexity(document, force = false) {
if (this.state() >= STATE.COMPLEXITY)
return;
if (!this.isEscaped && (document.options.enableComplexity || force)) {
this.enrich(document, true);
computeComplexity(this);
}
this.state(STATE.COMPLEXITY);
}
};
}
function ComplexityMathDocumentMixin(BaseDocument) {
var _a;
return _a = class extends BaseDocument {
constructor(...args) {
super(...args);
const ProcessBits = this.constructor.ProcessBits;
if (!ProcessBits.has('complexity')) {
ProcessBits.allocate('complexity');
}
const visitorOptions = selectOptionsFromKeys(this.options, this.options.ComplexityVisitor.OPTIONS);
this.complexityVisitor = new this.options.ComplexityVisitor(this.mmlFactory, visitorOptions);
const computeComplexity = (math) => {
math.initialID = this.complexityVisitor.visitTree(math.root, math.initialID);
};
this.options.MathItem = ComplexityMathItemMixin(this.options.MathItem, computeComplexity);
}
complexity() {
if (!this.processed.isSet('complexity')) {
if (this.options.enableComplexity) {
for (const math of this.math) {
math.complexity(this);
}
}
this.processed.set('complexity');
}
return this;
}
state(state, restore = false) {
super.state(state, restore);
if (state < STATE.COMPLEXITY) {
this.processed.clear('complexity');
}
return this;
}
},
_a.OPTIONS = Object.assign(Object.assign(Object.assign({}, BaseDocument.OPTIONS), ComplexityVisitor.OPTIONS), { enableComplexity: true, ComplexityVisitor: ComplexityVisitor, renderActions: expandable(Object.assign(Object.assign({}, BaseDocument.OPTIONS.renderActions), { complexity: [STATE.COMPLEXITY] })) }),
_a;
}
function ComplexityHandler(handler, MmlJax = null) {
if (!handler.documentClass.prototype.enrich && MmlJax) {
handler = EnrichHandler(handler, MmlJax);
}
handler.documentClass = ComplexityMathDocumentMixin(handler.documentClass);
return handler;
}
//# sourceMappingURL=complexity.js.map
;// ./components/mjs/a11y/complexity/lib/complexity.js
if (MathJax.loader) {
MathJax.loader.checkVersion('a11y/complexity', VERSION, 'a11y');
}
combineWithMathJax({_: {
a11y: {
complexity_ts: complexity_namespaceObject,
complexity: {
collapse: collapse_namespaceObject,
visitor: visitor_namespaceObject
},
"semantic-enrich": semantic_enrich_namespaceObject
}
}});
;// ./components/mjs/a11y/complexity/complexity.js
if (MathJax.startup) {
MathJax.startup.extendHandler(handler => ComplexityHandler(handler));
combineDefaults(MathJax.config, 'options', MathJax.config['a11y/complexity'] || {});
}
/******/ })()
; mathjaxr/inst/doc/mathjax/a11y/semantic-enrich.js 0000644 0001762 0000144 00000026201 15112352602 021426 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/a11y/semantic-enrich.js
var semantic_enrich_namespaceObject = {};
__webpack_require__.r(semantic_enrich_namespaceObject);
__webpack_require__.d(semantic_enrich_namespaceObject, {
EnrichHandler: () => (EnrichHandler),
EnrichedMathDocumentMixin: () => (EnrichedMathDocumentMixin),
EnrichedMathItemMixin: () => (EnrichedMathItemMixin),
enrichVisitor: () => (enrichVisitor)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/core/lib/core/MathItem.js
const MathItem_def = MathJax._.core.MathItem;
const protoItem = MathItem_def.protoItem;
const AbstractMathItem = MathItem_def.AbstractMathItem;
const STATE = MathItem_def.STATE;
const newState = MathItem_def.newState;
;// ./components/mjs/core/lib/core/MmlTree/SerializedMmlVisitor.js
const SerializedMmlVisitor_def = MathJax._.core.MmlTree.SerializedMmlVisitor;
const SerializedMmlVisitor = SerializedMmlVisitor_def.SerializedMmlVisitor;
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./components/mjs/a11y/sre/lib/a11y/sre.js
const sre_def = MathJax._.a11y.sre_ts;
const locales = sre_def.locales;
const setupEngine = sre_def.setupEngine;
const engineSetup = sre_def.engineSetup;
const toEnriched = sre_def.toEnriched;
const parseDOM = sre_def.parseDOM;
const addPreference = sre_def.addPreference;
const fromPreference = sre_def.fromPreference;
const toPreference = sre_def.toPreference;
;// ./mjs/a11y/semantic-enrich.js
newState('ENRICHED', STATE.COMPILED + 10);
class enrichVisitor extends SerializedMmlVisitor {
visitTree(node, math) {
this.mactionId = 0;
const mml = super.visitTree(node);
if (this.mactionId) {
math.inputData.hasMaction = true;
}
return mml;
}
visitHtmlNode(node, _space) {
return node.getSerializedXML();
}
visitMactionNode(node, space) {
const [nl, endspace] = node.childNodes.length === 0 ? ['', ''] : ['\n', space];
const children = this.childNodeMml(node, space + ' ', nl);
let attributes = this.getAttributes(node);
if (node.attributes.get('actiontype') === 'toggle') {
const id = ++this.mactionId;
node.setProperty('mactionId', id);
attributes =
` data-maction-id="${id}" selection="${node.attributes.get('selection')}"` +
attributes
.replace(/ selection="\d+"/, '')
.replace(/ data-maction-id="\d+"/, '');
}
return (`${space}` +
(children.match(/\S/) ? nl + children + endspace : '') +
' ');
}
}
function EnrichedMathItemMixin(BaseMathItem, MmlJax, toMathML) {
return class extends BaseMathItem {
constructor() {
super(...arguments);
this.toMathML = toMathML;
}
serializeMml(node) {
if ('outerHTML' in node) {
return node.outerHTML;
}
if (typeof Element !== 'undefined' &&
typeof window !== 'undefined' &&
node instanceof Element) {
const div = window.document.createElement('div');
div.appendChild(node);
return div.innerHTML;
}
return node.toString();
}
enrich(document, force = false) {
if (this.state() >= STATE.ENRICHED)
return;
if (!this.isEscaped && (document.options.enableEnrichment || force)) {
const math = new document.options.MathItem('', MmlJax);
try {
let mml;
if (!this.inputData.originalMml) {
mml = this.inputData.originalMml = this.toMathML(this.root, this);
}
else {
mml = this.adjustSelections();
}
const enriched = toEnriched(mml);
this.inputData.enrichedMml = math.math = this.serializeMml(enriched);
math.math = math.math
.replace(/ role="treeitem"/g, ' data-speech-node="true"')
.replace(/ aria-(?:posinset|owns|setsize)=".*?"/g, '');
math.display = this.display;
math.compile(document);
this.root = math.root;
}
catch (err) {
document.options.enrichError(document, this, err);
}
}
this.state(STATE.ENRICHED);
}
toEnriched(mml) {
return this.serializeMml(toEnriched(mml));
}
unEnrich(document) {
const mml = this.inputData.originalMml;
if (!mml)
return;
const math = new document.options.MathItem('', MmlJax);
math.math = mml;
math.display = this.display;
math.compile(document);
this.root = math.root;
}
adjustSelections() {
const mml = this.inputData.originalMml;
if (!this.inputData.hasMaction)
return mml;
const maction = [];
this.root.walkTree((node) => {
if (node.isKind('maction')) {
maction[node.attributes.get('data-maction-id')] = node;
}
});
return mml.replace(/(data-maction-id="(\d+)" selection=)"\d+"/g, (_match, prefix, id) => `${prefix}"${maction[id].attributes.get('selection')}"`);
}
};
}
function EnrichedMathDocumentMixin(BaseDocument, MmlJax) {
var _a;
return _a = class extends BaseDocument {
constructor(...args) {
super(...args);
MmlJax.setMmlFactory(this.mmlFactory);
const ProcessBits = this.constructor
.ProcessBits;
if (!ProcessBits.has('enriched')) {
ProcessBits.allocate('enriched');
}
const visitor = new enrichVisitor(this.mmlFactory);
const toMathML = (node, math) => visitor.visitTree(node, math);
this.options.MathItem = EnrichedMathItemMixin(this.options.MathItem, MmlJax, toMathML);
}
enrich() {
if (!this.processed.isSet('enriched')) {
if (this.options.enableEnrichment) {
setupEngine(this.options.sre);
for (const math of this.math) {
math.enrich(this);
}
}
this.processed.set('enriched');
}
return this;
}
enrichError(_doc, _math, err) {
console.warn('Enrichment error:', err);
}
state(state, restore = false) {
super.state(state, restore);
if (state < STATE.ENRICHED) {
this.processed.clear('enriched');
if (state >= STATE.COMPILED) {
for (const item of this.math) {
item.unEnrich(this);
}
}
}
return this;
}
},
_a.OPTIONS = Object.assign(Object.assign({}, BaseDocument.OPTIONS), { enableEnrichment: true, enrichError: (doc, math, err) => doc.enrichError(doc, math, err), renderActions: expandable(Object.assign(Object.assign({}, BaseDocument.OPTIONS.renderActions), { enrich: [STATE.ENRICHED] })), sre: expandable({
speech: 'none',
locale: 'en',
domain: 'clearspeak',
style: 'default',
braille: 'nemeth',
structure: true,
aria: true,
}) }),
_a;
}
function EnrichHandler(handler, MmlJax) {
MmlJax.setAdaptor(handler.adaptor);
handler.documentClass = EnrichedMathDocumentMixin(handler.documentClass, MmlJax);
return handler;
}
//# sourceMappingURL=semantic-enrich.js.map
;// ./components/mjs/a11y/semantic-enrich/lib/semantic-enrich.js
if (MathJax.loader) {
MathJax.loader.checkVersion('a11y/semantic-enrich', VERSION, 'a11y');
}
combineWithMathJax({_: {
a11y: {
"semantic-enrich": semantic_enrich_namespaceObject
}
}});
;// ./components/mjs/input/mml/lib/input/mathml.js
const mathml_def = MathJax._.input.mathml_ts;
const MathML = mathml_def.MathML;
;// ./components/mjs/a11y/semantic-enrich/semantic-enrich.js
if (MathJax.startup) {
MathJax.startup.extendHandler(
handler => EnrichHandler(handler, new MathML({allowHtmlInTokenNodes: true}))
);
}
/******/ })()
; mathjaxr/inst/doc/mathjax/a11y/explorer.js 0000644 0001762 0000144 00000260052 15112352601 020220 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/a11y/explorer/Highlighter.js
var Highlighter_namespaceObject = {};
__webpack_require__.r(Highlighter_namespaceObject);
__webpack_require__.d(Highlighter_namespaceObject, {
getHighlighter: () => (getHighlighter)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/Region.js
var Region_namespaceObject = {};
__webpack_require__.r(Region_namespaceObject);
__webpack_require__.d(Region_namespaceObject, {
AbstractRegion: () => (AbstractRegion),
DummyRegion: () => (DummyRegion),
HoverRegion: () => (HoverRegion),
LiveRegion: () => (LiveRegion),
SpeechRegion: () => (SpeechRegion),
StringRegion: () => (StringRegion),
ToolTip: () => (ToolTip)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/Explorer.js
var Explorer_namespaceObject = {};
__webpack_require__.r(Explorer_namespaceObject);
__webpack_require__.d(Explorer_namespaceObject, {
AbstractExplorer: () => (AbstractExplorer)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/KeyExplorer.js
var KeyExplorer_namespaceObject = {};
__webpack_require__.r(KeyExplorer_namespaceObject);
__webpack_require__.d(KeyExplorer_namespaceObject, {
SpeechExplorer: () => (SpeechExplorer),
hasModifiers: () => (hasModifiers),
isContainer: () => (isContainer)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/MouseExplorer.js
var MouseExplorer_namespaceObject = {};
__webpack_require__.r(MouseExplorer_namespaceObject);
__webpack_require__.d(MouseExplorer_namespaceObject, {
AbstractMouseExplorer: () => (AbstractMouseExplorer),
ContentHoverer: () => (ContentHoverer),
FlameHoverer: () => (FlameHoverer),
Hoverer: () => (Hoverer),
ValueHoverer: () => (ValueHoverer)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/TreeExplorer.js
var TreeExplorer_namespaceObject = {};
__webpack_require__.r(TreeExplorer_namespaceObject);
__webpack_require__.d(TreeExplorer_namespaceObject, {
AbstractTreeExplorer: () => (AbstractTreeExplorer),
ContrastPicker: () => (ContrastPicker),
FlameColorer: () => (FlameColorer),
TreeColorer: () => (TreeColorer)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/ExplorerPool.js
var ExplorerPool_namespaceObject = {};
__webpack_require__.r(ExplorerPool_namespaceObject);
__webpack_require__.d(ExplorerPool_namespaceObject, {
ExplorerPool: () => (ExplorerPool),
RegionPool: () => (RegionPool)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer.js
var explorer_namespaceObject = {};
__webpack_require__.r(explorer_namespaceObject);
__webpack_require__.d(explorer_namespaceObject, {
ExplorerHandler: () => (ExplorerHandler),
ExplorerMathDocumentMixin: () => (ExplorerMathDocumentMixin),
ExplorerMathItemMixin: () => (ExplorerMathItemMixin),
setA11yOption: () => (setA11yOption),
setA11yOptions: () => (setA11yOptions)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/core/lib/core/MathItem.js
const MathItem_def = MathJax._.core.MathItem;
const protoItem = MathItem_def.protoItem;
const AbstractMathItem = MathItem_def.AbstractMathItem;
const STATE = MathItem_def.STATE;
const newState = MathItem_def.newState;
;// ./components/mjs/a11y/speech/lib/a11y/speech.js
const speech_def = MathJax._.a11y.speech_ts;
const SpeechMathItemMixin = speech_def.SpeechMathItemMixin;
const SpeechMathDocumentMixin = speech_def.SpeechMathDocumentMixin;
const SpeechHandler = speech_def.SpeechHandler;
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./components/mjs/core/lib/core/MmlTree/SerializedMmlVisitor.js
const SerializedMmlVisitor_def = MathJax._.core.MmlTree.SerializedMmlVisitor;
const SerializedMmlVisitor = SerializedMmlVisitor_def.SerializedMmlVisitor;
;// ./components/mjs/core/lib/util/context.js
const context_def = MathJax._.util.context;
const hasWindow = context_def.hasWindow;
const context = context_def.context;
;// ./components/mjs/core/lib/util/StyleJson.js
const StyleJson_def = MathJax._.util.StyleJson;
const StyleJsonSheet = StyleJson_def.StyleJsonSheet;
;// ./mjs/a11y/explorer/Highlighter.js
const namedColors = {
red: { red: 255, green: 0, blue: 0 },
green: { red: 0, green: 255, blue: 0 },
blue: { red: 0, green: 0, blue: 255 },
yellow: { red: 255, green: 255, blue: 0 },
cyan: { red: 0, green: 255, blue: 255 },
magenta: { red: 255, green: 0, blue: 255 },
white: { red: 255, green: 255, blue: 255 },
black: { red: 0, green: 0, blue: 0 },
};
function getColorString(color, deflt) {
var _a;
const channel = namedColors[color.color] || namedColors[deflt.color];
channel.alpha = (_a = color.alpha) !== null && _a !== void 0 ? _a : deflt.alpha;
return rgba(channel);
}
function rgba(color) {
var _a;
return `rgba(${color.red},${color.green},${color.blue},${(_a = color.alpha) !== null && _a !== void 0 ? _a : 1})`;
}
const DEFAULT_BACKGROUND = { color: 'blue', alpha: 1 };
const DEFAULT_FOREGROUND = { color: 'black', alpha: 1 };
let counter = 0;
class AbstractHighlighter {
constructor() {
this.counter = counter++;
this.ATTR = 'sre-highlight-' + this.counter.toString();
this.mactionName = '';
this.currentHighlights = [];
}
highlight(nodes) {
this.currentHighlights.push(nodes.map((node) => {
const info = this.highlightNode(node);
this.setHighlighted(node);
return info;
}));
}
highlightAll(node) {
const mactions = this.getMactionNodes(node);
for (let i = 0, maction; (maction = mactions[i]); i++) {
this.highlight([maction]);
}
}
unhighlight() {
const nodes = this.currentHighlights.pop();
if (!nodes) {
return;
}
nodes.forEach((highlight) => {
if (this.isHighlighted(highlight.node)) {
this.unhighlightNode(highlight);
this.unsetHighlighted(highlight.node);
}
});
}
unhighlightAll() {
while (this.currentHighlights.length > 0) {
this.unhighlight();
}
}
setColor(background, foreground) {
this._foreground = getColorString(foreground, DEFAULT_FOREGROUND);
this._background = getColorString(background, DEFAULT_BACKGROUND);
}
get foreground() {
return this._foreground;
}
get background() {
return this._background;
}
getMactionNodes(node) {
return Array.from(node.getElementsByClassName(this.mactionName));
}
isMactionNode(node) {
const className = node.className || node.getAttribute('class');
return className ? !!className.match(new RegExp(this.mactionName)) : false;
}
isHighlighted(node) {
return node.hasAttribute(this.ATTR);
}
setHighlighted(node) {
node.setAttribute(this.ATTR, 'true');
}
unsetHighlighted(node) {
node.removeAttribute(this.ATTR);
}
}
class SvgHighlighter extends AbstractHighlighter {
constructor() {
super();
this.mactionName = 'maction';
}
highlightNode(node) {
let info;
if (this.isHighlighted(node)) {
info = {
node: node,
background: this.background,
foreground: this.foreground,
};
return info;
}
if (node.tagName === 'svg' || node.tagName === 'MJX-CONTAINER') {
info = {
node: node,
background: node.style.backgroundColor,
foreground: node.style.color,
};
node.style.backgroundColor = this.background;
node.style.color = this.foreground;
return info;
}
const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
rect.setAttribute('sre-highlighter-added', 'true');
const padding = 40;
const bbox = node.getBBox();
rect.setAttribute('x', (bbox.x - padding).toString());
rect.setAttribute('y', (bbox.y - padding).toString());
rect.setAttribute('width', (bbox.width + 2 * padding).toString());
rect.setAttribute('height', (bbox.height + 2 * padding).toString());
const transform = node.getAttribute('transform');
if (transform) {
rect.setAttribute('transform', transform);
}
rect.setAttribute('fill', this.background);
node.setAttribute(this.ATTR, 'true');
node.parentNode.insertBefore(rect, node);
info = { node: node, foreground: node.getAttribute('fill') };
if (node.nodeName !== 'rect') {
node.setAttribute('fill', this.foreground);
}
return info;
}
setHighlighted(node) {
if (node.tagName === 'svg') {
super.setHighlighted(node);
}
}
unhighlightNode(info) {
const previous = info.node.previousSibling;
if (previous && previous.hasAttribute('sre-highlighter-added')) {
info.foreground
? info.node.setAttribute('fill', info.foreground)
: info.node.removeAttribute('fill');
info.node.parentNode.removeChild(previous);
return;
}
info.node.style.backgroundColor = info.background;
info.node.style.color = info.foreground;
}
isMactionNode(node) {
return node.getAttribute('data-mml-node') === this.mactionName;
}
getMactionNodes(node) {
return Array.from(node.querySelectorAll(`[data-mml-node="${this.mactionName}"]`));
}
}
class ChtmlHighlighter extends AbstractHighlighter {
constructor() {
super();
this.mactionName = 'mjx-maction';
}
highlightNode(node) {
const info = {
node: node,
background: node.style.backgroundColor,
foreground: node.style.color,
};
if (!this.isHighlighted(node)) {
node.style.backgroundColor = this.background;
node.style.color = this.foreground;
}
return info;
}
unhighlightNode(info) {
info.node.style.backgroundColor = info.background;
info.node.style.color = info.foreground;
}
isMactionNode(node) {
var _a;
return ((_a = node.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === this.mactionName.toUpperCase();
}
getMactionNodes(node) {
return Array.from(node.getElementsByTagName(this.mactionName));
}
}
function getHighlighter(back, fore, renderer) {
const highlighter = new highlighterMapping[renderer]();
highlighter.setColor(back, fore);
return highlighter;
}
const highlighterMapping = {
SVG: SvgHighlighter,
CHTML: ChtmlHighlighter,
generic: ChtmlHighlighter,
};
//# sourceMappingURL=Highlighter.js.map
;// ./components/mjs/a11y/speech/lib/a11y/speech/SpeechUtil.js
const SpeechUtil_def = MathJax._.a11y.speech.SpeechUtil;
const ssmlParsing = SpeechUtil_def.ssmlParsing;
const buildLabel = SpeechUtil_def.buildLabel;
const buildSpeech = SpeechUtil_def.buildSpeech;
const honk = SpeechUtil_def.honk;
const InPlace = SpeechUtil_def.InPlace;
const SemAttr = SpeechUtil_def.SemAttr;
;// ./mjs/a11y/explorer/Region.js
class AbstractRegion {
constructor(document) {
this.document = document;
this.CLASS = this.constructor;
this.AddStyles();
}
AddStyles() {
if (this.CLASS.styleAdded) {
return;
}
const node = this.document.adaptor.node('style');
node.innerHTML = this.CLASS.style.cssText;
this.document.adaptor
.head(this.document.adaptor.document)
.appendChild(node);
this.CLASS.styleAdded = true;
}
AddElement() {
if (this.div)
return;
const element = this.document.adaptor.node('div');
element.classList.add(this.CLASS.className);
this.div = element;
this.inner = this.document.adaptor.node('div');
this.div.appendChild(this.inner);
this.document.adaptor
.body(this.document.adaptor.document)
.appendChild(this.div);
}
Show(node, highlighter) {
this.AddElement();
this.position(node);
this.highlight(highlighter);
this.div.classList.add(this.CLASS.className + '_Show');
}
Hide() {
if (!this.div)
return;
this.div.parentNode.removeChild(this.div);
this.div = null;
this.inner = null;
}
stackRegions(node) {
const rect = node.getBoundingClientRect();
let baseBottom = 0;
let baseLeft = Number.POSITIVE_INFINITY;
const regions = this.document.adaptor.document.getElementsByClassName(this.CLASS.className + '_Show');
for (let i = 0, region; (region = regions[i]); i++) {
if (region !== this.div) {
baseBottom = Math.max(region.getBoundingClientRect().bottom, baseBottom);
baseLeft = Math.min(region.getBoundingClientRect().left, baseLeft);
}
}
const bot = (baseBottom ? baseBottom : rect.bottom + 10) + window.scrollY;
const left = (baseLeft < Number.POSITIVE_INFINITY ? baseLeft : rect.left) +
window.scrollX;
this.div.style.top = bot + 'px';
this.div.style.left = left + 'px';
}
}
AbstractRegion.styleAdded = false;
class DummyRegion extends AbstractRegion {
Clear() { }
Update() { }
Hide() { }
Show() { }
AddElement() { }
AddStyles() { }
position() { }
highlight(_highlighter) { }
}
class StringRegion extends AbstractRegion {
Clear() {
if (!this.div)
return;
this.Update('');
this.inner.style.top = '';
this.inner.style.backgroundColor = '';
}
Update(speech) {
if (speech) {
this.AddElement();
}
if (this.inner) {
this.inner.textContent = '';
this.inner.textContent = speech || '\u00a0';
}
}
position(node) {
this.stackRegions(node);
}
highlight(highlighter) {
if (!this.div)
return;
this.inner.style.backgroundColor = highlighter.background;
this.inner.style.color = highlighter.foreground;
}
}
class ToolTip extends StringRegion {
}
ToolTip.className = 'MJX_ToolTip';
ToolTip.style = new StyleJsonSheet({
['.' + ToolTip.className]: {
width: 'auto',
height: 'auto',
opacity: 1,
'text-align': 'center',
'border-radius': '4px',
padding: 0,
'border-bottom': '1px dotted black',
position: 'absolute',
display: 'inline-block',
'background-color': 'white',
'z-index': 202,
},
['.' + ToolTip.className + ' > div']: {
'border-radius': 'inherit',
padding: '0 2px',
},
});
class LiveRegion extends StringRegion {
}
LiveRegion.className = 'MJX_LiveRegion';
LiveRegion.style = new StyleJsonSheet({
['.' + LiveRegion.className]: {
position: 'absolute',
top: 0,
display: 'none',
width: 'auto',
height: 'auto',
padding: 0,
opacity: 1,
'z-index': '202',
left: 0,
right: 0,
margin: '0 auto',
'background-color': 'white',
'box-shadow': '0px 5px 20px #888',
border: '2px solid #CCCCCC',
},
['.' + LiveRegion.className + '_Show']: {
display: 'block',
},
});
class SpeechRegion extends LiveRegion {
constructor() {
super(...arguments);
this.active = false;
this.node = null;
this.clear = false;
this.highlighter = getHighlighter({ color: 'red' }, { color: 'black' }, this.document.outputJax.name);
this.voiceRequest = false;
this.voiceCancelled = false;
}
Show(node, highlighter) {
super.Update('\u00a0');
this.node = node;
super.Show(node, highlighter);
}
Update(speech) {
if (this.voiceRequest) {
this.makeVoice(speech);
return;
}
speechSynthesis.onvoiceschanged = (() => (this.voiceRequest = true)).bind(this);
const promise = new Promise((resolve) => {
setTimeout(() => {
if (this.voiceRequest) {
resolve(true);
}
else {
setTimeout(() => {
this.voiceRequest = true;
resolve(true);
}, 100);
}
}, 100);
});
promise.then(() => this.makeVoice(speech));
}
makeVoice(speech) {
this.active =
this.document.options.a11y.voicing &&
!!speechSynthesis.getVoices().length;
speechSynthesis.cancel();
this.clear = true;
const [text, ssml] = buildSpeech(speech, this.document.options.sre.locale, this.document.options.sre.rate);
super.Update(text);
if (this.active && text) {
this.makeUtterances(ssml, this.document.options.sre.locale);
}
}
makeUtterances(ssml, locale) {
this.voiceCancelled = false;
let utterance = null;
for (const utter of ssml) {
if (utter.mark) {
if (!utterance) {
this.highlightNode(utter.mark, true);
continue;
}
utterance.addEventListener('end', (_event) => {
if (!this.voiceCancelled) {
this.highlightNode(utter.mark);
}
});
continue;
}
if (utter.pause) {
const time = parseInt(utter.pause.match(/^[0-9]+/)[0]);
if (isNaN(time) || !utterance) {
continue;
}
utterance.addEventListener('end', (_event) => {
speechSynthesis.pause();
setTimeout(() => {
speechSynthesis.resume();
}, time);
});
continue;
}
utterance = new SpeechSynthesisUtterance(utter.text);
if (utter.rate) {
utterance.rate = utter.rate;
}
if (utter.pitch) {
utterance.pitch = utter.pitch;
}
utterance.lang = locale;
speechSynthesis.speak(utterance);
}
if (utterance) {
utterance.addEventListener('end', (_event) => {
this.highlighter.unhighlight();
});
}
}
Hide() {
this.cancelVoice();
super.Hide();
}
cancelVoice() {
this.voiceCancelled = true;
speechSynthesis.cancel();
this.highlighter.unhighlight();
}
highlightNode(id, init = false) {
this.highlighter.unhighlight();
const nodes = Array.from(this.node.querySelectorAll(`[data-semantic-id="${id}"]`));
if (!this.clear || init) {
this.highlighter.highlight(nodes);
}
this.clear = false;
}
}
class HoverRegion extends AbstractRegion {
position(node) {
const nodeRect = node.getBoundingClientRect();
const divRect = this.div.getBoundingClientRect();
const xCenter = nodeRect.left + nodeRect.width / 2;
let left = xCenter - divRect.width / 2;
left = left < 0 ? 0 : left;
left = left + window.scrollX;
let top;
switch (this.document.options.a11y.align) {
case 'top':
top = nodeRect.top - divRect.height - 10;
break;
case 'bottom':
top = nodeRect.bottom + 10;
break;
case 'center':
default: {
const yCenter = nodeRect.top + nodeRect.height / 2;
top = yCenter - divRect.height / 2;
}
}
top = top + window.scrollY;
top = top < 0 ? 0 : top;
this.div.style.top = top + 'px';
this.div.style.left = left + 'px';
}
highlight(highlighter) {
if (!this.div)
return;
if (this.inner.firstChild &&
!this.inner.firstChild.hasAttribute('sre-highlight')) {
return;
}
this.inner.style.backgroundColor = highlighter.background;
this.inner.style.color = highlighter.foreground;
}
Show(node, highlighter) {
this.AddElement();
this.div.style.fontSize = this.document.options.a11y.magnify;
this.Update(node);
super.Show(node, highlighter);
}
Clear() {
if (!this.div)
return;
this.inner.textContent = '';
this.inner.style.top = '';
this.inner.style.backgroundColor = '';
}
Update(node) {
if (!this.div)
return;
this.Clear();
const mjx = this.cloneNode(node);
const selected = mjx.querySelector('[data-mjx-clone]');
this.inner.style.backgroundColor = node.style.backgroundColor;
selected.style.backgroundColor = '';
selected.classList.remove('mjx-selected');
this.inner.appendChild(mjx);
this.position(node);
}
cloneNode(node) {
let mjx = node.cloneNode(true);
mjx.setAttribute('data-mjx-clone', 'true');
if (mjx.nodeName !== 'MJX-CONTAINER') {
if (mjx.nodeName !== 'g') {
mjx.style.marginLeft = mjx.style.marginRight = '0';
}
let container = node;
while (container && container.nodeName !== 'MJX-CONTAINER') {
container = container.parentNode;
}
if (mjx.nodeName !== 'MJX-MATH' && mjx.nodeName !== 'svg') {
const child = container.firstChild;
mjx = child.cloneNode(false).appendChild(mjx).parentNode;
if (mjx.nodeName === 'svg') {
mjx.firstChild.setAttribute('transform', 'matrix(1 0 0 -1 0 0)');
const W = parseFloat(mjx.getAttribute('viewBox').split(/ /)[2]);
const w = parseFloat(mjx.getAttribute('width'));
const { x, y, width, height } = node.getBBox();
mjx.setAttribute('viewBox', [x, -(y + height), width, height].join(' '));
mjx.removeAttribute('style');
mjx.setAttribute('width', (w / W) * width + 'ex');
mjx.setAttribute('height', (w / W) * height + 'ex');
container.setAttribute('sre-highlight', 'false');
}
}
mjx = container.cloneNode(false).appendChild(mjx)
.parentNode;
mjx.style.margin = '0';
}
return mjx;
}
}
HoverRegion.className = 'MJX_HoverRegion';
HoverRegion.style = new StyleJsonSheet({
['.' + HoverRegion.className]: {
display: 'block',
position: 'absolute',
width: 'max-content',
height: 'auto',
padding: 0,
opacity: 1,
'z-index': '202',
margin: '0 auto',
'background-color': 'white',
'line-height': 0,
'box-shadow': '0px 10px 20px #888',
border: '2px solid #CCCCCC',
},
['.' + HoverRegion.className + ' > div']: {
overflow: 'hidden',
},
});
//# sourceMappingURL=Region.js.map
;// ./mjs/a11y/explorer/Explorer.js
class AbstractExplorer {
get highlighter() {
return this.pool.highlighter;
}
static stopEvent(event) {
if (event.preventDefault) {
event.preventDefault();
}
else {
event.returnValue = false;
}
if (event.stopImmediatePropagation) {
event.stopImmediatePropagation();
}
else if (event.stopPropagation) {
event.stopPropagation();
}
event.cancelBubble = true;
}
static create(document, pool, region, node, ...rest) {
const explorer = new this(document, pool, region, node, ...rest);
return explorer;
}
constructor(document, pool, region, node, ..._rest) {
this.document = document;
this.pool = pool;
this.region = region;
this.node = node;
this.stoppable = true;
this.events = [];
this._active = false;
}
Events() {
return this.events;
}
get active() {
return this._active;
}
set active(flag) {
this._active = flag;
}
Attach() {
this.AddEvents();
}
Detach() {
this.RemoveEvents();
}
Start() {
this.active = true;
}
Stop() {
if (this.active) {
this.region.Clear();
this.region.Hide();
this.active = false;
}
}
AddEvents() {
for (const [eventkind, eventfunc] of this.events) {
this.node.addEventListener(eventkind, eventfunc);
}
}
RemoveEvents() {
for (const [eventkind, eventfunc] of this.events) {
this.node.removeEventListener(eventkind, eventfunc);
}
}
Update(_force = false) { }
stopEvent(event) {
if (this.stoppable) {
AbstractExplorer.stopEvent(event);
}
}
}
//# sourceMappingURL=Explorer.js.map
;// ./mjs/a11y/explorer/KeyExplorer.js
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const nav = '[data-speech-node]';
function isContainer(el) {
return el.matches('mjx-container');
}
function hasModifiers(event, shift = true) {
return ((event.shiftKey && shift) || event.metaKey || event.altKey || event.ctrlKey);
}
function helpMessage(title, select) {
return `
Exploring expressions ${title}
The mathematics on this page is being rendered by MathJax , which
generates both the text spoken by screen readers, as well as the
visual layout for sighted users.
Expressions typeset by MathJax can be explored interactively, and
are focusable. You can use the Tab key to move to a typeset
expression${select}. Initially, the expression will be read in full,
but you can use the following keys to explore the expression
further:
Down Arrow moves one level deeper into the expression to
allow you to explore the current subexpression term by term.
Up Arrow moves back up a level within the expression.
Right Arrow moves to the next term in the current
subexpression.
Left Arrow moves to the next term in the current
subexpression.
Shift +Arrow moves to a neighboring cell within a table.
0-9 +0-9 jumps to a cell by its index in the table, where 0 = 10.
Home takes you to the top of the expression.
Enter or Return clicks a link or activates an active
subexpression.
Space opens the MathJax contextual menu where you can view
or copy the source format of the expression, or modify MathJax's
settings.
Escape exits the expression explorer.
x gives a summary of the current subexpression.
z gives the full text of a collapsed expression.
d gives the current depth within the expression.
s starts or stops auto-voicing with synchronized highlighting.
v marks the current position in the expression.
p cycles through the marked positions in the expression.
u clears all marked positions and returns to the starting position.
> cycles through the available speech rule sets
(MathSpeak, ClearSpeak).
< cycles through the verbosity levels for the current
rule set.
h produces this help listing.
The MathJax contextual menu allows you to enable or disable speech
or Braille generation for mathematical expressions, the language to
use for the spoken mathematics, and other features of MathJax. In
particular, the Explorer submenu allows you to specify how the
mathematics should be identified in the page (e.g., by saying "math"
when the expression is spoken), and whether or not to include a
message about the letter "h" bringing up this dialog box.
The contextual menu also provides options for viewing or copying a
MathML version of the expression or its original source format,
creating an SVG version of the expression, and viewing various other
information.
For more help, see the MathJax accessibility documentation.
`;
}
const helpData = new Map([
[
'MacOS',
[
'on MacOS and iOS using VoiceOver',
', or the VoiceOver arrow keys to select an expression',
],
],
[
'Windows',
[
'in Windows using NVDA or JAWS',
`. The screen reader should enter focus or forms mode automatically
when the expression gets the browser focus, but if not, you can toggle
focus mode using NVDA+space in NVDA; for JAWS, Enter should start
forms mode while Numpad Plus leaves it. Also note that you can use
the NVDA or JAWS key plus the arrow keys to explore the expression
even in browse mode, and you can use NVDA+shift+arrow keys to
navigate out of an expression that has the focus in NVDA`,
],
],
[
'Unix',
[
'in Unix using Orca',
`, and Orca should enter focus mode automatically. If not, use the
Orca+a key to toggle focus mode on or off. Also note that you can use
Orca+arrow keys to explore expressions even in browse mode`,
],
],
['unknown', ['with a Screen Reader.', '']],
]);
class SpeechExplorer extends AbstractExplorer {
get generators() {
var _a;
return (_a = this.item) === null || _a === void 0 ? void 0 : _a.generatorPool;
}
get role() {
return this.item.ariaRole;
}
get description() {
return this.item.roleDescription;
}
get none() {
return this.item.none;
}
FocusIn(_event) {
if (this.item.outputData.nofocus) {
this.item.outputData.nofocus = false;
return;
}
if (!this.clicked) {
this.Start();
}
this.clicked = null;
}
FocusOut(_event) {
if (this.current && !this.focusSpeech) {
this.setCurrent(null);
this.Stop();
if (!document.hasFocus()) {
this.focusTop();
}
}
}
KeyDown(event) {
this.pendingIndex.shift();
this.region.cancelVoice();
if (hasModifiers(event, false))
return;
const CLASS = this.constructor;
const key = event.key.length === 1 ? event.key.toLowerCase() : event.key;
const [action, value] = CLASS.keyMap.get(key) || [];
const result = action
? value === undefined || this.active
? action(this, event)
: value
: this.undefinedKey(event);
if (result)
return;
this.stopEvent(event);
if (result === false && this.sound) {
this.NoMove();
}
}
MouseDown(event) {
var _a;
this.pendingIndex = [];
this.region.cancelVoice();
if (hasModifiers(event) || event.buttons === 2) {
this.item.outputData.nofocus = true;
return;
}
const clicked = this.findClicked(event.target, event.x, event.y);
if (clicked === this.document.infoIcon) {
this.stopEvent(event);
return;
}
(_a = document.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
if (event.target.getAttribute('sre-highlighter-added')) {
this.refocus = clicked;
}
else {
this.clicked = clicked;
}
}
Click(event) {
if (hasModifiers(event) ||
event.buttons === 2 ||
document.getSelection().type === 'Range') {
this.FocusOut(null);
return;
}
const clicked = this.findClicked(event.target, event.x, event.y);
if (clicked === this.document.infoIcon) {
this.stopEvent(event);
this.help();
return;
}
if (!clicked || this.node.contains(clicked)) {
this.stopEvent(event);
this.refocus = clicked;
if (!this.triggerLinkMouse()) {
this.Start();
}
}
}
DblClick(event) {
var _a;
const direction = (_a = document.getSelection().direction) !== null && _a !== void 0 ? _a : 'none';
if (hasModifiers(event) || event.buttons === 2 || direction !== 'none') {
this.FocusOut(null);
}
else {
this.stopEvent(event);
this.refocus = this.rootNode();
this.Start();
}
}
spaceKey() {
this.refocus = this.current;
return true;
}
hKey() {
this.refocus = this.current;
this.help();
}
escapeKey() {
this.Stop();
this.focusTop();
return true;
}
enterKey(event) {
if (this.active) {
if (this.triggerLinkKeyboard(event)) {
this.Stop();
}
else {
const expandable = this.actionable(this.current);
if (!expandable) {
return false;
}
this.refocus = expandable;
expandable.dispatchEvent(new Event('click'));
}
}
else {
this.Start();
}
}
homeKey() {
this.setCurrent(this.rootNode());
}
moveDown(shift) {
return shift
? this.moveToNeighborCell(1, 0)
: this.moveTo(this.firstNode(this.current));
}
moveUp(shift) {
return shift
? this.moveToNeighborCell(-1, 0)
: this.moveTo(this.getParent(this.current));
}
moveRight(shift) {
return shift
? this.moveToNeighborCell(0, 1)
: this.moveTo(this.nextSibling(this.current));
}
moveLeft(shift) {
return shift
? this.moveToNeighborCell(0, -1)
: this.moveTo(this.prevSibling(this.current));
}
moveTo(node) {
if (!node)
return false;
this.setCurrent(node);
}
moveToNeighborCell(di, dj) {
const cell = this.tableCell(this.current);
if (!cell)
return false;
const [i, j] = this.cellPosition(cell);
if (i == null)
return false;
const move = this.cellAt(this.cellTable(cell), i + di, j + dj);
if (!move)
return false;
this.setCurrent(move);
}
undefinedKey(event) {
return !this.active || hasModifiers(event);
}
addMark() {
if (this.current === this.marks[this.marks.length - 1]) {
this.setCurrent(this.current);
}
else {
this.currentMark = this.marks.length - 1;
this.marks.push(this.current);
this.speak('Position marked');
}
}
prevMark() {
if (this.currentMark < 0) {
if (this.marks.length === 0) {
this.setCurrent(this.lastMark || this.rootNode());
return;
}
this.currentMark = this.marks.length - 1;
}
const current = this.currentMark;
this.setCurrent(this.marks[current]);
this.currentMark = current - 1;
}
clearMarks() {
this.marks = [];
this.currentMark = -1;
this.prevMark();
}
autoVoice() {
const value = !this.document.options.a11y.voicing;
if (this.document.menu) {
this.document.menu.menu.pool.lookup('voicing').setValue(value);
}
else {
this.document.options.a11y.voicing = value;
}
this.Update();
}
numberKey(n) {
if (!this.tableCell(this.current))
return false;
if (n === 0) {
n = 10;
}
if (this.pendingIndex.length) {
const table = this.cellTable(this.tableCell(this.current));
const cell = this.cellAt(table, this.pendingIndex[0] - 1, n - 1);
this.pendingIndex = [];
this.speak(String(n));
if (!cell)
return false;
setTimeout(() => this.setCurrent(cell), 500);
}
else {
this.pendingIndex = [null, n];
this.speak(`Jump to row ${n} and column`);
}
}
depth() {
var _a, _b, _c;
if (this.speechType === 'd') {
this.setCurrent(this.current);
return;
}
this.speechType = 'd';
const parts = [
[
(_a = this.node.getAttribute('data-semantic-level')) !== null && _a !== void 0 ? _a : 'Level',
(_b = this.current.getAttribute('aria-level')) !== null && _b !== void 0 ? _b : '0',
]
.join(' ')
.trim(),
];
const action = this.actionable(this.current);
if (action) {
parts.unshift((_c = this.node.getAttribute(action.getAttribute('toggle') === '1'
? 'data-semantic-expandable'
: 'data-semantic-collapsible')) !== null && _c !== void 0 ? _c : '');
}
this.speak(parts.join(' '), this.current.getAttribute(SemAttr.BRAILLE));
}
summary() {
if (this.speechType === 'x') {
this.setCurrent(this.current);
return;
}
this.speechType = 'x';
const summary = this.current.getAttribute(SemAttr.SUMMARY);
this.speak(summary, this.current.getAttribute(SemAttr.BRAILLE), this.SsmlAttributes(this.current, SemAttr.SUMMARY_SSML));
}
nextRules() {
this.node.removeAttribute('data-speech-attached');
this.restartAfter(this.generators.nextRules(this.item));
}
nextStyle() {
this.node.removeAttribute('data-speech-attached');
this.restartAfter(this.generators.nextStyle(this.current, this.item));
}
details() {
const action = this.actionable(this.current);
if (!action ||
!action.getAttribute('data-collapsible') ||
action.getAttribute('toggle') !== '1' ||
this.speechType === 'z') {
this.setCurrent(this.current);
return;
}
this.speechType = 'z';
const id = this.nodeId(this.current);
let current;
this.item.root.walkTree((node) => {
if (node.attributes.get('data-semantic-id') === id) {
current = node;
}
});
let mml = this.item.toMathML(current, this.item);
if (!current.isKind('math')) {
mml = `${mml} `;
}
mml = mml.replace(/ (?:data-semantic-|aria-|data-speech-|data-latex).*?=".*?"/g, '');
this.item
.speechFor(mml)
.then(([speech, braille]) => this.speak(speech, braille));
}
help() {
const adaptor = this.document.adaptor;
const helpBackground = adaptor.node('mjx-help-background');
const close = (event) => {
helpBackground.remove();
this.node.focus();
this.stopEvent(event);
};
helpBackground.addEventListener('click', close);
const helpSizer = adaptor.node('mjx-help-sizer', {}, [
adaptor.node('mjx-help-dialog', { tabindex: 0, role: 'dialog', 'aria-labeledby': 'mjx-help-label' }, [
adaptor.node('h1', { id: 'mjx-help-label' }, [
adaptor.text('MathJax Expression Explorer Help'),
]),
adaptor.node('div'),
adaptor.node('input', { type: 'button', value: 'Close' }),
]),
]);
helpBackground.append(helpSizer);
const help = helpSizer.firstChild;
help.addEventListener('click', (event) => this.stopEvent(event));
help.lastChild.addEventListener('click', close);
help.addEventListener('keydown', (event) => {
if (event.code === 'Escape') {
close(event);
}
});
const [title, select] = helpData.get(context.os);
help.childNodes[1].innerHTML = helpMessage(title, select);
document.body.append(helpBackground);
help.focus();
}
setCurrent(node, addDescription = false) {
this.speechType = '';
if (!document.hasFocus()) {
this.refocus = this.current;
}
this.node.setAttribute('aria-busy', 'true');
if (this.current) {
for (const part of this.getSplitNodes(this.current)) {
part.classList.remove('mjx-selected');
}
this.pool.unhighlight();
if (this.document.options.a11y.tabSelects === 'last') {
this.refocus = this.current;
}
if (!node) {
this.lastMark = this.current;
this.removeSpeech();
}
this.current = null;
}
this.current = node;
this.currentMark = -1;
if (this.current) {
const parts = this.getSplitNodes(this.current);
for (const part of parts) {
part.classList.add('mjx-selected');
}
this.pool.highlight(parts);
this.addSpeech(node, addDescription);
}
this.node.removeAttribute('aria-busy');
}
getSplitNodes(node) {
const id = this.nodeId(node);
if (!id) {
return [node];
}
return Array.from(this.node.querySelectorAll(`[data-semantic-id="${id}"]`));
}
addSpeech(node, describe) {
var _a;
(_a = this.img) === null || _a === void 0 ? void 0 : _a.remove();
let speech = [
node.getAttribute(SemAttr.PREFIX),
node.getAttribute(SemAttr.SPEECH),
node.getAttribute(SemAttr.POSTFIX),
]
.join(' ')
.trim();
if (describe) {
let description = this.description === this.none ? '' : ', ' + this.description;
if (this.document.options.a11y.help) {
description += ', press h for help';
}
speech += description;
}
this.speak(speech, node.getAttribute(SemAttr.BRAILLE), this.SsmlAttributes(node, SemAttr.SPEECH_SSML));
this.node.setAttribute('tabindex', '-1');
}
removeSpeech() {
if (this.speech) {
this.speech.remove();
this.speech = null;
if (this.img) {
this.node.append(this.img);
}
this.node.setAttribute('tabindex', '0');
}
}
speak(speech, braille = '', ssml = null, description = this.none) {
const oldspeech = this.speech;
this.speech = document.createElement('mjx-speech');
this.speech.setAttribute('role', this.role);
this.speech.setAttribute('aria-label', speech);
this.speech.setAttribute(SemAttr.SPEECH, speech);
if (ssml) {
this.speech.setAttribute(SemAttr.PREFIX_SSML, ssml[0] || '');
this.speech.setAttribute(SemAttr.SPEECH_SSML, ssml[1] || '');
this.speech.setAttribute(SemAttr.POSTFIX_SSML, ssml[2] || '');
}
if (braille) {
this.speech.setAttribute('aria-braillelabel', braille);
}
this.speech.setAttribute('aria-roledescription', description);
this.speech.setAttribute('tabindex', '0');
this.node.append(this.speech);
this.focusSpeech = true;
this.speech.focus();
this.focusSpeech = false;
this.Update();
if (oldspeech) {
setTimeout(() => oldspeech.remove(), 100);
}
}
attachSpeech() {
var _a;
const item = this.item;
const container = this.node;
if (!container.hasAttribute('has-speech')) {
for (const child of Array.from(container.childNodes)) {
child.setAttribute('aria-hidden', 'true');
}
container.setAttribute('has-speech', 'true');
}
const description = item.roleDescription;
const speech = (container.getAttribute(SemAttr.SPEECH) || '') +
(description ? ', ' + description : '');
(_a = this.img) === null || _a === void 0 ? void 0 : _a.remove();
this.img = this.document.adaptor.node('mjx-speech', {
'aria-label': speech,
role: 'img',
'aria-roledescription': item.none,
});
container.appendChild(this.img);
}
detachSpeech() {
var _a;
const container = this.node;
(_a = this.img) === null || _a === void 0 ? void 0 : _a.remove();
container.removeAttribute('has-speech');
for (const child of Array.from(container.childNodes)) {
child.removeAttribute('aria-hidden');
}
}
focus() {
this.node.focus();
}
nodeId(node) {
return node.getAttribute('data-semantic-id');
}
parentId(node) {
return node.getAttribute('data-semantic-parent');
}
getNode(id) {
return id ? this.node.querySelector(`[data-semantic-id="${id}"]`) : null;
}
getParent(node) {
return this.getNode(this.parentId(node));
}
childArray(node) {
return node ? node.getAttribute('data-semantic-children').split(/,/) : [];
}
isCell(node) {
return (!!node && this.cellTypes.includes(node.getAttribute('data-semantic-type')));
}
isRow(node) {
return !!node && node.getAttribute('data-semantic-type') === 'row';
}
tableCell(node) {
while (node && node !== this.node) {
if (this.isCell(node)) {
return node;
}
node = node.parentNode;
}
return null;
}
cellTable(cell) {
const row = this.getParent(cell);
return this.isRow(row) ? this.getParent(row) : row;
}
cellPosition(cell) {
const row = this.getParent(cell);
const j = this.childArray(row).indexOf(this.nodeId(cell));
if (!this.isRow(row)) {
return [j, 1];
}
const table = this.getParent(row);
const i = this.childArray(table).indexOf(this.nodeId(row));
return [i, j];
}
cellAt(table, i, j) {
const row = this.getNode(this.childArray(table)[i]);
if (!this.isRow(row)) {
return j === 1 ? row : null;
}
const cell = this.getNode(this.childArray(row)[j]);
return cell;
}
firstNode(node) {
const owns = node.getAttribute('data-semantic-owns');
if (!owns) {
return node.querySelector(nav);
}
const ownsList = owns.split(/ /);
for (const id of ownsList) {
const node = this.getNode(id);
if (node === null || node === void 0 ? void 0 : node.hasAttribute('data-speech-node')) {
return node;
}
}
return node.querySelector(nav);
}
rootNode() {
const base = this.node.querySelector('[data-semantic-structure]');
if (!base) {
return this.node.querySelector(nav);
}
const id = base
.getAttribute('data-semantic-structure')
.split(/ /)[0]
.replace('(', '');
return this.getNode(id);
}
nextSibling(node) {
var _a;
const id = this.parentId(node);
if (!id)
return null;
const owns = (_a = this.getNode(id)
.getAttribute('data-semantic-owns')) === null || _a === void 0 ? void 0 : _a.split(/ /);
if (!owns)
return null;
let i = owns.indexOf(this.nodeId(node));
let next;
do {
next = this.getNode(owns[++i]);
} while (next && !next.hasAttribute('data-speech-node'));
return next;
}
prevSibling(node) {
var _a;
const id = this.parentId(node);
if (!id)
return null;
const owns = (_a = this.getNode(id)
.getAttribute('data-semantic-owns')) === null || _a === void 0 ? void 0 : _a.split(/ /);
if (!owns)
return null;
let i = owns.indexOf(this.nodeId(node));
let prev;
do {
prev = this.getNode(owns[--i]);
} while (prev && !prev.hasAttribute('data-speech-node'));
return prev;
}
findClicked(node, x, y) {
const icon = this.document.infoIcon;
if (icon === node || icon.contains(node)) {
return icon;
}
if (this.node.getAttribute('jax') !== 'SVG') {
return node.closest(nav);
}
let found = null;
let clicked = this.node;
while (clicked) {
if (clicked.matches(nav)) {
found = clicked;
}
const nodes = Array.from(clicked.childNodes);
clicked = null;
for (const child of nodes) {
if (child !== this.speech &&
child !== this.img &&
child.tagName.toLowerCase() !== 'rect') {
const { left, right, top, bottom } = child.getBoundingClientRect();
if (left <= x && x <= right && top <= y && y <= bottom) {
clicked = child;
break;
}
}
}
}
return found;
}
focusTop() {
this.focusSpeech = true;
this.node.focus();
this.focusSpeech = false;
}
SsmlAttributes(node, center) {
return [
node.getAttribute(SemAttr.PREFIX_SSML),
node.getAttribute(center),
node.getAttribute(SemAttr.POSTFIX_SSML),
];
}
restartAfter(promise) {
return __awaiter(this, void 0, void 0, function* () {
yield promise;
this.attachSpeech();
const current = this.current;
this.current = null;
this.pool.unhighlight();
this.setCurrent(current);
});
}
constructor(document, pool, region, node, brailleRegion, magnifyRegion, _mml, item) {
super(document, pool, null, node);
this.document = document;
this.pool = pool;
this.region = region;
this.node = node;
this.brailleRegion = brailleRegion;
this.magnifyRegion = magnifyRegion;
this.item = item;
this.sound = false;
this.current = null;
this.clicked = null;
this.refocus = null;
this.focusSpeech = false;
this.restarted = null;
this.speech = null;
this.speechType = '';
this.img = null;
this.attached = false;
this.eventsAttached = false;
this.marks = [];
this.currentMark = -1;
this.lastMark = null;
this.pendingIndex = [];
this.cellTypes = ['cell', 'line'];
this.events = super.Events().concat([
['focusin', this.FocusIn.bind(this)],
['focusout', this.FocusOut.bind(this)],
['keydown', this.KeyDown.bind(this)],
['mousedown', this.MouseDown.bind(this)],
['click', this.Click.bind(this)],
['dblclick', this.DblClick.bind(this)],
]);
}
findStartNode() {
let node = this.refocus || this.current;
if (!node && this.restarted) {
node = this.node.querySelector(this.restarted);
}
this.refocus = this.restarted = null;
return node;
}
Start() {
const _super = Object.create(null, {
Start: { get: () => super.Start }
});
return __awaiter(this, void 0, void 0, function* () {
if (!this.attached || this.active)
return;
this.document.activeItem = this.item;
if (this.item.state() < STATE.ATTACHSPEECH) {
this.item.attachSpeech(this.document);
yield this.generators.promise;
}
if (this.focusSpeech)
return;
this.node.classList.add('mjx-explorer-active');
this.node.append(this.document.infoIcon);
const node = this.findStartNode();
this.setCurrent(node || this.rootNode(), !node);
_super.Start.call(this);
const options = this.document.options;
const a11y = options.a11y;
if (a11y.subtitles && a11y.speech && options.enableSpeech) {
this.region.Show(this.node, this.highlighter);
}
if (a11y.viewBraille && a11y.braille && options.enableBraille) {
this.brailleRegion.Show(this.node, this.highlighter);
}
if (a11y.keyMagnifier) {
this.magnifyRegion.Show(this.current, this.highlighter);
}
this.Update();
});
}
Stop() {
if (this.active) {
const description = this.description;
if (this.node.getAttribute('aria-roledescription') !== description) {
this.node.setAttribute('aria-roledescription', description);
}
this.node.classList.remove('mjx-explorer-active');
this.document.infoIcon.remove();
this.pool.unhighlight();
this.magnifyRegion.Hide();
this.region.Hide();
this.brailleRegion.Hide();
}
super.Stop();
}
Update() {
if (!this.active)
return;
this.region.node = this.node;
this.generators.updateRegions(this.speech || this.node, this.region, this.brailleRegion);
this.magnifyRegion.Update(this.current);
}
Attach() {
if (this.attached)
return;
super.Attach();
this.node.setAttribute('tabindex', '0');
this.attached = true;
}
Detach() {
var _a;
super.RemoveEvents();
this.node.removeAttribute('role');
this.node.removeAttribute('aria-roledescription');
this.node.removeAttribute('aria-label');
(_a = this.img) === null || _a === void 0 ? void 0 : _a.remove();
if (this.active) {
this.node.setAttribute('tabindex', '0');
}
this.attached = false;
}
NoMove() {
honk();
}
AddEvents() {
if (!this.eventsAttached) {
super.AddEvents();
this.eventsAttached = true;
}
}
actionable(node) {
const parent = node === null || node === void 0 ? void 0 : node.parentNode;
return parent && this.highlighter.isMactionNode(parent) ? parent : null;
}
triggerLinkKeyboard(event) {
if (!this.current) {
if (event.target instanceof HTMLAnchorElement) {
event.target.dispatchEvent(new MouseEvent('click'));
return true;
}
return false;
}
return this.triggerLink(this.current);
}
triggerLink(node) {
var _a;
const focus = (_a = node === null || node === void 0 ? void 0 : node.getAttribute('data-semantic-postfix')) === null || _a === void 0 ? void 0 : _a.match(/(^| )link($| )/);
if (focus) {
while (node && node !== this.node) {
if (node instanceof HTMLAnchorElement) {
node.dispatchEvent(new MouseEvent('click'));
setTimeout(() => this.FocusOut(null), 50);
return true;
}
node = node.parentNode;
}
}
return false;
}
triggerLinkMouse() {
let node = this.refocus;
while (node && node !== this.node) {
if (this.triggerLink(node)) {
return true;
}
node = node.parentNode;
}
return false;
}
semanticFocus() {
const focus = [];
let name = 'data-semantic-id';
let node = this.current || this.refocus || this.node;
const action = this.actionable(node);
if (action) {
name = action.hasAttribute('data-maction-id') ? 'data-maction-id' : 'id';
node = action;
focus.push(nav);
}
const attr = node.getAttribute(name);
if (attr) {
focus.unshift(`[${name}="${attr}"]`);
}
return focus.join(' ');
}
}
SpeechExplorer.keyMap = new Map([
['Tab', [() => true]],
['Escape', [(explorer) => explorer.escapeKey()]],
['Enter', [(explorer, event) => explorer.enterKey(event)]],
['Home', [(explorer) => explorer.homeKey()]],
[
'ArrowDown',
[(explorer, event) => explorer.moveDown(event.shiftKey), true],
],
['ArrowUp', [(explorer, event) => explorer.moveUp(event.shiftKey), true]],
[
'ArrowLeft',
[(explorer, event) => explorer.moveLeft(event.shiftKey), true],
],
[
'ArrowRight',
[(explorer, event) => explorer.moveRight(event.shiftKey), true],
],
[' ', [(explorer) => explorer.spaceKey()]],
['h', [(explorer) => explorer.hKey()]],
['>', [(explorer) => explorer.nextRules(), false]],
['<', [(explorer) => explorer.nextStyle(), false]],
['x', [(explorer) => explorer.summary(), false]],
['z', [(explorer) => explorer.details(), false]],
['d', [(explorer) => explorer.depth(), false]],
['v', [(explorer) => explorer.addMark(), false]],
['p', [(explorer) => explorer.prevMark(), false]],
['u', [(explorer) => explorer.clearMarks(), false]],
['s', [(explorer) => explorer.autoVoice(), false]],
...[...'0123456789'].map((n) => [
n,
[(explorer) => explorer.numberKey(parseInt(n)), false],
]),
]);
//# sourceMappingURL=KeyExplorer.js.map
;// ./components/mjs/a11y/sre/lib/a11y/sre.js
const sre_def = MathJax._.a11y.sre_ts;
const locales = sre_def.locales;
const setupEngine = sre_def.setupEngine;
const engineSetup = sre_def.engineSetup;
const toEnriched = sre_def.toEnriched;
const parseDOM = sre_def.parseDOM;
const addPreference = sre_def.addPreference;
const fromPreference = sre_def.fromPreference;
const toPreference = sre_def.toPreference;
;// ./mjs/a11y/explorer/MouseExplorer.js
class AbstractMouseExplorer extends AbstractExplorer {
constructor() {
super(...arguments);
this.events = super.Events().concat([
['mouseover', this.MouseOver.bind(this)],
['mouseout', this.MouseOut.bind(this)],
]);
}
MouseOver(_event) {
this.Start();
}
MouseOut(_event) {
this.Stop();
}
}
class Hoverer extends AbstractMouseExplorer {
constructor(document, pool, region, node, nodeQuery, nodeAccess) {
super(document, pool, region, node);
this.document = document;
this.pool = pool;
this.region = region;
this.node = node;
this.nodeQuery = nodeQuery;
this.nodeAccess = nodeAccess;
}
MouseOut(event) {
this.highlighter.unhighlight();
this.region.Hide();
super.MouseOut(event);
}
MouseOver(event) {
super.MouseOver(event);
const target = event.target;
const [node, kind] = this.getNode(target);
if (!node) {
return;
}
this.highlighter.unhighlight();
this.highlighter.highlight([node]);
this.region.Update(kind);
this.region.Show(node, this.highlighter);
}
getNode(node) {
const original = node;
while (node && node !== this.node) {
if (this.nodeQuery(node)) {
return [node, this.nodeAccess(node)];
}
node = node.parentNode;
}
node = original;
while (node) {
if (this.nodeQuery(node)) {
return [node, this.nodeAccess(node)];
}
const child = node.childNodes[0];
node =
child && child.tagName === 'defs'
? node.childNodes[1]
: child;
}
return [null, null];
}
}
class ValueHoverer extends Hoverer {
}
class ContentHoverer extends Hoverer {
}
class FlameHoverer extends Hoverer {
constructor(document, pool, _ignore, node) {
super(document, pool, new DummyRegion(document), node, (x) => this.highlighter.isMactionNode(x), () => { });
this.document = document;
this.pool = pool;
this.node = node;
}
}
//# sourceMappingURL=MouseExplorer.js.map
;// ./mjs/a11y/explorer/TreeExplorer.js
class AbstractTreeExplorer extends AbstractExplorer {
constructor(document, pool, region, node, mml) {
super(document, pool, null, node);
this.document = document;
this.pool = pool;
this.region = region;
this.node = node;
this.mml = mml;
this.stoppable = false;
}
Attach() {
super.Attach();
this.Start();
}
Detach() {
this.Stop();
super.Detach();
}
}
class FlameColorer extends AbstractTreeExplorer {
Start() {
if (this.active)
return;
this.active = true;
this.highlighter.highlightAll(this.node);
}
Stop() {
if (this.active) {
this.highlighter.unhighlightAll();
}
this.active = false;
}
}
class TreeColorer extends AbstractTreeExplorer {
constructor() {
super(...arguments);
this.contrast = new ContrastPicker();
this.leaves = [];
this.modality = 'data-semantic-foreground';
}
Start() {
if (this.active)
return;
this.active = true;
if (!this.node.hasAttribute('hasforegroundcolor')) {
this.colorLeaves();
this.node.setAttribute('hasforegroundcolor', 'true');
}
this.leaves.forEach((leaf) => this.colorize(leaf));
}
Stop() {
if (this.active) {
this.leaves.forEach((leaf) => this.uncolorize(leaf));
}
this.active = false;
}
colorLeaves() {
this.leaves = Array.from(this.node.querySelectorAll('[data-semantic-id]:not([data-semantic-children])'));
for (const leaf of this.leaves) {
leaf.setAttribute(this.modality, this.contrast.generate());
this.contrast.increment();
}
}
colorize(node) {
if (node.hasAttribute(this.modality)) {
node.setAttribute(this.modality + '-old', node.style.color);
node.style.color = node.getAttribute(this.modality);
}
}
uncolorize(node) {
const fore = this.modality + '-old';
if (node.hasAttribute(fore)) {
node.style.color = node.getAttribute(fore);
}
}
}
class ContrastPicker {
constructor() {
this.hue = 10;
this.sat = 100;
this.light = 50;
this.incr = 53;
}
generate() {
return ContrastPicker.hsl2rgb(this.hue, this.sat, this.light);
}
increment() {
this.hue = (this.hue + this.incr) % 360;
}
static hsl2rgb(h, s, l) {
s = s > 1 ? s / 100 : s;
l = l > 1 ? l / 100 : l;
const c = (1 - Math.abs(2 * l - 1)) * s;
const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
const m = l - c / 2;
let r = 0, g = 0, b = 0;
if (0 <= h && h < 60) {
[r, g, b] = [c, x, 0];
}
else if (60 <= h && h < 120) {
[r, g, b] = [x, c, 0];
}
else if (120 <= h && h < 180) {
[r, g, b] = [0, c, x];
}
else if (180 <= h && h < 240) {
[r, g, b] = [0, x, c];
}
else if (240 <= h && h < 300) {
[r, g, b] = [x, 0, c];
}
else if (300 <= h && h < 360) {
[r, g, b] = [c, 0, x];
}
return `rgb(${(r + m) * 255}, ${(g + m) * 255}, ${(b + m) * 255})`;
}
}
//# sourceMappingURL=TreeExplorer.js.map
;// ./mjs/a11y/explorer/ExplorerPool.js
class RegionPool {
constructor(document) {
this.document = document;
this.speechRegion = new SpeechRegion(this.document);
this.brailleRegion = new LiveRegion(this.document);
this.magnifier = new HoverRegion(this.document);
this.tooltip1 = new ToolTip(this.document);
this.tooltip2 = new ToolTip(this.document);
this.tooltip3 = new ToolTip(this.document);
}
}
const allExplorers = {
speech: (doc, pool, node, ...rest) => {
const explorer = SpeechExplorer.create(doc, pool, doc.explorerRegions.speechRegion, node, doc.explorerRegions.brailleRegion, doc.explorerRegions.magnifier, rest[0], rest[1]);
explorer.sound = true;
return explorer;
},
mouseMagnifier: (doc, pool, node, ..._rest) => ContentHoverer.create(doc, pool, doc.explorerRegions.magnifier, node, (x) => x.hasAttribute('data-semantic-type'), (x) => x),
hover: (doc, pool, node, ..._rest) => FlameHoverer.create(doc, pool, null, node),
infoType: (doc, pool, node, ..._rest) => ValueHoverer.create(doc, pool, doc.explorerRegions.tooltip1, node, (x) => x.hasAttribute('data-semantic-type'), (x) => x.getAttribute('data-semantic-type')),
infoRole: (doc, pool, node, ..._rest) => ValueHoverer.create(doc, pool, doc.explorerRegions.tooltip2, node, (x) => x.hasAttribute('data-semantic-role'), (x) => x.getAttribute('data-semantic-role')),
infoPrefix: (doc, pool, node, ..._rest) => ValueHoverer.create(doc, pool, doc.explorerRegions.tooltip3, node, (x) => { var _a; return (_a = x.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(x, 'data-semantic-prefix-none'); }, (x) => { var _a; return (_a = x.getAttribute) === null || _a === void 0 ? void 0 : _a.call(x, 'data-semantic-prefix-none'); }),
flame: (doc, pool, node, ..._rest) => FlameColorer.create(doc, pool, null, node),
treeColoring: (doc, pool, node, ...rest) => TreeColorer.create(doc, pool, null, node, ...rest),
};
class ExplorerPool {
constructor() {
this.explorers = {};
this.attached = [];
this._restart = [];
this.speechExplorerKeys = ['speech', 'braille', 'keyMagnifier'];
}
get highlighter() {
if (this._renderer !== this.document.outputJax.name) {
this._renderer = this.document.outputJax.name;
this.setPrimaryHighlighter();
return this._highlighter;
}
const [foreground, background] = this.colorOptions();
this._highlighter.setColor(background, foreground);
return this._highlighter;
}
init(document, node, mml, item) {
this.document = document;
this.mml = mml;
this.node = node;
this.setPrimaryHighlighter();
for (const key of Object.keys(allExplorers)) {
this.explorers[key] = allExplorers[key](this.document, this, this.node, this.mml, item);
}
this.setSecondaryHighlighter();
this.attach();
}
attach() {
this.attached = [];
const keyExplorers = [];
const a11y = this.document.options.a11y;
for (const [key, explorer] of Object.entries(this.explorers)) {
if (explorer instanceof SpeechExplorer) {
explorer.stoppable = false;
keyExplorers.unshift(explorer);
if (this.speechExplorerKeys.some((exKey) => this.document.options.a11y[exKey])) {
explorer.Attach();
this.attached.push(key);
}
else {
explorer.Detach();
}
continue;
}
if (a11y[key] ||
(key === 'speech' && (a11y.braille || a11y.keyMagnifier))) {
explorer.Attach();
this.attached.push(key);
}
else {
explorer.Detach();
}
}
for (const explorer of keyExplorers) {
if (explorer.attached) {
explorer.stoppable = true;
break;
}
}
}
reattach() {
for (const key of this.attached) {
const explorer = this.explorers[key];
if (explorer.active) {
this._restart.push(key);
explorer.Stop();
}
}
}
restart() {
this._restart.forEach((x) => {
this.explorers[x].Start();
});
this._restart = [];
}
setPrimaryHighlighter() {
const [foreground, background] = this.colorOptions();
this._highlighter = getHighlighter(background, foreground, this.document.outputJax.name);
}
setSecondaryHighlighter() {
this.secondaryHighlighter = getHighlighter({ color: 'red' }, { color: 'black' }, this.document.outputJax.name);
this.speech.region.highlighter =
this.secondaryHighlighter;
}
highlight(nodes) {
this.highlighter.highlight(nodes);
}
unhighlight() {
this.secondaryHighlighter.unhighlight();
this.highlighter.unhighlight();
}
get speech() {
return this.explorers['speech'];
}
colorOptions() {
const opts = this.document.options.a11y;
const foreground = {
color: opts.foregroundColor.toLowerCase(),
alpha: opts.foregroundOpacity / 100,
};
const background = {
color: opts.backgroundColor.toLowerCase(),
alpha: opts.backgroundOpacity / 100,
};
return [foreground, background];
}
}
//# sourceMappingURL=ExplorerPool.js.map
;// ./mjs/a11y/explorer.js
const isUnix = context.os === 'Unix';
newState('EXPLORER', STATE.INSERTED + 30);
function ExplorerMathItemMixin(BaseMathItem, toMathML) {
var _a;
return _a = class BaseClass extends BaseMathItem {
constructor() {
super(...arguments);
this.refocus = null;
}
get ariaRole() {
return this.constructor.ariaRole;
}
get roleDescription() {
const CLASS = this.constructor;
return CLASS.roleDescription === 'none'
? CLASS.none
: CLASS.roleDescription;
}
get none() {
return this.constructor.none;
}
attachSpeech(document) {
var _b, _c;
super.attachSpeech(document);
(_c = (_b = this.outputData.speechPromise) === null || _b === void 0 ? void 0 : _b.then(() => this.explorers.speech.attachSpeech())) === null || _c === void 0 ? void 0 : _c.then(() => {
var _b;
if ((_b = this.explorers) === null || _b === void 0 ? void 0 : _b.speech) {
this.explorers.speech.restarted = this.refocus;
}
this.refocus = null;
if (this.explorers) {
this.explorers.restart();
}
});
}
detachSpeech(document) {
super.detachSpeech(document);
this.explorers.speech.detachSpeech();
}
explorable(document, force = false) {
if (this.state() >= STATE.EXPLORER)
return;
if (!this.isEscaped && (document.options.enableExplorer || force)) {
const node = this.typesetRoot;
const mml = toMathML(this.root);
if (!this.explorers) {
this.explorers = new ExplorerPool();
}
this.explorers.init(document, node, mml, this);
}
this.state(STATE.EXPLORER);
}
state(state = null, restore = false) {
if (state < STATE.EXPLORER && this.explorers) {
for (const explorer of Object.values(this.explorers.explorers)) {
if (explorer.active) {
explorer.Stop();
}
}
}
return super.state(state, restore);
}
rerender(document, start = STATE.RERENDER) {
const focus = this.setTemporaryFocus(document);
super.rerender(document, start);
this.clearTemporaryFocus(focus);
}
setTemporaryFocus(document) {
var _b;
let focus = null;
if (this.explorers) {
const speech = this.explorers.speech;
focus = (speech === null || speech === void 0 ? void 0 : speech.attached) ? document.tmpFocus : null;
if (focus) {
this.refocus = (_b = speech.semanticFocus()) !== null && _b !== void 0 ? _b : null;
const adaptor = document.adaptor;
adaptor.append(adaptor.body(), focus);
}
this.explorers.reattach();
focus === null || focus === void 0 ? void 0 : focus.focus();
}
return focus;
}
clearTemporaryFocus(focus) {
var _b;
if (focus) {
const promise = (_b = this.outputData.speechPromise) !== null && _b !== void 0 ? _b : Promise.resolve();
promise.then(() => setTimeout(() => focus.remove(), 100));
}
}
},
_a.ariaRole = isUnix ? 'tree' : 'application',
_a.roleDescription = 'math',
_a.none = '\u0091',
_a;
}
function ExplorerMathDocumentMixin(BaseDocument) {
var _a;
return _a = class BaseClass extends BaseDocument {
constructor(...args) {
super(...args);
this.explorerRegions = null;
this.activeItem = null;
const ProcessBits = this.constructor.ProcessBits;
if (!ProcessBits.has('explorer')) {
ProcessBits.allocate('explorer');
}
const visitor = new SerializedMmlVisitor(this.mmlFactory);
const toMathML = (node) => visitor.visitTree(node);
const options = this.options;
if (!options.a11y.speechRules) {
options.a11y.speechRules = `${options.sre.domain}-${options.sre.style}`;
}
const mathItem = (options.MathItem = ExplorerMathItemMixin(options.MathItem, toMathML));
mathItem.roleDescription = options.roleDescription;
this.explorerRegions = new RegionPool(this);
if ('addStyles' in this) {
this.addStyles(this.constructor.speechStyles);
}
const adaptor = this.adaptor;
const SVGNS = 'http://www.w3.org/2000/svg';
this.infoIcon = adaptor.node('mjx-help', {}, [
adaptor.node('svg', { viewBox: '0 0 18 18', xmlns: SVGNS, 'aria-hidden': 'true' }, [
adaptor.node('circle', { stroke: 'none' }, [], SVGNS),
adaptor.node('circle', {}, [], SVGNS),
adaptor.node('line', { x1: 9, y1: 9, x2: 9, y2: 13 }, [], SVGNS),
adaptor.node('line', { x1: 9, y1: 5.5, x2: 9, y2: 5.5 }, [], SVGNS),
], SVGNS),
]);
this.tmpFocus = this.adaptor.node('mjx-focus', {
tabIndex: 0,
style: {
outline: 'none',
display: 'block',
position: 'absolute',
top: 0,
left: '-10px',
width: '1px',
height: '1px',
overflow: 'hidden',
},
role: mathItem.ariaRole,
'aria-label': mathItem.none,
'aria-roledescription': mathItem.none,
});
}
explorable() {
if (!this.processed.isSet('explorer')) {
if (this.options.enableExplorer) {
for (const math of this.math) {
math.explorable(this);
}
}
this.processed.set('explorer');
}
return this;
}
rerender(start) {
const active = this.activeItem;
const focus = active === null || active === void 0 ? void 0 : active.setTemporaryFocus(this);
super.rerender(start);
active === null || active === void 0 ? void 0 : active.clearTemporaryFocus(focus);
return this;
}
state(state, restore = false) {
super.state(state, restore);
if (state < STATE.EXPLORER) {
this.processed.clear('explorer');
}
return this;
}
},
_a.OPTIONS = Object.assign(Object.assign({}, BaseDocument.OPTIONS), { enableExplorer: hasWindow, renderActions: expandable(Object.assign(Object.assign({}, BaseDocument.OPTIONS.renderActions), { explorable: [STATE.EXPLORER] })), sre: expandable(Object.assign(Object.assign({}, BaseDocument.OPTIONS.sre), { speech: 'none' })), a11y: Object.assign(Object.assign({}, BaseDocument.OPTIONS.a11y), { align: 'top', backgroundColor: 'Blue', backgroundOpacity: 20, flame: false, foregroundColor: 'Black', foregroundOpacity: 100, highlight: 'None', hover: false, infoPrefix: false, infoRole: false, infoType: false, keyMagnifier: false, magnification: 'None', magnify: '400%', mouseMagnifier: false, subtitles: false, treeColoring: false, viewBraille: false, voicing: false, help: true, roleDescription: 'math', tabSelects: 'all' }) }),
_a.speechStyles = {
'mjx-container[has-speech="true"]': {
position: 'relative',
cursor: 'default',
},
'mjx-speech': {
position: 'absolute',
'z-index': -1,
left: 0,
top: 0,
bottom: 0,
right: 0,
},
'mjx-speech:focus': {
outline: 'none',
},
'mjx-container .mjx-selected': {
outline: '2px solid black',
},
'mjx-container > mjx-help': {
display: 'none',
position: 'absolute',
top: '-.33em',
right: '-.5em',
width: '.6em',
height: '.6em',
cursor: 'pointer',
},
'mjx-container[display="true"] > mjx-help': {
right: 0,
},
'mjx-help > svg': {
stroke: 'black',
width: '100%',
height: '100%',
},
'mjx-help > svg > circle': {
'stroke-width': '1.5px',
cx: '9px',
cy: '9px',
r: '9px',
fill: 'white',
},
'mjx-help > svg > circle:nth-child(2)': {
fill: 'rgba(0, 0, 255, 0.2)',
r: '7px',
},
'mjx-help > svg > line': {
'stroke-width': '2.5px',
'stroke-linecap': 'round',
},
'mjx-help:hover > svg > circle:nth-child(2)': {
fill: 'white',
},
'mjx-container.mjx-explorer-active > mjx-help': {
display: 'inline-flex',
'align-items': 'center',
},
'mjx-help-sizer': {
position: 'fixed',
width: '40%',
'max-width': '30em',
top: '3em',
left: '50%',
},
'mjx-help-dialog': {
position: 'absolute',
width: '200%',
left: '-100%',
border: '3px outset',
'border-radius': '15px',
color: 'black',
'background-color': '#DDDDDD',
'z-index': '301',
'text-align': 'right',
'font-style': 'normal',
'text-indent': 0,
'text-transform': 'none',
'line-height': 'normal',
'letter-spacing': 'normal',
'word-spacing': 'normal',
'word-wrap': 'normal',
float: 'none',
'box-shadow': '0px 10px 20px #808080',
outline: 'none',
},
'mjx-help-dialog > h1': {
'font-size': '24px',
'text-align': 'center',
margin: '.5em 0',
},
'mjx-help-dialog > div': {
margin: '0 1em',
padding: '3px',
overflow: 'auto',
height: '20em',
border: '2px inset black',
'background-color': 'white',
'text-align': 'left',
},
'mjx-help-dialog > input': {
margin: '.5em 2em',
},
'mjx-help-dialog kbd': {
display: 'inline-block',
padding: '3px 5px',
'font-size': '11px',
'line-height': '10px',
color: '#444d56',
'vertical-align': 'middle',
'background-color': '#fafbfc',
border: 'solid 1.5px #c6cbd1',
'border-bottom-color': '#959da5',
'border-radius': '3px',
'box-shadow': 'inset -.5px -1px 0 #959da5',
},
'mjx-help-dialog ul': {
'list-style-type': 'none',
},
'mjx-help-dialog li': {
'margin-bottom': '.5em',
},
'mjx-help-background': {
position: 'fixed',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
},
_a;
}
function ExplorerHandler(handler, MmlJax = null) {
if (!handler.documentClass.prototype.attachSpeech) {
handler = SpeechHandler(handler, MmlJax);
}
handler.documentClass = ExplorerMathDocumentMixin(handler.documentClass);
return handler;
}
function setA11yOptions(document, options) {
var _a;
const sreOptions = engineSetup();
for (const key in options) {
if (document.options.a11y[key] !== undefined) {
setA11yOption(document, key, options[key]);
}
else if (sreOptions[key] !== undefined) {
document.options.sre[key] = options[key];
}
}
if (options.roleDescription) {
document.options.MathItem.roleDescription = options.roleDescription;
}
for (const item of document.math) {
(_a = item === null || item === void 0 ? void 0 : item.explorers) === null || _a === void 0 ? void 0 : _a.attach();
}
}
function setA11yOption(document, option, value) {
switch (option) {
case 'speechRules': {
const [domain, style] = value.split('-');
document.options.sre.domain = domain;
document.options.sre.style = style;
break;
}
case 'magnification':
switch (value) {
case 'None':
document.options.a11y.magnification = value;
document.options.a11y.keyMagnifier = false;
document.options.a11y.mouseMagnifier = false;
break;
case 'Keyboard':
document.options.a11y.magnification = value;
document.options.a11y.keyMagnifier = true;
document.options.a11y.mouseMagnifier = false;
break;
case 'Mouse':
document.options.a11y.magnification = value;
document.options.a11y.keyMagnifier = false;
document.options.a11y.mouseMagnifier = true;
break;
}
break;
case 'highlight':
switch (value) {
case 'None':
document.options.a11y.highlight = value;
document.options.a11y.hover = false;
document.options.a11y.flame = false;
break;
case 'Hover':
document.options.a11y.highlight = value;
document.options.a11y.hover = true;
document.options.a11y.flame = false;
break;
case 'Flame':
document.options.a11y.highlight = value;
document.options.a11y.hover = false;
document.options.a11y.flame = true;
break;
}
break;
case 'locale':
document.options.sre.locale = value;
break;
default:
document.options.a11y[option] = value;
}
}
//# sourceMappingURL=explorer.js.map
;// ./components/mjs/a11y/explorer/lib/explorer.js
if (MathJax.loader) {
MathJax.loader.checkVersion('a11y/explorer', VERSION, 'a11y');
}
combineWithMathJax({_: {
a11y: {
explorer_ts: explorer_namespaceObject,
explorer: {
Explorer: Explorer_namespaceObject,
ExplorerPool: ExplorerPool_namespaceObject,
Highlighter: Highlighter_namespaceObject,
KeyExplorer: KeyExplorer_namespaceObject,
MouseExplorer: MouseExplorer_namespaceObject,
Region: Region_namespaceObject,
TreeExplorer: TreeExplorer_namespaceObject
}
}
}});
;// ./components/mjs/a11y/explorer/explorer.js
if (MathJax.startup && hasWindow) {
MathJax.startup.extendHandler(handler => ExplorerHandler(handler));
}
/******/ })()
; mathjaxr/inst/doc/mathjax/a11y/speech.js 0000644 0001762 0000144 00000126605 15112352603 017636 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/a11y/speech/SpeechUtil.js
var SpeechUtil_namespaceObject = {};
__webpack_require__.r(SpeechUtil_namespaceObject);
__webpack_require__.d(SpeechUtil_namespaceObject, {
InPlace: () => (InPlace),
SemAttr: () => (SemAttr),
buildLabel: () => (buildLabel),
buildSpeech: () => (buildSpeech),
honk: () => (honk),
ssmlParsing: () => (ssmlParsing)
});
// NAMESPACE OBJECT: ./mjs/a11y/speech/GeneratorPool.js
var GeneratorPool_namespaceObject = {};
__webpack_require__.r(GeneratorPool_namespaceObject);
__webpack_require__.d(GeneratorPool_namespaceObject, {
GeneratorPool: () => (GeneratorPool)
});
// NAMESPACE OBJECT: ./mjs/a11y/speech/WebWorker.js
var WebWorker_namespaceObject = {};
__webpack_require__.r(WebWorker_namespaceObject);
__webpack_require__.d(WebWorker_namespaceObject, {
WorkerHandler: () => (WorkerHandler)
});
// NAMESPACE OBJECT: ./mjs/a11y/speech.js
var speech_namespaceObject = {};
__webpack_require__.r(speech_namespaceObject);
__webpack_require__.d(speech_namespaceObject, {
SpeechHandler: () => (SpeechHandler),
SpeechMathDocumentMixin: () => (SpeechMathDocumentMixin),
SpeechMathItemMixin: () => (SpeechMathItemMixin)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/a11y/semantic-enrich/lib/a11y/semantic-enrich.js
const semantic_enrich_def = MathJax._.a11y['semantic-enrich'];
const enrichVisitor = semantic_enrich_def.enrichVisitor;
const EnrichedMathItemMixin = semantic_enrich_def.EnrichedMathItemMixin;
const EnrichedMathDocumentMixin = semantic_enrich_def.EnrichedMathDocumentMixin;
const EnrichHandler = semantic_enrich_def.EnrichHandler;
;// ./components/mjs/core/lib/core/MathItem.js
const MathItem_def = MathJax._.core.MathItem;
const protoItem = MathItem_def.protoItem;
const AbstractMathItem = MathItem_def.AbstractMathItem;
const STATE = MathItem_def.STATE;
const newState = MathItem_def.newState;
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./components/mjs/a11y/sre/lib/a11y/sre.js
const sre_def = MathJax._.a11y.sre_ts;
const locales = sre_def.locales;
const setupEngine = sre_def.setupEngine;
const engineSetup = sre_def.engineSetup;
const toEnriched = sre_def.toEnriched;
const parseDOM = sre_def.parseDOM;
const addPreference = sre_def.addPreference;
const fromPreference = sre_def.fromPreference;
const toPreference = sre_def.toPreference;
;// ./mjs/a11y/speech/SpeechUtil.js
const ProsodyKeys = ['pitch', 'rate', 'volume'];
function ssmlParsing(speech) {
const xml = parseDOM(speech);
const instr = [];
const text = [];
recurseSsml(Array.from(xml.childNodes), instr, text);
return [text.join(' '), instr];
}
function recurseSsml(nodes, instr, text, prosody = {}) {
for (const node of nodes) {
if (node.nodeType === 3) {
const content = node.textContent.trim();
if (content) {
text.push(content);
instr.push(Object.assign({ text: content }, prosody));
}
continue;
}
if (node.nodeType === 1) {
const element = node;
const tag = element.tagName;
if (tag === 'speak') {
continue;
}
if (tag === 'prosody') {
recurseSsml(Array.from(node.childNodes), instr, text, getProsody(element, prosody));
continue;
}
switch (tag) {
case 'break':
instr.push({ pause: element.getAttribute('time') });
break;
case 'mark':
instr.push({ mark: element.getAttribute('name') });
break;
case 'say-as': {
const txt = element.textContent;
instr.push(Object.assign({ text: txt, character: true }, prosody));
text.push(txt);
break;
}
}
}
}
}
const combinePros = {
pitch: (x, _sign) => 1 * (x / 100),
volume: (x, _sign) => 0.5 * (x / 100),
rate: (x, _sign) => 1 * (x / 100),
};
function getProsody(element, prosody) {
const combine = {};
for (const pros of ProsodyKeys) {
if (element.hasAttribute(pros)) {
const [sign, value] = extractProsody(element.getAttribute(pros));
if (!sign) {
combine[pros] = pros === 'volume' ? 0.5 : 1;
continue;
}
let orig = prosody[pros];
orig = orig ? orig : pros === 'volume' ? 0.5 : 1;
const relative = combinePros[pros](parseInt(value, 10), sign);
combine[pros] = sign === '-' ? orig - relative : orig + relative;
}
}
return combine;
}
const prosodyRegexp = /([+-]?)([0-9]+)%/;
function extractProsody(attr) {
const match = attr.match(prosodyRegexp);
if (!match) {
console.warn('Something went wrong with the prosody matching.');
return ['', '100'];
}
return [match[1], match[2]];
}
function buildLabel(speech, prefix, postfix, sep = ' ') {
if (!speech) {
return '';
}
const label = [speech];
if (prefix) {
label.unshift(prefix);
}
if (postfix) {
label.push(postfix);
}
return label.join(sep);
}
function buildSpeech(speech, locale = 'en', rate = '100') {
return ssmlParsing('` +
`${speech}` +
' ');
}
function honk() {
const ac = new AudioContext();
const os = ac.createOscillator();
os.frequency.value = 300;
os.connect(ac.destination);
os.start(ac.currentTime);
os.stop(ac.currentTime + 0.05);
}
var InPlace;
(function (InPlace) {
InPlace[InPlace["NONE"] = 0] = "NONE";
InPlace[InPlace["DEPTH"] = 1] = "DEPTH";
InPlace[InPlace["SUMMARY"] = 2] = "SUMMARY";
})(InPlace || (InPlace = {}));
var SemAttr;
(function (SemAttr) {
SemAttr["SPEECH"] = "data-semantic-speech-none";
SemAttr["SPEECH_SSML"] = "data-semantic-speech";
SemAttr["SUMMARY"] = "data-semantic-summary-none";
SemAttr["SUMMARY_SSML"] = "data-semantic-summary";
SemAttr["PREFIX"] = "data-semantic-prefix-none";
SemAttr["PREFIX_SSML"] = "data-semantic-prefix";
SemAttr["POSTFIX"] = "data-semantic-postfix-none";
SemAttr["POSTFIX_SSML"] = "data-semantic-postfix";
SemAttr["BRAILLE"] = "data-semantic-braille";
})(SemAttr || (SemAttr = {}));
//# sourceMappingURL=SpeechUtil.js.map
;// ./mjs/a11y/speech/GeneratorPool.js
class GeneratorPool {
constructor() {
this.promise = Promise.resolve();
this.adaptor = null;
this._options = {};
this._init = false;
}
set element(element) {
this._element = element;
}
get element() {
return this._element;
}
set options(options) {
this._options = Object.assign({}, (options === null || options === void 0 ? void 0 : options.sre) || {}, {
enableSpeech: options.enableSpeech,
enableBraille: options.enableBraille,
});
delete this._options.custom;
}
get options() {
return this._options;
}
init(options, adaptor, webworker) {
this.options = options;
if (this._init)
return;
this.adaptor = adaptor;
this.webworker = webworker;
this._init = true;
}
update(options) {
Object.assign(this.options, options);
}
Speech(item) {
const mml = item.outputData.mml;
const options = Object.assign({}, this.options, { modality: 'speech' });
return (this.promise = this.webworker.Speech(mml, options, item));
}
SpeechFor(item, mml) {
const options = Object.assign({}, this.options, { modality: 'speech' });
return this.webworker.speechFor(mml, options, item);
}
cancel(item) {
var _a;
(_a = this.webworker) === null || _a === void 0 ? void 0 : _a.Cancel(item);
}
updateRegions(node, speechRegion, brailleRegion) {
speechRegion.Update(this.getLabel(node));
brailleRegion.Update(this.getBraille(node));
}
getOptions(node) {
var _a, _b, _c, _d;
return {
locale: (_a = this.adaptor.getAttribute(node, 'data-semantic-locale')) !== null && _a !== void 0 ? _a : '',
domain: (_b = this.adaptor.getAttribute(node, 'data-semantic-domain')) !== null && _b !== void 0 ? _b : '',
style: (_c = this.adaptor.getAttribute(node, 'data-semantic-style')) !== null && _c !== void 0 ? _c : '',
domain2style: (_d = this.adaptor.getAttribute(node, 'data-semantic-domain2style')) !== null && _d !== void 0 ? _d : '',
};
}
nextRules(item) {
const options = this.getOptions(item.typesetRoot);
this.update(options);
return (this.promise = this.webworker.nextRules(item.outputData.mml, Object.assign({}, this.options, { modality: 'speech' }), item));
}
nextStyle(node, item) {
const options = this.getOptions(item.typesetRoot);
this.update(options);
return (this.promise = this.webworker.nextStyle(item.outputData.mml, Object.assign({}, this.options, { modality: 'speech' }), this.adaptor.getAttribute(node, 'data-semantic-id'), item));
}
getLabel(node, _center = '', sep = ' ') {
const adaptor = this.adaptor;
return (buildLabel(adaptor.getAttribute(node, SemAttr.SPEECH_SSML), adaptor.getAttribute(node, SemAttr.PREFIX_SSML), adaptor.getAttribute(node, SemAttr.POSTFIX_SSML), sep) || adaptor.getAttribute(node, 'aria-label'));
}
getBraille(node) {
const adaptor = this.adaptor;
return (adaptor.getAttribute(node, 'aria-braillelabel') ||
adaptor.getAttribute(node, SemAttr.BRAILLE));
}
getLocalePreferences(prefs) {
return (this.promise = this.webworker.clearspeakLocalePreferences(this.options, prefs));
}
getRelevantPreferences(item, semantic, prefs, counter) {
const mml = item.outputData.mml;
return (this.promise = this.webworker.clearspeakRelevantPreferences(mml, semantic, prefs, counter));
}
}
//# sourceMappingURL=GeneratorPool.js.map
;// ./mjs/a11y/speech/WebWorker.js
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
class Task {
constructor(cmd, item, resolve, reject) {
this.cmd = cmd;
this.item = item;
this.resolve = resolve;
this.reject = reject;
}
}
class WorkerHandler {
constructor(adaptor, options) {
this.adaptor = adaptor;
this.options = options;
this.ready = false;
this.tasks = [];
this.Commands = {
Ready(handler, _data) {
handler.ready = true;
handler.postNext();
},
Finished(handler, data) {
const task = handler.tasks.shift();
if (data.success) {
task.resolve(data.result);
}
else {
task.reject(data.error);
}
handler.postNext();
},
Log(handler, data) {
if (handler.options.debug) {
console.log('Log:', data);
}
},
};
}
Start() {
return __awaiter(this, void 0, void 0, function* () {
if (this.ready)
throw Error('Worker already started');
this.worker = yield this.adaptor.createWorker(this.Listener.bind(this), this.options);
});
}
debug(msg, ...rest) {
if (this.options.debug) {
console.info(msg, ...rest);
}
}
Listener(event) {
this.debug('Worker >>> Client:', event.data);
if (Object.hasOwn(this.Commands, event.data.cmd)) {
this.Commands[event.data.cmd](this, event.data.data);
}
else {
this.debug('Invalid command from worker: ' + event.data.cmd);
}
}
Post(msg, item) {
const promise = new Promise((resolve, reject) => {
this.tasks.push(new Task(msg, item, resolve, reject));
});
if (this.ready && this.tasks.length === 1) {
this.postNext();
}
return promise;
}
postNext() {
if (this.tasks.length) {
const msg = Object.assign({}, this.tasks[0].cmd, {
debug: this.options.debug,
});
this.worker.postMessage(msg);
}
}
Cancel(item) {
const i = this.tasks.findIndex((task) => task.item === item);
if (i > 0) {
this.tasks[i].reject(`Task ${this.tasks[i].cmd.cmd} cancelled`);
this.tasks.splice(i, 1);
}
}
Setup(options) {
return this.Post({
cmd: 'setup',
data: {
domain: options.domain,
style: options.style,
locale: options.locale,
modality: options.modality,
},
});
}
Speech(math, options, item) {
return __awaiter(this, void 0, void 0, function* () {
this.Attach(item, options.enableSpeech, options.enableBraille, yield this.Post({
cmd: 'speech',
data: { mml: math, options: options },
}, item));
});
}
nextRules(math, options, item) {
return __awaiter(this, void 0, void 0, function* () {
this.Attach(item, options.enableSpeech, options.enableBraille, yield this.Post({
cmd: 'nextRules',
data: { mml: math, options: options },
}, item));
});
}
nextStyle(math, options, nodeId, item) {
return __awaiter(this, void 0, void 0, function* () {
this.Attach(item, options.enableSpeech, options.enableBraille, yield this.Post({
cmd: 'nextStyle',
data: {
mml: math,
options: options,
nodeId: nodeId,
},
}, item));
});
}
speechFor(math, options, item) {
return __awaiter(this, void 0, void 0, function* () {
const data = yield this.Post({
cmd: 'speech',
data: { mml: math, options: options },
}, item);
return JSON.parse(data);
});
}
Attach(item, speech, braille, structure) {
const data = JSON.parse(structure);
const container = item.typesetRoot;
if (!container)
return;
this.setSpecialAttributes(container, data.options, 'data-semantic-', [
'locale',
'domain',
'style',
'domain2style',
]);
const adaptor = this.adaptor;
this.setSpecialAttributes(container, data.translations, 'data-semantic-');
for (const [id, sid] of Object.entries(data.mactions)) {
let node = adaptor.getElement('#' + id, container);
if (!node || !adaptor.childNodes(node)[0]) {
continue;
}
node = adaptor.childNodes(node)[0];
adaptor.setAttribute(node, 'data-semantic-type', 'dummy');
this.setSpecialAttributes(node, sid, '');
}
this.setSpeechAttributes(adaptor.childNodes(container)[0], '', data, speech, braille);
if (speech) {
if (data.label) {
adaptor.setAttribute(container, SemAttr.SPEECH, data.label);
adaptor.setAttribute(container, SemAttr.SPEECH_SSML, data.ssml);
item.outputData.speech = data.label;
}
adaptor.setAttribute(container, 'data-speech-attached', 'true');
}
if (braille) {
if (data.braillelabel) {
adaptor.setAttribute(container, SemAttr.BRAILLE, data.braillelabel);
item.outputData.braille = data.braillelabel;
}
if (data.braille) {
adaptor.setAttribute(container, 'data-braille-attached', 'true');
}
}
}
setSpeechAttribute(node, data, speech, braille) {
var _a, _b;
const adaptor = this.adaptor;
const id = adaptor.getAttribute(node, 'data-semantic-id');
adaptor.removeAttribute(node, 'data-speech-node');
if (speech && data.speech[id]['speech-none']) {
adaptor.setAttribute(node, 'data-speech-node', 'true');
for (let [key, value] of Object.entries(data.speech[id])) {
key = key.replace(/-ssml$/, '');
if (value) {
adaptor.setAttribute(node, `data-semantic-${key}`, value);
}
}
}
if (braille && ((_b = (_a = data.braille) === null || _a === void 0 ? void 0 : _a[id]) === null || _b === void 0 ? void 0 : _b['braille-none'])) {
adaptor.setAttribute(node, 'data-speech-node', 'true');
const value = data.braille[id]['braille-none'];
adaptor.setAttribute(node, SemAttr.BRAILLE, value);
}
}
setSpeechAttributes(root, rootId, data, speech, braille) {
const adaptor = this.adaptor;
if (!root ||
adaptor.kind(root) === '#text' ||
adaptor.kind(root) === '#comment') {
return rootId;
}
root = root;
if (adaptor.hasAttribute(root, 'data-semantic-id')) {
this.setSpeechAttribute(root, data, speech, braille);
if (!rootId && !adaptor.hasAttribute(root, 'data-semantic-parent')) {
rootId = adaptor.getAttribute(root, 'data-semantic-id');
}
}
for (const child of Array.from(adaptor.childNodes(root))) {
rootId = this.setSpeechAttributes(child, rootId, data, speech, braille);
}
return rootId;
}
setSpecialAttributes(node, map, prefix, keys) {
if (!map)
return;
keys = keys || Object.keys(map);
for (const key of keys) {
const value = map[key];
if (value) {
this.adaptor.setAttribute(node, `${prefix}${key.toLowerCase()}`, value);
}
}
}
Detach(item) {
const container = item.typesetRoot;
this.adaptor.removeAttribute(container, 'data-speech-attached');
this.adaptor.removeAttribute(container, 'data-braille-attached');
this.detachSpeech(container);
}
detachSpeech(node) {
const adaptor = this.adaptor;
const children = adaptor.childNodes(node);
if (!children)
return;
if (adaptor.kind(node) !== '#text') {
for (const key of [
'none',
'summary-none',
'speech',
'speech-none',
'summary',
'braille',
]) {
adaptor.removeAttribute(node, `data-semantic-${key}`);
}
}
for (const child of children) {
this.detachSpeech(child);
}
}
Terminate() {
this.debug('Terminating pending tasks');
for (const task of this.tasks) {
task.reject(`${task.cmd.data.cmd} cancelled by WorkerHandler termination`);
}
this.tasks = [];
this.debug('Terminating worker');
return this.worker.terminate();
}
Stop() {
return __awaiter(this, void 0, void 0, function* () {
if (!this.worker) {
throw Error('Worker has not been started');
}
yield this.Terminate();
this.worker = null;
this.ready = false;
});
}
clearspeakLocalePreferences(options, prefs) {
return __awaiter(this, void 0, void 0, function* () {
yield this.Post({
cmd: 'localePreferences',
data: {
options: options,
},
}).then((data) => {
prefs.set(options.locale, JSON.parse(data));
});
});
}
clearspeakRelevantPreferences(math, nodeId, prefs, counter) {
return __awaiter(this, void 0, void 0, function* () {
yield this.Post({
cmd: 'relevantPreferences',
data: {
mml: math,
id: nodeId,
},
}).then((e) => {
prefs.set(counter, e);
});
});
}
}
//# sourceMappingURL=WebWorker.js.map
;// ./components/root-pack.js
//
// Replacement for __dirname for root directory
//
const config = global_MathJax.config || {};
const mjxRoot = () => config?.loader?.paths?.mathjax || config?.__dirname || '/';
;// ./mjs/components/mjs/sre-root.js
//
// Replacement for __dirname for sre-root directory
//
const sreRoot = () => mjxRoot() + '/sre';
;// ./mjs/a11y/speech.js
var speech_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
newState('ATTACHSPEECH', STATE.INSERTED + 10);
function SpeechMathItemMixin(EnrichedMathItem) {
return class extends EnrichedMathItem {
constructor() {
super(...arguments);
this.generatorPool = new GeneratorPool();
}
attachSpeech(document) {
this.outputData.speechPromise = null;
if (this.state() >= STATE.ATTACHSPEECH)
return;
this.state(STATE.ATTACHSPEECH);
if (this.isEscaped ||
!(document.options.enableSpeech || document.options.enableBraille) ||
!document.options.enableEnrichment) {
return;
}
document.getWebworker();
this.generatorPool.init(document.options, document.adaptor, document.webworker);
this.outputData.mml = this.toMathML(this.root, this);
const promise = this.generatorPool
.Speech(this)
.catch((err) => document.options.speechError(document, this, err));
document.savePromise(promise);
this.outputData.speechPromise = promise;
}
detachSpeech(document) {
document.webworker.Detach(this);
}
speechFor(mml) {
return speech_awaiter(this, void 0, void 0, function* () {
mml = this.toEnriched(mml);
const data = yield this.generatorPool.SpeechFor(this, mml);
return [data.label, data.braillelabel];
});
}
clear() {
this.generatorPool.cancel(this);
}
};
}
function SpeechMathDocumentMixin(EnrichedMathDocument) {
var _a;
return _a = class extends EnrichedMathDocument {
constructor(...args) {
super(...args);
this.webworker = null;
const ProcessBits = this.constructor
.ProcessBits;
if (!ProcessBits.has('attach-speech')) {
ProcessBits.allocate('attach-speech');
}
this.options.MathItem = SpeechMathItemMixin(this.options.MathItem);
}
getWebworker() {
if (this.webworker)
return;
this.webworker = new WorkerHandler(this.adaptor, this.options.worker);
this.webworker.Start();
}
attachSpeech() {
if (!this.processed.isSet('attach-speech')) {
const options = this.options;
if (options.enableEnrichment &&
(options.enableSpeech || options.enableBraille)) {
this.getWebworker();
for (const math of this.math) {
math.attachSpeech(this);
}
}
this.processed.set('attach-speech');
}
return this;
}
speechError(_doc, _math, err) {
console.warn('Speech generation error:', err);
}
state(state, restore = false) {
super.state(state, restore);
if (state < STATE.ATTACHSPEECH) {
this.processed.clear('attach-speech');
if (state >= STATE.TYPESET) {
for (const math of this.math) {
math.detachSpeech(this);
}
}
}
return this;
}
done() {
const _super = Object.create(null, {
done: { get: () => super.done }
});
return speech_awaiter(this, void 0, void 0, function* () {
var _b;
yield ((_b = this.webworker) === null || _b === void 0 ? void 0 : _b.Stop());
return _super.done.call(this);
});
}
},
_a.OPTIONS = Object.assign(Object.assign({}, EnrichedMathDocument.OPTIONS), { enableSpeech: true, enableBraille: true, speechError: (doc, math, err) => doc.speechError(doc, math, err), renderActions: expandable(Object.assign(Object.assign({}, EnrichedMathDocument.OPTIONS.renderActions), { attachSpeech: [STATE.ATTACHSPEECH] })), worker: {
path: sreRoot(),
maps: sreRoot().replace(/[cm]js\/a11y\/sre$/, 'bundle/sre/mathmaps'),
worker: 'speech-worker.js',
debug: false,
}, a11y: expandable({
speech: true,
braille: true,
}) }),
_a;
}
function SpeechHandler(handler, MmlJax) {
if (!handler.documentClass.prototype.enrich && MmlJax) {
handler = EnrichHandler(handler, MmlJax);
}
handler.documentClass = SpeechMathDocumentMixin(handler.documentClass);
return handler;
}
//# sourceMappingURL=speech.js.map
;// ./components/mjs/a11y/speech/lib/speech.js
if (MathJax.loader) {
MathJax.loader.checkVersion('a11y/speech', VERSION, 'a11y');
}
combineWithMathJax({_: {
a11y: {
speech_ts: speech_namespaceObject,
speech: {
GeneratorPool: GeneratorPool_namespaceObject,
SpeechUtil: SpeechUtil_namespaceObject,
WebWorker: WebWorker_namespaceObject
}
}
}});
;// ./components/mjs/core/lib/util/FunctionList.js
const FunctionList_def = MathJax._.util.FunctionList;
const FunctionList = FunctionList_def.FunctionList;
;// ./mjs/components/mjs/root.js
//
// Replacement for __dirname for root directory
//
const root_config = global_MathJax.config || {};
const root_mjxRoot = () => root_config?.loader?.paths?.mathjax || root_config?.__dirname || '/';
;// ./components/mjs/core/lib/util/context.js
const context_def = MathJax._.util.context;
const hasWindow = context_def.hasWindow;
const context = context_def.context;
;// ./mjs/components/loader.js
var loader_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const PathFilters = {
source: (data) => {
if (Object.hasOwn(CONFIG.source, data.name)) {
data.name = CONFIG.source[data.name];
}
return true;
},
normalize: (data) => {
const name = data.name;
if (!name.match(/^(?:[a-z]+:\/)?\/|[a-z]:\\|\[/i)) {
data.name = '[mathjax]/' + name.replace(/^\.\//, '');
}
return true;
},
prefix: (data) => {
let match;
while ((match = data.name.match(/^\[([^\]]*)\]/))) {
if (!Object.hasOwn(CONFIG.paths, match[1]))
break;
data.name = CONFIG.paths[match[1]] + data.name.substring(match[0].length);
}
return true;
},
addExtension: (data) => {
if (data.addExtension && !data.name.match(/\.[^/]+$/)) {
data.name += '.js';
}
return true;
},
};
const loader_VERSION = global_MathJax.version;
const Loader = {
versions: new Map(),
nestedLoads: [],
ready(...names) {
if (names.length === 0) {
names = Array.from(Package.packages.keys());
}
const promises = [];
for (const name of names) {
const extension = Package.packages.get(name) || new Package(name, true);
promises.push(extension.promise);
}
return Promise.all(promises);
},
load(...names) {
if (names.length === 0) {
return Promise.resolve([]);
}
let nested = [];
this.nestedLoads.unshift(nested);
const promise = Promise.resolve().then(() => loader_awaiter(this, void 0, void 0, function* () {
const promises = [];
for (const name of names) {
let extension = Package.packages.get(name);
if (!extension) {
extension = new Package(name);
extension.provides(CONFIG.provides[name]);
}
extension.checkNoLoad();
promises.push(extension.promise.then(() => {
if (CONFIG.versionWarnings &&
extension.isLoaded &&
!Loader.versions.has(Package.resolvePath(name))) {
console.warn(`No version information available for component ${name}`);
}
return extension.result;
}));
}
Package.loadAll();
const result = yield Promise.all(promises);
while (nested.length) {
const promise = Promise.all(nested);
nested = this.nestedLoads[this.nestedLoads.indexOf(nested)] = [];
yield promise;
}
this.nestedLoads.splice(this.nestedLoads.indexOf(nested), 1);
return result;
}));
this.nestedLoads
.slice(1)
.forEach((list) => list.push(promise));
return promise;
},
preLoaded(...names) {
for (const name of names) {
let extension = Package.packages.get(name);
if (!extension) {
extension = new Package(name, true);
extension.provides(CONFIG.provides[name]);
}
extension.loaded();
}
},
addPackageData(name, data) {
let config = CONFIG[name];
if (!config) {
config = CONFIG[name] = {};
}
for (const [key, value] of Object.entries(data)) {
if (Array.isArray(value)) {
if (!config[key]) {
config[key] = [];
}
const set = new Set([...config[key], ...value]);
config[key] = [...set];
}
else {
config[key] = value;
}
}
},
defaultReady() {
if (typeof loader_MathJax.startup !== 'undefined') {
loader_MathJax.config.startup.ready();
}
},
getRoot() {
if (context.document) {
const script = context.document.currentScript ||
context.document.getElementById('MathJax-script');
if (script && script instanceof HTMLScriptElement) {
return script.src.replace(/\/[^/]*$/, '');
}
}
return root_mjxRoot();
},
checkVersion(name, version, _type) {
this.saveVersion(name);
if (CONFIG.versionWarnings && version !== loader_VERSION) {
console.warn(`Component ${name} uses ${version} of MathJax; version in use is ${loader_VERSION}`);
return true;
}
return false;
},
saveVersion(name) {
Loader.versions.set(Package.resolvePath(name), loader_VERSION);
},
pathFilters: new FunctionList(),
};
Loader.pathFilters.add(PathFilters.source, 0);
Loader.pathFilters.add(PathFilters.normalize, 10);
Loader.pathFilters.add(PathFilters.prefix, 20);
Loader.pathFilters.add(PathFilters.addExtension, 30);
const loader_MathJax = global_MathJax;
if (typeof loader_MathJax.loader === 'undefined') {
combineDefaults(loader_MathJax.config, 'loader', {
paths: {
mathjax: Loader.getRoot(),
},
source: {},
dependencies: {},
provides: {},
load: [],
ready: Loader.defaultReady.bind(Loader),
failed: (error) => console.log(`MathJax(${error.package || '?'}): ${error.message}`),
require: null,
pathFilters: [],
versionWarnings: true,
});
combineWithMathJax({
loader: Loader,
});
for (const filter of loader_MathJax.config.loader.pathFilters) {
if (Array.isArray(filter)) {
Loader.pathFilters.add(filter[0], filter[1]);
}
else {
Loader.pathFilters.add(filter);
}
}
}
const CONFIG = loader_MathJax.config.loader;
//# sourceMappingURL=loader.js.map
;// ./mjs/components/package.js
class PackageError extends Error {
constructor(message, name) {
super(message);
this.package = name;
}
}
class Package {
get canLoad() {
return (this.dependencyCount === 0 &&
!this.noLoad &&
!this.isLoading &&
!this.hasFailed);
}
static loadPromise(name) {
const config = (CONFIG[name] || {});
const promise = config.extraLoads
? Loader.load(...config.extraLoads)
: Promise.resolve();
const checkReady = config.checkReady || (() => Promise.resolve());
return promise.then(() => checkReady());
}
static resolvePath(name, addExtension = true) {
const data = { name, original: name, addExtension };
Loader.pathFilters.execute(data);
return data.name;
}
static loadAll() {
for (const extension of this.packages.values()) {
if (extension.canLoad) {
extension.load();
}
}
}
constructor(name, noLoad = false) {
this.isLoaded = false;
this.result = {};
this.isLoading = false;
this.hasFailed = false;
this.dependents = [];
this.dependencies = [];
this.dependencyCount = 0;
this.provided = [];
this.name = name;
this.noLoad = noLoad;
Package.packages.set(name, this);
this.promise = this.makePromise(this.makeDependencies());
}
makeDependencies() {
const promises = [];
const map = Package.packages;
const noLoad = this.noLoad;
const name = this.name;
const dependencies = [];
if (Object.hasOwn(CONFIG.dependencies, name)) {
dependencies.push(...CONFIG.dependencies[name]);
}
else if (name !== 'core') {
dependencies.push('core');
}
for (const dependent of dependencies) {
const extension = map.get(dependent) || new Package(dependent, noLoad);
if (!this.dependencies.includes(extension)) {
extension.addDependent(this, noLoad);
this.dependencies.push(extension);
if (!extension.isLoaded) {
this.dependencyCount++;
promises.push(extension.promise);
}
}
}
return promises;
}
makePromise(promises) {
let promise = new Promise(((resolve, reject) => {
this.resolve = resolve;
this.reject = reject;
}));
const config = (CONFIG[this.name] || {});
if (config.ready) {
promise = promise.then((_name) => config.ready(this.name));
}
if (promises.length) {
promises.push(promise);
promise = Promise.all(promises).then((names) => names.join(', '));
}
if (config.failed) {
promise.catch((message) => config.failed(new PackageError(message, this.name)));
}
return promise;
}
load() {
if (!this.isLoaded && !this.isLoading && !this.noLoad) {
this.isLoading = true;
const url = Package.resolvePath(this.name);
if (CONFIG.require) {
this.loadCustom(url);
}
else {
this.loadScript(url);
}
}
}
loadCustom(url) {
try {
const result = CONFIG.require(url);
if (result instanceof Promise) {
result
.then((result) => (this.result = result))
.then(() => this.checkLoad())
.catch((err) => this.failed('Can\'t load "' + url + '"\n' + err.message.trim()));
}
else {
this.result = result;
this.checkLoad();
}
}
catch (err) {
this.failed(err.message);
}
}
loadScript(url) {
const script = context.document.createElement('script');
script.src = url;
script.charset = 'UTF-8';
script.onload = (_event) => this.checkLoad();
script.onerror = (_event) => this.failed('Can\'t load "' + url + '"');
context.document.head.appendChild(script);
}
loaded() {
this.isLoaded = true;
this.isLoading = false;
for (const dependent of this.dependents) {
dependent.requirementSatisfied();
}
for (const provided of this.provided) {
provided.loaded();
}
this.resolve(this.name);
}
failed(message) {
this.hasFailed = true;
this.isLoading = false;
this.reject(new PackageError(message, this.name));
}
checkLoad() {
Package.loadPromise(this.name)
.then(() => this.loaded())
.catch((message) => this.failed(message));
}
requirementSatisfied() {
if (this.dependencyCount) {
this.dependencyCount--;
if (this.canLoad) {
this.load();
}
}
}
provides(names = []) {
for (const name of names) {
let provided = Package.packages.get(name);
if (!provided) {
if (!CONFIG.dependencies[name]) {
CONFIG.dependencies[name] = [];
}
CONFIG.dependencies[name].push(name);
provided = new Package(name, true);
provided.isLoading = true;
}
this.provided.push(provided);
}
}
addDependent(extension, noLoad) {
this.dependents.push(extension);
if (!noLoad) {
this.checkNoLoad();
}
}
checkNoLoad() {
if (this.noLoad) {
this.noLoad = false;
for (const dependency of this.dependencies) {
dependency.checkNoLoad();
}
}
}
}
Package.packages = new Map();
//# sourceMappingURL=package.js.map
;// ./components/mjs/a11y/speech/speech.js
if (MathJax.loader) {
let path = Package.resolvePath('[sre]', false);
let maps = Package.resolvePath('[mathmaps]', false);
if (hasWindow) {
path = new URL(path, location).href;
maps = new URL(maps, location).href;
} else {
const REQUIRE = typeof require !== 'undefined' ? require : MathJax.config.loader.require;
if (REQUIRE?.resolve) {
path = REQUIRE.resolve(`${path}/require.mjs`).replace(/\/[^\/]*$/, '');
maps = REQUIRE.resolve(`${maps}/base.json`).replace(/\/[^\/]*$/, '');
} else {
path = maps = '';
}
}
if (path) {
combineDefaults(MathJax.config, 'options', { worker: { path, maps } });
}
}
if (MathJax.startup) {
MathJax.startup.extendHandler(handler => SpeechHandler(handler));
}
/******/ })()
; mathjaxr/inst/doc/mathjax/a11y/sre.js 0000644 0001762 0000144 00002232244 15112352605 017161 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 74:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ f: () => (/* binding */ SystemExternal)
/* harmony export */ });
/* harmony import */ var _variables_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(714);
/* harmony import */ var _lib_external_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(268);
const windowSupported = (() => !(typeof window === 'undefined'))();
const documentSupported = (() => windowSupported && !(typeof window.document === 'undefined'))();
const webworker = (() => !(typeof DedicatedWorkerGlobalScope === 'undefined'))();
const nodeRequire = () => {
try {
return eval('require');
}
catch (_err) {
return (_file) => null;
}
};
const SystemExternal = {
extRequire(library) {
if (typeof process !== 'undefined' && typeof require !== 'undefined') {
return nodeRequire()(library);
}
return null;
},
windowSupported: windowSupported,
documentSupported: documentSupported,
webworker: webworker,
xmldom: _lib_external_js__WEBPACK_IMPORTED_MODULE_1__/* .xmldom */ .Gb,
document: _lib_external_js__WEBPACK_IMPORTED_MODULE_1__/* .document */ .Al,
fs: documentSupported || webworker ? null : nodeRequire()('fs'),
url: _variables_js__WEBPACK_IMPORTED_MODULE_0__/* .Variables */ .u.url,
jsonPath: (function () {
if (documentSupported || webworker) {
return _variables_js__WEBPACK_IMPORTED_MODULE_0__/* .Variables */ .u.url;
}
if (process.env.SRE_JSON_PATH || global.SRE_JSON_PATH) {
return process.env.SRE_JSON_PATH || global.SRE_JSON_PATH;
}
try {
const path = nodeRequire().resolve('speech-rule-engine');
return path.replace(/sre\.js$/, '') + 'mathmaps';
}
catch (_err) {
}
try {
const path = nodeRequire().resolve('.');
return path.replace(/sre\.js$/, '') + 'mathmaps';
}
catch (_err) {
}
return typeof __dirname !== 'undefined'
? __dirname + (__dirname.match(/lib?$/) ? '/mathmaps' : '/lib/mathmaps')
: process.cwd() + '/lib/mathmaps';
})(),
xpath: _lib_external_js__WEBPACK_IMPORTED_MODULE_1__/* .xpath */ .Oe
};
//# sourceMappingURL=system_external.js.map
/***/ }),
/***/ 159:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var freeze = (__webpack_require__(870).freeze);
/**
* The entities that are predefined in every XML document.
*
* @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1
* @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML
* Wikipedia
*/
exports.XML_ENTITIES = freeze({
amp: '&',
apos: "'",
gt: '>',
lt: '<',
quot: '"',
});
/**
* A map of all entities that are detected in an HTML document.
* They contain all entries from `XML_ENTITIES`.
*
* @see {@link XML_ENTITIES}
* @see {@link DOMParser.parseFromString}
* @see {@link DOMImplementation.prototype.createHTMLDocument}
* @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5)
* Spec
* @see https://html.spec.whatwg.org/entities.json JSON
* @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names
* @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML
* Wikipedia (HTML)
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML
* Wikpedia (XHTML)
*/
exports.HTML_ENTITIES = freeze({
Aacute: '\u00C1',
aacute: '\u00E1',
Abreve: '\u0102',
abreve: '\u0103',
ac: '\u223E',
acd: '\u223F',
acE: '\u223E\u0333',
Acirc: '\u00C2',
acirc: '\u00E2',
acute: '\u00B4',
Acy: '\u0410',
acy: '\u0430',
AElig: '\u00C6',
aelig: '\u00E6',
af: '\u2061',
Afr: '\uD835\uDD04',
afr: '\uD835\uDD1E',
Agrave: '\u00C0',
agrave: '\u00E0',
alefsym: '\u2135',
aleph: '\u2135',
Alpha: '\u0391',
alpha: '\u03B1',
Amacr: '\u0100',
amacr: '\u0101',
amalg: '\u2A3F',
AMP: '\u0026',
amp: '\u0026',
And: '\u2A53',
and: '\u2227',
andand: '\u2A55',
andd: '\u2A5C',
andslope: '\u2A58',
andv: '\u2A5A',
ang: '\u2220',
ange: '\u29A4',
angle: '\u2220',
angmsd: '\u2221',
angmsdaa: '\u29A8',
angmsdab: '\u29A9',
angmsdac: '\u29AA',
angmsdad: '\u29AB',
angmsdae: '\u29AC',
angmsdaf: '\u29AD',
angmsdag: '\u29AE',
angmsdah: '\u29AF',
angrt: '\u221F',
angrtvb: '\u22BE',
angrtvbd: '\u299D',
angsph: '\u2222',
angst: '\u00C5',
angzarr: '\u237C',
Aogon: '\u0104',
aogon: '\u0105',
Aopf: '\uD835\uDD38',
aopf: '\uD835\uDD52',
ap: '\u2248',
apacir: '\u2A6F',
apE: '\u2A70',
ape: '\u224A',
apid: '\u224B',
apos: '\u0027',
ApplyFunction: '\u2061',
approx: '\u2248',
approxeq: '\u224A',
Aring: '\u00C5',
aring: '\u00E5',
Ascr: '\uD835\uDC9C',
ascr: '\uD835\uDCB6',
Assign: '\u2254',
ast: '\u002A',
asymp: '\u2248',
asympeq: '\u224D',
Atilde: '\u00C3',
atilde: '\u00E3',
Auml: '\u00C4',
auml: '\u00E4',
awconint: '\u2233',
awint: '\u2A11',
backcong: '\u224C',
backepsilon: '\u03F6',
backprime: '\u2035',
backsim: '\u223D',
backsimeq: '\u22CD',
Backslash: '\u2216',
Barv: '\u2AE7',
barvee: '\u22BD',
Barwed: '\u2306',
barwed: '\u2305',
barwedge: '\u2305',
bbrk: '\u23B5',
bbrktbrk: '\u23B6',
bcong: '\u224C',
Bcy: '\u0411',
bcy: '\u0431',
bdquo: '\u201E',
becaus: '\u2235',
Because: '\u2235',
because: '\u2235',
bemptyv: '\u29B0',
bepsi: '\u03F6',
bernou: '\u212C',
Bernoullis: '\u212C',
Beta: '\u0392',
beta: '\u03B2',
beth: '\u2136',
between: '\u226C',
Bfr: '\uD835\uDD05',
bfr: '\uD835\uDD1F',
bigcap: '\u22C2',
bigcirc: '\u25EF',
bigcup: '\u22C3',
bigodot: '\u2A00',
bigoplus: '\u2A01',
bigotimes: '\u2A02',
bigsqcup: '\u2A06',
bigstar: '\u2605',
bigtriangledown: '\u25BD',
bigtriangleup: '\u25B3',
biguplus: '\u2A04',
bigvee: '\u22C1',
bigwedge: '\u22C0',
bkarow: '\u290D',
blacklozenge: '\u29EB',
blacksquare: '\u25AA',
blacktriangle: '\u25B4',
blacktriangledown: '\u25BE',
blacktriangleleft: '\u25C2',
blacktriangleright: '\u25B8',
blank: '\u2423',
blk12: '\u2592',
blk14: '\u2591',
blk34: '\u2593',
block: '\u2588',
bne: '\u003D\u20E5',
bnequiv: '\u2261\u20E5',
bNot: '\u2AED',
bnot: '\u2310',
Bopf: '\uD835\uDD39',
bopf: '\uD835\uDD53',
bot: '\u22A5',
bottom: '\u22A5',
bowtie: '\u22C8',
boxbox: '\u29C9',
boxDL: '\u2557',
boxDl: '\u2556',
boxdL: '\u2555',
boxdl: '\u2510',
boxDR: '\u2554',
boxDr: '\u2553',
boxdR: '\u2552',
boxdr: '\u250C',
boxH: '\u2550',
boxh: '\u2500',
boxHD: '\u2566',
boxHd: '\u2564',
boxhD: '\u2565',
boxhd: '\u252C',
boxHU: '\u2569',
boxHu: '\u2567',
boxhU: '\u2568',
boxhu: '\u2534',
boxminus: '\u229F',
boxplus: '\u229E',
boxtimes: '\u22A0',
boxUL: '\u255D',
boxUl: '\u255C',
boxuL: '\u255B',
boxul: '\u2518',
boxUR: '\u255A',
boxUr: '\u2559',
boxuR: '\u2558',
boxur: '\u2514',
boxV: '\u2551',
boxv: '\u2502',
boxVH: '\u256C',
boxVh: '\u256B',
boxvH: '\u256A',
boxvh: '\u253C',
boxVL: '\u2563',
boxVl: '\u2562',
boxvL: '\u2561',
boxvl: '\u2524',
boxVR: '\u2560',
boxVr: '\u255F',
boxvR: '\u255E',
boxvr: '\u251C',
bprime: '\u2035',
Breve: '\u02D8',
breve: '\u02D8',
brvbar: '\u00A6',
Bscr: '\u212C',
bscr: '\uD835\uDCB7',
bsemi: '\u204F',
bsim: '\u223D',
bsime: '\u22CD',
bsol: '\u005C',
bsolb: '\u29C5',
bsolhsub: '\u27C8',
bull: '\u2022',
bullet: '\u2022',
bump: '\u224E',
bumpE: '\u2AAE',
bumpe: '\u224F',
Bumpeq: '\u224E',
bumpeq: '\u224F',
Cacute: '\u0106',
cacute: '\u0107',
Cap: '\u22D2',
cap: '\u2229',
capand: '\u2A44',
capbrcup: '\u2A49',
capcap: '\u2A4B',
capcup: '\u2A47',
capdot: '\u2A40',
CapitalDifferentialD: '\u2145',
caps: '\u2229\uFE00',
caret: '\u2041',
caron: '\u02C7',
Cayleys: '\u212D',
ccaps: '\u2A4D',
Ccaron: '\u010C',
ccaron: '\u010D',
Ccedil: '\u00C7',
ccedil: '\u00E7',
Ccirc: '\u0108',
ccirc: '\u0109',
Cconint: '\u2230',
ccups: '\u2A4C',
ccupssm: '\u2A50',
Cdot: '\u010A',
cdot: '\u010B',
cedil: '\u00B8',
Cedilla: '\u00B8',
cemptyv: '\u29B2',
cent: '\u00A2',
CenterDot: '\u00B7',
centerdot: '\u00B7',
Cfr: '\u212D',
cfr: '\uD835\uDD20',
CHcy: '\u0427',
chcy: '\u0447',
check: '\u2713',
checkmark: '\u2713',
Chi: '\u03A7',
chi: '\u03C7',
cir: '\u25CB',
circ: '\u02C6',
circeq: '\u2257',
circlearrowleft: '\u21BA',
circlearrowright: '\u21BB',
circledast: '\u229B',
circledcirc: '\u229A',
circleddash: '\u229D',
CircleDot: '\u2299',
circledR: '\u00AE',
circledS: '\u24C8',
CircleMinus: '\u2296',
CirclePlus: '\u2295',
CircleTimes: '\u2297',
cirE: '\u29C3',
cire: '\u2257',
cirfnint: '\u2A10',
cirmid: '\u2AEF',
cirscir: '\u29C2',
ClockwiseContourIntegral: '\u2232',
CloseCurlyDoubleQuote: '\u201D',
CloseCurlyQuote: '\u2019',
clubs: '\u2663',
clubsuit: '\u2663',
Colon: '\u2237',
colon: '\u003A',
Colone: '\u2A74',
colone: '\u2254',
coloneq: '\u2254',
comma: '\u002C',
commat: '\u0040',
comp: '\u2201',
compfn: '\u2218',
complement: '\u2201',
complexes: '\u2102',
cong: '\u2245',
congdot: '\u2A6D',
Congruent: '\u2261',
Conint: '\u222F',
conint: '\u222E',
ContourIntegral: '\u222E',
Copf: '\u2102',
copf: '\uD835\uDD54',
coprod: '\u2210',
Coproduct: '\u2210',
COPY: '\u00A9',
copy: '\u00A9',
copysr: '\u2117',
CounterClockwiseContourIntegral: '\u2233',
crarr: '\u21B5',
Cross: '\u2A2F',
cross: '\u2717',
Cscr: '\uD835\uDC9E',
cscr: '\uD835\uDCB8',
csub: '\u2ACF',
csube: '\u2AD1',
csup: '\u2AD0',
csupe: '\u2AD2',
ctdot: '\u22EF',
cudarrl: '\u2938',
cudarrr: '\u2935',
cuepr: '\u22DE',
cuesc: '\u22DF',
cularr: '\u21B6',
cularrp: '\u293D',
Cup: '\u22D3',
cup: '\u222A',
cupbrcap: '\u2A48',
CupCap: '\u224D',
cupcap: '\u2A46',
cupcup: '\u2A4A',
cupdot: '\u228D',
cupor: '\u2A45',
cups: '\u222A\uFE00',
curarr: '\u21B7',
curarrm: '\u293C',
curlyeqprec: '\u22DE',
curlyeqsucc: '\u22DF',
curlyvee: '\u22CE',
curlywedge: '\u22CF',
curren: '\u00A4',
curvearrowleft: '\u21B6',
curvearrowright: '\u21B7',
cuvee: '\u22CE',
cuwed: '\u22CF',
cwconint: '\u2232',
cwint: '\u2231',
cylcty: '\u232D',
Dagger: '\u2021',
dagger: '\u2020',
daleth: '\u2138',
Darr: '\u21A1',
dArr: '\u21D3',
darr: '\u2193',
dash: '\u2010',
Dashv: '\u2AE4',
dashv: '\u22A3',
dbkarow: '\u290F',
dblac: '\u02DD',
Dcaron: '\u010E',
dcaron: '\u010F',
Dcy: '\u0414',
dcy: '\u0434',
DD: '\u2145',
dd: '\u2146',
ddagger: '\u2021',
ddarr: '\u21CA',
DDotrahd: '\u2911',
ddotseq: '\u2A77',
deg: '\u00B0',
Del: '\u2207',
Delta: '\u0394',
delta: '\u03B4',
demptyv: '\u29B1',
dfisht: '\u297F',
Dfr: '\uD835\uDD07',
dfr: '\uD835\uDD21',
dHar: '\u2965',
dharl: '\u21C3',
dharr: '\u21C2',
DiacriticalAcute: '\u00B4',
DiacriticalDot: '\u02D9',
DiacriticalDoubleAcute: '\u02DD',
DiacriticalGrave: '\u0060',
DiacriticalTilde: '\u02DC',
diam: '\u22C4',
Diamond: '\u22C4',
diamond: '\u22C4',
diamondsuit: '\u2666',
diams: '\u2666',
die: '\u00A8',
DifferentialD: '\u2146',
digamma: '\u03DD',
disin: '\u22F2',
div: '\u00F7',
divide: '\u00F7',
divideontimes: '\u22C7',
divonx: '\u22C7',
DJcy: '\u0402',
djcy: '\u0452',
dlcorn: '\u231E',
dlcrop: '\u230D',
dollar: '\u0024',
Dopf: '\uD835\uDD3B',
dopf: '\uD835\uDD55',
Dot: '\u00A8',
dot: '\u02D9',
DotDot: '\u20DC',
doteq: '\u2250',
doteqdot: '\u2251',
DotEqual: '\u2250',
dotminus: '\u2238',
dotplus: '\u2214',
dotsquare: '\u22A1',
doublebarwedge: '\u2306',
DoubleContourIntegral: '\u222F',
DoubleDot: '\u00A8',
DoubleDownArrow: '\u21D3',
DoubleLeftArrow: '\u21D0',
DoubleLeftRightArrow: '\u21D4',
DoubleLeftTee: '\u2AE4',
DoubleLongLeftArrow: '\u27F8',
DoubleLongLeftRightArrow: '\u27FA',
DoubleLongRightArrow: '\u27F9',
DoubleRightArrow: '\u21D2',
DoubleRightTee: '\u22A8',
DoubleUpArrow: '\u21D1',
DoubleUpDownArrow: '\u21D5',
DoubleVerticalBar: '\u2225',
DownArrow: '\u2193',
Downarrow: '\u21D3',
downarrow: '\u2193',
DownArrowBar: '\u2913',
DownArrowUpArrow: '\u21F5',
DownBreve: '\u0311',
downdownarrows: '\u21CA',
downharpoonleft: '\u21C3',
downharpoonright: '\u21C2',
DownLeftRightVector: '\u2950',
DownLeftTeeVector: '\u295E',
DownLeftVector: '\u21BD',
DownLeftVectorBar: '\u2956',
DownRightTeeVector: '\u295F',
DownRightVector: '\u21C1',
DownRightVectorBar: '\u2957',
DownTee: '\u22A4',
DownTeeArrow: '\u21A7',
drbkarow: '\u2910',
drcorn: '\u231F',
drcrop: '\u230C',
Dscr: '\uD835\uDC9F',
dscr: '\uD835\uDCB9',
DScy: '\u0405',
dscy: '\u0455',
dsol: '\u29F6',
Dstrok: '\u0110',
dstrok: '\u0111',
dtdot: '\u22F1',
dtri: '\u25BF',
dtrif: '\u25BE',
duarr: '\u21F5',
duhar: '\u296F',
dwangle: '\u29A6',
DZcy: '\u040F',
dzcy: '\u045F',
dzigrarr: '\u27FF',
Eacute: '\u00C9',
eacute: '\u00E9',
easter: '\u2A6E',
Ecaron: '\u011A',
ecaron: '\u011B',
ecir: '\u2256',
Ecirc: '\u00CA',
ecirc: '\u00EA',
ecolon: '\u2255',
Ecy: '\u042D',
ecy: '\u044D',
eDDot: '\u2A77',
Edot: '\u0116',
eDot: '\u2251',
edot: '\u0117',
ee: '\u2147',
efDot: '\u2252',
Efr: '\uD835\uDD08',
efr: '\uD835\uDD22',
eg: '\u2A9A',
Egrave: '\u00C8',
egrave: '\u00E8',
egs: '\u2A96',
egsdot: '\u2A98',
el: '\u2A99',
Element: '\u2208',
elinters: '\u23E7',
ell: '\u2113',
els: '\u2A95',
elsdot: '\u2A97',
Emacr: '\u0112',
emacr: '\u0113',
empty: '\u2205',
emptyset: '\u2205',
EmptySmallSquare: '\u25FB',
emptyv: '\u2205',
EmptyVerySmallSquare: '\u25AB',
emsp: '\u2003',
emsp13: '\u2004',
emsp14: '\u2005',
ENG: '\u014A',
eng: '\u014B',
ensp: '\u2002',
Eogon: '\u0118',
eogon: '\u0119',
Eopf: '\uD835\uDD3C',
eopf: '\uD835\uDD56',
epar: '\u22D5',
eparsl: '\u29E3',
eplus: '\u2A71',
epsi: '\u03B5',
Epsilon: '\u0395',
epsilon: '\u03B5',
epsiv: '\u03F5',
eqcirc: '\u2256',
eqcolon: '\u2255',
eqsim: '\u2242',
eqslantgtr: '\u2A96',
eqslantless: '\u2A95',
Equal: '\u2A75',
equals: '\u003D',
EqualTilde: '\u2242',
equest: '\u225F',
Equilibrium: '\u21CC',
equiv: '\u2261',
equivDD: '\u2A78',
eqvparsl: '\u29E5',
erarr: '\u2971',
erDot: '\u2253',
Escr: '\u2130',
escr: '\u212F',
esdot: '\u2250',
Esim: '\u2A73',
esim: '\u2242',
Eta: '\u0397',
eta: '\u03B7',
ETH: '\u00D0',
eth: '\u00F0',
Euml: '\u00CB',
euml: '\u00EB',
euro: '\u20AC',
excl: '\u0021',
exist: '\u2203',
Exists: '\u2203',
expectation: '\u2130',
ExponentialE: '\u2147',
exponentiale: '\u2147',
fallingdotseq: '\u2252',
Fcy: '\u0424',
fcy: '\u0444',
female: '\u2640',
ffilig: '\uFB03',
fflig: '\uFB00',
ffllig: '\uFB04',
Ffr: '\uD835\uDD09',
ffr: '\uD835\uDD23',
filig: '\uFB01',
FilledSmallSquare: '\u25FC',
FilledVerySmallSquare: '\u25AA',
fjlig: '\u0066\u006A',
flat: '\u266D',
fllig: '\uFB02',
fltns: '\u25B1',
fnof: '\u0192',
Fopf: '\uD835\uDD3D',
fopf: '\uD835\uDD57',
ForAll: '\u2200',
forall: '\u2200',
fork: '\u22D4',
forkv: '\u2AD9',
Fouriertrf: '\u2131',
fpartint: '\u2A0D',
frac12: '\u00BD',
frac13: '\u2153',
frac14: '\u00BC',
frac15: '\u2155',
frac16: '\u2159',
frac18: '\u215B',
frac23: '\u2154',
frac25: '\u2156',
frac34: '\u00BE',
frac35: '\u2157',
frac38: '\u215C',
frac45: '\u2158',
frac56: '\u215A',
frac58: '\u215D',
frac78: '\u215E',
frasl: '\u2044',
frown: '\u2322',
Fscr: '\u2131',
fscr: '\uD835\uDCBB',
gacute: '\u01F5',
Gamma: '\u0393',
gamma: '\u03B3',
Gammad: '\u03DC',
gammad: '\u03DD',
gap: '\u2A86',
Gbreve: '\u011E',
gbreve: '\u011F',
Gcedil: '\u0122',
Gcirc: '\u011C',
gcirc: '\u011D',
Gcy: '\u0413',
gcy: '\u0433',
Gdot: '\u0120',
gdot: '\u0121',
gE: '\u2267',
ge: '\u2265',
gEl: '\u2A8C',
gel: '\u22DB',
geq: '\u2265',
geqq: '\u2267',
geqslant: '\u2A7E',
ges: '\u2A7E',
gescc: '\u2AA9',
gesdot: '\u2A80',
gesdoto: '\u2A82',
gesdotol: '\u2A84',
gesl: '\u22DB\uFE00',
gesles: '\u2A94',
Gfr: '\uD835\uDD0A',
gfr: '\uD835\uDD24',
Gg: '\u22D9',
gg: '\u226B',
ggg: '\u22D9',
gimel: '\u2137',
GJcy: '\u0403',
gjcy: '\u0453',
gl: '\u2277',
gla: '\u2AA5',
glE: '\u2A92',
glj: '\u2AA4',
gnap: '\u2A8A',
gnapprox: '\u2A8A',
gnE: '\u2269',
gne: '\u2A88',
gneq: '\u2A88',
gneqq: '\u2269',
gnsim: '\u22E7',
Gopf: '\uD835\uDD3E',
gopf: '\uD835\uDD58',
grave: '\u0060',
GreaterEqual: '\u2265',
GreaterEqualLess: '\u22DB',
GreaterFullEqual: '\u2267',
GreaterGreater: '\u2AA2',
GreaterLess: '\u2277',
GreaterSlantEqual: '\u2A7E',
GreaterTilde: '\u2273',
Gscr: '\uD835\uDCA2',
gscr: '\u210A',
gsim: '\u2273',
gsime: '\u2A8E',
gsiml: '\u2A90',
Gt: '\u226B',
GT: '\u003E',
gt: '\u003E',
gtcc: '\u2AA7',
gtcir: '\u2A7A',
gtdot: '\u22D7',
gtlPar: '\u2995',
gtquest: '\u2A7C',
gtrapprox: '\u2A86',
gtrarr: '\u2978',
gtrdot: '\u22D7',
gtreqless: '\u22DB',
gtreqqless: '\u2A8C',
gtrless: '\u2277',
gtrsim: '\u2273',
gvertneqq: '\u2269\uFE00',
gvnE: '\u2269\uFE00',
Hacek: '\u02C7',
hairsp: '\u200A',
half: '\u00BD',
hamilt: '\u210B',
HARDcy: '\u042A',
hardcy: '\u044A',
hArr: '\u21D4',
harr: '\u2194',
harrcir: '\u2948',
harrw: '\u21AD',
Hat: '\u005E',
hbar: '\u210F',
Hcirc: '\u0124',
hcirc: '\u0125',
hearts: '\u2665',
heartsuit: '\u2665',
hellip: '\u2026',
hercon: '\u22B9',
Hfr: '\u210C',
hfr: '\uD835\uDD25',
HilbertSpace: '\u210B',
hksearow: '\u2925',
hkswarow: '\u2926',
hoarr: '\u21FF',
homtht: '\u223B',
hookleftarrow: '\u21A9',
hookrightarrow: '\u21AA',
Hopf: '\u210D',
hopf: '\uD835\uDD59',
horbar: '\u2015',
HorizontalLine: '\u2500',
Hscr: '\u210B',
hscr: '\uD835\uDCBD',
hslash: '\u210F',
Hstrok: '\u0126',
hstrok: '\u0127',
HumpDownHump: '\u224E',
HumpEqual: '\u224F',
hybull: '\u2043',
hyphen: '\u2010',
Iacute: '\u00CD',
iacute: '\u00ED',
ic: '\u2063',
Icirc: '\u00CE',
icirc: '\u00EE',
Icy: '\u0418',
icy: '\u0438',
Idot: '\u0130',
IEcy: '\u0415',
iecy: '\u0435',
iexcl: '\u00A1',
iff: '\u21D4',
Ifr: '\u2111',
ifr: '\uD835\uDD26',
Igrave: '\u00CC',
igrave: '\u00EC',
ii: '\u2148',
iiiint: '\u2A0C',
iiint: '\u222D',
iinfin: '\u29DC',
iiota: '\u2129',
IJlig: '\u0132',
ijlig: '\u0133',
Im: '\u2111',
Imacr: '\u012A',
imacr: '\u012B',
image: '\u2111',
ImaginaryI: '\u2148',
imagline: '\u2110',
imagpart: '\u2111',
imath: '\u0131',
imof: '\u22B7',
imped: '\u01B5',
Implies: '\u21D2',
in: '\u2208',
incare: '\u2105',
infin: '\u221E',
infintie: '\u29DD',
inodot: '\u0131',
Int: '\u222C',
int: '\u222B',
intcal: '\u22BA',
integers: '\u2124',
Integral: '\u222B',
intercal: '\u22BA',
Intersection: '\u22C2',
intlarhk: '\u2A17',
intprod: '\u2A3C',
InvisibleComma: '\u2063',
InvisibleTimes: '\u2062',
IOcy: '\u0401',
iocy: '\u0451',
Iogon: '\u012E',
iogon: '\u012F',
Iopf: '\uD835\uDD40',
iopf: '\uD835\uDD5A',
Iota: '\u0399',
iota: '\u03B9',
iprod: '\u2A3C',
iquest: '\u00BF',
Iscr: '\u2110',
iscr: '\uD835\uDCBE',
isin: '\u2208',
isindot: '\u22F5',
isinE: '\u22F9',
isins: '\u22F4',
isinsv: '\u22F3',
isinv: '\u2208',
it: '\u2062',
Itilde: '\u0128',
itilde: '\u0129',
Iukcy: '\u0406',
iukcy: '\u0456',
Iuml: '\u00CF',
iuml: '\u00EF',
Jcirc: '\u0134',
jcirc: '\u0135',
Jcy: '\u0419',
jcy: '\u0439',
Jfr: '\uD835\uDD0D',
jfr: '\uD835\uDD27',
jmath: '\u0237',
Jopf: '\uD835\uDD41',
jopf: '\uD835\uDD5B',
Jscr: '\uD835\uDCA5',
jscr: '\uD835\uDCBF',
Jsercy: '\u0408',
jsercy: '\u0458',
Jukcy: '\u0404',
jukcy: '\u0454',
Kappa: '\u039A',
kappa: '\u03BA',
kappav: '\u03F0',
Kcedil: '\u0136',
kcedil: '\u0137',
Kcy: '\u041A',
kcy: '\u043A',
Kfr: '\uD835\uDD0E',
kfr: '\uD835\uDD28',
kgreen: '\u0138',
KHcy: '\u0425',
khcy: '\u0445',
KJcy: '\u040C',
kjcy: '\u045C',
Kopf: '\uD835\uDD42',
kopf: '\uD835\uDD5C',
Kscr: '\uD835\uDCA6',
kscr: '\uD835\uDCC0',
lAarr: '\u21DA',
Lacute: '\u0139',
lacute: '\u013A',
laemptyv: '\u29B4',
lagran: '\u2112',
Lambda: '\u039B',
lambda: '\u03BB',
Lang: '\u27EA',
lang: '\u27E8',
langd: '\u2991',
langle: '\u27E8',
lap: '\u2A85',
Laplacetrf: '\u2112',
laquo: '\u00AB',
Larr: '\u219E',
lArr: '\u21D0',
larr: '\u2190',
larrb: '\u21E4',
larrbfs: '\u291F',
larrfs: '\u291D',
larrhk: '\u21A9',
larrlp: '\u21AB',
larrpl: '\u2939',
larrsim: '\u2973',
larrtl: '\u21A2',
lat: '\u2AAB',
lAtail: '\u291B',
latail: '\u2919',
late: '\u2AAD',
lates: '\u2AAD\uFE00',
lBarr: '\u290E',
lbarr: '\u290C',
lbbrk: '\u2772',
lbrace: '\u007B',
lbrack: '\u005B',
lbrke: '\u298B',
lbrksld: '\u298F',
lbrkslu: '\u298D',
Lcaron: '\u013D',
lcaron: '\u013E',
Lcedil: '\u013B',
lcedil: '\u013C',
lceil: '\u2308',
lcub: '\u007B',
Lcy: '\u041B',
lcy: '\u043B',
ldca: '\u2936',
ldquo: '\u201C',
ldquor: '\u201E',
ldrdhar: '\u2967',
ldrushar: '\u294B',
ldsh: '\u21B2',
lE: '\u2266',
le: '\u2264',
LeftAngleBracket: '\u27E8',
LeftArrow: '\u2190',
Leftarrow: '\u21D0',
leftarrow: '\u2190',
LeftArrowBar: '\u21E4',
LeftArrowRightArrow: '\u21C6',
leftarrowtail: '\u21A2',
LeftCeiling: '\u2308',
LeftDoubleBracket: '\u27E6',
LeftDownTeeVector: '\u2961',
LeftDownVector: '\u21C3',
LeftDownVectorBar: '\u2959',
LeftFloor: '\u230A',
leftharpoondown: '\u21BD',
leftharpoonup: '\u21BC',
leftleftarrows: '\u21C7',
LeftRightArrow: '\u2194',
Leftrightarrow: '\u21D4',
leftrightarrow: '\u2194',
leftrightarrows: '\u21C6',
leftrightharpoons: '\u21CB',
leftrightsquigarrow: '\u21AD',
LeftRightVector: '\u294E',
LeftTee: '\u22A3',
LeftTeeArrow: '\u21A4',
LeftTeeVector: '\u295A',
leftthreetimes: '\u22CB',
LeftTriangle: '\u22B2',
LeftTriangleBar: '\u29CF',
LeftTriangleEqual: '\u22B4',
LeftUpDownVector: '\u2951',
LeftUpTeeVector: '\u2960',
LeftUpVector: '\u21BF',
LeftUpVectorBar: '\u2958',
LeftVector: '\u21BC',
LeftVectorBar: '\u2952',
lEg: '\u2A8B',
leg: '\u22DA',
leq: '\u2264',
leqq: '\u2266',
leqslant: '\u2A7D',
les: '\u2A7D',
lescc: '\u2AA8',
lesdot: '\u2A7F',
lesdoto: '\u2A81',
lesdotor: '\u2A83',
lesg: '\u22DA\uFE00',
lesges: '\u2A93',
lessapprox: '\u2A85',
lessdot: '\u22D6',
lesseqgtr: '\u22DA',
lesseqqgtr: '\u2A8B',
LessEqualGreater: '\u22DA',
LessFullEqual: '\u2266',
LessGreater: '\u2276',
lessgtr: '\u2276',
LessLess: '\u2AA1',
lesssim: '\u2272',
LessSlantEqual: '\u2A7D',
LessTilde: '\u2272',
lfisht: '\u297C',
lfloor: '\u230A',
Lfr: '\uD835\uDD0F',
lfr: '\uD835\uDD29',
lg: '\u2276',
lgE: '\u2A91',
lHar: '\u2962',
lhard: '\u21BD',
lharu: '\u21BC',
lharul: '\u296A',
lhblk: '\u2584',
LJcy: '\u0409',
ljcy: '\u0459',
Ll: '\u22D8',
ll: '\u226A',
llarr: '\u21C7',
llcorner: '\u231E',
Lleftarrow: '\u21DA',
llhard: '\u296B',
lltri: '\u25FA',
Lmidot: '\u013F',
lmidot: '\u0140',
lmoust: '\u23B0',
lmoustache: '\u23B0',
lnap: '\u2A89',
lnapprox: '\u2A89',
lnE: '\u2268',
lne: '\u2A87',
lneq: '\u2A87',
lneqq: '\u2268',
lnsim: '\u22E6',
loang: '\u27EC',
loarr: '\u21FD',
lobrk: '\u27E6',
LongLeftArrow: '\u27F5',
Longleftarrow: '\u27F8',
longleftarrow: '\u27F5',
LongLeftRightArrow: '\u27F7',
Longleftrightarrow: '\u27FA',
longleftrightarrow: '\u27F7',
longmapsto: '\u27FC',
LongRightArrow: '\u27F6',
Longrightarrow: '\u27F9',
longrightarrow: '\u27F6',
looparrowleft: '\u21AB',
looparrowright: '\u21AC',
lopar: '\u2985',
Lopf: '\uD835\uDD43',
lopf: '\uD835\uDD5D',
loplus: '\u2A2D',
lotimes: '\u2A34',
lowast: '\u2217',
lowbar: '\u005F',
LowerLeftArrow: '\u2199',
LowerRightArrow: '\u2198',
loz: '\u25CA',
lozenge: '\u25CA',
lozf: '\u29EB',
lpar: '\u0028',
lparlt: '\u2993',
lrarr: '\u21C6',
lrcorner: '\u231F',
lrhar: '\u21CB',
lrhard: '\u296D',
lrm: '\u200E',
lrtri: '\u22BF',
lsaquo: '\u2039',
Lscr: '\u2112',
lscr: '\uD835\uDCC1',
Lsh: '\u21B0',
lsh: '\u21B0',
lsim: '\u2272',
lsime: '\u2A8D',
lsimg: '\u2A8F',
lsqb: '\u005B',
lsquo: '\u2018',
lsquor: '\u201A',
Lstrok: '\u0141',
lstrok: '\u0142',
Lt: '\u226A',
LT: '\u003C',
lt: '\u003C',
ltcc: '\u2AA6',
ltcir: '\u2A79',
ltdot: '\u22D6',
lthree: '\u22CB',
ltimes: '\u22C9',
ltlarr: '\u2976',
ltquest: '\u2A7B',
ltri: '\u25C3',
ltrie: '\u22B4',
ltrif: '\u25C2',
ltrPar: '\u2996',
lurdshar: '\u294A',
luruhar: '\u2966',
lvertneqq: '\u2268\uFE00',
lvnE: '\u2268\uFE00',
macr: '\u00AF',
male: '\u2642',
malt: '\u2720',
maltese: '\u2720',
Map: '\u2905',
map: '\u21A6',
mapsto: '\u21A6',
mapstodown: '\u21A7',
mapstoleft: '\u21A4',
mapstoup: '\u21A5',
marker: '\u25AE',
mcomma: '\u2A29',
Mcy: '\u041C',
mcy: '\u043C',
mdash: '\u2014',
mDDot: '\u223A',
measuredangle: '\u2221',
MediumSpace: '\u205F',
Mellintrf: '\u2133',
Mfr: '\uD835\uDD10',
mfr: '\uD835\uDD2A',
mho: '\u2127',
micro: '\u00B5',
mid: '\u2223',
midast: '\u002A',
midcir: '\u2AF0',
middot: '\u00B7',
minus: '\u2212',
minusb: '\u229F',
minusd: '\u2238',
minusdu: '\u2A2A',
MinusPlus: '\u2213',
mlcp: '\u2ADB',
mldr: '\u2026',
mnplus: '\u2213',
models: '\u22A7',
Mopf: '\uD835\uDD44',
mopf: '\uD835\uDD5E',
mp: '\u2213',
Mscr: '\u2133',
mscr: '\uD835\uDCC2',
mstpos: '\u223E',
Mu: '\u039C',
mu: '\u03BC',
multimap: '\u22B8',
mumap: '\u22B8',
nabla: '\u2207',
Nacute: '\u0143',
nacute: '\u0144',
nang: '\u2220\u20D2',
nap: '\u2249',
napE: '\u2A70\u0338',
napid: '\u224B\u0338',
napos: '\u0149',
napprox: '\u2249',
natur: '\u266E',
natural: '\u266E',
naturals: '\u2115',
nbsp: '\u00A0',
nbump: '\u224E\u0338',
nbumpe: '\u224F\u0338',
ncap: '\u2A43',
Ncaron: '\u0147',
ncaron: '\u0148',
Ncedil: '\u0145',
ncedil: '\u0146',
ncong: '\u2247',
ncongdot: '\u2A6D\u0338',
ncup: '\u2A42',
Ncy: '\u041D',
ncy: '\u043D',
ndash: '\u2013',
ne: '\u2260',
nearhk: '\u2924',
neArr: '\u21D7',
nearr: '\u2197',
nearrow: '\u2197',
nedot: '\u2250\u0338',
NegativeMediumSpace: '\u200B',
NegativeThickSpace: '\u200B',
NegativeThinSpace: '\u200B',
NegativeVeryThinSpace: '\u200B',
nequiv: '\u2262',
nesear: '\u2928',
nesim: '\u2242\u0338',
NestedGreaterGreater: '\u226B',
NestedLessLess: '\u226A',
NewLine: '\u000A',
nexist: '\u2204',
nexists: '\u2204',
Nfr: '\uD835\uDD11',
nfr: '\uD835\uDD2B',
ngE: '\u2267\u0338',
nge: '\u2271',
ngeq: '\u2271',
ngeqq: '\u2267\u0338',
ngeqslant: '\u2A7E\u0338',
nges: '\u2A7E\u0338',
nGg: '\u22D9\u0338',
ngsim: '\u2275',
nGt: '\u226B\u20D2',
ngt: '\u226F',
ngtr: '\u226F',
nGtv: '\u226B\u0338',
nhArr: '\u21CE',
nharr: '\u21AE',
nhpar: '\u2AF2',
ni: '\u220B',
nis: '\u22FC',
nisd: '\u22FA',
niv: '\u220B',
NJcy: '\u040A',
njcy: '\u045A',
nlArr: '\u21CD',
nlarr: '\u219A',
nldr: '\u2025',
nlE: '\u2266\u0338',
nle: '\u2270',
nLeftarrow: '\u21CD',
nleftarrow: '\u219A',
nLeftrightarrow: '\u21CE',
nleftrightarrow: '\u21AE',
nleq: '\u2270',
nleqq: '\u2266\u0338',
nleqslant: '\u2A7D\u0338',
nles: '\u2A7D\u0338',
nless: '\u226E',
nLl: '\u22D8\u0338',
nlsim: '\u2274',
nLt: '\u226A\u20D2',
nlt: '\u226E',
nltri: '\u22EA',
nltrie: '\u22EC',
nLtv: '\u226A\u0338',
nmid: '\u2224',
NoBreak: '\u2060',
NonBreakingSpace: '\u00A0',
Nopf: '\u2115',
nopf: '\uD835\uDD5F',
Not: '\u2AEC',
not: '\u00AC',
NotCongruent: '\u2262',
NotCupCap: '\u226D',
NotDoubleVerticalBar: '\u2226',
NotElement: '\u2209',
NotEqual: '\u2260',
NotEqualTilde: '\u2242\u0338',
NotExists: '\u2204',
NotGreater: '\u226F',
NotGreaterEqual: '\u2271',
NotGreaterFullEqual: '\u2267\u0338',
NotGreaterGreater: '\u226B\u0338',
NotGreaterLess: '\u2279',
NotGreaterSlantEqual: '\u2A7E\u0338',
NotGreaterTilde: '\u2275',
NotHumpDownHump: '\u224E\u0338',
NotHumpEqual: '\u224F\u0338',
notin: '\u2209',
notindot: '\u22F5\u0338',
notinE: '\u22F9\u0338',
notinva: '\u2209',
notinvb: '\u22F7',
notinvc: '\u22F6',
NotLeftTriangle: '\u22EA',
NotLeftTriangleBar: '\u29CF\u0338',
NotLeftTriangleEqual: '\u22EC',
NotLess: '\u226E',
NotLessEqual: '\u2270',
NotLessGreater: '\u2278',
NotLessLess: '\u226A\u0338',
NotLessSlantEqual: '\u2A7D\u0338',
NotLessTilde: '\u2274',
NotNestedGreaterGreater: '\u2AA2\u0338',
NotNestedLessLess: '\u2AA1\u0338',
notni: '\u220C',
notniva: '\u220C',
notnivb: '\u22FE',
notnivc: '\u22FD',
NotPrecedes: '\u2280',
NotPrecedesEqual: '\u2AAF\u0338',
NotPrecedesSlantEqual: '\u22E0',
NotReverseElement: '\u220C',
NotRightTriangle: '\u22EB',
NotRightTriangleBar: '\u29D0\u0338',
NotRightTriangleEqual: '\u22ED',
NotSquareSubset: '\u228F\u0338',
NotSquareSubsetEqual: '\u22E2',
NotSquareSuperset: '\u2290\u0338',
NotSquareSupersetEqual: '\u22E3',
NotSubset: '\u2282\u20D2',
NotSubsetEqual: '\u2288',
NotSucceeds: '\u2281',
NotSucceedsEqual: '\u2AB0\u0338',
NotSucceedsSlantEqual: '\u22E1',
NotSucceedsTilde: '\u227F\u0338',
NotSuperset: '\u2283\u20D2',
NotSupersetEqual: '\u2289',
NotTilde: '\u2241',
NotTildeEqual: '\u2244',
NotTildeFullEqual: '\u2247',
NotTildeTilde: '\u2249',
NotVerticalBar: '\u2224',
npar: '\u2226',
nparallel: '\u2226',
nparsl: '\u2AFD\u20E5',
npart: '\u2202\u0338',
npolint: '\u2A14',
npr: '\u2280',
nprcue: '\u22E0',
npre: '\u2AAF\u0338',
nprec: '\u2280',
npreceq: '\u2AAF\u0338',
nrArr: '\u21CF',
nrarr: '\u219B',
nrarrc: '\u2933\u0338',
nrarrw: '\u219D\u0338',
nRightarrow: '\u21CF',
nrightarrow: '\u219B',
nrtri: '\u22EB',
nrtrie: '\u22ED',
nsc: '\u2281',
nsccue: '\u22E1',
nsce: '\u2AB0\u0338',
Nscr: '\uD835\uDCA9',
nscr: '\uD835\uDCC3',
nshortmid: '\u2224',
nshortparallel: '\u2226',
nsim: '\u2241',
nsime: '\u2244',
nsimeq: '\u2244',
nsmid: '\u2224',
nspar: '\u2226',
nsqsube: '\u22E2',
nsqsupe: '\u22E3',
nsub: '\u2284',
nsubE: '\u2AC5\u0338',
nsube: '\u2288',
nsubset: '\u2282\u20D2',
nsubseteq: '\u2288',
nsubseteqq: '\u2AC5\u0338',
nsucc: '\u2281',
nsucceq: '\u2AB0\u0338',
nsup: '\u2285',
nsupE: '\u2AC6\u0338',
nsupe: '\u2289',
nsupset: '\u2283\u20D2',
nsupseteq: '\u2289',
nsupseteqq: '\u2AC6\u0338',
ntgl: '\u2279',
Ntilde: '\u00D1',
ntilde: '\u00F1',
ntlg: '\u2278',
ntriangleleft: '\u22EA',
ntrianglelefteq: '\u22EC',
ntriangleright: '\u22EB',
ntrianglerighteq: '\u22ED',
Nu: '\u039D',
nu: '\u03BD',
num: '\u0023',
numero: '\u2116',
numsp: '\u2007',
nvap: '\u224D\u20D2',
nVDash: '\u22AF',
nVdash: '\u22AE',
nvDash: '\u22AD',
nvdash: '\u22AC',
nvge: '\u2265\u20D2',
nvgt: '\u003E\u20D2',
nvHarr: '\u2904',
nvinfin: '\u29DE',
nvlArr: '\u2902',
nvle: '\u2264\u20D2',
nvlt: '\u003C\u20D2',
nvltrie: '\u22B4\u20D2',
nvrArr: '\u2903',
nvrtrie: '\u22B5\u20D2',
nvsim: '\u223C\u20D2',
nwarhk: '\u2923',
nwArr: '\u21D6',
nwarr: '\u2196',
nwarrow: '\u2196',
nwnear: '\u2927',
Oacute: '\u00D3',
oacute: '\u00F3',
oast: '\u229B',
ocir: '\u229A',
Ocirc: '\u00D4',
ocirc: '\u00F4',
Ocy: '\u041E',
ocy: '\u043E',
odash: '\u229D',
Odblac: '\u0150',
odblac: '\u0151',
odiv: '\u2A38',
odot: '\u2299',
odsold: '\u29BC',
OElig: '\u0152',
oelig: '\u0153',
ofcir: '\u29BF',
Ofr: '\uD835\uDD12',
ofr: '\uD835\uDD2C',
ogon: '\u02DB',
Ograve: '\u00D2',
ograve: '\u00F2',
ogt: '\u29C1',
ohbar: '\u29B5',
ohm: '\u03A9',
oint: '\u222E',
olarr: '\u21BA',
olcir: '\u29BE',
olcross: '\u29BB',
oline: '\u203E',
olt: '\u29C0',
Omacr: '\u014C',
omacr: '\u014D',
Omega: '\u03A9',
omega: '\u03C9',
Omicron: '\u039F',
omicron: '\u03BF',
omid: '\u29B6',
ominus: '\u2296',
Oopf: '\uD835\uDD46',
oopf: '\uD835\uDD60',
opar: '\u29B7',
OpenCurlyDoubleQuote: '\u201C',
OpenCurlyQuote: '\u2018',
operp: '\u29B9',
oplus: '\u2295',
Or: '\u2A54',
or: '\u2228',
orarr: '\u21BB',
ord: '\u2A5D',
order: '\u2134',
orderof: '\u2134',
ordf: '\u00AA',
ordm: '\u00BA',
origof: '\u22B6',
oror: '\u2A56',
orslope: '\u2A57',
orv: '\u2A5B',
oS: '\u24C8',
Oscr: '\uD835\uDCAA',
oscr: '\u2134',
Oslash: '\u00D8',
oslash: '\u00F8',
osol: '\u2298',
Otilde: '\u00D5',
otilde: '\u00F5',
Otimes: '\u2A37',
otimes: '\u2297',
otimesas: '\u2A36',
Ouml: '\u00D6',
ouml: '\u00F6',
ovbar: '\u233D',
OverBar: '\u203E',
OverBrace: '\u23DE',
OverBracket: '\u23B4',
OverParenthesis: '\u23DC',
par: '\u2225',
para: '\u00B6',
parallel: '\u2225',
parsim: '\u2AF3',
parsl: '\u2AFD',
part: '\u2202',
PartialD: '\u2202',
Pcy: '\u041F',
pcy: '\u043F',
percnt: '\u0025',
period: '\u002E',
permil: '\u2030',
perp: '\u22A5',
pertenk: '\u2031',
Pfr: '\uD835\uDD13',
pfr: '\uD835\uDD2D',
Phi: '\u03A6',
phi: '\u03C6',
phiv: '\u03D5',
phmmat: '\u2133',
phone: '\u260E',
Pi: '\u03A0',
pi: '\u03C0',
pitchfork: '\u22D4',
piv: '\u03D6',
planck: '\u210F',
planckh: '\u210E',
plankv: '\u210F',
plus: '\u002B',
plusacir: '\u2A23',
plusb: '\u229E',
pluscir: '\u2A22',
plusdo: '\u2214',
plusdu: '\u2A25',
pluse: '\u2A72',
PlusMinus: '\u00B1',
plusmn: '\u00B1',
plussim: '\u2A26',
plustwo: '\u2A27',
pm: '\u00B1',
Poincareplane: '\u210C',
pointint: '\u2A15',
Popf: '\u2119',
popf: '\uD835\uDD61',
pound: '\u00A3',
Pr: '\u2ABB',
pr: '\u227A',
prap: '\u2AB7',
prcue: '\u227C',
prE: '\u2AB3',
pre: '\u2AAF',
prec: '\u227A',
precapprox: '\u2AB7',
preccurlyeq: '\u227C',
Precedes: '\u227A',
PrecedesEqual: '\u2AAF',
PrecedesSlantEqual: '\u227C',
PrecedesTilde: '\u227E',
preceq: '\u2AAF',
precnapprox: '\u2AB9',
precneqq: '\u2AB5',
precnsim: '\u22E8',
precsim: '\u227E',
Prime: '\u2033',
prime: '\u2032',
primes: '\u2119',
prnap: '\u2AB9',
prnE: '\u2AB5',
prnsim: '\u22E8',
prod: '\u220F',
Product: '\u220F',
profalar: '\u232E',
profline: '\u2312',
profsurf: '\u2313',
prop: '\u221D',
Proportion: '\u2237',
Proportional: '\u221D',
propto: '\u221D',
prsim: '\u227E',
prurel: '\u22B0',
Pscr: '\uD835\uDCAB',
pscr: '\uD835\uDCC5',
Psi: '\u03A8',
psi: '\u03C8',
puncsp: '\u2008',
Qfr: '\uD835\uDD14',
qfr: '\uD835\uDD2E',
qint: '\u2A0C',
Qopf: '\u211A',
qopf: '\uD835\uDD62',
qprime: '\u2057',
Qscr: '\uD835\uDCAC',
qscr: '\uD835\uDCC6',
quaternions: '\u210D',
quatint: '\u2A16',
quest: '\u003F',
questeq: '\u225F',
QUOT: '\u0022',
quot: '\u0022',
rAarr: '\u21DB',
race: '\u223D\u0331',
Racute: '\u0154',
racute: '\u0155',
radic: '\u221A',
raemptyv: '\u29B3',
Rang: '\u27EB',
rang: '\u27E9',
rangd: '\u2992',
range: '\u29A5',
rangle: '\u27E9',
raquo: '\u00BB',
Rarr: '\u21A0',
rArr: '\u21D2',
rarr: '\u2192',
rarrap: '\u2975',
rarrb: '\u21E5',
rarrbfs: '\u2920',
rarrc: '\u2933',
rarrfs: '\u291E',
rarrhk: '\u21AA',
rarrlp: '\u21AC',
rarrpl: '\u2945',
rarrsim: '\u2974',
Rarrtl: '\u2916',
rarrtl: '\u21A3',
rarrw: '\u219D',
rAtail: '\u291C',
ratail: '\u291A',
ratio: '\u2236',
rationals: '\u211A',
RBarr: '\u2910',
rBarr: '\u290F',
rbarr: '\u290D',
rbbrk: '\u2773',
rbrace: '\u007D',
rbrack: '\u005D',
rbrke: '\u298C',
rbrksld: '\u298E',
rbrkslu: '\u2990',
Rcaron: '\u0158',
rcaron: '\u0159',
Rcedil: '\u0156',
rcedil: '\u0157',
rceil: '\u2309',
rcub: '\u007D',
Rcy: '\u0420',
rcy: '\u0440',
rdca: '\u2937',
rdldhar: '\u2969',
rdquo: '\u201D',
rdquor: '\u201D',
rdsh: '\u21B3',
Re: '\u211C',
real: '\u211C',
realine: '\u211B',
realpart: '\u211C',
reals: '\u211D',
rect: '\u25AD',
REG: '\u00AE',
reg: '\u00AE',
ReverseElement: '\u220B',
ReverseEquilibrium: '\u21CB',
ReverseUpEquilibrium: '\u296F',
rfisht: '\u297D',
rfloor: '\u230B',
Rfr: '\u211C',
rfr: '\uD835\uDD2F',
rHar: '\u2964',
rhard: '\u21C1',
rharu: '\u21C0',
rharul: '\u296C',
Rho: '\u03A1',
rho: '\u03C1',
rhov: '\u03F1',
RightAngleBracket: '\u27E9',
RightArrow: '\u2192',
Rightarrow: '\u21D2',
rightarrow: '\u2192',
RightArrowBar: '\u21E5',
RightArrowLeftArrow: '\u21C4',
rightarrowtail: '\u21A3',
RightCeiling: '\u2309',
RightDoubleBracket: '\u27E7',
RightDownTeeVector: '\u295D',
RightDownVector: '\u21C2',
RightDownVectorBar: '\u2955',
RightFloor: '\u230B',
rightharpoondown: '\u21C1',
rightharpoonup: '\u21C0',
rightleftarrows: '\u21C4',
rightleftharpoons: '\u21CC',
rightrightarrows: '\u21C9',
rightsquigarrow: '\u219D',
RightTee: '\u22A2',
RightTeeArrow: '\u21A6',
RightTeeVector: '\u295B',
rightthreetimes: '\u22CC',
RightTriangle: '\u22B3',
RightTriangleBar: '\u29D0',
RightTriangleEqual: '\u22B5',
RightUpDownVector: '\u294F',
RightUpTeeVector: '\u295C',
RightUpVector: '\u21BE',
RightUpVectorBar: '\u2954',
RightVector: '\u21C0',
RightVectorBar: '\u2953',
ring: '\u02DA',
risingdotseq: '\u2253',
rlarr: '\u21C4',
rlhar: '\u21CC',
rlm: '\u200F',
rmoust: '\u23B1',
rmoustache: '\u23B1',
rnmid: '\u2AEE',
roang: '\u27ED',
roarr: '\u21FE',
robrk: '\u27E7',
ropar: '\u2986',
Ropf: '\u211D',
ropf: '\uD835\uDD63',
roplus: '\u2A2E',
rotimes: '\u2A35',
RoundImplies: '\u2970',
rpar: '\u0029',
rpargt: '\u2994',
rppolint: '\u2A12',
rrarr: '\u21C9',
Rrightarrow: '\u21DB',
rsaquo: '\u203A',
Rscr: '\u211B',
rscr: '\uD835\uDCC7',
Rsh: '\u21B1',
rsh: '\u21B1',
rsqb: '\u005D',
rsquo: '\u2019',
rsquor: '\u2019',
rthree: '\u22CC',
rtimes: '\u22CA',
rtri: '\u25B9',
rtrie: '\u22B5',
rtrif: '\u25B8',
rtriltri: '\u29CE',
RuleDelayed: '\u29F4',
ruluhar: '\u2968',
rx: '\u211E',
Sacute: '\u015A',
sacute: '\u015B',
sbquo: '\u201A',
Sc: '\u2ABC',
sc: '\u227B',
scap: '\u2AB8',
Scaron: '\u0160',
scaron: '\u0161',
sccue: '\u227D',
scE: '\u2AB4',
sce: '\u2AB0',
Scedil: '\u015E',
scedil: '\u015F',
Scirc: '\u015C',
scirc: '\u015D',
scnap: '\u2ABA',
scnE: '\u2AB6',
scnsim: '\u22E9',
scpolint: '\u2A13',
scsim: '\u227F',
Scy: '\u0421',
scy: '\u0441',
sdot: '\u22C5',
sdotb: '\u22A1',
sdote: '\u2A66',
searhk: '\u2925',
seArr: '\u21D8',
searr: '\u2198',
searrow: '\u2198',
sect: '\u00A7',
semi: '\u003B',
seswar: '\u2929',
setminus: '\u2216',
setmn: '\u2216',
sext: '\u2736',
Sfr: '\uD835\uDD16',
sfr: '\uD835\uDD30',
sfrown: '\u2322',
sharp: '\u266F',
SHCHcy: '\u0429',
shchcy: '\u0449',
SHcy: '\u0428',
shcy: '\u0448',
ShortDownArrow: '\u2193',
ShortLeftArrow: '\u2190',
shortmid: '\u2223',
shortparallel: '\u2225',
ShortRightArrow: '\u2192',
ShortUpArrow: '\u2191',
shy: '\u00AD',
Sigma: '\u03A3',
sigma: '\u03C3',
sigmaf: '\u03C2',
sigmav: '\u03C2',
sim: '\u223C',
simdot: '\u2A6A',
sime: '\u2243',
simeq: '\u2243',
simg: '\u2A9E',
simgE: '\u2AA0',
siml: '\u2A9D',
simlE: '\u2A9F',
simne: '\u2246',
simplus: '\u2A24',
simrarr: '\u2972',
slarr: '\u2190',
SmallCircle: '\u2218',
smallsetminus: '\u2216',
smashp: '\u2A33',
smeparsl: '\u29E4',
smid: '\u2223',
smile: '\u2323',
smt: '\u2AAA',
smte: '\u2AAC',
smtes: '\u2AAC\uFE00',
SOFTcy: '\u042C',
softcy: '\u044C',
sol: '\u002F',
solb: '\u29C4',
solbar: '\u233F',
Sopf: '\uD835\uDD4A',
sopf: '\uD835\uDD64',
spades: '\u2660',
spadesuit: '\u2660',
spar: '\u2225',
sqcap: '\u2293',
sqcaps: '\u2293\uFE00',
sqcup: '\u2294',
sqcups: '\u2294\uFE00',
Sqrt: '\u221A',
sqsub: '\u228F',
sqsube: '\u2291',
sqsubset: '\u228F',
sqsubseteq: '\u2291',
sqsup: '\u2290',
sqsupe: '\u2292',
sqsupset: '\u2290',
sqsupseteq: '\u2292',
squ: '\u25A1',
Square: '\u25A1',
square: '\u25A1',
SquareIntersection: '\u2293',
SquareSubset: '\u228F',
SquareSubsetEqual: '\u2291',
SquareSuperset: '\u2290',
SquareSupersetEqual: '\u2292',
SquareUnion: '\u2294',
squarf: '\u25AA',
squf: '\u25AA',
srarr: '\u2192',
Sscr: '\uD835\uDCAE',
sscr: '\uD835\uDCC8',
ssetmn: '\u2216',
ssmile: '\u2323',
sstarf: '\u22C6',
Star: '\u22C6',
star: '\u2606',
starf: '\u2605',
straightepsilon: '\u03F5',
straightphi: '\u03D5',
strns: '\u00AF',
Sub: '\u22D0',
sub: '\u2282',
subdot: '\u2ABD',
subE: '\u2AC5',
sube: '\u2286',
subedot: '\u2AC3',
submult: '\u2AC1',
subnE: '\u2ACB',
subne: '\u228A',
subplus: '\u2ABF',
subrarr: '\u2979',
Subset: '\u22D0',
subset: '\u2282',
subseteq: '\u2286',
subseteqq: '\u2AC5',
SubsetEqual: '\u2286',
subsetneq: '\u228A',
subsetneqq: '\u2ACB',
subsim: '\u2AC7',
subsub: '\u2AD5',
subsup: '\u2AD3',
succ: '\u227B',
succapprox: '\u2AB8',
succcurlyeq: '\u227D',
Succeeds: '\u227B',
SucceedsEqual: '\u2AB0',
SucceedsSlantEqual: '\u227D',
SucceedsTilde: '\u227F',
succeq: '\u2AB0',
succnapprox: '\u2ABA',
succneqq: '\u2AB6',
succnsim: '\u22E9',
succsim: '\u227F',
SuchThat: '\u220B',
Sum: '\u2211',
sum: '\u2211',
sung: '\u266A',
Sup: '\u22D1',
sup: '\u2283',
sup1: '\u00B9',
sup2: '\u00B2',
sup3: '\u00B3',
supdot: '\u2ABE',
supdsub: '\u2AD8',
supE: '\u2AC6',
supe: '\u2287',
supedot: '\u2AC4',
Superset: '\u2283',
SupersetEqual: '\u2287',
suphsol: '\u27C9',
suphsub: '\u2AD7',
suplarr: '\u297B',
supmult: '\u2AC2',
supnE: '\u2ACC',
supne: '\u228B',
supplus: '\u2AC0',
Supset: '\u22D1',
supset: '\u2283',
supseteq: '\u2287',
supseteqq: '\u2AC6',
supsetneq: '\u228B',
supsetneqq: '\u2ACC',
supsim: '\u2AC8',
supsub: '\u2AD4',
supsup: '\u2AD6',
swarhk: '\u2926',
swArr: '\u21D9',
swarr: '\u2199',
swarrow: '\u2199',
swnwar: '\u292A',
szlig: '\u00DF',
Tab: '\u0009',
target: '\u2316',
Tau: '\u03A4',
tau: '\u03C4',
tbrk: '\u23B4',
Tcaron: '\u0164',
tcaron: '\u0165',
Tcedil: '\u0162',
tcedil: '\u0163',
Tcy: '\u0422',
tcy: '\u0442',
tdot: '\u20DB',
telrec: '\u2315',
Tfr: '\uD835\uDD17',
tfr: '\uD835\uDD31',
there4: '\u2234',
Therefore: '\u2234',
therefore: '\u2234',
Theta: '\u0398',
theta: '\u03B8',
thetasym: '\u03D1',
thetav: '\u03D1',
thickapprox: '\u2248',
thicksim: '\u223C',
ThickSpace: '\u205F\u200A',
thinsp: '\u2009',
ThinSpace: '\u2009',
thkap: '\u2248',
thksim: '\u223C',
THORN: '\u00DE',
thorn: '\u00FE',
Tilde: '\u223C',
tilde: '\u02DC',
TildeEqual: '\u2243',
TildeFullEqual: '\u2245',
TildeTilde: '\u2248',
times: '\u00D7',
timesb: '\u22A0',
timesbar: '\u2A31',
timesd: '\u2A30',
tint: '\u222D',
toea: '\u2928',
top: '\u22A4',
topbot: '\u2336',
topcir: '\u2AF1',
Topf: '\uD835\uDD4B',
topf: '\uD835\uDD65',
topfork: '\u2ADA',
tosa: '\u2929',
tprime: '\u2034',
TRADE: '\u2122',
trade: '\u2122',
triangle: '\u25B5',
triangledown: '\u25BF',
triangleleft: '\u25C3',
trianglelefteq: '\u22B4',
triangleq: '\u225C',
triangleright: '\u25B9',
trianglerighteq: '\u22B5',
tridot: '\u25EC',
trie: '\u225C',
triminus: '\u2A3A',
TripleDot: '\u20DB',
triplus: '\u2A39',
trisb: '\u29CD',
tritime: '\u2A3B',
trpezium: '\u23E2',
Tscr: '\uD835\uDCAF',
tscr: '\uD835\uDCC9',
TScy: '\u0426',
tscy: '\u0446',
TSHcy: '\u040B',
tshcy: '\u045B',
Tstrok: '\u0166',
tstrok: '\u0167',
twixt: '\u226C',
twoheadleftarrow: '\u219E',
twoheadrightarrow: '\u21A0',
Uacute: '\u00DA',
uacute: '\u00FA',
Uarr: '\u219F',
uArr: '\u21D1',
uarr: '\u2191',
Uarrocir: '\u2949',
Ubrcy: '\u040E',
ubrcy: '\u045E',
Ubreve: '\u016C',
ubreve: '\u016D',
Ucirc: '\u00DB',
ucirc: '\u00FB',
Ucy: '\u0423',
ucy: '\u0443',
udarr: '\u21C5',
Udblac: '\u0170',
udblac: '\u0171',
udhar: '\u296E',
ufisht: '\u297E',
Ufr: '\uD835\uDD18',
ufr: '\uD835\uDD32',
Ugrave: '\u00D9',
ugrave: '\u00F9',
uHar: '\u2963',
uharl: '\u21BF',
uharr: '\u21BE',
uhblk: '\u2580',
ulcorn: '\u231C',
ulcorner: '\u231C',
ulcrop: '\u230F',
ultri: '\u25F8',
Umacr: '\u016A',
umacr: '\u016B',
uml: '\u00A8',
UnderBar: '\u005F',
UnderBrace: '\u23DF',
UnderBracket: '\u23B5',
UnderParenthesis: '\u23DD',
Union: '\u22C3',
UnionPlus: '\u228E',
Uogon: '\u0172',
uogon: '\u0173',
Uopf: '\uD835\uDD4C',
uopf: '\uD835\uDD66',
UpArrow: '\u2191',
Uparrow: '\u21D1',
uparrow: '\u2191',
UpArrowBar: '\u2912',
UpArrowDownArrow: '\u21C5',
UpDownArrow: '\u2195',
Updownarrow: '\u21D5',
updownarrow: '\u2195',
UpEquilibrium: '\u296E',
upharpoonleft: '\u21BF',
upharpoonright: '\u21BE',
uplus: '\u228E',
UpperLeftArrow: '\u2196',
UpperRightArrow: '\u2197',
Upsi: '\u03D2',
upsi: '\u03C5',
upsih: '\u03D2',
Upsilon: '\u03A5',
upsilon: '\u03C5',
UpTee: '\u22A5',
UpTeeArrow: '\u21A5',
upuparrows: '\u21C8',
urcorn: '\u231D',
urcorner: '\u231D',
urcrop: '\u230E',
Uring: '\u016E',
uring: '\u016F',
urtri: '\u25F9',
Uscr: '\uD835\uDCB0',
uscr: '\uD835\uDCCA',
utdot: '\u22F0',
Utilde: '\u0168',
utilde: '\u0169',
utri: '\u25B5',
utrif: '\u25B4',
uuarr: '\u21C8',
Uuml: '\u00DC',
uuml: '\u00FC',
uwangle: '\u29A7',
vangrt: '\u299C',
varepsilon: '\u03F5',
varkappa: '\u03F0',
varnothing: '\u2205',
varphi: '\u03D5',
varpi: '\u03D6',
varpropto: '\u221D',
vArr: '\u21D5',
varr: '\u2195',
varrho: '\u03F1',
varsigma: '\u03C2',
varsubsetneq: '\u228A\uFE00',
varsubsetneqq: '\u2ACB\uFE00',
varsupsetneq: '\u228B\uFE00',
varsupsetneqq: '\u2ACC\uFE00',
vartheta: '\u03D1',
vartriangleleft: '\u22B2',
vartriangleright: '\u22B3',
Vbar: '\u2AEB',
vBar: '\u2AE8',
vBarv: '\u2AE9',
Vcy: '\u0412',
vcy: '\u0432',
VDash: '\u22AB',
Vdash: '\u22A9',
vDash: '\u22A8',
vdash: '\u22A2',
Vdashl: '\u2AE6',
Vee: '\u22C1',
vee: '\u2228',
veebar: '\u22BB',
veeeq: '\u225A',
vellip: '\u22EE',
Verbar: '\u2016',
verbar: '\u007C',
Vert: '\u2016',
vert: '\u007C',
VerticalBar: '\u2223',
VerticalLine: '\u007C',
VerticalSeparator: '\u2758',
VerticalTilde: '\u2240',
VeryThinSpace: '\u200A',
Vfr: '\uD835\uDD19',
vfr: '\uD835\uDD33',
vltri: '\u22B2',
vnsub: '\u2282\u20D2',
vnsup: '\u2283\u20D2',
Vopf: '\uD835\uDD4D',
vopf: '\uD835\uDD67',
vprop: '\u221D',
vrtri: '\u22B3',
Vscr: '\uD835\uDCB1',
vscr: '\uD835\uDCCB',
vsubnE: '\u2ACB\uFE00',
vsubne: '\u228A\uFE00',
vsupnE: '\u2ACC\uFE00',
vsupne: '\u228B\uFE00',
Vvdash: '\u22AA',
vzigzag: '\u299A',
Wcirc: '\u0174',
wcirc: '\u0175',
wedbar: '\u2A5F',
Wedge: '\u22C0',
wedge: '\u2227',
wedgeq: '\u2259',
weierp: '\u2118',
Wfr: '\uD835\uDD1A',
wfr: '\uD835\uDD34',
Wopf: '\uD835\uDD4E',
wopf: '\uD835\uDD68',
wp: '\u2118',
wr: '\u2240',
wreath: '\u2240',
Wscr: '\uD835\uDCB2',
wscr: '\uD835\uDCCC',
xcap: '\u22C2',
xcirc: '\u25EF',
xcup: '\u22C3',
xdtri: '\u25BD',
Xfr: '\uD835\uDD1B',
xfr: '\uD835\uDD35',
xhArr: '\u27FA',
xharr: '\u27F7',
Xi: '\u039E',
xi: '\u03BE',
xlArr: '\u27F8',
xlarr: '\u27F5',
xmap: '\u27FC',
xnis: '\u22FB',
xodot: '\u2A00',
Xopf: '\uD835\uDD4F',
xopf: '\uD835\uDD69',
xoplus: '\u2A01',
xotime: '\u2A02',
xrArr: '\u27F9',
xrarr: '\u27F6',
Xscr: '\uD835\uDCB3',
xscr: '\uD835\uDCCD',
xsqcup: '\u2A06',
xuplus: '\u2A04',
xutri: '\u25B3',
xvee: '\u22C1',
xwedge: '\u22C0',
Yacute: '\u00DD',
yacute: '\u00FD',
YAcy: '\u042F',
yacy: '\u044F',
Ycirc: '\u0176',
ycirc: '\u0177',
Ycy: '\u042B',
ycy: '\u044B',
yen: '\u00A5',
Yfr: '\uD835\uDD1C',
yfr: '\uD835\uDD36',
YIcy: '\u0407',
yicy: '\u0457',
Yopf: '\uD835\uDD50',
yopf: '\uD835\uDD6A',
Yscr: '\uD835\uDCB4',
yscr: '\uD835\uDCCE',
YUcy: '\u042E',
yucy: '\u044E',
Yuml: '\u0178',
yuml: '\u00FF',
Zacute: '\u0179',
zacute: '\u017A',
Zcaron: '\u017D',
zcaron: '\u017E',
Zcy: '\u0417',
zcy: '\u0437',
Zdot: '\u017B',
zdot: '\u017C',
zeetrf: '\u2128',
ZeroWidthSpace: '\u200B',
Zeta: '\u0396',
zeta: '\u03B6',
Zfr: '\u2128',
zfr: '\uD835\uDD37',
ZHcy: '\u0416',
zhcy: '\u0436',
zigrarr: '\u21DD',
Zopf: '\u2124',
zopf: '\uD835\uDD6B',
Zscr: '\uD835\uDCB5',
zscr: '\uD835\uDCCF',
zwj: '\u200D',
zwnj: '\u200C',
});
/**
* @deprecated
* Use `HTML_ENTITIES` instead.
* @see {@link HTML_ENTITIES}
*/
exports.entityMap = exports.HTML_ENTITIES;
/***/ }),
/***/ 268:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
var _xmldom_xmldom__WEBPACK_IMPORTED_MODULE_0___namespace_cache;
var wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1___namespace_cache;
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Al: () => (/* binding */ document),
/* harmony export */ Gb: () => (/* binding */ xmldom),
/* harmony export */ Oe: () => (/* binding */ xpath)
/* harmony export */ });
/* harmony import */ var _xmldom_xmldom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(546);
/* harmony import */ var wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(999);
const xmldom = /*#__PURE__*/ (_xmldom_xmldom__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (_xmldom_xmldom__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(_xmldom_xmldom__WEBPACK_IMPORTED_MODULE_0__, 2)));
const document = new xmldom.DOMImplementation().createDocument('', '');
const install = (/*#__PURE__*/ (wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __webpack_require__.t(wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1__, 2))) === null || /*#__PURE__*/ (wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __webpack_require__.t(wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1__, 2))) === void 0 ? void 0 : wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1__.install) || window.wgxpath.install;
const Xpath = (function () {
const win = { document: {}, XPathResult: {} };
install(win);
win.document.XPathResult = win.XPathResult;
return win.document;
})();
const xpath = {
currentDocument: document,
evaluate: Xpath.evaluate,
result: Xpath.XPathResult,
createNSResolver: Xpath.createNSResolver
};
//# sourceMappingURL=lib_external.js.map
/***/ }),
/***/ 546:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var conventions = __webpack_require__(870);
exports.assign = conventions.assign;
exports.hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace;
exports.isHTMLMimeType = conventions.isHTMLMimeType;
exports.isValidMimeType = conventions.isValidMimeType;
exports.MIME_TYPE = conventions.MIME_TYPE;
exports.NAMESPACE = conventions.NAMESPACE;
var errors = __webpack_require__(767);
exports.DOMException = errors.DOMException;
exports.DOMExceptionName = errors.DOMExceptionName;
exports.ExceptionCode = errors.ExceptionCode;
exports.ParseError = errors.ParseError;
var dom = __webpack_require__(786);
exports.Attr = dom.Attr;
exports.CDATASection = dom.CDATASection;
exports.CharacterData = dom.CharacterData;
exports.Comment = dom.Comment;
exports.Document = dom.Document;
exports.DocumentFragment = dom.DocumentFragment;
exports.DocumentType = dom.DocumentType;
exports.DOMImplementation = dom.DOMImplementation;
exports.Element = dom.Element;
exports.Entity = dom.Entity;
exports.EntityReference = dom.EntityReference;
exports.LiveNodeList = dom.LiveNodeList;
exports.NamedNodeMap = dom.NamedNodeMap;
exports.Node = dom.Node;
exports.NodeList = dom.NodeList;
exports.Notation = dom.Notation;
exports.ProcessingInstruction = dom.ProcessingInstruction;
exports.Text = dom.Text;
exports.XMLSerializer = dom.XMLSerializer;
var domParser = __webpack_require__(576);
exports.DOMParser = domParser.DOMParser;
exports.normalizeLineEndings = domParser.normalizeLineEndings;
exports.onErrorStopParsing = domParser.onErrorStopParsing;
exports.onWarningStopParsing = domParser.onWarningStopParsing;
/***/ }),
/***/ 576:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var conventions = __webpack_require__(870);
var dom = __webpack_require__(786);
var errors = __webpack_require__(767);
var entities = __webpack_require__(159);
var sax = __webpack_require__(802);
var DOMImplementation = dom.DOMImplementation;
var hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace;
var isHTMLMimeType = conventions.isHTMLMimeType;
var isValidMimeType = conventions.isValidMimeType;
var MIME_TYPE = conventions.MIME_TYPE;
var NAMESPACE = conventions.NAMESPACE;
var ParseError = errors.ParseError;
var XMLReader = sax.XMLReader;
/**
* Normalizes line ending according to ,
* including some Unicode "newline" characters:
*
* > XML parsed entities are often stored in computer files which,
* > for editing convenience, are organized into lines.
* > These lines are typically separated by some combination
* > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA).
* >
* > To simplify the tasks of applications, the XML processor must behave
* > as if it normalized all line breaks in external parsed entities (including the document entity)
* > on input, before parsing, by translating the following to a single #xA character:
* >
* > 1. the two-character sequence #xD #xA,
* > 2. the two-character sequence #xD #x85,
* > 3. the single character #x85,
* > 4. the single character #x2028,
* > 5. the single character #x2029,
* > 6. any #xD character that is not immediately followed by #xA or #x85.
*
* @param {string} input
* @returns {string}
* @prettierignore
*/
function normalizeLineEndings(input) {
return input.replace(/\r[\n\u0085]/g, '\n').replace(/[\r\u0085\u2028\u2029]/g, '\n');
}
/**
* @typedef Locator
* @property {number} [columnNumber]
* @property {number} [lineNumber]
*/
/**
* @typedef DOMParserOptions
* @property {typeof assign} [assign]
* The method to use instead of `conventions.assign`, which is used to copy values from
* `options` before they are used for parsing.
* @property {typeof DOMHandler} [domHandler]
* For internal testing: The class for creating an instance for handling events from the SAX
* parser.
* *****Warning: By configuring a faulty implementation, the specified behavior can completely
* be broken.*****.
* @property {Function} [errorHandler]
* DEPRECATED! use `onError` instead.
* @property {function(level:ErrorLevel, message:string, context: DOMHandler):void}
* [onError]
* A function invoked for every error that occurs during parsing.
*
* If it is not provided, all errors are reported to `console.error`
* and only `fatalError`s are thrown as a `ParseError`,
* which prevents any further processing.
* If the provided method throws, a `ParserError` is thrown,
* which prevents any further processing.
*
* Be aware that many `warning`s are considered an error that prevents further processing in
* most implementations.
* @property {boolean} [locator=true]
* Configures if the nodes created during parsing will have a `lineNumber` and a `columnNumber`
* attribute describing their location in the XML string.
* Default is true.
* @property {(string) => string} [normalizeLineEndings]
* used to replace line endings before parsing, defaults to exported `normalizeLineEndings`,
* which normalizes line endings according to ,
* including some Unicode "newline" characters.
* @property {Object} [xmlns]
* The XML namespaces that should be assumed when parsing.
* The default namespace can be provided by the key that is the empty string.
* When the `mimeType` for HTML, XHTML or SVG are passed to `parseFromString`,
* the default namespace that will be used,
* will be overridden according to the specification.
* @see {@link normalizeLineEndings}
*/
/**
* The DOMParser interface provides the ability to parse XML or HTML source code from a string
* into a DOM `Document`.
*
* ***xmldom is different from the spec in that it allows an `options` parameter,
* to control the behavior***.
*
* @class
* @param {DOMParserOptions} [options]
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization
*/
function DOMParser(options) {
options = options || {};
if (options.locator === undefined) {
options.locator = true;
}
/**
* The method to use instead of `conventions.assign`, which is used to copy values from
* `options`
* before they are used for parsing.
*
* @type {conventions.assign}
* @private
* @see {@link conventions.assign}
* @readonly
*/
this.assign = options.assign || conventions.assign;
/**
* For internal testing: The class for creating an instance for handling events from the SAX
* parser.
* *****Warning: By configuring a faulty implementation, the specified behavior can completely
* be broken*****.
*
* @type {typeof DOMHandler}
* @private
* @readonly
*/
this.domHandler = options.domHandler || DOMHandler;
/**
* A function that is invoked for every error that occurs during parsing.
*
* If it is not provided, all errors are reported to `console.error`
* and only `fatalError`s are thrown as a `ParseError`,
* which prevents any further processing.
* If the provided method throws, a `ParserError` is thrown,
* which prevents any further processing.
*
* Be aware that many `warning`s are considered an error that prevents further processing in
* most implementations.
*
* @type {function(level:ErrorLevel, message:string, context: DOMHandler):void}
* @see {@link onErrorStopParsing}
* @see {@link onWarningStopParsing}
*/
this.onError = options.onError || options.errorHandler;
if (options.errorHandler && typeof options.errorHandler !== 'function') {
throw new TypeError('errorHandler object is no longer supported, switch to onError!');
} else if (options.errorHandler) {
options.errorHandler('warning', 'The `errorHandler` option has been deprecated, use `onError` instead!', this);
}
/**
* used to replace line endings before parsing, defaults to `normalizeLineEndings`
*
* @type {(string) => string}
* @readonly
*/
this.normalizeLineEndings = options.normalizeLineEndings || normalizeLineEndings;
/**
* Configures if the nodes created during parsing will have a `lineNumber` and a
* `columnNumber`
* attribute describing their location in the XML string.
* Default is true.
*
* @type {boolean}
* @readonly
*/
this.locator = !!options.locator;
/**
* The default namespace can be provided by the key that is the empty string.
* When the `mimeType` for HTML, XHTML or SVG are passed to `parseFromString`,
* the default namespace that will be used,
* will be overridden according to the specification.
*
* @type {Readonly}
* @readonly
*/
this.xmlns = this.assign(Object.create(null), options.xmlns);
}
/**
* Parses `source` using the options in the way configured by the `DOMParserOptions` of `this`
* `DOMParser`. If `mimeType` is `text/html` an HTML `Document` is created,
* otherwise an XML `Document` is created.
*
* __It behaves different from the description in the living standard__:
* - Uses the `options` passed to the `DOMParser` constructor to modify the behavior.
* - Any unexpected input is reported to `onError` with either a `warning`,
* `error` or `fatalError` level.
* - Any `fatalError` throws a `ParseError` which prevents further processing.
* - Any error thrown by `onError` is converted to a `ParseError` which prevents further
* processing - If no `Document` was created during parsing it is reported as a `fatalError`.
* *****Warning: By configuring a faulty DOMHandler implementation,
* the specified behavior can completely be broken*****.
*
* @param {string} source
* The XML mime type only allows string input!
* @param {string} [mimeType='application/xml']
* the mimeType or contentType of the document to be created determines the `type` of document
* created (XML or HTML)
* @returns {Document}
* The `Document` node.
* @throws {ParseError}
* for any `fatalError` or anything that is thrown by `onError`
* @throws {TypeError}
* for any invalid `mimeType`
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString
* @see https://html.spec.whatwg.org/#dom-domparser-parsefromstring-dev
*/
DOMParser.prototype.parseFromString = function (source, mimeType) {
if (!isValidMimeType(mimeType)) {
throw new TypeError('DOMParser.parseFromString: the provided mimeType "' + mimeType + '" is not valid.');
}
var defaultNSMap = this.assign(Object.create(null), this.xmlns);
var entityMap = entities.XML_ENTITIES;
var defaultNamespace = defaultNSMap[''] || null;
if (hasDefaultHTMLNamespace(mimeType)) {
entityMap = entities.HTML_ENTITIES;
defaultNamespace = NAMESPACE.HTML;
} else if (mimeType === MIME_TYPE.XML_SVG_IMAGE) {
defaultNamespace = NAMESPACE.SVG;
}
defaultNSMap[''] = defaultNamespace;
defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;
var domBuilder = new this.domHandler({
mimeType: mimeType,
defaultNamespace: defaultNamespace,
onError: this.onError,
});
var locator = this.locator ? {} : undefined;
if (this.locator) {
domBuilder.setDocumentLocator(locator);
}
var sax = new XMLReader();
sax.errorHandler = domBuilder;
sax.domBuilder = domBuilder;
var isXml = !conventions.isHTMLMimeType(mimeType);
if (isXml && typeof source !== 'string') {
sax.errorHandler.fatalError('source is not a string');
}
sax.parse(this.normalizeLineEndings(String(source)), defaultNSMap, entityMap);
if (!domBuilder.doc.documentElement) {
sax.errorHandler.fatalError('missing root element');
}
return domBuilder.doc;
};
/**
* @typedef DOMHandlerOptions
* @property {string} [mimeType=MIME_TYPE.XML_APPLICATION]
* @property {string | null} [defaultNamespace=null]
*/
/**
* The class that is used to handle events from the SAX parser to create the related DOM
* elements.
*
* Some methods are only implemented as an empty function,
* since they are (at least currently) not relevant for xmldom.
*
* @class
* @param {DOMHandlerOptions} [options]
* @see http://www.saxproject.org/apidoc/org/xml/sax/ext/DefaultHandler2.html
*/
function DOMHandler(options) {
var opt = options || {};
/**
* The mime type is used to determine if the DOM handler will create an XML or HTML document.
* Only if it is set to `text/html` it will create an HTML document.
* It defaults to MIME_TYPE.XML_APPLICATION.
*
* @type {string}
* @see {@link MIME_TYPE}
* @readonly
*/
this.mimeType = opt.mimeType || MIME_TYPE.XML_APPLICATION;
/**
* The namespace to use to create an XML document.
* For the following reasons this is required:
* - The SAX API for `startDocument` doesn't offer any way to pass a namespace,
* since at that point there is no way for the parser to know what the default namespace from
* the document will be.
* - When creating using `DOMImplementation.createDocument` it is required to pass a
* namespace,
* to determine the correct `Document.contentType`, which should match `this.mimeType`.
* - When parsing an XML document with the `application/xhtml+xml` mimeType,
* the HTML namespace needs to be the default namespace.
*
* @type {string | null}
* @private
* @readonly
*/
this.defaultNamespace = opt.defaultNamespace || null;
/**
* @type {boolean}
* @private
*/
this.cdata = false;
/**
* The last `Element` that was created by `startElement`.
* `endElement` sets it to the `currentElement.parentNode`.
*
* Note: The sax parser currently sets it to white space text nodes between tags.
*
* @type {Element | Node | undefined}
* @private
*/
this.currentElement = undefined;
/**
* The Document that is created as part of `startDocument`,
* and returned by `DOMParser.parseFromString`.
*
* @type {Document | undefined}
* @readonly
*/
this.doc = undefined;
/**
* The locator is stored as part of setDocumentLocator.
* It is controlled and mutated by the SAX parser to store the current parsing position.
* It is used by DOMHandler to set `columnNumber` and `lineNumber`
* on the DOM nodes.
*
* @type {Readonly | undefined}
* @private
* @readonly (the
* sax parser currently sometimes set's it)
*/
this.locator = undefined;
/**
* @type {function (level:ErrorLevel ,message:string, context:DOMHandler):void}
* @readonly
*/
this.onError = opt.onError;
}
function position(locator, node) {
node.lineNumber = locator.lineNumber;
node.columnNumber = locator.columnNumber;
}
DOMHandler.prototype = {
/**
* Either creates an XML or an HTML document and stores it under `this.doc`.
* If it is an XML document, `this.defaultNamespace` is used to create it,
* and it will not contain any `childNodes`.
* If it is an HTML document, it will be created without any `childNodes`.
*
* @see http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html
*/
startDocument: function () {
var impl = new DOMImplementation();
this.doc = isHTMLMimeType(this.mimeType) ? impl.createHTMLDocument(false) : impl.createDocument(this.defaultNamespace, '');
},
startElement: function (namespaceURI, localName, qName, attrs) {
var doc = this.doc;
var el = doc.createElementNS(namespaceURI, qName || localName);
var len = attrs.length;
appendElement(this, el);
this.currentElement = el;
this.locator && position(this.locator, el);
for (var i = 0; i < len; i++) {
var namespaceURI = attrs.getURI(i);
var value = attrs.getValue(i);
var qName = attrs.getQName(i);
var attr = doc.createAttributeNS(namespaceURI, qName);
this.locator && position(attrs.getLocator(i), attr);
attr.value = attr.nodeValue = value;
el.setAttributeNode(attr);
}
},
endElement: function (namespaceURI, localName, qName) {
this.currentElement = this.currentElement.parentNode;
},
startPrefixMapping: function (prefix, uri) {},
endPrefixMapping: function (prefix) {},
processingInstruction: function (target, data) {
var ins = this.doc.createProcessingInstruction(target, data);
this.locator && position(this.locator, ins);
appendElement(this, ins);
},
ignorableWhitespace: function (ch, start, length) {},
characters: function (chars, start, length) {
chars = _toString.apply(this, arguments);
//console.log(chars)
if (chars) {
if (this.cdata) {
var charNode = this.doc.createCDATASection(chars);
} else {
var charNode = this.doc.createTextNode(chars);
}
if (this.currentElement) {
this.currentElement.appendChild(charNode);
} else if (/^\s*$/.test(chars)) {
this.doc.appendChild(charNode);
//process xml
}
this.locator && position(this.locator, charNode);
}
},
skippedEntity: function (name) {},
endDocument: function () {
this.doc.normalize();
},
/**
* Stores the locator to be able to set the `columnNumber` and `lineNumber`
* on the created DOM nodes.
*
* @param {Locator} locator
*/
setDocumentLocator: function (locator) {
if (locator) {
locator.lineNumber = 0;
}
this.locator = locator;
},
//LexicalHandler
comment: function (chars, start, length) {
chars = _toString.apply(this, arguments);
var comm = this.doc.createComment(chars);
this.locator && position(this.locator, comm);
appendElement(this, comm);
},
startCDATA: function () {
//used in characters() methods
this.cdata = true;
},
endCDATA: function () {
this.cdata = false;
},
startDTD: function (name, publicId, systemId, internalSubset) {
var impl = this.doc.implementation;
if (impl && impl.createDocumentType) {
var dt = impl.createDocumentType(name, publicId, systemId, internalSubset);
this.locator && position(this.locator, dt);
appendElement(this, dt);
this.doc.doctype = dt;
}
},
reportError: function (level, message) {
if (typeof this.onError === 'function') {
try {
this.onError(level, message, this);
} catch (e) {
throw new ParseError('Reporting ' + level + ' "' + message + '" caused ' + e, this.locator);
}
} else {
console.error('[xmldom ' + level + ']\t' + message, _locator(this.locator));
}
},
/**
* @see http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html
*/
warning: function (message) {
this.reportError('warning', message);
},
error: function (message) {
this.reportError('error', message);
},
/**
* This function reports a fatal error and throws a ParseError.
*
* @param {string} message
* - The message to be used for reporting and throwing the error.
* @returns {never}
* This function always throws an error and never returns a value.
* @throws {ParseError}
* Always throws a ParseError with the provided message.
*/
fatalError: function (message) {
this.reportError('fatalError', message);
throw new ParseError(message, this.locator);
},
};
function _locator(l) {
if (l) {
return '\n@#[line:' + l.lineNumber + ',col:' + l.columnNumber + ']';
}
}
function _toString(chars, start, length) {
if (typeof chars == 'string') {
return chars.substr(start, length);
} else {
//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
if (chars.length >= start + length || start) {
return new java.lang.String(chars, start, length) + '';
}
return chars;
}
}
/*
* @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html
* used method of org.xml.sax.ext.LexicalHandler:
* #comment(chars, start, length)
* #startCDATA()
* #endCDATA()
* #startDTD(name, publicId, systemId)
*
*
* IGNORED method of org.xml.sax.ext.LexicalHandler:
* #endDTD()
* #startEntity(name)
* #endEntity(name)
*
*
* @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html
* IGNORED method of org.xml.sax.ext.DeclHandler
* #attributeDecl(eName, aName, type, mode, value)
* #elementDecl(name, model)
* #externalEntityDecl(name, publicId, systemId)
* #internalEntityDecl(name, value)
* @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html
* IGNORED method of org.xml.sax.EntityResolver2
* #resolveEntity(String name,String publicId,String baseURI,String systemId)
* #resolveEntity(publicId, systemId)
* #getExternalSubset(name, baseURI)
* @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html
* IGNORED method of org.xml.sax.DTDHandler
* #notationDecl(name, publicId, systemId) {};
* #unparsedEntityDecl(name, publicId, systemId, notationName) {};
*/
'endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl'.replace(
/\w+/g,
function (key) {
DOMHandler.prototype[key] = function () {
return null;
};
}
);
/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */
function appendElement(handler, node) {
if (!handler.currentElement) {
handler.doc.appendChild(node);
} else {
handler.currentElement.appendChild(node);
}
}
/**
* A method that prevents any further parsing when an `error`
* with level `error` is reported during parsing.
*
* @see {@link DOMParserOptions.onError}
* @see {@link onWarningStopParsing}
*/
function onErrorStopParsing(level) {
if (level === 'error') throw 'onErrorStopParsing';
}
/**
* A method that prevents any further parsing when any `error` is reported during parsing.
*
* @see {@link DOMParserOptions.onError}
* @see {@link onErrorStopParsing}
*/
function onWarningStopParsing() {
throw 'onWarningStopParsing';
}
exports.__DOMHandler = DOMHandler;
exports.DOMParser = DOMParser;
exports.normalizeLineEndings = normalizeLineEndings;
exports.onErrorStopParsing = onErrorStopParsing;
exports.onWarningStopParsing = onWarningStopParsing;
/***/ }),
/***/ 714:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ u: () => (/* binding */ Variables)
/* harmony export */ });
class Variables {
static ensureLocale(loc, def) {
if (!Variables.LOCALES.get(loc)) {
console.error(`Locale ${loc} does not exist! Using` +
` ${Variables.LOCALES.get(def)} instead.`);
return def;
}
return loc;
}
}
Variables.VERSION = '5.0.0-beta.1';
Variables.LOCALES = new Map([
['af', 'Africaans'],
['ca', 'Catalan'],
['da', 'Danish'],
['de', 'German'],
['en', 'English'],
['es', 'Spanish'],
['euro', 'Euro'],
['fr', 'French'],
['hi', 'Hindi'],
['it', 'Italian'],
['ko', 'Korean'],
['nb', 'Bokmål'],
['nn', 'Nynorsk'],
['sv', 'Swedish'],
['nemeth', 'Nemeth']
]);
Variables.mathjaxVersion = '4.0.0';
Variables.url = 'https://cdn.jsdelivr.net/npm/speech-rule-engine@' +
Variables.VERSION +
'/lib/mathmaps';
//# sourceMappingURL=variables.js.map
/***/ }),
/***/ 731:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Detects relevant unicode support for regular expressions in the runtime.
* Should the runtime not accepts the flag `u` or unicode ranges,
* character classes without unicode handling will be used.
*
* @param {typeof RegExp} [RegExpImpl=RegExp]
* For testing: the RegExp class.
* @returns {boolean}
* @see https://node.green/#ES2015-syntax-RegExp--y--and--u--flags
*/
function detectUnicodeSupport(RegExpImpl) {
try {
if (typeof RegExpImpl !== 'function') {
RegExpImpl = RegExp;
}
// eslint-disable-next-line es5/no-unicode-regex,es5/no-unicode-code-point-escape
var match = new RegExpImpl('\u{1d306}', 'u').exec('𝌆');
return !!match && match[0].length === 2;
} catch (error) {}
return false;
}
var UNICODE_SUPPORT = detectUnicodeSupport();
/**
* Removes `[`, `]` and any trailing quantifiers from the source of a RegExp.
*
* @param {RegExp} regexp
*/
function chars(regexp) {
if (regexp.source[0] !== '[') {
throw new Error(regexp + ' can not be used with chars');
}
return regexp.source.slice(1, regexp.source.lastIndexOf(']'));
}
/**
* Creates a new character list regular expression,
* by removing `search` from the source of `regexp`.
*
* @param {RegExp} regexp
* @param {string} search
* The character(s) to remove.
* @returns {RegExp}
*/
function chars_without(regexp, search) {
if (regexp.source[0] !== '[') {
throw new Error('/' + regexp.source + '/ can not be used with chars_without');
}
if (!search || typeof search !== 'string') {
throw new Error(JSON.stringify(search) + ' is not a valid search');
}
if (regexp.source.indexOf(search) === -1) {
throw new Error('"' + search + '" is not is /' + regexp.source + '/');
}
if (search === '-' && regexp.source.indexOf(search) !== 1) {
throw new Error('"' + search + '" is not at the first postion of /' + regexp.source + '/');
}
return new RegExp(regexp.source.replace(search, ''), UNICODE_SUPPORT ? 'u' : '');
}
/**
* Combines and Regular expressions correctly by using `RegExp.source`.
*
* @param {...(RegExp | string)[]} args
* @returns {RegExp}
*/
function reg(args) {
var self = this;
return new RegExp(
Array.prototype.slice
.call(arguments)
.map(function (part) {
var isStr = typeof part === 'string';
if (isStr && self === undefined && part === '|') {
throw new Error('use regg instead of reg to wrap expressions with `|`!');
}
return isStr ? part : part.source;
})
.join(''),
UNICODE_SUPPORT ? 'mu' : 'm'
);
}
/**
* Like `reg` but wraps the expression in `(?:`,`)` to create a non tracking group.
*
* @param {...(RegExp | string)[]} args
* @returns {RegExp}
*/
function regg(args) {
if (arguments.length === 0) {
throw new Error('no parameters provided');
}
return reg.apply(regg, ['(?:'].concat(Array.prototype.slice.call(arguments), [')']));
}
// /**
// * Append ^ to the beginning of the expression.
// * @param {...(RegExp | string)[]} args
// * @returns {RegExp}
// */
// function reg_start(args) {
// if (arguments.length === 0) {
// throw new Error('no parameters provided');
// }
// return reg.apply(reg_start, ['^'].concat(Array.prototype.slice.call(arguments)));
// }
// https://www.w3.org/TR/xml/#document
// `[1] document ::= prolog element Misc*`
// https://www.w3.org/TR/xml11/#NT-document
// `[1] document ::= ( prolog element Misc* ) - ( Char* RestrictedChar Char* )`
/**
* A character usually appearing in wrongly converted strings.
*
* @type {string}
* @see https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character
* @see https://nodejs.dev/en/api/v18/buffer/#buffers-and-character-encodings
* @see https://www.unicode.org/faq/utf_bom.html#BOM
* @readonly
*/
var UNICODE_REPLACEMENT_CHARACTER = '\uFFFD';
// https://www.w3.org/TR/xml/#NT-Char
// any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
// `[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]`
// https://www.w3.org/TR/xml11/#NT-Char
// `[2] Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]`
// https://www.w3.org/TR/xml11/#NT-RestrictedChar
// `[2a] RestrictedChar ::= [#x1-#x8] | [#xB-#xC] | [#xE-#x1F] | [#x7F-#x84] | [#x86-#x9F]`
// https://www.w3.org/TR/xml11/#charsets
var Char = /[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/; // without \u10000-\uEFFFF
if (UNICODE_SUPPORT) {
// eslint-disable-next-line es5/no-unicode-code-point-escape
Char = reg('[', chars(Char), '\\u{10000}-\\u{10FFFF}', ']');
}
var _SChar = /[\x20\x09\x0D\x0A]/;
var SChar_s = chars(_SChar);
// https://www.w3.org/TR/xml11/#NT-S
// `[3] S ::= (#x20 | #x9 | #xD | #xA)+`
var S = reg(_SChar, '+');
// optional whitespace described as `S?` in the grammar,
// simplified to 0-n occurrences of the character class
// instead of 0-1 occurrences of a non-capturing group around S
var S_OPT = reg(_SChar, '*');
// https://www.w3.org/TR/xml11/#NT-NameStartChar
// `[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]`
var NameStartChar =
/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; // without \u10000-\uEFFFF
if (UNICODE_SUPPORT) {
// eslint-disable-next-line es5/no-unicode-code-point-escape
NameStartChar = reg('[', chars(NameStartChar), '\\u{10000}-\\u{10FFFF}', ']');
}
var NameStartChar_s = chars(NameStartChar);
// https://www.w3.org/TR/xml11/#NT-NameChar
// `[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]`
var NameChar = reg('[', NameStartChar_s, chars(/[-.0-9\xB7]/), chars(/[\u0300-\u036F\u203F-\u2040]/), ']');
// https://www.w3.org/TR/xml11/#NT-Name
// `[5] Name ::= NameStartChar (NameChar)*`
var Name = reg(NameStartChar, NameChar, '*');
/*
https://www.w3.org/TR/xml11/#NT-Names
`[6] Names ::= Name (#x20 Name)*`
*/
// https://www.w3.org/TR/xml11/#NT-Nmtoken
// `[7] Nmtoken ::= (NameChar)+`
var Nmtoken = reg(NameChar, '+');
/*
https://www.w3.org/TR/xml11/#NT-Nmtokens
`[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*`
var Nmtokens = reg(Nmtoken, regg(/\x20/, Nmtoken), '*');
*/
// https://www.w3.org/TR/xml11/#NT-EntityRef
// `[68] EntityRef ::= '&' Name ';'` [WFC: Entity Declared] [VC: Entity Declared] [WFC: Parsed Entity] [WFC: No Recursion]
var EntityRef = reg('&', Name, ';');
// https://www.w3.org/TR/xml11/#NT-CharRef
// `[66] CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';'` [WFC: Legal Character]
var CharRef = regg(/[0-9]+;|[0-9a-fA-F]+;/);
/*
https://www.w3.org/TR/xml11/#NT-Reference
- `[67] Reference ::= EntityRef | CharRef`
- `[66] CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';'` [WFC: Legal Character]
- `[68] EntityRef ::= '&' Name ';'` [WFC: Entity Declared] [VC: Entity Declared] [WFC: Parsed Entity] [WFC: No Recursion]
*/
var Reference = regg(EntityRef, '|', CharRef);
// https://www.w3.org/TR/xml11/#NT-PEReference
// `[69] PEReference ::= '%' Name ';'`
// [VC: Entity Declared] [WFC: No Recursion] [WFC: In DTD]
var PEReference = reg('%', Name, ';');
// https://www.w3.org/TR/xml11/#NT-EntityValue
// `[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'"`
var EntityValue = regg(
reg('"', regg(/[^%&"]/, '|', PEReference, '|', Reference), '*', '"'),
'|',
reg("'", regg(/[^%&']/, '|', PEReference, '|', Reference), '*', "'")
);
// https://www.w3.org/TR/xml11/#NT-AttValue
// `[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"`
var AttValue = regg('"', regg(/[^<&"]/, '|', Reference), '*', '"', '|', "'", regg(/[^<&']/, '|', Reference), '*', "'");
// https://www.w3.org/TR/xml-names/#ns-decl
// https://www.w3.org/TR/xml-names/#ns-qualnames
// NameStartChar without ":"
var NCNameStartChar = chars_without(NameStartChar, ':');
// https://www.w3.org/TR/xml-names/#orphans
// `[5] NCNameChar ::= NameChar - ':'`
// An XML NameChar, minus the ":"
var NCNameChar = chars_without(NameChar, ':');
// https://www.w3.org/TR/xml-names/#NT-NCName
// `[4] NCName ::= Name - (Char* ':' Char*)`
// An XML Name, minus the ":"
var NCName = reg(NCNameStartChar, NCNameChar, '*');
/**
https://www.w3.org/TR/xml-names/#ns-qualnames
```
[7] QName ::= PrefixedName | UnprefixedName
=== (NCName ':' NCName) | NCName
=== NCName (':' NCName)?
[8] PrefixedName ::= Prefix ':' LocalPart
=== NCName ':' NCName
[9] UnprefixedName ::= LocalPart
=== NCName
[10] Prefix ::= NCName
[11] LocalPart ::= NCName
```
*/
var QName = reg(NCName, regg(':', NCName), '?');
var QName_exact = reg('^', QName, '$');
var QName_group = reg('(', QName, ')');
// https://www.w3.org/TR/xml11/#NT-SystemLiteral
// `[11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")`
var SystemLiteral = regg(/"[^"]*"|'[^']*'/);
/*
https://www.w3.org/TR/xml11/#NT-PI
```
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
[16] PI ::= '' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
```
target /xml/i is not excluded!
*/
var PI = reg(/^<\?/, '(', Name, ')', regg(S, '(', Char, '*?)'), '?', /\?>/);
// https://www.w3.org/TR/xml11/#NT-PubidChar
// `[13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]`
var PubidChar = /[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/;
// https://www.w3.org/TR/xml11/#NT-PubidLiteral
// `[12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"`
var PubidLiteral = regg('"', PubidChar, '*"', '|', "'", chars_without(PubidChar, "'"), "*'");
// https://www.w3.org/TR/xml11/#NT-CharData
// `[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)`
var COMMENT_START = '';
// https://www.w3.org/TR/xml11/#NT-Comment
// `[15] Comment ::= ''`
var Comment = reg(COMMENT_START, regg(chars_without(Char, '-'), '|', reg('-', chars_without(Char, '-'))), '*', COMMENT_END);
var PCDATA = '#PCDATA';
// https://www.w3.org/TR/xml11/#NT-Mixed
// `[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')'`
// https://www.w3.org/TR/xml-names/#NT-Mixed
// `[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? QName)* S? ')*' | '(' S? '#PCDATA' S? ')'`
// [VC: Proper Group/PE Nesting] [VC: No Duplicate Types]
var Mixed = regg(
reg(/\(/, S_OPT, PCDATA, regg(S_OPT, /\|/, S_OPT, QName), '*', S_OPT, /\)\*/),
'|',
reg(/\(/, S_OPT, PCDATA, S_OPT, /\)/)
);
var _children_quantity = /[?*+]?/;
/*
`[49] choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'` [VC: Proper Group/PE Nesting]
`[50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'` [VC: Proper Group/PE Nesting]
simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting"
var _choice_or_seq = reg('[', NameChar_s, SChar_s, chars(_children_quantity), '()|,]*');
```
[48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?
=== (Name | '(' S? cp ( S? '|' S? cp )+ S? ')' | '(' S? cp ( S? ',' S? cp )* S? ')') ('?' | '*' | '+')?
!== (Name | [_choice_or_seq]*) ('?' | '*' | '+')?
```
simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting"
var cp = reg(regg(Name, '|', _choice_or_seq), _children_quantity);
*/
/*
Inefficient regular expression (High)
This part of the regular expression may cause exponential backtracking on strings starting with '(|' and containing many repetitions of '|'.
https://github.com/xmldom/xmldom/security/code-scanning/91
var choice = regg(/\(/, S_OPT, cp, regg(S_OPT, /\|/, S_OPT, cp), '+', S_OPT, /\)/);
*/
/*
Inefficient regular expression (High)
This part of the regular expression may cause exponential backtracking on strings starting with '(,' and containing many repetitions of ','.
https://github.com/xmldom/xmldom/security/code-scanning/92
var seq = regg(/\(/, S_OPT, cp, regg(S_OPT, /,/, S_OPT, cp), '*', S_OPT, /\)/);
*/
// `[47] children ::= (choice | seq) ('?' | '*' | '+')?`
// simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting"
var children = reg(/\([^>]+\)/, _children_quantity /*regg(choice, '|', seq), _children_quantity*/);
// https://www.w3.org/TR/xml11/#NT-contentspec
// `[46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children`
var contentspec = regg('EMPTY', '|', 'ANY', '|', Mixed, '|', children);
var ELEMENTDECL_START = ''`
// https://www.w3.org/TR/xml-names/#NT-elementdecl
// `[17] elementdecl ::= ''`
// because of https://www.w3.org/TR/xml11/#NT-PEReference
// since xmldom is not supporting replacements of PEReferences in the DTD
// this also supports PEReference in the possible places
var elementdecl = reg(ELEMENTDECL_START, S, regg(QName, '|', PEReference), S, regg(contentspec, '|', PEReference), S_OPT, '>');
// https://www.w3.org/TR/xml11/#NT-NotationType
// `[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'`
// [VC: Notation Attributes] [VC: One Notation Per Element Type] [VC: No Notation on Empty Element] [VC: No Duplicate Tokens]
var NotationType = reg('NOTATION', S, /\(/, S_OPT, Name, regg(S_OPT, /\|/, S_OPT, Name), '*', S_OPT, /\)/);
// https://www.w3.org/TR/xml11/#NT-Enumeration
// `[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'`
// [VC: Enumeration] [VC: No Duplicate Tokens]
var Enumeration = reg(/\(/, S_OPT, Nmtoken, regg(S_OPT, /\|/, S_OPT, Nmtoken), '*', S_OPT, /\)/);
// https://www.w3.org/TR/xml11/#NT-EnumeratedType
// `[57] EnumeratedType ::= NotationType | Enumeration`
var EnumeratedType = regg(NotationType, '|', Enumeration);
/*
```
[55] StringType ::= 'CDATA'
[56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default]
| 'IDREF' [VC: IDREF]
| 'IDREFS' [VC: IDREF]
| 'ENTITY' [VC: Entity Name]
| 'ENTITIES' [VC: Entity Name]
| 'NMTOKEN' [VC: Name Token]
| 'NMTOKENS' [VC: Name Token]
[54] AttType ::= StringType | TokenizedType | EnumeratedType
```*/
var AttType = regg(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/, '|', EnumeratedType);
// `[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)`
// [WFC: No < in Attribute Values] [WFC: No External Entity References]
// [VC: Fixed Attribute Default] [VC: Required Attribute] [VC: Attribute Default Value Syntactically Correct]
var DefaultDecl = regg(/#REQUIRED|#IMPLIED/, '|', regg(regg('#FIXED', S), '?', AttValue));
// https://www.w3.org/TR/xml11/#NT-AttDef
// [53] AttDef ::= S Name S AttType S DefaultDecl
// https://www.w3.org/TR/xml-names/#NT-AttDef
// [1] NSAttName ::= PrefixedAttName | DefaultAttName
// [2] PrefixedAttName ::= 'xmlns:' NCName [NSC: Reserved Prefixes and Namespace Names]
// [3] DefaultAttName ::= 'xmlns'
// [21] AttDef ::= S (QName | NSAttName) S AttType S DefaultDecl
// === S Name S AttType S DefaultDecl
// xmldom is not distinguishing between QName and NSAttName on this level
// to support XML without namespaces in DTD we can not restrict it to QName
var AttDef = regg(S, Name, S, AttType, S, DefaultDecl);
var ATTLIST_DECL_START = ''`
// https://www.w3.org/TR/xml-names/#NT-AttlistDecl
// `[20] AttlistDecl ::= ''`
// to support XML without namespaces in DTD we can not restrict it to QName
var AttlistDecl = reg(ATTLIST_DECL_START, S, Name, AttDef, '*', S_OPT, '>');
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#about:legacy-compat
var ABOUT_LEGACY_COMPAT = 'about:legacy-compat';
var ABOUT_LEGACY_COMPAT_SystemLiteral = regg('"' + ABOUT_LEGACY_COMPAT + '"', '|', "'" + ABOUT_LEGACY_COMPAT + "'");
var SYSTEM = 'SYSTEM';
var PUBLIC = 'PUBLIC';
// https://www.w3.org/TR/xml11/#NT-ExternalID
// `[75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral`
var ExternalID = regg(regg(SYSTEM, S, SystemLiteral), '|', regg(PUBLIC, S, PubidLiteral, S, SystemLiteral));
var ExternalID_match = reg(
'^',
regg(
regg(SYSTEM, S, '(?', SystemLiteral, ')'),
'|',
regg(PUBLIC, S, '(?', PubidLiteral, ')', S, '(?', SystemLiteral, ')')
)
);
// https://www.w3.org/TR/xml11/#NT-NDataDecl
// `[76] NDataDecl ::= S 'NDATA' S Name` [VC: Notation Declared]
var NDataDecl = regg(S, 'NDATA', S, Name);
// https://www.w3.org/TR/xml11/#NT-EntityDef
// `[73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)`
var EntityDef = regg(EntityValue, '|', regg(ExternalID, NDataDecl, '?'));
var ENTITY_DECL_START = ''`
var GEDecl = reg(ENTITY_DECL_START, S, Name, S, EntityDef, S_OPT, '>');
// https://www.w3.org/TR/xml11/#NT-PEDef
// `[74] PEDef ::= EntityValue | ExternalID`
var PEDef = regg(EntityValue, '|', ExternalID);
// https://www.w3.org/TR/xml11/#NT-PEDecl
// `[72] PEDecl ::= ''`
var PEDecl = reg(ENTITY_DECL_START, S, '%', S, Name, S, PEDef, S_OPT, '>');
// https://www.w3.org/TR/xml11/#NT-EntityDecl
// `[70] EntityDecl ::= GEDecl | PEDecl`
var EntityDecl = regg(GEDecl, '|', PEDecl);
// https://www.w3.org/TR/xml11/#NT-PublicID
// `[83] PublicID ::= 'PUBLIC' S PubidLiteral`
var PublicID = reg(PUBLIC, S, PubidLiteral);
// https://www.w3.org/TR/xml11/#NT-NotationDecl
// `[82] NotationDecl ::= ''` [VC: Unique Notation Name]
var NotationDecl = reg('');
// https://www.w3.org/TR/xml11/#NT-Eq
// `[25] Eq ::= S? '=' S?`
var Eq = reg(S_OPT, '=', S_OPT);
// https://www.w3.org/TR/xml/#NT-VersionNum
// `[26] VersionNum ::= '1.' [0-9]+`
// https://www.w3.org/TR/xml11/#NT-VersionNum
// `[26] VersionNum ::= '1.1'`
var VersionNum = /1[.]\d+/;
// https://www.w3.org/TR/xml11/#NT-VersionInfo
// `[24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')`
var VersionInfo = reg(S, 'version', Eq, regg("'", VersionNum, "'", '|', '"', VersionNum, '"'));
// https://www.w3.org/TR/xml11/#NT-EncName
// `[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*`
var EncName = /[A-Za-z][-A-Za-z0-9._]*/;
// https://www.w3.org/TR/xml11/#NT-EncDecl
// `[80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )`
var EncodingDecl = regg(S, 'encoding', Eq, regg('"', EncName, '"', '|', "'", EncName, "'"));
// https://www.w3.org/TR/xml11/#NT-SDDecl
// `[32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))`
var SDDecl = regg(S, 'standalone', Eq, regg("'", regg('yes', '|', 'no'), "'", '|', '"', regg('yes', '|', 'no'), '"'));
// https://www.w3.org/TR/xml11/#NT-XMLDecl
// [23] XMLDecl ::= ''
var XMLDecl = reg(/^<\?xml/, VersionInfo, EncodingDecl, '?', SDDecl, '?', S_OPT, /\?>/);
/*
https://www.w3.org/TR/xml/#NT-markupdecl
https://www.w3.org/TR/xml11/#NT-markupdecl
`[29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment`
var markupdecl = regg(elementdecl, '|', AttlistDecl, '|', EntityDecl, '|', NotationDecl, '|', PI_unsafe, '|', Comment);
*/
/*
https://www.w3.org/TR/xml-names/#NT-doctypedecl
`[28a] DeclSep ::= PEReference | S`
https://www.w3.org/TR/xml11/#NT-intSubset
```
[28b] intSubset ::= (markupdecl | DeclSep)*
=== (markupdecl | PEReference | S)*
```
[WFC: PE Between Declarations]
var intSubset = reg(regg(markupdecl, '|', PEReference, '|', S), '*');
*/
var DOCTYPE_DECL_START = ''`
https://www.afterwardsw3.org/TR/xml-names/#NT-doctypedecl
`[16] doctypedecl ::= ''`
var doctypedecl = reg('');
*/
var CDATA_START = '';
var CDStart = //;
var CData = reg(Char, '*?', CDEnd);
/*
https://www.w3.org/TR/xml/#dt-cdsection
`[18] CDSect ::= CDStart CData CDEnd`
`[19] CDStart ::= '' Char*))`
`[21] CDEnd ::= ']]>'`
*/
var CDSect = reg(CDStart, CData);
// unit tested
exports.chars = chars;
exports.chars_without = chars_without;
exports.detectUnicodeSupport = detectUnicodeSupport;
exports.reg = reg;
exports.regg = regg;
exports.ABOUT_LEGACY_COMPAT = ABOUT_LEGACY_COMPAT;
exports.ABOUT_LEGACY_COMPAT_SystemLiteral = ABOUT_LEGACY_COMPAT_SystemLiteral;
exports.AttlistDecl = AttlistDecl;
exports.CDATA_START = CDATA_START;
exports.CDATA_END = CDATA_END;
exports.CDSect = CDSect;
exports.Char = Char;
exports.Comment = Comment;
exports.COMMENT_START = COMMENT_START;
exports.COMMENT_END = COMMENT_END;
exports.DOCTYPE_DECL_START = DOCTYPE_DECL_START;
exports.elementdecl = elementdecl;
exports.EntityDecl = EntityDecl;
exports.EntityValue = EntityValue;
exports.ExternalID = ExternalID;
exports.ExternalID_match = ExternalID_match;
exports.Name = Name;
exports.NotationDecl = NotationDecl;
exports.Reference = Reference;
exports.PEReference = PEReference;
exports.PI = PI;
exports.PUBLIC = PUBLIC;
exports.PubidLiteral = PubidLiteral;
exports.QName = QName;
exports.QName_exact = QName_exact;
exports.QName_group = QName_group;
exports.S = S;
exports.SChar_s = SChar_s;
exports.S_OPT = S_OPT;
exports.SYSTEM = SYSTEM;
exports.SystemLiteral = SystemLiteral;
exports.UNICODE_REPLACEMENT_CHARACTER = UNICODE_REPLACEMENT_CHARACTER;
exports.UNICODE_SUPPORT = UNICODE_SUPPORT;
exports.XMLDecl = XMLDecl;
/***/ }),
/***/ 767:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var conventions = __webpack_require__(870);
function extendError(constructor, writableName) {
constructor.prototype = Object.create(Error.prototype, {
constructor: { value: constructor },
name: { value: constructor.name, enumerable: true, writable: writableName },
});
}
var DOMExceptionName = conventions.freeze({
/**
* the default value as defined by the spec
*/
Error: 'Error',
/**
* @deprecated
* Use RangeError instead.
*/
IndexSizeError: 'IndexSizeError',
/**
* @deprecated
* Just to match the related static code, not part of the spec.
*/
DomstringSizeError: 'DomstringSizeError',
HierarchyRequestError: 'HierarchyRequestError',
WrongDocumentError: 'WrongDocumentError',
InvalidCharacterError: 'InvalidCharacterError',
/**
* @deprecated
* Just to match the related static code, not part of the spec.
*/
NoDataAllowedError: 'NoDataAllowedError',
NoModificationAllowedError: 'NoModificationAllowedError',
NotFoundError: 'NotFoundError',
NotSupportedError: 'NotSupportedError',
InUseAttributeError: 'InUseAttributeError',
InvalidStateError: 'InvalidStateError',
SyntaxError: 'SyntaxError',
InvalidModificationError: 'InvalidModificationError',
NamespaceError: 'NamespaceError',
/**
* @deprecated
* Use TypeError for invalid arguments,
* "NotSupportedError" DOMException for unsupported operations,
* and "NotAllowedError" DOMException for denied requests instead.
*/
InvalidAccessError: 'InvalidAccessError',
/**
* @deprecated
* Just to match the related static code, not part of the spec.
*/
ValidationError: 'ValidationError',
/**
* @deprecated
* Use TypeError instead.
*/
TypeMismatchError: 'TypeMismatchError',
SecurityError: 'SecurityError',
NetworkError: 'NetworkError',
AbortError: 'AbortError',
/**
* @deprecated
* Just to match the related static code, not part of the spec.
*/
URLMismatchError: 'URLMismatchError',
QuotaExceededError: 'QuotaExceededError',
TimeoutError: 'TimeoutError',
InvalidNodeTypeError: 'InvalidNodeTypeError',
DataCloneError: 'DataCloneError',
EncodingError: 'EncodingError',
NotReadableError: 'NotReadableError',
UnknownError: 'UnknownError',
ConstraintError: 'ConstraintError',
DataError: 'DataError',
TransactionInactiveError: 'TransactionInactiveError',
ReadOnlyError: 'ReadOnlyError',
VersionError: 'VersionError',
OperationError: 'OperationError',
NotAllowedError: 'NotAllowedError',
OptOutError: 'OptOutError',
});
var DOMExceptionNames = Object.keys(DOMExceptionName);
function isValidDomExceptionCode(value) {
return typeof value === 'number' && value >= 1 && value <= 25;
}
function endsWithError(value) {
return typeof value === 'string' && value.substring(value.length - DOMExceptionName.Error.length) === DOMExceptionName.Error;
}
/**
* DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation
* is impossible to perform (either for logical reasons, because data is lost, or because the
* implementation has become unstable). In general, DOM methods return specific error values in
* ordinary processing situations, such as out-of-bound errors when using NodeList.
*
* Implementations should raise other exceptions under other circumstances. For example,
* implementations should raise an implementation-dependent exception if a null argument is
* passed when null was not expected.
*
* This implementation supports the following usages:
* 1. according to the living standard (both arguments are optional):
* ```
* new DOMException("message (can be empty)", DOMExceptionNames.HierarchyRequestError)
* ```
* 2. according to previous xmldom implementation (only the first argument is required):
* ```
* new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "optional message")
* ```
* both result in the proper name being set.
*
* @class DOMException
* @param {number | string} messageOrCode
* The reason why an operation is not acceptable.
* If it is a number, it is used to determine the `name`, see
* {@link https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF ExceptionCode}
* @param {string | keyof typeof DOMExceptionName | Error} [nameOrMessage]
* The `name` to use for the error.
* If `messageOrCode` is a number, this arguments is used as the `message` instead.
* @augments Error
* @see https://webidl.spec.whatwg.org/#idl-DOMException
* @see https://webidl.spec.whatwg.org/#dfn-error-names-table
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-17189187
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
* @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
*/
function DOMException(messageOrCode, nameOrMessage) {
// support old way of passing arguments: first argument is a valid number
if (isValidDomExceptionCode(messageOrCode)) {
this.name = DOMExceptionNames[messageOrCode];
this.message = nameOrMessage || '';
} else {
this.message = messageOrCode;
this.name = endsWithError(nameOrMessage) ? nameOrMessage : DOMExceptionName.Error;
}
if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
}
extendError(DOMException, true);
Object.defineProperties(DOMException.prototype, {
code: {
enumerable: true,
get: function () {
var code = DOMExceptionNames.indexOf(this.name);
if (isValidDomExceptionCode(code)) return code;
return 0;
},
},
});
var ExceptionCode = {
INDEX_SIZE_ERR: 1,
DOMSTRING_SIZE_ERR: 2,
HIERARCHY_REQUEST_ERR: 3,
WRONG_DOCUMENT_ERR: 4,
INVALID_CHARACTER_ERR: 5,
NO_DATA_ALLOWED_ERR: 6,
NO_MODIFICATION_ALLOWED_ERR: 7,
NOT_FOUND_ERR: 8,
NOT_SUPPORTED_ERR: 9,
INUSE_ATTRIBUTE_ERR: 10,
INVALID_STATE_ERR: 11,
SYNTAX_ERR: 12,
INVALID_MODIFICATION_ERR: 13,
NAMESPACE_ERR: 14,
INVALID_ACCESS_ERR: 15,
VALIDATION_ERR: 16,
TYPE_MISMATCH_ERR: 17,
SECURITY_ERR: 18,
NETWORK_ERR: 19,
ABORT_ERR: 20,
URL_MISMATCH_ERR: 21,
QUOTA_EXCEEDED_ERR: 22,
TIMEOUT_ERR: 23,
INVALID_NODE_TYPE_ERR: 24,
DATA_CLONE_ERR: 25,
};
var entries = Object.entries(ExceptionCode);
for (var i = 0; i < entries.length; i++) {
var key = entries[i][0];
DOMException[key] = entries[i][1];
}
/**
* Creates an error that will not be caught by XMLReader aka the SAX parser.
*
* @class
* @param {string} message
* @param {any} [locator]
*/
function ParseError(message, locator) {
this.message = message;
this.locator = locator;
if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError);
}
extendError(ParseError);
exports.DOMException = DOMException;
exports.DOMExceptionName = DOMExceptionName;
exports.ExceptionCode = ExceptionCode;
exports.ParseError = ParseError;
/***/ }),
/***/ 786:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var conventions = __webpack_require__(870);
var find = conventions.find;
var hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace;
var hasOwn = conventions.hasOwn;
var isHTMLMimeType = conventions.isHTMLMimeType;
var isHTMLRawTextElement = conventions.isHTMLRawTextElement;
var isHTMLVoidElement = conventions.isHTMLVoidElement;
var MIME_TYPE = conventions.MIME_TYPE;
var NAMESPACE = conventions.NAMESPACE;
/**
* Private DOM Constructor symbol
*
* Internal symbol used for construction of all classes whose constructors should be private.
* Currently used for checks in `Node`, `Document`, `Element`, `Attr`, `CharacterData`, `Text`, `Comment`,
* `CDATASection`, `DocumentType`, `Notation`, `Entity`, `EntityReference`, `DocumentFragment`, `ProcessingInstruction`
* so the constructor can't be used from outside the module.
*/
var PDC = Symbol();
var errors = __webpack_require__(767);
var DOMException = errors.DOMException;
var DOMExceptionName = errors.DOMExceptionName;
var g = __webpack_require__(731);
/**
* Checks if the given symbol equals the Private DOM Constructor symbol (PDC)
* and throws an Illegal constructor exception when the symbols don't match.
* This ensures that the constructor remains private and can't be used outside this module.
*/
function checkSymbol(symbol) {
if (symbol !== PDC) {
throw new TypeError('Illegal constructor');
}
}
/**
* A prerequisite for `[].filter`, to drop elements that are empty.
*
* @param {string} input
* The string to be checked.
* @returns {boolean}
* Returns `true` if the input string is not empty, `false` otherwise.
*/
function notEmptyString(input) {
return input !== '';
}
/**
* Splits a string on ASCII whitespace characters (U+0009 TAB, U+000A LF, U+000C FF, U+000D CR,
* U+0020 SPACE).
* It follows the definition from the infra specification from WHATWG.
*
* @param {string} input
* The string to be split.
* @returns {string[]}
* An array of the split strings. The array can be empty if the input string is empty or only
* contains whitespace characters.
* @see {@link https://infra.spec.whatwg.org/#split-on-ascii-whitespace}
* @see {@link https://infra.spec.whatwg.org/#ascii-whitespace}
*/
function splitOnASCIIWhitespace(input) {
// U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE
return input ? input.split(/[\t\n\f\r ]+/).filter(notEmptyString) : [];
}
/**
* Adds element as a key to current if it is not already present.
*
* @param {Record} current
* The current record object to which the element will be added as a key.
* The object's keys are string types and values are either boolean or undefined.
* @param {string} element
* The string to be added as a key to the current record.
* @returns {Record}
* The updated record object after the addition of the new element.
*/
function orderedSetReducer(current, element) {
if (!hasOwn(current, element)) {
current[element] = true;
}
return current;
}
/**
* Converts a string into an ordered set by splitting the input on ASCII whitespace and
* ensuring uniqueness of elements.
* This follows the definition of an ordered set from the infra specification by WHATWG.
*
* @param {string} input
* The input string to be transformed into an ordered set.
* @returns {string[]}
* An array of unique strings obtained from the input, preserving the original order.
* The array can be empty if the input string is empty or only contains whitespace characters.
* @see {@link https://infra.spec.whatwg.org/#ordered-set}
*/
function toOrderedSet(input) {
if (!input) return [];
var list = splitOnASCIIWhitespace(input);
return Object.keys(list.reduce(orderedSetReducer, {}));
}
/**
* Uses `list.indexOf` to implement a function that behaves like `Array.prototype.includes`.
* This function is used in environments where `Array.prototype.includes` may not be available.
*
* @param {any[]} list
* The array in which to search for the element.
* @returns {function(any): boolean}
* A function that accepts an element and returns a boolean indicating whether the element is
* included in the provided list.
*/
function arrayIncludes(list) {
return function (element) {
return list && list.indexOf(element) !== -1;
};
}
/**
* Validates a qualified name based on the criteria provided in the DOM specification by
* WHATWG.
*
* @param {string} qualifiedName
* The qualified name to be validated.
* @throws {DOMException}
* With code {@link DOMException.INVALID_CHARACTER_ERR} if the qualified name contains an
* invalid character.
* @see {@link https://dom.spec.whatwg.org/#validate}
*/
function validateQualifiedName(qualifiedName) {
if (!g.QName_exact.test(qualifiedName)) {
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'invalid character in qualified name "' + qualifiedName + '"');
}
}
/**
* Validates a qualified name and the namespace associated with it,
* based on the criteria provided in the DOM specification by WHATWG.
*
* @param {string | null} namespace
* The namespace to be validated. It can be a string or null.
* @param {string} qualifiedName
* The qualified name to be validated.
* @returns {[namespace: string | null, prefix: string | null, localName: string]}
* Returns a tuple with the namespace,
* prefix and local name of the qualified name.
* @throws {DOMException}
* Throws a DOMException if the qualified name or the namespace is not valid.
* @see {@link https://dom.spec.whatwg.org/#validate-and-extract}
*/
function validateAndExtract(namespace, qualifiedName) {
validateQualifiedName(qualifiedName);
namespace = namespace || null;
/**
* @type {string | null}
*/
var prefix = null;
var localName = qualifiedName;
if (qualifiedName.indexOf(':') >= 0) {
var splitResult = qualifiedName.split(':');
prefix = splitResult[0];
localName = splitResult[1];
}
if (prefix !== null && namespace === null) {
throw new DOMException(DOMException.NAMESPACE_ERR, 'prefix is non-null and namespace is null');
}
if (prefix === 'xml' && namespace !== conventions.NAMESPACE.XML) {
throw new DOMException(DOMException.NAMESPACE_ERR, 'prefix is "xml" and namespace is not the XML namespace');
}
if ((prefix === 'xmlns' || qualifiedName === 'xmlns') && namespace !== conventions.NAMESPACE.XMLNS) {
throw new DOMException(
DOMException.NAMESPACE_ERR,
'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace'
);
}
if (namespace === conventions.NAMESPACE.XMLNS && prefix !== 'xmlns' && qualifiedName !== 'xmlns') {
throw new DOMException(
DOMException.NAMESPACE_ERR,
'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"'
);
}
return [namespace, prefix, localName];
}
/**
* Copies properties from one object to another.
* It only copies the object's own (not inherited) properties.
*
* @param {Object} src
* The source object from which properties are copied.
* @param {Object} dest
* The destination object to which properties are copied.
*/
function copy(src, dest) {
for (var p in src) {
if (hasOwn(src, p)) {
dest[p] = src[p];
}
}
}
/**
* Extends a class with the properties and methods of a super class.
* It uses a form of prototypal inheritance, and establishes the `constructor` property
* correctly(?).
*
* It is not clear to the current maintainers if this implementation is making sense,
* since it creates an intermediate prototype function,
* which all properties of `Super` are copied onto using `_copy`.
*
* @param {Object} Class
* The class that is to be extended.
* @param {Object} Super
* The super class from which properties and methods are inherited.
* @private
*/
function _extends(Class, Super) {
var pt = Class.prototype;
if (!(pt instanceof Super)) {
function t() {}
t.prototype = Super.prototype;
t = new t();
copy(pt, t);
Class.prototype = pt = t;
}
if (pt.constructor != Class) {
if (typeof Class != 'function') {
console.error('unknown Class:' + Class);
}
pt.constructor = Class;
}
}
var NodeType = {};
var ELEMENT_NODE = (NodeType.ELEMENT_NODE = 1);
var ATTRIBUTE_NODE = (NodeType.ATTRIBUTE_NODE = 2);
var TEXT_NODE = (NodeType.TEXT_NODE = 3);
var CDATA_SECTION_NODE = (NodeType.CDATA_SECTION_NODE = 4);
var ENTITY_REFERENCE_NODE = (NodeType.ENTITY_REFERENCE_NODE = 5);
var ENTITY_NODE = (NodeType.ENTITY_NODE = 6);
var PROCESSING_INSTRUCTION_NODE = (NodeType.PROCESSING_INSTRUCTION_NODE = 7);
var COMMENT_NODE = (NodeType.COMMENT_NODE = 8);
var DOCUMENT_NODE = (NodeType.DOCUMENT_NODE = 9);
var DOCUMENT_TYPE_NODE = (NodeType.DOCUMENT_TYPE_NODE = 10);
var DOCUMENT_FRAGMENT_NODE = (NodeType.DOCUMENT_FRAGMENT_NODE = 11);
var NOTATION_NODE = (NodeType.NOTATION_NODE = 12);
var DocumentPosition = conventions.freeze({
DOCUMENT_POSITION_DISCONNECTED: 1,
DOCUMENT_POSITION_PRECEDING: 2,
DOCUMENT_POSITION_FOLLOWING: 4,
DOCUMENT_POSITION_CONTAINS: 8,
DOCUMENT_POSITION_CONTAINED_BY: 16,
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32,
});
//helper functions for compareDocumentPosition
/**
* Finds the common ancestor in two parent chains.
*
* @param {Node[]} a
* The first parent chain.
* @param {Node[]} b
* The second parent chain.
* @returns {Node}
* The common ancestor node if it exists. If there is no common ancestor, the function will
* return `null`.
*/
function commonAncestor(a, b) {
if (b.length < a.length) return commonAncestor(b, a);
var c = null;
for (var n in a) {
if (a[n] !== b[n]) return c;
c = a[n];
}
return c;
}
/**
* Assigns a unique identifier to a document to ensure consistency while comparing unrelated
* nodes.
*
* @param {Document} doc
* The document to which a unique identifier is to be assigned.
* @returns {string}
* The unique identifier of the document. If the document already had a unique identifier, the
* function will return the existing one.
*/
function docGUID(doc) {
if (!doc.guid) doc.guid = Math.random();
return doc.guid;
}
//-- end of helper functions
/**
* The NodeList interface provides the abstraction of an ordered collection of nodes,
* without defining or constraining how this collection is implemented.
* NodeList objects in the DOM are live.
* The items in the NodeList are accessible via an integral index, starting from 0.
* You can also access the items of the NodeList with a `for...of` loop.
*
* @class NodeList
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177
* @constructs NodeList
*/
function NodeList() {}
NodeList.prototype = {
/**
* The number of nodes in the list. The range of valid child node indices is 0 to length-1
* inclusive.
*
* @type {number}
*/
length: 0,
/**
* Returns the item at `index`. If index is greater than or equal to the number of nodes in
* the list, this returns null.
*
* @param index
* Unsigned long Index into the collection.
* @returns {Node | null}
* The node at position `index` in the NodeList,
* or null if that is not a valid index.
*/
item: function (index) {
return index >= 0 && index < this.length ? this[index] : null;
},
/**
* Returns a string representation of the NodeList.
*
* @param {unknown} nodeFilter
* __A filter function? Not implemented according to the spec?__.
* @returns {string}
* A string representation of the NodeList.
*/
toString: function (nodeFilter) {
for (var buf = [], i = 0; i < this.length; i++) {
serializeToString(this[i], buf, nodeFilter);
}
return buf.join('');
},
/**
* Filters the NodeList based on a predicate.
*
* @param {function(Node): boolean} predicate
* - A predicate function to filter the NodeList.
* @returns {Node[]}
* An array of nodes that satisfy the predicate.
* @private
*/
filter: function (predicate) {
return Array.prototype.filter.call(this, predicate);
},
/**
* Returns the first index at which a given node can be found in the NodeList, or -1 if it is
* not present.
*
* @param {Node} item
* - The Node item to locate in the NodeList.
* @returns {number}
* The first index of the node in the NodeList; -1 if not found.
* @private
*/
indexOf: function (item) {
return Array.prototype.indexOf.call(this, item);
},
};
NodeList.prototype[Symbol.iterator] = function () {
var me = this;
var index = 0;
return {
next: function () {
if (index < me.length) {
return {
value: me[index++],
done: false,
};
} else {
return {
done: true,
};
}
},
return: function () {
return {
done: true,
};
},
};
};
/**
* Represents a live collection of nodes that is automatically updated when its associated
* document changes.
*
* @class LiveNodeList
* @param {Node} node
* The associated node.
* @param {function} refresh
* The function to refresh the live node list.
* @augments NodeList
* @constructs LiveNodeList
*/
function LiveNodeList(node, refresh) {
this._node = node;
this._refresh = refresh;
_updateLiveList(this);
}
/**
* Updates the live node list.
*
* @param {LiveNodeList} list
* The live node list to update.
* @private
*/
function _updateLiveList(list) {
var inc = list._node._inc || list._node.ownerDocument._inc;
if (list._inc !== inc) {
var ls = list._refresh(list._node);
__set__(list, 'length', ls.length);
if (!list.$$length || ls.length < list.$$length) {
for (var i = ls.length; i in list; i++) {
if (hasOwn(list, i)) {
delete list[i];
}
}
}
copy(ls, list);
list._inc = inc;
}
}
/**
* Returns the node at position `index` in the LiveNodeList, or null if that is not a valid
* index.
*
* @param {number} i
* Index into the collection.
* @returns {Node | null}
* The node at position `index` in the LiveNodeList, or null if that is not a valid index.
*/
LiveNodeList.prototype.item = function (i) {
_updateLiveList(this);
return this[i] || null;
};
_extends(LiveNodeList, NodeList);
/**
* Objects implementing the NamedNodeMap interface are used to represent collections of nodes
* that can be accessed by name.
* Note that NamedNodeMap does not inherit from NodeList;
* NamedNodeMaps are not maintained in any particular order.
* Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal
* index,
* but this is simply to allow convenient enumeration of the contents of a NamedNodeMap,
* and does not imply that the DOM specifies an order to these Nodes.
* NamedNodeMap objects in the DOM are live.
* used for attributes or DocumentType entities
*
* This implementation only supports property indices, but does not support named properties,
* as specified in the living standard.
*
* @class NamedNodeMap
* @see https://dom.spec.whatwg.org/#interface-namednodemap
* @see https://webidl.spec.whatwg.org/#dfn-supported-property-names
* @constructs NamedNodeMap
*/
function NamedNodeMap() {}
/**
* Returns the index of a node within the list.
*
* @param {Array} list
* The list of nodes.
* @param {Node} node
* The node to find.
* @returns {number}
* The index of the node within the list, or -1 if not found.
* @private
*/
function _findNodeIndex(list, node) {
var i = 0;
while (i < list.length) {
if (list[i] === node) {
return i;
}
i++;
}
}
/**
* Adds a new attribute to the list and updates the owner element of the attribute.
*
* @param {Element} el
* The element which will become the owner of the new attribute.
* @param {NamedNodeMap} list
* The list to which the new attribute will be added.
* @param {Attr} newAttr
* The new attribute to be added.
* @param {Attr} oldAttr
* The old attribute to be replaced, or null if no attribute is to be replaced.
* @returns {void}
* @private
*/
function _addNamedNode(el, list, newAttr, oldAttr) {
if (oldAttr) {
list[_findNodeIndex(list, oldAttr)] = newAttr;
} else {
list[list.length] = newAttr;
list.length++;
}
if (el) {
newAttr.ownerElement = el;
var doc = el.ownerDocument;
if (doc) {
oldAttr && _onRemoveAttribute(doc, el, oldAttr);
_onAddAttribute(doc, el, newAttr);
}
}
}
/**
* Removes an attribute from the list and updates the owner element of the attribute.
*
* @param {Element} el
* The element which is the current owner of the attribute.
* @param {NamedNodeMap} list
* The list from which the attribute will be removed.
* @param {Attr} attr
* The attribute to be removed.
* @returns {void}
* @private
*/
function _removeNamedNode(el, list, attr) {
//console.log('remove attr:'+attr)
var i = _findNodeIndex(list, attr);
if (i >= 0) {
var lastIndex = list.length - 1;
while (i <= lastIndex) {
list[i] = list[++i];
}
list.length = lastIndex;
if (el) {
var doc = el.ownerDocument;
if (doc) {
_onRemoveAttribute(doc, el, attr);
}
attr.ownerElement = null;
}
}
}
NamedNodeMap.prototype = {
length: 0,
item: NodeList.prototype.item,
/**
* Get an attribute by name. Note: Name is in lower case in case of HTML namespace and
* document.
*
* @param {string} localName
* The local name of the attribute.
* @returns {Attr | null}
* The attribute with the given local name, or null if no such attribute exists.
* @see https://dom.spec.whatwg.org/#concept-element-attributes-get-by-name
*/
getNamedItem: function (localName) {
if (this._ownerElement && this._ownerElement._isInHTMLDocumentAndNamespace()) {
localName = localName.toLowerCase();
}
var i = 0;
while (i < this.length) {
var attr = this[i];
if (attr.nodeName === localName) {
return attr;
}
i++;
}
return null;
},
/**
* Set an attribute.
*
* @param {Attr} attr
* The attribute to set.
* @returns {Attr | null}
* The old attribute with the same local name and namespace URI as the new one, or null if no
* such attribute exists.
* @throws {DOMException}
* With code:
* - {@link INUSE_ATTRIBUTE_ERR} - If the attribute is already an attribute of another
* element.
* @see https://dom.spec.whatwg.org/#concept-element-attributes-set
*/
setNamedItem: function (attr) {
var el = attr.ownerElement;
if (el && el !== this._ownerElement) {
throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR);
}
var oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName);
if (oldAttr === attr) {
return attr;
}
_addNamedNode(this._ownerElement, this, attr, oldAttr);
return oldAttr;
},
/**
* Set an attribute, replacing an existing attribute with the same local name and namespace
* URI if one exists.
*
* @param {Attr} attr
* The attribute to set.
* @returns {Attr | null}
* The old attribute with the same local name and namespace URI as the new one, or null if no
* such attribute exists.
* @throws {DOMException}
* Throws a DOMException with the name "InUseAttributeError" if the attribute is already an
* attribute of another element.
* @see https://dom.spec.whatwg.org/#concept-element-attributes-set
*/
setNamedItemNS: function (attr) {
return this.setNamedItem(attr);
},
/**
* Removes an attribute specified by the local name.
*
* @param {string} localName
* The local name of the attribute to be removed.
* @returns {Attr}
* The attribute node that was removed.
* @throws {DOMException}
* With code:
* - {@link DOMException.NOT_FOUND_ERR} if no attribute with the given name is found.
* @see https://dom.spec.whatwg.org/#dom-namednodemap-removenameditem
* @see https://dom.spec.whatwg.org/#concept-element-attributes-remove-by-name
*/
removeNamedItem: function (localName) {
var attr = this.getNamedItem(localName);
if (!attr) {
throw new DOMException(DOMException.NOT_FOUND_ERR, localName);
}
_removeNamedNode(this._ownerElement, this, attr);
return attr;
},
/**
* Removes an attribute specified by the namespace and local name.
*
* @param {string | null} namespaceURI
* The namespace URI of the attribute to be removed.
* @param {string} localName
* The local name of the attribute to be removed.
* @returns {Attr}
* The attribute node that was removed.
* @throws {DOMException}
* With code:
* - {@link DOMException.NOT_FOUND_ERR} if no attribute with the given namespace URI and local
* name is found.
* @see https://dom.spec.whatwg.org/#dom-namednodemap-removenameditemns
* @see https://dom.spec.whatwg.org/#concept-element-attributes-remove-by-namespace
*/
removeNamedItemNS: function (namespaceURI, localName) {
var attr = this.getNamedItemNS(namespaceURI, localName);
if (!attr) {
throw new DOMException(DOMException.NOT_FOUND_ERR, namespaceURI ? namespaceURI + ' : ' + localName : localName);
}
_removeNamedNode(this._ownerElement, this, attr);
return attr;
},
/**
* Get an attribute by namespace and local name.
*
* @param {string | null} namespaceURI
* The namespace URI of the attribute.
* @param {string} localName
* The local name of the attribute.
* @returns {Attr | null}
* The attribute with the given namespace URI and local name, or null if no such attribute
* exists.
* @see https://dom.spec.whatwg.org/#concept-element-attributes-get-by-namespace
*/
getNamedItemNS: function (namespaceURI, localName) {
if (!namespaceURI) {
namespaceURI = null;
}
var i = 0;
while (i < this.length) {
var node = this[i];
if (node.localName === localName && node.namespaceURI === namespaceURI) {
return node;
}
i++;
}
return null;
},
};
NamedNodeMap.prototype[Symbol.iterator] = function () {
var me = this;
var index = 0;
return {
next: function () {
if (index < me.length) {
return {
value: me[index++],
done: false,
};
} else {
return {
done: true,
};
}
},
return: function () {
return {
done: true,
};
},
};
};
/**
* The DOMImplementation interface provides a number of methods for performing operations that
* are independent of any particular instance of the document object model.
*
* The DOMImplementation interface represents an object providing methods which are not
* dependent on any particular document.
* Such an object is returned by the `Document.implementation` property.
*
* **The individual methods describe the differences compared to the specs**.
*
* @class DOMImplementation
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN
* @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core
* (Initial)
* @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core
* @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard
* @constructs DOMImplementation
*/
function DOMImplementation() {}
DOMImplementation.prototype = {
/**
* Test if the DOM implementation implements a specific feature and version, as specified in
* {@link https://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMFeatures DOM Features}.
*
* The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given
* feature is supported. The different implementations fairly diverged in what kind of
* features were reported. The latest version of the spec settled to force this method to
* always return true, where the functionality was accurate and in use.
*
* @deprecated
* It is deprecated and modern browsers return true in all cases.
* @function DOMImplementation#hasFeature
* @param {string} feature
* The name of the feature to test.
* @param {string} [version]
* This is the version number of the feature to test.
* @returns {boolean}
* Always returns true.
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN
* @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core
* @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-5CED94D7 DOM Level 3 Core
*/
hasFeature: function (feature, version) {
return true;
},
/**
* Creates a DOM Document object of the specified type with its document element. Note that
* based on the {@link DocumentType}
* given to create the document, the implementation may instantiate specialized
* {@link Document} objects that support additional features than the "Core", such as "HTML"
* {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#DOM2HTML DOM Level 2 HTML}.
* On the other hand, setting the {@link DocumentType} after the document was created makes
* this very unlikely to happen. Alternatively, specialized {@link Document} creation methods,
* such as createHTMLDocument
* {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#DOM2HTML DOM Level 2 HTML},
* can be used to obtain specific types of {@link Document} objects.
*
* __It behaves slightly different from the description in the living standard__:
* - There is no interface/class `XMLDocument`, it returns a `Document`
* instance (with it's `type` set to `'xml'`).
* - `encoding`, `mode`, `origin`, `url` fields are currently not declared.
*
* @function DOMImplementation.createDocument
* @param {string | null} namespaceURI
* The
* {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-namespaceURI namespace URI}
* of the document element to create or null.
* @param {string | null} qualifiedName
* The
* {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-qualifiedname qualified name}
* of the document element to be created or null.
* @param {DocumentType | null} [doctype=null]
* The type of document to be created or null. When doctype is not null, its
* {@link Node#ownerDocument} attribute is set to the document being created. Default is
* `null`
* @returns {Document}
* A new {@link Document} object with its document element. If the NamespaceURI,
* qualifiedName, and doctype are null, the returned {@link Document} is empty with no
* document element.
* @throws {DOMException}
* With code:
*
* - `INVALID_CHARACTER_ERR`: Raised if the specified qualified name is not an XML name
* according to {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#XML XML 1.0}.
* - `NAMESPACE_ERR`: Raised if the qualifiedName is malformed, if the qualifiedName has a
* prefix and the namespaceURI is null, or if the qualifiedName is null and the namespaceURI
* is different from null, or if the qualifiedName has a prefix that is "xml" and the
* namespaceURI is different from "{@link http://www.w3.org/XML/1998/namespace}"
* {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#Namespaces XML Namespaces},
* or if the DOM implementation does not support the "XML" feature but a non-null namespace
* URI was provided, since namespaces were defined by XML.
* - `WRONG_DOCUMENT_ERR`: Raised if doctype has already been used with a different document
* or was created from a different implementation.
* - `NOT_SUPPORTED_ERR`: May be raised if the implementation does not support the feature
* "XML" and the language exposed through the Document does not support XML Namespaces (such
* as {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#HTML40 HTML 4.01}).
* @since DOM Level 2.
* @see {@link #createHTMLDocument}
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Living Standard
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocument DOM
* Level 3 Core
* @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM
* Level 2 Core (initial)
*/
createDocument: function (namespaceURI, qualifiedName, doctype) {
var contentType = MIME_TYPE.XML_APPLICATION;
if (namespaceURI === NAMESPACE.HTML) {
contentType = MIME_TYPE.XML_XHTML_APPLICATION;
} else if (namespaceURI === NAMESPACE.SVG) {
contentType = MIME_TYPE.XML_SVG_IMAGE;
}
var doc = new Document(PDC, { contentType: contentType });
doc.implementation = this;
doc.childNodes = new NodeList();
doc.doctype = doctype || null;
if (doctype) {
doc.appendChild(doctype);
}
if (qualifiedName) {
var root = doc.createElementNS(namespaceURI, qualifiedName);
doc.appendChild(root);
}
return doc;
},
/**
* Creates an empty DocumentType node. Entity declarations and notations are not made
* available. Entity reference expansions and default attribute additions do not occur.
*
* **This behavior is slightly different from the one in the specs**:
* - `encoding`, `mode`, `origin`, `url` fields are currently not declared.
* - `publicId` and `systemId` contain the raw data including any possible quotes,
* so they can always be serialized back to the original value
* - `internalSubset` contains the raw string between `[` and `]` if present,
* but is not parsed or validated in any form.
*
* @function DOMImplementation#createDocumentType
* @param {string} qualifiedName
* The {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-qualifiedname qualified
* name} of the document type to be created.
* @param {string} [publicId]
* The external subset public identifier.
* @param {string} [systemId]
* The external subset system identifier.
* @param {string} [internalSubset]
* the internal subset or an empty string if it is not present
* @returns {DocumentType}
* A new {@link DocumentType} node with {@link Node#ownerDocument} set to null.
* @throws {DOMException}
* With code:
*
* - `INVALID_CHARACTER_ERR`: Raised if the specified qualified name is not an XML name
* according to {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#XML XML 1.0}.
* - `NAMESPACE_ERR`: Raised if the qualifiedName is malformed.
* - `NOT_SUPPORTED_ERR`: May be raised if the implementation does not support the feature
* "XML" and the language exposed through the Document does not support XML Namespaces (such
* as {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#HTML40 HTML 4.01}).
* @since DOM Level 2.
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType
* MDN
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living
* Standard
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-3-Core-DOM-createDocType DOM
* Level 3 Core
* @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM
* Level 2 Core
* @see https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md#050
* @see https://www.w3.org/TR/DOM-Level-2-Core/#core-ID-Core-DocType-internalSubset
* @prettierignore
*/
createDocumentType: function (qualifiedName, publicId, systemId, internalSubset) {
validateQualifiedName(qualifiedName);
var node = new DocumentType(PDC);
node.name = qualifiedName;
node.nodeName = qualifiedName;
node.publicId = publicId || '';
node.systemId = systemId || '';
node.internalSubset = internalSubset || '';
node.childNodes = new NodeList();
return node;
},
/**
* Returns an HTML document, that might already have a basic DOM structure.
*
* __It behaves slightly different from the description in the living standard__:
* - If the first argument is `false` no initial nodes are added (steps 3-7 in the specs are
* omitted)
* - `encoding`, `mode`, `origin`, `url` fields are currently not declared.
*
* @param {string | false} [title]
* A string containing the title to give the new HTML document.
* @returns {Document}
* The HTML document.
* @since WHATWG Living Standard.
* @see {@link #createDocument}
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument
* @see https://dom.spec.whatwg.org/#html-document
*/
createHTMLDocument: function (title) {
var doc = new Document(PDC, { contentType: MIME_TYPE.HTML });
doc.implementation = this;
doc.childNodes = new NodeList();
if (title !== false) {
doc.doctype = this.createDocumentType('html');
doc.doctype.ownerDocument = doc;
doc.appendChild(doc.doctype);
var htmlNode = doc.createElement('html');
doc.appendChild(htmlNode);
var headNode = doc.createElement('head');
htmlNode.appendChild(headNode);
if (typeof title === 'string') {
var titleNode = doc.createElement('title');
titleNode.appendChild(doc.createTextNode(title));
headNode.appendChild(titleNode);
}
htmlNode.appendChild(doc.createElement('body'));
}
return doc;
},
};
/**
* The DOM Node interface is an abstract base class upon which many other DOM API objects are
* based, thus letting those object types to be used similarly and often interchangeably. As an
* abstract class, there is no such thing as a plain Node object. All objects that implement
* Node functionality are based on one of its subclasses. Most notable are Document, Element,
* and DocumentFragment.
*
* In addition, every kind of DOM node is represented by an interface based on Node. These
* include Attr, CharacterData (which Text, Comment, CDATASection and ProcessingInstruction are
* all based on), and DocumentType.
*
* In some cases, a particular feature of the base Node interface may not apply to one of its
* child interfaces; in that case, the inheriting node may return null or throw an exception,
* depending on circumstances. For example, attempting to add children to a node type that
* cannot have children will throw an exception.
*
* **This behavior is slightly different from the in the specs**:
* - unimplemented interfaces: `EventTarget`
*
* @class
* @abstract
* @param {Symbol} symbol
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
* @see https://dom.spec.whatwg.org/#node
* @prettierignore
*/
function Node(symbol) {
checkSymbol(symbol);
}
Node.prototype = {
/**
* The first child of this node.
*
* @type {Node | null}
*/
firstChild: null,
/**
* The last child of this node.
*
* @type {Node | null}
*/
lastChild: null,
/**
* The previous sibling of this node.
*
* @type {Node | null}
*/
previousSibling: null,
/**
* The next sibling of this node.
*
* @type {Node | null}
*/
nextSibling: null,
/**
* The parent node of this node.
*
* @type {Node | null}
*/
parentNode: null,
/**
* The parent element of this node.
*
* @type {Element | null}
*/
get parentElement() {
return this.parentNode && this.parentNode.nodeType === this.ELEMENT_NODE ? this.parentNode : null;
},
/**
* The child nodes of this node.
*
* @type {NodeList}
*/
childNodes: null,
/**
* The document object associated with this node.
*
* @type {Document | null}
*/
ownerDocument: null,
/**
* The value of this node.
*
* @type {string | null}
*/
nodeValue: null,
/**
* The namespace URI of this node.
*
* @type {string | null}
*/
namespaceURI: null,
/**
* The prefix of the namespace for this node.
*
* @type {string | null}
*/
prefix: null,
/**
* The local part of the qualified name of this node.
*
* @type {string | null}
*/
localName: null,
/**
* The baseURI is currently always `about:blank`,
* since that's what happens when you create a document from scratch.
*
* @type {'about:blank'}
*/
baseURI: 'about:blank',
/**
* Is true if this node is part of a document.
*
* @type {boolean}
*/
get isConnected() {
var rootNode = this.getRootNode();
return rootNode && rootNode.nodeType === rootNode.DOCUMENT_NODE;
},
/**
* Checks whether `other` is an inclusive descendant of this node.
*
* @param {Node | null | undefined} other
* The node to check.
* @returns {boolean}
* True if `other` is an inclusive descendant of this node; false otherwise.
* @see https://dom.spec.whatwg.org/#dom-node-contains
*/
contains: function (other) {
if (!other) return false;
var parent = other;
do {
if (this === parent) return true;
parent = other.parentNode;
} while (parent);
return false;
},
/**
* @typedef GetRootNodeOptions
* @property {boolean} [composed=false]
*/
/**
* Searches for the root node of this node.
*
* **This behavior is slightly different from the in the specs**:
* - ignores `options.composed`, since `ShadowRoot`s are unsupported, always returns root.
*
* @param {GetRootNodeOptions} [options]
* @returns {Node}
* Root node.
* @see https://dom.spec.whatwg.org/#dom-node-getrootnode
* @see https://dom.spec.whatwg.org/#concept-shadow-including-root
*/
getRootNode: function (options) {
var parent = this;
do {
if (!parent.parentNode) {
return parent;
}
parent = parent.parentNode;
} while (parent);
},
/**
* Checks whether the given node is equal to this node.
*
* @param {Node} [otherNode]
* @see https://dom.spec.whatwg.org/#concept-node-equals
*/
isEqualNode: function (otherNode) {
if (!otherNode) return false;
if (this.nodeType !== otherNode.nodeType) return false;
switch (this.nodeType) {
case this.DOCUMENT_TYPE_NODE:
if (this.name !== otherNode.name) return false;
if (this.publicId !== otherNode.publicId) return false;
if (this.systemId !== otherNode.systemId) return false;
break;
case this.ELEMENT_NODE:
if (this.namespaceURI !== otherNode.namespaceURI) return false;
if (this.prefix !== otherNode.prefix) return false;
if (this.localName !== otherNode.localName) return false;
if (this.attributes.length !== otherNode.attributes.length) return false;
for (var i = 0; i < this.attributes.length; i++) {
var attr = this.attributes.item(i);
if (!attr.isEqualNode(otherNode.getAttributeNodeNS(attr.namespaceURI, attr.localName))) {
return false;
}
}
break;
case this.ATTRIBUTE_NODE:
if (this.namespaceURI !== otherNode.namespaceURI) return false;
if (this.localName !== otherNode.localName) return false;
if (this.value !== otherNode.value) return false;
break;
case this.PROCESSING_INSTRUCTION_NODE:
if (this.target !== otherNode.target || this.data !== otherNode.data) {
return false;
}
break;
case this.TEXT_NODE:
case this.COMMENT_NODE:
if (this.data !== otherNode.data) return false;
break;
}
if (this.childNodes.length !== otherNode.childNodes.length) {
return false;
}
for (var i = 0; i < this.childNodes.length; i++) {
if (!this.childNodes[i].isEqualNode(otherNode.childNodes[i])) {
return false;
}
}
return true;
},
/**
* Checks whether or not the given node is this node.
*
* @param {Node} [otherNode]
*/
isSameNode: function (otherNode) {
return this === otherNode;
},
/**
* Inserts a node before a reference node as a child of this node.
*
* @param {Node} newChild
* The new child node to be inserted.
* @param {Node | null} refChild
* The reference node before which newChild will be inserted.
* @returns {Node}
* The new child node successfully inserted.
* @throws {DOMException}
* Throws a DOMException if inserting the node would result in a DOM tree that is not
* well-formed, or if `child` is provided but is not a child of `parent`.
* See {@link _insertBefore} for more details.
* @since Modified in DOM L2
*/
insertBefore: function (newChild, refChild) {
return _insertBefore(this, newChild, refChild);
},
/**
* Replaces an old child node with a new child node within this node.
*
* @param {Node} newChild
* The new node that is to replace the old node.
* If it already exists in the DOM, it is removed from its original position.
* @param {Node} oldChild
* The existing child node to be replaced.
* @returns {Node}
* Returns the replaced child node.
* @throws {DOMException}
* Throws a DOMException if replacing the node would result in a DOM tree that is not
* well-formed, or if `oldChild` is not a child of `this`.
* This can also occur if the pre-replacement validity assertion fails.
* See {@link _insertBefore}, {@link Node.removeChild}, and
* {@link assertPreReplacementValidityInDocument} for more details.
* @see https://dom.spec.whatwg.org/#concept-node-replace
*/
replaceChild: function (newChild, oldChild) {
_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);
if (oldChild) {
this.removeChild(oldChild);
}
},
/**
* Removes an existing child node from this node.
*
* @param {Node} oldChild
* The child node to be removed.
* @returns {Node}
* Returns the removed child node.
* @throws {DOMException}
* Throws a DOMException if `oldChild` is not a child of `this`.
* See {@link _removeChild} for more details.
*/
removeChild: function (oldChild) {
return _removeChild(this, oldChild);
},
/**
* Appends a child node to this node.
*
* @param {Node} newChild
* The child node to be appended to this node.
* If it already exists in the DOM, it is removed from its original position.
* @returns {Node}
* Returns the appended child node.
* @throws {DOMException}
* Throws a DOMException if appending the node would result in a DOM tree that is not
* well-formed, or if `newChild` is not a valid Node.
* See {@link insertBefore} for more details.
*/
appendChild: function (newChild) {
return this.insertBefore(newChild, null);
},
/**
* Determines whether this node has any child nodes.
*
* @returns {boolean}
* Returns true if this node has any child nodes, and false otherwise.
*/
hasChildNodes: function () {
return this.firstChild != null;
},
/**
* Creates a copy of the calling node.
*
* @param {boolean} deep
* If true, the contents of the node are recursively copied.
* If false, only the node itself (and its attributes, if it is an element) are copied.
* @returns {Node}
* Returns the newly created copy of the node.
* @throws {DOMException}
* May throw a DOMException if operations within {@link Element#setAttributeNode} or
* {@link Node#appendChild} (which are potentially invoked in this method) do not meet their
* specific constraints.
* @see {@link cloneNode}
*/
cloneNode: function (deep) {
return cloneNode(this.ownerDocument || this, this, deep);
},
/**
* Puts the specified node and all of its subtree into a "normalized" form. In a normalized
* subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.
*
* Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType`
* is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text
* nodes.
*
* This method operates recursively, so it also normalizes any and all descendent nodes within
* the subtree.
*
* @throws {DOMException}
* May throw a DOMException if operations within removeChild or appendData (which are
* potentially invoked in this method) do not meet their specific constraints.
* @since Modified in DOM Level 2
* @see {@link Node.removeChild}
* @see {@link CharacterData.appendData}
*/
normalize: function () {
var child = this.firstChild;
while (child) {
var next = child.nextSibling;
if (next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE) {
this.removeChild(next);
child.appendData(next.data);
} else {
child.normalize();
child = next;
}
}
},
/**
* Checks whether the DOM implementation implements a specific feature and its version.
*
* @deprecated
* Since `DOMImplementation.hasFeature` is deprecated and always returns true.
* @param {string} feature
* The package name of the feature to test. This is the same name that can be passed to the
* method `hasFeature` on `DOMImplementation`.
* @param {string} version
* This is the version number of the package name to test.
* @returns {boolean}
* Returns true in all cases in the current implementation.
* @since Introduced in DOM Level 2
* @see {@link DOMImplementation.hasFeature}
*/
isSupported: function (feature, version) {
return this.ownerDocument.implementation.hasFeature(feature, version);
},
/**
* Look up the prefix associated to the given namespace URI, starting from this node.
* **The default namespace declarations are ignored by this method.**
* See Namespace Prefix Lookup for details on the algorithm used by this method.
*
* **This behavior is different from the in the specs**:
* - no node type specific handling
* - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes
*
* @param {string | null} namespaceURI
* The namespace URI for which to find the associated prefix.
* @returns {string | null}
* The associated prefix, if found; otherwise, null.
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix
* @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo
* @see https://dom.spec.whatwg.org/#dom-node-lookupprefix
* @see https://github.com/xmldom/xmldom/issues/322
* @prettierignore
*/
lookupPrefix: function (namespaceURI) {
var el = this;
while (el) {
var map = el._nsMap;
//console.dir(map)
if (map) {
for (var n in map) {
if (hasOwn(map, n) && map[n] === namespaceURI) {
return n;
}
}
}
el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;
}
return null;
},
/**
* This function is used to look up the namespace URI associated with the given prefix,
* starting from this node.
*
* **This behavior is different from the in the specs**:
* - no node type specific handling
* - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes
*
* @param {string | null} prefix
* The prefix for which to find the associated namespace URI.
* @returns {string | null}
* The associated namespace URI, if found; otherwise, null.
* @since DOM Level 3
* @see https://dom.spec.whatwg.org/#dom-node-lookupnamespaceuri
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI
* @prettierignore
*/
lookupNamespaceURI: function (prefix) {
var el = this;
while (el) {
var map = el._nsMap;
//console.dir(map)
if (map) {
if (hasOwn(map, prefix)) {
return map[prefix];
}
}
el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;
}
return null;
},
/**
* Determines whether the given namespace URI is the default namespace.
*
* The function works by looking up the prefix associated with the given namespace URI. If no
* prefix is found (i.e., the namespace URI is not registered in the namespace map of this
* node or any of its ancestors), it returns `true`, implying the namespace URI is considered
* the default.
*
* **This behavior is different from the in the specs**:
* - no node type specific handling
* - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes
*
* @param {string | null} namespaceURI
* The namespace URI to be checked.
* @returns {boolean}
* Returns true if the given namespace URI is the default namespace, false otherwise.
* @since DOM Level 3
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace
* @see https://dom.spec.whatwg.org/#dom-node-isdefaultnamespace
* @prettierignore
*/
isDefaultNamespace: function (namespaceURI) {
var prefix = this.lookupPrefix(namespaceURI);
return prefix == null;
},
/**
* Compares the reference node with a node with regard to their position in the document and
* according to the document order.
*
* @param {Node} other
* The node to compare the reference node to.
* @returns {number}
* Returns how the node is positioned relatively to the reference node according to the
* bitmask. 0 if reference node and given node are the same.
* @since DOM Level 3
* @see https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Node3-compare
* @see https://dom.spec.whatwg.org/#dom-node-comparedocumentposition
*/
compareDocumentPosition: function (other) {
if (this === other) return 0;
var node1 = other;
var node2 = this;
var attr1 = null;
var attr2 = null;
if (node1 instanceof Attr) {
attr1 = node1;
node1 = attr1.ownerElement;
}
if (node2 instanceof Attr) {
attr2 = node2;
node2 = attr2.ownerElement;
if (attr1 && node1 && node2 === node1) {
for (var i = 0, attr; (attr = node2.attributes[i]); i++) {
if (attr === attr1)
return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + DocumentPosition.DOCUMENT_POSITION_PRECEDING;
if (attr === attr2)
return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + DocumentPosition.DOCUMENT_POSITION_FOLLOWING;
}
}
}
if (!node1 || !node2 || node2.ownerDocument !== node1.ownerDocument) {
return (
DocumentPosition.DOCUMENT_POSITION_DISCONNECTED +
DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC +
(docGUID(node2.ownerDocument) > docGUID(node1.ownerDocument)
? DocumentPosition.DOCUMENT_POSITION_FOLLOWING
: DocumentPosition.DOCUMENT_POSITION_PRECEDING)
);
}
if (attr2 && node1 === node2) {
return DocumentPosition.DOCUMENT_POSITION_CONTAINS + DocumentPosition.DOCUMENT_POSITION_PRECEDING;
}
if (attr1 && node1 === node2) {
return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY + DocumentPosition.DOCUMENT_POSITION_FOLLOWING;
}
var chain1 = [];
var ancestor1 = node1.parentNode;
while (ancestor1) {
if (!attr2 && ancestor1 === node2) {
return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY + DocumentPosition.DOCUMENT_POSITION_FOLLOWING;
}
chain1.push(ancestor1);
ancestor1 = ancestor1.parentNode;
}
chain1.reverse();
var chain2 = [];
var ancestor2 = node2.parentNode;
while (ancestor2) {
if (!attr1 && ancestor2 === node1) {
return DocumentPosition.DOCUMENT_POSITION_CONTAINS + DocumentPosition.DOCUMENT_POSITION_PRECEDING;
}
chain2.push(ancestor2);
ancestor2 = ancestor2.parentNode;
}
chain2.reverse();
var ca = commonAncestor(chain1, chain2);
for (var n in ca.childNodes) {
var child = ca.childNodes[n];
if (child === node2) return DocumentPosition.DOCUMENT_POSITION_FOLLOWING;
if (child === node1) return DocumentPosition.DOCUMENT_POSITION_PRECEDING;
if (chain2.indexOf(child) >= 0) return DocumentPosition.DOCUMENT_POSITION_FOLLOWING;
if (chain1.indexOf(child) >= 0) return DocumentPosition.DOCUMENT_POSITION_PRECEDING;
}
return 0;
},
};
/**
* Encodes special XML characters to their corresponding entities.
*
* @param {string} c
* The character to be encoded.
* @returns {string}
* The encoded character.
* @private
*/
function _xmlEncoder(c) {
return (
(c == '<' && '<') || (c == '>' && '>') || (c == '&' && '&') || (c == '"' && '"') || '' + c.charCodeAt() + ';'
);
}
copy(NodeType, Node);
copy(NodeType, Node.prototype);
copy(DocumentPosition, Node);
copy(DocumentPosition, Node.prototype);
/**
* @param callback
* Return true for continue,false for break.
* @returns
* boolean true: break visit;
*/
function _visitNode(node, callback) {
if (callback(node)) {
return true;
}
if ((node = node.firstChild)) {
do {
if (_visitNode(node, callback)) {
return true;
}
} while ((node = node.nextSibling));
}
}
/**
* @typedef DocumentOptions
* @property {string} [contentType=MIME_TYPE.XML_APPLICATION]
*/
/**
* The Document interface describes the common properties and methods for any kind of document.
*
* It should usually be created using `new DOMImplementation().createDocument(...)`
* or `new DOMImplementation().createHTMLDocument(...)`.
*
* The constructor is considered a private API and offers to initially set the `contentType`
* property via it's options parameter.
*
* @class
* @param {Symbol} symbol
* @param {DocumentOptions} [options]
* @augments Node
* @private
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document
* @see https://dom.spec.whatwg.org/#interface-document
*/
function Document(symbol, options) {
checkSymbol(symbol);
var opt = options || {};
this.ownerDocument = this;
/**
* The mime type of the document is determined at creation time and can not be modified.
*
* @type {string}
* @see https://dom.spec.whatwg.org/#concept-document-content-type
* @see {@link DOMImplementation}
* @see {@link MIME_TYPE}
* @readonly
*/
this.contentType = opt.contentType || MIME_TYPE.XML_APPLICATION;
/**
* @type {'html' | 'xml'}
* @see https://dom.spec.whatwg.org/#concept-document-type
* @see {@link DOMImplementation}
* @readonly
*/
this.type = isHTMLMimeType(this.contentType) ? 'html' : 'xml';
}
/**
* Updates the namespace mapping of an element when a new attribute is added.
*
* @param {Document} doc
* The document that the element belongs to.
* @param {Element} el
* The element to which the attribute is being added.
* @param {Attr} newAttr
* The new attribute being added.
* @private
*/
function _onAddAttribute(doc, el, newAttr) {
doc && doc._inc++;
var ns = newAttr.namespaceURI;
if (ns === NAMESPACE.XMLNS) {
//update namespace
el._nsMap[newAttr.prefix ? newAttr.localName : ''] = newAttr.value;
}
}
/**
* Updates the namespace mapping of an element when an attribute is removed.
*
* @param {Document} doc
* The document that the element belongs to.
* @param {Element} el
* The element from which the attribute is being removed.
* @param {Attr} newAttr
* The attribute being removed.
* @param {boolean} remove
* Indicates whether the attribute is to be removed.
* @private
*/
function _onRemoveAttribute(doc, el, newAttr, remove) {
doc && doc._inc++;
var ns = newAttr.namespaceURI;
if (ns === NAMESPACE.XMLNS) {
//update namespace
delete el._nsMap[newAttr.prefix ? newAttr.localName : ''];
}
}
/**
* Updates `parent.childNodes`, adjusting the indexed items and its `length`.
* If `newChild` is provided and has no nextSibling, it will be appended.
* Otherwise, it's assumed that an item has been removed or inserted,
* and `parent.firstNode` and its `.nextSibling` to re-indexing all child nodes of `parent`.
*
* @param {Document} doc
* The parent document of `el`.
* @param {Node} parent
* The parent node whose childNodes list needs to be updated.
* @param {Node} [newChild]
* The new child node to be appended. If not provided, the function assumes a node has been
* removed.
* @private
*/
function _onUpdateChild(doc, parent, newChild) {
if (doc && doc._inc) {
doc._inc++;
var childNodes = parent.childNodes;
// assumes nextSibling and previousSibling were already configured upfront
if (newChild && !newChild.nextSibling) {
// if an item has been appended, we only need to update the last index and the length
childNodes[childNodes.length++] = newChild;
} else {
// otherwise we need to reindex all items,
// which can take a while when processing nodes with a lot of children
var child = parent.firstChild;
var i = 0;
while (child) {
childNodes[i++] = child;
child = child.nextSibling;
}
childNodes.length = i;
delete childNodes[childNodes.length];
}
}
}
/**
* Removes the connections between `parentNode` and `child`
* and any existing `child.previousSibling` or `child.nextSibling`.
*
* @param {Node} parentNode
* The parent node from which the child node is to be removed.
* @param {Node} child
* The child node to be removed from the parentNode.
* @returns {Node}
* Returns the child node that was removed.
* @throws {DOMException}
* With code:
* - {@link DOMException.NOT_FOUND_ERR} If the parentNode is not the parent of the child node.
* @private
* @see https://github.com/xmldom/xmldom/issues/135
* @see https://github.com/xmldom/xmldom/issues/145
*/
function _removeChild(parentNode, child) {
if (parentNode !== child.parentNode) {
throw new DOMException(DOMException.NOT_FOUND_ERR, "child's parent is not parent");
}
var oldPreviousSibling = child.previousSibling;
var oldNextSibling = child.nextSibling;
if (oldPreviousSibling) {
oldPreviousSibling.nextSibling = oldNextSibling;
} else {
parentNode.firstChild = oldNextSibling;
}
if (oldNextSibling) {
oldNextSibling.previousSibling = oldPreviousSibling;
} else {
parentNode.lastChild = oldPreviousSibling;
}
_onUpdateChild(parentNode.ownerDocument, parentNode);
child.parentNode = null;
child.previousSibling = null;
child.nextSibling = null;
return child;
}
/**
* Returns `true` if `node` can be a parent for insertion.
*
* @param {Node} node
* @returns {boolean}
*/
function hasValidParentNodeType(node) {
return (
node &&
(node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE)
);
}
/**
* Returns `true` if `node` can be inserted according to it's `nodeType`.
*
* @param {Node} node
* @returns {boolean}
*/
function hasInsertableNodeType(node) {
return (
node &&
(node.nodeType === Node.CDATA_SECTION_NODE ||
node.nodeType === Node.COMMENT_NODE ||
node.nodeType === Node.DOCUMENT_FRAGMENT_NODE ||
node.nodeType === Node.DOCUMENT_TYPE_NODE ||
node.nodeType === Node.ELEMENT_NODE ||
node.nodeType === Node.PROCESSING_INSTRUCTION_NODE ||
node.nodeType === Node.TEXT_NODE)
);
}
/**
* Returns true if `node` is a DOCTYPE node.
*
* @param {Node} node
* @returns {boolean}
*/
function isDocTypeNode(node) {
return node && node.nodeType === Node.DOCUMENT_TYPE_NODE;
}
/**
* Returns true if the node is an element.
*
* @param {Node} node
* @returns {boolean}
*/
function isElementNode(node) {
return node && node.nodeType === Node.ELEMENT_NODE;
}
/**
* Returns true if `node` is a text node.
*
* @param {Node} node
* @returns {boolean}
*/
function isTextNode(node) {
return node && node.nodeType === Node.TEXT_NODE;
}
/**
* Check if en element node can be inserted before `child`, or at the end if child is falsy,
* according to the presence and position of a doctype node on the same level.
*
* @param {Document} doc
* The document node.
* @param {Node} child
* The node that would become the nextSibling if the element would be inserted.
* @returns {boolean}
* `true` if an element can be inserted before child.
* @private
*/
function isElementInsertionPossible(doc, child) {
var parentChildNodes = doc.childNodes || [];
if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {
return false;
}
var docTypeNode = find(parentChildNodes, isDocTypeNode);
return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));
}
/**
* Check if en element node can be inserted before `child`, or at the end if child is falsy,
* according to the presence and position of a doctype node on the same level.
*
* @param {Node} doc
* The document node.
* @param {Node} child
* The node that would become the nextSibling if the element would be inserted.
* @returns {boolean}
* `true` if an element can be inserted before child.
* @private
*/
function isElementReplacementPossible(doc, child) {
var parentChildNodes = doc.childNodes || [];
function hasElementChildThatIsNotChild(node) {
return isElementNode(node) && node !== child;
}
if (find(parentChildNodes, hasElementChildThatIsNotChild)) {
return false;
}
var docTypeNode = find(parentChildNodes, isDocTypeNode);
return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));
}
/**
* Asserts pre-insertion validity of a node into a parent before a child.
* Throws errors for invalid node combinations that would result in an ill-formed DOM.
*
* @param {Node} parent
* The parent node to insert `node` into.
* @param {Node} node
* The node to insert.
* @param {Node | null} child
* The node that should become the `nextSibling` of `node`. If null, no sibling is considered.
* @throws {DOMException}
* With code:
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `parent` is not a Document,
* DocumentFragment, or Element node.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a host-including inclusive
* ancestor of `parent`. (Currently not implemented)
* - {@link DOMException.NOT_FOUND_ERR} If `child` is non-null and its `parent` is not
* `parent`.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is not a DocumentFragment,
* DocumentType, Element, or CharacterData node.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If either `node` is a Text node and `parent` is
* a document, or if `node` is a doctype and `parent` is not a document.
* @private
* @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
* @see https://dom.spec.whatwg.org/#concept-node-replace
*/
function assertPreInsertionValidity1to5(parent, node, child) {
// 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a "HierarchyRequestError" DOMException.
if (!hasValidParentNodeType(parent)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);
}
// 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a "HierarchyRequestError" DOMException.
// not implemented!
// 3. If `child` is non-null and its parent is not `parent`, then throw a "NotFoundError" DOMException.
if (child && child.parentNode !== parent) {
throw new DOMException(DOMException.NOT_FOUND_ERR, 'child not in parent');
}
if (
// 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException.
!hasInsertableNodeType(node) ||
// 5. If either `node` is a Text node and `parent` is a document,
// the sax parser currently adds top level text nodes, this will be fixed in 0.9.0
// || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)
// or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException.
(isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE)
) {
throw new DOMException(
DOMException.HIERARCHY_REQUEST_ERR,
'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType
);
}
}
/**
* Asserts pre-insertion validity of a node into a document before a child.
* Throws errors for invalid node combinations that would result in an ill-formed DOM.
*
* @param {Document} parent
* The parent node to insert `node` into.
* @param {Node} node
* The node to insert.
* @param {Node | undefined} child
* The node that should become the `nextSibling` of `node`. If undefined, no sibling is
* considered.
* @returns {Node}
* @throws {DOMException}
* With code:
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentFragment with more than
* one element child or has a Text node child.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentFragment with one
* element child and either `parent` has an element child, `child` is a doctype, or `child` is
* non-null and a doctype is following `child`.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is an Element and `parent` has an
* element child, `child` is a doctype, or `child` is non-null and a doctype is following
* `child`.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentType and `parent` has a
* doctype child, `child` is non-null and an element is preceding `child`, or `child` is null
* and `parent` has an element child.
* @private
* @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
* @see https://dom.spec.whatwg.org/#concept-node-replace
*/
function assertPreInsertionValidityInDocument(parent, node, child) {
var parentChildNodes = parent.childNodes || [];
var nodeChildNodes = node.childNodes || [];
// DocumentFragment
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
var nodeChildElements = nodeChildNodes.filter(isElementNode);
// If node has more than one element child or has a Text node child.
if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');
}
// Otherwise, if `node` has one element child and either `parent` has an element child,
// `child` is a doctype, or `child` is non-null and a doctype is following `child`.
if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');
}
}
// Element
if (isElementNode(node)) {
// `parent` has an element child, `child` is a doctype,
// or `child` is non-null and a doctype is following `child`.
if (!isElementInsertionPossible(parent, child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');
}
}
// DocumentType
if (isDocTypeNode(node)) {
// `parent` has a doctype child,
if (find(parentChildNodes, isDocTypeNode)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');
}
var parentElementChild = find(parentChildNodes, isElementNode);
// `child` is non-null and an element is preceding `child`,
if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');
}
// or `child` is null and `parent` has an element child.
if (!child && parentElementChild) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');
}
}
}
/**
* @param {Document} parent
* The parent node to insert `node` into.
* @param {Node} node
* The node to insert.
* @param {Node | undefined} child
* the node that should become the `nextSibling` of `node`
* @returns {Node}
* @throws {DOMException}
* For several node combinations that would create a DOM that is not well-formed.
* @throws {DOMException}
* If `child` is provided but is not a child of `parent`.
* @private
* @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
* @see https://dom.spec.whatwg.org/#concept-node-replace
*/
function assertPreReplacementValidityInDocument(parent, node, child) {
var parentChildNodes = parent.childNodes || [];
var nodeChildNodes = node.childNodes || [];
// DocumentFragment
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
var nodeChildElements = nodeChildNodes.filter(isElementNode);
// If `node` has more than one element child or has a Text node child.
if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');
}
// Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.
if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');
}
}
// Element
if (isElementNode(node)) {
// `parent` has an element child that is not `child` or a doctype is following `child`.
if (!isElementReplacementPossible(parent, child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');
}
}
// DocumentType
if (isDocTypeNode(node)) {
function hasDoctypeChildThatIsNotChild(node) {
return isDocTypeNode(node) && node !== child;
}
// `parent` has a doctype child that is not `child`,
if (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');
}
var parentElementChild = find(parentChildNodes, isElementNode);
// or an element is preceding `child`.
if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');
}
}
}
/**
* Inserts a node into a parent node before a child node.
*
* @param {Node} parent
* The parent node to insert the node into.
* @param {Node} node
* The node to insert into the parent.
* @param {Node | null} child
* The node that should become the next sibling of the node.
* If null, the function inserts the node at the end of the children of the parent node.
* @param {Function} [_inDocumentAssertion]
* An optional function to check pre-insertion validity if parent is a document node.
* Defaults to {@link assertPreInsertionValidityInDocument}
* @returns {Node}
* Returns the inserted node.
* @throws {DOMException}
* Throws a DOMException if inserting the node would result in a DOM tree that is not
* well-formed. See {@link assertPreInsertionValidity1to5},
* {@link assertPreInsertionValidityInDocument}.
* @throws {DOMException}
* Throws a DOMException if child is provided but is not a child of the parent. See
* {@link Node.removeChild}
* @private
* @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
*/
function _insertBefore(parent, node, child, _inDocumentAssertion) {
// To ensure pre-insertion validity of a node into a parent before a child, run these steps:
assertPreInsertionValidity1to5(parent, node, child);
// If parent is a document, and any of the statements below, switched on the interface node implements,
// are true, then throw a "HierarchyRequestError" DOMException.
if (parent.nodeType === Node.DOCUMENT_NODE) {
(_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);
}
var cp = node.parentNode;
if (cp) {
cp.removeChild(node); //remove and update
}
if (node.nodeType === DOCUMENT_FRAGMENT_NODE) {
var newFirst = node.firstChild;
if (newFirst == null) {
return node;
}
var newLast = node.lastChild;
} else {
newFirst = newLast = node;
}
var pre = child ? child.previousSibling : parent.lastChild;
newFirst.previousSibling = pre;
newLast.nextSibling = child;
if (pre) {
pre.nextSibling = newFirst;
} else {
parent.firstChild = newFirst;
}
if (child == null) {
parent.lastChild = newLast;
} else {
child.previousSibling = newLast;
}
do {
newFirst.parentNode = parent;
} while (newFirst !== newLast && (newFirst = newFirst.nextSibling));
_onUpdateChild(parent.ownerDocument || parent, parent, node);
if (node.nodeType == DOCUMENT_FRAGMENT_NODE) {
node.firstChild = node.lastChild = null;
}
return node;
}
Document.prototype = {
/**
* The implementation that created this document.
*
* @type DOMImplementation
* @readonly
*/
implementation: null,
nodeName: '#document',
nodeType: DOCUMENT_NODE,
/**
* The DocumentType node of the document.
*
* @type DocumentType
* @readonly
*/
doctype: null,
documentElement: null,
_inc: 1,
insertBefore: function (newChild, refChild) {
//raises
if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) {
var child = newChild.firstChild;
while (child) {
var next = child.nextSibling;
this.insertBefore(child, refChild);
child = next;
}
return newChild;
}
_insertBefore(this, newChild, refChild);
newChild.ownerDocument = this;
if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {
this.documentElement = newChild;
}
return newChild;
},
removeChild: function (oldChild) {
var removed = _removeChild(this, oldChild);
if (removed === this.documentElement) {
this.documentElement = null;
}
return removed;
},
replaceChild: function (newChild, oldChild) {
//raises
_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);
newChild.ownerDocument = this;
if (oldChild) {
this.removeChild(oldChild);
}
if (isElementNode(newChild)) {
this.documentElement = newChild;
}
},
// Introduced in DOM Level 2:
importNode: function (importedNode, deep) {
return importNode(this, importedNode, deep);
},
// Introduced in DOM Level 2:
getElementById: function (id) {
var rtv = null;
_visitNode(this.documentElement, function (node) {
if (node.nodeType == ELEMENT_NODE) {
if (node.getAttribute('id') == id) {
rtv = node;
return true;
}
}
});
return rtv;
},
/**
* Creates a new `Element` that is owned by this `Document`.
* In HTML Documents `localName` is the lower cased `tagName`,
* otherwise no transformation is being applied.
* When `contentType` implies the HTML namespace, it will be set as `namespaceURI`.
*
* __This implementation differs from the specification:__ - The provided name is not checked
* against the `Name` production,
* so no related error will be thrown.
* - There is no interface `HTMLElement`, it is always an `Element`.
* - There is no support for a second argument to indicate using custom elements.
*
* @param {string} tagName
* @returns {Element}
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
* @see https://dom.spec.whatwg.org/#dom-document-createelement
* @see https://dom.spec.whatwg.org/#concept-create-element
*/
createElement: function (tagName) {
var node = new Element(PDC);
node.ownerDocument = this;
if (this.type === 'html') {
tagName = tagName.toLowerCase();
}
if (hasDefaultHTMLNamespace(this.contentType)) {
node.namespaceURI = NAMESPACE.HTML;
}
node.nodeName = tagName;
node.tagName = tagName;
node.localName = tagName;
node.childNodes = new NodeList();
var attrs = (node.attributes = new NamedNodeMap());
attrs._ownerElement = node;
return node;
},
/**
* @returns {DocumentFragment}
*/
createDocumentFragment: function () {
var node = new DocumentFragment(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
return node;
},
/**
* @param {string} data
* @returns {Text}
*/
createTextNode: function (data) {
var node = new Text(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.appendData(data);
return node;
},
/**
* @param {string} data
* @returns {Comment}
*/
createComment: function (data) {
var node = new Comment(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.appendData(data);
return node;
},
/**
* @param {string} data
* @returns {CDATASection}
*/
createCDATASection: function (data) {
var node = new CDATASection(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.appendData(data);
return node;
},
/**
* @param {string} target
* @param {string} data
* @returns {ProcessingInstruction}
*/
createProcessingInstruction: function (target, data) {
var node = new ProcessingInstruction(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.nodeName = node.target = target;
node.nodeValue = node.data = data;
return node;
},
/**
* Creates an `Attr` node that is owned by this document.
* In HTML Documents `localName` is the lower cased `name`,
* otherwise no transformation is being applied.
*
* __This implementation differs from the specification:__ - The provided name is not checked
* against the `Name` production,
* so no related error will be thrown.
*
* @param {string} name
* @returns {Attr}
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createAttribute
* @see https://dom.spec.whatwg.org/#dom-document-createattribute
*/
createAttribute: function (name) {
if (!g.QName_exact.test(name)) {
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'invalid character in name "' + name + '"');
}
if (this.type === 'html') {
name = name.toLowerCase();
}
return this._createAttribute(name);
},
_createAttribute: function (name) {
var node = new Attr(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.name = name;
node.nodeName = name;
node.localName = name;
node.specified = true;
return node;
},
/**
* Creates an EntityReference object.
* The current implementation does not fill the `childNodes` with those of the corresponding
* `Entity`
*
* @deprecated
* In DOM Level 4.
* @param {string} name
* The name of the entity to reference. No namespace well-formedness checks are performed.
* @returns {EntityReference}
* @throws {DOMException}
* With code `INVALID_CHARACTER_ERR` when `name` is not valid.
* @throws {DOMException}
* with code `NOT_SUPPORTED_ERR` when the document is of type `html`
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE
*/
createEntityReference: function (name) {
if (!g.Name.test(name)) {
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"');
}
if (this.type === 'html') {
throw new DOMException('document is an html document', DOMExceptionName.NotSupportedError);
}
var node = new EntityReference(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.nodeName = name;
return node;
},
// Introduced in DOM Level 2:
/**
* @param {string} namespaceURI
* @param {string} qualifiedName
* @returns {Element}
*/
createElementNS: function (namespaceURI, qualifiedName) {
var validated = validateAndExtract(namespaceURI, qualifiedName);
var node = new Element(PDC);
var attrs = (node.attributes = new NamedNodeMap());
node.childNodes = new NodeList();
node.ownerDocument = this;
node.nodeName = qualifiedName;
node.tagName = qualifiedName;
node.namespaceURI = validated[0];
node.prefix = validated[1];
node.localName = validated[2];
attrs._ownerElement = node;
return node;
},
// Introduced in DOM Level 2:
/**
* @param {string} namespaceURI
* @param {string} qualifiedName
* @returns {Attr}
*/
createAttributeNS: function (namespaceURI, qualifiedName) {
var validated = validateAndExtract(namespaceURI, qualifiedName);
var node = new Attr(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.nodeName = qualifiedName;
node.name = qualifiedName;
node.specified = true;
node.namespaceURI = validated[0];
node.prefix = validated[1];
node.localName = validated[2];
return node;
},
};
_extends(Document, Node);
function Element(symbol) {
checkSymbol(symbol);
this._nsMap = Object.create(null);
}
Element.prototype = {
nodeType: ELEMENT_NODE,
/**
* The attributes of this element.
*
* @type {NamedNodeMap | null}
*/
attributes: null,
getQualifiedName: function () {
return this.prefix ? this.prefix + ':' + this.localName : this.localName;
},
_isInHTMLDocumentAndNamespace: function () {
return this.ownerDocument.type === 'html' && this.namespaceURI === NAMESPACE.HTML;
},
/**
* Implementaton of Level2 Core function hasAttributes.
*
* @returns {boolean}
* True if attribute list is not empty.
* @see https://www.w3.org/TR/DOM-Level-2-Core/#core-ID-NodeHasAttrs
*/
hasAttributes: function () {
return !!(this.attributes && this.attributes.length);
},
hasAttribute: function (name) {
return !!this.getAttributeNode(name);
},
/**
* Returns element’s first attribute whose qualified name is `name`, and `null`
* if there is no such attribute.
*
* @param {string} name
* @returns {string | null}
*/
getAttribute: function (name) {
var attr = this.getAttributeNode(name);
return attr ? attr.value : null;
},
getAttributeNode: function (name) {
if (this._isInHTMLDocumentAndNamespace()) {
name = name.toLowerCase();
}
return this.attributes.getNamedItem(name);
},
/**
* Sets the value of element’s first attribute whose qualified name is qualifiedName to value.
*
* @param {string} name
* @param {string} value
*/
setAttribute: function (name, value) {
if (this._isInHTMLDocumentAndNamespace()) {
name = name.toLowerCase();
}
var attr = this.getAttributeNode(name);
if (attr) {
attr.value = attr.nodeValue = '' + value;
} else {
attr = this.ownerDocument._createAttribute(name);
attr.value = attr.nodeValue = '' + value;
this.setAttributeNode(attr);
}
},
removeAttribute: function (name) {
var attr = this.getAttributeNode(name);
attr && this.removeAttributeNode(attr);
},
setAttributeNode: function (newAttr) {
return this.attributes.setNamedItem(newAttr);
},
setAttributeNodeNS: function (newAttr) {
return this.attributes.setNamedItemNS(newAttr);
},
removeAttributeNode: function (oldAttr) {
//console.log(this == oldAttr.ownerElement)
return this.attributes.removeNamedItem(oldAttr.nodeName);
},
//get real attribute name,and remove it by removeAttributeNode
removeAttributeNS: function (namespaceURI, localName) {
var old = this.getAttributeNodeNS(namespaceURI, localName);
old && this.removeAttributeNode(old);
},
hasAttributeNS: function (namespaceURI, localName) {
return this.getAttributeNodeNS(namespaceURI, localName) != null;
},
/**
* Returns element’s attribute whose namespace is `namespaceURI` and local name is
* `localName`,
* or `null` if there is no such attribute.
*
* @param {string} namespaceURI
* @param {string} localName
* @returns {string | null}
*/
getAttributeNS: function (namespaceURI, localName) {
var attr = this.getAttributeNodeNS(namespaceURI, localName);
return attr ? attr.value : null;
},
/**
* Sets the value of element’s attribute whose namespace is `namespaceURI` and local name is
* `localName` to value.
*
* @param {string} namespaceURI
* @param {string} qualifiedName
* @param {string} value
* @see https://dom.spec.whatwg.org/#dom-element-setattributens
*/
setAttributeNS: function (namespaceURI, qualifiedName, value) {
var validated = validateAndExtract(namespaceURI, qualifiedName);
var localName = validated[2];
var attr = this.getAttributeNodeNS(namespaceURI, localName);
if (attr) {
attr.value = attr.nodeValue = '' + value;
} else {
attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
attr.value = attr.nodeValue = '' + value;
this.setAttributeNode(attr);
}
},
getAttributeNodeNS: function (namespaceURI, localName) {
return this.attributes.getNamedItemNS(namespaceURI, localName);
},
/**
* Returns a LiveNodeList of all child elements which have **all** of the given class name(s).
*
* Returns an empty list if `classNames` is an empty string or only contains HTML white space
* characters.
*
* Warning: This returns a live LiveNodeList.
* Changes in the DOM will reflect in the array as the changes occur.
* If an element selected by this array no longer qualifies for the selector,
* it will automatically be removed. Be aware of this for iteration purposes.
*
* @param {string} classNames
* Is a string representing the class name(s) to match; multiple class names are separated by
* (ASCII-)whitespace.
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByClassName
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
* @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname
*/
getElementsByClassName: function (classNames) {
var classNamesSet = toOrderedSet(classNames);
return new LiveNodeList(this, function (base) {
var ls = [];
if (classNamesSet.length > 0) {
_visitNode(base, function (node) {
if (node !== base && node.nodeType === ELEMENT_NODE) {
var nodeClassNames = node.getAttribute('class');
// can be null if the attribute does not exist
if (nodeClassNames) {
// before splitting and iterating just compare them for the most common case
var matches = classNames === nodeClassNames;
if (!matches) {
var nodeClassNamesSet = toOrderedSet(nodeClassNames);
matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet));
}
if (matches) {
ls.push(node);
}
}
}
});
}
return ls;
});
},
/**
* Returns a LiveNodeList of elements with the given qualifiedName.
* Searching for all descendants can be done by passing `*` as `qualifiedName`.
*
* All descendants of the specified element are searched, but not the element itself.
* The returned list is live, which means it updates itself with the DOM tree automatically.
* Therefore, there is no need to call `Element.getElementsByTagName()`
* with the same element and arguments repeatedly if the DOM changes in between calls.
*
* When called on an HTML element in an HTML document,
* `getElementsByTagName` lower-cases the argument before searching for it.
* This is undesirable when trying to match camel-cased SVG elements (such as
* ``) in an HTML document.
* Instead, use `Element.getElementsByTagNameNS()`,
* which preserves the capitalization of the tag name.
*
* `Element.getElementsByTagName` is similar to `Document.getElementsByTagName()`,
* except that it only searches for elements that are descendants of the specified element.
*
* @param {string} qualifiedName
* @returns {LiveNodeList}
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByTagName
* @see https://dom.spec.whatwg.org/#concept-getelementsbytagname
*/
getElementsByTagName: function (qualifiedName) {
var isHTMLDocument = (this.nodeType === DOCUMENT_NODE ? this : this.ownerDocument).type === 'html';
var lowerQualifiedName = qualifiedName.toLowerCase();
return new LiveNodeList(this, function (base) {
var ls = [];
_visitNode(base, function (node) {
if (node === base || node.nodeType !== ELEMENT_NODE) {
return;
}
if (qualifiedName === '*') {
ls.push(node);
} else {
var nodeQualifiedName = node.getQualifiedName();
var matchingQName = isHTMLDocument && node.namespaceURI === NAMESPACE.HTML ? lowerQualifiedName : qualifiedName;
if (nodeQualifiedName === matchingQName) {
ls.push(node);
}
}
});
return ls;
});
},
getElementsByTagNameNS: function (namespaceURI, localName) {
return new LiveNodeList(this, function (base) {
var ls = [];
_visitNode(base, function (node) {
if (
node !== base &&
node.nodeType === ELEMENT_NODE &&
(namespaceURI === '*' || node.namespaceURI === namespaceURI) &&
(localName === '*' || node.localName == localName)
) {
ls.push(node);
}
});
return ls;
});
},
};
Document.prototype.getElementsByClassName = Element.prototype.getElementsByClassName;
Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
_extends(Element, Node);
function Attr(symbol) {
checkSymbol(symbol);
this.namespaceURI = null;
this.prefix = null;
this.ownerElement = null;
}
Attr.prototype.nodeType = ATTRIBUTE_NODE;
_extends(Attr, Node);
function CharacterData(symbol) {
checkSymbol(symbol);
}
CharacterData.prototype = {
data: '',
substringData: function (offset, count) {
return this.data.substring(offset, offset + count);
},
appendData: function (text) {
text = this.data + text;
this.nodeValue = this.data = text;
this.length = text.length;
},
insertData: function (offset, text) {
this.replaceData(offset, 0, text);
},
deleteData: function (offset, count) {
this.replaceData(offset, count, '');
},
replaceData: function (offset, count, text) {
var start = this.data.substring(0, offset);
var end = this.data.substring(offset + count);
text = start + text + end;
this.nodeValue = this.data = text;
this.length = text.length;
},
};
_extends(CharacterData, Node);
function Text(symbol) {
checkSymbol(symbol);
}
Text.prototype = {
nodeName: '#text',
nodeType: TEXT_NODE,
splitText: function (offset) {
var text = this.data;
var newText = text.substring(offset);
text = text.substring(0, offset);
this.data = this.nodeValue = text;
this.length = text.length;
var newNode = this.ownerDocument.createTextNode(newText);
if (this.parentNode) {
this.parentNode.insertBefore(newNode, this.nextSibling);
}
return newNode;
},
};
_extends(Text, CharacterData);
function Comment(symbol) {
checkSymbol(symbol);
}
Comment.prototype = {
nodeName: '#comment',
nodeType: COMMENT_NODE,
};
_extends(Comment, CharacterData);
function CDATASection(symbol) {
checkSymbol(symbol);
}
CDATASection.prototype = {
nodeName: '#cdata-section',
nodeType: CDATA_SECTION_NODE,
};
_extends(CDATASection, Text);
function DocumentType(symbol) {
checkSymbol(symbol);
}
DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
_extends(DocumentType, Node);
function Notation(symbol) {
checkSymbol(symbol);
}
Notation.prototype.nodeType = NOTATION_NODE;
_extends(Notation, Node);
function Entity(symbol) {
checkSymbol(symbol);
}
Entity.prototype.nodeType = ENTITY_NODE;
_extends(Entity, Node);
function EntityReference(symbol) {
checkSymbol(symbol);
}
EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
_extends(EntityReference, Node);
function DocumentFragment(symbol) {
checkSymbol(symbol);
}
DocumentFragment.prototype.nodeName = '#document-fragment';
DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
_extends(DocumentFragment, Node);
function ProcessingInstruction(symbol) {
checkSymbol(symbol);
}
ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
_extends(ProcessingInstruction, CharacterData);
function XMLSerializer() {}
XMLSerializer.prototype.serializeToString = function (node, nodeFilter) {
return nodeSerializeToString.call(node, nodeFilter);
};
Node.prototype.toString = nodeSerializeToString;
function nodeSerializeToString(nodeFilter) {
var buf = [];
var refNode = (this.nodeType === DOCUMENT_NODE && this.documentElement) || this;
var prefix = refNode.prefix;
var uri = refNode.namespaceURI;
if (uri && prefix == null) {
var prefix = refNode.lookupPrefix(uri);
if (prefix == null) {
var visibleNamespaces = [
{ namespace: uri, prefix: null },
//{namespace:uri,prefix:''}
];
}
}
serializeToString(this, buf, nodeFilter, visibleNamespaces);
return buf.join('');
}
function needNamespaceDefine(node, isHTML, visibleNamespaces) {
var prefix = node.prefix || '';
var uri = node.namespaceURI;
// According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,
// and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :
// > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.
// in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)
// and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :
// > [...] Furthermore, the attribute value [...] must not be an empty string.
// so serializing empty namespace value like xmlns:ds="" would produce an invalid XML document.
if (!uri) {
return false;
}
if ((prefix === 'xml' && uri === NAMESPACE.XML) || uri === NAMESPACE.XMLNS) {
return false;
}
var i = visibleNamespaces.length;
while (i--) {
var ns = visibleNamespaces[i];
// get namespace prefix
if (ns.prefix === prefix) {
return ns.namespace !== uri;
}
}
return true;
}
/**
* Literal whitespace other than space that appear in attribute values are serialized as
* their entity references, so they will be preserved.
* (In contrast to whitespace literals in the input which are normalized to spaces).
*
* Well-formed constraint: No < in Attribute Values:
* > The replacement text of any entity referred to directly or indirectly
* > in an attribute value must not contain a <.
*
* @see https://www.w3.org/TR/xml11/#CleanAttrVals
* @see https://www.w3.org/TR/xml11/#NT-AttValue
* @see https://www.w3.org/TR/xml11/#AVNormalize
* @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
* @prettierignore
*/
function addSerializedAttribute(buf, qualifiedName, value) {
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
}
function serializeToString(node, buf, nodeFilter, visibleNamespaces) {
if (!visibleNamespaces) {
visibleNamespaces = [];
}
var doc = node.nodeType === DOCUMENT_NODE ? node : node.ownerDocument;
var isHTML = doc.type === 'html';
if (nodeFilter) {
node = nodeFilter(node);
if (node) {
if (typeof node == 'string') {
buf.push(node);
return;
}
} else {
return;
}
//buf.sort.apply(attrs, attributeSorter);
}
switch (node.nodeType) {
case ELEMENT_NODE:
var attrs = node.attributes;
var len = attrs.length;
var child = node.firstChild;
var nodeName = node.tagName;
var prefixedNodeName = nodeName;
if (!isHTML && !node.prefix && node.namespaceURI) {
var defaultNS;
// lookup current default ns from `xmlns` attribute
for (var ai = 0; ai < attrs.length; ai++) {
if (attrs.item(ai).name === 'xmlns') {
defaultNS = attrs.item(ai).value;
break;
}
}
if (!defaultNS) {
// lookup current default ns in visibleNamespaces
for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
var namespace = visibleNamespaces[nsi];
if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {
defaultNS = namespace.namespace;
break;
}
}
}
if (defaultNS !== node.namespaceURI) {
for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
var namespace = visibleNamespaces[nsi];
if (namespace.namespace === node.namespaceURI) {
if (namespace.prefix) {
prefixedNodeName = namespace.prefix + ':' + nodeName;
}
break;
}
}
}
}
buf.push('<', prefixedNodeName);
for (var i = 0; i < len; i++) {
// add namespaces for attributes
var attr = attrs.item(i);
if (attr.prefix == 'xmlns') {
visibleNamespaces.push({
prefix: attr.localName,
namespace: attr.value,
});
} else if (attr.nodeName == 'xmlns') {
visibleNamespaces.push({ prefix: '', namespace: attr.value });
}
}
for (var i = 0; i < len; i++) {
var attr = attrs.item(i);
if (needNamespaceDefine(attr, isHTML, visibleNamespaces)) {
var prefix = attr.prefix || '';
var uri = attr.namespaceURI;
addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : 'xmlns', uri);
visibleNamespaces.push({ prefix: prefix, namespace: uri });
}
serializeToString(attr, buf, nodeFilter, visibleNamespaces);
}
// add namespace for current node
if (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) {
var prefix = node.prefix || '';
var uri = node.namespaceURI;
addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : 'xmlns', uri);
visibleNamespaces.push({ prefix: prefix, namespace: uri });
}
// in XML elements can be closed when they have no children
var canCloseTag = !child;
if (canCloseTag && (isHTML || node.namespaceURI === NAMESPACE.HTML)) {
// in HTML (doc or ns) only void elements can be closed right away
canCloseTag = isHTMLVoidElement(nodeName);
}
if (canCloseTag) {
buf.push('/>');
} else {
buf.push('>');
//if is cdata child node
if (isHTML && isHTMLRawTextElement(nodeName)) {
while (child) {
if (child.data) {
buf.push(child.data);
} else {
serializeToString(child, buf, nodeFilter, visibleNamespaces.slice());
}
child = child.nextSibling;
}
} else {
while (child) {
serializeToString(child, buf, nodeFilter, visibleNamespaces.slice());
child = child.nextSibling;
}
}
buf.push('', prefixedNodeName, '>');
}
// remove added visible namespaces
//visibleNamespaces.length = startVisibleNamespaces;
return;
case DOCUMENT_NODE:
case DOCUMENT_FRAGMENT_NODE:
var child = node.firstChild;
while (child) {
serializeToString(child, buf, nodeFilter, visibleNamespaces.slice());
child = child.nextSibling;
}
return;
case ATTRIBUTE_NODE:
return addSerializedAttribute(buf, node.name, node.value);
case TEXT_NODE:
/*
* The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
* except when used as markup delimiters, or within a comment, a processing instruction,
* or a CDATA section.
* If they are needed elsewhere, they must be escaped using either numeric character
* references or the strings `&` and `<` respectively.
* The right angle bracket (>) may be represented using the string " > ",
* and must, for compatibility, be escaped using either `>`,
* or a character reference when it appears in the string `]]>` in content,
* when that string is not marking the end of a CDATA section.
*
* In the content of elements, character data is any string of characters which does not
* contain the start-delimiter of any markup and does not include the CDATA-section-close
* delimiter, `]]>`.
*
* @see https://www.w3.org/TR/xml/#NT-CharData
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
*/
return buf.push(node.data.replace(/[<&>]/g, _xmlEncoder));
case CDATA_SECTION_NODE:
return buf.push(g.CDATA_START, node.data, g.CDATA_END);
case COMMENT_NODE:
return buf.push(g.COMMENT_START, node.data, g.COMMENT_END);
case DOCUMENT_TYPE_NODE:
var pubid = node.publicId;
var sysid = node.systemId;
buf.push(g.DOCTYPE_DECL_START, ' ', node.name);
if (pubid) {
buf.push(' ', g.PUBLIC, ' ', pubid);
if (sysid && sysid !== '.') {
buf.push(' ', sysid);
}
} else if (sysid && sysid !== '.') {
buf.push(' ', g.SYSTEM, ' ', sysid);
}
if (node.internalSubset) {
buf.push(' [', node.internalSubset, ']');
}
buf.push('>');
return;
case PROCESSING_INSTRUCTION_NODE:
return buf.push('', node.target, ' ', node.data, '?>');
case ENTITY_REFERENCE_NODE:
return buf.push('&', node.nodeName, ';');
//case ENTITY_NODE:
//case NOTATION_NODE:
default:
buf.push('??', node.nodeName);
}
}
function importNode(doc, node, deep) {
var node2;
switch (node.nodeType) {
case ELEMENT_NODE:
node2 = node.cloneNode(false);
node2.ownerDocument = doc;
//var attrs = node2.attributes;
//var len = attrs.length;
//for(var i=0;i {
"use strict";
var conventions = __webpack_require__(870);
var g = __webpack_require__(731);
var errors = __webpack_require__(767);
var isHTMLEscapableRawTextElement = conventions.isHTMLEscapableRawTextElement;
var isHTMLMimeType = conventions.isHTMLMimeType;
var isHTMLRawTextElement = conventions.isHTMLRawTextElement;
var hasOwn = conventions.hasOwn;
var NAMESPACE = conventions.NAMESPACE;
var ParseError = errors.ParseError;
var DOMException = errors.DOMException;
//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE
var S_TAG = 0; //tag name offerring
var S_ATTR = 1; //attr name offerring
var S_ATTR_SPACE = 2; //attr name end and space offer
var S_EQ = 3; //=space?
var S_ATTR_NOQUOT_VALUE = 4; //attr value(no quot value only)
var S_ATTR_END = 5; //attr value end and no space(quot end)
var S_TAG_SPACE = 6; //(attr value end || tag end ) && (space offer)
var S_TAG_CLOSE = 7; //closed el
function XMLReader() {}
XMLReader.prototype = {
parse: function (source, defaultNSMap, entityMap) {
var domBuilder = this.domBuilder;
domBuilder.startDocument();
_copy(defaultNSMap, (defaultNSMap = Object.create(null)));
parse(source, defaultNSMap, entityMap, domBuilder, this.errorHandler);
domBuilder.endDocument();
},
};
/**
* Detecting everything that might be a reference,
* including those without ending `;`, since those are allowed in HTML.
* The entityReplacer takes care of verifying and transforming each occurrence,
* and reports to the errorHandler on those that are not OK,
* depending on the context.
*/
var ENTITY_REG = /?\w+;?/g;
function parse(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {
var isHTML = isHTMLMimeType(domBuilder.mimeType);
if (source.indexOf(g.UNICODE_REPLACEMENT_CHARACTER) >= 0) {
errorHandler.warning('Unicode replacement character detected, source encoding issues?');
}
function fixedFromCharCode(code) {
// String.prototype.fromCharCode does not supports
// > 2 bytes unicode chars directly
if (code > 0xffff) {
code -= 0x10000;
var surrogate1 = 0xd800 + (code >> 10),
surrogate2 = 0xdc00 + (code & 0x3ff);
return String.fromCharCode(surrogate1, surrogate2);
} else {
return String.fromCharCode(code);
}
}
function entityReplacer(a) {
var complete = a[a.length - 1] === ';' ? a : a + ';';
if (!isHTML && complete !== a) {
errorHandler.error('EntityRef: expecting ;');
return a;
}
var match = g.Reference.exec(complete);
if (!match || match[0].length !== complete.length) {
errorHandler.error('entity not matching Reference production: ' + a);
return a;
}
var k = complete.slice(1, -1);
if (hasOwn(entityMap, k)) {
return entityMap[k];
} else if (k.charAt(0) === '#') {
return fixedFromCharCode(parseInt(k.substring(1).replace('x', '0x')));
} else {
errorHandler.error('entity not found:' + a);
return a;
}
}
function appendText(end) {
//has some bugs
if (end > start) {
var xt = source.substring(start, end).replace(ENTITY_REG, entityReplacer);
locator && position(start);
domBuilder.characters(xt, 0, end - start);
start = end;
}
}
var lineStart = 0;
var lineEnd = 0;
var linePattern = /\r\n?|\n|$/g;
var locator = domBuilder.locator;
function position(p, m) {
while (p >= lineEnd && (m = linePattern.exec(source))) {
lineStart = lineEnd;
lineEnd = m.index + m[0].length;
locator.lineNumber++;
}
locator.columnNumber = p - lineStart + 1;
}
var parseStack = [{ currentNSMap: defaultNSMapCopy }];
var unclosedTags = [];
var start = 0;
while (true) {
try {
var tagStart = source.indexOf('<', start);
if (tagStart < 0) {
if (!isHTML && unclosedTags.length > 0) {
return errorHandler.fatalError('unclosed xml tag(s): ' + unclosedTags.join(', '));
}
if (!source.substring(start).match(/^\s*$/)) {
var doc = domBuilder.doc;
var text = doc.createTextNode(source.substring(start));
if (doc.documentElement) {
return errorHandler.error('Extra content at the end of the document');
}
doc.appendChild(text);
domBuilder.currentElement = text;
}
return;
}
if (tagStart > start) {
var fromSource = source.substring(start, tagStart);
if (!isHTML && unclosedTags.length === 0) {
fromSource = fromSource.replace(new RegExp(g.S_OPT.source, 'g'), '');
fromSource && errorHandler.error("Unexpected content outside root element: '" + fromSource + "'");
}
appendText(tagStart);
}
switch (source.charAt(tagStart + 1)) {
case '/':
var end = source.indexOf('>', tagStart + 2);
var tagNameRaw = source.substring(tagStart + 2, end > 0 ? end : undefined);
if (!tagNameRaw) {
return errorHandler.fatalError('end tag name missing');
}
var tagNameMatch = end > 0 && g.reg('^', g.QName_group, g.S_OPT, '$').exec(tagNameRaw);
if (!tagNameMatch) {
return errorHandler.fatalError('end tag name contains invalid characters: "' + tagNameRaw + '"');
}
if (!domBuilder.currentElement && !domBuilder.doc.documentElement) {
// not enough information to provide a helpful error message,
// but parsing will throw since there is no root element
return;
}
var currentTagName =
unclosedTags[unclosedTags.length - 1] ||
domBuilder.currentElement.tagName ||
domBuilder.doc.documentElement.tagName ||
'';
if (currentTagName !== tagNameMatch[1]) {
var tagNameLower = tagNameMatch[1].toLowerCase();
if (!isHTML || currentTagName.toLowerCase() !== tagNameLower) {
return errorHandler.fatalError('Opening and ending tag mismatch: "' + currentTagName + '" != "' + tagNameRaw + '"');
}
}
var config = parseStack.pop();
unclosedTags.pop();
var localNSMap = config.localNSMap;
domBuilder.endElement(config.uri, config.localName, currentTagName);
if (localNSMap) {
for (var prefix in localNSMap) {
if (hasOwn(localNSMap, prefix)) {
domBuilder.endPrefixMapping(prefix);
}
}
}
end++;
break;
// end element
case '?': // ...?>
locator && position(tagStart);
end = parseProcessingInstruction(source, tagStart, domBuilder, errorHandler);
break;
case '!': // start) {
start = end;
} else {
//Possible sax fallback here, risk of positional error
appendText(Math.max(tagStart, start) + 1);
}
}
}
function copyLocator(f, t) {
t.lineNumber = f.lineNumber;
t.columnNumber = f.columnNumber;
return t;
}
/**
* @returns
* end of the elementStartPart(end of elementEndPart for selfClosed el)
* @see {@link #appendElement}
*/
function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler, isHTML) {
/**
* @param {string} qname
* @param {string} value
* @param {number} startIndex
*/
function addAttribute(qname, value, startIndex) {
if (hasOwn(el.attributeNames, qname)) {
return errorHandler.fatalError('Attribute ' + qname + ' redefined');
}
if (!isHTML && value.indexOf('<') >= 0) {
return errorHandler.fatalError("Unescaped '<' not allowed in attributes values");
}
el.addValue(
qname,
// @see https://www.w3.org/TR/xml/#AVNormalize
// since the xmldom sax parser does not "interpret" DTD the following is not implemented:
// - recursive replacement of (DTD) entity references
// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA
value.replace(/[\t\n\r]/g, ' ').replace(ENTITY_REG, entityReplacer),
startIndex
);
}
var attrName;
var value;
var p = ++start;
var s = S_TAG; //status
while (true) {
var c = source.charAt(p);
switch (c) {
case '=':
if (s === S_ATTR) {
//attrName
attrName = source.slice(start, p);
s = S_EQ;
} else if (s === S_ATTR_SPACE) {
s = S_EQ;
} else {
//fatalError: equal must after attrName or space after attrName
throw new Error('attribute equal must after attrName'); // No known test case
}
break;
case "'":
case '"':
if (
s === S_EQ ||
s === S_ATTR //|| s == S_ATTR_SPACE
) {
//equal
if (s === S_ATTR) {
errorHandler.warning('attribute value must after "="');
attrName = source.slice(start, p);
}
start = p + 1;
p = source.indexOf(c, start);
if (p > 0) {
value = source.slice(start, p);
addAttribute(attrName, value, start - 1);
s = S_ATTR_END;
} else {
//fatalError: no end quot match
throw new Error("attribute value no end '" + c + "' match");
}
} else if (s == S_ATTR_NOQUOT_VALUE) {
value = source.slice(start, p);
addAttribute(attrName, value, start);
errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c + ')!!');
start = p + 1;
s = S_ATTR_END;
} else {
//fatalError: no equal before
throw new Error('attribute value must after "="'); // No known test case
}
break;
case '/':
switch (s) {
case S_TAG:
el.setTagName(source.slice(start, p));
case S_ATTR_END:
case S_TAG_SPACE:
case S_TAG_CLOSE:
s = S_TAG_CLOSE;
el.closed = true;
case S_ATTR_NOQUOT_VALUE:
case S_ATTR:
break;
case S_ATTR_SPACE:
el.closed = true;
break;
//case S_EQ:
default:
throw new Error("attribute invalid close char('/')"); // No known test case
}
break;
case '': //end document
errorHandler.error('unexpected end of input');
if (s == S_TAG) {
el.setTagName(source.slice(start, p));
}
return p;
case '>':
switch (s) {
case S_TAG:
el.setTagName(source.slice(start, p));
case S_ATTR_END:
case S_TAG_SPACE:
case S_TAG_CLOSE:
break; //normal
case S_ATTR_NOQUOT_VALUE: //Compatible state
case S_ATTR:
value = source.slice(start, p);
if (value.slice(-1) === '/') {
el.closed = true;
value = value.slice(0, -1);
}
case S_ATTR_SPACE:
if (s === S_ATTR_SPACE) {
value = attrName;
}
if (s == S_ATTR_NOQUOT_VALUE) {
errorHandler.warning('attribute "' + value + '" missed quot(")!');
addAttribute(attrName, value, start);
} else {
if (!isHTML) {
errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!');
}
addAttribute(value, value, start);
}
break;
case S_EQ:
if (!isHTML) {
return errorHandler.fatalError('AttValue: \' or " expected');
}
}
return p;
/*xml space '\x20' | #x9 | #xD | #xA; */
case '\u0080':
c = ' ';
default:
if (c <= ' ') {
//space
switch (s) {
case S_TAG:
el.setTagName(source.slice(start, p)); //tagName
s = S_TAG_SPACE;
break;
case S_ATTR:
attrName = source.slice(start, p);
s = S_ATTR_SPACE;
break;
case S_ATTR_NOQUOT_VALUE:
var value = source.slice(start, p);
errorHandler.warning('attribute "' + value + '" missed quot(")!!');
addAttribute(attrName, value, start);
case S_ATTR_END:
s = S_TAG_SPACE;
break;
//case S_TAG_SPACE:
//case S_EQ:
//case S_ATTR_SPACE:
// void();break;
//case S_TAG_CLOSE:
//ignore warning
}
} else {
//not space
//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE
switch (s) {
//case S_TAG:void();break;
//case S_ATTR:void();break;
//case S_ATTR_NOQUOT_VALUE:void();break;
case S_ATTR_SPACE:
if (!isHTML) {
errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!');
}
addAttribute(attrName, attrName, start);
start = p;
s = S_ATTR;
break;
case S_ATTR_END:
errorHandler.warning('attribute space is required"' + attrName + '"!!');
case S_TAG_SPACE:
s = S_ATTR;
start = p;
break;
case S_EQ:
s = S_ATTR_NOQUOT_VALUE;
start = p;
break;
case S_TAG_CLOSE:
throw new Error("elements closed character '/' and '>' must be connected to");
}
}
} //end outer switch
p++;
}
}
/**
* @returns
* `true` if a new namespace has been defined.
*/
function appendElement(el, domBuilder, currentNSMap) {
var tagName = el.tagName;
var localNSMap = null;
var i = el.length;
while (i--) {
var a = el[i];
var qName = a.qName;
var value = a.value;
var nsp = qName.indexOf(':');
if (nsp > 0) {
var prefix = (a.prefix = qName.slice(0, nsp));
var localName = qName.slice(nsp + 1);
var nsPrefix = prefix === 'xmlns' && localName;
} else {
localName = qName;
prefix = null;
nsPrefix = qName === 'xmlns' && '';
}
//can not set prefix,because prefix !== ''
a.localName = localName;
//prefix == null for no ns prefix attribute
if (nsPrefix !== false) {
//hack!!
if (localNSMap == null) {
localNSMap = Object.create(null);
_copy(currentNSMap, (currentNSMap = Object.create(null)));
}
currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
a.uri = NAMESPACE.XMLNS;
domBuilder.startPrefixMapping(nsPrefix, value);
}
}
var i = el.length;
while (i--) {
a = el[i];
if (a.prefix) {
//no prefix attribute has no namespace
if (a.prefix === 'xml') {
a.uri = NAMESPACE.XML;
}
if (a.prefix !== 'xmlns') {
a.uri = currentNSMap[a.prefix];
}
}
}
var nsp = tagName.indexOf(':');
if (nsp > 0) {
prefix = el.prefix = tagName.slice(0, nsp);
localName = el.localName = tagName.slice(nsp + 1);
} else {
prefix = null; //important!!
localName = el.localName = tagName;
}
//no prefix element has default namespace
var ns = (el.uri = currentNSMap[prefix || '']);
domBuilder.startElement(ns, localName, tagName, el);
//endPrefixMapping and startPrefixMapping have not any help for dom builder
//localNSMap = null
if (el.closed) {
domBuilder.endElement(ns, localName, tagName);
if (localNSMap) {
for (prefix in localNSMap) {
if (hasOwn(localNSMap, prefix)) {
domBuilder.endPrefixMapping(prefix);
}
}
}
} else {
el.currentNSMap = currentNSMap;
el.localNSMap = localNSMap;
//parseStack.push(el);
return true;
}
}
function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) {
// https://html.spec.whatwg.org/#raw-text-elements
// https://html.spec.whatwg.org/#escapable-raw-text-elements
// https://html.spec.whatwg.org/#cdata-rcdata-restrictions:raw-text-elements
// TODO: https://html.spec.whatwg.org/#cdata-rcdata-restrictions
var isEscapableRaw = isHTMLEscapableRawTextElement(tagName);
if (isEscapableRaw || isHTMLRawTextElement(tagName)) {
var elEndStart = source.indexOf('' + tagName + '>', elStartEnd);
var text = source.substring(elStartEnd + 1, elEndStart);
if (isEscapableRaw) {
text = text.replace(ENTITY_REG, entityReplacer);
}
domBuilder.characters(text, 0, text.length);
return elEndStart;
}
return elStartEnd + 1;
}
function _copy(source, target) {
for (var n in source) {
if (hasOwn(source, n)) {
target[n] = source[n];
}
}
}
/**
* @typedef ParseUtils
* @property {function(relativeIndex: number?): string | undefined} char
* Provides look ahead access to a singe character relative to the current index.
* @property {function(): number} getIndex
* Provides read-only access to the current index.
* @property {function(reg: RegExp): string | null} getMatch
* Applies the provided regular expression enforcing that it starts at the current index and
* returns the complete matching string,
* and moves the current index by the length of the matching string.
* @property {function(): string} getSource
* Provides read-only access to the complete source.
* @property {function(places: number?): void} skip
* moves the current index by places (defaults to 1)
* @property {function(): number} skipBlanks
* Moves the current index by the amount of white space that directly follows the current index
* and returns the amount of whitespace chars skipped (0..n),
* or -1 if the end of the source was reached.
* @property {function(): string} substringFromIndex
* creates a substring from the current index to the end of `source`
* @property {function(compareWith: string): boolean} substringStartsWith
* Checks if `source` contains `compareWith`, starting from the current index.
* @property {function(compareWith: string): boolean} substringStartsWithCaseInsensitive
* Checks if `source` contains `compareWith`, starting from the current index,
* comparing the upper case of both sides.
* @see {@link parseUtils}
*/
/**
* A temporary scope for parsing and look ahead operations in `source`,
* starting from index `start`.
*
* Some operations move the current index by a number of positions,
* after which `getIndex` returns the new index.
*
* @param {string} source
* @param {number} start
* @returns {ParseUtils}
*/
function parseUtils(source, start) {
var index = start;
function char(n) {
n = n || 0;
return source.charAt(index + n);
}
function skip(n) {
n = n || 1;
index += n;
}
function skipBlanks() {
var blanks = 0;
while (index < source.length) {
var c = char();
if (c !== ' ' && c !== '\n' && c !== '\t' && c !== '\r') {
return blanks;
}
blanks++;
skip();
}
return -1;
}
function substringFromIndex() {
return source.substring(index);
}
function substringStartsWith(text) {
return source.substring(index, index + text.length) === text;
}
function substringStartsWithCaseInsensitive(text) {
return source.substring(index, index + text.length).toUpperCase() === text.toUpperCase();
}
function getMatch(args) {
var expr = g.reg('^', args);
var match = expr.exec(substringFromIndex());
if (match) {
skip(match[0].length);
return match[0];
}
return null;
}
return {
char: char,
getIndex: function () {
return index;
},
getMatch: getMatch,
getSource: function () {
return source;
},
skip: skip,
skipBlanks: skipBlanks,
substringFromIndex: substringFromIndex,
substringStartsWith: substringStartsWith,
substringStartsWithCaseInsensitive: substringStartsWithCaseInsensitive,
};
}
/**
* @param {ParseUtils} p
* @param {DOMHandler} errorHandler
* @returns {string}
*/
function parseDoctypeInternalSubset(p, errorHandler) {
/**
* @param {ParseUtils} p
* @param {DOMHandler} errorHandler
* @returns {string}
*/
function parsePI(p, errorHandler) {
var match = g.PI.exec(p.substringFromIndex());
if (!match) {
return errorHandler.fatalError('processing instruction is not well-formed at position ' + p.getIndex());
}
if (match[1].toLowerCase() === 'xml') {
return errorHandler.fatalError(
'xml declaration is only allowed at the start of the document, but found at position ' + p.getIndex()
);
}
p.skip(match[0].length);
return match[0];
}
// Parse internal subset
var source = p.getSource();
if (p.char() === '[') {
p.skip(1);
var intSubsetStart = p.getIndex();
while (p.getIndex() < source.length) {
p.skipBlanks();
if (p.char() === ']') {
var internalSubset = source.substring(intSubsetStart, p.getIndex());
p.skip(1);
return internalSubset;
}
var current = null;
// Only in external subset
// if (char() === '<' && char(1) === '!' && char(2) === '[') {
// parseConditionalSections(p, errorHandler);
// } else
if (p.char() === '<' && p.char(1) === '!') {
switch (p.char(2)) {
case 'E': // ELEMENT | ENTITY
if (p.char(3) === 'L') {
current = p.getMatch(g.elementdecl);
} else if (p.char(3) === 'N') {
current = p.getMatch(g.EntityDecl);
}
break;
case 'A': // ATTRIBUTE
current = p.getMatch(g.AttlistDecl);
break;
case 'N': // NOTATION
current = p.getMatch(g.NotationDecl);
break;
case '-': // COMMENT
current = p.getMatch(g.Comment);
break;
}
} else if (p.char() === '<' && p.char(1) === '?') {
current = parsePI(p, errorHandler);
} else if (p.char() === '%') {
current = p.getMatch(g.PEReference);
} else {
return errorHandler.fatalError('Error detected in Markup declaration');
}
if (!current) {
return errorHandler.fatalError('Error in internal subset at position ' + p.getIndex());
}
}
return errorHandler.fatalError('doctype internal subset is not well-formed, missing ]');
}
}
/**
* Called when the parser encounters an element starting with '') {
return errorHandler.fatalError('doctype not terminated with > at position ' + p.getIndex());
}
p.skip(1);
domBuilder.startDTD(doctype.name, doctype.publicId, doctype.systemId, doctype.internalSubset);
domBuilder.endDTD();
return p.getIndex();
}
default:
return errorHandler.fatalError('Not well-formed XML starting with " 0) {
return errorHandler.fatalError(
'processing instruction at position ' + start + ' is an xml declaration which is only at the start of the document'
);
}
if (!g.XMLDecl.test(source.substring(start))) {
return errorHandler.fatalError('xml declaration is not well-formed');
}
}
domBuilder.processingInstruction(match[1], match[2]);
return start + match[0].length;
}
function ElementAttributes() {
this.attributeNames = Object.create(null);
}
ElementAttributes.prototype = {
setTagName: function (tagName) {
if (!g.QName_exact.test(tagName)) {
throw new Error('invalid tagName:' + tagName);
}
this.tagName = tagName;
},
addValue: function (qName, value, offset) {
if (!g.QName_exact.test(qName)) {
throw new Error('invalid attribute:' + qName);
}
this.attributeNames[qName] = this.length;
this[this.length++] = { qName: qName, value: value, offset: offset };
},
length: 0,
getLocalName: function (i) {
return this[i].localName;
},
getLocator: function (i) {
return this[i].locator;
},
getQName: function (i) {
return this[i].qName;
},
getURI: function (i) {
return this[i].uri;
},
getValue: function (i) {
return this[i].value;
},
// ,getIndex:function(uri, localName)){
// if(localName){
//
// }else{
// var qName = uri
// }
// },
// getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},
// getType:function(uri,localName){}
// getType:function(i){},
};
exports.XMLReader = XMLReader;
exports.parseUtils = parseUtils;
exports.parseDoctypeCommentOrCData = parseDoctypeCommentOrCData;
/***/ }),
/***/ 870:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.
*
* Works with anything that has a `length` property and index access properties,
* including NodeList.
*
* @param {T[] | { length: number; [number]: T }} list
* @param {function (item: T, index: number, list:T[]):boolean} predicate
* @param {Partial>?} ac
* Allows injecting a custom implementation in tests (`Array.prototype` by default).
* @returns {T | undefined}
* @template {unknown} T
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
* @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find
*/
function find(list, predicate, ac) {
if (ac === undefined) {
ac = Array.prototype;
}
if (list && typeof ac.find === 'function') {
return ac.find.call(list, predicate);
}
for (var i = 0; i < list.length; i++) {
if (hasOwn(list, i)) {
var item = list[i];
if (predicate.call(undefined, item, i, list)) {
return item;
}
}
}
}
/**
* "Shallow freezes" an object to render it immutable.
* Uses `Object.freeze` if available,
* otherwise the immutability is only in the type.
*
* Is used to create "enum like" objects.
*
* If `Object.getOwnPropertyDescriptors` is available,
* a new object with all properties of object but without any prototype is created and returned
* after freezing it.
*
* @param {T} object
* The object to freeze.
* @param {Pick} [oc=Object]
* `Object` by default,
* allows to inject custom object constructor for tests.
* @returns {Readonly}
* @template {Object} T
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
* @prettierignore
*/
function freeze(object, oc) {
if (oc === undefined) {
oc = Object;
}
if (oc && typeof oc.getOwnPropertyDescriptors === 'function') {
object = oc.create(null, oc.getOwnPropertyDescriptors(object));
}
return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object;
}
/**
* Implementation for `Object.hasOwn` but ES5 compatible.
*
* @param {any} object
* @param {string | number} key
* @returns {boolean}
*/
function hasOwn(object, key) {
return Object.prototype.hasOwnProperty.call(object, key);
}
/**
* Since xmldom can not rely on `Object.assign`,
* it uses/provides a simplified version that is sufficient for its needs.
*
* @param {Object} target
* @param {Object | null | undefined} source
* @returns {Object}
* The target with the merged/overridden properties.
* @throws {TypeError}
* If target is not an object.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
* @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign
*/
function assign(target, source) {
if (target === null || typeof target !== 'object') {
throw new TypeError('target is not an object');
}
for (var key in source) {
if (hasOwn(source, key)) {
target[key] = source[key];
}
}
return target;
}
/**
* A number of attributes are boolean attributes.
* The presence of a boolean attribute on an element represents the `true` value,
* and the absence of the attribute represents the `false` value.
*
* If the attribute is present, its value must either be the empty string, or a value that is
* an ASCII case-insensitive match for the attribute's canonical name,
* with no leading or trailing whitespace.
*
* Note: The values `"true"` and `"false"` are not allowed on boolean attributes.
* To represent a `false` value, the attribute has to be omitted altogether.
*
* @see https://html.spec.whatwg.org/#boolean-attributes
* @see https://html.spec.whatwg.org/#attributes-3
*/
var HTML_BOOLEAN_ATTRIBUTES = freeze({
allowfullscreen: true,
async: true,
autofocus: true,
autoplay: true,
checked: true,
controls: true,
default: true,
defer: true,
disabled: true,
formnovalidate: true,
hidden: true,
ismap: true,
itemscope: true,
loop: true,
multiple: true,
muted: true,
nomodule: true,
novalidate: true,
open: true,
playsinline: true,
readonly: true,
required: true,
reversed: true,
selected: true,
});
/**
* Check if `name` is matching one of the HTML boolean attribute names.
* This method doesn't check if such attributes are allowed in the context of the current
* document/parsing.
*
* @param {string} name
* @returns {boolean}
* @see {@link HTML_BOOLEAN_ATTRIBUTES}
* @see https://html.spec.whatwg.org/#boolean-attributes
* @see https://html.spec.whatwg.org/#attributes-3
*/
function isHTMLBooleanAttribute(name) {
return hasOwn(HTML_BOOLEAN_ATTRIBUTES, name.toLowerCase());
}
/**
* Void elements only have a start tag; end tags must not be specified for void elements.
* These elements should be written as self-closing like this: ` `.
* This should not be confused with optional tags that HTML allows to omit the end tag for
* (like `li`, `tr` and others), which can have content after them,
* so they can not be written as self-closing.
* xmldom does not have any logic for optional end tags cases,
* and will report them as a warning.
* Content that would go into the unopened element,
* will instead be added as a sibling text node.
*
* @type {Readonly<{
* area: boolean;
* col: boolean;
* img: boolean;
* wbr: boolean;
* link: boolean;
* hr: boolean;
* source: boolean;
* br: boolean;
* input: boolean;
* param: boolean;
* meta: boolean;
* embed: boolean;
* track: boolean;
* base: boolean;
* }>}
* @see https://html.spec.whatwg.org/#void-elements
* @see https://html.spec.whatwg.org/#optional-tags
*/
var HTML_VOID_ELEMENTS = freeze({
area: true,
base: true,
br: true,
col: true,
embed: true,
hr: true,
img: true,
input: true,
link: true,
meta: true,
param: true,
source: true,
track: true,
wbr: true,
});
/**
* Check if `tagName` is matching one of the HTML void element names.
* This method doesn't check if such tags are allowed in the context of the current
* document/parsing.
*
* @param {string} tagName
* @returns {boolean}
* @see {@link HTML_VOID_ELEMENTS}
* @see https://html.spec.whatwg.org/#void-elements
*/
function isHTMLVoidElement(tagName) {
return hasOwn(HTML_VOID_ELEMENTS, tagName.toLowerCase());
}
/**
* Tag names that are raw text elements according to HTML spec.
* The value denotes whether they are escapable or not.
*
* @see {@link isHTMLEscapableRawTextElement}
* @see {@link isHTMLRawTextElement}
* @see https://html.spec.whatwg.org/#raw-text-elements
* @see https://html.spec.whatwg.org/#escapable-raw-text-elements
*/
var HTML_RAW_TEXT_ELEMENTS = freeze({
script: false,
style: false,
textarea: true,
title: true,
});
/**
* Check if `tagName` is matching one of the HTML raw text element names.
* This method doesn't check if such tags are allowed in the context of the current
* document/parsing.
*
* @param {string} tagName
* @returns {boolean}
* @see {@link isHTMLEscapableRawTextElement}
* @see {@link HTML_RAW_TEXT_ELEMENTS}
* @see https://html.spec.whatwg.org/#raw-text-elements
* @see https://html.spec.whatwg.org/#escapable-raw-text-elements
*/
function isHTMLRawTextElement(tagName) {
var key = tagName.toLowerCase();
return hasOwn(HTML_RAW_TEXT_ELEMENTS, key) && !HTML_RAW_TEXT_ELEMENTS[key];
}
/**
* Check if `tagName` is matching one of the HTML escapable raw text element names.
* This method doesn't check if such tags are allowed in the context of the current
* document/parsing.
*
* @param {string} tagName
* @returns {boolean}
* @see {@link isHTMLRawTextElement}
* @see {@link HTML_RAW_TEXT_ELEMENTS}
* @see https://html.spec.whatwg.org/#raw-text-elements
* @see https://html.spec.whatwg.org/#escapable-raw-text-elements
*/
function isHTMLEscapableRawTextElement(tagName) {
var key = tagName.toLowerCase();
return hasOwn(HTML_RAW_TEXT_ELEMENTS, key) && HTML_RAW_TEXT_ELEMENTS[key];
}
/**
* Only returns true if `value` matches MIME_TYPE.HTML, which indicates an HTML document.
*
* @param {string} mimeType
* @returns {mimeType is 'text/html'}
* @see https://www.iana.org/assignments/media-types/text/html
* @see https://en.wikipedia.org/wiki/HTML
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring
*/
function isHTMLMimeType(mimeType) {
return mimeType === MIME_TYPE.HTML;
}
/**
* For both the `text/html` and the `application/xhtml+xml` namespace the spec defines that the
* HTML namespace is provided as the default.
*
* @param {string} mimeType
* @returns {boolean}
* @see https://dom.spec.whatwg.org/#dom-document-createelement
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument
*/
function hasDefaultHTMLNamespace(mimeType) {
return isHTMLMimeType(mimeType) || mimeType === MIME_TYPE.XML_XHTML_APPLICATION;
}
/**
* All mime types that are allowed as input to `DOMParser.parseFromString`
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02
* MDN
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype
* WHATWG HTML Spec
* @see {@link DOMParser.prototype.parseFromString}
*/
var MIME_TYPE = freeze({
/**
* `text/html`, the only mime type that triggers treating an XML document as HTML.
*
* @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration
* @see https://en.wikipedia.org/wiki/HTML Wikipedia
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring
* WHATWG HTML Spec
*/
HTML: 'text/html',
/**
* `application/xml`, the standard mime type for XML documents.
*
* @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType
* registration
* @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303
* @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia
*/
XML_APPLICATION: 'application/xml',
/**
* `text/xml`, an alias for `application/xml`.
*
* @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303
* @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration
* @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia
*/
XML_TEXT: 'text/xml',
/**
* `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,
* but is parsed as an XML document.
*
* @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType
* registration
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec
* @see https://en.wikipedia.org/wiki/XHTML Wikipedia
*/
XML_XHTML_APPLICATION: 'application/xhtml+xml',
/**
* `image/svg+xml`,
*
* @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration
* @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1
* @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia
*/
XML_SVG_IMAGE: 'image/svg+xml',
});
/**
* @typedef {'application/xhtml+xml' | 'application/xml' | 'image/svg+xml' | 'text/html' | 'text/xml'}
* MimeType
*/
/**
* @type {MimeType[]}
* @private
* Basically `Object.values`, which is not available in ES5.
*/
var _MIME_TYPES = Object.keys(MIME_TYPE).map(function (key) {
return MIME_TYPE[key];
});
/**
* Only returns true if `mimeType` is one of the allowed values for
* `DOMParser.parseFromString`.
*
* @param {string} mimeType
* @returns {mimeType is 'application/xhtml+xml' | 'application/xml' | 'image/svg+xml' | 'text/html' | 'text/xml'}
*
*/
function isValidMimeType(mimeType) {
return _MIME_TYPES.indexOf(mimeType) > -1;
}
/**
* Namespaces that are used in this code base.
*
* @see http://www.w3.org/TR/REC-xml-names
*/
var NAMESPACE = freeze({
/**
* The XHTML namespace.
*
* @see http://www.w3.org/1999/xhtml
*/
HTML: 'http://www.w3.org/1999/xhtml',
/**
* The SVG namespace.
*
* @see http://www.w3.org/2000/svg
*/
SVG: 'http://www.w3.org/2000/svg',
/**
* The `xml:` namespace.
*
* @see http://www.w3.org/XML/1998/namespace
*/
XML: 'http://www.w3.org/XML/1998/namespace',
/**
* The `xmlns:` namespace.
*
* @see https://www.w3.org/2000/xmlns/
*/
XMLNS: 'http://www.w3.org/2000/xmlns/',
});
exports.assign = assign;
exports.find = find;
exports.freeze = freeze;
exports.HTML_BOOLEAN_ATTRIBUTES = HTML_BOOLEAN_ATTRIBUTES;
exports.HTML_RAW_TEXT_ELEMENTS = HTML_RAW_TEXT_ELEMENTS;
exports.HTML_VOID_ELEMENTS = HTML_VOID_ELEMENTS;
exports.hasDefaultHTMLNamespace = hasDefaultHTMLNamespace;
exports.hasOwn = hasOwn;
exports.isHTMLBooleanAttribute = isHTMLBooleanAttribute;
exports.isHTMLRawTextElement = isHTMLRawTextElement;
exports.isHTMLEscapableRawTextElement = isHTMLEscapableRawTextElement;
exports.isHTMLMimeType = isHTMLMimeType;
exports.isHTMLVoidElement = isHTMLVoidElement;
exports.isValidMimeType = isValidMimeType;
exports.MIME_TYPE = MIME_TYPE;
exports.NAMESPACE = NAMESPACE;
/***/ }),
/***/ 999:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
(function(){'use strict';var k=this;
function aa(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==
b&&"undefined"==typeof a.call)return"object";return b}function l(a){return"string"==typeof a}function ba(a,b,c){return a.call.apply(a.bind,arguments)}function ca(a,b,c){if(!a)throw Error();if(2b?1:0};var ha=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(l(a))return l(b)&&1==b.length?a.indexOf(b,c):-1;for(;cc?null:l(a)?a.charAt(c):a[c]}function la(a){return Array.prototype.concat.apply(Array.prototype,arguments)}function ma(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var u;a:{var na=k.navigator;if(na){var oa=na.userAgent;if(oa){u=oa;break a}}u=""};var pa=q(u,"Opera")||q(u,"OPR"),v=q(u,"Trident")||q(u,"MSIE"),qa=q(u,"Edge"),ra=q(u,"Gecko")&&!(q(u.toLowerCase(),"webkit")&&!q(u,"Edge"))&&!(q(u,"Trident")||q(u,"MSIE"))&&!q(u,"Edge"),sa=q(u.toLowerCase(),"webkit")&&!q(u,"Edge");function ta(){var a=k.document;return a?a.documentMode:void 0}var ua;
a:{var va="",wa=function(){var a=u;if(ra)return/rv\:([^\);]+)(\)|;)/.exec(a);if(qa)return/Edge\/([\d\.]+)/.exec(a);if(v)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(sa)return/WebKit\/(\S+)/.exec(a);if(pa)return/(?:Version)[ \/]?(\S+)/.exec(a)}();wa&&(va=wa?wa[1]:"");if(v){var xa=ta();if(null!=xa&&xa>parseFloat(va)){ua=String(xa);break a}}ua=va}var ya={};
function za(a){if(!ya[a]){for(var b=0,c=fa(String(ua)).split("."),d=fa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f",4,2,function(a,b,c){return O(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return O(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return O(function(a,b){return a>=b},a,b,c)});var Wa=P("=",3,2,function(a,b,c){return O(function(a,b){return a==b},a,b,c,!0)});P("!=",3,2,function(a,b,c){return O(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return M(a,c)&&M(b,c)});P("or",1,2,function(a,b,c){return M(a,c)||M(b,c)});function Q(a,b,c){this.a=a;this.b=b||1;this.f=c||1};function Za(a,b){if(b.a.length&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");n.call(this,a.i);this.c=a;this.h=b;this.g=a.g;this.b=a.b}m(Za);Za.prototype.a=function(a){a=this.c.a(a);return $a(this.h,a)};Za.prototype.toString=function(){var a;a="Filter:"+J(this.c);return a+=J(this.h)};function ab(a,b){if(b.lengtha.v)throw Error("Function "+a.j+" expects at most "+a.v+" arguments, "+b.length+" given");a.B&&r(b,function(b,d){if(4!=b.i)throw Error("Argument "+d+" to function "+a.j+" is not of type Nodeset: "+b);});n.call(this,a.i);this.h=a;this.c=b;Ua(this,a.g||ja(b,function(a){return a.g}));Va(this,a.D&&!b.length||a.C&&!!b.length||ja(b,function(a){return a.b}))}m(ab);
ab.prototype.a=function(a){return this.h.m.apply(null,la(a,this.c))};ab.prototype.toString=function(){var a="Function: "+this.h;if(this.c.length)var b=t(this.c,function(a,b){return a+J(b)},"Arguments:"),a=a+J(b);return a};function bb(a,b,c,d,e,f,g,h,p){this.j=a;this.i=b;this.g=c;this.D=d;this.C=e;this.m=f;this.A=g;this.v=void 0!==h?h:g;this.B=!!p}bb.prototype.toString=function(){return this.j};var cb={};
function R(a,b,c,d,e,f,g,h){if(cb.hasOwnProperty(a))throw Error("Function already created: "+a+".");cb[a]=new bb(a,b,c,d,!1,e,f,g,h)}R("boolean",2,!1,!1,function(a,b){return M(b,a)},1);R("ceiling",1,!1,!1,function(a,b){return Math.ceil(K(b,a))},1);R("concat",3,!1,!1,function(a,b){return t(ma(arguments,1),function(b,d){return b+L(d,a)},"")},2,null);R("contains",2,!1,!1,function(a,b,c){return q(L(b,a),L(c,a))},2);R("count",1,!1,!1,function(a,b){return b.a(a).l},1,1,!0);
R("false",2,!1,!1,function(){return!1},0);R("floor",1,!1,!1,function(a,b){return Math.floor(K(b,a))},1);R("id",4,!1,!1,function(a,b){function c(a){if(w){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ka(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),f=[];r(d,function(a){a=c(a);!a||0<=ha(f,a)||f.push(a)});f.sort(La);var g=new C;r(f,function(a){F(g,a)});return g},1);
R("lang",2,!1,!1,function(){return!1},1);R("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);R("local-name",3,!1,!0,function(a,b){var c=b?Ra(b.a(a)):a.a;return c?c.localName||c.nodeName.toLowerCase():""},0,1,!0);R("name",3,!1,!0,function(a,b){var c=b?Ra(b.a(a)):a.a;return c?c.nodeName.toLowerCase():""},0,1,!0);R("namespace-uri",3,!0,!1,function(){return""},0,1,!0);
R("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):z(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);R("not",2,!1,!1,function(a,b){return!M(b,a)},1);R("number",1,!1,!0,function(a,b){return b?K(b,a):+z(a.a)},0,1);R("position",1,!0,!1,function(a){return a.b},0);R("round",1,!1,!1,function(a,b){return Math.round(K(b,a))},1);R("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,!1,!0,function(a,b){return b?L(b,a):z(a.a)},0,1);
R("string-length",1,!1,!0,function(a,b){return(b?L(b,a):z(a.a)).length},0,1);R("substring",3,!1,!1,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);R("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
R("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,!1,!1,function(a,b){for(var c=H(b.a(a)),d=0,e=I(c);e;e=I(c))d+=+z(e);return d},1,1,!0);R("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(d,a);a={};for(d=0;d]=|\s+|./g,hb=/^\s/;function S(a,b){return a.b[a.a+(b||0)]}function T(a){return a.b[a.a++]}function ib(a){return a.b.length<=a.a};function jb(a){n.call(this,3);this.c=a.substring(1,a.length-1)}m(jb);jb.prototype.a=function(){return this.c};jb.prototype.toString=function(){return"Literal: "+this.c};function E(a,b){this.j=a.toLowerCase();var c;c="*"==this.j?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():c}E.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=void 0!==a.localName?a.localName:a.nodeName;return"*"!=this.j&&this.j!=b.toLowerCase()?!1:"*"==this.c?!0:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};E.prototype.f=function(){return this.j};
E.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.j};function kb(a,b){n.call(this,a.i);this.h=a;this.c=b;this.g=a.g;this.b=a.b;if(1==this.c.length){var c=this.c[0];c.u||c.c!=lb||(c=c.o,"*"!=c.f()&&(this.f={name:c.f(),s:null}))}}m(kb);function mb(){n.call(this,4)}m(mb);mb.prototype.a=function(a){var b=new C;a=a.a;9==a.nodeType?F(b,a):F(b,a.ownerDocument);return b};mb.prototype.toString=function(){return"Root Helper Expression"};function nb(){n.call(this,4)}m(nb);nb.prototype.a=function(a){var b=new C;F(b,a.a);return b};nb.prototype.toString=function(){return"Context Helper Expression"};
function ob(a){return"/"==a||"//"==a}kb.prototype.a=function(a){var b=this.h.a(a);if(!(b instanceof C))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;ca.length)throw Error("Unclosed literal string");return new jb(a)}
function Hb(a){var b,c=[],d;if(ob(S(a.a))){b=T(a.a);d=S(a.a);if("/"==b&&(ib(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new mb;d=new mb;W(a,"Missing next location step.");b=Ib(a,b);c.push(b)}else{a:{b=S(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":T(a.a);b=Cb(a);W(a,'unclosed "("');Eb(a,")");break;case '"':case "'":b=Gb(a);break;default:if(isNaN(+b))if(!db(b)&&/(?![0-9])[\w]/.test(d)&&"("==S(a.a,1)){b=T(a.a);
b=cb[b]||null;T(a.a);for(d=[];")"!=S(a.a);){W(a,"Missing function argument list.");d.push(Cb(a));if(","!=S(a.a))break;T(a.a)}W(a,"Unclosed function argument list.");Fb(a);b=new ab(b,d)}else{b=null;break a}else b=new Ab(+T(a.a))}"["==S(a.a)&&(d=new sb(Jb(a)),b=new Za(b,d))}if(b)if(ob(S(a.a)))d=b;else return b;else b=Ib(a,"/"),d=new nb,c.push(b)}for(;ob(S(a.a));)b=T(a.a),W(a,"Missing next location step."),b=Ib(a,b),c.push(b);return new kb(d,c)}
function Ib(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==S(a.a))return d=new U(yb,new G("node")),T(a.a),d;if(".."==S(a.a))return d=new U(xb,new G("node")),T(a.a),d;var f;if("@"==S(a.a))f=lb,T(a.a),W(a,"Missing attribute name");else if("::"==S(a.a,1)){if(!/(?![0-9])[\w]/.test(S(a.a).charAt(0)))throw Error("Bad token: "+T(a.a));c=T(a.a);f=wb[c]||null;if(!f)throw Error("No axis with name: "+c);T(a.a);W(a,"Missing node name")}else f=tb;c=S(a.a);if(/(?![0-9])[\w\*]/.test(c.charAt(0)))if("("==
S(a.a,1)){if(!db(c))throw Error("Invalid node type: "+c);c=T(a.a);if(!db(c))throw Error("Invalid type name: "+c);Eb(a,"(");W(a,"Bad nodetype");e=S(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Gb(a);W(a,"Bad nodetype");Fb(a);c=new G(c,g)}else if(c=T(a.a),e=c.indexOf(":"),-1==e)c=new E(c);else{var g=c.substring(0,e),h;if("*"==g)h="*";else if(h=a.b(g),!h)throw Error("Namespace prefix not declared: "+g);c=c.substr(e+1);c=new E(c,h)}else throw Error("Bad token: "+T(a.a));e=new sb(Jb(a),f.a);return d||
new U(f,c,e,"//"==b)}function Jb(a){for(var b=[];"["==S(a.a);){T(a.a);W(a,"Missing predicate expression.");var c=Cb(a);b.push(c);W(a,"Unclosed predicate expression.");Eb(a,"]")}return b}function Db(a){if("-"==S(a.a))return T(a.a),new zb(Db(a));var b=Hb(a);if("|"!=S(a.a))a=b;else{for(b=[b];"|"==T(a.a);)W(a,"Missing next union location path."),b.push(Hb(a));a.a.a--;a=new rb(b)}return a};function Kb(a){switch(a.nodeType){case 1:return ea(Lb,a);case 9:return Kb(a.documentElement);case 11:case 10:case 6:case 12:return Mb;default:return a.parentNode?Kb(a.parentNode):Mb}}function Mb(){return null}function Lb(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?Lb(a.parentNode,b):null};function Nb(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=fb(a);if(ib(c))throw Error("Invalid XPath expression.");b?"function"==aa(b)||(b=da(b.lookupNamespaceURI,b)):b=function(){return null};var d=Cb(new Bb(c,b));if(!ib(c))throw Error("Bad token: "+T(c));this.evaluate=function(a,b){var c=d.a(new Q(a));return new Y(c,b)}}
function Y(a,b){if(0==b)if(a instanceof C)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof C))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof C?Sa(a):""+a;break;case 1:this.numberValue=a instanceof C?+Sa(a):+a;break;case 3:this.booleanValue=a instanceof C?0=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=c.length||
0>a?null:c[a]}}Y.ANY_TYPE=0;Y.NUMBER_TYPE=1;Y.STRING_TYPE=2;Y.BOOLEAN_TYPE=3;Y.UNORDERED_NODE_ITERATOR_TYPE=4;Y.ORDERED_NODE_ITERATOR_TYPE=5;Y.UNORDERED_NODE_SNAPSHOT_TYPE=6;Y.ORDERED_NODE_SNAPSHOT_TYPE=7;Y.ANY_UNORDERED_NODE_TYPE=8;Y.FIRST_ORDERED_NODE_TYPE=9;function Ob(a){this.lookupNamespaceURI=Kb(a)}
function Pb(a,b){var c=a||k,d=c.Document&&c.Document.prototype||c.document;if(!d.evaluate||b)c.XPathResult=Y,d.evaluate=function(a,b,c,d){return(new Nb(a,c)).evaluate(b,d)},d.createExpression=function(a,b){return new Nb(a,b)},d.createNSResolver=function(a){return new Ob(a)}}var Qb=["wgxpath","install"],Z=k;Qb[0]in Z||!Z.execScript||Z.execScript("var "+Qb[0]);for(var Rb;Qb.length&&(Rb=Qb.shift());)Qb.length||void 0===Pb?Z[Rb]?Z=Z[Rb]:Z=Z[Rb]={}:Z[Rb]=Pb;module.exports.install=Pb;module.exports.XPathResultType={ANY_TYPE:0,NUMBER_TYPE:1,STRING_TYPE:2,BOOLEAN_TYPE:3,UNORDERED_NODE_ITERATOR_TYPE:4,ORDERED_NODE_ITERATOR_TYPE:5,UNORDERED_NODE_SNAPSHOT_TYPE:6,ORDERED_NODE_SNAPSHOT_TYPE:7,ANY_UNORDERED_NODE_TYPE:8,FIRST_ORDERED_NODE_TYPE:9};}).call(__webpack_require__.g)
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/create fake namespace object */
/******/ (() => {
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
/******/ var leafPrototypes;
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 16: return value when it's Promise-like
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = this(value);
/******/ if(mode & 8) return value;
/******/ if(typeof value === 'object' && value) {
/******/ if((mode & 4) && value.__esModule) return value;
/******/ if((mode & 16) && typeof value.then === 'function') return value;
/******/ }
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ var def = {};
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
/******/ }
/******/ def['default'] = () => (value);
/******/ __webpack_require__.d(ns, def);
/******/ return ns;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
(() => {
"use strict";
// UNUSED EXPORTS: Sre
// NAMESPACE OBJECT: ./mjs/a11y/sre.js
var sre_namespaceObject = {};
__webpack_require__.r(sre_namespaceObject);
__webpack_require__.d(sre_namespaceObject, {
addPreference: () => (sre_addPreference),
engineSetup: () => (engineSetup),
fromPreference: () => (sre_fromPreference),
locales: () => (locales),
parseDOM: () => (parseDOM),
setupEngine: () => (setupEngine),
toEnriched: () => (toEnriched),
toPreference: () => (sre_toPreference)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/rule_engine/dynamic_cstr.js
var Axis;
(function (Axis) {
Axis["DOMAIN"] = "domain";
Axis["STYLE"] = "style";
Axis["LOCALE"] = "locale";
Axis["TOPIC"] = "topic";
Axis["MODALITY"] = "modality";
})(Axis || (Axis = {}));
class DynamicProperties {
static createProp(...cstrList) {
const axes = DynamicCstr.DEFAULT_ORDER;
const dynamicCstr = {};
for (let i = 0, l = cstrList.length, k = axes.length; i < l && i < k; i++) {
dynamicCstr[axes[i]] = cstrList[i];
}
return new DynamicProperties(dynamicCstr);
}
constructor(properties, order = Object.keys(properties)) {
this.properties = properties;
this.order = order;
}
getProperties() {
return this.properties;
}
getOrder() {
return this.order;
}
getAxes() {
return this.order;
}
getProperty(key) {
return this.properties[key];
}
updateProperties(props) {
this.properties = props;
}
allProperties() {
const propLists = [];
this.order.forEach((key) => propLists.push(this.getProperty(key).slice()));
return propLists;
}
toString() {
const cstrStrings = [];
this.order.forEach((key) => cstrStrings.push(key + ': ' + this.getProperty(key).toString()));
return cstrStrings.join('\n');
}
}
class DynamicCstr extends DynamicProperties {
static createCstr(...cstrList) {
const axes = DynamicCstr.DEFAULT_ORDER;
const dynamicCstr = {};
for (let i = 0, l = cstrList.length, k = axes.length; i < l && i < k; i++) {
dynamicCstr[axes[i]] = cstrList[i];
}
return new DynamicCstr(dynamicCstr);
}
static defaultCstr() {
return DynamicCstr.createCstr.apply(null, DynamicCstr.DEFAULT_ORDER.map(function (x) {
return DynamicCstr.DEFAULT_VALUES[x];
}));
}
static validOrder(order) {
const axes = DynamicCstr.DEFAULT_ORDER.slice();
return order.every((x) => {
const index = axes.indexOf(x);
return index !== -1 && axes.splice(index, 1);
});
}
constructor(components_, order) {
const properties = {};
for (const [key, value] of Object.entries(components_)) {
properties[key] = [value];
}
super(properties, order);
this.components = components_;
}
getComponents() {
return this.components;
}
getValue(key) {
return this.components[key];
}
getValues() {
return this.order.map((key) => this.getValue(key));
}
allProperties() {
const propLists = super.allProperties();
for (let i = 0, props, key; (props = propLists[i]), (key = this.order[i]); i++) {
const value = this.getValue(key);
if (props.indexOf(value) === -1) {
props.unshift(value);
}
}
return propLists;
}
toString() {
return this.getValues().join('.');
}
equal(cstr) {
const keys1 = cstr.getAxes();
if (this.order.length !== keys1.length) {
return false;
}
for (let j = 0, key; (key = keys1[j]); j++) {
const comp2 = this.getValue(key);
if (!comp2 || cstr.getValue(key) !== comp2) {
return false;
}
}
return true;
}
}
DynamicCstr.DEFAULT_ORDER = [
Axis.LOCALE,
Axis.MODALITY,
Axis.DOMAIN,
Axis.STYLE,
Axis.TOPIC
];
DynamicCstr.BASE_LOCALE = 'base';
DynamicCstr.DEFAULT_VALUE = 'default';
DynamicCstr.DEFAULT_VALUES = {
[Axis.LOCALE]: 'en',
[Axis.DOMAIN]: DynamicCstr.DEFAULT_VALUE,
[Axis.STYLE]: DynamicCstr.DEFAULT_VALUE,
[Axis.TOPIC]: DynamicCstr.DEFAULT_VALUE,
[Axis.MODALITY]: 'speech'
};
class DynamicCstrParser {
constructor(order) {
this.order = order;
}
parse(str) {
const order = str.split('.');
const cstr = {};
if (order.length > this.order.length) {
throw new Error('Invalid dynamic constraint: ' + cstr);
}
let j = 0;
for (let i = 0, key; (key = this.order[i]), order.length; i++, j++) {
const value = order.shift();
cstr[key] = value;
}
return new DynamicCstr(cstr, this.order.slice(0, j));
}
}
class DefaultComparator {
constructor(reference, fallback = new DynamicProperties(reference.getProperties(), reference.getOrder())) {
this.reference = reference;
this.fallback = fallback;
this.order = this.reference.getOrder();
}
getReference() {
return this.reference;
}
setReference(cstr, props) {
this.reference = cstr;
this.fallback =
props || new DynamicProperties(cstr.getProperties(), cstr.getOrder());
this.order = this.reference.getOrder();
}
match(cstr) {
const keys1 = cstr.getAxes();
return (keys1.length === this.reference.getAxes().length &&
keys1.every((key) => {
const value = cstr.getValue(key);
return (value === this.reference.getValue(key) ||
this.fallback.getProperty(key).indexOf(value) !== -1);
}));
}
compare(cstr1, cstr2) {
let ignore = false;
for (let i = 0, key; (key = this.order[i]); i++) {
const value1 = cstr1.getValue(key);
const value2 = cstr2.getValue(key);
if (!ignore) {
const ref = this.reference.getValue(key);
if (ref === value1 && ref !== value2) {
return -1;
}
if (ref === value2 && ref !== value1) {
return 1;
}
if (ref === value1 && ref === value2) {
continue;
}
if (ref !== value1 && ref !== value2) {
ignore = true;
}
}
const prop = this.fallback.getProperty(key);
const index1 = prop.indexOf(value1);
const index2 = prop.indexOf(value2);
if (index1 < index2) {
return -1;
}
if (index2 < index1) {
return 1;
}
}
return 0;
}
toString() {
return this.reference.toString() + '\n' + this.fallback.toString();
}
}
//# sourceMappingURL=dynamic_cstr.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/engine_const.js
var Mode;
(function (Mode) {
Mode["SYNC"] = "sync";
Mode["ASYNC"] = "async";
Mode["HTTP"] = "http";
})(Mode || (Mode = {}));
var personalityProps;
(function (personalityProps) {
personalityProps["PITCH"] = "pitch";
personalityProps["RATE"] = "rate";
personalityProps["VOLUME"] = "volume";
personalityProps["PAUSE"] = "pause";
personalityProps["JOIN"] = "join";
personalityProps["LAYOUT"] = "layout";
})(personalityProps || (personalityProps = {}));
const personalityPropList = [
personalityProps.PITCH,
personalityProps.RATE,
personalityProps.VOLUME,
personalityProps.PAUSE,
personalityProps.JOIN
];
var Speech;
(function (Speech) {
Speech["NONE"] = "none";
Speech["SHALLOW"] = "shallow";
Speech["DEEP"] = "deep";
})(Speech || (Speech = {}));
var Markup;
(function (Markup) {
Markup["NONE"] = "none";
Markup["LAYOUT"] = "layout";
Markup["COUNTING"] = "counting";
Markup["PUNCTUATION"] = "punctuation";
Markup["SSML"] = "ssml";
Markup["ACSS"] = "acss";
Markup["SABLE"] = "sable";
Markup["VOICEXML"] = "voicexml";
})(Markup || (Markup = {}));
const DOMAIN_TO_STYLES = {
mathspeak: 'default',
clearspeak: 'default'
};
//# sourceMappingURL=engine_const.js.map
// EXTERNAL MODULE: ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/system_external.js
var system_external = __webpack_require__(74);
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/file_util.js
function makePath(path) {
return path.match('/$') ? path : path + '/';
}
function localePath(locale, ext = 'json') {
return (makePath(SystemExternal.jsonPath) +
locale +
(ext.match(/^\./) ? ext : '.' + ext));
}
//# sourceMappingURL=file_util.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/debugger.js
class Debugger {
static getInstance() {
Debugger.instance = Debugger.instance || new Debugger();
return Debugger.instance;
}
init(opt_file) {
if (opt_file) {
this.startDebugFile_(opt_file);
}
this.isActive_ = true;
return this.fileHandle;
}
output(...args) {
if (this.isActive_) {
this.output_(args);
}
}
generate(func) {
if (this.isActive_) {
this.output_(func.apply(func, []));
}
}
exit(callback = () => { }) {
this.fileHandle.then(() => {
if (this.isActive_ && this.stream_) {
this.stream_.end('', '', callback);
}
});
}
constructor() {
this.isActive_ = false;
this.fileHandle = Promise.resolve();
this.stream_ = null;
}
startDebugFile_(filename) {
this.fileHandle = system_external/* SystemExternal */.f.fs.promises.open(filename, 'w');
this.fileHandle = this.fileHandle.then((handle) => {
this.stream_ = handle.createWriteStream(filename);
this.outputFunction = function (...args) {
this.stream_.write(args.join(' '));
this.stream_.write('\n');
}.bind(this);
this.stream_.on('error', function (_error) {
console.info('Invalid log file. Debug information sent to console.');
this.outputFunction = console.info;
}.bind(this));
this.stream_.on('finish', function () {
console.info('Finalizing debug file.');
});
});
}
output_(outputList) {
if (this.stream_) {
this.fileHandle.then(() => this.outputFunction.apply(this.outputFunction, ['Speech Rule Engine Debugger:'].concat(outputList)));
return;
}
console.info.apply(console, ['Speech Rule Engine Debugger:'].concat(outputList));
}
}
//# sourceMappingURL=debugger.js.map
// EXTERNAL MODULE: ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/variables.js
var variables = __webpack_require__(714);
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/options.js
class Options {
constructor(options = {}) {
this.delay = false;
this.domain = 'clearspeak';
this.style = DynamicCstr.DEFAULT_VALUES[Axis.STYLE];
this.locale = DynamicCstr.DEFAULT_VALUES[Axis.LOCALE];
this.subiso = '';
this.modality = DynamicCstr.DEFAULT_VALUES[Axis.MODALITY];
this.speech = Speech.NONE;
this.markup = Markup.NONE;
this.mark = true;
this.automark = false;
this.character = true;
this.cleanpause = true;
this.cayleyshort = true;
this.linebreaks = false;
this.rate = '100';
this.walker = 'Table';
this.structure = false;
this.aria = false;
this.tree = false;
this.strict = false;
this.pprint = false;
this.rules = '';
this.prune = '';
this.set(options);
}
set(options) {
this.ensureDomain(options);
for (const [option, value] of Object.entries(options)) {
if (Options.BINARY_FEATURES.includes(option) ||
Options.STRING_FEATURES.includes(option)) {
this[option] = value;
continue;
}
}
}
json() {
const features = {};
const engineFeatures = [].concat(Options.STRING_FEATURES, Options.BINARY_FEATURES);
engineFeatures.forEach((x) => (features[x] = this[x]));
return features;
}
ensureDomain(feature) {
if ((feature.modality && feature.modality !== 'speech') ||
(!feature.modality && this.modality !== 'speech')) {
return;
}
if (!feature.domain && !feature.locale) {
return;
}
if (feature.domain === 'default') {
feature.domain = 'mathspeak';
return;
}
const locale = (feature.locale || this.locale);
const domain = (feature.domain || this.domain);
if (MATHSPEAK_ONLY.indexOf(locale) !== -1 && domain !== 'mathspeak') {
feature.domain = 'mathspeak';
return;
}
if (locale === 'en') {
if (EN_RULES.indexOf(domain) === -1) {
feature.domain = 'mathspeak';
}
return;
}
if (domain !== 'mathspeak' && domain !== 'clearspeak') {
feature.domain = 'mathspeak';
}
}
}
Options.BINARY_FEATURES = [
'automark',
'mark',
'character',
'cleanpause',
'strict',
'structure',
'aria',
'pprint',
'cayleyshort',
'linebreaks',
'tree'
];
Options.STRING_FEATURES = [
'markup',
'style',
'domain',
'speech',
'walker',
'locale',
'delay',
'modality',
'rate',
'rules',
'subiso',
'prune'
];
const MATHSPEAK_ONLY = ['ca', 'da', 'es'];
const EN_RULES = [
'chromevox',
'clearspeak',
'mathspeak',
'emacspeak',
'html'
];
//# sourceMappingURL=options.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/engine.js
class SREError extends Error {
constructor(message = '') {
super();
this.message = message;
this.name = 'SRE Error';
}
}
class Engine {
set defaultLocale(loc) {
this._defaultLocale = variables/* Variables */.u.ensureLocale(loc, this._defaultLocale);
}
get defaultLocale() {
return this._defaultLocale;
}
static getInstance() {
Engine.instance = Engine.instance || new Engine();
return Engine.instance;
}
static defaultEvaluator(str, _cstr) {
return str;
}
static evaluateNode(node) {
return Engine.nodeEvaluator(node);
}
getRate() {
const numeric = parseInt(this.options.rate, 10);
return isNaN(numeric) ? 100 : numeric;
}
setDynamicCstr(opt_dynamic) {
if (this.defaultLocale) {
DynamicCstr.DEFAULT_VALUES[Axis.LOCALE] = this.defaultLocale;
}
if (opt_dynamic) {
const keys = Object.keys(opt_dynamic);
for (let i = 0; i < keys.length; i++) {
const feature = keys[i];
if (DynamicCstr.DEFAULT_ORDER.indexOf(feature) !== -1) {
const value = opt_dynamic[feature];
this.options[feature] = value;
}
}
}
const dynamic = [
this.options.locale,
this.options.modality,
this.options.domain,
this.options.style
].join('.');
const fallback = DynamicProperties.createProp([DynamicCstr.DEFAULT_VALUES[Axis.LOCALE]], [DynamicCstr.DEFAULT_VALUES[Axis.MODALITY]], [DynamicCstr.DEFAULT_VALUES[Axis.DOMAIN]], [DynamicCstr.DEFAULT_VALUES[Axis.STYLE]]);
const comparator = this.comparators[this.options.domain];
const parser = this.parsers[this.options.domain];
this.parser = parser ? parser : this.defaultParser;
this.dynamicCstr = this.parser.parse(dynamic);
this.dynamicCstr.updateProperties(fallback.getProperties());
this.comparator = comparator
? comparator()
: new DefaultComparator(this.dynamicCstr);
}
constructor() {
this.options = new Options();
this.config = false;
this.customLoader = null;
this.parsers = {};
this.comparator = null;
this.mode = Mode.SYNC;
this.init = true;
this.comparators = {};
this._defaultLocale = DynamicCstr.DEFAULT_VALUES[Axis.LOCALE];
this.options.locale = this.defaultLocale;
this.evaluator = Engine.defaultEvaluator;
this.defaultParser = new DynamicCstrParser(DynamicCstr.DEFAULT_ORDER);
this.parser = this.defaultParser;
this.dynamicCstr = DynamicCstr.defaultCstr();
}
configurate(feature) {
if (this.mode === Mode.HTTP &&
!system_external/* SystemExternal */.f.webworker &&
!this.config) {
configBlocks(feature);
this.config = true;
}
configFeature(feature);
}
setCustomLoader(fn) {
if (fn) {
this.customLoader = fn;
}
}
setup(feature) {
if (typeof feature['mode'] !== 'undefined') {
this.mode = feature['mode'];
}
this.configurate(feature);
this.options.set(feature);
if (feature.json) {
system_external/* SystemExternal */.f.jsonPath = makePath(feature.json);
}
this.setCustomLoader(feature.custom);
}
json() {
return Object.assign({ mode: this.mode }, this.options.json());
}
reset() {
this.options = new Options();
}
}
Engine.nodeEvaluator = function (_node) {
return [];
};
function configFeature(feature) {
if (typeof SREfeature !== 'undefined') {
for (const [name, feat] of Object.entries(SREfeature)) {
feature[name] = feat;
}
}
}
function configBlocks(feature) {
const scripts = document.documentElement.querySelectorAll('script[type="text/x-sre-config"]');
for (let i = 0, m = scripts.length; i < m; i++) {
let inner;
try {
inner = scripts[i].innerHTML;
const config = JSON.parse(inner);
for (const [key, val] of Object.entries(config)) {
feature[key] = val;
}
}
catch (_err) {
Debugger.getInstance().output('Illegal configuration ', inner);
}
}
}
class engine_EnginePromise {
static get(locale = Engine.getInstance().options.locale) {
return engine_EnginePromise.promises[locale] || Promise.resolve('');
}
static getall() {
return Promise.all(Object.values(engine_EnginePromise.promises));
}
}
engine_EnginePromise.loaded = {};
engine_EnginePromise.promises = {};
//# sourceMappingURL=engine.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/xpath_util.js
const xpath = system_external/* SystemExternal */.f.xpath;
const nameSpaces = {
xhtml: 'http://www.w3.org/1999/xhtml',
mathml: 'http://www.w3.org/1998/Math/MathML',
mml: 'http://www.w3.org/1998/Math/MathML',
svg: 'http://www.w3.org/2000/svg'
};
function resolveNameSpace(prefix) {
return nameSpaces[prefix] || null;
}
class Resolver {
constructor() {
this.lookupNamespaceURI = resolveNameSpace;
}
}
function evaluateXpath(expression, rootNode, type) {
return xpath.evaluate(expression, rootNode, new Resolver(), type, null);
}
function evalXPath(expression, rootNode) {
let iterator;
try {
iterator = evaluateXpath(expression, rootNode, xpath.result.ORDERED_NODE_ITERATOR_TYPE);
}
catch (_err) {
return [];
}
const results = [];
for (let xpathNode = iterator.iterateNext(); xpathNode; xpathNode = iterator.iterateNext()) {
results.push(xpathNode);
}
return results;
}
function evaluateBoolean(expression, rootNode) {
let result;
try {
result = evaluateXpath(expression, rootNode, xpath.result.BOOLEAN_TYPE);
}
catch (_err) {
return false;
}
return result.booleanValue;
}
function evaluateString(expression, rootNode) {
let result;
try {
result = evaluateXpath(expression, rootNode, xpath.result.STRING_TYPE);
}
catch (_err) {
return '';
}
return result.stringValue;
}
function updateEvaluator(node) {
if (Engine.getInstance().mode !== Mode.HTTP)
return;
let parent = node;
while (parent && !parent.evaluate) {
parent = parent.parentNode;
}
if (parent && parent.evaluate) {
xpath.currentDocument = parent;
}
else if (node.ownerDocument) {
xpath.currentDocument = node.ownerDocument;
}
}
//# sourceMappingURL=xpath_util.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/dom_util.js
function toArray(nodeList) {
const nodeArray = [];
for (let i = 0, m = nodeList.length; i < m; i++) {
nodeArray.push(nodeList[i]);
}
return nodeArray;
}
function trimInput(input) {
input = input.replace(/ /g, ' ');
return input.replace(/>[ \f\n\r\t\v\u200b]+<').trim();
}
function parseInput(input) {
const dp = new system_external/* SystemExternal */.f.xmldom.DOMParser();
const clean_input = trimInput(input);
const allValues = clean_input.match(/&(?!lt|gt|amp|quot|apos)\w+;/g);
const html = !!allValues;
if (!clean_input) {
throw new Error('Empty input!');
}
try {
const doc = dp.parseFromString(clean_input, html ? 'text/html' : 'text/xml');
if (Engine.getInstance().mode === Mode.HTTP) {
xpath.currentDocument = doc;
return (html ? doc.body.childNodes[0] : doc.documentElement);
}
return doc.documentElement;
}
catch (err) {
throw new SREError('Illegal input: ' + err.message);
}
}
var NodeType;
(function (NodeType) {
NodeType[NodeType["ELEMENT_NODE"] = 1] = "ELEMENT_NODE";
NodeType[NodeType["ATTRIBUTE_NODE"] = 2] = "ATTRIBUTE_NODE";
NodeType[NodeType["TEXT_NODE"] = 3] = "TEXT_NODE";
NodeType[NodeType["CDATA_SECTION_NODE"] = 4] = "CDATA_SECTION_NODE";
NodeType[NodeType["ENTITY_REFERENCE_NODE"] = 5] = "ENTITY_REFERENCE_NODE";
NodeType[NodeType["ENTITY_NODE"] = 6] = "ENTITY_NODE";
NodeType[NodeType["PROCESSING_INSTRUCTION_NODE"] = 7] = "PROCESSING_INSTRUCTION_NODE";
NodeType[NodeType["COMMENT_NODE"] = 8] = "COMMENT_NODE";
NodeType[NodeType["DOCUMENT_NODE"] = 9] = "DOCUMENT_NODE";
NodeType[NodeType["DOCUMENT_TYPE_NODE"] = 10] = "DOCUMENT_TYPE_NODE";
NodeType[NodeType["DOCUMENT_FRAGMENT_NODE"] = 11] = "DOCUMENT_FRAGMENT_NODE";
NodeType[NodeType["NOTATION_NODE"] = 12] = "NOTATION_NODE";
})(NodeType || (NodeType = {}));
function replaceNode(oldNode, newNode) {
if (!oldNode.parentNode) {
return;
}
oldNode.parentNode.insertBefore(newNode, oldNode);
oldNode.parentNode.removeChild(oldNode);
}
function createElement(tag) {
return system_external/* SystemExternal */.f.document.createElement(tag);
}
function createElementNS(url, tag) {
return SystemExternal.document.createElementNS(url, tag);
}
function createTextNode(content) {
return system_external/* SystemExternal */.f.document.createTextNode(content);
}
function formatXml(xml) {
let formatted = '';
let reg = /(>)(<)(\/*)/g;
xml = xml.replace(reg, '$1\r\n$2$3');
let pad = 0;
let split = xml.split('\r\n');
reg = /(\.)*(<)(\/*)/g;
split = split
.map((x) => x.replace(reg, '$1\r\n$2$3').split('\r\n'))
.reduce((x, y) => x.concat(y), []);
while (split.length) {
let node = split.shift();
if (!node) {
continue;
}
let indent = 0;
if (node.match(/^<\w[^>/]*>[^>]+$/)) {
const match = matchingStartEnd(node, split[0]);
if (match[0]) {
if (match[1]) {
node = node + split.shift().slice(0, -match[1].length);
if (match[1].trim()) {
split.unshift(match[1]);
}
}
else {
node = node + split.shift();
}
}
else {
indent = 1;
}
}
else if (node.match(/^<\/\w/)) {
if (pad !== 0) {
pad -= 1;
}
}
else if (node.match(/^<\w[^>]*[^/]>.*$/)) {
indent = 1;
}
else if (node.match(/^<\w[^>]*\/>.+$/)) {
const position = node.indexOf('>') + 1;
const rest = node.slice(position);
if (rest.trim()) {
split.unshift();
}
node = node.slice(0, position) + rest;
}
else {
indent = 0;
}
formatted += new Array(pad + 1).join(' ') + node + '\r\n';
pad += indent;
}
return formatted;
}
function matchingStartEnd(start, end) {
if (!end) {
return [false, ''];
}
const tag1 = start.match(/^<([^> ]+).*>/);
const tag2 = end.match(/^<\/([^>]+)>(.*)/);
return tag1 && tag2 && tag1[1] === tag2[1] ? [true, tag2[2]] : [false, ''];
}
function querySelectorAllByAttr(node, attr) {
return node.querySelectorAll
? toArray(node.querySelectorAll(`[${attr}]`))
: XpathUtil.evalXPath(`.//*[@${attr}]`, node);
}
function querySelectorAllByAttrValue(node, attr, value) {
return node.querySelectorAll
? toArray(node.querySelectorAll(`[${attr}="${value}"]`))
: XpathUtil.evalXPath(`.//*[@${attr}="${value}"]`, node);
}
function querySelectorAll(node, tag) {
return node.querySelectorAll
? toArray(node.querySelectorAll(tag))
: XpathUtil.evalXPath(`.//${tag}`, node);
}
function dom_util_tagName(node) {
return node.tagName.toUpperCase();
}
function cloneNode(node) {
return node.cloneNode(true);
}
function serializeXml(node) {
const xmls = new system_external/* SystemExternal */.f.xmldom.XMLSerializer();
return xmls.serializeToString(node);
}
//# sourceMappingURL=dom_util.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_annotator.js
class SemanticAnnotator {
constructor(domain, name, func) {
this.domain = domain;
this.name = name;
this.func = func;
this.active = false;
}
annotate(node) {
node.childNodes.forEach(this.annotate.bind(this));
node.contentNodes.forEach(this.annotate.bind(this));
node.addAnnotation(this.domain, this.func(node));
}
}
class SemanticVisitor {
constructor(domain, name, func, def = {}) {
this.domain = domain;
this.name = name;
this.func = func;
this.def = def;
this.active = false;
}
visit(node, info) {
let result = this.func(node, info);
node.addAnnotation(this.domain, result[0]);
for (let i = 0, child; (child = node.childNodes[i]); i++) {
result = this.visit(child, result[1]);
}
for (let i = 0, content; (content = node.contentNodes[i]); i++) {
result = this.visit(content, result[1]);
}
return result;
}
}
//# sourceMappingURL=semantic_annotator.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_annotations.js
const annotators = new Map();
const visitors = new Map();
function register(annotator) {
const name = annotator.domain + ':' + annotator.name;
annotator instanceof SemanticAnnotator
? annotators.set(name, annotator)
: visitors.set(name, annotator);
}
function activate(domain, name) {
const key = domain + ':' + name;
const annotator = annotators.get(key) || visitors.get(key);
if (annotator) {
annotator.active = true;
}
}
function deactivate(domain, name) {
const key = domain + ':' + name;
const annotator = annotators.get(key) || visitors.get(key);
if (annotator) {
annotator.active = false;
}
}
function annotate(node) {
for (const annotator of annotators.values()) {
if (annotator.active) {
annotator.annotate(node);
}
}
for (const visitor of visitors.values()) {
if (visitor.active) {
visitor.visit(node, Object.assign({}, visitor.def));
}
}
}
//# sourceMappingURL=semantic_annotations.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/speech_rules/alphabet.js
var Font;
(function (Font) {
Font["BOLD"] = "bold";
Font["BOLDFRAKTUR"] = "bold-fraktur";
Font["BOLDITALIC"] = "bold-italic";
Font["BOLDSCRIPT"] = "bold-script";
Font["DOUBLESTRUCK"] = "double-struck";
Font["DOUBLESTRUCKITALIC"] = "double-struck-italic";
Font["FULLWIDTH"] = "fullwidth";
Font["FRAKTUR"] = "fraktur";
Font["ITALIC"] = "italic";
Font["MONOSPACE"] = "monospace";
Font["NORMAL"] = "normal";
Font["SCRIPT"] = "script";
Font["SANSSERIF"] = "sans-serif";
Font["SANSSERIFITALIC"] = "sans-serif-italic";
Font["SANSSERIFBOLD"] = "sans-serif-bold";
Font["SANSSERIFBOLDITALIC"] = "sans-serif-bold-italic";
})(Font || (Font = {}));
var Embellish;
(function (Embellish) {
Embellish["SUPER"] = "super";
Embellish["SUB"] = "sub";
Embellish["CIRCLED"] = "circled";
Embellish["PARENTHESIZED"] = "parenthesized";
Embellish["PERIOD"] = "period";
Embellish["NEGATIVECIRCLED"] = "negative-circled";
Embellish["DOUBLECIRCLED"] = "double-circled";
Embellish["CIRCLEDSANSSERIF"] = "circled-sans-serif";
Embellish["NEGATIVECIRCLEDSANSSERIF"] = "negative-circled-sans-serif";
Embellish["COMMA"] = "comma";
Embellish["SQUARED"] = "squared";
Embellish["NEGATIVESQUARED"] = "negative-squared";
})(Embellish || (Embellish = {}));
var Base;
(function (Base) {
Base["LATINCAP"] = "latinCap";
Base["LATINSMALL"] = "latinSmall";
Base["GREEKCAP"] = "greekCap";
Base["GREEKSMALL"] = "greekSmall";
Base["DIGIT"] = "digit";
})(Base || (Base = {}));
function num2str(num) {
const str = num.toString(16).toUpperCase();
return str.length > 3 ? str : ('000' + str).slice(-4);
}
function makeInterval([a, b], subst) {
const start = parseInt(a, 16);
const end = parseInt(b, 16);
const result = [];
for (let i = start; i <= end; i++) {
let key = num2str(i);
const sub = subst[key];
if (sub === false) {
continue;
}
key = subst[key] || key;
result.push(key);
}
return result;
}
function makeCharInterval(int, subst = {}) {
return makeInterval(int, subst).map((x) => String.fromCodePoint(parseInt(x, 16)));
}
function makeMultiInterval(ints) {
let result = [];
for (const int of ints) {
if (Array.isArray(int)) {
result = result.concat(makeCharInterval(int));
continue;
}
result.push(String.fromCodePoint(parseInt(int, 16)));
}
return result;
}
function makeCodeInterval(ints) {
let result = [];
for (const int of ints) {
if (Array.isArray(int)) {
result = result.concat(makeInterval(int, {}).map((x) => parseInt(x, 16)));
continue;
}
result.push(parseInt(int, 16));
}
return result;
}
const PROTO_INTERVALS = [
{
interval: ['1D400', '1D419'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.BOLD
},
{
interval: ['1D41A', '1D433'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.BOLD
},
{
interval: ['1D56C', '1D585'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.BOLDFRAKTUR
},
{
interval: ['1D586', '1D59F'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.BOLDFRAKTUR
},
{
interval: ['1D468', '1D481'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.BOLDITALIC
},
{
interval: ['1D482', '1D49B'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.BOLDITALIC
},
{
interval: ['1D4D0', '1D4E9'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.BOLDSCRIPT
},
{
interval: ['1D4EA', '1D503'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.BOLDSCRIPT
},
{
interval: ['1D538', '1D551'],
base: Base.LATINCAP,
subst: {
'1D53A': '2102',
'1D53F': '210D',
'1D545': '2115',
'1D547': '2119',
'1D548': '211A',
'1D549': '211D',
'1D551': '2124'
},
capital: true,
category: 'Lu',
font: Font.DOUBLESTRUCK
},
{
interval: ['1D552', '1D56B'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.DOUBLESTRUCK
},
{
interval: ['1D504', '1D51D'],
base: Base.LATINCAP,
subst: {
'1D506': '212D',
'1D50B': '210C',
'1D50C': '2111',
'1D515': '211C',
'1D51D': '2128'
},
capital: true,
category: 'Lu',
font: Font.FRAKTUR
},
{
interval: ['1D51E', '1D537'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.FRAKTUR
},
{
interval: ['FF21', 'FF3A'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.FULLWIDTH
},
{
interval: ['FF41', 'FF5A'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.FULLWIDTH
},
{
interval: ['1D434', '1D44D'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.ITALIC
},
{
interval: ['1D44E', '1D467'],
base: Base.LATINSMALL,
subst: { '1D455': '210E' },
capital: false,
category: 'Ll',
font: Font.ITALIC
},
{
interval: ['1D670', '1D689'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.MONOSPACE
},
{
interval: ['1D68A', '1D6A3'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.MONOSPACE
},
{
interval: ['0041', '005A'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.NORMAL
},
{
interval: ['0061', '007A'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.NORMAL
},
{
interval: ['1D49C', '1D4B5'],
base: Base.LATINCAP,
subst: {
'1D49D': '212C',
'1D4A0': '2130',
'1D4A1': '2131',
'1D4A3': '210B',
'1D4A4': '2110',
'1D4A7': '2112',
'1D4A8': '2133',
'1D4AD': '211B'
},
capital: true,
category: 'Lu',
font: Font.SCRIPT
},
{
interval: ['1D4B6', '1D4CF'],
base: Base.LATINSMALL,
subst: { '1D4BA': '212F', '1D4BC': '210A', '1D4C4': '2134' },
capital: false,
category: 'Ll',
font: Font.SCRIPT
},
{
interval: ['1D5A0', '1D5B9'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.SANSSERIF
},
{
interval: ['1D5BA', '1D5D3'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.SANSSERIF
},
{
interval: ['1D608', '1D621'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.SANSSERIFITALIC
},
{
interval: ['1D622', '1D63B'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.SANSSERIFITALIC
},
{
interval: ['1D5D4', '1D5ED'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.SANSSERIFBOLD
},
{
interval: ['1D5EE', '1D607'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.SANSSERIFBOLD
},
{
interval: ['1D63C', '1D655'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.SANSSERIFBOLDITALIC
},
{
interval: ['1D656', '1D66F'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.SANSSERIFBOLDITALIC
},
{
interval: ['0391', '03A9'],
base: Base.GREEKCAP,
subst: { '03A2': '03F4' },
capital: true,
category: 'Lu',
font: Font.NORMAL
},
{
interval: ['03B0', '03D0'],
base: Base.GREEKSMALL,
subst: {
'03B0': '2207',
'03CA': '2202',
'03CB': '03F5',
'03CC': '03D1',
'03CD': '03F0',
'03CE': '03D5',
'03CF': '03F1',
'03D0': '03D6'
},
capital: false,
category: 'Ll',
font: Font.NORMAL
},
{
interval: ['1D6A8', '1D6C0'],
base: Base.GREEKCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.BOLD
},
{
interval: ['1D6C1', '1D6E1'],
base: Base.GREEKSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.BOLD
},
{
interval: ['1D6E2', '1D6FA'],
base: Base.GREEKCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.ITALIC
},
{
interval: ['1D6FB', '1D71B'],
base: Base.GREEKSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.ITALIC
},
{
interval: ['1D71C', '1D734'],
base: Base.GREEKCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.BOLDITALIC
},
{
interval: ['1D735', '1D755'],
base: Base.GREEKSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.BOLDITALIC
},
{
interval: ['1D756', '1D76E'],
base: Base.GREEKCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.SANSSERIFBOLD
},
{
interval: ['1D76F', '1D78F'],
base: Base.GREEKSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.SANSSERIFBOLD
},
{
interval: ['1D790', '1D7A8'],
base: Base.GREEKCAP,
subst: {},
capital: true,
category: 'Lu',
font: Font.SANSSERIFBOLDITALIC
},
{
interval: ['1D7A9', '1D7C9'],
base: Base.GREEKSMALL,
subst: {},
capital: false,
category: 'Ll',
font: Font.SANSSERIFBOLDITALIC
},
{
interval: ['0030', '0039'],
base: Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: Font.NORMAL
},
{
interval: ['2070', '2079'],
base: Base.DIGIT,
subst: { 2071: '00B9', 2072: '00B2', 2073: '00B3' },
offset: 0,
category: 'No',
font: Embellish.SUPER
},
{
interval: ['2080', '2089'],
base: Base.DIGIT,
subst: {},
offset: 0,
category: 'No',
font: Embellish.SUB
},
{
interval: ['245F', '2473'],
base: Base.DIGIT,
subst: { '245F': '24EA' },
offset: 0,
category: 'No',
font: Embellish.CIRCLED
},
{
interval: ['3251', '325F'],
base: Base.DIGIT,
subst: {},
offset: 21,
category: 'No',
font: Embellish.CIRCLED
},
{
interval: ['32B1', '32BF'],
base: Base.DIGIT,
subst: {},
offset: 36,
category: 'No',
font: Embellish.CIRCLED
},
{
interval: ['2474', '2487'],
base: Base.DIGIT,
subst: {},
offset: 1,
category: 'No',
font: Embellish.PARENTHESIZED
},
{
interval: ['2487', '249B'],
base: Base.DIGIT,
subst: { 2487: '1F100' },
offset: 0,
category: 'No',
font: Embellish.PERIOD
},
{
interval: ['2775', '277F'],
base: Base.DIGIT,
subst: { 2775: '24FF' },
offset: 0,
category: 'No',
font: Embellish.NEGATIVECIRCLED
},
{
interval: ['24EB', '24F4'],
base: Base.DIGIT,
subst: {},
offset: 11,
category: 'No',
font: Embellish.NEGATIVECIRCLED
},
{
interval: ['24F5', '24FE'],
base: Base.DIGIT,
subst: {},
offset: 1,
category: 'No',
font: Embellish.DOUBLECIRCLED
},
{
interval: ['277F', '2789'],
base: Base.DIGIT,
subst: { '277F': '1F10B' },
offset: 0,
category: 'No',
font: Embellish.CIRCLEDSANSSERIF
},
{
interval: ['2789', '2793'],
base: Base.DIGIT,
subst: { 2789: '1F10C' },
offset: 0,
category: 'No',
font: Embellish.NEGATIVECIRCLEDSANSSERIF
},
{
interval: ['FF10', 'FF19'],
base: Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: Font.FULLWIDTH
},
{
interval: ['1D7CE', '1D7D7'],
base: Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: Font.BOLD
},
{
interval: ['1D7D8', '1D7E1'],
base: Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: Font.DOUBLESTRUCK
},
{
interval: ['1D7E2', '1D7EB'],
base: Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: Font.SANSSERIF
},
{
interval: ['1D7EC', '1D7F5'],
base: Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: Font.SANSSERIFBOLD
},
{
interval: ['1D7F6', '1D7FF'],
base: Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: Font.MONOSPACE
},
{
interval: ['1F101', '1F10A'],
base: Base.DIGIT,
subst: {},
offset: 0,
category: 'No',
font: Embellish.COMMA
},
{
interval: ['24B6', '24CF'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'So',
font: Embellish.CIRCLED
},
{
interval: ['24D0', '24E9'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'So',
font: Embellish.CIRCLED
},
{
interval: ['1F110', '1F129'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'So',
font: Embellish.PARENTHESIZED
},
{
interval: ['249C', '24B5'],
base: Base.LATINSMALL,
subst: {},
capital: false,
category: 'So',
font: Embellish.PARENTHESIZED
},
{
interval: ['1F130', '1F149'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'So',
font: Embellish.SQUARED
},
{
interval: ['1F170', '1F189'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'So',
font: Embellish.NEGATIVESQUARED
},
{
interval: ['1F150', '1F169'],
base: Base.LATINCAP,
subst: {},
capital: true,
category: 'So',
font: Embellish.NEGATIVECIRCLED
}
];
const INTERVALS = new Map();
function alphabetName(base, font) {
const capFont = font
.split('-')
.map((x) => x[0].toUpperCase() + x.slice(1))
.join('');
return base + capFont;
}
for (const proto of PROTO_INTERVALS) {
const key = alphabetName(proto.base, proto.font);
const interval = makeCharInterval(proto.interval, proto.subst);
let alphabet = INTERVALS.get(key);
if (alphabet) {
alphabet.unicode = alphabet.unicode.concat(interval);
continue;
}
alphabet = proto;
alphabet.unicode = interval;
INTERVALS.set(key, alphabet);
}
//# sourceMappingURL=alphabet.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_meaning.js
var Types;
(function (Types) {
Types["PUNCTUATION"] = "punctuation";
Types["FENCE"] = "fence";
Types["NUMBER"] = "number";
Types["IDENTIFIER"] = "identifier";
Types["TEXT"] = "text";
Types["OPERATOR"] = "operator";
Types["RELATION"] = "relation";
Types["LARGEOP"] = "largeop";
Types["FUNCTION"] = "function";
Types["ACCENT"] = "accent";
Types["FENCED"] = "fenced";
Types["FRACTION"] = "fraction";
Types["PUNCTUATED"] = "punctuated";
Types["RELSEQ"] = "relseq";
Types["MULTIREL"] = "multirel";
Types["INFIXOP"] = "infixop";
Types["PREFIXOP"] = "prefixop";
Types["POSTFIXOP"] = "postfixop";
Types["APPL"] = "appl";
Types["INTEGRAL"] = "integral";
Types["BIGOP"] = "bigop";
Types["SQRT"] = "sqrt";
Types["ROOT"] = "root";
Types["LIMUPPER"] = "limupper";
Types["LIMLOWER"] = "limlower";
Types["LIMBOTH"] = "limboth";
Types["SUBSCRIPT"] = "subscript";
Types["SUPERSCRIPT"] = "superscript";
Types["UNDERSCORE"] = "underscore";
Types["OVERSCORE"] = "overscore";
Types["TENSOR"] = "tensor";
Types["TABLE"] = "table";
Types["MULTILINE"] = "multiline";
Types["MATRIX"] = "matrix";
Types["VECTOR"] = "vector";
Types["CASES"] = "cases";
Types["ROW"] = "row";
Types["LINE"] = "line";
Types["CELL"] = "cell";
Types["ENCLOSE"] = "enclose";
Types["INFERENCE"] = "inference";
Types["RULELABEL"] = "rulelabel";
Types["CONCLUSION"] = "conclusion";
Types["PREMISES"] = "premises";
Types["UNKNOWN"] = "unknown";
Types["EMPTY"] = "empty";
})(Types || (Types = {}));
const semantic_meaning_SemanticType = Object.assign({}, Types);
var Roles;
(function (Roles) {
Roles["COMMA"] = "comma";
Roles["SEMICOLON"] = "semicolon";
Roles["ELLIPSIS"] = "ellipsis";
Roles["FULLSTOP"] = "fullstop";
Roles["QUESTION"] = "question";
Roles["EXCLAMATION"] = "exclamation";
Roles["QUOTES"] = "quotes";
Roles["DASH"] = "dash";
Roles["TILDE"] = "tilde";
Roles["PRIME"] = "prime";
Roles["DEGREE"] = "degree";
Roles["VBAR"] = "vbar";
Roles["COLON"] = "colon";
Roles["OPENFENCE"] = "openfence";
Roles["CLOSEFENCE"] = "closefence";
Roles["APPLICATION"] = "application";
Roles["DUMMY"] = "dummy";
Roles["UNIT"] = "unit";
Roles["LABEL"] = "label";
Roles["OPEN"] = "open";
Roles["CLOSE"] = "close";
Roles["TOP"] = "top";
Roles["BOTTOM"] = "bottom";
Roles["NEUTRAL"] = "neutral";
Roles["METRIC"] = "metric";
Roles["LATINLETTER"] = "latinletter";
Roles["GREEKLETTER"] = "greekletter";
Roles["OTHERLETTER"] = "otherletter";
Roles["NUMBERSET"] = "numbersetletter";
Roles["INTEGER"] = "integer";
Roles["FLOAT"] = "float";
Roles["OTHERNUMBER"] = "othernumber";
Roles["INFTY"] = "infty";
Roles["MIXED"] = "mixed";
Roles["MULTIACCENT"] = "multiaccent";
Roles["OVERACCENT"] = "overaccent";
Roles["UNDERACCENT"] = "underaccent";
Roles["UNDEROVER"] = "underover";
Roles["SUBSUP"] = "subsup";
Roles["LEFTSUB"] = "leftsub";
Roles["LEFTSUPER"] = "leftsuper";
Roles["RIGHTSUB"] = "rightsub";
Roles["RIGHTSUPER"] = "rightsuper";
Roles["LEFTRIGHT"] = "leftright";
Roles["ABOVEBELOW"] = "abovebelow";
Roles["INTERVAL"] = "interval";
Roles["SETEMPTY"] = "set empty";
Roles["SETEXT"] = "set extended";
Roles["SETSINGLE"] = "set singleton";
Roles["SETCOLLECT"] = "set collection";
Roles["STRING"] = "string";
Roles["SPACE"] = "space";
Roles["ANNOTATION"] = "annotation";
Roles["TEXT"] = "text";
Roles["SEQUENCE"] = "sequence";
Roles["ENDPUNCT"] = "endpunct";
Roles["STARTPUNCT"] = "startpunct";
Roles["NEGATIVE"] = "negative";
Roles["POSITIVE"] = "positive";
Roles["NEGATION"] = "negation";
Roles["MULTIOP"] = "multiop";
Roles["PREFIXOP"] = "prefix operator";
Roles["POSTFIXOP"] = "postfix operator";
Roles["LIMFUNC"] = "limit function";
Roles["INFIXFUNC"] = "infix function";
Roles["PREFIXFUNC"] = "prefix function";
Roles["POSTFIXFUNC"] = "postfix function";
Roles["SIMPLEFUNC"] = "simple function";
Roles["COMPFUNC"] = "composed function";
Roles["SUM"] = "sum";
Roles["INTEGRAL"] = "integral";
Roles["GEOMETRY"] = "geometry";
Roles["BOX"] = "box";
Roles["BLOCK"] = "block";
Roles["ADDITION"] = "addition";
Roles["MULTIPLICATION"] = "multiplication";
Roles["SUBTRACTION"] = "subtraction";
Roles["IMPLICIT"] = "implicit";
Roles["DIVISION"] = "division";
Roles["VULGAR"] = "vulgar";
Roles["EQUALITY"] = "equality";
Roles["INEQUALITY"] = "inequality";
Roles["ARROW"] = "arrow";
Roles["ELEMENT"] = "element";
Roles["NONELEMENT"] = "nonelement";
Roles["REELEMENT"] = "reelement";
Roles["RENONELEMENT"] = "renonelement";
Roles["SET"] = "set";
Roles["DETERMINANT"] = "determinant";
Roles["ROWVECTOR"] = "rowvector";
Roles["BINOMIAL"] = "binomial";
Roles["SQUAREMATRIX"] = "squarematrix";
Roles["CYCLE"] = "cycle";
Roles["MULTILINE"] = "multiline";
Roles["MATRIX"] = "matrix";
Roles["VECTOR"] = "vector";
Roles["CASES"] = "cases";
Roles["TABLE"] = "table";
Roles["CAYLEY"] = "cayley";
Roles["PROOF"] = "proof";
Roles["LEFT"] = "left";
Roles["RIGHT"] = "right";
Roles["UP"] = "up";
Roles["DOWN"] = "down";
Roles["FINAL"] = "final";
Roles["SINGLE"] = "single";
Roles["HYP"] = "hyp";
Roles["AXIOM"] = "axiom";
Roles["LOGIC"] = "logic";
Roles["UNKNOWN"] = "unknown";
Roles["MGLYPH"] = "mglyph";
})(Roles || (Roles = {}));
const semantic_meaning_SemanticRole = Object.assign({}, Roles);
var ExtraFont;
(function (ExtraFont) {
ExtraFont["CALIGRAPHIC"] = "caligraphic";
ExtraFont["CALIGRAPHICBOLD"] = "caligraphic-bold";
ExtraFont["OLDSTYLE"] = "oldstyle";
ExtraFont["OLDSTYLEBOLD"] = "oldstyle-bold";
ExtraFont["UNKNOWN"] = "unknown";
})(ExtraFont || (ExtraFont = {}));
const SemanticFont = Object.assign(Object.assign(Object.assign({}, Font), ExtraFont), Embellish);
var SecondaryEnum;
(function (SecondaryEnum) {
SecondaryEnum["ALLLETTERS"] = "allLetters";
SecondaryEnum["D"] = "d";
SecondaryEnum["BAR"] = "bar";
SecondaryEnum["TILDE"] = "tilde";
})(SecondaryEnum || (SecondaryEnum = {}));
const SemanticSecondary = Object.assign(Object.assign({}, Base), SecondaryEnum);
//# sourceMappingURL=semantic_meaning.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_attr.js
var __rest = (undefined && undefined.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
const NamedSymbol = {
functionApplication: String.fromCodePoint(0x2061),
invisibleTimes: String.fromCodePoint(0x2062),
invisibleComma: String.fromCodePoint(0x2063),
invisiblePlus: String.fromCodePoint(0x2064)
};
class meaningMap extends Map {
get(symbol) {
return (super.get(symbol) || {
role: semantic_meaning_SemanticRole.UNKNOWN,
type: semantic_meaning_SemanticType.UNKNOWN,
font: SemanticFont.UNKNOWN
});
}
}
class secondaryMap extends Map {
set(char, kind, annotation = '') {
super.set(this.secKey(kind, char), annotation || kind);
return this;
}
has(char, kind) {
return super.has(this.secKey(kind, char));
}
get(char, kind) {
return super.get(this.secKey(kind, char));
}
secKey(kind, char) {
return char ? `${kind} ${char}` : `${kind}`;
}
}
const SemanticMap = {
Meaning: new meaningMap(),
Secondary: new secondaryMap(),
FencesHoriz: new Map(),
FencesVert: new Map(),
LatexCommands: new Map()
};
function addMeaning(symbols, meaning) {
for (const symbol of symbols) {
SemanticMap.Meaning.set(symbol, {
role: meaning.role || semantic_meaning_SemanticRole.UNKNOWN,
type: meaning.type || semantic_meaning_SemanticType.UNKNOWN,
font: meaning.font || SemanticFont.UNKNOWN
});
if (meaning.secondary) {
SemanticMap.Secondary.set(symbol, meaning.secondary);
}
}
}
function initMeaning() {
const sets = [
{
set: [
'23',
'26',
'40',
'5c',
'a1',
'a7',
'b6',
'bf',
'2017',
['2022', '2025'],
'2027',
'203b',
'203c',
['2041', '2043'],
['2047', '2049'],
['204b', '204d'],
'2050',
'2055',
'2056',
['2058', '205e'],
'2234',
'2235',
'fe45',
'fe46',
'fe5f',
'fe60',
'fe68',
'fe6b',
'ff03',
'ff06',
'ff0f',
'ff20',
'ff3c'
],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: [
'22',
'ab',
'bb',
'2dd',
['2018', '201f'],
'2039',
'203a',
['301d', '301f'],
'fe10',
'ff02',
'ff07'
],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.QUOTES
},
{
set: ['3b', '204f', '2a1f', '2a3e', 'fe14', 'fe54', 'ff1b'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.SEMICOLON
},
{
set: ['3f', '203d', 'fe16', 'fe56', 'ff1f'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.QUESTION
},
{
set: ['21', 'fe15', 'fe57', 'ff01'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.EXCLAMATION
},
{
set: [
'5e',
'60',
'a8',
'aa',
'b4',
'ba',
'2c7',
['2d8', '2da'],
'2040',
'207a',
'207d',
'207e',
'ff3e',
'ff40'
],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.OVERACCENT
},
{
set: ['b8', '2db', '2038', '203f', '2054', '208a', '208d', '208e'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.UNDERACCENT
},
{
set: ['3a', '2982', 'fe13', 'fe30', 'fe55', 'ff1a'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.COLON
},
{
set: ['2c', '2063', 'fe50', 'ff0c'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.COMMA
},
{
set: ['2026', ['22ee', '22f1'], 'fe19'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.ELLIPSIS
},
{
set: ['2e', 'fe52', 'ff0e'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.FULLSTOP
},
{
set: ['2d', '207b', '208b', '2212', '2796', 'fe63', 'ff0d'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.DASH,
secondary: SemanticSecondary.BAR
},
{
set: [
'5f',
'af',
['2010', '2015'],
'203e',
'208b',
['fe49', 'fe4f'],
'fe58',
'ff3f',
'ffe3'
],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.DASH,
secondary: SemanticSecondary.BAR
},
{
set: [
'7e',
'2dc',
'2f7',
'303',
'330',
'334',
'2053',
'223c',
'223d',
'301c',
'ff5e'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.TILDE,
secondary: SemanticSecondary.TILDE
},
{
set: ['27', '2b9', '2ba', ['2032', '2037'], '2057'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.PRIME
},
{
set: ['b0'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.DEGREE
},
{
set: [
'2b',
'b1',
'2064',
'2213',
'2214',
'2228',
'222a',
['228c', '228e'],
'2294',
'2295',
'229d',
'229e',
'22bb',
'22bd',
'22c4',
'22ce',
'22d3',
'2304',
'271b',
'271c',
'2795',
'27cf',
'29fa',
'29fb',
'29fe',
['2a22', '2a28'],
'2a2d',
'2a2e',
'2a39',
'2a42',
'2a45',
'2a46',
'2a48',
'2a4a',
'2a4c',
'2a4f',
'2a50',
'2a52',
'2a54',
'2a56',
'2a57',
'2a59',
'2a5b',
'2a5d',
['2a61', '2a63'],
'2adc',
'2add',
'fe62',
'ff0b'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.ADDITION
},
{
set: [
'2a',
'b7',
'd7',
'2020',
'2021',
'204e',
'2051',
'2062',
['2217', '2219'],
'2227',
'2229',
'2240',
'2293',
'2297',
['2299', '229b'],
'22a0',
'22a1',
'22b9',
'22bc',
['22c5', '22cc'],
'22cf',
'22d2',
'22d4',
'2303',
'2305',
'2306',
'25cb',
'2715',
'2716',
'27ce',
'27d1',
['29d1', '29d7'],
'29e2',
'2a1d',
['2a2f', '2a37'],
['2a3b', '2a3d'],
'2a40',
'2a43',
'2a44',
'2a47',
'2a49',
'2a4b',
'2a4d',
'2a4e',
'2a51',
'2a53',
'2a55',
'2a58',
'2a5a',
'2a5c',
['2a5e', '2a60'],
'2ada',
'2adb',
'fe61',
'ff0a'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.MULTIPLICATION
},
{
set: [
'2d',
'af',
'2010',
'2011',
'2052',
'207b',
'208b',
'2212',
'2216',
'2238',
'2242',
'2296',
'229f',
'2796',
'29ff',
['2a29', '2a2c'],
'2a3a',
'2a41',
'fe63',
'ff0d'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.SUBTRACTION
},
{
set: [
'2f',
'f7',
'2044',
'2215',
'2298',
'2797',
'27cc',
'29bc',
['29f5', '29f9'],
'2a38'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.DIVISION
},
{
set: ['25', '2030', '2031', 'ff05', 'fe6a'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.POSTFIXOP
},
{
set: [
'ac',
'2200',
'2201',
'2203',
'2204',
'2206',
['221a', '221c'],
'2310',
'ffe2'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXOP
},
{
set: [
'2320',
'2321',
'23aa',
'23ae',
'23af',
'23b2',
'23b3',
'23b6',
'23b7'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXOP
},
{
set: ['1d7ca', '1d7cb'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXOP,
font: SemanticFont.BOLD
},
{
set: [
'3d',
'7e',
'207c',
'208c',
'221d',
'2237',
['223a', '223f'],
'2243',
'2245',
'2248',
['224a', '224e'],
['2251', '225f'],
'2261',
'2263',
'229c',
'22cd',
'22d5',
'29e4',
'29e6',
'2a66',
'2a67',
['2a6a', '2a6c'],
['2a6c', '2a78'],
'fe66',
'ff1d'
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.EQUALITY
},
{
set: [
'3c',
'3e',
'2241',
'2242',
'2244',
'2246',
'2247',
'2249',
'224f',
'2250',
'2260',
'2262',
['2264', '2281'],
'22b0',
'22b1',
['22d6', '22e1'],
['22e6', '22e9'],
['2976', '2978'],
'29c0',
'29c1',
'29e1',
'29e3',
'29e5',
['2a79', '2abc'],
['2af7', '2afa'],
'fe64',
'fe65',
'ff1c',
'ff1e'
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.INEQUALITY
},
{
set: [
['2282', '228b'],
['228f', '2292'],
['22b2', '22b8'],
'22d0',
'22d1',
['22e2', '22e5'],
['22ea', '22ed'],
'27c3',
'27c4',
['27c7', '27c9'],
['27d5', '27d7'],
'27dc',
['2979', '297b'],
'29df',
['2abd', '2ad8']
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.SET
},
{
set: [
'2236',
['27e0', '27e5'],
'292b',
'292c',
['29b5', '29bb'],
'29be',
'29bf',
['29c2', '29d0']
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: ['2205', ['29b0', '29b4']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.SETEMPTY
},
{
set: ['1ab2', '221e', ['29dc', '29de']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.INFTY
},
{
set: [
'22a2',
'22a3',
['22a6', '22af'],
'27da',
'27db',
'27dd',
'27de',
'2ade',
['2ae2', '2ae6'],
'2aec',
'2aed'
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.LOGIC
},
{
set: [
'22a4',
'22a5',
'22ba',
'27d8',
'27d9',
'27df',
'2adf',
'2ae0',
['2ae7', '2aeb'],
'2af1'
],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LOGIC
},
{
set: [
['2190', '21ff'],
'2301',
'2324',
'238b',
'2794',
['2798', '27af'],
['27b1', '27be'],
['27f0', '27ff'],
['2900', '292a'],
['292d', '2975'],
['297c', '297f'],
['2b00', '2b11'],
['2b30', '2b4c'],
['ffe9', 'ffec']
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.ARROW
},
{
set: ['2208', '220a', ['22f2', '22f9'], '22ff', '27d2', '2ad9'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.ELEMENT
},
{
set: ['2209'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.NONELEMENT
},
{
set: ['220b', '220d', ['22fa', '22fe']],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.REELEMENT
},
{
set: ['220c'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.RENONELEMENT
},
{
set: [
['220f', '2211'],
['22c0', '22c3'],
['2a00', '2a0b'],
'2a3f',
'2afc',
'2aff'
],
type: semantic_meaning_SemanticType.LARGEOP,
role: semantic_meaning_SemanticRole.SUM
},
{
set: ['2140'],
type: semantic_meaning_SemanticType.LARGEOP,
role: semantic_meaning_SemanticRole.SUM,
font: SemanticFont.DOUBLESTRUCK
},
{
set: [
['222b', '2233'],
['2a0c', '2a17'],
['2a17', '2a1c']
],
type: semantic_meaning_SemanticType.LARGEOP,
role: semantic_meaning_SemanticRole.INTEGRAL
},
{
set: [['2500', '257F']],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.BOX
},
{
set: [['2580', '259F']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.BLOCK
},
{
set: [
['25A0', '25FF'],
['2B12', '2B2F'],
['2B50', '2B59']
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.GEOMETRY
},
{
set: [
'220e',
'2300',
'2302',
'2311',
'29bd',
'29e0',
['29e8', '29f3'],
'2a1e',
'2afe',
'ffed',
'ffee'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.GEOMETRY
},
{
set: [
['221f', '2222'],
'22be',
'22bf',
['2312', '2314'],
'237c',
'27c0',
['299b', '29af']
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.GEOMETRY
},
{
set: [
'24',
['a2', 'a5'],
'b5',
'2123',
['2125', '2127'],
'212a',
'212b',
'fe69',
'ff04',
'ffe0',
'ffe1',
'ffe5',
'ffe6'
],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: [
'a9',
'ae',
'210f',
'2114',
'2116',
'2117',
['211e', '2122'],
'212e',
'2132',
['2139', '213b'],
['2141', '2144'],
'214d',
'214e',
['1f12a', '1f12c'],
'1f18a'
],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.OTHERLETTER
},
{
set: [
'2224',
'2226',
'2239',
'2307',
'27b0',
'27bf',
'27c1',
'27c2',
'27ca',
'27cb',
'27cd',
'27d0',
'27d3',
'27d4',
'2981',
'2999',
'299a',
'29e7',
'29f4',
'2a20',
'2a21',
'2a64',
'2a65',
'2a68',
'2a69',
'2ae1',
['2aee', '2af0'],
'2af2',
'2af3',
'2af5',
'2af6',
'2afb',
'2afd'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: ['2605', '2606', '26aa', '26ab', ['2720', '274d']],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: [['2145', '2149']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LATINLETTER,
font: SemanticFont.DOUBLESTRUCKITALIC,
secondary: SemanticSecondary.ALLLETTERS
},
{
set: [['213c', '213f']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.GREEKLETTER,
font: SemanticFont.DOUBLESTRUCK,
secondary: SemanticSecondary.ALLLETTERS
},
{
set: [
'3d0',
'3d7',
'3f6',
['1d26', '1d2a'],
'1d5e',
'1d60',
['1d66', '1d6a']
],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.GREEKLETTER,
font: SemanticFont.NORMAL,
secondary: SemanticSecondary.ALLLETTERS
},
{
set: [['2135', '2138']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.OTHERLETTER,
font: SemanticFont.NORMAL,
secondary: SemanticSecondary.ALLLETTERS
},
{
set: ['131', '237'],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LATINLETTER,
font: SemanticFont.NORMAL
},
{
set: ['1d6a4', '1d6a5'],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LATINLETTER,
font: SemanticFont.ITALIC
},
{
set: ['2113', '2118'],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LATINLETTER,
font: SemanticFont.SCRIPT
},
{
set: [
['c0', 'd6'],
['d8', 'f6'],
['f8', '1bf'],
['1c4', '2af'],
['1d00', '1d25'],
['1d6b', '1d9a'],
['1e00', '1ef9'],
['363', '36f'],
['1dd3', '1de6'],
['1d62', '1d65'],
'1dca',
'2071',
'207f',
['2090', '209c'],
'2c7c'
],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LATINLETTER,
font: SemanticFont.NORMAL
},
{
set: [['00bc', '00be'], ['2150', '215f'], '2189'],
type: semantic_meaning_SemanticType.NUMBER,
role: semantic_meaning_SemanticRole.FLOAT
},
{
set: ['23E8', ['3248', '324f']],
type: semantic_meaning_SemanticType.NUMBER,
role: semantic_meaning_SemanticRole.INTEGER
},
{
set: [['214A', '214C'], '2705', '2713', '2714', '2717', '2718'],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: [
'20',
'a0',
'ad',
['2000', '200f'],
['2028', '202f'],
['205f', '2060'],
'206a',
'206b',
'206e',
'206f',
'feff',
['fff9', 'fffb']
],
type: semantic_meaning_SemanticType.TEXT,
role: semantic_meaning_SemanticRole.SPACE
},
{
set: [
'7c',
'a6',
'2223',
'23b8',
'23b9',
'23d0',
'2758',
['fe31', 'fe34'],
'ff5c',
'ffe4',
'ffe8'
],
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.NEUTRAL
},
{
set: ['2016', '2225', '2980', '2af4'],
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.METRIC
}
];
sets.forEach((_a) => {
var { set: s } = _a, m = __rest(_a, ["set"]);
return addMeaning(makeMultiInterval(s), m);
});
}
function addFences(map, ints, sep = 1) {
const used = {};
const codes = makeCodeInterval(ints);
for (const code of codes) {
if (used[code])
continue;
map.set(String.fromCodePoint(code), String.fromCodePoint(code + sep));
used[code] = true;
used[code + sep] = true;
}
}
function initFences() {
addFences(SemanticMap.FencesVert, [
'23b4',
['23dc', '23e1'],
['fe35', 'fe44'],
'fe47'
]);
addFences(SemanticMap.FencesHoriz, [
'28',
'2045',
'207D',
'208D',
['2308', '230f'],
['231c', '231f'],
'2329',
'23b0',
['2768', '2775'],
'27c5',
['27e6', '27ef'],
['2983', '2998'],
['29d8', '29db'],
'29fc',
['2e22', '2e29'],
['3008', '3011'],
['3014', '301b'],
'fd3e',
'fe17',
['fe59', 'fe5e'],
'ff08',
'ff5f',
'ff62'
]);
addFences(SemanticMap.FencesHoriz, ['5b', '7b', 'ff3b', 'ff5b'], 2);
addFences(SemanticMap.FencesHoriz, [['239b', '23a6']], 3);
addFences(SemanticMap.FencesHoriz, [['23a7', '23a9']], 4);
addMeaning([...SemanticMap.FencesHoriz.keys()], {
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.OPEN
});
addMeaning([...SemanticMap.FencesHoriz.values()], {
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.CLOSE
});
addMeaning([...SemanticMap.FencesVert.keys()], {
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.TOP
});
addMeaning([...SemanticMap.FencesVert.values()], {
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.BOTTOM
});
}
const trigonometricFunctions = [
'cos',
'cot',
'csc',
'sec',
'sin',
'tan',
'arccos',
'arccot',
'arccsc',
'arcsec',
'arcsin',
'arctan'
];
const hyperbolicFunctions = [
'cosh',
'coth',
'csch',
'sech',
'sinh',
'tanh',
'arcosh',
'arcoth',
'arcsch',
'arsech',
'arsinh',
'artanh'
];
const algebraicFunctions = ['deg', 'det', 'dim', 'hom', 'ker', 'Tr'];
const elementaryFunctions = [
'log',
'ln',
'lg',
'exp',
'gcd',
'lcm',
'arg',
'im',
're',
'Pr'
];
const prefixFunctions = trigonometricFunctions.concat(hyperbolicFunctions, algebraicFunctions, elementaryFunctions);
function initFunctions() {
addMeaning([
'inf',
'lim',
'liminf',
'limsup',
'max',
'min',
'sup',
'injlim',
'projlim'
], {
type: semantic_meaning_SemanticType.FUNCTION,
role: semantic_meaning_SemanticRole.LIMFUNC
});
addMeaning(prefixFunctions, {
type: semantic_meaning_SemanticType.FUNCTION,
role: semantic_meaning_SemanticRole.PREFIXFUNC
});
addMeaning(['mod', 'rem'], {
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXFUNC
});
}
function addFunctionSemantic(base, names) {
const meaning = SemanticMap.Meaning.get(base) || {
type: SemanticType.FUNCTION,
role: SemanticRole.PREFIXFUNC
};
addMeaning(names, meaning);
}
function equal(meaning1, meaning2) {
return (meaning1.type === meaning2.type &&
meaning1.role === meaning2.role &&
meaning1.font === meaning2.font);
}
function isMatchingFence(open, close) {
const meaning = SemanticMap.Meaning.get(open);
if (meaning.type !== SemanticType.FENCE) {
return false;
}
if (meaning.role === SemanticRole.NEUTRAL ||
meaning.role === SemanticRole.METRIC) {
return open === close;
}
return (SemanticMap.FencesHoriz.get(open) === close ||
SemanticMap.FencesVert.get(open) === close);
}
function changeSemantics(alphabet, change) {
for (const [pos, meaning] of Object.entries(change)) {
const character = alphabet[pos];
if (character !== undefined) {
SemanticMap.Meaning.set(character, meaning);
}
}
}
function addSecondaries(alphabet, change) {
for (const [pos, meaning] of Object.entries(change)) {
const character = alphabet[pos];
if (character !== undefined) {
SemanticMap.Secondary.set(character, meaning);
}
}
}
function singleAlphabet(alphabet, type, role, font, semfont, secondaries = [], change = {}, secondary = {}) {
const interval = INTERVALS.get(alphabetName(alphabet, font));
if (interval) {
interval.unicode.forEach((x) => {
SemanticMap.Meaning.set(x, {
type: type,
role: role,
font: semfont
});
secondaries.forEach((sec) => SemanticMap.Secondary.set(x, sec));
});
changeSemantics(interval.unicode, change);
addSecondaries(interval.unicode, secondary);
}
}
function initAlphabets() {
for (const [name, font] of Object.entries(SemanticFont)) {
const emb = !!Embellish[name];
const semfont = emb
? SemanticFont.UNKNOWN
: font === SemanticFont.FULLWIDTH
? SemanticFont.NORMAL
: font;
singleAlphabet(Base.LATINCAP, semantic_meaning_SemanticType.IDENTIFIER, semantic_meaning_SemanticRole.LATINLETTER, font, semfont, [SemanticSecondary.ALLLETTERS]);
singleAlphabet(Base.LATINSMALL, semantic_meaning_SemanticType.IDENTIFIER, semantic_meaning_SemanticRole.LATINLETTER, font, semfont, [SemanticSecondary.ALLLETTERS], {}, { 3: SemanticSecondary.D });
singleAlphabet(Base.GREEKCAP, semantic_meaning_SemanticType.IDENTIFIER, semantic_meaning_SemanticRole.GREEKLETTER, font, semfont, [SemanticSecondary.ALLLETTERS]);
singleAlphabet(Base.GREEKSMALL, semantic_meaning_SemanticType.IDENTIFIER, semantic_meaning_SemanticRole.GREEKLETTER, font, semfont, [SemanticSecondary.ALLLETTERS], {
0: {
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXOP,
font: semfont
},
26: {
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXOP,
font: semfont
}
});
singleAlphabet(Base.DIGIT, semantic_meaning_SemanticType.NUMBER, semantic_meaning_SemanticRole.INTEGER, font, semfont);
}
}
initMeaning();
initFences();
initAlphabets();
initFunctions();
//# sourceMappingURL=semantic_attr.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_ordering.js
const comparators = [];
function add(comparator) {
comparators.push(comparator);
}
function apply(meaning1, meaning2) {
for (let i = 0, comparator; (comparator = comparators[i]); i++) {
const result = comparator.compare(meaning1, meaning2);
if (result !== 0) {
return result;
}
}
return 0;
}
function sort(meanings) {
meanings.sort(apply);
}
function reduce(meanings) {
if (meanings.length <= 1) {
return meanings;
}
const copy = meanings.slice();
sort(copy);
const result = [];
let last;
do {
last = copy.pop();
result.push(last);
} while (last && copy.length && apply(copy[copy.length - 1], last) === 0);
return result;
}
class SemanticComparator {
constructor(comparator, type = null) {
this.comparator = comparator;
this.type = type;
add(this);
}
compare(meaning1, meaning2) {
return this.type &&
this.type === meaning1.type &&
this.type === meaning2.type
? this.comparator(meaning1, meaning2)
: 0;
}
}
function simpleFunction(meaning1, meaning2) {
if (meaning1.role === semantic_meaning_SemanticRole.SIMPLEFUNC) {
return 1;
}
if (meaning2.role === semantic_meaning_SemanticRole.SIMPLEFUNC) {
return -1;
}
return 0;
}
new SemanticComparator(simpleFunction, semantic_meaning_SemanticType.IDENTIFIER);
//# sourceMappingURL=semantic_ordering.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_default.js
function key(symbol, font) {
return symbol.match(/^.+:.+$/) || !font ? symbol : symbol + ':' + font;
}
class SemanticDefault extends Map {
set(symbol, meaning) {
super.set(key(symbol, meaning.font), meaning);
return this;
}
setNode(node) {
this.set(node.textContent, node.meaning());
}
get(symbol, font = null) {
return super.get(key(symbol, font));
}
getNode(node) {
return this.get(node.textContent, node.font);
}
}
class SemanticCollator extends Map {
add(symbol, entry) {
const list = this.get(symbol);
if (list) {
list.push(entry);
}
else {
super.set(symbol, [entry]);
}
}
get(symbol, font = null) {
return super.get(key(symbol, font));
}
getNode(node) {
return this.get(node.textContent, node.font);
}
minimize() {
for (const [key, entry] of this) {
if (entry.length === 1) {
this.delete(key);
}
}
}
isMultiValued() {
for (const value of this.values()) {
if (value.length > 1) {
return true;
}
}
return false;
}
}
class SemanticNodeCollator extends SemanticCollator {
add(symbol, entry) {
super.add(key(symbol, entry.font), entry);
}
addNode(node) {
this.add(node.textContent, node);
}
toString() {
const outer = [];
for (const [key, nodes] of this) {
const length = Array(key.length + 3).join(' ');
const inner = nodes.map((node) => node.toString()).join('\n' + length);
outer.push(key + ': ' + inner);
}
return outer.join('\n');
}
collateMeaning() {
const collator = new SemanticMeaningCollator();
for (const [key, val] of this) {
collator.set(key, val.map((node) => node.meaning()));
}
return collator;
}
}
class SemanticMeaningCollator extends SemanticCollator {
add(symbol, entry) {
const list = this.get(symbol, entry.font);
if (!list ||
!list.find(function (x) {
return equal(x, entry);
})) {
super.add(key(symbol, entry.font), entry);
}
}
addNode(node) {
this.add(node.textContent, node.meaning());
}
toString() {
const outer = [];
for (const [key, nodes] of this) {
const length = Array(key.length + 3).join(' ');
const inner = nodes
.map((node) => `{type: ${node.type}, role: ${node.role}, font: ${node.font}}`)
.join('\n' + length);
outer.push(key + ': ' + inner);
}
return outer.join('\n');
}
reduce() {
for (const [key, val] of this) {
if (val.length !== 1) {
this.set(key, reduce(val));
}
}
}
default() {
const def = new SemanticDefault();
for (const [key, val] of this) {
if (val.length === 1) {
def.set(key, val[0]);
}
}
return def;
}
newDefault() {
const oldDefault = this.default();
this.reduce();
const newDefault = this.default();
return oldDefault.size !== newDefault.size ? newDefault : null;
}
}
//# sourceMappingURL=semantic_default.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_util.js
var MMLTAGS;
(function (MMLTAGS) {
MMLTAGS["ANNOTATION"] = "ANNOTATION";
MMLTAGS["ANNOTATIONXML"] = "ANNOTATION-XML";
MMLTAGS["MACTION"] = "MACTION";
MMLTAGS["MALIGNGROUP"] = "MALIGNGROUP";
MMLTAGS["MALIGNMARK"] = "MALIGNMARK";
MMLTAGS["MATH"] = "MATH";
MMLTAGS["MENCLOSE"] = "MENCLOSE";
MMLTAGS["MERROR"] = "MERROR";
MMLTAGS["MFENCED"] = "MFENCED";
MMLTAGS["MFRAC"] = "MFRAC";
MMLTAGS["MGLYPH"] = "MGLYPH";
MMLTAGS["MI"] = "MI";
MMLTAGS["MLABELEDTR"] = "MLABELEDTR";
MMLTAGS["MMULTISCRIPTS"] = "MMULTISCRIPTS";
MMLTAGS["MN"] = "MN";
MMLTAGS["MO"] = "MO";
MMLTAGS["MOVER"] = "MOVER";
MMLTAGS["MPADDED"] = "MPADDED";
MMLTAGS["MPHANTOM"] = "MPHANTOM";
MMLTAGS["MPRESCRIPTS"] = "MPRESCRIPTS";
MMLTAGS["MROOT"] = "MROOT";
MMLTAGS["MROW"] = "MROW";
MMLTAGS["MS"] = "MS";
MMLTAGS["MSPACE"] = "MSPACE";
MMLTAGS["MSQRT"] = "MSQRT";
MMLTAGS["MSTYLE"] = "MSTYLE";
MMLTAGS["MSUB"] = "MSUB";
MMLTAGS["MSUBSUP"] = "MSUBSUP";
MMLTAGS["MSUP"] = "MSUP";
MMLTAGS["MTABLE"] = "MTABLE";
MMLTAGS["MTD"] = "MTD";
MMLTAGS["MTEXT"] = "MTEXT";
MMLTAGS["MTR"] = "MTR";
MMLTAGS["MUNDER"] = "MUNDER";
MMLTAGS["MUNDEROVER"] = "MUNDEROVER";
MMLTAGS["NONE"] = "NONE";
MMLTAGS["SEMANTICS"] = "SEMANTICS";
})(MMLTAGS || (MMLTAGS = {}));
const ALLTAGS = Object.values(MMLTAGS);
const LEAFTAGS = [
MMLTAGS.MO,
MMLTAGS.MI,
MMLTAGS.MN,
MMLTAGS.MTEXT,
MMLTAGS.MS,
MMLTAGS.MSPACE
];
const IGNORETAGS = [
MMLTAGS.MERROR,
MMLTAGS.MPHANTOM,
MMLTAGS.MALIGNGROUP,
MMLTAGS.MALIGNMARK,
MMLTAGS.MPRESCRIPTS,
MMLTAGS.ANNOTATION,
MMLTAGS.ANNOTATIONXML
];
const EMPTYTAGS = [
MMLTAGS.MATH,
MMLTAGS.MROW,
MMLTAGS.MPADDED,
MMLTAGS.MACTION,
MMLTAGS.NONE,
MMLTAGS.MSTYLE,
MMLTAGS.SEMANTICS
];
const DISPLAYTAGS = [MMLTAGS.MROOT, MMLTAGS.MSQRT];
const directSpeechKeys = ['aria-label', 'exact-speech', 'alt'];
function hasMathTag(node) {
return !!node && dom_util_tagName(node) === MMLTAGS.MATH;
}
function hasLeafTag(node) {
return !!node && LEAFTAGS.includes(dom_util_tagName(node));
}
function hasIgnoreTag(node) {
return (!!node &&
(IGNORETAGS.includes(dom_util_tagName(node)) ||
!ALLTAGS.includes(dom_util_tagName(node))));
}
function hasEmptyTag(node) {
return !!node && EMPTYTAGS.includes(dom_util_tagName(node));
}
function hasDisplayTag(node) {
return !!node && DISPLAYTAGS.includes(dom_util_tagName(node));
}
function isOrphanedGlyph(node) {
return (!!node &&
dom_util_tagName(node) === MMLTAGS.MGLYPH &&
!hasLeafTag(node.parentNode));
}
function purgeNodes(nodes) {
const nodeArray = [];
for (let i = 0, node; (node = nodes[i]); i++) {
if (node.nodeType !== NodeType.ELEMENT_NODE) {
continue;
}
const tagName = dom_util_tagName(node);
if (IGNORETAGS.includes(tagName)) {
continue;
}
if (EMPTYTAGS.includes(tagName) && node.childNodes.length === 0) {
continue;
}
nodeArray.push(node);
}
return nodeArray;
}
function isZeroLength(length) {
if (!length) {
return false;
}
const negativeNamedSpaces = [
'negativeveryverythinmathspace',
'negativeverythinmathspace',
'negativethinmathspace',
'negativemediummathspace',
'negativethickmathspace',
'negativeverythickmathspace',
'negativeveryverythickmathspace'
];
if (negativeNamedSpaces.includes(length)) {
return true;
}
const value = length.match(/[0-9.]+/);
if (!value) {
return false;
}
return parseFloat(value[0]) === 0;
}
function addAttributes(to, from) {
var _a;
if ((_a = from.attributes) === null || _a === void 0 ? void 0 : _a.length) {
const attrs = from.attributes;
for (let i = attrs.length - 1; i >= 0; i--) {
const key = attrs[i].name;
if (key.match(/^ext/)) {
to.attributes[key] = attrs[i].value;
to.nobreaking = true;
}
if (directSpeechKeys.includes(key)) {
to.attributes['ext-speech'] = attrs[i].value;
to.nobreaking = true;
}
if (key.match(/texclass$/)) {
to.attributes['texclass'] = attrs[i].value;
}
if (key.toLowerCase() === 'data-latex') {
to.attributes['latex'] = attrs[i].value;
}
if (key === 'href') {
to.attributes['href'] = attrs[i].value;
to.nobreaking = true;
}
}
}
}
function getEmbellishedInner(node) {
if (node && node.embellished && node.childNodes.length > 0) {
return getEmbellishedInner(node.childNodes[0]);
}
return node;
}
function sliceNodes(nodes, pred, opt_reverse) {
if (opt_reverse) {
nodes.reverse();
}
const head = [];
for (let i = 0, node; (node = nodes[i]); i++) {
if (pred(node)) {
if (opt_reverse) {
return {
head: nodes.slice(i + 1).reverse(),
div: node,
tail: head.reverse()
};
}
return { head: head, div: node, tail: nodes.slice(i + 1) };
}
head.push(node);
}
if (opt_reverse) {
return { head: [], div: null, tail: head.reverse() };
}
return { head: head, div: null, tail: [] };
}
function partitionNodes(nodes, pred) {
let restNodes = nodes;
const rel = [];
const comp = [];
let result = null;
do {
result = sliceNodes(restNodes, pred);
comp.push(result.head);
rel.push(result.div);
restNodes = result.tail;
} while (result.div);
rel.pop();
return { rel: rel, comp: comp };
}
//# sourceMappingURL=semantic_util.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_node.js
var Attribute;
(function (Attribute) {
Attribute["EMBELLISHED"] = "embellished";
Attribute["FENCEPOINTER"] = "fencepointer";
Attribute["FONT"] = "font";
Attribute["ID"] = "id";
Attribute["ANNOTATION"] = "annotation";
Attribute["ROLE"] = "role";
Attribute["TYPE"] = "type";
Attribute["CHILDREN"] = "children";
Attribute["CONTENT"] = "content";
Attribute["TEXT"] = "$t";
})(Attribute || (Attribute = {}));
class SemanticNode {
static fromXml(xml) {
const id = parseInt(xml.getAttribute('id'), 10);
const node = new SemanticNode(id);
node.type = xml.tagName;
SemanticNode.setAttribute(node, xml, 'role');
SemanticNode.setAttribute(node, xml, 'font');
SemanticNode.setAttribute(node, xml, 'embellished');
SemanticNode.setAttribute(node, xml, 'fencepointer', 'fencePointer');
if (xml.getAttribute('annotation')) {
node.parseAnnotation(xml.getAttribute('annotation'));
}
addAttributes(node, xml);
SemanticNode.processChildren(node, xml);
return node;
}
static setAttribute(node, xml, attribute, opt_name) {
opt_name = opt_name || attribute;
const value = xml.getAttribute(attribute);
if (value) {
node[opt_name] = value;
}
}
static processChildren(node, xml) {
for (const child of toArray(xml.childNodes)) {
if (child.nodeType === NodeType.TEXT_NODE) {
node.textContent = child.textContent;
continue;
}
const children = toArray(child.childNodes).map(SemanticNode.fromXml);
children.forEach((x) => (x.parent = node));
if (dom_util_tagName(child) === 'CONTENT') {
node.contentNodes = children;
}
else {
node.childNodes = children;
}
}
}
constructor(id) {
this.id = id;
this.mathml = [];
this.parent = null;
this.type = semantic_meaning_SemanticType.UNKNOWN;
this.role = semantic_meaning_SemanticRole.UNKNOWN;
this.font = SemanticFont.UNKNOWN;
this.embellished = null;
this.fencePointer = '';
this.childNodes = [];
this.textContent = '';
this.mathmlTree = null;
this.contentNodes = [];
this.annotation = {};
this.attributes = {};
this.nobreaking = false;
}
querySelectorAll(pred) {
let result = [];
for (let i = 0, child; (child = this.childNodes[i]); i++) {
result = result.concat(child.querySelectorAll(pred));
}
for (let i = 0, content; (content = this.contentNodes[i]); i++) {
result = result.concat(content.querySelectorAll(pred));
}
if (pred(this)) {
result.unshift(this);
}
return result;
}
xml(xml, brief) {
const xmlNodeList = function (tag, nodes) {
const xmlNodes = nodes.map(function (x) {
return x.xml(xml, brief);
});
const tagNode = xml.createElementNS('', tag);
for (let i = 0, child; (child = xmlNodes[i]); i++) {
tagNode.appendChild(child);
}
return tagNode;
};
const node = xml.createElementNS('', this.type);
if (!brief) {
this.xmlAttributes(node);
}
node.textContent = this.textContent;
if (this.contentNodes.length > 0) {
node.appendChild(xmlNodeList(Attribute.CONTENT, this.contentNodes));
}
if (this.childNodes.length > 0) {
node.appendChild(xmlNodeList(Attribute.CHILDREN, this.childNodes));
}
return node;
}
toString(brief = false) {
const xml = parseInput(' ');
return serializeXml(this.xml(xml.ownerDocument, brief));
}
allAttributes() {
const attributes = [];
attributes.push([Attribute.ROLE, this.role]);
if (this.font !== SemanticFont.UNKNOWN) {
attributes.push([Attribute.FONT, this.font]);
}
if (Object.keys(this.annotation).length) {
attributes.push([Attribute.ANNOTATION, this.annotationXml()]);
}
if (this.embellished) {
attributes.push([Attribute.EMBELLISHED, this.embellished]);
}
if (this.fencePointer) {
attributes.push([Attribute.FENCEPOINTER, this.fencePointer]);
}
attributes.push([Attribute.ID, this.id.toString()]);
return attributes;
}
annotationXml() {
const result = [];
for (const [key, val] of Object.entries(this.annotation)) {
val.forEach((mean) => result.push(key + ':' + mean));
}
return result.join(';');
}
attributesXml() {
const result = [];
for (const [key, value] of Object.entries(this.attributes)) {
result.push(key + ':' + SemanticNode.escapeValue(value));
}
return result.join(';');
}
toJson() {
const json = {};
json[Attribute.TYPE] = this.type;
const attributes = this.allAttributes();
for (let i = 0, attr; (attr = attributes[i]); i++) {
json[attr[0]] = attr[1].toString();
}
if (this.textContent) {
json[Attribute.TEXT] = this.textContent;
}
if (this.childNodes.length) {
json[Attribute.CHILDREN] = this.childNodes.map(function (child) {
return child.toJson();
});
}
if (this.contentNodes.length) {
json[Attribute.CONTENT] = this.contentNodes.map(function (child) {
return child.toJson();
});
}
return json;
}
updateContent(content, text) {
const newContent = text
? content
.replace(/^[ \f\n\r\t\v\u200b]*/, '')
.replace(/[ \f\n\r\t\v\u200b]*$/, '')
: content.trim();
content = content && !newContent ? content : newContent;
if (this.textContent === content) {
return;
}
const meaning = SemanticMap.Meaning.get(content.replace(/\s/g, ' '));
this.textContent = content;
this.role = meaning.role;
this.type = meaning.type;
this.font = meaning.font;
}
addMathmlNodes(mmlNodes) {
for (let i = 0, mml; (mml = mmlNodes[i]); i++) {
if (this.mathml.indexOf(mml) === -1) {
this.mathml.push(mml);
}
}
}
appendChild(child) {
this.childNodes.push(child);
this.addMathmlNodes(child.mathml);
child.parent = this;
}
replaceChild(oldNode, newNode) {
const index = this.childNodes.indexOf(oldNode);
if (index === -1) {
return;
}
oldNode.parent = null;
newNode.parent = this;
this.childNodes[index] = newNode;
const removeMathml = oldNode.mathml.filter(function (x) {
return newNode.mathml.indexOf(x) === -1;
});
const addMathml = newNode.mathml.filter(function (x) {
return oldNode.mathml.indexOf(x) === -1;
});
this.removeMathmlNodes(removeMathml);
this.addMathmlNodes(addMathml);
}
appendContentNode(node) {
if (node) {
this.contentNodes.push(node);
this.addMathmlNodes(node.mathml);
node.parent = this;
}
}
removeContentNode(node) {
if (node) {
const index = this.contentNodes.indexOf(node);
if (index !== -1) {
this.contentNodes.slice(index, 1);
}
}
}
equals(node) {
if (!node) {
return false;
}
if (this.type !== node.type ||
this.role !== node.role ||
this.textContent !== node.textContent ||
this.childNodes.length !== node.childNodes.length ||
this.contentNodes.length !== node.contentNodes.length) {
return false;
}
for (let i = 0, node1, node2; (node1 = this.childNodes[i]), (node2 = node.childNodes[i]); i++) {
if (!node1.equals(node2)) {
return false;
}
}
for (let i = 0, node1, node2; (node1 = this.contentNodes[i]), (node2 = node.contentNodes[i]); i++) {
if (!node1.equals(node2)) {
return false;
}
}
return true;
}
displayTree() {
console.info(this.displayTree_(0));
}
addAnnotation(domain, annotation) {
if (annotation) {
this.addAnnotation_(domain, annotation);
}
}
getAnnotation(domain) {
const content = this.annotation[domain];
return content ? content : [];
}
hasAnnotation(domain, annotation) {
const content = this.annotation[domain];
if (!content) {
return false;
}
return content.indexOf(annotation) !== -1;
}
parseAnnotation(stateStr) {
const annotations = stateStr.split(';');
for (let i = 0, l = annotations.length; i < l; i++) {
const annotation = annotations[i].split(':');
this.addAnnotation(annotation[0], annotation[1]);
}
}
meaning() {
return { type: this.type, role: this.role, font: this.font };
}
xmlAttributes(node) {
const attributes = this.allAttributes();
for (let i = 0, attr; (attr = attributes[i]); i++) {
node.setAttribute(attr[0], attr[1]);
}
this.addExternalAttributes(node);
}
addExternalAttributes(node) {
for (const [attr, val] of Object.entries(this.attributes)) {
node.setAttribute(attr, val);
}
}
static escapeValue(value) {
return value.replace(/;/g, '\\0003B');
}
parseAttributes(stateStr) {
if (!stateStr)
return;
const attributes = stateStr.split(';');
for (let i = 0, l = attributes.length; i < l; i++) {
const [key, ...values] = attributes[i].split(':');
if (key) {
this.attributes[key] = values.join('').replace(/\\0003B/g, ';');
}
}
}
removeMathmlNodes(mmlNodes) {
const mmlList = this.mathml;
for (let i = 0, mml; (mml = mmlNodes[i]); i++) {
const index = mmlList.indexOf(mml);
if (index !== -1) {
mmlList.splice(index, 1);
}
}
this.mathml = mmlList;
}
displayTree_(depth) {
depth++;
const depthString = Array(depth).join(' ');
let result = '';
result += '\n' + depthString + this.toString();
result += '\n' + depthString + 'MathmlTree:';
result += '\n' + depthString + this.mathmlTreeString();
result += '\n' + depthString + 'MathML:';
for (let i = 0, mml; (mml = this.mathml[i]); i++) {
result += '\n' + depthString + mml.toString();
}
result += '\n' + depthString + 'Begin Content';
this.contentNodes.forEach(function (x) {
result += x.displayTree_(depth);
});
result += '\n' + depthString + 'End Content';
result += '\n' + depthString + 'Begin Children';
this.childNodes.forEach(function (x) {
result += x.displayTree_(depth);
});
result += '\n' + depthString + 'End Children';
return result;
}
mathmlTreeString() {
return this.mathmlTree ? this.mathmlTree.toString() : 'EMPTY';
}
addAnnotation_(domain, annotation) {
const content = this.annotation[domain];
if (content && !content.includes(annotation)) {
content.push(annotation);
}
else {
this.annotation[domain] = [annotation];
}
}
}
//# sourceMappingURL=semantic_node.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_node_factory.js
class SemanticNodeFactory {
constructor() {
this.leafMap = new SemanticNodeCollator();
this.defaultMap = new SemanticDefault();
this.idCounter_ = -1;
}
makeNode(id) {
return this.createNode_(id);
}
makeUnprocessed(mml) {
const node = this.createNode_();
node.mathml = [mml];
node.mathmlTree = mml;
return node;
}
makeEmptyNode() {
const node = this.createNode_();
node.type = semantic_meaning_SemanticType.EMPTY;
return node;
}
makeContentNode(content) {
const node = this.createNode_();
node.updateContent(content);
return node;
}
makeMultipleContentNodes(num, content) {
const nodes = [];
for (let i = 0; i < num; i++) {
nodes.push(this.makeContentNode(content));
}
return nodes;
}
makeLeafNode(content, font) {
if (!content) {
return this.makeEmptyNode();
}
const node = this.makeContentNode(content);
node.font = font || node.font;
const meaning = this.defaultMap.getNode(node);
if (meaning) {
node.type = meaning.type;
node.role = meaning.role;
node.font = meaning.font;
}
this.leafMap.addNode(node);
return node;
}
makeBranchNode(type, children, contentNodes, opt_content) {
const node = this.createNode_();
if (opt_content) {
node.updateContent(opt_content);
}
node.type = type;
node.childNodes = children;
node.contentNodes = contentNodes;
children.concat(contentNodes).forEach(function (x) {
x.parent = node;
node.addMathmlNodes(x.mathml);
});
return node;
}
createNode_(id) {
if (typeof id !== 'undefined') {
this.idCounter_ = Math.max(this.idCounter_, id);
}
else {
id = ++this.idCounter_;
}
return new SemanticNode(id);
}
}
//# sourceMappingURL=semantic_node_factory.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_parser.js
class SemanticAbstractParser {
constructor(type) {
this.type = type;
this.factory_ = new SemanticNodeFactory();
}
getFactory() {
return this.factory_;
}
setFactory(factory) {
this.factory_ = factory;
}
getType() {
return this.type;
}
parseList(list) {
const result = [];
for (let i = 0, element; (element = list[i]); i++) {
result.push(this.parse(element));
}
return result;
}
}
//# sourceMappingURL=semantic_parser.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_pred.js
function isType(node, attr) {
return node.type === attr;
}
function embellishedType(node, attr) {
return node.embellished === attr;
}
function isRole(node, attr) {
return node.role === attr;
}
function isAccent(node) {
return (isType(node, semantic_meaning_SemanticType.FENCE) ||
isType(node, semantic_meaning_SemanticType.PUNCTUATION) ||
isType(node, semantic_meaning_SemanticType.OPERATOR) ||
isType(node, semantic_meaning_SemanticType.RELATION));
}
function isSimpleFunctionScope(node) {
const children = node.childNodes;
if (children.length === 0) {
return true;
}
if (children.length > 1) {
return false;
}
const child = children[0];
if (child.type === semantic_meaning_SemanticType.INFIXOP) {
if (child.role !== semantic_meaning_SemanticRole.IMPLICIT) {
return false;
}
if (child.childNodes.some((x) => isType(x, semantic_meaning_SemanticType.INFIXOP))) {
return false;
}
}
return true;
}
function isPrefixFunctionBoundary(node) {
return ((isOperator(node) && !isRole(node, semantic_meaning_SemanticRole.DIVISION)) ||
isType(node, semantic_meaning_SemanticType.APPL) ||
isGeneralFunctionBoundary(node));
}
function isBigOpBoundary(node) {
return isOperator(node) || isGeneralFunctionBoundary(node);
}
function isIntegralDxBoundary(firstNode, secondNode) {
return (!!secondNode &&
isType(secondNode, semantic_meaning_SemanticType.IDENTIFIER) &&
SemanticMap.Secondary.has(firstNode.textContent, SemanticSecondary.D));
}
function isIntegralDxBoundarySingle(node) {
if (isType(node, semantic_meaning_SemanticType.IDENTIFIER)) {
const firstChar = node.textContent[0];
return (firstChar &&
node.textContent[1] &&
SemanticMap.Secondary.has(firstChar, SemanticSecondary.D));
}
return false;
}
function isGeneralFunctionBoundary(node) {
return isRelation(node) || isPunctuation(node);
}
function isEmbellished(node) {
if (node.embellished) {
return node.embellished;
}
if (isEmbellishedType(node.type)) {
return node.type;
}
return null;
}
function isEmbellishedType(type) {
return (type === semantic_meaning_SemanticType.OPERATOR ||
type === semantic_meaning_SemanticType.RELATION ||
type === semantic_meaning_SemanticType.FENCE ||
type === semantic_meaning_SemanticType.PUNCTUATION);
}
function isOperator(node) {
return (isType(node, semantic_meaning_SemanticType.OPERATOR) ||
embellishedType(node, semantic_meaning_SemanticType.OPERATOR));
}
function isRelation(node) {
return (isType(node, semantic_meaning_SemanticType.RELATION) ||
embellishedType(node, semantic_meaning_SemanticType.RELATION));
}
function isPunctuation(node) {
return (isType(node, semantic_meaning_SemanticType.PUNCTUATION) ||
embellishedType(node, semantic_meaning_SemanticType.PUNCTUATION));
}
function isFence(node) {
return (isType(node, semantic_meaning_SemanticType.FENCE) ||
embellishedType(node, semantic_meaning_SemanticType.FENCE));
}
function isElligibleEmbellishedFence(node) {
if (!node || !isFence(node)) {
return false;
}
if (!node.embellished) {
return true;
}
return recurseBaseNode(node);
}
function bothSide(node) {
return (isType(node, semantic_meaning_SemanticType.TENSOR) &&
(!isType(node.childNodes[1], semantic_meaning_SemanticType.EMPTY) ||
!isType(node.childNodes[2], semantic_meaning_SemanticType.EMPTY)) &&
(!isType(node.childNodes[3], semantic_meaning_SemanticType.EMPTY) ||
!isType(node.childNodes[4], semantic_meaning_SemanticType.EMPTY)));
}
function recurseBaseNode(node) {
if (!node.embellished) {
return true;
}
if (bothSide(node)) {
return false;
}
if (isRole(node, semantic_meaning_SemanticRole.CLOSE) && isType(node, semantic_meaning_SemanticType.TENSOR)) {
return false;
}
if (isRole(node, semantic_meaning_SemanticRole.OPEN) &&
(isType(node, semantic_meaning_SemanticType.SUBSCRIPT) ||
isType(node, semantic_meaning_SemanticType.SUPERSCRIPT))) {
return false;
}
return recurseBaseNode(node.childNodes[0]);
}
function isTableOrMultiline(node) {
return (!!node &&
(isType(node, semantic_meaning_SemanticType.TABLE) || isType(node, semantic_meaning_SemanticType.MULTILINE)));
}
function tableIsMatrixOrVector(node) {
return (!!node && isFencedElement(node) && isTableOrMultiline(node.childNodes[0]));
}
function isFencedElement(node) {
return (!!node &&
isType(node, semantic_meaning_SemanticType.FENCED) &&
(isRole(node, semantic_meaning_SemanticRole.LEFTRIGHT) || isNeutralFence(node)) &&
node.childNodes.length === 1);
}
function tableIsCases(_table, prevNodes) {
return (prevNodes.length > 0 &&
isRole(prevNodes[prevNodes.length - 1], semantic_meaning_SemanticRole.OPENFENCE));
}
function tableIsMultiline(table) {
return table.childNodes.every(function (row) {
const length = row.childNodes.length;
return length <= 1;
});
}
function lineIsLabelled(line) {
return (isType(line, semantic_meaning_SemanticType.LINE) &&
line.contentNodes.length &&
isRole(line.contentNodes[0], semantic_meaning_SemanticRole.LABEL));
}
function isBinomial(table) {
return table.childNodes.length === 2;
}
function isLimitBase(node) {
return (isType(node, semantic_meaning_SemanticType.LARGEOP) ||
isType(node, semantic_meaning_SemanticType.LIMBOTH) ||
isType(node, semantic_meaning_SemanticType.LIMLOWER) ||
isType(node, semantic_meaning_SemanticType.LIMUPPER) ||
(isType(node, semantic_meaning_SemanticType.FUNCTION) &&
isRole(node, semantic_meaning_SemanticRole.LIMFUNC)) ||
((isType(node, semantic_meaning_SemanticType.OVERSCORE) ||
isType(node, semantic_meaning_SemanticType.UNDERSCORE)) &&
isLimitBase(node.childNodes[0])));
}
function isSimpleFunctionHead(node) {
return (node.type === semantic_meaning_SemanticType.IDENTIFIER ||
node.role === semantic_meaning_SemanticRole.LATINLETTER ||
node.role === semantic_meaning_SemanticRole.GREEKLETTER ||
node.role === semantic_meaning_SemanticRole.OTHERLETTER);
}
function singlePunctAtPosition(nodes, puncts, position) {
return (puncts.length === 1 &&
(nodes[position].type === semantic_meaning_SemanticType.PUNCTUATION ||
nodes[position].embellished === semantic_meaning_SemanticType.PUNCTUATION) &&
nodes[position] === puncts[0]);
}
function isSimpleFunction(node) {
return (isType(node, semantic_meaning_SemanticType.IDENTIFIER) &&
isRole(node, semantic_meaning_SemanticRole.SIMPLEFUNC));
}
function isLeftBrace(node) {
const leftBrace = ['{', '﹛', '{'];
return !!node && leftBrace.indexOf(node.textContent) !== -1;
}
function isRightBrace(node) {
const rightBrace = ['}', '﹜', '}'];
return !!node && rightBrace.indexOf(node.textContent) !== -1;
}
function isSetNode(node) {
return (isLeftBrace(node.contentNodes[0]) && isRightBrace(node.contentNodes[1]));
}
const illegalSingleton = [
semantic_meaning_SemanticType.PUNCTUATION,
semantic_meaning_SemanticType.PUNCTUATED,
semantic_meaning_SemanticType.RELSEQ,
semantic_meaning_SemanticType.MULTIREL,
semantic_meaning_SemanticType.TABLE,
semantic_meaning_SemanticType.MULTILINE,
semantic_meaning_SemanticType.CASES,
semantic_meaning_SemanticType.INFERENCE
];
const scriptedElement = [
semantic_meaning_SemanticType.LIMUPPER,
semantic_meaning_SemanticType.LIMLOWER,
semantic_meaning_SemanticType.LIMBOTH,
semantic_meaning_SemanticType.SUBSCRIPT,
semantic_meaning_SemanticType.SUPERSCRIPT,
semantic_meaning_SemanticType.UNDERSCORE,
semantic_meaning_SemanticType.OVERSCORE,
semantic_meaning_SemanticType.TENSOR
];
function isSingletonSetContent(node) {
const type = node.type;
if (illegalSingleton.indexOf(type) !== -1 ||
(type === semantic_meaning_SemanticType.INFIXOP && node.role !== semantic_meaning_SemanticRole.IMPLICIT)) {
return false;
}
if (type === semantic_meaning_SemanticType.FENCED) {
return node.role === semantic_meaning_SemanticRole.LEFTRIGHT
? isSingletonSetContent(node.childNodes[0])
: true;
}
if (scriptedElement.indexOf(type) !== -1) {
return isSingletonSetContent(node.childNodes[0]);
}
return true;
}
function isNumber(node) {
return (node.type === semantic_meaning_SemanticType.NUMBER &&
(node.role === semantic_meaning_SemanticRole.INTEGER || node.role === semantic_meaning_SemanticRole.FLOAT));
}
function isUnitCounter(node) {
return (isNumber(node) ||
node.role === semantic_meaning_SemanticRole.VULGAR ||
node.role === semantic_meaning_SemanticRole.MIXED);
}
function isPureUnit(node) {
const children = node.childNodes;
return (node.role === semantic_meaning_SemanticRole.UNIT &&
(!children.length || children[0].role === semantic_meaning_SemanticRole.UNIT));
}
function isUnitProduct(node) {
const children = node.childNodes;
return (node.type === semantic_meaning_SemanticType.INFIXOP &&
(node.role === semantic_meaning_SemanticRole.MULTIPLICATION ||
node.role === semantic_meaning_SemanticRole.IMPLICIT) &&
children.length &&
(isPureUnit(children[0]) || isUnitCounter(children[0])) &&
node.childNodes.slice(1).every(isPureUnit));
}
function isImplicit(node) {
return (node.type === semantic_meaning_SemanticType.INFIXOP &&
(node.role === semantic_meaning_SemanticRole.IMPLICIT ||
(node.role === semantic_meaning_SemanticRole.UNIT &&
!!node.contentNodes.length &&
node.contentNodes[0].textContent === NamedSymbol.invisibleTimes)));
}
function isImplicitOp(node) {
return (node.type === semantic_meaning_SemanticType.INFIXOP && node.role === semantic_meaning_SemanticRole.IMPLICIT);
}
function isNeutralFence(fence) {
return (fence.role === semantic_meaning_SemanticRole.NEUTRAL || fence.role === semantic_meaning_SemanticRole.METRIC);
}
function compareNeutralFences(fence1, fence2) {
return (isNeutralFence(fence1) &&
isNeutralFence(fence2) &&
getEmbellishedInner(fence1).textContent ===
getEmbellishedInner(fence2).textContent);
}
function elligibleLeftNeutral(fence) {
if (!isNeutralFence(fence)) {
return false;
}
if (!fence.embellished) {
return true;
}
if (fence.type === semantic_meaning_SemanticType.SUPERSCRIPT ||
fence.type === semantic_meaning_SemanticType.SUBSCRIPT) {
return false;
}
if (fence.type === semantic_meaning_SemanticType.TENSOR &&
(fence.childNodes[3].type !== semantic_meaning_SemanticType.EMPTY ||
fence.childNodes[4].type !== semantic_meaning_SemanticType.EMPTY)) {
return false;
}
return true;
}
function elligibleRightNeutral(fence) {
if (!isNeutralFence(fence)) {
return false;
}
if (!fence.embellished) {
return true;
}
if (fence.type === semantic_meaning_SemanticType.TENSOR &&
(fence.childNodes[1].type !== semantic_meaning_SemanticType.EMPTY ||
fence.childNodes[2].type !== semantic_meaning_SemanticType.EMPTY)) {
return false;
}
return true;
}
function isMembership(element) {
return [
semantic_meaning_SemanticRole.ELEMENT,
semantic_meaning_SemanticRole.NONELEMENT,
semantic_meaning_SemanticRole.REELEMENT,
semantic_meaning_SemanticRole.RENONELEMENT
].includes(element.role);
}
//# sourceMappingURL=semantic_pred.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_heuristic_factory.js
const SemanticHeuristics = {
factory: null,
options: new Options(),
updateFactory: function (nodeFactory) {
SemanticHeuristics.factory = nodeFactory;
},
heuristics: new Map(),
flags: {
combine_juxtaposition: true,
convert_juxtaposition: true,
multioperator: true
},
blacklist: {},
add: function (heuristic) {
const name = heuristic.name;
SemanticHeuristics.heuristics.set(name, heuristic);
if (!SemanticHeuristics.flags[name]) {
SemanticHeuristics.flags[name] = false;
}
},
run: function (name, root, opt_alternative) {
const heuristic = SemanticHeuristics.heuristics.get(name);
return heuristic &&
!SemanticHeuristics.blacklist[name] &&
(SemanticHeuristics.flags[name] || heuristic.applicable(root))
? heuristic.apply(root)
: opt_alternative
? opt_alternative(root)
: root;
}
};
//# sourceMappingURL=semantic_heuristic_factory.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_processor.js
class SemanticProcessor {
static getInstance() {
SemanticProcessor.instance =
SemanticProcessor.instance || new SemanticProcessor();
return SemanticProcessor.instance;
}
static tableToMultiline(table) {
if (!tableIsMultiline(table)) {
return SemanticHeuristics.run('rewrite_subcases', table, SemanticProcessor.classifyTable);
}
table.type = semantic_meaning_SemanticType.MULTILINE;
for (let i = 0, row; (row = table.childNodes[i]); i++) {
SemanticProcessor.rowToLine_(row, semantic_meaning_SemanticRole.MULTILINE);
}
if (table.childNodes.length === 1 &&
!lineIsLabelled(table.childNodes[0]) &&
isFencedElement(table.childNodes[0].childNodes[0])) {
SemanticProcessor.tableToMatrixOrVector_(SemanticProcessor.rewriteFencedLine_(table));
}
SemanticProcessor.binomialForm_(table);
SemanticProcessor.classifyMultiline(table);
return table;
}
static number(node) {
if (node.type === semantic_meaning_SemanticType.UNKNOWN ||
node.type === semantic_meaning_SemanticType.IDENTIFIER) {
node.type = semantic_meaning_SemanticType.NUMBER;
}
SemanticProcessor.meaningFromContent(node, SemanticProcessor.numberRole_);
SemanticProcessor.exprFont_(node);
}
static classifyMultiline(multiline) {
let index = 0;
const length = multiline.childNodes.length;
let line;
while (index < length &&
(!(line = multiline.childNodes[index]) || !line.childNodes.length)) {
index++;
}
if (index >= length) {
return;
}
const firstRole = line.childNodes[0].role;
if (firstRole !== semantic_meaning_SemanticRole.UNKNOWN &&
multiline.childNodes.every(function (x) {
const cell = x.childNodes[0];
return (!cell ||
(cell.role === firstRole &&
(isType(cell, semantic_meaning_SemanticType.RELATION) ||
isType(cell, semantic_meaning_SemanticType.RELSEQ))));
})) {
multiline.role = firstRole;
}
}
static classifyTable(table) {
const columns = SemanticProcessor.computeColumns_(table);
SemanticProcessor.classifyByColumns_(table, columns, semantic_meaning_SemanticRole.EQUALITY) ||
SemanticProcessor.classifyByColumns_(table, columns, semantic_meaning_SemanticRole.INEQUALITY, [semantic_meaning_SemanticRole.EQUALITY]) ||
SemanticProcessor.classifyByColumns_(table, columns, semantic_meaning_SemanticRole.ARROW) ||
SemanticProcessor.detectCaleyTable(table);
return table;
}
static detectCaleyTable(table) {
if (!table.mathmlTree) {
return false;
}
const tree = table.mathmlTree;
const cl = tree.getAttribute('columnlines');
const rl = tree.getAttribute('rowlines');
if (!cl || !rl) {
return false;
}
if (SemanticProcessor.cayleySpacing(cl) &&
SemanticProcessor.cayleySpacing(rl)) {
table.role = semantic_meaning_SemanticRole.CAYLEY;
return true;
}
return false;
}
static cayleySpacing(lines) {
const list = lines.split(' ');
return ((list[0] === 'solid' || list[0] === 'dashed') &&
list.slice(1).every((x) => x === 'none'));
}
static proof(node, semantics, parse) {
const attrs = SemanticProcessor.separateSemantics(semantics);
return SemanticProcessor.getInstance().proof(node, attrs, parse);
}
static findSemantics(node, attr, opt_value) {
const value = opt_value == null ? null : opt_value;
const semantics = SemanticProcessor.getSemantics(node);
if (!semantics) {
return false;
}
if (!semantics[attr]) {
return false;
}
return value == null ? true : semantics[attr] === value;
}
static getSemantics(node) {
const semantics = node.getAttribute('semantics');
if (!semantics) {
return null;
}
return SemanticProcessor.separateSemantics(semantics);
}
static removePrefix(name) {
const [, ...rest] = name.split('_');
return rest.join('_');
}
static separateSemantics(attr) {
const result = {};
attr.split(';').forEach(function (x) {
const [name, value] = x.split(':');
result[SemanticProcessor.removePrefix(name)] = value;
});
return result;
}
static matchSpaces_(nodes, ops) {
for (let i = 0, op; (op = ops[i]); i++) {
const node = nodes[i];
const mt1 = node.mathmlTree;
const mt2 = nodes[i + 1].mathmlTree;
if (!mt1 || !mt2) {
continue;
}
const sibling = mt1.nextSibling;
if (!sibling || sibling === mt2) {
continue;
}
const spacer = SemanticProcessor.getSpacer_(sibling);
if (spacer) {
op.mathml.push(spacer);
op.mathmlTree = spacer;
op.role = semantic_meaning_SemanticRole.SPACE;
}
}
}
static getSpacer_(node) {
if (dom_util_tagName(node) === MMLTAGS.MSPACE) {
return node;
}
while (hasEmptyTag(node) && node.childNodes.length === 1) {
node = node.childNodes[0];
if (dom_util_tagName(node) === MMLTAGS.MSPACE) {
return node;
}
}
return null;
}
static fenceToPunct_(fence) {
const newRole = SemanticProcessor.FENCE_TO_PUNCT_[fence.role];
if (!newRole) {
return;
}
while (fence.embellished) {
fence.embellished = semantic_meaning_SemanticType.PUNCTUATION;
if (!(isRole(fence, semantic_meaning_SemanticRole.SUBSUP) ||
isRole(fence, semantic_meaning_SemanticRole.UNDEROVER))) {
fence.role = newRole;
}
fence = fence.childNodes[0];
}
fence.type = semantic_meaning_SemanticType.PUNCTUATION;
fence.role = newRole;
}
static classifyFunction_(funcNode, restNodes) {
if (funcNode.type === semantic_meaning_SemanticType.APPL ||
funcNode.type === semantic_meaning_SemanticType.BIGOP ||
funcNode.type === semantic_meaning_SemanticType.INTEGRAL) {
return '';
}
if (restNodes[0] &&
restNodes[0].textContent === NamedSymbol.functionApplication) {
SemanticProcessor.getInstance().funcAppls[funcNode.id] =
restNodes.shift();
let role = semantic_meaning_SemanticRole.SIMPLEFUNC;
SemanticHeuristics.run('simple2prefix', funcNode);
if (funcNode.role === semantic_meaning_SemanticRole.PREFIXFUNC ||
funcNode.role === semantic_meaning_SemanticRole.LIMFUNC) {
role = funcNode.role;
}
SemanticProcessor.propagateFunctionRole_(funcNode, role);
return 'prefix';
}
const kind = SemanticProcessor.CLASSIFY_FUNCTION_[funcNode.role];
return kind
? kind
: isSimpleFunctionHead(funcNode)
? 'simple'
: '';
}
static propagateFunctionRole_(funcNode, tag) {
if (funcNode) {
if (funcNode.type === semantic_meaning_SemanticType.INFIXOP) {
return;
}
if (!(isRole(funcNode, semantic_meaning_SemanticRole.SUBSUP) ||
isRole(funcNode, semantic_meaning_SemanticRole.UNDEROVER))) {
funcNode.role = tag;
}
SemanticProcessor.propagateFunctionRole_(funcNode.childNodes[0], tag);
}
}
static getFunctionOp_(tree, pred) {
if (pred(tree)) {
return tree;
}
for (let i = 0, child; (child = tree.childNodes[i]); i++) {
const op = SemanticProcessor.getFunctionOp_(child, pred);
if (op) {
return op;
}
}
return null;
}
static tableToMatrixOrVector_(node) {
const matrix = node.childNodes[0];
isType(matrix, semantic_meaning_SemanticType.MULTILINE)
? SemanticProcessor.tableToVector_(node)
: SemanticProcessor.tableToMatrix_(node);
node.contentNodes.forEach(matrix.appendContentNode.bind(matrix));
for (let i = 0, row; (row = matrix.childNodes[i]); i++) {
SemanticProcessor.assignRoleToRow_(row, SemanticProcessor.getComponentRoles_(matrix));
}
matrix.parent = null;
return matrix;
}
static tableToVector_(node) {
const vector = node.childNodes[0];
vector.type = semantic_meaning_SemanticType.VECTOR;
if (vector.childNodes.length === 1) {
SemanticProcessor.tableToSquare_(node);
return;
}
SemanticProcessor.binomialForm_(vector);
}
static binomialForm_(node) {
if (!isRole(node, semantic_meaning_SemanticRole.UNKNOWN)) {
return;
}
if (isBinomial(node)) {
node.role = semantic_meaning_SemanticRole.BINOMIAL;
node.childNodes[0].role = semantic_meaning_SemanticRole.BINOMIAL;
node.childNodes[1].role = semantic_meaning_SemanticRole.BINOMIAL;
}
}
static tableToMatrix_(node) {
const matrix = node.childNodes[0];
matrix.type = semantic_meaning_SemanticType.MATRIX;
if (matrix.childNodes &&
matrix.childNodes.length > 0 &&
matrix.childNodes[0].childNodes &&
matrix.childNodes.length === matrix.childNodes[0].childNodes.length) {
SemanticProcessor.tableToSquare_(node);
return;
}
if (matrix.childNodes && matrix.childNodes.length === 1) {
matrix.role = semantic_meaning_SemanticRole.ROWVECTOR;
}
}
static tableToSquare_(node) {
const matrix = node.childNodes[0];
if (!isRole(matrix, semantic_meaning_SemanticRole.UNKNOWN)) {
return;
}
if (isNeutralFence(node)) {
matrix.role = semantic_meaning_SemanticRole.DETERMINANT;
return;
}
matrix.role = semantic_meaning_SemanticRole.SQUAREMATRIX;
}
static getComponentRoles_(node) {
const role = node.role;
if (role && role !== semantic_meaning_SemanticRole.UNKNOWN) {
return role;
}
return node.type.toLowerCase() || semantic_meaning_SemanticRole.UNKNOWN;
}
static tableToCases_(table, openFence) {
for (let i = 0, row; (row = table.childNodes[i]); i++) {
SemanticProcessor.assignRoleToRow_(row, semantic_meaning_SemanticRole.CASES);
}
table.type = semantic_meaning_SemanticType.CASES;
table.appendContentNode(openFence);
if (tableIsMultiline(table)) {
SemanticProcessor.binomialForm_(table);
}
return table;
}
static rewriteFencedLine_(table) {
const line = table.childNodes[0];
const fenced = table.childNodes[0].childNodes[0];
const element = table.childNodes[0].childNodes[0].childNodes[0];
fenced.parent = table.parent;
table.parent = fenced;
element.parent = line;
fenced.childNodes = [table];
line.childNodes = [element];
return fenced;
}
static rowToLine_(row, opt_role) {
const role = opt_role || semantic_meaning_SemanticRole.UNKNOWN;
if (isType(row, semantic_meaning_SemanticType.ROW)) {
row.type = semantic_meaning_SemanticType.LINE;
row.role = role;
if (row.childNodes.length === 1 &&
isType(row.childNodes[0], semantic_meaning_SemanticType.CELL)) {
row.childNodes = row.childNodes[0].childNodes;
row.childNodes.forEach(function (x) {
x.parent = row;
});
}
}
}
static assignRoleToRow_(row, role) {
if (isType(row, semantic_meaning_SemanticType.LINE)) {
row.role = role;
return;
}
if (isType(row, semantic_meaning_SemanticType.ROW)) {
row.role = role;
row.childNodes.forEach(function (cell) {
if (isType(cell, semantic_meaning_SemanticType.CELL)) {
cell.role = role;
}
});
}
}
static nextSeparatorFunction_(separators) {
let sepList;
if (separators) {
if (separators.match(/^\s+$/)) {
return null;
}
else {
sepList = separators
.replace(/\s/g, '')
.split('')
.filter(function (x) {
return x;
});
}
}
else {
sepList = [','];
}
return function () {
if (sepList.length > 1) {
return sepList.shift();
}
return sepList[0];
};
}
static meaningFromContent(node, func) {
const content = [...node.textContent].filter((x) => x.match(/[^\s]/));
const meaning = content.map((x) => SemanticMap.Meaning.get(x));
func(node, content, meaning);
}
static numberRole_(node, content, meaning) {
if (node.role !== semantic_meaning_SemanticRole.UNKNOWN) {
return;
}
if (meaning.every(function (x) {
return ((x.type === semantic_meaning_SemanticType.NUMBER && x.role === semantic_meaning_SemanticRole.INTEGER) ||
(x.type === semantic_meaning_SemanticType.PUNCTUATION && x.role === semantic_meaning_SemanticRole.COMMA));
})) {
node.role = semantic_meaning_SemanticRole.INTEGER;
if (content[0] === '0') {
node.addAnnotation('general', 'basenumber');
}
return;
}
if (meaning.every(function (x) {
return ((x.type === semantic_meaning_SemanticType.NUMBER && x.role === semantic_meaning_SemanticRole.INTEGER) ||
x.type === semantic_meaning_SemanticType.PUNCTUATION);
})) {
node.role = semantic_meaning_SemanticRole.FLOAT;
return;
}
node.role = semantic_meaning_SemanticRole.OTHERNUMBER;
}
static exprFont_(node) {
if (node.font !== SemanticFont.UNKNOWN) {
return;
}
SemanticProcessor.compSemantics(node, 'font', SemanticFont);
}
static compSemantics(node, field, sem) {
const content = [...node.textContent];
const meaning = content.map((x) => SemanticMap.Meaning.get(x));
const single = meaning.reduce(function (prev, curr) {
if (!prev ||
!curr[field] ||
curr[field] === sem.UNKNOWN ||
curr[field] === prev) {
return prev;
}
if (prev === sem.UNKNOWN) {
return curr[field];
}
return null;
}, sem.UNKNOWN);
if (single) {
node[field] = single;
}
}
static purgeFences_(partition) {
const rel = partition.rel;
const comp = partition.comp;
const newRel = [];
const newComp = [];
while (rel.length > 0) {
const currentRel = rel.shift();
let currentComp = comp.shift();
if (isElligibleEmbellishedFence(currentRel)) {
newRel.push(currentRel);
newComp.push(currentComp);
continue;
}
SemanticProcessor.fenceToPunct_(currentRel);
currentComp.push(currentRel);
currentComp = currentComp.concat(comp.shift());
comp.unshift(currentComp);
}
newComp.push(comp.shift());
return { rel: newRel, comp: newComp };
}
static rewriteFencedNode_(fenced) {
const ofence = fenced.contentNodes[0];
const cfence = fenced.contentNodes[1];
let rewritten = SemanticProcessor.rewriteFence_(fenced, ofence);
fenced.contentNodes[0] = rewritten.fence;
rewritten = SemanticProcessor.rewriteFence_(rewritten.node, cfence);
fenced.contentNodes[1] = rewritten.fence;
fenced.contentNodes[0].parent = fenced;
fenced.contentNodes[1].parent = fenced;
rewritten.node.parent = null;
return rewritten.node;
}
static rewriteFence_(node, fence) {
if (!fence.embellished) {
return { node: node, fence: fence };
}
const newFence = fence.childNodes[0];
const rewritten = SemanticProcessor.rewriteFence_(node, newFence);
if (isType(fence, semantic_meaning_SemanticType.SUPERSCRIPT) ||
isType(fence, semantic_meaning_SemanticType.SUBSCRIPT) ||
isType(fence, semantic_meaning_SemanticType.TENSOR)) {
if (!isRole(fence, semantic_meaning_SemanticRole.SUBSUP)) {
fence.role = node.role;
}
if (newFence !== rewritten.node) {
fence.replaceChild(newFence, rewritten.node);
newFence.parent = node;
}
SemanticProcessor.propagateFencePointer_(fence, newFence);
return { node: fence, fence: rewritten.fence };
}
fence.replaceChild(newFence, rewritten.fence);
if (fence.mathmlTree && fence.mathml.indexOf(fence.mathmlTree) === -1) {
fence.mathml.push(fence.mathmlTree);
}
return { node: rewritten.node, fence: fence };
}
static propagateFencePointer_(oldNode, newNode) {
oldNode.fencePointer = newNode.fencePointer || newNode.id.toString();
oldNode.embellished = null;
}
static classifyByColumns_(table, columns, relation, alternatives = []) {
const relations = [relation].concat(alternatives);
const test1 = (x) => SemanticProcessor.isPureRelation_(x, relations);
const test2 = (x) => SemanticProcessor.isEndRelation_(x, relations) ||
SemanticProcessor.isPureRelation_(x, relations);
const test3 = (x) => SemanticProcessor.isEndRelation_(x, relations, true) ||
SemanticProcessor.isPureRelation_(x, relations);
if ((columns.length === 3 &&
SemanticProcessor.testColumns_(columns, 1, test1)) ||
(columns.length === 2 &&
(SemanticProcessor.testColumns_(columns, 1, test2) ||
SemanticProcessor.testColumns_(columns, 0, test3)))) {
table.role = relation;
return true;
}
return false;
}
static isEndRelation_(node, relations, opt_right) {
const position = opt_right ? node.childNodes.length - 1 : 0;
return (isType(node, semantic_meaning_SemanticType.RELSEQ) &&
relations.some((relation) => isRole(node, relation)) &&
isType(node.childNodes[position], semantic_meaning_SemanticType.EMPTY));
}
static isPureRelation_(node, relations) {
return (isType(node, semantic_meaning_SemanticType.RELATION) &&
relations.some((relation) => isRole(node, relation)));
}
static computeColumns_(table) {
const columns = [];
for (let i = 0, row; (row = table.childNodes[i]); i++) {
for (let j = 0, cell; (cell = row.childNodes[j]); j++) {
const column = columns[j];
column ? columns[j].push(cell) : (columns[j] = [cell]);
}
}
return columns;
}
static testColumns_(columns, index, pred) {
const column = columns[index];
return column
? column.some(function (cell) {
return (cell.childNodes.length && pred(cell.childNodes[0]));
}) &&
column.every(function (cell) {
return (!cell.childNodes.length ||
pred(cell.childNodes[0]));
})
: false;
}
setNodeFactory(factory) {
SemanticProcessor.getInstance().factory_ = factory;
SemanticHeuristics.updateFactory(SemanticProcessor.getInstance().factory_);
}
getNodeFactory() {
return SemanticProcessor.getInstance().factory_;
}
identifierNode(leaf, font, unit) {
if (unit === 'MathML-Unit') {
leaf.type = semantic_meaning_SemanticType.IDENTIFIER;
leaf.role = semantic_meaning_SemanticRole.UNIT;
}
else if (!font &&
leaf.textContent.length === 1 &&
(leaf.role === semantic_meaning_SemanticRole.INTEGER ||
leaf.role === semantic_meaning_SemanticRole.LATINLETTER ||
leaf.role === semantic_meaning_SemanticRole.GREEKLETTER) &&
leaf.font === SemanticFont.NORMAL) {
leaf.font = SemanticFont.ITALIC;
return SemanticHeuristics.run('simpleNamedFunction', leaf);
}
if (leaf.type === semantic_meaning_SemanticType.UNKNOWN) {
leaf.type = semantic_meaning_SemanticType.IDENTIFIER;
}
SemanticProcessor.exprFont_(leaf);
return SemanticHeuristics.run('simpleNamedFunction', leaf);
}
implicitNode(nodes) {
nodes = SemanticProcessor.getInstance().getMixedNumbers_(nodes);
nodes = SemanticProcessor.getInstance().combineUnits_(nodes);
if (nodes.length === 1) {
return nodes[0];
}
const node = SemanticProcessor.getInstance().implicitNode_(nodes);
return SemanticHeuristics.run('combine_juxtaposition', node);
}
text(leaf, type) {
SemanticProcessor.exprFont_(leaf);
leaf.type = semantic_meaning_SemanticType.TEXT;
if (type === MMLTAGS.ANNOTATIONXML) {
leaf.role = semantic_meaning_SemanticRole.ANNOTATION;
return leaf;
}
if (type === MMLTAGS.MS) {
leaf.role = semantic_meaning_SemanticRole.STRING;
return leaf;
}
if (type === MMLTAGS.MSPACE || leaf.textContent.match(/^\s*$/)) {
leaf.role = semantic_meaning_SemanticRole.SPACE;
return leaf;
}
if (/\s/.exec(leaf.textContent)) {
leaf.role = semantic_meaning_SemanticRole.TEXT;
return leaf;
}
leaf.role = semantic_meaning_SemanticRole.UNKNOWN;
return leaf;
}
row(nodes) {
nodes = nodes.filter(function (x) {
return !isType(x, semantic_meaning_SemanticType.EMPTY);
});
if (nodes.length === 0) {
return SemanticProcessor.getInstance().factory_.makeEmptyNode();
}
nodes = SemanticProcessor.getInstance().getFencesInRow_(nodes);
nodes = SemanticProcessor.getInstance().tablesInRow(nodes);
nodes = SemanticProcessor.getInstance().getPunctuationInRow_(nodes);
nodes = SemanticProcessor.getInstance().getTextInRow_(nodes);
nodes = SemanticProcessor.getInstance().getFunctionsInRow_(nodes);
return SemanticProcessor.getInstance().relationsInRow_(nodes);
}
limitNode(mmlTag, children) {
if (!children.length) {
return SemanticProcessor.getInstance().factory_.makeEmptyNode();
}
let center = children[0];
let type = semantic_meaning_SemanticType.UNKNOWN;
if (!children[1]) {
return center;
}
let result;
SemanticHeuristics.run('op_with_limits', children);
if (isLimitBase(center)) {
result = SemanticProcessor.MML_TO_LIMIT_[mmlTag];
const length = result.length;
type = result.type;
children = children.slice(0, result.length + 1);
if ((length === 1 && isAccent(children[1])) ||
(length === 2 &&
isAccent(children[1]) &&
isAccent(children[2]))) {
result = SemanticProcessor.MML_TO_BOUNDS_[mmlTag];
return SemanticProcessor.getInstance().accentNode_(center, children, result.type, result.length, result.accent);
}
if (length === 2) {
if (isAccent(children[1])) {
center = SemanticProcessor.getInstance().accentNode_(center, [center, children[1]], {
MSUBSUP: semantic_meaning_SemanticType.SUBSCRIPT,
MUNDEROVER: semantic_meaning_SemanticType.UNDERSCORE
}[mmlTag], 1, true);
return !children[2]
? center
: SemanticProcessor.getInstance().makeLimitNode_(center, [center, children[2]], null, semantic_meaning_SemanticType.LIMUPPER);
}
if (children[2] && isAccent(children[2])) {
center = SemanticProcessor.getInstance().accentNode_(center, [center, children[2]], {
MSUBSUP: semantic_meaning_SemanticType.SUPERSCRIPT,
MUNDEROVER: semantic_meaning_SemanticType.OVERSCORE
}[mmlTag], 1, true);
return SemanticProcessor.getInstance().makeLimitNode_(center, [center, children[1]], null, semantic_meaning_SemanticType.LIMLOWER);
}
if (!children[length]) {
type = semantic_meaning_SemanticType.LIMLOWER;
}
}
return SemanticProcessor.getInstance().makeLimitNode_(center, children, null, type);
}
result = SemanticProcessor.MML_TO_BOUNDS_[mmlTag];
return SemanticProcessor.getInstance().accentNode_(center, children, result.type, result.length, result.accent);
}
tablesInRow(nodes) {
let partition = partitionNodes(nodes, tableIsMatrixOrVector);
let result = [];
for (let i = 0, matrix; (matrix = partition.rel[i]); i++) {
result = result.concat(partition.comp.shift());
result.push(SemanticProcessor.tableToMatrixOrVector_(matrix));
}
result = result.concat(partition.comp.shift());
partition = partitionNodes(result, isTableOrMultiline);
result = [];
for (let i = 0, table; (table = partition.rel[i]); i++) {
const prevNodes = partition.comp.shift();
if (tableIsCases(table, prevNodes)) {
SemanticProcessor.tableToCases_(table, prevNodes.pop());
}
result = result.concat(prevNodes);
result.push(table);
}
return result.concat(partition.comp.shift());
}
mfenced(open, close, sepValue, children) {
if (sepValue && children.length > 0) {
const separators = SemanticProcessor.nextSeparatorFunction_(sepValue);
const newChildren = [children.shift()];
children.forEach((child) => {
newChildren.push(SemanticProcessor.getInstance().factory_.makeContentNode(separators()));
newChildren.push(child);
});
children = newChildren;
}
if (open && close) {
return SemanticProcessor.getInstance().horizontalFencedNode_(SemanticProcessor.getInstance().factory_.makeContentNode(open), SemanticProcessor.getInstance().factory_.makeContentNode(close), children);
}
if (open) {
children.unshift(SemanticProcessor.getInstance().factory_.makeContentNode(open));
}
if (close) {
children.push(SemanticProcessor.getInstance().factory_.makeContentNode(close));
}
return SemanticProcessor.getInstance().row(children);
}
fractionLikeNode(denom, enume, linethickness, bevelled) {
let node;
if (!bevelled && isZeroLength(linethickness)) {
const child0 = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.LINE, [denom], []);
const child1 = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.LINE, [enume], []);
node = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.MULTILINE, [child0, child1], []);
SemanticProcessor.binomialForm_(node);
SemanticProcessor.classifyMultiline(node);
return node;
}
else {
node = SemanticProcessor.getInstance().fractionNode_(denom, enume);
if (bevelled) {
node.addAnnotation('general', 'bevelled');
}
return node;
}
}
tensor(base, lsub, lsup, rsub, rsup) {
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.TENSOR, [
base,
SemanticProcessor.getInstance().scriptNode_(lsub, semantic_meaning_SemanticRole.LEFTSUB),
SemanticProcessor.getInstance().scriptNode_(lsup, semantic_meaning_SemanticRole.LEFTSUPER),
SemanticProcessor.getInstance().scriptNode_(rsub, semantic_meaning_SemanticRole.RIGHTSUB),
SemanticProcessor.getInstance().scriptNode_(rsup, semantic_meaning_SemanticRole.RIGHTSUPER)
], []);
newNode.role = base.role;
newNode.embellished = isEmbellished(base);
return newNode;
}
pseudoTensor(base, sub, sup) {
const isEmpty = (x) => !isType(x, semantic_meaning_SemanticType.EMPTY);
const nonEmptySub = sub.filter(isEmpty).length;
const nonEmptySup = sup.filter(isEmpty).length;
if (!nonEmptySub && !nonEmptySup) {
return base;
}
const mmlTag = nonEmptySub
? nonEmptySup
? MMLTAGS.MSUBSUP
: MMLTAGS.MSUB
: MMLTAGS.MSUP;
const mmlchild = [base];
if (nonEmptySub) {
mmlchild.push(SemanticProcessor.getInstance().scriptNode_(sub, semantic_meaning_SemanticRole.RIGHTSUB, true));
}
if (nonEmptySup) {
mmlchild.push(SemanticProcessor.getInstance().scriptNode_(sup, semantic_meaning_SemanticRole.RIGHTSUPER, true));
}
return SemanticProcessor.getInstance().limitNode(mmlTag, mmlchild);
}
font(font) {
const mathjaxFont = SemanticProcessor.MATHJAX_FONTS[font];
return mathjaxFont ? mathjaxFont : font;
}
proof(node, semantics, parse) {
if (!semantics['inference'] && !semantics['axiom']) {
console.log('Noise');
}
if (semantics['axiom']) {
const cleaned = SemanticProcessor.getInstance().cleanInference(node.childNodes);
const axiom = cleaned.length
? SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.INFERENCE, parse(cleaned), [])
: SemanticProcessor.getInstance().factory_.makeEmptyNode();
axiom.role = semantic_meaning_SemanticRole.AXIOM;
axiom.mathmlTree = node;
return axiom;
}
const inference = SemanticProcessor.getInstance().inference(node, semantics, parse);
if (semantics['proof']) {
inference.role = semantic_meaning_SemanticRole.PROOF;
inference.childNodes[0].role = semantic_meaning_SemanticRole.FINAL;
}
return inference;
}
inference(node, semantics, parse) {
if (semantics['inferenceRule']) {
const formulas = SemanticProcessor.getInstance().getFormulas(node, [], parse);
const inference = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.INFERENCE, [formulas.conclusion, formulas.premises], []);
return inference;
}
const label = semantics['labelledRule'];
const children = toArray(node.childNodes);
const content = [];
if (label === 'left' || label === 'both') {
content.push(SemanticProcessor.getInstance().getLabel(node, children, parse, semantic_meaning_SemanticRole.LEFT));
}
if (label === 'right' || label === 'both') {
content.push(SemanticProcessor.getInstance().getLabel(node, children, parse, semantic_meaning_SemanticRole.RIGHT));
}
const formulas = SemanticProcessor.getInstance().getFormulas(node, children, parse);
const inference = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.INFERENCE, [formulas.conclusion, formulas.premises], content);
inference.mathmlTree = node;
return inference;
}
getLabel(_node, children, parse, side) {
const label = SemanticProcessor.getInstance().findNestedRow(children, 'prooflabel', side);
const sem = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.RULELABEL, parse(toArray(label.childNodes)), []);
sem.role = side;
sem.mathmlTree = label;
return sem;
}
getFormulas(node, children, parse) {
const inf = children.length
? SemanticProcessor.getInstance().findNestedRow(children, 'inferenceRule')
: node;
const up = SemanticProcessor.getSemantics(inf)['inferenceRule'] === 'up';
const premRow = up ? inf.childNodes[1] : inf.childNodes[0];
const concRow = up ? inf.childNodes[0] : inf.childNodes[1];
const premTable = premRow.childNodes[0].childNodes[0];
const topRow = toArray(premTable.childNodes[0].childNodes);
const premNodes = [];
let i = 1;
for (const cell of topRow) {
if (i % 2) {
premNodes.push(cell.childNodes[0]);
}
i++;
}
const premises = parse(premNodes);
const conclusion = parse(toArray(concRow.childNodes[0].childNodes))[0];
const prem = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.PREMISES, premises, []);
prem.mathmlTree = premTable;
const conc = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.CONCLUSION, [conclusion], []);
conc.mathmlTree = concRow.childNodes[0].childNodes[0];
return { conclusion: conc, premises: prem };
}
findNestedRow(nodes, semantic, opt_value) {
return SemanticProcessor.getInstance().findNestedRow_(nodes, semantic, 0, opt_value);
}
cleanInference(nodes) {
return toArray(nodes).filter(function (x) {
return dom_util_tagName(x) !== 'MSPACE';
});
}
operatorNode(node) {
if (node.type === semantic_meaning_SemanticType.UNKNOWN) {
node.type = semantic_meaning_SemanticType.OPERATOR;
}
return SemanticHeuristics.run('multioperator', node);
}
constructor() {
this.funcAppls = {};
this.splitRoles = new Map([
[semantic_meaning_SemanticRole.SUBTRACTION, semantic_meaning_SemanticRole.NEGATIVE],
[semantic_meaning_SemanticRole.ADDITION, semantic_meaning_SemanticRole.POSITIVE]
]);
this.splitOps = ['−', '-', '‐', '‑', '+'];
this.factory_ = new SemanticNodeFactory();
SemanticHeuristics.updateFactory(this.factory_);
}
implicitNode_(nodes) {
const operators = SemanticProcessor.getInstance().factory_.makeMultipleContentNodes(nodes.length - 1, NamedSymbol.invisibleTimes);
SemanticProcessor.matchSpaces_(nodes, operators);
const newNode = SemanticProcessor.getInstance().infixNode_(nodes, operators[0]);
newNode.role = semantic_meaning_SemanticRole.IMPLICIT;
operators.forEach(function (op) {
op.parent = newNode;
});
newNode.contentNodes = operators;
return newNode;
}
infixNode_(children, opNode) {
let node = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.INFIXOP, children, [opNode], getEmbellishedInner(opNode).textContent);
node.role = opNode.role;
node = SemanticHeuristics.run('propagateInterval', node);
return SemanticHeuristics.run('propagateSimpleFunction', node);
}
explicitMixed_(nodes) {
const partition = partitionNodes(nodes, function (x) {
return x.textContent === NamedSymbol.invisiblePlus;
});
if (!partition.rel.length) {
return nodes;
}
let result = [];
for (let i = 0, rel; (rel = partition.rel[i]); i++) {
const prev = partition.comp[i];
const next = partition.comp[i + 1];
const last = prev.length - 1;
if (prev[last] &&
next[0] &&
isType(prev[last], semantic_meaning_SemanticType.NUMBER) &&
!isRole(prev[last], semantic_meaning_SemanticRole.MIXED) &&
isType(next[0], semantic_meaning_SemanticType.FRACTION)) {
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.NUMBER, [prev[last], next[0]], []);
newNode.role = semantic_meaning_SemanticRole.MIXED;
result = result.concat(prev.slice(0, last));
result.push(newNode);
next.shift();
}
else {
result = result.concat(prev);
result.push(rel);
}
}
return result.concat(partition.comp[partition.comp.length - 1]);
}
concatNode_(inner, nodeList, type) {
if (nodeList.length === 0) {
return inner;
}
const content = nodeList
.map(function (x) {
return getEmbellishedInner(x).textContent;
})
.join(' ');
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(type, [inner], nodeList, content);
if (nodeList.length > 1) {
newNode.role = semantic_meaning_SemanticRole.MULTIOP;
}
return newNode;
}
prefixNode_(node, prefixes) {
const newPrefixes = this.splitSingles(prefixes);
let newNode = node;
while (newPrefixes.length > 0) {
const op = newPrefixes.pop();
newNode = SemanticProcessor.getInstance().concatNode_(newNode, op, semantic_meaning_SemanticType.PREFIXOP);
if (op.length === 1 && this.splitOps.indexOf(op[0].textContent) !== -1) {
newNode.role = this.splitRoles.get(op[0].role);
}
}
return newNode;
}
splitSingles(prefixes) {
let lastOp = 0;
const result = [];
let i = 0;
while (i < prefixes.length) {
const op = prefixes[i];
if (this.splitRoles.has(op.role) &&
(!prefixes[i - 1] || prefixes[i - 1].role !== op.role) &&
(!prefixes[i + 1] || prefixes[i + 1].role !== op.role) &&
this.splitOps.indexOf(op.textContent) !== -1) {
result.push(prefixes.slice(lastOp, i));
result.push(prefixes.slice(i, i + 1));
lastOp = i + 1;
}
i++;
}
if (lastOp < i) {
result.push(prefixes.slice(lastOp, i));
}
return result;
}
postfixNode_(node, postfixes) {
if (!postfixes.length) {
return node;
}
return SemanticProcessor.getInstance().concatNode_(node, postfixes, semantic_meaning_SemanticType.POSTFIXOP);
}
combineUnits_(nodes) {
const partition = partitionNodes(nodes, function (x) {
return !isRole(x, semantic_meaning_SemanticRole.UNIT);
});
if (nodes.length === partition.rel.length) {
return partition.rel;
}
const result = [];
let rel;
let last;
do {
const comp = partition.comp.shift();
rel = partition.rel.shift();
let unitNode = null;
last = result.pop();
if (last) {
if (!comp.length || !isUnitCounter(last)) {
result.push(last);
}
else {
comp.unshift(last);
}
}
if (comp.length === 1) {
unitNode = comp.pop();
}
if (comp.length > 1) {
unitNode = SemanticProcessor.getInstance().implicitNode_(comp);
unitNode.role = semantic_meaning_SemanticRole.UNIT;
}
if (unitNode) {
result.push(unitNode);
}
if (rel) {
result.push(rel);
}
} while (rel);
return result;
}
getMixedNumbers_(nodes) {
const partition = partitionNodes(nodes, function (x) {
return (isType(x, semantic_meaning_SemanticType.FRACTION) &&
isRole(x, semantic_meaning_SemanticRole.VULGAR));
});
if (!partition.rel.length) {
return nodes;
}
let result = [];
for (let i = 0, rel; (rel = partition.rel[i]); i++) {
const comp = partition.comp[i];
const last = comp.length - 1;
if (comp[last] &&
isType(comp[last], semantic_meaning_SemanticType.NUMBER) &&
(isRole(comp[last], semantic_meaning_SemanticRole.INTEGER) ||
isRole(comp[last], semantic_meaning_SemanticRole.FLOAT))) {
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.NUMBER, [comp[last], rel], []);
newNode.role = semantic_meaning_SemanticRole.MIXED;
result = result.concat(comp.slice(0, last));
result.push(newNode);
}
else {
result = result.concat(comp);
result.push(rel);
}
}
return result.concat(partition.comp[partition.comp.length - 1]);
}
getTextInRow_(nodes) {
if (nodes.length === 0) {
return nodes;
}
if (nodes.length === 1) {
if (nodes[0].type === semantic_meaning_SemanticType.TEXT &&
nodes[0].role === semantic_meaning_SemanticRole.UNKNOWN) {
nodes[0].role = semantic_meaning_SemanticRole.ANNOTATION;
}
return nodes;
}
const { rel: rel, comp: comp } = partitionNodes(nodes, (x) => isType(x, semantic_meaning_SemanticType.TEXT));
if (rel.length === 0) {
return nodes;
}
const result = [];
let prevComp = comp.shift();
while (rel.length > 0) {
let currentRel = rel.shift();
let nextComp = comp.shift();
const text = [];
while (!nextComp.length &&
rel.length &&
currentRel.role !== semantic_meaning_SemanticRole.SPACE &&
rel[0].role !== semantic_meaning_SemanticRole.SPACE) {
text.push(currentRel);
currentRel = rel.shift();
nextComp = comp.shift();
}
if (text.length) {
if (prevComp.length) {
result.push(SemanticProcessor.getInstance().row(prevComp));
}
text.push(currentRel);
const dummy = SemanticProcessor.getInstance().dummyNode_(text);
result.push(dummy);
prevComp = nextComp;
continue;
}
if (currentRel.role !== semantic_meaning_SemanticRole.UNKNOWN) {
if (prevComp.length) {
result.push(SemanticProcessor.getInstance().row(prevComp));
}
result.push(currentRel);
prevComp = nextComp;
continue;
}
const meaning = SemanticMap.Meaning.get(currentRel.textContent);
if (meaning.type === semantic_meaning_SemanticType.PUNCTUATION) {
currentRel.role = meaning.role;
currentRel.font = meaning.font;
if (prevComp.length) {
result.push(SemanticProcessor.getInstance().row(prevComp));
}
result.push(currentRel);
prevComp = nextComp;
continue;
}
if (meaning.type !== semantic_meaning_SemanticType.UNKNOWN) {
currentRel.type = meaning.type;
currentRel.role = meaning.role;
currentRel.font = meaning.font;
currentRel.addAnnotation('general', 'text');
prevComp.push(currentRel);
prevComp = prevComp.concat(nextComp);
continue;
}
SemanticProcessor.meaningFromContent(currentRel, (n, c, m) => {
if (n.role !== semantic_meaning_SemanticRole.UNKNOWN) {
return;
}
SemanticProcessor.numberRole_(n, c, m);
if (n.role !== semantic_meaning_SemanticRole.OTHERNUMBER) {
n.type = semantic_meaning_SemanticType.NUMBER;
return;
}
if (m.some((x) => x.type !== semantic_meaning_SemanticType.NUMBER &&
x.type !== semantic_meaning_SemanticType.IDENTIFIER)) {
n.type = semantic_meaning_SemanticType.TEXT;
n.role = semantic_meaning_SemanticRole.ANNOTATION;
return;
}
n.role = semantic_meaning_SemanticRole.UNKNOWN;
});
if (currentRel.type === semantic_meaning_SemanticType.TEXT &&
currentRel.role !== semantic_meaning_SemanticRole.UNKNOWN) {
if (prevComp.length) {
result.push(SemanticProcessor.getInstance().row(prevComp));
}
result.push(currentRel);
prevComp = nextComp;
continue;
}
if (currentRel.role === semantic_meaning_SemanticRole.UNKNOWN) {
if (rel.length || nextComp.length) {
if (nextComp.length && nextComp[0].type === semantic_meaning_SemanticType.FENCED) {
currentRel.type = semantic_meaning_SemanticType.FUNCTION;
currentRel.role = semantic_meaning_SemanticRole.PREFIXFUNC;
}
else {
currentRel.role = semantic_meaning_SemanticRole.TEXT;
}
}
else {
currentRel.type = semantic_meaning_SemanticType.IDENTIFIER;
currentRel.role = semantic_meaning_SemanticRole.UNIT;
}
}
prevComp.push(currentRel);
prevComp = prevComp.concat(nextComp);
}
if (prevComp.length > 0) {
result.push(SemanticProcessor.getInstance().row(prevComp));
}
return result.length > 1
? [SemanticProcessor.getInstance().dummyNode_(result)]
: result;
}
relationsInRow_(nodes) {
const partition = partitionNodes(nodes, isRelation);
const firstRel = partition.rel[0];
if (!firstRel) {
return SemanticProcessor.getInstance().operationsInRow_(nodes);
}
if (nodes.length === 1) {
return nodes[0];
}
const children = partition.comp.map(SemanticProcessor.getInstance().operationsInRow_);
let node;
if (partition.rel.some(function (x) {
return !x.equals(firstRel);
})) {
node = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.MULTIREL, children, partition.rel);
if (partition.rel.every(function (x) {
return x.role === firstRel.role;
})) {
node.role = firstRel.role;
}
return node;
}
node = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.RELSEQ, children, partition.rel, getEmbellishedInner(firstRel).textContent);
node.role = firstRel.role;
return node;
}
operationsInRow_(nodes) {
if (nodes.length === 0) {
return SemanticProcessor.getInstance().factory_.makeEmptyNode();
}
nodes = SemanticProcessor.getInstance().explicitMixed_(nodes);
if (nodes.length === 1) {
return nodes[0];
}
const prefix = [];
while (nodes.length > 0 && isOperator(nodes[0])) {
prefix.push(nodes.shift());
}
if (nodes.length === 0) {
return SemanticProcessor.getInstance().prefixNode_(prefix.pop(), prefix);
}
if (nodes.length === 1) {
return SemanticProcessor.getInstance().prefixNode_(nodes[0], prefix);
}
nodes = SemanticHeuristics.run('convert_juxtaposition', nodes);
const split = sliceNodes(nodes, isOperator);
const node = SemanticProcessor.getInstance().wrapFactor(prefix, split);
return SemanticProcessor.getInstance().addFactor(node, split);
}
wrapPostfix(split) {
var _a;
if (((_a = split.div) === null || _a === void 0 ? void 0 : _a.role) === semantic_meaning_SemanticRole.POSTFIXOP) {
if (!split.tail.length || split.tail[0].type === semantic_meaning_SemanticType.OPERATOR) {
split.head = [
SemanticProcessor.getInstance().postfixNode_(SemanticProcessor.getInstance().implicitNode(split.head), [split.div])
];
split.div = split.tail.shift();
SemanticProcessor.getInstance().wrapPostfix(split);
}
else {
split.div.role = semantic_meaning_SemanticRole.DIVISION;
}
}
}
wrapFactor(prefix, split) {
SemanticProcessor.getInstance().wrapPostfix(split);
return SemanticProcessor.getInstance().prefixNode_(SemanticProcessor.getInstance().implicitNode(split.head), prefix);
}
addFactor(node, split) {
if (!split.div) {
if (isUnitProduct(node)) {
node.role = semantic_meaning_SemanticRole.UNIT;
}
return node;
}
return SemanticProcessor.getInstance().operationsTree_(split.tail, node, split.div);
}
operationsTree_(nodes, root, lastop, prefix = []) {
if (nodes.length === 0) {
prefix.unshift(lastop);
if (root.type === semantic_meaning_SemanticType.INFIXOP) {
const node = SemanticProcessor.getInstance().postfixNode_(root.childNodes.pop(), prefix);
root.appendChild(node);
return root;
}
return SemanticProcessor.getInstance().postfixNode_(root, prefix);
}
const split = sliceNodes(nodes, isOperator);
if (split.head.length === 0) {
prefix.push(split.div);
return SemanticProcessor.getInstance().operationsTree_(split.tail, root, lastop, prefix);
}
const node = SemanticProcessor.getInstance().wrapFactor(prefix, split);
const newNode = SemanticProcessor.getInstance().appendOperand_(root, lastop, node);
return SemanticProcessor.getInstance().addFactor(newNode, split);
}
appendOperand_(root, op, node) {
if (root.type !== semantic_meaning_SemanticType.INFIXOP) {
return SemanticProcessor.getInstance().infixNode_([root, node], op);
}
const division = SemanticProcessor.getInstance().appendDivisionOp_(root, op, node);
if (division) {
return division;
}
if (SemanticProcessor.getInstance().appendExistingOperator_(root, op, node)) {
return root;
}
return op.role === semantic_meaning_SemanticRole.MULTIPLICATION
? SemanticProcessor.getInstance().appendMultiplicativeOp_(root, op, node)
: SemanticProcessor.getInstance().appendAdditiveOp_(root, op, node);
}
appendDivisionOp_(root, op, node) {
if (op.role === semantic_meaning_SemanticRole.DIVISION) {
if (isImplicit(root)) {
return SemanticProcessor.getInstance().infixNode_([root, node], op);
}
return SemanticProcessor.getInstance().appendLastOperand_(root, op, node);
}
return root.role === semantic_meaning_SemanticRole.DIVISION
? SemanticProcessor.getInstance().infixNode_([root, node], op)
: null;
}
appendLastOperand_(root, op, node) {
let lastRoot = root;
let lastChild = root.childNodes[root.childNodes.length - 1];
while (lastChild &&
lastChild.type === semantic_meaning_SemanticType.INFIXOP &&
!isImplicit(lastChild)) {
lastRoot = lastChild;
lastChild = lastRoot.childNodes[root.childNodes.length - 1];
}
const newNode = SemanticProcessor.getInstance().infixNode_([lastRoot.childNodes.pop(), node], op);
lastRoot.appendChild(newNode);
return root;
}
appendMultiplicativeOp_(root, op, node) {
if (isImplicit(root)) {
return SemanticProcessor.getInstance().infixNode_([root, node], op);
}
let lastRoot = root;
let lastChild = root.childNodes[root.childNodes.length - 1];
while (lastChild &&
lastChild.type === semantic_meaning_SemanticType.INFIXOP &&
!isImplicit(lastChild)) {
lastRoot = lastChild;
lastChild = lastRoot.childNodes[root.childNodes.length - 1];
}
const newNode = SemanticProcessor.getInstance().infixNode_([lastRoot.childNodes.pop(), node], op);
lastRoot.appendChild(newNode);
return root;
}
appendAdditiveOp_(root, op, node) {
return SemanticProcessor.getInstance().infixNode_([root, node], op);
}
appendExistingOperator_(root, op, node) {
if (!root ||
root.type !== semantic_meaning_SemanticType.INFIXOP ||
isImplicit(root)) {
return false;
}
if (root.contentNodes[0].equals(op)) {
root.appendContentNode(op);
root.appendChild(node);
return true;
}
return SemanticProcessor.getInstance().appendExistingOperator_(root.childNodes[root.childNodes.length - 1], op, node);
}
getFencesInRow_(nodes) {
let partition = partitionNodes(nodes, isFence);
partition = SemanticProcessor.purgeFences_(partition);
const felem = partition.comp.shift();
return SemanticProcessor.getInstance().fences_(partition.rel, partition.comp, [], [felem]);
}
fences_(fences, content, openStack, contentStack) {
if (fences.length === 0 && openStack.length === 0) {
return contentStack[0];
}
const interval = SemanticHeuristics.run('bracketed_interval', [fences[0], fences[1], ...(content[0] || [])], () => null);
if (interval) {
fences.shift();
fences.shift();
content.shift();
const stack = contentStack.pop() || [];
contentStack.push([...stack, interval, ...content.shift()]);
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
const openPred = (x) => isRole(x, semantic_meaning_SemanticRole.OPEN);
if (fences.length === 0) {
const result = contentStack.shift();
while (openStack.length > 0) {
if (openPred(openStack[0])) {
const firstOpen = openStack.shift();
SemanticProcessor.fenceToPunct_(firstOpen);
result.push(firstOpen);
}
else {
const split = sliceNodes(openStack, openPred);
const cutLength = split.head.length - 1;
const innerNodes = SemanticProcessor.getInstance().neutralFences_(split.head, contentStack.slice(0, cutLength));
contentStack = contentStack.slice(cutLength);
result.push(...innerNodes);
if (split.div) {
split.tail.unshift(split.div);
}
openStack = split.tail;
}
result.push(...contentStack.shift());
}
return result;
}
const lastOpen = openStack[openStack.length - 1];
const firstRole = fences[0].role;
if (firstRole === semantic_meaning_SemanticRole.OPEN ||
(isNeutralFence(fences[0]) &&
!(lastOpen && compareNeutralFences(fences[0], lastOpen)))) {
openStack.push(fences.shift());
const cont = content.shift();
if (cont) {
contentStack.push(cont);
}
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
if (lastOpen &&
firstRole === semantic_meaning_SemanticRole.CLOSE &&
lastOpen.role === semantic_meaning_SemanticRole.OPEN) {
const fenced = SemanticProcessor.getInstance().horizontalFencedNode_(openStack.pop(), fences.shift(), contentStack.pop());
contentStack.push(contentStack.pop().concat([fenced], content.shift()));
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
if (lastOpen &&
compareNeutralFences(fences[0], lastOpen)) {
if (!elligibleLeftNeutral(lastOpen) ||
!elligibleRightNeutral(fences[0])) {
openStack.push(fences.shift());
const cont = content.shift();
if (cont) {
contentStack.push(cont);
}
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
const fenced = SemanticProcessor.getInstance().horizontalFencedNode_(openStack.pop(), fences.shift(), contentStack.pop());
contentStack.push(contentStack.pop().concat([fenced], content.shift()));
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
if (lastOpen &&
firstRole === semantic_meaning_SemanticRole.CLOSE &&
isNeutralFence(lastOpen) &&
openStack.some(openPred)) {
const split = sliceNodes(openStack, openPred, true);
const rightContent = contentStack.pop();
const cutLength = contentStack.length - split.tail.length + 1;
const innerNodes = SemanticProcessor.getInstance().neutralFences_(split.tail, contentStack.slice(cutLength));
contentStack = contentStack.slice(0, cutLength);
const fenced = SemanticProcessor.getInstance().horizontalFencedNode_(split.div, fences.shift(), contentStack.pop().concat(innerNodes, rightContent));
contentStack.push(contentStack.pop().concat([fenced], content.shift()));
return SemanticProcessor.getInstance().fences_(fences, content, split.head, contentStack);
}
const fenced = fences.shift();
SemanticProcessor.fenceToPunct_(fenced);
contentStack.push(contentStack.pop().concat([fenced], content.shift()));
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
neutralFences_(fences, content) {
if (fences.length === 0) {
return fences;
}
if (fences.length === 1) {
SemanticProcessor.fenceToPunct_(fences[0]);
return fences;
}
const firstFence = fences.shift();
if (!elligibleLeftNeutral(firstFence)) {
SemanticProcessor.fenceToPunct_(firstFence);
const restContent = content.shift();
restContent.unshift(firstFence);
return restContent.concat(SemanticProcessor.getInstance().neutralFences_(fences, content));
}
const split = sliceNodes(fences, function (x) {
return compareNeutralFences(x, firstFence);
});
if (!split.div) {
SemanticProcessor.fenceToPunct_(firstFence);
const restContent = content.shift();
restContent.unshift(firstFence);
return restContent.concat(SemanticProcessor.getInstance().neutralFences_(fences, content));
}
if (!elligibleRightNeutral(split.div)) {
SemanticProcessor.fenceToPunct_(split.div);
fences.unshift(firstFence);
return SemanticProcessor.getInstance().neutralFences_(fences, content);
}
const newContent = SemanticProcessor.getInstance().combineFencedContent_(firstFence, split.div, split.head, content);
if (split.tail.length > 0) {
const leftContent = newContent.shift();
const result = SemanticProcessor.getInstance().neutralFences_(split.tail, newContent);
return leftContent.concat(result);
}
return newContent[0];
}
combineFencedContent_(leftFence, rightFence, midFences, content) {
if (midFences.length === 0) {
const fenced = SemanticProcessor.getInstance().horizontalFencedNode_(leftFence, rightFence, content.shift());
if (content.length > 0) {
content[0].unshift(fenced);
}
else {
content = [[fenced]];
}
return content;
}
const leftContent = content.shift();
const cutLength = midFences.length - 1;
const midContent = content.slice(0, cutLength);
content = content.slice(cutLength);
const rightContent = content.shift();
const innerNodes = SemanticProcessor.getInstance().neutralFences_(midFences, midContent);
leftContent.push(...innerNodes);
leftContent.push(...rightContent);
const fenced = SemanticProcessor.getInstance().horizontalFencedNode_(leftFence, rightFence, leftContent);
if (content.length > 0) {
content[0].unshift(fenced);
}
else {
content = [[fenced]];
}
return content;
}
horizontalFencedNode_(ofence, cfence, content) {
const childNode = SemanticProcessor.getInstance().row(content);
let newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.FENCED, [childNode], [ofence, cfence]);
if (ofence.role === semantic_meaning_SemanticRole.OPEN) {
SemanticProcessor.getInstance().classifyHorizontalFence_(newNode);
newNode = SemanticHeuristics.run('propagateComposedFunction', newNode);
}
else {
newNode.role = ofence.role;
}
newNode = SemanticHeuristics.run('detect_cycle', newNode);
return SemanticProcessor.rewriteFencedNode_(newNode);
}
classifyHorizontalFence_(node) {
SemanticHeuristics.run('interval_heuristic', node);
if (node.role === semantic_meaning_SemanticRole.INTERVAL) {
return;
}
;
node.role = semantic_meaning_SemanticRole.LEFTRIGHT;
const children = node.childNodes;
if (!isSetNode(node) || children.length > 1) {
return;
}
if (children.length === 0 || children[0].type === semantic_meaning_SemanticType.EMPTY) {
node.role = semantic_meaning_SemanticRole.SETEMPTY;
return;
}
const type = children[0].type;
if (children.length === 1 &&
isSingletonSetContent(children[0])) {
node.role = semantic_meaning_SemanticRole.SETSINGLE;
return;
}
const role = children[0].role;
if (type !== semantic_meaning_SemanticType.PUNCTUATED || role !== semantic_meaning_SemanticRole.SEQUENCE) {
return;
}
if (children[0].contentNodes[0].role === semantic_meaning_SemanticRole.COMMA) {
node.role = semantic_meaning_SemanticRole.SETCOLLECT;
return;
}
if (children[0].contentNodes.length === 1 &&
(children[0].contentNodes[0].role === semantic_meaning_SemanticRole.VBAR ||
children[0].contentNodes[0].role === semantic_meaning_SemanticRole.COLON)) {
node.role = semantic_meaning_SemanticRole.SETEXT;
SemanticProcessor.getInstance().setExtension_(node);
return;
}
}
setExtension_(set) {
const extender = set.childNodes[0].childNodes[0];
if (extender &&
extender.type === semantic_meaning_SemanticType.INFIXOP &&
extender.contentNodes.length === 1 &&
isMembership(extender.contentNodes[0])) {
extender.addAnnotation('set', 'intensional');
extender.contentNodes[0].addAnnotation('set', 'intensional');
}
}
getPunctuationInRow_(nodes) {
if (nodes.length <= 1) {
return nodes;
}
const allowedType = (x) => {
const type = x.type;
return (type === 'punctuation' ||
type === 'text' ||
type === 'operator' ||
type === 'relation');
};
const partition = partitionNodes(nodes, function (x) {
if (!isPunctuation(x)) {
return false;
}
if (isPunctuation(x) &&
!isRole(x, semantic_meaning_SemanticRole.ELLIPSIS)) {
return true;
}
const index = nodes.indexOf(x);
if (index === 0) {
if (nodes[1] && allowedType(nodes[1])) {
return false;
}
return true;
}
const prev = nodes[index - 1];
if (index === nodes.length - 1) {
if (allowedType(prev)) {
return false;
}
return true;
}
const next = nodes[index + 1];
if (allowedType(prev) && allowedType(next)) {
return false;
}
return true;
});
if (partition.rel.length === 0) {
return nodes;
}
let newNodes = [];
let firstComp = partition.comp.shift();
if (firstComp.length > 0) {
newNodes.push(SemanticProcessor.getInstance().row(firstComp));
}
let relCounter = 0;
while (partition.comp.length > 0) {
let puncts = [];
const saveCount = relCounter;
do {
puncts.push(partition.rel[relCounter++]);
firstComp = partition.comp.shift();
} while (partition.rel[relCounter] &&
firstComp &&
firstComp.length === 0);
puncts = SemanticHeuristics.run('ellipses', puncts);
partition.rel.splice(saveCount, relCounter - saveCount, ...puncts);
relCounter = saveCount + puncts.length;
newNodes = newNodes.concat(puncts);
if (firstComp && firstComp.length > 0) {
newNodes.push(SemanticProcessor.getInstance().row(firstComp));
}
}
return newNodes.length === 1 && partition.rel.length === 1
? newNodes
: [
SemanticProcessor.getInstance().punctuatedNode_(newNodes, partition.rel)
];
}
punctuatedNode_(nodes, punctuations) {
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.PUNCTUATED, nodes, punctuations);
if (punctuations.length === nodes.length) {
const firstRole = punctuations[0].role;
if (firstRole !== semantic_meaning_SemanticRole.UNKNOWN &&
punctuations.every(function (punct) {
return punct.role === firstRole;
})) {
newNode.role = firstRole;
return newNode;
}
}
const fpunct = punctuations[0];
if (singlePunctAtPosition(nodes, punctuations, 0)) {
newNode.role =
fpunct.childNodes.length && !fpunct.embellished
? fpunct.role
: semantic_meaning_SemanticRole.STARTPUNCT;
}
else if (singlePunctAtPosition(nodes, punctuations, nodes.length - 1)) {
newNode.role =
fpunct.childNodes.length && !fpunct.embellished
? fpunct.role
: semantic_meaning_SemanticRole.ENDPUNCT;
}
else if (punctuations.every((x) => isRole(x, semantic_meaning_SemanticRole.DUMMY))) {
newNode.role = semantic_meaning_SemanticRole.TEXT;
}
else if (punctuations.every((x) => isRole(x, semantic_meaning_SemanticRole.SPACE))) {
newNode.role = semantic_meaning_SemanticRole.SPACE;
}
else {
newNode.role = semantic_meaning_SemanticRole.SEQUENCE;
}
return newNode;
}
dummyNode_(children) {
const commata = SemanticProcessor.getInstance().factory_.makeMultipleContentNodes(children.length - 1, NamedSymbol.invisibleComma);
commata.forEach(function (comma) {
comma.role = semantic_meaning_SemanticRole.DUMMY;
});
return SemanticProcessor.getInstance().punctuatedNode_(children, commata);
}
accentRole_(node, type) {
if (!isAccent(node)) {
return false;
}
const content = node.textContent;
const role = SemanticMap.Secondary.get(content, SemanticSecondary.BAR) ||
SemanticMap.Secondary.get(content, SemanticSecondary.TILDE) ||
node.role;
node.role =
type === semantic_meaning_SemanticType.UNDERSCORE
? semantic_meaning_SemanticRole.UNDERACCENT
: semantic_meaning_SemanticRole.OVERACCENT;
node.addAnnotation('accent', role);
return true;
}
accentNode_(center, children, type, length, accent) {
children = children.slice(0, length + 1);
const child1 = children[1];
const child2 = children[2];
let innerNode;
if (!accent && child2) {
innerNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.SUBSCRIPT, [center, child1], []);
innerNode.role = semantic_meaning_SemanticRole.SUBSUP;
children = [innerNode, child2];
type = semantic_meaning_SemanticType.SUPERSCRIPT;
}
if (accent) {
const underAccent = SemanticProcessor.getInstance().accentRole_(child1, type);
if (child2) {
const overAccent = SemanticProcessor.getInstance().accentRole_(child2, semantic_meaning_SemanticType.OVERSCORE);
if (overAccent && !underAccent) {
innerNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.OVERSCORE, [center, child2], []);
children = [innerNode, child1];
type = semantic_meaning_SemanticType.UNDERSCORE;
}
else {
innerNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.UNDERSCORE, [center, child1], []);
children = [innerNode, child2];
type = semantic_meaning_SemanticType.OVERSCORE;
}
innerNode.role = semantic_meaning_SemanticRole.UNDEROVER;
}
}
return SemanticProcessor.getInstance().makeLimitNode_(center, children, innerNode, type);
}
makeLimitNode_(center, children, innerNode, type) {
if (type === semantic_meaning_SemanticType.LIMUPPER &&
center.type === semantic_meaning_SemanticType.LIMLOWER) {
center.childNodes.push(children[1]);
children[1].parent = center;
center.type = semantic_meaning_SemanticType.LIMBOTH;
return center;
}
if (type === semantic_meaning_SemanticType.LIMLOWER &&
center.type === semantic_meaning_SemanticType.LIMUPPER) {
center.childNodes.splice(1, -1, children[1]);
children[1].parent = center;
center.type = semantic_meaning_SemanticType.LIMBOTH;
return center;
}
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(type, children, []);
const embellished = isEmbellished(center);
if (innerNode) {
innerNode.embellished = embellished;
}
newNode.embellished = embellished;
newNode.role = center.role;
return newNode;
}
getFunctionsInRow_(restNodes, opt_result) {
const result = opt_result || [];
if (restNodes.length === 0) {
return result;
}
const firstNode = restNodes.shift();
const heuristic = SemanticProcessor.classifyFunction_(firstNode, restNodes);
if (!heuristic) {
result.push(firstNode);
return SemanticProcessor.getInstance().getFunctionsInRow_(restNodes, result);
}
const processedRest = SemanticProcessor.getInstance().getFunctionsInRow_(restNodes, []);
const newRest = SemanticProcessor.getInstance().getFunctionArgs_(firstNode, processedRest, heuristic);
return result.concat(newRest);
}
getFunctionArgs_(func, rest, heuristic) {
let partition, arg, funcNode;
switch (heuristic) {
case 'integral': {
const components = SemanticProcessor.getInstance().getIntegralArgs_(rest);
if (!components.intvar && !components.integrand.length) {
components.rest.unshift(func);
return components.rest;
}
const integrand = SemanticProcessor.getInstance().row(components.integrand);
funcNode = SemanticProcessor.getInstance().integralNode_(func, integrand, components.intvar);
SemanticHeuristics.run('intvar_from_fraction', funcNode);
components.rest.unshift(funcNode);
return components.rest;
}
case 'prefix': {
if (rest[0] && rest[0].type === semantic_meaning_SemanticType.FENCED) {
const arg = rest.shift();
if (!isNeutralFence(arg)) {
arg.role = semantic_meaning_SemanticRole.LEFTRIGHT;
}
funcNode = SemanticProcessor.getInstance().functionNode_(func, arg);
rest.unshift(funcNode);
return rest;
}
partition = sliceNodes(rest, isPrefixFunctionBoundary);
if (!partition.head.length) {
if (!partition.div ||
!isType(partition.div, semantic_meaning_SemanticType.APPL)) {
rest.unshift(func);
return rest;
}
arg = partition.div;
}
else {
arg = SemanticProcessor.getInstance().row(partition.head);
if (partition.div) {
partition.tail.unshift(partition.div);
}
}
funcNode = SemanticProcessor.getInstance().functionNode_(func, arg);
partition.tail.unshift(funcNode);
return partition.tail;
}
case 'bigop': {
partition = sliceNodes(rest, isBigOpBoundary);
if (!partition.head.length) {
rest.unshift(func);
return rest;
}
arg = SemanticProcessor.getInstance().row(partition.head);
funcNode = SemanticProcessor.getInstance().bigOpNode_(func, arg);
if (partition.div) {
partition.tail.unshift(partition.div);
}
partition.tail.unshift(funcNode);
return partition.tail;
}
case 'simple':
default: {
if (rest.length === 0) {
return [func];
}
const firstArg = rest[0];
if (firstArg.type === semantic_meaning_SemanticType.FENCED &&
!isNeutralFence(firstArg) &&
isSimpleFunctionScope(firstArg)) {
firstArg.role = semantic_meaning_SemanticRole.LEFTRIGHT;
SemanticProcessor.propagateFunctionRole_(func, semantic_meaning_SemanticRole.SIMPLEFUNC);
funcNode = SemanticProcessor.getInstance().functionNode_(func, rest.shift());
rest.unshift(funcNode);
return rest;
}
rest.unshift(func);
return rest;
}
}
}
getIntegralArgs_(nodes, args = []) {
if (nodes.length === 0) {
const partition = sliceNodes(args, isBigOpBoundary);
if (partition.div) {
partition.tail.unshift(partition.div);
}
return { integrand: partition.head, intvar: null, rest: partition.tail };
}
SemanticHeuristics.run('intvar_from_implicit', nodes);
const firstNode = nodes[0];
if (isGeneralFunctionBoundary(firstNode)) {
const { integrand: args2, rest: rest2 } = SemanticProcessor.getInstance().getIntegralArgs_(args);
return { integrand: args2, intvar: null, rest: rest2.concat(nodes) };
}
if (isIntegralDxBoundarySingle(firstNode)) {
firstNode.role = semantic_meaning_SemanticRole.INTEGRAL;
return { integrand: args, intvar: firstNode, rest: nodes.slice(1) };
}
if (nodes[1] && isIntegralDxBoundary(firstNode, nodes[1])) {
const intvar = SemanticProcessor.getInstance().prefixNode_(nodes[1], [firstNode]);
intvar.role = semantic_meaning_SemanticRole.INTEGRAL;
return { integrand: args, intvar: intvar, rest: nodes.slice(2) };
}
args.push(nodes.shift());
return SemanticProcessor.getInstance().getIntegralArgs_(nodes, args);
}
functionNode_(func, arg) {
const applNode = SemanticProcessor.getInstance().factory_.makeContentNode(NamedSymbol.functionApplication);
const appl = SemanticProcessor.getInstance().funcAppls[func.id];
if (appl) {
applNode.mathmlTree = appl.mathmlTree;
applNode.mathml = appl.mathml;
applNode.annotation = appl.annotation;
applNode.attributes = appl.attributes;
delete SemanticProcessor.getInstance().funcAppls[func.id];
}
applNode.type = semantic_meaning_SemanticType.PUNCTUATION;
applNode.role = semantic_meaning_SemanticRole.APPLICATION;
const funcop = SemanticProcessor.getFunctionOp_(func, function (node) {
return (isType(node, semantic_meaning_SemanticType.FUNCTION) ||
(isType(node, semantic_meaning_SemanticType.IDENTIFIER) &&
isRole(node, semantic_meaning_SemanticRole.SIMPLEFUNC)));
});
return SemanticProcessor.getInstance().functionalNode_(semantic_meaning_SemanticType.APPL, [func, arg], funcop, [applNode]);
}
bigOpNode_(bigOp, arg) {
const largeop = SemanticProcessor.getFunctionOp_(bigOp, (x) => isType(x, semantic_meaning_SemanticType.LARGEOP));
return SemanticProcessor.getInstance().functionalNode_(semantic_meaning_SemanticType.BIGOP, [bigOp, arg], largeop, []);
}
integralNode_(integral, integrand, intvar) {
integrand =
integrand || SemanticProcessor.getInstance().factory_.makeEmptyNode();
intvar = intvar || SemanticProcessor.getInstance().factory_.makeEmptyNode();
const largeop = SemanticProcessor.getFunctionOp_(integral, (x) => isType(x, semantic_meaning_SemanticType.LARGEOP));
return SemanticProcessor.getInstance().functionalNode_(semantic_meaning_SemanticType.INTEGRAL, [integral, integrand, intvar], largeop, []);
}
functionalNode_(type, children, operator, content) {
const funcop = children[0];
let oldParent;
if (operator) {
oldParent = operator.parent;
content.push(operator);
}
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(type, children, content);
newNode.role = funcop.role;
if (oldParent) {
operator.parent = oldParent;
}
return newNode;
}
fractionNode_(denom, enume) {
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.FRACTION, [denom, enume], []);
newNode.role = newNode.childNodes.every(function (x) {
return (isType(x, semantic_meaning_SemanticType.NUMBER) &&
isRole(x, semantic_meaning_SemanticRole.INTEGER));
})
? semantic_meaning_SemanticRole.VULGAR
: newNode.childNodes.every(isPureUnit)
? semantic_meaning_SemanticRole.UNIT
: semantic_meaning_SemanticRole.DIVISION;
return SemanticHeuristics.run('propagateSimpleFunction', newNode);
}
scriptNode_(nodes, role, opt_noSingle) {
let newNode;
switch (nodes.length) {
case 0:
newNode = SemanticProcessor.getInstance().factory_.makeEmptyNode();
break;
case 1:
newNode = nodes[0];
if (opt_noSingle) {
return newNode;
}
break;
default:
newNode = SemanticProcessor.getInstance().dummyNode_(nodes);
}
newNode.role = role;
return newNode;
}
findNestedRow_(nodes, semantic, level, value) {
if (level > 3) {
return null;
}
for (let i = 0, node; (node = nodes[i]); i++) {
const tag = dom_util_tagName(node);
if (tag !== MMLTAGS.MSPACE) {
if (tag === MMLTAGS.MROW) {
return SemanticProcessor.getInstance().findNestedRow_(toArray(node.childNodes), semantic, level + 1, value);
}
if (SemanticProcessor.findSemantics(node, semantic, value)) {
return node;
}
}
}
return null;
}
}
SemanticProcessor.FENCE_TO_PUNCT_ = {
[semantic_meaning_SemanticRole.METRIC]: semantic_meaning_SemanticRole.METRIC,
[semantic_meaning_SemanticRole.NEUTRAL]: semantic_meaning_SemanticRole.VBAR,
[semantic_meaning_SemanticRole.OPEN]: semantic_meaning_SemanticRole.OPENFENCE,
[semantic_meaning_SemanticRole.CLOSE]: semantic_meaning_SemanticRole.CLOSEFENCE
};
SemanticProcessor.MML_TO_LIMIT_ = {
[MMLTAGS.MSUB]: { type: semantic_meaning_SemanticType.LIMLOWER, length: 1 },
[MMLTAGS.MUNDER]: { type: semantic_meaning_SemanticType.LIMLOWER, length: 1 },
[MMLTAGS.MSUP]: { type: semantic_meaning_SemanticType.LIMUPPER, length: 1 },
[MMLTAGS.MOVER]: { type: semantic_meaning_SemanticType.LIMUPPER, length: 1 },
[MMLTAGS.MSUBSUP]: { type: semantic_meaning_SemanticType.LIMBOTH, length: 2 },
[MMLTAGS.MUNDEROVER]: { type: semantic_meaning_SemanticType.LIMBOTH, length: 2 }
};
SemanticProcessor.MML_TO_BOUNDS_ = {
[MMLTAGS.MSUB]: { type: semantic_meaning_SemanticType.SUBSCRIPT, length: 1, accent: false },
[MMLTAGS.MSUP]: {
type: semantic_meaning_SemanticType.SUPERSCRIPT,
length: 1,
accent: false
},
[MMLTAGS.MSUBSUP]: {
type: semantic_meaning_SemanticType.SUBSCRIPT,
length: 2,
accent: false
},
[MMLTAGS.MUNDER]: {
type: semantic_meaning_SemanticType.UNDERSCORE,
length: 1,
accent: true
},
[MMLTAGS.MOVER]: { type: semantic_meaning_SemanticType.OVERSCORE, length: 1, accent: true },
[MMLTAGS.MUNDEROVER]: {
type: semantic_meaning_SemanticType.UNDERSCORE,
length: 2,
accent: true
}
};
SemanticProcessor.CLASSIFY_FUNCTION_ = {
[semantic_meaning_SemanticRole.INTEGRAL]: 'integral',
[semantic_meaning_SemanticRole.SUM]: 'bigop',
[semantic_meaning_SemanticRole.PREFIXFUNC]: 'prefix',
[semantic_meaning_SemanticRole.LIMFUNC]: 'prefix',
[semantic_meaning_SemanticRole.SIMPLEFUNC]: 'prefix',
[semantic_meaning_SemanticRole.COMPFUNC]: 'prefix'
};
SemanticProcessor.MATHJAX_FONTS = {
'-tex-caligraphic': SemanticFont.CALIGRAPHIC,
'-tex-caligraphic-bold': SemanticFont.CALIGRAPHICBOLD,
'-tex-calligraphic': SemanticFont.CALIGRAPHIC,
'-tex-calligraphic-bold': SemanticFont.CALIGRAPHICBOLD,
'-tex-oldstyle': SemanticFont.OLDSTYLE,
'-tex-oldstyle-bold': SemanticFont.OLDSTYLEBOLD,
'-tex-mathit': SemanticFont.ITALIC
};
//# sourceMappingURL=semantic_processor.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_mathml.js
class SemanticMathml extends SemanticAbstractParser {
static getAttribute_(node, attr, def) {
if (!node.hasAttribute(attr)) {
return def;
}
const value = node.getAttribute(attr);
if (value.match(/^\s*$/)) {
return null;
}
return value;
}
constructor(options) {
super('MathML');
this.options = options;
SemanticHeuristics.options = options;
this.parseMap_ = new Map([
[MMLTAGS.SEMANTICS, this.semantics_.bind(this)],
[MMLTAGS.MATH, this.rows_.bind(this)],
[MMLTAGS.MROW, this.rows_.bind(this)],
[MMLTAGS.MPADDED, this.rows_.bind(this)],
[MMLTAGS.MSTYLE, this.rows_.bind(this)],
[MMLTAGS.MFRAC, this.fraction_.bind(this)],
[MMLTAGS.MSUB, this.limits_.bind(this)],
[MMLTAGS.MSUP, this.limits_.bind(this)],
[MMLTAGS.MSUBSUP, this.limits_.bind(this)],
[MMLTAGS.MOVER, this.limits_.bind(this)],
[MMLTAGS.MUNDER, this.limits_.bind(this)],
[MMLTAGS.MUNDEROVER, this.limits_.bind(this)],
[MMLTAGS.MROOT, this.root_.bind(this)],
[MMLTAGS.MSQRT, this.sqrt_.bind(this)],
[MMLTAGS.MTABLE, this.table_.bind(this)],
[MMLTAGS.MLABELEDTR, this.tableLabeledRow_.bind(this)],
[MMLTAGS.MTR, this.tableRow_.bind(this)],
[MMLTAGS.MTD, this.tableCell_.bind(this)],
[MMLTAGS.MS, this.text_.bind(this)],
[MMLTAGS.MTEXT, this.text_.bind(this)],
[MMLTAGS.MSPACE, this.space_.bind(this)],
[MMLTAGS.ANNOTATIONXML, this.text_.bind(this)],
[MMLTAGS.MI, this.identifier_.bind(this)],
[MMLTAGS.MN, this.number_.bind(this)],
[MMLTAGS.MO, this.operator_.bind(this)],
[MMLTAGS.MFENCED, this.fenced_.bind(this)],
[MMLTAGS.MENCLOSE, this.enclosed_.bind(this)],
[MMLTAGS.MMULTISCRIPTS, this.multiscripts_.bind(this)],
[MMLTAGS.ANNOTATION, this.empty_.bind(this)],
[MMLTAGS.NONE, this.empty_.bind(this)],
[MMLTAGS.MACTION, this.action_.bind(this)]
]);
const meaning = {
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.NUMBERSET,
font: SemanticFont.DOUBLESTRUCK
};
[
'C',
'H',
'N',
'P',
'Q',
'R',
'Z',
'ℂ',
'ℍ',
'ℕ',
'ℙ',
'ℚ',
'ℝ',
'ℤ'
].forEach(((x) => this.getFactory().defaultMap.set(x, meaning)).bind(this));
}
parse(mml) {
SemanticProcessor.getInstance().setNodeFactory(this.getFactory());
const children = toArray(mml.childNodes);
const tag = dom_util_tagName(mml);
const func = this.parseMap_.get(tag);
const newNode = (func ? func : this.dummy_.bind(this))(mml, children);
addAttributes(newNode, mml);
if ([
MMLTAGS.MATH,
MMLTAGS.MROW,
MMLTAGS.MPADDED,
MMLTAGS.MSTYLE,
MMLTAGS.SEMANTICS,
MMLTAGS.MACTION
].indexOf(tag) !== -1) {
return newNode;
}
newNode.mathml.unshift(mml);
newNode.mathmlTree = mml;
return newNode;
}
semantics_(_node, children) {
return children.length
? this.parse(children[0])
: this.getFactory().makeEmptyNode();
}
rows_(node, children) {
const semantics = node.getAttribute('semantics');
if (semantics && semantics.match('bspr_')) {
return SemanticProcessor.proof(node, semantics, this.parseList.bind(this));
}
children = purgeNodes(children);
let newNode;
if (children.length === 1) {
newNode = this.parse(children[0]);
if (newNode.type === semantic_meaning_SemanticType.EMPTY && !newNode.mathmlTree) {
newNode.mathmlTree = node;
}
}
else {
const snode = SemanticHeuristics.run('function_from_identifiers', node);
newNode =
snode && snode !== node
? snode
: SemanticProcessor.getInstance().row(this.parseList(children));
}
newNode.mathml.unshift(node);
return newNode;
}
fraction_(node, children) {
if (!children.length) {
return this.getFactory().makeEmptyNode();
}
const upper = this.parse(children[0]);
const lower = children[1]
? this.parse(children[1])
: this.getFactory().makeEmptyNode();
const sem = SemanticProcessor.getInstance().fractionLikeNode(upper, lower, node.getAttribute('linethickness'), node.getAttribute('bevelled') === 'true');
return sem;
}
limits_(node, children) {
return SemanticProcessor.getInstance().limitNode(dom_util_tagName(node), this.parseList(children));
}
root_(node, children) {
if (!children[1]) {
return this.sqrt_(node, children);
}
return this.getFactory().makeBranchNode(semantic_meaning_SemanticType.ROOT, [this.parse(children[1]), this.parse(children[0])], []);
}
sqrt_(_node, children) {
const semNodes = this.parseList(purgeNodes(children));
return this.getFactory().makeBranchNode(semantic_meaning_SemanticType.SQRT, [SemanticProcessor.getInstance().row(semNodes)], []);
}
table_(node, children) {
const semantics = node.getAttribute('semantics');
if (semantics && semantics.match('bspr_')) {
return SemanticProcessor.proof(node, semantics, this.parseList.bind(this));
}
const newNode = this.getFactory().makeBranchNode(semantic_meaning_SemanticType.TABLE, this.parseList(children), []);
newNode.mathmlTree = node;
return SemanticProcessor.tableToMultiline(newNode);
}
tableRow_(_node, children) {
const newNode = this.getFactory().makeBranchNode(semantic_meaning_SemanticType.ROW, this.parseList(children), []);
newNode.role = semantic_meaning_SemanticRole.TABLE;
return newNode;
}
tableLabeledRow_(node, children) {
var _a;
if (!children.length) {
return this.tableRow_(node, children);
}
const label = this.parse(children[0]);
label.role = semantic_meaning_SemanticRole.LABEL;
if (((_a = label.childNodes[0]) === null || _a === void 0 ? void 0 : _a.type) === semantic_meaning_SemanticType.TEXT) {
label.childNodes[0].role = semantic_meaning_SemanticRole.LABEL;
}
const newNode = this.getFactory().makeBranchNode(semantic_meaning_SemanticType.ROW, this.parseList(children.slice(1)), [label]);
newNode.role = semantic_meaning_SemanticRole.TABLE;
return newNode;
}
tableCell_(_node, children) {
const semNodes = this.parseList(purgeNodes(children));
let childNodes;
if (!semNodes.length) {
childNodes = [];
}
else if (semNodes.length === 1 &&
isType(semNodes[0], semantic_meaning_SemanticType.EMPTY)) {
childNodes = semNodes;
}
else {
childNodes = [SemanticProcessor.getInstance().row(semNodes)];
}
const newNode = this.getFactory().makeBranchNode(semantic_meaning_SemanticType.CELL, childNodes, []);
newNode.role = semantic_meaning_SemanticRole.TABLE;
return newNode;
}
space_(node, children) {
const width = node.getAttribute('width');
const match = width && width.match(/[a-z]*$/);
if (!match) {
return this.empty_(node, children);
}
const sizes = {
cm: 0.4,
pc: 0.5,
em: 0.5,
ex: 1,
in: 0.15,
pt: 5,
mm: 5
};
const unit = match[0];
const measure = parseFloat(width.slice(0, match.index));
const size = sizes[unit];
if (!size || isNaN(measure) || measure < size) {
return this.empty_(node, children);
}
const newNode = this.getFactory().makeUnprocessed(node);
return SemanticProcessor.getInstance().text(newNode, dom_util_tagName(node));
}
text_(node, children) {
const newNode = this.leaf_(node, children);
if (!node.textContent) {
return newNode;
}
newNode.updateContent(node.textContent, true);
return SemanticProcessor.getInstance().text(newNode, dom_util_tagName(node));
}
identifier_(node, children) {
const newNode = this.leaf_(node, children);
return SemanticProcessor.getInstance().identifierNode(newNode, SemanticProcessor.getInstance().font(node.getAttribute('mathvariant')), node.getAttribute('class'));
}
number_(node, children) {
const newNode = this.leaf_(node, children);
SemanticProcessor.number(newNode);
return newNode;
}
operator_(node, children) {
const newNode = this.leaf_(node, children);
SemanticProcessor.getInstance().operatorNode(newNode);
return newNode;
}
fenced_(node, children) {
const semNodes = this.parseList(purgeNodes(children));
const sepValue = SemanticMathml.getAttribute_(node, 'separators', ',');
const open = SemanticMathml.getAttribute_(node, 'open', '(');
const close = SemanticMathml.getAttribute_(node, 'close', ')');
const newNode = SemanticProcessor.getInstance().mfenced(open, close, sepValue, semNodes);
const nodes = SemanticProcessor.getInstance().tablesInRow([newNode]);
return nodes[0];
}
enclosed_(node, children) {
const semNodes = this.parseList(purgeNodes(children));
const newNode = this.getFactory().makeBranchNode(semantic_meaning_SemanticType.ENCLOSE, [SemanticProcessor.getInstance().row(semNodes)], []);
newNode.role =
node.getAttribute('notation') || semantic_meaning_SemanticRole.UNKNOWN;
return newNode;
}
multiscripts_(_node, children) {
if (!children.length) {
return this.getFactory().makeEmptyNode();
}
const base = this.parse(children.shift());
if (!children.length) {
return base;
}
const lsup = [];
const lsub = [];
const rsup = [];
const rsub = [];
let prescripts = false;
let scriptcount = 0;
for (let i = 0, child; (child = children[i]); i++) {
if (dom_util_tagName(child) === MMLTAGS.MPRESCRIPTS) {
prescripts = true;
scriptcount = 0;
continue;
}
prescripts
? scriptcount & 1
? lsup.push(child)
: lsub.push(child)
: scriptcount & 1
? rsup.push(child)
: rsub.push(child);
scriptcount++;
}
if (!purgeNodes(lsup).length &&
!purgeNodes(lsub).length) {
return SemanticProcessor.getInstance().pseudoTensor(base, this.parseList(rsub), this.parseList(rsup));
}
return SemanticProcessor.getInstance().tensor(base, this.parseList(lsub), this.parseList(lsup), this.parseList(rsub), this.parseList(rsup));
}
empty_(_node, _children) {
return this.getFactory().makeEmptyNode();
}
action_(node, children) {
const selection = children[node.hasAttribute('selection')
? parseInt(node.getAttribute('selection'), 10) - 1
: 0];
const stree = this.parse(selection);
stree.mathmlTree = selection;
return stree;
}
dummy_(node, _children) {
const unknown = this.getFactory().makeUnprocessed(node);
unknown.role = node.tagName;
unknown.textContent = node.textContent;
return unknown;
}
leaf_(mml, children) {
if (children.length === 1 &&
children[0].nodeType !== NodeType.TEXT_NODE) {
const node = this.getFactory().makeUnprocessed(mml);
node.role = children[0].tagName;
addAttributes(node, children[0]);
return node;
}
const node = this.getFactory().makeLeafNode(mml.textContent, SemanticProcessor.getInstance().font(mml.getAttribute('mathvariant')));
if (mml.hasAttribute('data-latex')) {
SemanticMap.LatexCommands.set(mml.getAttribute('data-latex'), mml.textContent);
}
return node;
}
}
//# sourceMappingURL=semantic_mathml.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_heuristic.js
class SemanticAbstractHeuristic {
constructor(name, method, predicate = (_x) => false) {
this.name = name;
this.apply = method;
this.applicable = predicate;
}
}
class SemanticTreeHeuristic extends SemanticAbstractHeuristic {
}
class SemanticMultiHeuristic extends SemanticAbstractHeuristic {
}
class SemanticMmlHeuristic extends SemanticAbstractHeuristic {
}
//# sourceMappingURL=semantic_heuristic.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/base_util.js
function removeEmpty(strs) {
return strs.filter((str) => str);
}
function interleaveLists(list1, list2) {
const result = [];
while (list1.length || list2.length) {
if (list1.length) {
result.push(list1.shift());
}
if (list2.length) {
result.push(list2.shift());
}
}
return result;
}
function setdifference(a, b) {
if (!a) {
return [];
}
if (!b) {
return a;
}
return a.filter((x) => b.indexOf(x) < 0);
}
//# sourceMappingURL=base_util.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/enrich_attr.js
const Prefix = 'data-semantic-';
var enrich_attr_Attribute;
(function (Attribute) {
Attribute["ADDED"] = "data-semantic-added";
Attribute["ALTERNATIVE"] = "data-semantic-alternative";
Attribute["CHILDREN"] = "data-semantic-children";
Attribute["COLLAPSED"] = "data-semantic-collapsed";
Attribute["CONTENT"] = "data-semantic-content";
Attribute["EMBELLISHED"] = "data-semantic-embellished";
Attribute["FENCEPOINTER"] = "data-semantic-fencepointer";
Attribute["FONT"] = "data-semantic-font";
Attribute["ID"] = "data-semantic-id";
Attribute["ANNOTATION"] = "data-semantic-annotation";
Attribute["ATTRIBUTES"] = "data-semantic-attributes";
Attribute["OPERATOR"] = "data-semantic-operator";
Attribute["OWNS"] = "data-semantic-owns";
Attribute["PARENT"] = "data-semantic-parent";
Attribute["POSTFIX"] = "data-semantic-postfix";
Attribute["PREFIX"] = "data-semantic-prefix";
Attribute["ROLE"] = "data-semantic-role";
Attribute["SPEECH"] = "data-semantic-speech";
Attribute["STRUCTURE"] = "data-semantic-structure";
Attribute["SUMMARY"] = "data-semantic-summary";
Attribute["TYPE"] = "data-semantic-type";
})(enrich_attr_Attribute || (enrich_attr_Attribute = {}));
const EnrichAttributes = [
enrich_attr_Attribute.ADDED,
enrich_attr_Attribute.ALTERNATIVE,
enrich_attr_Attribute.CHILDREN,
enrich_attr_Attribute.COLLAPSED,
enrich_attr_Attribute.CONTENT,
enrich_attr_Attribute.EMBELLISHED,
enrich_attr_Attribute.FENCEPOINTER,
enrich_attr_Attribute.FONT,
enrich_attr_Attribute.ID,
enrich_attr_Attribute.ANNOTATION,
enrich_attr_Attribute.ATTRIBUTES,
enrich_attr_Attribute.OPERATOR,
enrich_attr_Attribute.OWNS,
enrich_attr_Attribute.PARENT,
enrich_attr_Attribute.POSTFIX,
enrich_attr_Attribute.PREFIX,
enrich_attr_Attribute.ROLE,
enrich_attr_Attribute.SPEECH,
enrich_attr_Attribute.STRUCTURE,
enrich_attr_Attribute.SUMMARY,
enrich_attr_Attribute.TYPE
];
function makeIdList(nodes) {
return nodes
.map(function (node) {
return node.id;
})
.join(',');
}
function setAttributes(mml, semantic) {
mml.setAttribute(enrich_attr_Attribute.TYPE, semantic.type);
const attributes = semantic.allAttributes();
for (let i = 0, attr; (attr = attributes[i]); i++) {
mml.setAttribute(Prefix + attr[0].toLowerCase(), attr[1]);
}
if (semantic.childNodes.length) {
mml.setAttribute(enrich_attr_Attribute.CHILDREN, makeIdList(semantic.childNodes));
}
if (semantic.contentNodes.length) {
mml.setAttribute(enrich_attr_Attribute.CONTENT, makeIdList(semantic.contentNodes));
}
if (semantic.parent) {
mml.setAttribute(enrich_attr_Attribute.PARENT, semantic.parent.id.toString());
}
const external = semantic.attributesXml();
if (external) {
mml.setAttribute(enrich_attr_Attribute.ATTRIBUTES, external);
}
setPostfix(mml, semantic);
}
function setPostfix(mml, semantic) {
const postfix = [];
if (semantic.role === semantic_meaning_SemanticRole.MGLYPH) {
postfix.push('image');
}
if (semantic.attributes['href']) {
postfix.push('link');
}
if (postfix.length) {
mml.setAttribute(enrich_attr_Attribute.POSTFIX, postfix.join(' '));
}
}
function removeAttributePrefix(mml) {
return mml.toString().replace(new RegExp(Prefix, 'g'), '');
}
function addPrefix(attr) {
return (Prefix + attr);
}
function addMrow() {
const mrow = createElement('mrow');
mrow.setAttribute(enrich_attr_Attribute.ADDED, 'true');
return mrow;
}
//# sourceMappingURL=enrich_attr.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_skeleton.js
class SemanticSkeleton {
static fromTree(tree) {
return SemanticSkeleton.fromNode(tree.root);
}
static fromNode(node) {
return new SemanticSkeleton(SemanticSkeleton.fromNode_(node));
}
static fromString(skel) {
return new SemanticSkeleton(SemanticSkeleton.fromString_(skel));
}
static simpleCollapseStructure(strct) {
return typeof strct === 'number';
}
static contentCollapseStructure(strct) {
return (!!strct &&
!SemanticSkeleton.simpleCollapseStructure(strct) &&
strct[0] === 'c');
}
static interleaveIds(first, second) {
return interleaveLists(SemanticSkeleton.collapsedLeafs(first), SemanticSkeleton.collapsedLeafs(second));
}
static collapsedLeafs(...args) {
const collapseStructure = (coll) => {
if (SemanticSkeleton.simpleCollapseStructure(coll)) {
return [coll];
}
coll = coll;
return SemanticSkeleton.contentCollapseStructure(coll[1])
? coll.slice(2)
: coll.slice(1);
};
return args.reduce((x, y) => x.concat(collapseStructure(y)), []);
}
static fromStructure(mml, tree, options) {
return new SemanticSkeleton(SemanticSkeleton.tree_(mml, tree.root, options));
}
static combineContentChildren(type, _role, content, children) {
switch (type) {
case semantic_meaning_SemanticType.RELSEQ:
case semantic_meaning_SemanticType.INFIXOP:
case semantic_meaning_SemanticType.MULTIREL:
return interleaveLists(children, content);
case semantic_meaning_SemanticType.PREFIXOP:
return content.concat(children);
case semantic_meaning_SemanticType.POSTFIXOP:
return children.concat(content);
case semantic_meaning_SemanticType.MATRIX:
case semantic_meaning_SemanticType.VECTOR:
case semantic_meaning_SemanticType.FENCED:
children.unshift(content[0]);
children.push(content[1]);
return children;
case semantic_meaning_SemanticType.CASES:
children.unshift(content[0]);
return children;
case semantic_meaning_SemanticType.APPL:
return [children[0], content[0], children[1]];
case semantic_meaning_SemanticType.ROOT:
return [children[0], children[1]];
case semantic_meaning_SemanticType.ROW:
case semantic_meaning_SemanticType.LINE:
if (content.length) {
children.unshift(content[0]);
}
return children;
default:
return children;
}
}
static makeSexp_(struct) {
if (SemanticSkeleton.simpleCollapseStructure(struct)) {
return struct.toString();
}
if (SemanticSkeleton.contentCollapseStructure(struct)) {
return ('(' +
'c ' +
struct.slice(1).map(SemanticSkeleton.makeSexp_).join(' ') +
')');
}
return ('(' + struct.map(SemanticSkeleton.makeSexp_).join(' ') + ')');
}
static fromString_(skeleton) {
let str = skeleton.replace(/\(/g, '[');
str = str.replace(/\)/g, ']');
str = str.replace(/ /g, ',');
str = str.replace(/c/g, '"c"');
return JSON.parse(str);
}
static fromNode_(node) {
if (!node) {
return [];
}
const content = node.contentNodes;
let contentStructure;
if (content.length) {
contentStructure = content.map(SemanticSkeleton.fromNode_);
contentStructure.unshift('c');
}
const children = node.childNodes;
if (!children.length) {
return content.length ? [node.id, contentStructure] : node.id;
}
const structure = children.map(SemanticSkeleton.fromNode_);
if (content.length) {
structure.unshift(contentStructure);
}
structure.unshift(node.id);
return structure;
}
static tree_(mml, node, options, level = 0, posinset = 1, setsize = 1) {
if (!node) {
return [];
}
const id = node.id;
const skeleton = [id];
updateEvaluator(mml);
const mmlChild = evalXPath(`.//self::*[@${enrich_attr_Attribute.ID}=${id}]`, mml)[0];
if (!node.childNodes.length) {
SemanticSkeleton.addAria(mmlChild, level, posinset, setsize, options);
return node.id;
}
const children = SemanticSkeleton.combineContentChildren(node.type, node.role, node.contentNodes.map(function (x) {
return x;
}), node.childNodes.map(function (x) {
return x;
}));
if (mmlChild) {
SemanticSkeleton.addOwns_(mmlChild, children);
}
for (let i = 0, l = children.length, child; (child = children[i]); i++) {
skeleton.push(SemanticSkeleton.tree_(mml, child, options, level + 1, i + 1, l));
}
SemanticSkeleton.addAria(mmlChild, level, posinset, setsize, options);
return skeleton;
}
static addAria(node, level, posinset, setsize, options) {
const role = !options.tree ? 'treeitem' : level ? 'treeitem' : 'tree';
if (!options.aria || !node) {
return;
}
node.setAttribute('aria-level', level.toString());
node.setAttribute('aria-posinset', posinset.toString());
node.setAttribute('aria-setsize', setsize.toString());
node.setAttribute('role', role);
if (node.hasAttribute(enrich_attr_Attribute.OWNS)) {
node.setAttribute('aria-owns', node.getAttribute(enrich_attr_Attribute.OWNS));
}
}
static addOwns_(node, children) {
const collapsed = node.getAttribute(enrich_attr_Attribute.COLLAPSED);
const leafs = collapsed
? SemanticSkeleton.realLeafs_(SemanticSkeleton.fromString(collapsed).array)
: children.map((x) => x.id);
node.setAttribute(enrich_attr_Attribute.OWNS, leafs.join(' '));
}
static realLeafs_(sexp) {
if (SemanticSkeleton.simpleCollapseStructure(sexp)) {
return [sexp];
}
if (SemanticSkeleton.contentCollapseStructure(sexp)) {
return [];
}
sexp = sexp;
let result = [];
for (let i = 1; i < sexp.length; i++) {
result = result.concat(SemanticSkeleton.realLeafs_(sexp[i]));
}
return result;
}
constructor(skeleton) {
this.parents = null;
this.levelsMap = null;
skeleton = skeleton === 0 ? skeleton : skeleton || [];
this.array = skeleton;
}
populate() {
if (this.parents && this.levelsMap) {
return;
}
this.parents = {};
this.levelsMap = {};
this.populate_(this.array, this.array, []);
}
toString() {
return SemanticSkeleton.makeSexp_(this.array);
}
populate_(element, layer, parents) {
if (SemanticSkeleton.simpleCollapseStructure(element)) {
element = element;
this.levelsMap[element] = layer;
this.parents[element] =
element === parents[0] ? parents.slice(1) : parents;
return;
}
const newElement = SemanticSkeleton.contentCollapseStructure(element)
? element.slice(1)
: element;
const newParents = [newElement[0]].concat(parents);
for (let i = 0, l = newElement.length; i < l; i++) {
const current = newElement[i];
this.populate_(current, element, newParents);
}
}
isRoot(id) {
const level = this.levelsMap[id];
return id === level[0];
}
directChildren(id) {
if (!this.isRoot(id)) {
return [];
}
const level = this.levelsMap[id];
return level.slice(1).map((child) => {
if (SemanticSkeleton.simpleCollapseStructure(child)) {
return child;
}
if (SemanticSkeleton.contentCollapseStructure(child)) {
return child[1];
}
return child[0];
});
}
subtreeNodes(id) {
if (!this.isRoot(id)) {
return [];
}
const subtreeNodes_ = (tree, nodes) => {
if (SemanticSkeleton.simpleCollapseStructure(tree)) {
nodes.push(tree);
return;
}
tree = tree;
if (SemanticSkeleton.contentCollapseStructure(tree)) {
tree = tree.slice(1);
}
tree.forEach((x) => subtreeNodes_(x, nodes));
};
const level = this.levelsMap[id];
const subtree = [];
subtreeNodes_(level.slice(1), subtree);
return subtree;
}
}
//# sourceMappingURL=semantic_skeleton.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_heuristics.js
SemanticHeuristics.add(new SemanticTreeHeuristic('combine_juxtaposition', combineJuxtaposition));
function combineJuxtaposition(root) {
for (let i = root.childNodes.length - 1, child; (child = root.childNodes[i]); i--) {
if (!isImplicitOp(child) || child.nobreaking) {
continue;
}
root.childNodes.splice(i, 1, ...child.childNodes);
root.contentNodes.splice(i, 0, ...child.contentNodes);
child.childNodes.concat(child.contentNodes).forEach(function (x) {
x.parent = root;
});
root.addMathmlNodes(child.mathml);
}
return root;
}
SemanticHeuristics.add(new SemanticTreeHeuristic('propagateSimpleFunction', (node) => {
if ((node.type === semantic_meaning_SemanticType.INFIXOP ||
node.type === semantic_meaning_SemanticType.FRACTION) &&
node.childNodes.every(isSimpleFunction)) {
node.role = semantic_meaning_SemanticRole.COMPFUNC;
}
return node;
}, (_node) => SemanticHeuristics.options.domain === 'clearspeak'));
SemanticHeuristics.add(new SemanticTreeHeuristic('simpleNamedFunction', (node) => {
const specialFunctions = ['f', 'g', 'h', 'F', 'G', 'H'];
if (node.role !== semantic_meaning_SemanticRole.UNIT &&
specialFunctions.indexOf(node.textContent) !== -1) {
node.role = semantic_meaning_SemanticRole.SIMPLEFUNC;
}
return node;
}, (_node) => SemanticHeuristics.options.domain === 'clearspeak'));
SemanticHeuristics.add(new SemanticTreeHeuristic('propagateComposedFunction', (node) => {
if (node.type === semantic_meaning_SemanticType.FENCED &&
node.childNodes[0].role === semantic_meaning_SemanticRole.COMPFUNC) {
node.role = semantic_meaning_SemanticRole.COMPFUNC;
}
return node;
}, (_node) => SemanticHeuristics.options.domain === 'clearspeak'));
SemanticHeuristics.add(new SemanticTreeHeuristic('multioperator', (node) => {
if (node.role !== semantic_meaning_SemanticRole.UNKNOWN || node.textContent.length <= 1) {
return;
}
SemanticProcessor.compSemantics(node, 'role', semantic_meaning_SemanticRole);
SemanticProcessor.compSemantics(node, 'type', semantic_meaning_SemanticType);
}));
SemanticHeuristics.add(new SemanticMultiHeuristic('convert_juxtaposition', (nodes) => {
let partition = partitionNodes(nodes, function (x) {
return (x.textContent === NamedSymbol.invisibleTimes &&
x.type === semantic_meaning_SemanticType.OPERATOR);
});
partition = partition.rel.length
? juxtapositionPrePost(partition)
: partition;
nodes = partition.comp[0];
for (let i = 1, c, r; (c = partition.comp[i]), (r = partition.rel[i - 1]); i++) {
nodes.push(r);
nodes = nodes.concat(c);
}
partition = partitionNodes(nodes, function (x) {
return (x.textContent === NamedSymbol.invisibleTimes &&
(x.type === semantic_meaning_SemanticType.OPERATOR || x.type === semantic_meaning_SemanticType.INFIXOP));
});
if (!partition.rel.length) {
return nodes;
}
return recurseJuxtaposition(partition.comp.shift(), partition.rel, partition.comp);
}));
SemanticHeuristics.add(new SemanticTreeHeuristic('simple2prefix', (node) => {
if (node.textContent.length > 1 &&
!node.textContent[0].match(/[A-Z]/)) {
node.role = semantic_meaning_SemanticRole.PREFIXFUNC;
}
return node;
}, (node) => SemanticHeuristics.options.modality === 'braille' &&
node.type === semantic_meaning_SemanticType.IDENTIFIER));
SemanticHeuristics.add(new SemanticTreeHeuristic('detect_cycle', (node) => {
node.type = semantic_meaning_SemanticType.MATRIX;
node.role = semantic_meaning_SemanticRole.CYCLE;
const row = node.childNodes[0];
row.type = semantic_meaning_SemanticType.ROW;
row.role = semantic_meaning_SemanticRole.CYCLE;
row.textContent = '';
row.contentNodes = [];
return node;
}, (node) => node.type === semantic_meaning_SemanticType.FENCED &&
node.childNodes[0].type === semantic_meaning_SemanticType.INFIXOP &&
node.childNodes[0].role === semantic_meaning_SemanticRole.IMPLICIT &&
node.childNodes[0].childNodes.every(function (x) {
return x.type === semantic_meaning_SemanticType.NUMBER;
}) &&
node.childNodes[0].contentNodes.every(function (x) {
return x.role === semantic_meaning_SemanticRole.SPACE;
})));
function juxtapositionPrePost(partition) {
const rels = [];
const comps = [];
let next = partition.comp.shift();
let rel = null;
let collect = [];
while (partition.comp.length) {
collect = [];
if (next.length) {
if (rel) {
rels.push(rel);
}
comps.push(next);
rel = partition.rel.shift();
next = partition.comp.shift();
continue;
}
if (rel) {
collect.push(rel);
}
while (!next.length && partition.comp.length) {
next = partition.comp.shift();
collect.push(partition.rel.shift());
}
rel = convertPrePost(collect, next, comps);
}
if (!collect.length && !next.length) {
collect.push(rel);
convertPrePost(collect, next, comps);
}
else {
rels.push(rel);
comps.push(next);
}
return { rel: rels, comp: comps };
}
function convertPrePost(collect, next, comps) {
let rel = null;
if (!collect.length) {
return rel;
}
const prev = comps[comps.length - 1];
const prevExists = prev && prev.length;
const nextExists = next && next.length;
const processor = SemanticProcessor.getInstance();
if (prevExists && nextExists) {
if (next[0].type === semantic_meaning_SemanticType.INFIXOP &&
next[0].role === semantic_meaning_SemanticRole.IMPLICIT) {
rel = collect.pop();
prev.push(processor['postfixNode_'](prev.pop(), collect));
return rel;
}
rel = collect.shift();
const result = processor['prefixNode_'](next.shift(), collect);
next.unshift(result);
return rel;
}
if (prevExists) {
prev.push(processor['postfixNode_'](prev.pop(), collect));
return rel;
}
if (nextExists) {
next.unshift(processor['prefixNode_'](next.shift(), collect));
}
return rel;
}
function recurseJuxtaposition(acc, ops, elements) {
if (!ops.length) {
return acc;
}
const left = acc.pop();
const op = ops.shift();
const first = elements.shift();
if (op.type === semantic_meaning_SemanticType.INFIXOP &&
(op.role === semantic_meaning_SemanticRole.IMPLICIT || op.role === semantic_meaning_SemanticRole.UNIT)) {
Debugger.getInstance().output('Juxta Heuristic Case 2');
const right = (left ? [left, op] : [op]).concat(first);
return recurseJuxtaposition(acc.concat(right), ops, elements);
}
if (!left) {
Debugger.getInstance().output('Juxta Heuristic Case 3');
return recurseJuxtaposition([op].concat(first), ops, elements);
}
const right = first.shift();
if (!right) {
Debugger.getInstance().output('Juxta Heuristic Case 9');
const newOp = SemanticHeuristics.factory.makeBranchNode(semantic_meaning_SemanticType.INFIXOP, [left, ops.shift()], [op], op.textContent);
newOp.role = semantic_meaning_SemanticRole.IMPLICIT;
SemanticHeuristics.run('combine_juxtaposition', newOp);
ops.unshift(newOp);
return recurseJuxtaposition(acc, ops, elements);
}
if (isOperator(left) || isOperator(right)) {
Debugger.getInstance().output('Juxta Heuristic Case 4');
return recurseJuxtaposition(acc.concat([left, op, right]).concat(first), ops, elements);
}
let result = null;
if (isImplicitOp(left) && isImplicitOp(right)) {
Debugger.getInstance().output('Juxta Heuristic Case 5');
left.contentNodes.push(op);
left.contentNodes = left.contentNodes.concat(right.contentNodes);
left.childNodes.push(right);
left.childNodes = left.childNodes.concat(right.childNodes);
right.childNodes.forEach((x) => (x.parent = left));
op.parent = left;
left.addMathmlNodes(op.mathml);
left.addMathmlNodes(right.mathml);
result = left;
}
else if (isImplicitOp(left)) {
Debugger.getInstance().output('Juxta Heuristic Case 6');
left.contentNodes.push(op);
left.childNodes.push(right);
right.parent = left;
op.parent = left;
left.addMathmlNodes(op.mathml);
left.addMathmlNodes(right.mathml);
result = left;
}
else if (isImplicitOp(right)) {
Debugger.getInstance().output('Juxta Heuristic Case 7');
right.contentNodes.unshift(op);
right.childNodes.unshift(left);
left.parent = right;
op.parent = right;
right.addMathmlNodes(op.mathml);
right.addMathmlNodes(left.mathml);
result = right;
}
else {
Debugger.getInstance().output('Juxta Heuristic Case 8');
result = SemanticHeuristics.factory.makeBranchNode(semantic_meaning_SemanticType.INFIXOP, [left, right], [op], op.textContent);
result.role = semantic_meaning_SemanticRole.IMPLICIT;
}
acc.push(result);
return recurseJuxtaposition(acc.concat(first), ops, elements);
}
SemanticHeuristics.add(new SemanticMultiHeuristic('intvar_from_implicit', implicitUnpack, (nodes) => nodes[0] && isImplicit(nodes[0])));
function implicitUnpack(nodes) {
const children = nodes[0].childNodes;
nodes.splice(0, 1, ...children);
}
SemanticHeuristics.add(new SemanticTreeHeuristic('intvar_from_fraction', integralFractionArg, (node) => {
if (node.type !== semantic_meaning_SemanticType.INTEGRAL)
return false;
const [, integrand, intvar] = node.childNodes;
return (intvar.type === semantic_meaning_SemanticType.EMPTY &&
integrand.type === semantic_meaning_SemanticType.FRACTION);
}));
function integralFractionArg(node) {
const integrand = node.childNodes[1];
const enumerator = integrand.childNodes[0];
if (isIntegralDxBoundarySingle(enumerator)) {
enumerator.role = semantic_meaning_SemanticRole.INTEGRAL;
return;
}
if (!isImplicit(enumerator))
return;
const length = enumerator.childNodes.length;
const first = enumerator.childNodes[length - 2];
const second = enumerator.childNodes[length - 1];
if (isIntegralDxBoundarySingle(second)) {
second.role = semantic_meaning_SemanticRole.INTEGRAL;
return;
}
if (isIntegralDxBoundary(first, second)) {
const prefix = SemanticProcessor.getInstance()['prefixNode_'](second, [
first
]);
prefix.role = semantic_meaning_SemanticRole.INTEGRAL;
if (length === 2) {
integrand.childNodes[0] = prefix;
}
else {
enumerator.childNodes.pop();
enumerator.contentNodes.pop();
enumerator.childNodes[length - 2] = prefix;
prefix.parent = enumerator;
}
}
}
SemanticHeuristics.add(new SemanticTreeHeuristic('rewrite_subcases', rewriteSubcasesTable, (table) => {
let left = true;
let right = true;
const topLeft = table.childNodes[0].childNodes[0];
if (!eligibleNode(topLeft.mathmlTree)) {
left = false;
}
else {
for (let i = 1, row; (row = table.childNodes[i]); i++) {
if (row.childNodes[0].childNodes.length) {
left = false;
break;
}
}
}
if (left) {
table.addAnnotation('Emph', 'left');
}
const topRight = table.childNodes[0].childNodes[table.childNodes[0].childNodes.length - 1];
if (!eligibleNode(topRight.mathmlTree)) {
right = false;
}
else {
const firstRow = table.childNodes[0].childNodes.length;
for (let i = 1, row; (row = table.childNodes[i]); i++) {
if (row.childNodes.length >= firstRow) {
right = false;
break;
}
}
}
if (right) {
table.addAnnotation('Emph', 'right');
}
return left || right;
}));
function eligibleNode(node) {
return (node.childNodes[0] &&
node.childNodes[0].childNodes[0] &&
dom_util_tagName(node.childNodes[0]) === MMLTAGS.MPADDED &&
dom_util_tagName(node.childNodes[0].childNodes[0]) ===
MMLTAGS.MPADDED &&
dom_util_tagName(node.childNodes[0].childNodes[node.childNodes[0].childNodes.length - 1]) === MMLTAGS.MPHANTOM);
}
const rewritable = [
semantic_meaning_SemanticType.PUNCTUATED,
semantic_meaning_SemanticType.RELSEQ,
semantic_meaning_SemanticType.MULTIREL,
semantic_meaning_SemanticType.INFIXOP,
semantic_meaning_SemanticType.PREFIXOP,
semantic_meaning_SemanticType.POSTFIXOP
];
function rewriteSubcasesTable(table) {
table.addAnnotation('Emph', 'top');
let row = [];
if (table.hasAnnotation('Emph', 'left')) {
const topLeft = table.childNodes[0].childNodes[0].childNodes[0];
const cells = rewriteCell(topLeft, true);
cells.forEach((x) => x.addAnnotation('Emph', 'left'));
row = row.concat(cells);
for (let i = 0, line; (line = table.childNodes[i]); i++) {
line.childNodes.shift();
}
}
row.push(table);
if (table.hasAnnotation('Emph', 'right')) {
const topRight = table.childNodes[0].childNodes[table.childNodes[0].childNodes.length - 1]
.childNodes[0];
const cells = rewriteCell(topRight);
cells.forEach((x) => x.addAnnotation('Emph', 'left'));
row = row.concat(cells);
table.childNodes[0].childNodes.pop();
}
SemanticProcessor.tableToMultiline(table);
const newNode = SemanticProcessor.getInstance().row(row);
const annotation = table.annotation['Emph'];
table.annotation['Emph'] = ['table'];
annotation.forEach((x) => newNode.addAnnotation('Emph', x));
return newNode;
}
function rewriteCell(cell, left) {
if (!cell.childNodes.length) {
rewriteFence(cell);
return [cell];
}
let fence = null;
if (cell.type === semantic_meaning_SemanticType.PUNCTUATED &&
(left
? cell.role === semantic_meaning_SemanticRole.ENDPUNCT
: cell.role === semantic_meaning_SemanticRole.STARTPUNCT)) {
const children = cell.childNodes;
if (rewriteFence(children[left ? children.length - 1 : 0])) {
cell = children[left ? 0 : children.length - 1];
fence = children[left ? children.length - 1 : 0];
}
}
if (rewritable.indexOf(cell.type) !== -1) {
const children = cell.childNodes;
rewriteFence(children[left ? children.length - 1 : 0]);
const newNodes = SemanticSkeleton.combineContentChildren(cell.type, cell.role, cell.contentNodes, cell.childNodes);
if (fence) {
if (left) {
newNodes.push(fence);
}
else {
newNodes.unshift(fence);
}
}
return newNodes;
}
return fence ? (left ? [cell, fence] : [fence, cell]) : [cell];
}
const PUNCT_TO_FENCE_ = {
[semantic_meaning_SemanticRole.METRIC]: semantic_meaning_SemanticRole.METRIC,
[semantic_meaning_SemanticRole.VBAR]: semantic_meaning_SemanticRole.NEUTRAL,
[semantic_meaning_SemanticRole.OPENFENCE]: semantic_meaning_SemanticRole.OPEN,
[semantic_meaning_SemanticRole.CLOSEFENCE]: semantic_meaning_SemanticRole.CLOSE
};
function rewriteFence(fence) {
if (fence.type !== semantic_meaning_SemanticType.PUNCTUATION) {
return false;
}
const role = PUNCT_TO_FENCE_[fence.role];
if (!role) {
return false;
}
fence.role = role;
fence.type = semantic_meaning_SemanticType.FENCE;
fence.addAnnotation('Emph', 'fence');
return true;
}
SemanticHeuristics.add(new SemanticMultiHeuristic('ellipses', (nodes) => {
const newNodes = [];
let current = nodes.shift();
while (current) {
[current, nodes] = combineNodes(current, nodes, semantic_meaning_SemanticRole.FULLSTOP, semantic_meaning_SemanticRole.ELLIPSIS);
[current, nodes] = combineNodes(current, nodes, semantic_meaning_SemanticRole.DASH);
newNodes.push(current);
current = nodes.shift();
}
return newNodes;
}, (nodes) => nodes.length > 1));
function combineNodes(current, nodes, src, target = src) {
const collect = [];
while (current && current.role === src) {
collect.push(current);
current = nodes.shift();
}
if (!collect.length) {
return [current, nodes];
}
if (current) {
nodes.unshift(current);
}
return [
collect.length === 1 ? collect[0] : combinedNodes(collect, target),
nodes
];
}
function combinedNodes(nodes, role) {
const node = SemanticHeuristics.factory.makeBranchNode(semantic_meaning_SemanticType.PUNCTUATION, nodes, []);
node.role = role;
return node;
}
SemanticHeuristics.add(new SemanticMultiHeuristic('op_with_limits', (nodes) => {
const center = nodes[0];
center.type = semantic_meaning_SemanticType.LARGEOP;
center.role = semantic_meaning_SemanticRole.SUM;
return nodes;
}, (nodes) => {
return (nodes[0].type === semantic_meaning_SemanticType.OPERATOR &&
nodes
.slice(1)
.some((node) => node.type === semantic_meaning_SemanticType.RELSEQ ||
node.type === semantic_meaning_SemanticType.MULTIREL ||
(node.type === semantic_meaning_SemanticType.INFIXOP &&
node.role === semantic_meaning_SemanticRole.ELEMENT) ||
(node.type === semantic_meaning_SemanticType.PUNCTUATED &&
node.role === semantic_meaning_SemanticRole.SEQUENCE)));
}));
SemanticHeuristics.add(new SemanticMmlHeuristic('function_from_identifiers', (node) => {
const expr = toArray(node.childNodes)
.map((x) => x.textContent.trim())
.join('');
const meaning = SemanticMap.Meaning.get(expr);
if (meaning.type === semantic_meaning_SemanticType.UNKNOWN) {
return node;
}
const snode = SemanticHeuristics.factory.makeLeafNode(expr, SemanticProcessor.getInstance().font(node.getAttribute('mathvariant')));
snode.mathmlTree = node;
return snode;
}, (node) => {
const children = toArray(node.childNodes);
if (children.length < 2) {
return false;
}
return children.every((child) => dom_util_tagName(child) === MMLTAGS.MI &&
SemanticMap.Meaning.get(child.textContent.trim()).role ===
semantic_meaning_SemanticRole.LATINLETTER);
}));
SemanticHeuristics.add(new SemanticMultiHeuristic('bracketed_interval', (nodes) => {
const leftFence = nodes[0];
const rightFence = nodes[1];
const content = nodes.slice(2);
const childNode = SemanticProcessor.getInstance().row(content);
const fenced = SemanticHeuristics.factory.makeBranchNode(semantic_meaning_SemanticType.FENCED, [childNode], [leftFence, rightFence]);
fenced.role = semantic_meaning_SemanticRole.INTERVAL;
return fenced;
}, (nodes) => {
const leftFence = nodes[0];
const rightFence = nodes[1];
const content = nodes.slice(2);
if (!(leftFence &&
rightFence &&
((isCloseBrack(leftFence.textContent) &&
(isOpenBrack(rightFence.textContent) || isCloseBrack((rightFence.textContent))) ||
(isOpenBrack(rightFence.textContent) &&
(isOpenBrack(leftFence.textContent) || isCloseBrack(leftFence.textContent))))))) {
return false;
}
if (content.length === 1 &&
content[0].type === semantic_meaning_SemanticType.PUNCTUATED &&
content[0].contentNodes.length === 1) {
return true;
}
const partition = partitionNodes(content, isPunctuation);
return !!(partition.rel.length === 1 &&
partition.comp[0].length &&
partition.comp[1].length);
}));
function isOpenBrack(str) {
return ['[', '['].includes(str);
}
function isCloseBrack(str) {
return [']', ']'].includes(str);
}
function isOpenParen(str) {
return ['(', '⁽', '₍'].includes(str);
}
function isCloseParen(str) {
return [')', '⁾', '₎'].includes(str);
}
function isInfty(node) {
return node.role === semantic_meaning_SemanticRole.INFTY ||
(node.type === semantic_meaning_SemanticType.PREFIXOP &&
node.childNodes[0].role === semantic_meaning_SemanticRole.INFTY);
}
SemanticHeuristics.add(new SemanticTreeHeuristic('interval_heuristic', (node) => {
node.role = semantic_meaning_SemanticRole.INTERVAL;
return node;
}, (node) => {
return isPotentialInterval(node);
}));
function isPotentialInterval(node) {
const child = node.childNodes[0];
if (node.type !== semantic_meaning_SemanticType.FENCED ||
(child === null || child === void 0 ? void 0 : child.type) !== semantic_meaning_SemanticType.PUNCTUATED ||
(child === null || child === void 0 ? void 0 : child.childNodes.length) !== 3 ||
(child === null || child === void 0 ? void 0 : child.contentNodes.length) !== 1 ||
(child === null || child === void 0 ? void 0 : child.childNodes[1].role) !== semantic_meaning_SemanticRole.COMMA) {
return false;
}
const first = node.childNodes[0].childNodes[0];
const second = node.childNodes[0].childNodes[2];
const left = node.contentNodes[0].textContent;
const right = node.contentNodes[1].textContent;
if ((isOpenBrack(left) && isCloseParen(right)) ||
(isOpenParen(left) && isCloseBrack(right))) {
return true;
}
if (isOpenParen(left) && isCloseParen(right) &&
(isInfty(first) || isInfty(second))) {
return true;
}
return false;
}
SemanticHeuristics.add(new SemanticTreeHeuristic('propagateInterval', (node) => {
node.childNodes.forEach(child => {
if (isPotentialInterval(child)) {
child.role = semantic_meaning_SemanticRole.INTERVAL;
}
});
return node;
}, (node) => {
return isMembership(node);
}));
//# sourceMappingURL=semantic_heuristics.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/special_annotators.js
function isSimpleExpression(node) {
return (isSimpleNumber_(node) ||
isSimpleLetters_(node) ||
isSimpleDegree_(node) ||
isSimpleNegative_(node) ||
isSimpleFunction_(node));
}
function isSimpleFunction_(node) {
return (node.type === semantic_meaning_SemanticType.APPL &&
(node.childNodes[0].role === semantic_meaning_SemanticRole.PREFIXFUNC ||
node.childNodes[0].role === semantic_meaning_SemanticRole.SIMPLEFUNC) &&
(isSimple_(node.childNodes[1]) ||
(node.childNodes[1].type === semantic_meaning_SemanticType.FENCED &&
isSimple_(node.childNodes[1].childNodes[0]))));
}
function isSimpleNegative_(node) {
return (node.type === semantic_meaning_SemanticType.PREFIXOP &&
node.role === semantic_meaning_SemanticRole.NEGATIVE &&
isSimple_(node.childNodes[0]) &&
node.childNodes[0].type !== semantic_meaning_SemanticType.PREFIXOP &&
node.childNodes[0].type !== semantic_meaning_SemanticType.APPL &&
node.childNodes[0].type !== semantic_meaning_SemanticType.PUNCTUATED);
}
function isSimpleDegree_(node) {
return (node.type === semantic_meaning_SemanticType.PUNCTUATED &&
node.role === semantic_meaning_SemanticRole.ENDPUNCT &&
node.childNodes.length === 2 &&
node.childNodes[1].role === semantic_meaning_SemanticRole.DEGREE &&
(isLetter_(node.childNodes[0]) ||
isNumber_(node.childNodes[0]) ||
(node.childNodes[0].type === semantic_meaning_SemanticType.PREFIXOP &&
node.childNodes[0].role === semantic_meaning_SemanticRole.NEGATIVE &&
(isLetter_(node.childNodes[0].childNodes[0]) ||
isNumber_(node.childNodes[0].childNodes[0])))));
}
function isSimpleLetters_(node) {
return (isLetter_(node) ||
(node.type === semantic_meaning_SemanticType.INFIXOP &&
node.role === semantic_meaning_SemanticRole.IMPLICIT &&
((node.childNodes.length === 2 &&
(isLetter_(node.childNodes[0]) ||
isSimpleNumber_(node.childNodes[0])) &&
isLetter_(node.childNodes[1])) ||
(node.childNodes.length === 3 &&
isSimpleNumber_(node.childNodes[0]) &&
isLetter_(node.childNodes[1]) &&
isLetter_(node.childNodes[2])))));
}
function isSimple_(node) {
return node.hasAnnotation('clearspeak', 'simple');
}
function isLetter_(node) {
return (node.type === semantic_meaning_SemanticType.IDENTIFIER &&
(node.role === semantic_meaning_SemanticRole.LATINLETTER ||
node.role === semantic_meaning_SemanticRole.GREEKLETTER ||
node.role === semantic_meaning_SemanticRole.OTHERLETTER ||
node.role === semantic_meaning_SemanticRole.SIMPLEFUNC));
}
function isNumber_(node) {
return (node.type === semantic_meaning_SemanticType.NUMBER &&
(node.role === semantic_meaning_SemanticRole.INTEGER || node.role === semantic_meaning_SemanticRole.FLOAT));
}
function isSimpleNumber_(node) {
return isNumber_(node) || isSimpleFraction_(node);
}
function isSimpleFraction_(node) {
if (hasPreference('Fraction_Over') || hasPreference('Fraction_FracOver')) {
return false;
}
if (node.type !== semantic_meaning_SemanticType.FRACTION ||
node.role !== semantic_meaning_SemanticRole.VULGAR) {
return false;
}
if (hasPreference('Fraction_Ordinal')) {
return true;
}
const enumerator = parseInt(node.childNodes[0].textContent, 10);
const denominator = parseInt(node.childNodes[1].textContent, 10);
return (enumerator > 0 && enumerator < 20 && denominator > 0 && denominator < 11);
}
function hasPreference(pref) {
return Engine.getInstance().options.style === pref;
}
register(new SemanticAnnotator('clearspeak', 'simple', function (node) {
return isSimpleExpression(node) ? 'simple' : '';
}));
activate('clearspeak', 'simple');
function isUnitExpression(node) {
return ((node.type === semantic_meaning_SemanticType.TEXT && node.role !== semantic_meaning_SemanticRole.LABEL) ||
(node.type === semantic_meaning_SemanticType.PUNCTUATED &&
node.role === semantic_meaning_SemanticRole.TEXT &&
isNumber_(node.childNodes[0]) &&
allTextLastContent_(node.childNodes.slice(1))) ||
(node.type === semantic_meaning_SemanticType.IDENTIFIER &&
node.role === semantic_meaning_SemanticRole.UNIT) ||
(node.type === semantic_meaning_SemanticType.INFIXOP &&
(node.role === semantic_meaning_SemanticRole.IMPLICIT || node.role === semantic_meaning_SemanticRole.UNIT)));
}
function allTextLastContent_(nodes) {
for (let i = 0; i < nodes.length - 1; i++) {
if (!(nodes[i].type === semantic_meaning_SemanticType.TEXT && nodes[i].textContent === '')) {
return false;
}
}
return nodes[nodes.length - 1].type === semantic_meaning_SemanticType.TEXT;
}
register(new SemanticAnnotator('clearspeak', 'unit', function (node) {
return isUnitExpression(node) ? 'unit' : '';
}));
activate('clearspeak', 'unit');
const NUMBER_PROPAGATORS = [
semantic_meaning_SemanticType.MULTIREL,
semantic_meaning_SemanticType.RELSEQ,
semantic_meaning_SemanticType.APPL,
semantic_meaning_SemanticType.ROW,
semantic_meaning_SemanticType.LINE
];
const NUMBER_INHIBITORS = [
semantic_meaning_SemanticType.SUBSCRIPT,
semantic_meaning_SemanticType.SUPERSCRIPT,
semantic_meaning_SemanticType.OVERSCORE,
semantic_meaning_SemanticType.UNDERSCORE
];
function checkParent(node, info) {
const parent = node.parent;
if (!parent) {
return false;
}
const type = parent.type;
if (NUMBER_PROPAGATORS.indexOf(type) !== -1 ||
(type === semantic_meaning_SemanticType.PREFIXOP &&
parent.role === semantic_meaning_SemanticRole.NEGATIVE &&
!info.script &&
!info.enclosed) ||
(type === semantic_meaning_SemanticType.PREFIXOP &&
parent.role === semantic_meaning_SemanticRole.GEOMETRY)) {
return true;
}
if (type === semantic_meaning_SemanticType.PUNCTUATED) {
if (!info.enclosed || parent.role === semantic_meaning_SemanticRole.TEXT) {
return true;
}
}
return false;
}
function propagateNumber(node, info) {
if (!node.childNodes.length) {
if (checkParent(node, info)) {
info.number = true;
info.script = false;
info.enclosed = false;
}
return [
info['number'] ? 'number' : '',
{ number: false, enclosed: info.enclosed, script: info.script }
];
}
if (NUMBER_INHIBITORS.indexOf(node.type) !== -1) {
info.script = true;
}
if (node.type === semantic_meaning_SemanticType.FENCED) {
info.number = false;
info.enclosed = true;
return ['', info];
}
if (node.type === semantic_meaning_SemanticType.PREFIXOP &&
node.role !== semantic_meaning_SemanticRole.GEOMETRY &&
node.role !== semantic_meaning_SemanticRole.NEGATIVE) {
info.number = false;
return ['', info];
}
if (checkParent(node, info)) {
info.number = true;
info.enclosed = false;
}
return ['', info];
}
register(new SemanticVisitor('nemeth', 'number', propagateNumber, { number: true }));
activate('nemeth', 'number');
function annotateDepth(node) {
if (!node.parent) {
return [1];
}
const depth = parseInt(node.parent.annotation['depth'][0]);
return [depth + 1];
}
register(new SemanticVisitor('depth', 'depth', annotateDepth));
activate('depth', 'depth');
//# sourceMappingURL=special_annotators.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_tree.js
class SemanticTree {
static empty() {
const empty = parseInput(' ');
const stree = new SemanticTree(empty, new Options());
stree.mathml = empty;
return stree;
}
static fromNode(semantic, opt_mathml) {
const stree = SemanticTree.empty();
stree.root = semantic;
if (opt_mathml) {
stree.mathml = opt_mathml;
}
return stree;
}
static fromRoot(semantic, opt_mathml) {
let root = semantic;
while (root.parent) {
root = root.parent;
}
const stree = SemanticTree.fromNode(root);
if (opt_mathml) {
stree.mathml = opt_mathml;
}
return stree;
}
static fromXml(xml) {
const stree = SemanticTree.empty();
if (xml.childNodes[0]) {
stree.root = SemanticNode.fromXml(xml.childNodes[0]);
}
return stree;
}
constructor(mathml, options) {
this.mathml = mathml;
this.options = options;
this.parser = new SemanticMathml(options);
this.root = this.parser.parse(mathml);
this.collator = this.parser.getFactory().leafMap.collateMeaning();
const newDefault = this.collator.newDefault();
if (newDefault) {
this.parser = new SemanticMathml(options);
this.parser.getFactory().defaultMap = newDefault;
this.root = this.parser.parse(mathml);
}
unitVisitor.visit(this.root, {});
annotate(this.root);
}
xml(opt_brief) {
const xml = parseInput(' ');
const xmlRoot = this.root.xml(xml.ownerDocument, opt_brief);
xml.appendChild(xmlRoot);
return xml;
}
toString(opt_brief) {
return serializeXml(this.xml(opt_brief));
}
formatXml(opt_brief) {
const xml = this.toString(opt_brief);
return formatXml(xml);
}
displayTree() {
this.root.displayTree();
}
replaceNode(oldNode, newNode) {
const parent = oldNode.parent;
if (!parent) {
this.root = newNode;
return;
}
parent.replaceChild(oldNode, newNode);
}
toJson() {
const json = {};
json['stree'] = this.root.toJson();
return json;
}
}
const unitVisitor = new SemanticVisitor('general', 'unit', (node, _info) => {
if (isUnitProduct(node)) {
node.role = semantic_meaning_SemanticRole.UNIT;
}
return false;
});
//# sourceMappingURL=semantic_tree.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic.js
function xmlTree(mml, options) {
return getTree(mml, options).xml();
}
function getTree(mml, options) {
return new SemanticTree(mml, options);
}
function getTreeFromString(expr, options) {
const mml = DomUtil.parseInput(expr);
return getTree(mml, options);
}
//# sourceMappingURL=semantic.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/enrich_case.js
function getCase(node) {
for (let i = 0, enrich; (enrich = factory[i]); i++) {
if (enrich.test(node)) {
return enrich.constr(node);
}
}
return null;
}
const factory = [];
//# sourceMappingURL=enrich_case.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/enrich_mathml.js
const SETTINGS = {
collapsed: true,
implicit: true
};
const IDS = new Map();
function enrich(mml, semantic, options) {
Debugger.getInstance().generate(() => [
'Original MathML',
formattedOutput(mml)
]);
IDS.clear();
walkTree(semantic.root);
if (options.structure) {
mml.setAttribute(enrich_attr_Attribute.STRUCTURE, SemanticSkeleton.fromStructure(mml, semantic, options).toString());
}
Debugger.getInstance().generate(() => [
'Semantic Tree\n',
formattedOutput(semantic),
'Semantically enriched MathML\n',
formattedOutput(mml)
]);
return mml;
}
function walkTree(semantic) {
Debugger.getInstance().generate(() => [
'WALKING START: ',
semantic.toString()
]);
const specialCase = getCase(semantic);
let newNode;
if (specialCase) {
newNode = specialCase.getMathml();
Debugger.getInstance().generate(() => [
'WALKING END: ',
semantic.toString()
]);
return ascendNewNode(newNode);
}
if (semantic.mathml.length === 1) {
Debugger.getInstance().output('Walktree Case 0');
if (!semantic.childNodes.length) {
Debugger.getInstance().output('Walktree Case 0.1');
newNode = semantic.mathml[0];
setAttributes(newNode, semantic);
Debugger.getInstance().generate(() => [
'WALKING END: ',
semantic.toString()
]);
return ascendNewNode(newNode);
}
const fchild = semantic.childNodes[0];
if (semantic.childNodes.length === 1 &&
fchild.type === semantic_meaning_SemanticType.EMPTY) {
Debugger.getInstance().output('Walktree Case 0.2');
newNode = semantic.mathml[0];
setAttributes(newNode, semantic);
newNode.appendChild(walkTree(fchild));
Debugger.getInstance().generate(() => [
'WALKING END: ',
semantic.toString()
]);
return ascendNewNode(newNode);
}
semantic.childNodes.forEach((child) => {
if (!child.mathml.length) {
child.mathml = [createInvisibleOperator(child)];
}
});
}
const newContent = semantic.contentNodes.map(cloneContentNode);
setOperatorAttribute(semantic, newContent);
const newChildren = semantic.childNodes.map(walkTree);
const childrenList = SemanticSkeleton.combineContentChildren(semantic.type, semantic.role, newContent, newChildren);
newNode = semantic.mathmlTree;
if (newNode === null) {
Debugger.getInstance().output('Walktree Case 1');
newNode = introduceNewLayer(childrenList, semantic);
}
else {
const attached = attachedElement(childrenList);
Debugger.getInstance().output('Walktree Case 2');
if (attached) {
Debugger.getInstance().output('Walktree Case 2.1');
newNode = parentNode(attached);
}
else {
Debugger.getInstance().output('Walktree Case 2.2');
newNode = getInnerNode(newNode);
}
}
newNode = rewriteMfenced(newNode);
mergeChildren(newNode, childrenList, semantic);
if (!IDS.has(semantic.id)) {
IDS.set(semantic.id, true);
setAttributes(newNode, semantic);
}
Debugger.getInstance().generate(() => ['WALKING END: ', semantic.toString()]);
return ascendNewNode(newNode);
}
function introduceNewLayer(children, semantic) {
const lca = mathmlLca(children);
let newNode = lca.node;
const info = lca.type;
if (info !== lcaType.VALID ||
!hasEmptyTag(newNode) ||
(!newNode.parentNode && semantic.parent)) {
Debugger.getInstance().output('Walktree Case 1.1');
newNode = addMrow();
if (info === lcaType.PRUNED) {
Debugger.getInstance().output('Walktree Case 1.1.0');
newNode = introduceLayerAboveLca(newNode, lca.node, children);
}
else if (children[0]) {
Debugger.getInstance().output('Walktree Case 1.1.1');
const node = attachedElement(children);
if (node) {
const oldChildren = childrenSubset(parentNode(node), children);
replaceNode(node, newNode);
oldChildren.forEach(function (x) {
newNode.appendChild(x);
});
}
else {
moveSemanticAttributes(newNode, children[0]);
newNode = children[0];
}
}
}
if (!semantic.mathmlTree) {
semantic.mathmlTree = newNode;
}
return newNode;
}
function introduceLayerAboveLca(mrow, lca, children) {
let innerNode = descendNode(lca);
if (hasMathTag(innerNode)) {
Debugger.getInstance().output('Walktree Case 1.1.0.0');
moveSemanticAttributes(innerNode, mrow);
toArray(innerNode.childNodes).forEach(function (x) {
mrow.appendChild(x);
});
const auxNode = mrow;
mrow = innerNode;
innerNode = auxNode;
}
const index = children.indexOf(lca);
children[index] = innerNode;
replaceNode(innerNode, mrow);
mrow.appendChild(innerNode);
children.forEach(function (x) {
mrow.appendChild(x);
});
return mrow;
}
function moveSemanticAttributes(oldNode, newNode) {
for (const attr of EnrichAttributes) {
if (oldNode.hasAttribute(attr)) {
newNode.setAttribute(attr, oldNode.getAttribute(attr));
oldNode.removeAttribute(attr);
}
}
}
function childrenSubset(node, newChildren) {
const oldChildren = toArray(node.childNodes);
let leftIndex = +Infinity;
let rightIndex = -Infinity;
newChildren.forEach(function (child) {
const index = oldChildren.indexOf(child);
if (index !== -1) {
leftIndex = Math.min(leftIndex, index);
rightIndex = Math.max(rightIndex, index);
}
});
return oldChildren.slice(leftIndex, rightIndex + 1);
}
function collateChildNodes(node, children, semantic) {
const oldChildren = [];
let newChildren = toArray(node.childNodes);
let notFirst = false;
while (newChildren.length) {
const child = newChildren.shift();
if (child.hasAttribute(enrich_attr_Attribute.TYPE)) {
oldChildren.push(child);
continue;
}
const collect = collectChildNodes(child, children);
if (collect.length === 0) {
continue;
}
if (collect.length === 1) {
oldChildren.push(child);
continue;
}
if (notFirst) {
child.setAttribute('AuxiliaryImplicit', true);
}
else {
notFirst = true;
}
newChildren = collect.concat(newChildren);
}
const rear = [];
const semChildren = semantic.childNodes.map(function (x) {
return x.mathmlTree;
});
while (semChildren.length) {
const schild = semChildren.pop();
if (!schild) {
continue;
}
if (oldChildren.indexOf(schild) !== -1) {
break;
}
if (children.indexOf(schild) !== -1) {
rear.unshift(schild);
}
}
return oldChildren.concat(rear);
}
function collectChildNodes(node, children) {
const collect = [];
let newChildren = toArray(node.childNodes);
while (newChildren.length) {
const child = newChildren.shift();
if (child.nodeType !== NodeType.ELEMENT_NODE) {
continue;
}
if (child.hasAttribute(enrich_attr_Attribute.TYPE) ||
children.indexOf(child) !== -1) {
collect.push(child);
continue;
}
newChildren = toArray(child.childNodes).concat(newChildren);
}
return collect;
}
function mergeChildren(node, newChildren, semantic) {
if (!newChildren.length)
return;
if (newChildren.length === 1 && node === newChildren[0])
return;
const oldChildren = semantic.role === semantic_meaning_SemanticRole.IMPLICIT &&
SemanticHeuristics.flags.combine_juxtaposition
? collateChildNodes(node, newChildren, semantic)
: toArray(node.childNodes);
if (!oldChildren.length) {
newChildren.forEach(function (x) {
node.appendChild(x);
});
return;
}
let oldCounter = 0;
while (newChildren.length) {
const newChild = newChildren[0];
if (oldChildren[oldCounter] === newChild ||
functionApplication(oldChildren[oldCounter], newChild)) {
newChildren.shift();
oldCounter++;
continue;
}
if (oldChildren[oldCounter] &&
newChildren.indexOf(oldChildren[oldCounter]) === -1) {
oldCounter++;
continue;
}
if (isDescendant(newChild, node)) {
newChildren.shift();
continue;
}
const oldChild = oldChildren[oldCounter];
if (!oldChild) {
if (newChild.parentNode) {
node = parentNode(newChild);
newChildren.shift();
continue;
}
const nextChild = newChildren[1];
if (nextChild && nextChild.parentNode) {
node = parentNode(nextChild);
node.insertBefore(newChild, nextChild);
newChildren.shift();
newChildren.shift();
continue;
}
node.insertBefore(newChild, null);
newChildren.shift();
continue;
}
insertNewChild(node, oldChild, newChild);
newChildren.shift();
}
}
function insertNewChild(node, oldChild, newChild) {
let parent = oldChild;
let next = parentNode(parent);
while (next &&
next.firstChild === parent &&
!parent.hasAttribute('AuxiliaryImplicit') &&
next !== node) {
parent = next;
next = parentNode(parent);
}
if (next) {
next.insertBefore(newChild, parent);
parent.removeAttribute('AuxiliaryImplicit');
}
}
function isDescendant(child, node) {
if (!child) {
return false;
}
do {
child = parentNode(child);
if (child === node) {
return true;
}
} while (child);
return false;
}
function functionApplication(oldNode, newNode) {
const appl = NamedSymbol.functionApplication;
if (oldNode &&
newNode &&
oldNode.textContent &&
newNode.textContent &&
oldNode.textContent === appl &&
newNode.textContent === appl &&
newNode.getAttribute(enrich_attr_Attribute.ADDED) === 'true') {
for (let i = 0, attr; (attr = oldNode.attributes[i]); i++) {
if (!newNode.hasAttribute(attr.nodeName)) {
newNode.setAttribute(attr.nodeName, attr.nodeValue);
}
}
replaceNode(oldNode, newNode);
return true;
}
return false;
}
var lcaType;
(function (lcaType) {
lcaType["VALID"] = "valid";
lcaType["INVALID"] = "invalid";
lcaType["PRUNED"] = "pruned";
})(lcaType || (lcaType = {}));
function mathmlLca(children) {
const leftMost = attachedElement(children);
if (!leftMost) {
return { type: lcaType.INVALID, node: null };
}
const rightMost = attachedElement(children.slice().reverse());
if (leftMost === rightMost) {
return { type: lcaType.VALID, node: leftMost };
}
const leftPath = pathToRoot(leftMost);
const newLeftPath = prunePath(leftPath, children);
const rightPath = pathToRoot(rightMost, function (x) {
return newLeftPath.indexOf(x) !== -1;
});
const lca = rightPath[0];
const lIndex = newLeftPath.indexOf(lca);
if (lIndex === -1) {
return { type: lcaType.INVALID, node: null };
}
return {
type: newLeftPath.length !== leftPath.length
? lcaType.PRUNED
: validLca(newLeftPath[lIndex + 1], rightPath[1])
? lcaType.VALID
: lcaType.INVALID,
node: lca
};
}
function prunePath(path, children) {
let i = 0;
while (path[i] && children.indexOf(path[i]) === -1) {
i++;
}
return path.slice(0, i + 1);
}
function attachedElement(nodes) {
let count = 0;
let attached = null;
while (!attached && count < nodes.length) {
if (nodes[count].parentNode) {
attached = nodes[count];
}
count++;
}
return attached;
}
function pathToRoot(node, opt_test) {
const test = opt_test || ((_x) => false);
const path = [node];
while (!test(node) && !hasMathTag(node) && node.parentNode) {
node = parentNode(node);
path.unshift(node);
}
return path;
}
function validLca(left, right) {
return !!(left && right && !left.previousSibling && !right.nextSibling);
}
function ascendNewNode(newNode) {
while (!hasMathTag(newNode) && unitChild(newNode)) {
newNode = parentNode(newNode);
}
return newNode;
}
function descendNode(node) {
const children = toArray(node.childNodes);
if (!children) {
return node;
}
const remainder = children.filter(function (child) {
return (child.nodeType === NodeType.ELEMENT_NODE &&
!hasIgnoreTag(child));
});
if (remainder.length === 1 &&
hasEmptyTag(remainder[0]) &&
!remainder[0].hasAttribute(enrich_attr_Attribute.TYPE)) {
return descendNode(remainder[0]);
}
return node;
}
function unitChild(node) {
const parent = parentNode(node);
if (!parent || !hasEmptyTag(parent)) {
return false;
}
return toArray(parent.childNodes).every(function (child) {
return child === node || isIgnorable(child);
});
}
function isIgnorable(node) {
if (node.nodeType !== NodeType.ELEMENT_NODE) {
return true;
}
if (!node || hasIgnoreTag(node)) {
return true;
}
const children = toArray(node.childNodes);
if ((!hasEmptyTag(node) && children.length) ||
hasDisplayTag(node) ||
node.hasAttribute(enrich_attr_Attribute.TYPE) ||
isOrphanedGlyph(node)) {
return false;
}
return toArray(node.childNodes).every(isIgnorable);
}
function parentNode(element) {
return element.parentNode;
}
function addCollapsedAttribute(node, collapsed) {
const skeleton = new SemanticSkeleton(collapsed);
node.setAttribute(enrich_attr_Attribute.COLLAPSED, skeleton.toString());
}
function cloneContentNode(content) {
if (content.mathml.length) {
return walkTree(content);
}
const clone = SETTINGS.implicit
? createInvisibleOperator(content)
: addMrow();
content.mathml = [clone];
return clone;
}
function rewriteMfenced(mml) {
if (dom_util_tagName(mml) !== MMLTAGS.MFENCED) {
return mml;
}
const newNode = addMrow();
for (let i = 0, attr; (attr = mml.attributes[i]); i++) {
if (['open', 'close', 'separators'].indexOf(attr.name) === -1) {
newNode.setAttribute(attr.name, attr.value);
}
}
toArray(mml.childNodes).forEach(function (x) {
newNode.appendChild(x);
});
replaceNode(mml, newNode);
return newNode;
}
function createInvisibleOperator(operator) {
const moNode = createElement('mo');
const text = createTextNode(operator.textContent);
moNode.appendChild(text);
setAttributes(moNode, operator);
moNode.setAttribute(enrich_attr_Attribute.ADDED, 'true');
return moNode;
}
function setOperatorAttribute(semantic, content) {
const operator = semantic.type + (semantic.textContent ? ',' + semantic.textContent : '');
content.forEach(function (c) {
getInnerNode(c).setAttribute(enrich_attr_Attribute.OPERATOR, operator);
});
}
function getInnerNode(node) {
const children = toArray(node.childNodes);
if (!children) {
return node;
}
const remainder = children.filter(function (child) {
return !isIgnorable(child);
});
const result = [];
for (let i = 0, remain; (remain = remainder[i]); i++) {
if (hasEmptyTag(remain) &&
remain.getAttribute(enrich_attr_Attribute.TYPE) !==
semantic_meaning_SemanticType.PUNCTUATION) {
const nextInner = getInnerNode(remain);
if (nextInner && nextInner !== remain) {
result.push(nextInner);
}
}
else {
result.push(remain);
}
}
if (result.length === 1) {
return result[0];
}
return node;
}
function formattedOutput(element) {
return removeAttributePrefix(formatXml(element.toString()));
}
function collapsePunctuated(semantic, opt_children) {
const optional = !!opt_children;
const children = opt_children || [];
const parent = semantic.parent;
const contentIds = semantic.contentNodes.map(function (x) {
return x.id;
});
contentIds.unshift('c');
const childIds = [semantic.id, contentIds];
for (let i = 0, child; (child = semantic.childNodes[i]); i++) {
const mmlChild = walkTree(child);
children.push(mmlChild);
const innerNode = getInnerNode(mmlChild);
if (parent && !optional) {
innerNode.setAttribute(enrich_attr_Attribute.PARENT, parent.id.toString());
}
childIds.push(child.id);
}
return childIds;
}
//# sourceMappingURL=enrich_mathml.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/abstract_enrich_case.js
class AbstractEnrichCase {
constructor(semantic) {
this.semantic = semantic;
}
}
//# sourceMappingURL=abstract_enrich_case.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_binomial.js
class CaseBinomial extends AbstractEnrichCase {
static test(semantic) {
return (!semantic.mathmlTree &&
semantic.type === semantic_meaning_SemanticType.LINE &&
semantic.role === semantic_meaning_SemanticRole.BINOMIAL);
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
if (!this.semantic.childNodes.length) {
return this.mml;
}
const child = this.semantic.childNodes[0];
this.mml = walkTree(child);
if (this.mml.hasAttribute(enrich_attr_Attribute.TYPE)) {
const mrow = addMrow();
replaceNode(this.mml, mrow);
mrow.appendChild(this.mml);
this.mml = mrow;
}
setAttributes(this.mml, this.semantic);
return this.mml;
}
}
//# sourceMappingURL=case_binomial.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_double_script.js
class CaseDoubleScript extends AbstractEnrichCase {
static test(semantic) {
if (!semantic.mathmlTree || !semantic.childNodes.length) {
return false;
}
const mmlTag = dom_util_tagName(semantic.mathmlTree);
const role = semantic.childNodes[0].role;
return ((mmlTag === MMLTAGS.MSUBSUP && role === semantic_meaning_SemanticRole.SUBSUP) ||
(mmlTag === MMLTAGS.MUNDEROVER && role === semantic_meaning_SemanticRole.UNDEROVER));
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
const ignore = this.semantic.childNodes[0];
const baseSem = ignore.childNodes[0];
const supSem = this.semantic.childNodes[1];
const subSem = ignore.childNodes[1];
const supMml = walkTree(supSem);
const baseMml = walkTree(baseSem);
const subMml = walkTree(subSem);
setAttributes(this.mml, this.semantic);
this.mml.setAttribute(enrich_attr_Attribute.CHILDREN, makeIdList([baseSem, subSem, supSem]));
[baseMml, subMml, supMml].forEach((child) => getInnerNode(child).setAttribute(enrich_attr_Attribute.PARENT, this.mml.getAttribute(enrich_attr_Attribute.ID)));
this.mml.setAttribute(enrich_attr_Attribute.TYPE, ignore.role);
addCollapsedAttribute(this.mml, [
this.semantic.id,
[ignore.id, baseSem.id, subSem.id],
supSem.id
]);
return this.mml;
}
}
//# sourceMappingURL=case_double_script.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_multiindex.js
class CaseMultiindex extends AbstractEnrichCase {
static multiscriptIndex(index) {
if (index.type === semantic_meaning_SemanticType.PUNCTUATED &&
index.contentNodes[0].role === semantic_meaning_SemanticRole.DUMMY) {
return collapsePunctuated(index);
}
walkTree(index);
return index.id;
}
static createNone_(semantic) {
const newNode = createElement('none');
if (semantic) {
setAttributes(newNode, semantic);
}
newNode.setAttribute(enrich_attr_Attribute.ADDED, 'true');
return newNode;
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
completeMultiscript(rightIndices, leftIndices) {
const children = toArray(this.mml.childNodes).slice(1);
let childCounter = 0;
const completeIndices = (indices) => {
for (const index of indices) {
const child = children[childCounter];
if (child && index === parseInt(child.getAttribute(enrich_attr_Attribute.ID))) {
child.setAttribute(enrich_attr_Attribute.PARENT, this.semantic.id.toString());
childCounter++;
}
else if (!child ||
index !==
parseInt(getInnerNode(child).getAttribute(enrich_attr_Attribute.ID))) {
const query = this.semantic.querySelectorAll((x) => x.id === index);
this.mml.insertBefore(CaseMultiindex.createNone_(query[0]), child || null);
}
else {
getInnerNode(child).setAttribute(enrich_attr_Attribute.PARENT, this.semantic.id.toString());
childCounter++;
}
}
};
completeIndices(rightIndices);
if (children[childCounter] &&
dom_util_tagName(children[childCounter]) !== MMLTAGS.MPRESCRIPTS) {
this.mml.insertBefore(children[childCounter], createElement('mprescripts'));
}
else {
childCounter++;
}
completeIndices(leftIndices);
}
}
//# sourceMappingURL=case_multiindex.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_multiscripts.js
class CaseMultiscripts extends CaseMultiindex {
static test(semantic) {
if (!semantic.mathmlTree) {
return false;
}
const mmlTag = dom_util_tagName(semantic.mathmlTree);
return (mmlTag === MMLTAGS.MMULTISCRIPTS &&
(semantic.type === semantic_meaning_SemanticType.SUPERSCRIPT ||
semantic.type === semantic_meaning_SemanticType.SUBSCRIPT));
}
constructor(semantic) {
super(semantic);
}
getMathml() {
setAttributes(this.mml, this.semantic);
let baseSem, rsup, rsub;
if (this.semantic.childNodes[0] &&
this.semantic.childNodes[0].role === semantic_meaning_SemanticRole.SUBSUP) {
const ignore = this.semantic.childNodes[0];
baseSem = ignore.childNodes[0];
rsup = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]);
rsub = CaseMultiindex.multiscriptIndex(ignore.childNodes[1]);
const collapsed = [this.semantic.id, [ignore.id, baseSem.id, rsub], rsup];
addCollapsedAttribute(this.mml, collapsed);
this.mml.setAttribute(enrich_attr_Attribute.TYPE, ignore.role);
this.completeMultiscript(SemanticSkeleton.interleaveIds(rsub, rsup), []);
}
else {
baseSem = this.semantic.childNodes[0];
rsup = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]);
const collapsed = [this.semantic.id, baseSem.id, rsup];
addCollapsedAttribute(this.mml, collapsed);
}
const childIds = SemanticSkeleton.collapsedLeafs(rsub || [], rsup);
const base = walkTree(baseSem);
getInnerNode(base).setAttribute(enrich_attr_Attribute.PARENT, this.semantic.id.toString());
childIds.unshift(baseSem.id);
this.mml.setAttribute(enrich_attr_Attribute.CHILDREN, childIds.join(','));
return this.mml;
}
}
//# sourceMappingURL=case_multiscripts.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_tensor.js
class CaseTensor extends CaseMultiindex {
static test(semantic) {
return !!semantic.mathmlTree && semantic.type === semantic_meaning_SemanticType.TENSOR;
}
constructor(semantic) {
super(semantic);
}
getMathml() {
walkTree(this.semantic.childNodes[0]);
const lsub = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]);
const lsup = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[2]);
const rsub = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[3]);
const rsup = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[4]);
setAttributes(this.mml, this.semantic);
const collapsed = [
this.semantic.id,
this.semantic.childNodes[0].id,
lsub,
lsup,
rsub,
rsup
];
addCollapsedAttribute(this.mml, collapsed);
const childIds = SemanticSkeleton.collapsedLeafs(lsub, lsup, rsub, rsup);
childIds.unshift(this.semantic.childNodes[0].id);
this.mml.setAttribute(enrich_attr_Attribute.CHILDREN, childIds.join(','));
this.completeMultiscript(SemanticSkeleton.interleaveIds(rsub, rsup), SemanticSkeleton.interleaveIds(lsub, lsup));
return this.mml;
}
}
//# sourceMappingURL=case_tensor.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_embellished.js
class CaseEmbellished extends AbstractEnrichCase {
static test(semantic) {
return !!(semantic.mathmlTree &&
semantic.fencePointer &&
!semantic.mathmlTree.getAttribute('data-semantic-type'));
}
static makeEmptyNode_(id) {
const mrow = addMrow();
const empty = new SemanticNode(id);
empty.type = semantic_meaning_SemanticType.EMPTY;
empty.mathmlTree = mrow;
return empty;
}
static fencedMap_(fence, ids) {
ids[fence.id] = fence.mathmlTree;
if (!fence.embellished) {
return;
}
CaseEmbellished.fencedMap_(fence.childNodes[0], ids);
}
constructor(semantic) {
super(semantic);
this.fenced = null;
this.fencedMml = null;
this.fencedMmlNodes = [];
this.ofence = null;
this.ofenceMml = null;
this.ofenceMap = {};
this.cfence = null;
this.cfenceMml = null;
this.cfenceMap = {};
this.parentCleanup = [];
}
getMathml() {
this.getFenced_();
this.fencedMml = walkTree(this.fenced);
this.getFencesMml_();
if (this.fenced.type === semantic_meaning_SemanticType.EMPTY && !this.fencedMml.parentNode) {
this.fencedMml.setAttribute(enrich_attr_Attribute.ADDED, 'true');
this.cfenceMml.parentNode.insertBefore(this.fencedMml, this.cfenceMml);
}
this.getFencedMml_();
const rewrite = this.rewrite_();
return rewrite;
}
fencedElement(node) {
return (node.type === semantic_meaning_SemanticType.FENCED ||
node.type === semantic_meaning_SemanticType.MATRIX ||
node.type === semantic_meaning_SemanticType.VECTOR);
}
getFenced_() {
let currentNode = this.semantic;
while (!this.fencedElement(currentNode)) {
currentNode = currentNode.childNodes[0];
}
this.fenced = currentNode.childNodes[0];
this.ofence = currentNode.contentNodes[0];
this.cfence = currentNode.contentNodes[1];
CaseEmbellished.fencedMap_(this.ofence, this.ofenceMap);
CaseEmbellished.fencedMap_(this.cfence, this.cfenceMap);
}
getFencedMml_() {
let sibling = this.ofenceMml.nextSibling;
sibling = sibling === this.fencedMml ? sibling : this.fencedMml;
while (sibling && sibling !== this.cfenceMml) {
this.fencedMmlNodes.push(sibling);
sibling = sibling.nextSibling;
}
}
getFencesMml_() {
let currentNode = this.semantic;
const ofenceIds = Object.keys(this.ofenceMap);
const cfenceIds = Object.keys(this.cfenceMap);
while ((!this.ofenceMml || !this.cfenceMml) &&
currentNode !== this.fenced) {
if (ofenceIds.indexOf(currentNode.fencePointer) !== -1 &&
!this.ofenceMml) {
this.ofenceMml = currentNode.mathmlTree;
}
if (cfenceIds.indexOf(currentNode.fencePointer) !== -1 &&
!this.cfenceMml) {
this.cfenceMml = currentNode.mathmlTree;
}
currentNode = currentNode.childNodes[0];
}
if (!this.ofenceMml) {
this.ofenceMml = this.ofence.mathmlTree;
}
if (!this.cfenceMml) {
this.cfenceMml = this.cfence.mathmlTree;
}
if (this.ofenceMml) {
this.ofenceMml = ascendNewNode(this.ofenceMml);
}
if (this.cfenceMml) {
this.cfenceMml = ascendNewNode(this.cfenceMml);
}
}
rewrite_() {
let currentNode = this.semantic;
let result = null;
const newNode = this.introduceNewLayer_();
setAttributes(newNode, this.fenced.parent);
while (!this.fencedElement(currentNode)) {
const mml = currentNode.mathmlTree;
const specialCase = this.specialCase_(currentNode, mml);
if (specialCase) {
currentNode = specialCase;
}
else {
setAttributes(mml, currentNode);
const mmlChildren = [];
for (let i = 1, child; (child = currentNode.childNodes[i]); i++) {
mmlChildren.push(walkTree(child));
}
currentNode = currentNode.childNodes[0];
}
const dummy = createElement('dummy');
const saveChild = mml.childNodes[0];
replaceNode(mml, dummy);
replaceNode(newNode, mml);
replaceNode(mml.childNodes[0], newNode);
replaceNode(dummy, saveChild);
if (!result) {
result = mml;
}
}
walkTree(this.ofence);
walkTree(this.cfence);
this.cleanupParents_();
return result || newNode;
}
specialCase_(semantic, mml) {
const mmlTag = dom_util_tagName(mml);
let parent = null;
let caller;
if (mmlTag === MMLTAGS.MSUBSUP) {
parent = semantic.childNodes[0];
caller = CaseDoubleScript;
}
else if (mmlTag === MMLTAGS.MMULTISCRIPTS) {
if (semantic.type === semantic_meaning_SemanticType.SUPERSCRIPT ||
semantic.type === semantic_meaning_SemanticType.SUBSCRIPT) {
caller = CaseMultiscripts;
}
else if (semantic.type === semantic_meaning_SemanticType.TENSOR) {
caller = CaseTensor;
}
if (caller &&
semantic.childNodes[0] &&
semantic.childNodes[0].role === semantic_meaning_SemanticRole.SUBSUP) {
parent = semantic.childNodes[0];
}
else {
parent = semantic;
}
}
if (!parent) {
return null;
}
const base = parent.childNodes[0];
const empty = CaseEmbellished.makeEmptyNode_(base.id);
parent.childNodes[0] = empty;
mml = new caller(semantic).getMathml();
parent.childNodes[0] = base;
this.parentCleanup.push(mml);
return parent.childNodes[0];
}
introduceNewLayer_() {
const fullOfence = this.fullFence(this.ofenceMml);
const fullCfence = this.fullFence(this.cfenceMml);
let newNode = addMrow();
replaceNode(this.fencedMml, newNode);
this.fencedMmlNodes.forEach((node) => newNode.appendChild(node));
newNode.insertBefore(fullOfence, this.fencedMml);
newNode.appendChild(fullCfence);
if (!newNode.parentNode) {
const mrow = addMrow();
while (newNode.childNodes.length > 0) {
mrow.appendChild(newNode.childNodes[0]);
}
newNode.appendChild(mrow);
newNode = mrow;
}
return newNode;
}
fullFence(fence) {
const parent = this.fencedMml.parentNode;
let currentFence = fence;
while (currentFence.parentNode && currentFence.parentNode !== parent) {
currentFence = currentFence.parentNode;
}
return currentFence;
}
cleanupParents_() {
this.parentCleanup.forEach(function (x) {
const parent = x.childNodes[1].getAttribute(enrich_attr_Attribute.PARENT);
x.childNodes[0].setAttribute(enrich_attr_Attribute.PARENT, parent);
});
}
}
//# sourceMappingURL=case_embellished.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_empheq.js
class CaseEmpheq extends AbstractEnrichCase {
static test(semantic) {
return !!semantic.mathmlTree && semantic.hasAnnotation('Emph', 'top');
}
constructor(semantic) {
super(semantic);
this.mrows = [];
this.mml = semantic.mathmlTree;
}
getMathml() {
this.recurseToTable(this.semantic);
if (this.mrows.length) {
const newRow = addMrow();
const parent = this.mml.parentNode;
parent.insertBefore(newRow, this.mml);
for (const mrow of this.mrows) {
newRow.appendChild(mrow);
}
newRow.appendChild(this.mml);
}
return this.mml;
}
recurseToTable(node) {
var _a, _b;
if (!(node.hasAnnotation('Emph', 'top') || node.hasAnnotation('Emph', 'fence')) &&
(node.hasAnnotation('Emph', 'left') ||
node.hasAnnotation('Emph', 'right'))) {
walkTree(node);
return;
}
if (!node.mathmlTree ||
(dom_util_tagName(node.mathmlTree) === MMLTAGS.MTABLE &&
((_a = node.annotation['Emph']) === null || _a === void 0 ? void 0 : _a.length) &&
node.annotation['Emph'][0] !== 'table')) {
const newNode = addMrow();
setAttributes(newNode, node);
this.mrows.unshift(newNode);
}
else {
if (dom_util_tagName(node.mathmlTree) === MMLTAGS.MTABLE &&
((_b = node.annotation['Emph']) === null || _b === void 0 ? void 0 : _b.length) &&
node.annotation['Emph'][0] === 'table') {
this.finalizeTable(node);
return;
}
setAttributes(node.mathmlTree, node);
}
node.childNodes.forEach(this.recurseToTable.bind(this));
if (node.textContent || node.type === 'punctuated') {
const newContent = node.contentNodes.map((x) => {
const newNode = cloneContentNode(x);
if (newNode.hasAttribute('data-semantic-added')) {
this.mrows.unshift(newNode);
}
else {
this.recurseToTable(x);
}
return newNode;
});
setOperatorAttribute(node, newContent);
return;
}
node.contentNodes.forEach(this.recurseToTable.bind(this));
}
finalizeTable(node) {
setAttributes(node.mathmlTree, node);
node.contentNodes.forEach((x) => {
walkTree(x);
});
node.childNodes.forEach((x) => {
walkTree(x);
});
}
}
//# sourceMappingURL=case_empheq.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_limit.js
class CaseLimit extends AbstractEnrichCase {
static test(semantic) {
if (!semantic.mathmlTree || !semantic.childNodes.length) {
return false;
}
const mmlTag = dom_util_tagName(semantic.mathmlTree);
const type = semantic.type;
return (((type === semantic_meaning_SemanticType.LIMUPPER || type === semantic_meaning_SemanticType.LIMLOWER) &&
(mmlTag === MMLTAGS.MSUBSUP || mmlTag === MMLTAGS.MUNDEROVER)) ||
(type === semantic_meaning_SemanticType.LIMBOTH &&
(mmlTag === MMLTAGS.MSUB ||
mmlTag === MMLTAGS.MUNDER ||
mmlTag === MMLTAGS.MSUP ||
mmlTag === MMLTAGS.MOVER)));
}
static walkTree_(node) {
if (node) {
walkTree(node);
}
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
const children = this.semantic.childNodes;
if (this.semantic.type !== semantic_meaning_SemanticType.LIMBOTH &&
this.mml.childNodes.length >= 3) {
this.mml = introduceNewLayer([this.mml], this.semantic);
}
setAttributes(this.mml, this.semantic);
if (!children[0].mathmlTree) {
children[0].mathmlTree = this.semantic.mathmlTree;
}
children.forEach(CaseLimit.walkTree_);
return this.mml;
}
}
//# sourceMappingURL=case_limit.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_line.js
class CaseLine extends AbstractEnrichCase {
static test(semantic) {
return !!semantic.mathmlTree && semantic.type === semantic_meaning_SemanticType.LINE;
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
if (this.semantic.contentNodes.length) {
walkTree(this.semantic.contentNodes[0]);
}
if (this.semantic.childNodes.length) {
walkTree(this.semantic.childNodes[0]);
}
setAttributes(this.mml, this.semantic);
return this.mml;
}
}
//# sourceMappingURL=case_line.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_proof.js
class CaseProof extends AbstractEnrichCase {
static test(semantic) {
return (!!semantic.mathmlTree &&
(semantic.type === semantic_meaning_SemanticType.INFERENCE ||
semantic.type === semantic_meaning_SemanticType.PREMISES));
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
if (!this.semantic.childNodes.length) {
return this.mml;
}
this.semantic.contentNodes.forEach(function (x) {
walkTree(x);
setAttributes(x.mathmlTree, x);
});
this.semantic.childNodes.forEach(function (x) {
walkTree(x);
});
setAttributes(this.mml, this.semantic);
if (this.mml.getAttribute('data-semantic-id') ===
this.mml.getAttribute('data-semantic-parent')) {
this.mml.removeAttribute('data-semantic-parent');
}
return this.mml;
}
}
//# sourceMappingURL=case_proof.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_table.js
class CaseTable extends AbstractEnrichCase {
static test(semantic) {
return (semantic.type === semantic_meaning_SemanticType.MATRIX ||
semantic.type === semantic_meaning_SemanticType.VECTOR ||
semantic.type === semantic_meaning_SemanticType.CASES);
}
constructor(semantic) {
super(semantic);
this.inner = [];
this.mml = semantic.mathmlTree;
}
getMathml() {
const lfence = cloneContentNode(this.semantic.contentNodes[0]);
const rfence = this.semantic.contentNodes[1]
? cloneContentNode(this.semantic.contentNodes[1])
: null;
this.inner = this.semantic.childNodes.map(walkTree);
if (!this.mml) {
this.mml = introduceNewLayer([lfence].concat(this.inner, [rfence]), this.semantic);
}
else if (dom_util_tagName(this.mml) === MMLTAGS.MFENCED) {
const children = this.mml.childNodes;
this.mml.insertBefore(lfence, children[0] || null);
if (rfence) {
this.mml.appendChild(rfence);
}
this.mml = rewriteMfenced(this.mml);
}
else {
const newChildren = [lfence, this.mml];
if (rfence) {
newChildren.push(rfence);
}
this.mml = introduceNewLayer(newChildren, this.semantic);
}
setAttributes(this.mml, this.semantic);
return this.mml;
}
}
//# sourceMappingURL=case_table.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_text.js
class CaseText extends AbstractEnrichCase {
static test(semantic) {
return (semantic.type === semantic_meaning_SemanticType.PUNCTUATED &&
(semantic.role === semantic_meaning_SemanticRole.TEXT ||
semantic.contentNodes.every((x) => x.role === semantic_meaning_SemanticRole.DUMMY)));
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
const children = [];
const collapsed = collapsePunctuated(this.semantic, children);
this.mml = introduceNewLayer(children, this.semantic);
setAttributes(this.mml, this.semantic);
this.mml.removeAttribute(enrich_attr_Attribute.CONTENT);
addCollapsedAttribute(this.mml, collapsed);
return this.mml;
}
}
//# sourceMappingURL=case_text.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/enrich_case_factory.js
factory.push(...[
{
test: CaseLimit.test,
constr: (node) => new CaseLimit(node)
},
{
test: CaseEmbellished.test,
constr: (node) => new CaseEmbellished(node)
},
{
test: CaseDoubleScript.test,
constr: (node) => new CaseDoubleScript(node)
},
{
test: CaseTensor.test,
constr: (node) => new CaseTensor(node)
},
{
test: CaseMultiscripts.test,
constr: (node) => new CaseMultiscripts(node)
},
{ test: CaseLine.test, constr: (node) => new CaseLine(node) },
{
test: CaseBinomial.test,
constr: (node) => new CaseBinomial(node)
},
{
test: CaseProof.test,
constr: (node) => new CaseProof(node)
},
{
test: CaseEmpheq.test,
constr: (node) => new CaseEmpheq(node)
},
{
test: CaseTable.test,
constr: (node) => new CaseTable(node)
},
{ test: CaseText.test, constr: (node) => new CaseText(node) }
]);
//# sourceMappingURL=enrich_case_factory.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/enrich.js
function semanticMathmlNode(mml, options) {
const clone = cloneNode(mml);
const tree = getTree(clone, options);
return enrich(clone, tree, options);
}
function semanticMathmlSync(expr, options) {
const mml = parseInput(expr);
try {
return semanticMathmlNode(mml, options);
}
catch (err) {
console.error(err);
return mml;
}
}
function semanticMathml(expr, options, callback) {
EnginePromise.getall().then(() => {
const mml = DomUtil.parseInput(expr);
callback(semanticMathmlNode(mml, options));
});
}
function prepareMmlString(expr) {
if (!expr.match(/^$/)) {
expr += ' ';
}
return expr;
}
//# sourceMappingURL=enrich.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/speech_rules/clearspeak_preference_string.js
const PREFERENCES = new DynamicProperties({
AbsoluteValue: ['Auto', 'AbsEnd', 'Cardinality', 'Determinant'],
Bar: ['Auto', 'Conjugate'],
Caps: ['Auto', 'SayCaps'],
CombinationPermutation: ['Auto', 'ChoosePermute'],
Currency: ['Auto', 'Position', 'Prefix'],
Ellipses: ['Auto', 'AndSoOn'],
Enclosed: ['Auto', 'EndEnclose'],
Exponent: [
'Auto',
'AfterPower',
'Ordinal',
'OrdinalPower',
'Exponent'
],
Fraction: [
'Auto',
'EndFrac',
'FracOver',
'General',
'GeneralEndFrac',
'Ordinal',
'Over',
'OverEndFrac',
'Per'
],
Functions: [
'Auto',
'None',
'Reciprocal'
],
Inference: ['Auto', 'Long'],
ImpliedTimes: ['Auto', 'MoreImpliedTimes', 'None'],
Log: ['Auto', 'LnAsNaturalLog'],
Matrix: [
'Auto',
'Combinatoric',
'EndMatrix',
'EndVector',
'SilentColNum',
'SpeakColNum',
'Vector'
],
MultiLineLabel: [
'Auto',
'Case',
'Constraint',
'Equation',
'Line',
'None',
'Row',
'Step'
],
MultiLineOverview: ['Auto', 'None'],
MultiLinePausesBetweenColumns: ['Auto', 'Long', 'Short'],
MultsymbolDot: ['Auto', 'Dot'],
MultsymbolX: ['Auto', 'By', 'Cross'],
Paren: [
'Auto',
'CoordPoint',
'Interval',
'Silent',
'Speak',
'SpeakNestingLevel'
],
Prime: ['Auto', 'Angle', 'Length'],
Roots: ['Auto', 'PosNegSqRoot', 'PosNegSqRootEnd', 'RootEnd'],
SetMemberSymbol: ['Auto', 'Belongs', 'Element', 'Member', 'In'],
Sets: ['Auto', 'SilentBracket', 'woAll'],
TriangleSymbol: ['Auto', 'Delta'],
Trig: [
'Auto',
'ArcTrig',
'TrigInverse',
'Reciprocal'
],
VerticalLine: ['Auto', 'Divides', 'Given', 'SuchThat']
});
const AUTO = 'Auto';
function fromPreference(pref) {
const pairs = pref.split(':');
const preferences = {};
const properties = PREFERENCES.getProperties();
const validKeys = Object.keys(properties);
for (let i = 0, key; (key = pairs[i]); i++) {
const pair = key.split('_');
if (validKeys.indexOf(pair[0]) === -1) {
continue;
}
const value = pair[1];
if (value &&
value !== AUTO &&
properties[pair[0]].indexOf(value) !== -1) {
preferences[pair[0]] = pair[1];
}
}
return preferences;
}
function toPreference(pref) {
const keys = Object.keys(pref);
const str = [];
for (let i = 0; i < keys.length; i++) {
str.push(keys[i] + '_' + pref[keys[i]]);
}
return str.length ? str.join(':') : DynamicCstr.DEFAULT_VALUE;
}
function findPreference(prefs, kind) {
if (prefs === 'default') {
return AUTO;
}
const parsed = fromPreference(prefs);
return parsed[kind] || AUTO;
}
function addPreference(prefs, kind, value) {
if (prefs === 'default') {
return kind + '_' + value;
}
const parsed = fromPreference(prefs);
parsed[kind] = value;
return toPreference(parsed);
}
//# sourceMappingURL=clearspeak_preference_string.js.map
;// ./mjs/a11y/sre.js
const locales = variables/* Variables */.u.LOCALES;
const setupEngine = (x) => {
return Engine.getInstance().setup(x);
};
const engineSetup = () => {
return Engine.getInstance().json();
};
const toEnriched = (mml) => {
return semanticMathmlSync(mml, Engine.getInstance().options);
};
const parseDOM = parseInput;
const sre_addPreference = addPreference;
const sre_fromPreference = fromPreference;
const sre_toPreference = toPreference;
//# sourceMappingURL=sre.js.map
;// ./components/mjs/a11y/sre/lib/sre.js
if (MathJax.loader) {
MathJax.loader.checkVersion('a11y/sre', VERSION, 'a11y');
}
combineWithMathJax({_: {
a11y: {
sre_ts: sre_namespaceObject
}
}});
;// ./components/mjs/a11y/sre/sre.js
})();
/******/ })()
; mathjaxr/inst/doc/mathjax/a11y/assistive-mml.js 0000644 0001762 0000144 00000020527 15112352576 021171 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/a11y/assistive-mml.js
var assistive_mml_namespaceObject = {};
__webpack_require__.r(assistive_mml_namespaceObject);
__webpack_require__.d(assistive_mml_namespaceObject, {
AssistiveMmlHandler: () => (AssistiveMmlHandler),
AssistiveMmlMathDocumentMixin: () => (AssistiveMmlMathDocumentMixin),
AssistiveMmlMathItemMixin: () => (AssistiveMmlMathItemMixin),
LimitedMmlVisitor: () => (LimitedMmlVisitor)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/core/lib/core/MathItem.js
const MathItem_def = MathJax._.core.MathItem;
const protoItem = MathItem_def.protoItem;
const AbstractMathItem = MathItem_def.AbstractMathItem;
const STATE = MathItem_def.STATE;
const newState = MathItem_def.newState;
;// ./components/mjs/core/lib/core/MmlTree/SerializedMmlVisitor.js
const SerializedMmlVisitor_def = MathJax._.core.MmlTree.SerializedMmlVisitor;
const SerializedMmlVisitor = SerializedMmlVisitor_def.SerializedMmlVisitor;
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./mjs/a11y/assistive-mml.js
class LimitedMmlVisitor extends SerializedMmlVisitor {
getAttributes(node) {
return super.getAttributes(node).replace(/ ?id=".*?"/, '');
}
}
newState('ASSISTIVEMML', 153);
function AssistiveMmlMathItemMixin(BaseMathItem) {
return class extends BaseMathItem {
assistiveMml(document, force = false) {
if (this.state() >= STATE.ASSISTIVEMML)
return;
if (!this.isEscaped && (document.options.enableAssistiveMml || force)) {
const adaptor = document.adaptor;
const mml = document
.toMML(this.root)
.replace(/\n */g, '')
.replace(//g, '');
const mmlNodes = adaptor.firstChild(adaptor.body(adaptor.parse(mml, 'text/html')));
const node = adaptor.node('mjx-assistive-mml', {
unselectable: 'on',
display: this.display ? 'block' : 'inline',
}, [mmlNodes]);
adaptor.setAttribute(adaptor.firstChild(this.typesetRoot), 'aria-hidden', 'true');
adaptor.setStyle(this.typesetRoot, 'position', 'relative');
adaptor.append(this.typesetRoot, node);
}
this.state(STATE.ASSISTIVEMML);
}
};
}
function AssistiveMmlMathDocumentMixin(BaseDocument) {
var _a;
return _a = class BaseClass extends BaseDocument {
constructor(...args) {
super(...args);
const CLASS = this.constructor;
const ProcessBits = CLASS.ProcessBits;
if (!ProcessBits.has('assistive-mml')) {
ProcessBits.allocate('assistive-mml');
}
this.visitor = new LimitedMmlVisitor(this.mmlFactory);
this.options.MathItem = AssistiveMmlMathItemMixin(this.options.MathItem);
if ('addStyles' in this) {
this.addStyles(CLASS.assistiveStyles);
}
}
toMML(node) {
return this.visitor.visitTree(node);
}
assistiveMml() {
if (!this.processed.isSet('assistive-mml')) {
for (const math of this.math) {
math.assistiveMml(this);
}
this.processed.set('assistive-mml');
}
return this;
}
state(state, restore = false) {
super.state(state, restore);
if (state < STATE.ASSISTIVEMML) {
this.processed.clear('assistive-mml');
}
return this;
}
},
_a.OPTIONS = Object.assign(Object.assign({}, BaseDocument.OPTIONS), { enableAssistiveMml: true, renderActions: expandable(Object.assign(Object.assign({}, BaseDocument.OPTIONS.renderActions), { assistiveMml: [STATE.ASSISTIVEMML] })) }),
_a.assistiveStyles = {
'mjx-assistive-mml': {
position: 'absolute !important',
top: '0px',
left: '0px',
bottom: '0px',
right: '0px',
clip: 'rect(1px, 1px, 1px, 1px)',
'clip-path': 'polygon(0 0, 0 1px, 1px 1px, 1px 0)',
padding: '1px 0px 0px 0px !important',
border: '0px !important',
display: 'block !important',
width: 'auto !important',
overflow: 'hidden !important',
'text-indent': '0px ! important',
'-webkit-touch-callout': 'none',
'-webkit-user-select': 'none',
'-khtml-user-select': 'none',
'-moz-user-select': 'none',
'-ms-user-select': 'none',
'user-select': 'none',
},
'mjx-assistive-mml[display="block"]': {
width: '100% !important',
},
},
_a;
}
function AssistiveMmlHandler(handler) {
handler.documentClass = AssistiveMmlMathDocumentMixin(handler.documentClass);
return handler;
}
//# sourceMappingURL=assistive-mml.js.map
;// ./components/mjs/a11y/assistive-mml/lib/assistive-mml.js
if (MathJax.loader) {
MathJax.loader.checkVersion('a11y/assistive-mml', VERSION, 'a11y');
}
combineWithMathJax({_: {
a11y: {
"assistive-mml": assistive_mml_namespaceObject
}
}});
;// ./components/mjs/a11y/assistive-mml/assistive-mml.js
if (MathJax.startup) {
if (MathJax.config.options && MathJax.config.options.enableAssistiveMml !== false) {
combineDefaults(MathJax.config, 'options', {
menuOptions: {
settings: {
assistiveMml: true
}
}
});
}
MathJax.startup.extendHandler(handler => AssistiveMmlHandler(handler));
}
/******/ })()
; mathjaxr/inst/doc/mathjax/input/ 0000755 0001762 0000144 00000000000 15112365502 016405 5 ustar ligges users mathjaxr/inst/doc/mathjax/input/tex-base.js 0000644 0001762 0000144 00000667371 15112352701 020474 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/FindTeX.js
var FindTeX_namespaceObject = {};
__webpack_require__.r(FindTeX_namespaceObject);
__webpack_require__.d(FindTeX_namespaceObject, {
FindTeX: () => (FindTeX)
});
// NAMESPACE OBJECT: ./mjs/input/tex/NodeUtil.js
var NodeUtil_namespaceObject = {};
__webpack_require__.r(NodeUtil_namespaceObject);
__webpack_require__.d(NodeUtil_namespaceObject, {
"default": () => (tex_NodeUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/FilterUtil.js
var FilterUtil_namespaceObject = {};
__webpack_require__.r(FilterUtil_namespaceObject);
__webpack_require__.d(FilterUtil_namespaceObject, {
"default": () => (tex_FilterUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/HandlerTypes.js
var HandlerTypes_namespaceObject = {};
__webpack_require__.r(HandlerTypes_namespaceObject);
__webpack_require__.d(HandlerTypes_namespaceObject, {
ConfigurationType: () => (ConfigurationType),
HandlerType: () => (HandlerType)
});
// NAMESPACE OBJECT: ./mjs/input/tex/UnitUtil.js
var UnitUtil_namespaceObject = {};
__webpack_require__.r(UnitUtil_namespaceObject);
__webpack_require__.d(UnitUtil_namespaceObject, {
UnitUtil: () => (UnitUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Stack.js
var Stack_namespaceObject = {};
__webpack_require__.r(Stack_namespaceObject);
__webpack_require__.d(Stack_namespaceObject, {
"default": () => (Stack)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TexError.js
var TexError_namespaceObject = {};
__webpack_require__.r(TexError_namespaceObject);
__webpack_require__.d(TexError_namespaceObject, {
"default": () => (tex_TexError)
});
// NAMESPACE OBJECT: ./mjs/input/tex/StackItem.js
var StackItem_namespaceObject = {};
__webpack_require__.r(StackItem_namespaceObject);
__webpack_require__.d(StackItem_namespaceObject, {
BaseItem: () => (BaseItem),
MmlStack: () => (MmlStack)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TexConstants.js
var TexConstants_namespaceObject = {};
__webpack_require__.r(TexConstants_namespaceObject);
__webpack_require__.d(TexConstants_namespaceObject, {
TexConstant: () => (TexConstant)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TexParser.js
var TexParser_namespaceObject = {};
__webpack_require__.r(TexParser_namespaceObject);
__webpack_require__.d(TexParser_namespaceObject, {
"default": () => (TexParser)
});
// NAMESPACE OBJECT: ./mjs/input/tex/StackItemFactory.js
var StackItemFactory_namespaceObject = {};
__webpack_require__.r(StackItemFactory_namespaceObject);
__webpack_require__.d(StackItemFactory_namespaceObject, {
"default": () => (tex_StackItemFactory)
});
// NAMESPACE OBJECT: ./mjs/input/tex/NodeFactory.js
var NodeFactory_namespaceObject = {};
__webpack_require__.r(NodeFactory_namespaceObject);
__webpack_require__.d(NodeFactory_namespaceObject, {
NodeFactory: () => (NodeFactory)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ParseUtil.js
var ParseUtil_namespaceObject = {};
__webpack_require__.r(ParseUtil_namespaceObject);
__webpack_require__.d(ParseUtil_namespaceObject, {
KeyValueDef: () => (KeyValueDef),
KeyValueTypes: () => (KeyValueTypes),
ParseUtil: () => (ParseUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ColumnParser.js
var ColumnParser_namespaceObject = {};
__webpack_require__.r(ColumnParser_namespaceObject);
__webpack_require__.d(ColumnParser_namespaceObject, {
ColumnParser: () => (ColumnParser)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ParseOptions.js
var ParseOptions_namespaceObject = {};
__webpack_require__.r(ParseOptions_namespaceObject);
__webpack_require__.d(ParseOptions_namespaceObject, {
"default": () => (tex_ParseOptions)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Tags.js
var Tags_namespaceObject = {};
__webpack_require__.r(Tags_namespaceObject);
__webpack_require__.d(Tags_namespaceObject, {
AbstractTags: () => (AbstractTags),
AllTags: () => (AllTags),
Label: () => (Label),
NoTags: () => (NoTags),
TagInfo: () => (TagInfo),
TagsFactory: () => (TagsFactory)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Token.js
var Token_namespaceObject = {};
__webpack_require__.r(Token_namespaceObject);
__webpack_require__.d(Token_namespaceObject, {
Macro: () => (Macro),
Token: () => (Token)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TokenMap.js
var TokenMap_namespaceObject = {};
__webpack_require__.r(TokenMap_namespaceObject);
__webpack_require__.d(TokenMap_namespaceObject, {
AbstractParseMap: () => (AbstractParseMap),
AbstractTokenMap: () => (AbstractTokenMap),
CharacterMap: () => (CharacterMap),
CommandMap: () => (CommandMap),
DelimiterMap: () => (DelimiterMap),
EnvironmentMap: () => (EnvironmentMap),
MacroMap: () => (MacroMap),
RegExpMap: () => (RegExpMap),
parseResult: () => (parseResult)
});
// NAMESPACE OBJECT: ./mjs/input/tex/MapHandler.js
var MapHandler_namespaceObject = {};
__webpack_require__.r(MapHandler_namespaceObject);
__webpack_require__.d(MapHandler_namespaceObject, {
MapHandler: () => (MapHandler),
SubHandler: () => (SubHandler),
SubHandlers: () => (SubHandlers)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Configuration.js
var Configuration_namespaceObject = {};
__webpack_require__.r(Configuration_namespaceObject);
__webpack_require__.d(Configuration_namespaceObject, {
Configuration: () => (Configuration),
ConfigurationHandler: () => (ConfigurationHandler),
ParserConfiguration: () => (ParserConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/base/BaseItems.js
var BaseItems_namespaceObject = {};
__webpack_require__.r(BaseItems_namespaceObject);
__webpack_require__.d(BaseItems_namespaceObject, {
ArrayItem: () => (ArrayItem),
BeginItem: () => (BeginItem),
BreakItem: () => (BreakItem),
CellItem: () => (CellItem),
CloseItem: () => (CloseItem),
DotsItem: () => (DotsItem),
EndItem: () => (EndItem),
EqnArrayItem: () => (EqnArrayItem),
EquationItem: () => (EquationItem),
FnItem: () => (FnItem),
LeftItem: () => (LeftItem),
Middle: () => (Middle),
MmlItem: () => (MmlItem),
MstyleItem: () => (MstyleItem),
NonscriptItem: () => (NonscriptItem),
NotItem: () => (NotItem),
NullItem: () => (NullItem),
OpenItem: () => (OpenItem),
OverItem: () => (OverItem),
PositionItem: () => (PositionItem),
PrimeItem: () => (PrimeItem),
RightItem: () => (RightItem),
StartItem: () => (StartItem),
StopItem: () => (StopItem),
StyleItem: () => (StyleItem),
SubsupItem: () => (SubsupItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/base/BaseMethods.js
var BaseMethods_namespaceObject = {};
__webpack_require__.r(BaseMethods_namespaceObject);
__webpack_require__.d(BaseMethods_namespaceObject, {
"default": () => (base_BaseMethods),
splitAlignArray: () => (splitAlignArray)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ParseMethods.js
var ParseMethods_namespaceObject = {};
__webpack_require__.r(ParseMethods_namespaceObject);
__webpack_require__.d(ParseMethods_namespaceObject, {
"default": () => (tex_ParseMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/base/BaseConfiguration.js
var BaseConfiguration_namespaceObject = {};
__webpack_require__.r(BaseConfiguration_namespaceObject);
__webpack_require__.d(BaseConfiguration_namespaceObject, {
BaseConfiguration: () => (BaseConfiguration),
BaseTags: () => (BaseTags),
Other: () => (Other)
});
// NAMESPACE OBJECT: ./mjs/input/tex.js
var tex_namespaceObject = {};
__webpack_require__.r(tex_namespaceObject);
__webpack_require__.d(tex_namespaceObject, {
TeX: () => (TeX)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/core/lib/core/InputJax.js
const InputJax_def = MathJax._.core.InputJax;
const AbstractInputJax = InputJax_def.AbstractInputJax;
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./components/mjs/core/lib/core/FindMath.js
const FindMath_def = MathJax._.core.FindMath;
const AbstractFindMath = FindMath_def.AbstractFindMath;
;// ./components/mjs/core/lib/util/string.js
const string_def = MathJax._.util.string;
const sortLength = string_def.sortLength;
const quotePattern = string_def.quotePattern;
const unicodeChars = string_def.unicodeChars;
const unicodeString = string_def.unicodeString;
const isPercent = string_def.isPercent;
const split = string_def.split;
const replaceUnicode = string_def.replaceUnicode;
const toEntity = string_def.toEntity;
;// ./components/mjs/core/lib/core/MathItem.js
const MathItem_def = MathJax._.core.MathItem;
const protoItem = MathItem_def.protoItem;
const AbstractMathItem = MathItem_def.AbstractMathItem;
const STATE = MathItem_def.STATE;
const newState = MathItem_def.newState;
;// ./mjs/input/tex/FindTeX.js
class FindTeX extends AbstractFindMath {
constructor(options) {
super(options);
this.getPatterns();
}
getPatterns() {
const options = this.options;
const starts = [];
const parts = [];
const subparts = [];
this.end = {};
this.env = this.sub = 0;
let i = 1;
options['inlineMath'].forEach((delims) => this.addPattern(starts, delims, false));
options['displayMath'].forEach((delims) => this.addPattern(starts, delims, true));
if (starts.length) {
parts.push(starts.sort(sortLength).join('|'));
}
if (options['processEnvironments']) {
parts.push('\\\\begin\\s*\\{([^}]*)\\}');
this.env = i;
i++;
}
if (options['processEscapes']) {
subparts.push('\\\\([\\\\$])');
}
if (options['processRefs']) {
subparts.push('(\\\\(?:eq)?ref\\s*\\{[^}]*\\})');
}
if (subparts.length) {
parts.push('(' + subparts.join('|') + ')');
this.sub = i;
}
this.start = new RegExp(parts.join('|'), 'g');
this.hasPatterns = parts.length > 0;
}
addPattern(starts, delims, display) {
const [open, close] = delims;
starts.push(quotePattern(open));
this.end[open] = [close, display, this.endPattern(close)];
}
endPattern(end, endp) {
return new RegExp((endp || quotePattern(end)) + '|\\\\(?:[a-zA-Z]|.)|[{}]', 'g');
}
findEnd(text, n, start, end) {
const [close, display, pattern] = end;
const i = (pattern.lastIndex = start.index + start[0].length);
let match, braces = 0;
while ((match = pattern.exec(text))) {
if ((match[1] || match[0]) === close && braces === 0) {
return protoItem(start[0], text.substring(i, match.index), match[0], n, start.index, match.index + match[0].length, display);
}
else if (match[0] === '{') {
braces++;
}
else if (match[0] === '}' && braces) {
braces--;
}
}
return null;
}
findMathInString(math, n, text) {
let start, match;
this.start.lastIndex = 0;
while ((start = this.start.exec(text))) {
if (start[this.env] !== undefined && this.env) {
const end = '\\\\end\\s*(\\{' + quotePattern(start[this.env]) + '\\})';
match = this.findEnd(text, n, start, [
'{' + start[this.env] + '}',
true,
this.endPattern(null, end),
]);
if (match) {
match.math = match.open + match.math + match.close;
match.open = match.close = '';
}
}
else if (start[this.sub] !== undefined && this.sub) {
const math = start[this.sub];
const end = start.index + start[this.sub].length;
if (math.length === 2) {
match = protoItem('\\', math.substring(1), '', n, start.index, end);
}
else {
match = protoItem('', math, '', n, start.index, end, false);
}
}
else {
match = this.findEnd(text, n, start, this.end[start[0]]);
}
if (match) {
math.push(match);
this.start.lastIndex = match.end.n;
}
}
}
findMath(strings) {
const math = [];
if (this.hasPatterns) {
for (let i = 0, m = strings.length; i < m; i++) {
this.findMathInString(math, i, strings[i]);
}
}
return math;
}
}
FindTeX.OPTIONS = {
inlineMath: [
['\\(', '\\)']
],
displayMath: [
['$$', '$$'],
['\\[', '\\]']
],
processEscapes: true,
processEnvironments: true,
processRefs: true,
};
//# sourceMappingURL=FindTeX.js.map
;// ./components/mjs/core/lib/core/MmlTree/MmlNode.js
const MmlNode_def = MathJax._.core.MmlTree.MmlNode;
const TEXCLASS = MmlNode_def.TEXCLASS;
const TEXCLASSNAMES = MmlNode_def.TEXCLASSNAMES;
const MATHVARIANTS = MmlNode_def.MATHVARIANTS;
const indentAttributes = MmlNode_def.indentAttributes;
const AbstractMmlNode = MmlNode_def.AbstractMmlNode;
const AbstractMmlTokenNode = MmlNode_def.AbstractMmlTokenNode;
const AbstractMmlLayoutNode = MmlNode_def.AbstractMmlLayoutNode;
const AbstractMmlBaseNode = MmlNode_def.AbstractMmlBaseNode;
const AbstractMmlEmptyNode = MmlNode_def.AbstractMmlEmptyNode;
const TextNode = MmlNode_def.TextNode;
const XMLNode = MmlNode_def.XMLNode;
;// ./components/mjs/core/lib/core/MmlTree/MmlNodes/mo.js
const mo_def = MathJax._.core.MmlTree.MmlNodes.mo;
const MmlMo = mo_def.MmlMo;
;// ./mjs/input/tex/NodeUtil.js
const NodeUtil = {
attrs: new Set([
'autoOP',
'fnOP',
'movesupsub',
'subsupOK',
'texprimestyle',
'useHeight',
'variantForm',
'withDelims',
'mathaccent',
'open',
'close',
]),
createEntity(code) {
return String.fromCodePoint(parseInt(code, 16));
},
getChildren(node) {
return node.childNodes;
},
getText(node) {
return node.getText();
},
appendChildren(node, children) {
for (const child of children) {
node.appendChild(child);
}
},
setAttribute(node, attribute, value) {
node.attributes.set(attribute, value);
},
setProperty(node, property, value) {
node.setProperty(property, value);
},
setProperties(node, properties) {
for (const name of Object.keys(properties)) {
const value = properties[name];
if (name === 'texClass') {
node.texClass = value;
node.setProperty(name, value);
}
else if (name === 'movablelimits') {
node.setProperty('movablelimits', value);
if (node.isKind('mo') || node.isKind('mstyle')) {
node.attributes.set('movablelimits', value);
}
}
else if (name === 'inferred') {
}
else if (NodeUtil.attrs.has(name)) {
node.setProperty(name, value);
}
else {
node.attributes.set(name, value);
}
}
},
getProperty(node, property) {
return node.getProperty(property);
},
getAttribute(node, attr) {
return node.attributes.get(attr);
},
removeAttribute(node, attr) {
node.attributes.unset(attr);
},
removeProperties(node, ...properties) {
node.removeProperty(...properties);
},
getChildAt(node, position) {
return node.childNodes[position];
},
setChild(node, position, child) {
const children = node.childNodes;
children[position] = child;
if (child) {
child.parent = node;
}
},
copyChildren(oldNode, newNode) {
const children = oldNode.childNodes;
for (let i = 0; i < children.length; i++) {
this.setChild(newNode, i, children[i]);
}
},
copyAttributes(oldNode, newNode) {
newNode.attributes = oldNode.attributes;
this.setProperties(newNode, oldNode.getAllProperties());
},
isType(node, kind) {
return node.isKind(kind);
},
isEmbellished(node) {
return node.isEmbellished;
},
getTexClass(node) {
return node.texClass;
},
getCoreMO(node) {
return node.coreMO();
},
isNode(item) {
return (item instanceof AbstractMmlNode || item instanceof AbstractMmlEmptyNode);
},
isInferred(node) {
return node.isInferred;
},
getForm(node) {
if (!node.isKind('mo')) {
return null;
}
const mo = node;
const forms = mo.getForms();
for (const form of forms) {
const symbol = this.getOp(mo, form);
if (symbol) {
return symbol;
}
}
return null;
},
getOp(mo, form = 'infix') {
return MmlMo.OPTABLE[form][mo.getText()] || null;
},
getMoAttribute(mo, attr) {
var _a, _b;
if (!mo.attributes.isSet(attr)) {
for (const form of ['infix', 'postfix', 'prefix']) {
const value = (_b = (_a = this.getOp(mo, form)) === null || _a === void 0 ? void 0 : _a[3]) === null || _b === void 0 ? void 0 : _b[attr];
if (value !== undefined) {
return value;
}
}
}
return mo.attributes.get(attr);
},
};
/* harmony default export */ const tex_NodeUtil = (NodeUtil);
//# sourceMappingURL=NodeUtil.js.map
;// ./mjs/input/tex/FilterUtil.js
function _copyExplicit(attrs, node1, node2) {
const attr1 = node1.attributes;
const attr2 = node2.attributes;
attrs.forEach((x) => {
const attr = attr2.getExplicit(x);
if (attr != null) {
attr1.set(x, attr);
}
});
}
function _compareExplicit(node1, node2) {
const filter = (attr, space) => {
const exp = attr.getExplicitNames();
return exp.filter((x) => {
return (x !== space &&
(x !== 'stretchy' || attr.getExplicit('stretchy')) &&
x !== 'data-latex' &&
x !== 'data-latex-item');
});
};
const attr1 = node1.attributes;
const attr2 = node2.attributes;
const exp1 = filter(attr1, 'lspace');
const exp2 = filter(attr2, 'rspace');
if (exp1.length !== exp2.length) {
return false;
}
for (const name of exp1) {
if (attr1.getExplicit(name) !== attr2.getExplicit(name)) {
return false;
}
}
return true;
}
function _cleanSubSup(options, low, up) {
const remove = [];
for (const mml of options.getList('m' + low + up)) {
const children = mml.childNodes;
if (children[mml[low]] && children[mml[up]]) {
continue;
}
const parent = mml.parent;
const newNode = children[mml[low]]
? options.nodeFactory.create('node', 'm' + low, [
children[mml.base],
children[mml[low]],
])
: options.nodeFactory.create('node', 'm' + up, [
children[mml.base],
children[mml[up]],
]);
tex_NodeUtil.copyAttributes(mml, newNode);
parent.replaceChild(newNode, mml);
remove.push(mml);
}
options.removeFromList('m' + low + up, remove);
}
function _moveLimits(options, underover, subsup) {
const remove = [];
for (const mml of options.getList(underover)) {
if (mml.attributes.get('displaystyle')) {
continue;
}
const base = mml.childNodes[mml.base];
const mo = base.coreMO();
if (base.getProperty('movablelimits') &&
!mo.attributes.hasExplicit('movablelimits')) {
const node = options.nodeFactory.create('node', subsup, mml.childNodes);
tex_NodeUtil.copyAttributes(mml, node);
mml.parent.replaceChild(node, mml);
remove.push(mml);
}
}
options.removeFromList(underover, remove);
}
const FilterUtil = {
cleanStretchy(arg) {
const options = arg.data;
for (const mo of options.getList('fixStretchy')) {
if (tex_NodeUtil.getProperty(mo, 'fixStretchy')) {
const symbol = tex_NodeUtil.getForm(mo);
if (symbol && symbol[3] && symbol[3]['stretchy']) {
tex_NodeUtil.setAttribute(mo, 'stretchy', false);
}
const parent = mo.parent;
if (!tex_NodeUtil.getTexClass(mo) && (!symbol || !symbol[2])) {
const texAtom = options.nodeFactory.create('node', 'TeXAtom', [mo]);
parent.replaceChild(texAtom, mo);
texAtom.inheritAttributesFrom(mo);
}
tex_NodeUtil.removeProperties(mo, 'fixStretchy');
}
}
},
cleanAttributes(arg) {
const node = arg.data.root;
node.walkTree((mml, _d) => {
const attribs = mml.attributes;
const keep = new Set((attribs.get('mjx-keep-attrs') || '').split(/ /));
attribs.unset('mjx-keep-attrs');
for (const key of attribs.getExplicitNames()) {
if (!keep.has(key) &&
attribs.get(key) === mml.attributes.getInherited(key)) {
attribs.unset(key);
}
}
}, {});
},
combineRelations(arg) {
const remove = [];
for (const mo of arg.data.getList('mo')) {
if (mo.getProperty('relationsCombined') ||
!mo.parent ||
(mo.parent && !tex_NodeUtil.isType(mo.parent, 'mrow')) ||
tex_NodeUtil.getTexClass(mo) !== TEXCLASS.REL) {
continue;
}
const mml = mo.parent;
let m2;
const children = mml.childNodes;
const next = children.indexOf(mo) + 1;
const variantForm = tex_NodeUtil.getProperty(mo, 'variantForm');
while (next < children.length &&
(m2 = children[next]) &&
tex_NodeUtil.isType(m2, 'mo') &&
tex_NodeUtil.getTexClass(m2) === TEXCLASS.REL) {
if (variantForm === tex_NodeUtil.getProperty(m2, 'variantForm') &&
_compareExplicit(mo, m2)) {
tex_NodeUtil.appendChildren(mo, tex_NodeUtil.getChildren(m2));
_copyExplicit(['stretchy', 'rspace'], mo, m2);
for (const name of m2.getPropertyNames()) {
mo.setProperty(name, m2.getProperty(name));
}
if (m2.attributes.get('data-latex')) {
mo.attributes.set('data-latex', mo.attributes.get('data-latex') +
m2.attributes.get('data-latex'));
}
children.splice(next, 1);
remove.push(m2);
m2.parent = null;
m2.setProperty('relationsCombined', true);
mo.setProperty('texClass', TEXCLASS.REL);
}
else {
if (!mo.attributes.hasExplicit('rspace')) {
tex_NodeUtil.setAttribute(mo, 'rspace', '0pt');
}
if (!m2.attributes.hasExplicit('lspace')) {
tex_NodeUtil.setAttribute(m2, 'lspace', '0pt');
}
break;
}
}
mo.attributes.setInherited('form', mo.getForms()[0]);
}
arg.data.removeFromList('mo', remove);
},
cleanSubSup(arg) {
const options = arg.data;
if (options.error) {
return;
}
_cleanSubSup(options, 'sub', 'sup');
_cleanSubSup(options, 'under', 'over');
},
moveLimits(arg) {
const options = arg.data;
_moveLimits(options, 'munderover', 'msubsup');
_moveLimits(options, 'munder', 'msub');
_moveLimits(options, 'mover', 'msup');
},
setInherited(arg) {
arg.data.root.setInheritedAttributes({}, arg.math['display'], 0, false);
},
checkScriptlevel(arg) {
const options = arg.data;
const remove = [];
for (const mml of options.getList('mstyle')) {
if (mml.childNodes[0].childNodes.length !== 1) {
continue;
}
const attributes = mml.attributes;
for (const key of ['displaystyle', 'scriptlevel']) {
if (attributes.getExplicit(key) === attributes.getInherited(key)) {
attributes.unset(key);
}
}
const names = attributes.getExplicitNames();
if (names.filter((key) => key.substring(0, 10) !== 'data-latex').length ===
0) {
const child = mml.childNodes[0].childNodes[0];
names.forEach((key) => child.attributes.set(key, attributes.get(key)));
mml.parent.replaceChild(child, mml);
remove.push(mml);
}
}
options.removeFromList('mstyle', remove);
},
};
/* harmony default export */ const tex_FilterUtil = (FilterUtil);
//# sourceMappingURL=FilterUtil.js.map
;// ./mjs/input/tex/HandlerTypes.js
var ConfigurationType;
(function (ConfigurationType) {
ConfigurationType["HANDLER"] = "handler";
ConfigurationType["FALLBACK"] = "fallback";
ConfigurationType["ITEMS"] = "items";
ConfigurationType["TAGS"] = "tags";
ConfigurationType["OPTIONS"] = "options";
ConfigurationType["NODES"] = "nodes";
ConfigurationType["PREPROCESSORS"] = "preprocessors";
ConfigurationType["POSTPROCESSORS"] = "postprocessors";
ConfigurationType["INIT"] = "init";
ConfigurationType["CONFIG"] = "config";
ConfigurationType["PRIORITY"] = "priority";
ConfigurationType["PARSER"] = "parser";
})(ConfigurationType || (ConfigurationType = {}));
var HandlerType;
(function (HandlerType) {
HandlerType["DELIMITER"] = "delimiter";
HandlerType["MACRO"] = "macro";
HandlerType["CHARACTER"] = "character";
HandlerType["ENVIRONMENT"] = "environment";
})(HandlerType || (HandlerType = {}));
//# sourceMappingURL=HandlerTypes.js.map
;// ./mjs/input/tex/UnitUtil.js
class UnitMap {
constructor(map) {
this.num = '([-+]?([.,]\\d+|\\d+([.,]\\d*)?))';
this.unit = '';
this.dimenEnd = /./;
this.dimenRest = /./;
this.map = new Map(map);
this.updateDimen();
}
updateDimen() {
this.unit = `(${Array.from(this.map.keys()).join('|')})`;
this.dimenEnd = RegExp('^\\s*' + this.num + '\\s*' + this.unit + '\\s*$');
this.dimenRest = RegExp('^\\s*' + this.num + '\\s*' + this.unit + ' ?');
}
set(name, ems) {
this.map.set(name, ems);
this.updateDimen();
return this;
}
get(name) {
return this.map.get(name) || this.map.get('pt');
}
delete(name) {
if (this.map.delete(name)) {
this.updateDimen();
return true;
}
return false;
}
}
const emPerInch = 7.2;
const pxPerInch = 72;
function muReplace([value, unit, length]) {
if (unit !== 'mu') {
return [value, unit, length];
}
const em = UnitUtil.em(UnitUtil.UNIT_CASES.get(unit) * parseFloat(value));
return [em.slice(0, -2), 'em', length];
}
const UnitUtil = {
UNIT_CASES: new UnitMap([
['em', 1],
['ex', .43],
['pt', 1 / 10],
['pc', 1.2],
['px', emPerInch / pxPerInch],
['in', emPerInch],
['cm', emPerInch / 2.54],
['mm', emPerInch / 25.4],
['mu', 1 / 18],
]),
matchDimen(dim, rest = false) {
const match = dim.match(rest ? UnitUtil.UNIT_CASES.dimenRest : UnitUtil.UNIT_CASES.dimenEnd);
return match
? muReplace([match[1].replace(/,/, '.'), match[4], match[0].length])
: [null, null, 0];
},
dimen2em(dim) {
const [value, unit] = UnitUtil.matchDimen(dim);
const m = parseFloat(value || '1');
const factor = UnitUtil.UNIT_CASES.get(unit);
return factor * m;
},
em(m) {
if (Math.abs(m) < 0.0006) {
return '0em';
}
return m.toFixed(3).replace(/\.?0+$/, '') + 'em';
},
trimSpaces(text) {
if (typeof text !== 'string') {
return text;
}
let TEXT = text.trim();
if (TEXT.match(/\\$/) && text.match(/ $/)) {
TEXT += ' ';
}
return TEXT;
},
};
//# sourceMappingURL=UnitUtil.js.map
;// ./mjs/input/tex/Stack.js
class Stack {
constructor(_factory, _env, inner) {
this._factory = _factory;
this._env = _env;
this.global = {};
this.stack = [];
this.global = { isInner: inner };
this.stack = [this._factory.create('start', this.global)];
if (_env) {
this.stack[0].env = _env;
}
this.env = this.stack[0].env;
}
set env(env) {
this._env = env;
}
get env() {
return this._env;
}
Push(...args) {
for (const node of args) {
if (!node) {
continue;
}
const item = tex_NodeUtil.isNode(node)
? this._factory.create('mml', node)
: node;
item.global = this.global;
const [top, success] = this.stack.length
? this.Top().checkItem(item)
: [null, true];
if (!success) {
continue;
}
if (top) {
this.Pop();
this.Push(...top);
continue;
}
if (!item.isKind('null')) {
this.stack.push(item);
}
if (item.env) {
if (item.copyEnv) {
Object.assign(item.env, this.env);
}
this.env = item.env;
}
else {
item.env = this.env;
}
}
}
Pop() {
const item = this.stack.pop();
if (!item.isOpen) {
delete item.env;
}
this.env = this.stack.length ? this.Top().env : {};
return item;
}
Top(n = 1) {
return this.stack.length < n ? null : this.stack[this.stack.length - n];
}
Prev(noPop) {
const top = this.Top();
return noPop ? top.First : top.Pop();
}
get height() {
return this.stack.length;
}
toString() {
return 'stack[\n ' + this.stack.join('\n ') + '\n]';
}
}
//# sourceMappingURL=Stack.js.map
;// ./mjs/input/tex/TexError.js
class TexError {
static processString(str, args) {
const parts = str.split(TexError.pattern);
for (let i = 1, m = parts.length; i < m; i += 2) {
let c = parts[i].charAt(0);
if (c >= '0' && c <= '9') {
parts[i] = args[parseInt(parts[i], 10) - 1];
if (typeof parts[i] === 'number') {
parts[i] = parts[i].toString();
}
}
else if (c === '{') {
c = parts[i].substring(1);
if (c >= '0' && c <= '9') {
parts[i] =
args[parseInt(parts[i].substring(1, parts[i].length - 1), 10) - 1];
if (typeof parts[i] === 'number') {
parts[i] = parts[i].toString();
}
}
else {
const match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
if (match) {
parts[i] = '%' + parts[i];
}
}
}
}
return parts.join('');
}
constructor(id, message, ...rest) {
this.id = id;
this.message = TexError.processString(message, rest);
}
}
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:%\d+(?:\|(?:%\{\d+\}|%.|[^}])*)+\}|.)/g;
/* harmony default export */ const tex_TexError = (TexError);
//# sourceMappingURL=TexError.js.map
;// ./mjs/input/tex/StackItem.js
class MmlStack {
constructor(_nodes) {
this._nodes = _nodes;
this.startStr = '';
this.startI = 0;
this.stopI = 0;
}
get nodes() {
return this._nodes;
}
Push(...nodes) {
this._nodes.push(...nodes);
}
Pop() {
return this._nodes.pop();
}
get First() {
return this._nodes[this.Size() - 1];
}
set First(node) {
this._nodes[this.Size() - 1] = node;
}
get Last() {
return this._nodes[0];
}
set Last(node) {
this._nodes[0] = node;
}
Peek(n) {
if (n == null) {
n = 1;
}
return this._nodes.slice(this.Size() - n);
}
Size() {
return this._nodes.length;
}
Clear() {
this._nodes = [];
}
toMml(inferred = true, forceRow) {
if (this._nodes.length === 1 && !forceRow) {
return this.First;
}
return this.create('node', inferred ? 'inferredMrow' : 'mrow', this._nodes, {});
}
create(kind, ...rest) {
return this.factory.configuration.nodeFactory.create(kind, ...rest);
}
}
class BaseItem extends MmlStack {
constructor(factory, ...nodes) {
super(nodes);
this.factory = factory;
this.global = {};
this._properties = {};
if (this.isOpen) {
this._env = {};
}
}
get kind() {
return 'base';
}
get env() {
return this._env;
}
set env(value) {
this._env = value;
}
get copyEnv() {
return true;
}
getProperty(key) {
return this._properties[key];
}
setProperty(key, value) {
this._properties[key] = value;
return this;
}
get isOpen() {
return false;
}
get isClose() {
return false;
}
get isFinal() {
return false;
}
isKind(kind) {
return kind === this.kind;
}
checkItem(item) {
if (item.isKind('over') && this.isOpen) {
item.setProperty('num', this.toMml(false));
this.Clear();
}
if (item.isKind('cell') && this.isOpen) {
if (item.getProperty('linebreak')) {
return BaseItem.fail;
}
throw new tex_TexError('Misplaced', 'Misplaced %1', item.getName());
}
if (item.isClose && this.getErrors(item.kind)) {
const [id, message] = this.getErrors(item.kind);
throw new tex_TexError(id, message, item.getName());
}
if (!item.isFinal) {
return BaseItem.success;
}
this.Push(item.First);
return BaseItem.fail;
}
clearEnv() {
for (const id of Object.keys(this.env)) {
delete this.env[id];
}
}
setProperties(def) {
Object.assign(this._properties, def);
return this;
}
getName() {
return this.getProperty('name');
}
toString() {
return this.kind + '[' + this.nodes.join('; ') + ']';
}
getErrors(kind) {
const CLASS = this.constructor;
return CLASS.errors[kind] || BaseItem.errors[kind];
}
}
BaseItem.fail = [null, false];
BaseItem.success = [null, true];
BaseItem.errors = {
end: ['MissingBeginExtraEnd', 'Missing \\begin{%1} or extra \\end{%1}'],
close: ['ExtraCloseMissingOpen', 'Extra close brace or missing open brace'],
right: ['MissingLeftExtraRight', 'Missing \\left or extra \\right'],
middle: ['ExtraMiddle', 'Extra \\middle'],
};
//# sourceMappingURL=StackItem.js.map
;// ./mjs/input/tex/TexConstants.js
const TexConstant = {
Variant: {
NORMAL: 'normal',
BOLD: 'bold',
ITALIC: 'italic',
BOLDITALIC: 'bold-italic',
DOUBLESTRUCK: 'double-struck',
FRAKTUR: 'fraktur',
BOLDFRAKTUR: 'bold-fraktur',
SCRIPT: 'script',
BOLDSCRIPT: 'bold-script',
SANSSERIF: 'sans-serif',
BOLDSANSSERIF: 'bold-sans-serif',
SANSSERIFITALIC: 'sans-serif-italic',
SANSSERIFBOLDITALIC: 'sans-serif-bold-italic',
MONOSPACE: 'monospace',
INITIAL: 'inital',
TAILED: 'tailed',
LOOPED: 'looped',
STRETCHED: 'stretched',
CALLIGRAPHIC: '-tex-calligraphic',
BOLDCALLIGRAPHIC: '-tex-bold-calligraphic',
OLDSTYLE: '-tex-oldstyle',
BOLDOLDSTYLE: '-tex-bold-oldstyle',
MATHITALIC: '-tex-mathit',
},
Form: {
PREFIX: 'prefix',
INFIX: 'infix',
POSTFIX: 'postfix',
},
LineBreak: {
AUTO: 'auto',
NEWLINE: 'newline',
NOBREAK: 'nobreak',
GOODBREAK: 'goodbreak',
BADBREAK: 'badbreak',
},
LineBreakStyle: {
BEFORE: 'before',
AFTER: 'after',
DUPLICATE: 'duplicate',
INFIXLINBREAKSTYLE: 'infixlinebreakstyle',
},
IndentAlign: {
LEFT: 'left',
CENTER: 'center',
RIGHT: 'right',
AUTO: 'auto',
ID: 'id',
INDENTALIGN: 'indentalign',
},
IndentShift: {
INDENTSHIFT: 'indentshift',
},
LineThickness: {
THIN: 'thin',
MEDIUM: 'medium',
THICK: 'thick',
},
Notation: {
LONGDIV: 'longdiv',
ACTUARIAL: 'actuarial',
PHASORANGLE: 'phasorangle',
RADICAL: 'radical',
BOX: 'box',
ROUNDEDBOX: 'roundedbox',
CIRCLE: 'circle',
LEFT: 'left',
RIGHT: 'right',
TOP: 'top',
BOTTOM: 'bottom',
UPDIAGONALSTRIKE: 'updiagonalstrike',
DOWNDIAGONALSTRIKE: 'downdiagonalstrike',
VERTICALSTRIKE: 'verticalstrike',
HORIZONTALSTRIKE: 'horizontalstrike',
NORTHEASTARROW: 'northeastarrow',
MADRUWB: 'madruwb',
UPDIAGONALARROW: 'updiagonalarrow',
},
Align: {
TOP: 'top',
BOTTOM: 'bottom',
CENTER: 'center',
BASELINE: 'baseline',
AXIS: 'axis',
LEFT: 'left',
RIGHT: 'right',
},
Lines: {
NONE: 'none',
SOLID: 'solid',
DASHED: 'dashed',
},
Side: {
LEFT: 'left',
RIGHT: 'right',
LEFTOVERLAP: 'leftoverlap',
RIGHTOVERLAP: 'rightoverlap',
},
Width: {
AUTO: 'auto',
FIT: 'fit',
},
Actiontype: {
TOGGLE: 'toggle',
STATUSLINE: 'statusline',
TOOLTIP: 'tooltip',
INPUT: 'input',
},
Overflow: {
LINBREAK: 'linebreak',
SCROLL: 'scroll',
ELIDE: 'elide',
TRUNCATE: 'truncate',
SCALE: 'scale',
},
Unit: {
EM: 'em',
EX: 'ex',
PX: 'px',
IN: 'in',
CM: 'cm',
MM: 'mm',
PT: 'pt',
PC: 'pc',
},
Attr: {
LATEX: 'data-latex',
LATEXITEM: 'data-latex-item',
},
};
//# sourceMappingURL=TexConstants.js.map
;// ./mjs/input/tex/TexParser.js
class TexParser {
constructor(_string, env, configuration) {
this._string = _string;
this.configuration = configuration;
this.macroCount = 0;
this.i = 0;
this.currentCS = '';
this.saveI = 0;
const inner = Object.hasOwn(env, 'isInner');
const isInner = env['isInner'];
delete env['isInner'];
let ENV;
if (env) {
ENV = {};
for (const id of Object.keys(env)) {
ENV[id] = env[id];
}
}
this.configuration.pushParser(this);
this.stack = new Stack(this.itemFactory, ENV, inner ? isInner : true);
this.Parse();
this.Push(this.itemFactory.create('stop'));
this.updateResult(this.string, this.i);
this.stack.env = ENV;
}
get options() {
return this.configuration.options;
}
get itemFactory() {
return this.configuration.itemFactory;
}
get tags() {
return this.configuration.tags;
}
set string(str) {
this._string = str;
}
get string() {
return this._string;
}
parse(kind, input) {
const i = this.saveI;
this.saveI = this.i;
const result = this.configuration.handlers.get(kind).parse(input);
this.updateResult(input[1], i);
this.saveI = i;
return result;
}
lookup(kind, token) {
return this.configuration.handlers.get(kind).lookup(token);
}
contains(kind, token) {
return this.configuration.handlers.get(kind).contains(token);
}
toString() {
let str = '';
for (const config of Array.from(this.configuration.handlers.keys())) {
str +=
config +
': ' +
this.configuration.handlers.get(config) +
'\n';
}
return str;
}
Parse() {
let c;
while (this.i < this.string.length) {
c = this.getCodePoint();
this.i += c.length;
this.parse(HandlerType.CHARACTER, [this, c]);
}
}
Push(arg) {
if (arg instanceof BaseItem) {
arg.startI = this.saveI;
arg.stopI = this.i;
arg.startStr = this.string;
}
if (arg instanceof AbstractMmlNode && arg.isInferred) {
this.PushAll(arg.childNodes);
}
else {
this.stack.Push(arg);
}
}
PushAll(args) {
for (const arg of args) {
this.stack.Push(arg);
}
}
mml() {
if (!this.stack.Top().isKind('mml')) {
return null;
}
const node = this.stack.Top().First;
this.configuration.popParser();
node.attributes.set(TexConstant.Attr.LATEX, this.string);
return node;
}
convertDelimiter(c) {
var _a;
const token = this.lookup(HandlerType.DELIMITER, c);
return (_a = token === null || token === void 0 ? void 0 : token.char) !== null && _a !== void 0 ? _a : null;
}
getCodePoint() {
const code = this.string.codePointAt(this.i);
return code === undefined ? '' : String.fromCodePoint(code);
}
nextIsSpace() {
return !!this.string.charAt(this.i).match(/\s/);
}
GetNext() {
while (this.nextIsSpace()) {
this.i++;
}
return this.getCodePoint();
}
GetCS() {
const CS = this.string
.slice(this.i)
.match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);
if (CS) {
this.i += CS[0].length;
return CS[2] || CS[1];
}
else {
this.i++;
return ' ';
}
}
GetArgument(_name, noneOK = false) {
switch (this.GetNext()) {
case '':
if (!noneOK) {
throw new tex_TexError('MissingArgFor', 'Missing argument for %1', this.currentCS);
}
return null;
case '}':
if (!noneOK) {
throw new tex_TexError('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
return null;
case '\\':
this.i++;
return '\\' + this.GetCS();
case '{': {
const j = ++this.i;
let parens = 1;
while (this.i < this.string.length) {
switch (this.string.charAt(this.i++)) {
case '\\':
this.i++;
break;
case '{':
parens++;
break;
case '}':
if (--parens === 0) {
return this.string.slice(j, this.i - 1);
}
break;
}
}
throw new tex_TexError('MissingCloseBrace', 'Missing close brace');
}
}
const c = this.getCodePoint();
this.i += c.length;
return c;
}
GetBrackets(_name, def, matchBrackets = false) {
if (this.GetNext() !== '[') {
return def;
}
const j = ++this.i;
let braces = 0;
let brackets = 0;
while (this.i < this.string.length) {
switch (this.string.charAt(this.i++)) {
case '{':
braces++;
break;
case '\\':
this.i++;
break;
case '}':
if (braces-- <= 0) {
throw new tex_TexError('ExtraCloseLooking', 'Extra close brace while looking for %1', "']'");
}
break;
case '[':
if (braces === 0)
brackets++;
break;
case ']':
if (braces === 0) {
if (!matchBrackets || brackets === 0) {
return this.string.slice(j, this.i - 1);
}
brackets--;
}
break;
}
}
throw new tex_TexError('MissingCloseBracket', "Could not find closing ']' for argument to %1", this.currentCS);
}
GetDelimiter(name, braceOK = false) {
let c = this.GetNext();
this.i += c.length;
if (this.i <= this.string.length) {
if (c === '\\') {
c += this.GetCS();
}
else if (c === '{' && braceOK) {
this.i--;
c = this.GetArgument(name).trim();
}
if (this.contains(HandlerType.DELIMITER, c)) {
return this.convertDelimiter(c);
}
}
throw new tex_TexError('MissingOrUnrecognizedDelim', 'Missing or unrecognized delimiter for %1', this.currentCS);
}
GetDimen(name) {
if (this.GetNext() === '{') {
const dimen = this.GetArgument(name);
const [value, unit] = UnitUtil.matchDimen(dimen);
if (value) {
return value + unit;
}
}
else {
const dimen = this.string.slice(this.i);
const [value, unit, length] = UnitUtil.matchDimen(dimen, true);
if (value) {
this.i += length;
return value + unit;
}
}
throw new tex_TexError('MissingDimOrUnits', 'Missing dimension or its units for %1', this.currentCS);
}
GetUpTo(_name, token) {
while (this.nextIsSpace()) {
this.i++;
}
const j = this.i;
let braces = 0;
while (this.i < this.string.length) {
const k = this.i;
let c = this.GetNext();
this.i += c.length;
switch (c) {
case '\\':
c += this.GetCS();
break;
case '{':
braces++;
break;
case '}':
if (braces === 0) {
throw new tex_TexError('ExtraCloseLooking', 'Extra close brace while looking for %1', token);
}
braces--;
break;
}
if (braces === 0 && c === token) {
return this.string.slice(j, k);
}
}
throw new tex_TexError('TokenNotFoundForCommand', 'Could not find %1 for %2', token, this.currentCS);
}
ParseArg(name) {
return new TexParser(this.GetArgument(name), this.stack.env, this.configuration).mml();
}
ParseUpTo(name, token) {
return new TexParser(this.GetUpTo(name, token), this.stack.env, this.configuration).mml();
}
GetDelimiterArg(name) {
const c = UnitUtil.trimSpaces(this.GetArgument(name));
if (c === '') {
return null;
}
if (this.contains(HandlerType.DELIMITER, c)) {
return c;
}
throw new tex_TexError('MissingOrUnrecognizedDelim', 'Missing or unrecognized delimiter for %1', this.currentCS);
}
GetStar() {
const star = this.GetNext() === '*';
if (star) {
this.i++;
}
return star;
}
create(kind, ...rest) {
const node = this.configuration.nodeFactory.create(kind, ...rest);
if (node.isToken && node.attributes.hasExplicit('mathvariant')) {
if (node.attributes.get('mathvariant').charAt(0) === '-') {
node.setProperty('ignore-variant', true);
}
}
return node;
}
updateResult(input, old) {
const node = this.stack.Prev(true);
if (!node) {
return;
}
const existing = node.attributes.get(TexConstant.Attr.LATEXITEM);
if (existing !== undefined) {
node.attributes.set(TexConstant.Attr.LATEX, existing);
return;
}
old = old < this.saveI ? this.saveI : old;
let str = old !== this.i ? this.string.slice(old, this.i) : input;
str = str.trim();
if (!str) {
return;
}
if (input === '\\') {
str = '\\' + str;
}
if (node.attributes.get(TexConstant.Attr.LATEX) === '^' &&
str !== '^' &&
str !== '\\^') {
if (node.childNodes[2]) {
if (str === '}') {
this.composeBraces(node.childNodes[2]);
}
else {
node.childNodes[2].attributes.set(TexConstant.Attr.LATEX, str);
}
}
if (node.childNodes[1]) {
const sub = node.childNodes[1].attributes.get(TexConstant.Attr.LATEX);
this.composeLatex(node, `_${sub}^`, 0, 2);
}
else {
this.composeLatex(node, '^', 0, 2);
}
return;
}
if (node.attributes.get(TexConstant.Attr.LATEX) === '_' &&
str !== '_' &&
str !== '\\_') {
if (node.childNodes[1]) {
if (str === '}') {
this.composeBraces(node.childNodes[1]);
}
else {
node.childNodes[1].attributes.set(TexConstant.Attr.LATEX, str);
}
}
if (node.childNodes[2]) {
const sub = node.childNodes[2].attributes.get(TexConstant.Attr.LATEX);
this.composeLatex(node, `^${sub}_`, 0, 1);
}
else {
this.composeLatex(node, '_', 0, 1);
}
return;
}
if (str === '}') {
this.composeBraces(node);
return;
}
node.attributes.set(TexConstant.Attr.LATEX, str);
}
composeLatex(node, comp, pos1, pos2) {
if (!node.childNodes[pos1] || !node.childNodes[pos2])
return;
const expr = (node.childNodes[pos1].attributes.get(TexConstant.Attr.LATEX) || '') +
comp +
node.childNodes[pos2].attributes.get(TexConstant.Attr.LATEX);
node.attributes.set(TexConstant.Attr.LATEX, expr);
}
composeBraces(atom) {
const str = this.composeBracedContent(atom);
atom.attributes.set(TexConstant.Attr.LATEX, `{${str}}`);
}
composeBracedContent(atom) {
var _a, _b;
const children = ((_a = atom.childNodes[0]) === null || _a === void 0 ? void 0 : _a.childNodes) || [];
let expr = '';
for (const child of children) {
const att = (((_b = child === null || child === void 0 ? void 0 : child.attributes) === null || _b === void 0 ? void 0 : _b.get(TexConstant.Attr.LATEX)) ||
'');
if (!att)
continue;
expr +=
expr && expr.match(/[a-zA-Z]$/) && att.match(/^[a-zA-Z]/)
? ' ' + att
: att;
}
return expr;
}
}
//# sourceMappingURL=TexParser.js.map
;// ./components/mjs/core/lib/core/Tree/Factory.js
const Factory_def = MathJax._.core.Tree.Factory;
const AbstractFactory = Factory_def.AbstractFactory;
;// ./mjs/input/tex/StackItemFactory.js
class DummyItem extends BaseItem {
}
class StackItemFactory extends AbstractFactory {
constructor() {
super(...arguments);
this.defaultKind = 'dummy';
this.configuration = null;
}
}
StackItemFactory.DefaultStackItems = {
[DummyItem.prototype.kind]: DummyItem,
};
/* harmony default export */ const tex_StackItemFactory = (StackItemFactory);
//# sourceMappingURL=StackItemFactory.js.map
;// ./mjs/input/tex/NodeFactory.js
class NodeFactory {
constructor() {
this.mmlFactory = null;
this.factory = {
node: NodeFactory.createNode,
token: NodeFactory.createToken,
text: NodeFactory.createText,
error: NodeFactory.createError,
};
}
static createNode(factory, kind, children = [], def = {}, text) {
const node = factory.mmlFactory.create(kind);
node.setChildren(children);
if (text) {
node.appendChild(text);
}
tex_NodeUtil.setProperties(node, def);
return node;
}
static createToken(factory, kind, def = {}, text = '') {
const textNode = factory.create('text', text);
return factory.create('node', kind, [], def, textNode);
}
static createText(factory, text) {
if (text == null) {
return null;
}
return factory.mmlFactory.create('text').setText(text);
}
static createError(factory, message) {
const text = factory.create('text', message);
const mtext = factory.create('node', 'mtext', [], {}, text);
const error = factory.create('node', 'merror', [mtext], {
'data-mjx-error': message,
});
return error;
}
setMmlFactory(mmlFactory) {
this.mmlFactory = mmlFactory;
}
set(kind, func) {
this.factory[kind] = func;
}
setCreators(maps) {
for (const kind in maps) {
this.set(kind, maps[kind]);
}
}
create(kind, ...rest) {
const func = this.factory[kind] || this.factory['node'];
const node = func(this, rest[0], ...rest.slice(1));
if (kind === 'node') {
this.configuration.addNode(rest[0], node);
}
return node;
}
get(kind) {
return this.factory[kind];
}
}
//# sourceMappingURL=NodeFactory.js.map
;// ./components/mjs/core/lib/util/Entities.js
const Entities_def = MathJax._.util.Entities;
const options = Entities_def.options;
const entities = Entities_def.entities;
const add = Entities_def.add;
const remove = Entities_def.remove;
const translate = Entities_def.translate;
const numeric = Entities_def.numeric;
;// ./mjs/input/tex/ParseUtil.js
class KeyValueDef {
static oneof(...values) {
return new this('string', (value) => values.includes(value), (value) => value);
}
constructor(name, verify, convert) {
this.name = name;
this.verify = verify;
this.convert = convert;
}
}
const KeyValueTypes = {
boolean: new KeyValueDef('boolean', (value) => value === 'true' || value === 'false', (value) => value === 'true'),
number: new KeyValueDef('number', (value) => !!value.match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/), (value) => parseFloat(value)),
integer: new KeyValueDef('integer', (value) => !!value.match(/^[-+]?\d+$/), (value) => parseInt(value)),
string: new KeyValueDef('string', (_value) => true, (value) => value),
dimen: new KeyValueDef('dimen', (value) => UnitUtil.matchDimen(value)[0] !== null, (value) => value),
};
function readKeyval(text, l3keys = false) {
const options = {};
let rest = text;
let end, key, val;
let dropBrace = true;
while (rest) {
[key, end, rest] = readValue(rest, ['=', ','], l3keys, dropBrace);
dropBrace = false;
if (end === '=') {
[val, end, rest] = readValue(rest, [','], l3keys);
val = val === 'false' || val === 'true' ? JSON.parse(val) : val;
options[key] = val;
}
else if (key) {
options[key] = true;
}
}
return options;
}
function removeBraces(text, count) {
if (count === 0) {
return text
.replace(/^\s+/, '')
.replace(/([^\\\s]|^)((?:\\\\)*(?:\\\s)?)?\s+$/, '$1$2');
}
while (count > 0) {
text = text.trim().slice(1, -1);
count--;
}
return text;
}
function readValue(text, end, l3keys = false, dropBrace = false) {
const length = text.length;
let braces = 0;
let value = '';
let index = 0;
let start = 0;
let countBraces = true;
while (index < length) {
const c = text[index++];
switch (c) {
case '\\':
value += c + (text[index++] || '');
countBraces = false;
continue;
case ' ':
break;
case '{':
if (countBraces) {
start++;
}
braces++;
break;
case '}':
if (!braces) {
throw new tex_TexError('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
braces--;
countBraces = false;
break;
default:
if (!braces && end.includes(c)) {
return [
removeBraces(value, l3keys ? Math.min(1, start) : start),
c,
text.slice(index),
];
}
if (start > braces) {
start = braces;
}
countBraces = false;
}
value += c;
}
if (braces) {
throw new tex_TexError('ExtraOpenMissingClose', 'Extra open brace or missing close brace');
}
return dropBrace && start
? ['', '', removeBraces(value, 1)]
: [
removeBraces(value, l3keys ? Math.min(1, start) : start),
'',
text.slice(index),
];
}
const ParseUtil = {
cols(...W) {
return W.map((n) => UnitUtil.em(n)).join(' ');
},
fenced(configuration, open, mml, close, big = '', color = '') {
const nf = configuration.nodeFactory;
const mrow = nf.create('node', 'mrow', [], {
open: open,
close: close,
texClass: TEXCLASS.INNER,
});
let mo;
if (big) {
mo = new TexParser('\\' + big + 'l' + open, configuration.parser.stack.env, configuration).mml();
}
else {
const openNode = nf.create('text', open);
mo = nf.create('node', 'mo', [], {
fence: true,
stretchy: true,
symmetric: true,
texClass: TEXCLASS.OPEN,
}, openNode);
}
tex_NodeUtil.appendChildren(mrow, [mo, mml]);
if (big) {
mo = new TexParser('\\' + big + 'r' + close, configuration.parser.stack.env, configuration).mml();
}
else {
const closeNode = nf.create('text', close);
mo = nf.create('node', 'mo', [], {
fence: true,
stretchy: true,
symmetric: true,
texClass: TEXCLASS.CLOSE,
}, closeNode);
}
if (color) {
mo.attributes.set('mathcolor', color);
}
tex_NodeUtil.appendChildren(mrow, [mo]);
return mrow;
},
fixedFence(configuration, open, mml, close) {
const mrow = configuration.nodeFactory.create('node', 'mrow', [], {
open: open,
close: close,
texClass: TEXCLASS.ORD,
});
if (open) {
tex_NodeUtil.appendChildren(mrow, [
ParseUtil.mathPalette(configuration, open, 'l'),
]);
}
if (tex_NodeUtil.isType(mml, 'mrow')) {
tex_NodeUtil.appendChildren(mrow, tex_NodeUtil.getChildren(mml));
}
else {
tex_NodeUtil.appendChildren(mrow, [mml]);
}
if (close) {
tex_NodeUtil.appendChildren(mrow, [
ParseUtil.mathPalette(configuration, close, 'r'),
]);
}
return mrow;
},
mathPalette(configuration, fence, side) {
if (fence === '{' || fence === '}') {
fence = '\\' + fence;
}
const D = '{\\bigg' + side + ' ' + fence + '}';
const T = '{\\big' + side + ' ' + fence + '}';
return new TexParser('\\mathchoice' + D + T + T + T, {}, configuration).mml();
},
fixInitialMO(configuration, nodes) {
for (let i = 0, m = nodes.length; i < m; i++) {
const child = nodes[i];
if (child &&
!tex_NodeUtil.isType(child, 'mspace') &&
(!tex_NodeUtil.isType(child, 'TeXAtom') ||
(tex_NodeUtil.getChildren(child)[0] &&
tex_NodeUtil.getChildren(tex_NodeUtil.getChildren(child)[0]).length))) {
if (tex_NodeUtil.isEmbellished(child) ||
(tex_NodeUtil.isType(child, 'TeXAtom') &&
tex_NodeUtil.getTexClass(child) === TEXCLASS.REL)) {
const mi = configuration.nodeFactory.create('node', 'mi');
nodes.unshift(mi);
}
break;
}
}
},
internalMath(parser, text, level, font) {
text = text.replace(/ +/g, ' ');
if (parser.configuration.options.internalMath) {
return parser.configuration.options.internalMath(parser, text, level, font);
}
const mathvariant = font || parser.stack.env.font;
const def = mathvariant ? { mathvariant } : {};
let mml = [], i = 0, k = 0, c, node, match = '', braces = 0;
if (text.match(/\\?[${}\\]|\\\(|\\(?:eq)?ref\s*\{|\\U/)) {
while (i < text.length) {
c = text.charAt(i++);
if (c === '$') {
if (match === '$' && braces === 0) {
node = parser.create('node', 'TeXAtom', [
new TexParser(text.slice(k, i - 1), {}, parser.configuration).mml(),
]);
mml.push(node);
match = '';
k = i;
}
else if (match === '') {
if (k < i - 1) {
mml.push(ParseUtil.internalText(parser, text.slice(k, i - 1), def));
}
match = '$';
k = i;
}
}
else if (c === '{' && match !== '') {
braces++;
}
else if (c === '}') {
if (match === '}' && braces === 0) {
const atom = new TexParser(text.slice(k, i), {}, parser.configuration).mml();
node = parser.create('node', 'TeXAtom', [atom], def);
mml.push(node);
match = '';
k = i;
}
else if (match !== '') {
if (braces) {
braces--;
}
}
}
else if (c === '\\') {
if (match === '' && text.substring(i).match(/^(eq)?ref\s*\{/)) {
const len = RegExp['$&'].length;
if (k < i - 1) {
mml.push(ParseUtil.internalText(parser, text.slice(k, i - 1), def));
}
match = '}';
k = i - 1;
i += len;
}
else {
c = text.charAt(i++);
if (c === '(' && match === '') {
if (k < i - 2) {
mml.push(ParseUtil.internalText(parser, text.slice(k, i - 2), def));
}
match = ')';
k = i;
}
else if (c === ')' && match === ')' && braces === 0) {
node = parser.create('node', 'TeXAtom', [
new TexParser(text.slice(k, i - 2), {}, parser.configuration).mml(),
]);
mml.push(node);
match = '';
k = i;
}
else if (c.match(/[${}\\]/) && match === '') {
i--;
text = text.substring(0, i - 1) + text.substring(i);
}
else if (c === 'U') {
const arg = text
.substring(i)
.match(/^\s*(?:([0-9A-F])|\{\s*([0-9A-F]+)\s*\})/);
if (!arg) {
throw new tex_TexError('BadRawUnicode', 'Argument to %1 must a hexadecimal number with 1 to 6 digits', '\\U');
}
const c = String.fromCodePoint(parseInt(arg[1] || arg[2], 16));
text =
text.substring(0, i - 2) +
c +
text.substring(i + arg[0].length);
i = i - 2 + c.length;
}
}
}
}
if (match !== '') {
throw new tex_TexError('MathNotTerminated', 'Math mode is not properly terminated');
}
}
if (k < text.length) {
mml.push(ParseUtil.internalText(parser, text.slice(k), def));
}
if (level != null) {
mml = [
parser.create('node', 'mstyle', mml, {
displaystyle: false,
scriptlevel: level,
}),
];
}
else if (mml.length > 1) {
mml = [parser.create('node', 'mrow', mml)];
}
return mml;
},
internalText(parser, text, def) {
text = text
.replace(/\n+/g, ' ')
.replace(/^ +/, entities.nbsp)
.replace(/ +$/, entities.nbsp);
const textNode = parser.create('text', text);
return parser.create('node', 'mtext', [], def, textNode);
},
underOver(parser, base, script, pos, stack) {
ParseUtil.checkMovableLimits(base);
if (tex_NodeUtil.isType(base, 'munderover') && tex_NodeUtil.isEmbellished(base)) {
tex_NodeUtil.setProperties(tex_NodeUtil.getCoreMO(base), {
lspace: 0,
rspace: 0,
});
const mo = parser.create('node', 'mo', [], { rspace: 0 });
base = parser.create('node', 'mrow', [mo, base]);
}
const mml = parser.create('node', 'munderover', [base]);
tex_NodeUtil.setChild(mml, pos === 'over' ? mml.over : mml.under, script);
let node = mml;
if (stack) {
node = parser.create('node', 'TeXAtom', [
parser.create('node', 'mstyle', [mml], {
displaystyle: true,
scriptlevel: 0,
}),
], {
texClass: TEXCLASS.OP,
movesupsub: true,
});
}
tex_NodeUtil.setProperty(node, 'subsupOK', true);
return node;
},
checkMovableLimits(base) {
const symbol = tex_NodeUtil.isType(base, 'mo') ? tex_NodeUtil.getForm(base) : null;
if (tex_NodeUtil.getProperty(base, 'movablelimits') ||
(symbol && symbol[3] && symbol[3].movablelimits)) {
tex_NodeUtil.setProperties(base, { movablelimits: false });
}
},
setArrayAlign(array, align, parser) {
if (!parser) {
align = UnitUtil.trimSpaces(align || '');
}
if (align === 't') {
array.arraydef.align = 'baseline 1';
}
else if (align === 'b') {
array.arraydef.align = 'baseline -1';
}
else if (align === 'c') {
array.arraydef.align = 'axis';
}
else if (align) {
if (parser) {
parser.string = `[${align}]` + parser.string.slice(parser.i);
parser.i = 0;
}
else {
array.arraydef.align = align;
}
}
return array;
},
substituteArgs(parser, args, str) {
let text = '';
let newstring = '';
let i = 0;
while (i < str.length) {
let c = str.charAt(i++);
if (c === '\\') {
text += c + str.charAt(i++);
}
else if (c === '#') {
c = str.charAt(i++);
if (c === '#') {
text += c;
}
else {
if (!c.match(/[1-9]/) || parseInt(c, 10) > args.length) {
throw new tex_TexError('IllegalMacroParam', 'Illegal macro parameter reference');
}
newstring = ParseUtil.addArgs(parser, ParseUtil.addArgs(parser, newstring, text), args[parseInt(c, 10) - 1]);
text = '';
}
}
else {
text += c;
}
}
return ParseUtil.addArgs(parser, newstring, text);
},
addArgs(parser, s1, s2) {
if (s2.match(/^[a-z]/i) && s1.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)) {
s1 += ' ';
}
if (s1.length + s2.length > parser.configuration.options['maxBuffer']) {
throw new tex_TexError('MaxBufferSize', 'MathJax internal buffer size exceeded; is there a' +
' recursive macro call?');
}
return s1 + s2;
},
checkMaxMacros(parser, isMacro = true) {
if (++parser.macroCount <= parser.configuration.options['maxMacros']) {
return;
}
if (isMacro) {
throw new tex_TexError('MaxMacroSub1', 'MathJax maximum macro substitution count exceeded; ' +
'is here a recursive macro call?');
}
else {
throw new tex_TexError('MaxMacroSub2', 'MathJax maximum substitution count exceeded; ' +
'is there a recursive latex environment?');
}
},
checkEqnEnv(parser, nestable = true) {
const top = parser.stack.Top();
const first = top.First;
if ((top.getProperty('nestable') && nestable && !first) ||
top.getProperty('nestStart')) {
return;
}
if (!top.isKind('start') || first) {
throw new tex_TexError('ErroneousNestingEq', 'Erroneous nesting of equation structures');
}
},
copyNode(node, parser) {
const tree = node.copy();
const options = parser.configuration;
tree.walkTree((n) => {
options.addNode(n.kind, n);
const lists = (n.getProperty('in-lists') || '').split(/,/);
for (const list of lists) {
if (list) {
options.addNode(list, n);
}
}
});
return tree;
},
mmlFilterAttribute(_parser, _name, value) {
return value;
},
getFontDef(parser) {
const font = parser.stack.env['font'];
return font ? { mathvariant: font } : {};
},
keyvalOptions(attrib, allowed = null, error = false, l3keys = false) {
const def = readKeyval(attrib, l3keys);
if (allowed) {
for (const key of Object.keys(def)) {
if (Object.hasOwn(allowed, key)) {
if (allowed[key] instanceof KeyValueDef) {
const type = allowed[key];
const value = String(def[key]);
if (!type.verify(value)) {
throw new tex_TexError('InvalidValue', "Value for key '%1' is not of the expected type", key);
}
def[key] = type.convert(value);
}
}
else {
if (error) {
throw new tex_TexError('InvalidOption', 'Invalid option: %1', key);
}
delete def[key];
}
}
}
return def;
},
isLatinOrGreekChar(c) {
return !!c.normalize('NFD').match(/[a-zA-Z\u0370-\u03F0]/);
},
};
//# sourceMappingURL=ParseUtil.js.map
;// ./mjs/input/tex/ColumnParser.js
class ColumnParser {
constructor() {
this.columnHandler = {
l: (state) => (state.calign[state.j++] = 'left'),
c: (state) => (state.calign[state.j++] = 'center'),
r: (state) => (state.calign[state.j++] = 'right'),
p: (state) => this.getColumn(state, 'top'),
m: (state) => this.getColumn(state, 'middle'),
b: (state) => this.getColumn(state, 'bottom'),
w: (state) => this.getColumn(state, 'top', ''),
W: (state) => this.getColumn(state, 'top', ''),
'|': (state) => this.addRule(state, 'solid'),
':': (state) => this.addRule(state, 'dashed'),
'>': (state) => (state.cstart[state.j] =
(state.cstart[state.j] || '') + this.getBraces(state)),
'<': (state) => (state.cend[state.j - 1] =
(state.cend[state.j - 1] || '') + this.getBraces(state)),
'@': (state) => this.addAt(state, this.getBraces(state)),
'!': (state) => this.addBang(state, this.getBraces(state)),
'*': (state) => this.repeat(state),
P: (state) => this.macroColumn(state, '>{$}p{#1}<{$}', 1),
M: (state) => this.macroColumn(state, '>{$}m{#1}<{$}', 1),
B: (state) => this.macroColumn(state, '>{$}b{#1}<{$}', 1),
' ': (_state) => { },
};
this.MAXCOLUMNS = 10000;
}
process(parser, template, array) {
const state = {
parser,
template,
i: 0,
j: 0,
c: '',
cwidth: [],
calign: [],
cspace: [],
clines: [],
cstart: array.cstart,
cend: array.cend,
ralign: array.ralign,
cextra: array.cextra,
};
let n = 0;
while (state.i < state.template.length) {
if (n++ > this.MAXCOLUMNS) {
throw new tex_TexError('MaxColumns', 'Too many column specifiers (perhaps looping column definitions?)');
}
const code = state.template.codePointAt(state.i);
const c = (state.c = String.fromCodePoint(code));
state.i += c.length;
if (!Object.hasOwn(this.columnHandler, c)) {
throw new tex_TexError('BadPreamToken', 'Illegal pream-token (%1)', c);
}
this.columnHandler[c](state);
}
this.setColumnAlign(state, array);
this.setColumnWidths(state, array);
this.setColumnSpacing(state, array);
this.setColumnLines(state, array);
this.setPadding(state, array);
}
setColumnAlign(state, array) {
array.arraydef.columnalign = state.calign.join(' ');
}
setColumnWidths(state, array) {
if (!state.cwidth.length)
return;
const cwidth = [...state.cwidth];
if (cwidth.length < state.calign.length) {
cwidth.push('auto');
}
array.arraydef.columnwidth = cwidth.map((w) => w || 'auto').join(' ');
}
setColumnSpacing(state, array) {
if (!state.cspace.length)
return;
const cspace = [...state.cspace];
if (cspace.length < state.calign.length) {
cspace.push('1em');
}
array.arraydef.columnspacing = cspace
.slice(1)
.map((d) => d || '1em')
.join(' ');
}
setColumnLines(state, array) {
if (!state.clines.length)
return;
const clines = [...state.clines];
if (clines[0]) {
array.frame.push(['left', clines[0]]);
}
if (clines.length > state.calign.length) {
array.frame.push(['right', clines.pop()]);
}
else if (clines.length < state.calign.length) {
clines.push('none');
}
if (clines.length > 1) {
array.arraydef.columnlines = clines
.slice(1)
.map((l) => l || 'none')
.join(' ');
}
}
setPadding(state, array) {
if (!state.cextra[0] && !state.cextra[state.calign.length - 1])
return;
const i = state.calign.length - 1;
const cspace = state.cspace;
const space = !state.cextra[i] ? null : cspace[i];
array.arraydef['data-array-padding'] =
`${cspace[0] || '.5em'} ${space || '.5em'}`;
}
getColumn(state, ralign, calign = 'left') {
state.calign[state.j] = calign || this.getAlign(state);
state.cwidth[state.j] = this.getDimen(state);
state.ralign[state.j] = [
ralign,
state.cwidth[state.j],
state.calign[state.j],
];
state.j++;
}
getDimen(state) {
const dim = this.getBraces(state);
if (!UnitUtil.matchDimen(dim)[0]) {
throw new tex_TexError('MissingColumnDimOrUnits', 'Missing dimension or its units for %1 column declaration', state.c);
}
return dim;
}
getAlign(state) {
const align = this.getBraces(state);
return lookup(align.toLowerCase(), { l: 'left', c: 'center', r: 'right' }, '');
}
getBraces(state) {
while (state.template[state.i] === ' ')
state.i++;
if (state.i >= state.template.length) {
throw new tex_TexError('MissingArgForColumn', 'Missing argument for %1 column declaration', state.c);
}
if (state.template[state.i] !== '{') {
return state.template[state.i++];
}
const i = ++state.i;
let braces = 1;
while (state.i < state.template.length) {
switch (state.template.charAt(state.i++)) {
case '\\':
state.i++;
break;
case '{':
braces++;
break;
case '}':
if (--braces === 0) {
return state.template.slice(i, state.i - 1);
}
break;
}
}
throw new tex_TexError('MissingCloseBrace', 'Missing close brace');
}
macroColumn(state, macro, n) {
const args = [];
while (n > 0 && n--) {
args.push(this.getBraces(state));
}
state.template =
ParseUtil.substituteArgs(state.parser, args, macro) +
state.template.slice(state.i);
state.i = 0;
}
addRule(state, rule) {
if (state.clines[state.j]) {
this.addAt(state, '\\,');
}
state.clines[state.j] = rule;
if (state.cspace[state.j] === '0') {
state.cstart[state.j] = '\\hspace{.5em}';
}
}
addAt(state, macro) {
const { cstart, cspace, j } = state;
state.cextra[j] = true;
state.calign[j] = 'center';
if (state.clines[j]) {
if (cspace[j] === '.5em') {
cstart[j - 1] += '\\hspace{.25em}';
}
else if (!cspace[j]) {
state.cend[j - 1] = (state.cend[j - 1] || '') + '\\hspace{.5em}';
}
}
cstart[j] = macro;
cspace[j] = '0';
cspace[++state.j] = '0';
}
addBang(state, macro) {
const { cstart, cspace, j } = state;
state.cextra[j] = true;
state.calign[j] = 'center';
cstart[j] =
(cspace[j] === '0' && state.clines[j] ? '\\hspace{.25em}' : '') + macro;
if (!cspace[j]) {
cspace[j] = '.5em';
}
cspace[++state.j] = '.5em';
}
repeat(state) {
const num = this.getBraces(state);
const cols = this.getBraces(state);
const n = parseInt(num);
if (String(n) !== num) {
throw new tex_TexError('ColArgNotNum', 'First argument to %1 column specifier must be a number', '*');
}
state.template =
new Array(n).fill(cols).join('') + state.template.substring(state.i);
state.i = 0;
}
}
//# sourceMappingURL=ColumnParser.js.map
;// ./mjs/input/tex/ParseOptions.js
const MATHVARIANT = TexConstant.Variant;
class ParseOptions {
constructor(configuration, options = []) {
this.options = {};
this.columnParser = new ColumnParser();
this.packageData = new Map();
this.parsers = [];
this.root = null;
this.nodeLists = {};
this.error = false;
this.handlers = configuration.handlers;
this.nodeFactory = new NodeFactory();
this.nodeFactory.configuration = this;
this.nodeFactory.setCreators(configuration.nodes);
this.itemFactory = new tex_StackItemFactory(configuration.items);
this.itemFactory.configuration = this;
defaultOptions(this.options, ...options);
defaultOptions(this.options, configuration.options);
this.mathStyle =
ParseOptions.getVariant.get(this.options.mathStyle) ||
ParseOptions.getVariant.get('TeX');
}
pushParser(parser) {
this.parsers.unshift(parser);
}
popParser() {
this.parsers.shift();
}
get parser() {
return this.parsers[0];
}
clear() {
this.parsers = [];
this.root = null;
this.nodeLists = {};
this.error = false;
this.tags.resetTag();
}
addNode(property, node) {
let list = this.nodeLists[property];
if (!list) {
list = this.nodeLists[property] = [];
}
list.push(node);
if (node.kind !== property) {
const inlists = tex_NodeUtil.getProperty(node, 'in-lists') || '';
const lists = (inlists ? inlists.split(/,/) : [])
.concat(property)
.join(',');
tex_NodeUtil.setProperty(node, 'in-lists', lists);
}
}
getList(property) {
const list = this.nodeLists[property] || [];
const result = [];
for (const node of list) {
if (this.inTree(node)) {
result.push(node);
}
}
this.nodeLists[property] = result;
return result;
}
removeFromList(property, nodes) {
const list = this.nodeLists[property] || [];
for (const node of nodes) {
const i = list.indexOf(node);
if (i >= 0) {
list.splice(i, 1);
}
}
}
inTree(node) {
while (node && node !== this.root) {
node = node.parent;
}
return !!node;
}
}
ParseOptions.getVariant = new Map([
[
'TeX',
(c, b) => b ? (c.match(/^[\u0391-\u03A9\u03F4]/) ? MATHVARIANT.NORMAL : '') : '',
],
['ISO', (_c) => MATHVARIANT.ITALIC],
[
'French',
(c) => c.normalize('NFD').match(/^[a-z]/)
? MATHVARIANT.ITALIC
: MATHVARIANT.NORMAL,
],
['upright', (_c) => MATHVARIANT.NORMAL],
]);
/* harmony default export */ const tex_ParseOptions = (ParseOptions);
//# sourceMappingURL=ParseOptions.js.map
;// ./mjs/input/tex/Tags.js
class Label {
constructor(tag = '???', id = '') {
this.tag = tag;
this.id = id;
}
}
class TagInfo {
constructor(env = '', taggable = false, defaultTags = false, tag = null, tagId = '', tagFormat = '', noTag = false, labelId = '') {
this.env = env;
this.taggable = taggable;
this.defaultTags = defaultTags;
this.tag = tag;
this.tagId = tagId;
this.tagFormat = tagFormat;
this.noTag = noTag;
this.labelId = labelId;
}
}
class AbstractTags {
constructor() {
this.counter = 0;
this.allCounter = 0;
this.configuration = null;
this.ids = {};
this.allIds = {};
this.labels = {};
this.allLabels = {};
this.redo = false;
this.refUpdate = false;
this.currentTag = new TagInfo();
this.history = [];
this.stack = [];
this.enTag = function (node, tag) {
const nf = this.configuration.nodeFactory;
const cell = nf.create('node', 'mtd', [node]);
const row = nf.create('node', 'mlabeledtr', [tag, cell]);
const table = nf.create('node', 'mtable', [row], {
side: this.configuration.options['tagSide'],
minlabelspacing: this.configuration.options['tagIndent'],
displaystyle: true,
});
return table;
};
}
start(env, taggable, defaultTags) {
if (this.currentTag) {
this.stack.push(this.currentTag);
}
const label = this.label;
this.currentTag = new TagInfo(env, taggable, defaultTags);
this.label = label;
}
get env() {
return this.currentTag.env;
}
end() {
this.history.push(this.currentTag);
const label = this.label;
this.currentTag = this.stack.pop();
if (label && !this.label) {
this.label = label;
}
}
tag(tag, noFormat) {
this.currentTag.tag = tag;
this.currentTag.tagFormat = noFormat ? tag : this.formatTag(tag);
this.currentTag.noTag = false;
}
notag() {
this.tag('', true);
this.currentTag.noTag = true;
}
get noTag() {
return this.currentTag.noTag;
}
set label(label) {
this.currentTag.labelId = label;
}
get label() {
return this.currentTag.labelId;
}
formatUrl(id, base) {
return base + '#' + encodeURIComponent(id);
}
formatTag(tag) {
return '(' + tag + ')';
}
formatRef(tag) {
return this.formatTag(tag);
}
formatId(id) {
return 'mjx-eqn:' + id.replace(/\s/g, '_');
}
formatNumber(n) {
return n.toString();
}
autoTag() {
if (this.currentTag.tag == null) {
this.counter++;
this.tag(this.formatNumber(this.counter), false);
}
}
clearTag() {
this.tag(null, true);
this.currentTag.tagId = '';
}
getTag(force = false) {
if (force) {
this.autoTag();
return this.makeTag();
}
const ct = this.currentTag;
if (ct.taggable && !ct.noTag) {
if (ct.defaultTags) {
this.autoTag();
}
if (ct.tag) {
return this.makeTag();
}
}
return null;
}
resetTag() {
this.history = [];
this.redo = false;
this.refUpdate = false;
this.clearTag();
}
reset(offset = 0) {
this.resetTag();
this.counter = this.allCounter = offset;
this.allLabels = {};
this.allIds = {};
this.label = '';
}
startEquation(math) {
this.history = [];
this.stack = [];
this.clearTag();
this.currentTag = new TagInfo('', undefined, undefined);
this.labels = {};
this.ids = {};
this.counter = this.allCounter;
this.redo = false;
const recompile = math.inputData.recompile;
if (recompile) {
this.refUpdate = true;
this.counter = recompile.counter;
}
}
finishEquation(math) {
if (this.redo) {
math.inputData.recompile = {
state: math.state(),
counter: this.allCounter,
};
}
if (!this.refUpdate) {
this.allCounter = this.counter;
}
Object.assign(this.allIds, this.ids);
Object.assign(this.allLabels, this.labels);
}
finalize(node, env) {
if (!env.display || this.currentTag.env || this.currentTag.tag == null) {
return node;
}
const tag = this.makeTag();
const table = this.enTag(node, tag);
return table;
}
makeId() {
this.currentTag.tagId = this.formatId(this.configuration.options['useLabelIds']
? this.label || this.currentTag.tag
: this.currentTag.tag);
}
makeTag() {
this.makeId();
if (this.label) {
this.labels[this.label] = new Label(this.currentTag.tag, this.currentTag.tagId);
this.label = '';
}
const mml = new TexParser('\\text{' + this.currentTag.tagFormat + '}', {}, this.configuration).mml();
return this.configuration.nodeFactory.create('node', 'mtd', [mml], {
id: this.currentTag.tagId,
rowalign: this.configuration.options.tagAlign,
});
}
}
class NoTags extends AbstractTags {
autoTag() { }
getTag() {
return !this.currentTag.tag ? null : super.getTag();
}
}
class AllTags extends AbstractTags {
finalize(node, env) {
if (!env.display ||
this.history.find(function (x) {
return x.taggable;
})) {
return node;
}
const tag = this.getTag(true);
return this.enTag(node, tag);
}
}
const tagsMapping = new Map([
['none', NoTags],
['all', AllTags],
]);
let defaultTags = 'none';
const TagsFactory = {
OPTIONS: {
tags: defaultTags,
tagSide: 'right',
tagIndent: '0.8em',
useLabelIds: true,
ignoreDuplicateLabels: false,
tagAlign: 'baseline',
},
add(name, constr) {
tagsMapping.set(name, constr);
},
addTags(tags) {
for (const key of Object.keys(tags)) {
TagsFactory.add(key, tags[key]);
}
},
create(name) {
const constr = tagsMapping.get(name) || tagsMapping.get(defaultTags);
if (!constr) {
throw Error('Unknown tags class');
}
return new constr();
},
setDefault(name) {
defaultTags = name;
},
getDefault() {
return TagsFactory.create(defaultTags);
},
};
//# sourceMappingURL=Tags.js.map
;// ./mjs/input/tex/Token.js
class Token {
constructor(_token, _char, _attributes) {
this._token = _token;
this._char = _char;
this._attributes = _attributes;
}
get token() {
return this._token;
}
get char() {
return this._char;
}
get attributes() {
return this._attributes;
}
}
class Macro {
constructor(_token, _func, _args = []) {
this._token = _token;
this._func = _func;
this._args = _args;
}
get token() {
return this._token;
}
get func() {
return this._func;
}
get args() {
return this._args;
}
}
//# sourceMappingURL=Token.js.map
;// ./mjs/input/tex/TokenMap.js
function parseResult(result) {
return result === void 0 ? true : result;
}
class AbstractTokenMap {
constructor(_name, _parser) {
this._name = _name;
this._parser = _parser;
MapHandler.register(this);
}
get name() {
return this._name;
}
parserFor(token) {
return this.contains(token) ? this.parser : null;
}
parse([env, token]) {
const parser = this.parserFor(token);
const mapped = this.lookup(token);
return parser && mapped ? parseResult(parser(env, mapped)) : null;
}
set parser(parser) {
this._parser = parser;
}
get parser() {
return this._parser;
}
}
class RegExpMap extends AbstractTokenMap {
constructor(name, parser, _regExp) {
super(name, parser);
this._regExp = _regExp;
}
contains(token) {
return this._regExp.test(token);
}
lookup(token) {
return this.contains(token) ? token : null;
}
}
class AbstractParseMap extends AbstractTokenMap {
constructor() {
super(...arguments);
this.map = new Map();
}
lookup(token) {
return this.map.get(token);
}
contains(token) {
return this.map.has(token);
}
add(token, object) {
this.map.set(token, object);
}
remove(token) {
this.map.delete(token);
}
}
class CharacterMap extends AbstractParseMap {
constructor(name, parser, json) {
super(name, parser);
for (const key of Object.keys(json)) {
const value = json[key];
const [char, attrs] = typeof value === 'string' ? [value, null] : value;
const character = new Token(key, char, attrs);
this.add(key, character);
}
}
}
class DelimiterMap extends CharacterMap {
parse([env, token]) {
return super.parse([env, '\\' + token]);
}
}
class MacroMap extends AbstractParseMap {
constructor(name, json, functionMap = {}) {
super(name, null);
const getMethod = (func) => typeof func === 'string' ? functionMap[func] : func;
for (const [key, value] of Object.entries(json)) {
let func;
let args;
if (Array.isArray(value)) {
func = getMethod(value[0]);
args = value.slice(1);
}
else {
func = getMethod(value);
args = [];
}
const character = new Macro(key, func, args);
this.add(key, character);
}
}
parserFor(token) {
const macro = this.lookup(token);
return macro ? macro.func : null;
}
parse([env, token]) {
const macro = this.lookup(token);
const parser = this.parserFor(token);
if (!macro || !parser) {
return null;
}
return parseResult(parser(env, macro.token, ...macro.args));
}
}
class CommandMap extends MacroMap {
parse([env, token]) {
const macro = this.lookup(token);
const parser = this.parserFor(token);
if (!macro || !parser) {
return null;
}
const saveCommand = env.currentCS;
env.currentCS = '\\' + token;
const result = parser(env, '\\' + macro.token, ...macro.args);
env.currentCS = saveCommand;
return parseResult(result);
}
}
class EnvironmentMap extends MacroMap {
constructor(name, parser, json, functionMap = {}) {
super(name, json, functionMap);
this.parser = parser;
}
parse([env, token]) {
const macro = this.lookup(token);
const envParser = this.parserFor(token);
if (!macro || !envParser) {
return null;
}
return parseResult(this.parser(env, macro.token, envParser, macro.args));
}
}
//# sourceMappingURL=TokenMap.js.map
;// ./components/mjs/core/lib/util/PrioritizedList.js
const PrioritizedList_def = MathJax._.util.PrioritizedList;
const PrioritizedList = PrioritizedList_def.PrioritizedList;
;// ./components/mjs/core/lib/util/FunctionList.js
const FunctionList_def = MathJax._.util.FunctionList;
const FunctionList = FunctionList_def.FunctionList;
;// ./mjs/input/tex/MapHandler.js
const maps = new Map();
const MapHandler = {
register(map) {
maps.set(map.name, map);
},
getMap(name) {
return maps.get(name);
},
};
class SubHandler {
constructor() {
this._configuration = new PrioritizedList();
this._fallback = new FunctionList();
}
add(maps, fallback, priority = PrioritizedList.DEFAULTPRIORITY) {
for (const name of maps.slice().reverse()) {
const map = MapHandler.getMap(name);
if (!map) {
this.warn(`Configuration '${name}' not found! Omitted.`);
return;
}
this._configuration.add(map, priority);
}
if (fallback) {
this._fallback.add(fallback, priority);
}
}
remove(maps, fallback = null) {
for (const name of maps) {
const map = this.retrieve(name);
if (map) {
this._configuration.remove(map);
}
}
if (fallback) {
this._fallback.remove(fallback);
}
}
parse(input) {
for (const { item: map } of this._configuration) {
const result = map.parse(input);
if (result === SubHandler.FALLBACK) {
break;
}
if (result) {
return result;
}
}
const [env, token] = input;
Array.from(this._fallback)[0].item(env, token);
return;
}
lookup(token) {
const map = this.applicable(token);
return map ? map.lookup(token) : null;
}
contains(token) {
const map = this.applicable(token);
return (!!map && !(map instanceof CharacterMap && map.lookup(token).char === null));
}
toString() {
const names = [];
for (const { item: map } of this._configuration) {
names.push(map.name);
}
return names.join(', ');
}
applicable(token) {
for (const { item: map } of this._configuration) {
if (map.contains(token)) {
return map;
}
}
return null;
}
retrieve(name) {
for (const { item: map } of this._configuration) {
if (map.name === name) {
return map;
}
}
return null;
}
warn(message) {
console.log('TexParser Warning: ' + message);
}
}
SubHandler.FALLBACK = Symbol('fallback');
class SubHandlers {
constructor() {
this.map = new Map();
}
add(handlers, fallbacks, priority = PrioritizedList.DEFAULTPRIORITY) {
for (const key of Object.keys(handlers)) {
const name = key;
let subHandler = this.get(name);
if (!subHandler) {
subHandler = new SubHandler();
this.set(name, subHandler);
}
subHandler.add(handlers[name], fallbacks[name], priority);
}
}
remove(handlers, fallbacks) {
for (const name of Object.keys(handlers)) {
const subHandler = this.get(name);
if (subHandler) {
subHandler.remove(handlers[name], fallbacks[name]);
}
}
}
set(name, subHandler) {
this.map.set(name, subHandler);
}
get(name) {
return this.map.get(name);
}
retrieve(name) {
for (const handler of this.map.values()) {
const map = handler.retrieve(name);
if (map) {
return map;
}
}
return null;
}
keys() {
return this.map.keys();
}
}
//# sourceMappingURL=MapHandler.js.map
;// ./mjs/input/tex/Configuration.js
class Configuration {
static makeProcessor(func, priority) {
return Array.isArray(func) ? func : [func, priority];
}
static _create(name, config = {}) {
var _a;
const priority = (_a = config.priority) !== null && _a !== void 0 ? _a : PrioritizedList.DEFAULTPRIORITY;
const init = config.init ? this.makeProcessor(config.init, priority) : null;
const conf = config.config
? this.makeProcessor(config.config, priority)
: null;
const preprocessors = (config.preprocessors || []).map((pre) => this.makeProcessor(pre, priority));
const postprocessors = (config.postprocessors || []).map((post) => this.makeProcessor(post, priority));
const parser = config.parser || 'tex';
return new Configuration(name, config[ConfigurationType.HANDLER] || {}, config[ConfigurationType.FALLBACK] || {}, config[ConfigurationType.ITEMS] || {}, config[ConfigurationType.TAGS] || {}, config[ConfigurationType.OPTIONS] || {}, config[ConfigurationType.NODES] || {}, preprocessors, postprocessors, init, conf, priority, parser);
}
static create(name, config = {}) {
const configuration = Configuration._create(name, config);
ConfigurationHandler.set(name, configuration);
return configuration;
}
static local(config = {}) {
return Configuration._create('', config);
}
constructor(name, handler = {}, fallback = {}, items = {}, tags = {}, options = {}, nodes = {}, preprocessors = [], postprocessors = [], initMethod = null, configMethod = null, priority, parser) {
this.name = name;
this.handler = handler;
this.fallback = fallback;
this.items = items;
this.tags = tags;
this.options = options;
this.nodes = nodes;
this.preprocessors = preprocessors;
this.postprocessors = postprocessors;
this.initMethod = initMethod;
this.configMethod = configMethod;
this.priority = priority;
this.parser = parser;
this.handler = Object.assign({
[HandlerType.CHARACTER]: [],
[HandlerType.DELIMITER]: [],
[HandlerType.MACRO]: [],
[HandlerType.ENVIRONMENT]: [],
}, handler);
}
get init() {
return this.initMethod ? this.initMethod[0] : null;
}
get config() {
return this.configMethod ? this.configMethod[0] : null;
}
}
const Configuration_maps = new Map();
const ConfigurationHandler = {
set(name, map) {
Configuration_maps.set(name, map);
},
get(name) {
return Configuration_maps.get(name);
},
keys() {
return Configuration_maps.keys();
},
};
class ParserConfiguration {
constructor(packages, parsers = ['tex']) {
this.initMethod = new FunctionList();
this.configMethod = new FunctionList();
this.configurations = new PrioritizedList();
this.parsers = [];
this.handlers = new SubHandlers();
this.items = {};
this.tags = {};
this.options = {};
this.nodes = {};
this.parsers = parsers;
for (const pkg of packages.slice().reverse()) {
this.addPackage(pkg);
}
for (const { item: config, priority: priority } of this.configurations) {
this.append(config, priority);
}
}
init() {
this.initMethod.execute(this);
}
config(jax) {
this.configMethod.execute(this, jax);
for (const config of this.configurations) {
this.addFilters(jax, config.item);
}
}
addPackage(pkg) {
const name = typeof pkg === 'string' ? pkg : pkg[0];
const conf = this.getPackage(name);
if (conf) {
this.configurations.add(conf, typeof pkg === 'string' ? conf.priority : pkg[1]);
}
}
add(name, jax, options = {}) {
const config = this.getPackage(name);
this.append(config);
this.configurations.add(config, config.priority);
this.init();
const parser = jax.parseOptions;
parser.nodeFactory.setCreators(config.nodes);
for (const kind of Object.keys(config.items)) {
parser.itemFactory.setNodeClass(kind, config.items[kind]);
}
TagsFactory.addTags(config.tags);
defaultOptions(parser.options, config.options);
userOptions(parser.options, options);
this.addFilters(jax, config);
if (config.config) {
config.config(this, jax);
}
}
getPackage(name) {
const config = ConfigurationHandler.get(name);
if (config && !this.parsers.includes(config.parser)) {
throw Error(`Package '${name}' doesn't target the proper parser`);
}
if (!config) {
this.warn(`Package '${name}' not found. Omitted.`);
}
return config;
}
append(config, priority) {
priority = priority || config.priority;
if (config.initMethod) {
this.initMethod.add(config.initMethod[0], config.initMethod[1]);
}
if (config.configMethod) {
this.configMethod.add(config.configMethod[0], config.configMethod[1]);
}
this.handlers.add(config.handler, config.fallback, priority);
Object.assign(this.items, config.items);
Object.assign(this.tags, config.tags);
defaultOptions(this.options, config.options);
Object.assign(this.nodes, config.nodes);
}
addFilters(jax, config) {
for (const [pre, priority] of config.preprocessors) {
jax.preFilters.add(pre, priority);
}
for (const [post, priority] of config.postprocessors) {
jax.postFilters.add(post, priority);
}
}
warn(message) {
console.warn('MathJax Warning: ' + message);
}
}
//# sourceMappingURL=Configuration.js.map
;// ./components/mjs/core/lib/util/Styles.js
const Styles_def = MathJax._.util.Styles;
const TRBL = Styles_def.TRBL;
const WSC = Styles_def.WSC;
const Styles = Styles_def.Styles;
;// ./mjs/input/tex/base/BaseItems.js
class StartItem extends BaseItem {
constructor(factory, global) {
super(factory);
this.global = global;
}
get kind() {
return 'start';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('stop')) {
let node = this.toMml();
if (!this.global.isInner) {
node = this.factory.configuration.tags.finalize(node, this.env);
}
return [[this.factory.create('mml', node)], true];
}
return super.checkItem(item);
}
}
class StopItem extends BaseItem {
get kind() {
return 'stop';
}
get isClose() {
return true;
}
}
class OpenItem extends BaseItem {
get kind() {
return 'open';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('close')) {
const mml = this.toMml();
const node = this.create('node', 'TeXAtom', [mml]);
addLatexItem(node, item);
return [[this.factory.create('mml', node)], true];
}
return super.checkItem(item);
}
}
OpenItem.errors = Object.assign(Object.create(BaseItem.errors), {
stop: ['ExtraOpenMissingClose', 'Extra open brace or missing close brace'],
});
class CloseItem extends BaseItem {
get kind() {
return 'close';
}
get isClose() {
return true;
}
}
class NullItem extends BaseItem {
get kind() {
return 'null';
}
}
class PrimeItem extends BaseItem {
get kind() {
return 'prime';
}
checkItem(item) {
const [top0, top1] = this.Peek(2);
const isSup = (tex_NodeUtil.isType(top0, 'msubsup') || tex_NodeUtil.isType(top0, 'msup')) &&
!tex_NodeUtil.getChildAt(top0, top0.sup);
const isOver = (tex_NodeUtil.isType(top0, 'munderover') || tex_NodeUtil.isType(top0, 'mover')) &&
!tex_NodeUtil.getChildAt(top0, top0.over) &&
!tex_NodeUtil.getProperty(top0, 'subsupOK');
if (!isSup && !isOver) {
const node = this.create('node', top0.getProperty('movesupsub') ? 'mover' : 'msup', [top0, top1]);
return [[node, item], true];
}
const pos = isSup ? top0.sup : top0.over;
tex_NodeUtil.setChild(top0, pos, top1);
return [[top0, item], true];
}
}
class SubsupItem extends BaseItem {
get kind() {
return 'subsup';
}
checkItem(item) {
if (item.isKind('open') || item.isKind('left')) {
return BaseItem.success;
}
const top = this.First;
const position = this.getProperty('position');
if (item.isKind('mml')) {
if (this.getProperty('primes')) {
if (position !== 2) {
tex_NodeUtil.setChild(top, 2, this.getProperty('primes'));
}
else {
tex_NodeUtil.setProperty(this.getProperty('primes'), 'variantForm', true);
const node = this.create('node', 'mrow', [
this.getProperty('primes'),
item.First,
]);
item.First = node;
}
}
tex_NodeUtil.setChild(top, position, item.First);
if (this.getProperty('movesupsub') != null) {
tex_NodeUtil.setProperty(top, 'movesupsub', this.getProperty('movesupsub'));
}
const result = this.factory.create('mml', top);
return [[result], true];
}
super.checkItem(item);
const error = this.getErrors(['', 'sub', 'sup'][position]);
throw new tex_TexError(error[0], error[1], ...error.splice(2));
}
}
SubsupItem.errors = Object.assign(Object.create(BaseItem.errors), {
stop: ['MissingScript', 'Missing superscript or subscript argument'],
sup: ['MissingOpenForSup', 'Missing open brace for superscript'],
sub: ['MissingOpenForSub', 'Missing open brace for subscript'],
});
class OverItem extends BaseItem {
constructor(factory) {
super(factory);
this.setProperty('name', '\\over');
}
get kind() {
return 'over';
}
get isClose() {
return true;
}
checkItem(item) {
if (item.isKind('over')) {
throw new tex_TexError('AmbiguousUseOf', 'Ambiguous use of %1', item.getName());
}
if (item.isClose) {
let mml = this.create('node', 'mfrac', [
this.getProperty('num'),
this.toMml(false),
]);
if (this.getProperty('thickness') != null) {
tex_NodeUtil.setAttribute(mml, 'linethickness', this.getProperty('thickness'));
}
if (this.getProperty('ldelim') || this.getProperty('rdelim')) {
tex_NodeUtil.setProperty(mml, 'withDelims', true);
mml = ParseUtil.fixedFence(this.factory.configuration, this.getProperty('ldelim'), mml, this.getProperty('rdelim'));
}
mml.attributes.set(TexConstant.Attr.LATEXITEM, this.getProperty('name'));
return [[this.factory.create('mml', mml), item], true];
}
return super.checkItem(item);
}
toString() {
return ('over[' + this.getProperty('num') + ' / ' + this.nodes.join('; ') + ']');
}
}
class LeftItem extends BaseItem {
constructor(factory, delim) {
super(factory);
this.setProperty('delim', delim);
}
get kind() {
return 'left';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('right')) {
const fenced = ParseUtil.fenced(this.factory.configuration, this.getProperty('delim'), this.toMml(), item.getProperty('delim'), '', item.getProperty('color'));
const left = fenced.childNodes[0];
const right = fenced.childNodes[fenced.childNodes.length - 1];
const mrow = this.factory.create('mml', fenced);
addLatexItem(left, this, '\\left');
addLatexItem(right, item, '\\right');
mrow
.Peek()[0]
.attributes.set(TexConstant.Attr.LATEXITEM, '\\left' + item.startStr.slice(this.startI, item.stopI));
return [[mrow], true];
}
if (item.isKind('middle')) {
const def = { stretchy: true };
if (item.getProperty('color')) {
def.mathcolor = item.getProperty('color');
}
const middle = this.create('token', 'mo', def, item.getProperty('delim'));
addLatexItem(middle, item, '\\middle');
this.Push(this.create('node', 'TeXAtom', [], { texClass: TEXCLASS.CLOSE }), middle, this.create('node', 'TeXAtom', [], { texClass: TEXCLASS.OPEN }));
this.env = {};
return [[this], true];
}
return super.checkItem(item);
}
}
LeftItem.errors = Object.assign(Object.create(BaseItem.errors), {
stop: ['ExtraLeftMissingRight', 'Extra \\left or missing \\right'],
});
class Middle extends BaseItem {
constructor(factory, delim, color) {
super(factory);
this.setProperty('delim', delim);
if (color) {
this.setProperty('color', color);
}
}
get kind() {
return 'middle';
}
get isClose() {
return true;
}
}
class RightItem extends BaseItem {
constructor(factory, delim, color) {
super(factory);
this.setProperty('delim', delim);
if (color) {
this.setProperty('color', color);
}
}
get kind() {
return 'right';
}
get isClose() {
return true;
}
}
class BreakItem extends BaseItem {
get kind() {
return 'break';
}
constructor(factory, linebreak, insert) {
super(factory);
this.setProperty('linebreak', linebreak);
this.setProperty('insert', insert);
}
checkItem(item) {
var _a, _b;
const linebreak = this.getProperty('linebreak');
if (item.isKind('mml')) {
const mml = item.First;
if (mml.isKind('mo')) {
const style = ((_b = (_a = tex_NodeUtil.getOp(mml)) === null || _a === void 0 ? void 0 : _a[3]) === null || _b === void 0 ? void 0 : _b.linebreakstyle) ||
tex_NodeUtil.getAttribute(mml, 'linebreakstyle');
if (style !== 'after') {
tex_NodeUtil.setAttribute(mml, 'linebreak', linebreak);
return [[item], true];
}
if (!this.getProperty('insert')) {
return [[item], true];
}
}
}
const mml = this.create('token', 'mspace', { linebreak });
return [[this.factory.create('mml', mml), item], true];
}
}
class BeginItem extends BaseItem {
get kind() {
return 'begin';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('end')) {
if (item.getName() !== this.getName()) {
throw new tex_TexError('EnvBadEnd', '\\begin{%1} ended with \\end{%2}', this.getName(), item.getName());
}
const node = this.toMml();
addLatexItem(node, item);
return [[this.factory.create('mml', node)], true];
}
if (item.isKind('stop')) {
throw new tex_TexError('EnvMissingEnd', 'Missing \\end{%1}', this.getName());
}
return super.checkItem(item);
}
}
class EndItem extends BaseItem {
get kind() {
return 'end';
}
get isClose() {
return true;
}
}
class StyleItem extends BaseItem {
get kind() {
return 'style';
}
checkItem(item) {
if (!item.isClose) {
return super.checkItem(item);
}
const mml = this.create('node', 'mstyle', this.nodes, this.getProperty('styles'));
return [[this.factory.create('mml', mml), item], true];
}
}
class PositionItem extends BaseItem {
get kind() {
return 'position';
}
checkItem(item) {
if (item.isClose) {
throw new tex_TexError('MissingBoxFor', 'Missing box for %1', this.getName());
}
if (item.isFinal) {
let mml = item.toMml();
switch (this.getProperty('move')) {
case 'vertical':
mml = this.create('node', 'mpadded', [mml], {
height: this.getProperty('dh'),
depth: this.getProperty('dd'),
voffset: this.getProperty('dh'),
});
return [[this.factory.create('mml', mml)], true];
case 'horizontal':
return [
[
this.factory.create('mml', this.getProperty('left')),
item,
this.factory.create('mml', this.getProperty('right')),
],
true,
];
}
}
return super.checkItem(item);
}
}
class CellItem extends BaseItem {
get kind() {
return 'cell';
}
get isClose() {
return true;
}
}
class MmlItem extends BaseItem {
get isFinal() {
return true;
}
get kind() {
return 'mml';
}
}
class FnItem extends BaseItem {
get kind() {
return 'fn';
}
checkItem(item) {
const top = this.First;
if (top) {
if (item.isOpen) {
return BaseItem.success;
}
if (!item.isKind('fn')) {
let mml = item.First;
if (!item.isKind('mml') || !mml) {
return [[top, item], true];
}
if ((tex_NodeUtil.isType(mml, 'mstyle') &&
mml.childNodes.length &&
tex_NodeUtil.isType(mml.childNodes[0].childNodes[0], 'mspace')) ||
tex_NodeUtil.isType(mml, 'mspace')) {
return [[top, item], true];
}
if (tex_NodeUtil.isEmbellished(mml)) {
mml = tex_NodeUtil.getCoreMO(mml);
}
const form = tex_NodeUtil.getForm(mml);
if (form != null && [0, 0, 1, 1, 0, 1, 1, 0, 0, 0][form[2]]) {
return [[top, item], true];
}
}
const node = this.create('token', 'mo', { texClass: TEXCLASS.NONE }, entities.ApplyFunction);
return [[top, node, item], true];
}
return super.checkItem(item);
}
}
class NotItem extends BaseItem {
constructor() {
super(...arguments);
this.remap = MapHandler.getMap('not_remap');
}
get kind() {
return 'not';
}
checkItem(item) {
let mml;
let c;
let textNode;
if (item.isKind('open') || item.isKind('left')) {
return BaseItem.success;
}
if (item.isKind('mml') &&
(tex_NodeUtil.isType(item.First, 'mo') ||
tex_NodeUtil.isType(item.First, 'mi') ||
tex_NodeUtil.isType(item.First, 'mtext'))) {
mml = item.First;
c = tex_NodeUtil.getText(mml);
if (c.length === 1 &&
!tex_NodeUtil.getProperty(mml, 'movesupsub') &&
tex_NodeUtil.getChildren(mml).length === 1) {
if (this.remap.contains(c)) {
textNode = this.create('text', this.remap.lookup(c).char);
tex_NodeUtil.setChild(mml, 0, textNode);
}
else {
textNode = this.create('text', '\u0338');
tex_NodeUtil.appendChildren(mml, [textNode]);
}
return [[item], true];
}
}
textNode = this.create('text', '\u29F8');
const mtextNode = this.create('node', 'mtext', [], {}, textNode);
const paddedNode = this.create('node', 'mpadded', [mtextNode], {
width: 0,
});
mml = this.create('node', 'TeXAtom', [paddedNode], {
texClass: TEXCLASS.REL,
});
return [[mml, item], true];
}
}
class NonscriptItem extends BaseItem {
get kind() {
return 'nonscript';
}
checkItem(item) {
if (item.isKind('mml') && item.Size() === 1) {
let mml = item.First;
if (mml.isKind('mstyle') && mml.notParent) {
mml = tex_NodeUtil.getChildren(tex_NodeUtil.getChildren(mml)[0])[0];
}
if (mml.isKind('mspace')) {
if (mml !== item.First) {
const mrow = this.create('node', 'mrow', [item.Pop()]);
item.Push(mrow);
}
this.factory.configuration.addNode('nonscript', item.First);
}
}
return [[item], true];
}
}
class DotsItem extends BaseItem {
get kind() {
return 'dots';
}
checkItem(item) {
if (item.isKind('open') || item.isKind('left')) {
return BaseItem.success;
}
let dots = this.getProperty('ldots');
const top = item.First;
if (item.isKind('mml') && tex_NodeUtil.isEmbellished(top)) {
const tclass = tex_NodeUtil.getTexClass(tex_NodeUtil.getCoreMO(top));
if (tclass === TEXCLASS.BIN || tclass === TEXCLASS.REL) {
dots = this.getProperty('cdots');
}
}
return [[dots, item], true];
}
}
class ArrayItem extends BaseItem {
constructor() {
super(...arguments);
this.table = [];
this.row = [];
this.frame = [];
this.hfill = [];
this.arraydef = {};
this.cstart = [];
this.cend = [];
this.cextra = [];
this.atEnd = false;
this.ralign = [];
this.breakAlign = {
cell: '',
row: '',
table: '',
};
this.templateSubs = 0;
}
get kind() {
return 'array';
}
get isOpen() {
return true;
}
get copyEnv() {
return false;
}
checkItem(item) {
if (item.isClose && !item.isKind('over')) {
if (item.getProperty('isEntry')) {
this.EndEntry();
this.clearEnv();
this.StartEntry();
return BaseItem.fail;
}
if (item.getProperty('isCR')) {
this.EndEntry();
this.EndRow();
this.clearEnv();
this.StartEntry();
return BaseItem.fail;
}
this.EndTable();
this.clearEnv();
const newItem = this.factory.create('mml', this.createMml());
if (this.getProperty('requireClose')) {
if (item.isKind('close')) {
return [[newItem], true];
}
throw new tex_TexError('MissingCloseBrace', 'Missing close brace');
}
return [[newItem, item], true];
}
return super.checkItem(item);
}
createMml() {
const scriptlevel = this.arraydef['scriptlevel'];
delete this.arraydef['scriptlevel'];
let mml = this.create('node', 'mtable', this.table, this.arraydef);
if (scriptlevel) {
mml.setProperty('smallmatrix', true);
}
if (this.breakAlign.table) {
tex_NodeUtil.setAttribute(mml, 'data-break-align', this.breakAlign.table);
}
if (this.getProperty('arrayPadding')) {
tex_NodeUtil.setAttribute(mml, 'data-frame-styles', '');
tex_NodeUtil.setAttribute(mml, 'framespacing', this.getProperty('arrayPadding'));
}
mml = this.handleFrame(mml);
if (scriptlevel !== undefined) {
mml = this.create('node', 'mstyle', [mml], { scriptlevel });
}
if (this.getProperty('open') || this.getProperty('close')) {
mml = ParseUtil.fenced(this.factory.configuration, this.getProperty('open'), mml, this.getProperty('close'));
}
return mml;
}
handleFrame(mml) {
if (!this.frame.length)
return mml;
const sides = new Map(this.frame);
const fstyle = this.frame.reduce((fstyle, [, style]) => (style === fstyle ? style : ''), this.frame[0][1]);
if (fstyle) {
if (this.frame.length === 4) {
tex_NodeUtil.setAttribute(mml, 'frame', fstyle);
tex_NodeUtil.removeAttribute(mml, 'data-frame-styles');
return mml;
}
if (fstyle === 'solid') {
tex_NodeUtil.setAttribute(mml, 'data-frame-styles', '');
mml = this.create('node', 'menclose', [mml], {
notation: Array.from(sides.keys()).join(' '),
'data-padding': 0,
});
return mml;
}
}
const styles = TRBL.map((side) => sides.get(side) || 'none').join(' ');
tex_NodeUtil.setAttribute(mml, 'data-frame-styles', styles);
return mml;
}
StartEntry() {
const n = this.row.length;
let start = this.cstart[n];
let end = this.cend[n];
const ralign = this.ralign[n];
const cextra = this.cextra;
if (!start && !end && !ralign && !cextra[n] && !cextra[n + 1])
return;
let [prefix, entry, term, found] = this.getEntry();
if (cextra[n] && (!this.atEnd || cextra[n + 1])) {
start += '&';
}
if (term !== '&') {
found =
!!entry.trim() || !!(n || (term && term.substring(0, 4) !== '\\end'));
if (cextra[n + 1] && !cextra[n]) {
end = (end || '') + '&';
this.atEnd = true;
}
}
if (!found && !prefix)
return;
const parser = this.parser;
if (found) {
if (start) {
entry = ParseUtil.addArgs(parser, start, entry);
}
if (end) {
entry = ParseUtil.addArgs(parser, entry, end);
}
if (ralign) {
entry = '\\text{' + entry.trim() + '}';
}
if (start || end || ralign) {
if (++this.templateSubs >
parser.configuration.options.maxTemplateSubtitutions) {
throw new tex_TexError('MaxTemplateSubs', 'Maximum template substitutions exceeded; ' +
'is there an invalid use of \\\\ in the template?');
}
}
}
if (prefix) {
entry = ParseUtil.addArgs(parser, prefix, entry);
}
parser.string = ParseUtil.addArgs(parser, entry, parser.string);
parser.i = 0;
}
getEntry() {
const parser = this.parser;
const pattern = /^([^]*?)([&{}]|\\\\|\\(?:begin|end)\s*\{array\}|\\cr|\\)/;
let braces = 0;
let envs = 0;
let i = parser.i;
let match;
const fail = ['', '', '', false];
while ((match = parser.string.slice(i).match(pattern)) !== null) {
i += match[0].length;
switch (match[2]) {
case '\\':
i++;
break;
case '{':
braces++;
break;
case '}':
if (!braces)
return fail;
braces--;
break;
case '\\begin{array}':
if (!braces) {
envs++;
}
break;
case '\\end{array}':
if (!braces && envs) {
envs--;
break;
}
default: {
if (braces || envs)
continue;
i -= match[2].length;
let entry = parser.string.slice(parser.i, i).trim();
const prefix = entry.match(/^(?:\s*\\(?:h(?:dash)?line|hfil{1,3}|rowcolor\s*\{.*?\}))+/);
if (prefix) {
entry = entry.slice(prefix[0].length);
}
parser.string = parser.string.slice(i);
parser.i = 0;
return [(prefix === null || prefix === void 0 ? void 0 : prefix[0]) || '', entry, match[2], true];
}
}
}
return fail;
}
EndEntry() {
const mtd = this.create('node', 'mtd', this.nodes);
if (this.hfill.length) {
if (this.hfill[0] === 0) {
tex_NodeUtil.setAttribute(mtd, 'columnalign', 'right');
}
if (this.hfill[this.hfill.length - 1] === this.Size()) {
tex_NodeUtil.setAttribute(mtd, 'columnalign', tex_NodeUtil.getAttribute(mtd, 'columnalign') ? 'center' : 'left');
}
}
const ralign = this.ralign[this.row.length];
if (ralign) {
const [valign, cwidth, calign] = ralign;
const box = this.create('node', 'mpadded', mtd.childNodes[0].childNodes, {
width: cwidth,
'data-overflow': 'auto',
'data-align': calign,
'data-vertical-align': valign,
});
box.setProperty('vbox', valign);
mtd.childNodes[0].childNodes = [];
mtd.appendChild(box);
}
else if (this.breakAlign.cell) {
tex_NodeUtil.setAttribute(mtd, 'data-vertical-align', this.breakAlign.cell);
}
this.breakAlign.cell = '';
this.row.push(mtd);
this.Clear();
this.hfill = [];
}
EndRow() {
let type = 'mtr';
if (this.getProperty('isNumbered') && this.row.length === 3) {
this.row.unshift(this.row.pop());
type = 'mlabeledtr';
}
else if (this.getProperty('isLabeled')) {
type = 'mlabeledtr';
this.setProperty('isLabeled', false);
}
const node = this.create('node', type, this.row);
if (this.breakAlign.row) {
tex_NodeUtil.setAttribute(node, 'data-break-align', this.breakAlign.row);
this.breakAlign.row = '';
}
addLatexItem(node, this);
this.table.push(node);
this.row = [];
this.atEnd = false;
}
EndTable() {
if (this.Size() || this.row.length) {
this.EndEntry();
this.EndRow();
}
this.checkLines();
}
checkLines() {
if (this.arraydef.rowlines) {
const lines = this.arraydef.rowlines.split(/ /);
if (lines.length === this.table.length) {
this.frame.push(['bottom', lines.pop()]);
if (lines.length) {
this.arraydef.rowlines = lines.join(' ');
}
else {
delete this.arraydef.rowlines;
}
}
else if (lines.length < this.table.length - 1) {
this.arraydef.rowlines += ' none';
}
}
if (this.getProperty('rowspacing')) {
const rows = this.arraydef.rowspacing.split(/ /);
while (rows.length < this.table.length) {
rows.push(this.getProperty('rowspacing') + 'em');
}
this.arraydef.rowspacing = rows.join(' ');
}
}
addRowSpacing(spacing) {
if (this.arraydef['rowspacing']) {
const rows = this.arraydef['rowspacing'].split(/ /);
if (!this.getProperty('rowspacing')) {
const dimem = UnitUtil.dimen2em(rows[0]);
this.setProperty('rowspacing', dimem);
}
const rowspacing = this.getProperty('rowspacing');
while (rows.length < this.table.length) {
rows.push(UnitUtil.em(rowspacing));
}
rows[this.table.length - 1] = UnitUtil.em(Math.max(0, rowspacing + UnitUtil.dimen2em(spacing)));
this.arraydef['rowspacing'] = rows.join(' ');
}
}
}
class EqnArrayItem extends ArrayItem {
constructor(factory, ...args) {
super(factory);
this.maxrow = 0;
this.factory.configuration.tags.start(args[0], args[2], args[1]);
}
get kind() {
return 'eqnarray';
}
EndEntry() {
const calign = this.arraydef.columnalign.split(/ /);
const align = this.row.length && calign.length
? calign[this.row.length % calign.length]
: 'right';
if (align !== 'right') {
ParseUtil.fixInitialMO(this.factory.configuration, this.nodes);
}
super.EndEntry();
}
EndRow() {
if (this.row.length > this.maxrow) {
this.maxrow = this.row.length;
}
const tag = this.factory.configuration.tags.getTag();
if (tag) {
this.row = [tag].concat(this.row);
this.setProperty('isLabeled', true);
}
this.factory.configuration.tags.clearTag();
super.EndRow();
}
EndTable() {
super.EndTable();
this.factory.configuration.tags.end();
this.extendArray('columnalign', this.maxrow);
this.extendArray('columnwidth', this.maxrow);
this.extendArray('columnspacing', this.maxrow - 1);
this.extendArray('data-break-align', this.maxrow);
this.addIndentshift();
}
extendArray(name, max) {
if (!this.arraydef[name])
return;
const repeat = this.arraydef[name].split(/ /);
const columns = [...repeat];
if (columns.length > 1) {
while (columns.length < max) {
columns.push(...repeat);
}
this.arraydef[name] = columns.slice(0, max).join(' ');
}
}
addIndentshift() {
const align = this.arraydef.columnalign.split(/ /);
let prev = '';
for (const i of align.keys()) {
if (align[i] === 'left' && i > 0) {
const indentshift = prev === 'center' ? '.7em' : '2em';
for (const row of this.table) {
const cell = row.childNodes[row.isKind('mlabeledtr') ? i + 1 : i];
if (cell) {
const mstyle = this.create('node', 'mstyle', cell.childNodes[0].childNodes, { indentshift });
cell.childNodes[0].childNodes = [];
cell.appendChild(mstyle);
}
}
}
prev = align[i];
}
}
}
class MstyleItem extends BeginItem {
get kind() {
return 'mstyle';
}
constructor(factory, attr, name) {
super(factory);
this.attrList = attr;
this.setProperty('name', name);
}
checkItem(item) {
if (item.isKind('end') && item.getName() === this.getName()) {
const mml = this.create('node', 'mstyle', [this.toMml()], this.attrList);
return [[mml], true];
}
return super.checkItem(item);
}
}
class EquationItem extends BaseItem {
constructor(factory, ...args) {
super(factory);
this.factory.configuration.tags.start('equation', true, args[0]);
}
get kind() {
return 'equation';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('end')) {
const mml = this.toMml();
const tag = this.factory.configuration.tags.getTag();
this.factory.configuration.tags.end();
return [
[tag ? this.factory.configuration.tags.enTag(mml, tag) : mml, item],
true,
];
}
if (item.isKind('stop')) {
throw new tex_TexError('EnvMissingEnd', 'Missing \\end{%1}', this.getName());
}
return super.checkItem(item);
}
}
function addLatexItem(node, item, prefix = '') {
const str = item.startStr.slice(item.startI, item.stopI);
if (str) {
node.attributes.set(TexConstant.Attr.LATEXITEM, prefix ? prefix + str : str);
node.attributes.set(TexConstant.Attr.LATEX, prefix ? prefix + str : str);
}
}
//# sourceMappingURL=BaseItems.js.map
;// ./components/mjs/core/lib/util/lengths.js
const lengths_def = MathJax._.util.lengths;
const BIGDIMEN = lengths_def.BIGDIMEN;
const UNITS = lengths_def.UNITS;
const RELUNITS = lengths_def.RELUNITS;
const MATHSPACE = lengths_def.MATHSPACE;
const length2em = lengths_def.length2em;
const percent = lengths_def.percent;
const em = lengths_def.em;
const px = lengths_def.px;
;// ./mjs/input/tex/base/BaseMethods.js
const P_HEIGHT = 1.2 / 0.85;
const MmlTokenAllow = {
fontfamily: 1,
fontsize: 1,
fontweight: 1,
fontstyle: 1,
color: 1,
background: 1,
id: 1,
class: 1,
href: 1,
style: 1,
};
function splitAlignArray(align, n = Infinity) {
const list = align
.replace(/\s+/g, '')
.split('')
.map((s) => {
const name = { t: 'top', b: 'bottom', m: 'middle', c: 'center' }[s];
if (!name) {
throw new tex_TexError('BadBreakAlign', 'Invalid alignment character: %1', s);
}
return name;
});
if (list.length > n) {
throw new tex_TexError('TooManyAligns', 'Too many alignment characters: %1', align);
}
return n === 1 ? list[0] : list.join(' ');
}
function parseRoot(parser, n) {
const env = parser.stack.env;
const inRoot = env['inRoot'];
env['inRoot'] = true;
const newParser = new TexParser(n, env, parser.configuration);
let node = newParser.mml();
const global = newParser.stack.global;
if (global['leftRoot'] || global['upRoot']) {
const def = {};
if (global['leftRoot']) {
def['width'] = global['leftRoot'];
}
if (global['upRoot']) {
def['voffset'] = global['upRoot'];
def['height'] = global['upRoot'];
}
node = parser.create('node', 'mpadded', [node], def);
}
env['inRoot'] = inRoot;
return node;
}
const BaseMethods = {
Open(parser, _c) {
parser.Push(parser.itemFactory.create('open'));
},
Close(parser, _c) {
parser.Push(parser.itemFactory.create('close'));
},
Bar(parser, c) {
parser.Push(parser.create('token', 'mo', { stretchy: false, texClass: TEXCLASS.ORD }, c));
},
Tilde(parser, _c) {
parser.Push(parser.create('token', 'mtext', {}, entities.nbsp));
},
Space(_parser, _c) { },
Superscript(parser, _c) {
if (parser.GetNext().match(/\d/)) {
parser.string =
parser.string.substring(0, parser.i + 1) +
' ' +
parser.string.substring(parser.i + 1);
}
let primes;
let base;
const top = parser.stack.Top();
if (top.isKind('prime')) {
[base, primes] = top.Peek(2);
parser.stack.Pop();
}
else {
base = parser.stack.Prev();
if (!base) {
base = parser.create('token', 'mi', {}, '');
}
}
const movesupsub = tex_NodeUtil.getProperty(base, 'movesupsub');
let position = tex_NodeUtil.isType(base, 'msubsup')
? base.sup
: base.over;
if ((tex_NodeUtil.isType(base, 'msubsup') &&
!tex_NodeUtil.isType(base, 'msup') &&
tex_NodeUtil.getChildAt(base, base.sup)) ||
(tex_NodeUtil.isType(base, 'munderover') &&
!tex_NodeUtil.isType(base, 'mover') &&
tex_NodeUtil.getChildAt(base, base.over) &&
!tex_NodeUtil.getProperty(base, 'subsupOK'))) {
throw new tex_TexError('DoubleExponent', 'Double exponent: use braces to clarify');
}
if (!tex_NodeUtil.isType(base, 'msubsup') || tex_NodeUtil.isType(base, 'msup')) {
if (movesupsub) {
if (!tex_NodeUtil.isType(base, 'munderover') ||
tex_NodeUtil.isType(base, 'mover') ||
tex_NodeUtil.getChildAt(base, base.over)) {
base = parser.create('node', 'munderover', [base], {
movesupsub: true,
});
}
position = base.over;
}
else {
base = parser.create('node', 'msubsup', [base]);
position = base.sup;
}
}
parser.Push(parser.itemFactory.create('subsup', base).setProperties({
position: position,
primes: primes,
movesupsub: movesupsub,
}));
},
Subscript(parser, _c) {
if (parser.GetNext().match(/\d/)) {
parser.string =
parser.string.substring(0, parser.i + 1) +
' ' +
parser.string.substring(parser.i + 1);
}
let primes, base;
const top = parser.stack.Top();
if (top.isKind('prime')) {
[base, primes] = top.Peek(2);
parser.stack.Pop();
}
else {
base = parser.stack.Prev();
if (!base) {
base = parser.create('token', 'mi', {}, '');
}
}
const movesupsub = tex_NodeUtil.getProperty(base, 'movesupsub');
let position = tex_NodeUtil.isType(base, 'msubsup')
? base.sub
: base.under;
if ((tex_NodeUtil.isType(base, 'msubsup') &&
!tex_NodeUtil.isType(base, 'msup') &&
tex_NodeUtil.getChildAt(base, base.sub)) ||
(tex_NodeUtil.isType(base, 'munderover') &&
!tex_NodeUtil.isType(base, 'mover') &&
tex_NodeUtil.getChildAt(base, base.under) &&
!tex_NodeUtil.getProperty(base, 'subsupOK'))) {
throw new tex_TexError('DoubleSubscripts', 'Double subscripts: use braces to clarify');
}
if (!tex_NodeUtil.isType(base, 'msubsup') || tex_NodeUtil.isType(base, 'msup')) {
if (movesupsub) {
if (!tex_NodeUtil.isType(base, 'munderover') ||
tex_NodeUtil.isType(base, 'mover') ||
tex_NodeUtil.getChildAt(base, base.under)) {
base = parser.create('node', 'munderover', [base], {
movesupsub: true,
});
}
position = base.under;
}
else {
base = parser.create('node', 'msubsup', [base]);
position = base.sub;
}
}
parser.Push(parser.itemFactory.create('subsup', base).setProperties({
position: position,
primes: primes,
movesupsub: movesupsub,
}));
},
Prime(parser, c) {
let base = parser.stack.Prev();
if (!base) {
base = parser.create('token', 'mi');
}
if ((tex_NodeUtil.isType(base, 'msubsup') &&
!tex_NodeUtil.isType(base, 'msup') &&
tex_NodeUtil.getChildAt(base, base.sup)) ||
(tex_NodeUtil.isType(base, 'munderover') &&
!tex_NodeUtil.isType(base, 'mover') &&
tex_NodeUtil.getChildAt(base, base.over) &&
!tex_NodeUtil.getProperty(base, 'subsupOK'))) {
throw new tex_TexError('DoubleExponentPrime', 'Prime causes double exponent: use braces to clarify');
}
let sup = '';
parser.i--;
do {
sup += entities.prime;
parser.i++;
c = parser.GetNext();
} while (c === "'" || c === entities.rsquo);
sup = ['', '\u2032', '\u2033', '\u2034', '\u2057'][sup.length] || sup;
const node = parser.create('token', 'mo', { variantForm: true }, sup);
parser.Push(parser.itemFactory.create('prime', base, node));
},
Comment(parser, _c) {
while (parser.i < parser.string.length &&
parser.string.charAt(parser.i) !== '\n') {
parser.i++;
}
},
Hash(_parser, _c) {
throw new tex_TexError('CantUseHash1', "You can't use 'macro parameter character #' in math mode");
},
MathFont(parser, name, variant, italic = '') {
const text = parser.GetArgument(name);
const mml = new TexParser(text, Object.assign(Object.assign({ multiLetterIdentifiers: parser.options.identifierPattern }, parser.stack.env), { font: variant, italicFont: italic, noAutoOP: true }), parser.configuration).mml();
parser.Push(parser.create('node', 'TeXAtom', [mml]));
},
SetFont(parser, _name, font) {
parser.stack.env['font'] = font;
parser.Push(parser.itemFactory.create('null'));
},
SetStyle(parser, _name, texStyle, style, level) {
parser.stack.env['style'] = texStyle;
parser.stack.env['level'] = level;
parser.Push(parser.itemFactory
.create('style')
.setProperty('styles', { displaystyle: style, scriptlevel: level }));
},
SetSize(parser, _name, size) {
parser.stack.env['size'] = size;
parser.Push(parser.itemFactory
.create('style')
.setProperty('styles', { mathsize: em(size) }));
},
Spacer(parser, _name, space) {
const node = parser.create('node', 'mspace', [], { width: em(space) });
const style = parser.create('node', 'mstyle', [node], { scriptlevel: 0 });
parser.Push(style);
},
DiscretionaryTimes(parser, _name) {
parser.Push(parser.create('token', 'mo', { linebreakmultchar: '\u00D7' }, '\u2062'));
},
AllowBreak(parser, _name) {
parser.Push(parser.create('token', 'mspace'));
},
Break(parser, _name) {
parser.Push(parser.create('token', 'mspace', {
linebreak: TexConstant.LineBreak.NEWLINE,
}));
},
Linebreak(parser, _name, linebreak) {
let insert = true;
const prev = parser.stack.Prev(true);
if (prev && prev.isKind('mo')) {
const style = tex_NodeUtil.getMoAttribute(prev, 'linebreakstyle');
if (style !== TexConstant.LineBreakStyle.BEFORE) {
prev.attributes.set('linebreak', linebreak);
insert = false;
}
}
parser.Push(parser.itemFactory.create('break', linebreak, insert));
},
LeftRight(parser, name) {
const first = name.substring(1);
parser.Push(parser.itemFactory.create(first, parser.GetDelimiter(name), parser.stack.env.color));
},
NamedFn(parser, name, id) {
if (!id) {
id = name.substring(1);
}
const mml = parser.create('token', 'mi', { texClass: TEXCLASS.OP }, id);
parser.Push(parser.itemFactory.create('fn', mml));
},
NamedOp(parser, name, id) {
if (!id) {
id = name.substring(1);
}
id = id.replace(/ /, '\u2006');
const mml = parser.create('token', 'mo', {
movablelimits: true,
movesupsub: true,
form: TexConstant.Form.PREFIX,
texClass: TEXCLASS.OP,
}, id);
parser.Push(mml);
},
Limits(parser, _name, limits) {
let op = parser.stack.Prev(true);
if (!op ||
(tex_NodeUtil.getTexClass(tex_NodeUtil.getCoreMO(op)) !== TEXCLASS.OP &&
tex_NodeUtil.getProperty(op, 'movesupsub') == null)) {
throw new tex_TexError('MisplacedLimits', '%1 is allowed only on operators', parser.currentCS);
}
const top = parser.stack.Top();
let node;
if (tex_NodeUtil.isType(op, 'munderover') && !limits) {
node = parser.create('node', 'msubsup');
tex_NodeUtil.copyChildren(op, node);
op = top.Last = node;
}
else if (tex_NodeUtil.isType(op, 'msubsup') && limits) {
node = parser.create('node', 'munderover');
tex_NodeUtil.copyChildren(op, node);
op = top.Last = node;
}
tex_NodeUtil.setProperty(op, 'movesupsub', limits ? true : false);
tex_NodeUtil.setProperties(tex_NodeUtil.getCoreMO(op), { movablelimits: false });
if ((tex_NodeUtil.isType(op, 'mo')
? tex_NodeUtil.getMoAttribute(op, 'movableLimits')
: tex_NodeUtil.getAttribute(op, 'movablelimits')) ||
tex_NodeUtil.getProperty(op, 'movablelimits')) {
tex_NodeUtil.setProperties(op, { movablelimits: false });
}
},
Over(parser, name, open, close) {
const mml = parser.itemFactory
.create('over')
.setProperty('name', parser.currentCS);
if (open || close) {
mml.setProperty('ldelim', open);
mml.setProperty('rdelim', close);
}
else if (name.match(/withdelims$/)) {
mml.setProperty('ldelim', parser.GetDelimiter(name));
mml.setProperty('rdelim', parser.GetDelimiter(name));
}
if (name.match(/^\\above/)) {
mml.setProperty('thickness', parser.GetDimen(name));
}
else if (name.match(/^\\atop/) || open || close) {
mml.setProperty('thickness', 0);
}
parser.Push(mml);
},
Frac(parser, name) {
const num = parser.ParseArg(name);
const den = parser.ParseArg(name);
const node = parser.create('node', 'mfrac', [num, den]);
parser.Push(node);
},
Sqrt(parser, name) {
const n = parser.GetBrackets(name);
let arg = parser.GetArgument(name);
if (arg === '\\frac') {
arg +=
'{' + parser.GetArgument(arg) + '}{' + parser.GetArgument(arg) + '}';
}
let mml = new TexParser(arg, parser.stack.env, parser.configuration).mml();
if (!n) {
mml = parser.create('node', 'msqrt', [mml]);
}
else {
mml = parser.create('node', 'mroot', [mml, parseRoot(parser, n)]);
}
parser.Push(mml);
},
Root(parser, name) {
const n = parser.GetUpTo(name, '\\of');
const arg = parser.ParseArg(name);
const node = parser.create('node', 'mroot', [arg, parseRoot(parser, n)]);
parser.Push(node);
},
MoveRoot(parser, name, id) {
if (!parser.stack.env['inRoot']) {
throw new tex_TexError('MisplacedMoveRoot', '%1 can appear only within a root', parser.currentCS);
}
if (parser.stack.global[id]) {
throw new tex_TexError('MultipleMoveRoot', 'Multiple use of %1', parser.currentCS);
}
let n = parser.GetArgument(name);
if (!n.match(/-?[0-9]+/)) {
throw new tex_TexError('IntegerArg', 'The argument to %1 must be an integer', parser.currentCS);
}
n = parseInt(n, 10) / 15 + 'em';
if (n.substring(0, 1) !== '-') {
n = '+' + n;
}
parser.stack.global[id] = n;
},
Accent(parser, name, accent, stretchy) {
const c = parser.ParseArg(name);
const def = Object.assign(Object.assign({}, ParseUtil.getFontDef(parser)), { accent: true, mathaccent: stretchy === undefined ? true : stretchy });
const entity = tex_NodeUtil.createEntity(accent);
const mml = parser.create('token', 'mo', def, entity);
tex_NodeUtil.setAttribute(mml, 'stretchy', stretchy ? true : false);
const mo = tex_NodeUtil.isEmbellished(c) ? tex_NodeUtil.getCoreMO(c) : c;
if (tex_NodeUtil.isType(mo, 'mo') ||
tex_NodeUtil.getProperty(mo, 'movablelimits')) {
tex_NodeUtil.setProperties(mo, { movablelimits: false });
}
const muoNode = parser.create('node', 'munderover');
tex_NodeUtil.setChild(muoNode, 0, c);
tex_NodeUtil.setChild(muoNode, 1, null);
tex_NodeUtil.setChild(muoNode, 2, mml);
const texAtom = parser.create('node', 'TeXAtom', [muoNode]);
parser.Push(texAtom);
},
UnderOver(parser, name, c, stack) {
const entity = tex_NodeUtil.createEntity(c);
const mo = parser.create('token', 'mo', { stretchy: true, accent: true }, entity);
if (entity.match(MmlMo.mathaccentsWithWidth)) {
mo.setProperty('mathaccent', false);
}
const pos = name.charAt(1) === 'o' ? 'over' : 'under';
const base = parser.ParseArg(name);
parser.Push(ParseUtil.underOver(parser, base, mo, pos, stack));
},
Overset(parser, name) {
const top = parser.ParseArg(name);
const base = parser.ParseArg(name);
const topMo = top.coreMO();
const accent = topMo.isKind('mo') && tex_NodeUtil.getMoAttribute(topMo, 'accent') === true;
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'mover', [base, top], { accent });
parser.Push(node);
},
Underset(parser, name) {
const bot = parser.ParseArg(name);
const base = parser.ParseArg(name);
const botMo = bot.coreMO();
const accentunder = botMo.isKind('mo') && tex_NodeUtil.getMoAttribute(botMo, 'accent') === true;
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'munder', [base, bot], { accentunder });
parser.Push(node);
},
Overunderset(parser, name) {
const top = parser.ParseArg(name);
const bot = parser.ParseArg(name);
const base = parser.ParseArg(name);
const topMo = top.coreMO();
const botMo = bot.coreMO();
const accent = topMo.isKind('mo') && tex_NodeUtil.getMoAttribute(topMo, 'accent') === true;
const accentunder = botMo.isKind('mo') && tex_NodeUtil.getMoAttribute(botMo, 'accent') === true;
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'munderover', [base, bot, top], {
accent,
accentunder,
});
parser.Push(node);
},
TeXAtom(parser, name, mclass) {
const def = { texClass: mclass };
let mml;
let node;
if (mclass === TEXCLASS.OP) {
def['movesupsub'] = def['movablelimits'] = true;
const arg = parser.GetArgument(name);
const match = arg.match(/^\s*\\rm\s+([a-zA-Z0-9 ]+)$/);
if (match) {
def['mathvariant'] = TexConstant.Variant.NORMAL;
node = parser.create('token', 'mi', def, match[1]);
}
else {
const parsed = new TexParser(arg, parser.stack.env, parser.configuration).mml();
node = parser.create('node', 'TeXAtom', [parsed], def);
}
mml = parser.itemFactory.create('fn', node);
}
else {
mml = parser.create('node', 'TeXAtom', [parser.ParseArg(name)], def);
}
parser.Push(mml);
},
VBox(parser, name, align) {
const arg = new TexParser(parser.GetArgument(name), parser.stack.env, parser.configuration);
const def = {
'data-vertical-align': align,
texClass: TEXCLASS.ORD,
};
if (arg.stack.env.hsize) {
def.width = arg.stack.env.hsize;
def['data-overflow'] = 'linebreak';
}
const mml = parser.create('node', 'mpadded', [arg.mml()], def);
mml.setProperty('vbox', align);
parser.Push(mml);
},
Hsize(parser, name) {
if (parser.GetNext() === '=') {
parser.i++;
}
parser.stack.env.hsize = parser.GetDimen(name);
parser.Push(parser.itemFactory.create('null'));
},
ParBox(parser, name) {
const c = parser.GetBrackets(name, 'c');
const width = parser.GetDimen(name);
const text = ParseUtil.internalMath(parser, parser.GetArgument(name));
const align = splitAlignArray(c, 1);
const mml = parser.create('node', 'mpadded', text, {
width: width,
'data-overflow': 'linebreak',
'data-vertical-align': align,
});
mml.setProperty('vbox', align);
parser.Push(mml);
},
BreakAlign(parser, name) {
const top = parser.stack.Top();
if (!(top instanceof ArrayItem)) {
throw new tex_TexError('BreakNotInArray', '%1 must be used in an alignment environment', parser.currentCS);
}
const type = parser.GetArgument(name).trim();
switch (type) {
case 'c':
if (top.First) {
throw new tex_TexError('BreakFirstInEntry', '%1 must be at the beginning of an alignment entry', parser.currentCS + '{c}');
}
top.breakAlign.cell = splitAlignArray(parser.GetArgument(name), 1);
break;
case 'r':
if (top.row.length || top.First) {
throw new tex_TexError('BreakFirstInRow', '%1 must be at the beginning of an alignment row', parser.currentCS + '{r}');
}
top.breakAlign.row = splitAlignArray(parser.GetArgument(name));
break;
case 't':
if (top.table.length || top.row.length || top.First) {
throw new tex_TexError('BreakFirstInTable', '%1 must be at the beginning of an alignment', parser.currentCS + '{t}');
}
top.breakAlign.table = splitAlignArray(parser.GetArgument(name));
break;
default:
throw new tex_TexError('BreakType', 'First argument to %1 must be one of c, r, or t', parser.currentCS);
}
},
MmlToken(parser, name) {
const kind = parser.GetArgument(name);
let attr = parser.GetBrackets(name, '').replace(/^\s+/, '');
const text = parser.GetArgument(name);
const def = {};
const keep = [];
let node;
try {
node = parser.create('node', kind);
}
catch (_e) {
node = null;
}
if (!node || !node.isToken) {
throw new tex_TexError('NotMathMLToken', '%1 is not a token element', kind);
}
while (attr !== '') {
const match = attr.match(/^([a-z]+)\s*=\s*('[^']*'|"[^"]*"|[^ ,]*)\s*,?\s*/i);
if (!match) {
throw new tex_TexError('InvalidMathMLAttr', 'Invalid MathML attribute: %1', attr);
}
if (!node.attributes.hasDefault(match[1]) && !MmlTokenAllow[match[1]]) {
throw new tex_TexError('UnknownAttrForElement', '%1 is not a recognized attribute for %2', match[1], kind);
}
let value = ParseUtil.mmlFilterAttribute(parser, match[1], match[2].replace(/^(['"])(.*)\1$/, '$2'));
if (value) {
if (value.toLowerCase() === 'true') {
value = true;
}
else if (value.toLowerCase() === 'false') {
value = false;
}
def[match[1]] = value;
keep.push(match[1]);
}
attr = attr.substring(match[0].length);
}
if (keep.length) {
def['mjx-keep-attrs'] = keep.join(' ');
}
const textNode = parser.create('text', replaceUnicode(text));
node.appendChild(textNode);
tex_NodeUtil.setProperties(node, def);
parser.Push(node);
},
Strut(parser, _name) {
const row = parser.create('node', 'mrow');
const padded = parser.create('node', 'mpadded', [row], {
height: '8.6pt',
depth: '3pt',
width: 0,
});
parser.Push(padded);
},
Phantom(parser, name, v, h) {
let box = parser.create('node', 'mphantom', [parser.ParseArg(name)]);
if (v || h) {
box = parser.create('node', 'mpadded', [box]);
if (h) {
tex_NodeUtil.setAttribute(box, 'height', 0);
tex_NodeUtil.setAttribute(box, 'depth', 0);
}
if (v) {
tex_NodeUtil.setAttribute(box, 'width', 0);
}
}
const atom = parser.create('node', 'TeXAtom', [box]);
parser.Push(atom);
},
Smash(parser, name) {
const bt = UnitUtil.trimSpaces(parser.GetBrackets(name, ''));
const smash = parser.create('node', 'mpadded', [parser.ParseArg(name)]);
switch (bt) {
case 'b':
tex_NodeUtil.setAttribute(smash, 'depth', 0);
break;
case 't':
tex_NodeUtil.setAttribute(smash, 'height', 0);
break;
default:
tex_NodeUtil.setAttribute(smash, 'height', 0);
tex_NodeUtil.setAttribute(smash, 'depth', 0);
}
const atom = parser.create('node', 'TeXAtom', [smash]);
parser.Push(atom);
},
Lap(parser, name) {
const mml = parser.create('node', 'mpadded', [parser.ParseArg(name)], {
width: 0,
});
if (name === '\\llap') {
tex_NodeUtil.setAttribute(mml, 'lspace', '-1width');
}
const atom = parser.create('node', 'TeXAtom', [mml]);
parser.Push(atom);
},
RaiseLower(parser, name) {
let h = parser.GetDimen(name);
const item = parser.itemFactory
.create('position')
.setProperties({ name: parser.currentCS, move: 'vertical' });
if (h.charAt(0) === '-') {
h = h.slice(1);
name = name.substring(1) === 'raise' ? '\\lower' : '\\raise';
}
if (name === '\\lower') {
item.setProperty('dh', '-' + h);
item.setProperty('dd', '+' + h);
}
else {
item.setProperty('dh', '+' + h);
item.setProperty('dd', '-' + h);
}
parser.Push(item);
},
MoveLeftRight(parser, name) {
let h = parser.GetDimen(name);
let nh = h.charAt(0) === '-' ? h.slice(1) : '-' + h;
if (name === '\\moveleft') {
const tmp = h;
h = nh;
nh = tmp;
}
parser.Push(parser.itemFactory.create('position').setProperties({
name: parser.currentCS,
move: 'horizontal',
left: parser.create('node', 'mspace', [], { width: h }),
right: parser.create('node', 'mspace', [], { width: nh }),
}));
},
Hskip(parser, name, nobreak = false) {
const node = parser.create('node', 'mspace', [], {
width: parser.GetDimen(name),
});
if (nobreak) {
tex_NodeUtil.setAttribute(node, 'linebreak', 'nobreak');
}
parser.Push(node);
},
Nonscript(parser, _name) {
parser.Push(parser.itemFactory.create('nonscript'));
},
Rule(parser, name, style) {
const w = parser.GetDimen(name), h = parser.GetDimen(name), d = parser.GetDimen(name);
const def = { width: w, height: h, depth: d };
if (style !== 'blank') {
def['mathbackground'] = parser.stack.env['color'] || 'black';
}
const node = parser.create('node', 'mspace', [], def);
parser.Push(node);
},
rule(parser, name) {
const v = parser.GetBrackets(name), w = parser.GetDimen(name), h = parser.GetDimen(name);
let mml = parser.create('node', 'mspace', [], {
width: w,
height: h,
mathbackground: parser.stack.env['color'] || 'black',
});
if (v) {
mml = parser.create('node', 'mpadded', [mml], { voffset: v });
if (v.match(/^-/)) {
tex_NodeUtil.setAttribute(mml, 'height', v);
tex_NodeUtil.setAttribute(mml, 'depth', '+' + v.substring(1));
}
else {
tex_NodeUtil.setAttribute(mml, 'height', '+' + v);
}
}
parser.Push(mml);
},
MakeBig(parser, name, mclass, size) {
size *= P_HEIGHT;
const sizeStr = String(size).replace(/(\.\d\d\d).+/, '$1') + 'em';
const delim = parser.GetDelimiter(name, true);
const mo = parser.create('token', 'mo', {
minsize: sizeStr,
maxsize: sizeStr,
fence: true,
stretchy: true,
symmetric: true,
}, delim);
const node = parser.create('node', 'TeXAtom', [mo], { texClass: mclass });
parser.Push(node);
},
BuildRel(parser, name) {
const top = parser.ParseUpTo(name, '\\over');
const bot = parser.ParseArg(name);
const node = parser.create('node', 'munderover');
tex_NodeUtil.setChild(node, 0, bot);
tex_NodeUtil.setChild(node, 1, null);
tex_NodeUtil.setChild(node, 2, top);
const atom = parser.create('node', 'TeXAtom', [node], {
texClass: TEXCLASS.REL,
});
parser.Push(atom);
},
HBox(parser, name, style, font) {
parser.PushAll(ParseUtil.internalMath(parser, parser.GetArgument(name), style, font));
},
FBox(parser, name) {
const internal = ParseUtil.internalMath(parser, parser.GetArgument(name));
const node = parser.create('node', 'menclose', internal, {
notation: 'box',
});
parser.Push(node);
},
FrameBox(parser, name) {
const width = parser.GetBrackets(name);
const pos = parser.GetBrackets(name) || 'c';
let mml = ParseUtil.internalMath(parser, parser.GetArgument(name));
if (width) {
mml = [
parser.create('node', 'mpadded', mml, {
width,
'data-align': lookup(pos, { l: 'left', r: 'right' }, 'center'),
}),
];
}
const node = parser.create('node', 'TeXAtom', [parser.create('node', 'menclose', mml, { notation: 'box' })], { texClass: TEXCLASS.ORD });
parser.Push(node);
},
MakeBox(parser, name) {
const width = parser.GetBrackets(name);
const pos = parser.GetBrackets(name, 'c');
const mml = parser.create('node', 'mpadded', ParseUtil.internalMath(parser, parser.GetArgument(name)));
if (width) {
tex_NodeUtil.setAttribute(mml, 'width', width);
}
const align = lookup(pos.toLowerCase(), { c: 'center', r: 'right' }, '');
if (align) {
tex_NodeUtil.setAttribute(mml, 'data-align', align);
}
if (pos.toLowerCase() !== pos) {
tex_NodeUtil.setAttribute(mml, 'data-overflow', 'linebreak');
}
parser.Push(mml);
},
Not(parser, _name) {
parser.Push(parser.itemFactory.create('not'));
},
Dots(parser, _name) {
const ldotsEntity = tex_NodeUtil.createEntity('2026');
const cdotsEntity = tex_NodeUtil.createEntity('22EF');
const ldots = parser.create('token', 'mo', { stretchy: false }, ldotsEntity);
const cdots = parser.create('token', 'mo', { stretchy: false }, cdotsEntity);
parser.Push(parser.itemFactory.create('dots').setProperties({
ldots: ldots,
cdots: cdots,
}));
},
Matrix(parser, _name, open, close, align, spacing, vspacing, style, cases, numbered) {
const c = parser.GetNext();
if (c === '') {
throw new tex_TexError('MissingArgFor', 'Missing argument for %1', parser.currentCS);
}
if (c === '{') {
parser.i++;
}
else {
parser.string = c + '}' + parser.string.slice(parser.i + 1);
parser.i = 0;
}
const array = parser.itemFactory
.create('array')
.setProperty('requireClose', true);
if (open || !align) {
array.setProperty('arrayPadding', '.2em .125em');
}
array.arraydef = {
rowspacing: vspacing || '4pt',
columnspacing: spacing || '1em',
};
if (cases) {
array.setProperty('isCases', true);
}
if (numbered) {
array.setProperty('isNumbered', true);
array.arraydef.side = numbered;
}
if (open || close) {
array.setProperty('open', open);
array.setProperty('close', close);
}
if (style === 'D') {
array.arraydef.displaystyle = true;
}
if (align != null) {
array.arraydef.columnalign = align;
}
parser.Push(array);
},
Entry(parser, name) {
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isEntry: true, name: name }));
const top = parser.stack.Top();
const env = top.getProperty('casesEnv');
const cases = top.getProperty('isCases');
if (!cases && !env)
return;
const str = parser.string;
let braces = 0;
let close = -1;
let i = parser.i;
let m = str.length;
const end = env
? new RegExp(`^\\\\end\\s*\\{${env.replace(/\*/, '\\*')}\\}`)
: null;
while (i < m) {
const c = str.charAt(i);
if (c === '{') {
braces++;
i++;
}
else if (c === '}') {
if (braces === 0) {
m = 0;
}
else {
braces--;
if (braces === 0 && close < 0) {
close = i - parser.i;
}
i++;
}
}
else if (c === '&' && braces === 0) {
throw new tex_TexError('ExtraAlignTab', 'Extra alignment tab in \\cases text');
}
else if (c === '\\') {
const rest = str.substring(i);
if (rest.match(/^((\\cr)[^a-zA-Z]|\\\\)/) || (end && rest.match(end))) {
m = 0;
}
else {
i += 2;
}
}
else {
i++;
}
}
const text = str.substring(parser.i, i);
if (!text.match(/^\s*\\text[^a-zA-Z]/) ||
close !== text.replace(/\s+$/, '').length - 1) {
const internal = ParseUtil.internalMath(parser, UnitUtil.trimSpaces(text), 0);
parser.PushAll(internal);
parser.i = i;
}
},
Cr(parser, name) {
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isCR: true, name: name }));
},
CrLaTeX(parser, name, nobrackets = false) {
let n;
if (!nobrackets) {
if (parser.string.charAt(parser.i) === '*') {
parser.i++;
}
if (parser.string.charAt(parser.i) === '[') {
const dim = parser.GetBrackets(name, '');
const [value, unit] = UnitUtil.matchDimen(dim);
if (dim && !value) {
throw new tex_TexError('BracketMustBeDimension', 'Bracket argument to %1 must be a dimension', parser.currentCS);
}
n = value + unit;
}
}
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isCR: true, name: name, linebreak: true }));
const top = parser.stack.Top();
let node;
if (top instanceof ArrayItem) {
if (n) {
top.addRowSpacing(n);
}
}
else {
node = parser.create('node', 'mspace', [], {
linebreak: TexConstant.LineBreak.NEWLINE,
});
if (n) {
tex_NodeUtil.setAttribute(node, 'data-lineleading', n);
}
parser.Push(node);
}
},
HLine(parser, _name, style) {
if (style == null) {
style = 'solid';
}
const top = parser.stack.Top();
if (!(top instanceof ArrayItem) || top.Size()) {
throw new tex_TexError('Misplaced', 'Misplaced %1', parser.currentCS);
}
if (!top.table.length) {
top.frame.push(['top', style]);
}
else {
const lines = top.arraydef['rowlines']
? top.arraydef['rowlines'].split(/ /)
: [];
while (lines.length < top.table.length) {
lines.push('none');
}
lines[top.table.length - 1] = style;
top.arraydef['rowlines'] = lines.join(' ');
}
},
HFill(parser, _name) {
const top = parser.stack.Top();
if (top instanceof ArrayItem) {
top.hfill.push(top.Size());
}
else {
throw new tex_TexError('UnsupportedHFill', 'Unsupported use of %1', parser.currentCS);
}
},
NewColumnType(parser, name) {
const c = parser.GetArgument(name);
const n = parser.GetBrackets(name, '0');
const macro = parser.GetArgument(name);
if (c.length !== 1) {
throw new tex_TexError('BadColumnName', 'Column specifier must be exactly one character: %1', c);
}
if (!n.match(/^\d+$/)) {
throw new tex_TexError('PositiveIntegerArg', 'Argument to %1 must be a positive integer', n);
}
const cparser = parser.configuration.columnParser;
cparser.columnHandler[c] = (state) => cparser.macroColumn(state, macro, parseInt(n));
parser.Push(parser.itemFactory.create('null'));
},
BeginEnd(parser, name) {
const env = parser.GetArgument(name);
if (env.match(/\\/)) {
throw new tex_TexError('InvalidEnv', "Invalid environment name '%1'", env);
}
const macro = parser.configuration.handlers
.get(HandlerType.ENVIRONMENT)
.lookup(env);
if (macro && name === '\\end') {
if (!macro.args[0]) {
const mml = parser.itemFactory.create('end').setProperty('name', env);
parser.Push(mml);
return;
}
parser.stack.env['closing'] = env;
}
ParseUtil.checkMaxMacros(parser, false);
parser.parse(HandlerType.ENVIRONMENT, [parser, env]);
},
Array(parser, begin, open, close, align, spacing, vspacing, style, raggedHeight) {
if (!align) {
align = parser.GetArgument('\\begin{' + begin.getName() + '}');
}
const array = parser.itemFactory.create('array');
if (begin.getName() === 'array') {
array.setProperty('arrayPadding', '.5em .125em');
}
array.parser = parser;
array.arraydef = {
columnspacing: spacing || '1em',
rowspacing: vspacing || '4pt',
};
parser.configuration.columnParser.process(parser, align, array);
if (open) {
array.setProperty('open', parser.convertDelimiter(open));
}
if (close) {
array.setProperty('close', parser.convertDelimiter(close));
}
if ((style || '').charAt(1) === "'") {
array.arraydef['data-cramped'] = true;
style = style.charAt(0);
}
if (style === 'D') {
array.arraydef['displaystyle'] = true;
}
else if (style) {
array.arraydef['displaystyle'] = false;
}
array.arraydef['scriptlevel'] = style === 'S' ? 1 : 0;
if (raggedHeight) {
array.arraydef['useHeight'] = false;
}
parser.Push(begin);
array.StartEntry();
return array;
},
AlignedArray(parser, begin, style = '') {
const align = parser.GetBrackets('\\begin{' + begin.getName() + '}');
const item = BaseMethods.Array(parser, begin, null, null, null, null, null, style);
return ParseUtil.setArrayAlign(item, align);
},
IndentAlign(parser, begin) {
const name = `\\begin{${begin.getName()}}`;
const first = parser.GetBrackets(name, '');
const shift = parser.GetBrackets(name, '');
const last = parser.GetBrackets(name, '');
if ((first && !UnitUtil.matchDimen(first)[0]) ||
(shift && !UnitUtil.matchDimen(shift)[0]) ||
(last && !UnitUtil.matchDimen(last)[0])) {
throw new tex_TexError('BracketMustBeDimension', 'Bracket argument to %1 must be a dimension', name);
}
const lcr = parser.GetArgument(name);
if (lcr && !lcr.match(/^([lcr]{1,3})?$/)) {
throw new tex_TexError('BadAlignment', 'Alignment must be one to three copies of l, c, or r');
}
const align = [...lcr].map((c) => ({ l: 'left', c: 'center', r: 'right' })[c]);
if (align.length === 1) {
align.push(align[0]);
}
const attr = {};
for (const [name, value] of [
['indentshiftfirst', first],
['indentshift', shift || first],
['indentshiftlast', last],
['indentalignfirst', align[0]],
['indentalign', align[1]],
['indentalignlast', align[2]],
]) {
if (value) {
attr[name] = value;
}
}
parser.Push(parser.itemFactory.create('mstyle', attr, begin.getName()));
},
Equation(parser, begin, numbered, display = true) {
parser.configuration.mathItem.display = display;
parser.stack.env.display = display;
ParseUtil.checkEqnEnv(parser);
parser.Push(begin);
return parser.itemFactory
.create('equation', numbered)
.setProperty('name', begin.getName());
},
EqnArray(parser, begin, numbered, taggable, align, balign, spacing) {
const name = begin.getName();
const isGather = name === 'gather' || name === 'gather*';
if (taggable) {
ParseUtil.checkEqnEnv(parser, !isGather);
}
parser.Push(begin);
align = align
.replace(/[^clr]/g, '')
.split('')
.join(' ');
align = align
.replace(/l/g, 'left')
.replace(/r/g, 'right')
.replace(/c/g, 'center');
balign = splitAlignArray(balign);
const newItem = parser.itemFactory.create('eqnarray', name, numbered, taggable, parser.stack.global);
newItem.arraydef = {
displaystyle: true,
columnalign: align,
columnspacing: spacing || '1em',
rowspacing: '3pt',
'data-break-align': balign,
side: parser.options['tagSide'],
minlabelspacing: parser.options['tagIndent'],
};
if (isGather) {
newItem.setProperty('nestable', true);
}
return newItem;
},
HandleNoTag(parser, _name) {
parser.tags.notag();
},
HandleLabel(parser, name) {
const label = parser.GetArgument(name);
if (label === '') {
return;
}
if (!parser.tags.refUpdate) {
if (parser.tags.label) {
throw new tex_TexError('MultipleCommand', 'Multiple %1', parser.currentCS);
}
parser.tags.label = label;
if ((parser.tags.allLabels[label] || parser.tags.labels[label]) &&
!parser.options['ignoreDuplicateLabels']) {
throw new tex_TexError('MultipleLabel', "Label '%1' multiply defined", label);
}
parser.tags.labels[label] = new Label();
}
},
HandleRef(parser, name, eqref) {
const label = parser.GetArgument(name);
let ref = parser.tags.allLabels[label] || parser.tags.labels[label];
if (!ref) {
if (!parser.tags.refUpdate) {
parser.tags.redo = true;
}
ref = new Label();
}
let tag = ref.tag;
if (eqref) {
tag = parser.tags.formatRef(tag);
}
const node = parser.create('node', 'mrow', ParseUtil.internalMath(parser, tag), {
href: parser.tags.formatUrl(ref.id, parser.options.baseURL),
class: 'MathJax_ref',
});
parser.Push(node);
},
Macro(parser, name, macro, argcount, def) {
if (argcount) {
const args = [];
if (def != null) {
const optional = parser.GetBrackets(name);
args.push(optional == null ? def : optional);
}
for (let i = args.length; i < argcount; i++) {
args.push(parser.GetArgument(name));
}
macro = ParseUtil.substituteArgs(parser, args, macro);
}
parser.string = ParseUtil.addArgs(parser, macro, parser.string.slice(parser.i));
parser.i = 0;
ParseUtil.checkMaxMacros(parser);
},
MathChoice(parser, name) {
const D = parser.ParseArg(name);
const T = parser.ParseArg(name);
const S = parser.ParseArg(name);
const SS = parser.ParseArg(name);
parser.Push(parser.create('node', 'MathChoice', [D, T, S, SS]));
},
};
/* harmony default export */ const base_BaseMethods = (BaseMethods);
//# sourceMappingURL=BaseMethods.js.map
;// ./mjs/input/tex/ParseMethods.js
const ParseMethods_MATHVARIANT = TexConstant.Variant;
const ParseMethods = {
variable(parser, c) {
var _a;
const def = ParseUtil.getFontDef(parser);
const env = parser.stack.env;
if (env.multiLetterIdentifiers && env.font !== '') {
c =
((_a = parser.string
.substring(parser.i - 1)
.match(env.multiLetterIdentifiers)) === null || _a === void 0 ? void 0 : _a[0]) || c;
parser.i += c.length - 1;
if (def.mathvariant === ParseMethods_MATHVARIANT.NORMAL &&
env.noAutoOP &&
c.length > 1) {
def.autoOP = false;
}
}
if (!def.mathvariant && ParseUtil.isLatinOrGreekChar(c)) {
const variant = parser.configuration.mathStyle(c);
if (variant) {
def.mathvariant = variant;
}
}
const node = parser.create('token', 'mi', def, c);
parser.Push(node);
},
digit(parser, _c) {
const pattern = parser.configuration.options['numberPattern'];
const n = parser.string.slice(parser.i - 1).match(pattern);
const def = ParseUtil.getFontDef(parser);
if (!n) {
return false;
}
const mml = parser.create('token', 'mn', def, n[0].replace(/[{}]/g, ''));
parser.i += n[0].length - 1;
parser.Push(mml);
return true;
},
controlSequence(parser, _c) {
const name = parser.GetCS();
parser.parse(HandlerType.MACRO, [parser, name]);
},
lcGreek(parser, mchar) {
const def = {
mathvariant: parser.configuration.mathStyle(mchar.char) || ParseMethods_MATHVARIANT.ITALIC,
};
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
ucGreek(parser, mchar) {
const def = {
mathvariant: parser.stack.env['font'] ||
parser.configuration.mathStyle(mchar.char, true) ||
ParseMethods_MATHVARIANT.NORMAL,
};
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
mathchar0mi(parser, mchar) {
const def = mchar.attributes || { mathvariant: ParseMethods_MATHVARIANT.ITALIC };
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
mathchar0mo(parser, mchar) {
const def = mchar.attributes || {};
def['stretchy'] = false;
const node = parser.create('token', 'mo', def, mchar.char);
tex_NodeUtil.setProperty(node, 'fixStretchy', true);
parser.configuration.addNode('fixStretchy', node);
parser.Push(node);
},
mathchar7(parser, mchar) {
const def = mchar.attributes || { mathvariant: ParseMethods_MATHVARIANT.NORMAL };
if (parser.stack.env['font']) {
def['mathvariant'] = parser.stack.env['font'];
}
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
delimiter(parser, delim) {
let def = delim.attributes || {};
def = Object.assign({ fence: false, stretchy: false }, def);
const node = parser.create('token', 'mo', def, delim.char);
parser.Push(node);
},
environment(parser, env, func, args) {
const mml = parser.itemFactory.create('begin').setProperty('name', env);
parser.Push(func(parser, mml, ...args.slice(1)));
},
};
/* harmony default export */ const tex_ParseMethods = (ParseMethods);
//# sourceMappingURL=ParseMethods.js.map
;// ./mjs/input/tex/base/BaseMappings.js
const THICKMATHSPACE = em(MATHSPACE.thickmathspace);
const VARIANT = TexConstant.Variant;
new RegExpMap('letter', tex_ParseMethods.variable, /[a-z]/i);
new RegExpMap('digit', tex_ParseMethods.digit, /[0-9.,]/);
new RegExpMap('command', tex_ParseMethods.controlSequence, /^\\/);
new MacroMap('special', {
'{': base_BaseMethods.Open,
'}': base_BaseMethods.Close,
'~': base_BaseMethods.Tilde,
'^': base_BaseMethods.Superscript,
_: base_BaseMethods.Subscript,
'|': base_BaseMethods.Bar,
' ': base_BaseMethods.Space,
'\t': base_BaseMethods.Space,
'\r': base_BaseMethods.Space,
'\n': base_BaseMethods.Space,
"'": base_BaseMethods.Prime,
'%': base_BaseMethods.Comment,
'&': base_BaseMethods.Entry,
'#': base_BaseMethods.Hash,
'\u00A0': base_BaseMethods.Space,
'\u2019': base_BaseMethods.Prime,
});
new CharacterMap('lcGreek', tex_ParseMethods.lcGreek, {
alpha: '\u03B1',
beta: '\u03B2',
gamma: '\u03B3',
delta: '\u03B4',
epsilon: '\u03F5',
zeta: '\u03B6',
eta: '\u03B7',
theta: '\u03B8',
iota: '\u03B9',
kappa: '\u03BA',
lambda: '\u03BB',
mu: '\u03BC',
nu: '\u03BD',
xi: '\u03BE',
omicron: '\u03BF',
pi: '\u03C0',
rho: '\u03C1',
sigma: '\u03C3',
tau: '\u03C4',
upsilon: '\u03C5',
phi: '\u03D5',
chi: '\u03C7',
psi: '\u03C8',
omega: '\u03C9',
varepsilon: '\u03B5',
vartheta: '\u03D1',
varpi: '\u03D6',
varrho: '\u03F1',
varsigma: '\u03C2',
varphi: '\u03C6',
});
new CharacterMap('ucGreek', tex_ParseMethods.ucGreek, {
Gamma: '\u0393',
Delta: '\u0394',
Theta: '\u0398',
Lambda: '\u039B',
Xi: '\u039E',
Pi: '\u03A0',
Sigma: '\u03A3',
Upsilon: '\u03A5',
Phi: '\u03A6',
Psi: '\u03A8',
Omega: '\u03A9',
});
new CharacterMap('mathchar0mi', tex_ParseMethods.mathchar0mi, {
AA: '\u212B',
S: ['\u00A7', { mathvariant: VARIANT.NORMAL }],
aleph: ['\u2135', { mathvariant: VARIANT.NORMAL }],
hbar: ['\u210F', { variantForm: true }],
imath: '\u0131',
jmath: '\u0237',
ell: '\u2113',
wp: ['\u2118', { mathvariant: VARIANT.NORMAL }],
Re: ['\u211C', { mathvariant: VARIANT.NORMAL }],
Im: ['\u2111', { mathvariant: VARIANT.NORMAL }],
partial: ['\u2202', { mathvariant: VARIANT.ITALIC }],
infty: ['\u221E', { mathvariant: VARIANT.NORMAL }],
prime: ['\u2032', { variantForm: true }],
emptyset: ['\u2205', { mathvariant: VARIANT.NORMAL }],
nabla: ['\u2207', { mathvariant: VARIANT.NORMAL }],
top: ['\u22A4', { mathvariant: VARIANT.NORMAL }],
bot: ['\u22A5', { mathvariant: VARIANT.NORMAL }],
angle: ['\u2220', { mathvariant: VARIANT.NORMAL }],
triangle: ['\u25B3', { mathvariant: VARIANT.NORMAL }],
backslash: ['\\', { mathvariant: VARIANT.NORMAL }],
forall: ['\u2200', { mathvariant: VARIANT.NORMAL }],
exists: ['\u2203', { mathvariant: VARIANT.NORMAL }],
neg: ['\u00AC', { mathvariant: VARIANT.NORMAL }],
lnot: ['\u00AC', { mathvariant: VARIANT.NORMAL }],
flat: ['\u266D', { mathvariant: VARIANT.NORMAL }],
natural: ['\u266E', { mathvariant: VARIANT.NORMAL }],
sharp: ['\u266F', { mathvariant: VARIANT.NORMAL }],
clubsuit: ['\u2663', { mathvariant: VARIANT.NORMAL }],
diamondsuit: ['\u2662', { mathvariant: VARIANT.NORMAL }],
heartsuit: ['\u2661', { mathvariant: VARIANT.NORMAL }],
spadesuit: ['\u2660', { mathvariant: VARIANT.NORMAL }],
});
new CharacterMap('mathchar0mo', tex_ParseMethods.mathchar0mo, {
surd: '\u221A',
coprod: ['\u2210', { movesupsub: true }],
bigvee: ['\u22C1', { movesupsub: true }],
bigwedge: ['\u22C0', { movesupsub: true }],
biguplus: ['\u2A04', { movesupsub: true }],
bigcap: ['\u22C2', { movesupsub: true }],
bigcup: ['\u22C3', { movesupsub: true }],
int: '\u222B',
intop: ['\u222B', { movesupsub: true, movablelimits: true }],
iint: '\u222C',
iiint: '\u222D',
prod: ['\u220F', { movesupsub: true }],
sum: ['\u2211', { movesupsub: true }],
bigotimes: ['\u2A02', { movesupsub: true }],
bigoplus: ['\u2A01', { movesupsub: true }],
bigodot: ['\u2A00', { movesupsub: true }],
oint: '\u222E',
ointop: ['\u222E', { movesupsub: true, movablelimits: true }],
oiint: '\u222F',
oiiint: '\u2230',
bigsqcup: ['\u2A06', { movesupsub: true }],
smallint: ['\u222B', { largeop: false }],
triangleleft: '\u25C3',
triangleright: '\u25B9',
bigtriangleup: '\u25B3',
bigtriangledown: '\u25BD',
wedge: '\u2227',
land: '\u2227',
vee: '\u2228',
lor: '\u2228',
cap: '\u2229',
cup: '\u222A',
ddagger: '\u2021',
dagger: '\u2020',
sqcap: '\u2293',
sqcup: '\u2294',
uplus: '\u228E',
amalg: '\u2A3F',
diamond: '\u22C4',
bullet: '\u2219',
wr: '\u2240',
div: '\u00F7',
odot: ['\u2299', { largeop: false }],
oslash: ['\u2298', { largeop: false }],
otimes: ['\u2297', { largeop: false }],
ominus: ['\u2296', { largeop: false }],
oplus: ['\u2295', { largeop: false }],
mp: '\u2213',
pm: '\u00B1',
circ: '\u2218',
bigcirc: '\u25EF',
setminus: '\u2216',
cdot: '\u22C5',
ast: '\u2217',
times: '\u00D7',
star: '\u22C6',
propto: '\u221D',
sqsubseteq: '\u2291',
sqsupseteq: '\u2292',
parallel: '\u2225',
mid: '\u2223',
dashv: '\u22A3',
vdash: '\u22A2',
leq: '\u2264',
le: '\u2264',
geq: '\u2265',
ge: '\u2265',
lt: '\u003C',
gt: '\u003E',
succ: '\u227B',
prec: '\u227A',
approx: '\u2248',
succeq: '\u2AB0',
preceq: '\u2AAF',
supset: '\u2283',
subset: '\u2282',
supseteq: '\u2287',
subseteq: '\u2286',
in: '\u2208',
ni: '\u220B',
notin: '\u2209',
owns: '\u220B',
gg: '\u226B',
ll: '\u226A',
sim: '\u223C',
simeq: '\u2243',
perp: '\u27C2',
equiv: '\u2261',
asymp: '\u224D',
smile: '\u2323',
frown: '\u2322',
ne: '\u2260',
neq: '\u2260',
cong: '\u2245',
doteq: '\u2250',
bowtie: '\u22C8',
models: '\u22A7',
notChar: '\u29F8',
Leftrightarrow: '\u21D4',
Leftarrow: '\u21D0',
Rightarrow: '\u21D2',
leftrightarrow: '\u2194',
leftarrow: '\u2190',
gets: '\u2190',
rightarrow: '\u2192',
to: ['\u2192', { accent: false }],
mapsto: '\u21A6',
leftharpoonup: '\u21BC',
leftharpoondown: '\u21BD',
rightharpoonup: '\u21C0',
rightharpoondown: '\u21C1',
nearrow: '\u2197',
searrow: '\u2198',
nwarrow: '\u2196',
swarrow: '\u2199',
rightleftharpoons: '\u21CC',
hookrightarrow: '\u21AA',
hookleftarrow: '\u21A9',
longleftarrow: '\u27F5',
Longleftarrow: '\u27F8',
longrightarrow: '\u27F6',
Longrightarrow: '\u27F9',
Longleftrightarrow: '\u27FA',
longleftrightarrow: '\u27F7',
longmapsto: '\u27FC',
ldots: '\u2026',
cdots: '\u22EF',
vdots: '\u22EE',
ddots: '\u22F1',
iddots: '\u22F0',
dotsc: '\u2026',
dotsb: '\u22EF',
dotsm: '\u22EF',
dotsi: '\u22EF',
dotso: '\u2026',
ldotp: ['\u002E', { texClass: TEXCLASS.PUNCT }],
cdotp: ['\u22C5', { texClass: TEXCLASS.PUNCT }],
colon: ['\u003A', { texClass: TEXCLASS.PUNCT }],
});
new CharacterMap('mathchar7', tex_ParseMethods.mathchar7, {
_: '\u005F',
'#': '\u0023',
$: '\u0024',
'%': '\u0025',
'&': '\u0026',
And: '\u0026',
});
new DelimiterMap('delimiter', tex_ParseMethods.delimiter, {
'(': '(',
')': ')',
'[': '[',
']': ']',
'<': '\u27E8',
'>': '\u27E9',
'\\lt': '\u27E8',
'\\gt': '\u27E9',
'/': '/',
'|': ['|', { texClass: TEXCLASS.ORD }],
'.': '',
'\\lmoustache': '\u23B0',
'\\rmoustache': '\u23B1',
'\\lgroup': '\u27EE',
'\\rgroup': '\u27EF',
'\\arrowvert': '\u23D0',
'\\Arrowvert': '\u2016',
'\\bracevert': '\u23AA',
'\\Vert': ['\u2016', { texClass: TEXCLASS.ORD }],
'\\|': ['\u2016', { texClass: TEXCLASS.ORD }],
'\\vert': ['|', { texClass: TEXCLASS.ORD }],
'\\uparrow': '\u2191',
'\\downarrow': '\u2193',
'\\updownarrow': '\u2195',
'\\Uparrow': '\u21D1',
'\\Downarrow': '\u21D3',
'\\Updownarrow': '\u21D5',
'\\backslash': '\\',
'\\rangle': '\u27E9',
'\\langle': '\u27E8',
'\\rbrace': '}',
'\\lbrace': '{',
'\\}': '}',
'\\{': '{',
'\\rceil': '\u2309',
'\\lceil': '\u2308',
'\\rfloor': '\u230B',
'\\lfloor': '\u230A',
'\\lbrack': '[',
'\\rbrack': ']',
});
new CommandMap('macros', {
displaystyle: [base_BaseMethods.SetStyle, 'D', true, 0],
textstyle: [base_BaseMethods.SetStyle, 'T', false, 0],
scriptstyle: [base_BaseMethods.SetStyle, 'S', false, 1],
scriptscriptstyle: [base_BaseMethods.SetStyle, 'SS', false, 2],
rm: [base_BaseMethods.SetFont, VARIANT.NORMAL],
mit: [base_BaseMethods.SetFont, VARIANT.ITALIC],
oldstyle: [base_BaseMethods.SetFont, VARIANT.OLDSTYLE],
cal: [base_BaseMethods.SetFont, VARIANT.CALLIGRAPHIC],
it: [base_BaseMethods.SetFont, VARIANT.MATHITALIC],
bf: [base_BaseMethods.SetFont, VARIANT.BOLD],
sf: [base_BaseMethods.SetFont, VARIANT.SANSSERIF],
tt: [base_BaseMethods.SetFont, VARIANT.MONOSPACE],
frak: [base_BaseMethods.MathFont, VARIANT.FRAKTUR],
Bbb: [base_BaseMethods.MathFont, VARIANT.DOUBLESTRUCK],
mathrm: [base_BaseMethods.MathFont, VARIANT.NORMAL],
mathup: [base_BaseMethods.MathFont, VARIANT.NORMAL],
mathnormal: [base_BaseMethods.MathFont, ''],
mathbf: [base_BaseMethods.MathFont, VARIANT.BOLD],
mathbfup: [base_BaseMethods.MathFont, VARIANT.BOLD],
mathit: [base_BaseMethods.MathFont, VARIANT.MATHITALIC],
mathbfit: [base_BaseMethods.MathFont, VARIANT.BOLDITALIC],
mathbb: [base_BaseMethods.MathFont, VARIANT.DOUBLESTRUCK],
mathfrak: [base_BaseMethods.MathFont, VARIANT.FRAKTUR],
mathbffrak: [base_BaseMethods.MathFont, VARIANT.BOLDFRAKTUR],
mathscr: [base_BaseMethods.MathFont, VARIANT.SCRIPT],
mathbfscr: [base_BaseMethods.MathFont, VARIANT.BOLDSCRIPT],
mathsf: [base_BaseMethods.MathFont, VARIANT.SANSSERIF],
mathsfup: [base_BaseMethods.MathFont, VARIANT.SANSSERIF],
mathbfsf: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
mathbfsfup: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
mathsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFITALIC],
mathbfsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFBOLDITALIC],
mathtt: [base_BaseMethods.MathFont, VARIANT.MONOSPACE],
mathcal: [base_BaseMethods.MathFont, VARIANT.CALLIGRAPHIC],
mathbfcal: [base_BaseMethods.MathFont, VARIANT.BOLDCALLIGRAPHIC],
symrm: [base_BaseMethods.MathFont, VARIANT.NORMAL],
symup: [base_BaseMethods.MathFont, VARIANT.NORMAL],
symnormal: [base_BaseMethods.MathFont, ''],
symbf: [base_BaseMethods.MathFont, VARIANT.BOLD, VARIANT.BOLDITALIC],
symbfup: [base_BaseMethods.MathFont, VARIANT.BOLD],
symit: [base_BaseMethods.MathFont, VARIANT.ITALIC],
symbfit: [base_BaseMethods.MathFont, VARIANT.BOLDITALIC],
symbb: [base_BaseMethods.MathFont, VARIANT.DOUBLESTRUCK],
symfrak: [base_BaseMethods.MathFont, VARIANT.FRAKTUR],
symbffrak: [base_BaseMethods.MathFont, VARIANT.BOLDFRAKTUR],
symscr: [base_BaseMethods.MathFont, VARIANT.SCRIPT],
symbfscr: [base_BaseMethods.MathFont, VARIANT.BOLDSCRIPT],
symsf: [base_BaseMethods.MathFont, VARIANT.SANSSERIF, VARIANT.SANSSERIFITALIC],
symsfup: [base_BaseMethods.MathFont, VARIANT.SANSSERIF],
symbfsf: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
symbfsfup: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
symsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFITALIC],
symbfsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFBOLDITALIC],
symtt: [base_BaseMethods.MathFont, VARIANT.MONOSPACE],
symcal: [base_BaseMethods.MathFont, VARIANT.CALLIGRAPHIC],
symbfcal: [base_BaseMethods.MathFont, VARIANT.BOLDCALLIGRAPHIC],
textrm: [base_BaseMethods.HBox, null, VARIANT.NORMAL],
textup: [base_BaseMethods.HBox, null, VARIANT.NORMAL],
textnormal: [base_BaseMethods.HBox],
textit: [base_BaseMethods.HBox, null, VARIANT.ITALIC],
textbf: [base_BaseMethods.HBox, null, VARIANT.BOLD],
textsf: [base_BaseMethods.HBox, null, VARIANT.SANSSERIF],
texttt: [base_BaseMethods.HBox, null, VARIANT.MONOSPACE],
tiny: [base_BaseMethods.SetSize, 0.5],
Tiny: [base_BaseMethods.SetSize, 0.6],
scriptsize: [base_BaseMethods.SetSize, 0.7],
small: [base_BaseMethods.SetSize, 0.85],
normalsize: [base_BaseMethods.SetSize, 1.0],
large: [base_BaseMethods.SetSize, 1.2],
Large: [base_BaseMethods.SetSize, 1.44],
LARGE: [base_BaseMethods.SetSize, 1.73],
huge: [base_BaseMethods.SetSize, 2.07],
Huge: [base_BaseMethods.SetSize, 2.49],
arcsin: base_BaseMethods.NamedFn,
arccos: base_BaseMethods.NamedFn,
arctan: base_BaseMethods.NamedFn,
arg: base_BaseMethods.NamedFn,
cos: base_BaseMethods.NamedFn,
cosh: base_BaseMethods.NamedFn,
cot: base_BaseMethods.NamedFn,
coth: base_BaseMethods.NamedFn,
csc: base_BaseMethods.NamedFn,
deg: base_BaseMethods.NamedFn,
det: base_BaseMethods.NamedOp,
dim: base_BaseMethods.NamedFn,
exp: base_BaseMethods.NamedFn,
gcd: base_BaseMethods.NamedOp,
hom: base_BaseMethods.NamedFn,
inf: base_BaseMethods.NamedOp,
ker: base_BaseMethods.NamedFn,
lg: base_BaseMethods.NamedFn,
lim: base_BaseMethods.NamedOp,
liminf: [base_BaseMethods.NamedOp, 'lim inf'],
limsup: [base_BaseMethods.NamedOp, 'lim sup'],
ln: base_BaseMethods.NamedFn,
log: base_BaseMethods.NamedFn,
max: base_BaseMethods.NamedOp,
min: base_BaseMethods.NamedOp,
Pr: base_BaseMethods.NamedOp,
sec: base_BaseMethods.NamedFn,
sin: base_BaseMethods.NamedFn,
sinh: base_BaseMethods.NamedFn,
sup: base_BaseMethods.NamedOp,
tan: base_BaseMethods.NamedFn,
tanh: base_BaseMethods.NamedFn,
limits: [base_BaseMethods.Limits, true],
nolimits: [base_BaseMethods.Limits, false],
overline: [base_BaseMethods.UnderOver, '2015'],
underline: [base_BaseMethods.UnderOver, '2015'],
overbrace: [base_BaseMethods.UnderOver, '23DE', true],
underbrace: [base_BaseMethods.UnderOver, '23DF', true],
overparen: [base_BaseMethods.UnderOver, '23DC'],
underparen: [base_BaseMethods.UnderOver, '23DD'],
overrightarrow: [base_BaseMethods.UnderOver, '2192'],
underrightarrow: [base_BaseMethods.UnderOver, '2192'],
overleftarrow: [base_BaseMethods.UnderOver, '2190'],
underleftarrow: [base_BaseMethods.UnderOver, '2190'],
overleftrightarrow: [base_BaseMethods.UnderOver, '2194'],
underleftrightarrow: [base_BaseMethods.UnderOver, '2194'],
overset: base_BaseMethods.Overset,
underset: base_BaseMethods.Underset,
overunderset: base_BaseMethods.Overunderset,
stackrel: [base_BaseMethods.Macro, '\\mathrel{\\mathop{#2}\\limits^{#1}}', 2],
stackbin: [base_BaseMethods.Macro, '\\mathbin{\\mathop{#2}\\limits^{#1}}', 2],
over: base_BaseMethods.Over,
overwithdelims: base_BaseMethods.Over,
atop: base_BaseMethods.Over,
atopwithdelims: base_BaseMethods.Over,
above: base_BaseMethods.Over,
abovewithdelims: base_BaseMethods.Over,
brace: [base_BaseMethods.Over, '{', '}'],
brack: [base_BaseMethods.Over, '[', ']'],
choose: [base_BaseMethods.Over, '(', ')'],
frac: base_BaseMethods.Frac,
sqrt: base_BaseMethods.Sqrt,
root: base_BaseMethods.Root,
uproot: [base_BaseMethods.MoveRoot, 'upRoot'],
leftroot: [base_BaseMethods.MoveRoot, 'leftRoot'],
left: base_BaseMethods.LeftRight,
right: base_BaseMethods.LeftRight,
middle: base_BaseMethods.LeftRight,
llap: base_BaseMethods.Lap,
rlap: base_BaseMethods.Lap,
raise: base_BaseMethods.RaiseLower,
lower: base_BaseMethods.RaiseLower,
moveleft: base_BaseMethods.MoveLeftRight,
moveright: base_BaseMethods.MoveLeftRight,
',': [base_BaseMethods.Spacer, MATHSPACE.thinmathspace],
':': [base_BaseMethods.Spacer, MATHSPACE.mediummathspace],
'>': [base_BaseMethods.Spacer, MATHSPACE.mediummathspace],
';': [base_BaseMethods.Spacer, MATHSPACE.thickmathspace],
'!': [base_BaseMethods.Spacer, MATHSPACE.negativethinmathspace],
enspace: [base_BaseMethods.Spacer, 0.5],
quad: [base_BaseMethods.Spacer, 1],
qquad: [base_BaseMethods.Spacer, 2],
thinspace: [base_BaseMethods.Spacer, MATHSPACE.thinmathspace],
negthinspace: [base_BaseMethods.Spacer, MATHSPACE.negativethinmathspace],
'*': base_BaseMethods.DiscretionaryTimes,
allowbreak: base_BaseMethods.AllowBreak,
goodbreak: [base_BaseMethods.Linebreak, TexConstant.LineBreak.GOODBREAK],
badbreak: [base_BaseMethods.Linebreak, TexConstant.LineBreak.BADBREAK],
nobreak: [base_BaseMethods.Linebreak, TexConstant.LineBreak.NOBREAK],
break: base_BaseMethods.Break,
hskip: base_BaseMethods.Hskip,
hspace: base_BaseMethods.Hskip,
kern: [base_BaseMethods.Hskip, true],
mskip: base_BaseMethods.Hskip,
mspace: base_BaseMethods.Hskip,
mkern: [base_BaseMethods.Hskip, true],
rule: base_BaseMethods.rule,
Rule: [base_BaseMethods.Rule],
Space: [base_BaseMethods.Rule, 'blank'],
nonscript: base_BaseMethods.Nonscript,
big: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 0.85],
Big: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 1.15],
bigg: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 1.45],
Bigg: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 1.75],
bigl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 0.85],
Bigl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 1.15],
biggl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 1.45],
Biggl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 1.75],
bigr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 0.85],
Bigr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 1.15],
biggr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 1.45],
Biggr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 1.75],
bigm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 0.85],
Bigm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 1.15],
biggm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 1.45],
Biggm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 1.75],
mathord: [base_BaseMethods.TeXAtom, TEXCLASS.ORD],
mathop: [base_BaseMethods.TeXAtom, TEXCLASS.OP],
mathopen: [base_BaseMethods.TeXAtom, TEXCLASS.OPEN],
mathclose: [base_BaseMethods.TeXAtom, TEXCLASS.CLOSE],
mathbin: [base_BaseMethods.TeXAtom, TEXCLASS.BIN],
mathrel: [base_BaseMethods.TeXAtom, TEXCLASS.REL],
mathpunct: [base_BaseMethods.TeXAtom, TEXCLASS.PUNCT],
mathinner: [base_BaseMethods.TeXAtom, TEXCLASS.INNER],
vtop: [base_BaseMethods.VBox, 'top'],
vcenter: [base_BaseMethods.VBox, 'center'],
vbox: [base_BaseMethods.VBox, 'bottom'],
hsize: base_BaseMethods.Hsize,
parbox: base_BaseMethods.ParBox,
breakAlign: base_BaseMethods.BreakAlign,
buildrel: base_BaseMethods.BuildRel,
hbox: [base_BaseMethods.HBox, 0],
text: base_BaseMethods.HBox,
mbox: [base_BaseMethods.HBox, 0],
fbox: base_BaseMethods.FBox,
boxed: [base_BaseMethods.Macro, '\\fbox{$\\displaystyle{#1}$}', 1],
framebox: base_BaseMethods.FrameBox,
makebox: base_BaseMethods.MakeBox,
strut: base_BaseMethods.Strut,
mathstrut: [base_BaseMethods.Macro, '\\vphantom{(}'],
phantom: base_BaseMethods.Phantom,
vphantom: [base_BaseMethods.Phantom, 1, 0],
hphantom: [base_BaseMethods.Phantom, 0, 1],
smash: base_BaseMethods.Smash,
acute: [base_BaseMethods.Accent, '00B4'],
grave: [base_BaseMethods.Accent, '0060'],
ddot: [base_BaseMethods.Accent, '00A8'],
dddot: [base_BaseMethods.Accent, '20DB'],
ddddot: [base_BaseMethods.Accent, '20DC'],
tilde: [base_BaseMethods.Accent, '007E'],
bar: [base_BaseMethods.Accent, '00AF'],
breve: [base_BaseMethods.Accent, '02D8'],
check: [base_BaseMethods.Accent, '02C7'],
hat: [base_BaseMethods.Accent, '005E'],
vec: [base_BaseMethods.Accent, '2192', false],
dot: [base_BaseMethods.Accent, '02D9'],
widetilde: [base_BaseMethods.Accent, '007E', true],
widehat: [base_BaseMethods.Accent, '005E', true],
matrix: base_BaseMethods.Matrix,
array: base_BaseMethods.Matrix,
pmatrix: [base_BaseMethods.Matrix, '(', ')'],
cases: [base_BaseMethods.Matrix, '{', '', 'left left', null, '.2em', null, true],
eqalign: [
base_BaseMethods.Matrix,
null,
null,
'right left',
THICKMATHSPACE,
'.5em',
'D',
],
displaylines: [base_BaseMethods.Matrix, null, null, 'center', null, '.5em', 'D'],
cr: base_BaseMethods.Cr,
'\\': base_BaseMethods.CrLaTeX,
newline: [base_BaseMethods.CrLaTeX, true],
hline: base_BaseMethods.HLine,
hdashline: [base_BaseMethods.HLine, 'dashed'],
eqalignno: [
base_BaseMethods.Matrix,
null,
null,
'right left',
THICKMATHSPACE,
'.5em',
'D',
null,
'right',
],
leqalignno: [
base_BaseMethods.Matrix,
null,
null,
'right left',
THICKMATHSPACE,
'.5em',
'D',
null,
'left',
],
hfill: base_BaseMethods.HFill,
hfil: base_BaseMethods.HFill,
hfilll: base_BaseMethods.HFill,
bmod: [
base_BaseMethods.Macro,
'\\mmlToken{mo}[lspace="' +
THICKMATHSPACE +
'"' +
' rspace="' +
THICKMATHSPACE +
'"]{mod}',
],
pmod: [base_BaseMethods.Macro, '\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}', 1],
mod: [
base_BaseMethods.Macro,
'\\mathchoice{\\kern18mu}{\\kern12mu}' +
'{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1',
1,
],
pod: [
base_BaseMethods.Macro,
'\\mathchoice{\\kern18mu}{\\kern8mu}' + '{\\kern8mu}{\\kern8mu}(#1)',
1,
],
iff: [base_BaseMethods.Macro, '\\;\\Longleftrightarrow\\;'],
skew: [base_BaseMethods.Macro, '{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}', 3],
pmb: [base_BaseMethods.Macro, '\\rlap{#1}\\kern1px{#1}', 1],
TeX: [base_BaseMethods.Macro, 'T\\kern-.14em\\lower.5ex{E}\\kern-.115em X'],
LaTeX: [
base_BaseMethods.Macro,
'L\\kern-.325em\\raise.21em' + '{\\scriptstyle{A}}\\kern-.17em\\TeX',
],
not: base_BaseMethods.Not,
dots: base_BaseMethods.Dots,
space: base_BaseMethods.Tilde,
'\u00A0': base_BaseMethods.Tilde,
' ': base_BaseMethods.Tilde,
begin: base_BaseMethods.BeginEnd,
end: base_BaseMethods.BeginEnd,
label: base_BaseMethods.HandleLabel,
ref: base_BaseMethods.HandleRef,
nonumber: base_BaseMethods.HandleNoTag,
newcolumntype: base_BaseMethods.NewColumnType,
mathchoice: base_BaseMethods.MathChoice,
mmlToken: base_BaseMethods.MmlToken,
});
new EnvironmentMap('environment', tex_ParseMethods.environment, {
displaymath: [base_BaseMethods.Equation, null, false],
math: [base_BaseMethods.Equation, null, false, false],
array: [base_BaseMethods.AlignedArray],
darray: [base_BaseMethods.AlignedArray, null, 'D'],
equation: [base_BaseMethods.Equation, null, true],
eqnarray: [
base_BaseMethods.EqnArray,
null,
true,
true,
'rcl',
'bmt',
ParseUtil.cols(0, MATHSPACE.thickmathspace),
'.5em',
],
indentalign: [base_BaseMethods.IndentAlign],
});
new CharacterMap('not_remap', null, {
'\u2190': '\u219A',
'\u2192': '\u219B',
'\u2194': '\u21AE',
'\u21D0': '\u21CD',
'\u21D2': '\u21CF',
'\u21D4': '\u21CE',
'\u2208': '\u2209',
'\u220B': '\u220C',
'\u2223': '\u2224',
'\u2225': '\u2226',
'\u223C': '\u2241',
'\u007E': '\u2241',
'\u2243': '\u2244',
'\u2245': '\u2247',
'\u2248': '\u2249',
'\u224D': '\u226D',
'\u003D': '\u2260',
'\u2261': '\u2262',
'\u003C': '\u226E',
'\u003E': '\u226F',
'\u2264': '\u2270',
'\u2265': '\u2271',
'\u2272': '\u2274',
'\u2273': '\u2275',
'\u2276': '\u2278',
'\u2277': '\u2279',
'\u227A': '\u2280',
'\u227B': '\u2281',
'\u2282': '\u2284',
'\u2283': '\u2285',
'\u2286': '\u2288',
'\u2287': '\u2289',
'\u22A2': '\u22AC',
'\u22A8': '\u22AD',
'\u22A9': '\u22AE',
'\u22AB': '\u22AF',
'\u227C': '\u22E0',
'\u227D': '\u22E1',
'\u2291': '\u22E2',
'\u2292': '\u22E3',
'\u22B2': '\u22EA',
'\u22B3': '\u22EB',
'\u22B4': '\u22EC',
'\u22B5': '\u22ED',
'\u2203': '\u2204',
});
//# sourceMappingURL=BaseMappings.js.map
;// ./components/mjs/core/lib/core/MmlTree/OperatorDictionary.js
const OperatorDictionary_def = MathJax._.core.MmlTree.OperatorDictionary;
const OPDEF = OperatorDictionary_def.OPDEF;
const MO = OperatorDictionary_def.MO;
const RANGES = OperatorDictionary_def.RANGES;
const getRange = OperatorDictionary_def.getRange;
const MMLSPACING = OperatorDictionary_def.MMLSPACING;
const OPTABLE = OperatorDictionary_def.OPTABLE;
;// ./components/mjs/core/lib/util/context.js
const context_def = MathJax._.util.context;
const hasWindow = context_def.hasWindow;
const context = context_def.context;
;// ./mjs/input/tex/base/BaseConfiguration.js
const BaseConfiguration_MATHVARIANT = TexConstant.Variant;
new CharacterMap('remap', null, {
'-': '\u2212',
'*': '\u2217',
'`': '\u2018',
});
function Other(parser, char) {
const font = parser.stack.env['font'];
const ifont = parser.stack.env['italicFont'];
const def = font ? { mathvariant: font } : {};
const remap = MapHandler.getMap('remap').lookup(char);
const range = getRange(char);
const type = range[3];
const mo = parser.create('token', type, def, remap ? remap.char : char);
const style = ParseUtil.isLatinOrGreekChar(char)
? parser.configuration.mathStyle(char, true) || ifont
: '';
const variant = range[4] || (font && style === BaseConfiguration_MATHVARIANT.NORMAL ? '' : style);
if (variant) {
mo.attributes.set('mathvariant', variant);
}
if (type === 'mo') {
tex_NodeUtil.setProperty(mo, 'fixStretchy', true);
parser.configuration.addNode('fixStretchy', mo);
}
parser.Push(mo);
}
function csUndefined(_parser, name) {
throw new tex_TexError('UndefinedControlSequence', 'Undefined control sequence %1', '\\' + name);
}
function envUndefined(_parser, env) {
throw new tex_TexError('UnknownEnv', "Unknown environment '%1'", env);
}
function filterNonscript({ data }) {
for (const mml of data.getList('nonscript')) {
if (mml.attributes.get('scriptlevel') > 0) {
const parent = mml.parent;
parent.childNodes.splice(parent.childIndex(mml), 1);
data.removeFromList(mml.kind, [mml]);
if (mml.isKind('mrow')) {
const mstyle = mml.childNodes[0];
data.removeFromList('mstyle', [mstyle]);
data.removeFromList('mspace', mstyle.childNodes[0].childNodes);
}
}
else if (mml.isKind('mrow')) {
mml.parent.replaceChild(mml.childNodes[0], mml);
data.removeFromList('mrow', [mml]);
}
}
}
class BaseTags extends AbstractTags {
}
const BaseConfiguration = Configuration.create('base', {
[ConfigurationType.CONFIG]: function (config, jax) {
const options = jax.parseOptions.options;
if (options.digits) {
options.numberPattern = options.digits;
}
new RegExpMap('digit', tex_ParseMethods.digit, options.initialDigit);
new RegExpMap('letter', tex_ParseMethods.variable, options.initialLetter);
const handler = config.handlers.get(HandlerType.CHARACTER);
handler.add(['letter', 'digit'], null, 4);
},
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['command', 'special'],
[HandlerType.DELIMITER]: ['delimiter'],
[HandlerType.MACRO]: [
'delimiter',
'macros',
'lcGreek',
'ucGreek',
'mathchar0mi',
'mathchar0mo',
'mathchar7',
],
[HandlerType.ENVIRONMENT]: ['environment'],
},
[ConfigurationType.FALLBACK]: {
[HandlerType.CHARACTER]: Other,
[HandlerType.MACRO]: csUndefined,
[HandlerType.ENVIRONMENT]: envUndefined,
},
[ConfigurationType.ITEMS]: {
[StartItem.prototype.kind]: StartItem,
[StopItem.prototype.kind]: StopItem,
[OpenItem.prototype.kind]: OpenItem,
[CloseItem.prototype.kind]: CloseItem,
[NullItem.prototype.kind]: NullItem,
[PrimeItem.prototype.kind]: PrimeItem,
[SubsupItem.prototype.kind]: SubsupItem,
[OverItem.prototype.kind]: OverItem,
[LeftItem.prototype.kind]: LeftItem,
[Middle.prototype.kind]: Middle,
[RightItem.prototype.kind]: RightItem,
[BreakItem.prototype.kind]: BreakItem,
[BeginItem.prototype.kind]: BeginItem,
[EndItem.prototype.kind]: EndItem,
[StyleItem.prototype.kind]: StyleItem,
[PositionItem.prototype.kind]: PositionItem,
[CellItem.prototype.kind]: CellItem,
[MmlItem.prototype.kind]: MmlItem,
[FnItem.prototype.kind]: FnItem,
[NotItem.prototype.kind]: NotItem,
[NonscriptItem.prototype.kind]: NonscriptItem,
[DotsItem.prototype.kind]: DotsItem,
[ArrayItem.prototype.kind]: ArrayItem,
[EqnArrayItem.prototype.kind]: EqnArrayItem,
[EquationItem.prototype.kind]: EquationItem,
[MstyleItem.prototype.kind]: MstyleItem,
},
[ConfigurationType.OPTIONS]: {
maxMacros: 1000,
digits: '',
numberPattern: /^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,
initialDigit: /[0-9.,]/,
identifierPattern: /^[a-zA-Z]+/,
initialLetter: /[a-zA-Z]/,
baseURL: !context.document ||
context.document.getElementsByTagName('base').length === 0
? ''
: String(context.document.location).replace(/#.*$/, ''),
},
[ConfigurationType.TAGS]: {
base: BaseTags,
},
[ConfigurationType.POSTPROCESSORS]: [[filterNonscript, -4]],
});
//# sourceMappingURL=BaseConfiguration.js.map
;// ./mjs/input/tex.js
class TeX extends AbstractInputJax {
static configure(packages) {
const configuration = new ParserConfiguration(packages, ['tex']);
configuration.init();
return configuration;
}
static tags(options, configuration) {
TagsFactory.addTags(configuration.tags);
TagsFactory.setDefault(options.options.tags);
options.tags = TagsFactory.getDefault();
options.tags.configuration = options;
}
constructor(options = {}) {
const [rest, tex, find] = separateOptions(options, TeX.OPTIONS, FindTeX.OPTIONS);
super(tex);
this.findTeX = this.options['FindTeX'] || new FindTeX(find);
const packages = this.options.packages;
const configuration = (this.configuration = TeX.configure(packages));
const parseOptions = (this._parseOptions = new tex_ParseOptions(configuration, [
this.options,
TagsFactory.OPTIONS,
]));
userOptions(parseOptions.options, rest);
configuration.config(this);
TeX.tags(parseOptions, configuration);
this.postFilters.addList([
[tex_FilterUtil.cleanSubSup, -7],
[tex_FilterUtil.setInherited, -6],
[tex_FilterUtil.checkScriptlevel, -5],
[tex_FilterUtil.moveLimits, -4],
[tex_FilterUtil.cleanStretchy, -3],
[tex_FilterUtil.cleanAttributes, -2],
[tex_FilterUtil.combineRelations, -1],
]);
}
setMmlFactory(mmlFactory) {
super.setMmlFactory(mmlFactory);
this._parseOptions.nodeFactory.setMmlFactory(mmlFactory);
}
get parseOptions() {
return this._parseOptions;
}
reset(tag = 0) {
this.parseOptions.tags.reset(tag);
}
compile(math, document) {
this.parseOptions.clear();
this.parseOptions.mathItem = math;
this.executeFilters(this.preFilters, math, document, this.parseOptions);
this.latex = math.math;
let node;
this.parseOptions.tags.startEquation(math);
let parser;
try {
parser = new TexParser(this.latex, { display: math.display, isInner: false }, this.parseOptions);
node = parser.mml();
}
catch (err) {
if (!(err instanceof tex_TexError)) {
throw err;
}
this.parseOptions.error = true;
node = this.options.formatError(this, err);
}
node = this.parseOptions.nodeFactory.create('node', 'math', [node]);
node.attributes.set(TexConstant.Attr.LATEX, this.latex);
if (math.display) {
tex_NodeUtil.setAttribute(node, 'display', 'block');
}
this.parseOptions.tags.finishEquation(math);
this.parseOptions.root = node;
this.executeFilters(this.postFilters, math, document, this.parseOptions);
if (parser && parser.stack.env.hsize) {
tex_NodeUtil.setAttribute(node, 'maxwidth', parser.stack.env.hsize);
tex_NodeUtil.setAttribute(node, 'overflow', 'linebreak');
}
this.mathNode = this.parseOptions.root;
return this.mathNode;
}
findMath(strings) {
return this.findTeX.findMath(strings);
}
formatError(err) {
const message = err.message.replace(/\n.*/, '');
return this.parseOptions.nodeFactory.create('error', message, err.id, this.latex);
}
}
TeX.NAME = 'TeX';
TeX.OPTIONS = Object.assign(Object.assign({}, AbstractInputJax.OPTIONS), { FindTeX: null, packages: ['base'], maxBuffer: 5 * 1024, maxTemplateSubtitutions: 10000, mathStyle: 'TeX', formatError: (jax, err) => jax.formatError(err) });
//# sourceMappingURL=tex.js.map
;// ./components/mjs/input/tex-base/lib/tex-base.js
if (MathJax.loader) {
MathJax.loader.checkVersion('input/tex-base', VERSION, 'input');
}
combineWithMathJax({_: {
input: {
tex_ts: tex_namespaceObject,
tex: {
ColumnParser: ColumnParser_namespaceObject,
Configuration: Configuration_namespaceObject,
FilterUtil: FilterUtil_namespaceObject,
FindTeX: FindTeX_namespaceObject,
HandlerTypes: HandlerTypes_namespaceObject,
MapHandler: MapHandler_namespaceObject,
NodeFactory: NodeFactory_namespaceObject,
NodeUtil: NodeUtil_namespaceObject,
ParseMethods: ParseMethods_namespaceObject,
ParseOptions: ParseOptions_namespaceObject,
ParseUtil: ParseUtil_namespaceObject,
Stack: Stack_namespaceObject,
StackItem: StackItem_namespaceObject,
StackItemFactory: StackItemFactory_namespaceObject,
Tags: Tags_namespaceObject,
TexConstants: TexConstants_namespaceObject,
TexError: TexError_namespaceObject,
TexParser: TexParser_namespaceObject,
Token: Token_namespaceObject,
TokenMap: TokenMap_namespaceObject,
UnitUtil: UnitUtil_namespaceObject,
base: {
BaseConfiguration: BaseConfiguration_namespaceObject,
BaseItems: BaseItems_namespaceObject,
BaseMethods: BaseMethods_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/register.js
function registerTeX(packageList = [], tex = true) {
if (MathJax.startup) {
if (tex) {
MathJax.startup.registerConstructor('tex', MathJax._.input.tex_ts.TeX);
MathJax.startup.useInput('tex');
}
if (!MathJax.config.tex) {
MathJax.config.tex = {};
}
let packages = MathJax.config.tex.packages;
MathJax.config.tex.packages = packageList;
if (packages) {
if (Array.isArray(packages)) {
packages = {'[+]': packages.filter((name) => !packageList.includes(name))};
}
insert(MathJax.config.tex, {packages});
}
}
}
;// ./components/mjs/input/tex-base/tex-base.js
registerTeX(['base']);
/******/ })()
; mathjaxr/inst/doc/mathjax/input/asciimath.js 0000644 0001762 0000144 00000662557 15112352615 020733 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 15:
/***/ (() => {
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*************************************************************
*
* MathJax/jax/element/mml/jax.js
*
* Implements the MML ElementJax that holds the internal represetation
* of the mathematics on the page. Various InputJax will produce this
* format, and the OutputJax will display it in various formats.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2017 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.ElementJax.mml = MathJax.ElementJax({
mimeType: "jax/mml"
},{
id: "mml",
version: "2.7.2",
directory: MathJax.ElementJax.directory + "/mml",
extensionDir: MathJax.ElementJax.extensionDir + "/mml",
optableDir: MathJax.ElementJax.directory + "/mml/optable"
});
MathJax.ElementJax.mml.Augment({
Init: function () {
if (arguments.length === 1 && arguments[0].type === "math") {this.root = arguments[0]}
else {this.root = MathJax.ElementJax.mml.math.apply(this,arguments)}
if (this.root.attr && this.root.attr.mode) {
if (!this.root.display && this.root.attr.mode === "display") {
this.root.display = "block";
this.root.attrNames.push("display");
}
delete this.root.attr.mode;
for (var i = 0, m = this.root.attrNames.length; i < m; i++) {
if (this.root.attrNames[i] === "mode") {this.root.attrNames.splice(i,1); break}
}
}
}
},{
// VS Q: These two do what?
INHERIT: "_inherit_",
AUTO: "_auto_",
SIZE: {
INFINITY: "infinity",
SMALL: "small",
NORMAL: "normal",
BIG: "big"
},
COLOR: {
TRANSPARENT: "transparent"
},
VARIANT: {
NORMAL: "normal",
BOLD: "bold",
ITALIC: "italic",
BOLDITALIC: "bold-italic",
DOUBLESTRUCK: "double-struck",
FRAKTUR: "fraktur",
BOLDFRAKTUR: "bold-fraktur",
SCRIPT: "script",
BOLDSCRIPT: "bold-script",
SANSSERIF: "sans-serif",
BOLDSANSSERIF: "bold-sans-serif",
SANSSERIFITALIC: "sans-serif-italic",
SANSSERIFBOLDITALIC: "sans-serif-bold-italic",
MONOSPACE: "monospace",
INITIAL: "inital",
TAILED: "tailed",
LOOPED: "looped",
STRETCHED: "stretched",
CALIGRAPHIC: "-tex-caligraphic",
OLDSTYLE: "-tex-oldstyle"
},
FORM: {
PREFIX: "prefix",
INFIX: "infix",
POSTFIX: "postfix"
},
LINEBREAK: {
AUTO: "auto",
NEWLINE: "newline",
NOBREAK: "nobreak",
GOODBREAK: "goodbreak",
BADBREAK: "badbreak"
},
LINEBREAKSTYLE: {
BEFORE: "before",
AFTER: "after",
DUPLICATE: "duplicate",
INFIXLINBREAKSTYLE: "infixlinebreakstyle"
},
INDENTALIGN: {
LEFT: "left",
CENTER: "center",
RIGHT: "right",
AUTO: "auto",
ID: "id",
INDENTALIGN: "indentalign"
},
INDENTSHIFT: {
INDENTSHIFT: "indentshift"
},
LINETHICKNESS: {
THIN: "thin",
MEDIUM: "medium",
THICK: "thick"
},
NOTATION: {
LONGDIV: "longdiv",
ACTUARIAL: "actuarial",
RADICAL: "radical",
BOX: "box",
ROUNDEDBOX: "roundedbox",
CIRCLE: "circle",
LEFT: "left",
RIGHT: "right",
TOP: "top",
BOTTOM: "bottom",
UPDIAGONALSTRIKE: "updiagonalstrike",
DOWNDIAGONALSTRIKE: "downdiagonalstrike",
UPDIAGONALARROW: "updiagonalarrow",
VERTICALSTRIKE: "verticalstrike",
HORIZONTALSTRIKE: "horizontalstrike",
PHASORANGLE: "phasorangle",
MADRUWB: "madruwb"
},
ALIGN: {
TOP: "top",
BOTTOM: "bottom",
CENTER: "center",
BASELINE: "baseline",
AXIS: "axis",
LEFT: "left",
RIGHT: "right"
},
LINES: {
NONE: "none",
SOLID: "solid",
DASHED: "dashed"
},
SIDE: {
LEFT: "left",
RIGHT: "right",
LEFTOVERLAP: "leftoverlap",
RIGHTOVERLAP: "rightoverlap"
},
WIDTH: {
AUTO: "auto",
FIT: "fit"
},
ACTIONTYPE: {
TOGGLE: "toggle",
STATUSLINE: "statusline",
TOOLTIP: "tooltip",
INPUT: "input"
},
LENGTH: {
VERYVERYTHINMATHSPACE: "veryverythinmathspace",
VERYTHINMATHSPACE: "verythinmathspace",
THINMATHSPACE: "thinmathspace",
MEDIUMMATHSPACE: "mediummathspace",
THICKMATHSPACE: "thickmathspace",
VERYTHICKMATHSPACE: "verythickmathspace",
VERYVERYTHICKMATHSPACE: "veryverythickmathspace",
NEGATIVEVERYVERYTHINMATHSPACE: "negativeveryverythinmathspace",
NEGATIVEVERYTHINMATHSPACE: "negativeverythinmathspace",
NEGATIVETHINMATHSPACE: "negativethinmathspace",
NEGATIVEMEDIUMMATHSPACE: "negativemediummathspace",
NEGATIVETHICKMATHSPACE: "negativethickmathspace",
NEGATIVEVERYTHICKMATHSPACE: "negativeverythickmathspace",
NEGATIVEVERYVERYTHICKMATHSPACE: "negativeveryverythickmathspace"
},
OVERFLOW: {
LINBREAK: "linebreak",
SCROLL: "scroll",
ELIDE: "elide",
TRUNCATE: "truncate",
SCALE: "scale"
},
UNIT: {
EM: "em",
EX: "ex",
PX: "px",
IN: "in",
CM: "cm",
MM: "mm",
PT: "pt",
PC: "pc"
},
TEXCLASS: {
ORD: 0,
OP: 1,
BIN: 2,
REL: 3,
OPEN: 4,
CLOSE: 5,
PUNCT: 6,
INNER: 7,
VCENTER: 8,
NONE: -1
},
TEXCLASSNAMES: ["ORD", "OP", "BIN", "REL", "OPEN", "CLOSE", "PUNCT", "INNER", "VCENTER"],
skipAttributes: {
texClass:true, useHeight:true, texprimestyle:true
},
copyAttributes: {
displaystyle:1, scriptlevel:1, open:1, close:1, form:1,
actiontype: 1,
fontfamily:true, fontsize:true, fontweight:true, fontstyle:true,
color:true, background:true,
id:true, "class":1, href:true, style:true
},
copyAttributeNames: [
"displaystyle", "scriptlevel", "open", "close", "form", // force these to be copied
"actiontype",
"fontfamily", "fontsize", "fontweight", "fontstyle",
"color", "background",
"id", "class", "href", "style"
],
nocopyAttributes: {
fontfamily: true, fontsize: true, fontweight: true, fontstyle: true,
color: true, background: true,
id: true, 'class': true, href: true, style: true,
xmlns: true
},
Error: function (message,def) {
var mml = this.merror(message),
dir = MathJax.Localization.fontDirection(),
font = MathJax.Localization.fontFamily();
if (def) {mml = mml.With(def)}
if (dir || font) {
mml = this.mstyle(mml);
if (dir) {mml.dir = dir}
if (font) {mml.style.fontFamily = "font-family: "+font}
}
return mml;
}
});
(function (MML) {
MML.mbase = MathJax.Object.Subclass({
type: "base", isToken: false,
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
dir: MML.INHERIT
},
noInherit: {},
noInheritAttribute: {
texClass: true
},
getRemoved: {},
linebreakContainer: false,
Init: function () {
this.data = [];
if (this.inferRow && !(arguments.length === 1 && arguments[0].inferred))
{this.Append(MML.mrow().With({inferred: true, notParent: true}))}
this.Append.apply(this,arguments);
},
With: function (def) {
for (var id in def) {if (def.hasOwnProperty(id)) {this[id] = def[id]}}
return this;
},
Append: function () {
if (this.inferRow && this.data.length) {
this.data[0].Append.apply(this.data[0],arguments);
} else {
for (var i = 0, m = arguments.length; i < m; i++)
{this.SetData(this.data.length,arguments[i])}
}
},
SetData: function (i,item) {
if (item != null) {
if (!(item instanceof MML.mbase))
{item = (this.isToken || this.isChars ? MML.chars(item) : MML.mtext(item))}
item.parent = this;
item.setInherit(this.inheritFromMe ? this : this.inherit);
}
this.data[i] = item;
},
Parent: function () {
var parent = this.parent;
while (parent && parent.notParent) {parent = parent.parent}
return parent;
},
Get: function (name,nodefault,noself) {
if (!noself) {
if (this[name] != null) {return this[name]}
if (this.attr && this.attr[name] != null) {return this.attr[name]}
}
// FIXME: should cache these values and get from cache
// (clear cache when appended to a new object?)
var parent = this.Parent();
if (parent && parent["adjustChild_"+name] != null) {
return (parent["adjustChild_"+name])(this.childPosition(),nodefault);
}
var obj = this.inherit; var root = obj;
while (obj) {
var value = obj[name]; if (value == null && obj.attr) {value = obj.attr[name]}
if (obj.removedStyles && obj.getRemoved[name] && value == null) value = obj.removedStyles[obj.getRemoved[name]];
if (value != null && obj.noInheritAttribute && !obj.noInheritAttribute[name]) {
var noInherit = obj.noInherit[this.type];
if (!(noInherit && noInherit[name])) {return value}
}
root = obj; obj = obj.inherit;
}
if (!nodefault) {
if (this.defaults[name] === MML.AUTO) {return this.autoDefault(name)}
if (this.defaults[name] !== MML.INHERIT && this.defaults[name] != null)
{return this.defaults[name]}
if (root) {return root.defaults[name]}
}
return null;
},
hasValue: function (name) {return (this.Get(name,true) != null)},
getValues: function () {
var values = {};
for (var i = 0, m = arguments.length; i < m; i++)
{values[arguments[i]] = this.Get(arguments[i])}
return values;
},
adjustChild_scriptlevel: function (i,nodef) {return this.Get("scriptlevel",nodef)}, // always inherit from parent
adjustChild_displaystyle: function (i,nodef) {return this.Get("displaystyle",nodef)}, // always inherit from parent
adjustChild_texprimestyle: function (i,nodef) {return this.Get("texprimestyle",nodef)}, // always inherit from parent
childPosition: function () {
var child = this, parent = child.parent;
while (parent.notParent) {child = parent; parent = child.parent}
for (var i = 0, m = parent.data.length; i < m; i++) {if (parent.data[i] === child) {return i}}
return null;
},
setInherit: function (obj) {
if (obj !== this.inherit && this.inherit == null) {
this.inherit = obj;
for (var i = 0, m = this.data.length; i < m; i++) {
if (this.data[i] && this.data[i].setInherit) {this.data[i].setInherit(obj)}
}
}
},
setTeXclass: function (prev) {
this.getPrevClass(prev);
return (typeof(this.texClass) !== "undefined" ? this : prev);
},
getPrevClass: function (prev) {
if (prev) {
this.prevClass = prev.Get("texClass");
this.prevLevel = prev.Get("scriptlevel");
}
},
updateTeXclass: function (core) {
if (core) {
this.prevClass = core.prevClass; delete core.prevClass;
this.prevLevel = core.prevLevel; delete core.prevLevel;
this.texClass = core.Get("texClass");
}
},
texSpacing: function () {
var prev = (this.prevClass != null ? this.prevClass : MML.TEXCLASS.NONE);
var tex = (this.Get("texClass") || MML.TEXCLASS.ORD);
if (prev === MML.TEXCLASS.NONE || tex === MML.TEXCLASS.NONE) {return ""}
if (prev === MML.TEXCLASS.VCENTER) {prev = MML.TEXCLASS.ORD}
if (tex === MML.TEXCLASS.VCENTER) {tex = MML.TEXCLASS.ORD}
var space = this.TEXSPACE[prev][tex];
if ((this.prevLevel > 0 || this.Get("scriptlevel") > 0) && space >= 0) {return ""}
return this.TEXSPACELENGTH[Math.abs(space)];
},
TEXSPACELENGTH:[
"",
MML.LENGTH.THINMATHSPACE,
MML.LENGTH.MEDIUMMATHSPACE,
MML.LENGTH.THICKMATHSPACE
],
// See TeXBook Chapter 18 (p. 170)
TEXSPACE: [
[ 0,-1, 2, 3, 0, 0, 0, 1], // ORD
[-1,-1, 0, 3, 0, 0, 0, 1], // OP
[ 2, 2, 0, 0, 2, 0, 0, 2], // BIN
[ 3, 3, 0, 0, 3, 0, 0, 3], // REL
[ 0, 0, 0, 0, 0, 0, 0, 0], // OPEN
[ 0,-1, 2, 3, 0, 0, 0, 1], // CLOSE
[ 1, 1, 0, 1, 1, 1, 1, 1], // PUNCT
[ 1,-1, 2, 3, 1, 0, 1, 1] // INNER
],
autoDefault: function (name) {return ""},
isSpacelike: function () {return false},
isEmbellished: function () {return false},
Core: function () {return this},
CoreMO: function () {return this},
childIndex: function(child) {
if (child == null) return;
for (var i = 0, m = this.data.length; i < m; i++) if (child === this.data[i]) return i;
},
CoreIndex: function () {
return (this.inferRow ? this.data[0]||this : this).childIndex(this.Core());
},
hasNewline: function () {
if (this.isEmbellished()) {return this.CoreMO().hasNewline()}
if (this.isToken || this.linebreakContainer) {return false}
for (var i = 0, m = this.data.length; i < m; i++) {
if (this.data[i] && this.data[i].hasNewline()) {return true}
}
return false;
},
array: function () {if (this.inferred) {return this.data} else {return [this]}},
toString: function () {return this.type+"("+this.data.join(",")+")"},
getAnnotation: function () {return null}
},{
childrenSpacelike: function () {
for (var i = 0, m = this.data.length; i < m; i++)
{if (!this.data[i].isSpacelike()) {return false}}
return true;
},
childEmbellished: function () {
return (this.data[0] && this.data[0].isEmbellished());
},
childCore: function () {return (this.inferRow && this.data[0] ? this.data[0].Core() : this.data[0])},
childCoreMO: function () {return (this.data[0] ? this.data[0].CoreMO() : null)},
setChildTeXclass: function (prev) {
if (this.data[0]) {
prev = this.data[0].setTeXclass(prev);
this.updateTeXclass(this.data[0]);
}
return prev;
},
setBaseTeXclasses: function (prev) {
this.getPrevClass(prev); this.texClass = null;
if (this.data[0]) {
if (this.isEmbellished() || this.data[0].isa(MML.mi)) {
prev = this.data[0].setTeXclass(prev);
this.updateTeXclass(this.Core());
} else {this.data[0].setTeXclass(); prev = this}
} else {prev = this}
for (var i = 1, m = this.data.length; i < m; i++)
{if (this.data[i]) {this.data[i].setTeXclass()}}
return prev;
},
setSeparateTeXclasses: function (prev) {
this.getPrevClass(prev);
for (var i = 0, m = this.data.length; i < m; i++)
{if (this.data[i]) {this.data[i].setTeXclass()}}
if (this.isEmbellished()) {this.updateTeXclass(this.Core())}
return this;
}
});
MML.mi = MML.mbase.Subclass({
type: "mi", isToken: true,
texClass: MML.TEXCLASS.ORD,
defaults: {
mathvariant: MML.AUTO,
mathsize: MML.INHERIT,
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
dir: MML.INHERIT
},
autoDefault: function (name) {
if (name === "mathvariant") {
var mi = (this.data[0]||"").toString();
return (mi.length === 1 ||
(mi.length === 2 && mi.charCodeAt(0) >= 0xD800 && mi.charCodeAt(0) < 0xDC00) ?
MML.VARIANT.ITALIC : MML.VARIANT.NORMAL);
}
return "";
},
setTeXclass: function (prev) {
this.getPrevClass(prev);
var name = this.data.join("");
if (name.length > 1 && name.match(/^[a-z][a-z0-9]*$/i) &&
this.texClass === MML.TEXCLASS.ORD) {
this.texClass = MML.TEXCLASS.OP;
this.autoOP = true;
}
return this;
}
});
MML.mn = MML.mbase.Subclass({
type: "mn", isToken: true,
texClass: MML.TEXCLASS.ORD,
defaults: {
mathvariant: MML.INHERIT,
mathsize: MML.INHERIT,
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
dir: MML.INHERIT
}
});
MML.mo = MML.mbase.Subclass({
type: "mo", isToken: true,
defaults: {
mathvariant: MML.INHERIT,
mathsize: MML.INHERIT,
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
dir: MML.INHERIT,
form: MML.AUTO,
fence: MML.AUTO,
separator: MML.AUTO,
lspace: MML.AUTO,
rspace: MML.AUTO,
stretchy: MML.AUTO,
symmetric: MML.AUTO,
maxsize: MML.AUTO,
minsize: MML.AUTO,
largeop: MML.AUTO,
movablelimits: MML.AUTO,
accent: MML.AUTO,
linebreak: MML.LINEBREAK.AUTO,
lineleading: MML.INHERIT,
linebreakstyle: MML.AUTO,
linebreakmultchar: MML.INHERIT,
indentalign: MML.INHERIT,
indentshift: MML.INHERIT,
indenttarget: MML.INHERIT,
indentalignfirst: MML.INHERIT,
indentshiftfirst: MML.INHERIT,
indentalignlast: MML.INHERIT,
indentshiftlast: MML.INHERIT,
texClass: MML.AUTO
},
defaultDef: {
form: MML.FORM.INFIX,
fence: false,
separator: false,
lspace: MML.LENGTH.THICKMATHSPACE,
rspace: MML.LENGTH.THICKMATHSPACE,
stretchy: false,
symmetric: false,
maxsize: MML.SIZE.INFINITY,
minsize: '0em', //'1em',
largeop: false,
movablelimits: false,
accent: false,
linebreak: MML.LINEBREAK.AUTO,
lineleading: "1ex",
linebreakstyle: "before",
indentalign: MML.INDENTALIGN.AUTO,
indentshift: "0",
indenttarget: "",
indentalignfirst: MML.INDENTALIGN.INDENTALIGN,
indentshiftfirst: MML.INDENTSHIFT.INDENTSHIFT,
indentalignlast: MML.INDENTALIGN.INDENTALIGN,
indentshiftlast: MML.INDENTSHIFT.INDENTSHIFT,
texClass: MML.TEXCLASS.REL // for MML, but TeX sets ORD explicitly
},
SPACE_ATTR: {lspace: 0x01, rspace: 0x02, form: 0x04},
useMMLspacing: 0x07,
autoDefault: function (name,nodefault) {
var def = this.def;
if (!def) {
if (name === "form") {this.useMMLspacing &= ~this.SPACE_ATTR.form; return this.getForm()}
var mo = this.data.join("");
var forms = [this.Get("form"),MML.FORM.INFIX,MML.FORM.POSTFIX,MML.FORM.PREFIX];
for (var i = 0, m = forms.length; i < m; i++) {
var data = this.OPTABLE[forms[i]][mo];
if (data) {def = this.makeDef(data); break}
}
if (!def) {def = this.CheckRange(mo)}
if (!def && nodefault) {def = {}} else {
if (!def) {def = MathJax.Hub.Insert({},this.defaultDef)}
if (this.parent) {this.def = def} else {def = MathJax.Hub.Insert({},def)}
def.form = forms[0];
}
}
this.useMMLspacing &= ~(this.SPACE_ATTR[name] || 0);
if (def[name] != null) {return def[name]}
else if (!nodefault) {return this.defaultDef[name]}
return "";
},
CheckRange: function (mo) {
var n = mo.charCodeAt(0);
if (n >= 0xD800 && n < 0xDC00) {n = (((n-0xD800)<<10)+(mo.charCodeAt(1)-0xDC00))+0x10000}
for (var i = 0, m = this.RANGES.length; i < m && this.RANGES[i][0] <= n; i++) {
if (n <= this.RANGES[i][1]) {
if (this.RANGES[i][3]) {
var file = MML.optableDir+"/"+this.RANGES[i][3]+".js";
this.RANGES[i][3] = null;
MathJax.Hub.RestartAfter(MathJax.Ajax.Require(file));
}
var data = MML.TEXCLASSNAMES[this.RANGES[i][2]];
data = this.OPTABLE.infix[mo] = MML.mo.OPTYPES[data === "BIN" ? "BIN3" : data];
return this.makeDef(data);
}
}
return null;
},
makeDef: function (data) {
if (data[2] == null) {data[2] = this.defaultDef.texClass}
if (!data[3]) {data[3] = {}}
var def = MathJax.Hub.Insert({},data[3]);
def.lspace = this.SPACE[data[0]]; def.rspace = this.SPACE[data[1]];
def.texClass = data[2];
if (def.texClass === MML.TEXCLASS.REL &&
(this.movablelimits || this.data.join("").match(/^[a-z]+$/i)))
{def.texClass = MML.TEXCLASS.OP} // mark named operators as OP
return def;
},
getForm: function () {
var core = this, parent = this.parent, Parent = this.Parent();
while (Parent && Parent.isEmbellished())
{core = parent; parent = Parent.parent; Parent = Parent.Parent()}
if (parent && parent.type === "mrow" && parent.NonSpaceLength() !== 1) {
if (parent.FirstNonSpace() === core) {return MML.FORM.PREFIX}
if (parent.LastNonSpace() === core) {return MML.FORM.POSTFIX}
}
return MML.FORM.INFIX;
},
isEmbellished: function () {return true},
hasNewline: function () {return (this.Get("linebreak") === MML.LINEBREAK.NEWLINE)},
CoreParent: function () {
var parent = this;
while (parent && parent.isEmbellished() &&
parent.CoreMO() === this && !parent.isa(MML.math)) {parent = parent.Parent()}
return parent;
},
CoreText: function (parent) {
if (!parent) {return ""}
if (parent.isEmbellished()) {return parent.CoreMO().data.join("")}
while ((((parent.isa(MML.mrow) || parent.isa(MML.TeXAtom) ||
parent.isa(MML.mstyle) || parent.isa(MML.mphantom)) &&
parent.data.length === 1) || parent.isa(MML.munderover)) &&
parent.data[0]) {parent = parent.data[0]}
if (!parent.isToken) {return ""} else {return parent.data.join("")}
},
remapChars: {
'*':"\u2217",
'"':"\u2033",
"\u00B0":"\u2218",
"\u00B2":"2",
"\u00B3":"3",
"\u00B4":"\u2032",
"\u00B9":"1"
},
remap: function (text,map) {
text = text.replace(/-/g,"\u2212");
if (map) {
text = text.replace(/'/g,"\u2032").replace(/`/g,"\u2035");
if (text.length === 1) {text = map[text]||text}
}
return text;
},
setTeXclass: function (prev) {
var values = this.getValues("form","lspace","rspace","fence"); // sets useMMLspacing
if (this.useMMLspacing) {this.texClass = MML.TEXCLASS.NONE; return this}
if (values.fence && !this.texClass) {
if (values.form === MML.FORM.PREFIX) {this.texClass = MML.TEXCLASS.OPEN}
if (values.form === MML.FORM.POSTFIX) {this.texClass = MML.TEXCLASS.CLOSE}
}
this.texClass = this.Get("texClass");
if (this.data.join("") === "\u2061") {
// force previous node to be texClass OP, and skip this node
if (prev) {prev.texClass = MML.TEXCLASS.OP; prev.fnOP = true}
this.texClass = this.prevClass = MML.TEXCLASS.NONE;
return prev;
}
return this.adjustTeXclass(prev);
},
adjustTeXclass: function (prev) {
if (this.texClass === MML.TEXCLASS.NONE) {return prev}
if (prev) {
if (prev.autoOP && (this.texClass === MML.TEXCLASS.BIN ||
this.texClass === MML.TEXCLASS.REL))
{prev.texClass = MML.TEXCLASS.ORD}
this.prevClass = prev.texClass || MML.TEXCLASS.ORD;
this.prevLevel = prev.Get("scriptlevel")
} else {this.prevClass = MML.TEXCLASS.NONE}
if (this.texClass === MML.TEXCLASS.BIN &&
(this.prevClass === MML.TEXCLASS.NONE ||
this.prevClass === MML.TEXCLASS.BIN ||
this.prevClass === MML.TEXCLASS.OP ||
this.prevClass === MML.TEXCLASS.REL ||
this.prevClass === MML.TEXCLASS.OPEN ||
this.prevClass === MML.TEXCLASS.PUNCT)) {
this.texClass = MML.TEXCLASS.ORD;
} else if (this.prevClass === MML.TEXCLASS.BIN &&
(this.texClass === MML.TEXCLASS.REL ||
this.texClass === MML.TEXCLASS.CLOSE ||
this.texClass === MML.TEXCLASS.PUNCT)) {
prev.texClass = this.prevClass = MML.TEXCLASS.ORD;
} else if (this.texClass === MML.TEXCLASS.BIN) {
//
// Check if node is the last one in its container since the rule
// above only takes effect if there is a node that follows.
//
var child = this, parent = this.parent;
while (parent && parent.parent && parent.isEmbellished() &&
(parent.data.length === 1 ||
(parent.type !== "mrow" && parent.Core() === child))) // handles msubsup and munderover
{child = parent; parent = parent.parent}
if (parent.data[parent.data.length-1] === child) this.texClass = MML.TEXCLASS.ORD;
}
return this;
}
});
MML.mtext = MML.mbase.Subclass({
type: "mtext", isToken: true,
isSpacelike: function () {return true},
texClass: MML.TEXCLASS.ORD,
defaults: {
mathvariant: MML.INHERIT,
mathsize: MML.INHERIT,
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
dir: MML.INHERIT
}
});
MML.mspace = MML.mbase.Subclass({
type: "mspace", isToken: true,
isSpacelike: function () {return true},
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
width: "0em",
height: "0ex",
depth: "0ex",
linebreak: MML.LINEBREAK.AUTO
},
hasDimAttr: function () {
return (this.hasValue("width") || this.hasValue("height") ||
this.hasValue("depth"));
},
hasNewline: function () {
// The MathML spec says that the linebreak attribute should be ignored
// if any dimensional attribute is set.
return (!this.hasDimAttr() &&
this.Get("linebreak") === MML.LINEBREAK.NEWLINE);
}
});
MML.ms = MML.mbase.Subclass({
type: "ms", isToken: true,
texClass: MML.TEXCLASS.ORD,
defaults: {
mathvariant: MML.INHERIT,
mathsize: MML.INHERIT,
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
dir: MML.INHERIT,
lquote: '"',
rquote: '"'
}
});
MML.mglyph = MML.mbase.Subclass({
type: "mglyph", isToken: true,
texClass: MML.TEXCLASS.ORD,
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
alt: "",
src: "",
width: MML.AUTO,
height: MML.AUTO,
valign: "0em"
}
});
MML.mrow = MML.mbase.Subclass({
type: "mrow",
isSpacelike: MML.mbase.childrenSpacelike,
inferred: false, notParent: false,
isEmbellished: function () {
var isEmbellished = false;
for (var i = 0, m = this.data.length; i < m; i++) {
if (this.data[i] == null) continue;
if (this.data[i].isEmbellished()) {
if (isEmbellished) {return false}
isEmbellished = true; this.core = i;
} else if (!this.data[i].isSpacelike()) {return false}
}
return isEmbellished;
},
NonSpaceLength: function () {
var n = 0;
for (var i = 0, m = this.data.length; i < m; i++)
{if (this.data[i] && !this.data[i].isSpacelike()) {n++}}
return n;
},
FirstNonSpace: function () {
for (var i = 0, m = this.data.length; i < m; i++)
{if (this.data[i] && !this.data[i].isSpacelike()) {return this.data[i]}}
return null;
},
LastNonSpace: function () {
for (var i = this.data.length-1; i >= 0; i--)
{if (this.data[0] && !this.data[i].isSpacelike()) {return this.data[i]}}
return null;
},
Core: function () {
if (!(this.isEmbellished()) || typeof(this.core) === "undefined") {return this}
return this.data[this.core];
},
CoreMO: function () {
if (!(this.isEmbellished()) || typeof(this.core) === "undefined") {return this}
return this.data[this.core].CoreMO();
},
toString: function () {
if (this.inferred) {return '[' + this.data.join(',') + ']'}
return this.SUPER(arguments).toString.call(this);
},
setTeXclass: function (prev) {
var i, m = this.data.length;
if ((this.open || this.close) && (!prev || !prev.fnOP)) {
//
// came from \left...\right
// so treat as subexpression (tex class INNER)
//
this.getPrevClass(prev); prev = null;
for (i = 0; i < m; i++)
{if (this.data[i]) {prev = this.data[i].setTeXclass(prev)}}
if (!this.hasOwnProperty("texClass")) this.texClass = MML.TEXCLASS.INNER;
return this;
} else {
//
// Normal , so treat as
// thorugh mrow is not there
//
for (i = 0; i < m; i++)
{if (this.data[i]) {prev = this.data[i].setTeXclass(prev)}}
if (this.data[0]) {this.updateTeXclass(this.data[0])}
return prev;
}
},
getAnnotation: function (name) {
if (this.data.length != 1) return null;
return this.data[0].getAnnotation(name);
}
});
MML.mfrac = MML.mbase.Subclass({
type: "mfrac", num: 0, den: 1,
linebreakContainer: true,
isEmbellished: MML.mbase.childEmbellished,
Core: MML.mbase.childCore,
CoreMO: MML.mbase.childCoreMO,
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
linethickness: MML.LINETHICKNESS.MEDIUM,
numalign: MML.ALIGN.CENTER,
denomalign: MML.ALIGN.CENTER,
bevelled: false
},
adjustChild_displaystyle: function (n) {return false},
adjustChild_scriptlevel: function (n) {
var level = this.Get("scriptlevel");
if (!this.Get("displaystyle") || level > 0) {level++}
return level;
},
adjustChild_texprimestyle: function (n) {
if (n == this.den) {return true}
return this.Get("texprimestyle");
},
setTeXclass: MML.mbase.setSeparateTeXclasses
});
MML.msqrt = MML.mbase.Subclass({
type: "msqrt",
inferRow: true,
linebreakContainer: true,
texClass: MML.TEXCLASS.ORD,
setTeXclass: MML.mbase.setSeparateTeXclasses,
adjustChild_texprimestyle: function (n) {return true}
});
MML.mroot = MML.mbase.Subclass({
type: "mroot",
linebreakContainer: true,
texClass: MML.TEXCLASS.ORD,
adjustChild_displaystyle: function (n) {
if (n === 1) {return false}
return this.Get("displaystyle");
},
adjustChild_scriptlevel: function (n) {
var level = this.Get("scriptlevel");
if (n === 1) {level += 2}
return level;
},
adjustChild_texprimestyle: function (n) {
if (n === 0) {return true};
return this.Get("texprimestyle");
},
setTeXclass: MML.mbase.setSeparateTeXclasses
});
MML.mstyle = MML.mbase.Subclass({
type: "mstyle",
isSpacelike: MML.mbase.childrenSpacelike,
isEmbellished: MML.mbase.childEmbellished,
Core: MML.mbase.childCore,
CoreMO: MML.mbase.childCoreMO,
inferRow: true,
defaults: {
scriptlevel: MML.INHERIT,
displaystyle: MML.INHERIT,
scriptsizemultiplier: Math.sqrt(1/2),
scriptminsize: "8pt",
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
dir: MML.INHERIT,
infixlinebreakstyle: MML.LINEBREAKSTYLE.BEFORE,
decimalseparator: "."
},
adjustChild_scriptlevel: function (n) {
var level = this.scriptlevel;
if (level == null) {
level = this.Get("scriptlevel");
} else if (String(level).match(/^ *[-+]/)) {
var LEVEL = this.Get("scriptlevel",null,true);
level = LEVEL + parseInt(level);
}
return level;
},
inheritFromMe: true,
noInherit: {
mpadded: {width: true, height: true, depth: true, lspace: true, voffset: true},
mtable: {width: true, height: true, depth: true, align: true}
},
getRemoved: {fontfamily:"fontFamily", fontweight:"fontWeight", fontstyle:"fontStyle", fontsize:"fontSize"},
setTeXclass: MML.mbase.setChildTeXclass
});
MML.merror = MML.mbase.Subclass({
type: "merror",
inferRow: true,
linebreakContainer: true,
texClass: MML.TEXCLASS.ORD
});
MML.mpadded = MML.mbase.Subclass({
type: "mpadded",
inferRow: true,
isSpacelike: MML.mbase.childrenSpacelike,
isEmbellished: MML.mbase.childEmbellished,
Core: MML.mbase.childCore,
CoreMO: MML.mbase.childCoreMO,
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
width: "",
height: "",
depth: "",
lspace: 0,
voffset: 0
},
setTeXclass: MML.mbase.setChildTeXclass
});
MML.mphantom = MML.mbase.Subclass({
type: "mphantom",
texClass: MML.TEXCLASS.ORD,
inferRow: true,
isSpacelike: MML.mbase.childrenSpacelike,
isEmbellished: MML.mbase.childEmbellished,
Core: MML.mbase.childCore,
CoreMO: MML.mbase.childCoreMO,
setTeXclass: MML.mbase.setChildTeXclass
});
MML.mfenced = MML.mbase.Subclass({
type: "mfenced",
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
open: '(',
close: ')',
separators: ','
},
addFakeNodes: function () {
var values = this.getValues("open","close","separators");
values.open = values.open.replace(/[ \t\n\r]/g,"");
values.close = values.close.replace(/[ \t\n\r]/g,"");
values.separators = values.separators.replace(/[ \t\n\r]/g,"");
//
// Create a fake node for the open item
//
if (values.open !== "") {
this.SetData("open",MML.mo(values.open).With({
fence:true, form:MML.FORM.PREFIX, texClass:MML.TEXCLASS.OPEN
}));
//
// Clear flag for using MML spacing even though form is specified
//
this.data.open.useMMLspacing = 0;
}
//
// Create fake nodes for the separators
//
if (values.separators !== "") {
while (values.separators.length < this.data.length)
{values.separators += values.separators.charAt(values.separators.length-1)}
for (var i = 1, m = this.data.length; i < m; i++) {
if (this.data[i]) {
this.SetData("sep"+i,MML.mo(values.separators.charAt(i-1)).With({separator:true}))
this.data["sep"+i].useMMLspacing = 0;
}
}
}
//
// Create fake node for the close item
//
if (values.close !== "") {
this.SetData("close",MML.mo(values.close).With({
fence:true, form:MML.FORM.POSTFIX, texClass:MML.TEXCLASS.CLOSE
}));
//
// Clear flag for using MML spacing even though form is specified
//
this.data.close.useMMLspacing = 0;
}
},
texClass: MML.TEXCLASS.OPEN,
setTeXclass: function (prev) {
this.addFakeNodes();
this.getPrevClass(prev);
if (this.data.open) {prev = this.data.open.setTeXclass(prev)}
if (this.data[0]) {prev = this.data[0].setTeXclass(prev)}
for (var i = 1, m = this.data.length; i < m; i++) {
if (this.data["sep"+i]) {prev = this.data["sep"+i].setTeXclass(prev)}
if (this.data[i]) {prev = this.data[i].setTeXclass(prev)}
}
if (this.data.close) {prev = this.data.close.setTeXclass(prev)}
this.updateTeXclass(this.data.open);
this.texClass = MML.TEXCLASS.INNER;
return prev;
}
});
MML.menclose = MML.mbase.Subclass({
type: "menclose",
inferRow: true,
linebreakContainer: true,
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
notation: MML.NOTATION.LONGDIV,
texClass: MML.TEXCLASS.ORD
},
setTeXclass: MML.mbase.setSeparateTeXclasses
});
MML.msubsup = MML.mbase.Subclass({
type: "msubsup", base: 0, sub: 1, sup: 2,
isEmbellished: MML.mbase.childEmbellished,
Core: MML.mbase.childCore,
CoreMO: MML.mbase.childCoreMO,
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
subscriptshift: "",
superscriptshift: "",
texClass: MML.AUTO
},
autoDefault: function (name) {
if (name === "texClass")
{return (this.isEmbellished() ? this.CoreMO().Get(name) : MML.TEXCLASS.ORD)}
return 0;
},
adjustChild_displaystyle: function (n) {
if (n > 0) {return false}
return this.Get("displaystyle");
},
adjustChild_scriptlevel: function (n) {
var level = this.Get("scriptlevel");
if (n > 0) {level++}
return level;
},
adjustChild_texprimestyle: function (n) {
if (n === this.sub) {return true}
return this.Get("texprimestyle");
},
setTeXclass: MML.mbase.setBaseTeXclasses
});
MML.msub = MML.msubsup.Subclass({type: "msub"});
MML.msup = MML.msubsup.Subclass({type: "msup", sub:2, sup:1});
MML.mmultiscripts = MML.msubsup.Subclass({
type: "mmultiscripts",
adjustChild_texprimestyle: function (n) {
if (n % 2 === 1) {return true}
return this.Get("texprimestyle");
}
});
MML.mprescripts = MML.mbase.Subclass({type: "mprescripts"});
MML.none = MML.mbase.Subclass({type: "none"});
MML.munderover = MML.mbase.Subclass({
type: "munderover",
base: 0, under: 1, over: 2, sub: 1, sup: 2,
ACCENTS: ["", "accentunder", "accent"],
linebreakContainer: true,
isEmbellished: MML.mbase.childEmbellished,
Core: MML.mbase.childCore,
CoreMO: MML.mbase.childCoreMO,
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
accent: MML.AUTO,
accentunder: MML.AUTO,
align: MML.ALIGN.CENTER,
texClass: MML.AUTO,
subscriptshift: "", // when converted to msubsup by moveablelimits
superscriptshift: "" // when converted to msubsup by moveablelimits
},
autoDefault: function (name) {
if (name === "texClass")
{return (this.isEmbellished() ? this.CoreMO().Get(name) : MML.TEXCLASS.ORD)}
if (name === "accent" && this.data[this.over]) {return this.data[this.over].CoreMO().Get("accent")}
if (name === "accentunder" && this.data[this.under]) {return this.data[this.under].CoreMO().Get("accent")}
return false;
},
adjustChild_displaystyle: function (n) {
if (n > 0) {return false}
return this.Get("displaystyle");
},
adjustChild_scriptlevel: function (n) {
var level = this.Get("scriptlevel");
var force = (this.data[this.base] && !this.Get("displaystyle") &&
this.data[this.base].CoreMO().Get("movablelimits"));
if (n == this.under && (force || !this.Get("accentunder"))) {level++}
if (n == this.over && (force || !this.Get("accent"))) {level++}
return level;
},
adjustChild_texprimestyle: function (n) {
if (n === this.base && this.data[this.over]) {return true}
return this.Get("texprimestyle");
},
setTeXclass: MML.mbase.setBaseTeXclasses
});
MML.munder = MML.munderover.Subclass({type: "munder"});
MML.mover = MML.munderover.Subclass({
type: "mover", over: 1, under: 2, sup: 1, sub: 2,
ACCENTS: ["", "accent", "accentunder"]
});
MML.mtable = MML.mbase.Subclass({
type: "mtable",
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
align: MML.ALIGN.AXIS,
rowalign: MML.ALIGN.BASELINE,
columnalign: MML.ALIGN.CENTER,
groupalign: "{left}",
alignmentscope: true,
columnwidth: MML.WIDTH.AUTO,
width: MML.WIDTH.AUTO,
rowspacing: "1ex",
columnspacing: ".8em",
rowlines: MML.LINES.NONE,
columnlines: MML.LINES.NONE,
frame: MML.LINES.NONE,
framespacing: "0.4em 0.5ex",
equalrows: false,
equalcolumns: false,
displaystyle: false,
side: MML.SIDE.RIGHT,
minlabelspacing: "0.8em",
texClass: MML.TEXCLASS.ORD,
useHeight: 1
},
adjustChild_displaystyle: function () {
return (this.displaystyle != null ? this.displaystyle : this.defaults.displaystyle);
},
inheritFromMe: true,
noInherit: {
mover: {align: true},
munder: {align: true},
munderover: {align: true},
mtable: {
align: true, rowalign: true, columnalign: true, groupalign: true,
alignmentscope: true, columnwidth: true, width: true, rowspacing: true,
columnspacing: true, rowlines: true, columnlines: true, frame: true,
framespacing: true, equalrows: true, equalcolumns: true, displaystyle: true,
side: true, minlabelspacing: true, texClass: true, useHeight: 1
}
},
linebreakContainer: true,
Append: function () {
for (var i = 0, m = arguments.length; i < m; i++) {
if (!((arguments[i] instanceof MML.mtr) ||
(arguments[i] instanceof MML.mlabeledtr))) {arguments[i] = MML.mtr(arguments[i])}
}
this.SUPER(arguments).Append.apply(this,arguments);
},
setTeXclass: MML.mbase.setSeparateTeXclasses
});
MML.mtr = MML.mbase.Subclass({
type: "mtr",
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
rowalign: MML.INHERIT,
columnalign: MML.INHERIT,
groupalign: MML.INHERIT
},
inheritFromMe: true,
noInherit: {
mrow: {rowalign: true, columnalign: true, groupalign: true},
mtable: {rowalign: true, columnalign: true, groupalign: true}
},
linebreakContainer: true,
Append: function () {
for (var i = 0, m = arguments.length; i < m; i++) {
if (!(arguments[i] instanceof MML.mtd)) {arguments[i] = MML.mtd(arguments[i])}
}
this.SUPER(arguments).Append.apply(this,arguments);
},
setTeXclass: MML.mbase.setSeparateTeXclasses
});
MML.mtd = MML.mbase.Subclass({
type: "mtd",
inferRow: true,
linebreakContainer: true,
isEmbellished: MML.mbase.childEmbellished,
Core: MML.mbase.childCore,
CoreMO: MML.mbase.childCoreMO,
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
rowspan: 1,
columnspan: 1,
rowalign: MML.INHERIT,
columnalign: MML.INHERIT,
groupalign: MML.INHERIT
},
setTeXclass: MML.mbase.setSeparateTeXclasses
});
MML.maligngroup = MML.mbase.Subclass({
type: "maligngroup",
isSpacelike: function () {return true},
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
groupalign: MML.INHERIT
},
inheritFromMe: true,
noInherit: {
mrow: {groupalign: true},
mtable: {groupalign: true}
}
});
MML.malignmark = MML.mbase.Subclass({
type: "malignmark",
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
edge: MML.SIDE.LEFT
},
isSpacelike: function () {return true}
});
MML.mlabeledtr = MML.mtr.Subclass({
type: "mlabeledtr"
});
MML.maction = MML.mbase.Subclass({
type: "maction",
defaults: {
mathbackground: MML.INHERIT,
mathcolor: MML.INHERIT,
actiontype: MML.ACTIONTYPE.TOGGLE,
selection: 1
},
selected: function () {return this.data[this.Get("selection")-1] || MML.NULL},
isEmbellished: function () {return this.selected().isEmbellished()},
isSpacelike: function () {return this.selected().isSpacelike()},
Core: function () {return this.selected().Core()},
CoreMO: function () {return this.selected().CoreMO()},
setTeXclass: function (prev) {
if (this.Get("actiontype") === MML.ACTIONTYPE.TOOLTIP && this.data[1]) {
// Make sure tooltip has proper spacing when typeset (see issue #412)
this.data[1].setTeXclass();
}
var selected = this.selected();
prev = selected.setTeXclass(prev);
this.updateTeXclass(selected);
return prev;
}
});
MML.semantics = MML.mbase.Subclass({
type: "semantics", notParent: true,
isEmbellished: MML.mbase.childEmbellished,
Core: MML.mbase.childCore,
CoreMO: MML.mbase.childCoreMO,
defaults: {
definitionURL: null,
encoding: null
},
setTeXclass: MML.mbase.setChildTeXclass,
getAnnotation: function (name) {
var encodingList = MathJax.Hub.config.MathMenu.semanticsAnnotations[name];
if (encodingList) {
for (var i = 0, m = this.data.length; i < m; i++) {
var encoding = this.data[i].Get("encoding");
if (encoding) {
for (var j = 0, n = encodingList.length; j < n; j++) {
if (encodingList[j] === encoding) return this.data[i];
}
}
}
}
return null;
}
});
MML.annotation = MML.mbase.Subclass({
type: "annotation", isChars: true,
linebreakContainer: true,
defaults: {
definitionURL: null,
encoding: null,
cd: "mathmlkeys",
name: "",
src: null
}
});
MML["annotation-xml"] = MML.mbase.Subclass({
type: "annotation-xml",
linebreakContainer: true,
defaults: {
definitionURL: null,
encoding: null,
cd: "mathmlkeys",
name: "",
src: null
}
});
MML.math = MML.mstyle.Subclass({
type: "math",
defaults: {
mathvariant: MML.VARIANT.NORMAL,
mathsize: MML.SIZE.NORMAL,
mathcolor: "", // should be "black", but allow it to inherit from surrounding text
mathbackground: MML.COLOR.TRANSPARENT,
dir: "ltr",
scriptlevel: 0,
displaystyle: MML.AUTO,
display: "inline",
maxwidth: "",
overflow: MML.OVERFLOW.LINEBREAK,
altimg: "",
'altimg-width': "",
'altimg-height': "",
'altimg-valign': "",
alttext: "",
cdgroup: "",
scriptsizemultiplier: Math.sqrt(1/2),
scriptminsize: "8px", // should be 8pt, but that's too big
infixlinebreakstyle: MML.LINEBREAKSTYLE.BEFORE,
lineleading: "1ex",
indentshift: "auto", // use user configuration
indentalign: MML.INDENTALIGN.AUTO,
indentalignfirst: MML.INDENTALIGN.INDENTALIGN,
indentshiftfirst: MML.INDENTSHIFT.INDENTSHIFT,
indentalignlast: MML.INDENTALIGN.INDENTALIGN,
indentshiftlast: MML.INDENTSHIFT.INDENTSHIFT,
decimalseparator: ".",
texprimestyle: false // is it in TeX's C' style?
},
autoDefault: function (name) {
if (name === "displaystyle") {return this.Get("display") === "block"}
return "";
},
linebreakContainer: true,
setTeXclass: MML.mbase.setChildTeXclass,
getAnnotation: function (name) {
if (this.data.length != 1) return null;
return this.data[0].getAnnotation(name);
}
});
MML.chars = MML.mbase.Subclass({
type: "chars",
Append: function () {this.data.push.apply(this.data,arguments)},
value: function () {return this.data.join("")},
toString: function () {return this.data.join("")}
});
MML.entity = MML.mbase.Subclass({
type: "entity",
Append: function () {this.data.push.apply(this.data,arguments)},
value: function () {
if (this.data[0].substr(0,2) === "#x") {return parseInt(this.data[0].substr(2),16)}
else if (this.data[0].substr(0,1) === "#") {return parseInt(this.data[0].substr(1))}
else {return 0} // FIXME: look up named entities from table
},
toString: function () {
var n = this.value();
if (n <= 0xFFFF) {return String.fromCharCode(n)}
n -= 0x10000;
return String.fromCharCode((n>>10)+0xD800, (n&0x3FF)+0xDC00);
}
});
MML.xml = MML.mbase.Subclass({
type: "xml",
Init: function () {
this.div = document.createElement("div");
return this.SUPER(arguments).Init.apply(this,arguments);
},
Append: function () {
for (var i = 0, m = arguments.length; i < m; i++) {
var node = this.Import(arguments[i]);
this.data.push(node);
this.div.appendChild(node);
}
},
Import: function (node) {
if (document.importNode) {return document.importNode(node,true)}
//
// IE < 9 doesn't have importNode, so fake it.
//
var nNode, i, m;
if (node.nodeType === 1) { // ELEMENT_NODE
nNode = document.createElement(node.nodeName);
for (i = 0, m = node.attributes.length; i < m; i++) {
var attribute = node.attributes[i];
if (attribute.specified && attribute.nodeValue != null && attribute.nodeValue != '')
{nNode.setAttribute(attribute.nodeName,attribute.nodeValue)}
if (attribute.nodeName === "style") {nNode.style.cssText = attribute.nodeValue}
}
if (node.className) {nNode.className = node.className}
} else if (node.nodeType === 3 || node.nodeType === 4) { // TEXT_NODE or CDATA_SECTION_NODE
nNode = document.createTextNode(node.nodeValue);
} else if (node.nodeType === 8) { // COMMENT_NODE
nNode = document.createComment(node.nodeValue);
} else {
return document.createTextNode('');
}
for (i = 0, m = node.childNodes.length; i < m; i++)
{nNode.appendChild(this.Import(node.childNodes[i]))}
return nNode;
},
value: function () {return this.div},
toString: function () {return this.div.innerHTML}
});
MML.TeXAtom = MML.mbase.Subclass({
type: "texatom",
linebreakContainer: true,
inferRow: true, notParent: true,
texClass: MML.TEXCLASS.ORD,
Core: MML.mbase.childCore,
CoreMO: MML.mbase.childCoreMO,
isEmbellished: MML.mbase.childEmbellished,
setTeXclass: function (prev) {
this.data[0].setTeXclass();
return this.adjustTeXclass(prev);
},
adjustTeXclass: MML.mo.prototype.adjustTeXclass
});
MML.NULL = MML.mbase().With({type:"null"});
var TEXCLASS = MML.TEXCLASS;
var MO = {
ORD: [0,0,TEXCLASS.ORD],
ORD11: [1,1,TEXCLASS.ORD],
ORD21: [2,1,TEXCLASS.ORD],
ORD02: [0,2,TEXCLASS.ORD],
ORD55: [5,5,TEXCLASS.ORD],
OP: [1,2,TEXCLASS.OP,{largeop: true, movablelimits: true, symmetric: true}],
OPFIXED: [1,2,TEXCLASS.OP,{largeop: true, movablelimits: true}],
INTEGRAL: [0,1,TEXCLASS.OP,{largeop: true, symmetric: true}],
INTEGRAL2: [1,2,TEXCLASS.OP,{largeop: true, symmetric: true}],
BIN3: [3,3,TEXCLASS.BIN],
BIN4: [4,4,TEXCLASS.BIN],
BIN01: [0,1,TEXCLASS.BIN],
BIN5: [5,5,TEXCLASS.BIN],
TALLBIN: [4,4,TEXCLASS.BIN,{stretchy: true}],
BINOP: [4,4,TEXCLASS.BIN,{largeop: true, movablelimits: true}],
REL: [5,5,TEXCLASS.REL],
REL1: [1,1,TEXCLASS.REL,{stretchy: true}],
REL4: [4,4,TEXCLASS.REL],
RELSTRETCH: [5,5,TEXCLASS.REL,{stretchy: true}],
RELACCENT: [5,5,TEXCLASS.REL,{accent: true}],
WIDEREL: [5,5,TEXCLASS.REL,{accent: true, stretchy: true}],
OPEN: [0,0,TEXCLASS.OPEN,{fence: true, stretchy: true, symmetric: true}],
CLOSE: [0,0,TEXCLASS.CLOSE,{fence: true, stretchy: true, symmetric: true}],
INNER: [0,0,TEXCLASS.INNER],
PUNCT: [0,3,TEXCLASS.PUNCT],
ACCENT: [0,0,TEXCLASS.ORD,{accent: true}],
WIDEACCENT: [0,0,TEXCLASS.ORD,{accent: true, stretchy: true}]
};
MML.mo.Augment({
SPACE: [
'0em',
'0.1111em',
'0.1667em',
'0.2222em',
'0.2667em',
'0.3333em'
],
RANGES: [
[0x20,0x7F,TEXCLASS.REL,"BasicLatin"],
[0xA0,0xFF,TEXCLASS.ORD,"Latin1Supplement"],
[0x100,0x17F,TEXCLASS.ORD],
[0x180,0x24F,TEXCLASS.ORD],
[0x2B0,0x2FF,TEXCLASS.ORD,"SpacingModLetters"],
[0x300,0x36F,TEXCLASS.ORD,"CombDiacritMarks"],
[0x370,0x3FF,TEXCLASS.ORD,"GreekAndCoptic"],
[0x1E00,0x1EFF,TEXCLASS.ORD],
[0x2000,0x206F,TEXCLASS.PUNCT,"GeneralPunctuation"],
[0x2070,0x209F,TEXCLASS.ORD],
[0x20A0,0x20CF,TEXCLASS.ORD],
[0x20D0,0x20FF,TEXCLASS.ORD,"CombDiactForSymbols"],
[0x2100,0x214F,TEXCLASS.ORD,"LetterlikeSymbols"],
[0x2150,0x218F,TEXCLASS.ORD],
[0x2190,0x21FF,TEXCLASS.REL,"Arrows"],
[0x2200,0x22FF,TEXCLASS.BIN,"MathOperators"],
[0x2300,0x23FF,TEXCLASS.ORD,"MiscTechnical"],
[0x2460,0x24FF,TEXCLASS.ORD],
[0x2500,0x259F,TEXCLASS.ORD],
[0x25A0,0x25FF,TEXCLASS.ORD,"GeometricShapes"],
[0x2700,0x27BF,TEXCLASS.ORD,"Dingbats"],
[0x27C0,0x27EF,TEXCLASS.ORD,"MiscMathSymbolsA"],
[0x27F0,0x27FF,TEXCLASS.REL,"SupplementalArrowsA"],
[0x2900,0x297F,TEXCLASS.REL,"SupplementalArrowsB"],
[0x2980,0x29FF,TEXCLASS.ORD,"MiscMathSymbolsB"],
[0x2A00,0x2AFF,TEXCLASS.BIN,"SuppMathOperators"],
[0x2B00,0x2BFF,TEXCLASS.ORD,"MiscSymbolsAndArrows"],
[0x1D400,0x1D7FF,TEXCLASS.ORD]
],
OPTABLE: {
prefix: {
'\u2200': MO.ORD21, // for all
'\u2202': MO.ORD21, // partial differential
'\u2203': MO.ORD21, // there exists
'\u2207': MO.ORD21, // nabla
'\u220F': MO.OP, // n-ary product
'\u2210': MO.OP, // n-ary coproduct
'\u2211': MO.OP, // n-ary summation
'\u2212': MO.BIN01, // minus sign
'\u2213': MO.BIN01, // minus-or-plus sign
'\u221A': [1,1,TEXCLASS.ORD,{stretchy: true}], // square root
'\u2220': MO.ORD, // angle
'\u222B': MO.INTEGRAL, // integral
'\u222E': MO.INTEGRAL, // contour integral
'\u22C0': MO.OP, // n-ary logical and
'\u22C1': MO.OP, // n-ary logical or
'\u22C2': MO.OP, // n-ary intersection
'\u22C3': MO.OP, // n-ary union
'\u2308': MO.OPEN, // left ceiling
'\u230A': MO.OPEN, // left floor
'\u27E8': MO.OPEN, // mathematical left angle bracket
'\u27EE': MO.OPEN, // mathematical left flattened parenthesis
'\u2A00': MO.OP, // n-ary circled dot operator
'\u2A01': MO.OP, // n-ary circled plus operator
'\u2A02': MO.OP, // n-ary circled times operator
'\u2A04': MO.OP, // n-ary union operator with plus
'\u2A06': MO.OP, // n-ary square union operator
'\u00AC': MO.ORD21, // not sign
'\u00B1': MO.BIN01, // plus-minus sign
'(': MO.OPEN, // left parenthesis
'+': MO.BIN01, // plus sign
'-': MO.BIN01, // hyphen-minus
'[': MO.OPEN, // left square bracket
'{': MO.OPEN, // left curly bracket
'|': MO.OPEN // vertical line
},
postfix: {
'!': [1,0,TEXCLASS.CLOSE], // exclamation mark
'&': MO.ORD, // ampersand
'\u2032': MO.ORD02, // prime
'\u203E': MO.WIDEACCENT, // overline
'\u2309': MO.CLOSE, // right ceiling
'\u230B': MO.CLOSE, // right floor
'\u23DE': MO.WIDEACCENT, // top curly bracket
'\u23DF': MO.WIDEACCENT, // bottom curly bracket
'\u266D': MO.ORD02, // music flat sign
'\u266E': MO.ORD02, // music natural sign
'\u266F': MO.ORD02, // music sharp sign
'\u27E9': MO.CLOSE, // mathematical right angle bracket
'\u27EF': MO.CLOSE, // mathematical right flattened parenthesis
'\u02C6': MO.WIDEACCENT, // modifier letter circumflex accent
'\u02C7': MO.WIDEACCENT, // caron
'\u02C9': MO.WIDEACCENT, // modifier letter macron
'\u02CA': MO.ACCENT, // modifier letter acute accent
'\u02CB': MO.ACCENT, // modifier letter grave accent
'\u02D8': MO.ACCENT, // breve
'\u02D9': MO.ACCENT, // dot above
'\u02DC': MO.WIDEACCENT, // small tilde
'\u0302': MO.WIDEACCENT, // combining circumflex accent
'\u00A8': MO.ACCENT, // diaeresis
'\u00AF': MO.WIDEACCENT, // macron
')': MO.CLOSE, // right parenthesis
']': MO.CLOSE, // right square bracket
'^': MO.WIDEACCENT, // circumflex accent
'_': MO.WIDEACCENT, // low line
'`': MO.ACCENT, // grave accent
'|': MO.CLOSE, // vertical line
'}': MO.CLOSE, // right curly bracket
'~': MO.WIDEACCENT // tilde
},
infix: {
'': MO.ORD, // empty
'%': [3,3,TEXCLASS.ORD], // percent sign
'\u2022': MO.BIN4, // bullet
'\u2026': MO.INNER, // horizontal ellipsis
'\u2044': MO.TALLBIN, // fraction slash
'\u2061': MO.ORD, // function application
'\u2062': MO.ORD, // invisible times
'\u2063': [0,0,TEXCLASS.ORD,{linebreakstyle:"after", separator: true}], // invisible separator
'\u2064': MO.ORD, // invisible plus
'\u2190': MO.WIDEREL, // leftwards arrow
'\u2191': MO.RELSTRETCH, // upwards arrow
'\u2192': MO.WIDEREL, // rightwards arrow
'\u2193': MO.RELSTRETCH, // downwards arrow
'\u2194': MO.WIDEREL, // left right arrow
'\u2195': MO.RELSTRETCH, // up down arrow
'\u2196': MO.RELSTRETCH, // north west arrow
'\u2197': MO.RELSTRETCH, // north east arrow
'\u2198': MO.RELSTRETCH, // south east arrow
'\u2199': MO.RELSTRETCH, // south west arrow
'\u21A6': MO.WIDEREL, // rightwards arrow from bar
'\u21A9': MO.WIDEREL, // leftwards arrow with hook
'\u21AA': MO.WIDEREL, // rightwards arrow with hook
'\u21BC': MO.WIDEREL, // leftwards harpoon with barb upwards
'\u21BD': MO.WIDEREL, // leftwards harpoon with barb downwards
'\u21C0': MO.WIDEREL, // rightwards harpoon with barb upwards
'\u21C1': MO.WIDEREL, // rightwards harpoon with barb downwards
'\u21CC': MO.WIDEREL, // rightwards harpoon over leftwards harpoon
'\u21D0': MO.WIDEREL, // leftwards double arrow
'\u21D1': MO.RELSTRETCH, // upwards double arrow
'\u21D2': MO.WIDEREL, // rightwards double arrow
'\u21D3': MO.RELSTRETCH, // downwards double arrow
'\u21D4': MO.WIDEREL, // left right double arrow
'\u21D5': MO.RELSTRETCH, // up down double arrow
'\u2208': MO.REL, // element of
'\u2209': MO.REL, // not an element of
'\u220B': MO.REL, // contains as member
'\u2212': MO.BIN4, // minus sign
'\u2213': MO.BIN4, // minus-or-plus sign
'\u2215': MO.TALLBIN, // division slash
'\u2216': MO.BIN4, // set minus
'\u2217': MO.BIN4, // asterisk operator
'\u2218': MO.BIN4, // ring operator
'\u2219': MO.BIN4, // bullet operator
'\u221D': MO.REL, // proportional to
'\u2223': MO.REL, // divides
'\u2225': MO.REL, // parallel to
'\u2227': MO.BIN4, // logical and
'\u2228': MO.BIN4, // logical or
'\u2229': MO.BIN4, // intersection
'\u222A': MO.BIN4, // union
'\u223C': MO.REL, // tilde operator
'\u2240': MO.BIN4, // wreath product
'\u2243': MO.REL, // asymptotically equal to
'\u2245': MO.REL, // approximately equal to
'\u2248': MO.REL, // almost equal to
'\u224D': MO.REL, // equivalent to
'\u2250': MO.REL, // approaches the limit
'\u2260': MO.REL, // not equal to
'\u2261': MO.REL, // identical to
'\u2264': MO.REL, // less-than or equal to
'\u2265': MO.REL, // greater-than or equal to
'\u226A': MO.REL, // much less-than
'\u226B': MO.REL, // much greater-than
'\u227A': MO.REL, // precedes
'\u227B': MO.REL, // succeeds
'\u2282': MO.REL, // subset of
'\u2283': MO.REL, // superset of
'\u2286': MO.REL, // subset of or equal to
'\u2287': MO.REL, // superset of or equal to
'\u228E': MO.BIN4, // multiset union
'\u2291': MO.REL, // square image of or equal to
'\u2292': MO.REL, // square original of or equal to
'\u2293': MO.BIN4, // square cap
'\u2294': MO.BIN4, // square cup
'\u2295': MO.BIN4, // circled plus
'\u2296': MO.BIN4, // circled minus
'\u2297': MO.BIN4, // circled times
'\u2298': MO.BIN4, // circled division slash
'\u2299': MO.BIN4, // circled dot operator
'\u22A2': MO.REL, // right tack
'\u22A3': MO.REL, // left tack
'\u22A4': MO.ORD55, // down tack
'\u22A5': MO.REL, // up tack
'\u22A8': MO.REL, // true
'\u22C4': MO.BIN4, // diamond operator
'\u22C5': MO.BIN4, // dot operator
'\u22C6': MO.BIN4, // star operator
'\u22C8': MO.REL, // bowtie
'\u22EE': MO.ORD55, // vertical ellipsis
'\u22EF': MO.INNER, // midline horizontal ellipsis
'\u22F1': [5,5,TEXCLASS.INNER], // down right diagonal ellipsis
'\u25B3': MO.BIN4, // white up-pointing triangle
'\u25B5': MO.BIN4, // white up-pointing small triangle
'\u25B9': MO.BIN4, // white right-pointing small triangle
'\u25BD': MO.BIN4, // white down-pointing triangle
'\u25BF': MO.BIN4, // white down-pointing small triangle
'\u25C3': MO.BIN4, // white left-pointing small triangle
'\u2758': MO.REL, // light vertical bar
'\u27F5': MO.WIDEREL, // long leftwards arrow
'\u27F6': MO.WIDEREL, // long rightwards arrow
'\u27F7': MO.WIDEREL, // long left right arrow
'\u27F8': MO.WIDEREL, // long leftwards double arrow
'\u27F9': MO.WIDEREL, // long rightwards double arrow
'\u27FA': MO.WIDEREL, // long left right double arrow
'\u27FC': MO.WIDEREL, // long rightwards arrow from bar
'\u2A2F': MO.BIN4, // vector or cross product
'\u2A3F': MO.BIN4, // amalgamation or coproduct
'\u2AAF': MO.REL, // precedes above single-line equals sign
'\u2AB0': MO.REL, // succeeds above single-line equals sign
'\u00B1': MO.BIN4, // plus-minus sign
'\u00B7': MO.BIN4, // middle dot
'\u00D7': MO.BIN4, // multiplication sign
'\u00F7': MO.BIN4, // division sign
'*': MO.BIN3, // asterisk
'+': MO.BIN4, // plus sign
',': [0,3,TEXCLASS.PUNCT,{linebreakstyle:"after", separator: true}], // comma
'-': MO.BIN4, // hyphen-minus
'.': [3,3,TEXCLASS.ORD], // full stop
'/': MO.ORD11, // solidus
':': [1,2,TEXCLASS.REL], // colon
';': [0,3,TEXCLASS.PUNCT,{linebreakstyle:"after", separator: true}], // semicolon
'<': MO.REL, // less-than sign
'=': MO.REL, // equals sign
'>': MO.REL, // greater-than sign
'?': [1,1,TEXCLASS.CLOSE], // question mark
'\\': MO.ORD, // reverse solidus
'^': MO.ORD11, // circumflex accent
'_': MO.ORD11, // low line
'|': [2,2,TEXCLASS.ORD,{fence: true, stretchy: true, symmetric: true}], // vertical line
'#': MO.ORD, // #
'$': MO.ORD, // $
'\u002E': [0,3,TEXCLASS.PUNCT,{separator: true}], // \ldotp
'\u02B9': MO.ORD, // prime
'\u0300': MO.ACCENT, // \grave
'\u0301': MO.ACCENT, // \acute
'\u0303': MO.WIDEACCENT, // \tilde
'\u0304': MO.ACCENT, // \bar
'\u0306': MO.ACCENT, // \breve
'\u0307': MO.ACCENT, // \dot
'\u0308': MO.ACCENT, // \ddot
'\u030C': MO.ACCENT, // \check
'\u0332': MO.WIDEACCENT, // horizontal line
'\u0338': MO.REL4, // \not
'\u2015': [0,0,TEXCLASS.ORD,{stretchy: true}], // horizontal line
'\u2017': [0,0,TEXCLASS.ORD,{stretchy: true}], // horizontal line
'\u2020': MO.BIN3, // \dagger
'\u2021': MO.BIN3, // \ddagger
'\u20D7': MO.ACCENT, // \vec
'\u2111': MO.ORD, // \Im
'\u2113': MO.ORD, // \ell
'\u2118': MO.ORD, // \wp
'\u211C': MO.ORD, // \Re
'\u2205': MO.ORD, // \emptyset
'\u221E': MO.ORD, // \infty
'\u2305': MO.BIN3, // barwedge
'\u2306': MO.BIN3, // doublebarwedge
'\u2322': MO.REL4, // \frown
'\u2323': MO.REL4, // \smile
'\u2329': MO.OPEN, // langle
'\u232A': MO.CLOSE, // rangle
'\u23AA': MO.ORD, // \bracevert
'\u23AF': [0,0,TEXCLASS.ORD,{stretchy: true}], // \underline
'\u23B0': MO.OPEN, // \lmoustache
'\u23B1': MO.CLOSE, // \rmoustache
'\u2500': MO.ORD, // horizontal line
'\u25EF': MO.BIN3, // \bigcirc
'\u2660': MO.ORD, // \spadesuit
'\u2661': MO.ORD, // \heartsuit
'\u2662': MO.ORD, // \diamondsuit
'\u2663': MO.ORD, // \clubsuit
'\u3008': MO.OPEN, // langle
'\u3009': MO.CLOSE, // rangle
'\uFE37': MO.WIDEACCENT, // horizontal brace down
'\uFE38': MO.WIDEACCENT // horizontal brace up
}
}
},{
OPTYPES: MO
});
//
// These are not in the W3C table, but FF works this way,
// and it makes sense, so add it here
//
var OPTABLE = MML.mo.prototype.OPTABLE;
OPTABLE.infix["^"] = MO.WIDEREL;
OPTABLE.infix["_"] = MO.WIDEREL;
OPTABLE.prefix["\u2223"] = MO.OPEN;
OPTABLE.prefix["\u2225"] = MO.OPEN;
OPTABLE.postfix["\u2223"] = MO.CLOSE;
OPTABLE.postfix["\u2225"] = MO.CLOSE;
})(MathJax.ElementJax.mml);
MathJax.ElementJax.mml.loadComplete("jax.js");
/***/ }),
/***/ 123:
/***/ ((__unused_webpack_module, exports) => {
var MathJax = {debug:true};
var window = {
MathJax: MathJax
};
var navigator = {};
var document = null;
exports.E = MathJax;
(function (BASENAME) {
var BASE = window[BASENAME];
if (!BASE) {BASE = window[BASENAME] = {}}
var PROTO = []; // a static object used to indicate when a prototype is being created
var OBJECT = function (def) {
var obj = def.constructor; if (!obj) {obj = function () {}}
for (var id in def) {if (id !== 'constructor' && def.hasOwnProperty(id)) {obj[id] = def[id]}}
return obj;
};
var CONSTRUCTOR = function () {
return function () {return arguments.callee.Init.call(this,arguments)};
};
BASE.Object = OBJECT({
constructor: CONSTRUCTOR(),
Subclass: function (def,classdef) {
var obj = CONSTRUCTOR();
obj.SUPER = this; obj.Init = this.Init;
obj.Subclass = this.Subclass; obj.Augment = this.Augment;
obj.protoFunction = this.protoFunction;
obj.can = this.can; obj.has = this.has; obj.isa = this.isa;
obj.prototype = new this(PROTO);
obj.prototype.constructor = obj; // the real constructor
obj.Augment(def,classdef);
return obj;
},
Init: function (args) {
var obj = this;
if (args.length === 1 && args[0] === PROTO) {return obj}
if (!(obj instanceof args.callee)) {obj = new args.callee(PROTO)}
return obj.Init.apply(obj,args) || obj;
},
Augment: function (def,classdef) {
var id;
if (def != null) {
for (id in def) {if (def.hasOwnProperty(id)) {this.protoFunction(id,def[id])}}
// MSIE doesn't list toString even if it is not native so handle it separately
if (def.toString !== this.prototype.toString && def.toString !== {}.toString)
{this.protoFunction('toString',def.toString)}
}
if (classdef != null) {
for (id in classdef) {if (classdef.hasOwnProperty(id)) {this[id] = classdef[id]}}
}
return this;
},
protoFunction: function (id,def) {
this.prototype[id] = def;
if (typeof def === "function") {def.SUPER = this.SUPER.prototype}
},
prototype: {
Init: function () {},
SUPER: function (fn) {return fn.callee.SUPER},
can: function (method) {return typeof(this[method]) === "function"},
has: function (property) {return typeof(this[property]) !== "undefined"},
isa: function (obj) {return (obj instanceof Object) && (this instanceof obj)}
},
can: function (method) {return this.prototype.can.call(this,method)},
has: function (property) {return this.prototype.has.call(this,property)},
isa: function (obj) {
var constructor = this;
while (constructor) {
if (constructor === obj) {return true} else {constructor = constructor.SUPER}
}
return false;
},
SimpleSUPER: OBJECT({
constructor: function (def) {return this.SimpleSUPER.define(def)},
define: function (src) {
var dst = {};
if (src != null) {
for (var id in src) {if (src.hasOwnProperty(id)) {dst[id] = this.wrap(id,src[id])}}
// MSIE doesn't list toString even if it is not native so handle it separately
if (src.toString !== this.prototype.toString && src.toString !== {}.toString)
{dst.toString = this.wrap('toString',src.toString)}
}
return dst;
},
wrap: function (id,f) {
if (typeof(f) !== 'function' || !f.toString().match(/\.\s*SUPER\s*\(/)) {return f}
var fn = function () {
this.SUPER = fn.SUPER[id];
try {var result = f.apply(this,arguments)} catch (err) {delete this.SUPER; throw err}
delete this.SUPER;
return result;
}
fn.toString = function () {return f.toString.apply(f,arguments)}
return fn;
}
})
});
BASE.Object.isArray = Array.isArray || function (obj) {
return Object.prototype.toString.call(obj) === "[object Array]";
};
BASE.Object.Array = Array;
})("MathJax");
/**********************************************************/
/*
* Create a callback function from various forms of data:
*
* MathJax.Callback(fn) -- callback to a function
*
* MathJax.Callback([fn]) -- callback to function
* MathJax.Callback([fn,data...])
* -- callback to function with given data as arguments
* MathJax.Callback([object,fn])
* -- call fn with object as "this"
* MathJax.Callback([object,fn,data...])
* -- call fn with object as "this" and data as arguments
* MathJax.Callback(["method",object])
* -- call method of object wth object as "this"
* MathJax.Callback(["method",object,data...])
* -- as above, but with data as arguments to method
*
* MathJax.Callback({hook: fn, data: [...], object: this})
* -- give function, data, and object to act as "this" explicitly
*
* MathJax.Callback("code") -- callback that compiles and executes a string
*
* MathJax.Callback([...],i)
* -- use slice of array starting at i and interpret
* result as above. (Used for passing "arguments" array
* and trimming initial arguments, if any.)
*/
/*
* MathJax.Callback.After([...],cb1,cb2,...)
* -- make a callback that isn't called until all the other
* ones are called first. I.e., wait for a union of
* callbacks to occur before making the given callback.
*/
/*
* MathJax.Callback.Queue([callback,...])
* -- make a synchronized queue of commands that process
* sequentially, waiting for those that return uncalled
* callbacks.
*/
/*
* MathJax.Callback.Signal(name)
* -- finds or creates a names signal, to which listeners
* can be attached and are signaled by messages posted
* to the signal. Responses can be asynchronous.
*/
(function (BASENAME) {
var BASE = window[BASENAME];
if (!BASE) {BASE = window[BASENAME] = {}}
//
// Create a callback from an associative array
//
var CALLBACK = function (data) {
var cb = function () {return arguments.callee.execute.apply(arguments.callee,arguments)};
for (var id in CALLBACK.prototype) {
if (CALLBACK.prototype.hasOwnProperty(id)) {
if (typeof(data[id]) !== 'undefined') {cb[id] = data[id]}
else {cb[id] = CALLBACK.prototype[id]}
}
}
cb.toString = CALLBACK.prototype.toString;
return cb;
};
CALLBACK.prototype = {
isCallback: true,
hook: function () {},
data: [],
object: window,
execute: function () {
if (!this.called || this.autoReset) {
this.called = !this.autoReset;
return this.hook.apply(this.object,this.data.concat([].slice.call(arguments,0)));
}
},
reset: function () {delete this.called},
toString: function () {return this.hook.toString.apply(this.hook,arguments)}
};
var ISCALLBACK = function (f) {
return (typeof(f) === "function" && f.isCallback);
}
//
// Evaluate a string in global context
//
var EVAL = function (code) {return eval.call(window,code)}
var TESTEVAL = function () {
EVAL("var __TeSt_VaR__ = 1"); // check if it works in global context
if (window.__TeSt_VaR__) {
try { delete window.__TeSt_VaR__; } // NOTE IE9 throws when in IE7 mode
catch (error) { window.__TeSt_VaR__ = null; }
} else {
if (window.execScript) {
// IE
EVAL = function (code) {
BASE.__code = code;
code = "try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";
window.execScript(code);
var result = BASE.__result; delete BASE.__result; delete BASE.__code;
if (result instanceof Error) {throw result}
return result;
}
} else {
// Safari2
EVAL = function (code) {
BASE.__code = code;
code = "try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";
var head = (document.getElementsByTagName("head"))[0]; if (!head) {head = document.body}
var script = document.createElement("script");
script.appendChild(document.createTextNode(code));
head.appendChild(script); head.removeChild(script);
var result = BASE.__result; delete BASE.__result; delete BASE.__code;
if (result instanceof Error) {throw result}
return result;
}
}
}
TESTEVAL = null;
}
//
// Create a callback from various types of data
//
var USING = function (args,i) {
if (arguments.length > 1) {
if (arguments.length === 2 && !(typeof arguments[0] === 'function') &&
arguments[0] instanceof Object && typeof arguments[1] === 'number')
{args = [].slice.call(args,i)}
else {args = [].slice.call(arguments,0)}
}
if (args instanceof Array && args.length === 1) {args = args[0]}
if (typeof args === 'function') {
if (args.execute === CALLBACK.prototype.execute) {return args}
return CALLBACK({hook: args});
} else if (args instanceof Array) {
if (typeof(args[0]) === 'string' && args[1] instanceof Object &&
typeof args[1][args[0]] === 'function') {
return CALLBACK({hook: args[1][args[0]], object: args[1], data: args.slice(2)});
} else if (typeof args[0] === 'function') {
return CALLBACK({hook: args[0], data: args.slice(1)});
} else if (typeof args[1] === 'function') {
return CALLBACK({hook: args[1], object: args[0], data: args.slice(2)});
}
} else if (typeof(args) === 'string') {
if (TESTEVAL) TESTEVAL();
return CALLBACK({hook: EVAL, data: [args]});
} else if (args instanceof Object) {
return CALLBACK(args);
} else if (typeof(args) === 'undefined') {
return CALLBACK({});
}
throw Error("Can't make callback from given data");
};
//
// Wait for a given time to elapse and then perform the callback
//
var DELAY = function (time,callback) {
callback = USING(callback);
callback.timeout = setTimeout(callback,time);
return callback;
};
//
// Callback used by AFTER, QUEUE, and SIGNAL to check if calls have completed
//
var WAITFOR = function (callback,signal) {
callback = USING(callback);
if (!callback.called) {WAITSIGNAL(callback,signal); signal.pending++}
};
var WAITEXECUTE = function () {
var signals = this.signal; delete this.signal;
this.execute = this.oldExecute; delete this.oldExecute;
var result = this.execute.apply(this,arguments);
if (ISCALLBACK(result) && !result.called) {WAITSIGNAL(result,signals)} else {
for (var i = 0, m = signals.length; i < m; i++) {
signals[i].pending--;
if (signals[i].pending <= 0) {signals[i].call()}
}
}
};
var WAITSIGNAL = function (callback,signals) {
if (!(signals instanceof Array)) {signals = [signals]}
if (!callback.signal) {
callback.oldExecute = callback.execute;
callback.execute = WAITEXECUTE;
callback.signal = signals;
} else if (signals.length === 1) {callback.signal.push(signals[0])}
else {callback.signal = callback.signal.concat(signals)}
};
//
// Create a callback that is called when a collection of other callbacks have
// all been executed. If the callback gets called immediately (i.e., the
// others are all already called), check if it returns another callback
// and return that instead.
//
var AFTER = function (callback) {
callback = USING(callback);
callback.pending = 0;
for (var i = 1, m = arguments.length; i < m; i++)
{if (arguments[i]) {WAITFOR(arguments[i],callback)}}
if (callback.pending === 0) {
var result = callback();
if (ISCALLBACK(result)) {callback = result}
}
return callback;
};
//
// An array of prioritized hooks that are executed sequentially
// with a given set of data.
//
var HOOKS = MathJax.Object.Subclass({
//
// Initialize the array and the auto-reset status
//
Init: function (reset) {
this.hooks = [];
this.remove = []; // used when hooks are removed during execution of list
this.reset = reset;
this.running = false;
},
//
// Add a callback to the list, in priority order (default priority is 10)
//
Add: function (hook,priority) {
if (priority == null) {priority = 10}
if (!ISCALLBACK(hook)) {hook = USING(hook)}
hook.priority = priority;
var i = this.hooks.length;
while (i > 0 && priority < this.hooks[i-1].priority) {i--}
this.hooks.splice(i,0,hook);
return hook;
},
Remove: function (hook) {
for (var i = 0, m = this.hooks.length; i < m; i++) {
if (this.hooks[i] === hook) {
if (this.running) {this.remove.push(i)}
else {this.hooks.splice(i,1)}
return;
}
}
},
//
// Execute the list of callbacks, resetting them if requested.
// If any return callbacks, return a callback that will be
// executed when they all have completed.
// Remove any hooks that requested being removed during processing.
//
Execute: function () {
var callbacks = [{}];
this.running = true;
for (var i = 0, m = this.hooks.length; i < m; i++) {
if (this.reset) {this.hooks[i].reset()}
var result = this.hooks[i].apply(window,arguments);
if (ISCALLBACK(result) && !result.called) {callbacks.push(result)}
}
this.running = false;
if (this.remove.length) {this.RemovePending()}
if (callbacks.length === 1) {return null}
if (callbacks.length === 2) {return callbacks[1]}
return AFTER.apply({},callbacks);
},
//
// Remove hooks that asked to be removed during execution of list
//
RemovePending: function () {
this.remove = this.remove.sort();
for (var i = this.remove.length-1; i >= 0; i--) {this.hooks.splice(i,1)}
this.remove = [];
}
});
//
// Run an array of callbacks passing them the given data.
// (Legacy function, since this has been replaced by the HOOKS object).
//
var EXECUTEHOOKS = function (hooks,data,reset) {
if (!hooks) {return null}
if (!(hooks instanceof Array)) {hooks = [hooks]}
if (!(data instanceof Array)) {data = (data == null ? [] : [data])}
var handler = HOOKS(reset);
for (var i = 0, m = hooks.length; i < m; i++) {handler.Add(hooks[i])}
return handler.Execute.apply(handler,data);
};
//
// Command queue that performs commands in order, waiting when
// necessary for commands to complete asynchronousely
//
var QUEUE = BASE.Object.Subclass({
//
// Create the queue and push any commands that are specified
//
Init: function () {
this.pending = this.running = 0;
this.queue = [];
this.Push.apply(this,arguments);
},
//
// Add commands to the queue and run them. Adding a callback object
// (rather than a callback specification) queues a wait for that callback.
// Return the final callback for synchronization purposes.
//
Push: function () {
var callback;
for (var i = 0, m = arguments.length; i < m; i++) {
callback = USING(arguments[i]);
if (callback === arguments[i] && !callback.called)
{callback = USING(["wait",this,callback])}
this.queue.push(callback);
}
if (!this.running && !this.pending) {this.Process()}
return callback;
},
//
// Process the command queue if we aren't waiting on another command
//
Process: function (queue) {
while (!this.running && !this.pending && this.queue.length) {
var callback = this.queue[0];
queue = this.queue.slice(1); this.queue = [];
this.Suspend(); var result = callback(); this.Resume();
if (queue.length) {this.queue = queue.concat(this.queue)}
if (ISCALLBACK(result) && !result.called) {WAITFOR(result,this)}
}
},
//
// Suspend/Resume command processing on this queue
//
Suspend: function () {this.running++},
Resume: function () {if (this.running) {this.running--}},
//
// Used by WAITFOR to restart the queue when an action completes
//
call: function () {this.Process.apply(this,arguments)},
wait: function (callback) {return callback}
});
//
// Create a named signal that listeners can attach to, to be signaled by
// postings made to the signal. Posts are queued if they occur while one
// is already in process.
//
var SIGNAL = QUEUE.Subclass({
Init: function (name) {
QUEUE.prototype.Init.call(this);
this.name = name;
this.posted = []; // the messages posted so far
this.listeners = HOOKS(true); // those with interest in this signal
this.posting = false;
this.callback = null;
},
//
// Post a message to the signal listeners, with callback for when complete
//
Post: function (message,callback,forget) {
callback = USING(callback);
if (this.posting || this.pending) {
this.Push(["Post",this,message,callback,forget]);
} else {
this.callback = callback; callback.reset();
if (!forget) {this.posted.push(message)}
this.Suspend(); this.posting = true;
var result = this.listeners.Execute(message);
if (ISCALLBACK(result) && !result.called) {WAITFOR(result,this)}
this.Resume(); this.posting = false;
if (!this.pending) {this.call()}
}
return callback;
},
//
// Clear the post history (so new listeners won't get old messages)
//
Clear: function (callback) {
callback = USING(callback);
if (this.posting || this.pending) {
callback = this.Push(["Clear",this,callback]);
} else {
this.posted = [];
callback();
}
return callback;
},
//
// Call the callback (all replies are in) and process the command queue
//
call: function () {this.callback(this); this.Process()},
//
// A listener calls this to register interest in the signal (so it will be called
// when posts occur). If ignorePast is true, it will not be sent the post history.
//
Interest: function (callback,ignorePast,priority) {
callback = USING(callback);
this.listeners.Add(callback,priority);
if (!ignorePast) {
for (var i = 0, m = this.posted.length; i < m; i++) {
callback.reset();
var result = callback(this.posted[i]);
if (ISCALLBACK(result) && i === this.posted.length-1) {WAITFOR(result,this)}
}
}
return callback;
},
//
// A listener calls this to remove itself from a signal
//
NoInterest: function (callback) {
this.listeners.Remove(callback);
},
//
// Hook a callback to a particular message on this signal
//
MessageHook: function (msg,callback,priority) {
callback = USING(callback);
if (!this.hooks) {this.hooks = {}; this.Interest(["ExecuteHooks",this])}
if (!this.hooks[msg]) {this.hooks[msg] = HOOKS(true)}
this.hooks[msg].Add(callback,priority);
for (var i = 0, m = this.posted.length; i < m; i++)
{if (this.posted[i] == msg) {callback.reset(); callback(this.posted[i])}}
callback.msg = msg; // keep track so we can remove it
return callback;
},
//
// Execute the message hooks for the given message
//
ExecuteHooks: function (msg) {
var type = ((msg instanceof Array) ? msg[0] : msg);
if (!this.hooks[type]) {return null}
return this.hooks[type].Execute(msg);
},
//
// Remove a hook safely
//
RemoveHook: function (hook) {
this.hooks[hook.msg].Remove(hook);
}
},{
signals: {}, // the named signals
find: function (name) {
if (!SIGNAL.signals[name]) {SIGNAL.signals[name] = new SIGNAL(name)}
return SIGNAL.signals[name];
}
});
//
// The main entry-points
//
BASE.Callback = BASE.CallBack = USING;
BASE.Callback.Delay = DELAY;
BASE.Callback.After = AFTER;
BASE.Callback.Queue = QUEUE;
BASE.Callback.Signal = SIGNAL.find;
BASE.Callback.Hooks = HOOKS;
BASE.Callback.ExecuteHooks = EXECUTEHOOKS;
})("MathJax");
/**********************************************************/
(function (BASENAME) {
var BASE = window[BASENAME];
if (!BASE) {BASE = window[BASENAME] = {}}
var isSafari2 = (navigator.vendor === "Apple Computer, Inc." &&
typeof navigator.vendorSub === "undefined");
var sheets = 0; // used by Safari2
//
// Update sheets count and look up the head object
//
var HEAD = function (head) {
return null;
/*
if (document.styleSheets && document.styleSheets.length > sheets)
{sheets = document.styleSheets.length}
if (!head) {
head = document.head || ((document.getElementsByTagName("head"))[0]);
if (!head) {head = document.body}
}
return head;
*/
};
//
// Remove scripts that are completed so they don't clutter up the HEAD.
// This runs via setTimeout since IE7 can't remove the script while it is running.
//
var SCRIPTS = []; // stores scripts to be removed after a delay
var REMOVESCRIPTS = function () {
for (var i = 0, m = SCRIPTS.length; i < m; i++) {BASE.Ajax.head.removeChild(SCRIPTS[i])}
SCRIPTS = [];
};
var PATH = {};
PATH[BASENAME] = ""; // empty path gets the root URL
BASE.Ajax = {
loaded: {}, // files already loaded
loading: {}, // files currently in process of loading
loadHooks: {}, // hooks to call when files are loaded
timeout: 15*1000, // timeout for loading of files (15 seconds)
styleDelay: 1, // delay to use before styles are available
config: {
root: "", // URL of root directory to load from
path: PATH // paths to named URL's (e.g., [MathJax]/...)
},
STATUS: {
OK: 1, // file is loading or did load OK
ERROR: -1 // file timed out during load
},
//
// Return a complete URL to a file (replacing any root names)
//
fileURL: function (file) {
var match = file.match(/^\[([-._a-z0-9]+)\]/i);
if (match && match[1] in PATH)
{file = (PATH[match[1]]||this.config.root) + file.substr(match[1].length+2)}
return file;
},
//
// Replace root names if URL includes one
//
fileName: function (url) {
var root = this.config.root;
if (url.substr(0,root.length) === root) {url = "["+BASENAME+"]"+url.substr(root.length)}
else {
for (var id in PATH) {if (PATH.hasOwnProperty(id) && PATH[id]) {
if (url.substr(0,PATH[id].length) === PATH[id])
{url = "["+id+"]"+url.substr(PATH[id].length); break}
}}
}
return url;
},
//
// Cache-breaking revision number for file
//
fileRev: function (file) {
var rev = BASE.cdnFileVersions[name] || BASE.cdnVersion;
if (rev) {rev = "?rev="+rev}
return rev;
},
urlRev: function (file) {return this.fileURL(file)+this.fileRev(file)},
//
// Load a file if it hasn't been already.
// Make sure the file URL is "safe"?
//
Require: function (file,callback) {
callback = BASE.Callback(callback); var type;
if (file instanceof Object) {
for (var i in file)
{if (file.hasOwnProperty(i)) {type = i.toUpperCase(); file = file[i]}}
} else {type = file.split(/\./).pop().toUpperCase()}
file = this.fileURL(file);
// FIXME: check that URL is OK
if (this.loaded[file]) {
callback(this.loaded[file]);
} else {
var FILE = {}; FILE[type] = file;
this.Load(FILE,callback);
}
return callback;
},
//
// Load a file regardless of where it is and whether it has
// already been loaded.
//
Load: function (file,callback) {
callback = BASE.Callback(callback); var type;
if (file instanceof Object) {
for (var i in file)
{if (file.hasOwnProperty(i)) {type = i.toUpperCase(); file = file[i]}}
} else {type = file.split(/\./).pop().toUpperCase()}
file = this.fileURL(file);
if (this.loading[file]) {
this.addHook(file,callback);
} else {
this.head = HEAD(this.head);
if (this.loader[type]) {this.loader[type].call(this,file,callback)}
else {throw Error("Can't load files of type "+type)}
}
return callback;
},
//
// Register a load hook for a particular file (it will be called when
// loadComplete() is called for that file)
//
LoadHook: function (file,callback,priority) {
callback = BASE.Callback(callback);
if (file instanceof Object)
{for (var i in file) {if (file.hasOwnProperty(i)) {file = file[i]}}}
file = this.fileURL(file);
if (this.loaded[file]) {callback(this.loaded[file])}
else {this.addHook(file,callback,priority)}
return callback;
},
addHook: function (file,callback,priority) {
if (!this.loadHooks[file]) {this.loadHooks[file] = MathJax.Callback.Hooks()}
this.loadHooks[file].Add(callback,priority);
callback.file = file;
},
removeHook: function (hook) {
if (this.loadHooks[hook.file]) {
this.loadHooks[hook.file].Remove(hook);
if (!this.loadHooks[hook.file].hooks.length) {delete this.loadHooks[hook.file]}
}
},
//
// Used when files are combined in a preloading configuration file
//
Preloading: function () {
for (var i = 0, m = arguments.length; i < m; i++) {
var file = this.fileURL(arguments[i]);
if (!this.loading[file] && !this.loaded[file]) {this.loading[file] = {preloaded: true}}
}
},
//
// Code used to load the various types of files
// (JS for JavaScript, CSS for style sheets)
//
loader: {
//
// Create a SCRIPT tag to load the file
//
JS: function (file,callback) {
var name = this.fileName(file);
var timeout = BASE.Callback(["loadTimeout",this,file]);
this.loading[file] = {
callback: callback,
timeout: setTimeout(timeout,this.timeout),
status: this.STATUS.OK,
script: null
};
//
// Add this to the structure above after it is created to prevent recursion
// when loading the initial localization file (before loading messsage is available)
//
this.loading[file].message = BASE.Message.File(name);
if (window.System) {
window.System.import(file).catch(timeout);
} else {
timeout(); // indicate a load failure
}
},
//
// Create a LINK tag to load the style sheet
//
CSS: function (file,callback) {
var name = this.fileName(file);
var link = document.createElement("link");
link.rel = "stylesheet"; link.type = "text/css";
link.href = file+this.fileRev(name);
this.loading[file] = {
callback: callback,
message: BASE.Message.File(name),
status: this.STATUS.OK
};
this.head.appendChild(link);
this.timer.create.call(this,[this.timer.file,file],link);
}
},
//
// Timing code for checking when style sheets are available.
//
timer: {
//
// Create the timing callback and start the timing loop.
// We use a delay because some browsers need it to allow the styles
// to be processed.
//
create: function (callback,node) {
callback = BASE.Callback(callback);
if (node.nodeName === "STYLE" && node.styleSheet &&
typeof(node.styleSheet.cssText) !== 'undefined') {
callback(this.STATUS.OK); // MSIE processes style immediately, but doesn't set its styleSheet!
} else if (window.chrome && node.nodeName === "LINK") {
callback(this.STATUS.OK); // Chrome doesn't give access to cssRules for stylesheet in
// a link node, so we can't detect when it is loaded.
} else if (isSafari2) {
this.timer.start(this,[this.timer.checkSafari2,sheets++,callback],this.styleDelay);
} else {
this.timer.start(this,[this.timer.checkLength,node,callback],this.styleDelay);
}
return callback;
},
//
// Start the timer for the given callback checker
//
start: function (AJAX,check,delay,timeout) {
check = BASE.Callback(check);
check.execute = this.execute; check.time = this.time;
check.STATUS = AJAX.STATUS; check.timeout = timeout || AJAX.timeout;
check.delay = check.total = delay || 0;
if (delay) {setTimeout(check,delay)} else {check()}
},
//
// Increment the time total, increase the delay
// and test if we are past the timeout time.
//
time: function (callback) {
this.total += this.delay;
this.delay = Math.floor(this.delay * 1.05 + 5);
if (this.total >= this.timeout) {callback(this.STATUS.ERROR); return 1}
return 0;
},
//
// For JS file loads, call the proper routine according to status
//
file: function (file,status) {
if (status < 0) {BASE.Ajax.loadTimeout(file)} else {BASE.Ajax.loadComplete(file)}
},
//
// Call the hook with the required data
//
execute: function () {this.hook.call(this.object,this,this.data[0],this.data[1])},
//
// Safari2 doesn't set the link's stylesheet, so we need to look in the
// document.styleSheets array for the new sheet when it is created
//
checkSafari2: function (check,length,callback) {
if (check.time(callback)) return;
if (document.styleSheets.length > length &&
document.styleSheets[length].cssRules &&
document.styleSheets[length].cssRules.length)
{callback(check.STATUS.OK)} else {setTimeout(check,check.delay)}
},
//
// Look for the stylesheets rules and check when they are defined
// and no longer of length zero. (This assumes there actually ARE
// some rules in the stylesheet.)
//
checkLength: function (check,node,callback) {
if (check.time(callback)) return;
var isStyle = 0; var sheet = (node.sheet || node.styleSheet);
try {if ((sheet.cssRules||sheet.rules||[]).length > 0) {isStyle = 1}} catch(err) {
if (err.message.match(/protected variable|restricted URI/)) {isStyle = 1}
else if (err.message.match(/Security error/)) {
// Firefox3 gives "Security error" for missing files, so
// can't distinguish that from OK files on remote servers.
// or OK files in different directory from local files.
isStyle = 1; // just say it is OK (can't really tell)
}
}
if (isStyle) {
// Opera 9.6 requires this setTimeout
setTimeout(BASE.Callback([callback,check.STATUS.OK]),0);
} else {
setTimeout(check,check.delay);
}
}
},
//
// JavaScript code must call this when they are completely initialized
// (this allows them to perform asynchronous actions before indicating
// that they are complete).
//
loadComplete: function (file) {
file = this.fileURL(file);
var loading = this.loading[file];
if (loading && !loading.preloaded) {
BASE.Message.Clear(loading.message);
if (loading.timeout) clearTimeout(loading.timeout);
if (loading.script) {
if (SCRIPTS.length === 0) {setTimeout(REMOVESCRIPTS,0)}
SCRIPTS.push(loading.script);
}
this.loaded[file] = loading.status; delete this.loading[file];
this.addHook(file,loading.callback);
} else {
if (loading) {delete this.loading[file]}
this.loaded[file] = this.STATUS.OK;
loading = {status: this.STATUS.OK}
}
if (!this.loadHooks[file]) {return null}
return this.loadHooks[file].Execute(loading.status);
},
//
// If a file fails to load within the timeout period (or the onerror handler
// is called), this routine runs to signal the error condition.
//
loadTimeout: function (file) {
if (this.loading[file].timeout) {clearTimeout(this.loading[file].timeout)}
this.loading[file].status = this.STATUS.ERROR;
this.loadError(file);
this.loadComplete(file);
},
//
// The default error hook for file load failures
//
loadError: function (file) {
BASE.Message.Set(["LoadFailed","File failed to load: %1",file],null,2000);
BASE.Hub.signal.Post(["file load error",file]);
},
//
// Defines a style sheet from a hash of style declarations (key:value pairs
// where the key is the style selector and the value is a hash of CSS attributes
// and values).
//
Styles: function (styles,callback) {
var styleString = this.StyleString(styles);
if (styleString === "") {
callback = BASE.Callback(callback);
callback();
} else {
var style = document.createElement("style"); style.type = "text/css";
this.head = HEAD(this.head);
this.head.appendChild(style);
if (style.styleSheet && typeof(style.styleSheet.cssText) !== 'undefined') {
style.styleSheet.cssText = styleString;
} else {
style.appendChild(document.createTextNode(styleString));
}
callback = this.timer.create.call(this,callback,style);
}
return callback;
},
//
// Create a stylesheet string from a style declaration object
//
StyleString: function (styles) {
if (typeof(styles) === 'string') {return styles}
var string = "", id, style;
for (id in styles) {if (styles.hasOwnProperty(id)) {
if (typeof styles[id] === 'string') {
string += id + " {"+styles[id]+"}\n";
} else if (styles[id] instanceof Array) {
for (var i = 0; i < styles[id].length; i++) {
style = {}; style[id] = styles[id][i];
string += this.StyleString(style);
}
} else if (id.substr(0,6) === '@media') {
string += id + " {"+this.StyleString(styles[id])+"}\n";
} else if (styles[id] != null) {
style = [];
for (var name in styles[id]) {if (styles[id].hasOwnProperty(name)) {
if (styles[id][name] != null)
{style[style.length] = name + ': ' + styles[id][name]}
}}
string += id +" {"+style.join('; ')+"}\n";
}
}}
return string;
}
};
})("MathJax");
/**********************************************************/
MathJax.HTML = {
setDocument: function (doc) {document = this.document = doc},
//
// Create an HTML element with given attributes and content.
// The def parameter is an (optional) object containing key:value pairs
// of the attributes and their values, and contents is an (optional)
// array of strings to be inserted as text, or arrays of the form
// [type,def,contents] that describes an HTML element to be inserted
// into the current element. Thus the contents can describe a complete
// HTML snippet of arbitrary complexity. E.g.:
//
// MathJax.HTML.Element("span",{id:"mySpan",style{"font-style":"italic"}},[
// "(See the ",["a",{href:"http://www.mathjax.org"},["MathJax home page"]],
// " for more details.)"]);
//
Element: function (type,def,contents) {
var obj = document.createElement(type), id;
if (def) {
if (def.hasOwnProperty("style")) {
var style = def.style; def.style = {};
for (id in style) {if (style.hasOwnProperty(id))
{def.style[id.replace(/-([a-z])/g,this.ucMatch)] = style[id]}}
}
MathJax.Hub.Insert(obj,def);
for (id in def) {
if (id === "role" || id.substr(0,5) === "aria-") obj.setAttribute(id,def[id]);
}
}
if (contents) {
if (!MathJax.Object.isArray(contents)) {contents = [contents]}
for (var i = 0, m = contents.length; i < m; i++) {
if (MathJax.Object.isArray(contents[i])) {
obj.appendChild(this.Element(contents[i][0],contents[i][1],contents[i][2]));
} else if (type === "script") { // IE throws an error if script is added as a text node
this.setScript(obj, contents[i]);
} else {
obj.appendChild(document.createTextNode(contents[i]));
}
}
}
return obj;
},
ucMatch: function (match,c) {return c.toUpperCase()},
addElement: function (span,type,def,contents) {return span.appendChild(this.Element(type,def,contents))},
TextNode: function (text) {return document.createTextNode(text)},
addText: function (span,text) {return span.appendChild(this.TextNode(text))},
//
// Set and get the text of a script
//
setScript: function (script,text) {
if (this.setScriptBug) {script.text = text} else {
while (script.firstChild) {script.removeChild(script.firstChild)}
this.addText(script,text);
}
},
getScript: function (script) {return script.innerText}
}
/**********************************************************/
MathJax.Localization = {
locale: "en",
directory: "[MathJax]/localization",
strings: {
// Currently, this list is not modified by the MathJax-i18n script. You can
// run the following command in MathJax/unpacked/localization to update it:
//
// find . -name "*.js" | xargs grep menuTitle\: | grep -v qqq | sed 's/^\.\/\(.*\)\/.*\.js\: / "\1"\: \{/' | sed 's/,$/\},/' | sed 's/"English"/"English", isLoaded: true/' > tmp ; sort tmp > tmp2 ; sed '$ s/,$//' tmp2 ; rm tmp*
//
// This only takes languages with localization data so you must also add
// the languages that use a remap but are not translated at all.
//
"ast": {menuTitle: "asturianu"},
"bg": {menuTitle: "\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"},
"bcc": {menuTitle: "\u0628\u0644\u0648\u0686\u06CC"},
"br": {menuTitle: "brezhoneg"},
"ca": {menuTitle: "catal\u00E0"},
"cdo": {menuTitle: "M\u00ECng-d\u0115\u0324ng-ng\u1E73\u0304"},
"cs": {menuTitle: "\u010De\u0161tina"},
"da": {menuTitle: "dansk"},
"de": {menuTitle: "Deutsch"},
"en": {menuTitle: "English", isLoaded: true},
"eo": {menuTitle: "Esperanto"},
"es": {menuTitle: "espa\u00F1ol"},
"fa": {menuTitle: "\u0641\u0627\u0631\u0633\u06CC"},
"fi": {menuTitle: "suomi"},
"fr": {menuTitle: "fran\u00E7ais"},
"gl": {menuTitle: "galego"},
"he": {menuTitle: "\u05E2\u05D1\u05E8\u05D9\u05EA"},
"ia": {menuTitle: "interlingua"},
"it": {menuTitle: "italiano"},
"ja": {menuTitle: "\u65E5\u672C\u8A9E"},
"kn": {menuTitle: "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1"},
"ko": {menuTitle: "\uD55C\uAD6D\uC5B4"},
"lb": {menuTitle: "L\u00EBtzebuergesch"},
"lt": {menuTitle: "lietuvi\u0173"},
"mk": {menuTitle: "\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438"},
"nl": {menuTitle: "Nederlands"},
"oc": {menuTitle: "occitan"},
"pl": {menuTitle: "polski"},
"pt": {menuTitle: "portugus\u00EA"},
"pt-br": {menuTitle: "portugu\u00EAs do Brasil"},
"ru": {menuTitle: "\u0440\u0443\u0441\u0441\u043A\u0438\u0439"},
"sco": {menuTitle: "Scots"},
"scn": {menuTitle: "sicilianu"},
"sl": {menuTitle: "sloven\u0161\u010Dina"},
"sv": {menuTitle: "svenska"},
"tr": {menuTitle: "T\u00FCrk\u00E7e"},
"uk": {menuTitle: "\u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"},
"vi": {menuTitle: "Ti\u1EBFng Vi\u1EC7t"},
"zh-hans": {menuTitle: "\u4E2D\u6587\uFF08\u7B80\u4F53\uFF09"}
},
//
// The pattern for substitution escapes:
// %n or %{n} or %{plural:%n|option1|option1|...} or %c
//
pattern: /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g,
SPLIT: ("axb".split(/(x)/).length === 3 ?
function (string,regex) {return string.split(regex)} :
//
// IE8 and below don't do split() correctly when the pattern includes
// parentheses (the split should include the matched exrepssions).
// So implement it by hand here.
//
function (string,regex) {
var result = [], match, last = 0;
regex.lastIndex = 0;
while ((match = regex.exec(string))) {
result.push(string.substr(last,match.index-last));
result.push.apply(result,match.slice(1));
last = match.index + match[0].length;
}
result.push(string.substr(last));
return result;
}),
_: function (id,phrase) {
if (phrase instanceof Array) {return this.processSnippet(id,phrase)}
return this.processString(this.lookupPhrase(id,phrase),[].slice.call(arguments,2));
},
processString: function (string,args,domain) {
//
// Process arguments for substitution
// If the argument is a snippet (and we are processing snippets) do so,
// Otherwise, if it is a number, convert it for the lacale
//
var i, m;
for (i = 0, m = args.length; i < m; i++) {
if (domain && args[i] instanceof Array) {args[i] = this.processSnippet(domain,args[i])}
}
//
// Split string at escapes and process them individually
//
var parts = this.SPLIT(string,this.pattern);
for (i = 1, m = parts.length; i < m; i += 2) {
var c = parts[i].charAt(0); // first char will be { or \d or a char to be kept literally
if (c >= "0" && c <= "9") { // %n
parts[i] = args[parts[i]-1];
if (typeof parts[i] === "number") parts[i] = this.number(parts[i]);
} else if (c === "{") { // %{n} or %{plural:%n|...}
c = parts[i].substr(1);
if (c >= "0" && c <= "9") { // %{n}
parts[i] = args[parts[i].substr(1,parts[i].length-2)-1];
if (typeof parts[i] === "number") parts[i] = this.number(parts[i]);
} else { // %{plural:%n|...}
var match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
if (match) {
if (match[1] === "plural") {
var n = args[match[2]-1];
if (typeof n === "undefined") {
parts[i] = "???"; // argument doesn't exist
} else {
n = this.plural(n) - 1; // index of the form to use
var plurals = match[3].replace(/(^|[^%])(%%)*%\|/g,"$1$2%\uEFEF").split(/\|/); // the parts (replacing %| with a special character)
if (n >= 0 && n < plurals.length) {
parts[i] = this.processString(plurals[n].replace(/\uEFEF/g,"|"),args,domain);
} else {
parts[i] = "???"; // no string for this index
}
}
} else {parts[i] = "%"+parts[i]} // not "plural", put back the % and leave unchanged
}
}
}
if (parts[i] == null) {parts[i] = "???"}
}
//
// If we are not forming a snippet, return the completed string
//
if (!domain) {return parts.join("")}
//
// We need to return an HTML snippet, so buld it from the
// broken up string with inserted parts (that could be snippets)
//
var snippet = [], part = "";
for (i = 0; i < m; i++) {
part += parts[i]; i++; // add the string and move on to substitution result
if (i < m) {
if (parts[i] instanceof Array) { // substitution was a snippet
snippet.push(part); // add the accumulated string
snippet = snippet.concat(parts[i]); // concatenate the substution snippet
part = ""; // start accumulating a new string
} else { // substitution was a string
part += parts[i]; // add to accumulating string
}
}
}
if (part !== "") {snippet.push(part)} // add final string
return snippet;
},
processSnippet: function (domain,snippet) {
var result = []; // the new snippet
//
// Look through the original snippet for
// strings or snippets to translate
//
for (var i = 0, m = snippet.length; i < m; i++) {
if (snippet[i] instanceof Array) {
//
// This could be a sub-snippet:
// ["tag"] or ["tag",{properties}] or ["tag",{properties},snippet]
// Or it could be something to translate:
// [id,string,args] or [domain,snippet]
var data = snippet[i];
if (typeof data[1] === "string") { // [id,string,args]
var id = data[0]; if (!(id instanceof Array)) {id = [domain,id]}
var phrase = this.lookupPhrase(id,data[1]);
result = result.concat(this.processMarkdown(phrase,data.slice(2),domain));
} else if (data[1] instanceof Array) { // [domain,snippet]
result = result.concat(this.processSnippet.apply(this,data));
} else if (data.length >= 3) { // ["tag",{properties},snippet]
result.push([data[0],data[1],this.processSnippet(domain,data[2])]);
} else { // ["tag"] or ["tag",{properties}]
result.push(snippet[i]);
}
} else { // a string
result.push(snippet[i]);
}
}
return result;
},
markdownPattern: /(%.)|(\*{1,3})((?:%.|.)+?)\2|(`+)((?:%.|.)+?)\4|\[((?:%.|.)+?)\]\(([^\s\)]+)\)/,
// %c or *bold*, **italics**, ***bold-italics***, or `code`, or [link](url)
processMarkdown: function (phrase,args,domain) {
var result = [], data;
//
// Split the string by the Markdown pattern
// (the text blocks are separated by
// c,stars,star-text,backtics,code-text,link-text,URL).
// Start with teh first text string from the split.
//
var parts = phrase.split(this.markdownPattern);
var string = parts[0];
//
// Loop through the matches and process them
//
for (var i = 1, m = parts.length; i < m; i += 8) {
if (parts[i+1]) { // stars (for bold/italic)
//
// Select the tag to use by number of stars (three stars requires two tags)
//
data = this.processString(parts[i+2],args,domain);
if (!(data instanceof Array)) {data = [data]}
data = [["b","i","i"][parts[i+1].length-1],{},data]; // number of stars determines type
if (parts[i+1].length === 3) {data = ["b",{},data]} // bold-italic
} else if (parts[i+3]) { // backtics (for code)
//
// Remove one leading or trailing space, and process substitutions
// Make a tag
//
data = this.processString(parts[i+4].replace(/^\s/,"").replace(/\s$/,""),args,domain);
if (!(data instanceof Array)) {data = [data]}
data = ["code",{},data];
} else if (parts[i+5]) { // hyperlink
//
// Process the link text, and make an tag with the URL
//
data = this.processString(parts[i+5],args,domain);
if (!(data instanceof Array)) {data = [data]}
data = ["a",{href:this.processString(parts[i+6],args),target:"_blank"},data];
} else {
//
// Escaped character (%c) gets added into the string.
//
string += parts[i]; data = null;
}
//
// If there is a tag to insert,
// Add any pending string, then push the tag
//
if (data) {
result = this.concatString(result,string,args,domain);
result.push(data); string = "";
}
//
// Process the string that follows matches pattern
//
if (parts[i+7] !== "") {string += parts[i+7]}
};
//
// Add any pending string and return the resulting snippet
//
result = this.concatString(result,string,args,domain);
return result;
},
concatString: function (result,string,args,domain) {
if (string != "") {
//
// Process the substutions.
// If the result is not a snippet, turn it into one.
// Then concatenate the snippet to the current one
//
string = this.processString(string,args,domain);
if (!(string instanceof Array)) {string = [string]}
result = result.concat(string);
}
return result;
},
lookupPhrase: function (id,phrase,domain) {
//
// Get the domain and messageID
//
if (!domain) {domain = "_"}
if (id instanceof Array) {domain = (id[0] || "_"); id = (id[1] || "")}
//
// Check if the data is available and if not,
// load it and throw a restart error so the calling
// code can wait for the load and try again.
//
var load = this.loadDomain(domain);
if (load) {MathJax.Hub.RestartAfter(load)}
//
// Look up the message in the localization data
// (if not found, the original English is used)
//
var localeData = this.strings[this.locale];
if (localeData) {
if (localeData.domains && domain in localeData.domains) {
var domainData = localeData.domains[domain];
if (domainData.strings && id in domainData.strings)
{phrase = domainData.strings[id]}
}
}
//
// return the translated phrase
//
return phrase;
},
//
// Load a langauge data file from the proper
// directory and file.
//
loadFile: function (file,data,callback) {
callback = MathJax.Callback(callback);
file = (data.file || file); // the data's file name or the default name
if (!file.match(/\.js$/)) {file += ".js"} // add .js if needed
//
// Add the directory if the file doesn't
// contain a full URL already.
//
if (!file.match(/^([a-z]+:|\[MathJax\])/)) {
var dir = (this.strings[this.locale].directory ||
this.directory + "/" + this.locale ||
"[MathJax]/localization/" + this.locale);
file = dir + "/" + file;
}
//
// Load the file and mark the data as loaded (even if it
// failed to load, so we don't continue to try to load it
// over and over).
//
var load = MathJax.Ajax.Require(file,function () {data.isLoaded = true; return callback()});
//
// Return the callback if needed, otherwise null.
//
return (load.called ? null : load);
},
//
// Check to see if the localization data are loaded
// for the given domain; if not, load the data file,
// and return a callback for the loading operation.
// Otherwise return null (data are loaded).
//
loadDomain: function (domain,callback) {
var load, localeData = this.strings[this.locale];
if (localeData) {
if (!localeData.isLoaded) {
load = this.loadFile(this.locale,localeData);
if (load) {
return MathJax.Callback.Queue(
load,["loadDomain",this,domain] // call again to load domain
).Push(callback||{});
}
}
if (localeData.domains && domain in localeData.domains) {
var domainData = localeData.domains[domain];
if (!domainData.isLoaded) {
load = this.loadFile(domain,domainData);
if (load) {return MathJax.Callback.Queue(load).Push(callback)}
}
}
}
// localization data are loaded, so just do the callback
return MathJax.Callback(callback)();
},
//
// Perform a function, properly handling
// restarts due to localization file loads.
//
// Note that this may return before the function
// has been called successfully, so you should
// consider fn as running asynchronously. (Callbacks
// can be used to synchronize it with other actions.)
//
Try: function (fn) {
fn = MathJax.Callback(fn); fn.autoReset = true;
try {fn()} catch (err) {
if (!err.restart) {throw err}
MathJax.Callback.After(["Try",this,fn],err.restart);
}
},
//
// Reset the current language
//
resetLocale: function(locale) {
// Selection algorithm:
// 1) Downcase locale name (e.g. "en-US" => "en-us")
// 2) Try a parent language (e.g. "en-us" => "en")
// 3) Try the fallback specified in the data (e.g. "pt" => "pt-br")
// 4) Otherwise don't change the locale.
if (!locale) return;
locale = locale.toLowerCase();
while (!this.strings[locale]) {
var dashPos = locale.lastIndexOf("-");
if (dashPos === -1) return;
locale = locale.substring(0, dashPos);
}
var remap = this.strings[locale].remap;
this.locale = remap ? remap : locale;
},
//
// Set the current language
//
setLocale: function(locale) {
this.resetLocale(locale);
if (MathJax.Menu) {this.loadDomain("MathMenu")}
},
//
// Add or update a language or domain
//
addTranslation: function (locale,domain,definition) {
var data = this.strings[locale], isNew = false;
if (!data) {data = this.strings[locale] = {}; isNew = true}
if (!data.domains) {data.domains = {}}
if (domain) {
if (!data.domains[domain]) {data.domains[domain] = {}}
data = data.domains[domain];
}
MathJax.Hub.Insert(data,definition);
if (isNew && MathJax.Menu.menu) {MathJax.Menu.CreateLocaleMenu()}
},
//
// Set CSS for an element based on font requirements
//
setCSS: function (div) {
var locale = this.strings[this.locale];
if (locale) {
if (locale.fontFamily) {div.style.fontFamily = locale.fontFamily}
if (locale.fontDirection) {
div.style.direction = locale.fontDirection;
if (locale.fontDirection === "rtl") {div.style.textAlign = "right"}
}
}
return div;
},
//
// Get the language's font family or direction
//
fontFamily: function () {
var locale = this.strings[this.locale];
return (locale ? locale.fontFamily : null);
},
fontDirection: function () {
var locale = this.strings[this.locale];
return (locale ? locale.fontDirection : null);
},
//
// Get the language's plural index for a number
//
plural: function (n) {
var locale = this.strings[this.locale];
if (locale && locale.plural) {return locale.plural(n)}
// default
if (n == 1) {return 1} // one
return 2; // other
},
//
// Convert a number to language-specific form
//
number: function(n) {
var locale = this.strings[this.locale];
if (locale && locale.number) {return locale.number(n)}
// default
return n;
}
};
/**********************************************************/
MathJax.Message = {
localize: function (message) {
return MathJax.Localization._(message,message);
},
filterText: function (text,n,id) {
if (MathJax.Hub.config.messageStyle === "simple") {
if (id === "LoadFile") {
if (!this.loading) {this.loading = this.localize("Loading") + " "}
text = this.loading; this.loading += ".";
} else if (id === "ProcessMath") {
if (!this.processing) {this.processing = this.localize("Processing") + " "}
text = this.processing; this.processing += ".";
} else if (id === "TypesetMath") {
if (!this.typesetting) {this.typesetting = this.localize("Typesetting") + " "}
text = this.typesetting; this.typesetting += ".";
}
}
return text;
},
Set: function (text,n,clearDelay) {
if (MathJax.debug) {
if (Array.isArray(text)) {
text = MathJax.Localization._.apply(MathJax.Localization,text);
}
console.log("Message: "+text);
}
},
Clear: function (n,delay) {},
Remove: function () {},
File: function (file) {
return this.Set(["LoadFile","Loading %1",file],null,null);
},
Log: function () {}
};
/**********************************************************/
MathJax.Hub = {
config: {
root: "./legacy",
config: [], // list of configuration files to load
jax: [], // list of input and output jax to load
extensions: [], // list of extensions to load
preJax: null, // pattern to remove from before math script tag
postJax: null, // pattern to remove from after math script tag
displayAlign: 'center', // how to align displayed equations (left, center, right)
displayIndent: '0', // indentation for displayed equations (when not centered)
preRemoveClass: 'MathJax_Preview', // class of objects to remove preceeding math script
showProcessingMessages: true, // display "Processing math: nn%" messages or not
messageStyle: "normal", // set to "none" or "simple" (for "Loading..." and "Processing...")
delayStartupUntil: "none", // set to "onload" to delay setup until the onload handler runs
// set to "configured" to delay startup until MathJax.Hub.Configured() is called
// set to a Callback to wait for before continuing with the startup
skipStartupTypeset: false, // set to true to skip PreProcess and Process during startup
elements: [], // array of elements to process when none is given explicitly
positionToHash: true, // after initial typeset pass, position to #hash location?
showMathMenu: true, // attach math context menu to typeset math?
showMathMenuMSIE: true, // separtely determine if MSIE should have math menu
// (since the code for that is a bit delicate)
menuSettings: {
zoom: "None", // when to do MathZoom
CTRL: false, // require CTRL for MathZoom?
ALT: false, // require Alt or Option?
CMD: false, // require CMD?
Shift: false, // require Shift?
discoverable: false, // make math menu discoverable on hover?
zscale: "200%", // the scaling factor for MathZoom
renderer: null, // set when Jax are loaded
font: "Auto", // what font HTML-CSS should use
context: "MathJax", // or "Browser" for pass-through to browser menu
locale: null, // the language to use for messages
mpContext: false, // true means pass menu events to MathPlayer in IE
mpMouse: false, // true means pass mouse events to MathPlayer in IE
texHints: true, // include class names for TeXAtom elements
FastPreview: null, // use PreviewHTML output as preview?
assistiveMML: null, // include hidden MathML for screen readers?
inTabOrder: true, // set to false if math elements should be included in the tabindex
semantics: false // add semantics tag with original form in MathML output
},
errorSettings: {
// localized HTML snippet structure for message to use
message: ["[",["MathProcessingError","Math Processing Error"],"]"],
style: {color: "#CC0000", "font-style":"italic"} // style for message
},
ignoreMMLattributes: {} // attributes not to copy to HTML-CSS or SVG output
// from MathML input (in addition to the ones in MML.nocopyAttributes).
// An id set to true will be ignored, one set to false will
// be allowed (even if other criteria normally would prevent
// it from being copied); use false carefully!
},
preProcessors: MathJax.Callback.Hooks(true), // list of callbacks for preprocessing (initialized by extensions)
inputJax: {}, // mime-type mapped to input jax (by registration)
outputJax: {order:{}}, // mime-type mapped to output jax list (by registration)
processSectionDelay: 50, // pause between input and output phases of processing
processUpdateTime: 250, // time between screen updates when processing math (milliseconds)
processUpdateDelay: 10, // pause between screen updates to allow other processing (milliseconds)
signal: MathJax.Callback.Signal("Hub"), // Signal used for Hub events
Config: function (def) {
this.Insert(this.config,def);
if (this.config.Augment) {this.Augment(this.config.Augment)}
},
CombineConfig: function (name,def) {
var config = this.config, id, parent; name = name.split(/\./);
for (var i = 0, m = name.length; i < m; i++) {
id = name[i]; if (!config[id]) {config[id] = {}}
parent = config; config = config[id];
}
parent[id] = config = this.Insert(def,config);
return config;
},
Register: {
PreProcessor: function () {return MathJax.Hub.preProcessors.Add.apply(MathJax.Hub.preProcessors,arguments)},
MessageHook: function () {return MathJax.Hub.signal.MessageHook.apply(MathJax.Hub.signal,arguments)},
StartupHook: function () {return MathJax.Hub.Startup.signal.MessageHook.apply(MathJax.Hub.Startup.signal,arguments)},
LoadHook: function () {return MathJax.Ajax.LoadHook.apply(MathJax.Ajax,arguments)}
},
UnRegister: {
PreProcessor: function (hook) {MathJax.Hub.preProcessors.Remove(hook)},
MessageHook: function (hook) {MathJax.Hub.signal.RemoveHook(hook)},
StartupHook: function (hook) {MathJax.Hub.Startup.signal.RemoveHook(hook)},
LoadHook: function (hook) {MathJax.Ajax.removeHook(hook)}
},
setRenderer: function (renderer,type) {
if (!renderer) return;
if (!MathJax.OutputJax[renderer]) {
this.config.menuSettings.renderer = "";
var file = "[MathJax]/jax/output/"+renderer+"/config.js";
return MathJax.Ajax.Require(file,["setRenderer",this,renderer,type]);
} else {
this.config.menuSettings.renderer = renderer;
if (type == null) {type = "jax/mml"}
var jax = this.outputJax;
if (jax[type] && jax[type].length) {
if (renderer !== jax[type][0].id) {
jax[type].unshift(MathJax.OutputJax[renderer]);
return this.signal.Post(["Renderer Selected",renderer]);
}
}
return null;
}
},
Queue: function () {
return this.queue.Push.apply(this.queue,arguments);
},
RestartAfter: function (callback) {
throw this.Insert(Error("restart"),{restart: MathJax.Callback(callback)});
},
Insert: function (dst,src) {
for (var id in src) {if (src.hasOwnProperty(id)) {
// allow for concatenation of arrays?
if (typeof src[id] === 'object' && !(src[id] instanceof Array) &&
(typeof dst[id] === 'object' || typeof dst[id] === 'function')) {
this.Insert(dst[id],src[id]);
} else {
dst[id] = src[id];
}
}}
return dst;
},
// Old browsers (e.g. Internet Explorer <= 8) do not support trim().
SplitList: ("trim" in String.prototype ?
function (list) {return list.trim().split(/\s+/)} :
function (list) {return list.replace(/^\s+/,'').
replace(/\s+$/,'').split(/\s+/)})
};
//
// Storage area for extensions and preprocessors
//
MathJax.Extension = {};
MathJax.Hub.Startup = {
queue: MathJax.Callback.Queue(), // Queue used for startup actions
signal: MathJax.Callback.Signal("Startup") // Signal used for startup events
};
MathJax.Ajax.config.root = MathJax.Hub.config.root;
/**********************************************************/
(function (BASENAME) {
var BASE = window[BASENAME], ROOT = "["+BASENAME+"]";
var HUB = BASE.Hub, AJAX = BASE.Ajax, CALLBACK = BASE.Callback;
var JAX = MathJax.Object.Subclass({
JAXFILE: "jax.js",
require: null, // array of files to load before jax.js is complete
config: {},
//
// Make a subclass and return an instance of it.
// (FIXME: should we replace config with a copy of the constructor's
// config? Otherwise all subclasses share the same config structure.)
//
Init: function (def,cdef) {
if (arguments.length === 0) {return this}
return (this.constructor.Subclass(def,cdef))();
},
//
// Augment by merging with class definition (not replacing)
//
Augment: function (def,cdef) {
var cObject = this.constructor, ndef = {};
if (def != null) {
for (var id in def) {if (def.hasOwnProperty(id)) {
if (typeof def[id] === "function")
{cObject.protoFunction(id,def[id])} else {ndef[id] = def[id]}
}}
// MSIE doesn't list toString even if it is not native so handle it separately
if (def.toString !== cObject.prototype.toString && def.toString !== {}.toString)
{cObject.protoFunction('toString',def.toString)}
}
HUB.Insert(cObject.prototype,ndef);
cObject.Augment(null,cdef);
return this;
},
Translate: function (script,state) {
throw Error(this.directory+"/"+this.JAXFILE+" failed to define the Translate() method");
},
Register: function (mimetype) {},
Config: function () {
this.config = HUB.CombineConfig(this.id,this.config);
if (this.config.Augment) {this.Augment(this.config.Augment)}
},
Startup: function () {},
loadComplete: function (file) {
if (file === "config.js") {
return AJAX.loadComplete(this.directory+"/"+file);
} else {
var queue = CALLBACK.Queue();
queue.Push(
["Post",HUB.Startup.signal,this.id+" Jax Config"],
["Config",this],
["Post",HUB.Startup.signal,this.id+" Jax Startup"],
["Startup",this],
["Post",HUB.Startup.signal,this.id+" Jax Ready"]
);
if (this.copyTranslate) {
queue.Push(
[function (THIS) {
THIS.preProcess = THIS.preTranslate;
THIS.Process = THIS.Translate;
THIS.postProcess = THIS.postTranslate;
},this.constructor.prototype]
);
}
return queue.Push(["loadComplete",AJAX,this.directory+"/"+file]);
}
}
},{
id: "Jax",
version: "2.6.0",
directory: ROOT+"/jax",
extensionDir: ROOT+"/extensions"
});
/***********************************/
BASE.InputJax = JAX.Subclass({
elementJax: "mml", // the element jax to load for this input jax
sourceMenuTitle: /*_(MathMenu)*/ ["Original","Original Form"],
copyTranslate: true,
Process: function (script,state) {
throw Error("Input jax failed to load properly")
},
needsUpdate: function (jax) {
var script = jax.SourceElement();
return (jax.originalText !== BASE.HTML.getScript(script));
},
Register: function (mimetype) {
if (!HUB.inputJax) {HUB.inputJax = {}}
HUB.inputJax[mimetype] = this;
}
},{
id: "InputJax",
version: "2.6.0",
directory: JAX.directory+"/input",
extensionDir: JAX.extensionDir
});
/***********************************/
BASE.OutputJax = JAX.Subclass({
copyTranslate: true,
preProcess: function (state) {
throw Error("Output jax failed to load properly");
},
Register: function (mimetype) {
var jax = HUB.outputJax;
if (!jax[mimetype]) {jax[mimetype] = []}
// If the output jax is earlier in the original configuration list, put it first here
if (jax[mimetype].length && (this.id === HUB.config.menuSettings.renderer ||
(jax.order[this.id]||0) < (jax.order[jax[mimetype][0].id]||0)))
{jax[mimetype].unshift(this)} else {jax[mimetype].push(this)}
},
Remove: function (jax) {}
},{
id: "OutputJax",
version: "2.6.0",
directory: JAX.directory+"/output",
extensionDir: JAX.extensionDir,
fontDir: ROOT+(BASE.isPacked?"":"/..")+"/fonts",
imageDir: ROOT+(BASE.isPacked?"":"/..")+"/images"
});
/***********************************/
BASE.ElementJax = JAX.Subclass({
// make a subclass, not an instance
Init: function (def,cdef) {return this.constructor.Subclass(def,cdef)},
inputJax: null,
outputJax: null,
inputID: null,
originalText: "",
mimeType: "",
sourceMenuTitle: /*_(MathMenu)*/ ["MathMLcode","MathML Code"],
Text: function (text,callback) {
var script = this.SourceElement();
BASE.HTML.setScript(script,text);
script.MathJax.state = this.STATE.UPDATE;
return HUB.Update(script,callback);
},
Reprocess: function (callback) {
var script = this.SourceElement();
script.MathJax.state = this.STATE.UPDATE;
return HUB.Reprocess(script,callback);
},
Update: function (callback) {return this.Rerender(callback)},
Rerender: function (callback) {
var script = this.SourceElement();
script.MathJax.state = this.STATE.OUTPUT;
return HUB.Process(script,callback);
},
Remove: function (keep) {
if (this.hover) {this.hover.clear(this)}
BASE.OutputJax[this.outputJax].Remove(this);
if (!keep) {
HUB.signal.Post(["Remove Math",this.inputID]); // wait for this to finish?
this.Detach();
}
},
needsUpdate: function () {
return BASE.InputJax[this.inputJax].needsUpdate(this);
},
SourceElement: function () {return document.getElementById(this.inputID)},
Attach: function (script,inputJax) {
var jax = script.MathJax.elementJax;
if (script.MathJax.state === this.STATE.UPDATE) {
jax.Clone(this);
} else {
jax = script.MathJax.elementJax = this;
if (script.id) {this.inputID = script.id}
else {script.id = this.inputID = BASE.ElementJax.GetID(); this.newID = 1}
}
jax.originalText = BASE.HTML.getScript(script);
jax.inputJax = inputJax;
if (jax.root) {jax.root.inputID = jax.inputID}
return jax;
},
Detach: function () {
var script = this.SourceElement(); if (!script) return;
try {delete script.MathJax} catch(err) {script.MathJax = null}
if (this.newID) {script.id = ""}
},
Clone: function (jax) {
var id;
for (id in this) {
if (!this.hasOwnProperty(id)) continue;
if (typeof(jax[id]) === 'undefined' && id !== 'newID') {delete this[id]}
}
for (id in jax) {
if (!jax.hasOwnProperty(id)) continue;
if (typeof(this[id]) === 'undefined' || (this[id] !== jax[id] && id !== 'inputID'))
{this[id] = jax[id]}
}
}
},{
id: "ElementJax",
version: "2.6.0",
directory: JAX.directory+"/element",
extensionDir: JAX.extensionDir,
ID: 0, // jax counter (for IDs)
STATE: {
PENDING: 1, // script is identified as math but not yet processed
PROCESSED: 2, // script has been processed
UPDATE: 3, // elementJax should be updated
OUTPUT: 4 // output should be updated (input is OK)
},
GetID: function () {this.ID++; return "MathJax-Element-"+this.ID},
Subclass: function () {
var obj = JAX.Subclass.apply(this,arguments);
obj.loadComplete = this.prototype.loadComplete;
return obj;
}
});
BASE.ElementJax.prototype.STATE = BASE.ElementJax.STATE;
})("MathJax");
MathJax.Hub.Browser = {Select: function () {}};
/***/ }),
/***/ 124:
/***/ (() => {
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*************************************************************
*
* MathJax/jax/input/AsciiMath/jax.js
*
* An Input Jax for AsciiMath notation
* (see http://www1.chapman.edu/~jipsen/mathml/asciimath.html).
*
* Originally adapted for MathJax by David Lippman.
* Additional work done by Davide P. Cervone.
*
* The current development repository for AsciiMathML is
* https://github.com/mathjax/asciimathml
*
* A portion of this file is taken from
* ASCIIMathML.js Version 2.2 Mar 3, 2014, (c) Peter Jipsen http://www.chapman.edu/~jipsen
* and is used by permission of Peter Jipsen, who has agreed to allow us to
* release it under the Apache2 license (see below). That portion is indicated
* via comments.
*
* The remainder falls under the copyright that follows.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2012-2020 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function (ASCIIMATH) {
var MML; // Filled in later
//
// Make a documentFragment work-alike that uses MML objects
// rather than DOM objects.
//
var DOCFRAG = MathJax.Object.Subclass({
firstChild: null,
lastChild: null,
Init: function () {
this.childNodes = [];
},
appendChild: function (node) {
if (node.parent) {node.parent.removeChild(node)}
if (this.lastChild) {this.lastChild.nextSibling = node}
if (!this.firstChild) {this.firstChild = node}
this.childNodes.push(node); node.parent = this;
this.lastChild = node;
return node;
},
removeChild: function (node) {
for (var i = 0, m = this.childNodes.length; i < m; i++)
{if (this.childNodes[i] === node) break}
if (i === m) return;
this.childNodes.splice(i,1);
if (node === this.firstChild) {this.firstChild = node.nextSibling}
if (node === this.lastChild) {
if (!this.childNodes.length) {this.lastChild = null}
else {this.lastChild = this.childNodes[this.childNodes.length-1]}
}
if (i) {this.childNodes[i-1].nextSibling = node.nextSibling}
node.nextSibling = node.parent = null;
return node;
},
replaceChild: function (node,old) {
for (var i = 0, m = this.childNodes.length; i < m; i++)
{if (this.childNodes[i] === old) break}
if (i) {this.childNodes[i-1].nextSibling = node} else {this.firstChild = node}
if (i >= m-1) {this.lastChild = node}
this.childNodes[i] = node; node.nextSibling = old.nextSibling;
old.nextSibling = old.parent = null;
return old;
},
hasChildNodes: function (node) {
return (this.childNodes.length>0);
},
toString: function () {return "{"+this.childNodes.join("")+"}"}
});
var INITASCIIMATH = function () {
MML = MathJax.ElementJax.mml;
var MBASEINIT = MML.mbase.prototype.Init;
//
// Make MML elements looks like DOM elements (add the
// methods that AsciiMath needs)
//
MML.mbase.Augment({
firstChild: null,
lastChild: null,
nodeValue: null,
nextSibling: null,
Init: function () {
var obj = MBASEINIT.apply(this,arguments) || this;
obj.childNodes = obj.data;
obj.nodeName = obj.type;
return obj;
},
appendChild: function (node) {
if (node.parent) {node.parent.removeChild(node)}
var nodes = arguments;
if (node.isa(DOCFRAG)) {
nodes = node.childNodes;
node.data = node.childNodes = [];
node.firstChild = node.lastChild = null;
}
for (var i = 0, m = nodes.length; i < m; i++) {
node = nodes[i];
if (this.lastChild) {this.lastChild.nextSibling = node}
if (!this.firstChild) {this.firstChild = node}
this.Append(node);
this.lastChild = node;
}
return node;
},
removeChild: function (node) {
for (var i = 0, m = this.childNodes.length; i < m; i++)
{if (this.childNodes[i] === node) break}
if (i === m) return;
this.childNodes.splice(i,1);
if (node === this.firstChild) {this.firstChild = node.nextSibling}
if (node === this.lastChild) {
if (!this.childNodes.length) {this.lastChild = null}
else {this.lastChild = this.childNodes[this.childNodes.length-1]}
}
if (i) {this.childNodes[i-1].nextSibling = node.nextSibling}
node.nextSibling = node.parent = null;
return node;
},
replaceChild: function (node,old) {
for (var i = 0, m = this.childNodes.length; i < m; i++)
{if (this.childNodes[i] === old) break}
// FIXME: make this work with DOCFRAG's?
if (i) {this.childNodes[i-1].nextSibling = node} else {this.firstChild = node}
if (i >= m-1) {this.lastChild = node}
this.SetData(i,node); node.nextSibling = old.nextSibling;
old.nextSibling = old.parent = null;
return old;
},
hasChildNodes: function (node) {
return (this.childNodes.length>0);
},
setAttribute: function (name,value) {this[name] = value}
});
};
//
// Set up to isolate ASCIIMathML.js
//
var window = {}; // hide the true window
//
// Hide the true document, and add functions that
// use and produce MML objects instead of DOM objects
//
var document = {
getElementById: true,
createElementNS: function (ns,type) {
var node = MML[type]();
if (type === "mo" && ASCIIMATH.config.useMathMLspacing) {node.useMMLspacing = 0x80}
return node;
},
createTextNode: function (text) {return MML.chars(text).With({nodeValue:text})},
createDocumentFragment: function () {return DOCFRAG()}
};
var navigator = {appName: "MathJax"}; // hide the true navigator object
/******************************************************************
*
* The following section is ASCIIMathML.js Version 2.2
* (c) Peter Jipsen, used with permission.
*
* Some sections are commented out to save space in the
* minified version (but that is not strictly necessary).
*
******************************************************************/
/*
ASCIIMathML.js
==============
This file contains JavaScript functions to convert ASCII math notation
and (some) LaTeX to Presentation MathML. The conversion is done while the
HTML page loads, and should work with Firefox and other browsers that can
render MathML.
Just add the next line to your HTML page with this file in the same folder:
Version 2.2 Mar 3, 2014.
Latest version at https://github.com/mathjax/asciimathml
If you use it on a webpage, please send the URL to jipsen@chapman.edu
Copyright (c) 2014 Peter Jipsen and other ASCIIMathML.js contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
//var asciimath = {};
//(function(){
var mathcolor = "blue"; // change it to "" (to inherit) or another color
//var mathfontsize = "1em"; // change to e.g. 1.2em for larger math
//var mathfontfamily = "serif"; // change to "" to inherit (works in IE)
// or another family (e.g. "arial")
//var automathrecognize = false; // writing "amath" on page makes this true
//var checkForMathML = true; // check if browser can display MathML
//var notifyIfNoMathML = true; // display note at top if no MathML capability
//var alertIfNoMathML = false; // show alert box if no MathML capability
//var translateOnLoad = true; // set to false to do call translators from js
//var translateASCIIMath = true; // false to preserve `..`
var displaystyle = true; // puts limits above and below large operators
var showasciiformulaonhover = true; // helps students learn ASCIIMath
var decimalsign = "."; // change to "," if you like, beware of `(1,2)`!
//var AMdelimiter1 = "`", AMescape1 = "\\\\`"; // can use other characters
//var AMdocumentId = "wikitext" // PmWiki element containing math (default=body)
var fixphi = true; //false to return to legacy phi/varphi mapping
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
var isIE = (navigator.appName.slice(0,9)=="Microsoft");
/*
var noMathML = false, translated = false;
if (isIE) { // add MathPlayer info to IE webpages
document.write(" ");
document.write("");
}
// Add a stylesheet, replacing any previous custom stylesheet (adapted from TW)
function setStylesheet(s) {
var id = "AMMLcustomStyleSheet";
var n = document.getElementById(id);
if(document.createStyleSheet) {
// Test for IE's non-standard createStyleSheet method
if(n)
n.parentNode.removeChild(n);
// This failed without the
document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeEnd"," ");
} else {
if(n) {
n.replaceChild(document.createTextNode(s),n.firstChild);
} else {
n = document.createElement("style");
n.type = "text/css";
n.id = id;
n.appendChild(document.createTextNode(s));
document.getElementsByTagName("head")[0].appendChild(n);
}
}
}
setStylesheet("#AMMLcloseDiv \{font-size:0.8em; padding-top:1em; color:#014\}\n#AMMLwarningBox \{position:absolute; width:100%; top:0; left:0; z-index:200; text-align:center; font-size:1em; font-weight:bold; padding:0.5em 0 0.5em 0; color:#ffc; background:#c30\}");
function init(){
var msg, warnings = new Array();
if (document.getElementById==null){
alert("This webpage requires a recent browser such as Mozilla Firefox");
return null;
}
if (checkForMathML && (msg = checkMathML())) warnings.push(msg);
if (warnings.length>0) displayWarnings(warnings);
if (!noMathML) initSymbols();
return true;
}
function checkMathML(){
if (navigator.appName.slice(0,8)=="Netscape")
if (navigator.appVersion.slice(0,1)>="5") noMathML = null;
else noMathML = true;
else if (navigator.appName.slice(0,9)=="Microsoft")
try {
var ActiveX = new ActiveXObject("MathPlayer.Factory.1");
noMathML = null;
} catch (e) {
noMathML = true;
}
else if (navigator.appName.slice(0,5)=="Opera")
if (navigator.appVersion.slice(0,3)>="9.5") noMathML = null;
else noMathML = true;
//noMathML = true; //uncomment to check
if (noMathML && notifyIfNoMathML) {
var msg = "To view the ASCIIMathML notation use Internet Explorer + MathPlayer or Mozilla Firefox 2.0 or later.";
if (alertIfNoMathML)
alert(msg);
else return msg;
}
}
function hideWarning(){
var body = document.getElementsByTagName("body")[0];
body.removeChild(document.getElementById('AMMLwarningBox'));
body.onclick = null;
}
function displayWarnings(warnings) {
var i, frag, nd = createElementXHTML("div");
var body = document.getElementsByTagName("body")[0];
body.onclick=hideWarning;
nd.id = 'AMMLwarningBox';
for (i=0; i<", tag:"mo", output:"\u22C9", tex:"ltimes", ttype:CONST},
{input:"><|", tag:"mo", output:"\u22CA", tex:"rtimes", ttype:CONST},
{input:"|><|", tag:"mo", output:"\u22C8", tex:"bowtie", ttype:CONST},
{input:"-:", tag:"mo", output:"\u00F7", tex:"div", ttype:CONST},
{input:"divide", tag:"mo", output:"-:", tex:null, ttype:DEFINITION},
{input:"@", tag:"mo", output:"\u2218", tex:"circ", ttype:CONST},
{input:"o+", tag:"mo", output:"\u2295", tex:"oplus", ttype:CONST},
{input:"ox", tag:"mo", output:"\u2297", tex:"otimes", ttype:CONST},
{input:"o.", tag:"mo", output:"\u2299", tex:"odot", ttype:CONST},
{input:"sum", tag:"mo", output:"\u2211", tex:null, ttype:UNDEROVER},
{input:"prod", tag:"mo", output:"\u220F", tex:null, ttype:UNDEROVER},
{input:"^^", tag:"mo", output:"\u2227", tex:"wedge", ttype:CONST},
{input:"^^^", tag:"mo", output:"\u22C0", tex:"bigwedge", ttype:UNDEROVER},
{input:"vv", tag:"mo", output:"\u2228", tex:"vee", ttype:CONST},
{input:"vvv", tag:"mo", output:"\u22C1", tex:"bigvee", ttype:UNDEROVER},
{input:"nn", tag:"mo", output:"\u2229", tex:"cap", ttype:CONST},
{input:"nnn", tag:"mo", output:"\u22C2", tex:"bigcap", ttype:UNDEROVER},
{input:"uu", tag:"mo", output:"\u222A", tex:"cup", ttype:CONST},
{input:"uuu", tag:"mo", output:"\u22C3", tex:"bigcup", ttype:UNDEROVER},
//binary relation symbols
{input:"!=", tag:"mo", output:"\u2260", tex:"ne", ttype:CONST},
{input:":=", tag:"mo", output:":=", tex:null, ttype:CONST},
{input:"lt", tag:"mo", output:"<", tex:null, ttype:CONST},
{input:"<=", tag:"mo", output:"\u2264", tex:"le", ttype:CONST},
{input:"lt=", tag:"mo", output:"\u2264", tex:"leq", ttype:CONST},
{input:"gt", tag:"mo", output:">", tex:null, ttype:CONST},
{input:">=", tag:"mo", output:"\u2265", tex:"ge", ttype:CONST},
{input:"gt=", tag:"mo", output:"\u2265", tex:"geq", ttype:CONST},
{input:"-<", tag:"mo", output:"\u227A", tex:"prec", ttype:CONST},
{input:"-lt", tag:"mo", output:"\u227A", tex:null, ttype:CONST},
{input:">-", tag:"mo", output:"\u227B", tex:"succ", ttype:CONST},
{input:"-<=", tag:"mo", output:"\u2AAF", tex:"preceq", ttype:CONST},
{input:">-=", tag:"mo", output:"\u2AB0", tex:"succeq", ttype:CONST},
{input:"in", tag:"mo", output:"\u2208", tex:null, ttype:CONST},
{input:"!in", tag:"mo", output:"\u2209", tex:"notin", ttype:CONST},
{input:"sub", tag:"mo", output:"\u2282", tex:"subset", ttype:CONST},
{input:"sup", tag:"mo", output:"\u2283", tex:"supset", ttype:CONST},
{input:"sube", tag:"mo", output:"\u2286", tex:"subseteq", ttype:CONST},
{input:"supe", tag:"mo", output:"\u2287", tex:"supseteq", ttype:CONST},
{input:"-=", tag:"mo", output:"\u2261", tex:"equiv", ttype:CONST},
{input:"~=", tag:"mo", output:"\u2245", tex:"cong", ttype:CONST},
{input:"~~", tag:"mo", output:"\u2248", tex:"approx", ttype:CONST},
{input:"~", tag:"mo", output:"\u223C", tex:"sim", ttype:CONST},
{input:"prop", tag:"mo", output:"\u221D", tex:"propto", ttype:CONST},
//logical symbols
{input:"and", tag:"mtext", output:"and", tex:null, ttype:SPACE},
{input:"or", tag:"mtext", output:"or", tex:null, ttype:SPACE},
{input:"not", tag:"mo", output:"\u00AC", tex:"neg", ttype:CONST},
{input:"=>", tag:"mo", output:"\u21D2", tex:"implies", ttype:CONST},
{input:"if", tag:"mo", output:"if", tex:null, ttype:SPACE},
{input:"<=>", tag:"mo", output:"\u21D4", tex:"iff", ttype:CONST},
{input:"AA", tag:"mo", output:"\u2200", tex:"forall", ttype:CONST},
{input:"EE", tag:"mo", output:"\u2203", tex:"exists", ttype:CONST},
{input:"_|_", tag:"mo", output:"\u22A5", tex:"bot", ttype:CONST},
{input:"TT", tag:"mo", output:"\u22A4", tex:"top", ttype:CONST},
{input:"|--", tag:"mo", output:"\u22A2", tex:"vdash", ttype:CONST},
{input:"|==", tag:"mo", output:"\u22A8", tex:"models", ttype:CONST},
//grouping brackets
{input:"(", tag:"mo", output:"(", tex:"left(", ttype:LEFTBRACKET},
{input:")", tag:"mo", output:")", tex:"right)", ttype:RIGHTBRACKET},
{input:"[", tag:"mo", output:"[", tex:"left[", ttype:LEFTBRACKET},
{input:"]", tag:"mo", output:"]", tex:"right]", ttype:RIGHTBRACKET},
{input:"{", tag:"mo", output:"{", tex:null, ttype:LEFTBRACKET},
{input:"}", tag:"mo", output:"}", tex:null, ttype:RIGHTBRACKET},
{input:"|", tag:"mo", output:"|", tex:null, ttype:LEFTRIGHT},
{input:":|:", tag:"mo", output:"|", tex:null, ttype:CONST},
{input:"|:", tag:"mo", output:"|", tex:null, ttype:LEFTBRACKET},
{input:":|", tag:"mo", output:"|", tex:null, ttype:RIGHTBRACKET},
//{input:"||", tag:"mo", output:"||", tex:null, ttype:LEFTRIGHT},
{input:"(:", tag:"mo", output:"\u2329", tex:"langle", ttype:LEFTBRACKET},
{input:":)", tag:"mo", output:"\u232A", tex:"rangle", ttype:RIGHTBRACKET},
{input:"<<", tag:"mo", output:"\u2329", tex:null, ttype:LEFTBRACKET},
{input:">>", tag:"mo", output:"\u232A", tex:null, ttype:RIGHTBRACKET},
{input:"{:", tag:"mo", output:"{:", tex:null, ttype:LEFTBRACKET, invisible:true},
{input:":}", tag:"mo", output:":}", tex:null, ttype:RIGHTBRACKET, invisible:true},
//miscellaneous symbols
{input:"int", tag:"mo", output:"\u222B", tex:null, ttype:CONST},
{input:"dx", tag:"mi", output:"{:d x:}", tex:null, ttype:DEFINITION},
{input:"dy", tag:"mi", output:"{:d y:}", tex:null, ttype:DEFINITION},
{input:"dz", tag:"mi", output:"{:d z:}", tex:null, ttype:DEFINITION},
{input:"dt", tag:"mi", output:"{:d t:}", tex:null, ttype:DEFINITION},
{input:"oint", tag:"mo", output:"\u222E", tex:null, ttype:CONST},
{input:"del", tag:"mo", output:"\u2202", tex:"partial", ttype:CONST},
{input:"grad", tag:"mo", output:"\u2207", tex:"nabla", ttype:CONST},
{input:"+-", tag:"mo", output:"\u00B1", tex:"pm", ttype:CONST},
{input:"-+", tag:"mo", output:"\u2213", tex:"mp", ttype:CONST},
{input:"O/", tag:"mo", output:"\u2205", tex:"emptyset", ttype:CONST},
{input:"oo", tag:"mo", output:"\u221E", tex:"infty", ttype:CONST},
{input:"aleph", tag:"mo", output:"\u2135", tex:null, ttype:CONST},
{input:"...", tag:"mo", output:"...", tex:"ldots", ttype:CONST},
{input:":.", tag:"mo", output:"\u2234", tex:"therefore", ttype:CONST},
{input:":'", tag:"mo", output:"\u2235", tex:"because", ttype:CONST},
{input:"/_", tag:"mo", output:"\u2220", tex:"angle", ttype:CONST},
{input:"/_\\", tag:"mo", output:"\u25B3", tex:"triangle", ttype:CONST},
{input:"'", tag:"mo", output:"\u2032", tex:"prime", ttype:CONST},
{input:"tilde", tag:"mover", output:"~", tex:null, ttype:UNARY, acc:true},
{input:"\\ ", tag:"mo", output:"\u00A0", tex:null, ttype:CONST},
{input:"frown", tag:"mo", output:"\u2322", tex:null, ttype:CONST},
{input:"quad", tag:"mo", output:"\u00A0\u00A0", tex:null, ttype:CONST},
{input:"qquad", tag:"mo", output:"\u00A0\u00A0\u00A0\u00A0", tex:null, ttype:CONST},
{input:"cdots", tag:"mo", output:"\u22EF", tex:null, ttype:CONST},
{input:"vdots", tag:"mo", output:"\u22EE", tex:null, ttype:CONST},
{input:"ddots", tag:"mo", output:"\u22F1", tex:null, ttype:CONST},
{input:"diamond", tag:"mo", output:"\u22C4", tex:null, ttype:CONST},
{input:"square", tag:"mo", output:"\u25A1", tex:null, ttype:CONST},
{input:"|__", tag:"mo", output:"\u230A", tex:"lfloor", ttype:CONST},
{input:"__|", tag:"mo", output:"\u230B", tex:"rfloor", ttype:CONST},
{input:"|~", tag:"mo", output:"\u2308", tex:"lceiling", ttype:CONST},
{input:"~|", tag:"mo", output:"\u2309", tex:"rceiling", ttype:CONST},
{input:"CC", tag:"mo", output:"\u2102", tex:null, ttype:CONST},
{input:"NN", tag:"mo", output:"\u2115", tex:null, ttype:CONST},
{input:"QQ", tag:"mo", output:"\u211A", tex:null, ttype:CONST},
{input:"RR", tag:"mo", output:"\u211D", tex:null, ttype:CONST},
{input:"ZZ", tag:"mo", output:"\u2124", tex:null, ttype:CONST},
{input:"f", tag:"mi", output:"f", tex:null, ttype:UNARY, func:true},
{input:"g", tag:"mi", output:"g", tex:null, ttype:UNARY, func:true},
//standard functions
{input:"lim", tag:"mo", output:"lim", tex:null, ttype:UNDEROVER},
{input:"Lim", tag:"mo", output:"Lim", tex:null, ttype:UNDEROVER},
{input:"sin", tag:"mo", output:"sin", tex:null, ttype:UNARY, func:true},
{input:"cos", tag:"mo", output:"cos", tex:null, ttype:UNARY, func:true},
{input:"tan", tag:"mo", output:"tan", tex:null, ttype:UNARY, func:true},
{input:"sinh", tag:"mo", output:"sinh", tex:null, ttype:UNARY, func:true},
{input:"cosh", tag:"mo", output:"cosh", tex:null, ttype:UNARY, func:true},
{input:"tanh", tag:"mo", output:"tanh", tex:null, ttype:UNARY, func:true},
{input:"cot", tag:"mo", output:"cot", tex:null, ttype:UNARY, func:true},
{input:"sec", tag:"mo", output:"sec", tex:null, ttype:UNARY, func:true},
{input:"csc", tag:"mo", output:"csc", tex:null, ttype:UNARY, func:true},
{input:"arcsin", tag:"mo", output:"arcsin", tex:null, ttype:UNARY, func:true},
{input:"arccos", tag:"mo", output:"arccos", tex:null, ttype:UNARY, func:true},
{input:"arctan", tag:"mo", output:"arctan", tex:null, ttype:UNARY, func:true},
{input:"coth", tag:"mo", output:"coth", tex:null, ttype:UNARY, func:true},
{input:"sech", tag:"mo", output:"sech", tex:null, ttype:UNARY, func:true},
{input:"csch", tag:"mo", output:"csch", tex:null, ttype:UNARY, func:true},
{input:"exp", tag:"mo", output:"exp", tex:null, ttype:UNARY, func:true},
{input:"abs", tag:"mo", output:"abs", tex:null, ttype:UNARY, rewriteleftright:["|","|"]},
{input:"norm", tag:"mo", output:"norm", tex:null, ttype:UNARY, rewriteleftright:["\u2225","\u2225"]},
{input:"floor", tag:"mo", output:"floor", tex:null, ttype:UNARY, rewriteleftright:["\u230A","\u230B"]},
{input:"ceil", tag:"mo", output:"ceil", tex:null, ttype:UNARY, rewriteleftright:["\u2308","\u2309"]},
{input:"log", tag:"mo", output:"log", tex:null, ttype:UNARY, func:true},
{input:"ln", tag:"mo", output:"ln", tex:null, ttype:UNARY, func:true},
{input:"det", tag:"mo", output:"det", tex:null, ttype:UNARY, func:true},
{input:"dim", tag:"mo", output:"dim", tex:null, ttype:CONST},
{input:"mod", tag:"mo", output:"mod", tex:null, ttype:CONST},
{input:"gcd", tag:"mo", output:"gcd", tex:null, ttype:UNARY, func:true},
{input:"lcm", tag:"mo", output:"lcm", tex:null, ttype:UNARY, func:true},
{input:"lub", tag:"mo", output:"lub", tex:null, ttype:CONST},
{input:"glb", tag:"mo", output:"glb", tex:null, ttype:CONST},
{input:"min", tag:"mo", output:"min", tex:null, ttype:UNDEROVER},
{input:"max", tag:"mo", output:"max", tex:null, ttype:UNDEROVER},
{input:"Sin", tag:"mo", output:"Sin", tex:null, ttype:UNARY, func:true},
{input:"Cos", tag:"mo", output:"Cos", tex:null, ttype:UNARY, func:true},
{input:"Tan", tag:"mo", output:"Tan", tex:null, ttype:UNARY, func:true},
{input:"Arcsin", tag:"mo", output:"Arcsin", tex:null, ttype:UNARY, func:true},
{input:"Arccos", tag:"mo", output:"Arccos", tex:null, ttype:UNARY, func:true},
{input:"Arctan", tag:"mo", output:"Arctan", tex:null, ttype:UNARY, func:true},
{input:"Sinh", tag:"mo", output:"Sinh", tex:null, ttype:UNARY, func:true},
{input:"Cosh", tag:"mo", output:"Cosh", tex:null, ttype:UNARY, func:true},
{input:"Tanh", tag:"mo", output:"Tanh", tex:null, ttype:UNARY, func:true},
{input:"Cot", tag:"mo", output:"Cot", tex:null, ttype:UNARY, func:true},
{input:"Sec", tag:"mo", output:"Sec", tex:null, ttype:UNARY, func:true},
{input:"Csc", tag:"mo", output:"Csc", tex:null, ttype:UNARY, func:true},
{input:"Log", tag:"mo", output:"Log", tex:null, ttype:UNARY, func:true},
{input:"Ln", tag:"mo", output:"Ln", tex:null, ttype:UNARY, func:true},
{input:"Abs", tag:"mo", output:"abs", tex:null, ttype:UNARY, notexcopy:true, rewriteleftright:["|","|"]},
//arrows
{input:"uarr", tag:"mo", output:"\u2191", tex:"uparrow", ttype:CONST},
{input:"darr", tag:"mo", output:"\u2193", tex:"downarrow", ttype:CONST},
{input:"rarr", tag:"mo", output:"\u2192", tex:"rightarrow", ttype:CONST},
{input:"->", tag:"mo", output:"\u2192", tex:"to", ttype:CONST},
{input:">->", tag:"mo", output:"\u21A3", tex:"rightarrowtail", ttype:CONST},
{input:"->>", tag:"mo", output:"\u21A0", tex:"twoheadrightarrow", ttype:CONST},
{input:">->>", tag:"mo", output:"\u2916", tex:"twoheadrightarrowtail", ttype:CONST},
{input:"|->", tag:"mo", output:"\u21A6", tex:"mapsto", ttype:CONST},
{input:"larr", tag:"mo", output:"\u2190", tex:"leftarrow", ttype:CONST},
{input:"harr", tag:"mo", output:"\u2194", tex:"leftrightarrow", ttype:CONST},
{input:"rArr", tag:"mo", output:"\u21D2", tex:"Rightarrow", ttype:CONST},
{input:"lArr", tag:"mo", output:"\u21D0", tex:"Leftarrow", ttype:CONST},
{input:"hArr", tag:"mo", output:"\u21D4", tex:"Leftrightarrow", ttype:CONST},
//commands with argument
{input:"sqrt", tag:"msqrt", output:"sqrt", tex:null, ttype:UNARY},
{input:"root", tag:"mroot", output:"root", tex:null, ttype:BINARY},
{input:"frac", tag:"mfrac", output:"/", tex:null, ttype:BINARY},
{input:"/", tag:"mfrac", output:"/", tex:null, ttype:INFIX},
{input:"stackrel", tag:"mover", output:"stackrel", tex:null, ttype:BINARY},
{input:"overset", tag:"mover", output:"stackrel", tex:null, ttype:BINARY},
{input:"underset", tag:"munder", output:"stackrel", tex:null, ttype:BINARY},
{input:"_", tag:"msub", output:"_", tex:null, ttype:INFIX},
{input:"^", tag:"msup", output:"^", tex:null, ttype:INFIX},
{input:"hat", tag:"mover", output:"\u005E", tex:null, ttype:UNARY, acc:true},
{input:"bar", tag:"mover", output:"\u00AF", tex:"overline", ttype:UNARY, acc:true},
{input:"vec", tag:"mover", output:"\u2192", tex:null, ttype:UNARY, acc:true},
{input:"dot", tag:"mover", output:".", tex:null, ttype:UNARY, acc:true},
{input:"ddot", tag:"mover", output:"..", tex:null, ttype:UNARY, acc:true},
{input:"overarc", tag:"mover", output:"\u23DC", tex:"overparen", ttype:UNARY, acc:true},
{input:"ul", tag:"munder", output:"\u0332", tex:"underline", ttype:UNARY, acc:true},
{input:"ubrace", tag:"munder", output:"\u23DF", tex:"underbrace", ttype:UNARYUNDEROVER, acc:true},
{input:"obrace", tag:"mover", output:"\u23DE", tex:"overbrace", ttype:UNARYUNDEROVER, acc:true},
{input:"text", tag:"mtext", output:"text", tex:null, ttype:TEXT},
{input:"mbox", tag:"mtext", output:"mbox", tex:null, ttype:TEXT},
{input:"color", tag:"mstyle", ttype:BINARY},
{input:"id", tag:"mrow", ttype:BINARY},
{input:"class", tag:"mrow", ttype:BINARY},
{input:"cancel", tag:"menclose", output:"cancel", tex:null, ttype:UNARY},
AMquote,
{input:"bb", tag:"mstyle", atname:"mathvariant", atval:"bold", output:"bb", tex:null, ttype:UNARY},
{input:"mathbf", tag:"mstyle", atname:"mathvariant", atval:"bold", output:"mathbf", tex:null, ttype:UNARY},
{input:"sf", tag:"mstyle", atname:"mathvariant", atval:"sans-serif", output:"sf", tex:null, ttype:UNARY},
{input:"mathsf", tag:"mstyle", atname:"mathvariant", atval:"sans-serif", output:"mathsf", tex:null, ttype:UNARY},
{input:"bbb", tag:"mstyle", atname:"mathvariant", atval:"double-struck", output:"bbb", tex:null, ttype:UNARY, codes:AMbbb},
{input:"mathbb", tag:"mstyle", atname:"mathvariant", atval:"double-struck", output:"mathbb", tex:null, ttype:UNARY, codes:AMbbb},
{input:"cc", tag:"mstyle", atname:"mathvariant", atval:"script", output:"cc", tex:null, ttype:UNARY, codes:AMcal},
{input:"mathcal", tag:"mstyle", atname:"mathvariant", atval:"script", output:"mathcal", tex:null, ttype:UNARY, codes:AMcal},
{input:"tt", tag:"mstyle", atname:"mathvariant", atval:"monospace", output:"tt", tex:null, ttype:UNARY},
{input:"mathtt", tag:"mstyle", atname:"mathvariant", atval:"monospace", output:"mathtt", tex:null, ttype:UNARY},
{input:"fr", tag:"mstyle", atname:"mathvariant", atval:"fraktur", output:"fr", tex:null, ttype:UNARY, codes:AMfrk},
{input:"mathfrak", tag:"mstyle", atname:"mathvariant", atval:"fraktur", output:"mathfrak", tex:null, ttype:UNARY, codes:AMfrk}
];
function compareNames(s1,s2) {
if (s1.input > s2.input) return 1
else return -1;
}
var AMnames = []; //list of input symbols
function initSymbols() {
var i;
var symlen = AMsymbols.length;
for (i=0; i=n where str appears or would be inserted
// assumes arr is sorted
if (n==0) {
var h,m;
n = -1;
h = arr.length;
while (n+1> 1;
if (arr[m]=str
}
function AMgetSymbol(str) {
//return maximal initial substring of str that appears in names
//return null if there is none
var k = 0; //new pos
var j = 0; //old pos
var mk; //match pos
var st;
var tagst;
var match = "";
var more = true;
for (var i=1; i<=str.length && more; i++) {
st = str.slice(0,i); //initial substring of length i
j = k;
k = position(AMnames, st, j);
if (k=AMnames[k];
}
AMpreviousSymbol=AMcurrentSymbol;
if (match!=""){
AMcurrentSymbol=AMsymbols[mk].ttype;
return AMsymbols[mk];
}
// if str[0] is a digit or - return maxsubstring of digits.digits
AMcurrentSymbol=CONST;
k = 1;
st = str.slice(0,1);
var integ = true;
while ("0"<=st && st<="9" && k<=str.length) {
st = str.slice(k,k+1);
k++;
}
if (st == decimalsign) {
st = str.slice(k,k+1);
if ("0"<=st && st<="9") {
integ = false;
k++;
while ("0"<=st && st<="9" && k<=str.length) {
st = str.slice(k,k+1);
k++;
}
}
}
if ((integ && k>1) || k>2) {
st = str.slice(0,k-1);
tagst = "mn";
} else {
k = 2;
st = str.slice(0,1); //take 1 character
tagst = (("A">st || st>"Z") && ("a">st || st>"z")?"mo":"mi");
}
if (st=="-" && str.charAt(1)!==' ' && AMpreviousSymbol==INFIX) {
AMcurrentSymbol = INFIX; //trick "/" into recognizing "-" on second parse
return {input:st, tag:tagst, output:st, ttype:UNARY, func:true};
}
return {input:st, tag:tagst, output:st, ttype:CONST};
}
function AMremoveBrackets(node) {
var st;
if (!node.hasChildNodes()) { return; }
if (node.firstChild.hasChildNodes() && (node.nodeName=="mrow" || node.nodeName=="M:MROW")) {
st = node.firstChild.firstChild.nodeValue;
if (st=="(" || st=="[" || st=="{") node.removeChild(node.firstChild);
}
if (node.lastChild.hasChildNodes() && (node.nodeName=="mrow" || node.nodeName=="M:MROW")) {
st = node.lastChild.firstChild.nodeValue;
if (st==")" || st=="]" || st=="}") node.removeChild(node.lastChild);
}
}
/*Parsing ASCII math expressions with the following grammar
v ::= [A-Za-z] | greek letters | numbers | other constant symbols
u ::= sqrt | text | bb | other unary symbols for font commands
b ::= frac | root | stackrel binary symbols
l ::= ( | [ | { | (: | {: left brackets
r ::= ) | ] | } | :) | :} right brackets
S ::= v | lEr | uS | bSS Simple expression
I ::= S_S | S^S | S_S^S | S Intermediate expression
E ::= IE | I/I Expression
Each terminal symbol is translated into a corresponding mathml node.*/
var AMnestingDepth,AMpreviousSymbol,AMcurrentSymbol;
function AMparseSexpr(str) { //parses str and returns [node,tailstr]
var symbol, node, result, i, st,// rightvert = false,
newFrag = document.createDocumentFragment();
str = AMremoveCharsAndBlanks(str,0);
symbol = AMgetSymbol(str); //either a token or a bracket or empty
if (symbol == null || symbol.ttype == RIGHTBRACKET && AMnestingDepth > 0) {
return [null,str];
}
if (symbol.ttype == DEFINITION) {
str = symbol.output+AMremoveCharsAndBlanks(str,symbol.input.length);
symbol = AMgetSymbol(str);
}
switch (symbol.ttype) { case UNDEROVER:
case CONST:
str = AMremoveCharsAndBlanks(str,symbol.input.length);
return [createMmlNode(symbol.tag, //its a constant
document.createTextNode(symbol.output)),str];
case LEFTBRACKET: //read (expr+)
AMnestingDepth++;
str = AMremoveCharsAndBlanks(str,symbol.input.length);
result = AMparseExpr(str,true);
AMnestingDepth--;
if (typeof symbol.invisible == "boolean" && symbol.invisible)
node = createMmlNode("mrow",result[0]);
else {
node = createMmlNode("mo",document.createTextNode(symbol.output));
node = createMmlNode("mrow",node);
node.appendChild(result[0]);
}
return [node,result[1]];
case TEXT:
if (symbol!=AMquote) str = AMremoveCharsAndBlanks(str,symbol.input.length);
if (str.charAt(0)=="{") i=str.indexOf("}");
else if (str.charAt(0)=="(") i=str.indexOf(")");
else if (str.charAt(0)=="[") i=str.indexOf("]");
else if (symbol==AMquote) i=str.slice(1).indexOf("\"")+1;
else i = 0;
if (i==-1) i = str.length;
st = str.slice(1,i);
if (st.charAt(0) == " ") {
node = createMmlNode("mspace");
node.setAttribute("width","1ex");
newFrag.appendChild(node);
}
newFrag.appendChild(
createMmlNode(symbol.tag,document.createTextNode(st)));
if (st.charAt(st.length-1) == " ") {
node = createMmlNode("mspace");
node.setAttribute("width","1ex");
newFrag.appendChild(node);
}
str = AMremoveCharsAndBlanks(str,i+1);
return [createMmlNode("mrow",newFrag),str];
case UNARYUNDEROVER:
case UNARY:
str = AMremoveCharsAndBlanks(str,symbol.input.length);
result = AMparseSexpr(str);
if (result[0]==null) return [createMmlNode(symbol.tag,
document.createTextNode(symbol.output)),str];
if (typeof symbol.func == "boolean" && symbol.func) { // functions hack
st = str.charAt(0);
if (st=="^" || st=="_" || st=="/" || st=="|" || st=="," ||
(symbol.input.length==1 && symbol.input.match(/\w/) && st!="(")) {
return [createMmlNode(symbol.tag,
document.createTextNode(symbol.output)),str];
} else {
node = createMmlNode("mrow",
createMmlNode(symbol.tag,document.createTextNode(symbol.output)));
node.appendChild(result[0]);
return [node,result[1]];
}
}
AMremoveBrackets(result[0]);
if (symbol.input == "sqrt") { // sqrt
return [createMmlNode(symbol.tag,result[0]),result[1]];
} else if (typeof symbol.rewriteleftright != "undefined") { // abs, floor, ceil
node = createMmlNode("mrow", createMmlNode("mo",document.createTextNode(symbol.rewriteleftright[0])));
node.appendChild(result[0]);
node.appendChild(createMmlNode("mo",document.createTextNode(symbol.rewriteleftright[1])));
return [node,result[1]];
} else if (symbol.input == "cancel") { // cancel
node = createMmlNode(symbol.tag,result[0]);
node.setAttribute("notation","updiagonalstrike");
return [node,result[1]];
} else if (typeof symbol.acc == "boolean" && symbol.acc) { // accent
node = createMmlNode(symbol.tag,result[0]);
var accnode = createMmlNode("mo",document.createTextNode(symbol.output));
if (symbol.input=="vec" && (
(result[0].nodeName=="mrow" && result[0].childNodes.length==1
&& result[0].firstChild.firstChild.nodeValue !== null
&& result[0].firstChild.firstChild.nodeValue.length==1) ||
(result[0].firstChild.nodeValue !== null
&& result[0].firstChild.nodeValue.length==1) )) {
accnode.setAttribute("stretchy",false);
}
node.appendChild(accnode);
return [node,result[1]];
} else { // font change command
if (!isIE && typeof symbol.codes != "undefined") {
for (i=0; i64 && st.charCodeAt(j)<91)
newst = newst + symbol.codes[st.charCodeAt(j)-65];
else if (st.charCodeAt(j)>96 && st.charCodeAt(j)<123)
newst = newst + symbol.codes[st.charCodeAt(j)-71];
else newst = newst + st.charAt(j);
if (result[0].nodeName=="mi")
result[0]=createMmlNode("mo").
appendChild(document.createTextNode(newst));
else result[0].replaceChild(createMmlNode("mo").
appendChild(document.createTextNode(newst)),
result[0].childNodes[i]);
}
}
node = createMmlNode(symbol.tag,result[0]);
node.setAttribute(symbol.atname,symbol.atval);
return [node,result[1]];
}
case BINARY:
str = AMremoveCharsAndBlanks(str,symbol.input.length);
result = AMparseSexpr(str);
if (result[0]==null) return [createMmlNode("mo",
document.createTextNode(symbol.input)),str];
AMremoveBrackets(result[0]);
var result2 = AMparseSexpr(result[1]);
if (result2[0]==null) return [createMmlNode("mo",
document.createTextNode(symbol.input)),str];
AMremoveBrackets(result2[0]);
if (['color', 'class', 'id'].indexOf(symbol.input) >= 0) {
// Get the second argument
if (str.charAt(0)=="{") i=str.indexOf("}");
else if (str.charAt(0)=="(") i=str.indexOf(")");
else if (str.charAt(0)=="[") i=str.indexOf("]");
st = str.slice(1,i);
// Make a mathml node
node = createMmlNode(symbol.tag,result2[0]);
// Set the correct attribute
if (symbol.input === "color") node.setAttribute("mathcolor", st)
else if (symbol.input === "class") node.setAttribute("class", st)
else if (symbol.input === "id") node.setAttribute("id", st)
return [node,result2[1]];
}
if (symbol.input=="root" || symbol.output=="stackrel")
newFrag.appendChild(result2[0]);
newFrag.appendChild(result[0]);
if (symbol.input=="frac") newFrag.appendChild(result2[0]);
return [createMmlNode(symbol.tag,newFrag),result2[1]];
case INFIX:
str = AMremoveCharsAndBlanks(str,symbol.input.length);
return [createMmlNode("mo",document.createTextNode(symbol.output)),str];
case SPACE:
str = AMremoveCharsAndBlanks(str,symbol.input.length);
node = createMmlNode("mspace");
node.setAttribute("width","1ex");
newFrag.appendChild(node);
newFrag.appendChild(
createMmlNode(symbol.tag,document.createTextNode(symbol.output)));
node = createMmlNode("mspace");
node.setAttribute("width","1ex");
newFrag.appendChild(node);
return [createMmlNode("mrow",newFrag),str];
case LEFTRIGHT:
// if (rightvert) return [null,str]; else rightvert = true;
AMnestingDepth++;
str = AMremoveCharsAndBlanks(str,symbol.input.length);
result = AMparseExpr(str,false);
AMnestingDepth--;
st = "";
if (result[0].lastChild!=null)
st = result[0].lastChild.firstChild.nodeValue;
if (st == "|" && str.charAt(0)!==",") { // its an absolute value subterm
node = createMmlNode("mo",document.createTextNode(symbol.output));
node = createMmlNode("mrow",node);
node.appendChild(result[0]);
return [node,result[1]];
} else { // the "|" is a \mid so use unicode 2223 (divides) for spacing
node = createMmlNode("mo",document.createTextNode("\u2223"));
node = createMmlNode("mrow",node);
return [node,str];
}
default:
//alert("default");
str = AMremoveCharsAndBlanks(str,symbol.input.length);
return [createMmlNode(symbol.tag, //its a constant
document.createTextNode(symbol.output)),str];
}
}
function AMparseIexpr(str) {
var symbol, sym1, sym2, node, result, underover;
str = AMremoveCharsAndBlanks(str,0);
sym1 = AMgetSymbol(str);
result = AMparseSexpr(str);
node = result[0];
str = result[1];
symbol = AMgetSymbol(str);
if (symbol.ttype == INFIX && symbol.input != "/") {
str = AMremoveCharsAndBlanks(str,symbol.input.length);
// if (symbol.input == "/") result = AMparseIexpr(str); else ...
result = AMparseSexpr(str);
if (result[0] == null) // show box in place of missing argument
result[0] = createMmlNode("mo",document.createTextNode("\u25A1"));
else AMremoveBrackets(result[0]);
str = result[1];
// if (symbol.input == "/") AMremoveBrackets(node);
underover = (sym1.ttype == UNDEROVER || sym1.ttype == UNARYUNDEROVER);
if (symbol.input == "_") {
sym2 = AMgetSymbol(str);
if (sym2.input == "^") {
str = AMremoveCharsAndBlanks(str,sym2.input.length);
var res2 = AMparseSexpr(str);
AMremoveBrackets(res2[0]);
str = res2[1];
node = createMmlNode((underover?"munderover":"msubsup"),node);
node.appendChild(result[0]);
node.appendChild(res2[0]);
node = createMmlNode("mrow",node); // so sum does not stretch
} else {
node = createMmlNode((underover?"munder":"msub"),node);
node.appendChild(result[0]);
}
} else if (symbol.input == "^" && underover) {
node = createMmlNode("mover",node);
node.appendChild(result[0]);
} else {
node = createMmlNode(symbol.tag,node);
node.appendChild(result[0]);
}
if (typeof sym1.func != 'undefined' && sym1.func) {
sym2 = AMgetSymbol(str);
if (sym2.ttype != INFIX && sym2.ttype != RIGHTBRACKET &&
(sym1.input.length>1 || sym2.ttype == LEFTBRACKET)) {
result = AMparseIexpr(str);
node = createMmlNode("mrow",node);
node.appendChild(result[0]);
str = result[1];
}
}
}
return [node,str];
}
function AMparseExpr(str,rightbracket) {
var symbol, node, result, i,
newFrag = document.createDocumentFragment();
do {
str = AMremoveCharsAndBlanks(str,0);
result = AMparseIexpr(str);
node = result[0];
str = result[1];
symbol = AMgetSymbol(str);
if (symbol.ttype == INFIX && symbol.input == "/") {
str = AMremoveCharsAndBlanks(str,symbol.input.length);
result = AMparseIexpr(str);
if (result[0] == null) // show box in place of missing argument
result[0] = createMmlNode("mo",document.createTextNode("\u25A1"));
else AMremoveBrackets(result[0]);
str = result[1];
AMremoveBrackets(node);
node = createMmlNode(symbol.tag,node);
node.appendChild(result[0]);
newFrag.appendChild(node);
symbol = AMgetSymbol(str);
}
else if (node!=undefined) newFrag.appendChild(node);
} while ((symbol.ttype != RIGHTBRACKET &&
(symbol.ttype != LEFTRIGHT || rightbracket)
|| AMnestingDepth == 0) && symbol!=null && symbol.output!="");
if (symbol.ttype == RIGHTBRACKET || symbol.ttype == LEFTRIGHT) {
// if (AMnestingDepth > 0) AMnestingDepth--;
var len = newFrag.childNodes.length;
if (len>0 && newFrag.childNodes[len-1].nodeName == "mrow"
&& newFrag.childNodes[len-1].lastChild
&& newFrag.childNodes[len-1].lastChild.firstChild ) { //matrix
//removed to allow row vectors: //&& len>1 &&
//newFrag.childNodes[len-2].nodeName == "mo" &&
//newFrag.childNodes[len-2].firstChild.nodeValue == ","
var right = newFrag.childNodes[len-1].lastChild.firstChild.nodeValue;
if (right==")" || right=="]") {
var left = newFrag.childNodes[len-1].firstChild.firstChild.nodeValue;
if (left=="(" && right==")" && symbol.output != "}" ||
left=="[" && right=="]") {
var pos = []; // positions of commas
var matrix = true;
var m = newFrag.childNodes.length;
for (i=0; matrix && i1) matrix = pos[i].length == pos[i-2].length;
}
matrix = matrix && (pos.length>1 || pos[0].length>0);
var columnlines = [];
if (matrix) {
var row, frag, n, k, table = document.createDocumentFragment();
for (i=0; i(-,-,...,-,-)
n = node.childNodes.length;
k = 0;
node.removeChild(node.firstChild); //remove (
for (j=1; j2) {
newFrag.removeChild(newFrag.firstChild); //remove )
newFrag.removeChild(newFrag.firstChild); //remove ,
}
table.appendChild(createMmlNode("mtr",row));
}
node = createMmlNode("mtable",table);
node.setAttribute("columnlines", columnlines.join(" "));
if (typeof symbol.invisible == "boolean" && symbol.invisible) node.setAttribute("columnalign","left");
newFrag.replaceChild(node,newFrag.firstChild);
}
}
}
}
str = AMremoveCharsAndBlanks(str,symbol.input.length);
if (typeof symbol.invisible != "boolean" || !symbol.invisible) {
node = createMmlNode("mo",document.createTextNode(symbol.output));
newFrag.appendChild(node);
}
}
return [newFrag,str];
}
function parseMath(str,latex) {
var frag, node;
AMnestingDepth = 0;
//some basic cleanup for dealing with stuff editors like TinyMCE adds
str = str.replace(/ /g,"");
str = str.replace(/>/g,">");
str = str.replace(/</g,"<");
frag = AMparseExpr(str.replace(/^\s+/g,""),false)[0];
node = createMmlNode("mstyle",frag);
if (mathcolor != "") node.setAttribute("mathcolor",mathcolor);
if (mathfontsize != "") {
node.setAttribute("fontsize", mathfontsize);
node.setAttribute("mathsize", mathfontsize);
}
if (mathfontfamily != "") {
node.setAttribute("fontfamily", mathfontfamily);
node.setAttribute("mathvariant", mathfontfamily);
}
if (displaystyle) node.setAttribute("displaystyle","true");
node = createMmlNode("math",node);
if (showasciiformulaonhover) //fixed by djhsu so newline
node.setAttribute("title",str.replace(/\s+/g," "));//does not show in Gecko
return node;
}
/*
function strarr2docFrag(arr, linebreaks, latex) {
var newFrag=document.createDocumentFragment();
var expr = false;
for (var i=0; i,\\|!:;'~]|\\.(?!(?:\x20|$))|"+ambigAMtoken+englishAMtoken+simpleAMtoken;
var re = new RegExp("(^|\\s)((("+token+")\\s?)(("+token+secondenglishAMtoken+")\\s?)+)([,.?]?(?=\\s|$))","g");
str = str.replace(re," `$2`$7");
var arr = str.split(AMdelimiter1);
var re1 = new RegExp("(^|\\s)([b-zB-HJ-Z+*<>]|"+texcommand+ambigAMtoken+simpleAMtoken+")(\\s|\\n|$)","g");
var re2 = new RegExp("(^|\\s)([a-z]|"+texcommand+ambigAMtoken+simpleAMtoken+")([,.])","g"); // removed |\d+ for now
for (i=0; i1 || mtch) {
if (!noMathML) {
frg = strarr2docFrag(arr,n.nodeType==8,latex);
var len = frg.childNodes.length;
n.parentNode.replaceChild(frg,n);
return len-1;
} else return 0;
}
}
} else return 0;
} else if (n.nodeName!="math") {
for (i=0; i {
(function () {
var MML = MathJax.ElementJax.mml;
var PROPERTY = [
'texWithDelims',
'movesupsub',
'subsupOK',
'primes',
'movablelimits',
'scriptlevel',
'open',
'close',
'isError',
'multiline',
'variantForm',
'autoOP',
'fnOP'
];
var RENAME = {
texWithDelims: 'withDelims'
};
MML.mbase.Augment({
toMmlNode: function (factory) {
var kind = this.type;
if (kind === 'texatom') kind = 'TeXAtom';
if (kind === 'text') kind = '#text';
var node = this.nodeMake(factory, kind);
if ("texClass" in this) node.texClass = this.texClass;
return node;
},
nodeMake: function (factory,kind) {
var node = factory.MML[kind === 'TeXmathchoice' ? 'mathchoice' : kind]();
var data = (this.data[0] && this.data[0].inferred && this.inferRow ? this.data[0].data : this.data);
for (var i = 0, m = data.length; i < m; i++) {
var child = data[i];
if (child) node.appendChild(child.toMmlNode(factory));
}
this.nodeAddAttributes(node);
this.nodeAddProperties(node);
return node;
},
nodeAddAttributes: function (node) {
var defaults = (this.type === "mstyle" ? MML.math.prototype.defaults : this.defaults);
var names = (this.attrNames||MML.copyAttributeNames),
skip = MML.skipAttributes,
copy = MML.copyAttributes;
if (!this.attrNames) {
for (var id in defaults) {
if (!skip[id] && !copy[id] && defaults.hasOwnProperty(id)) {
if (this[id] != null && this[id] !== defaults[id]) {
if (this.Get(id,null,1) !== this[id]) node.attributes.set(id,this[id]);
}
}
}
if (this['class']) node.attributes.set('class',this['class']);
}
for (var i = 0, m = names.length; i < m; i++) {
if (copy[names[i]] === 1 && !defaults.hasOwnProperty(names[i])) continue;
var value = (this.attr||{})[names[i]];
if (value == null) value = this[names[i]];
if (value === 'true' || value === 'false') value = (value === 'true');
if (value != null) node.attributes.set(names[i],value);
}
},
nodeAddProperties: function (node) {
for (var i = 0, m = PROPERTY.length; i < m; i++) {
var name = PROPERTY[i];
if (this[name] != null &&
(this.defaults[name] == null || this.defaults[name] === MML.AUTO)) {
node.setProperty(RENAME[name] || name, this[name]);
}
}
}
});
MML.chars.Augment({
toMmlNode: function (factory) {
return factory.MML.text().setText(this.data.join(""));
}
});
MML.entity.Augment({
toMmlNode: function (factory) {
return factory.MML.text().setText(this.toString());
}
});
MML.msubsup.Augment({
toMmlNode: function (factory) {
var kind = (this.data[this.sub] == null ? 'msup' :
this.data[this.sup] == null ? 'msub' : 'msubsup');
return this.nodeMake(factory, kind);
}
});
MML.munderover.Augment({
toMmlNode: function (factory) {
var kind = (this.data[this.under] == null ? 'mover' :
this.data[this.over] == null ? 'munder' : 'munderover');
return this.nodeMake(factory, kind);
}
});
MML.xml.Augment({
toMmlNode: function (factory) {
return factory.MML.xml(this.data);
}
});
})();
/***/ }),
/***/ 625:
/***/ (() => {
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*************************************************************
*
* MathJax/jax/input/AsciiMath/config.js
*
* Initializes the AsciiMath InputJax (the main definition is in
* MathJax/jax/input/AsciiMath/jax.js, which is loaded when needed).
*
* Originally adapted for MathJax by David Lippman.
* Additional work done by Davide P. Cervone.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2012-2017 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.InputJax.AsciiMath = MathJax.InputJax({
id: "AsciiMath",
version: "2.7.2",
directory: MathJax.InputJax.directory + "/AsciiMath",
extensionDir: MathJax.InputJax.extensionDir + "/AsciiMath",
config: {
fixphi: true, // switch phi and varphi unicode values
useMathMLspacing: true, // use MathML spacing rather than TeX spacing?
displaystyle: true, // put limits above and below operators
decimalsign: "." // can change to "," but watch out for "(1,2)"
}
});
MathJax.InputJax.AsciiMath.Register("math/asciimath");
MathJax.InputJax.AsciiMath.loadComplete("config.js");
/***/ }),
/***/ 885:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
MathJax = Object.assign(__webpack_require__.g.MathJax || {}, (__webpack_require__(123)/* .MathJax */ .E));
//
// Load component-based configuration, if any
//
if (MathJax.config && MathJax.config.asciimath) {
MathJax.Hub.Config({AsciiMath: MathJax.config.asciimath});
}
MathJax.Ajax.Preloading(
"[MathJax]/jax/input/AsciiMath/config.js",
"[MathJax]/jax/input/AsciiMath/jax.js",
"[MathJax]/jax/element/mml/jax.js"
);
__webpack_require__(15);
__webpack_require__(625);
__webpack_require__(124);
__webpack_require__(287);
module.exports.m = MathJax.InputJax.AsciiMath;
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
(() => {
"use strict";
// NAMESPACE OBJECT: ./mjs/input/asciimath/legacy.js
var legacy_namespaceObject = {};
__webpack_require__.r(legacy_namespaceObject);
__webpack_require__.d(legacy_namespaceObject, {
LegacyAsciiMath: () => (LegacyAsciiMath)
});
// NAMESPACE OBJECT: ./mjs/input/asciimath/FindAsciiMath.js
var FindAsciiMath_namespaceObject = {};
__webpack_require__.r(FindAsciiMath_namespaceObject);
__webpack_require__.d(FindAsciiMath_namespaceObject, {
FindAsciiMath: () => (FindAsciiMath)
});
// NAMESPACE OBJECT: ./mjs/input/asciimath.js
var asciimath_namespaceObject = {};
__webpack_require__.r(asciimath_namespaceObject);
__webpack_require__.d(asciimath_namespaceObject, {
AsciiMath: () => (AsciiMath)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/core/lib/core/InputJax.js
const InputJax_def = MathJax._.core.InputJax;
const AbstractInputJax = InputJax_def.AbstractInputJax;
// EXTERNAL MODULE: ./mjs/input/asciimath/legacy/shim.js
var shim = __webpack_require__(885);
;// ./components/mjs/core/lib/core/MmlTree/MmlFactory.js
const MmlFactory_def = MathJax._.core.MmlTree.MmlFactory;
const MmlFactory = MmlFactory_def.MmlFactory;
;// ./mjs/input/asciimath/legacy.js
const factory = new MmlFactory();
const LegacyAsciiMath = {
Compile: function (am, display) {
const script = {
type: 'math/asciimath',
innerText: am,
MathJax: {},
};
const node = shim/* AsciiMath */.m.Translate(script).root.toMmlNode(factory);
node.setInheritedAttributes({}, display, 0, false);
return node;
},
Translate: function (am, display) {
return this.Compile(am, display);
},
};
//# sourceMappingURL=legacy.js.map
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./components/mjs/core/lib/core/FindMath.js
const FindMath_def = MathJax._.core.FindMath;
const AbstractFindMath = FindMath_def.AbstractFindMath;
;// ./components/mjs/core/lib/util/string.js
const string_def = MathJax._.util.string;
const sortLength = string_def.sortLength;
const quotePattern = string_def.quotePattern;
const unicodeChars = string_def.unicodeChars;
const unicodeString = string_def.unicodeString;
const isPercent = string_def.isPercent;
const split = string_def.split;
const replaceUnicode = string_def.replaceUnicode;
const toEntity = string_def.toEntity;
;// ./components/mjs/core/lib/core/MathItem.js
const MathItem_def = MathJax._.core.MathItem;
const protoItem = MathItem_def.protoItem;
const AbstractMathItem = MathItem_def.AbstractMathItem;
const STATE = MathItem_def.STATE;
const newState = MathItem_def.newState;
;// ./mjs/input/asciimath/FindAsciiMath.js
class FindAsciiMath extends AbstractFindMath {
constructor(options) {
super(options);
this.getPatterns();
}
getPatterns() {
const options = this.options;
const starts = [];
this.end = {};
options['delimiters'].forEach((delims) => this.addPattern(starts, delims, false));
this.start = new RegExp(starts.join('|'), 'g');
this.hasPatterns = starts.length > 0;
}
addPattern(starts, delims, display) {
const [open, close] = delims;
starts.push(quotePattern(open));
this.end[open] = [close, display, new RegExp(quotePattern(close), 'g')];
}
findEnd(text, n, start, end) {
const [, display, pattern] = end;
const i = (pattern.lastIndex = start.index + start[0].length);
const match = pattern.exec(text);
return !match
? null
: protoItem(start[0], match.index < i ? '' : text.substring(i, match.index), match[0], n, start.index, match.index + match[0].length, display);
}
findMathInString(math, n, text) {
let start, match;
this.start.lastIndex = 0;
while ((start = this.start.exec(text))) {
match = this.findEnd(text, n, start, this.end[start[0]]);
if (match) {
math.push(match);
this.start.lastIndex = match.end.n;
}
}
}
findMath(strings) {
const math = [];
if (this.hasPatterns) {
for (let i = 0, m = strings.length; i < m; i++) {
this.findMathInString(math, i, strings[i]);
}
}
return math;
}
}
FindAsciiMath.OPTIONS = {
delimiters: [['`', '`']],
};
//# sourceMappingURL=FindAsciiMath.js.map
;// ./mjs/input/asciimath.js
class AsciiMath extends AbstractInputJax {
constructor(options) {
const [, find, am] = separateOptions(options, FindAsciiMath.OPTIONS, AsciiMath.OPTIONS);
super(am);
this.findAsciiMath =
this.options['FindAsciiMath'] || new FindAsciiMath(find);
}
compile(math, _document) {
return LegacyAsciiMath.Compile(math.math, math.display);
}
findMath(strings) {
return this.findAsciiMath.findMath(strings);
}
}
AsciiMath.NAME = 'AsciiMath';
AsciiMath.OPTIONS = Object.assign(Object.assign({}, AbstractInputJax.OPTIONS), { FindAsciiMath: null });
//# sourceMappingURL=asciimath.js.map
;// ./components/mjs/input/asciimath/lib/asciimath.js
if (MathJax.loader) {
MathJax.loader.checkVersion('input/asciimath', VERSION, 'input');
}
combineWithMathJax({_: {
input: {
asciimath_ts: asciimath_namespaceObject,
asciimath: {
FindAsciiMath: FindAsciiMath_namespaceObject,
legacy_ts: legacy_namespaceObject
}
}
}});
;// ./components/mjs/input/asciimath/asciimath.js
if (MathJax.startup) {
MathJax.startup.registerConstructor('asciimath', AsciiMath);
MathJax.startup.useInput('asciimath');
}
})();
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex.js 0000644 0001762 0000144 00001131577 15112352621 017560 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/FindTeX.js
var FindTeX_namespaceObject = {};
__webpack_require__.r(FindTeX_namespaceObject);
__webpack_require__.d(FindTeX_namespaceObject, {
FindTeX: () => (FindTeX)
});
// NAMESPACE OBJECT: ./mjs/input/tex/NodeUtil.js
var NodeUtil_namespaceObject = {};
__webpack_require__.r(NodeUtil_namespaceObject);
__webpack_require__.d(NodeUtil_namespaceObject, {
"default": () => (tex_NodeUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/FilterUtil.js
var FilterUtil_namespaceObject = {};
__webpack_require__.r(FilterUtil_namespaceObject);
__webpack_require__.d(FilterUtil_namespaceObject, {
"default": () => (tex_FilterUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/HandlerTypes.js
var HandlerTypes_namespaceObject = {};
__webpack_require__.r(HandlerTypes_namespaceObject);
__webpack_require__.d(HandlerTypes_namespaceObject, {
ConfigurationType: () => (ConfigurationType),
HandlerType: () => (HandlerType)
});
// NAMESPACE OBJECT: ./mjs/input/tex/UnitUtil.js
var UnitUtil_namespaceObject = {};
__webpack_require__.r(UnitUtil_namespaceObject);
__webpack_require__.d(UnitUtil_namespaceObject, {
UnitUtil: () => (UnitUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Stack.js
var Stack_namespaceObject = {};
__webpack_require__.r(Stack_namespaceObject);
__webpack_require__.d(Stack_namespaceObject, {
"default": () => (Stack)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TexError.js
var TexError_namespaceObject = {};
__webpack_require__.r(TexError_namespaceObject);
__webpack_require__.d(TexError_namespaceObject, {
"default": () => (tex_TexError)
});
// NAMESPACE OBJECT: ./mjs/input/tex/StackItem.js
var StackItem_namespaceObject = {};
__webpack_require__.r(StackItem_namespaceObject);
__webpack_require__.d(StackItem_namespaceObject, {
BaseItem: () => (BaseItem),
MmlStack: () => (MmlStack)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TexConstants.js
var TexConstants_namespaceObject = {};
__webpack_require__.r(TexConstants_namespaceObject);
__webpack_require__.d(TexConstants_namespaceObject, {
TexConstant: () => (TexConstant)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TexParser.js
var TexParser_namespaceObject = {};
__webpack_require__.r(TexParser_namespaceObject);
__webpack_require__.d(TexParser_namespaceObject, {
"default": () => (TexParser)
});
// NAMESPACE OBJECT: ./mjs/input/tex/StackItemFactory.js
var StackItemFactory_namespaceObject = {};
__webpack_require__.r(StackItemFactory_namespaceObject);
__webpack_require__.d(StackItemFactory_namespaceObject, {
"default": () => (tex_StackItemFactory)
});
// NAMESPACE OBJECT: ./mjs/input/tex/NodeFactory.js
var NodeFactory_namespaceObject = {};
__webpack_require__.r(NodeFactory_namespaceObject);
__webpack_require__.d(NodeFactory_namespaceObject, {
NodeFactory: () => (NodeFactory)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ParseUtil.js
var ParseUtil_namespaceObject = {};
__webpack_require__.r(ParseUtil_namespaceObject);
__webpack_require__.d(ParseUtil_namespaceObject, {
KeyValueDef: () => (KeyValueDef),
KeyValueTypes: () => (KeyValueTypes),
ParseUtil: () => (ParseUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ColumnParser.js
var ColumnParser_namespaceObject = {};
__webpack_require__.r(ColumnParser_namespaceObject);
__webpack_require__.d(ColumnParser_namespaceObject, {
ColumnParser: () => (ColumnParser)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ParseOptions.js
var ParseOptions_namespaceObject = {};
__webpack_require__.r(ParseOptions_namespaceObject);
__webpack_require__.d(ParseOptions_namespaceObject, {
"default": () => (tex_ParseOptions)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Tags.js
var Tags_namespaceObject = {};
__webpack_require__.r(Tags_namespaceObject);
__webpack_require__.d(Tags_namespaceObject, {
AbstractTags: () => (AbstractTags),
AllTags: () => (AllTags),
Label: () => (Label),
NoTags: () => (NoTags),
TagInfo: () => (TagInfo),
TagsFactory: () => (TagsFactory)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Token.js
var Token_namespaceObject = {};
__webpack_require__.r(Token_namespaceObject);
__webpack_require__.d(Token_namespaceObject, {
Macro: () => (Macro),
Token: () => (Token)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TokenMap.js
var TokenMap_namespaceObject = {};
__webpack_require__.r(TokenMap_namespaceObject);
__webpack_require__.d(TokenMap_namespaceObject, {
AbstractParseMap: () => (AbstractParseMap),
AbstractTokenMap: () => (AbstractTokenMap),
CharacterMap: () => (CharacterMap),
CommandMap: () => (CommandMap),
DelimiterMap: () => (DelimiterMap),
EnvironmentMap: () => (EnvironmentMap),
MacroMap: () => (MacroMap),
RegExpMap: () => (RegExpMap),
parseResult: () => (parseResult)
});
// NAMESPACE OBJECT: ./mjs/input/tex/MapHandler.js
var MapHandler_namespaceObject = {};
__webpack_require__.r(MapHandler_namespaceObject);
__webpack_require__.d(MapHandler_namespaceObject, {
MapHandler: () => (MapHandler),
SubHandler: () => (SubHandler),
SubHandlers: () => (SubHandlers)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Configuration.js
var Configuration_namespaceObject = {};
__webpack_require__.r(Configuration_namespaceObject);
__webpack_require__.d(Configuration_namespaceObject, {
Configuration: () => (Configuration),
ConfigurationHandler: () => (ConfigurationHandler),
ParserConfiguration: () => (ParserConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/base/BaseItems.js
var BaseItems_namespaceObject = {};
__webpack_require__.r(BaseItems_namespaceObject);
__webpack_require__.d(BaseItems_namespaceObject, {
ArrayItem: () => (ArrayItem),
BeginItem: () => (BeginItem),
BreakItem: () => (BreakItem),
CellItem: () => (CellItem),
CloseItem: () => (CloseItem),
DotsItem: () => (DotsItem),
EndItem: () => (EndItem),
EqnArrayItem: () => (EqnArrayItem),
EquationItem: () => (EquationItem),
FnItem: () => (FnItem),
LeftItem: () => (LeftItem),
Middle: () => (Middle),
MmlItem: () => (MmlItem),
MstyleItem: () => (MstyleItem),
NonscriptItem: () => (NonscriptItem),
NotItem: () => (NotItem),
NullItem: () => (NullItem),
OpenItem: () => (OpenItem),
OverItem: () => (OverItem),
PositionItem: () => (PositionItem),
PrimeItem: () => (PrimeItem),
RightItem: () => (RightItem),
StartItem: () => (StartItem),
StopItem: () => (StopItem),
StyleItem: () => (StyleItem),
SubsupItem: () => (SubsupItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/base/BaseMethods.js
var BaseMethods_namespaceObject = {};
__webpack_require__.r(BaseMethods_namespaceObject);
__webpack_require__.d(BaseMethods_namespaceObject, {
"default": () => (base_BaseMethods),
splitAlignArray: () => (splitAlignArray)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ParseMethods.js
var ParseMethods_namespaceObject = {};
__webpack_require__.r(ParseMethods_namespaceObject);
__webpack_require__.d(ParseMethods_namespaceObject, {
"default": () => (tex_ParseMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/base/BaseConfiguration.js
var BaseConfiguration_namespaceObject = {};
__webpack_require__.r(BaseConfiguration_namespaceObject);
__webpack_require__.d(BaseConfiguration_namespaceObject, {
BaseConfiguration: () => (BaseConfiguration),
BaseTags: () => (BaseTags),
Other: () => (Other)
});
// NAMESPACE OBJECT: ./mjs/input/tex.js
var tex_namespaceObject = {};
__webpack_require__.r(tex_namespaceObject);
__webpack_require__.d(tex_namespaceObject, {
TeX: () => (TeX)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ams/AmsItems.js
var AmsItems_namespaceObject = {};
__webpack_require__.r(AmsItems_namespaceObject);
__webpack_require__.d(AmsItems_namespaceObject, {
FlalignItem: () => (FlalignItem),
MultlineItem: () => (MultlineItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandUtil.js
var NewcommandUtil_namespaceObject = {};
__webpack_require__.r(NewcommandUtil_namespaceObject);
__webpack_require__.d(NewcommandUtil_namespaceObject, {
NewcommandPriority: () => (NewcommandPriority),
NewcommandTables: () => (NewcommandTables),
NewcommandUtil: () => (NewcommandUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ams/AmsMethods.js
var AmsMethods_namespaceObject = {};
__webpack_require__.r(AmsMethods_namespaceObject);
__webpack_require__.d(AmsMethods_namespaceObject, {
AmsMethods: () => (AmsMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandItems.js
var NewcommandItems_namespaceObject = {};
__webpack_require__.r(NewcommandItems_namespaceObject);
__webpack_require__.d(NewcommandItems_namespaceObject, {
BeginEnvItem: () => (BeginEnvItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandMethods.js
var NewcommandMethods_namespaceObject = {};
__webpack_require__.r(NewcommandMethods_namespaceObject);
__webpack_require__.d(NewcommandMethods_namespaceObject, {
"default": () => (newcommand_NewcommandMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandConfiguration.js
var NewcommandConfiguration_namespaceObject = {};
__webpack_require__.r(NewcommandConfiguration_namespaceObject);
__webpack_require__.d(NewcommandConfiguration_namespaceObject, {
NewcommandConfig: () => (NewcommandConfig),
NewcommandConfiguration: () => (NewcommandConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ams/AmsConfiguration.js
var AmsConfiguration_namespaceObject = {};
__webpack_require__.r(AmsConfiguration_namespaceObject);
__webpack_require__.d(AmsConfiguration_namespaceObject, {
AmsConfiguration: () => (AmsConfiguration),
AmsTags: () => (AmsTags)
});
// NAMESPACE OBJECT: ./mjs/input/tex/require/RequireConfiguration.js
var RequireConfiguration_namespaceObject = {};
__webpack_require__.r(RequireConfiguration_namespaceObject);
__webpack_require__.d(RequireConfiguration_namespaceObject, {
RequireConfiguration: () => (RequireConfiguration),
RequireLoad: () => (RequireLoad),
RequireMethods: () => (RequireMethods),
options: () => (RequireConfiguration_options)
});
// NAMESPACE OBJECT: ./mjs/input/tex/autoload/AutoloadConfiguration.js
var AutoloadConfiguration_namespaceObject = {};
__webpack_require__.r(AutoloadConfiguration_namespaceObject);
__webpack_require__.d(AutoloadConfiguration_namespaceObject, {
AutoloadConfiguration: () => (AutoloadConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/configmacros/ConfigMacrosConfiguration.js
var ConfigMacrosConfiguration_namespaceObject = {};
__webpack_require__.r(ConfigMacrosConfiguration_namespaceObject);
__webpack_require__.d(ConfigMacrosConfiguration_namespaceObject, {
ConfigMacrosConfiguration: () => (ConfigMacrosConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/noundefined/NoUndefinedConfiguration.js
var NoUndefinedConfiguration_namespaceObject = {};
__webpack_require__.r(NoUndefinedConfiguration_namespaceObject);
__webpack_require__.d(NoUndefinedConfiguration_namespaceObject, {
NoUndefinedConfiguration: () => (NoUndefinedConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/textmacros/TextParser.js
var TextParser_namespaceObject = {};
__webpack_require__.r(TextParser_namespaceObject);
__webpack_require__.d(TextParser_namespaceObject, {
TextParser: () => (TextParser)
});
// NAMESPACE OBJECT: ./mjs/input/tex/textmacros/TextMacrosMethods.js
var TextMacrosMethods_namespaceObject = {};
__webpack_require__.r(TextMacrosMethods_namespaceObject);
__webpack_require__.d(TextMacrosMethods_namespaceObject, {
TextMacrosMethods: () => (TextMacrosMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/textmacros/TextMacrosConfiguration.js
var TextMacrosConfiguration_namespaceObject = {};
__webpack_require__.r(TextMacrosConfiguration_namespaceObject);
__webpack_require__.d(TextMacrosConfiguration_namespaceObject, {
TextBaseConfiguration: () => (TextBaseConfiguration),
TextMacrosConfiguration: () => (TextMacrosConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/core/lib/core/InputJax.js
const InputJax_def = MathJax._.core.InputJax;
const AbstractInputJax = InputJax_def.AbstractInputJax;
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./components/mjs/core/lib/core/FindMath.js
const FindMath_def = MathJax._.core.FindMath;
const AbstractFindMath = FindMath_def.AbstractFindMath;
;// ./components/mjs/core/lib/util/string.js
const string_def = MathJax._.util.string;
const sortLength = string_def.sortLength;
const quotePattern = string_def.quotePattern;
const unicodeChars = string_def.unicodeChars;
const unicodeString = string_def.unicodeString;
const isPercent = string_def.isPercent;
const split = string_def.split;
const replaceUnicode = string_def.replaceUnicode;
const toEntity = string_def.toEntity;
;// ./components/mjs/core/lib/core/MathItem.js
const MathItem_def = MathJax._.core.MathItem;
const protoItem = MathItem_def.protoItem;
const AbstractMathItem = MathItem_def.AbstractMathItem;
const STATE = MathItem_def.STATE;
const newState = MathItem_def.newState;
;// ./mjs/input/tex/FindTeX.js
class FindTeX extends AbstractFindMath {
constructor(options) {
super(options);
this.getPatterns();
}
getPatterns() {
const options = this.options;
const starts = [];
const parts = [];
const subparts = [];
this.end = {};
this.env = this.sub = 0;
let i = 1;
options['inlineMath'].forEach((delims) => this.addPattern(starts, delims, false));
options['displayMath'].forEach((delims) => this.addPattern(starts, delims, true));
if (starts.length) {
parts.push(starts.sort(sortLength).join('|'));
}
if (options['processEnvironments']) {
parts.push('\\\\begin\\s*\\{([^}]*)\\}');
this.env = i;
i++;
}
if (options['processEscapes']) {
subparts.push('\\\\([\\\\$])');
}
if (options['processRefs']) {
subparts.push('(\\\\(?:eq)?ref\\s*\\{[^}]*\\})');
}
if (subparts.length) {
parts.push('(' + subparts.join('|') + ')');
this.sub = i;
}
this.start = new RegExp(parts.join('|'), 'g');
this.hasPatterns = parts.length > 0;
}
addPattern(starts, delims, display) {
const [open, close] = delims;
starts.push(quotePattern(open));
this.end[open] = [close, display, this.endPattern(close)];
}
endPattern(end, endp) {
return new RegExp((endp || quotePattern(end)) + '|\\\\(?:[a-zA-Z]|.)|[{}]', 'g');
}
findEnd(text, n, start, end) {
const [close, display, pattern] = end;
const i = (pattern.lastIndex = start.index + start[0].length);
let match, braces = 0;
while ((match = pattern.exec(text))) {
if ((match[1] || match[0]) === close && braces === 0) {
return protoItem(start[0], text.substring(i, match.index), match[0], n, start.index, match.index + match[0].length, display);
}
else if (match[0] === '{') {
braces++;
}
else if (match[0] === '}' && braces) {
braces--;
}
}
return null;
}
findMathInString(math, n, text) {
let start, match;
this.start.lastIndex = 0;
while ((start = this.start.exec(text))) {
if (start[this.env] !== undefined && this.env) {
const end = '\\\\end\\s*(\\{' + quotePattern(start[this.env]) + '\\})';
match = this.findEnd(text, n, start, [
'{' + start[this.env] + '}',
true,
this.endPattern(null, end),
]);
if (match) {
match.math = match.open + match.math + match.close;
match.open = match.close = '';
}
}
else if (start[this.sub] !== undefined && this.sub) {
const math = start[this.sub];
const end = start.index + start[this.sub].length;
if (math.length === 2) {
match = protoItem('\\', math.substring(1), '', n, start.index, end);
}
else {
match = protoItem('', math, '', n, start.index, end, false);
}
}
else {
match = this.findEnd(text, n, start, this.end[start[0]]);
}
if (match) {
math.push(match);
this.start.lastIndex = match.end.n;
}
}
}
findMath(strings) {
const math = [];
if (this.hasPatterns) {
for (let i = 0, m = strings.length; i < m; i++) {
this.findMathInString(math, i, strings[i]);
}
}
return math;
}
}
FindTeX.OPTIONS = {
inlineMath: [
['\\(', '\\)']
],
displayMath: [
['$$', '$$'],
['\\[', '\\]']
],
processEscapes: true,
processEnvironments: true,
processRefs: true,
};
//# sourceMappingURL=FindTeX.js.map
;// ./components/mjs/core/lib/core/MmlTree/MmlNode.js
const MmlNode_def = MathJax._.core.MmlTree.MmlNode;
const TEXCLASS = MmlNode_def.TEXCLASS;
const TEXCLASSNAMES = MmlNode_def.TEXCLASSNAMES;
const MATHVARIANTS = MmlNode_def.MATHVARIANTS;
const indentAttributes = MmlNode_def.indentAttributes;
const AbstractMmlNode = MmlNode_def.AbstractMmlNode;
const AbstractMmlTokenNode = MmlNode_def.AbstractMmlTokenNode;
const AbstractMmlLayoutNode = MmlNode_def.AbstractMmlLayoutNode;
const AbstractMmlBaseNode = MmlNode_def.AbstractMmlBaseNode;
const AbstractMmlEmptyNode = MmlNode_def.AbstractMmlEmptyNode;
const TextNode = MmlNode_def.TextNode;
const XMLNode = MmlNode_def.XMLNode;
;// ./components/mjs/core/lib/core/MmlTree/MmlNodes/mo.js
const mo_def = MathJax._.core.MmlTree.MmlNodes.mo;
const MmlMo = mo_def.MmlMo;
;// ./mjs/input/tex/NodeUtil.js
const NodeUtil = {
attrs: new Set([
'autoOP',
'fnOP',
'movesupsub',
'subsupOK',
'texprimestyle',
'useHeight',
'variantForm',
'withDelims',
'mathaccent',
'open',
'close',
]),
createEntity(code) {
return String.fromCodePoint(parseInt(code, 16));
},
getChildren(node) {
return node.childNodes;
},
getText(node) {
return node.getText();
},
appendChildren(node, children) {
for (const child of children) {
node.appendChild(child);
}
},
setAttribute(node, attribute, value) {
node.attributes.set(attribute, value);
},
setProperty(node, property, value) {
node.setProperty(property, value);
},
setProperties(node, properties) {
for (const name of Object.keys(properties)) {
const value = properties[name];
if (name === 'texClass') {
node.texClass = value;
node.setProperty(name, value);
}
else if (name === 'movablelimits') {
node.setProperty('movablelimits', value);
if (node.isKind('mo') || node.isKind('mstyle')) {
node.attributes.set('movablelimits', value);
}
}
else if (name === 'inferred') {
}
else if (NodeUtil.attrs.has(name)) {
node.setProperty(name, value);
}
else {
node.attributes.set(name, value);
}
}
},
getProperty(node, property) {
return node.getProperty(property);
},
getAttribute(node, attr) {
return node.attributes.get(attr);
},
removeAttribute(node, attr) {
node.attributes.unset(attr);
},
removeProperties(node, ...properties) {
node.removeProperty(...properties);
},
getChildAt(node, position) {
return node.childNodes[position];
},
setChild(node, position, child) {
const children = node.childNodes;
children[position] = child;
if (child) {
child.parent = node;
}
},
copyChildren(oldNode, newNode) {
const children = oldNode.childNodes;
for (let i = 0; i < children.length; i++) {
this.setChild(newNode, i, children[i]);
}
},
copyAttributes(oldNode, newNode) {
newNode.attributes = oldNode.attributes;
this.setProperties(newNode, oldNode.getAllProperties());
},
isType(node, kind) {
return node.isKind(kind);
},
isEmbellished(node) {
return node.isEmbellished;
},
getTexClass(node) {
return node.texClass;
},
getCoreMO(node) {
return node.coreMO();
},
isNode(item) {
return (item instanceof AbstractMmlNode || item instanceof AbstractMmlEmptyNode);
},
isInferred(node) {
return node.isInferred;
},
getForm(node) {
if (!node.isKind('mo')) {
return null;
}
const mo = node;
const forms = mo.getForms();
for (const form of forms) {
const symbol = this.getOp(mo, form);
if (symbol) {
return symbol;
}
}
return null;
},
getOp(mo, form = 'infix') {
return MmlMo.OPTABLE[form][mo.getText()] || null;
},
getMoAttribute(mo, attr) {
var _a, _b;
if (!mo.attributes.isSet(attr)) {
for (const form of ['infix', 'postfix', 'prefix']) {
const value = (_b = (_a = this.getOp(mo, form)) === null || _a === void 0 ? void 0 : _a[3]) === null || _b === void 0 ? void 0 : _b[attr];
if (value !== undefined) {
return value;
}
}
}
return mo.attributes.get(attr);
},
};
/* harmony default export */ const tex_NodeUtil = (NodeUtil);
//# sourceMappingURL=NodeUtil.js.map
;// ./mjs/input/tex/FilterUtil.js
function _copyExplicit(attrs, node1, node2) {
const attr1 = node1.attributes;
const attr2 = node2.attributes;
attrs.forEach((x) => {
const attr = attr2.getExplicit(x);
if (attr != null) {
attr1.set(x, attr);
}
});
}
function _compareExplicit(node1, node2) {
const filter = (attr, space) => {
const exp = attr.getExplicitNames();
return exp.filter((x) => {
return (x !== space &&
(x !== 'stretchy' || attr.getExplicit('stretchy')) &&
x !== 'data-latex' &&
x !== 'data-latex-item');
});
};
const attr1 = node1.attributes;
const attr2 = node2.attributes;
const exp1 = filter(attr1, 'lspace');
const exp2 = filter(attr2, 'rspace');
if (exp1.length !== exp2.length) {
return false;
}
for (const name of exp1) {
if (attr1.getExplicit(name) !== attr2.getExplicit(name)) {
return false;
}
}
return true;
}
function _cleanSubSup(options, low, up) {
const remove = [];
for (const mml of options.getList('m' + low + up)) {
const children = mml.childNodes;
if (children[mml[low]] && children[mml[up]]) {
continue;
}
const parent = mml.parent;
const newNode = children[mml[low]]
? options.nodeFactory.create('node', 'm' + low, [
children[mml.base],
children[mml[low]],
])
: options.nodeFactory.create('node', 'm' + up, [
children[mml.base],
children[mml[up]],
]);
tex_NodeUtil.copyAttributes(mml, newNode);
parent.replaceChild(newNode, mml);
remove.push(mml);
}
options.removeFromList('m' + low + up, remove);
}
function _moveLimits(options, underover, subsup) {
const remove = [];
for (const mml of options.getList(underover)) {
if (mml.attributes.get('displaystyle')) {
continue;
}
const base = mml.childNodes[mml.base];
const mo = base.coreMO();
if (base.getProperty('movablelimits') &&
!mo.attributes.hasExplicit('movablelimits')) {
const node = options.nodeFactory.create('node', subsup, mml.childNodes);
tex_NodeUtil.copyAttributes(mml, node);
mml.parent.replaceChild(node, mml);
remove.push(mml);
}
}
options.removeFromList(underover, remove);
}
const FilterUtil = {
cleanStretchy(arg) {
const options = arg.data;
for (const mo of options.getList('fixStretchy')) {
if (tex_NodeUtil.getProperty(mo, 'fixStretchy')) {
const symbol = tex_NodeUtil.getForm(mo);
if (symbol && symbol[3] && symbol[3]['stretchy']) {
tex_NodeUtil.setAttribute(mo, 'stretchy', false);
}
const parent = mo.parent;
if (!tex_NodeUtil.getTexClass(mo) && (!symbol || !symbol[2])) {
const texAtom = options.nodeFactory.create('node', 'TeXAtom', [mo]);
parent.replaceChild(texAtom, mo);
texAtom.inheritAttributesFrom(mo);
}
tex_NodeUtil.removeProperties(mo, 'fixStretchy');
}
}
},
cleanAttributes(arg) {
const node = arg.data.root;
node.walkTree((mml, _d) => {
const attribs = mml.attributes;
const keep = new Set((attribs.get('mjx-keep-attrs') || '').split(/ /));
attribs.unset('mjx-keep-attrs');
for (const key of attribs.getExplicitNames()) {
if (!keep.has(key) &&
attribs.get(key) === mml.attributes.getInherited(key)) {
attribs.unset(key);
}
}
}, {});
},
combineRelations(arg) {
const remove = [];
for (const mo of arg.data.getList('mo')) {
if (mo.getProperty('relationsCombined') ||
!mo.parent ||
(mo.parent && !tex_NodeUtil.isType(mo.parent, 'mrow')) ||
tex_NodeUtil.getTexClass(mo) !== TEXCLASS.REL) {
continue;
}
const mml = mo.parent;
let m2;
const children = mml.childNodes;
const next = children.indexOf(mo) + 1;
const variantForm = tex_NodeUtil.getProperty(mo, 'variantForm');
while (next < children.length &&
(m2 = children[next]) &&
tex_NodeUtil.isType(m2, 'mo') &&
tex_NodeUtil.getTexClass(m2) === TEXCLASS.REL) {
if (variantForm === tex_NodeUtil.getProperty(m2, 'variantForm') &&
_compareExplicit(mo, m2)) {
tex_NodeUtil.appendChildren(mo, tex_NodeUtil.getChildren(m2));
_copyExplicit(['stretchy', 'rspace'], mo, m2);
for (const name of m2.getPropertyNames()) {
mo.setProperty(name, m2.getProperty(name));
}
if (m2.attributes.get('data-latex')) {
mo.attributes.set('data-latex', mo.attributes.get('data-latex') +
m2.attributes.get('data-latex'));
}
children.splice(next, 1);
remove.push(m2);
m2.parent = null;
m2.setProperty('relationsCombined', true);
mo.setProperty('texClass', TEXCLASS.REL);
}
else {
if (!mo.attributes.hasExplicit('rspace')) {
tex_NodeUtil.setAttribute(mo, 'rspace', '0pt');
}
if (!m2.attributes.hasExplicit('lspace')) {
tex_NodeUtil.setAttribute(m2, 'lspace', '0pt');
}
break;
}
}
mo.attributes.setInherited('form', mo.getForms()[0]);
}
arg.data.removeFromList('mo', remove);
},
cleanSubSup(arg) {
const options = arg.data;
if (options.error) {
return;
}
_cleanSubSup(options, 'sub', 'sup');
_cleanSubSup(options, 'under', 'over');
},
moveLimits(arg) {
const options = arg.data;
_moveLimits(options, 'munderover', 'msubsup');
_moveLimits(options, 'munder', 'msub');
_moveLimits(options, 'mover', 'msup');
},
setInherited(arg) {
arg.data.root.setInheritedAttributes({}, arg.math['display'], 0, false);
},
checkScriptlevel(arg) {
const options = arg.data;
const remove = [];
for (const mml of options.getList('mstyle')) {
if (mml.childNodes[0].childNodes.length !== 1) {
continue;
}
const attributes = mml.attributes;
for (const key of ['displaystyle', 'scriptlevel']) {
if (attributes.getExplicit(key) === attributes.getInherited(key)) {
attributes.unset(key);
}
}
const names = attributes.getExplicitNames();
if (names.filter((key) => key.substring(0, 10) !== 'data-latex').length ===
0) {
const child = mml.childNodes[0].childNodes[0];
names.forEach((key) => child.attributes.set(key, attributes.get(key)));
mml.parent.replaceChild(child, mml);
remove.push(mml);
}
}
options.removeFromList('mstyle', remove);
},
};
/* harmony default export */ const tex_FilterUtil = (FilterUtil);
//# sourceMappingURL=FilterUtil.js.map
;// ./mjs/input/tex/HandlerTypes.js
var ConfigurationType;
(function (ConfigurationType) {
ConfigurationType["HANDLER"] = "handler";
ConfigurationType["FALLBACK"] = "fallback";
ConfigurationType["ITEMS"] = "items";
ConfigurationType["TAGS"] = "tags";
ConfigurationType["OPTIONS"] = "options";
ConfigurationType["NODES"] = "nodes";
ConfigurationType["PREPROCESSORS"] = "preprocessors";
ConfigurationType["POSTPROCESSORS"] = "postprocessors";
ConfigurationType["INIT"] = "init";
ConfigurationType["CONFIG"] = "config";
ConfigurationType["PRIORITY"] = "priority";
ConfigurationType["PARSER"] = "parser";
})(ConfigurationType || (ConfigurationType = {}));
var HandlerType;
(function (HandlerType) {
HandlerType["DELIMITER"] = "delimiter";
HandlerType["MACRO"] = "macro";
HandlerType["CHARACTER"] = "character";
HandlerType["ENVIRONMENT"] = "environment";
})(HandlerType || (HandlerType = {}));
//# sourceMappingURL=HandlerTypes.js.map
;// ./mjs/input/tex/UnitUtil.js
class UnitMap {
constructor(map) {
this.num = '([-+]?([.,]\\d+|\\d+([.,]\\d*)?))';
this.unit = '';
this.dimenEnd = /./;
this.dimenRest = /./;
this.map = new Map(map);
this.updateDimen();
}
updateDimen() {
this.unit = `(${Array.from(this.map.keys()).join('|')})`;
this.dimenEnd = RegExp('^\\s*' + this.num + '\\s*' + this.unit + '\\s*$');
this.dimenRest = RegExp('^\\s*' + this.num + '\\s*' + this.unit + ' ?');
}
set(name, ems) {
this.map.set(name, ems);
this.updateDimen();
return this;
}
get(name) {
return this.map.get(name) || this.map.get('pt');
}
delete(name) {
if (this.map.delete(name)) {
this.updateDimen();
return true;
}
return false;
}
}
const emPerInch = 7.2;
const pxPerInch = 72;
function muReplace([value, unit, length]) {
if (unit !== 'mu') {
return [value, unit, length];
}
const em = UnitUtil.em(UnitUtil.UNIT_CASES.get(unit) * parseFloat(value));
return [em.slice(0, -2), 'em', length];
}
const UnitUtil = {
UNIT_CASES: new UnitMap([
['em', 1],
['ex', .43],
['pt', 1 / 10],
['pc', 1.2],
['px', emPerInch / pxPerInch],
['in', emPerInch],
['cm', emPerInch / 2.54],
['mm', emPerInch / 25.4],
['mu', 1 / 18],
]),
matchDimen(dim, rest = false) {
const match = dim.match(rest ? UnitUtil.UNIT_CASES.dimenRest : UnitUtil.UNIT_CASES.dimenEnd);
return match
? muReplace([match[1].replace(/,/, '.'), match[4], match[0].length])
: [null, null, 0];
},
dimen2em(dim) {
const [value, unit] = UnitUtil.matchDimen(dim);
const m = parseFloat(value || '1');
const factor = UnitUtil.UNIT_CASES.get(unit);
return factor * m;
},
em(m) {
if (Math.abs(m) < 0.0006) {
return '0em';
}
return m.toFixed(3).replace(/\.?0+$/, '') + 'em';
},
trimSpaces(text) {
if (typeof text !== 'string') {
return text;
}
let TEXT = text.trim();
if (TEXT.match(/\\$/) && text.match(/ $/)) {
TEXT += ' ';
}
return TEXT;
},
};
//# sourceMappingURL=UnitUtil.js.map
;// ./mjs/input/tex/Stack.js
class Stack {
constructor(_factory, _env, inner) {
this._factory = _factory;
this._env = _env;
this.global = {};
this.stack = [];
this.global = { isInner: inner };
this.stack = [this._factory.create('start', this.global)];
if (_env) {
this.stack[0].env = _env;
}
this.env = this.stack[0].env;
}
set env(env) {
this._env = env;
}
get env() {
return this._env;
}
Push(...args) {
for (const node of args) {
if (!node) {
continue;
}
const item = tex_NodeUtil.isNode(node)
? this._factory.create('mml', node)
: node;
item.global = this.global;
const [top, success] = this.stack.length
? this.Top().checkItem(item)
: [null, true];
if (!success) {
continue;
}
if (top) {
this.Pop();
this.Push(...top);
continue;
}
if (!item.isKind('null')) {
this.stack.push(item);
}
if (item.env) {
if (item.copyEnv) {
Object.assign(item.env, this.env);
}
this.env = item.env;
}
else {
item.env = this.env;
}
}
}
Pop() {
const item = this.stack.pop();
if (!item.isOpen) {
delete item.env;
}
this.env = this.stack.length ? this.Top().env : {};
return item;
}
Top(n = 1) {
return this.stack.length < n ? null : this.stack[this.stack.length - n];
}
Prev(noPop) {
const top = this.Top();
return noPop ? top.First : top.Pop();
}
get height() {
return this.stack.length;
}
toString() {
return 'stack[\n ' + this.stack.join('\n ') + '\n]';
}
}
//# sourceMappingURL=Stack.js.map
;// ./mjs/input/tex/TexError.js
class TexError {
static processString(str, args) {
const parts = str.split(TexError.pattern);
for (let i = 1, m = parts.length; i < m; i += 2) {
let c = parts[i].charAt(0);
if (c >= '0' && c <= '9') {
parts[i] = args[parseInt(parts[i], 10) - 1];
if (typeof parts[i] === 'number') {
parts[i] = parts[i].toString();
}
}
else if (c === '{') {
c = parts[i].substring(1);
if (c >= '0' && c <= '9') {
parts[i] =
args[parseInt(parts[i].substring(1, parts[i].length - 1), 10) - 1];
if (typeof parts[i] === 'number') {
parts[i] = parts[i].toString();
}
}
else {
const match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
if (match) {
parts[i] = '%' + parts[i];
}
}
}
}
return parts.join('');
}
constructor(id, message, ...rest) {
this.id = id;
this.message = TexError.processString(message, rest);
}
}
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:%\d+(?:\|(?:%\{\d+\}|%.|[^}])*)+\}|.)/g;
/* harmony default export */ const tex_TexError = (TexError);
//# sourceMappingURL=TexError.js.map
;// ./mjs/input/tex/StackItem.js
class MmlStack {
constructor(_nodes) {
this._nodes = _nodes;
this.startStr = '';
this.startI = 0;
this.stopI = 0;
}
get nodes() {
return this._nodes;
}
Push(...nodes) {
this._nodes.push(...nodes);
}
Pop() {
return this._nodes.pop();
}
get First() {
return this._nodes[this.Size() - 1];
}
set First(node) {
this._nodes[this.Size() - 1] = node;
}
get Last() {
return this._nodes[0];
}
set Last(node) {
this._nodes[0] = node;
}
Peek(n) {
if (n == null) {
n = 1;
}
return this._nodes.slice(this.Size() - n);
}
Size() {
return this._nodes.length;
}
Clear() {
this._nodes = [];
}
toMml(inferred = true, forceRow) {
if (this._nodes.length === 1 && !forceRow) {
return this.First;
}
return this.create('node', inferred ? 'inferredMrow' : 'mrow', this._nodes, {});
}
create(kind, ...rest) {
return this.factory.configuration.nodeFactory.create(kind, ...rest);
}
}
class BaseItem extends MmlStack {
constructor(factory, ...nodes) {
super(nodes);
this.factory = factory;
this.global = {};
this._properties = {};
if (this.isOpen) {
this._env = {};
}
}
get kind() {
return 'base';
}
get env() {
return this._env;
}
set env(value) {
this._env = value;
}
get copyEnv() {
return true;
}
getProperty(key) {
return this._properties[key];
}
setProperty(key, value) {
this._properties[key] = value;
return this;
}
get isOpen() {
return false;
}
get isClose() {
return false;
}
get isFinal() {
return false;
}
isKind(kind) {
return kind === this.kind;
}
checkItem(item) {
if (item.isKind('over') && this.isOpen) {
item.setProperty('num', this.toMml(false));
this.Clear();
}
if (item.isKind('cell') && this.isOpen) {
if (item.getProperty('linebreak')) {
return BaseItem.fail;
}
throw new tex_TexError('Misplaced', 'Misplaced %1', item.getName());
}
if (item.isClose && this.getErrors(item.kind)) {
const [id, message] = this.getErrors(item.kind);
throw new tex_TexError(id, message, item.getName());
}
if (!item.isFinal) {
return BaseItem.success;
}
this.Push(item.First);
return BaseItem.fail;
}
clearEnv() {
for (const id of Object.keys(this.env)) {
delete this.env[id];
}
}
setProperties(def) {
Object.assign(this._properties, def);
return this;
}
getName() {
return this.getProperty('name');
}
toString() {
return this.kind + '[' + this.nodes.join('; ') + ']';
}
getErrors(kind) {
const CLASS = this.constructor;
return CLASS.errors[kind] || BaseItem.errors[kind];
}
}
BaseItem.fail = [null, false];
BaseItem.success = [null, true];
BaseItem.errors = {
end: ['MissingBeginExtraEnd', 'Missing \\begin{%1} or extra \\end{%1}'],
close: ['ExtraCloseMissingOpen', 'Extra close brace or missing open brace'],
right: ['MissingLeftExtraRight', 'Missing \\left or extra \\right'],
middle: ['ExtraMiddle', 'Extra \\middle'],
};
//# sourceMappingURL=StackItem.js.map
;// ./mjs/input/tex/TexConstants.js
const TexConstant = {
Variant: {
NORMAL: 'normal',
BOLD: 'bold',
ITALIC: 'italic',
BOLDITALIC: 'bold-italic',
DOUBLESTRUCK: 'double-struck',
FRAKTUR: 'fraktur',
BOLDFRAKTUR: 'bold-fraktur',
SCRIPT: 'script',
BOLDSCRIPT: 'bold-script',
SANSSERIF: 'sans-serif',
BOLDSANSSERIF: 'bold-sans-serif',
SANSSERIFITALIC: 'sans-serif-italic',
SANSSERIFBOLDITALIC: 'sans-serif-bold-italic',
MONOSPACE: 'monospace',
INITIAL: 'inital',
TAILED: 'tailed',
LOOPED: 'looped',
STRETCHED: 'stretched',
CALLIGRAPHIC: '-tex-calligraphic',
BOLDCALLIGRAPHIC: '-tex-bold-calligraphic',
OLDSTYLE: '-tex-oldstyle',
BOLDOLDSTYLE: '-tex-bold-oldstyle',
MATHITALIC: '-tex-mathit',
},
Form: {
PREFIX: 'prefix',
INFIX: 'infix',
POSTFIX: 'postfix',
},
LineBreak: {
AUTO: 'auto',
NEWLINE: 'newline',
NOBREAK: 'nobreak',
GOODBREAK: 'goodbreak',
BADBREAK: 'badbreak',
},
LineBreakStyle: {
BEFORE: 'before',
AFTER: 'after',
DUPLICATE: 'duplicate',
INFIXLINBREAKSTYLE: 'infixlinebreakstyle',
},
IndentAlign: {
LEFT: 'left',
CENTER: 'center',
RIGHT: 'right',
AUTO: 'auto',
ID: 'id',
INDENTALIGN: 'indentalign',
},
IndentShift: {
INDENTSHIFT: 'indentshift',
},
LineThickness: {
THIN: 'thin',
MEDIUM: 'medium',
THICK: 'thick',
},
Notation: {
LONGDIV: 'longdiv',
ACTUARIAL: 'actuarial',
PHASORANGLE: 'phasorangle',
RADICAL: 'radical',
BOX: 'box',
ROUNDEDBOX: 'roundedbox',
CIRCLE: 'circle',
LEFT: 'left',
RIGHT: 'right',
TOP: 'top',
BOTTOM: 'bottom',
UPDIAGONALSTRIKE: 'updiagonalstrike',
DOWNDIAGONALSTRIKE: 'downdiagonalstrike',
VERTICALSTRIKE: 'verticalstrike',
HORIZONTALSTRIKE: 'horizontalstrike',
NORTHEASTARROW: 'northeastarrow',
MADRUWB: 'madruwb',
UPDIAGONALARROW: 'updiagonalarrow',
},
Align: {
TOP: 'top',
BOTTOM: 'bottom',
CENTER: 'center',
BASELINE: 'baseline',
AXIS: 'axis',
LEFT: 'left',
RIGHT: 'right',
},
Lines: {
NONE: 'none',
SOLID: 'solid',
DASHED: 'dashed',
},
Side: {
LEFT: 'left',
RIGHT: 'right',
LEFTOVERLAP: 'leftoverlap',
RIGHTOVERLAP: 'rightoverlap',
},
Width: {
AUTO: 'auto',
FIT: 'fit',
},
Actiontype: {
TOGGLE: 'toggle',
STATUSLINE: 'statusline',
TOOLTIP: 'tooltip',
INPUT: 'input',
},
Overflow: {
LINBREAK: 'linebreak',
SCROLL: 'scroll',
ELIDE: 'elide',
TRUNCATE: 'truncate',
SCALE: 'scale',
},
Unit: {
EM: 'em',
EX: 'ex',
PX: 'px',
IN: 'in',
CM: 'cm',
MM: 'mm',
PT: 'pt',
PC: 'pc',
},
Attr: {
LATEX: 'data-latex',
LATEXITEM: 'data-latex-item',
},
};
//# sourceMappingURL=TexConstants.js.map
;// ./mjs/input/tex/TexParser.js
class TexParser {
constructor(_string, env, configuration) {
this._string = _string;
this.configuration = configuration;
this.macroCount = 0;
this.i = 0;
this.currentCS = '';
this.saveI = 0;
const inner = Object.hasOwn(env, 'isInner');
const isInner = env['isInner'];
delete env['isInner'];
let ENV;
if (env) {
ENV = {};
for (const id of Object.keys(env)) {
ENV[id] = env[id];
}
}
this.configuration.pushParser(this);
this.stack = new Stack(this.itemFactory, ENV, inner ? isInner : true);
this.Parse();
this.Push(this.itemFactory.create('stop'));
this.updateResult(this.string, this.i);
this.stack.env = ENV;
}
get options() {
return this.configuration.options;
}
get itemFactory() {
return this.configuration.itemFactory;
}
get tags() {
return this.configuration.tags;
}
set string(str) {
this._string = str;
}
get string() {
return this._string;
}
parse(kind, input) {
const i = this.saveI;
this.saveI = this.i;
const result = this.configuration.handlers.get(kind).parse(input);
this.updateResult(input[1], i);
this.saveI = i;
return result;
}
lookup(kind, token) {
return this.configuration.handlers.get(kind).lookup(token);
}
contains(kind, token) {
return this.configuration.handlers.get(kind).contains(token);
}
toString() {
let str = '';
for (const config of Array.from(this.configuration.handlers.keys())) {
str +=
config +
': ' +
this.configuration.handlers.get(config) +
'\n';
}
return str;
}
Parse() {
let c;
while (this.i < this.string.length) {
c = this.getCodePoint();
this.i += c.length;
this.parse(HandlerType.CHARACTER, [this, c]);
}
}
Push(arg) {
if (arg instanceof BaseItem) {
arg.startI = this.saveI;
arg.stopI = this.i;
arg.startStr = this.string;
}
if (arg instanceof AbstractMmlNode && arg.isInferred) {
this.PushAll(arg.childNodes);
}
else {
this.stack.Push(arg);
}
}
PushAll(args) {
for (const arg of args) {
this.stack.Push(arg);
}
}
mml() {
if (!this.stack.Top().isKind('mml')) {
return null;
}
const node = this.stack.Top().First;
this.configuration.popParser();
node.attributes.set(TexConstant.Attr.LATEX, this.string);
return node;
}
convertDelimiter(c) {
var _a;
const token = this.lookup(HandlerType.DELIMITER, c);
return (_a = token === null || token === void 0 ? void 0 : token.char) !== null && _a !== void 0 ? _a : null;
}
getCodePoint() {
const code = this.string.codePointAt(this.i);
return code === undefined ? '' : String.fromCodePoint(code);
}
nextIsSpace() {
return !!this.string.charAt(this.i).match(/\s/);
}
GetNext() {
while (this.nextIsSpace()) {
this.i++;
}
return this.getCodePoint();
}
GetCS() {
const CS = this.string
.slice(this.i)
.match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);
if (CS) {
this.i += CS[0].length;
return CS[2] || CS[1];
}
else {
this.i++;
return ' ';
}
}
GetArgument(_name, noneOK = false) {
switch (this.GetNext()) {
case '':
if (!noneOK) {
throw new tex_TexError('MissingArgFor', 'Missing argument for %1', this.currentCS);
}
return null;
case '}':
if (!noneOK) {
throw new tex_TexError('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
return null;
case '\\':
this.i++;
return '\\' + this.GetCS();
case '{': {
const j = ++this.i;
let parens = 1;
while (this.i < this.string.length) {
switch (this.string.charAt(this.i++)) {
case '\\':
this.i++;
break;
case '{':
parens++;
break;
case '}':
if (--parens === 0) {
return this.string.slice(j, this.i - 1);
}
break;
}
}
throw new tex_TexError('MissingCloseBrace', 'Missing close brace');
}
}
const c = this.getCodePoint();
this.i += c.length;
return c;
}
GetBrackets(_name, def, matchBrackets = false) {
if (this.GetNext() !== '[') {
return def;
}
const j = ++this.i;
let braces = 0;
let brackets = 0;
while (this.i < this.string.length) {
switch (this.string.charAt(this.i++)) {
case '{':
braces++;
break;
case '\\':
this.i++;
break;
case '}':
if (braces-- <= 0) {
throw new tex_TexError('ExtraCloseLooking', 'Extra close brace while looking for %1', "']'");
}
break;
case '[':
if (braces === 0)
brackets++;
break;
case ']':
if (braces === 0) {
if (!matchBrackets || brackets === 0) {
return this.string.slice(j, this.i - 1);
}
brackets--;
}
break;
}
}
throw new tex_TexError('MissingCloseBracket', "Could not find closing ']' for argument to %1", this.currentCS);
}
GetDelimiter(name, braceOK = false) {
let c = this.GetNext();
this.i += c.length;
if (this.i <= this.string.length) {
if (c === '\\') {
c += this.GetCS();
}
else if (c === '{' && braceOK) {
this.i--;
c = this.GetArgument(name).trim();
}
if (this.contains(HandlerType.DELIMITER, c)) {
return this.convertDelimiter(c);
}
}
throw new tex_TexError('MissingOrUnrecognizedDelim', 'Missing or unrecognized delimiter for %1', this.currentCS);
}
GetDimen(name) {
if (this.GetNext() === '{') {
const dimen = this.GetArgument(name);
const [value, unit] = UnitUtil.matchDimen(dimen);
if (value) {
return value + unit;
}
}
else {
const dimen = this.string.slice(this.i);
const [value, unit, length] = UnitUtil.matchDimen(dimen, true);
if (value) {
this.i += length;
return value + unit;
}
}
throw new tex_TexError('MissingDimOrUnits', 'Missing dimension or its units for %1', this.currentCS);
}
GetUpTo(_name, token) {
while (this.nextIsSpace()) {
this.i++;
}
const j = this.i;
let braces = 0;
while (this.i < this.string.length) {
const k = this.i;
let c = this.GetNext();
this.i += c.length;
switch (c) {
case '\\':
c += this.GetCS();
break;
case '{':
braces++;
break;
case '}':
if (braces === 0) {
throw new tex_TexError('ExtraCloseLooking', 'Extra close brace while looking for %1', token);
}
braces--;
break;
}
if (braces === 0 && c === token) {
return this.string.slice(j, k);
}
}
throw new tex_TexError('TokenNotFoundForCommand', 'Could not find %1 for %2', token, this.currentCS);
}
ParseArg(name) {
return new TexParser(this.GetArgument(name), this.stack.env, this.configuration).mml();
}
ParseUpTo(name, token) {
return new TexParser(this.GetUpTo(name, token), this.stack.env, this.configuration).mml();
}
GetDelimiterArg(name) {
const c = UnitUtil.trimSpaces(this.GetArgument(name));
if (c === '') {
return null;
}
if (this.contains(HandlerType.DELIMITER, c)) {
return c;
}
throw new tex_TexError('MissingOrUnrecognizedDelim', 'Missing or unrecognized delimiter for %1', this.currentCS);
}
GetStar() {
const star = this.GetNext() === '*';
if (star) {
this.i++;
}
return star;
}
create(kind, ...rest) {
const node = this.configuration.nodeFactory.create(kind, ...rest);
if (node.isToken && node.attributes.hasExplicit('mathvariant')) {
if (node.attributes.get('mathvariant').charAt(0) === '-') {
node.setProperty('ignore-variant', true);
}
}
return node;
}
updateResult(input, old) {
const node = this.stack.Prev(true);
if (!node) {
return;
}
const existing = node.attributes.get(TexConstant.Attr.LATEXITEM);
if (existing !== undefined) {
node.attributes.set(TexConstant.Attr.LATEX, existing);
return;
}
old = old < this.saveI ? this.saveI : old;
let str = old !== this.i ? this.string.slice(old, this.i) : input;
str = str.trim();
if (!str) {
return;
}
if (input === '\\') {
str = '\\' + str;
}
if (node.attributes.get(TexConstant.Attr.LATEX) === '^' &&
str !== '^' &&
str !== '\\^') {
if (node.childNodes[2]) {
if (str === '}') {
this.composeBraces(node.childNodes[2]);
}
else {
node.childNodes[2].attributes.set(TexConstant.Attr.LATEX, str);
}
}
if (node.childNodes[1]) {
const sub = node.childNodes[1].attributes.get(TexConstant.Attr.LATEX);
this.composeLatex(node, `_${sub}^`, 0, 2);
}
else {
this.composeLatex(node, '^', 0, 2);
}
return;
}
if (node.attributes.get(TexConstant.Attr.LATEX) === '_' &&
str !== '_' &&
str !== '\\_') {
if (node.childNodes[1]) {
if (str === '}') {
this.composeBraces(node.childNodes[1]);
}
else {
node.childNodes[1].attributes.set(TexConstant.Attr.LATEX, str);
}
}
if (node.childNodes[2]) {
const sub = node.childNodes[2].attributes.get(TexConstant.Attr.LATEX);
this.composeLatex(node, `^${sub}_`, 0, 1);
}
else {
this.composeLatex(node, '_', 0, 1);
}
return;
}
if (str === '}') {
this.composeBraces(node);
return;
}
node.attributes.set(TexConstant.Attr.LATEX, str);
}
composeLatex(node, comp, pos1, pos2) {
if (!node.childNodes[pos1] || !node.childNodes[pos2])
return;
const expr = (node.childNodes[pos1].attributes.get(TexConstant.Attr.LATEX) || '') +
comp +
node.childNodes[pos2].attributes.get(TexConstant.Attr.LATEX);
node.attributes.set(TexConstant.Attr.LATEX, expr);
}
composeBraces(atom) {
const str = this.composeBracedContent(atom);
atom.attributes.set(TexConstant.Attr.LATEX, `{${str}}`);
}
composeBracedContent(atom) {
var _a, _b;
const children = ((_a = atom.childNodes[0]) === null || _a === void 0 ? void 0 : _a.childNodes) || [];
let expr = '';
for (const child of children) {
const att = (((_b = child === null || child === void 0 ? void 0 : child.attributes) === null || _b === void 0 ? void 0 : _b.get(TexConstant.Attr.LATEX)) ||
'');
if (!att)
continue;
expr +=
expr && expr.match(/[a-zA-Z]$/) && att.match(/^[a-zA-Z]/)
? ' ' + att
: att;
}
return expr;
}
}
//# sourceMappingURL=TexParser.js.map
;// ./components/mjs/core/lib/core/Tree/Factory.js
const Factory_def = MathJax._.core.Tree.Factory;
const AbstractFactory = Factory_def.AbstractFactory;
;// ./mjs/input/tex/StackItemFactory.js
class DummyItem extends BaseItem {
}
class StackItemFactory extends AbstractFactory {
constructor() {
super(...arguments);
this.defaultKind = 'dummy';
this.configuration = null;
}
}
StackItemFactory.DefaultStackItems = {
[DummyItem.prototype.kind]: DummyItem,
};
/* harmony default export */ const tex_StackItemFactory = (StackItemFactory);
//# sourceMappingURL=StackItemFactory.js.map
;// ./mjs/input/tex/NodeFactory.js
class NodeFactory {
constructor() {
this.mmlFactory = null;
this.factory = {
node: NodeFactory.createNode,
token: NodeFactory.createToken,
text: NodeFactory.createText,
error: NodeFactory.createError,
};
}
static createNode(factory, kind, children = [], def = {}, text) {
const node = factory.mmlFactory.create(kind);
node.setChildren(children);
if (text) {
node.appendChild(text);
}
tex_NodeUtil.setProperties(node, def);
return node;
}
static createToken(factory, kind, def = {}, text = '') {
const textNode = factory.create('text', text);
return factory.create('node', kind, [], def, textNode);
}
static createText(factory, text) {
if (text == null) {
return null;
}
return factory.mmlFactory.create('text').setText(text);
}
static createError(factory, message) {
const text = factory.create('text', message);
const mtext = factory.create('node', 'mtext', [], {}, text);
const error = factory.create('node', 'merror', [mtext], {
'data-mjx-error': message,
});
return error;
}
setMmlFactory(mmlFactory) {
this.mmlFactory = mmlFactory;
}
set(kind, func) {
this.factory[kind] = func;
}
setCreators(maps) {
for (const kind in maps) {
this.set(kind, maps[kind]);
}
}
create(kind, ...rest) {
const func = this.factory[kind] || this.factory['node'];
const node = func(this, rest[0], ...rest.slice(1));
if (kind === 'node') {
this.configuration.addNode(rest[0], node);
}
return node;
}
get(kind) {
return this.factory[kind];
}
}
//# sourceMappingURL=NodeFactory.js.map
;// ./components/mjs/core/lib/util/Entities.js
const Entities_def = MathJax._.util.Entities;
const options = Entities_def.options;
const entities = Entities_def.entities;
const add = Entities_def.add;
const remove = Entities_def.remove;
const translate = Entities_def.translate;
const numeric = Entities_def.numeric;
;// ./mjs/input/tex/ParseUtil.js
class KeyValueDef {
static oneof(...values) {
return new this('string', (value) => values.includes(value), (value) => value);
}
constructor(name, verify, convert) {
this.name = name;
this.verify = verify;
this.convert = convert;
}
}
const KeyValueTypes = {
boolean: new KeyValueDef('boolean', (value) => value === 'true' || value === 'false', (value) => value === 'true'),
number: new KeyValueDef('number', (value) => !!value.match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/), (value) => parseFloat(value)),
integer: new KeyValueDef('integer', (value) => !!value.match(/^[-+]?\d+$/), (value) => parseInt(value)),
string: new KeyValueDef('string', (_value) => true, (value) => value),
dimen: new KeyValueDef('dimen', (value) => UnitUtil.matchDimen(value)[0] !== null, (value) => value),
};
function readKeyval(text, l3keys = false) {
const options = {};
let rest = text;
let end, key, val;
let dropBrace = true;
while (rest) {
[key, end, rest] = readValue(rest, ['=', ','], l3keys, dropBrace);
dropBrace = false;
if (end === '=') {
[val, end, rest] = readValue(rest, [','], l3keys);
val = val === 'false' || val === 'true' ? JSON.parse(val) : val;
options[key] = val;
}
else if (key) {
options[key] = true;
}
}
return options;
}
function removeBraces(text, count) {
if (count === 0) {
return text
.replace(/^\s+/, '')
.replace(/([^\\\s]|^)((?:\\\\)*(?:\\\s)?)?\s+$/, '$1$2');
}
while (count > 0) {
text = text.trim().slice(1, -1);
count--;
}
return text;
}
function readValue(text, end, l3keys = false, dropBrace = false) {
const length = text.length;
let braces = 0;
let value = '';
let index = 0;
let start = 0;
let countBraces = true;
while (index < length) {
const c = text[index++];
switch (c) {
case '\\':
value += c + (text[index++] || '');
countBraces = false;
continue;
case ' ':
break;
case '{':
if (countBraces) {
start++;
}
braces++;
break;
case '}':
if (!braces) {
throw new tex_TexError('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
braces--;
countBraces = false;
break;
default:
if (!braces && end.includes(c)) {
return [
removeBraces(value, l3keys ? Math.min(1, start) : start),
c,
text.slice(index),
];
}
if (start > braces) {
start = braces;
}
countBraces = false;
}
value += c;
}
if (braces) {
throw new tex_TexError('ExtraOpenMissingClose', 'Extra open brace or missing close brace');
}
return dropBrace && start
? ['', '', removeBraces(value, 1)]
: [
removeBraces(value, l3keys ? Math.min(1, start) : start),
'',
text.slice(index),
];
}
const ParseUtil = {
cols(...W) {
return W.map((n) => UnitUtil.em(n)).join(' ');
},
fenced(configuration, open, mml, close, big = '', color = '') {
const nf = configuration.nodeFactory;
const mrow = nf.create('node', 'mrow', [], {
open: open,
close: close,
texClass: TEXCLASS.INNER,
});
let mo;
if (big) {
mo = new TexParser('\\' + big + 'l' + open, configuration.parser.stack.env, configuration).mml();
}
else {
const openNode = nf.create('text', open);
mo = nf.create('node', 'mo', [], {
fence: true,
stretchy: true,
symmetric: true,
texClass: TEXCLASS.OPEN,
}, openNode);
}
tex_NodeUtil.appendChildren(mrow, [mo, mml]);
if (big) {
mo = new TexParser('\\' + big + 'r' + close, configuration.parser.stack.env, configuration).mml();
}
else {
const closeNode = nf.create('text', close);
mo = nf.create('node', 'mo', [], {
fence: true,
stretchy: true,
symmetric: true,
texClass: TEXCLASS.CLOSE,
}, closeNode);
}
if (color) {
mo.attributes.set('mathcolor', color);
}
tex_NodeUtil.appendChildren(mrow, [mo]);
return mrow;
},
fixedFence(configuration, open, mml, close) {
const mrow = configuration.nodeFactory.create('node', 'mrow', [], {
open: open,
close: close,
texClass: TEXCLASS.ORD,
});
if (open) {
tex_NodeUtil.appendChildren(mrow, [
ParseUtil.mathPalette(configuration, open, 'l'),
]);
}
if (tex_NodeUtil.isType(mml, 'mrow')) {
tex_NodeUtil.appendChildren(mrow, tex_NodeUtil.getChildren(mml));
}
else {
tex_NodeUtil.appendChildren(mrow, [mml]);
}
if (close) {
tex_NodeUtil.appendChildren(mrow, [
ParseUtil.mathPalette(configuration, close, 'r'),
]);
}
return mrow;
},
mathPalette(configuration, fence, side) {
if (fence === '{' || fence === '}') {
fence = '\\' + fence;
}
const D = '{\\bigg' + side + ' ' + fence + '}';
const T = '{\\big' + side + ' ' + fence + '}';
return new TexParser('\\mathchoice' + D + T + T + T, {}, configuration).mml();
},
fixInitialMO(configuration, nodes) {
for (let i = 0, m = nodes.length; i < m; i++) {
const child = nodes[i];
if (child &&
!tex_NodeUtil.isType(child, 'mspace') &&
(!tex_NodeUtil.isType(child, 'TeXAtom') ||
(tex_NodeUtil.getChildren(child)[0] &&
tex_NodeUtil.getChildren(tex_NodeUtil.getChildren(child)[0]).length))) {
if (tex_NodeUtil.isEmbellished(child) ||
(tex_NodeUtil.isType(child, 'TeXAtom') &&
tex_NodeUtil.getTexClass(child) === TEXCLASS.REL)) {
const mi = configuration.nodeFactory.create('node', 'mi');
nodes.unshift(mi);
}
break;
}
}
},
internalMath(parser, text, level, font) {
text = text.replace(/ +/g, ' ');
if (parser.configuration.options.internalMath) {
return parser.configuration.options.internalMath(parser, text, level, font);
}
const mathvariant = font || parser.stack.env.font;
const def = mathvariant ? { mathvariant } : {};
let mml = [], i = 0, k = 0, c, node, match = '', braces = 0;
if (text.match(/\\?[${}\\]|\\\(|\\(?:eq)?ref\s*\{|\\U/)) {
while (i < text.length) {
c = text.charAt(i++);
if (c === '$') {
if (match === '$' && braces === 0) {
node = parser.create('node', 'TeXAtom', [
new TexParser(text.slice(k, i - 1), {}, parser.configuration).mml(),
]);
mml.push(node);
match = '';
k = i;
}
else if (match === '') {
if (k < i - 1) {
mml.push(ParseUtil.internalText(parser, text.slice(k, i - 1), def));
}
match = '$';
k = i;
}
}
else if (c === '{' && match !== '') {
braces++;
}
else if (c === '}') {
if (match === '}' && braces === 0) {
const atom = new TexParser(text.slice(k, i), {}, parser.configuration).mml();
node = parser.create('node', 'TeXAtom', [atom], def);
mml.push(node);
match = '';
k = i;
}
else if (match !== '') {
if (braces) {
braces--;
}
}
}
else if (c === '\\') {
if (match === '' && text.substring(i).match(/^(eq)?ref\s*\{/)) {
const len = RegExp['$&'].length;
if (k < i - 1) {
mml.push(ParseUtil.internalText(parser, text.slice(k, i - 1), def));
}
match = '}';
k = i - 1;
i += len;
}
else {
c = text.charAt(i++);
if (c === '(' && match === '') {
if (k < i - 2) {
mml.push(ParseUtil.internalText(parser, text.slice(k, i - 2), def));
}
match = ')';
k = i;
}
else if (c === ')' && match === ')' && braces === 0) {
node = parser.create('node', 'TeXAtom', [
new TexParser(text.slice(k, i - 2), {}, parser.configuration).mml(),
]);
mml.push(node);
match = '';
k = i;
}
else if (c.match(/[${}\\]/) && match === '') {
i--;
text = text.substring(0, i - 1) + text.substring(i);
}
else if (c === 'U') {
const arg = text
.substring(i)
.match(/^\s*(?:([0-9A-F])|\{\s*([0-9A-F]+)\s*\})/);
if (!arg) {
throw new tex_TexError('BadRawUnicode', 'Argument to %1 must a hexadecimal number with 1 to 6 digits', '\\U');
}
const c = String.fromCodePoint(parseInt(arg[1] || arg[2], 16));
text =
text.substring(0, i - 2) +
c +
text.substring(i + arg[0].length);
i = i - 2 + c.length;
}
}
}
}
if (match !== '') {
throw new tex_TexError('MathNotTerminated', 'Math mode is not properly terminated');
}
}
if (k < text.length) {
mml.push(ParseUtil.internalText(parser, text.slice(k), def));
}
if (level != null) {
mml = [
parser.create('node', 'mstyle', mml, {
displaystyle: false,
scriptlevel: level,
}),
];
}
else if (mml.length > 1) {
mml = [parser.create('node', 'mrow', mml)];
}
return mml;
},
internalText(parser, text, def) {
text = text
.replace(/\n+/g, ' ')
.replace(/^ +/, entities.nbsp)
.replace(/ +$/, entities.nbsp);
const textNode = parser.create('text', text);
return parser.create('node', 'mtext', [], def, textNode);
},
underOver(parser, base, script, pos, stack) {
ParseUtil.checkMovableLimits(base);
if (tex_NodeUtil.isType(base, 'munderover') && tex_NodeUtil.isEmbellished(base)) {
tex_NodeUtil.setProperties(tex_NodeUtil.getCoreMO(base), {
lspace: 0,
rspace: 0,
});
const mo = parser.create('node', 'mo', [], { rspace: 0 });
base = parser.create('node', 'mrow', [mo, base]);
}
const mml = parser.create('node', 'munderover', [base]);
tex_NodeUtil.setChild(mml, pos === 'over' ? mml.over : mml.under, script);
let node = mml;
if (stack) {
node = parser.create('node', 'TeXAtom', [
parser.create('node', 'mstyle', [mml], {
displaystyle: true,
scriptlevel: 0,
}),
], {
texClass: TEXCLASS.OP,
movesupsub: true,
});
}
tex_NodeUtil.setProperty(node, 'subsupOK', true);
return node;
},
checkMovableLimits(base) {
const symbol = tex_NodeUtil.isType(base, 'mo') ? tex_NodeUtil.getForm(base) : null;
if (tex_NodeUtil.getProperty(base, 'movablelimits') ||
(symbol && symbol[3] && symbol[3].movablelimits)) {
tex_NodeUtil.setProperties(base, { movablelimits: false });
}
},
setArrayAlign(array, align, parser) {
if (!parser) {
align = UnitUtil.trimSpaces(align || '');
}
if (align === 't') {
array.arraydef.align = 'baseline 1';
}
else if (align === 'b') {
array.arraydef.align = 'baseline -1';
}
else if (align === 'c') {
array.arraydef.align = 'axis';
}
else if (align) {
if (parser) {
parser.string = `[${align}]` + parser.string.slice(parser.i);
parser.i = 0;
}
else {
array.arraydef.align = align;
}
}
return array;
},
substituteArgs(parser, args, str) {
let text = '';
let newstring = '';
let i = 0;
while (i < str.length) {
let c = str.charAt(i++);
if (c === '\\') {
text += c + str.charAt(i++);
}
else if (c === '#') {
c = str.charAt(i++);
if (c === '#') {
text += c;
}
else {
if (!c.match(/[1-9]/) || parseInt(c, 10) > args.length) {
throw new tex_TexError('IllegalMacroParam', 'Illegal macro parameter reference');
}
newstring = ParseUtil.addArgs(parser, ParseUtil.addArgs(parser, newstring, text), args[parseInt(c, 10) - 1]);
text = '';
}
}
else {
text += c;
}
}
return ParseUtil.addArgs(parser, newstring, text);
},
addArgs(parser, s1, s2) {
if (s2.match(/^[a-z]/i) && s1.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)) {
s1 += ' ';
}
if (s1.length + s2.length > parser.configuration.options['maxBuffer']) {
throw new tex_TexError('MaxBufferSize', 'MathJax internal buffer size exceeded; is there a' +
' recursive macro call?');
}
return s1 + s2;
},
checkMaxMacros(parser, isMacro = true) {
if (++parser.macroCount <= parser.configuration.options['maxMacros']) {
return;
}
if (isMacro) {
throw new tex_TexError('MaxMacroSub1', 'MathJax maximum macro substitution count exceeded; ' +
'is here a recursive macro call?');
}
else {
throw new tex_TexError('MaxMacroSub2', 'MathJax maximum substitution count exceeded; ' +
'is there a recursive latex environment?');
}
},
checkEqnEnv(parser, nestable = true) {
const top = parser.stack.Top();
const first = top.First;
if ((top.getProperty('nestable') && nestable && !first) ||
top.getProperty('nestStart')) {
return;
}
if (!top.isKind('start') || first) {
throw new tex_TexError('ErroneousNestingEq', 'Erroneous nesting of equation structures');
}
},
copyNode(node, parser) {
const tree = node.copy();
const options = parser.configuration;
tree.walkTree((n) => {
options.addNode(n.kind, n);
const lists = (n.getProperty('in-lists') || '').split(/,/);
for (const list of lists) {
if (list) {
options.addNode(list, n);
}
}
});
return tree;
},
mmlFilterAttribute(_parser, _name, value) {
return value;
},
getFontDef(parser) {
const font = parser.stack.env['font'];
return font ? { mathvariant: font } : {};
},
keyvalOptions(attrib, allowed = null, error = false, l3keys = false) {
const def = readKeyval(attrib, l3keys);
if (allowed) {
for (const key of Object.keys(def)) {
if (Object.hasOwn(allowed, key)) {
if (allowed[key] instanceof KeyValueDef) {
const type = allowed[key];
const value = String(def[key]);
if (!type.verify(value)) {
throw new tex_TexError('InvalidValue', "Value for key '%1' is not of the expected type", key);
}
def[key] = type.convert(value);
}
}
else {
if (error) {
throw new tex_TexError('InvalidOption', 'Invalid option: %1', key);
}
delete def[key];
}
}
}
return def;
},
isLatinOrGreekChar(c) {
return !!c.normalize('NFD').match(/[a-zA-Z\u0370-\u03F0]/);
},
};
//# sourceMappingURL=ParseUtil.js.map
;// ./mjs/input/tex/ColumnParser.js
class ColumnParser {
constructor() {
this.columnHandler = {
l: (state) => (state.calign[state.j++] = 'left'),
c: (state) => (state.calign[state.j++] = 'center'),
r: (state) => (state.calign[state.j++] = 'right'),
p: (state) => this.getColumn(state, 'top'),
m: (state) => this.getColumn(state, 'middle'),
b: (state) => this.getColumn(state, 'bottom'),
w: (state) => this.getColumn(state, 'top', ''),
W: (state) => this.getColumn(state, 'top', ''),
'|': (state) => this.addRule(state, 'solid'),
':': (state) => this.addRule(state, 'dashed'),
'>': (state) => (state.cstart[state.j] =
(state.cstart[state.j] || '') + this.getBraces(state)),
'<': (state) => (state.cend[state.j - 1] =
(state.cend[state.j - 1] || '') + this.getBraces(state)),
'@': (state) => this.addAt(state, this.getBraces(state)),
'!': (state) => this.addBang(state, this.getBraces(state)),
'*': (state) => this.repeat(state),
P: (state) => this.macroColumn(state, '>{$}p{#1}<{$}', 1),
M: (state) => this.macroColumn(state, '>{$}m{#1}<{$}', 1),
B: (state) => this.macroColumn(state, '>{$}b{#1}<{$}', 1),
' ': (_state) => { },
};
this.MAXCOLUMNS = 10000;
}
process(parser, template, array) {
const state = {
parser,
template,
i: 0,
j: 0,
c: '',
cwidth: [],
calign: [],
cspace: [],
clines: [],
cstart: array.cstart,
cend: array.cend,
ralign: array.ralign,
cextra: array.cextra,
};
let n = 0;
while (state.i < state.template.length) {
if (n++ > this.MAXCOLUMNS) {
throw new tex_TexError('MaxColumns', 'Too many column specifiers (perhaps looping column definitions?)');
}
const code = state.template.codePointAt(state.i);
const c = (state.c = String.fromCodePoint(code));
state.i += c.length;
if (!Object.hasOwn(this.columnHandler, c)) {
throw new tex_TexError('BadPreamToken', 'Illegal pream-token (%1)', c);
}
this.columnHandler[c](state);
}
this.setColumnAlign(state, array);
this.setColumnWidths(state, array);
this.setColumnSpacing(state, array);
this.setColumnLines(state, array);
this.setPadding(state, array);
}
setColumnAlign(state, array) {
array.arraydef.columnalign = state.calign.join(' ');
}
setColumnWidths(state, array) {
if (!state.cwidth.length)
return;
const cwidth = [...state.cwidth];
if (cwidth.length < state.calign.length) {
cwidth.push('auto');
}
array.arraydef.columnwidth = cwidth.map((w) => w || 'auto').join(' ');
}
setColumnSpacing(state, array) {
if (!state.cspace.length)
return;
const cspace = [...state.cspace];
if (cspace.length < state.calign.length) {
cspace.push('1em');
}
array.arraydef.columnspacing = cspace
.slice(1)
.map((d) => d || '1em')
.join(' ');
}
setColumnLines(state, array) {
if (!state.clines.length)
return;
const clines = [...state.clines];
if (clines[0]) {
array.frame.push(['left', clines[0]]);
}
if (clines.length > state.calign.length) {
array.frame.push(['right', clines.pop()]);
}
else if (clines.length < state.calign.length) {
clines.push('none');
}
if (clines.length > 1) {
array.arraydef.columnlines = clines
.slice(1)
.map((l) => l || 'none')
.join(' ');
}
}
setPadding(state, array) {
if (!state.cextra[0] && !state.cextra[state.calign.length - 1])
return;
const i = state.calign.length - 1;
const cspace = state.cspace;
const space = !state.cextra[i] ? null : cspace[i];
array.arraydef['data-array-padding'] =
`${cspace[0] || '.5em'} ${space || '.5em'}`;
}
getColumn(state, ralign, calign = 'left') {
state.calign[state.j] = calign || this.getAlign(state);
state.cwidth[state.j] = this.getDimen(state);
state.ralign[state.j] = [
ralign,
state.cwidth[state.j],
state.calign[state.j],
];
state.j++;
}
getDimen(state) {
const dim = this.getBraces(state);
if (!UnitUtil.matchDimen(dim)[0]) {
throw new tex_TexError('MissingColumnDimOrUnits', 'Missing dimension or its units for %1 column declaration', state.c);
}
return dim;
}
getAlign(state) {
const align = this.getBraces(state);
return lookup(align.toLowerCase(), { l: 'left', c: 'center', r: 'right' }, '');
}
getBraces(state) {
while (state.template[state.i] === ' ')
state.i++;
if (state.i >= state.template.length) {
throw new tex_TexError('MissingArgForColumn', 'Missing argument for %1 column declaration', state.c);
}
if (state.template[state.i] !== '{') {
return state.template[state.i++];
}
const i = ++state.i;
let braces = 1;
while (state.i < state.template.length) {
switch (state.template.charAt(state.i++)) {
case '\\':
state.i++;
break;
case '{':
braces++;
break;
case '}':
if (--braces === 0) {
return state.template.slice(i, state.i - 1);
}
break;
}
}
throw new tex_TexError('MissingCloseBrace', 'Missing close brace');
}
macroColumn(state, macro, n) {
const args = [];
while (n > 0 && n--) {
args.push(this.getBraces(state));
}
state.template =
ParseUtil.substituteArgs(state.parser, args, macro) +
state.template.slice(state.i);
state.i = 0;
}
addRule(state, rule) {
if (state.clines[state.j]) {
this.addAt(state, '\\,');
}
state.clines[state.j] = rule;
if (state.cspace[state.j] === '0') {
state.cstart[state.j] = '\\hspace{.5em}';
}
}
addAt(state, macro) {
const { cstart, cspace, j } = state;
state.cextra[j] = true;
state.calign[j] = 'center';
if (state.clines[j]) {
if (cspace[j] === '.5em') {
cstart[j - 1] += '\\hspace{.25em}';
}
else if (!cspace[j]) {
state.cend[j - 1] = (state.cend[j - 1] || '') + '\\hspace{.5em}';
}
}
cstart[j] = macro;
cspace[j] = '0';
cspace[++state.j] = '0';
}
addBang(state, macro) {
const { cstart, cspace, j } = state;
state.cextra[j] = true;
state.calign[j] = 'center';
cstart[j] =
(cspace[j] === '0' && state.clines[j] ? '\\hspace{.25em}' : '') + macro;
if (!cspace[j]) {
cspace[j] = '.5em';
}
cspace[++state.j] = '.5em';
}
repeat(state) {
const num = this.getBraces(state);
const cols = this.getBraces(state);
const n = parseInt(num);
if (String(n) !== num) {
throw new tex_TexError('ColArgNotNum', 'First argument to %1 column specifier must be a number', '*');
}
state.template =
new Array(n).fill(cols).join('') + state.template.substring(state.i);
state.i = 0;
}
}
//# sourceMappingURL=ColumnParser.js.map
;// ./mjs/input/tex/ParseOptions.js
const MATHVARIANT = TexConstant.Variant;
class ParseOptions {
constructor(configuration, options = []) {
this.options = {};
this.columnParser = new ColumnParser();
this.packageData = new Map();
this.parsers = [];
this.root = null;
this.nodeLists = {};
this.error = false;
this.handlers = configuration.handlers;
this.nodeFactory = new NodeFactory();
this.nodeFactory.configuration = this;
this.nodeFactory.setCreators(configuration.nodes);
this.itemFactory = new tex_StackItemFactory(configuration.items);
this.itemFactory.configuration = this;
defaultOptions(this.options, ...options);
defaultOptions(this.options, configuration.options);
this.mathStyle =
ParseOptions.getVariant.get(this.options.mathStyle) ||
ParseOptions.getVariant.get('TeX');
}
pushParser(parser) {
this.parsers.unshift(parser);
}
popParser() {
this.parsers.shift();
}
get parser() {
return this.parsers[0];
}
clear() {
this.parsers = [];
this.root = null;
this.nodeLists = {};
this.error = false;
this.tags.resetTag();
}
addNode(property, node) {
let list = this.nodeLists[property];
if (!list) {
list = this.nodeLists[property] = [];
}
list.push(node);
if (node.kind !== property) {
const inlists = tex_NodeUtil.getProperty(node, 'in-lists') || '';
const lists = (inlists ? inlists.split(/,/) : [])
.concat(property)
.join(',');
tex_NodeUtil.setProperty(node, 'in-lists', lists);
}
}
getList(property) {
const list = this.nodeLists[property] || [];
const result = [];
for (const node of list) {
if (this.inTree(node)) {
result.push(node);
}
}
this.nodeLists[property] = result;
return result;
}
removeFromList(property, nodes) {
const list = this.nodeLists[property] || [];
for (const node of nodes) {
const i = list.indexOf(node);
if (i >= 0) {
list.splice(i, 1);
}
}
}
inTree(node) {
while (node && node !== this.root) {
node = node.parent;
}
return !!node;
}
}
ParseOptions.getVariant = new Map([
[
'TeX',
(c, b) => b ? (c.match(/^[\u0391-\u03A9\u03F4]/) ? MATHVARIANT.NORMAL : '') : '',
],
['ISO', (_c) => MATHVARIANT.ITALIC],
[
'French',
(c) => c.normalize('NFD').match(/^[a-z]/)
? MATHVARIANT.ITALIC
: MATHVARIANT.NORMAL,
],
['upright', (_c) => MATHVARIANT.NORMAL],
]);
/* harmony default export */ const tex_ParseOptions = (ParseOptions);
//# sourceMappingURL=ParseOptions.js.map
;// ./mjs/input/tex/Tags.js
class Label {
constructor(tag = '???', id = '') {
this.tag = tag;
this.id = id;
}
}
class TagInfo {
constructor(env = '', taggable = false, defaultTags = false, tag = null, tagId = '', tagFormat = '', noTag = false, labelId = '') {
this.env = env;
this.taggable = taggable;
this.defaultTags = defaultTags;
this.tag = tag;
this.tagId = tagId;
this.tagFormat = tagFormat;
this.noTag = noTag;
this.labelId = labelId;
}
}
class AbstractTags {
constructor() {
this.counter = 0;
this.allCounter = 0;
this.configuration = null;
this.ids = {};
this.allIds = {};
this.labels = {};
this.allLabels = {};
this.redo = false;
this.refUpdate = false;
this.currentTag = new TagInfo();
this.history = [];
this.stack = [];
this.enTag = function (node, tag) {
const nf = this.configuration.nodeFactory;
const cell = nf.create('node', 'mtd', [node]);
const row = nf.create('node', 'mlabeledtr', [tag, cell]);
const table = nf.create('node', 'mtable', [row], {
side: this.configuration.options['tagSide'],
minlabelspacing: this.configuration.options['tagIndent'],
displaystyle: true,
});
return table;
};
}
start(env, taggable, defaultTags) {
if (this.currentTag) {
this.stack.push(this.currentTag);
}
const label = this.label;
this.currentTag = new TagInfo(env, taggable, defaultTags);
this.label = label;
}
get env() {
return this.currentTag.env;
}
end() {
this.history.push(this.currentTag);
const label = this.label;
this.currentTag = this.stack.pop();
if (label && !this.label) {
this.label = label;
}
}
tag(tag, noFormat) {
this.currentTag.tag = tag;
this.currentTag.tagFormat = noFormat ? tag : this.formatTag(tag);
this.currentTag.noTag = false;
}
notag() {
this.tag('', true);
this.currentTag.noTag = true;
}
get noTag() {
return this.currentTag.noTag;
}
set label(label) {
this.currentTag.labelId = label;
}
get label() {
return this.currentTag.labelId;
}
formatUrl(id, base) {
return base + '#' + encodeURIComponent(id);
}
formatTag(tag) {
return '(' + tag + ')';
}
formatRef(tag) {
return this.formatTag(tag);
}
formatId(id) {
return 'mjx-eqn:' + id.replace(/\s/g, '_');
}
formatNumber(n) {
return n.toString();
}
autoTag() {
if (this.currentTag.tag == null) {
this.counter++;
this.tag(this.formatNumber(this.counter), false);
}
}
clearTag() {
this.tag(null, true);
this.currentTag.tagId = '';
}
getTag(force = false) {
if (force) {
this.autoTag();
return this.makeTag();
}
const ct = this.currentTag;
if (ct.taggable && !ct.noTag) {
if (ct.defaultTags) {
this.autoTag();
}
if (ct.tag) {
return this.makeTag();
}
}
return null;
}
resetTag() {
this.history = [];
this.redo = false;
this.refUpdate = false;
this.clearTag();
}
reset(offset = 0) {
this.resetTag();
this.counter = this.allCounter = offset;
this.allLabels = {};
this.allIds = {};
this.label = '';
}
startEquation(math) {
this.history = [];
this.stack = [];
this.clearTag();
this.currentTag = new TagInfo('', undefined, undefined);
this.labels = {};
this.ids = {};
this.counter = this.allCounter;
this.redo = false;
const recompile = math.inputData.recompile;
if (recompile) {
this.refUpdate = true;
this.counter = recompile.counter;
}
}
finishEquation(math) {
if (this.redo) {
math.inputData.recompile = {
state: math.state(),
counter: this.allCounter,
};
}
if (!this.refUpdate) {
this.allCounter = this.counter;
}
Object.assign(this.allIds, this.ids);
Object.assign(this.allLabels, this.labels);
}
finalize(node, env) {
if (!env.display || this.currentTag.env || this.currentTag.tag == null) {
return node;
}
const tag = this.makeTag();
const table = this.enTag(node, tag);
return table;
}
makeId() {
this.currentTag.tagId = this.formatId(this.configuration.options['useLabelIds']
? this.label || this.currentTag.tag
: this.currentTag.tag);
}
makeTag() {
this.makeId();
if (this.label) {
this.labels[this.label] = new Label(this.currentTag.tag, this.currentTag.tagId);
this.label = '';
}
const mml = new TexParser('\\text{' + this.currentTag.tagFormat + '}', {}, this.configuration).mml();
return this.configuration.nodeFactory.create('node', 'mtd', [mml], {
id: this.currentTag.tagId,
rowalign: this.configuration.options.tagAlign,
});
}
}
class NoTags extends AbstractTags {
autoTag() { }
getTag() {
return !this.currentTag.tag ? null : super.getTag();
}
}
class AllTags extends AbstractTags {
finalize(node, env) {
if (!env.display ||
this.history.find(function (x) {
return x.taggable;
})) {
return node;
}
const tag = this.getTag(true);
return this.enTag(node, tag);
}
}
const tagsMapping = new Map([
['none', NoTags],
['all', AllTags],
]);
let defaultTags = 'none';
const TagsFactory = {
OPTIONS: {
tags: defaultTags,
tagSide: 'right',
tagIndent: '0.8em',
useLabelIds: true,
ignoreDuplicateLabels: false,
tagAlign: 'baseline',
},
add(name, constr) {
tagsMapping.set(name, constr);
},
addTags(tags) {
for (const key of Object.keys(tags)) {
TagsFactory.add(key, tags[key]);
}
},
create(name) {
const constr = tagsMapping.get(name) || tagsMapping.get(defaultTags);
if (!constr) {
throw Error('Unknown tags class');
}
return new constr();
},
setDefault(name) {
defaultTags = name;
},
getDefault() {
return TagsFactory.create(defaultTags);
},
};
//# sourceMappingURL=Tags.js.map
;// ./mjs/input/tex/Token.js
class Token {
constructor(_token, _char, _attributes) {
this._token = _token;
this._char = _char;
this._attributes = _attributes;
}
get token() {
return this._token;
}
get char() {
return this._char;
}
get attributes() {
return this._attributes;
}
}
class Macro {
constructor(_token, _func, _args = []) {
this._token = _token;
this._func = _func;
this._args = _args;
}
get token() {
return this._token;
}
get func() {
return this._func;
}
get args() {
return this._args;
}
}
//# sourceMappingURL=Token.js.map
;// ./mjs/input/tex/TokenMap.js
function parseResult(result) {
return result === void 0 ? true : result;
}
class AbstractTokenMap {
constructor(_name, _parser) {
this._name = _name;
this._parser = _parser;
MapHandler.register(this);
}
get name() {
return this._name;
}
parserFor(token) {
return this.contains(token) ? this.parser : null;
}
parse([env, token]) {
const parser = this.parserFor(token);
const mapped = this.lookup(token);
return parser && mapped ? parseResult(parser(env, mapped)) : null;
}
set parser(parser) {
this._parser = parser;
}
get parser() {
return this._parser;
}
}
class RegExpMap extends AbstractTokenMap {
constructor(name, parser, _regExp) {
super(name, parser);
this._regExp = _regExp;
}
contains(token) {
return this._regExp.test(token);
}
lookup(token) {
return this.contains(token) ? token : null;
}
}
class AbstractParseMap extends AbstractTokenMap {
constructor() {
super(...arguments);
this.map = new Map();
}
lookup(token) {
return this.map.get(token);
}
contains(token) {
return this.map.has(token);
}
add(token, object) {
this.map.set(token, object);
}
remove(token) {
this.map.delete(token);
}
}
class CharacterMap extends AbstractParseMap {
constructor(name, parser, json) {
super(name, parser);
for (const key of Object.keys(json)) {
const value = json[key];
const [char, attrs] = typeof value === 'string' ? [value, null] : value;
const character = new Token(key, char, attrs);
this.add(key, character);
}
}
}
class DelimiterMap extends CharacterMap {
parse([env, token]) {
return super.parse([env, '\\' + token]);
}
}
class MacroMap extends AbstractParseMap {
constructor(name, json, functionMap = {}) {
super(name, null);
const getMethod = (func) => typeof func === 'string' ? functionMap[func] : func;
for (const [key, value] of Object.entries(json)) {
let func;
let args;
if (Array.isArray(value)) {
func = getMethod(value[0]);
args = value.slice(1);
}
else {
func = getMethod(value);
args = [];
}
const character = new Macro(key, func, args);
this.add(key, character);
}
}
parserFor(token) {
const macro = this.lookup(token);
return macro ? macro.func : null;
}
parse([env, token]) {
const macro = this.lookup(token);
const parser = this.parserFor(token);
if (!macro || !parser) {
return null;
}
return parseResult(parser(env, macro.token, ...macro.args));
}
}
class CommandMap extends MacroMap {
parse([env, token]) {
const macro = this.lookup(token);
const parser = this.parserFor(token);
if (!macro || !parser) {
return null;
}
const saveCommand = env.currentCS;
env.currentCS = '\\' + token;
const result = parser(env, '\\' + macro.token, ...macro.args);
env.currentCS = saveCommand;
return parseResult(result);
}
}
class EnvironmentMap extends MacroMap {
constructor(name, parser, json, functionMap = {}) {
super(name, json, functionMap);
this.parser = parser;
}
parse([env, token]) {
const macro = this.lookup(token);
const envParser = this.parserFor(token);
if (!macro || !envParser) {
return null;
}
return parseResult(this.parser(env, macro.token, envParser, macro.args));
}
}
//# sourceMappingURL=TokenMap.js.map
;// ./components/mjs/core/lib/util/PrioritizedList.js
const PrioritizedList_def = MathJax._.util.PrioritizedList;
const PrioritizedList = PrioritizedList_def.PrioritizedList;
;// ./components/mjs/core/lib/util/FunctionList.js
const FunctionList_def = MathJax._.util.FunctionList;
const FunctionList = FunctionList_def.FunctionList;
;// ./mjs/input/tex/MapHandler.js
const maps = new Map();
const MapHandler = {
register(map) {
maps.set(map.name, map);
},
getMap(name) {
return maps.get(name);
},
};
class SubHandler {
constructor() {
this._configuration = new PrioritizedList();
this._fallback = new FunctionList();
}
add(maps, fallback, priority = PrioritizedList.DEFAULTPRIORITY) {
for (const name of maps.slice().reverse()) {
const map = MapHandler.getMap(name);
if (!map) {
this.warn(`Configuration '${name}' not found! Omitted.`);
return;
}
this._configuration.add(map, priority);
}
if (fallback) {
this._fallback.add(fallback, priority);
}
}
remove(maps, fallback = null) {
for (const name of maps) {
const map = this.retrieve(name);
if (map) {
this._configuration.remove(map);
}
}
if (fallback) {
this._fallback.remove(fallback);
}
}
parse(input) {
for (const { item: map } of this._configuration) {
const result = map.parse(input);
if (result === SubHandler.FALLBACK) {
break;
}
if (result) {
return result;
}
}
const [env, token] = input;
Array.from(this._fallback)[0].item(env, token);
return;
}
lookup(token) {
const map = this.applicable(token);
return map ? map.lookup(token) : null;
}
contains(token) {
const map = this.applicable(token);
return (!!map && !(map instanceof CharacterMap && map.lookup(token).char === null));
}
toString() {
const names = [];
for (const { item: map } of this._configuration) {
names.push(map.name);
}
return names.join(', ');
}
applicable(token) {
for (const { item: map } of this._configuration) {
if (map.contains(token)) {
return map;
}
}
return null;
}
retrieve(name) {
for (const { item: map } of this._configuration) {
if (map.name === name) {
return map;
}
}
return null;
}
warn(message) {
console.log('TexParser Warning: ' + message);
}
}
SubHandler.FALLBACK = Symbol('fallback');
class SubHandlers {
constructor() {
this.map = new Map();
}
add(handlers, fallbacks, priority = PrioritizedList.DEFAULTPRIORITY) {
for (const key of Object.keys(handlers)) {
const name = key;
let subHandler = this.get(name);
if (!subHandler) {
subHandler = new SubHandler();
this.set(name, subHandler);
}
subHandler.add(handlers[name], fallbacks[name], priority);
}
}
remove(handlers, fallbacks) {
for (const name of Object.keys(handlers)) {
const subHandler = this.get(name);
if (subHandler) {
subHandler.remove(handlers[name], fallbacks[name]);
}
}
}
set(name, subHandler) {
this.map.set(name, subHandler);
}
get(name) {
return this.map.get(name);
}
retrieve(name) {
for (const handler of this.map.values()) {
const map = handler.retrieve(name);
if (map) {
return map;
}
}
return null;
}
keys() {
return this.map.keys();
}
}
//# sourceMappingURL=MapHandler.js.map
;// ./mjs/input/tex/Configuration.js
class Configuration {
static makeProcessor(func, priority) {
return Array.isArray(func) ? func : [func, priority];
}
static _create(name, config = {}) {
var _a;
const priority = (_a = config.priority) !== null && _a !== void 0 ? _a : PrioritizedList.DEFAULTPRIORITY;
const init = config.init ? this.makeProcessor(config.init, priority) : null;
const conf = config.config
? this.makeProcessor(config.config, priority)
: null;
const preprocessors = (config.preprocessors || []).map((pre) => this.makeProcessor(pre, priority));
const postprocessors = (config.postprocessors || []).map((post) => this.makeProcessor(post, priority));
const parser = config.parser || 'tex';
return new Configuration(name, config[ConfigurationType.HANDLER] || {}, config[ConfigurationType.FALLBACK] || {}, config[ConfigurationType.ITEMS] || {}, config[ConfigurationType.TAGS] || {}, config[ConfigurationType.OPTIONS] || {}, config[ConfigurationType.NODES] || {}, preprocessors, postprocessors, init, conf, priority, parser);
}
static create(name, config = {}) {
const configuration = Configuration._create(name, config);
ConfigurationHandler.set(name, configuration);
return configuration;
}
static local(config = {}) {
return Configuration._create('', config);
}
constructor(name, handler = {}, fallback = {}, items = {}, tags = {}, options = {}, nodes = {}, preprocessors = [], postprocessors = [], initMethod = null, configMethod = null, priority, parser) {
this.name = name;
this.handler = handler;
this.fallback = fallback;
this.items = items;
this.tags = tags;
this.options = options;
this.nodes = nodes;
this.preprocessors = preprocessors;
this.postprocessors = postprocessors;
this.initMethod = initMethod;
this.configMethod = configMethod;
this.priority = priority;
this.parser = parser;
this.handler = Object.assign({
[HandlerType.CHARACTER]: [],
[HandlerType.DELIMITER]: [],
[HandlerType.MACRO]: [],
[HandlerType.ENVIRONMENT]: [],
}, handler);
}
get init() {
return this.initMethod ? this.initMethod[0] : null;
}
get config() {
return this.configMethod ? this.configMethod[0] : null;
}
}
const Configuration_maps = new Map();
const ConfigurationHandler = {
set(name, map) {
Configuration_maps.set(name, map);
},
get(name) {
return Configuration_maps.get(name);
},
keys() {
return Configuration_maps.keys();
},
};
class ParserConfiguration {
constructor(packages, parsers = ['tex']) {
this.initMethod = new FunctionList();
this.configMethod = new FunctionList();
this.configurations = new PrioritizedList();
this.parsers = [];
this.handlers = new SubHandlers();
this.items = {};
this.tags = {};
this.options = {};
this.nodes = {};
this.parsers = parsers;
for (const pkg of packages.slice().reverse()) {
this.addPackage(pkg);
}
for (const { item: config, priority: priority } of this.configurations) {
this.append(config, priority);
}
}
init() {
this.initMethod.execute(this);
}
config(jax) {
this.configMethod.execute(this, jax);
for (const config of this.configurations) {
this.addFilters(jax, config.item);
}
}
addPackage(pkg) {
const name = typeof pkg === 'string' ? pkg : pkg[0];
const conf = this.getPackage(name);
if (conf) {
this.configurations.add(conf, typeof pkg === 'string' ? conf.priority : pkg[1]);
}
}
add(name, jax, options = {}) {
const config = this.getPackage(name);
this.append(config);
this.configurations.add(config, config.priority);
this.init();
const parser = jax.parseOptions;
parser.nodeFactory.setCreators(config.nodes);
for (const kind of Object.keys(config.items)) {
parser.itemFactory.setNodeClass(kind, config.items[kind]);
}
TagsFactory.addTags(config.tags);
defaultOptions(parser.options, config.options);
userOptions(parser.options, options);
this.addFilters(jax, config);
if (config.config) {
config.config(this, jax);
}
}
getPackage(name) {
const config = ConfigurationHandler.get(name);
if (config && !this.parsers.includes(config.parser)) {
throw Error(`Package '${name}' doesn't target the proper parser`);
}
if (!config) {
this.warn(`Package '${name}' not found. Omitted.`);
}
return config;
}
append(config, priority) {
priority = priority || config.priority;
if (config.initMethod) {
this.initMethod.add(config.initMethod[0], config.initMethod[1]);
}
if (config.configMethod) {
this.configMethod.add(config.configMethod[0], config.configMethod[1]);
}
this.handlers.add(config.handler, config.fallback, priority);
Object.assign(this.items, config.items);
Object.assign(this.tags, config.tags);
defaultOptions(this.options, config.options);
Object.assign(this.nodes, config.nodes);
}
addFilters(jax, config) {
for (const [pre, priority] of config.preprocessors) {
jax.preFilters.add(pre, priority);
}
for (const [post, priority] of config.postprocessors) {
jax.postFilters.add(post, priority);
}
}
warn(message) {
console.warn('MathJax Warning: ' + message);
}
}
//# sourceMappingURL=Configuration.js.map
;// ./components/mjs/core/lib/util/Styles.js
const Styles_def = MathJax._.util.Styles;
const TRBL = Styles_def.TRBL;
const WSC = Styles_def.WSC;
const Styles = Styles_def.Styles;
;// ./mjs/input/tex/base/BaseItems.js
class StartItem extends BaseItem {
constructor(factory, global) {
super(factory);
this.global = global;
}
get kind() {
return 'start';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('stop')) {
let node = this.toMml();
if (!this.global.isInner) {
node = this.factory.configuration.tags.finalize(node, this.env);
}
return [[this.factory.create('mml', node)], true];
}
return super.checkItem(item);
}
}
class StopItem extends BaseItem {
get kind() {
return 'stop';
}
get isClose() {
return true;
}
}
class OpenItem extends BaseItem {
get kind() {
return 'open';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('close')) {
const mml = this.toMml();
const node = this.create('node', 'TeXAtom', [mml]);
addLatexItem(node, item);
return [[this.factory.create('mml', node)], true];
}
return super.checkItem(item);
}
}
OpenItem.errors = Object.assign(Object.create(BaseItem.errors), {
stop: ['ExtraOpenMissingClose', 'Extra open brace or missing close brace'],
});
class CloseItem extends BaseItem {
get kind() {
return 'close';
}
get isClose() {
return true;
}
}
class NullItem extends BaseItem {
get kind() {
return 'null';
}
}
class PrimeItem extends BaseItem {
get kind() {
return 'prime';
}
checkItem(item) {
const [top0, top1] = this.Peek(2);
const isSup = (tex_NodeUtil.isType(top0, 'msubsup') || tex_NodeUtil.isType(top0, 'msup')) &&
!tex_NodeUtil.getChildAt(top0, top0.sup);
const isOver = (tex_NodeUtil.isType(top0, 'munderover') || tex_NodeUtil.isType(top0, 'mover')) &&
!tex_NodeUtil.getChildAt(top0, top0.over) &&
!tex_NodeUtil.getProperty(top0, 'subsupOK');
if (!isSup && !isOver) {
const node = this.create('node', top0.getProperty('movesupsub') ? 'mover' : 'msup', [top0, top1]);
return [[node, item], true];
}
const pos = isSup ? top0.sup : top0.over;
tex_NodeUtil.setChild(top0, pos, top1);
return [[top0, item], true];
}
}
class SubsupItem extends BaseItem {
get kind() {
return 'subsup';
}
checkItem(item) {
if (item.isKind('open') || item.isKind('left')) {
return BaseItem.success;
}
const top = this.First;
const position = this.getProperty('position');
if (item.isKind('mml')) {
if (this.getProperty('primes')) {
if (position !== 2) {
tex_NodeUtil.setChild(top, 2, this.getProperty('primes'));
}
else {
tex_NodeUtil.setProperty(this.getProperty('primes'), 'variantForm', true);
const node = this.create('node', 'mrow', [
this.getProperty('primes'),
item.First,
]);
item.First = node;
}
}
tex_NodeUtil.setChild(top, position, item.First);
if (this.getProperty('movesupsub') != null) {
tex_NodeUtil.setProperty(top, 'movesupsub', this.getProperty('movesupsub'));
}
const result = this.factory.create('mml', top);
return [[result], true];
}
super.checkItem(item);
const error = this.getErrors(['', 'sub', 'sup'][position]);
throw new tex_TexError(error[0], error[1], ...error.splice(2));
}
}
SubsupItem.errors = Object.assign(Object.create(BaseItem.errors), {
stop: ['MissingScript', 'Missing superscript or subscript argument'],
sup: ['MissingOpenForSup', 'Missing open brace for superscript'],
sub: ['MissingOpenForSub', 'Missing open brace for subscript'],
});
class OverItem extends BaseItem {
constructor(factory) {
super(factory);
this.setProperty('name', '\\over');
}
get kind() {
return 'over';
}
get isClose() {
return true;
}
checkItem(item) {
if (item.isKind('over')) {
throw new tex_TexError('AmbiguousUseOf', 'Ambiguous use of %1', item.getName());
}
if (item.isClose) {
let mml = this.create('node', 'mfrac', [
this.getProperty('num'),
this.toMml(false),
]);
if (this.getProperty('thickness') != null) {
tex_NodeUtil.setAttribute(mml, 'linethickness', this.getProperty('thickness'));
}
if (this.getProperty('ldelim') || this.getProperty('rdelim')) {
tex_NodeUtil.setProperty(mml, 'withDelims', true);
mml = ParseUtil.fixedFence(this.factory.configuration, this.getProperty('ldelim'), mml, this.getProperty('rdelim'));
}
mml.attributes.set(TexConstant.Attr.LATEXITEM, this.getProperty('name'));
return [[this.factory.create('mml', mml), item], true];
}
return super.checkItem(item);
}
toString() {
return ('over[' + this.getProperty('num') + ' / ' + this.nodes.join('; ') + ']');
}
}
class LeftItem extends BaseItem {
constructor(factory, delim) {
super(factory);
this.setProperty('delim', delim);
}
get kind() {
return 'left';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('right')) {
const fenced = ParseUtil.fenced(this.factory.configuration, this.getProperty('delim'), this.toMml(), item.getProperty('delim'), '', item.getProperty('color'));
const left = fenced.childNodes[0];
const right = fenced.childNodes[fenced.childNodes.length - 1];
const mrow = this.factory.create('mml', fenced);
addLatexItem(left, this, '\\left');
addLatexItem(right, item, '\\right');
mrow
.Peek()[0]
.attributes.set(TexConstant.Attr.LATEXITEM, '\\left' + item.startStr.slice(this.startI, item.stopI));
return [[mrow], true];
}
if (item.isKind('middle')) {
const def = { stretchy: true };
if (item.getProperty('color')) {
def.mathcolor = item.getProperty('color');
}
const middle = this.create('token', 'mo', def, item.getProperty('delim'));
addLatexItem(middle, item, '\\middle');
this.Push(this.create('node', 'TeXAtom', [], { texClass: TEXCLASS.CLOSE }), middle, this.create('node', 'TeXAtom', [], { texClass: TEXCLASS.OPEN }));
this.env = {};
return [[this], true];
}
return super.checkItem(item);
}
}
LeftItem.errors = Object.assign(Object.create(BaseItem.errors), {
stop: ['ExtraLeftMissingRight', 'Extra \\left or missing \\right'],
});
class Middle extends BaseItem {
constructor(factory, delim, color) {
super(factory);
this.setProperty('delim', delim);
if (color) {
this.setProperty('color', color);
}
}
get kind() {
return 'middle';
}
get isClose() {
return true;
}
}
class RightItem extends BaseItem {
constructor(factory, delim, color) {
super(factory);
this.setProperty('delim', delim);
if (color) {
this.setProperty('color', color);
}
}
get kind() {
return 'right';
}
get isClose() {
return true;
}
}
class BreakItem extends BaseItem {
get kind() {
return 'break';
}
constructor(factory, linebreak, insert) {
super(factory);
this.setProperty('linebreak', linebreak);
this.setProperty('insert', insert);
}
checkItem(item) {
var _a, _b;
const linebreak = this.getProperty('linebreak');
if (item.isKind('mml')) {
const mml = item.First;
if (mml.isKind('mo')) {
const style = ((_b = (_a = tex_NodeUtil.getOp(mml)) === null || _a === void 0 ? void 0 : _a[3]) === null || _b === void 0 ? void 0 : _b.linebreakstyle) ||
tex_NodeUtil.getAttribute(mml, 'linebreakstyle');
if (style !== 'after') {
tex_NodeUtil.setAttribute(mml, 'linebreak', linebreak);
return [[item], true];
}
if (!this.getProperty('insert')) {
return [[item], true];
}
}
}
const mml = this.create('token', 'mspace', { linebreak });
return [[this.factory.create('mml', mml), item], true];
}
}
class BeginItem extends BaseItem {
get kind() {
return 'begin';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('end')) {
if (item.getName() !== this.getName()) {
throw new tex_TexError('EnvBadEnd', '\\begin{%1} ended with \\end{%2}', this.getName(), item.getName());
}
const node = this.toMml();
addLatexItem(node, item);
return [[this.factory.create('mml', node)], true];
}
if (item.isKind('stop')) {
throw new tex_TexError('EnvMissingEnd', 'Missing \\end{%1}', this.getName());
}
return super.checkItem(item);
}
}
class EndItem extends BaseItem {
get kind() {
return 'end';
}
get isClose() {
return true;
}
}
class StyleItem extends BaseItem {
get kind() {
return 'style';
}
checkItem(item) {
if (!item.isClose) {
return super.checkItem(item);
}
const mml = this.create('node', 'mstyle', this.nodes, this.getProperty('styles'));
return [[this.factory.create('mml', mml), item], true];
}
}
class PositionItem extends BaseItem {
get kind() {
return 'position';
}
checkItem(item) {
if (item.isClose) {
throw new tex_TexError('MissingBoxFor', 'Missing box for %1', this.getName());
}
if (item.isFinal) {
let mml = item.toMml();
switch (this.getProperty('move')) {
case 'vertical':
mml = this.create('node', 'mpadded', [mml], {
height: this.getProperty('dh'),
depth: this.getProperty('dd'),
voffset: this.getProperty('dh'),
});
return [[this.factory.create('mml', mml)], true];
case 'horizontal':
return [
[
this.factory.create('mml', this.getProperty('left')),
item,
this.factory.create('mml', this.getProperty('right')),
],
true,
];
}
}
return super.checkItem(item);
}
}
class CellItem extends BaseItem {
get kind() {
return 'cell';
}
get isClose() {
return true;
}
}
class MmlItem extends BaseItem {
get isFinal() {
return true;
}
get kind() {
return 'mml';
}
}
class FnItem extends BaseItem {
get kind() {
return 'fn';
}
checkItem(item) {
const top = this.First;
if (top) {
if (item.isOpen) {
return BaseItem.success;
}
if (!item.isKind('fn')) {
let mml = item.First;
if (!item.isKind('mml') || !mml) {
return [[top, item], true];
}
if ((tex_NodeUtil.isType(mml, 'mstyle') &&
mml.childNodes.length &&
tex_NodeUtil.isType(mml.childNodes[0].childNodes[0], 'mspace')) ||
tex_NodeUtil.isType(mml, 'mspace')) {
return [[top, item], true];
}
if (tex_NodeUtil.isEmbellished(mml)) {
mml = tex_NodeUtil.getCoreMO(mml);
}
const form = tex_NodeUtil.getForm(mml);
if (form != null && [0, 0, 1, 1, 0, 1, 1, 0, 0, 0][form[2]]) {
return [[top, item], true];
}
}
const node = this.create('token', 'mo', { texClass: TEXCLASS.NONE }, entities.ApplyFunction);
return [[top, node, item], true];
}
return super.checkItem(item);
}
}
class NotItem extends BaseItem {
constructor() {
super(...arguments);
this.remap = MapHandler.getMap('not_remap');
}
get kind() {
return 'not';
}
checkItem(item) {
let mml;
let c;
let textNode;
if (item.isKind('open') || item.isKind('left')) {
return BaseItem.success;
}
if (item.isKind('mml') &&
(tex_NodeUtil.isType(item.First, 'mo') ||
tex_NodeUtil.isType(item.First, 'mi') ||
tex_NodeUtil.isType(item.First, 'mtext'))) {
mml = item.First;
c = tex_NodeUtil.getText(mml);
if (c.length === 1 &&
!tex_NodeUtil.getProperty(mml, 'movesupsub') &&
tex_NodeUtil.getChildren(mml).length === 1) {
if (this.remap.contains(c)) {
textNode = this.create('text', this.remap.lookup(c).char);
tex_NodeUtil.setChild(mml, 0, textNode);
}
else {
textNode = this.create('text', '\u0338');
tex_NodeUtil.appendChildren(mml, [textNode]);
}
return [[item], true];
}
}
textNode = this.create('text', '\u29F8');
const mtextNode = this.create('node', 'mtext', [], {}, textNode);
const paddedNode = this.create('node', 'mpadded', [mtextNode], {
width: 0,
});
mml = this.create('node', 'TeXAtom', [paddedNode], {
texClass: TEXCLASS.REL,
});
return [[mml, item], true];
}
}
class NonscriptItem extends BaseItem {
get kind() {
return 'nonscript';
}
checkItem(item) {
if (item.isKind('mml') && item.Size() === 1) {
let mml = item.First;
if (mml.isKind('mstyle') && mml.notParent) {
mml = tex_NodeUtil.getChildren(tex_NodeUtil.getChildren(mml)[0])[0];
}
if (mml.isKind('mspace')) {
if (mml !== item.First) {
const mrow = this.create('node', 'mrow', [item.Pop()]);
item.Push(mrow);
}
this.factory.configuration.addNode('nonscript', item.First);
}
}
return [[item], true];
}
}
class DotsItem extends BaseItem {
get kind() {
return 'dots';
}
checkItem(item) {
if (item.isKind('open') || item.isKind('left')) {
return BaseItem.success;
}
let dots = this.getProperty('ldots');
const top = item.First;
if (item.isKind('mml') && tex_NodeUtil.isEmbellished(top)) {
const tclass = tex_NodeUtil.getTexClass(tex_NodeUtil.getCoreMO(top));
if (tclass === TEXCLASS.BIN || tclass === TEXCLASS.REL) {
dots = this.getProperty('cdots');
}
}
return [[dots, item], true];
}
}
class ArrayItem extends BaseItem {
constructor() {
super(...arguments);
this.table = [];
this.row = [];
this.frame = [];
this.hfill = [];
this.arraydef = {};
this.cstart = [];
this.cend = [];
this.cextra = [];
this.atEnd = false;
this.ralign = [];
this.breakAlign = {
cell: '',
row: '',
table: '',
};
this.templateSubs = 0;
}
get kind() {
return 'array';
}
get isOpen() {
return true;
}
get copyEnv() {
return false;
}
checkItem(item) {
if (item.isClose && !item.isKind('over')) {
if (item.getProperty('isEntry')) {
this.EndEntry();
this.clearEnv();
this.StartEntry();
return BaseItem.fail;
}
if (item.getProperty('isCR')) {
this.EndEntry();
this.EndRow();
this.clearEnv();
this.StartEntry();
return BaseItem.fail;
}
this.EndTable();
this.clearEnv();
const newItem = this.factory.create('mml', this.createMml());
if (this.getProperty('requireClose')) {
if (item.isKind('close')) {
return [[newItem], true];
}
throw new tex_TexError('MissingCloseBrace', 'Missing close brace');
}
return [[newItem, item], true];
}
return super.checkItem(item);
}
createMml() {
const scriptlevel = this.arraydef['scriptlevel'];
delete this.arraydef['scriptlevel'];
let mml = this.create('node', 'mtable', this.table, this.arraydef);
if (scriptlevel) {
mml.setProperty('smallmatrix', true);
}
if (this.breakAlign.table) {
tex_NodeUtil.setAttribute(mml, 'data-break-align', this.breakAlign.table);
}
if (this.getProperty('arrayPadding')) {
tex_NodeUtil.setAttribute(mml, 'data-frame-styles', '');
tex_NodeUtil.setAttribute(mml, 'framespacing', this.getProperty('arrayPadding'));
}
mml = this.handleFrame(mml);
if (scriptlevel !== undefined) {
mml = this.create('node', 'mstyle', [mml], { scriptlevel });
}
if (this.getProperty('open') || this.getProperty('close')) {
mml = ParseUtil.fenced(this.factory.configuration, this.getProperty('open'), mml, this.getProperty('close'));
}
return mml;
}
handleFrame(mml) {
if (!this.frame.length)
return mml;
const sides = new Map(this.frame);
const fstyle = this.frame.reduce((fstyle, [, style]) => (style === fstyle ? style : ''), this.frame[0][1]);
if (fstyle) {
if (this.frame.length === 4) {
tex_NodeUtil.setAttribute(mml, 'frame', fstyle);
tex_NodeUtil.removeAttribute(mml, 'data-frame-styles');
return mml;
}
if (fstyle === 'solid') {
tex_NodeUtil.setAttribute(mml, 'data-frame-styles', '');
mml = this.create('node', 'menclose', [mml], {
notation: Array.from(sides.keys()).join(' '),
'data-padding': 0,
});
return mml;
}
}
const styles = TRBL.map((side) => sides.get(side) || 'none').join(' ');
tex_NodeUtil.setAttribute(mml, 'data-frame-styles', styles);
return mml;
}
StartEntry() {
const n = this.row.length;
let start = this.cstart[n];
let end = this.cend[n];
const ralign = this.ralign[n];
const cextra = this.cextra;
if (!start && !end && !ralign && !cextra[n] && !cextra[n + 1])
return;
let [prefix, entry, term, found] = this.getEntry();
if (cextra[n] && (!this.atEnd || cextra[n + 1])) {
start += '&';
}
if (term !== '&') {
found =
!!entry.trim() || !!(n || (term && term.substring(0, 4) !== '\\end'));
if (cextra[n + 1] && !cextra[n]) {
end = (end || '') + '&';
this.atEnd = true;
}
}
if (!found && !prefix)
return;
const parser = this.parser;
if (found) {
if (start) {
entry = ParseUtil.addArgs(parser, start, entry);
}
if (end) {
entry = ParseUtil.addArgs(parser, entry, end);
}
if (ralign) {
entry = '\\text{' + entry.trim() + '}';
}
if (start || end || ralign) {
if (++this.templateSubs >
parser.configuration.options.maxTemplateSubtitutions) {
throw new tex_TexError('MaxTemplateSubs', 'Maximum template substitutions exceeded; ' +
'is there an invalid use of \\\\ in the template?');
}
}
}
if (prefix) {
entry = ParseUtil.addArgs(parser, prefix, entry);
}
parser.string = ParseUtil.addArgs(parser, entry, parser.string);
parser.i = 0;
}
getEntry() {
const parser = this.parser;
const pattern = /^([^]*?)([&{}]|\\\\|\\(?:begin|end)\s*\{array\}|\\cr|\\)/;
let braces = 0;
let envs = 0;
let i = parser.i;
let match;
const fail = ['', '', '', false];
while ((match = parser.string.slice(i).match(pattern)) !== null) {
i += match[0].length;
switch (match[2]) {
case '\\':
i++;
break;
case '{':
braces++;
break;
case '}':
if (!braces)
return fail;
braces--;
break;
case '\\begin{array}':
if (!braces) {
envs++;
}
break;
case '\\end{array}':
if (!braces && envs) {
envs--;
break;
}
default: {
if (braces || envs)
continue;
i -= match[2].length;
let entry = parser.string.slice(parser.i, i).trim();
const prefix = entry.match(/^(?:\s*\\(?:h(?:dash)?line|hfil{1,3}|rowcolor\s*\{.*?\}))+/);
if (prefix) {
entry = entry.slice(prefix[0].length);
}
parser.string = parser.string.slice(i);
parser.i = 0;
return [(prefix === null || prefix === void 0 ? void 0 : prefix[0]) || '', entry, match[2], true];
}
}
}
return fail;
}
EndEntry() {
const mtd = this.create('node', 'mtd', this.nodes);
if (this.hfill.length) {
if (this.hfill[0] === 0) {
tex_NodeUtil.setAttribute(mtd, 'columnalign', 'right');
}
if (this.hfill[this.hfill.length - 1] === this.Size()) {
tex_NodeUtil.setAttribute(mtd, 'columnalign', tex_NodeUtil.getAttribute(mtd, 'columnalign') ? 'center' : 'left');
}
}
const ralign = this.ralign[this.row.length];
if (ralign) {
const [valign, cwidth, calign] = ralign;
const box = this.create('node', 'mpadded', mtd.childNodes[0].childNodes, {
width: cwidth,
'data-overflow': 'auto',
'data-align': calign,
'data-vertical-align': valign,
});
box.setProperty('vbox', valign);
mtd.childNodes[0].childNodes = [];
mtd.appendChild(box);
}
else if (this.breakAlign.cell) {
tex_NodeUtil.setAttribute(mtd, 'data-vertical-align', this.breakAlign.cell);
}
this.breakAlign.cell = '';
this.row.push(mtd);
this.Clear();
this.hfill = [];
}
EndRow() {
let type = 'mtr';
if (this.getProperty('isNumbered') && this.row.length === 3) {
this.row.unshift(this.row.pop());
type = 'mlabeledtr';
}
else if (this.getProperty('isLabeled')) {
type = 'mlabeledtr';
this.setProperty('isLabeled', false);
}
const node = this.create('node', type, this.row);
if (this.breakAlign.row) {
tex_NodeUtil.setAttribute(node, 'data-break-align', this.breakAlign.row);
this.breakAlign.row = '';
}
addLatexItem(node, this);
this.table.push(node);
this.row = [];
this.atEnd = false;
}
EndTable() {
if (this.Size() || this.row.length) {
this.EndEntry();
this.EndRow();
}
this.checkLines();
}
checkLines() {
if (this.arraydef.rowlines) {
const lines = this.arraydef.rowlines.split(/ /);
if (lines.length === this.table.length) {
this.frame.push(['bottom', lines.pop()]);
if (lines.length) {
this.arraydef.rowlines = lines.join(' ');
}
else {
delete this.arraydef.rowlines;
}
}
else if (lines.length < this.table.length - 1) {
this.arraydef.rowlines += ' none';
}
}
if (this.getProperty('rowspacing')) {
const rows = this.arraydef.rowspacing.split(/ /);
while (rows.length < this.table.length) {
rows.push(this.getProperty('rowspacing') + 'em');
}
this.arraydef.rowspacing = rows.join(' ');
}
}
addRowSpacing(spacing) {
if (this.arraydef['rowspacing']) {
const rows = this.arraydef['rowspacing'].split(/ /);
if (!this.getProperty('rowspacing')) {
const dimem = UnitUtil.dimen2em(rows[0]);
this.setProperty('rowspacing', dimem);
}
const rowspacing = this.getProperty('rowspacing');
while (rows.length < this.table.length) {
rows.push(UnitUtil.em(rowspacing));
}
rows[this.table.length - 1] = UnitUtil.em(Math.max(0, rowspacing + UnitUtil.dimen2em(spacing)));
this.arraydef['rowspacing'] = rows.join(' ');
}
}
}
class EqnArrayItem extends ArrayItem {
constructor(factory, ...args) {
super(factory);
this.maxrow = 0;
this.factory.configuration.tags.start(args[0], args[2], args[1]);
}
get kind() {
return 'eqnarray';
}
EndEntry() {
const calign = this.arraydef.columnalign.split(/ /);
const align = this.row.length && calign.length
? calign[this.row.length % calign.length]
: 'right';
if (align !== 'right') {
ParseUtil.fixInitialMO(this.factory.configuration, this.nodes);
}
super.EndEntry();
}
EndRow() {
if (this.row.length > this.maxrow) {
this.maxrow = this.row.length;
}
const tag = this.factory.configuration.tags.getTag();
if (tag) {
this.row = [tag].concat(this.row);
this.setProperty('isLabeled', true);
}
this.factory.configuration.tags.clearTag();
super.EndRow();
}
EndTable() {
super.EndTable();
this.factory.configuration.tags.end();
this.extendArray('columnalign', this.maxrow);
this.extendArray('columnwidth', this.maxrow);
this.extendArray('columnspacing', this.maxrow - 1);
this.extendArray('data-break-align', this.maxrow);
this.addIndentshift();
}
extendArray(name, max) {
if (!this.arraydef[name])
return;
const repeat = this.arraydef[name].split(/ /);
const columns = [...repeat];
if (columns.length > 1) {
while (columns.length < max) {
columns.push(...repeat);
}
this.arraydef[name] = columns.slice(0, max).join(' ');
}
}
addIndentshift() {
const align = this.arraydef.columnalign.split(/ /);
let prev = '';
for (const i of align.keys()) {
if (align[i] === 'left' && i > 0) {
const indentshift = prev === 'center' ? '.7em' : '2em';
for (const row of this.table) {
const cell = row.childNodes[row.isKind('mlabeledtr') ? i + 1 : i];
if (cell) {
const mstyle = this.create('node', 'mstyle', cell.childNodes[0].childNodes, { indentshift });
cell.childNodes[0].childNodes = [];
cell.appendChild(mstyle);
}
}
}
prev = align[i];
}
}
}
class MstyleItem extends BeginItem {
get kind() {
return 'mstyle';
}
constructor(factory, attr, name) {
super(factory);
this.attrList = attr;
this.setProperty('name', name);
}
checkItem(item) {
if (item.isKind('end') && item.getName() === this.getName()) {
const mml = this.create('node', 'mstyle', [this.toMml()], this.attrList);
return [[mml], true];
}
return super.checkItem(item);
}
}
class EquationItem extends BaseItem {
constructor(factory, ...args) {
super(factory);
this.factory.configuration.tags.start('equation', true, args[0]);
}
get kind() {
return 'equation';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('end')) {
const mml = this.toMml();
const tag = this.factory.configuration.tags.getTag();
this.factory.configuration.tags.end();
return [
[tag ? this.factory.configuration.tags.enTag(mml, tag) : mml, item],
true,
];
}
if (item.isKind('stop')) {
throw new tex_TexError('EnvMissingEnd', 'Missing \\end{%1}', this.getName());
}
return super.checkItem(item);
}
}
function addLatexItem(node, item, prefix = '') {
const str = item.startStr.slice(item.startI, item.stopI);
if (str) {
node.attributes.set(TexConstant.Attr.LATEXITEM, prefix ? prefix + str : str);
node.attributes.set(TexConstant.Attr.LATEX, prefix ? prefix + str : str);
}
}
//# sourceMappingURL=BaseItems.js.map
;// ./components/mjs/core/lib/util/lengths.js
const lengths_def = MathJax._.util.lengths;
const BIGDIMEN = lengths_def.BIGDIMEN;
const UNITS = lengths_def.UNITS;
const RELUNITS = lengths_def.RELUNITS;
const MATHSPACE = lengths_def.MATHSPACE;
const length2em = lengths_def.length2em;
const percent = lengths_def.percent;
const em = lengths_def.em;
const px = lengths_def.px;
;// ./mjs/input/tex/base/BaseMethods.js
const P_HEIGHT = 1.2 / 0.85;
const MmlTokenAllow = {
fontfamily: 1,
fontsize: 1,
fontweight: 1,
fontstyle: 1,
color: 1,
background: 1,
id: 1,
class: 1,
href: 1,
style: 1,
};
function splitAlignArray(align, n = Infinity) {
const list = align
.replace(/\s+/g, '')
.split('')
.map((s) => {
const name = { t: 'top', b: 'bottom', m: 'middle', c: 'center' }[s];
if (!name) {
throw new tex_TexError('BadBreakAlign', 'Invalid alignment character: %1', s);
}
return name;
});
if (list.length > n) {
throw new tex_TexError('TooManyAligns', 'Too many alignment characters: %1', align);
}
return n === 1 ? list[0] : list.join(' ');
}
function parseRoot(parser, n) {
const env = parser.stack.env;
const inRoot = env['inRoot'];
env['inRoot'] = true;
const newParser = new TexParser(n, env, parser.configuration);
let node = newParser.mml();
const global = newParser.stack.global;
if (global['leftRoot'] || global['upRoot']) {
const def = {};
if (global['leftRoot']) {
def['width'] = global['leftRoot'];
}
if (global['upRoot']) {
def['voffset'] = global['upRoot'];
def['height'] = global['upRoot'];
}
node = parser.create('node', 'mpadded', [node], def);
}
env['inRoot'] = inRoot;
return node;
}
const BaseMethods = {
Open(parser, _c) {
parser.Push(parser.itemFactory.create('open'));
},
Close(parser, _c) {
parser.Push(parser.itemFactory.create('close'));
},
Bar(parser, c) {
parser.Push(parser.create('token', 'mo', { stretchy: false, texClass: TEXCLASS.ORD }, c));
},
Tilde(parser, _c) {
parser.Push(parser.create('token', 'mtext', {}, entities.nbsp));
},
Space(_parser, _c) { },
Superscript(parser, _c) {
if (parser.GetNext().match(/\d/)) {
parser.string =
parser.string.substring(0, parser.i + 1) +
' ' +
parser.string.substring(parser.i + 1);
}
let primes;
let base;
const top = parser.stack.Top();
if (top.isKind('prime')) {
[base, primes] = top.Peek(2);
parser.stack.Pop();
}
else {
base = parser.stack.Prev();
if (!base) {
base = parser.create('token', 'mi', {}, '');
}
}
const movesupsub = tex_NodeUtil.getProperty(base, 'movesupsub');
let position = tex_NodeUtil.isType(base, 'msubsup')
? base.sup
: base.over;
if ((tex_NodeUtil.isType(base, 'msubsup') &&
!tex_NodeUtil.isType(base, 'msup') &&
tex_NodeUtil.getChildAt(base, base.sup)) ||
(tex_NodeUtil.isType(base, 'munderover') &&
!tex_NodeUtil.isType(base, 'mover') &&
tex_NodeUtil.getChildAt(base, base.over) &&
!tex_NodeUtil.getProperty(base, 'subsupOK'))) {
throw new tex_TexError('DoubleExponent', 'Double exponent: use braces to clarify');
}
if (!tex_NodeUtil.isType(base, 'msubsup') || tex_NodeUtil.isType(base, 'msup')) {
if (movesupsub) {
if (!tex_NodeUtil.isType(base, 'munderover') ||
tex_NodeUtil.isType(base, 'mover') ||
tex_NodeUtil.getChildAt(base, base.over)) {
base = parser.create('node', 'munderover', [base], {
movesupsub: true,
});
}
position = base.over;
}
else {
base = parser.create('node', 'msubsup', [base]);
position = base.sup;
}
}
parser.Push(parser.itemFactory.create('subsup', base).setProperties({
position: position,
primes: primes,
movesupsub: movesupsub,
}));
},
Subscript(parser, _c) {
if (parser.GetNext().match(/\d/)) {
parser.string =
parser.string.substring(0, parser.i + 1) +
' ' +
parser.string.substring(parser.i + 1);
}
let primes, base;
const top = parser.stack.Top();
if (top.isKind('prime')) {
[base, primes] = top.Peek(2);
parser.stack.Pop();
}
else {
base = parser.stack.Prev();
if (!base) {
base = parser.create('token', 'mi', {}, '');
}
}
const movesupsub = tex_NodeUtil.getProperty(base, 'movesupsub');
let position = tex_NodeUtil.isType(base, 'msubsup')
? base.sub
: base.under;
if ((tex_NodeUtil.isType(base, 'msubsup') &&
!tex_NodeUtil.isType(base, 'msup') &&
tex_NodeUtil.getChildAt(base, base.sub)) ||
(tex_NodeUtil.isType(base, 'munderover') &&
!tex_NodeUtil.isType(base, 'mover') &&
tex_NodeUtil.getChildAt(base, base.under) &&
!tex_NodeUtil.getProperty(base, 'subsupOK'))) {
throw new tex_TexError('DoubleSubscripts', 'Double subscripts: use braces to clarify');
}
if (!tex_NodeUtil.isType(base, 'msubsup') || tex_NodeUtil.isType(base, 'msup')) {
if (movesupsub) {
if (!tex_NodeUtil.isType(base, 'munderover') ||
tex_NodeUtil.isType(base, 'mover') ||
tex_NodeUtil.getChildAt(base, base.under)) {
base = parser.create('node', 'munderover', [base], {
movesupsub: true,
});
}
position = base.under;
}
else {
base = parser.create('node', 'msubsup', [base]);
position = base.sub;
}
}
parser.Push(parser.itemFactory.create('subsup', base).setProperties({
position: position,
primes: primes,
movesupsub: movesupsub,
}));
},
Prime(parser, c) {
let base = parser.stack.Prev();
if (!base) {
base = parser.create('token', 'mi');
}
if ((tex_NodeUtil.isType(base, 'msubsup') &&
!tex_NodeUtil.isType(base, 'msup') &&
tex_NodeUtil.getChildAt(base, base.sup)) ||
(tex_NodeUtil.isType(base, 'munderover') &&
!tex_NodeUtil.isType(base, 'mover') &&
tex_NodeUtil.getChildAt(base, base.over) &&
!tex_NodeUtil.getProperty(base, 'subsupOK'))) {
throw new tex_TexError('DoubleExponentPrime', 'Prime causes double exponent: use braces to clarify');
}
let sup = '';
parser.i--;
do {
sup += entities.prime;
parser.i++;
c = parser.GetNext();
} while (c === "'" || c === entities.rsquo);
sup = ['', '\u2032', '\u2033', '\u2034', '\u2057'][sup.length] || sup;
const node = parser.create('token', 'mo', { variantForm: true }, sup);
parser.Push(parser.itemFactory.create('prime', base, node));
},
Comment(parser, _c) {
while (parser.i < parser.string.length &&
parser.string.charAt(parser.i) !== '\n') {
parser.i++;
}
},
Hash(_parser, _c) {
throw new tex_TexError('CantUseHash1', "You can't use 'macro parameter character #' in math mode");
},
MathFont(parser, name, variant, italic = '') {
const text = parser.GetArgument(name);
const mml = new TexParser(text, Object.assign(Object.assign({ multiLetterIdentifiers: parser.options.identifierPattern }, parser.stack.env), { font: variant, italicFont: italic, noAutoOP: true }), parser.configuration).mml();
parser.Push(parser.create('node', 'TeXAtom', [mml]));
},
SetFont(parser, _name, font) {
parser.stack.env['font'] = font;
parser.Push(parser.itemFactory.create('null'));
},
SetStyle(parser, _name, texStyle, style, level) {
parser.stack.env['style'] = texStyle;
parser.stack.env['level'] = level;
parser.Push(parser.itemFactory
.create('style')
.setProperty('styles', { displaystyle: style, scriptlevel: level }));
},
SetSize(parser, _name, size) {
parser.stack.env['size'] = size;
parser.Push(parser.itemFactory
.create('style')
.setProperty('styles', { mathsize: em(size) }));
},
Spacer(parser, _name, space) {
const node = parser.create('node', 'mspace', [], { width: em(space) });
const style = parser.create('node', 'mstyle', [node], { scriptlevel: 0 });
parser.Push(style);
},
DiscretionaryTimes(parser, _name) {
parser.Push(parser.create('token', 'mo', { linebreakmultchar: '\u00D7' }, '\u2062'));
},
AllowBreak(parser, _name) {
parser.Push(parser.create('token', 'mspace'));
},
Break(parser, _name) {
parser.Push(parser.create('token', 'mspace', {
linebreak: TexConstant.LineBreak.NEWLINE,
}));
},
Linebreak(parser, _name, linebreak) {
let insert = true;
const prev = parser.stack.Prev(true);
if (prev && prev.isKind('mo')) {
const style = tex_NodeUtil.getMoAttribute(prev, 'linebreakstyle');
if (style !== TexConstant.LineBreakStyle.BEFORE) {
prev.attributes.set('linebreak', linebreak);
insert = false;
}
}
parser.Push(parser.itemFactory.create('break', linebreak, insert));
},
LeftRight(parser, name) {
const first = name.substring(1);
parser.Push(parser.itemFactory.create(first, parser.GetDelimiter(name), parser.stack.env.color));
},
NamedFn(parser, name, id) {
if (!id) {
id = name.substring(1);
}
const mml = parser.create('token', 'mi', { texClass: TEXCLASS.OP }, id);
parser.Push(parser.itemFactory.create('fn', mml));
},
NamedOp(parser, name, id) {
if (!id) {
id = name.substring(1);
}
id = id.replace(/ /, '\u2006');
const mml = parser.create('token', 'mo', {
movablelimits: true,
movesupsub: true,
form: TexConstant.Form.PREFIX,
texClass: TEXCLASS.OP,
}, id);
parser.Push(mml);
},
Limits(parser, _name, limits) {
let op = parser.stack.Prev(true);
if (!op ||
(tex_NodeUtil.getTexClass(tex_NodeUtil.getCoreMO(op)) !== TEXCLASS.OP &&
tex_NodeUtil.getProperty(op, 'movesupsub') == null)) {
throw new tex_TexError('MisplacedLimits', '%1 is allowed only on operators', parser.currentCS);
}
const top = parser.stack.Top();
let node;
if (tex_NodeUtil.isType(op, 'munderover') && !limits) {
node = parser.create('node', 'msubsup');
tex_NodeUtil.copyChildren(op, node);
op = top.Last = node;
}
else if (tex_NodeUtil.isType(op, 'msubsup') && limits) {
node = parser.create('node', 'munderover');
tex_NodeUtil.copyChildren(op, node);
op = top.Last = node;
}
tex_NodeUtil.setProperty(op, 'movesupsub', limits ? true : false);
tex_NodeUtil.setProperties(tex_NodeUtil.getCoreMO(op), { movablelimits: false });
if ((tex_NodeUtil.isType(op, 'mo')
? tex_NodeUtil.getMoAttribute(op, 'movableLimits')
: tex_NodeUtil.getAttribute(op, 'movablelimits')) ||
tex_NodeUtil.getProperty(op, 'movablelimits')) {
tex_NodeUtil.setProperties(op, { movablelimits: false });
}
},
Over(parser, name, open, close) {
const mml = parser.itemFactory
.create('over')
.setProperty('name', parser.currentCS);
if (open || close) {
mml.setProperty('ldelim', open);
mml.setProperty('rdelim', close);
}
else if (name.match(/withdelims$/)) {
mml.setProperty('ldelim', parser.GetDelimiter(name));
mml.setProperty('rdelim', parser.GetDelimiter(name));
}
if (name.match(/^\\above/)) {
mml.setProperty('thickness', parser.GetDimen(name));
}
else if (name.match(/^\\atop/) || open || close) {
mml.setProperty('thickness', 0);
}
parser.Push(mml);
},
Frac(parser, name) {
const num = parser.ParseArg(name);
const den = parser.ParseArg(name);
const node = parser.create('node', 'mfrac', [num, den]);
parser.Push(node);
},
Sqrt(parser, name) {
const n = parser.GetBrackets(name);
let arg = parser.GetArgument(name);
if (arg === '\\frac') {
arg +=
'{' + parser.GetArgument(arg) + '}{' + parser.GetArgument(arg) + '}';
}
let mml = new TexParser(arg, parser.stack.env, parser.configuration).mml();
if (!n) {
mml = parser.create('node', 'msqrt', [mml]);
}
else {
mml = parser.create('node', 'mroot', [mml, parseRoot(parser, n)]);
}
parser.Push(mml);
},
Root(parser, name) {
const n = parser.GetUpTo(name, '\\of');
const arg = parser.ParseArg(name);
const node = parser.create('node', 'mroot', [arg, parseRoot(parser, n)]);
parser.Push(node);
},
MoveRoot(parser, name, id) {
if (!parser.stack.env['inRoot']) {
throw new tex_TexError('MisplacedMoveRoot', '%1 can appear only within a root', parser.currentCS);
}
if (parser.stack.global[id]) {
throw new tex_TexError('MultipleMoveRoot', 'Multiple use of %1', parser.currentCS);
}
let n = parser.GetArgument(name);
if (!n.match(/-?[0-9]+/)) {
throw new tex_TexError('IntegerArg', 'The argument to %1 must be an integer', parser.currentCS);
}
n = parseInt(n, 10) / 15 + 'em';
if (n.substring(0, 1) !== '-') {
n = '+' + n;
}
parser.stack.global[id] = n;
},
Accent(parser, name, accent, stretchy) {
const c = parser.ParseArg(name);
const def = Object.assign(Object.assign({}, ParseUtil.getFontDef(parser)), { accent: true, mathaccent: stretchy === undefined ? true : stretchy });
const entity = tex_NodeUtil.createEntity(accent);
const mml = parser.create('token', 'mo', def, entity);
tex_NodeUtil.setAttribute(mml, 'stretchy', stretchy ? true : false);
const mo = tex_NodeUtil.isEmbellished(c) ? tex_NodeUtil.getCoreMO(c) : c;
if (tex_NodeUtil.isType(mo, 'mo') ||
tex_NodeUtil.getProperty(mo, 'movablelimits')) {
tex_NodeUtil.setProperties(mo, { movablelimits: false });
}
const muoNode = parser.create('node', 'munderover');
tex_NodeUtil.setChild(muoNode, 0, c);
tex_NodeUtil.setChild(muoNode, 1, null);
tex_NodeUtil.setChild(muoNode, 2, mml);
const texAtom = parser.create('node', 'TeXAtom', [muoNode]);
parser.Push(texAtom);
},
UnderOver(parser, name, c, stack) {
const entity = tex_NodeUtil.createEntity(c);
const mo = parser.create('token', 'mo', { stretchy: true, accent: true }, entity);
if (entity.match(MmlMo.mathaccentsWithWidth)) {
mo.setProperty('mathaccent', false);
}
const pos = name.charAt(1) === 'o' ? 'over' : 'under';
const base = parser.ParseArg(name);
parser.Push(ParseUtil.underOver(parser, base, mo, pos, stack));
},
Overset(parser, name) {
const top = parser.ParseArg(name);
const base = parser.ParseArg(name);
const topMo = top.coreMO();
const accent = topMo.isKind('mo') && tex_NodeUtil.getMoAttribute(topMo, 'accent') === true;
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'mover', [base, top], { accent });
parser.Push(node);
},
Underset(parser, name) {
const bot = parser.ParseArg(name);
const base = parser.ParseArg(name);
const botMo = bot.coreMO();
const accentunder = botMo.isKind('mo') && tex_NodeUtil.getMoAttribute(botMo, 'accent') === true;
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'munder', [base, bot], { accentunder });
parser.Push(node);
},
Overunderset(parser, name) {
const top = parser.ParseArg(name);
const bot = parser.ParseArg(name);
const base = parser.ParseArg(name);
const topMo = top.coreMO();
const botMo = bot.coreMO();
const accent = topMo.isKind('mo') && tex_NodeUtil.getMoAttribute(topMo, 'accent') === true;
const accentunder = botMo.isKind('mo') && tex_NodeUtil.getMoAttribute(botMo, 'accent') === true;
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'munderover', [base, bot, top], {
accent,
accentunder,
});
parser.Push(node);
},
TeXAtom(parser, name, mclass) {
const def = { texClass: mclass };
let mml;
let node;
if (mclass === TEXCLASS.OP) {
def['movesupsub'] = def['movablelimits'] = true;
const arg = parser.GetArgument(name);
const match = arg.match(/^\s*\\rm\s+([a-zA-Z0-9 ]+)$/);
if (match) {
def['mathvariant'] = TexConstant.Variant.NORMAL;
node = parser.create('token', 'mi', def, match[1]);
}
else {
const parsed = new TexParser(arg, parser.stack.env, parser.configuration).mml();
node = parser.create('node', 'TeXAtom', [parsed], def);
}
mml = parser.itemFactory.create('fn', node);
}
else {
mml = parser.create('node', 'TeXAtom', [parser.ParseArg(name)], def);
}
parser.Push(mml);
},
VBox(parser, name, align) {
const arg = new TexParser(parser.GetArgument(name), parser.stack.env, parser.configuration);
const def = {
'data-vertical-align': align,
texClass: TEXCLASS.ORD,
};
if (arg.stack.env.hsize) {
def.width = arg.stack.env.hsize;
def['data-overflow'] = 'linebreak';
}
const mml = parser.create('node', 'mpadded', [arg.mml()], def);
mml.setProperty('vbox', align);
parser.Push(mml);
},
Hsize(parser, name) {
if (parser.GetNext() === '=') {
parser.i++;
}
parser.stack.env.hsize = parser.GetDimen(name);
parser.Push(parser.itemFactory.create('null'));
},
ParBox(parser, name) {
const c = parser.GetBrackets(name, 'c');
const width = parser.GetDimen(name);
const text = ParseUtil.internalMath(parser, parser.GetArgument(name));
const align = splitAlignArray(c, 1);
const mml = parser.create('node', 'mpadded', text, {
width: width,
'data-overflow': 'linebreak',
'data-vertical-align': align,
});
mml.setProperty('vbox', align);
parser.Push(mml);
},
BreakAlign(parser, name) {
const top = parser.stack.Top();
if (!(top instanceof ArrayItem)) {
throw new tex_TexError('BreakNotInArray', '%1 must be used in an alignment environment', parser.currentCS);
}
const type = parser.GetArgument(name).trim();
switch (type) {
case 'c':
if (top.First) {
throw new tex_TexError('BreakFirstInEntry', '%1 must be at the beginning of an alignment entry', parser.currentCS + '{c}');
}
top.breakAlign.cell = splitAlignArray(parser.GetArgument(name), 1);
break;
case 'r':
if (top.row.length || top.First) {
throw new tex_TexError('BreakFirstInRow', '%1 must be at the beginning of an alignment row', parser.currentCS + '{r}');
}
top.breakAlign.row = splitAlignArray(parser.GetArgument(name));
break;
case 't':
if (top.table.length || top.row.length || top.First) {
throw new tex_TexError('BreakFirstInTable', '%1 must be at the beginning of an alignment', parser.currentCS + '{t}');
}
top.breakAlign.table = splitAlignArray(parser.GetArgument(name));
break;
default:
throw new tex_TexError('BreakType', 'First argument to %1 must be one of c, r, or t', parser.currentCS);
}
},
MmlToken(parser, name) {
const kind = parser.GetArgument(name);
let attr = parser.GetBrackets(name, '').replace(/^\s+/, '');
const text = parser.GetArgument(name);
const def = {};
const keep = [];
let node;
try {
node = parser.create('node', kind);
}
catch (_e) {
node = null;
}
if (!node || !node.isToken) {
throw new tex_TexError('NotMathMLToken', '%1 is not a token element', kind);
}
while (attr !== '') {
const match = attr.match(/^([a-z]+)\s*=\s*('[^']*'|"[^"]*"|[^ ,]*)\s*,?\s*/i);
if (!match) {
throw new tex_TexError('InvalidMathMLAttr', 'Invalid MathML attribute: %1', attr);
}
if (!node.attributes.hasDefault(match[1]) && !MmlTokenAllow[match[1]]) {
throw new tex_TexError('UnknownAttrForElement', '%1 is not a recognized attribute for %2', match[1], kind);
}
let value = ParseUtil.mmlFilterAttribute(parser, match[1], match[2].replace(/^(['"])(.*)\1$/, '$2'));
if (value) {
if (value.toLowerCase() === 'true') {
value = true;
}
else if (value.toLowerCase() === 'false') {
value = false;
}
def[match[1]] = value;
keep.push(match[1]);
}
attr = attr.substring(match[0].length);
}
if (keep.length) {
def['mjx-keep-attrs'] = keep.join(' ');
}
const textNode = parser.create('text', replaceUnicode(text));
node.appendChild(textNode);
tex_NodeUtil.setProperties(node, def);
parser.Push(node);
},
Strut(parser, _name) {
const row = parser.create('node', 'mrow');
const padded = parser.create('node', 'mpadded', [row], {
height: '8.6pt',
depth: '3pt',
width: 0,
});
parser.Push(padded);
},
Phantom(parser, name, v, h) {
let box = parser.create('node', 'mphantom', [parser.ParseArg(name)]);
if (v || h) {
box = parser.create('node', 'mpadded', [box]);
if (h) {
tex_NodeUtil.setAttribute(box, 'height', 0);
tex_NodeUtil.setAttribute(box, 'depth', 0);
}
if (v) {
tex_NodeUtil.setAttribute(box, 'width', 0);
}
}
const atom = parser.create('node', 'TeXAtom', [box]);
parser.Push(atom);
},
Smash(parser, name) {
const bt = UnitUtil.trimSpaces(parser.GetBrackets(name, ''));
const smash = parser.create('node', 'mpadded', [parser.ParseArg(name)]);
switch (bt) {
case 'b':
tex_NodeUtil.setAttribute(smash, 'depth', 0);
break;
case 't':
tex_NodeUtil.setAttribute(smash, 'height', 0);
break;
default:
tex_NodeUtil.setAttribute(smash, 'height', 0);
tex_NodeUtil.setAttribute(smash, 'depth', 0);
}
const atom = parser.create('node', 'TeXAtom', [smash]);
parser.Push(atom);
},
Lap(parser, name) {
const mml = parser.create('node', 'mpadded', [parser.ParseArg(name)], {
width: 0,
});
if (name === '\\llap') {
tex_NodeUtil.setAttribute(mml, 'lspace', '-1width');
}
const atom = parser.create('node', 'TeXAtom', [mml]);
parser.Push(atom);
},
RaiseLower(parser, name) {
let h = parser.GetDimen(name);
const item = parser.itemFactory
.create('position')
.setProperties({ name: parser.currentCS, move: 'vertical' });
if (h.charAt(0) === '-') {
h = h.slice(1);
name = name.substring(1) === 'raise' ? '\\lower' : '\\raise';
}
if (name === '\\lower') {
item.setProperty('dh', '-' + h);
item.setProperty('dd', '+' + h);
}
else {
item.setProperty('dh', '+' + h);
item.setProperty('dd', '-' + h);
}
parser.Push(item);
},
MoveLeftRight(parser, name) {
let h = parser.GetDimen(name);
let nh = h.charAt(0) === '-' ? h.slice(1) : '-' + h;
if (name === '\\moveleft') {
const tmp = h;
h = nh;
nh = tmp;
}
parser.Push(parser.itemFactory.create('position').setProperties({
name: parser.currentCS,
move: 'horizontal',
left: parser.create('node', 'mspace', [], { width: h }),
right: parser.create('node', 'mspace', [], { width: nh }),
}));
},
Hskip(parser, name, nobreak = false) {
const node = parser.create('node', 'mspace', [], {
width: parser.GetDimen(name),
});
if (nobreak) {
tex_NodeUtil.setAttribute(node, 'linebreak', 'nobreak');
}
parser.Push(node);
},
Nonscript(parser, _name) {
parser.Push(parser.itemFactory.create('nonscript'));
},
Rule(parser, name, style) {
const w = parser.GetDimen(name), h = parser.GetDimen(name), d = parser.GetDimen(name);
const def = { width: w, height: h, depth: d };
if (style !== 'blank') {
def['mathbackground'] = parser.stack.env['color'] || 'black';
}
const node = parser.create('node', 'mspace', [], def);
parser.Push(node);
},
rule(parser, name) {
const v = parser.GetBrackets(name), w = parser.GetDimen(name), h = parser.GetDimen(name);
let mml = parser.create('node', 'mspace', [], {
width: w,
height: h,
mathbackground: parser.stack.env['color'] || 'black',
});
if (v) {
mml = parser.create('node', 'mpadded', [mml], { voffset: v });
if (v.match(/^-/)) {
tex_NodeUtil.setAttribute(mml, 'height', v);
tex_NodeUtil.setAttribute(mml, 'depth', '+' + v.substring(1));
}
else {
tex_NodeUtil.setAttribute(mml, 'height', '+' + v);
}
}
parser.Push(mml);
},
MakeBig(parser, name, mclass, size) {
size *= P_HEIGHT;
const sizeStr = String(size).replace(/(\.\d\d\d).+/, '$1') + 'em';
const delim = parser.GetDelimiter(name, true);
const mo = parser.create('token', 'mo', {
minsize: sizeStr,
maxsize: sizeStr,
fence: true,
stretchy: true,
symmetric: true,
}, delim);
const node = parser.create('node', 'TeXAtom', [mo], { texClass: mclass });
parser.Push(node);
},
BuildRel(parser, name) {
const top = parser.ParseUpTo(name, '\\over');
const bot = parser.ParseArg(name);
const node = parser.create('node', 'munderover');
tex_NodeUtil.setChild(node, 0, bot);
tex_NodeUtil.setChild(node, 1, null);
tex_NodeUtil.setChild(node, 2, top);
const atom = parser.create('node', 'TeXAtom', [node], {
texClass: TEXCLASS.REL,
});
parser.Push(atom);
},
HBox(parser, name, style, font) {
parser.PushAll(ParseUtil.internalMath(parser, parser.GetArgument(name), style, font));
},
FBox(parser, name) {
const internal = ParseUtil.internalMath(parser, parser.GetArgument(name));
const node = parser.create('node', 'menclose', internal, {
notation: 'box',
});
parser.Push(node);
},
FrameBox(parser, name) {
const width = parser.GetBrackets(name);
const pos = parser.GetBrackets(name) || 'c';
let mml = ParseUtil.internalMath(parser, parser.GetArgument(name));
if (width) {
mml = [
parser.create('node', 'mpadded', mml, {
width,
'data-align': lookup(pos, { l: 'left', r: 'right' }, 'center'),
}),
];
}
const node = parser.create('node', 'TeXAtom', [parser.create('node', 'menclose', mml, { notation: 'box' })], { texClass: TEXCLASS.ORD });
parser.Push(node);
},
MakeBox(parser, name) {
const width = parser.GetBrackets(name);
const pos = parser.GetBrackets(name, 'c');
const mml = parser.create('node', 'mpadded', ParseUtil.internalMath(parser, parser.GetArgument(name)));
if (width) {
tex_NodeUtil.setAttribute(mml, 'width', width);
}
const align = lookup(pos.toLowerCase(), { c: 'center', r: 'right' }, '');
if (align) {
tex_NodeUtil.setAttribute(mml, 'data-align', align);
}
if (pos.toLowerCase() !== pos) {
tex_NodeUtil.setAttribute(mml, 'data-overflow', 'linebreak');
}
parser.Push(mml);
},
Not(parser, _name) {
parser.Push(parser.itemFactory.create('not'));
},
Dots(parser, _name) {
const ldotsEntity = tex_NodeUtil.createEntity('2026');
const cdotsEntity = tex_NodeUtil.createEntity('22EF');
const ldots = parser.create('token', 'mo', { stretchy: false }, ldotsEntity);
const cdots = parser.create('token', 'mo', { stretchy: false }, cdotsEntity);
parser.Push(parser.itemFactory.create('dots').setProperties({
ldots: ldots,
cdots: cdots,
}));
},
Matrix(parser, _name, open, close, align, spacing, vspacing, style, cases, numbered) {
const c = parser.GetNext();
if (c === '') {
throw new tex_TexError('MissingArgFor', 'Missing argument for %1', parser.currentCS);
}
if (c === '{') {
parser.i++;
}
else {
parser.string = c + '}' + parser.string.slice(parser.i + 1);
parser.i = 0;
}
const array = parser.itemFactory
.create('array')
.setProperty('requireClose', true);
if (open || !align) {
array.setProperty('arrayPadding', '.2em .125em');
}
array.arraydef = {
rowspacing: vspacing || '4pt',
columnspacing: spacing || '1em',
};
if (cases) {
array.setProperty('isCases', true);
}
if (numbered) {
array.setProperty('isNumbered', true);
array.arraydef.side = numbered;
}
if (open || close) {
array.setProperty('open', open);
array.setProperty('close', close);
}
if (style === 'D') {
array.arraydef.displaystyle = true;
}
if (align != null) {
array.arraydef.columnalign = align;
}
parser.Push(array);
},
Entry(parser, name) {
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isEntry: true, name: name }));
const top = parser.stack.Top();
const env = top.getProperty('casesEnv');
const cases = top.getProperty('isCases');
if (!cases && !env)
return;
const str = parser.string;
let braces = 0;
let close = -1;
let i = parser.i;
let m = str.length;
const end = env
? new RegExp(`^\\\\end\\s*\\{${env.replace(/\*/, '\\*')}\\}`)
: null;
while (i < m) {
const c = str.charAt(i);
if (c === '{') {
braces++;
i++;
}
else if (c === '}') {
if (braces === 0) {
m = 0;
}
else {
braces--;
if (braces === 0 && close < 0) {
close = i - parser.i;
}
i++;
}
}
else if (c === '&' && braces === 0) {
throw new tex_TexError('ExtraAlignTab', 'Extra alignment tab in \\cases text');
}
else if (c === '\\') {
const rest = str.substring(i);
if (rest.match(/^((\\cr)[^a-zA-Z]|\\\\)/) || (end && rest.match(end))) {
m = 0;
}
else {
i += 2;
}
}
else {
i++;
}
}
const text = str.substring(parser.i, i);
if (!text.match(/^\s*\\text[^a-zA-Z]/) ||
close !== text.replace(/\s+$/, '').length - 1) {
const internal = ParseUtil.internalMath(parser, UnitUtil.trimSpaces(text), 0);
parser.PushAll(internal);
parser.i = i;
}
},
Cr(parser, name) {
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isCR: true, name: name }));
},
CrLaTeX(parser, name, nobrackets = false) {
let n;
if (!nobrackets) {
if (parser.string.charAt(parser.i) === '*') {
parser.i++;
}
if (parser.string.charAt(parser.i) === '[') {
const dim = parser.GetBrackets(name, '');
const [value, unit] = UnitUtil.matchDimen(dim);
if (dim && !value) {
throw new tex_TexError('BracketMustBeDimension', 'Bracket argument to %1 must be a dimension', parser.currentCS);
}
n = value + unit;
}
}
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isCR: true, name: name, linebreak: true }));
const top = parser.stack.Top();
let node;
if (top instanceof ArrayItem) {
if (n) {
top.addRowSpacing(n);
}
}
else {
node = parser.create('node', 'mspace', [], {
linebreak: TexConstant.LineBreak.NEWLINE,
});
if (n) {
tex_NodeUtil.setAttribute(node, 'data-lineleading', n);
}
parser.Push(node);
}
},
HLine(parser, _name, style) {
if (style == null) {
style = 'solid';
}
const top = parser.stack.Top();
if (!(top instanceof ArrayItem) || top.Size()) {
throw new tex_TexError('Misplaced', 'Misplaced %1', parser.currentCS);
}
if (!top.table.length) {
top.frame.push(['top', style]);
}
else {
const lines = top.arraydef['rowlines']
? top.arraydef['rowlines'].split(/ /)
: [];
while (lines.length < top.table.length) {
lines.push('none');
}
lines[top.table.length - 1] = style;
top.arraydef['rowlines'] = lines.join(' ');
}
},
HFill(parser, _name) {
const top = parser.stack.Top();
if (top instanceof ArrayItem) {
top.hfill.push(top.Size());
}
else {
throw new tex_TexError('UnsupportedHFill', 'Unsupported use of %1', parser.currentCS);
}
},
NewColumnType(parser, name) {
const c = parser.GetArgument(name);
const n = parser.GetBrackets(name, '0');
const macro = parser.GetArgument(name);
if (c.length !== 1) {
throw new tex_TexError('BadColumnName', 'Column specifier must be exactly one character: %1', c);
}
if (!n.match(/^\d+$/)) {
throw new tex_TexError('PositiveIntegerArg', 'Argument to %1 must be a positive integer', n);
}
const cparser = parser.configuration.columnParser;
cparser.columnHandler[c] = (state) => cparser.macroColumn(state, macro, parseInt(n));
parser.Push(parser.itemFactory.create('null'));
},
BeginEnd(parser, name) {
const env = parser.GetArgument(name);
if (env.match(/\\/)) {
throw new tex_TexError('InvalidEnv', "Invalid environment name '%1'", env);
}
const macro = parser.configuration.handlers
.get(HandlerType.ENVIRONMENT)
.lookup(env);
if (macro && name === '\\end') {
if (!macro.args[0]) {
const mml = parser.itemFactory.create('end').setProperty('name', env);
parser.Push(mml);
return;
}
parser.stack.env['closing'] = env;
}
ParseUtil.checkMaxMacros(parser, false);
parser.parse(HandlerType.ENVIRONMENT, [parser, env]);
},
Array(parser, begin, open, close, align, spacing, vspacing, style, raggedHeight) {
if (!align) {
align = parser.GetArgument('\\begin{' + begin.getName() + '}');
}
const array = parser.itemFactory.create('array');
if (begin.getName() === 'array') {
array.setProperty('arrayPadding', '.5em .125em');
}
array.parser = parser;
array.arraydef = {
columnspacing: spacing || '1em',
rowspacing: vspacing || '4pt',
};
parser.configuration.columnParser.process(parser, align, array);
if (open) {
array.setProperty('open', parser.convertDelimiter(open));
}
if (close) {
array.setProperty('close', parser.convertDelimiter(close));
}
if ((style || '').charAt(1) === "'") {
array.arraydef['data-cramped'] = true;
style = style.charAt(0);
}
if (style === 'D') {
array.arraydef['displaystyle'] = true;
}
else if (style) {
array.arraydef['displaystyle'] = false;
}
array.arraydef['scriptlevel'] = style === 'S' ? 1 : 0;
if (raggedHeight) {
array.arraydef['useHeight'] = false;
}
parser.Push(begin);
array.StartEntry();
return array;
},
AlignedArray(parser, begin, style = '') {
const align = parser.GetBrackets('\\begin{' + begin.getName() + '}');
const item = BaseMethods.Array(parser, begin, null, null, null, null, null, style);
return ParseUtil.setArrayAlign(item, align);
},
IndentAlign(parser, begin) {
const name = `\\begin{${begin.getName()}}`;
const first = parser.GetBrackets(name, '');
const shift = parser.GetBrackets(name, '');
const last = parser.GetBrackets(name, '');
if ((first && !UnitUtil.matchDimen(first)[0]) ||
(shift && !UnitUtil.matchDimen(shift)[0]) ||
(last && !UnitUtil.matchDimen(last)[0])) {
throw new tex_TexError('BracketMustBeDimension', 'Bracket argument to %1 must be a dimension', name);
}
const lcr = parser.GetArgument(name);
if (lcr && !lcr.match(/^([lcr]{1,3})?$/)) {
throw new tex_TexError('BadAlignment', 'Alignment must be one to three copies of l, c, or r');
}
const align = [...lcr].map((c) => ({ l: 'left', c: 'center', r: 'right' })[c]);
if (align.length === 1) {
align.push(align[0]);
}
const attr = {};
for (const [name, value] of [
['indentshiftfirst', first],
['indentshift', shift || first],
['indentshiftlast', last],
['indentalignfirst', align[0]],
['indentalign', align[1]],
['indentalignlast', align[2]],
]) {
if (value) {
attr[name] = value;
}
}
parser.Push(parser.itemFactory.create('mstyle', attr, begin.getName()));
},
Equation(parser, begin, numbered, display = true) {
parser.configuration.mathItem.display = display;
parser.stack.env.display = display;
ParseUtil.checkEqnEnv(parser);
parser.Push(begin);
return parser.itemFactory
.create('equation', numbered)
.setProperty('name', begin.getName());
},
EqnArray(parser, begin, numbered, taggable, align, balign, spacing) {
const name = begin.getName();
const isGather = name === 'gather' || name === 'gather*';
if (taggable) {
ParseUtil.checkEqnEnv(parser, !isGather);
}
parser.Push(begin);
align = align
.replace(/[^clr]/g, '')
.split('')
.join(' ');
align = align
.replace(/l/g, 'left')
.replace(/r/g, 'right')
.replace(/c/g, 'center');
balign = splitAlignArray(balign);
const newItem = parser.itemFactory.create('eqnarray', name, numbered, taggable, parser.stack.global);
newItem.arraydef = {
displaystyle: true,
columnalign: align,
columnspacing: spacing || '1em',
rowspacing: '3pt',
'data-break-align': balign,
side: parser.options['tagSide'],
minlabelspacing: parser.options['tagIndent'],
};
if (isGather) {
newItem.setProperty('nestable', true);
}
return newItem;
},
HandleNoTag(parser, _name) {
parser.tags.notag();
},
HandleLabel(parser, name) {
const label = parser.GetArgument(name);
if (label === '') {
return;
}
if (!parser.tags.refUpdate) {
if (parser.tags.label) {
throw new tex_TexError('MultipleCommand', 'Multiple %1', parser.currentCS);
}
parser.tags.label = label;
if ((parser.tags.allLabels[label] || parser.tags.labels[label]) &&
!parser.options['ignoreDuplicateLabels']) {
throw new tex_TexError('MultipleLabel', "Label '%1' multiply defined", label);
}
parser.tags.labels[label] = new Label();
}
},
HandleRef(parser, name, eqref) {
const label = parser.GetArgument(name);
let ref = parser.tags.allLabels[label] || parser.tags.labels[label];
if (!ref) {
if (!parser.tags.refUpdate) {
parser.tags.redo = true;
}
ref = new Label();
}
let tag = ref.tag;
if (eqref) {
tag = parser.tags.formatRef(tag);
}
const node = parser.create('node', 'mrow', ParseUtil.internalMath(parser, tag), {
href: parser.tags.formatUrl(ref.id, parser.options.baseURL),
class: 'MathJax_ref',
});
parser.Push(node);
},
Macro(parser, name, macro, argcount, def) {
if (argcount) {
const args = [];
if (def != null) {
const optional = parser.GetBrackets(name);
args.push(optional == null ? def : optional);
}
for (let i = args.length; i < argcount; i++) {
args.push(parser.GetArgument(name));
}
macro = ParseUtil.substituteArgs(parser, args, macro);
}
parser.string = ParseUtil.addArgs(parser, macro, parser.string.slice(parser.i));
parser.i = 0;
ParseUtil.checkMaxMacros(parser);
},
MathChoice(parser, name) {
const D = parser.ParseArg(name);
const T = parser.ParseArg(name);
const S = parser.ParseArg(name);
const SS = parser.ParseArg(name);
parser.Push(parser.create('node', 'MathChoice', [D, T, S, SS]));
},
};
/* harmony default export */ const base_BaseMethods = (BaseMethods);
//# sourceMappingURL=BaseMethods.js.map
;// ./mjs/input/tex/ParseMethods.js
const ParseMethods_MATHVARIANT = TexConstant.Variant;
const ParseMethods = {
variable(parser, c) {
var _a;
const def = ParseUtil.getFontDef(parser);
const env = parser.stack.env;
if (env.multiLetterIdentifiers && env.font !== '') {
c =
((_a = parser.string
.substring(parser.i - 1)
.match(env.multiLetterIdentifiers)) === null || _a === void 0 ? void 0 : _a[0]) || c;
parser.i += c.length - 1;
if (def.mathvariant === ParseMethods_MATHVARIANT.NORMAL &&
env.noAutoOP &&
c.length > 1) {
def.autoOP = false;
}
}
if (!def.mathvariant && ParseUtil.isLatinOrGreekChar(c)) {
const variant = parser.configuration.mathStyle(c);
if (variant) {
def.mathvariant = variant;
}
}
const node = parser.create('token', 'mi', def, c);
parser.Push(node);
},
digit(parser, _c) {
const pattern = parser.configuration.options['numberPattern'];
const n = parser.string.slice(parser.i - 1).match(pattern);
const def = ParseUtil.getFontDef(parser);
if (!n) {
return false;
}
const mml = parser.create('token', 'mn', def, n[0].replace(/[{}]/g, ''));
parser.i += n[0].length - 1;
parser.Push(mml);
return true;
},
controlSequence(parser, _c) {
const name = parser.GetCS();
parser.parse(HandlerType.MACRO, [parser, name]);
},
lcGreek(parser, mchar) {
const def = {
mathvariant: parser.configuration.mathStyle(mchar.char) || ParseMethods_MATHVARIANT.ITALIC,
};
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
ucGreek(parser, mchar) {
const def = {
mathvariant: parser.stack.env['font'] ||
parser.configuration.mathStyle(mchar.char, true) ||
ParseMethods_MATHVARIANT.NORMAL,
};
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
mathchar0mi(parser, mchar) {
const def = mchar.attributes || { mathvariant: ParseMethods_MATHVARIANT.ITALIC };
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
mathchar0mo(parser, mchar) {
const def = mchar.attributes || {};
def['stretchy'] = false;
const node = parser.create('token', 'mo', def, mchar.char);
tex_NodeUtil.setProperty(node, 'fixStretchy', true);
parser.configuration.addNode('fixStretchy', node);
parser.Push(node);
},
mathchar7(parser, mchar) {
const def = mchar.attributes || { mathvariant: ParseMethods_MATHVARIANT.NORMAL };
if (parser.stack.env['font']) {
def['mathvariant'] = parser.stack.env['font'];
}
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
delimiter(parser, delim) {
let def = delim.attributes || {};
def = Object.assign({ fence: false, stretchy: false }, def);
const node = parser.create('token', 'mo', def, delim.char);
parser.Push(node);
},
environment(parser, env, func, args) {
const mml = parser.itemFactory.create('begin').setProperty('name', env);
parser.Push(func(parser, mml, ...args.slice(1)));
},
};
/* harmony default export */ const tex_ParseMethods = (ParseMethods);
//# sourceMappingURL=ParseMethods.js.map
;// ./mjs/input/tex/base/BaseMappings.js
const THICKMATHSPACE = em(MATHSPACE.thickmathspace);
const VARIANT = TexConstant.Variant;
new RegExpMap('letter', tex_ParseMethods.variable, /[a-z]/i);
new RegExpMap('digit', tex_ParseMethods.digit, /[0-9.,]/);
new RegExpMap('command', tex_ParseMethods.controlSequence, /^\\/);
new MacroMap('special', {
'{': base_BaseMethods.Open,
'}': base_BaseMethods.Close,
'~': base_BaseMethods.Tilde,
'^': base_BaseMethods.Superscript,
_: base_BaseMethods.Subscript,
'|': base_BaseMethods.Bar,
' ': base_BaseMethods.Space,
'\t': base_BaseMethods.Space,
'\r': base_BaseMethods.Space,
'\n': base_BaseMethods.Space,
"'": base_BaseMethods.Prime,
'%': base_BaseMethods.Comment,
'&': base_BaseMethods.Entry,
'#': base_BaseMethods.Hash,
'\u00A0': base_BaseMethods.Space,
'\u2019': base_BaseMethods.Prime,
});
new CharacterMap('lcGreek', tex_ParseMethods.lcGreek, {
alpha: '\u03B1',
beta: '\u03B2',
gamma: '\u03B3',
delta: '\u03B4',
epsilon: '\u03F5',
zeta: '\u03B6',
eta: '\u03B7',
theta: '\u03B8',
iota: '\u03B9',
kappa: '\u03BA',
lambda: '\u03BB',
mu: '\u03BC',
nu: '\u03BD',
xi: '\u03BE',
omicron: '\u03BF',
pi: '\u03C0',
rho: '\u03C1',
sigma: '\u03C3',
tau: '\u03C4',
upsilon: '\u03C5',
phi: '\u03D5',
chi: '\u03C7',
psi: '\u03C8',
omega: '\u03C9',
varepsilon: '\u03B5',
vartheta: '\u03D1',
varpi: '\u03D6',
varrho: '\u03F1',
varsigma: '\u03C2',
varphi: '\u03C6',
});
new CharacterMap('ucGreek', tex_ParseMethods.ucGreek, {
Gamma: '\u0393',
Delta: '\u0394',
Theta: '\u0398',
Lambda: '\u039B',
Xi: '\u039E',
Pi: '\u03A0',
Sigma: '\u03A3',
Upsilon: '\u03A5',
Phi: '\u03A6',
Psi: '\u03A8',
Omega: '\u03A9',
});
new CharacterMap('mathchar0mi', tex_ParseMethods.mathchar0mi, {
AA: '\u212B',
S: ['\u00A7', { mathvariant: VARIANT.NORMAL }],
aleph: ['\u2135', { mathvariant: VARIANT.NORMAL }],
hbar: ['\u210F', { variantForm: true }],
imath: '\u0131',
jmath: '\u0237',
ell: '\u2113',
wp: ['\u2118', { mathvariant: VARIANT.NORMAL }],
Re: ['\u211C', { mathvariant: VARIANT.NORMAL }],
Im: ['\u2111', { mathvariant: VARIANT.NORMAL }],
partial: ['\u2202', { mathvariant: VARIANT.ITALIC }],
infty: ['\u221E', { mathvariant: VARIANT.NORMAL }],
prime: ['\u2032', { variantForm: true }],
emptyset: ['\u2205', { mathvariant: VARIANT.NORMAL }],
nabla: ['\u2207', { mathvariant: VARIANT.NORMAL }],
top: ['\u22A4', { mathvariant: VARIANT.NORMAL }],
bot: ['\u22A5', { mathvariant: VARIANT.NORMAL }],
angle: ['\u2220', { mathvariant: VARIANT.NORMAL }],
triangle: ['\u25B3', { mathvariant: VARIANT.NORMAL }],
backslash: ['\\', { mathvariant: VARIANT.NORMAL }],
forall: ['\u2200', { mathvariant: VARIANT.NORMAL }],
exists: ['\u2203', { mathvariant: VARIANT.NORMAL }],
neg: ['\u00AC', { mathvariant: VARIANT.NORMAL }],
lnot: ['\u00AC', { mathvariant: VARIANT.NORMAL }],
flat: ['\u266D', { mathvariant: VARIANT.NORMAL }],
natural: ['\u266E', { mathvariant: VARIANT.NORMAL }],
sharp: ['\u266F', { mathvariant: VARIANT.NORMAL }],
clubsuit: ['\u2663', { mathvariant: VARIANT.NORMAL }],
diamondsuit: ['\u2662', { mathvariant: VARIANT.NORMAL }],
heartsuit: ['\u2661', { mathvariant: VARIANT.NORMAL }],
spadesuit: ['\u2660', { mathvariant: VARIANT.NORMAL }],
});
new CharacterMap('mathchar0mo', tex_ParseMethods.mathchar0mo, {
surd: '\u221A',
coprod: ['\u2210', { movesupsub: true }],
bigvee: ['\u22C1', { movesupsub: true }],
bigwedge: ['\u22C0', { movesupsub: true }],
biguplus: ['\u2A04', { movesupsub: true }],
bigcap: ['\u22C2', { movesupsub: true }],
bigcup: ['\u22C3', { movesupsub: true }],
int: '\u222B',
intop: ['\u222B', { movesupsub: true, movablelimits: true }],
iint: '\u222C',
iiint: '\u222D',
prod: ['\u220F', { movesupsub: true }],
sum: ['\u2211', { movesupsub: true }],
bigotimes: ['\u2A02', { movesupsub: true }],
bigoplus: ['\u2A01', { movesupsub: true }],
bigodot: ['\u2A00', { movesupsub: true }],
oint: '\u222E',
ointop: ['\u222E', { movesupsub: true, movablelimits: true }],
oiint: '\u222F',
oiiint: '\u2230',
bigsqcup: ['\u2A06', { movesupsub: true }],
smallint: ['\u222B', { largeop: false }],
triangleleft: '\u25C3',
triangleright: '\u25B9',
bigtriangleup: '\u25B3',
bigtriangledown: '\u25BD',
wedge: '\u2227',
land: '\u2227',
vee: '\u2228',
lor: '\u2228',
cap: '\u2229',
cup: '\u222A',
ddagger: '\u2021',
dagger: '\u2020',
sqcap: '\u2293',
sqcup: '\u2294',
uplus: '\u228E',
amalg: '\u2A3F',
diamond: '\u22C4',
bullet: '\u2219',
wr: '\u2240',
div: '\u00F7',
odot: ['\u2299', { largeop: false }],
oslash: ['\u2298', { largeop: false }],
otimes: ['\u2297', { largeop: false }],
ominus: ['\u2296', { largeop: false }],
oplus: ['\u2295', { largeop: false }],
mp: '\u2213',
pm: '\u00B1',
circ: '\u2218',
bigcirc: '\u25EF',
setminus: '\u2216',
cdot: '\u22C5',
ast: '\u2217',
times: '\u00D7',
star: '\u22C6',
propto: '\u221D',
sqsubseteq: '\u2291',
sqsupseteq: '\u2292',
parallel: '\u2225',
mid: '\u2223',
dashv: '\u22A3',
vdash: '\u22A2',
leq: '\u2264',
le: '\u2264',
geq: '\u2265',
ge: '\u2265',
lt: '\u003C',
gt: '\u003E',
succ: '\u227B',
prec: '\u227A',
approx: '\u2248',
succeq: '\u2AB0',
preceq: '\u2AAF',
supset: '\u2283',
subset: '\u2282',
supseteq: '\u2287',
subseteq: '\u2286',
in: '\u2208',
ni: '\u220B',
notin: '\u2209',
owns: '\u220B',
gg: '\u226B',
ll: '\u226A',
sim: '\u223C',
simeq: '\u2243',
perp: '\u27C2',
equiv: '\u2261',
asymp: '\u224D',
smile: '\u2323',
frown: '\u2322',
ne: '\u2260',
neq: '\u2260',
cong: '\u2245',
doteq: '\u2250',
bowtie: '\u22C8',
models: '\u22A7',
notChar: '\u29F8',
Leftrightarrow: '\u21D4',
Leftarrow: '\u21D0',
Rightarrow: '\u21D2',
leftrightarrow: '\u2194',
leftarrow: '\u2190',
gets: '\u2190',
rightarrow: '\u2192',
to: ['\u2192', { accent: false }],
mapsto: '\u21A6',
leftharpoonup: '\u21BC',
leftharpoondown: '\u21BD',
rightharpoonup: '\u21C0',
rightharpoondown: '\u21C1',
nearrow: '\u2197',
searrow: '\u2198',
nwarrow: '\u2196',
swarrow: '\u2199',
rightleftharpoons: '\u21CC',
hookrightarrow: '\u21AA',
hookleftarrow: '\u21A9',
longleftarrow: '\u27F5',
Longleftarrow: '\u27F8',
longrightarrow: '\u27F6',
Longrightarrow: '\u27F9',
Longleftrightarrow: '\u27FA',
longleftrightarrow: '\u27F7',
longmapsto: '\u27FC',
ldots: '\u2026',
cdots: '\u22EF',
vdots: '\u22EE',
ddots: '\u22F1',
iddots: '\u22F0',
dotsc: '\u2026',
dotsb: '\u22EF',
dotsm: '\u22EF',
dotsi: '\u22EF',
dotso: '\u2026',
ldotp: ['\u002E', { texClass: TEXCLASS.PUNCT }],
cdotp: ['\u22C5', { texClass: TEXCLASS.PUNCT }],
colon: ['\u003A', { texClass: TEXCLASS.PUNCT }],
});
new CharacterMap('mathchar7', tex_ParseMethods.mathchar7, {
_: '\u005F',
'#': '\u0023',
$: '\u0024',
'%': '\u0025',
'&': '\u0026',
And: '\u0026',
});
new DelimiterMap('delimiter', tex_ParseMethods.delimiter, {
'(': '(',
')': ')',
'[': '[',
']': ']',
'<': '\u27E8',
'>': '\u27E9',
'\\lt': '\u27E8',
'\\gt': '\u27E9',
'/': '/',
'|': ['|', { texClass: TEXCLASS.ORD }],
'.': '',
'\\lmoustache': '\u23B0',
'\\rmoustache': '\u23B1',
'\\lgroup': '\u27EE',
'\\rgroup': '\u27EF',
'\\arrowvert': '\u23D0',
'\\Arrowvert': '\u2016',
'\\bracevert': '\u23AA',
'\\Vert': ['\u2016', { texClass: TEXCLASS.ORD }],
'\\|': ['\u2016', { texClass: TEXCLASS.ORD }],
'\\vert': ['|', { texClass: TEXCLASS.ORD }],
'\\uparrow': '\u2191',
'\\downarrow': '\u2193',
'\\updownarrow': '\u2195',
'\\Uparrow': '\u21D1',
'\\Downarrow': '\u21D3',
'\\Updownarrow': '\u21D5',
'\\backslash': '\\',
'\\rangle': '\u27E9',
'\\langle': '\u27E8',
'\\rbrace': '}',
'\\lbrace': '{',
'\\}': '}',
'\\{': '{',
'\\rceil': '\u2309',
'\\lceil': '\u2308',
'\\rfloor': '\u230B',
'\\lfloor': '\u230A',
'\\lbrack': '[',
'\\rbrack': ']',
});
new CommandMap('macros', {
displaystyle: [base_BaseMethods.SetStyle, 'D', true, 0],
textstyle: [base_BaseMethods.SetStyle, 'T', false, 0],
scriptstyle: [base_BaseMethods.SetStyle, 'S', false, 1],
scriptscriptstyle: [base_BaseMethods.SetStyle, 'SS', false, 2],
rm: [base_BaseMethods.SetFont, VARIANT.NORMAL],
mit: [base_BaseMethods.SetFont, VARIANT.ITALIC],
oldstyle: [base_BaseMethods.SetFont, VARIANT.OLDSTYLE],
cal: [base_BaseMethods.SetFont, VARIANT.CALLIGRAPHIC],
it: [base_BaseMethods.SetFont, VARIANT.MATHITALIC],
bf: [base_BaseMethods.SetFont, VARIANT.BOLD],
sf: [base_BaseMethods.SetFont, VARIANT.SANSSERIF],
tt: [base_BaseMethods.SetFont, VARIANT.MONOSPACE],
frak: [base_BaseMethods.MathFont, VARIANT.FRAKTUR],
Bbb: [base_BaseMethods.MathFont, VARIANT.DOUBLESTRUCK],
mathrm: [base_BaseMethods.MathFont, VARIANT.NORMAL],
mathup: [base_BaseMethods.MathFont, VARIANT.NORMAL],
mathnormal: [base_BaseMethods.MathFont, ''],
mathbf: [base_BaseMethods.MathFont, VARIANT.BOLD],
mathbfup: [base_BaseMethods.MathFont, VARIANT.BOLD],
mathit: [base_BaseMethods.MathFont, VARIANT.MATHITALIC],
mathbfit: [base_BaseMethods.MathFont, VARIANT.BOLDITALIC],
mathbb: [base_BaseMethods.MathFont, VARIANT.DOUBLESTRUCK],
mathfrak: [base_BaseMethods.MathFont, VARIANT.FRAKTUR],
mathbffrak: [base_BaseMethods.MathFont, VARIANT.BOLDFRAKTUR],
mathscr: [base_BaseMethods.MathFont, VARIANT.SCRIPT],
mathbfscr: [base_BaseMethods.MathFont, VARIANT.BOLDSCRIPT],
mathsf: [base_BaseMethods.MathFont, VARIANT.SANSSERIF],
mathsfup: [base_BaseMethods.MathFont, VARIANT.SANSSERIF],
mathbfsf: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
mathbfsfup: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
mathsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFITALIC],
mathbfsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFBOLDITALIC],
mathtt: [base_BaseMethods.MathFont, VARIANT.MONOSPACE],
mathcal: [base_BaseMethods.MathFont, VARIANT.CALLIGRAPHIC],
mathbfcal: [base_BaseMethods.MathFont, VARIANT.BOLDCALLIGRAPHIC],
symrm: [base_BaseMethods.MathFont, VARIANT.NORMAL],
symup: [base_BaseMethods.MathFont, VARIANT.NORMAL],
symnormal: [base_BaseMethods.MathFont, ''],
symbf: [base_BaseMethods.MathFont, VARIANT.BOLD, VARIANT.BOLDITALIC],
symbfup: [base_BaseMethods.MathFont, VARIANT.BOLD],
symit: [base_BaseMethods.MathFont, VARIANT.ITALIC],
symbfit: [base_BaseMethods.MathFont, VARIANT.BOLDITALIC],
symbb: [base_BaseMethods.MathFont, VARIANT.DOUBLESTRUCK],
symfrak: [base_BaseMethods.MathFont, VARIANT.FRAKTUR],
symbffrak: [base_BaseMethods.MathFont, VARIANT.BOLDFRAKTUR],
symscr: [base_BaseMethods.MathFont, VARIANT.SCRIPT],
symbfscr: [base_BaseMethods.MathFont, VARIANT.BOLDSCRIPT],
symsf: [base_BaseMethods.MathFont, VARIANT.SANSSERIF, VARIANT.SANSSERIFITALIC],
symsfup: [base_BaseMethods.MathFont, VARIANT.SANSSERIF],
symbfsf: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
symbfsfup: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
symsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFITALIC],
symbfsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFBOLDITALIC],
symtt: [base_BaseMethods.MathFont, VARIANT.MONOSPACE],
symcal: [base_BaseMethods.MathFont, VARIANT.CALLIGRAPHIC],
symbfcal: [base_BaseMethods.MathFont, VARIANT.BOLDCALLIGRAPHIC],
textrm: [base_BaseMethods.HBox, null, VARIANT.NORMAL],
textup: [base_BaseMethods.HBox, null, VARIANT.NORMAL],
textnormal: [base_BaseMethods.HBox],
textit: [base_BaseMethods.HBox, null, VARIANT.ITALIC],
textbf: [base_BaseMethods.HBox, null, VARIANT.BOLD],
textsf: [base_BaseMethods.HBox, null, VARIANT.SANSSERIF],
texttt: [base_BaseMethods.HBox, null, VARIANT.MONOSPACE],
tiny: [base_BaseMethods.SetSize, 0.5],
Tiny: [base_BaseMethods.SetSize, 0.6],
scriptsize: [base_BaseMethods.SetSize, 0.7],
small: [base_BaseMethods.SetSize, 0.85],
normalsize: [base_BaseMethods.SetSize, 1.0],
large: [base_BaseMethods.SetSize, 1.2],
Large: [base_BaseMethods.SetSize, 1.44],
LARGE: [base_BaseMethods.SetSize, 1.73],
huge: [base_BaseMethods.SetSize, 2.07],
Huge: [base_BaseMethods.SetSize, 2.49],
arcsin: base_BaseMethods.NamedFn,
arccos: base_BaseMethods.NamedFn,
arctan: base_BaseMethods.NamedFn,
arg: base_BaseMethods.NamedFn,
cos: base_BaseMethods.NamedFn,
cosh: base_BaseMethods.NamedFn,
cot: base_BaseMethods.NamedFn,
coth: base_BaseMethods.NamedFn,
csc: base_BaseMethods.NamedFn,
deg: base_BaseMethods.NamedFn,
det: base_BaseMethods.NamedOp,
dim: base_BaseMethods.NamedFn,
exp: base_BaseMethods.NamedFn,
gcd: base_BaseMethods.NamedOp,
hom: base_BaseMethods.NamedFn,
inf: base_BaseMethods.NamedOp,
ker: base_BaseMethods.NamedFn,
lg: base_BaseMethods.NamedFn,
lim: base_BaseMethods.NamedOp,
liminf: [base_BaseMethods.NamedOp, 'lim inf'],
limsup: [base_BaseMethods.NamedOp, 'lim sup'],
ln: base_BaseMethods.NamedFn,
log: base_BaseMethods.NamedFn,
max: base_BaseMethods.NamedOp,
min: base_BaseMethods.NamedOp,
Pr: base_BaseMethods.NamedOp,
sec: base_BaseMethods.NamedFn,
sin: base_BaseMethods.NamedFn,
sinh: base_BaseMethods.NamedFn,
sup: base_BaseMethods.NamedOp,
tan: base_BaseMethods.NamedFn,
tanh: base_BaseMethods.NamedFn,
limits: [base_BaseMethods.Limits, true],
nolimits: [base_BaseMethods.Limits, false],
overline: [base_BaseMethods.UnderOver, '2015'],
underline: [base_BaseMethods.UnderOver, '2015'],
overbrace: [base_BaseMethods.UnderOver, '23DE', true],
underbrace: [base_BaseMethods.UnderOver, '23DF', true],
overparen: [base_BaseMethods.UnderOver, '23DC'],
underparen: [base_BaseMethods.UnderOver, '23DD'],
overrightarrow: [base_BaseMethods.UnderOver, '2192'],
underrightarrow: [base_BaseMethods.UnderOver, '2192'],
overleftarrow: [base_BaseMethods.UnderOver, '2190'],
underleftarrow: [base_BaseMethods.UnderOver, '2190'],
overleftrightarrow: [base_BaseMethods.UnderOver, '2194'],
underleftrightarrow: [base_BaseMethods.UnderOver, '2194'],
overset: base_BaseMethods.Overset,
underset: base_BaseMethods.Underset,
overunderset: base_BaseMethods.Overunderset,
stackrel: [base_BaseMethods.Macro, '\\mathrel{\\mathop{#2}\\limits^{#1}}', 2],
stackbin: [base_BaseMethods.Macro, '\\mathbin{\\mathop{#2}\\limits^{#1}}', 2],
over: base_BaseMethods.Over,
overwithdelims: base_BaseMethods.Over,
atop: base_BaseMethods.Over,
atopwithdelims: base_BaseMethods.Over,
above: base_BaseMethods.Over,
abovewithdelims: base_BaseMethods.Over,
brace: [base_BaseMethods.Over, '{', '}'],
brack: [base_BaseMethods.Over, '[', ']'],
choose: [base_BaseMethods.Over, '(', ')'],
frac: base_BaseMethods.Frac,
sqrt: base_BaseMethods.Sqrt,
root: base_BaseMethods.Root,
uproot: [base_BaseMethods.MoveRoot, 'upRoot'],
leftroot: [base_BaseMethods.MoveRoot, 'leftRoot'],
left: base_BaseMethods.LeftRight,
right: base_BaseMethods.LeftRight,
middle: base_BaseMethods.LeftRight,
llap: base_BaseMethods.Lap,
rlap: base_BaseMethods.Lap,
raise: base_BaseMethods.RaiseLower,
lower: base_BaseMethods.RaiseLower,
moveleft: base_BaseMethods.MoveLeftRight,
moveright: base_BaseMethods.MoveLeftRight,
',': [base_BaseMethods.Spacer, MATHSPACE.thinmathspace],
':': [base_BaseMethods.Spacer, MATHSPACE.mediummathspace],
'>': [base_BaseMethods.Spacer, MATHSPACE.mediummathspace],
';': [base_BaseMethods.Spacer, MATHSPACE.thickmathspace],
'!': [base_BaseMethods.Spacer, MATHSPACE.negativethinmathspace],
enspace: [base_BaseMethods.Spacer, 0.5],
quad: [base_BaseMethods.Spacer, 1],
qquad: [base_BaseMethods.Spacer, 2],
thinspace: [base_BaseMethods.Spacer, MATHSPACE.thinmathspace],
negthinspace: [base_BaseMethods.Spacer, MATHSPACE.negativethinmathspace],
'*': base_BaseMethods.DiscretionaryTimes,
allowbreak: base_BaseMethods.AllowBreak,
goodbreak: [base_BaseMethods.Linebreak, TexConstant.LineBreak.GOODBREAK],
badbreak: [base_BaseMethods.Linebreak, TexConstant.LineBreak.BADBREAK],
nobreak: [base_BaseMethods.Linebreak, TexConstant.LineBreak.NOBREAK],
break: base_BaseMethods.Break,
hskip: base_BaseMethods.Hskip,
hspace: base_BaseMethods.Hskip,
kern: [base_BaseMethods.Hskip, true],
mskip: base_BaseMethods.Hskip,
mspace: base_BaseMethods.Hskip,
mkern: [base_BaseMethods.Hskip, true],
rule: base_BaseMethods.rule,
Rule: [base_BaseMethods.Rule],
Space: [base_BaseMethods.Rule, 'blank'],
nonscript: base_BaseMethods.Nonscript,
big: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 0.85],
Big: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 1.15],
bigg: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 1.45],
Bigg: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 1.75],
bigl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 0.85],
Bigl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 1.15],
biggl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 1.45],
Biggl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 1.75],
bigr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 0.85],
Bigr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 1.15],
biggr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 1.45],
Biggr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 1.75],
bigm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 0.85],
Bigm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 1.15],
biggm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 1.45],
Biggm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 1.75],
mathord: [base_BaseMethods.TeXAtom, TEXCLASS.ORD],
mathop: [base_BaseMethods.TeXAtom, TEXCLASS.OP],
mathopen: [base_BaseMethods.TeXAtom, TEXCLASS.OPEN],
mathclose: [base_BaseMethods.TeXAtom, TEXCLASS.CLOSE],
mathbin: [base_BaseMethods.TeXAtom, TEXCLASS.BIN],
mathrel: [base_BaseMethods.TeXAtom, TEXCLASS.REL],
mathpunct: [base_BaseMethods.TeXAtom, TEXCLASS.PUNCT],
mathinner: [base_BaseMethods.TeXAtom, TEXCLASS.INNER],
vtop: [base_BaseMethods.VBox, 'top'],
vcenter: [base_BaseMethods.VBox, 'center'],
vbox: [base_BaseMethods.VBox, 'bottom'],
hsize: base_BaseMethods.Hsize,
parbox: base_BaseMethods.ParBox,
breakAlign: base_BaseMethods.BreakAlign,
buildrel: base_BaseMethods.BuildRel,
hbox: [base_BaseMethods.HBox, 0],
text: base_BaseMethods.HBox,
mbox: [base_BaseMethods.HBox, 0],
fbox: base_BaseMethods.FBox,
boxed: [base_BaseMethods.Macro, '\\fbox{$\\displaystyle{#1}$}', 1],
framebox: base_BaseMethods.FrameBox,
makebox: base_BaseMethods.MakeBox,
strut: base_BaseMethods.Strut,
mathstrut: [base_BaseMethods.Macro, '\\vphantom{(}'],
phantom: base_BaseMethods.Phantom,
vphantom: [base_BaseMethods.Phantom, 1, 0],
hphantom: [base_BaseMethods.Phantom, 0, 1],
smash: base_BaseMethods.Smash,
acute: [base_BaseMethods.Accent, '00B4'],
grave: [base_BaseMethods.Accent, '0060'],
ddot: [base_BaseMethods.Accent, '00A8'],
dddot: [base_BaseMethods.Accent, '20DB'],
ddddot: [base_BaseMethods.Accent, '20DC'],
tilde: [base_BaseMethods.Accent, '007E'],
bar: [base_BaseMethods.Accent, '00AF'],
breve: [base_BaseMethods.Accent, '02D8'],
check: [base_BaseMethods.Accent, '02C7'],
hat: [base_BaseMethods.Accent, '005E'],
vec: [base_BaseMethods.Accent, '2192', false],
dot: [base_BaseMethods.Accent, '02D9'],
widetilde: [base_BaseMethods.Accent, '007E', true],
widehat: [base_BaseMethods.Accent, '005E', true],
matrix: base_BaseMethods.Matrix,
array: base_BaseMethods.Matrix,
pmatrix: [base_BaseMethods.Matrix, '(', ')'],
cases: [base_BaseMethods.Matrix, '{', '', 'left left', null, '.2em', null, true],
eqalign: [
base_BaseMethods.Matrix,
null,
null,
'right left',
THICKMATHSPACE,
'.5em',
'D',
],
displaylines: [base_BaseMethods.Matrix, null, null, 'center', null, '.5em', 'D'],
cr: base_BaseMethods.Cr,
'\\': base_BaseMethods.CrLaTeX,
newline: [base_BaseMethods.CrLaTeX, true],
hline: base_BaseMethods.HLine,
hdashline: [base_BaseMethods.HLine, 'dashed'],
eqalignno: [
base_BaseMethods.Matrix,
null,
null,
'right left',
THICKMATHSPACE,
'.5em',
'D',
null,
'right',
],
leqalignno: [
base_BaseMethods.Matrix,
null,
null,
'right left',
THICKMATHSPACE,
'.5em',
'D',
null,
'left',
],
hfill: base_BaseMethods.HFill,
hfil: base_BaseMethods.HFill,
hfilll: base_BaseMethods.HFill,
bmod: [
base_BaseMethods.Macro,
'\\mmlToken{mo}[lspace="' +
THICKMATHSPACE +
'"' +
' rspace="' +
THICKMATHSPACE +
'"]{mod}',
],
pmod: [base_BaseMethods.Macro, '\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}', 1],
mod: [
base_BaseMethods.Macro,
'\\mathchoice{\\kern18mu}{\\kern12mu}' +
'{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1',
1,
],
pod: [
base_BaseMethods.Macro,
'\\mathchoice{\\kern18mu}{\\kern8mu}' + '{\\kern8mu}{\\kern8mu}(#1)',
1,
],
iff: [base_BaseMethods.Macro, '\\;\\Longleftrightarrow\\;'],
skew: [base_BaseMethods.Macro, '{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}', 3],
pmb: [base_BaseMethods.Macro, '\\rlap{#1}\\kern1px{#1}', 1],
TeX: [base_BaseMethods.Macro, 'T\\kern-.14em\\lower.5ex{E}\\kern-.115em X'],
LaTeX: [
base_BaseMethods.Macro,
'L\\kern-.325em\\raise.21em' + '{\\scriptstyle{A}}\\kern-.17em\\TeX',
],
not: base_BaseMethods.Not,
dots: base_BaseMethods.Dots,
space: base_BaseMethods.Tilde,
'\u00A0': base_BaseMethods.Tilde,
' ': base_BaseMethods.Tilde,
begin: base_BaseMethods.BeginEnd,
end: base_BaseMethods.BeginEnd,
label: base_BaseMethods.HandleLabel,
ref: base_BaseMethods.HandleRef,
nonumber: base_BaseMethods.HandleNoTag,
newcolumntype: base_BaseMethods.NewColumnType,
mathchoice: base_BaseMethods.MathChoice,
mmlToken: base_BaseMethods.MmlToken,
});
new EnvironmentMap('environment', tex_ParseMethods.environment, {
displaymath: [base_BaseMethods.Equation, null, false],
math: [base_BaseMethods.Equation, null, false, false],
array: [base_BaseMethods.AlignedArray],
darray: [base_BaseMethods.AlignedArray, null, 'D'],
equation: [base_BaseMethods.Equation, null, true],
eqnarray: [
base_BaseMethods.EqnArray,
null,
true,
true,
'rcl',
'bmt',
ParseUtil.cols(0, MATHSPACE.thickmathspace),
'.5em',
],
indentalign: [base_BaseMethods.IndentAlign],
});
new CharacterMap('not_remap', null, {
'\u2190': '\u219A',
'\u2192': '\u219B',
'\u2194': '\u21AE',
'\u21D0': '\u21CD',
'\u21D2': '\u21CF',
'\u21D4': '\u21CE',
'\u2208': '\u2209',
'\u220B': '\u220C',
'\u2223': '\u2224',
'\u2225': '\u2226',
'\u223C': '\u2241',
'\u007E': '\u2241',
'\u2243': '\u2244',
'\u2245': '\u2247',
'\u2248': '\u2249',
'\u224D': '\u226D',
'\u003D': '\u2260',
'\u2261': '\u2262',
'\u003C': '\u226E',
'\u003E': '\u226F',
'\u2264': '\u2270',
'\u2265': '\u2271',
'\u2272': '\u2274',
'\u2273': '\u2275',
'\u2276': '\u2278',
'\u2277': '\u2279',
'\u227A': '\u2280',
'\u227B': '\u2281',
'\u2282': '\u2284',
'\u2283': '\u2285',
'\u2286': '\u2288',
'\u2287': '\u2289',
'\u22A2': '\u22AC',
'\u22A8': '\u22AD',
'\u22A9': '\u22AE',
'\u22AB': '\u22AF',
'\u227C': '\u22E0',
'\u227D': '\u22E1',
'\u2291': '\u22E2',
'\u2292': '\u22E3',
'\u22B2': '\u22EA',
'\u22B3': '\u22EB',
'\u22B4': '\u22EC',
'\u22B5': '\u22ED',
'\u2203': '\u2204',
});
//# sourceMappingURL=BaseMappings.js.map
;// ./components/mjs/core/lib/core/MmlTree/OperatorDictionary.js
const OperatorDictionary_def = MathJax._.core.MmlTree.OperatorDictionary;
const OPDEF = OperatorDictionary_def.OPDEF;
const MO = OperatorDictionary_def.MO;
const RANGES = OperatorDictionary_def.RANGES;
const getRange = OperatorDictionary_def.getRange;
const MMLSPACING = OperatorDictionary_def.MMLSPACING;
const OPTABLE = OperatorDictionary_def.OPTABLE;
;// ./components/mjs/core/lib/util/context.js
const context_def = MathJax._.util.context;
const hasWindow = context_def.hasWindow;
const context = context_def.context;
;// ./mjs/input/tex/base/BaseConfiguration.js
const BaseConfiguration_MATHVARIANT = TexConstant.Variant;
new CharacterMap('remap', null, {
'-': '\u2212',
'*': '\u2217',
'`': '\u2018',
});
function Other(parser, char) {
const font = parser.stack.env['font'];
const ifont = parser.stack.env['italicFont'];
const def = font ? { mathvariant: font } : {};
const remap = MapHandler.getMap('remap').lookup(char);
const range = getRange(char);
const type = range[3];
const mo = parser.create('token', type, def, remap ? remap.char : char);
const style = ParseUtil.isLatinOrGreekChar(char)
? parser.configuration.mathStyle(char, true) || ifont
: '';
const variant = range[4] || (font && style === BaseConfiguration_MATHVARIANT.NORMAL ? '' : style);
if (variant) {
mo.attributes.set('mathvariant', variant);
}
if (type === 'mo') {
tex_NodeUtil.setProperty(mo, 'fixStretchy', true);
parser.configuration.addNode('fixStretchy', mo);
}
parser.Push(mo);
}
function csUndefined(_parser, name) {
throw new tex_TexError('UndefinedControlSequence', 'Undefined control sequence %1', '\\' + name);
}
function envUndefined(_parser, env) {
throw new tex_TexError('UnknownEnv', "Unknown environment '%1'", env);
}
function filterNonscript({ data }) {
for (const mml of data.getList('nonscript')) {
if (mml.attributes.get('scriptlevel') > 0) {
const parent = mml.parent;
parent.childNodes.splice(parent.childIndex(mml), 1);
data.removeFromList(mml.kind, [mml]);
if (mml.isKind('mrow')) {
const mstyle = mml.childNodes[0];
data.removeFromList('mstyle', [mstyle]);
data.removeFromList('mspace', mstyle.childNodes[0].childNodes);
}
}
else if (mml.isKind('mrow')) {
mml.parent.replaceChild(mml.childNodes[0], mml);
data.removeFromList('mrow', [mml]);
}
}
}
class BaseTags extends AbstractTags {
}
const BaseConfiguration = Configuration.create('base', {
[ConfigurationType.CONFIG]: function (config, jax) {
const options = jax.parseOptions.options;
if (options.digits) {
options.numberPattern = options.digits;
}
new RegExpMap('digit', tex_ParseMethods.digit, options.initialDigit);
new RegExpMap('letter', tex_ParseMethods.variable, options.initialLetter);
const handler = config.handlers.get(HandlerType.CHARACTER);
handler.add(['letter', 'digit'], null, 4);
},
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['command', 'special'],
[HandlerType.DELIMITER]: ['delimiter'],
[HandlerType.MACRO]: [
'delimiter',
'macros',
'lcGreek',
'ucGreek',
'mathchar0mi',
'mathchar0mo',
'mathchar7',
],
[HandlerType.ENVIRONMENT]: ['environment'],
},
[ConfigurationType.FALLBACK]: {
[HandlerType.CHARACTER]: Other,
[HandlerType.MACRO]: csUndefined,
[HandlerType.ENVIRONMENT]: envUndefined,
},
[ConfigurationType.ITEMS]: {
[StartItem.prototype.kind]: StartItem,
[StopItem.prototype.kind]: StopItem,
[OpenItem.prototype.kind]: OpenItem,
[CloseItem.prototype.kind]: CloseItem,
[NullItem.prototype.kind]: NullItem,
[PrimeItem.prototype.kind]: PrimeItem,
[SubsupItem.prototype.kind]: SubsupItem,
[OverItem.prototype.kind]: OverItem,
[LeftItem.prototype.kind]: LeftItem,
[Middle.prototype.kind]: Middle,
[RightItem.prototype.kind]: RightItem,
[BreakItem.prototype.kind]: BreakItem,
[BeginItem.prototype.kind]: BeginItem,
[EndItem.prototype.kind]: EndItem,
[StyleItem.prototype.kind]: StyleItem,
[PositionItem.prototype.kind]: PositionItem,
[CellItem.prototype.kind]: CellItem,
[MmlItem.prototype.kind]: MmlItem,
[FnItem.prototype.kind]: FnItem,
[NotItem.prototype.kind]: NotItem,
[NonscriptItem.prototype.kind]: NonscriptItem,
[DotsItem.prototype.kind]: DotsItem,
[ArrayItem.prototype.kind]: ArrayItem,
[EqnArrayItem.prototype.kind]: EqnArrayItem,
[EquationItem.prototype.kind]: EquationItem,
[MstyleItem.prototype.kind]: MstyleItem,
},
[ConfigurationType.OPTIONS]: {
maxMacros: 1000,
digits: '',
numberPattern: /^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,
initialDigit: /[0-9.,]/,
identifierPattern: /^[a-zA-Z]+/,
initialLetter: /[a-zA-Z]/,
baseURL: !context.document ||
context.document.getElementsByTagName('base').length === 0
? ''
: String(context.document.location).replace(/#.*$/, ''),
},
[ConfigurationType.TAGS]: {
base: BaseTags,
},
[ConfigurationType.POSTPROCESSORS]: [[filterNonscript, -4]],
});
//# sourceMappingURL=BaseConfiguration.js.map
;// ./mjs/input/tex.js
class TeX extends AbstractInputJax {
static configure(packages) {
const configuration = new ParserConfiguration(packages, ['tex']);
configuration.init();
return configuration;
}
static tags(options, configuration) {
TagsFactory.addTags(configuration.tags);
TagsFactory.setDefault(options.options.tags);
options.tags = TagsFactory.getDefault();
options.tags.configuration = options;
}
constructor(options = {}) {
const [rest, tex, find] = separateOptions(options, TeX.OPTIONS, FindTeX.OPTIONS);
super(tex);
this.findTeX = this.options['FindTeX'] || new FindTeX(find);
const packages = this.options.packages;
const configuration = (this.configuration = TeX.configure(packages));
const parseOptions = (this._parseOptions = new tex_ParseOptions(configuration, [
this.options,
TagsFactory.OPTIONS,
]));
userOptions(parseOptions.options, rest);
configuration.config(this);
TeX.tags(parseOptions, configuration);
this.postFilters.addList([
[tex_FilterUtil.cleanSubSup, -7],
[tex_FilterUtil.setInherited, -6],
[tex_FilterUtil.checkScriptlevel, -5],
[tex_FilterUtil.moveLimits, -4],
[tex_FilterUtil.cleanStretchy, -3],
[tex_FilterUtil.cleanAttributes, -2],
[tex_FilterUtil.combineRelations, -1],
]);
}
setMmlFactory(mmlFactory) {
super.setMmlFactory(mmlFactory);
this._parseOptions.nodeFactory.setMmlFactory(mmlFactory);
}
get parseOptions() {
return this._parseOptions;
}
reset(tag = 0) {
this.parseOptions.tags.reset(tag);
}
compile(math, document) {
this.parseOptions.clear();
this.parseOptions.mathItem = math;
this.executeFilters(this.preFilters, math, document, this.parseOptions);
this.latex = math.math;
let node;
this.parseOptions.tags.startEquation(math);
let parser;
try {
parser = new TexParser(this.latex, { display: math.display, isInner: false }, this.parseOptions);
node = parser.mml();
}
catch (err) {
if (!(err instanceof tex_TexError)) {
throw err;
}
this.parseOptions.error = true;
node = this.options.formatError(this, err);
}
node = this.parseOptions.nodeFactory.create('node', 'math', [node]);
node.attributes.set(TexConstant.Attr.LATEX, this.latex);
if (math.display) {
tex_NodeUtil.setAttribute(node, 'display', 'block');
}
this.parseOptions.tags.finishEquation(math);
this.parseOptions.root = node;
this.executeFilters(this.postFilters, math, document, this.parseOptions);
if (parser && parser.stack.env.hsize) {
tex_NodeUtil.setAttribute(node, 'maxwidth', parser.stack.env.hsize);
tex_NodeUtil.setAttribute(node, 'overflow', 'linebreak');
}
this.mathNode = this.parseOptions.root;
return this.mathNode;
}
findMath(strings) {
return this.findTeX.findMath(strings);
}
formatError(err) {
const message = err.message.replace(/\n.*/, '');
return this.parseOptions.nodeFactory.create('error', message, err.id, this.latex);
}
}
TeX.NAME = 'TeX';
TeX.OPTIONS = Object.assign(Object.assign({}, AbstractInputJax.OPTIONS), { FindTeX: null, packages: ['base'], maxBuffer: 5 * 1024, maxTemplateSubtitutions: 10000, mathStyle: 'TeX', formatError: (jax, err) => jax.formatError(err) });
//# sourceMappingURL=tex.js.map
;// ./mjs/input/tex/ams/AmsItems.js
class MultlineItem extends ArrayItem {
constructor(factory, ...args) {
super(factory);
this.factory.configuration.tags.start('multline', true, args[0]);
}
get kind() {
return 'multline';
}
EndEntry() {
if (this.table.length) {
ParseUtil.fixInitialMO(this.factory.configuration, this.nodes);
}
const shove = this.getProperty('shove');
const mtd = this.create('node', 'mtd', this.nodes, shove ? { columnalign: shove } : {});
this.setProperty('shove', null);
this.row.push(mtd);
this.Clear();
}
EndRow() {
if (this.row.length !== 1) {
throw new tex_TexError('MultlineRowsOneCol', 'The rows within the %1 environment must have exactly one column', 'multline');
}
const row = this.create('node', 'mtr', this.row);
this.table.push(row);
this.row = [];
}
EndTable() {
super.EndTable();
if (this.table.length) {
const m = this.table.length - 1;
let label = -1;
if (!tex_NodeUtil.getAttribute(tex_NodeUtil.getChildren(this.table[0])[0], 'columnalign')) {
tex_NodeUtil.setAttribute(tex_NodeUtil.getChildren(this.table[0])[0], 'columnalign', TexConstant.Align.LEFT);
}
if (!tex_NodeUtil.getAttribute(tex_NodeUtil.getChildren(this.table[m])[0], 'columnalign')) {
tex_NodeUtil.setAttribute(tex_NodeUtil.getChildren(this.table[m])[0], 'columnalign', TexConstant.Align.RIGHT);
}
const tag = this.factory.configuration.tags.getTag();
if (tag) {
label =
this.arraydef.side === TexConstant.Align.LEFT
? 0
: this.table.length - 1;
const mtr = this.table[label];
const mlabel = this.create('node', 'mlabeledtr', [tag].concat(tex_NodeUtil.getChildren(mtr)));
tex_NodeUtil.copyAttributes(mtr, mlabel);
this.table[label] = mlabel;
}
}
this.factory.configuration.tags.end();
}
}
class FlalignItem extends EqnArrayItem {
get kind() {
return 'flalign';
}
constructor(factory, name, numbered, padded, center) {
super(factory);
this.name = name;
this.numbered = numbered;
this.padded = padded;
this.center = center;
this.factory.configuration.tags.start(name, numbered, numbered);
}
EndEntry() {
super.EndEntry();
const n = this.getProperty('xalignat');
if (!n)
return;
if (this.row.length > n) {
throw new tex_TexError('XalignOverflow', 'Extra %1 in row of %2', '&', this.name);
}
}
EndRow() {
let cell;
const row = this.row;
const n = this.getProperty('xalignat');
while (row.length < n) {
row.push(this.create('node', 'mtd'));
}
this.row = [];
if (this.padded) {
this.row.push(this.create('node', 'mtd'));
}
while ((cell = row.shift())) {
this.row.push(cell);
cell = row.shift();
if (cell)
this.row.push(cell);
if (row.length || this.padded) {
this.row.push(this.create('node', 'mtd'));
}
}
if (this.row.length > this.maxrow) {
this.maxrow = this.row.length;
}
super.EndRow();
const mtr = this.table[this.table.length - 1];
if (this.getProperty('zeroWidthLabel') && mtr.isKind('mlabeledtr')) {
const mtd = tex_NodeUtil.getChildren(mtr)[0];
const side = this.factory.configuration.options['tagSide'];
const def = Object.assign({ width: 0 }, (side === 'right' ? { lspace: '-1width' } : {}));
const mpadded = this.create('node', 'mpadded', tex_NodeUtil.getChildren(mtd), def);
mtd.setChildren([mpadded]);
}
}
EndTable() {
super.EndTable();
if (this.center) {
if (this.maxrow <= 2) {
const def = this.arraydef;
delete def.width;
delete this.global.indentalign;
}
}
}
}
//# sourceMappingURL=AmsItems.js.map
;// ./mjs/input/tex/newcommand/NewcommandUtil.js
var NewcommandTables;
(function (NewcommandTables) {
NewcommandTables["NEW_DELIMITER"] = "new-Delimiter";
NewcommandTables["NEW_COMMAND"] = "new-Command";
NewcommandTables["NEW_ENVIRONMENT"] = "new-Environment";
})(NewcommandTables || (NewcommandTables = {}));
const NewcommandPriority = -100;
const NewcommandUtil = {
GetCSname(parser, cmd) {
const c = parser.GetNext();
if (c !== '\\') {
throw new tex_TexError('MissingCS', '%1 must be followed by a control sequence', cmd);
}
const cs = UnitUtil.trimSpaces(parser.GetArgument(cmd)).substring(1);
this.checkProtectedMacros(parser, cs);
return cs;
},
GetCsNameArgument(parser, name) {
let cs = UnitUtil.trimSpaces(parser.GetArgument(name));
if (cs.charAt(0) === '\\') {
cs = cs.substring(1);
}
if (!cs.match(/^(.|[a-z]+)$/i)) {
throw new tex_TexError('IllegalControlSequenceName', 'Illegal control sequence name for %1', name);
}
this.checkProtectedMacros(parser, cs);
return cs;
},
GetArgCount(parser, name) {
let n = parser.GetBrackets(name);
if (n) {
n = UnitUtil.trimSpaces(n);
if (!n.match(/^[0-9]+$/)) {
throw new tex_TexError('IllegalParamNumber', 'Illegal number of parameters specified in %1', name);
}
}
return n;
},
GetTemplate(parser, cmd, cs) {
let c = parser.GetNext();
const params = [];
let n = 0;
let i = parser.i;
while (parser.i < parser.string.length) {
c = parser.GetNext();
if (c === '#') {
if (i !== parser.i) {
params[n] = parser.string.substring(i, parser.i);
}
c = parser.string.charAt(++parser.i);
if (!c.match(/^[1-9]$/)) {
throw new tex_TexError('CantUseHash2', 'Illegal use of # in template for %1', cs);
}
if (parseInt(c) !== ++n) {
throw new tex_TexError('SequentialParam', 'Parameters for %1 must be numbered sequentially', cs);
}
i = parser.i + 1;
}
else if (c === '{') {
if (i !== parser.i) {
params[n] = parser.string.substring(i, parser.i);
}
if (params.length > 0) {
return [n.toString()].concat(params);
}
else {
return n;
}
}
parser.i++;
}
throw new tex_TexError('MissingReplacementString', 'Missing replacement string for definition of %1', cmd);
},
GetParameter(parser, name, param) {
if (param == null) {
return parser.GetArgument(name);
}
let i = parser.i;
let j = 0;
let hasBraces = false;
while (parser.i < parser.string.length) {
const c = parser.string.charAt(parser.i);
if (c === '{') {
hasBraces = parser.i === i;
parser.GetArgument(name);
j = parser.i - i;
}
else if (this.MatchParam(parser, param)) {
if (hasBraces) {
i++;
j -= 2;
}
return parser.string.substring(i, i + j);
}
else if (c === '\\') {
parser.i++;
j++;
hasBraces = false;
const match = parser.string.substring(parser.i).match(/[a-z]+|./i);
if (match) {
parser.i += match[0].length;
j = parser.i - i;
}
}
else {
parser.i++;
j++;
hasBraces = false;
}
}
throw new tex_TexError('RunawayArgument', 'Runaway argument for %1?', name);
},
MatchParam(parser, param) {
if (parser.string.substring(parser.i, parser.i + param.length) !== param) {
return 0;
}
if (param.match(/\\[a-z]+$/i) &&
parser.string.charAt(parser.i + param.length).match(/[a-z]/i)) {
return 0;
}
parser.i += param.length;
return 1;
},
checkGlobal(parser, tokens, maps) {
return (parser.stack.env.isGlobal
? parser.configuration.packageData
.get('begingroup')
.stack.checkGlobal(tokens, maps)
: maps.map((name) => parser.configuration.handlers.retrieve(name)));
},
checkProtectedMacros(parser, cs) {
var _a;
if ((_a = parser.options.protectedMacros) === null || _a === void 0 ? void 0 : _a.includes(cs)) {
throw new tex_TexError('ProtectedMacro', "The control sequence %1 can't be redefined", `\\${cs}`);
}
},
addDelimiter(parser, cs, char, attr) {
const name = cs.substring(1);
this.checkProtectedMacros(parser, name);
const [macros, delims] = NewcommandUtil.checkGlobal(parser, [name, cs], [NewcommandTables.NEW_COMMAND, NewcommandTables.NEW_DELIMITER]);
if (name !== cs) {
macros.remove(name);
}
delims.add(cs, new Token(cs, char, attr));
delete parser.stack.env.isGlobal;
},
addMacro(parser, cs, func, attr, token = '') {
this.checkProtectedMacros(parser, cs);
const macros = NewcommandUtil.checkGlobal(parser, [cs], [NewcommandTables.NEW_COMMAND])[0];
this.undefineDelimiter(parser, '\\' + cs);
macros.add(cs, new Macro(token ? token : cs, func, attr));
delete parser.stack.env.isGlobal;
},
addEnvironment(parser, env, func, attr) {
const envs = NewcommandUtil.checkGlobal(parser, [env], [NewcommandTables.NEW_ENVIRONMENT])[0];
envs.add(env, new Macro(env, func, attr));
delete parser.stack.env.isGlobal;
},
undefineMacro(parser, cs) {
const macros = NewcommandUtil.checkGlobal(parser, [cs], [NewcommandTables.NEW_COMMAND])[0];
macros.remove(cs);
if (parser.configuration.handlers.get(HandlerType.MACRO).applicable(cs)) {
macros.add(cs, new Macro(cs, () => SubHandler.FALLBACK, []));
this.undefineDelimiter(parser, '\\' + cs);
}
delete parser.stack.env.isGlobal;
},
undefineDelimiter(parser, cs) {
const delims = NewcommandUtil.checkGlobal(parser, [cs], [NewcommandTables.NEW_DELIMITER])[0];
delims.remove(cs);
if (parser.configuration.handlers.get(HandlerType.DELIMITER).applicable(cs)) {
delims.add(cs, new Token(cs, null, {}));
}
delete parser.stack.env.isGlobal;
},
};
//# sourceMappingURL=NewcommandUtil.js.map
;// ./mjs/input/tex/ams/AmsMethods.js
function splitSideSet(mml) {
if (!mml || (mml.isInferred && mml.childNodes.length === 0)) {
return [null, null];
}
if (mml.isKind('msubsup') && checkSideSetBase(mml)) {
return [mml, null];
}
const child = tex_NodeUtil.getChildAt(mml, 0);
if (!(mml.isInferred && child && checkSideSetBase(child))) {
return [null, mml];
}
mml.childNodes.splice(0, 1);
return [child, mml];
}
function checkSideSetBase(mml) {
const base = mml.childNodes[0];
return (base && base.isKind('mi') && base.getText() === '');
}
const AmsMethods = {
AmsEqnArray(parser, begin, numbered, taggable, align, balign, spacing, style) {
const args = parser.GetBrackets('\\begin{' + begin.getName() + '}');
const array = base_BaseMethods.EqnArray(parser, begin, numbered, taggable, align, balign, spacing, style);
return ParseUtil.setArrayAlign(array, args, parser);
},
AlignAt(parser, begin, numbered, taggable) {
const name = begin.getName();
let valign;
let align = '';
let balign = '';
const spacing = [];
if (!taggable) {
valign = parser.GetBrackets('\\begin{' + name + '}');
}
const n = parser.GetArgument('\\begin{' + name + '}');
if (n.match(/[^0-9]/)) {
throw new tex_TexError('PositiveIntegerArg', 'Argument to %1 must be a positive integer', '\\begin{' + name + '}');
}
let count = parseInt(n, 10);
while (count > 0) {
align += 'rl';
balign += 'bt';
spacing.push('0em 0em');
count--;
}
const spaceStr = spacing.join(' ');
if (taggable) {
return AmsMethods.EqnArray(parser, begin, numbered, taggable, align, balign, spaceStr);
}
const array = AmsMethods.EqnArray(parser, begin, numbered, taggable, align, balign, spaceStr);
return ParseUtil.setArrayAlign(array, valign, parser);
},
Multline(parser, begin, numbered) {
ParseUtil.checkEqnEnv(parser);
parser.Push(begin);
const padding = parser.options.ams['multlineIndent'];
const item = parser.itemFactory.create('multline', numbered, parser.stack);
item.arraydef = {
displaystyle: true,
rowspacing: '.5em',
columnspacing: '100%',
width: parser.options.ams['multlineWidth'],
side: parser.options['tagSide'],
minlabelspacing: parser.options['tagIndent'],
'data-array-padding': `${padding} ${padding}`,
'data-width-includes-label': true,
};
return item;
},
XalignAt(parser, begin, numbered, padded) {
const n = parser.GetArgument('\\begin{' + begin.getName() + '}');
if (n.match(/[^0-9]/)) {
throw new tex_TexError('PositiveIntegerArg', 'Argument to %1 must be a positive integer', '\\begin{' + begin.getName() + '}');
}
const align = padded ? 'crl' : 'rlc';
const balign = padded ? 'mbt' : 'btm';
const width = padded ? 'fit auto auto' : 'auto auto fit';
const item = AmsMethods.FlalignArray(parser, begin, numbered, padded, false, align, balign, width, true);
item.setProperty('xalignat', 2 * parseInt(n));
return item;
},
FlalignArray(parser, begin, numbered, padded, center, align, balign, width, zeroWidthLabel = false) {
ParseUtil.checkEqnEnv(parser);
parser.Push(begin);
align = align
.split('')
.join(' ')
.replace(/r/g, 'right')
.replace(/l/g, 'left')
.replace(/c/g, 'center');
balign = splitAlignArray(balign);
const item = parser.itemFactory.create('flalign', begin.getName(), numbered, padded, center, parser.stack);
item.arraydef = {
width: '100%',
displaystyle: true,
columnalign: align,
columnspacing: '0em',
columnwidth: width,
rowspacing: '3pt',
'data-break-align': balign,
side: parser.options['tagSide'],
minlabelspacing: zeroWidthLabel ? '0' : parser.options['tagIndent'],
'data-width-includes-label': true,
};
item.setProperty('zeroWidthLabel', zeroWidthLabel);
return item;
},
HandleDeclareOp(parser, name) {
const star = parser.GetStar() ? '*' : '';
const cs = NewcommandUtil.GetCsNameArgument(parser, name);
const op = parser.GetArgument(name);
NewcommandUtil.addMacro(parser, cs, AmsMethods.Macro, [
`\\operatorname${star}{${op}}`,
]);
parser.Push(parser.itemFactory.create('null'));
},
HandleOperatorName(parser, name) {
const star = parser.GetStar();
const op = UnitUtil.trimSpaces(parser.GetArgument(name));
let mml = new TexParser(op, Object.assign(Object.assign({}, parser.stack.env), { font: TexConstant.Variant.NORMAL, multiLetterIdentifiers: parser.options.ams.operatornamePattern, operatorLetters: true }), parser.configuration).mml();
if (!mml.isKind('mi')) {
mml = parser.create('node', 'TeXAtom', [mml]);
}
tex_NodeUtil.setProperties(mml, {
movesupsub: star,
movablelimits: true,
texClass: TEXCLASS.OP,
});
if (!star) {
const c = parser.GetNext();
const i = parser.i;
if (c === '\\' && ++parser.i && parser.GetCS() !== 'limits') {
parser.i = i;
}
}
parser.Push(parser.itemFactory.create('fn', mml));
},
SideSet(parser, name) {
const [preScripts, preRest] = splitSideSet(parser.ParseArg(name));
const [postScripts, postRest] = splitSideSet(parser.ParseArg(name));
const base = parser.ParseArg(name);
let mml = base;
if (preScripts) {
if (preRest) {
preScripts.replaceChild(parser.create('node', 'mphantom', [
parser.create('node', 'mpadded', [ParseUtil.copyNode(base, parser)], { width: 0 }),
]), tex_NodeUtil.getChildAt(preScripts, 0));
}
else {
mml = parser.create('node', 'mmultiscripts', [base]);
if (postScripts) {
tex_NodeUtil.appendChildren(mml, [
tex_NodeUtil.getChildAt(postScripts, 1) ||
parser.create('node', 'none'),
tex_NodeUtil.getChildAt(postScripts, 2) ||
parser.create('node', 'none'),
]);
}
tex_NodeUtil.setProperty(mml, 'scriptalign', 'left');
tex_NodeUtil.appendChildren(mml, [
parser.create('node', 'mprescripts'),
tex_NodeUtil.getChildAt(preScripts, 1) || parser.create('node', 'none'),
tex_NodeUtil.getChildAt(preScripts, 2) || parser.create('node', 'none'),
]);
}
}
if (postScripts && mml === base) {
postScripts.replaceChild(base, tex_NodeUtil.getChildAt(postScripts, 0));
mml = postScripts;
}
const mrow = parser.create('node', 'TeXAtom', [], {
texClass: TEXCLASS.OP,
movesupsub: true,
movablelimits: true,
});
if (preRest) {
if (preScripts) {
mrow.appendChild(preScripts);
}
mrow.appendChild(preRest);
}
mrow.appendChild(mml);
if (postRest) {
mrow.appendChild(postRest);
}
parser.Push(mrow);
},
operatorLetter(parser, c) {
return parser.stack.env.operatorLetters
? tex_ParseMethods.variable(parser, c)
: false;
},
MultiIntegral(parser, name, integral) {
let next = parser.GetNext();
if (next === '\\') {
const i = parser.i;
next = parser.GetArgument(name);
parser.i = i;
if (next === '\\limits') {
integral = '\\!\\!\\mathop{\\,\\,' + integral + '}';
}
}
parser.string = integral + ' ' + parser.string.slice(parser.i);
parser.i = 0;
},
xArrow(parser, name, chr, l, r, m = 0) {
const def = {
width: '+' + UnitUtil.em((l + r) / 18),
lspace: UnitUtil.em(l / 18),
};
const bot = parser.GetBrackets(name);
const first = parser.ParseArg(name);
const dstrut = parser.create('node', 'mspace', [], { depth: '.2em' });
let arrow = parser.create('token', 'mo', { stretchy: true, texClass: TEXCLASS.REL }, String.fromCodePoint(chr));
if (m) {
arrow.attributes.set('minsize', UnitUtil.em(m));
}
arrow = parser.create('node', 'mstyle', [arrow], { scriptlevel: 0 });
const mml = parser.create('node', 'munderover', [arrow]);
let mpadded = parser.create('node', 'mpadded', [first, dstrut], def);
tex_NodeUtil.setAttribute(mpadded, 'voffset', '-.2em');
tex_NodeUtil.setAttribute(mpadded, 'height', '-.2em');
tex_NodeUtil.setChild(mml, mml.over, mpadded);
if (bot) {
const bottom = new TexParser(bot, parser.stack.env, parser.configuration).mml();
const bstrut = parser.create('node', 'mspace', [], { height: '.75em' });
mpadded = parser.create('node', 'mpadded', [bottom, bstrut], def);
tex_NodeUtil.setAttribute(mpadded, 'voffset', '.15em');
tex_NodeUtil.setAttribute(mpadded, 'depth', '-.15em');
tex_NodeUtil.setChild(mml, mml.under, mpadded);
}
tex_NodeUtil.setProperty(mml, 'subsupOK', true);
parser.Push(mml);
},
HandleShove(parser, _name, shove) {
const top = parser.stack.Top();
if (top.kind !== 'multline') {
throw new tex_TexError('CommandOnlyAllowedInEnv', '%1 only allowed in %2 environment', parser.currentCS, 'multline');
}
if (top.Size()) {
throw new tex_TexError('CommandAtTheBeginingOfLine', '%1 must come at the beginning of the line', parser.currentCS);
}
top.setProperty('shove', shove);
},
CFrac(parser, name) {
let lr = UnitUtil.trimSpaces(parser.GetBrackets(name, ''));
const num = parser.GetArgument(name);
const den = parser.GetArgument(name);
const lrMap = {
l: TexConstant.Align.LEFT,
r: TexConstant.Align.RIGHT,
'': '',
};
const numNode = new TexParser('\\strut\\textstyle{' + num + '}', parser.stack.env, parser.configuration).mml();
const denNode = new TexParser('\\strut\\textstyle{' + den + '}', parser.stack.env, parser.configuration).mml();
const frac = parser.create('node', 'mfrac', [numNode, denNode]);
lr = lrMap[lr];
if (lr == null) {
throw new tex_TexError('IllegalAlign', 'Illegal alignment specified in %1', parser.currentCS);
}
if (lr) {
tex_NodeUtil.setProperties(frac, { numalign: lr, denomalign: lr });
}
parser.Push(frac);
},
Genfrac(parser, name, left, right, thick, style) {
if (left == null) {
left = parser.GetDelimiterArg(name);
}
if (right == null) {
right = parser.GetDelimiterArg(name);
}
if (thick == null) {
thick = parser.GetArgument(name);
}
if (style == null) {
style = UnitUtil.trimSpaces(parser.GetArgument(name));
}
const num = parser.ParseArg(name);
const den = parser.ParseArg(name);
let frac = parser.create('node', 'mfrac', [num, den]);
if (thick !== '') {
tex_NodeUtil.setAttribute(frac, 'linethickness', thick);
}
if (left || right) {
tex_NodeUtil.setProperty(frac, 'withDelims', true);
frac = ParseUtil.fixedFence(parser.configuration, left, frac, right);
}
if (style !== '') {
const styleDigit = parseInt(style, 10);
const styleAlpha = ['D', 'T', 'S', 'SS'][styleDigit];
if (styleAlpha == null) {
throw new tex_TexError('BadMathStyleFor', 'Bad math style for %1', parser.currentCS);
}
frac = parser.create('node', 'mstyle', [frac]);
if (styleAlpha === 'D') {
tex_NodeUtil.setProperties(frac, { displaystyle: true, scriptlevel: 0 });
}
else {
tex_NodeUtil.setProperties(frac, {
displaystyle: false,
scriptlevel: styleDigit - 1,
});
}
}
parser.Push(frac);
},
HandleTag(parser, name) {
if (!parser.tags.currentTag.taggable && parser.tags.env) {
throw new tex_TexError('CommandNotAllowedInEnv', '%1 not allowed in %2 environment', parser.currentCS, parser.tags.env);
}
if (parser.tags.currentTag.tag) {
throw new tex_TexError('MultipleCommand', 'Multiple %1', parser.currentCS);
}
const star = parser.GetStar();
const tagId = UnitUtil.trimSpaces(parser.GetArgument(name));
parser.tags.tag(tagId, star);
parser.Push(parser.itemFactory.create('null'));
},
HandleNoTag: base_BaseMethods.HandleNoTag,
HandleRef: base_BaseMethods.HandleRef,
Macro: base_BaseMethods.Macro,
Accent: base_BaseMethods.Accent,
Tilde: base_BaseMethods.Tilde,
Array: base_BaseMethods.Array,
Spacer: base_BaseMethods.Spacer,
NamedOp: base_BaseMethods.NamedOp,
EqnArray: base_BaseMethods.EqnArray,
Equation: base_BaseMethods.Equation,
};
//# sourceMappingURL=AmsMethods.js.map
;// ./mjs/input/tex/ams/AmsMappings.js
new CharacterMap('AMSmath-mathchar0mo', tex_ParseMethods.mathchar0mo, {
iiiint: ['\u2A0C', { texClass: TEXCLASS.OP }],
});
new RegExpMap('AMSmath-operatorLetter', AmsMethods.operatorLetter, /[-*]/i);
new CommandMap('AMSmath-macros', {
mathring: [AmsMethods.Accent, '02DA'],
nobreakspace: AmsMethods.Tilde,
negmedspace: [AmsMethods.Spacer, MATHSPACE.negativemediummathspace],
negthickspace: [AmsMethods.Spacer, MATHSPACE.negativethickmathspace],
idotsint: [AmsMethods.MultiIntegral, '\\int\\cdots\\int'],
dddot: [AmsMethods.Accent, '20DB'],
ddddot: [AmsMethods.Accent, '20DC'],
sideset: AmsMethods.SideSet,
boxed: [AmsMethods.Macro, '\\fbox{$\\displaystyle{#1}$}', 1],
tag: AmsMethods.HandleTag,
notag: AmsMethods.HandleNoTag,
eqref: [AmsMethods.HandleRef, true],
substack: [AmsMethods.Macro, '\\begin{subarray}{c}#1\\end{subarray}', 1],
injlim: [AmsMethods.NamedOp, 'inj lim'],
projlim: [AmsMethods.NamedOp, 'proj lim'],
varliminf: [AmsMethods.Macro, '\\mathop{\\underline{\\mmlToken{mi}{lim}}}'],
varlimsup: [AmsMethods.Macro, '\\mathop{\\overline{\\mmlToken{mi}{lim}}}'],
varinjlim: [
AmsMethods.Macro,
'\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}}}',
],
varprojlim: [
AmsMethods.Macro,
'\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}}}',
],
DeclareMathOperator: AmsMethods.HandleDeclareOp,
operatorname: AmsMethods.HandleOperatorName,
genfrac: AmsMethods.Genfrac,
frac: [AmsMethods.Genfrac, '', '', '', ''],
tfrac: [AmsMethods.Genfrac, '', '', '', '1'],
dfrac: [AmsMethods.Genfrac, '', '', '', '0'],
binom: [AmsMethods.Genfrac, '(', ')', '0', ''],
tbinom: [AmsMethods.Genfrac, '(', ')', '0', '1'],
dbinom: [AmsMethods.Genfrac, '(', ')', '0', '0'],
cfrac: AmsMethods.CFrac,
shoveleft: [AmsMethods.HandleShove, TexConstant.Align.LEFT],
shoveright: [AmsMethods.HandleShove, TexConstant.Align.RIGHT],
xrightarrow: [AmsMethods.xArrow, 0x2192, 5, 10],
xleftarrow: [AmsMethods.xArrow, 0x2190, 10, 5],
});
new EnvironmentMap('AMSmath-environment', tex_ParseMethods.environment, {
'equation*': [AmsMethods.Equation, null, false],
'eqnarray*': [
AmsMethods.EqnArray,
null,
false,
true,
'rcl',
'bmt',
ParseUtil.cols(0, MATHSPACE.thickmathspace),
'.5em',
],
align: [
AmsMethods.EqnArray,
null,
true,
true,
'rl',
'bt',
ParseUtil.cols(0, 2),
],
'align*': [
AmsMethods.EqnArray,
null,
false,
true,
'rl',
'bt',
ParseUtil.cols(0, 2),
],
multline: [AmsMethods.Multline, null, true],
'multline*': [AmsMethods.Multline, null, false],
split: [
AmsMethods.EqnArray,
null,
false,
false,
'rl',
'bt',
ParseUtil.cols(0),
],
gather: [AmsMethods.EqnArray, null, true, true, 'c', 'm'],
'gather*': [AmsMethods.EqnArray, null, false, true, 'c', 'm'],
alignat: [AmsMethods.AlignAt, null, true, true],
'alignat*': [AmsMethods.AlignAt, null, false, true],
alignedat: [AmsMethods.AlignAt, null, false, false],
aligned: [
AmsMethods.AmsEqnArray,
null,
null,
null,
'rl',
'bt',
ParseUtil.cols(0, 2),
'.5em',
'D',
],
gathered: [
AmsMethods.AmsEqnArray,
null,
null,
null,
'c',
'm',
null,
'.5em',
'D',
],
xalignat: [AmsMethods.XalignAt, null, true, true],
'xalignat*': [AmsMethods.XalignAt, null, false, true],
xxalignat: [AmsMethods.XalignAt, null, false, false],
flalign: [
AmsMethods.FlalignArray,
null,
true,
false,
true,
'rlc',
'btm',
'auto auto fit',
],
'flalign*': [
AmsMethods.FlalignArray,
null,
false,
false,
true,
'rlc',
'btm',
'auto auto fit',
],
subarray: [
AmsMethods.Array,
null,
null,
null,
null,
ParseUtil.cols(0),
'0.1em',
'S',
true,
],
smallmatrix: [
AmsMethods.Array,
null,
null,
null,
'c',
ParseUtil.cols(1 / 3),
'.2em',
'S',
true,
],
matrix: [AmsMethods.Array, null, null, null, 'c'],
pmatrix: [AmsMethods.Array, null, '(', ')', 'c'],
bmatrix: [AmsMethods.Array, null, '[', ']', 'c'],
Bmatrix: [AmsMethods.Array, null, '\\{', '\\}', 'c'],
vmatrix: [AmsMethods.Array, null, '\\vert', '\\vert', 'c'],
Vmatrix: [AmsMethods.Array, null, '\\Vert', '\\Vert', 'c'],
cases: [AmsMethods.Array, null, '\\{', '.', 'll', null, '.2em', 'T'],
});
new DelimiterMap('AMSmath-delimiter', tex_ParseMethods.delimiter, {
'\\lvert': ['\u007C', { texClass: TEXCLASS.OPEN }],
'\\rvert': ['\u007C', { texClass: TEXCLASS.CLOSE }],
'\\lVert': ['\u2016', { texClass: TEXCLASS.OPEN }],
'\\rVert': ['\u2016', { texClass: TEXCLASS.CLOSE }],
});
new CharacterMap('AMSsymbols-mathchar0mi', tex_ParseMethods.mathchar0mi, {
digamma: '\u03DD',
varkappa: '\u03F0',
varGamma: ['\u0393', { mathvariant: TexConstant.Variant.ITALIC }],
varDelta: ['\u0394', { mathvariant: TexConstant.Variant.ITALIC }],
varTheta: ['\u0398', { mathvariant: TexConstant.Variant.ITALIC }],
varLambda: ['\u039B', { mathvariant: TexConstant.Variant.ITALIC }],
varXi: ['\u039E', { mathvariant: TexConstant.Variant.ITALIC }],
varPi: ['\u03A0', { mathvariant: TexConstant.Variant.ITALIC }],
varSigma: ['\u03A3', { mathvariant: TexConstant.Variant.ITALIC }],
varUpsilon: ['\u03A5', { mathvariant: TexConstant.Variant.ITALIC }],
varPhi: ['\u03A6', { mathvariant: TexConstant.Variant.ITALIC }],
varPsi: ['\u03A8', { mathvariant: TexConstant.Variant.ITALIC }],
varOmega: ['\u03A9', { mathvariant: TexConstant.Variant.ITALIC }],
beth: '\u2136',
gimel: '\u2137',
daleth: '\u2138',
backprime: ['\u2035', { variantForm: true }],
hslash: '\u210F',
varnothing: ['\u2205', { variantForm: true }],
blacktriangle: '\u25B4',
triangledown: ['\u25BD', { variantForm: true }],
blacktriangledown: '\u25BE',
square: '\u25FB',
Box: '\u25FB',
blacksquare: '\u25FC',
lozenge: '\u25CA',
Diamond: '\u25CA',
blacklozenge: '\u29EB',
circledS: ['\u24C8', { mathvariant: TexConstant.Variant.NORMAL }],
bigstar: '\u2605',
sphericalangle: '\u2222',
measuredangle: '\u2221',
nexists: '\u2204',
complement: '\u2201',
mho: '\u2127',
eth: ['\u00F0', { mathvariant: TexConstant.Variant.NORMAL }],
Finv: '\u2132',
diagup: '\u2571',
Game: '\u2141',
diagdown: '\u2572',
Bbbk: ['\u006B', { mathvariant: TexConstant.Variant.DOUBLESTRUCK }],
yen: '\u00A5',
circledR: '\u00AE',
checkmark: '\u2713',
maltese: '\u2720',
});
new CharacterMap('AMSsymbols-mathchar0mo', tex_ParseMethods.mathchar0mo, {
dotplus: '\u2214',
ltimes: '\u22C9',
smallsetminus: ['\u2216', { variantForm: true }],
rtimes: '\u22CA',
Cap: '\u22D2',
doublecap: '\u22D2',
leftthreetimes: '\u22CB',
Cup: '\u22D3',
doublecup: '\u22D3',
rightthreetimes: '\u22CC',
barwedge: '\u22BC',
curlywedge: '\u22CF',
veebar: '\u22BB',
curlyvee: '\u22CE',
doublebarwedge: '\u2A5E',
boxminus: '\u229F',
circleddash: '\u229D',
boxtimes: '\u22A0',
circledast: '\u229B',
boxdot: '\u22A1',
circledcirc: '\u229A',
boxplus: '\u229E',
centerdot: ['\u22C5', { variantForm: true }],
divideontimes: '\u22C7',
intercal: '\u22BA',
leqq: '\u2266',
geqq: '\u2267',
leqslant: '\u2A7D',
geqslant: '\u2A7E',
eqslantless: '\u2A95',
eqslantgtr: '\u2A96',
lesssim: '\u2272',
gtrsim: '\u2273',
lessapprox: '\u2A85',
gtrapprox: '\u2A86',
approxeq: '\u224A',
lessdot: '\u22D6',
gtrdot: '\u22D7',
lll: '\u22D8',
llless: '\u22D8',
ggg: '\u22D9',
gggtr: '\u22D9',
lessgtr: '\u2276',
gtrless: '\u2277',
lesseqgtr: '\u22DA',
gtreqless: '\u22DB',
lesseqqgtr: '\u2A8B',
gtreqqless: '\u2A8C',
doteqdot: '\u2251',
Doteq: '\u2251',
eqcirc: '\u2256',
risingdotseq: '\u2253',
circeq: '\u2257',
fallingdotseq: '\u2252',
triangleq: '\u225C',
backsim: '\u223D',
thicksim: ['\u223C', { variantForm: true }],
backsimeq: '\u22CD',
thickapprox: ['\u2248', { variantForm: true }],
subseteqq: '\u2AC5',
supseteqq: '\u2AC6',
Subset: '\u22D0',
Supset: '\u22D1',
sqsubset: '\u228F',
sqsupset: '\u2290',
preccurlyeq: '\u227C',
succcurlyeq: '\u227D',
curlyeqprec: '\u22DE',
curlyeqsucc: '\u22DF',
precsim: '\u227E',
succsim: '\u227F',
precapprox: '\u2AB7',
succapprox: '\u2AB8',
vartriangleleft: '\u22B2',
lhd: '\u22B2',
vartriangleright: '\u22B3',
rhd: '\u22B3',
trianglelefteq: '\u22B4',
unlhd: '\u22B4',
trianglerighteq: '\u22B5',
unrhd: '\u22B5',
vDash: '\u22A8',
Vdash: '\u22A9',
Vvdash: '\u22AA',
smallsmile: ['\u2323', { variantForm: true }],
shortmid: ['\u2223', { variantForm: true }],
smallfrown: ['\u2322', { variantForm: true }],
shortparallel: ['\u2225', { variantForm: true }],
bumpeq: '\u224F',
between: '\u226C',
Bumpeq: '\u224E',
pitchfork: '\u22D4',
varpropto: ['\u221D', { variantForm: true }],
backepsilon: '\u220D',
blacktriangleleft: '\u25C2',
blacktriangleright: '\u25B8',
therefore: '\u2234',
because: '\u2235',
eqsim: '\u2242',
vartriangle: ['\u25B3', { variantForm: true }],
Join: '\u22C8',
nless: '\u226E',
ngtr: '\u226F',
nleq: '\u2270',
ngeq: '\u2271',
nleqslant: ['\u2A87', { variantForm: true }],
ngeqslant: ['\u2A88', { variantForm: true }],
nleqq: ['\u2270', { variantForm: true }],
ngeqq: ['\u2271', { variantForm: true }],
lneq: '\u2A87',
gneq: '\u2A88',
lneqq: '\u2268',
gneqq: '\u2269',
lvertneqq: ['\u2268', { variantForm: true }],
gvertneqq: ['\u2269', { variantForm: true }],
lnsim: '\u22E6',
gnsim: '\u22E7',
lnapprox: '\u2A89',
gnapprox: '\u2A8A',
nprec: '\u2280',
nsucc: '\u2281',
npreceq: ['\u22E0', { variantForm: true }],
nsucceq: ['\u22E1', { variantForm: true }],
precneqq: '\u2AB5',
succneqq: '\u2AB6',
precnsim: '\u22E8',
succnsim: '\u22E9',
precnapprox: '\u2AB9',
succnapprox: '\u2ABA',
nsim: '\u2241',
ncong: '\u2247',
nshortmid: ['\u2224', { variantForm: true }],
nshortparallel: ['\u2226', { variantForm: true }],
nmid: '\u2224',
nparallel: '\u2226',
nvdash: '\u22AC',
nvDash: '\u22AD',
nVdash: '\u22AE',
nVDash: '\u22AF',
ntriangleleft: '\u22EA',
ntriangleright: '\u22EB',
ntrianglelefteq: '\u22EC',
ntrianglerighteq: '\u22ED',
nsubseteq: '\u2288',
nsupseteq: '\u2289',
nsubseteqq: ['\u2288', { variantForm: true }],
nsupseteqq: ['\u2289', { variantForm: true }],
subsetneq: '\u228A',
supsetneq: '\u228B',
varsubsetneq: ['\u228A', { variantForm: true }],
varsupsetneq: ['\u228B', { variantForm: true }],
subsetneqq: '\u2ACB',
supsetneqq: '\u2ACC',
varsubsetneqq: ['\u2ACB', { variantForm: true }],
varsupsetneqq: ['\u2ACC', { variantForm: true }],
leftleftarrows: '\u21C7',
rightrightarrows: '\u21C9',
leftrightarrows: '\u21C6',
rightleftarrows: '\u21C4',
Lleftarrow: '\u21DA',
Rrightarrow: '\u21DB',
twoheadleftarrow: '\u219E',
twoheadrightarrow: '\u21A0',
leftarrowtail: '\u21A2',
rightarrowtail: '\u21A3',
looparrowleft: '\u21AB',
looparrowright: '\u21AC',
leftrightharpoons: '\u21CB',
rightleftharpoons: ['\u21CC', { variantForm: true }],
curvearrowleft: '\u21B6',
curvearrowright: '\u21B7',
circlearrowleft: '\u21BA',
circlearrowright: '\u21BB',
Lsh: '\u21B0',
Rsh: '\u21B1',
upuparrows: '\u21C8',
downdownarrows: '\u21CA',
upharpoonleft: '\u21BF',
upharpoonright: '\u21BE',
downharpoonleft: '\u21C3',
restriction: '\u21BE',
multimap: '\u22B8',
downharpoonright: '\u21C2',
leftrightsquigarrow: '\u21AD',
rightsquigarrow: '\u21DD',
leadsto: '\u21DD',
dashrightarrow: '\u21E2',
dashleftarrow: '\u21E0',
nleftarrow: '\u219A',
nrightarrow: '\u219B',
nLeftarrow: '\u21CD',
nRightarrow: '\u21CF',
nleftrightarrow: '\u21AE',
nLeftrightarrow: '\u21CE',
});
new DelimiterMap('AMSsymbols-delimiter', tex_ParseMethods.delimiter, {
'\\ulcorner': '\u231C',
'\\urcorner': '\u231D',
'\\llcorner': '\u231E',
'\\lrcorner': '\u231F',
});
new CommandMap('AMSsymbols-macros', {
implies: [AmsMethods.Macro, '\\;\\Longrightarrow\\;'],
impliedby: [AmsMethods.Macro, '\\;\\Longleftarrow\\;'],
});
//# sourceMappingURL=AmsMappings.js.map
;// ./mjs/input/tex/newcommand/NewcommandItems.js
class BeginEnvItem extends BaseItem {
get kind() {
return 'beginEnv';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('end')) {
if (item.getName() !== this.getName()) {
throw new tex_TexError('EnvBadEnd', '\\begin{%1} ended with \\end{%2}', this.getName(), item.getName());
}
return [[this.factory.create('mml', this.toMml())], true];
}
if (item.isKind('stop')) {
throw new tex_TexError('EnvMissingEnd', 'Missing \\end{%1}', this.getName());
}
return super.checkItem(item);
}
}
//# sourceMappingURL=NewcommandItems.js.map
;// ./mjs/input/tex/newcommand/NewcommandMethods.js
const NewcommandMethods = {
NewCommand(parser, name) {
const cs = NewcommandUtil.GetCsNameArgument(parser, name);
const n = NewcommandUtil.GetArgCount(parser, name);
const opt = parser.GetBrackets(name);
const def = parser.GetArgument(name);
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [def, n, opt]);
parser.Push(parser.itemFactory.create('null'));
},
NewEnvironment(parser, name) {
const env = UnitUtil.trimSpaces(parser.GetArgument(name));
const n = NewcommandUtil.GetArgCount(parser, name);
const opt = parser.GetBrackets(name);
const bdef = parser.GetArgument(name);
const edef = parser.GetArgument(name);
NewcommandUtil.addEnvironment(parser, env, NewcommandMethods.BeginEnv, [
true,
bdef,
edef,
n,
opt,
]);
parser.Push(parser.itemFactory.create('null'));
},
MacroDef(parser, name) {
const cs = NewcommandUtil.GetCSname(parser, name);
const params = NewcommandUtil.GetTemplate(parser, name, '\\' + cs);
const def = parser.GetArgument(name);
!(params instanceof Array)
?
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [
def,
params,
])
:
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.MacroWithTemplate, [def].concat(params));
parser.Push(parser.itemFactory.create('null'));
},
Let(parser, name) {
const cs = NewcommandUtil.GetCSname(parser, name);
let c = parser.GetNext();
if (c === '=') {
parser.i++;
c = parser.GetNext();
}
const handlers = parser.configuration.handlers;
parser.Push(parser.itemFactory.create('null'));
if (c === '\\') {
name = NewcommandUtil.GetCSname(parser, name);
if (cs === name) {
return;
}
const map = handlers.get(HandlerType.MACRO).applicable(name);
if (map instanceof MacroMap) {
const macro = map.lookup(name);
NewcommandUtil.addMacro(parser, cs, macro.func, macro.args, macro.token);
return;
}
if (map instanceof CharacterMap && !(map instanceof DelimiterMap)) {
const macro = map.lookup(name);
const method = (p) => map.parser(p, macro);
NewcommandUtil.addMacro(parser, cs, method, [cs, macro.char]);
return;
}
const macro = handlers
.get(HandlerType.DELIMITER)
.lookup('\\' + name);
if (macro) {
NewcommandUtil.addDelimiter(parser, '\\' + cs, macro.char, macro.attributes);
return;
}
NewcommandUtil.checkProtectedMacros(parser, cs);
NewcommandUtil.undefineMacro(parser, cs);
NewcommandUtil.undefineDelimiter(parser, '\\' + cs);
return;
}
parser.i++;
const macro = handlers.get(HandlerType.DELIMITER).lookup(c);
if (macro) {
NewcommandUtil.addDelimiter(parser, '\\' + cs, macro.char, macro.attributes);
return;
}
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [c]);
},
MacroWithTemplate(parser, name, text, n, ...params) {
const argCount = parseInt(n, 10);
if (params.length) {
const args = [];
parser.GetNext();
if (params[0] && !NewcommandUtil.MatchParam(parser, params[0])) {
throw new tex_TexError('MismatchUseDef', "Use of %1 doesn't match its definition", name);
}
if (argCount) {
for (let i = 0; i < argCount; i++) {
args.push(NewcommandUtil.GetParameter(parser, name, params[i + 1]));
}
text = ParseUtil.substituteArgs(parser, args, text);
}
}
parser.string = ParseUtil.addArgs(parser, text, parser.string.slice(parser.i));
parser.i = 0;
ParseUtil.checkMaxMacros(parser);
},
BeginEnv(parser, begin, bdef, edef, n, def) {
const name = begin.getName();
if (parser.stack.env['closing'] === name) {
delete parser.stack.env['closing'];
const beginN = parser.stack.global['beginEnv'];
if (beginN) {
parser.stack.global['beginEnv']--;
if (edef) {
const rest = parser.string.slice(parser.i);
parser.string = ParseUtil.addArgs(parser, parser.string.substring(0, parser.i), edef);
parser.Parse();
parser.string = rest;
parser.i = 0;
}
}
return parser.itemFactory.create('end').setProperty('name', name);
}
if (n) {
const args = [];
if (def != null) {
const optional = parser.GetBrackets(`\\begin{${name}}`);
args.push(optional == null ? def : optional);
}
for (let i = args.length; i < n; i++) {
args.push(parser.GetArgument(`\\begin{${name}}`));
}
bdef = ParseUtil.substituteArgs(parser, args, bdef);
edef = ParseUtil.substituteArgs(parser, [], edef);
}
parser.string = ParseUtil.addArgs(parser, bdef, parser.string.slice(parser.i));
parser.i = 0;
parser.stack.global['beginEnv'] =
(parser.stack.global['beginEnv'] || 0) + 1;
return parser.itemFactory.create('beginEnv').setProperty('name', name);
},
Macro: base_BaseMethods.Macro,
};
/* harmony default export */ const newcommand_NewcommandMethods = (NewcommandMethods);
//# sourceMappingURL=NewcommandMethods.js.map
;// ./mjs/input/tex/newcommand/NewcommandMappings.js
new CommandMap('Newcommand-macros', {
newcommand: newcommand_NewcommandMethods.NewCommand,
renewcommand: newcommand_NewcommandMethods.NewCommand,
newenvironment: newcommand_NewcommandMethods.NewEnvironment,
renewenvironment: newcommand_NewcommandMethods.NewEnvironment,
def: newcommand_NewcommandMethods.MacroDef,
let: newcommand_NewcommandMethods.Let,
});
//# sourceMappingURL=NewcommandMappings.js.map
;// ./mjs/input/tex/newcommand/NewcommandConfiguration.js
function NewcommandConfig(_config, jax) {
if (jax.parseOptions.packageData.has('newcommand')) {
return;
}
jax.parseOptions.packageData.set('newcommand', {});
new DelimiterMap(NewcommandTables.NEW_DELIMITER, tex_ParseMethods.delimiter, {});
new CommandMap(NewcommandTables.NEW_COMMAND, {});
new EnvironmentMap(NewcommandTables.NEW_ENVIRONMENT, tex_ParseMethods.environment, {});
jax.parseOptions.handlers.add({
[HandlerType.CHARACTER]: [],
[HandlerType.DELIMITER]: [NewcommandTables.NEW_DELIMITER],
[HandlerType.MACRO]: [
NewcommandTables.NEW_DELIMITER,
NewcommandTables.NEW_COMMAND,
],
[HandlerType.ENVIRONMENT]: [NewcommandTables.NEW_ENVIRONMENT],
}, {}, NewcommandPriority);
}
const NewcommandConfiguration = Configuration.create('newcommand', {
[ConfigurationType.HANDLER]: {
macro: ['Newcommand-macros'],
},
[ConfigurationType.ITEMS]: {
[BeginEnvItem.prototype.kind]: BeginEnvItem,
},
[ConfigurationType.OPTIONS]: {
maxMacros: 1000,
protectedMacros: ['begingroupSandbox'],
},
[ConfigurationType.CONFIG]: NewcommandConfig,
});
//# sourceMappingURL=NewcommandConfiguration.js.map
;// ./mjs/input/tex/ams/AmsConfiguration.js
class AmsTags extends AbstractTags {
}
const AmsConfiguration = Configuration.create('ams', {
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['AMSmath-operatorLetter'],
[HandlerType.DELIMITER]: ['AMSsymbols-delimiter', 'AMSmath-delimiter'],
[HandlerType.MACRO]: [
'AMSsymbols-mathchar0mi',
'AMSsymbols-mathchar0mo',
'AMSsymbols-delimiter',
'AMSsymbols-macros',
'AMSmath-mathchar0mo',
'AMSmath-macros',
'AMSmath-delimiter',
],
[HandlerType.ENVIRONMENT]: ['AMSmath-environment'],
},
[ConfigurationType.ITEMS]: {
[MultlineItem.prototype.kind]: MultlineItem,
[FlalignItem.prototype.kind]: FlalignItem,
},
[ConfigurationType.TAGS]: { ams: AmsTags },
[ConfigurationType.OPTIONS]: {
multlineWidth: '',
ams: {
operatornamePattern: /^[-*a-zA-Z]+/,
multlineWidth: '100%',
multlineIndent: '1em',
},
},
[ConfigurationType.CONFIG]: NewcommandConfig,
});
//# sourceMappingURL=AmsConfiguration.js.map
;// ./components/mjs/startup/lib/components/startup.js
const startup_g = (typeof window !== 'undefined' ? window : global);
const startup_def = startup_g.MathJax._.components.startup;
const Startup = startup_def.Startup;
const startup_MathJax = startup_def.MathJax;
const CONFIG = startup_def.CONFIG;
;// ./components/mjs/startup/lib/components/package.js
const package_def = MathJax._.components.package;
const PackageError = package_def.PackageError;
const Package = package_def.Package;
;// ./components/mjs/startup/lib/components/loader.js
const loader_g = (typeof window !== 'undefined' ? window : global);
const loader_def = loader_g.MathJax._.components.loader;
const PathFilters = loader_def.PathFilters;
const Loader = loader_def.Loader;
const loader_MathJax = loader_def.MathJax;
const loader_CONFIG = loader_def.CONFIG;
;// ./components/mjs/core/lib/mathjax.js
const mathjax_def = MathJax._.mathjax;
const mathjax = mathjax_def.mathjax;
;// ./mjs/input/tex/require/RequireConfiguration.js
const MJCONFIG = startup_MathJax.config;
function RegisterExtension(jax, name) {
const require = jax.parseOptions.options.require;
const required = jax.parseOptions.packageData.get('require')
.required;
const extension = name.substring(require.prefix.length);
if (!required.includes(extension)) {
required.push(extension);
const retry = RegisterDependencies(jax, loader_CONFIG.dependencies[name]);
if (retry) {
mathjax.retryAfter(retry.then(() => ProcessExtension(jax, name, extension)));
}
else {
ProcessExtension(jax, name, extension);
}
}
}
function ProcessExtension(jax, name, extension) {
const handler = ConfigurationHandler.get(extension);
if (handler) {
let options = MJCONFIG[name] || {};
if (handler.options &&
Object.keys(handler.options).length === 1 &&
handler.options[extension]) {
options = { [extension]: options };
}
jax.configuration.add(extension, jax, options);
const configured = jax.parseOptions.packageData.get('require').configured;
if (handler.preprocessors.length && !configured.has(extension)) {
configured.set(extension, true);
mathjax.retryAfter(Promise.resolve());
}
}
}
function RegisterDependencies(jax, names = []) {
const prefix = jax.parseOptions.options.require.prefix;
const retries = [];
for (const name of names) {
if (name.substring(0, prefix.length) === prefix) {
try {
RegisterExtension(jax, name);
}
catch (err) {
if (!err.retry)
throw err;
retries.push(err.retry);
}
}
}
return retries.length ? Promise.all(retries) : null;
}
function RequireLoad(parser, name) {
var _a, _b;
const options = parser.options.require;
const allow = options.allow;
const extension = (name.substring(0, 1) === '[' ? '' : options.prefix) + name;
const allowed = Object.hasOwn(allow, extension)
? allow[extension]
: Object.hasOwn(allow, name)
? allow[name]
: options.defaultAllow;
if (!allowed) {
throw new tex_TexError('BadRequire', 'Extension "%1" is not allowed to be loaded', extension);
}
const data = Package.packages.get(extension);
if (!data) {
mathjax.retryAfter(Loader.load(extension).catch((_) => { }));
}
if (data.hasFailed) {
throw new tex_TexError('RequireFail', 'Extension "%1" failed to load', name);
}
const require = (_a = loader_CONFIG[extension]) === null || _a === void 0 ? void 0 : _a.rendererExtensions;
const menu = (_b = startup_MathJax.startup.document) === null || _b === void 0 ? void 0 : _b.menu;
if (require && menu) {
menu.addRequiredExtensions(require);
}
RegisterExtension(parser.configuration.packageData.get('require').jax, extension);
}
function config(_config, jax) {
jax.parseOptions.packageData.set('require', {
jax: jax,
required: [...jax.options.packages],
configured: new Map()
});
const options = jax.parseOptions.options.require;
const prefix = options.prefix;
if (prefix.match(/[^_a-zA-Z0-9]/)) {
throw Error('Illegal characters used in \\require prefix');
}
if (!loader_CONFIG.paths[prefix]) {
loader_CONFIG.paths[prefix] = '[mathjax]/input/tex/extensions';
}
options.prefix = '[' + prefix + ']/';
}
const RequireMethods = {
Require(parser, name) {
const required = parser.GetArgument(name);
if (required.match(/[^_a-zA-Z0-9]/) || required === '') {
throw new tex_TexError('BadPackageName', 'Argument for %1 is not a valid package name', name);
}
RequireLoad(parser, required);
parser.Push(parser.itemFactory.create('null'));
},
};
const RequireConfiguration_options = {
require: {
allow: expandable({
base: false,
autoload: false,
configmacros: false,
tagformat: false,
setoptions: false,
texhtml: false,
}),
defaultAllow: true,
prefix: 'tex',
},
};
new CommandMap('require', { require: RequireMethods.Require });
const RequireConfiguration = Configuration.create('require', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['require'],
},
[ConfigurationType.CONFIG]: config,
[ConfigurationType.OPTIONS]: RequireConfiguration_options,
});
//# sourceMappingURL=RequireConfiguration.js.map
;// ./mjs/input/tex/autoload/AutoloadConfiguration.js
function Autoload(parser, name, extension, isMacro) {
if (Package.packages.has(parser.options.require.prefix + extension)) {
const def = parser.options.autoload[extension];
const [macros, envs] = def.length === 2 && Array.isArray(def[0]) ? def : [def, []];
for (const macro of macros) {
AutoloadMacros.remove(macro);
}
for (const env of envs) {
AutoloadEnvironments.remove(env);
}
parser.string =
(isMacro ? name + ' ' : '\\begin{' + name.slice(1) + '}') +
parser.string.slice(parser.i);
parser.i = 0;
}
RequireLoad(parser, extension);
}
function initAutoload(config) {
if (!config.options.require) {
defaultOptions(config.options, RequireConfiguration.options);
}
}
function configAutoload(config, jax) {
const parser = jax.parseOptions;
const macros = parser.handlers.get(HandlerType.MACRO);
const environments = parser.handlers.get(HandlerType.ENVIRONMENT);
const autoload = parser.options.autoload;
parser.packageData.set('autoload', { Autoload });
for (const extension of Object.keys(autoload)) {
const def = autoload[extension];
const [macs, envs] = def.length === 2 && Array.isArray(def[0]) ? def : [def, []];
for (const name of macs) {
if (!macros.lookup(name) || name === 'color') {
AutoloadMacros.add(name, new Macro(name, Autoload, [extension, true]));
}
}
for (const name of envs) {
if (!environments.lookup(name)) {
AutoloadEnvironments.add(name, new Macro(name, Autoload, [extension, false]));
}
}
}
if (!parser.packageData.get('require')) {
RequireConfiguration.config(config, jax);
}
}
const AutoloadMacros = new CommandMap('autoload-macros', {});
const AutoloadEnvironments = new CommandMap('autoload-environments', {});
const AutoloadConfiguration = Configuration.create('autoload', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['autoload-macros'],
[HandlerType.ENVIRONMENT]: ['autoload-environments'],
},
[ConfigurationType.OPTIONS]: {
autoload: expandable({
action: ['toggle', 'mathtip', 'texttip'],
amscd: [[], ['CD']],
bbox: ['bbox'],
boldsymbol: ['boldsymbol'],
braket: [
'bra',
'ket',
'braket',
'set',
'Bra',
'Ket',
'Braket',
'Set',
'ketbra',
'Ketbra',
],
bussproofs: [[], ['prooftree']],
cancel: ['cancel', 'bcancel', 'xcancel', 'cancelto'],
color: ['color', 'definecolor', 'textcolor', 'colorbox', 'fcolorbox'],
enclose: ['enclose'],
extpfeil: [
'xtwoheadrightarrow',
'xtwoheadleftarrow',
'xmapsto',
'xlongequal',
'xtofrom',
'Newextarrow',
],
html: ['data', 'href', 'class', 'style', 'cssId'],
mhchem: ['ce', 'pu'],
newcommand: [
'newcommand',
'renewcommand',
'newenvironment',
'renewenvironment',
'def',
'let',
],
unicode: ['unicode', 'U', 'char'],
verb: ['verb'],
}),
},
[ConfigurationType.CONFIG]: configAutoload,
[ConfigurationType.INIT]: initAutoload,
[ConfigurationType.PRIORITY]: 10,
});
//# sourceMappingURL=AutoloadConfiguration.js.map
;// ./mjs/input/tex/configmacros/ConfigMacrosConfiguration.js
const MACROSMAP = 'configmacros-map';
const ACTIVEMAP = 'configmacros-active-map';
const ENVIRONMENTMAP = 'configmacros-env-map';
function configmacrosInit(config) {
new MacroMap(ACTIVEMAP, {});
new CommandMap(MACROSMAP, {});
new EnvironmentMap(ENVIRONMENTMAP, tex_ParseMethods.environment, {});
config.append(Configuration.local({
handler: {
[HandlerType.CHARACTER]: [ACTIVEMAP],
[HandlerType.MACRO]: [MACROSMAP],
[HandlerType.ENVIRONMENT]: [ENVIRONMENTMAP],
},
priority: 3,
}));
}
function configmacrosConfig(_config, jax) {
configActives(jax);
configMacros(jax);
configEnvironments(jax);
}
function setMacros(name, map, jax) {
const handler = jax.parseOptions.handlers.retrieve(map);
const macros = jax.parseOptions.options[name];
for (const cs of Object.keys(macros)) {
const def = typeof macros[cs] === 'string' ? [macros[cs]] : macros[cs];
const macro = Array.isArray(def[2])
? new Macro(cs, newcommand_NewcommandMethods.MacroWithTemplate, def.slice(0, 2).concat(def[2]))
: new Macro(cs, newcommand_NewcommandMethods.Macro, def);
handler.add(cs, macro);
}
}
function configActives(jax) {
setMacros('active', ACTIVEMAP, jax);
}
function configMacros(jax) {
setMacros('macros', MACROSMAP, jax);
}
function configEnvironments(jax) {
const handler = jax.parseOptions.handlers.retrieve(ENVIRONMENTMAP);
const environments = jax.parseOptions.options.environments;
for (const env of Object.keys(environments)) {
handler.add(env, new Macro(env, newcommand_NewcommandMethods.BeginEnv, [true].concat(environments[env])));
}
}
const ConfigMacrosConfiguration = Configuration.create('configmacros', {
[ConfigurationType.INIT]: configmacrosInit,
[ConfigurationType.CONFIG]: configmacrosConfig,
[ConfigurationType.ITEMS]: {
[BeginEnvItem.prototype.kind]: BeginEnvItem,
},
[ConfigurationType.OPTIONS]: {
active: expandable({}),
macros: expandable({}),
environments: expandable({}),
},
});
//# sourceMappingURL=ConfigMacrosConfiguration.js.map
;// ./mjs/input/tex/noundefined/NoUndefinedConfiguration.js
function noUndefined(parser, name) {
const textNode = parser.create('text', '\\' + name);
const options = parser.options.noundefined;
const def = {};
for (const id of ['color', 'background', 'size']) {
if (options[id]) {
def['math' + id] = options[id];
}
}
parser.Push(parser.create('node', 'mtext', [], def, textNode));
}
const NoUndefinedConfiguration = Configuration.create('noundefined', {
[ConfigurationType.FALLBACK]: { [HandlerType.MACRO]: noUndefined },
[ConfigurationType.OPTIONS]: {
noundefined: {
color: 'red',
background: '',
size: '',
},
},
[ConfigurationType.PRIORITY]: 3,
});
//# sourceMappingURL=NoUndefinedConfiguration.js.map
;// ./mjs/input/tex/textmacros/TextParser.js
class TextParser extends TexParser {
get texParser() {
return this.configuration.packageData.get('textmacros').texParser;
}
get tags() {
return this.texParser.tags;
}
constructor(text, env, configuration, level) {
super(text, env, configuration);
this.level = level;
}
mml() {
this.copyLists();
this.configuration.popParser();
return this.level != null
? this.create('node', 'mstyle', this.nodes, {
displaystyle: false,
scriptlevel: this.level,
})
: this.nodes.length === 1
? this.nodes[0]
: this.create('node', 'mrow', this.nodes);
}
copyLists() {
const parseOptions = this.texParser.configuration;
for (const [name, list] of Object.entries(this.configuration.nodeLists)) {
for (const node of list) {
parseOptions.addNode(name, node);
}
}
this.configuration.nodeLists = {};
}
Parse() {
this.text = '';
this.nodes = [];
this.envStack = [];
super.Parse();
}
saveText() {
if (this.text) {
const mathvariant = this.stack.env.mathvariant;
const text = ParseUtil.internalText(this, this.text, mathvariant ? { mathvariant } : {});
this.text = '';
this.Push(text);
}
}
Push(mml) {
if (this.text) {
this.saveText();
}
if (mml instanceof StopItem) {
return super.Push(mml);
}
if (mml instanceof StyleItem) {
this.stack.env.mathcolor = this.stack.env.color;
return;
}
if (mml instanceof AbstractMmlNode) {
this.addAttributes(mml);
this.nodes.push(mml);
}
}
PushMath(mml) {
const env = this.stack.env;
for (const name of ['mathsize', 'mathcolor']) {
if (env[name] && !mml.attributes.hasExplicit(name)) {
if (!mml.isToken && !mml.isKind('mstyle')) {
mml = this.create('node', 'mstyle', [mml]);
}
tex_NodeUtil.setAttribute(mml, name, env[name]);
}
}
if (mml.isInferred) {
mml = this.create('node', 'mrow', mml.childNodes);
}
if (!mml.isKind('TeXAtom')) {
mml = this.create('node', 'TeXAtom', [mml]);
}
this.nodes.push(mml);
}
addAttributes(mml) {
const env = this.stack.env;
if (!mml.isToken)
return;
for (const name of ['mathsize', 'mathcolor', 'mathvariant']) {
if (env[name] && !mml.attributes.hasExplicit(name)) {
tex_NodeUtil.setAttribute(mml, name, env[name]);
}
}
}
ParseTextArg(name, env) {
const text = this.GetArgument(name);
env = Object.assign(Object.assign({}, this.stack.env), env);
return new TextParser(text, env, this.configuration).mml();
}
ParseArg(name) {
return new TextParser(this.GetArgument(name), this.stack.env, this.configuration).mml();
}
Error(id, message, ...args) {
throw new tex_TexError(id, message, ...args);
}
}
//# sourceMappingURL=TextParser.js.map
;// ./components/mjs/core/lib/util/Retries.js
const Retries_def = MathJax._.util.Retries;
const handleRetriesFor = Retries_def.handleRetriesFor;
const retryAfter = Retries_def.retryAfter;
;// ./mjs/input/tex/textmacros/TextMacrosMethods.js
const TextMacrosMethods = {
Comment(parser, _c) {
while (parser.i < parser.string.length &&
parser.string.charAt(parser.i) !== '\n') {
parser.i++;
}
parser.i++;
},
Math(parser, open) {
parser.saveText();
const i = parser.i;
let j, c;
let braces = 0;
while ((c = parser.GetNext())) {
j = parser.i++;
switch (c) {
case '\\': {
const cs = parser.GetCS();
if (cs === ')')
c = '\\(';
}
case '$':
if (braces === 0 && open === c) {
const config = parser.texParser.configuration;
const mml = new TexParser(parser.string.substring(i, j), parser.stack.env, config).mml();
parser.PushMath(mml);
return;
}
break;
case '{':
braces++;
break;
case '}':
if (braces === 0) {
parser.Error('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
braces--;
break;
}
}
parser.Error('MathNotTerminated', 'Math mode is not properly terminated');
},
MathModeOnly(parser, c) {
parser.Error('MathModeOnly', "'%1' allowed only in math mode", c);
},
Misplaced(parser, c) {
parser.Error('Misplaced', "Misplaced '%1'", c);
},
OpenBrace(parser, _c) {
const env = parser.stack.env;
parser.envStack.push(env);
parser.stack.env = Object.assign({}, env);
},
CloseBrace(parser, _c) {
if (parser.envStack.length) {
parser.saveText();
parser.stack.env = parser.envStack.pop();
}
else {
parser.Error('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
},
OpenQuote(parser, c) {
if (parser.string.charAt(parser.i) === c) {
parser.text += '\u201C';
parser.i++;
}
else {
parser.text += '\u2018';
}
},
CloseQuote(parser, c) {
if (parser.string.charAt(parser.i) === c) {
parser.text += '\u201D';
parser.i++;
}
else {
parser.text += '\u2019';
}
},
Tilde(parser, _c) {
parser.text += '\u00A0';
},
Space(parser, _c) {
parser.text += ' ';
parser.GetNext();
},
SelfQuote(parser, name) {
parser.text += name.substring(1);
},
Insert(parser, _name, c) {
parser.text += c;
},
Accent(parser, name, c) {
const base = parser.ParseArg(name);
const accent = parser.create('token', 'mo', {}, c);
parser.addAttributes(accent);
parser.Push(parser.create('node', 'mover', [base, accent]));
},
Emph(parser, name) {
const variant = parser.stack.env.mathvariant === '-tex-mathit' ? 'normal' : '-tex-mathit';
parser.Push(parser.ParseTextArg(name, { mathvariant: variant }));
},
TextFont(parser, name, variant) {
parser.saveText();
parser.Push(parser.ParseTextArg(name, { mathvariant: variant }));
},
SetFont(parser, _name, variant) {
parser.saveText();
parser.stack.env.mathvariant = variant;
},
SetSize(parser, _name, size) {
parser.saveText();
parser.stack.env.mathsize = size;
},
CheckAutoload(parser, name) {
const autoload = parser.configuration.packageData.get('autoload');
const texParser = parser.texParser;
name = name.slice(1);
const macro = texParser.lookup(HandlerType.MACRO, name);
if (!macro || (autoload && macro._func === autoload.Autoload)) {
texParser.parse(HandlerType.MACRO, [texParser, name]);
if (!macro)
return;
retryAfter(Promise.resolve());
}
texParser.parse(HandlerType.MACRO, [parser, name]);
},
Macro: base_BaseMethods.Macro,
Spacer: base_BaseMethods.Spacer,
Hskip: base_BaseMethods.Hskip,
rule: base_BaseMethods.rule,
Rule: base_BaseMethods.Rule,
HandleRef: base_BaseMethods.HandleRef,
UnderOver: base_BaseMethods.UnderOver,
Lap: base_BaseMethods.Lap,
Phantom: base_BaseMethods.Phantom,
Smash: base_BaseMethods.Smash,
MmlToken: base_BaseMethods.MmlToken,
};
//# sourceMappingURL=TextMacrosMethods.js.map
;// ./mjs/input/tex/textmacros/TextMacrosMappings.js
const TextMacrosMappings_VARIANT = TexConstant.Variant;
new MacroMap('text-special', {
$: TextMacrosMethods.Math,
'%': TextMacrosMethods.Comment,
'^': TextMacrosMethods.MathModeOnly,
_: TextMacrosMethods.MathModeOnly,
'&': TextMacrosMethods.Misplaced,
'#': TextMacrosMethods.Misplaced,
'~': TextMacrosMethods.Tilde,
' ': TextMacrosMethods.Space,
'\t': TextMacrosMethods.Space,
'\r': TextMacrosMethods.Space,
'\n': TextMacrosMethods.Space,
'\u00A0': TextMacrosMethods.Tilde,
'{': TextMacrosMethods.OpenBrace,
'}': TextMacrosMethods.CloseBrace,
'`': TextMacrosMethods.OpenQuote,
"'": TextMacrosMethods.CloseQuote,
});
new CommandMap('text-macros', {
'(': TextMacrosMethods.Math,
$: TextMacrosMethods.SelfQuote,
_: TextMacrosMethods.SelfQuote,
'%': TextMacrosMethods.SelfQuote,
'{': TextMacrosMethods.SelfQuote,
'}': TextMacrosMethods.SelfQuote,
' ': TextMacrosMethods.SelfQuote,
'&': TextMacrosMethods.SelfQuote,
'#': TextMacrosMethods.SelfQuote,
'\\': [TextMacrosMethods.Macro, '$\\\\$'],
"'": [TextMacrosMethods.Accent, '\u00B4'],
'\u2019': [TextMacrosMethods.Accent, '\u00B4'],
'`': [TextMacrosMethods.Accent, '\u0060'],
'\u2018': [TextMacrosMethods.Accent, '\u0060'],
'^': [TextMacrosMethods.Accent, '^'],
'"': [TextMacrosMethods.Accent, '\u00A8'],
'~': [TextMacrosMethods.Accent, '~'],
'=': [TextMacrosMethods.Accent, '\u00AF'],
'.': [TextMacrosMethods.Accent, '\u02D9'],
u: [TextMacrosMethods.Accent, '\u02D8'],
v: [TextMacrosMethods.Accent, '\u02C7'],
emph: TextMacrosMethods.Emph,
rm: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.NORMAL],
mit: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.ITALIC],
oldstyle: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.OLDSTYLE],
cal: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.CALLIGRAPHIC],
it: [TextMacrosMethods.SetFont, '-tex-mathit'],
bf: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.BOLD],
sf: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.SANSSERIF],
tt: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.MONOSPACE],
frak: [TextMacrosMethods.TextFont, TextMacrosMappings_VARIANT.FRAKTUR],
Bbb: [TextMacrosMethods.TextFont, TextMacrosMappings_VARIANT.DOUBLESTRUCK],
tiny: [TextMacrosMethods.SetSize, 0.5],
Tiny: [TextMacrosMethods.SetSize, 0.6],
scriptsize: [TextMacrosMethods.SetSize, 0.7],
small: [TextMacrosMethods.SetSize, 0.85],
normalsize: [TextMacrosMethods.SetSize, 1.0],
large: [TextMacrosMethods.SetSize, 1.2],
Large: [TextMacrosMethods.SetSize, 1.44],
LARGE: [TextMacrosMethods.SetSize, 1.73],
huge: [TextMacrosMethods.SetSize, 2.07],
Huge: [TextMacrosMethods.SetSize, 2.49],
textnormal: [TextMacrosMethods.Macro, '{\\rm #1}', 1],
textup: [TextMacrosMethods.Macro, '{\\rm #1}', 1],
textrm: [TextMacrosMethods.Macro, '{\\rm #1}', 1],
textit: [TextMacrosMethods.Macro, '{\\it #1}', 1],
textbf: [TextMacrosMethods.Macro, '{\\bf #1}', 1],
textsf: [TextMacrosMethods.Macro, '{\\sf #1}', 1],
texttt: [TextMacrosMethods.Macro, '{\\tt #1}', 1],
dagger: [TextMacrosMethods.Insert, '\u2020'],
ddagger: [TextMacrosMethods.Insert, '\u2021'],
S: [TextMacrosMethods.Insert, '\u00A7'],
AA: [TextMacrosMethods.Insert, '\u212B'],
ldots: [TextMacrosMethods.Insert, '\u2026'],
vdots: [TextMacrosMethods.Insert, '\u22EE'],
',': [TextMacrosMethods.Spacer, MATHSPACE.thinmathspace],
':': [TextMacrosMethods.Spacer, MATHSPACE.mediummathspace],
'>': [TextMacrosMethods.Spacer, MATHSPACE.mediummathspace],
';': [TextMacrosMethods.Spacer, MATHSPACE.thickmathspace],
'!': [TextMacrosMethods.Spacer, MATHSPACE.negativethinmathspace],
enspace: [TextMacrosMethods.Spacer, 0.5],
quad: [TextMacrosMethods.Spacer, 1],
qquad: [TextMacrosMethods.Spacer, 2],
thinspace: [TextMacrosMethods.Spacer, MATHSPACE.thinmathspace],
negthinspace: [TextMacrosMethods.Spacer, MATHSPACE.negativethinmathspace],
hskip: TextMacrosMethods.Hskip,
hspace: TextMacrosMethods.Hskip,
kern: TextMacrosMethods.Hskip,
mskip: TextMacrosMethods.Hskip,
mspace: TextMacrosMethods.Hskip,
mkern: TextMacrosMethods.Hskip,
rule: TextMacrosMethods.rule,
Rule: [TextMacrosMethods.Rule],
Space: [TextMacrosMethods.Rule, 'blank'],
color: TextMacrosMethods.CheckAutoload,
textcolor: TextMacrosMethods.CheckAutoload,
colorbox: TextMacrosMethods.CheckAutoload,
fcolorbox: TextMacrosMethods.CheckAutoload,
href: TextMacrosMethods.CheckAutoload,
style: TextMacrosMethods.CheckAutoload,
class: TextMacrosMethods.CheckAutoload,
data: TextMacrosMethods.CheckAutoload,
cssId: TextMacrosMethods.CheckAutoload,
unicode: TextMacrosMethods.CheckAutoload,
U: TextMacrosMethods.CheckAutoload,
char: TextMacrosMethods.CheckAutoload,
ref: [TextMacrosMethods.HandleRef, false],
eqref: [TextMacrosMethods.HandleRef, true],
underline: [TextMacrosMethods.UnderOver, '2015'],
llap: TextMacrosMethods.Lap,
rlap: TextMacrosMethods.Lap,
phantom: TextMacrosMethods.Phantom,
vphantom: [TextMacrosMethods.Phantom, 1, 0],
hphantom: [TextMacrosMethods.Phantom, 0, 1],
smash: TextMacrosMethods.Smash,
mmlToken: TextMacrosMethods.MmlToken,
});
//# sourceMappingURL=TextMacrosMappings.js.map
;// ./mjs/input/tex/textmacros/TextMacrosConfiguration.js
const TextBaseConfiguration = Configuration.create('text-base', {
[ConfigurationType.PARSER]: 'text',
[ConfigurationType.PRIORITY]: 1,
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['command', 'text-special'],
[HandlerType.MACRO]: ['text-macros'],
},
[ConfigurationType.FALLBACK]: {
[HandlerType.CHARACTER]: (parser, c) => {
parser.text += c;
},
[HandlerType.MACRO]: (parser, name) => {
const texParser = parser.texParser;
const macro = texParser.lookup(HandlerType.MACRO, name);
if (macro && macro._func !== TextMacrosMethods.Macro) {
parser.Error('MathMacro', '%1 is only supported in math mode', '\\' + name);
}
texParser.parse(HandlerType.MACRO, [parser, name]);
},
},
[ConfigurationType.ITEMS]: {
[StartItem.prototype.kind]: StartItem,
[StopItem.prototype.kind]: StopItem,
[MmlItem.prototype.kind]: MmlItem,
[StyleItem.prototype.kind]: StyleItem,
},
});
function internalMath(parser, text, level, mathvariant) {
const config = parser.configuration.packageData.get('textmacros');
if (!(parser instanceof TextParser)) {
config.texParser = parser;
}
config.parseOptions.clear();
return [
new TextParser(text, mathvariant ? { mathvariant } : {}, config.parseOptions, level).mml(),
];
}
const TextMacrosConfiguration = Configuration.create('textmacros', {
[ConfigurationType.PRIORITY]: 1,
[ConfigurationType.CONFIG]: (_config, jax) => {
const textConf = new ParserConfiguration(jax.parseOptions.options.textmacros.packages, ['tex', 'text']);
textConf.init();
const parseOptions = new tex_ParseOptions(textConf, []);
parseOptions.options = jax.parseOptions.options;
textConf.config(jax);
TagsFactory.addTags(textConf.tags);
parseOptions.tags = TagsFactory.getDefault();
parseOptions.tags.configuration = parseOptions;
parseOptions.packageData = jax.parseOptions.packageData;
parseOptions.packageData.set('textmacros', {
textConf,
parseOptions,
jax,
texParser: null,
});
parseOptions.options.internalMath = internalMath;
},
[ConfigurationType.PREPROCESSORS]: [
(data) => {
const config = data.data.packageData.get('textmacros');
config.parseOptions.nodeFactory.setMmlFactory(config.jax.mmlFactory);
},
],
[ConfigurationType.OPTIONS]: {
textmacros: {
packages: ['text-base'],
},
},
});
//# sourceMappingURL=TextMacrosConfiguration.js.map
;// ./components/mjs/input/tex/lib/tex.js
if (MathJax.loader) {
MathJax.loader.checkVersion('input/tex', VERSION, 'input');
}
combineWithMathJax({_: {
input: {
tex_ts: tex_namespaceObject,
tex: {
ColumnParser: ColumnParser_namespaceObject,
Configuration: Configuration_namespaceObject,
FilterUtil: FilterUtil_namespaceObject,
FindTeX: FindTeX_namespaceObject,
HandlerTypes: HandlerTypes_namespaceObject,
MapHandler: MapHandler_namespaceObject,
NodeFactory: NodeFactory_namespaceObject,
NodeUtil: NodeUtil_namespaceObject,
ParseMethods: ParseMethods_namespaceObject,
ParseOptions: ParseOptions_namespaceObject,
ParseUtil: ParseUtil_namespaceObject,
Stack: Stack_namespaceObject,
StackItem: StackItem_namespaceObject,
StackItemFactory: StackItemFactory_namespaceObject,
Tags: Tags_namespaceObject,
TexConstants: TexConstants_namespaceObject,
TexError: TexError_namespaceObject,
TexParser: TexParser_namespaceObject,
Token: Token_namespaceObject,
TokenMap: TokenMap_namespaceObject,
UnitUtil: UnitUtil_namespaceObject,
ams: {
AmsConfiguration: AmsConfiguration_namespaceObject,
AmsItems: AmsItems_namespaceObject,
AmsMethods: AmsMethods_namespaceObject
},
autoload: {
AutoloadConfiguration: AutoloadConfiguration_namespaceObject
},
base: {
BaseConfiguration: BaseConfiguration_namespaceObject,
BaseItems: BaseItems_namespaceObject,
BaseMethods: BaseMethods_namespaceObject
},
configmacros: {
ConfigMacrosConfiguration: ConfigMacrosConfiguration_namespaceObject
},
newcommand: {
NewcommandConfiguration: NewcommandConfiguration_namespaceObject,
NewcommandItems: NewcommandItems_namespaceObject,
NewcommandMethods: NewcommandMethods_namespaceObject,
NewcommandUtil: NewcommandUtil_namespaceObject
},
noundefined: {
NoUndefinedConfiguration: NoUndefinedConfiguration_namespaceObject
},
require: {
RequireConfiguration: RequireConfiguration_namespaceObject
},
textmacros: {
TextMacrosConfiguration: TextMacrosConfiguration_namespaceObject,
TextMacrosMethods: TextMacrosMethods_namespaceObject,
TextParser: TextParser_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/register.js
function registerTeX(packageList = [], tex = true) {
if (MathJax.startup) {
if (tex) {
MathJax.startup.registerConstructor('tex', MathJax._.input.tex_ts.TeX);
MathJax.startup.useInput('tex');
}
if (!MathJax.config.tex) {
MathJax.config.tex = {};
}
let packages = MathJax.config.tex.packages;
MathJax.config.tex.packages = packageList;
if (packages) {
if (Array.isArray(packages)) {
packages = {'[+]': packages.filter((name) => !packageList.includes(name))};
}
insert(MathJax.config.tex, {packages});
}
}
}
;// ./components/mjs/input/tex/tex.js
Loader.preLoaded(
'input/tex-base',
'[tex]/ams',
'[tex]/newcommand',
'[tex]/textmacros',
'[tex]/noundefined',
'[tex]/require',
'[tex]/autoload',
'[tex]/configmacros'
);
registerTeX([
'base',
'ams',
'newcommand',
'textmacros',
'noundefined',
'require',
'autoload',
'configmacros'
]);
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/ 0000755 0001762 0000144 00000000000 15113345752 017213 5 ustar ligges users mathjaxr/inst/doc/mathjax/input/tex/extensions/ 0000755 0001762 0000144 00000000000 15112352677 021415 5 ustar ligges users mathjaxr/inst/doc/mathjax/input/tex/extensions/physics.js 0000644 0001762 0000144 00000126501 15112352664 023436 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/physics/PhysicsItems.js
var PhysicsItems_namespaceObject = {};
__webpack_require__.r(PhysicsItems_namespaceObject);
__webpack_require__.d(PhysicsItems_namespaceObject, {
AutoOpen: () => (AutoOpen)
});
// NAMESPACE OBJECT: ./mjs/input/tex/physics/PhysicsMethods.js
var PhysicsMethods_namespaceObject = {};
__webpack_require__.r(PhysicsMethods_namespaceObject);
__webpack_require__.d(PhysicsMethods_namespaceObject, {
"default": () => (physics_PhysicsMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/physics/PhysicsConfiguration.js
var PhysicsConfiguration_namespaceObject = {};
__webpack_require__.r(PhysicsConfiguration_namespaceObject);
__webpack_require__.d(PhysicsConfiguration_namespaceObject, {
PhysicsConfiguration: () => (PhysicsConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/StackItem.js
const StackItem_def = MathJax._.input.tex.StackItem;
const MmlStack = StackItem_def.MmlStack;
const BaseItem = StackItem_def.BaseItem;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexParser.js
const TexParser_def = MathJax._.input.tex.TexParser;
/* harmony default export */ const TexParser = (TexParser_def.default);
;// ./mjs/input/tex/physics/PhysicsItems.js
class AutoOpen extends BaseItem {
constructor() {
super(...arguments);
this.openCount = 0;
}
get kind() {
return 'auto open';
}
get isOpen() {
return true;
}
toMml(inferred = true, forceRow) {
if (!inferred) {
return super.toMml(inferred, forceRow);
}
const parser = this.factory.configuration.parser;
const right = this.getProperty('right');
if (this.getProperty('smash')) {
const mml = super.toMml();
const smash = parser.create('node', 'mpadded', [mml], {
height: 0,
depth: 0,
});
this.Clear();
this.Push(parser.create('node', 'TeXAtom', [smash]));
}
if (right) {
this.Push(new TexParser(right, parser.stack.env, parser.configuration).mml());
}
const mml = ParseUtil.fenced(this.factory.configuration, this.getProperty('open'), super.toMml(), this.getProperty('close'), this.getProperty('big'));
NodeUtil.removeProperties(mml, 'open', 'close', 'texClass');
return mml;
}
closing(fence) {
return fence === this.getProperty('close') && !this.openCount--;
}
checkItem(item) {
if (item.getProperty('pre-autoclose')) {
return BaseItem.fail;
}
if (item.getProperty('autoclose')) {
if (this.getProperty('ignore')) {
this.Clear();
return [[], true];
}
return [[this.toMml()], true];
}
if (item.isKind('mml') && item.Size() === 1) {
const mml = item.toMml();
if (mml.isKind('mo') &&
mml.getText() === this.getProperty('open')) {
this.openCount++;
}
}
return super.checkItem(item);
}
}
AutoOpen.errors = Object.assign(Object.create(BaseItem.errors), {
stop: ['ExtraOrMissingDelims', 'Extra open or missing close delimiter'],
});
//# sourceMappingURL=PhysicsItems.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/core/lib/core/MmlTree/MmlNode.js
const MmlNode_def = MathJax._.core.MmlTree.MmlNode;
const TEXCLASS = MmlNode_def.TEXCLASS;
const TEXCLASSNAMES = MmlNode_def.TEXCLASSNAMES;
const MATHVARIANTS = MmlNode_def.MATHVARIANTS;
const indentAttributes = MmlNode_def.indentAttributes;
const AbstractMmlNode = MmlNode_def.AbstractMmlNode;
const AbstractMmlTokenNode = MmlNode_def.AbstractMmlTokenNode;
const AbstractMmlLayoutNode = MmlNode_def.AbstractMmlLayoutNode;
const AbstractMmlBaseNode = MmlNode_def.AbstractMmlBaseNode;
const AbstractMmlEmptyNode = MmlNode_def.AbstractMmlEmptyNode;
const TextNode = MmlNode_def.TextNode;
const XMLNode = MmlNode_def.XMLNode;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeFactory.js
const NodeFactory_def = MathJax._.input.tex.NodeFactory;
const NodeFactory = NodeFactory_def.NodeFactory;
;// ./mjs/input/tex/physics/PhysicsMethods.js
const pairs = {
'(': ')',
'[': ']',
'{': '}',
'|': '|',
};
const biggs = /^(b|B)i(g{1,2})$/;
const latinCap = [0x41, 0x5a];
const latinSmall = [0x61, 0x7a];
const greekCap = [0x391, 0x3a9];
const greekSmall = [0x3b1, 0x3c9];
const digits = [0x30, 0x39];
function inRange(value, range) {
return value >= range[0] && value <= range[1];
}
function createVectorToken(factory, kind, def, text) {
const parser = factory.configuration.parser;
const token = NodeFactory.createToken(factory, kind, def, text);
const code = text.codePointAt(0);
if (text.length === 1 &&
!parser.stack.env.font &&
parser.stack.env.vectorFont &&
(inRange(code, latinCap) ||
inRange(code, latinSmall) ||
inRange(code, greekCap) ||
inRange(code, digits) ||
(inRange(code, greekSmall) && parser.stack.env.vectorStar) ||
NodeUtil.getAttribute(token, 'accent'))) {
NodeUtil.setAttribute(token, 'mathvariant', parser.stack.env.vectorFont);
}
return token;
}
function vectorApplication(parser, kind, name, operator, fences) {
const op = new TexParser(operator, parser.stack.env, parser.configuration).mml();
parser.Push(parser.itemFactory.create(kind, op));
const left = parser.GetNext();
const right = pairs[left];
if (!right) {
return;
}
let lfence = '', rfence = '', arg = '';
const enlarge = fences.includes(left);
if (left === '{') {
arg = parser.GetArgument(name);
lfence = enlarge ? '\\left\\{' : '';
rfence = enlarge ? '\\right\\}' : '';
const macro = `${lfence} ${arg} ${rfence}`;
parser.string = macro + parser.string.slice(parser.i);
parser.i = 0;
return;
}
if (!enlarge) {
return;
}
parser.i++;
parser.Push(parser.itemFactory
.create('auto open')
.setProperties({ open: left, close: right }));
}
function outputBraket([arg1, arg2, arg3], star1, star2) {
return star1 && star2
? `\\left\\langle{${arg1}}\\middle\\vert{${arg2}}\\middle\\vert{${arg3}}\\right\\rangle`
: star1
? `\\langle{${arg1}}\\vert{${arg2}}\\vert{${arg3}}\\rangle`
: `\\left\\langle{${arg1}}\\right\\vert{${arg2}}\\left\\vert{${arg3}}\\right\\rangle`;
}
function makeDiagMatrix(elements, anti) {
const length = elements.length;
const matrix = [];
for (let i = 0; i < length; i++) {
matrix.push(Array(anti ? length - i : i + 1).join('&') + `\\mqty{${elements[i]}}`);
}
return matrix.join('\\\\ ');
}
const PhysicsMethods = {
Quantity(parser, name, open = '(', close = ')', arg = false, named = '', variant = '') {
const star = arg ? parser.GetStar() : false;
let next = parser.GetNext();
const position = parser.i;
let big = null;
if (next === '\\') {
parser.i++;
big = parser.GetCS();
if (!big.match(biggs)) {
const empty = parser.create('node', 'mrow');
parser.Push(ParseUtil.fenced(parser.configuration, open, empty, close));
parser.i = position;
return;
}
next = parser.GetNext();
}
let right = pairs[next];
if (arg && next !== '{') {
throw new TexError('MissingArgFor', 'Missing argument for %1', parser.currentCS);
}
if (!right) {
const empty = parser.create('node', 'mrow');
parser.Push(ParseUtil.fenced(parser.configuration, open, empty, close));
parser.i = position;
return;
}
if (named) {
const mml = parser.create('token', 'mi', { texClass: TEXCLASS.OP }, named);
if (variant) {
NodeUtil.setAttribute(mml, 'mathvariant', variant);
}
parser.Push(parser.itemFactory.create('fn', mml));
}
if (next === '{') {
let argument = parser.GetArgument(name);
next = arg ? open : '\\{';
right = arg ? close : '\\}';
argument = star
? `${next} ${argument} ${right}`
: big
? `\\${big}l${next} ${argument} \\${big}r${right}`
: `\\left${next} ${argument} \\right${right}`;
parser.Push(new TexParser(argument, parser.stack.env, parser.configuration).mml());
return;
}
parser.i++;
parser.Push(parser.itemFactory
.create('auto open')
.setProperties({ open: next, close: right, big: big }));
},
Eval(parser, name) {
const star = parser.GetStar();
const next = parser.GetNext();
if (next === '(' || next === '[') {
parser.i++;
parser.Push(parser.itemFactory.create('auto open').setProperties({
open: next,
close: '|',
smash: star,
right: '\\vphantom{\\int}',
}));
return;
}
let replace = '\\left.\\vphantom{\\int}\\right|';
if (next === '{') {
const arg = parser.GetArgument(name);
replace = `\\left.${star ? `\\smash{${arg}}` : arg}\\vphantom{\\int}\\right|`;
}
parser.string =
parser.string.substring(0, parser.i) +
replace +
parser.string.slice(parser.i);
},
Commutator(parser, name, open = '[', close = ']') {
const star = parser.GetStar();
let next = parser.GetNext();
let big = null;
if (next === '\\') {
parser.i++;
big = parser.GetCS();
if (!big.match(biggs)) {
throw new TexError('MissingArgFor', 'Missing argument for %1', parser.currentCS);
}
next = parser.GetNext();
}
if (next !== '{') {
throw new TexError('MissingArgFor', 'Missing argument for %1', parser.currentCS);
}
const arg1 = parser.GetArgument(name);
const arg2 = parser.GetArgument(name);
let argument = arg1 + ',' + arg2;
argument = star
? `${open} ${argument} ${close}`
: big
? `\\${big}l${open} ${argument} \\${big}r${close}`
: `\\left${open} ${argument} \\right${close}`;
parser.Push(new TexParser(argument, parser.stack.env, parser.configuration).mml());
},
VectorBold(parser, name) {
const star = parser.GetStar();
const arg = parser.GetArgument(name);
const oldToken = parser.configuration.nodeFactory.get('token');
const oldFont = parser.stack.env.font;
delete parser.stack.env.font;
parser.configuration.nodeFactory.set('token', createVectorToken);
parser.stack.env.vectorFont = star ? 'bold-italic' : 'bold';
parser.stack.env.vectorStar = star;
const node = new TexParser(arg, parser.stack.env, parser.configuration).mml();
if (oldFont) {
parser.stack.env.font = oldFont;
}
delete parser.stack.env.vectorFont;
delete parser.stack.env.vectorStar;
parser.configuration.nodeFactory.set('token', oldToken);
parser.Push(node);
},
StarMacro(parser, name, argcount, ...parts) {
const star = parser.GetStar();
const args = [];
if (argcount) {
for (let i = args.length; i < argcount; i++) {
args.push(parser.GetArgument(name));
}
}
let macro = parts.join(star ? '*' : '');
macro = ParseUtil.substituteArgs(parser, args, macro);
parser.string = ParseUtil.addArgs(parser, macro, parser.string.slice(parser.i));
parser.i = 0;
ParseUtil.checkMaxMacros(parser);
},
OperatorApplication(parser, name, operator, ...fences) {
vectorApplication(parser, 'fn', name, operator, fences);
},
VectorOperator(parser, name, operator, ...fences) {
vectorApplication(parser, 'mml', name, operator, fences);
},
Expression(parser, name, opt = true, id = '') {
id = id || name.slice(1);
const exp = opt ? parser.GetBrackets(name) : null;
let mml = parser.create('token', 'mi', { texClass: TEXCLASS.OP }, id);
if (exp) {
const sup = new TexParser(exp, parser.stack.env, parser.configuration).mml();
mml = parser.create('node', 'msup', [mml, sup]);
}
parser.Push(parser.itemFactory.create('fn', mml));
if (parser.GetNext() !== '(') {
return;
}
parser.i++;
parser.Push(parser.itemFactory
.create('auto open')
.setProperties({ open: '(', close: ')' }));
},
Qqtext(parser, name, text) {
const star = parser.GetStar();
const arg = text ? text : parser.GetArgument(name);
const replace = (star ? '' : '\\quad') + '\\text{' + arg + '}\\quad ';
parser.string =
parser.string.slice(0, parser.i) +
replace +
parser.string.slice(parser.i);
},
Differential(parser, name, op) {
const optArg = parser.GetBrackets(name);
const power = optArg != null ? '^{' + optArg + '}' : ' ';
const parens = parser.GetNext() === '(';
const braces = parser.GetNext() === '{';
let macro = op + power;
if (!(parens || braces)) {
macro += parser.GetArgument(name, true) || '';
const mml = new TexParser(macro, parser.stack.env, parser.configuration).mml();
parser.Push(mml);
return;
}
if (braces) {
macro += parser.GetArgument(name);
const mml = new TexParser(macro, parser.stack.env, parser.configuration).mml();
parser.Push(parser.create('node', 'TeXAtom', [mml], { texClass: TEXCLASS.OP }));
return;
}
parser.Push(new TexParser(macro, parser.stack.env, parser.configuration).mml());
parser.i++;
parser.Push(parser.itemFactory
.create('auto open')
.setProperties({ open: '(', close: ')' }));
},
Derivative(parser, name, argMax, op) {
const star = parser.GetStar();
const optArg = parser.GetBrackets(name);
let argCounter = 1;
const args = [];
args.push(parser.GetArgument(name));
while (parser.GetNext() === '{' && argCounter < argMax) {
args.push(parser.GetArgument(name));
argCounter++;
}
let ignore = false;
let power1 = ' ';
let power2 = ' ';
if (argMax > 2 && args.length > 2) {
power1 = '^{' + (args.length - 1) + '}';
ignore = true;
}
else if (optArg != null) {
if (argMax > 2 && args.length > 1) {
ignore = true;
}
power1 = `^{${optArg}}`;
power2 = power1;
}
const frac = star ? '\\flatfrac' : '\\frac';
const first = args.length > 1 ? args[0] : '';
const second = args.length > 1 ? args[1] : args[0];
let rest = '';
for (let i = 2, arg; (arg = args[i]); i++) {
rest += op + ' ' + arg;
}
const macro = `${frac}{${op}${power1}${first}}{${op} ${second}${power2} ${rest}}`;
parser.Push(new TexParser(macro, parser.stack.env, parser.configuration).mml());
if (parser.GetNext() === '(') {
parser.i++;
parser.Push(parser.itemFactory
.create('auto open')
.setProperties({ open: '(', close: ')', ignore: ignore }));
}
},
Bra(parser, name) {
const starBra = parser.GetStar();
const bra = parser.GetArgument(name);
let ket = '';
let hasKet = false;
let starKet = false;
if (parser.GetNext() === '\\') {
let saveI = parser.i;
parser.i++;
const cs = parser.GetCS();
const token = parser.lookup(HandlerType.MACRO, cs);
if (token && token.token === 'ket') {
hasKet = true;
saveI = parser.i;
starKet = parser.GetStar();
if (parser.GetNext() === '{') {
ket = parser.GetArgument(cs, true);
}
else {
parser.i = saveI;
starKet = false;
}
}
else {
parser.i = saveI;
}
}
let macro = '';
if (hasKet) {
macro =
starBra || starKet
? `\\langle{${bra}}\\vert{${ket}}\\rangle`
: `\\left\\langle{${bra}}\\middle\\vert{${ket}}\\right\\rangle`;
}
else {
macro = starBra
? `\\langle{${bra}}\\vert`
: `\\left\\langle{${bra}}\\right\\vert{${ket}}`;
}
parser.Push(new TexParser(macro, parser.stack.env, parser.configuration).mml());
},
Ket(parser, name) {
const star = parser.GetStar();
const ket = parser.GetArgument(name);
const macro = star
? `\\vert{${ket}}\\rangle`
: `\\left\\vert{${ket}}\\right\\rangle`;
parser.Push(new TexParser(macro, parser.stack.env, parser.configuration).mml());
},
BraKet(parser, name) {
const star = parser.GetStar();
const bra = parser.GetArgument(name);
let ket = null;
if (parser.GetNext() === '{') {
ket = parser.GetArgument(name, true);
}
let macro = '';
if (ket == null) {
macro = star
? `\\langle{${bra}}\\vert{${bra}}\\rangle`
: `\\left\\langle{${bra}}\\middle\\vert{${bra}}\\right\\rangle`;
}
else {
macro = star
? `\\langle{${bra}}\\vert{${ket}}\\rangle`
: `\\left\\langle{${bra}}\\middle\\vert{${ket}}\\right\\rangle`;
}
parser.Push(new TexParser(macro, parser.stack.env, parser.configuration).mml());
},
KetBra(parser, name) {
const star = parser.GetStar();
const ket = parser.GetArgument(name);
let bra = null;
if (parser.GetNext() === '{') {
bra = parser.GetArgument(name, true);
}
let macro = '';
if (bra == null) {
macro = star
? `\\vert{${ket}}\\rangle\\!\\langle{${ket}}\\vert`
: `\\left\\vert{${ket}}\\middle\\rangle\\!\\middle\\langle{${ket}}\\right\\vert`;
}
else {
macro = star
? `\\vert{${ket}}\\rangle\\!\\langle{${bra}}\\vert`
: `\\left\\vert{${ket}}\\middle\\rangle\\!\\middle\\langle{${bra}}\\right\\vert`;
}
parser.Push(new TexParser(macro, parser.stack.env, parser.configuration).mml());
},
Expectation(parser, name) {
const star1 = parser.GetStar();
const star2 = star1 && parser.GetStar();
const arg1 = parser.GetArgument(name);
let arg2 = null;
if (parser.GetNext() === '{') {
arg2 = parser.GetArgument(name, true);
}
const macro = arg1 && arg2
? outputBraket([arg2, arg1, arg2], star1, star2)
:
star1
? `\\langle {${arg1}} \\rangle`
: `\\left\\langle {${arg1}} \\right\\rangle`;
parser.Push(new TexParser(macro, parser.stack.env, parser.configuration).mml());
},
MatrixElement(parser, name) {
const star1 = parser.GetStar();
const star2 = star1 && parser.GetStar();
const arg1 = parser.GetArgument(name);
const arg2 = parser.GetArgument(name);
const arg3 = parser.GetArgument(name);
const macro = outputBraket([arg1, arg2, arg3], star1, star2);
parser.Push(new TexParser(macro, parser.stack.env, parser.configuration).mml());
},
MatrixQuantity(parser, name, small) {
const star = parser.GetStar();
const next = parser.GetNext();
const array = small ? 'smallmatrix' : 'array';
let arg = '';
let open = '';
let close = '';
switch (next) {
case '{':
arg = parser.GetArgument(name);
break;
case '(':
parser.i++;
open = star ? '\\lgroup' : '(';
close = star ? '\\rgroup' : ')';
arg = parser.GetUpTo(name, ')');
break;
case '[':
parser.i++;
open = '[';
close = ']';
arg = parser.GetUpTo(name, ']');
break;
case '|':
parser.i++;
open = '|';
close = '|';
arg = parser.GetUpTo(name, '|');
break;
default:
open = '(';
close = ')';
break;
}
const macro = (open ? '\\left' : '') +
`${open}\\begin{${array}}{} ${arg}\\end{${array}}` +
(open ? '\\right' : '') +
close;
parser.Push(new TexParser(macro, parser.stack.env, parser.configuration).mml());
},
IdentityMatrix(parser, name) {
const arg = parser.GetArgument(name);
const size = parseInt(arg, 10);
if (isNaN(size)) {
throw new TexError('InvalidNumber', 'Invalid number');
}
if (size <= 1) {
parser.string = '1' + parser.string.slice(parser.i);
parser.i = 0;
return;
}
const zeros = Array(size).fill('0');
const columns = [];
for (let i = 0; i < size; i++) {
const row = zeros.slice();
row[i] = '1';
columns.push(row.join(' & '));
}
parser.string = columns.join('\\\\ ') + parser.string.slice(parser.i);
parser.i = 0;
},
XMatrix(parser, name) {
const star = parser.GetStar();
const arg1 = parser.GetArgument(name);
const arg2 = parser.GetArgument(name);
const arg3 = parser.GetArgument(name);
let n = parseInt(arg2, 10);
let m = parseInt(arg3, 10);
if (isNaN(n) ||
isNaN(m) ||
m.toString() !== arg3 ||
n.toString() !== arg2) {
throw new TexError('InvalidNumber', 'Invalid number');
}
n = n < 1 ? 1 : n;
m = m < 1 ? 1 : m;
if (!star) {
const row = Array(m).fill(arg1).join(' & ');
const matrix = Array(n).fill(row).join('\\\\ ');
parser.string = matrix + parser.string.slice(parser.i);
parser.i = 0;
return;
}
let matrix = '';
if (n === 1 && m === 1) {
matrix = arg1;
}
else if (n === 1) {
const row = [];
for (let i = 1; i <= m; i++) {
row.push(`${arg1}_{${i}}`);
}
matrix = row.join(' & ');
}
else if (m === 1) {
const row = [];
for (let i = 1; i <= n; i++) {
row.push(`${arg1}_{${i}}`);
}
matrix = row.join('\\\\ ');
}
else {
const rows = [];
for (let i = 1; i <= n; i++) {
const row = [];
for (let j = 1; j <= m; j++) {
row.push(`${arg1}_{{${i}}{${j}}}`);
}
rows.push(row.join(' & '));
}
matrix = rows.join('\\\\ ');
}
parser.string = matrix + parser.string.slice(parser.i);
parser.i = 0;
return;
},
PauliMatrix(parser, name) {
const arg = parser.GetArgument(name);
let matrix = arg.slice(1);
switch (arg[0]) {
case '0':
matrix += ' 1 & 0\\\\ 0 & 1';
break;
case '1':
case 'x':
matrix += ' 0 & 1\\\\ 1 & 0';
break;
case '2':
case 'y':
matrix += ' 0 & -i\\\\ i & 0';
break;
case '3':
case 'z':
matrix += ' 1 & 0\\\\ 0 & -1';
break;
default:
}
parser.string = matrix + parser.string.slice(parser.i);
parser.i = 0;
},
DiagonalMatrix(parser, name, anti) {
if (parser.GetNext() !== '{') {
return;
}
const startI = parser.i;
parser.GetArgument(name);
const endI = parser.i;
parser.i = startI + 1;
const elements = [];
let element = '';
let currentI = parser.i;
while (currentI < endI) {
try {
element = parser.GetUpTo(name, ',');
}
catch (_e) {
parser.i = endI;
elements.push(parser.string.slice(currentI, endI - 1));
break;
}
currentI = parser.i;
elements.push(element);
}
parser.string = makeDiagMatrix(elements, anti) + parser.string.slice(endI);
parser.i = 0;
},
AutoClose(parser, fence, texclass) {
let top = parser.stack.Top();
if (top.isKind('over')) {
top = parser.stack.Top(2);
}
if (!top.isKind('auto open') || !top.closing(fence)) {
return false;
}
const mo = parser.create('token', 'mo', { texClass: texclass }, fence);
parser.Push(parser.itemFactory
.create('close')
.setProperties({ 'pre-autoclose': true }));
parser.Push(parser.itemFactory.create('mml', mo).setProperties({ autoclose: true }));
return true;
},
Vnabla(parser, _name) {
const argument = parser.options.physics.arrowdel
? '\\vec{\\gradientnabla}'
: '{\\gradientnabla}';
return parser.Push(new TexParser(argument, parser.stack.env, parser.configuration).mml());
},
DiffD(parser, _name) {
const argument = parser.options.physics.italicdiff ? 'd' : '{\\rm d}';
return parser.Push(new TexParser(argument, parser.stack.env, parser.configuration).mml());
},
Macro: BaseMethods.Macro,
NamedFn: BaseMethods.NamedFn,
Array: BaseMethods.Array,
};
/* harmony default export */ const physics_PhysicsMethods = (PhysicsMethods);
//# sourceMappingURL=PhysicsMethods.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/TexConstants.js
const TexConstants_def = MathJax._.input.tex.TexConstants;
const TexConstant = TexConstants_def.TexConstant;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseMethods.js
const ParseMethods_def = MathJax._.input.tex.ParseMethods;
/* harmony default export */ const ParseMethods = (ParseMethods_def.default);
;// ./mjs/input/tex/physics/PhysicsMappings.js
new CommandMap('Physics-automatic-bracing-macros', {
quantity: physics_PhysicsMethods.Quantity,
qty: physics_PhysicsMethods.Quantity,
pqty: [physics_PhysicsMethods.Quantity, '(', ')', true],
bqty: [physics_PhysicsMethods.Quantity, '[', ']', true],
vqty: [physics_PhysicsMethods.Quantity, '|', '|', true],
Bqty: [physics_PhysicsMethods.Quantity, '\\{', '\\}', true],
absolutevalue: [physics_PhysicsMethods.Quantity, '|', '|', true],
abs: [physics_PhysicsMethods.Quantity, '|', '|', true],
norm: [physics_PhysicsMethods.Quantity, '\\|', '\\|', true],
evaluated: physics_PhysicsMethods.Eval,
eval: physics_PhysicsMethods.Eval,
order: [
physics_PhysicsMethods.Quantity,
'(',
')',
true,
'O',
TexConstant.Variant.CALLIGRAPHIC,
],
commutator: physics_PhysicsMethods.Commutator,
comm: physics_PhysicsMethods.Commutator,
anticommutator: [physics_PhysicsMethods.Commutator, '\\{', '\\}'],
acomm: [physics_PhysicsMethods.Commutator, '\\{', '\\}'],
poissonbracket: [physics_PhysicsMethods.Commutator, '\\{', '\\}'],
pb: [physics_PhysicsMethods.Commutator, '\\{', '\\}'],
});
new CharacterMap('Physics-vector-mo', ParseMethods.mathchar0mo, {
dotproduct: ['\u22C5', { mathvariant: TexConstant.Variant.BOLD }],
vdot: ['\u22C5', { mathvariant: TexConstant.Variant.BOLD }],
crossproduct: '\u00D7',
cross: '\u00D7',
cp: '\u00D7',
gradientnabla: ['\u2207', { mathvariant: TexConstant.Variant.BOLD }],
divsymbol: '\u00F7',
divisionsymbol: '\u00F7',
});
new CharacterMap('Physics-vector-mi', ParseMethods.mathchar0mi, {
real: ['\u211C', { mathvariant: TexConstant.Variant.NORMAL }],
imaginary: ['\u2111', { mathvariant: TexConstant.Variant.NORMAL }],
});
new CommandMap('Physics-vector-macros', {
vnabla: physics_PhysicsMethods.Vnabla,
vectorbold: physics_PhysicsMethods.VectorBold,
vb: physics_PhysicsMethods.VectorBold,
vectorarrow: [physics_PhysicsMethods.StarMacro, 1, '\\vec{\\vb', '{#1}}'],
va: [physics_PhysicsMethods.StarMacro, 1, '\\vec{\\vb', '{#1}}'],
vectorunit: [physics_PhysicsMethods.StarMacro, 1, '\\hat{\\vb', '{#1}}'],
vu: [physics_PhysicsMethods.StarMacro, 1, '\\hat{\\vb', '{#1}}'],
gradient: [physics_PhysicsMethods.OperatorApplication, '\\vnabla', '(', '['],
grad: [physics_PhysicsMethods.OperatorApplication, '\\vnabla', '(', '['],
divergence: [physics_PhysicsMethods.VectorOperator, '\\vnabla\\vdot', '(', '['],
div: [physics_PhysicsMethods.VectorOperator, '\\vnabla\\vdot', '(', '['],
curl: [physics_PhysicsMethods.VectorOperator, '\\vnabla\\crossproduct', '(', '['],
laplacian: [physics_PhysicsMethods.OperatorApplication, '\\nabla^2', '(', '['],
});
new CommandMap('Physics-expressions-macros', {
sin: physics_PhysicsMethods.Expression,
sinh: physics_PhysicsMethods.Expression,
arcsin: physics_PhysicsMethods.Expression,
asin: physics_PhysicsMethods.Expression,
cos: physics_PhysicsMethods.Expression,
cosh: physics_PhysicsMethods.Expression,
arccos: physics_PhysicsMethods.Expression,
acos: physics_PhysicsMethods.Expression,
tan: physics_PhysicsMethods.Expression,
tanh: physics_PhysicsMethods.Expression,
arctan: physics_PhysicsMethods.Expression,
atan: physics_PhysicsMethods.Expression,
csc: physics_PhysicsMethods.Expression,
csch: physics_PhysicsMethods.Expression,
arccsc: physics_PhysicsMethods.Expression,
acsc: physics_PhysicsMethods.Expression,
sec: physics_PhysicsMethods.Expression,
sech: physics_PhysicsMethods.Expression,
arcsec: physics_PhysicsMethods.Expression,
asec: physics_PhysicsMethods.Expression,
cot: physics_PhysicsMethods.Expression,
coth: physics_PhysicsMethods.Expression,
arccot: physics_PhysicsMethods.Expression,
acot: physics_PhysicsMethods.Expression,
exp: [physics_PhysicsMethods.Expression, false],
log: physics_PhysicsMethods.Expression,
ln: physics_PhysicsMethods.Expression,
det: [physics_PhysicsMethods.Expression, false],
Pr: [physics_PhysicsMethods.Expression, false],
tr: [physics_PhysicsMethods.Expression, false],
trace: [physics_PhysicsMethods.Expression, false, 'tr'],
Tr: [physics_PhysicsMethods.Expression, false],
Trace: [physics_PhysicsMethods.Expression, false, 'Tr'],
rank: physics_PhysicsMethods.NamedFn,
erf: [physics_PhysicsMethods.Expression, false],
Residue: [physics_PhysicsMethods.Macro, '\\mathrm{Res}'],
Res: [physics_PhysicsMethods.OperatorApplication, '\\Residue', '(', '[', '{'],
principalvalue: [physics_PhysicsMethods.OperatorApplication, '{\\cal P}'],
pv: [physics_PhysicsMethods.OperatorApplication, '{\\cal P}'],
PV: [physics_PhysicsMethods.OperatorApplication, '{\\rm P.V.}'],
Re: [physics_PhysicsMethods.OperatorApplication, '\\mathrm{Re}', '{'],
Im: [physics_PhysicsMethods.OperatorApplication, '\\mathrm{Im}', '{'],
sine: [physics_PhysicsMethods.NamedFn, 'sin'],
hypsine: [physics_PhysicsMethods.NamedFn, 'sinh'],
arcsine: [physics_PhysicsMethods.NamedFn, 'arcsin'],
asine: [physics_PhysicsMethods.NamedFn, 'asin'],
cosine: [physics_PhysicsMethods.NamedFn, 'cos'],
hypcosine: [physics_PhysicsMethods.NamedFn, 'cosh'],
arccosine: [physics_PhysicsMethods.NamedFn, 'arccos'],
acosine: [physics_PhysicsMethods.NamedFn, 'acos'],
tangent: [physics_PhysicsMethods.NamedFn, 'tan'],
hyptangent: [physics_PhysicsMethods.NamedFn, 'tanh'],
arctangent: [physics_PhysicsMethods.NamedFn, 'arctan'],
atangent: [physics_PhysicsMethods.NamedFn, 'atan'],
cosecant: [physics_PhysicsMethods.NamedFn, 'csc'],
hypcosecant: [physics_PhysicsMethods.NamedFn, 'csch'],
arccosecant: [physics_PhysicsMethods.NamedFn, 'arccsc'],
acosecant: [physics_PhysicsMethods.NamedFn, 'acsc'],
secant: [physics_PhysicsMethods.NamedFn, 'sec'],
hypsecant: [physics_PhysicsMethods.NamedFn, 'sech'],
arcsecant: [physics_PhysicsMethods.NamedFn, 'arcsec'],
asecant: [physics_PhysicsMethods.NamedFn, 'asec'],
cotangent: [physics_PhysicsMethods.NamedFn, 'cot'],
hypcotangent: [physics_PhysicsMethods.NamedFn, 'coth'],
arccotangent: [physics_PhysicsMethods.NamedFn, 'arccot'],
acotangent: [physics_PhysicsMethods.NamedFn, 'acot'],
exponential: [physics_PhysicsMethods.NamedFn, 'exp'],
logarithm: [physics_PhysicsMethods.NamedFn, 'log'],
naturallogarithm: [physics_PhysicsMethods.NamedFn, 'ln'],
determinant: [physics_PhysicsMethods.NamedFn, 'det'],
Probability: [physics_PhysicsMethods.NamedFn, 'Pr'],
});
new CommandMap('Physics-quick-quad-macros', {
qqtext: physics_PhysicsMethods.Qqtext,
qq: physics_PhysicsMethods.Qqtext,
qcomma: [physics_PhysicsMethods.Macro, '\\qqtext*{,}'],
qc: [physics_PhysicsMethods.Macro, '\\qqtext*{,}'],
qcc: [physics_PhysicsMethods.Qqtext, 'c.c.'],
qif: [physics_PhysicsMethods.Qqtext, 'if'],
qthen: [physics_PhysicsMethods.Qqtext, 'then'],
qelse: [physics_PhysicsMethods.Qqtext, 'else'],
qotherwise: [physics_PhysicsMethods.Qqtext, 'otherwise'],
qunless: [physics_PhysicsMethods.Qqtext, 'unless'],
qgiven: [physics_PhysicsMethods.Qqtext, 'given'],
qusing: [physics_PhysicsMethods.Qqtext, 'using'],
qassume: [physics_PhysicsMethods.Qqtext, 'assume'],
qsince: [physics_PhysicsMethods.Qqtext, 'since'],
qlet: [physics_PhysicsMethods.Qqtext, 'let'],
qfor: [physics_PhysicsMethods.Qqtext, 'for'],
qall: [physics_PhysicsMethods.Qqtext, 'all'],
qeven: [physics_PhysicsMethods.Qqtext, 'even'],
qodd: [physics_PhysicsMethods.Qqtext, 'odd'],
qinteger: [physics_PhysicsMethods.Qqtext, 'integer'],
qand: [physics_PhysicsMethods.Qqtext, 'and'],
qor: [physics_PhysicsMethods.Qqtext, 'or'],
qas: [physics_PhysicsMethods.Qqtext, 'as'],
qin: [physics_PhysicsMethods.Qqtext, 'in'],
});
new CommandMap('Physics-derivative-macros', {
diffd: physics_PhysicsMethods.DiffD,
flatfrac: [physics_PhysicsMethods.Macro, '\\left.#1\\middle/#2\\right.', 2],
differential: [physics_PhysicsMethods.Differential, '\\diffd'],
dd: [physics_PhysicsMethods.Differential, '\\diffd'],
variation: [physics_PhysicsMethods.Differential, '\\delta'],
var: [physics_PhysicsMethods.Differential, '\\delta'],
derivative: [physics_PhysicsMethods.Derivative, 2, '\\diffd'],
dv: [physics_PhysicsMethods.Derivative, 2, '\\diffd'],
partialderivative: [physics_PhysicsMethods.Derivative, 3, '\\partial'],
pderivative: [physics_PhysicsMethods.Derivative, 3, '\\partial'],
pdv: [physics_PhysicsMethods.Derivative, 3, '\\partial'],
functionalderivative: [physics_PhysicsMethods.Derivative, 2, '\\delta'],
fderivative: [physics_PhysicsMethods.Derivative, 2, '\\delta'],
fdv: [physics_PhysicsMethods.Derivative, 2, '\\delta'],
});
new CommandMap('Physics-bra-ket-macros', {
bra: physics_PhysicsMethods.Bra,
ket: physics_PhysicsMethods.Ket,
innerproduct: physics_PhysicsMethods.BraKet,
ip: physics_PhysicsMethods.BraKet,
braket: physics_PhysicsMethods.BraKet,
outerproduct: physics_PhysicsMethods.KetBra,
dyad: physics_PhysicsMethods.KetBra,
ketbra: physics_PhysicsMethods.KetBra,
op: physics_PhysicsMethods.KetBra,
expectationvalue: physics_PhysicsMethods.Expectation,
expval: physics_PhysicsMethods.Expectation,
ev: physics_PhysicsMethods.Expectation,
matrixelement: physics_PhysicsMethods.MatrixElement,
matrixel: physics_PhysicsMethods.MatrixElement,
mel: physics_PhysicsMethods.MatrixElement,
});
new CommandMap('Physics-matrix-macros', {
matrixquantity: physics_PhysicsMethods.MatrixQuantity,
mqty: physics_PhysicsMethods.MatrixQuantity,
pmqty: [physics_PhysicsMethods.Macro, '\\mqty(#1)', 1],
Pmqty: [physics_PhysicsMethods.Macro, '\\mqty*(#1)', 1],
bmqty: [physics_PhysicsMethods.Macro, '\\mqty[#1]', 1],
vmqty: [physics_PhysicsMethods.Macro, '\\mqty|#1|', 1],
smallmatrixquantity: [physics_PhysicsMethods.MatrixQuantity, true],
smqty: [physics_PhysicsMethods.MatrixQuantity, true],
spmqty: [physics_PhysicsMethods.Macro, '\\smqty(#1)', 1],
sPmqty: [physics_PhysicsMethods.Macro, '\\smqty*(#1)', 1],
sbmqty: [physics_PhysicsMethods.Macro, '\\smqty[#1]', 1],
svmqty: [physics_PhysicsMethods.Macro, '\\smqty|#1|', 1],
matrixdeterminant: [physics_PhysicsMethods.Macro, '\\vmqty{#1}', 1],
mdet: [physics_PhysicsMethods.Macro, '\\vmqty{#1}', 1],
smdet: [physics_PhysicsMethods.Macro, '\\svmqty{#1}', 1],
identitymatrix: physics_PhysicsMethods.IdentityMatrix,
imat: physics_PhysicsMethods.IdentityMatrix,
xmatrix: physics_PhysicsMethods.XMatrix,
xmat: physics_PhysicsMethods.XMatrix,
zeromatrix: [physics_PhysicsMethods.Macro, '\\xmat{0}{#1}{#2}', 2],
zmat: [physics_PhysicsMethods.Macro, '\\xmat{0}{#1}{#2}', 2],
paulimatrix: physics_PhysicsMethods.PauliMatrix,
pmat: physics_PhysicsMethods.PauliMatrix,
diagonalmatrix: physics_PhysicsMethods.DiagonalMatrix,
dmat: physics_PhysicsMethods.DiagonalMatrix,
antidiagonalmatrix: [physics_PhysicsMethods.DiagonalMatrix, true],
admat: [physics_PhysicsMethods.DiagonalMatrix, true],
});
new EnvironmentMap('Physics-aux-envs', ParseMethods.environment, {
smallmatrix: [
physics_PhysicsMethods.Array,
null,
null,
null,
'c',
'0.333em',
'.2em',
'S',
1,
],
});
new MacroMap('Physics-characters', {
'|': [physics_PhysicsMethods.AutoClose, TEXCLASS.ORD],
')': physics_PhysicsMethods.AutoClose,
']': physics_PhysicsMethods.AutoClose,
});
//# sourceMappingURL=PhysicsMappings.js.map
;// ./mjs/input/tex/physics/PhysicsConfiguration.js
const PhysicsConfiguration = Configuration.create('physics', {
[ConfigurationType.HANDLER]: {
macro: [
'Physics-automatic-bracing-macros',
'Physics-vector-macros',
'Physics-vector-mo',
'Physics-vector-mi',
'Physics-derivative-macros',
'Physics-expressions-macros',
'Physics-quick-quad-macros',
'Physics-bra-ket-macros',
'Physics-matrix-macros',
],
[HandlerType.CHARACTER]: ['Physics-characters'],
[HandlerType.ENVIRONMENT]: ['Physics-aux-envs'],
},
[ConfigurationType.ITEMS]: {
[AutoOpen.prototype.kind]: AutoOpen,
},
[ConfigurationType.OPTIONS]: {
physics: {
italicdiff: false,
arrowdel: false,
},
},
});
//# sourceMappingURL=PhysicsConfiguration.js.map
;// ./components/mjs/input/tex/extensions/physics/lib/physics.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/physics', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
physics: {
PhysicsConfiguration: PhysicsConfiguration_namespaceObject,
PhysicsItems: PhysicsItems_namespaceObject,
PhysicsMethods: PhysicsMethods_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/physics/physics.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/ams.js 0000644 0001762 0000144 00000121333 15112352624 022526 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/ams/AmsItems.js
var AmsItems_namespaceObject = {};
__webpack_require__.r(AmsItems_namespaceObject);
__webpack_require__.d(AmsItems_namespaceObject, {
FlalignItem: () => (FlalignItem),
MultlineItem: () => (MultlineItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ams/AmsMethods.js
var AmsMethods_namespaceObject = {};
__webpack_require__.r(AmsMethods_namespaceObject);
__webpack_require__.d(AmsMethods_namespaceObject, {
AmsMethods: () => (AmsMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ams/AmsConfiguration.js
var AmsConfiguration_namespaceObject = {};
__webpack_require__.r(AmsConfiguration_namespaceObject);
__webpack_require__.d(AmsConfiguration_namespaceObject, {
AmsConfiguration: () => (AmsConfiguration),
AmsTags: () => (AmsTags)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseItems.js
const BaseItems_def = MathJax._.input.tex.base.BaseItems;
const StartItem = BaseItems_def.StartItem;
const StopItem = BaseItems_def.StopItem;
const OpenItem = BaseItems_def.OpenItem;
const CloseItem = BaseItems_def.CloseItem;
const NullItem = BaseItems_def.NullItem;
const PrimeItem = BaseItems_def.PrimeItem;
const SubsupItem = BaseItems_def.SubsupItem;
const OverItem = BaseItems_def.OverItem;
const LeftItem = BaseItems_def.LeftItem;
const Middle = BaseItems_def.Middle;
const RightItem = BaseItems_def.RightItem;
const BreakItem = BaseItems_def.BreakItem;
const BeginItem = BaseItems_def.BeginItem;
const EndItem = BaseItems_def.EndItem;
const StyleItem = BaseItems_def.StyleItem;
const PositionItem = BaseItems_def.PositionItem;
const CellItem = BaseItems_def.CellItem;
const MmlItem = BaseItems_def.MmlItem;
const FnItem = BaseItems_def.FnItem;
const NotItem = BaseItems_def.NotItem;
const NonscriptItem = BaseItems_def.NonscriptItem;
const DotsItem = BaseItems_def.DotsItem;
const ArrayItem = BaseItems_def.ArrayItem;
const EqnArrayItem = BaseItems_def.EqnArrayItem;
const MstyleItem = BaseItems_def.MstyleItem;
const EquationItem = BaseItems_def.EquationItem;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexConstants.js
const TexConstants_def = MathJax._.input.tex.TexConstants;
const TexConstant = TexConstants_def.TexConstant;
;// ./mjs/input/tex/ams/AmsItems.js
class MultlineItem extends ArrayItem {
constructor(factory, ...args) {
super(factory);
this.factory.configuration.tags.start('multline', true, args[0]);
}
get kind() {
return 'multline';
}
EndEntry() {
if (this.table.length) {
ParseUtil.fixInitialMO(this.factory.configuration, this.nodes);
}
const shove = this.getProperty('shove');
const mtd = this.create('node', 'mtd', this.nodes, shove ? { columnalign: shove } : {});
this.setProperty('shove', null);
this.row.push(mtd);
this.Clear();
}
EndRow() {
if (this.row.length !== 1) {
throw new TexError('MultlineRowsOneCol', 'The rows within the %1 environment must have exactly one column', 'multline');
}
const row = this.create('node', 'mtr', this.row);
this.table.push(row);
this.row = [];
}
EndTable() {
super.EndTable();
if (this.table.length) {
const m = this.table.length - 1;
let label = -1;
if (!NodeUtil.getAttribute(NodeUtil.getChildren(this.table[0])[0], 'columnalign')) {
NodeUtil.setAttribute(NodeUtil.getChildren(this.table[0])[0], 'columnalign', TexConstant.Align.LEFT);
}
if (!NodeUtil.getAttribute(NodeUtil.getChildren(this.table[m])[0], 'columnalign')) {
NodeUtil.setAttribute(NodeUtil.getChildren(this.table[m])[0], 'columnalign', TexConstant.Align.RIGHT);
}
const tag = this.factory.configuration.tags.getTag();
if (tag) {
label =
this.arraydef.side === TexConstant.Align.LEFT
? 0
: this.table.length - 1;
const mtr = this.table[label];
const mlabel = this.create('node', 'mlabeledtr', [tag].concat(NodeUtil.getChildren(mtr)));
NodeUtil.copyAttributes(mtr, mlabel);
this.table[label] = mlabel;
}
}
this.factory.configuration.tags.end();
}
}
class FlalignItem extends EqnArrayItem {
get kind() {
return 'flalign';
}
constructor(factory, name, numbered, padded, center) {
super(factory);
this.name = name;
this.numbered = numbered;
this.padded = padded;
this.center = center;
this.factory.configuration.tags.start(name, numbered, numbered);
}
EndEntry() {
super.EndEntry();
const n = this.getProperty('xalignat');
if (!n)
return;
if (this.row.length > n) {
throw new TexError('XalignOverflow', 'Extra %1 in row of %2', '&', this.name);
}
}
EndRow() {
let cell;
const row = this.row;
const n = this.getProperty('xalignat');
while (row.length < n) {
row.push(this.create('node', 'mtd'));
}
this.row = [];
if (this.padded) {
this.row.push(this.create('node', 'mtd'));
}
while ((cell = row.shift())) {
this.row.push(cell);
cell = row.shift();
if (cell)
this.row.push(cell);
if (row.length || this.padded) {
this.row.push(this.create('node', 'mtd'));
}
}
if (this.row.length > this.maxrow) {
this.maxrow = this.row.length;
}
super.EndRow();
const mtr = this.table[this.table.length - 1];
if (this.getProperty('zeroWidthLabel') && mtr.isKind('mlabeledtr')) {
const mtd = NodeUtil.getChildren(mtr)[0];
const side = this.factory.configuration.options['tagSide'];
const def = Object.assign({ width: 0 }, (side === 'right' ? { lspace: '-1width' } : {}));
const mpadded = this.create('node', 'mpadded', NodeUtil.getChildren(mtd), def);
mtd.setChildren([mpadded]);
}
}
EndTable() {
super.EndTable();
if (this.center) {
if (this.maxrow <= 2) {
const def = this.arraydef;
delete def.width;
delete this.global.indentalign;
}
}
}
}
//# sourceMappingURL=AmsItems.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/Tags.js
const Tags_def = MathJax._.input.tex.Tags;
const Label = Tags_def.Label;
const TagInfo = Tags_def.TagInfo;
const AbstractTags = Tags_def.AbstractTags;
const NoTags = Tags_def.NoTags;
const AllTags = Tags_def.AllTags;
const TagsFactory = Tags_def.TagsFactory;
;// ./components/mjs/input/tex-base/lib/input/tex/UnitUtil.js
const UnitUtil_def = MathJax._.input.tex.UnitUtil;
const UnitUtil = UnitUtil_def.UnitUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseMethods.js
const ParseMethods_def = MathJax._.input.tex.ParseMethods;
/* harmony default export */ const ParseMethods = (ParseMethods_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexParser.js
const TexParser_def = MathJax._.input.tex.TexParser;
/* harmony default export */ const TexParser = (TexParser_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./components/mjs/core/lib/core/MmlTree/MmlNode.js
const MmlNode_def = MathJax._.core.MmlTree.MmlNode;
const TEXCLASS = MmlNode_def.TEXCLASS;
const TEXCLASSNAMES = MmlNode_def.TEXCLASSNAMES;
const MATHVARIANTS = MmlNode_def.MATHVARIANTS;
const indentAttributes = MmlNode_def.indentAttributes;
const AbstractMmlNode = MmlNode_def.AbstractMmlNode;
const AbstractMmlTokenNode = MmlNode_def.AbstractMmlTokenNode;
const AbstractMmlLayoutNode = MmlNode_def.AbstractMmlLayoutNode;
const AbstractMmlBaseNode = MmlNode_def.AbstractMmlBaseNode;
const AbstractMmlEmptyNode = MmlNode_def.AbstractMmlEmptyNode;
const TextNode = MmlNode_def.TextNode;
const XMLNode = MmlNode_def.XMLNode;
;// ./components/mjs/input/tex/extensions/newcommand/lib/input/tex/newcommand/NewcommandUtil.js
const NewcommandUtil_def = MathJax._.input.tex.newcommand.NewcommandUtil;
const NewcommandTables = NewcommandUtil_def.NewcommandTables;
const NewcommandPriority = NewcommandUtil_def.NewcommandPriority;
const NewcommandUtil = NewcommandUtil_def.NewcommandUtil;
;// ./mjs/input/tex/ams/AmsMethods.js
function splitSideSet(mml) {
if (!mml || (mml.isInferred && mml.childNodes.length === 0)) {
return [null, null];
}
if (mml.isKind('msubsup') && checkSideSetBase(mml)) {
return [mml, null];
}
const child = NodeUtil.getChildAt(mml, 0);
if (!(mml.isInferred && child && checkSideSetBase(child))) {
return [null, mml];
}
mml.childNodes.splice(0, 1);
return [child, mml];
}
function checkSideSetBase(mml) {
const base = mml.childNodes[0];
return (base && base.isKind('mi') && base.getText() === '');
}
const AmsMethods = {
AmsEqnArray(parser, begin, numbered, taggable, align, balign, spacing, style) {
const args = parser.GetBrackets('\\begin{' + begin.getName() + '}');
const array = BaseMethods.EqnArray(parser, begin, numbered, taggable, align, balign, spacing, style);
return ParseUtil.setArrayAlign(array, args, parser);
},
AlignAt(parser, begin, numbered, taggable) {
const name = begin.getName();
let valign;
let align = '';
let balign = '';
const spacing = [];
if (!taggable) {
valign = parser.GetBrackets('\\begin{' + name + '}');
}
const n = parser.GetArgument('\\begin{' + name + '}');
if (n.match(/[^0-9]/)) {
throw new TexError('PositiveIntegerArg', 'Argument to %1 must be a positive integer', '\\begin{' + name + '}');
}
let count = parseInt(n, 10);
while (count > 0) {
align += 'rl';
balign += 'bt';
spacing.push('0em 0em');
count--;
}
const spaceStr = spacing.join(' ');
if (taggable) {
return AmsMethods.EqnArray(parser, begin, numbered, taggable, align, balign, spaceStr);
}
const array = AmsMethods.EqnArray(parser, begin, numbered, taggable, align, balign, spaceStr);
return ParseUtil.setArrayAlign(array, valign, parser);
},
Multline(parser, begin, numbered) {
ParseUtil.checkEqnEnv(parser);
parser.Push(begin);
const padding = parser.options.ams['multlineIndent'];
const item = parser.itemFactory.create('multline', numbered, parser.stack);
item.arraydef = {
displaystyle: true,
rowspacing: '.5em',
columnspacing: '100%',
width: parser.options.ams['multlineWidth'],
side: parser.options['tagSide'],
minlabelspacing: parser.options['tagIndent'],
'data-array-padding': `${padding} ${padding}`,
'data-width-includes-label': true,
};
return item;
},
XalignAt(parser, begin, numbered, padded) {
const n = parser.GetArgument('\\begin{' + begin.getName() + '}');
if (n.match(/[^0-9]/)) {
throw new TexError('PositiveIntegerArg', 'Argument to %1 must be a positive integer', '\\begin{' + begin.getName() + '}');
}
const align = padded ? 'crl' : 'rlc';
const balign = padded ? 'mbt' : 'btm';
const width = padded ? 'fit auto auto' : 'auto auto fit';
const item = AmsMethods.FlalignArray(parser, begin, numbered, padded, false, align, balign, width, true);
item.setProperty('xalignat', 2 * parseInt(n));
return item;
},
FlalignArray(parser, begin, numbered, padded, center, align, balign, width, zeroWidthLabel = false) {
ParseUtil.checkEqnEnv(parser);
parser.Push(begin);
align = align
.split('')
.join(' ')
.replace(/r/g, 'right')
.replace(/l/g, 'left')
.replace(/c/g, 'center');
balign = splitAlignArray(balign);
const item = parser.itemFactory.create('flalign', begin.getName(), numbered, padded, center, parser.stack);
item.arraydef = {
width: '100%',
displaystyle: true,
columnalign: align,
columnspacing: '0em',
columnwidth: width,
rowspacing: '3pt',
'data-break-align': balign,
side: parser.options['tagSide'],
minlabelspacing: zeroWidthLabel ? '0' : parser.options['tagIndent'],
'data-width-includes-label': true,
};
item.setProperty('zeroWidthLabel', zeroWidthLabel);
return item;
},
HandleDeclareOp(parser, name) {
const star = parser.GetStar() ? '*' : '';
const cs = NewcommandUtil.GetCsNameArgument(parser, name);
const op = parser.GetArgument(name);
NewcommandUtil.addMacro(parser, cs, AmsMethods.Macro, [
`\\operatorname${star}{${op}}`,
]);
parser.Push(parser.itemFactory.create('null'));
},
HandleOperatorName(parser, name) {
const star = parser.GetStar();
const op = UnitUtil.trimSpaces(parser.GetArgument(name));
let mml = new TexParser(op, Object.assign(Object.assign({}, parser.stack.env), { font: TexConstant.Variant.NORMAL, multiLetterIdentifiers: parser.options.ams.operatornamePattern, operatorLetters: true }), parser.configuration).mml();
if (!mml.isKind('mi')) {
mml = parser.create('node', 'TeXAtom', [mml]);
}
NodeUtil.setProperties(mml, {
movesupsub: star,
movablelimits: true,
texClass: TEXCLASS.OP,
});
if (!star) {
const c = parser.GetNext();
const i = parser.i;
if (c === '\\' && ++parser.i && parser.GetCS() !== 'limits') {
parser.i = i;
}
}
parser.Push(parser.itemFactory.create('fn', mml));
},
SideSet(parser, name) {
const [preScripts, preRest] = splitSideSet(parser.ParseArg(name));
const [postScripts, postRest] = splitSideSet(parser.ParseArg(name));
const base = parser.ParseArg(name);
let mml = base;
if (preScripts) {
if (preRest) {
preScripts.replaceChild(parser.create('node', 'mphantom', [
parser.create('node', 'mpadded', [ParseUtil.copyNode(base, parser)], { width: 0 }),
]), NodeUtil.getChildAt(preScripts, 0));
}
else {
mml = parser.create('node', 'mmultiscripts', [base]);
if (postScripts) {
NodeUtil.appendChildren(mml, [
NodeUtil.getChildAt(postScripts, 1) ||
parser.create('node', 'none'),
NodeUtil.getChildAt(postScripts, 2) ||
parser.create('node', 'none'),
]);
}
NodeUtil.setProperty(mml, 'scriptalign', 'left');
NodeUtil.appendChildren(mml, [
parser.create('node', 'mprescripts'),
NodeUtil.getChildAt(preScripts, 1) || parser.create('node', 'none'),
NodeUtil.getChildAt(preScripts, 2) || parser.create('node', 'none'),
]);
}
}
if (postScripts && mml === base) {
postScripts.replaceChild(base, NodeUtil.getChildAt(postScripts, 0));
mml = postScripts;
}
const mrow = parser.create('node', 'TeXAtom', [], {
texClass: TEXCLASS.OP,
movesupsub: true,
movablelimits: true,
});
if (preRest) {
if (preScripts) {
mrow.appendChild(preScripts);
}
mrow.appendChild(preRest);
}
mrow.appendChild(mml);
if (postRest) {
mrow.appendChild(postRest);
}
parser.Push(mrow);
},
operatorLetter(parser, c) {
return parser.stack.env.operatorLetters
? ParseMethods.variable(parser, c)
: false;
},
MultiIntegral(parser, name, integral) {
let next = parser.GetNext();
if (next === '\\') {
const i = parser.i;
next = parser.GetArgument(name);
parser.i = i;
if (next === '\\limits') {
integral = '\\!\\!\\mathop{\\,\\,' + integral + '}';
}
}
parser.string = integral + ' ' + parser.string.slice(parser.i);
parser.i = 0;
},
xArrow(parser, name, chr, l, r, m = 0) {
const def = {
width: '+' + UnitUtil.em((l + r) / 18),
lspace: UnitUtil.em(l / 18),
};
const bot = parser.GetBrackets(name);
const first = parser.ParseArg(name);
const dstrut = parser.create('node', 'mspace', [], { depth: '.2em' });
let arrow = parser.create('token', 'mo', { stretchy: true, texClass: TEXCLASS.REL }, String.fromCodePoint(chr));
if (m) {
arrow.attributes.set('minsize', UnitUtil.em(m));
}
arrow = parser.create('node', 'mstyle', [arrow], { scriptlevel: 0 });
const mml = parser.create('node', 'munderover', [arrow]);
let mpadded = parser.create('node', 'mpadded', [first, dstrut], def);
NodeUtil.setAttribute(mpadded, 'voffset', '-.2em');
NodeUtil.setAttribute(mpadded, 'height', '-.2em');
NodeUtil.setChild(mml, mml.over, mpadded);
if (bot) {
const bottom = new TexParser(bot, parser.stack.env, parser.configuration).mml();
const bstrut = parser.create('node', 'mspace', [], { height: '.75em' });
mpadded = parser.create('node', 'mpadded', [bottom, bstrut], def);
NodeUtil.setAttribute(mpadded, 'voffset', '.15em');
NodeUtil.setAttribute(mpadded, 'depth', '-.15em');
NodeUtil.setChild(mml, mml.under, mpadded);
}
NodeUtil.setProperty(mml, 'subsupOK', true);
parser.Push(mml);
},
HandleShove(parser, _name, shove) {
const top = parser.stack.Top();
if (top.kind !== 'multline') {
throw new TexError('CommandOnlyAllowedInEnv', '%1 only allowed in %2 environment', parser.currentCS, 'multline');
}
if (top.Size()) {
throw new TexError('CommandAtTheBeginingOfLine', '%1 must come at the beginning of the line', parser.currentCS);
}
top.setProperty('shove', shove);
},
CFrac(parser, name) {
let lr = UnitUtil.trimSpaces(parser.GetBrackets(name, ''));
const num = parser.GetArgument(name);
const den = parser.GetArgument(name);
const lrMap = {
l: TexConstant.Align.LEFT,
r: TexConstant.Align.RIGHT,
'': '',
};
const numNode = new TexParser('\\strut\\textstyle{' + num + '}', parser.stack.env, parser.configuration).mml();
const denNode = new TexParser('\\strut\\textstyle{' + den + '}', parser.stack.env, parser.configuration).mml();
const frac = parser.create('node', 'mfrac', [numNode, denNode]);
lr = lrMap[lr];
if (lr == null) {
throw new TexError('IllegalAlign', 'Illegal alignment specified in %1', parser.currentCS);
}
if (lr) {
NodeUtil.setProperties(frac, { numalign: lr, denomalign: lr });
}
parser.Push(frac);
},
Genfrac(parser, name, left, right, thick, style) {
if (left == null) {
left = parser.GetDelimiterArg(name);
}
if (right == null) {
right = parser.GetDelimiterArg(name);
}
if (thick == null) {
thick = parser.GetArgument(name);
}
if (style == null) {
style = UnitUtil.trimSpaces(parser.GetArgument(name));
}
const num = parser.ParseArg(name);
const den = parser.ParseArg(name);
let frac = parser.create('node', 'mfrac', [num, den]);
if (thick !== '') {
NodeUtil.setAttribute(frac, 'linethickness', thick);
}
if (left || right) {
NodeUtil.setProperty(frac, 'withDelims', true);
frac = ParseUtil.fixedFence(parser.configuration, left, frac, right);
}
if (style !== '') {
const styleDigit = parseInt(style, 10);
const styleAlpha = ['D', 'T', 'S', 'SS'][styleDigit];
if (styleAlpha == null) {
throw new TexError('BadMathStyleFor', 'Bad math style for %1', parser.currentCS);
}
frac = parser.create('node', 'mstyle', [frac]);
if (styleAlpha === 'D') {
NodeUtil.setProperties(frac, { displaystyle: true, scriptlevel: 0 });
}
else {
NodeUtil.setProperties(frac, {
displaystyle: false,
scriptlevel: styleDigit - 1,
});
}
}
parser.Push(frac);
},
HandleTag(parser, name) {
if (!parser.tags.currentTag.taggable && parser.tags.env) {
throw new TexError('CommandNotAllowedInEnv', '%1 not allowed in %2 environment', parser.currentCS, parser.tags.env);
}
if (parser.tags.currentTag.tag) {
throw new TexError('MultipleCommand', 'Multiple %1', parser.currentCS);
}
const star = parser.GetStar();
const tagId = UnitUtil.trimSpaces(parser.GetArgument(name));
parser.tags.tag(tagId, star);
parser.Push(parser.itemFactory.create('null'));
},
HandleNoTag: BaseMethods.HandleNoTag,
HandleRef: BaseMethods.HandleRef,
Macro: BaseMethods.Macro,
Accent: BaseMethods.Accent,
Tilde: BaseMethods.Tilde,
Array: BaseMethods.Array,
Spacer: BaseMethods.Spacer,
NamedOp: BaseMethods.NamedOp,
EqnArray: BaseMethods.EqnArray,
Equation: BaseMethods.Equation,
};
//# sourceMappingURL=AmsMethods.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/core/lib/util/lengths.js
const lengths_def = MathJax._.util.lengths;
const BIGDIMEN = lengths_def.BIGDIMEN;
const UNITS = lengths_def.UNITS;
const RELUNITS = lengths_def.RELUNITS;
const MATHSPACE = lengths_def.MATHSPACE;
const length2em = lengths_def.length2em;
const percent = lengths_def.percent;
const em = lengths_def.em;
const px = lengths_def.px;
;// ./mjs/input/tex/ams/AmsMappings.js
new CharacterMap('AMSmath-mathchar0mo', ParseMethods.mathchar0mo, {
iiiint: ['\u2A0C', { texClass: TEXCLASS.OP }],
});
new RegExpMap('AMSmath-operatorLetter', AmsMethods.operatorLetter, /[-*]/i);
new CommandMap('AMSmath-macros', {
mathring: [AmsMethods.Accent, '02DA'],
nobreakspace: AmsMethods.Tilde,
negmedspace: [AmsMethods.Spacer, MATHSPACE.negativemediummathspace],
negthickspace: [AmsMethods.Spacer, MATHSPACE.negativethickmathspace],
idotsint: [AmsMethods.MultiIntegral, '\\int\\cdots\\int'],
dddot: [AmsMethods.Accent, '20DB'],
ddddot: [AmsMethods.Accent, '20DC'],
sideset: AmsMethods.SideSet,
boxed: [AmsMethods.Macro, '\\fbox{$\\displaystyle{#1}$}', 1],
tag: AmsMethods.HandleTag,
notag: AmsMethods.HandleNoTag,
eqref: [AmsMethods.HandleRef, true],
substack: [AmsMethods.Macro, '\\begin{subarray}{c}#1\\end{subarray}', 1],
injlim: [AmsMethods.NamedOp, 'inj lim'],
projlim: [AmsMethods.NamedOp, 'proj lim'],
varliminf: [AmsMethods.Macro, '\\mathop{\\underline{\\mmlToken{mi}{lim}}}'],
varlimsup: [AmsMethods.Macro, '\\mathop{\\overline{\\mmlToken{mi}{lim}}}'],
varinjlim: [
AmsMethods.Macro,
'\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}}}',
],
varprojlim: [
AmsMethods.Macro,
'\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}}}',
],
DeclareMathOperator: AmsMethods.HandleDeclareOp,
operatorname: AmsMethods.HandleOperatorName,
genfrac: AmsMethods.Genfrac,
frac: [AmsMethods.Genfrac, '', '', '', ''],
tfrac: [AmsMethods.Genfrac, '', '', '', '1'],
dfrac: [AmsMethods.Genfrac, '', '', '', '0'],
binom: [AmsMethods.Genfrac, '(', ')', '0', ''],
tbinom: [AmsMethods.Genfrac, '(', ')', '0', '1'],
dbinom: [AmsMethods.Genfrac, '(', ')', '0', '0'],
cfrac: AmsMethods.CFrac,
shoveleft: [AmsMethods.HandleShove, TexConstant.Align.LEFT],
shoveright: [AmsMethods.HandleShove, TexConstant.Align.RIGHT],
xrightarrow: [AmsMethods.xArrow, 0x2192, 5, 10],
xleftarrow: [AmsMethods.xArrow, 0x2190, 10, 5],
});
new EnvironmentMap('AMSmath-environment', ParseMethods.environment, {
'equation*': [AmsMethods.Equation, null, false],
'eqnarray*': [
AmsMethods.EqnArray,
null,
false,
true,
'rcl',
'bmt',
ParseUtil.cols(0, MATHSPACE.thickmathspace),
'.5em',
],
align: [
AmsMethods.EqnArray,
null,
true,
true,
'rl',
'bt',
ParseUtil.cols(0, 2),
],
'align*': [
AmsMethods.EqnArray,
null,
false,
true,
'rl',
'bt',
ParseUtil.cols(0, 2),
],
multline: [AmsMethods.Multline, null, true],
'multline*': [AmsMethods.Multline, null, false],
split: [
AmsMethods.EqnArray,
null,
false,
false,
'rl',
'bt',
ParseUtil.cols(0),
],
gather: [AmsMethods.EqnArray, null, true, true, 'c', 'm'],
'gather*': [AmsMethods.EqnArray, null, false, true, 'c', 'm'],
alignat: [AmsMethods.AlignAt, null, true, true],
'alignat*': [AmsMethods.AlignAt, null, false, true],
alignedat: [AmsMethods.AlignAt, null, false, false],
aligned: [
AmsMethods.AmsEqnArray,
null,
null,
null,
'rl',
'bt',
ParseUtil.cols(0, 2),
'.5em',
'D',
],
gathered: [
AmsMethods.AmsEqnArray,
null,
null,
null,
'c',
'm',
null,
'.5em',
'D',
],
xalignat: [AmsMethods.XalignAt, null, true, true],
'xalignat*': [AmsMethods.XalignAt, null, false, true],
xxalignat: [AmsMethods.XalignAt, null, false, false],
flalign: [
AmsMethods.FlalignArray,
null,
true,
false,
true,
'rlc',
'btm',
'auto auto fit',
],
'flalign*': [
AmsMethods.FlalignArray,
null,
false,
false,
true,
'rlc',
'btm',
'auto auto fit',
],
subarray: [
AmsMethods.Array,
null,
null,
null,
null,
ParseUtil.cols(0),
'0.1em',
'S',
true,
],
smallmatrix: [
AmsMethods.Array,
null,
null,
null,
'c',
ParseUtil.cols(1 / 3),
'.2em',
'S',
true,
],
matrix: [AmsMethods.Array, null, null, null, 'c'],
pmatrix: [AmsMethods.Array, null, '(', ')', 'c'],
bmatrix: [AmsMethods.Array, null, '[', ']', 'c'],
Bmatrix: [AmsMethods.Array, null, '\\{', '\\}', 'c'],
vmatrix: [AmsMethods.Array, null, '\\vert', '\\vert', 'c'],
Vmatrix: [AmsMethods.Array, null, '\\Vert', '\\Vert', 'c'],
cases: [AmsMethods.Array, null, '\\{', '.', 'll', null, '.2em', 'T'],
});
new DelimiterMap('AMSmath-delimiter', ParseMethods.delimiter, {
'\\lvert': ['\u007C', { texClass: TEXCLASS.OPEN }],
'\\rvert': ['\u007C', { texClass: TEXCLASS.CLOSE }],
'\\lVert': ['\u2016', { texClass: TEXCLASS.OPEN }],
'\\rVert': ['\u2016', { texClass: TEXCLASS.CLOSE }],
});
new CharacterMap('AMSsymbols-mathchar0mi', ParseMethods.mathchar0mi, {
digamma: '\u03DD',
varkappa: '\u03F0',
varGamma: ['\u0393', { mathvariant: TexConstant.Variant.ITALIC }],
varDelta: ['\u0394', { mathvariant: TexConstant.Variant.ITALIC }],
varTheta: ['\u0398', { mathvariant: TexConstant.Variant.ITALIC }],
varLambda: ['\u039B', { mathvariant: TexConstant.Variant.ITALIC }],
varXi: ['\u039E', { mathvariant: TexConstant.Variant.ITALIC }],
varPi: ['\u03A0', { mathvariant: TexConstant.Variant.ITALIC }],
varSigma: ['\u03A3', { mathvariant: TexConstant.Variant.ITALIC }],
varUpsilon: ['\u03A5', { mathvariant: TexConstant.Variant.ITALIC }],
varPhi: ['\u03A6', { mathvariant: TexConstant.Variant.ITALIC }],
varPsi: ['\u03A8', { mathvariant: TexConstant.Variant.ITALIC }],
varOmega: ['\u03A9', { mathvariant: TexConstant.Variant.ITALIC }],
beth: '\u2136',
gimel: '\u2137',
daleth: '\u2138',
backprime: ['\u2035', { variantForm: true }],
hslash: '\u210F',
varnothing: ['\u2205', { variantForm: true }],
blacktriangle: '\u25B4',
triangledown: ['\u25BD', { variantForm: true }],
blacktriangledown: '\u25BE',
square: '\u25FB',
Box: '\u25FB',
blacksquare: '\u25FC',
lozenge: '\u25CA',
Diamond: '\u25CA',
blacklozenge: '\u29EB',
circledS: ['\u24C8', { mathvariant: TexConstant.Variant.NORMAL }],
bigstar: '\u2605',
sphericalangle: '\u2222',
measuredangle: '\u2221',
nexists: '\u2204',
complement: '\u2201',
mho: '\u2127',
eth: ['\u00F0', { mathvariant: TexConstant.Variant.NORMAL }],
Finv: '\u2132',
diagup: '\u2571',
Game: '\u2141',
diagdown: '\u2572',
Bbbk: ['\u006B', { mathvariant: TexConstant.Variant.DOUBLESTRUCK }],
yen: '\u00A5',
circledR: '\u00AE',
checkmark: '\u2713',
maltese: '\u2720',
});
new CharacterMap('AMSsymbols-mathchar0mo', ParseMethods.mathchar0mo, {
dotplus: '\u2214',
ltimes: '\u22C9',
smallsetminus: ['\u2216', { variantForm: true }],
rtimes: '\u22CA',
Cap: '\u22D2',
doublecap: '\u22D2',
leftthreetimes: '\u22CB',
Cup: '\u22D3',
doublecup: '\u22D3',
rightthreetimes: '\u22CC',
barwedge: '\u22BC',
curlywedge: '\u22CF',
veebar: '\u22BB',
curlyvee: '\u22CE',
doublebarwedge: '\u2A5E',
boxminus: '\u229F',
circleddash: '\u229D',
boxtimes: '\u22A0',
circledast: '\u229B',
boxdot: '\u22A1',
circledcirc: '\u229A',
boxplus: '\u229E',
centerdot: ['\u22C5', { variantForm: true }],
divideontimes: '\u22C7',
intercal: '\u22BA',
leqq: '\u2266',
geqq: '\u2267',
leqslant: '\u2A7D',
geqslant: '\u2A7E',
eqslantless: '\u2A95',
eqslantgtr: '\u2A96',
lesssim: '\u2272',
gtrsim: '\u2273',
lessapprox: '\u2A85',
gtrapprox: '\u2A86',
approxeq: '\u224A',
lessdot: '\u22D6',
gtrdot: '\u22D7',
lll: '\u22D8',
llless: '\u22D8',
ggg: '\u22D9',
gggtr: '\u22D9',
lessgtr: '\u2276',
gtrless: '\u2277',
lesseqgtr: '\u22DA',
gtreqless: '\u22DB',
lesseqqgtr: '\u2A8B',
gtreqqless: '\u2A8C',
doteqdot: '\u2251',
Doteq: '\u2251',
eqcirc: '\u2256',
risingdotseq: '\u2253',
circeq: '\u2257',
fallingdotseq: '\u2252',
triangleq: '\u225C',
backsim: '\u223D',
thicksim: ['\u223C', { variantForm: true }],
backsimeq: '\u22CD',
thickapprox: ['\u2248', { variantForm: true }],
subseteqq: '\u2AC5',
supseteqq: '\u2AC6',
Subset: '\u22D0',
Supset: '\u22D1',
sqsubset: '\u228F',
sqsupset: '\u2290',
preccurlyeq: '\u227C',
succcurlyeq: '\u227D',
curlyeqprec: '\u22DE',
curlyeqsucc: '\u22DF',
precsim: '\u227E',
succsim: '\u227F',
precapprox: '\u2AB7',
succapprox: '\u2AB8',
vartriangleleft: '\u22B2',
lhd: '\u22B2',
vartriangleright: '\u22B3',
rhd: '\u22B3',
trianglelefteq: '\u22B4',
unlhd: '\u22B4',
trianglerighteq: '\u22B5',
unrhd: '\u22B5',
vDash: '\u22A8',
Vdash: '\u22A9',
Vvdash: '\u22AA',
smallsmile: ['\u2323', { variantForm: true }],
shortmid: ['\u2223', { variantForm: true }],
smallfrown: ['\u2322', { variantForm: true }],
shortparallel: ['\u2225', { variantForm: true }],
bumpeq: '\u224F',
between: '\u226C',
Bumpeq: '\u224E',
pitchfork: '\u22D4',
varpropto: ['\u221D', { variantForm: true }],
backepsilon: '\u220D',
blacktriangleleft: '\u25C2',
blacktriangleright: '\u25B8',
therefore: '\u2234',
because: '\u2235',
eqsim: '\u2242',
vartriangle: ['\u25B3', { variantForm: true }],
Join: '\u22C8',
nless: '\u226E',
ngtr: '\u226F',
nleq: '\u2270',
ngeq: '\u2271',
nleqslant: ['\u2A87', { variantForm: true }],
ngeqslant: ['\u2A88', { variantForm: true }],
nleqq: ['\u2270', { variantForm: true }],
ngeqq: ['\u2271', { variantForm: true }],
lneq: '\u2A87',
gneq: '\u2A88',
lneqq: '\u2268',
gneqq: '\u2269',
lvertneqq: ['\u2268', { variantForm: true }],
gvertneqq: ['\u2269', { variantForm: true }],
lnsim: '\u22E6',
gnsim: '\u22E7',
lnapprox: '\u2A89',
gnapprox: '\u2A8A',
nprec: '\u2280',
nsucc: '\u2281',
npreceq: ['\u22E0', { variantForm: true }],
nsucceq: ['\u22E1', { variantForm: true }],
precneqq: '\u2AB5',
succneqq: '\u2AB6',
precnsim: '\u22E8',
succnsim: '\u22E9',
precnapprox: '\u2AB9',
succnapprox: '\u2ABA',
nsim: '\u2241',
ncong: '\u2247',
nshortmid: ['\u2224', { variantForm: true }],
nshortparallel: ['\u2226', { variantForm: true }],
nmid: '\u2224',
nparallel: '\u2226',
nvdash: '\u22AC',
nvDash: '\u22AD',
nVdash: '\u22AE',
nVDash: '\u22AF',
ntriangleleft: '\u22EA',
ntriangleright: '\u22EB',
ntrianglelefteq: '\u22EC',
ntrianglerighteq: '\u22ED',
nsubseteq: '\u2288',
nsupseteq: '\u2289',
nsubseteqq: ['\u2288', { variantForm: true }],
nsupseteqq: ['\u2289', { variantForm: true }],
subsetneq: '\u228A',
supsetneq: '\u228B',
varsubsetneq: ['\u228A', { variantForm: true }],
varsupsetneq: ['\u228B', { variantForm: true }],
subsetneqq: '\u2ACB',
supsetneqq: '\u2ACC',
varsubsetneqq: ['\u2ACB', { variantForm: true }],
varsupsetneqq: ['\u2ACC', { variantForm: true }],
leftleftarrows: '\u21C7',
rightrightarrows: '\u21C9',
leftrightarrows: '\u21C6',
rightleftarrows: '\u21C4',
Lleftarrow: '\u21DA',
Rrightarrow: '\u21DB',
twoheadleftarrow: '\u219E',
twoheadrightarrow: '\u21A0',
leftarrowtail: '\u21A2',
rightarrowtail: '\u21A3',
looparrowleft: '\u21AB',
looparrowright: '\u21AC',
leftrightharpoons: '\u21CB',
rightleftharpoons: ['\u21CC', { variantForm: true }],
curvearrowleft: '\u21B6',
curvearrowright: '\u21B7',
circlearrowleft: '\u21BA',
circlearrowright: '\u21BB',
Lsh: '\u21B0',
Rsh: '\u21B1',
upuparrows: '\u21C8',
downdownarrows: '\u21CA',
upharpoonleft: '\u21BF',
upharpoonright: '\u21BE',
downharpoonleft: '\u21C3',
restriction: '\u21BE',
multimap: '\u22B8',
downharpoonright: '\u21C2',
leftrightsquigarrow: '\u21AD',
rightsquigarrow: '\u21DD',
leadsto: '\u21DD',
dashrightarrow: '\u21E2',
dashleftarrow: '\u21E0',
nleftarrow: '\u219A',
nrightarrow: '\u219B',
nLeftarrow: '\u21CD',
nRightarrow: '\u21CF',
nleftrightarrow: '\u21AE',
nLeftrightarrow: '\u21CE',
});
new DelimiterMap('AMSsymbols-delimiter', ParseMethods.delimiter, {
'\\ulcorner': '\u231C',
'\\urcorner': '\u231D',
'\\llcorner': '\u231E',
'\\lrcorner': '\u231F',
});
new CommandMap('AMSsymbols-macros', {
implies: [AmsMethods.Macro, '\\;\\Longrightarrow\\;'],
impliedby: [AmsMethods.Macro, '\\;\\Longleftarrow\\;'],
});
//# sourceMappingURL=AmsMappings.js.map
;// ./components/mjs/input/tex/extensions/newcommand/lib/input/tex/newcommand/NewcommandConfiguration.js
const NewcommandConfiguration_def = MathJax._.input.tex.newcommand.NewcommandConfiguration;
const NewcommandConfig = NewcommandConfiguration_def.NewcommandConfig;
const NewcommandConfiguration = NewcommandConfiguration_def.NewcommandConfiguration;
;// ./mjs/input/tex/ams/AmsConfiguration.js
class AmsTags extends AbstractTags {
}
const AmsConfiguration = Configuration.create('ams', {
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['AMSmath-operatorLetter'],
[HandlerType.DELIMITER]: ['AMSsymbols-delimiter', 'AMSmath-delimiter'],
[HandlerType.MACRO]: [
'AMSsymbols-mathchar0mi',
'AMSsymbols-mathchar0mo',
'AMSsymbols-delimiter',
'AMSsymbols-macros',
'AMSmath-mathchar0mo',
'AMSmath-macros',
'AMSmath-delimiter',
],
[HandlerType.ENVIRONMENT]: ['AMSmath-environment'],
},
[ConfigurationType.ITEMS]: {
[MultlineItem.prototype.kind]: MultlineItem,
[FlalignItem.prototype.kind]: FlalignItem,
},
[ConfigurationType.TAGS]: { ams: AmsTags },
[ConfigurationType.OPTIONS]: {
multlineWidth: '',
ams: {
operatornamePattern: /^[-*a-zA-Z]+/,
multlineWidth: '100%',
multlineIndent: '1em',
},
},
[ConfigurationType.CONFIG]: NewcommandConfig,
});
//# sourceMappingURL=AmsConfiguration.js.map
;// ./components/mjs/input/tex/extensions/ams/lib/ams.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/ams', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
ams: {
AmsConfiguration: AmsConfiguration_namespaceObject,
AmsItems: AmsItems_namespaceObject,
AmsMethods: AmsMethods_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/ams/ams.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/amscd.js 0000644 0001762 0000144 00000026327 15112352625 023045 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/amscd/AmsCdMethods.js
var AmsCdMethods_namespaceObject = {};
__webpack_require__.r(AmsCdMethods_namespaceObject);
__webpack_require__.d(AmsCdMethods_namespaceObject, {
"default": () => (amscd_AmsCdMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/amscd/AmsCdConfiguration.js
var AmsCdConfiguration_namespaceObject = {};
__webpack_require__.r(AmsCdConfiguration_namespaceObject);
__webpack_require__.d(AmsCdConfiguration_namespaceObject, {
AmsCdConfiguration: () => (AmsCdConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseMethods.js
const ParseMethods_def = MathJax._.input.tex.ParseMethods;
/* harmony default export */ const ParseMethods = (ParseMethods_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexParser.js
const TexParser_def = MathJax._.input.tex.TexParser;
/* harmony default export */ const TexParser = (TexParser_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseConfiguration.js
const BaseConfiguration_def = MathJax._.input.tex.base.BaseConfiguration;
const Other = BaseConfiguration_def.Other;
const BaseTags = BaseConfiguration_def.BaseTags;
const BaseConfiguration = BaseConfiguration_def.BaseConfiguration;
;// ./components/mjs/core/lib/core/MmlTree/MmlNode.js
const MmlNode_def = MathJax._.core.MmlTree.MmlNode;
const TEXCLASS = MmlNode_def.TEXCLASS;
const TEXCLASSNAMES = MmlNode_def.TEXCLASSNAMES;
const MATHVARIANTS = MmlNode_def.MATHVARIANTS;
const indentAttributes = MmlNode_def.indentAttributes;
const AbstractMmlNode = MmlNode_def.AbstractMmlNode;
const AbstractMmlTokenNode = MmlNode_def.AbstractMmlTokenNode;
const AbstractMmlLayoutNode = MmlNode_def.AbstractMmlLayoutNode;
const AbstractMmlBaseNode = MmlNode_def.AbstractMmlBaseNode;
const AbstractMmlEmptyNode = MmlNode_def.AbstractMmlEmptyNode;
const TextNode = MmlNode_def.TextNode;
const XMLNode = MmlNode_def.XMLNode;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./mjs/input/tex/amscd/AmsCdMethods.js
const AmsCdMethods = {
CD(parser, begin) {
parser.Push(begin);
const item = parser.itemFactory.create('array');
const options = parser.configuration.options.amscd;
item.setProperties({
minw: parser.stack.env.CD_minw || options.harrowsize,
minh: parser.stack.env.CD_minh || options.varrowsize,
});
item.arraydef = {
columnalign: 'center',
columnspacing: options.colspace,
rowspacing: options.rowspace,
displaystyle: true,
};
return item;
},
arrow(parser, name) {
const c = parser.string.charAt(parser.i);
if (!c.match(/[>': '\u2192',
'<': '\u2190',
V: '\u2193',
A: '\u2191',
}[c];
let a = parser.GetUpTo(name + c, c);
const b = parser.GetUpTo(name + c, c);
if (c === '>' || c === '<') {
mml = parser.create('token', 'mo', hdef, arrow);
if (!a) {
a = '\\kern ' + top.getProperty('minw');
}
const pad = { width: '+.67em', lspace: '.33em' };
mml = parser.create('node', 'munderover', [mml]);
const nodeA = new TexParser(a, parser.stack.env, parser.configuration).mml();
const mpadded = parser.create('node', 'mpadded', [nodeA], pad);
NodeUtil.setAttribute(mpadded, 'voffset', '.1em');
NodeUtil.setChild(mml, mml.over, mpadded);
if (b) {
const nodeB = new TexParser(b, parser.stack.env, parser.configuration).mml();
NodeUtil.setChild(mml, mml.under, parser.create('node', 'mpadded', [nodeB], pad));
}
if (parser.configuration.options.amscd.hideHorizontalLabels) {
mml = parser.create('node', 'mpadded', [mml], {
depth: 0,
height: '.67em',
});
}
}
else {
const arrowNode = parser.create('token', 'mo', vdef, arrow);
mml = arrowNode;
if (a || b) {
mml = parser.create('node', 'mrow');
if (a) {
NodeUtil.appendChildren(mml, [
new TexParser('\\scriptstyle\\llap{' + a + '}', parser.stack.env, parser.configuration).mml(),
]);
}
arrowNode.texClass = TEXCLASS.ORD;
NodeUtil.appendChildren(mml, [arrowNode]);
if (b) {
NodeUtil.appendChildren(mml, [
new TexParser('\\scriptstyle\\rlap{' + b + '}', parser.stack.env, parser.configuration).mml(),
]);
}
}
}
}
if (mml) {
parser.Push(mml);
}
AmsCdMethods.cell(parser, name);
},
cell(parser, name) {
const top = parser.stack.Top();
if ((top.table || []).length % 2 === 0 && (top.row || []).length === 0) {
parser.Push(parser.create('node', 'mpadded', [], { height: '8.5pt', depth: '2pt' }));
}
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isEntry: true, name: name }));
},
minCDarrowwidth(parser, name) {
parser.stack.env.CD_minw = parser.GetDimen(name);
},
minCDarrowheight(parser, name) {
parser.stack.env.CD_minh = parser.GetDimen(name);
},
};
/* harmony default export */ const amscd_AmsCdMethods = (AmsCdMethods);
//# sourceMappingURL=AmsCdMethods.js.map
;// ./mjs/input/tex/amscd/AmsCdMappings.js
new EnvironmentMap('amscd_environment', ParseMethods.environment, {
CD: amscd_AmsCdMethods.CD,
});
new CommandMap('amscd_macros', {
minCDarrowwidth: amscd_AmsCdMethods.minCDarrowwidth,
minCDarrowheight: amscd_AmsCdMethods.minCDarrowheight,
});
new MacroMap('amscd_special', { '@': amscd_AmsCdMethods.arrow });
//# sourceMappingURL=AmsCdMappings.js.map
;// ./mjs/input/tex/amscd/AmsCdConfiguration.js
const AmsCdConfiguration = Configuration.create('amscd', {
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['amscd_special'],
[HandlerType.MACRO]: ['amscd_macros'],
[HandlerType.ENVIRONMENT]: ['amscd_environment'],
},
[ConfigurationType.OPTIONS]: {
amscd: {
colspace: '5pt',
rowspace: '5pt',
harrowsize: '2.75em',
varrowsize: '1.75em',
hideHorizontalLabels: false,
},
},
});
//# sourceMappingURL=AmsCdConfiguration.js.map
;// ./components/mjs/input/tex/extensions/amscd/lib/amscd.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/amscd', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
amscd: {
AmsCdConfiguration: AmsCdConfiguration_namespaceObject,
AmsCdMethods: AmsCdMethods_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/amscd/amscd.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/cancel.js 0000644 0001762 0000144 00000014223 15112352637 023176 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/cancel/CancelConfiguration.js
var CancelConfiguration_namespaceObject = {};
__webpack_require__.r(CancelConfiguration_namespaceObject);
__webpack_require__.d(CancelConfiguration_namespaceObject, {
CancelConfiguration: () => (CancelConfiguration),
CancelMethods: () => (CancelMethods)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TexConstants.js
const TexConstants_def = MathJax._.input.tex.TexConstants;
const TexConstant = TexConstants_def.TexConstant;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/input/tex/extensions/enclose/lib/input/tex/enclose/EncloseConfiguration.js
const EncloseConfiguration_def = MathJax._.input.tex.enclose.EncloseConfiguration;
const ENCLOSE_OPTIONS = EncloseConfiguration_def.ENCLOSE_OPTIONS;
const EncloseMethods = EncloseConfiguration_def.EncloseMethods;
const EncloseConfiguration = EncloseConfiguration_def.EncloseConfiguration;
;// ./mjs/input/tex/cancel/CancelConfiguration.js
const CancelMethods = {
Cancel(parser, name, notation) {
const attr = parser.GetBrackets(name, '');
const math = parser.ParseArg(name);
const def = ParseUtil.keyvalOptions(attr, ENCLOSE_OPTIONS);
def['notation'] = notation;
parser.Push(parser.create('node', 'menclose', [math], def));
},
CancelTo(parser, name) {
const attr = parser.GetBrackets(name, '');
let value = parser.ParseArg(name);
const math = parser.ParseArg(name);
const def = ParseUtil.keyvalOptions(attr, ENCLOSE_OPTIONS);
def['notation'] = [
TexConstant.Notation.UPDIAGONALSTRIKE,
TexConstant.Notation.UPDIAGONALARROW,
TexConstant.Notation.NORTHEASTARROW,
].join(' ');
value = parser.create('node', 'mpadded', [value], {
depth: '-.1em',
height: '+.1em',
voffset: '.1em',
});
parser.Push(parser.create('node', 'msup', [
parser.create('node', 'menclose', [math], def),
value,
]));
},
};
new CommandMap('cancel', {
cancel: [CancelMethods.Cancel, TexConstant.Notation.UPDIAGONALSTRIKE],
bcancel: [CancelMethods.Cancel, TexConstant.Notation.DOWNDIAGONALSTRIKE],
xcancel: [
CancelMethods.Cancel,
TexConstant.Notation.UPDIAGONALSTRIKE +
' ' +
TexConstant.Notation.DOWNDIAGONALSTRIKE,
],
cancelto: CancelMethods.CancelTo,
});
const CancelConfiguration = Configuration.create('cancel', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['cancel'] },
});
//# sourceMappingURL=CancelConfiguration.js.map
;// ./components/mjs/input/tex/extensions/cancel/lib/cancel.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/cancel', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
cancel: {
CancelConfiguration: CancelConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/cancel/cancel.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/action.js 0000644 0001762 0000144 00000012200 15112352623 023212 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/action/ActionConfiguration.js
var ActionConfiguration_namespaceObject = {};
__webpack_require__.r(ActionConfiguration_namespaceObject);
__webpack_require__.d(ActionConfiguration_namespaceObject, {
ActionConfiguration: () => (ActionConfiguration),
ActionMethods: () => (ActionMethods)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TexParser.js
const TexParser_def = MathJax._.input.tex.TexParser;
/* harmony default export */ const TexParser = (TexParser_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./mjs/input/tex/action/ActionConfiguration.js
const ActionMethods = {
Toggle(parser, name) {
const children = [];
let arg;
while ((arg = parser.GetArgument(name)) !== '\\endtoggle') {
children.push(new TexParser(arg, parser.stack.env, parser.configuration).mml());
}
parser.Push(parser.create('node', 'maction', children, { actiontype: 'toggle' }));
},
Mathtip(parser, name) {
const arg = parser.ParseArg(name);
const tip = parser.ParseArg(name);
parser.Push(parser.create('node', 'maction', [arg, tip], { actiontype: 'tooltip' }));
},
Macro: BaseMethods.Macro,
};
new CommandMap('action-macros', {
toggle: ActionMethods.Toggle,
mathtip: ActionMethods.Mathtip,
texttip: [ActionMethods.Macro, '\\mathtip{#1}{\\text{#2}}', 2],
});
const ActionConfiguration = Configuration.create('action', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['action-macros'] },
});
//# sourceMappingURL=ActionConfiguration.js.map
;// ./components/mjs/input/tex/extensions/action/lib/action.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/action', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
action: {
ActionConfiguration: ActionConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/action/action.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/units.js 0000644 0001762 0000144 00000013306 15112352675 023116 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/units/UnitsConfiguration.js
var UnitsConfiguration_namespaceObject = {};
__webpack_require__.r(UnitsConfiguration_namespaceObject);
__webpack_require__.d(UnitsConfiguration_namespaceObject, {
UnitsConfiguration: () => (UnitsConfiguration),
UnitsMethods: () => (UnitsMethods)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TexParser.js
const TexParser_def = MathJax._.input.tex.TexParser;
/* harmony default export */ const TexParser = (TexParser_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./mjs/input/tex/units/UnitsConfiguration.js
const UnitsMethods = {
Unit(parser, name) {
const val = parser.GetBrackets(name);
const dim = parser.GetArgument(name);
let macro = `\\mathrm{${dim}}`;
if (val) {
macro = val + (parser.options.units.loose ? '~' : '\\,') + macro;
}
parser.string = macro + parser.string.slice(parser.i);
parser.i = 0;
},
UnitFrac(parser, name) {
const val = parser.GetBrackets(name);
const num = parser.GetArgument(name);
const den = parser.GetArgument(name);
let macro = `\\nicefrac[\\mathrm]{${num}}{${den}}`;
if (val) {
macro = val + (parser.options.units.loose ? '~' : '\\,') + macro;
}
parser.string = macro + parser.string.slice(parser.i);
parser.i = 0;
},
NiceFrac(parser, name) {
const font = parser.GetBrackets(name, '\\mathrm');
const num = parser.GetArgument(name);
const den = parser.GetArgument(name);
const numMml = new TexParser(`${font}{${num}}`, Object.assign({}, parser.stack.env), parser.configuration).mml();
const denMml = new TexParser(`${font}{${den}}`, Object.assign({}, parser.stack.env), parser.configuration).mml();
const def = parser.options.units.ugly ? {} : { bevelled: true };
const node = parser.create('node', 'mfrac', [numMml, denMml], def);
parser.Push(node);
},
};
new CommandMap('units', {
units: UnitsMethods.Unit,
unitfrac: UnitsMethods.UnitFrac,
nicefrac: UnitsMethods.NiceFrac,
});
const UnitsConfiguration = Configuration.create('units', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['units'] },
[ConfigurationType.OPTIONS]: {
units: {
loose: false,
ugly: false,
},
},
});
//# sourceMappingURL=UnitsConfiguration.js.map
;// ./components/mjs/input/tex/extensions/units/lib/units.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/units', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
units: {
UnitsConfiguration: UnitsConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/units/units.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/colorv2.js 0000644 0001762 0000144 00000010657 15112352645 023345 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/colorv2/ColorV2Configuration.js
var ColorV2Configuration_namespaceObject = {};
__webpack_require__.r(ColorV2Configuration_namespaceObject);
__webpack_require__.d(ColorV2Configuration_namespaceObject, {
ColorConfiguration: () => (ColorConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./mjs/input/tex/colorv2/ColorV2Configuration.js
const ColorV2Methods = {
Color(parser, name) {
const color = parser.GetArgument(name);
const old = parser.stack.env['color'];
parser.stack.env['color'] = color;
const math = parser.ParseArg(name);
if (old) {
parser.stack.env['color'] = old;
}
else {
delete parser.stack.env['color'];
}
const node = parser.create('node', 'mstyle', [math], { mathcolor: color });
parser.Push(node);
},
};
new CommandMap('colorv2', { color: ColorV2Methods.Color });
const ColorConfiguration = Configuration.create('colorv2', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['colorv2'] },
});
//# sourceMappingURL=ColorV2Configuration.js.map
;// ./components/mjs/input/tex/extensions/colorv2/lib/colorv2.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/colorv2', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
colorv2: {
ColorV2Configuration: ColorV2Configuration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/colorv2/colorv2.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/centernot.js 0000644 0001762 0000144 00000013454 15112352642 023753 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/centernot/CenternotConfiguration.js
var CenternotConfiguration_namespaceObject = {};
__webpack_require__.r(CenternotConfiguration_namespaceObject);
__webpack_require__.d(CenternotConfiguration_namespaceObject, {
CenternotConfiguration: () => (CenternotConfiguration),
filterCenterOver: () => (filterCenterOver)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TexParser.js
const TexParser_def = MathJax._.input.tex.TexParser;
/* harmony default export */ const TexParser = (TexParser_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./mjs/input/tex/centernot/CenternotConfiguration.js
function CenterOver(parser, name) {
const arg = '{' + parser.GetArgument(name) + '}';
const over = parser.ParseArg(name);
const base = new TexParser(arg, parser.stack.env, parser.configuration).mml();
const mml = parser.create('node', 'TeXAtom', [
new TexParser(arg, parser.stack.env, parser.configuration).mml(),
parser.create('node', 'mpadded', [
parser.create('node', 'mpadded', [over], {
width: 0,
lspace: '-.5width',
}),
parser.create('node', 'mphantom', [base]),
], { width: 0, lspace: '-.5width' }),
]);
parser.configuration.addNode('centerOver', base);
parser.Push(mml);
}
new CommandMap('centernot', {
centerOver: CenterOver,
centernot: [BaseMethods.Macro, '\\centerOver{#1}{{\u29F8}}', 1],
});
function filterCenterOver({ data }) {
for (const base of data.getList('centerOver')) {
const texClass = NodeUtil.getTexClass(base.childNodes[0].childNodes[0]);
if (texClass !== null) {
NodeUtil.setProperties(base.parent.parent.parent.parent.parent.parent, {
texClass,
});
}
}
}
const CenternotConfiguration = Configuration.create('centernot', {
[ConfigurationType.HANDLER]: { macro: ['centernot'] },
[ConfigurationType.POSTPROCESSORS]: [filterCenterOver],
});
//# sourceMappingURL=CenternotConfiguration.js.map
;// ./components/mjs/input/tex/extensions/centernot/lib/centernot.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/centernot', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
centernot: {
CenternotConfiguration: CenternotConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/centernot/centernot.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/bussproofs.js 0000644 0001762 0000144 00000071103 15112352636 024155 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/bussproofs/BussproofsUtil.js
var BussproofsUtil_namespaceObject = {};
__webpack_require__.r(BussproofsUtil_namespaceObject);
__webpack_require__.d(BussproofsUtil_namespaceObject, {
balanceRules: () => (balanceRules),
clearDocument: () => (clearDocument),
getProperty: () => (getProperty),
makeBsprAttributes: () => (makeBsprAttributes),
removeProperty: () => (removeProperty),
saveDocument: () => (saveDocument),
setProperty: () => (setProperty)
});
// NAMESPACE OBJECT: ./mjs/input/tex/bussproofs/BussproofsItems.js
var BussproofsItems_namespaceObject = {};
__webpack_require__.r(BussproofsItems_namespaceObject);
__webpack_require__.d(BussproofsItems_namespaceObject, {
ProofTreeItem: () => (ProofTreeItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/bussproofs/BussproofsMethods.js
var BussproofsMethods_namespaceObject = {};
__webpack_require__.r(BussproofsMethods_namespaceObject);
__webpack_require__.d(BussproofsMethods_namespaceObject, {
"default": () => (bussproofs_BussproofsMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/bussproofs/BussproofsConfiguration.js
var BussproofsConfiguration_namespaceObject = {};
__webpack_require__.r(BussproofsConfiguration_namespaceObject);
__webpack_require__.d(BussproofsConfiguration_namespaceObject, {
BussproofsConfiguration: () => (BussproofsConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/StackItem.js
const StackItem_def = MathJax._.input.tex.StackItem;
const MmlStack = StackItem_def.MmlStack;
const BaseItem = StackItem_def.BaseItem;
;// ./components/mjs/input/tex-base/lib/input/tex/Stack.js
const Stack_def = MathJax._.input.tex.Stack;
/* harmony default export */ const Stack = (Stack_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/UnitUtil.js
const UnitUtil_def = MathJax._.input.tex.UnitUtil;
const UnitUtil = UnitUtil_def.UnitUtil;
;// ./mjs/input/tex/bussproofs/BussproofsUtil.js
let doc = null;
let item = null;
const getBBox = function (node) {
item.root = node;
const { w: width } = doc.outputJax.getBBox(item, doc);
return width;
};
const getRule = function (node) {
let i = 0;
while (node && !NodeUtil.isType(node, 'mtable')) {
if (NodeUtil.isType(node, 'text')) {
return null;
}
if (NodeUtil.isType(node, 'mrow')) {
node = node.childNodes[0];
i = 0;
continue;
}
node = node.parent.childNodes[i];
i++;
}
return node;
};
const getPremises = function (rule, direction) {
return rule.childNodes[direction === 'up' ? 1 : 0].childNodes[0].childNodes[0]
.childNodes[0].childNodes[0];
};
const getPremise = function (premises, n) {
return premises.childNodes[n].childNodes[0].childNodes[0];
};
const firstPremise = function (premises) {
return getPremise(premises, 0);
};
const lastPremise = function (premises) {
return getPremise(premises, premises.childNodes.length - 1);
};
const getConclusion = function (rule, direction) {
return rule.childNodes[direction === 'up' ? 0 : 1].childNodes[0].childNodes[0]
.childNodes[0];
};
const getColumn = function (inf) {
while (inf && !NodeUtil.isType(inf, 'mtd')) {
inf = inf.parent;
}
return inf;
};
const nextSibling = function (inf) {
return inf.parent.childNodes[inf.parent.childNodes.indexOf(inf) + 1];
};
const _previousSibling = function (inf) {
return inf.parent.childNodes[inf.parent.childNodes.indexOf(inf) - 1];
};
const getParentInf = function (inf) {
while (inf && getProperty(inf, 'inference') == null) {
inf = inf.parent;
}
return inf;
};
const getSpaces = function (inf, rule, right = false) {
let result = 0;
if (inf === rule) {
return result;
}
if (inf !== rule.parent) {
const children = inf.childNodes;
const index = right ? children.length - 1 : 0;
if (NodeUtil.isType(children[index], 'mspace')) {
result += getBBox(children[index]);
}
inf = rule.parent;
}
if (inf === rule) {
return result;
}
const children = inf.childNodes;
const index = right ? children.length - 1 : 0;
if (children[index] !== rule) {
result += getBBox(children[index]);
}
return result;
};
const adjustValue = function (inf, right = false) {
const rule = getRule(inf);
const conc = getConclusion(rule, getProperty(rule, 'inferenceRule'));
const w = getSpaces(inf, rule, right);
const x = getBBox(rule);
const y = getBBox(conc);
return w + (x - y) / 2;
};
const addSpace = function (config, inf, space, right = false) {
if (space === 0)
return;
if (getProperty(inf, 'inferenceRule') || getProperty(inf, 'labelledRule')) {
const mrow = config.nodeFactory.create('node', 'mrow');
inf.parent.replaceChild(mrow, inf);
mrow.setChildren([inf]);
moveProperties(inf, mrow);
inf = mrow;
}
const index = right ? inf.childNodes.length - 1 : 0;
let mspace = inf.childNodes[index];
if (NodeUtil.isType(mspace, 'mspace')) {
NodeUtil.setAttribute(mspace, 'width', UnitUtil.em(UnitUtil.dimen2em(NodeUtil.getAttribute(mspace, 'width')) +
space));
return;
}
mspace = config.nodeFactory.create('node', 'mspace', [], {
width: UnitUtil.em(space),
});
if (right) {
inf.appendChild(mspace);
return;
}
mspace.parent = inf;
inf.childNodes.unshift(mspace);
};
const moveProperties = function (src, dest) {
const props = ['inference', 'proof', 'labelledRule'];
props.forEach((x) => {
const value = getProperty(src, x);
if (value != null) {
setProperty(dest, x, value);
removeProperty(src, x);
}
});
};
const adjustSequents = function (config) {
const sequents = config.nodeLists['sequent'];
if (!sequents) {
return;
}
for (let i = sequents.length - 1, seq; (seq = sequents[i]); i--) {
if (getProperty(seq, 'sequentProcessed')) {
removeProperty(seq, 'sequentProcessed');
continue;
}
const collect = [];
let inf = getParentInf(seq);
if (getProperty(inf, 'inference') !== 1) {
continue;
}
collect.push(seq);
while (getProperty(inf, 'inference') === 1) {
inf = getRule(inf);
const premise = firstPremise(getPremises(inf, getProperty(inf, 'inferenceRule')));
const sequent = getProperty(premise, 'inferenceRule')
?
getConclusion(premise, getProperty(premise, 'inferenceRule'))
:
premise;
if (getProperty(sequent, 'sequent')) {
seq = sequent.childNodes[0];
collect.push(seq);
setProperty(seq, 'sequentProcessed', true);
}
inf = premise;
}
adjustSequentPairwise(config, collect);
}
};
const addSequentSpace = function (config, sequent, position, direction, width) {
const mspace = config.nodeFactory.create('node', 'mspace', [], {
width: UnitUtil.em(width),
});
if (direction === 'left') {
const row = sequent.childNodes[position].childNodes[0];
mspace.parent = row;
row.childNodes.unshift(mspace);
}
else {
sequent.childNodes[position].appendChild(mspace);
}
setProperty(sequent.parent, 'sequentAdjust_' + direction, width);
};
const adjustSequentPairwise = function (config, sequents) {
let top = sequents.pop();
while (sequents.length) {
const bottom = sequents.pop();
const [left, right] = compareSequents(top, bottom);
if (getProperty(top.parent, 'axiom')) {
addSequentSpace(config, left < 0 ? top : bottom, 0, 'left', Math.abs(left));
addSequentSpace(config, right < 0 ? top : bottom, 2, 'right', Math.abs(right));
}
top = bottom;
}
};
const compareSequents = function (top, bottom) {
const tr = getBBox(top.childNodes[2]);
const br = getBBox(bottom.childNodes[2]);
const tl = getBBox(top.childNodes[0]);
const bl = getBBox(bottom.childNodes[0]);
const dl = tl - bl;
const dr = tr - br;
return [dl, dr];
};
const balanceRules = function (arg) {
item = new arg.document.options.MathItem('', null, arg.math.display);
const config = arg.data;
adjustSequents(config);
const inferences = config.nodeLists['inference'] || [];
let maxAdjust = 0;
for (const inf of inferences) {
const isProof = getProperty(inf, 'proof');
const rule = getRule(inf);
const premises = getPremises(rule, getProperty(rule, 'inferenceRule'));
const premiseF = firstPremise(premises);
let leftAdjust = 0;
if (getProperty(premiseF, 'inference')) {
const adjust = adjustValue(premiseF);
if (adjust) {
addSpace(config, premiseF, -adjust);
const w = getSpaces(inf, rule, false);
addSpace(config, inf, adjust - w);
leftAdjust = adjust - w;
}
}
const premiseL = lastPremise(premises);
if (getProperty(premiseL, 'inference') == null) {
continue;
}
const adjust = adjustValue(premiseL, true);
addSpace(config, premiseL, -adjust, true);
const w = getSpaces(inf, rule, true);
const delta = (getBBox(rule) - getBBox(premises.parent)) / 2;
addSpace(config, inf, delta < leftAdjust ? -delta : -leftAdjust);
maxAdjust = Math.max(0, Math.max(0, maxAdjust + adjust - w) - delta);
let column;
if (isProof || !(column = getColumn(inf))) {
addSpace(config, getProperty(inf, 'proof') ? inf : inf.parent, maxAdjust, true);
continue;
}
const sibling = nextSibling(column);
if (sibling) {
const pos = config.nodeFactory.create('node', 'mspace', [], {
width: UnitUtil.em(maxAdjust),
});
sibling.appendChild(pos);
maxAdjust = 0;
continue;
}
if (!getParentInf(column)) {
continue;
}
}
};
const property_prefix = 'bspr_';
const prefix_pattern = RegExp('^' + property_prefix);
const setProperty = function (node, property, value) {
NodeUtil.setProperty(node, property_prefix + property, value);
};
const getProperty = function (node, property) {
return NodeUtil.getProperty(node, property_prefix + property);
};
const removeProperty = function (node, property) {
node.removeProperty(property_prefix + property);
};
const makeBsprAttributes = function (arg) {
arg.data.root.walkTree((mml, _data) => {
const attr = [];
mml.getPropertyNames().forEach((x) => {
if (x.match(prefix_pattern)) {
attr.push(x + ':' + mml.getProperty(x));
}
});
if (attr.length) {
NodeUtil.setAttribute(mml, 'semantics', attr.join(';'));
}
});
};
const saveDocument = function (arg) {
doc = arg.document;
if (!('getBBox' in doc.outputJax)) {
throw Error('The bussproofs extension requires an output jax with a getBBox() method');
}
};
const clearDocument = function (_arg) {
doc = null;
};
//# sourceMappingURL=BussproofsUtil.js.map
;// ./mjs/input/tex/bussproofs/BussproofsItems.js
class ProofTreeItem extends BaseItem {
constructor() {
super(...arguments);
this.leftLabel = null;
this.rigthLabel = null;
this.innerStack = new Stack(this.factory, {}, true);
}
get kind() {
return 'proofTree';
}
checkItem(item) {
if (item.isKind('end') && item.getName() === 'prooftree') {
const node = this.toMml();
setProperty(node, 'proof', true);
return [[this.factory.create('mml', node), item], true];
}
if (item.isKind('stop')) {
throw new TexError('EnvMissingEnd', 'Missing \\end{%1}', this.getName());
}
this.innerStack.Push(item);
return BaseItem.fail;
}
toMml() {
const tree = super.toMml();
const start = this.innerStack.Top();
if (start.isKind('start') && !start.Size()) {
return tree;
}
this.innerStack.Push(this.factory.create('stop'));
const prefix = this.innerStack.Top().toMml();
return this.create('node', 'mrow', [prefix, tree], {});
}
}
//# sourceMappingURL=BussproofsItems.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/TexParser.js
const TexParser_def = MathJax._.input.tex.TexParser;
/* harmony default export */ const TexParser = (TexParser_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./mjs/input/tex/bussproofs/BussproofsMethods.js
function paddedContent(parser, content) {
const nodes = ParseUtil.internalMath(parser, UnitUtil.trimSpaces(content), 0);
if (!nodes[0].childNodes[0].childNodes.length) {
return parser.create('node', 'mrow', []);
}
const lpad = parser.create('node', 'mspace', [], { width: '.5ex' });
const rpad = parser.create('node', 'mspace', [], { width: '.5ex' });
return parser.create('node', 'mrow', [lpad, ...nodes, rpad]);
}
function createRule(parser, premise, conclusions, left, right, style, rootAtTop) {
const upper = parser.create('node', 'mtr', [parser.create('node', 'mtd', [premise], {})], {});
const lower = parser.create('node', 'mtr', [parser.create('node', 'mtd', conclusions, {})], {});
let rule = parser.create('node', 'mtable', rootAtTop ? [lower, upper] : [upper, lower], { align: 'top 2', rowlines: style, framespacing: '0 0' });
setProperty(rule, 'inferenceRule', rootAtTop ? 'up' : 'down');
let leftLabel, rightLabel;
if (left) {
leftLabel = parser.create('node', 'mpadded', [left], {
height: '.25em',
depth: '+.25em',
width: '+.5ex',
voffset: '-.25em',
});
setProperty(leftLabel, 'prooflabel', 'left');
}
if (right) {
rightLabel = parser.create('node', 'mpadded', [right], {
height: '-.25em',
depth: '+.25em',
width: '+.5ex',
voffset: '-.25em',
lspace: '.5ex',
});
setProperty(rightLabel, 'prooflabel', 'right');
}
let children, label;
if (left && right) {
children = [leftLabel, rule, rightLabel];
label = 'both';
}
else if (left) {
children = [leftLabel, rule];
label = 'left';
}
else if (right) {
children = [rule, rightLabel];
label = 'right';
}
else {
return rule;
}
rule = parser.create('node', 'mrow', children);
setProperty(rule, 'labelledRule', label);
return rule;
}
function parseFCenterLine(parser, name) {
const dollar = parser.GetNext();
if (dollar !== '$') {
throw new TexError('IllegalUseOfCommand', 'Use of %1 does not match its definition.', name);
}
parser.i++;
const axiom = parser.GetUpTo(name, '$');
if (!axiom.includes('\\fCenter')) {
throw new TexError('MissingProofCommand', 'Missing %1 in %2.', '\\fCenter', name);
}
const [prem, conc] = axiom.split('\\fCenter');
const premise = new TexParser(prem, parser.stack.env, parser.configuration).mml();
const conclusion = new TexParser(conc, parser.stack.env, parser.configuration).mml();
const fcenter = new TexParser('\\fCenter', parser.stack.env, parser.configuration).mml();
const left = parser.create('node', 'mtd', [premise], {});
const middle = parser.create('node', 'mtd', [fcenter], {});
const right = parser.create('node', 'mtd', [conclusion], {});
const row = parser.create('node', 'mtr', [left, middle, right], {});
const table = parser.create('node', 'mtable', [row], {
columnspacing: '.5ex',
columnalign: 'center 2',
});
setProperty(table, 'sequent', true);
parser.configuration.addNode('sequent', row);
return table;
}
const BussproofsMethods = {
Prooftree(parser, begin) {
parser.Push(begin);
const newItem = parser.itemFactory.create('proofTree').setProperties({
name: begin.getName(),
line: 'solid',
currentLine: 'solid',
rootAtTop: false,
});
return newItem;
},
Axiom(parser, name) {
const top = parser.stack.Top();
if (top.kind !== 'proofTree') {
throw new TexError('IllegalProofCommand', 'Proof commands only allowed in prooftree environment.');
}
const content = paddedContent(parser, parser.GetArgument(name));
setProperty(content, 'axiom', true);
top.Push(content);
},
Inference(parser, name, n) {
const top = parser.stack.Top();
if (top.kind !== 'proofTree') {
throw new TexError('IllegalProofCommand', 'Proof commands only allowed in prooftree environment.');
}
if (top.Size() < n) {
throw new TexError('BadProofTree', 'Proof tree badly specified.');
}
const rootAtTop = top.getProperty('rootAtTop');
const childCount = n === 1 && !top.Peek()[0].childNodes.length ? 0 : n;
const children = [];
do {
if (children.length) {
children.unshift(parser.create('node', 'mtd', [], {}));
}
children.unshift(parser.create('node', 'mtd', [top.Pop()], {
rowalign: rootAtTop ? 'top' : 'bottom',
}));
n--;
} while (n > 0);
const row = parser.create('node', 'mtr', children, {});
const table = parser.create('node', 'mtable', [row], {
framespacing: '0 0',
});
const conclusion = paddedContent(parser, parser.GetArgument(name));
const style = top.getProperty('currentLine');
if (style !== top.getProperty('line')) {
top.setProperty('currentLine', top.getProperty('line'));
}
const rule = createRule(parser, table, [conclusion], top.getProperty('left'), top.getProperty('right'), style, rootAtTop);
top.setProperty('left', null);
top.setProperty('right', null);
setProperty(rule, 'inference', childCount);
parser.configuration.addNode('inference', rule);
top.Push(rule);
},
Label(parser, name, side) {
const top = parser.stack.Top();
if (top.kind !== 'proofTree') {
throw new TexError('IllegalProofCommand', 'Proof commands only allowed in prooftree environment.');
}
const content = ParseUtil.internalMath(parser, parser.GetArgument(name), 0);
const label = content.length > 1
? parser.create('node', 'mrow', content, {})
: content[0];
top.setProperty(side, label);
},
SetLine(parser, _name, style, always) {
const top = parser.stack.Top();
if (top.kind !== 'proofTree') {
throw new TexError('IllegalProofCommand', 'Proof commands only allowed in prooftree environment.');
}
top.setProperty('currentLine', style);
if (always) {
top.setProperty('line', style);
}
},
RootAtTop(parser, _name, where) {
const top = parser.stack.Top();
if (top.kind !== 'proofTree') {
throw new TexError('IllegalProofCommand', 'Proof commands only allowed in prooftree environment.');
}
top.setProperty('rootAtTop', where);
},
AxiomF(parser, name) {
const top = parser.stack.Top();
if (top.kind !== 'proofTree') {
throw new TexError('IllegalProofCommand', 'Proof commands only allowed in prooftree environment.');
}
const line = parseFCenterLine(parser, name);
setProperty(line, 'axiom', true);
top.Push(line);
},
FCenter(_parser, _name) { },
InferenceF(parser, name, n) {
const top = parser.stack.Top();
if (top.kind !== 'proofTree') {
throw new TexError('IllegalProofCommand', 'Proof commands only allowed in prooftree environment.');
}
if (top.Size() < n) {
throw new TexError('BadProofTree', 'Proof tree badly specified.');
}
const rootAtTop = top.getProperty('rootAtTop');
const childCount = n === 1 && !top.Peek()[0].childNodes.length ? 0 : n;
const children = [];
do {
if (children.length) {
children.unshift(parser.create('node', 'mtd', [], {}));
}
children.unshift(parser.create('node', 'mtd', [top.Pop()], {
rowalign: rootAtTop ? 'top' : 'bottom',
}));
n--;
} while (n > 0);
const row = parser.create('node', 'mtr', children, {});
const table = parser.create('node', 'mtable', [row], {
framespacing: '0 0',
});
const conclusion = parseFCenterLine(parser, name);
const style = top.getProperty('currentLine');
if (style !== top.getProperty('line')) {
top.setProperty('currentLine', top.getProperty('line'));
}
const rule = createRule(parser, table, [conclusion], top.getProperty('left'), top.getProperty('right'), style, rootAtTop);
top.setProperty('left', null);
top.setProperty('right', null);
setProperty(rule, 'inference', childCount);
parser.configuration.addNode('inference', rule);
top.Push(rule);
},
};
/* harmony default export */ const bussproofs_BussproofsMethods = (BussproofsMethods);
//# sourceMappingURL=BussproofsMethods.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/ParseMethods.js
const ParseMethods_def = MathJax._.input.tex.ParseMethods;
/* harmony default export */ const ParseMethods = (ParseMethods_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./mjs/input/tex/bussproofs/BussproofsMappings.js
new CommandMap('Bussproofs-macros', {
AxiomC: bussproofs_BussproofsMethods.Axiom,
UnaryInfC: [bussproofs_BussproofsMethods.Inference, 1],
BinaryInfC: [bussproofs_BussproofsMethods.Inference, 2],
TrinaryInfC: [bussproofs_BussproofsMethods.Inference, 3],
QuaternaryInfC: [bussproofs_BussproofsMethods.Inference, 4],
QuinaryInfC: [bussproofs_BussproofsMethods.Inference, 5],
RightLabel: [bussproofs_BussproofsMethods.Label, 'right'],
LeftLabel: [bussproofs_BussproofsMethods.Label, 'left'],
AXC: bussproofs_BussproofsMethods.Axiom,
UIC: [bussproofs_BussproofsMethods.Inference, 1],
BIC: [bussproofs_BussproofsMethods.Inference, 2],
TIC: [bussproofs_BussproofsMethods.Inference, 3],
RL: [bussproofs_BussproofsMethods.Label, 'right'],
LL: [bussproofs_BussproofsMethods.Label, 'left'],
noLine: [bussproofs_BussproofsMethods.SetLine, 'none', false],
singleLine: [bussproofs_BussproofsMethods.SetLine, 'solid', false],
solidLine: [bussproofs_BussproofsMethods.SetLine, 'solid', false],
dashedLine: [bussproofs_BussproofsMethods.SetLine, 'dashed', false],
alwaysNoLine: [bussproofs_BussproofsMethods.SetLine, 'none', true],
alwaysSingleLine: [bussproofs_BussproofsMethods.SetLine, 'solid', true],
alwaysSolidLine: [bussproofs_BussproofsMethods.SetLine, 'solid', true],
alwaysDashedLine: [bussproofs_BussproofsMethods.SetLine, 'dashed', true],
rootAtTop: [bussproofs_BussproofsMethods.RootAtTop, true],
alwaysRootAtTop: [bussproofs_BussproofsMethods.RootAtTop, true],
rootAtBottom: [bussproofs_BussproofsMethods.RootAtTop, false],
alwaysRootAtBottom: [bussproofs_BussproofsMethods.RootAtTop, false],
fCenter: bussproofs_BussproofsMethods.FCenter,
Axiom: bussproofs_BussproofsMethods.AxiomF,
UnaryInf: [bussproofs_BussproofsMethods.InferenceF, 1],
BinaryInf: [bussproofs_BussproofsMethods.InferenceF, 2],
TrinaryInf: [bussproofs_BussproofsMethods.InferenceF, 3],
QuaternaryInf: [bussproofs_BussproofsMethods.InferenceF, 4],
QuinaryInf: [bussproofs_BussproofsMethods.InferenceF, 5],
});
new EnvironmentMap('Bussproofs-environments', ParseMethods.environment, {
prooftree: [bussproofs_BussproofsMethods.Prooftree, null, false],
});
//# sourceMappingURL=BussproofsMappings.js.map
;// ./mjs/input/tex/bussproofs/BussproofsConfiguration.js
const BussproofsConfiguration = Configuration.create('bussproofs', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['Bussproofs-macros'],
[HandlerType.ENVIRONMENT]: ['Bussproofs-environments'],
},
[ConfigurationType.ITEMS]: {
[ProofTreeItem.prototype.kind]: ProofTreeItem,
},
[ConfigurationType.PREPROCESSORS]: [[saveDocument, 1]],
[ConfigurationType.POSTPROCESSORS]: [
[clearDocument, 3],
[makeBsprAttributes, 2],
[balanceRules, 1],
],
});
//# sourceMappingURL=BussproofsConfiguration.js.map
;// ./components/mjs/input/tex/extensions/bussproofs/lib/bussproofs.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/bussproofs', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
bussproofs: {
BussproofsConfiguration: BussproofsConfiguration_namespaceObject,
BussproofsItems: BussproofsItems_namespaceObject,
BussproofsMethods: BussproofsMethods_namespaceObject,
BussproofsUtil: BussproofsUtil_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/bussproofs/bussproofs.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/upgreek.js 0000644 0001762 0000144 00000012354 15112352676 023421 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/upgreek/UpgreekConfiguration.js
var UpgreekConfiguration_namespaceObject = {};
__webpack_require__.r(UpgreekConfiguration_namespaceObject);
__webpack_require__.d(UpgreekConfiguration_namespaceObject, {
UpgreekConfiguration: () => (UpgreekConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexConstants.js
const TexConstants_def = MathJax._.input.tex.TexConstants;
const TexConstant = TexConstants_def.TexConstant;
;// ./mjs/input/tex/upgreek/UpgreekConfiguration.js
function mathchar0miNormal(parser, mchar) {
const def = mchar.attributes || {};
def.mathvariant = TexConstant.Variant.NORMAL;
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
}
new CharacterMap('upgreek', mathchar0miNormal, {
upalpha: '\u03B1',
upbeta: '\u03B2',
upgamma: '\u03B3',
updelta: '\u03B4',
upepsilon: '\u03F5',
upzeta: '\u03B6',
upeta: '\u03B7',
uptheta: '\u03B8',
upiota: '\u03B9',
upkappa: '\u03BA',
uplambda: '\u03BB',
upmu: '\u03BC',
upnu: '\u03BD',
upxi: '\u03BE',
upomicron: '\u03BF',
uppi: '\u03C0',
uprho: '\u03C1',
upsigma: '\u03C3',
uptau: '\u03C4',
upupsilon: '\u03C5',
upphi: '\u03D5',
upchi: '\u03C7',
uppsi: '\u03C8',
upomega: '\u03C9',
upvarepsilon: '\u03B5',
upvartheta: '\u03D1',
upvarpi: '\u03D6',
upvarrho: '\u03F1',
upvarsigma: '\u03C2',
upvarphi: '\u03C6',
Upgamma: '\u0393',
Updelta: '\u0394',
Uptheta: '\u0398',
Uplambda: '\u039B',
Upxi: '\u039E',
Uppi: '\u03A0',
Upsigma: '\u03A3',
Upupsilon: '\u03A5',
Upphi: '\u03A6',
Uppsi: '\u03A8',
Upomega: '\u03A9',
});
const UpgreekConfiguration = Configuration.create('upgreek', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['upgreek'] },
});
//# sourceMappingURL=UpgreekConfiguration.js.map
;// ./components/mjs/input/tex/extensions/upgreek/lib/upgreek.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/upgreek', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
upgreek: {
UpgreekConfiguration: UpgreekConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/upgreek/upgreek.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/texhtml.js 0000644 0001762 0000144 00000014734 15112352670 023442 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/texhtml/TexHtmlConfiguration.js
var TexHtmlConfiguration_namespaceObject = {};
__webpack_require__.r(TexHtmlConfiguration_namespaceObject);
__webpack_require__.d(TexHtmlConfiguration_namespaceObject, {
HtmlNodeMethods: () => (HtmlNodeMethods),
TexHtmlConfiguration: () => (TexHtmlConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/core/lib/handlers/html/HTMLDomStrings.js
const HTMLDomStrings_def = MathJax._.handlers.html.HTMLDomStrings;
const HTMLDomStrings = HTMLDomStrings_def.HTMLDomStrings;
;// ./mjs/input/tex/texhtml/TexHtmlConfiguration.js
const HtmlNodeMethods = {
TexHTML(parser, _name) {
if (!parser.options.allowTexHTML)
return false;
const match = parser.string
.slice(parser.i)
.match(/^tex-html(?: n="(\d+)")?>/);
if (!match)
return false;
parser.i += match[0].length;
const end = (match[1] ? `` : '') + '';
const i = parser.string.slice(parser.i).indexOf(end);
if (i < 0) {
throw new TexError('TokenNotFoundForCommand', 'Could not find %1 for %2', end, '<' + match[0]);
}
const html = parser.string.substring(parser.i, parser.i + i).trim();
parser.i += i + 11 + (match[1] ? 3 + match[1].length : 0);
const adaptor = parser.configuration.packageData.get('texhtml').adaptor;
const nodes = adaptor.childNodes(adaptor.body(adaptor.parse(html)));
if (nodes.length === 0)
return true;
const DOM = nodes.length === 1 ? nodes[0] : adaptor.node('div', {}, nodes);
const node = parser.create('node', 'html').setHTML(DOM, adaptor);
parser.Push(parser.create('node', 'mtext', [node]));
return true;
},
};
new MacroMap('tex-html', { '<': HtmlNodeMethods.TexHTML });
const TexHtmlConfiguration = Configuration.create('texhtml', {
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['tex-html'],
},
[ConfigurationType.OPTIONS]: {
allowTexHTML: false,
},
[ConfigurationType.CONFIG]: () => {
if (HTMLDomStrings) {
const include = HTMLDomStrings.OPTIONS.includeHtmlTags;
if (!include['tex-html']) {
include['tex-html'] = (node, adaptor) => {
const html = adaptor.innerHTML(node);
const n = html.split(/<\/tex-html>/).length;
const N = n > 1 ? ` n="${n}"` : '';
return (`` + html + (n > 1 ? `` : '') + ` `);
};
}
}
},
[ConfigurationType.PREPROCESSORS]: [
(data) => {
data.data.packageData.set('texhtml', { adaptor: data.document.adaptor });
},
],
[ConfigurationType.POSTPROCESSORS]: [
(data) => {
data.data.packageData.set('texhtml', { adaptor: null });
},
],
});
//# sourceMappingURL=TexHtmlConfiguration.js.map
;// ./components/mjs/input/tex/extensions/texhtml/lib/texhtml.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/texhtml', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
texhtml: {
TexHtmlConfiguration: TexHtmlConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/texhtml/texhtml.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/verb.js 0000644 0001762 0000144 00000011731 15112352677 022714 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/verb/VerbConfiguration.js
var VerbConfiguration_namespaceObject = {};
__webpack_require__.r(VerbConfiguration_namespaceObject);
__webpack_require__.d(VerbConfiguration_namespaceObject, {
VerbConfiguration: () => (VerbConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TexConstants.js
const TexConstants_def = MathJax._.input.tex.TexConstants;
const TexConstant = TexConstants_def.TexConstant;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./mjs/input/tex/verb/VerbConfiguration.js
const VerbMethods = {
Verb(parser, name) {
const c = parser.GetNext();
const start = ++parser.i;
if (c === '') {
throw new TexError('MissingArgFor', 'Missing argument for %1', name);
}
while (parser.i < parser.string.length &&
parser.string.charAt(parser.i) !== c) {
parser.i++;
}
if (parser.i === parser.string.length) {
throw new TexError('NoClosingDelim', "Can't find closing delimiter for %1", parser.currentCS);
}
const text = parser.string.slice(start, parser.i).replace(/ /g, '\u00A0');
parser.i++;
parser.Push(parser.create('token', 'mtext', { mathvariant: TexConstant.Variant.MONOSPACE }, text));
},
};
new CommandMap('verb', { verb: VerbMethods.Verb });
const VerbConfiguration = Configuration.create('verb', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['verb'] },
});
//# sourceMappingURL=VerbConfiguration.js.map
;// ./components/mjs/input/tex/extensions/verb/lib/verb.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/verb', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
verb: {
VerbConfiguration: VerbConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/verb/verb.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/noerrors.js 0000644 0001762 0000144 00000007174 15112352662 023627 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/noerrors/NoErrorsConfiguration.js
var NoErrorsConfiguration_namespaceObject = {};
__webpack_require__.r(NoErrorsConfiguration_namespaceObject);
__webpack_require__.d(NoErrorsConfiguration_namespaceObject, {
NoErrorsConfiguration: () => (NoErrorsConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./mjs/input/tex/noerrors/NoErrorsConfiguration.js
function noErrors(factory, message, _id, expr) {
const mtext = factory.create('token', 'mtext', {}, expr.replace(/\n/g, ' '));
const error = factory.create('node', 'merror', [mtext], {
'data-mjx-error': message,
title: message,
});
return error;
}
const NoErrorsConfiguration = Configuration.create('noerrors', {
[ConfigurationType.NODES]: { error: noErrors },
});
//# sourceMappingURL=NoErrorsConfiguration.js.map
;// ./components/mjs/input/tex/extensions/noerrors/lib/noerrors.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/noerrors', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
noerrors: {
NoErrorsConfiguration: NoErrorsConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/noerrors/noerrors.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/newcommand.js 0000644 0001762 0000144 00000053067 15112352661 024107 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandItems.js
var NewcommandItems_namespaceObject = {};
__webpack_require__.r(NewcommandItems_namespaceObject);
__webpack_require__.d(NewcommandItems_namespaceObject, {
BeginEnvItem: () => (BeginEnvItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandUtil.js
var NewcommandUtil_namespaceObject = {};
__webpack_require__.r(NewcommandUtil_namespaceObject);
__webpack_require__.d(NewcommandUtil_namespaceObject, {
NewcommandPriority: () => (NewcommandPriority),
NewcommandTables: () => (NewcommandTables),
NewcommandUtil: () => (NewcommandUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandMethods.js
var NewcommandMethods_namespaceObject = {};
__webpack_require__.r(NewcommandMethods_namespaceObject);
__webpack_require__.d(NewcommandMethods_namespaceObject, {
"default": () => (newcommand_NewcommandMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandConfiguration.js
var NewcommandConfiguration_namespaceObject = {};
__webpack_require__.r(NewcommandConfiguration_namespaceObject);
__webpack_require__.d(NewcommandConfiguration_namespaceObject, {
NewcommandConfig: () => (NewcommandConfig),
NewcommandConfiguration: () => (NewcommandConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/StackItem.js
const StackItem_def = MathJax._.input.tex.StackItem;
const MmlStack = StackItem_def.MmlStack;
const BaseItem = StackItem_def.BaseItem;
;// ./mjs/input/tex/newcommand/NewcommandItems.js
class BeginEnvItem extends BaseItem {
get kind() {
return 'beginEnv';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('end')) {
if (item.getName() !== this.getName()) {
throw new TexError('EnvBadEnd', '\\begin{%1} ended with \\end{%2}', this.getName(), item.getName());
}
return [[this.factory.create('mml', this.toMml())], true];
}
if (item.isKind('stop')) {
throw new TexError('EnvMissingEnd', 'Missing \\end{%1}', this.getName());
}
return super.checkItem(item);
}
}
//# sourceMappingURL=NewcommandItems.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/MapHandler.js
const MapHandler_def = MathJax._.input.tex.MapHandler;
const MapHandler = MapHandler_def.MapHandler;
const SubHandler = MapHandler_def.SubHandler;
const SubHandlers = MapHandler_def.SubHandlers;
;// ./components/mjs/input/tex-base/lib/input/tex/UnitUtil.js
const UnitUtil_def = MathJax._.input.tex.UnitUtil;
const UnitUtil = UnitUtil_def.UnitUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/Token.js
const Token_def = MathJax._.input.tex.Token;
const Token = Token_def.Token;
const Macro = Token_def.Macro;
;// ./mjs/input/tex/newcommand/NewcommandUtil.js
var NewcommandTables;
(function (NewcommandTables) {
NewcommandTables["NEW_DELIMITER"] = "new-Delimiter";
NewcommandTables["NEW_COMMAND"] = "new-Command";
NewcommandTables["NEW_ENVIRONMENT"] = "new-Environment";
})(NewcommandTables || (NewcommandTables = {}));
const NewcommandPriority = -100;
const NewcommandUtil = {
GetCSname(parser, cmd) {
const c = parser.GetNext();
if (c !== '\\') {
throw new TexError('MissingCS', '%1 must be followed by a control sequence', cmd);
}
const cs = UnitUtil.trimSpaces(parser.GetArgument(cmd)).substring(1);
this.checkProtectedMacros(parser, cs);
return cs;
},
GetCsNameArgument(parser, name) {
let cs = UnitUtil.trimSpaces(parser.GetArgument(name));
if (cs.charAt(0) === '\\') {
cs = cs.substring(1);
}
if (!cs.match(/^(.|[a-z]+)$/i)) {
throw new TexError('IllegalControlSequenceName', 'Illegal control sequence name for %1', name);
}
this.checkProtectedMacros(parser, cs);
return cs;
},
GetArgCount(parser, name) {
let n = parser.GetBrackets(name);
if (n) {
n = UnitUtil.trimSpaces(n);
if (!n.match(/^[0-9]+$/)) {
throw new TexError('IllegalParamNumber', 'Illegal number of parameters specified in %1', name);
}
}
return n;
},
GetTemplate(parser, cmd, cs) {
let c = parser.GetNext();
const params = [];
let n = 0;
let i = parser.i;
while (parser.i < parser.string.length) {
c = parser.GetNext();
if (c === '#') {
if (i !== parser.i) {
params[n] = parser.string.substring(i, parser.i);
}
c = parser.string.charAt(++parser.i);
if (!c.match(/^[1-9]$/)) {
throw new TexError('CantUseHash2', 'Illegal use of # in template for %1', cs);
}
if (parseInt(c) !== ++n) {
throw new TexError('SequentialParam', 'Parameters for %1 must be numbered sequentially', cs);
}
i = parser.i + 1;
}
else if (c === '{') {
if (i !== parser.i) {
params[n] = parser.string.substring(i, parser.i);
}
if (params.length > 0) {
return [n.toString()].concat(params);
}
else {
return n;
}
}
parser.i++;
}
throw new TexError('MissingReplacementString', 'Missing replacement string for definition of %1', cmd);
},
GetParameter(parser, name, param) {
if (param == null) {
return parser.GetArgument(name);
}
let i = parser.i;
let j = 0;
let hasBraces = false;
while (parser.i < parser.string.length) {
const c = parser.string.charAt(parser.i);
if (c === '{') {
hasBraces = parser.i === i;
parser.GetArgument(name);
j = parser.i - i;
}
else if (this.MatchParam(parser, param)) {
if (hasBraces) {
i++;
j -= 2;
}
return parser.string.substring(i, i + j);
}
else if (c === '\\') {
parser.i++;
j++;
hasBraces = false;
const match = parser.string.substring(parser.i).match(/[a-z]+|./i);
if (match) {
parser.i += match[0].length;
j = parser.i - i;
}
}
else {
parser.i++;
j++;
hasBraces = false;
}
}
throw new TexError('RunawayArgument', 'Runaway argument for %1?', name);
},
MatchParam(parser, param) {
if (parser.string.substring(parser.i, parser.i + param.length) !== param) {
return 0;
}
if (param.match(/\\[a-z]+$/i) &&
parser.string.charAt(parser.i + param.length).match(/[a-z]/i)) {
return 0;
}
parser.i += param.length;
return 1;
},
checkGlobal(parser, tokens, maps) {
return (parser.stack.env.isGlobal
? parser.configuration.packageData
.get('begingroup')
.stack.checkGlobal(tokens, maps)
: maps.map((name) => parser.configuration.handlers.retrieve(name)));
},
checkProtectedMacros(parser, cs) {
var _a;
if ((_a = parser.options.protectedMacros) === null || _a === void 0 ? void 0 : _a.includes(cs)) {
throw new TexError('ProtectedMacro', "The control sequence %1 can't be redefined", `\\${cs}`);
}
},
addDelimiter(parser, cs, char, attr) {
const name = cs.substring(1);
this.checkProtectedMacros(parser, name);
const [macros, delims] = NewcommandUtil.checkGlobal(parser, [name, cs], [NewcommandTables.NEW_COMMAND, NewcommandTables.NEW_DELIMITER]);
if (name !== cs) {
macros.remove(name);
}
delims.add(cs, new Token(cs, char, attr));
delete parser.stack.env.isGlobal;
},
addMacro(parser, cs, func, attr, token = '') {
this.checkProtectedMacros(parser, cs);
const macros = NewcommandUtil.checkGlobal(parser, [cs], [NewcommandTables.NEW_COMMAND])[0];
this.undefineDelimiter(parser, '\\' + cs);
macros.add(cs, new Macro(token ? token : cs, func, attr));
delete parser.stack.env.isGlobal;
},
addEnvironment(parser, env, func, attr) {
const envs = NewcommandUtil.checkGlobal(parser, [env], [NewcommandTables.NEW_ENVIRONMENT])[0];
envs.add(env, new Macro(env, func, attr));
delete parser.stack.env.isGlobal;
},
undefineMacro(parser, cs) {
const macros = NewcommandUtil.checkGlobal(parser, [cs], [NewcommandTables.NEW_COMMAND])[0];
macros.remove(cs);
if (parser.configuration.handlers.get(HandlerType.MACRO).applicable(cs)) {
macros.add(cs, new Macro(cs, () => SubHandler.FALLBACK, []));
this.undefineDelimiter(parser, '\\' + cs);
}
delete parser.stack.env.isGlobal;
},
undefineDelimiter(parser, cs) {
const delims = NewcommandUtil.checkGlobal(parser, [cs], [NewcommandTables.NEW_DELIMITER])[0];
delims.remove(cs);
if (parser.configuration.handlers.get(HandlerType.DELIMITER).applicable(cs)) {
delims.add(cs, new Token(cs, null, {}));
}
delete parser.stack.env.isGlobal;
},
};
//# sourceMappingURL=NewcommandUtil.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./mjs/input/tex/newcommand/NewcommandMethods.js
const NewcommandMethods = {
NewCommand(parser, name) {
const cs = NewcommandUtil.GetCsNameArgument(parser, name);
const n = NewcommandUtil.GetArgCount(parser, name);
const opt = parser.GetBrackets(name);
const def = parser.GetArgument(name);
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [def, n, opt]);
parser.Push(parser.itemFactory.create('null'));
},
NewEnvironment(parser, name) {
const env = UnitUtil.trimSpaces(parser.GetArgument(name));
const n = NewcommandUtil.GetArgCount(parser, name);
const opt = parser.GetBrackets(name);
const bdef = parser.GetArgument(name);
const edef = parser.GetArgument(name);
NewcommandUtil.addEnvironment(parser, env, NewcommandMethods.BeginEnv, [
true,
bdef,
edef,
n,
opt,
]);
parser.Push(parser.itemFactory.create('null'));
},
MacroDef(parser, name) {
const cs = NewcommandUtil.GetCSname(parser, name);
const params = NewcommandUtil.GetTemplate(parser, name, '\\' + cs);
const def = parser.GetArgument(name);
!(params instanceof Array)
?
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [
def,
params,
])
:
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.MacroWithTemplate, [def].concat(params));
parser.Push(parser.itemFactory.create('null'));
},
Let(parser, name) {
const cs = NewcommandUtil.GetCSname(parser, name);
let c = parser.GetNext();
if (c === '=') {
parser.i++;
c = parser.GetNext();
}
const handlers = parser.configuration.handlers;
parser.Push(parser.itemFactory.create('null'));
if (c === '\\') {
name = NewcommandUtil.GetCSname(parser, name);
if (cs === name) {
return;
}
const map = handlers.get(HandlerType.MACRO).applicable(name);
if (map instanceof MacroMap) {
const macro = map.lookup(name);
NewcommandUtil.addMacro(parser, cs, macro.func, macro.args, macro.token);
return;
}
if (map instanceof CharacterMap && !(map instanceof DelimiterMap)) {
const macro = map.lookup(name);
const method = (p) => map.parser(p, macro);
NewcommandUtil.addMacro(parser, cs, method, [cs, macro.char]);
return;
}
const macro = handlers
.get(HandlerType.DELIMITER)
.lookup('\\' + name);
if (macro) {
NewcommandUtil.addDelimiter(parser, '\\' + cs, macro.char, macro.attributes);
return;
}
NewcommandUtil.checkProtectedMacros(parser, cs);
NewcommandUtil.undefineMacro(parser, cs);
NewcommandUtil.undefineDelimiter(parser, '\\' + cs);
return;
}
parser.i++;
const macro = handlers.get(HandlerType.DELIMITER).lookup(c);
if (macro) {
NewcommandUtil.addDelimiter(parser, '\\' + cs, macro.char, macro.attributes);
return;
}
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [c]);
},
MacroWithTemplate(parser, name, text, n, ...params) {
const argCount = parseInt(n, 10);
if (params.length) {
const args = [];
parser.GetNext();
if (params[0] && !NewcommandUtil.MatchParam(parser, params[0])) {
throw new TexError('MismatchUseDef', "Use of %1 doesn't match its definition", name);
}
if (argCount) {
for (let i = 0; i < argCount; i++) {
args.push(NewcommandUtil.GetParameter(parser, name, params[i + 1]));
}
text = ParseUtil.substituteArgs(parser, args, text);
}
}
parser.string = ParseUtil.addArgs(parser, text, parser.string.slice(parser.i));
parser.i = 0;
ParseUtil.checkMaxMacros(parser);
},
BeginEnv(parser, begin, bdef, edef, n, def) {
const name = begin.getName();
if (parser.stack.env['closing'] === name) {
delete parser.stack.env['closing'];
const beginN = parser.stack.global['beginEnv'];
if (beginN) {
parser.stack.global['beginEnv']--;
if (edef) {
const rest = parser.string.slice(parser.i);
parser.string = ParseUtil.addArgs(parser, parser.string.substring(0, parser.i), edef);
parser.Parse();
parser.string = rest;
parser.i = 0;
}
}
return parser.itemFactory.create('end').setProperty('name', name);
}
if (n) {
const args = [];
if (def != null) {
const optional = parser.GetBrackets(`\\begin{${name}}`);
args.push(optional == null ? def : optional);
}
for (let i = args.length; i < n; i++) {
args.push(parser.GetArgument(`\\begin{${name}}`));
}
bdef = ParseUtil.substituteArgs(parser, args, bdef);
edef = ParseUtil.substituteArgs(parser, [], edef);
}
parser.string = ParseUtil.addArgs(parser, bdef, parser.string.slice(parser.i));
parser.i = 0;
parser.stack.global['beginEnv'] =
(parser.stack.global['beginEnv'] || 0) + 1;
return parser.itemFactory.create('beginEnv').setProperty('name', name);
},
Macro: BaseMethods.Macro,
};
/* harmony default export */ const newcommand_NewcommandMethods = (NewcommandMethods);
//# sourceMappingURL=NewcommandMethods.js.map
;// ./mjs/input/tex/newcommand/NewcommandMappings.js
new CommandMap('Newcommand-macros', {
newcommand: newcommand_NewcommandMethods.NewCommand,
renewcommand: newcommand_NewcommandMethods.NewCommand,
newenvironment: newcommand_NewcommandMethods.NewEnvironment,
renewenvironment: newcommand_NewcommandMethods.NewEnvironment,
def: newcommand_NewcommandMethods.MacroDef,
let: newcommand_NewcommandMethods.Let,
});
//# sourceMappingURL=NewcommandMappings.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/ParseMethods.js
const ParseMethods_def = MathJax._.input.tex.ParseMethods;
/* harmony default export */ const ParseMethods = (ParseMethods_def.default);
;// ./mjs/input/tex/newcommand/NewcommandConfiguration.js
function NewcommandConfig(_config, jax) {
if (jax.parseOptions.packageData.has('newcommand')) {
return;
}
jax.parseOptions.packageData.set('newcommand', {});
new DelimiterMap(NewcommandTables.NEW_DELIMITER, ParseMethods.delimiter, {});
new CommandMap(NewcommandTables.NEW_COMMAND, {});
new EnvironmentMap(NewcommandTables.NEW_ENVIRONMENT, ParseMethods.environment, {});
jax.parseOptions.handlers.add({
[HandlerType.CHARACTER]: [],
[HandlerType.DELIMITER]: [NewcommandTables.NEW_DELIMITER],
[HandlerType.MACRO]: [
NewcommandTables.NEW_DELIMITER,
NewcommandTables.NEW_COMMAND,
],
[HandlerType.ENVIRONMENT]: [NewcommandTables.NEW_ENVIRONMENT],
}, {}, NewcommandPriority);
}
const NewcommandConfiguration = Configuration.create('newcommand', {
[ConfigurationType.HANDLER]: {
macro: ['Newcommand-macros'],
},
[ConfigurationType.ITEMS]: {
[BeginEnvItem.prototype.kind]: BeginEnvItem,
},
[ConfigurationType.OPTIONS]: {
maxMacros: 1000,
protectedMacros: ['begingroupSandbox'],
},
[ConfigurationType.CONFIG]: NewcommandConfig,
});
//# sourceMappingURL=NewcommandConfiguration.js.map
;// ./components/mjs/input/tex/extensions/newcommand/lib/newcommand.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/newcommand', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
newcommand: {
NewcommandConfiguration: NewcommandConfiguration_namespaceObject,
NewcommandItems: NewcommandItems_namespaceObject,
NewcommandMethods: NewcommandMethods_namespaceObject,
NewcommandUtil: NewcommandUtil_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/newcommand/newcommand.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/extpfeil.js 0000644 0001762 0000144 00000014642 15112352653 023574 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/extpfeil/ExtpfeilConfiguration.js
var ExtpfeilConfiguration_namespaceObject = {};
__webpack_require__.r(ExtpfeilConfiguration_namespaceObject);
__webpack_require__.d(ExtpfeilConfiguration_namespaceObject, {
ExtpfeilConfiguration: () => (ExtpfeilConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex/extensions/ams/lib/input/tex/ams/AmsMethods.js
const AmsMethods_def = MathJax._.input.tex.ams.AmsMethods;
const AmsMethods = AmsMethods_def.AmsMethods;
;// ./components/mjs/input/tex/extensions/newcommand/lib/input/tex/newcommand/NewcommandUtil.js
const NewcommandUtil_def = MathJax._.input.tex.newcommand.NewcommandUtil;
const NewcommandTables = NewcommandUtil_def.NewcommandTables;
const NewcommandPriority = NewcommandUtil_def.NewcommandPriority;
const NewcommandUtil = NewcommandUtil_def.NewcommandUtil;
;// ./components/mjs/input/tex/extensions/newcommand/lib/input/tex/newcommand/NewcommandConfiguration.js
const NewcommandConfiguration_def = MathJax._.input.tex.newcommand.NewcommandConfiguration;
const NewcommandConfig = NewcommandConfiguration_def.NewcommandConfig;
const NewcommandConfiguration = NewcommandConfiguration_def.NewcommandConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./mjs/input/tex/extpfeil/ExtpfeilConfiguration.js
const ExtpfeilMethods = {
NewExtArrow(parser, name) {
let cs = parser.GetArgument(name);
const space = parser.GetArgument(name);
const chr = parser.GetArgument(name);
if (!cs.match(/^\\([a-z]+|.)$/i)) {
throw new TexError('NewextarrowArg1', 'First argument to %1 must be a control sequence name', name);
}
if (!space.match(/^(\d+),(\d+)$/)) {
throw new TexError('NewextarrowArg2', 'Second argument to %1 must be two integers separated by a comma', name);
}
if (!chr.match(/^(\d+|0x[0-9A-F]+)$/i)) {
throw new TexError('NewextarrowArg3', 'Third argument to %1 must be a unicode character number', name);
}
cs = cs.substring(1);
const spaces = space.split(',');
NewcommandUtil.addMacro(parser, cs, ExtpfeilMethods.xArrow, [
parseInt(chr),
parseInt(spaces[0]),
parseInt(spaces[1]),
]);
parser.Push(parser.itemFactory.create('null'));
},
xArrow: AmsMethods.xArrow,
};
new CommandMap('extpfeil', {
xtwoheadrightarrow: [ExtpfeilMethods.xArrow, 0x21a0, 12, 16],
xtwoheadleftarrow: [ExtpfeilMethods.xArrow, 0x219e, 17, 13],
xmapsto: [ExtpfeilMethods.xArrow, 0x21a6, 6, 7],
xlongequal: [ExtpfeilMethods.xArrow, 0x003d, 7, 7],
xtofrom: [ExtpfeilMethods.xArrow, 0x21c4, 12, 12],
Newextarrow: ExtpfeilMethods.NewExtArrow,
});
const ExtpfeilConfiguration = Configuration.create('extpfeil', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['extpfeil'] },
[ConfigurationType.CONFIG]: NewcommandConfig,
});
//# sourceMappingURL=ExtpfeilConfiguration.js.map
;// ./components/mjs/input/tex/extensions/extpfeil/lib/extpfeil.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/extpfeil', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
extpfeil: {
ExtpfeilConfiguration: ExtpfeilConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/extpfeil/extpfeil.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/autoload.js 0000644 0001762 0000144 00000021574 15112352626 023566 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/autoload/AutoloadConfiguration.js
var AutoloadConfiguration_namespaceObject = {};
__webpack_require__.r(AutoloadConfiguration_namespaceObject);
__webpack_require__.d(AutoloadConfiguration_namespaceObject, {
AutoloadConfiguration: () => (AutoloadConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/Token.js
const Token_def = MathJax._.input.tex.Token;
const Token = Token_def.Token;
const Macro = Token_def.Macro;
;// ./components/mjs/input/tex/extensions/require/lib/input/tex/require/RequireConfiguration.js
const RequireConfiguration_def = MathJax._.input.tex.require.RequireConfiguration;
const RequireLoad = RequireConfiguration_def.RequireLoad;
const RequireMethods = RequireConfiguration_def.RequireMethods;
const options = RequireConfiguration_def.options;
const RequireConfiguration = RequireConfiguration_def.RequireConfiguration;
;// ./components/mjs/startup/lib/components/package.js
const package_def = MathJax._.components.package;
const PackageError = package_def.PackageError;
const Package = package_def.Package;
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./mjs/input/tex/autoload/AutoloadConfiguration.js
function Autoload(parser, name, extension, isMacro) {
if (Package.packages.has(parser.options.require.prefix + extension)) {
const def = parser.options.autoload[extension];
const [macros, envs] = def.length === 2 && Array.isArray(def[0]) ? def : [def, []];
for (const macro of macros) {
AutoloadMacros.remove(macro);
}
for (const env of envs) {
AutoloadEnvironments.remove(env);
}
parser.string =
(isMacro ? name + ' ' : '\\begin{' + name.slice(1) + '}') +
parser.string.slice(parser.i);
parser.i = 0;
}
RequireLoad(parser, extension);
}
function initAutoload(config) {
if (!config.options.require) {
defaultOptions(config.options, RequireConfiguration.options);
}
}
function configAutoload(config, jax) {
const parser = jax.parseOptions;
const macros = parser.handlers.get(HandlerType.MACRO);
const environments = parser.handlers.get(HandlerType.ENVIRONMENT);
const autoload = parser.options.autoload;
parser.packageData.set('autoload', { Autoload });
for (const extension of Object.keys(autoload)) {
const def = autoload[extension];
const [macs, envs] = def.length === 2 && Array.isArray(def[0]) ? def : [def, []];
for (const name of macs) {
if (!macros.lookup(name) || name === 'color') {
AutoloadMacros.add(name, new Macro(name, Autoload, [extension, true]));
}
}
for (const name of envs) {
if (!environments.lookup(name)) {
AutoloadEnvironments.add(name, new Macro(name, Autoload, [extension, false]));
}
}
}
if (!parser.packageData.get('require')) {
RequireConfiguration.config(config, jax);
}
}
const AutoloadMacros = new CommandMap('autoload-macros', {});
const AutoloadEnvironments = new CommandMap('autoload-environments', {});
const AutoloadConfiguration = Configuration.create('autoload', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['autoload-macros'],
[HandlerType.ENVIRONMENT]: ['autoload-environments'],
},
[ConfigurationType.OPTIONS]: {
autoload: expandable({
action: ['toggle', 'mathtip', 'texttip'],
amscd: [[], ['CD']],
bbox: ['bbox'],
boldsymbol: ['boldsymbol'],
braket: [
'bra',
'ket',
'braket',
'set',
'Bra',
'Ket',
'Braket',
'Set',
'ketbra',
'Ketbra',
],
bussproofs: [[], ['prooftree']],
cancel: ['cancel', 'bcancel', 'xcancel', 'cancelto'],
color: ['color', 'definecolor', 'textcolor', 'colorbox', 'fcolorbox'],
enclose: ['enclose'],
extpfeil: [
'xtwoheadrightarrow',
'xtwoheadleftarrow',
'xmapsto',
'xlongequal',
'xtofrom',
'Newextarrow',
],
html: ['data', 'href', 'class', 'style', 'cssId'],
mhchem: ['ce', 'pu'],
newcommand: [
'newcommand',
'renewcommand',
'newenvironment',
'renewenvironment',
'def',
'let',
],
unicode: ['unicode', 'U', 'char'],
verb: ['verb'],
}),
},
[ConfigurationType.CONFIG]: configAutoload,
[ConfigurationType.INIT]: initAutoload,
[ConfigurationType.PRIORITY]: 10,
});
//# sourceMappingURL=AutoloadConfiguration.js.map
;// ./components/mjs/input/tex/extensions/autoload/lib/autoload.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/autoload', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
autoload: {
AutoloadConfiguration: AutoloadConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/autoload/autoload.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/color.js 0000644 0001762 0000144 00000034630 15112352643 023070 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/color/ColorMethods.js
var ColorMethods_namespaceObject = {};
__webpack_require__.r(ColorMethods_namespaceObject);
__webpack_require__.d(ColorMethods_namespaceObject, {
ColorMethods: () => (ColorMethods),
padding: () => (padding)
});
// NAMESPACE OBJECT: ./mjs/input/tex/color/ColorConstants.js
var ColorConstants_namespaceObject = {};
__webpack_require__.r(ColorConstants_namespaceObject);
__webpack_require__.d(ColorConstants_namespaceObject, {
COLORS: () => (COLORS)
});
// NAMESPACE OBJECT: ./mjs/input/tex/color/ColorUtil.js
var ColorUtil_namespaceObject = {};
__webpack_require__.r(ColorUtil_namespaceObject);
__webpack_require__.d(ColorUtil_namespaceObject, {
ColorModel: () => (ColorModel)
});
// NAMESPACE OBJECT: ./mjs/input/tex/color/ColorConfiguration.js
var ColorConfiguration_namespaceObject = {};
__webpack_require__.r(ColorConfiguration_namespaceObject);
__webpack_require__.d(ColorConfiguration_namespaceObject, {
ColorConfiguration: () => (ColorConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./mjs/input/tex/color/ColorMethods.js
function padding(colorPadding) {
const pad = `+${colorPadding}`;
const unit = colorPadding.replace(/^.*?([a-z]*)$/, '$1');
const pad2 = 2 * parseFloat(pad);
return {
width: `+${pad2}${unit}`,
height: pad,
depth: pad,
lspace: colorPadding,
};
}
const ColorMethods = {
Color(parser, name) {
const model = parser.GetBrackets(name, '');
const colorDef = parser.GetArgument(name);
const colorModel = parser.configuration.packageData.get('color').model;
const color = colorModel.getColor(model, colorDef);
const style = parser.itemFactory
.create('style')
.setProperties({ styles: { mathcolor: color } });
parser.stack.env['color'] = color;
parser.Push(style);
},
TextColor(parser, name) {
const model = parser.GetBrackets(name, '');
const colorDef = parser.GetArgument(name);
const colorModel = parser.configuration.packageData.get('color').model;
const color = colorModel.getColor(model, colorDef);
const old = parser.stack.env['color'];
parser.stack.env['color'] = color;
const math = parser.ParseArg(name);
if (old) {
parser.stack.env['color'] = old;
}
else {
delete parser.stack.env['color'];
}
const node = parser.create('node', 'mstyle', [math], { mathcolor: color });
parser.Push(node);
},
DefineColor(parser, name) {
const cname = parser.GetArgument(name);
const model = parser.GetArgument(name);
const def = parser.GetArgument(name);
const colorModel = parser.configuration.packageData.get('color').model;
colorModel.defineColor(model, cname, def);
parser.Push(parser.itemFactory.create('null'));
},
ColorBox(parser, name) {
const model = parser.GetBrackets(name, '');
const cdef = parser.GetArgument(name);
const math = ParseUtil.internalMath(parser, parser.GetArgument(name));
const colorModel = parser.configuration.packageData.get('color').model;
const node = parser.create('node', 'mpadded', math, {
mathbackground: colorModel.getColor(model, cdef),
});
NodeUtil.setProperties(node, padding(parser.options.color.padding));
parser.Push(node);
},
FColorBox(parser, name) {
const fmodel = parser.GetBrackets(name, '');
const fname = parser.GetArgument(name);
const cmodel = parser.GetBrackets(name, fmodel);
const cname = parser.GetArgument(name);
const math = ParseUtil.internalMath(parser, parser.GetArgument(name));
const options = parser.options.color;
const colorModel = parser.configuration.packageData.get('color').model;
const node = parser.create('node', 'mpadded', math, {
mathbackground: colorModel.getColor(cmodel, cname),
style: `border: ${options.borderWidth} solid ${colorModel.getColor(fmodel, fname)}`,
});
NodeUtil.setProperties(node, padding(options.padding));
parser.Push(node);
},
};
//# sourceMappingURL=ColorMethods.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./mjs/input/tex/color/ColorConstants.js
const COLORS = new Map([
['Apricot', '#FBB982'],
['Aquamarine', '#00B5BE'],
['Bittersweet', '#C04F17'],
['Black', '#221E1F'],
['Blue', '#2D2F92'],
['BlueGreen', '#00B3B8'],
['BlueViolet', '#473992'],
['BrickRed', '#B6321C'],
['Brown', '#792500'],
['BurntOrange', '#F7921D'],
['CadetBlue', '#74729A'],
['CarnationPink', '#F282B4'],
['Cerulean', '#00A2E3'],
['CornflowerBlue', '#41B0E4'],
['Cyan', '#00AEEF'],
['Dandelion', '#FDBC42'],
['DarkOrchid', '#A4538A'],
['Emerald', '#00A99D'],
['ForestGreen', '#009B55'],
['Fuchsia', '#8C368C'],
['Goldenrod', '#FFDF42'],
['Gray', '#949698'],
['Green', '#00A64F'],
['GreenYellow', '#DFE674'],
['JungleGreen', '#00A99A'],
['Lavender', '#F49EC4'],
['LimeGreen', '#8DC73E'],
['Magenta', '#EC008C'],
['Mahogany', '#A9341F'],
['Maroon', '#AF3235'],
['Melon', '#F89E7B'],
['MidnightBlue', '#006795'],
['Mulberry', '#A93C93'],
['NavyBlue', '#006EB8'],
['OliveGreen', '#3C8031'],
['Orange', '#F58137'],
['OrangeRed', '#ED135A'],
['Orchid', '#AF72B0'],
['Peach', '#F7965A'],
['Periwinkle', '#7977B8'],
['PineGreen', '#008B72'],
['Plum', '#92268F'],
['ProcessBlue', '#00B0F0'],
['Purple', '#99479B'],
['RawSienna', '#974006'],
['Red', '#ED1B23'],
['RedOrange', '#F26035'],
['RedViolet', '#A1246B'],
['Rhodamine', '#EF559F'],
['RoyalBlue', '#0071BC'],
['RoyalPurple', '#613F99'],
['RubineRed', '#ED017D'],
['Salmon', '#F69289'],
['SeaGreen', '#3FBC9D'],
['Sepia', '#671800'],
['SkyBlue', '#46C5DD'],
['SpringGreen', '#C6DC67'],
['Tan', '#DA9D76'],
['TealBlue', '#00AEB3'],
['Thistle', '#D883B7'],
['Turquoise', '#00B4CE'],
['Violet', '#58429B'],
['VioletRed', '#EF58A0'],
['White', '#FFFFFF'],
['WildStrawberry', '#EE2967'],
['Yellow', '#FFF200'],
['YellowGreen', '#98CC70'],
['YellowOrange', '#FAA21A'],
]);
//# sourceMappingURL=ColorConstants.js.map
;// ./mjs/input/tex/color/ColorUtil.js
const ColorModelProcessors = new Map();
class ColorModel {
constructor() {
this.userColors = new Map();
}
normalizeColor(model, def) {
if (!model || model === 'named') {
if (def.match(/;/)) {
throw new TexError('BadColorValue', 'Invalid color value');
}
return def;
}
if (ColorModelProcessors.has(model)) {
const modelProcessor = ColorModelProcessors.get(model);
return modelProcessor(def);
}
throw new TexError('UndefinedColorModel', "Color model '%1' not defined", model);
}
getColor(model, def) {
if (!model || model === 'named') {
return this.getColorByName(def);
}
return this.normalizeColor(model, def);
}
getColorByName(name) {
if (this.userColors.has(name)) {
return this.userColors.get(name);
}
if (COLORS.has(name)) {
return COLORS.get(name);
}
if (name.match(/;/)) {
throw new TexError('BadColorValue', 'Invalid color value');
}
return name;
}
defineColor(model, name, def) {
const normalized = this.normalizeColor(model, def);
this.userColors.set(name, normalized);
}
}
ColorModelProcessors.set('rgb', function (rgb) {
const rgbParts = rgb.trim().split(/\s*,\s*/);
let RGB = '#';
if (rgbParts.length !== 3) {
throw new TexError('ModelArg1', 'Color values for the %1 model require 3 numbers', 'rgb');
}
for (const rgbPart of rgbParts) {
if (!rgbPart.match(/^(\d+(\.\d*)?|\.\d+)$/)) {
throw new TexError('InvalidDecimalNumber', 'Invalid decimal number');
}
const n = parseFloat(rgbPart);
if (n < 0 || n > 1) {
throw new TexError('ModelArg2', 'Color values for the %1 model must be between %2 and %3', 'rgb', '0', '1');
}
let pn = Math.floor(n * 255).toString(16);
if (pn.length < 2) {
pn = '0' + pn;
}
RGB += pn;
}
return RGB;
});
ColorModelProcessors.set('RGB', function (rgb) {
const rgbParts = rgb.trim().split(/\s*,\s*/);
let RGB = '#';
if (rgbParts.length !== 3) {
throw new TexError('ModelArg1', 'Color values for the %1 model require 3 numbers', 'RGB');
}
for (const rgbPart of rgbParts) {
if (!rgbPart.match(/^\d+$/)) {
throw new TexError('InvalidNumber', 'Invalid number');
}
const n = parseInt(rgbPart);
if (n > 255) {
throw new TexError('ModelArg2', 'Color values for the %1 model must be between %2 and %3', 'RGB', '0', '255');
}
let pn = n.toString(16);
if (pn.length < 2) {
pn = '0' + pn;
}
RGB += pn;
}
return RGB;
});
ColorModelProcessors.set('gray', function (gray) {
if (!gray.match(/^\s*(\d+(\.\d*)?|\.\d+)\s*$/)) {
throw new TexError('InvalidDecimalNumber', 'Invalid decimal number');
}
const n = parseFloat(gray);
if (n < 0 || n > 1) {
throw new TexError('ModelArg2', 'Color values for the %1 model must be between %2 and %3', 'gray', '0', '1');
}
let pn = Math.floor(n * 255).toString(16);
if (pn.length < 2) {
pn = '0' + pn;
}
return `#${pn}${pn}${pn}`;
});
//# sourceMappingURL=ColorUtil.js.map
;// ./mjs/input/tex/color/ColorConfiguration.js
new CommandMap('color', {
color: ColorMethods.Color,
textcolor: ColorMethods.TextColor,
definecolor: ColorMethods.DefineColor,
colorbox: ColorMethods.ColorBox,
fcolorbox: ColorMethods.FColorBox,
});
const config = function (_config, jax) {
jax.parseOptions.packageData.set('color', { model: new ColorModel() });
};
const ColorConfiguration = Configuration.create('color', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['color'],
},
[ConfigurationType.OPTIONS]: {
color: {
padding: '5px',
borderWidth: '2px',
},
},
[ConfigurationType.CONFIG]: config,
});
//# sourceMappingURL=ColorConfiguration.js.map
;// ./components/mjs/input/tex/extensions/color/lib/color.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/color', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
color: {
ColorConfiguration: ColorConfiguration_namespaceObject,
ColorConstants: ColorConstants_namespaceObject,
ColorMethods: ColorMethods_namespaceObject,
ColorUtil: ColorUtil_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/color/color.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/tagformat.js 0000644 0001762 0000144 00000012102 15112352667 023732 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/tagformat/TagFormatConfiguration.js
var TagFormatConfiguration_namespaceObject = {};
__webpack_require__.r(TagFormatConfiguration_namespaceObject);
__webpack_require__.d(TagFormatConfiguration_namespaceObject, {
TagFormatConfiguration: () => (TagFormatConfiguration),
tagformatConfig: () => (tagformatConfig)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/Tags.js
const Tags_def = MathJax._.input.tex.Tags;
const Label = Tags_def.Label;
const TagInfo = Tags_def.TagInfo;
const AbstractTags = Tags_def.AbstractTags;
const NoTags = Tags_def.NoTags;
const AllTags = Tags_def.AllTags;
const TagsFactory = Tags_def.TagsFactory;
;// ./mjs/input/tex/tagformat/TagFormatConfiguration.js
let tagID = 0;
function tagformatConfig(config, jax) {
const tags = jax.parseOptions.options.tags;
if (tags !== 'base' && Object.hasOwn(config.tags, tags)) {
TagsFactory.add(tags, config.tags[tags]);
}
const TagClass = TagsFactory.create(jax.parseOptions.options.tags)
.constructor;
class TagFormat extends TagClass {
formatNumber(n) {
return jax.parseOptions.options.tagformat.number(n);
}
formatTag(tag) {
return jax.parseOptions.options.tagformat.tag(tag);
}
formatRef(tag) {
const ref = jax.parseOptions.options.tagformat.ref;
return ref ? ref(tag) : this.formatTag(tag);
}
formatId(id) {
return jax.parseOptions.options.tagformat.id(id);
}
formatUrl(id, base) {
return jax.parseOptions.options.tagformat.url(id, base);
}
}
tagID++;
const tagName = 'configTags-' + tagID;
TagsFactory.add(tagName, TagFormat);
jax.parseOptions.options.tags = tagName;
}
const TagFormatConfiguration = Configuration.create('tagformat', {
[ConfigurationType.CONFIG]: [tagformatConfig, 10],
[ConfigurationType.OPTIONS]: {
tagformat: {
number: (n) => n.toString(),
tag: (tag) => '(' + tag + ')',
ref: '',
id: (id) => 'mjx-eqn:' + id.replace(/\s/g, '_'),
url: (id, base) => base + '#' + encodeURIComponent(id),
},
},
});
//# sourceMappingURL=TagFormatConfiguration.js.map
;// ./components/mjs/input/tex/extensions/tagformat/lib/tagformat.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/tagformat', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
tagformat: {
TagFormatConfiguration: TagFormatConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/tagformat/tagformat.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/configmacros.js 0000644 0001762 0000144 00000016745 15112352646 024436 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/configmacros/ConfigMacrosConfiguration.js
var ConfigMacrosConfiguration_namespaceObject = {};
__webpack_require__.r(ConfigMacrosConfiguration_namespaceObject);
__webpack_require__.d(ConfigMacrosConfiguration_namespaceObject, {
ConfigMacrosConfiguration: () => (ConfigMacrosConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseMethods.js
const ParseMethods_def = MathJax._.input.tex.ParseMethods;
/* harmony default export */ const ParseMethods = (ParseMethods_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/Token.js
const Token_def = MathJax._.input.tex.Token;
const Token = Token_def.Token;
const Macro = Token_def.Macro;
;// ./components/mjs/input/tex/extensions/newcommand/lib/input/tex/newcommand/NewcommandMethods.js
const NewcommandMethods_def = MathJax._.input.tex.newcommand.NewcommandMethods;
/* harmony default export */ const NewcommandMethods = (NewcommandMethods_def.default);
;// ./components/mjs/input/tex/extensions/newcommand/lib/input/tex/newcommand/NewcommandItems.js
const NewcommandItems_def = MathJax._.input.tex.newcommand.NewcommandItems;
const BeginEnvItem = NewcommandItems_def.BeginEnvItem;
;// ./mjs/input/tex/configmacros/ConfigMacrosConfiguration.js
const MACROSMAP = 'configmacros-map';
const ACTIVEMAP = 'configmacros-active-map';
const ENVIRONMENTMAP = 'configmacros-env-map';
function configmacrosInit(config) {
new MacroMap(ACTIVEMAP, {});
new CommandMap(MACROSMAP, {});
new EnvironmentMap(ENVIRONMENTMAP, ParseMethods.environment, {});
config.append(Configuration.local({
handler: {
[HandlerType.CHARACTER]: [ACTIVEMAP],
[HandlerType.MACRO]: [MACROSMAP],
[HandlerType.ENVIRONMENT]: [ENVIRONMENTMAP],
},
priority: 3,
}));
}
function configmacrosConfig(_config, jax) {
configActives(jax);
configMacros(jax);
configEnvironments(jax);
}
function setMacros(name, map, jax) {
const handler = jax.parseOptions.handlers.retrieve(map);
const macros = jax.parseOptions.options[name];
for (const cs of Object.keys(macros)) {
const def = typeof macros[cs] === 'string' ? [macros[cs]] : macros[cs];
const macro = Array.isArray(def[2])
? new Macro(cs, NewcommandMethods.MacroWithTemplate, def.slice(0, 2).concat(def[2]))
: new Macro(cs, NewcommandMethods.Macro, def);
handler.add(cs, macro);
}
}
function configActives(jax) {
setMacros('active', ACTIVEMAP, jax);
}
function configMacros(jax) {
setMacros('macros', MACROSMAP, jax);
}
function configEnvironments(jax) {
const handler = jax.parseOptions.handlers.retrieve(ENVIRONMENTMAP);
const environments = jax.parseOptions.options.environments;
for (const env of Object.keys(environments)) {
handler.add(env, new Macro(env, NewcommandMethods.BeginEnv, [true].concat(environments[env])));
}
}
const ConfigMacrosConfiguration = Configuration.create('configmacros', {
[ConfigurationType.INIT]: configmacrosInit,
[ConfigurationType.CONFIG]: configmacrosConfig,
[ConfigurationType.ITEMS]: {
[BeginEnvItem.prototype.kind]: BeginEnvItem,
},
[ConfigurationType.OPTIONS]: {
active: expandable({}),
macros: expandable({}),
environments: expandable({}),
},
});
//# sourceMappingURL=ConfigMacrosConfiguration.js.map
;// ./components/mjs/input/tex/extensions/configmacros/lib/configmacros.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/configmacros', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
configmacros: {
ConfigMacrosConfiguration: ConfigMacrosConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/configmacros/configmacros.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/colortbl.js 0000644 0001762 0000144 00000020011 15112352644 023557 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/colortbl/ColortblConfiguration.js
var ColortblConfiguration_namespaceObject = {};
__webpack_require__.r(ColortblConfiguration_namespaceObject);
__webpack_require__.d(ColortblConfiguration_namespaceObject, {
ColorArrayItem: () => (ColorArrayItem),
ColortblConfiguration: () => (ColortblConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseItems.js
const BaseItems_def = MathJax._.input.tex.base.BaseItems;
const StartItem = BaseItems_def.StartItem;
const StopItem = BaseItems_def.StopItem;
const OpenItem = BaseItems_def.OpenItem;
const CloseItem = BaseItems_def.CloseItem;
const NullItem = BaseItems_def.NullItem;
const PrimeItem = BaseItems_def.PrimeItem;
const SubsupItem = BaseItems_def.SubsupItem;
const OverItem = BaseItems_def.OverItem;
const LeftItem = BaseItems_def.LeftItem;
const Middle = BaseItems_def.Middle;
const RightItem = BaseItems_def.RightItem;
const BreakItem = BaseItems_def.BreakItem;
const BeginItem = BaseItems_def.BeginItem;
const EndItem = BaseItems_def.EndItem;
const StyleItem = BaseItems_def.StyleItem;
const PositionItem = BaseItems_def.PositionItem;
const CellItem = BaseItems_def.CellItem;
const MmlItem = BaseItems_def.MmlItem;
const FnItem = BaseItems_def.FnItem;
const NotItem = BaseItems_def.NotItem;
const NonscriptItem = BaseItems_def.NonscriptItem;
const DotsItem = BaseItems_def.DotsItem;
const ArrayItem = BaseItems_def.ArrayItem;
const EqnArrayItem = BaseItems_def.EqnArrayItem;
const MstyleItem = BaseItems_def.MstyleItem;
const EquationItem = BaseItems_def.EquationItem;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./mjs/input/tex/colortbl/ColortblConfiguration.js
class ColorArrayItem extends ArrayItem {
constructor() {
super(...arguments);
this.color = {
cell: '',
row: '',
col: [],
};
this.hasColor = false;
}
EndEntry() {
super.EndEntry();
const cell = this.row[this.row.length - 1];
const color = this.color.cell || this.color.row || this.color.col[this.row.length - 1];
if (color) {
cell.attributes.set('mathbackground', color);
this.color.cell = '';
this.hasColor = true;
}
}
EndRow() {
super.EndRow();
this.color.row = '';
}
createMml() {
const mml = super.createMml();
let table = mml.isKind('mrow') ? mml.childNodes[1] : mml;
if (table.isKind('mstyle')) {
table = table.childNodes[0].childNodes[0];
}
if (table.isKind('menclose')) {
table = table.childNodes[0].childNodes[0];
}
if (this.hasColor) {
const attributes = table.attributes;
if (attributes.get('frame') === 'none' &&
attributes.get('data-frame-styles') === undefined) {
attributes.set('data-frame-styles', '');
}
}
return mml;
}
}
function TableColor(parser, name, type) {
const lookup = parser.configuration.packageData.get('color').model;
const model = parser.GetBrackets(name, '');
const color = lookup.getColor(model, parser.GetArgument(name));
const top = parser.stack.Top();
if (!(top instanceof ColorArrayItem)) {
throw new TexError('UnsupportedTableColor', 'Unsupported use of %1', parser.currentCS);
}
if (type === 'col') {
if (top.table.length && top.color.col[top.row.length] !== color) {
throw new TexError('ColumnColorNotTop', '%1 must be in the top row or preamble', name);
}
top.color.col[top.row.length] = color;
if (parser.GetBrackets(name, '')) {
parser.GetBrackets(name, '');
}
}
else {
top.color[type] = color;
if (type === 'row' && (top.Size() || top.row.length)) {
throw new TexError('RowColorNotFirst', '%1 must be at the beginning of a row', name);
}
}
}
new CommandMap('colortbl', {
cellcolor: [TableColor, 'cell'],
rowcolor: [TableColor, 'row'],
columncolor: [TableColor, 'col'],
});
const config = function (config, jax) {
if (!jax.parseOptions.packageData.has('color')) {
ConfigurationHandler.get('color').config(config, jax);
}
};
const ColortblConfiguration = Configuration.create('colortbl', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['colortbl'] },
[ConfigurationType.ITEMS]: { array: ColorArrayItem },
[ConfigurationType.PRIORITY]: 10,
[ConfigurationType.CONFIG]: [config, 10],
});
//# sourceMappingURL=ColortblConfiguration.js.map
;// ./components/mjs/input/tex/extensions/colortbl/lib/colortbl.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/colortbl', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
colortbl: {
ColortblConfiguration: ColortblConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/colortbl/colortbl.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/setoptions.js 0000644 0001762 0000144 00000023573 15112352666 024172 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/setoptions/SetOptionsConfiguration.js
var SetOptionsConfiguration_namespaceObject = {};
__webpack_require__.r(SetOptionsConfiguration_namespaceObject);
__webpack_require__.d(SetOptionsConfiguration_namespaceObject, {
SetOptionsConfiguration: () => (SetOptionsConfiguration),
SetOptionsUtil: () => (SetOptionsUtil)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/Token.js
const Token_def = MathJax._.input.tex.Token;
const Token = Token_def.Token;
const Macro = Token_def.Macro;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./components/mjs/core/lib/util/PrioritizedList.js
const PrioritizedList_def = MathJax._.util.PrioritizedList;
const PrioritizedList = PrioritizedList_def.PrioritizedList;
;// ./mjs/input/tex/setoptions/SetOptionsConfiguration.js
const SetOptionsUtil = {
filterPackage(parser, extension) {
if (extension !== 'tex' && !ConfigurationHandler.get(extension)) {
throw new TexError('NotAPackage', 'Not a defined package: %1', extension);
}
const config = parser.options.setoptions;
const options = config.allowOptions[extension];
if ((options === undefined && !config.allowPackageDefault) ||
options === false) {
throw new TexError('PackageNotSettable', 'Options can\'t be set for package "%1"', extension);
}
return true;
},
filterOption(parser, extension, option) {
const config = parser.options.setoptions;
const options = config.allowOptions[extension] || {};
const isTex = extension === 'tex';
const allow = Object.hasOwn(options, option) && !Options_isObject(options[option])
? options[option]
: null;
if (allow === false || (allow === null && !config.allowOptionsDefault)) {
if (isTex) {
throw new TexError('TeXOptionNotSettable', 'Option "%1" is not allowed to be set', option);
}
else {
throw new TexError('OptionNotSettable', 'Option "%1" is not allowed to be set for package %2', option, extension);
}
}
const extOptions = isTex ? parser.options : parser.options[extension];
if (!extOptions || !Object.hasOwn(extOptions, option)) {
if (isTex) {
throw new TexError('InvalidTexOption', 'Invalid TeX option "%1"', option);
}
else {
throw new TexError('InvalidOptionKey', 'Invalid option "%1" for package "%2"', option, extension);
}
}
return true;
},
filterValue(_parser, _extension, _option, value) {
if (typeof value !== 'string') {
return value;
}
const match = value.match(/^\/(.*)\/([dgimsuvy]*)$/);
return match ? new RegExp(match[1], match[2]) : value;
},
};
function SetOptions(parser, name) {
const extension = parser.GetBrackets(name) || 'tex';
const options = ParseUtil.keyvalOptions(parser.GetArgument(name));
const config = parser.options.setoptions;
if (!config.filterPackage(parser, extension))
return;
for (const key of Object.keys(options)) {
if (config.filterOption(parser, extension, key)) {
(extension === 'tex' ? parser.options : parser.options[extension])[key] =
config.filterValue(parser, extension, key, options[key]);
}
}
parser.Push(parser.itemFactory.create('null'));
}
function setoptionsConfig(_config, jax) {
const setOptionsMap = new CommandMap('setoptions', {
setOptions: SetOptions,
});
const macros = jax.parseOptions.handlers.get(HandlerType.MACRO);
macros.add(['setoptions'], null, PrioritizedList.DEFAULTPRIORITY - 1);
const require = macros.lookup('require');
if (require) {
setOptionsMap.add('Require', new Macro('Require', require._func));
setOptionsMap.add('require', new Macro('require', BaseMethods.Macro, [
'\\Require{#2}\\setOptions[#2]{#1}',
2,
'',
]));
}
}
const SetOptionsConfiguration = Configuration.create('setoptions', {
[ConfigurationType.CONFIG]: setoptionsConfig,
[ConfigurationType.PRIORITY]: 3,
[ConfigurationType.OPTIONS]: {
setoptions: {
filterPackage: SetOptionsUtil.filterPackage,
filterOption: SetOptionsUtil.filterOption,
filterValue: SetOptionsUtil.filterValue,
allowPackageDefault: true,
allowOptionsDefault: true,
allowOptions: expandable({
tex: {
FindTeX: false,
formatError: false,
package: false,
baseURL: false,
tags: false,
maxBuffer: false,
maxMaxros: false,
macros: false,
environments: false
},
setoptions: false,
autoload: false,
require: false,
configmacros: false,
tagformat: false
})
}
},
});
//# sourceMappingURL=SetOptionsConfiguration.js.map
;// ./components/mjs/input/tex/extensions/setoptions/lib/setoptions.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/setoptions', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
setoptions: {
SetOptionsConfiguration: SetOptionsConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/setoptions/setoptions.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/textcomp.js 0000644 0001762 0000144 00000024555 15112352672 023624 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/textcomp/TextcompConfiguration.js
var TextcompConfiguration_namespaceObject = {};
__webpack_require__.r(TextcompConfiguration_namespaceObject);
__webpack_require__.d(TextcompConfiguration_namespaceObject, {
TextcompConfiguration: () => (TextcompConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexConstants.js
const TexConstants_def = MathJax._.input.tex.TexConstants;
const TexConstant = TexConstants_def.TexConstant;
;// ./components/mjs/input/tex/extensions/textmacros/lib/input/tex/textmacros/TextMacrosMethods.js
const TextMacrosMethods_def = MathJax._.input.tex.textmacros.TextMacrosMethods;
const TextMacrosMethods = TextMacrosMethods_def.TextMacrosMethods;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/input/tex/extensions/textmacros/lib/input/tex/textmacros/TextParser.js
const TextParser_def = MathJax._.input.tex.textmacros.TextParser;
const TextParser = TextParser_def.TextParser;
;// ./mjs/input/tex/textcomp/TextcompMappings.js
function Insert(parser, name, c, font) {
if (parser instanceof TextParser) {
if (!font) {
TextMacrosMethods.Insert(parser, name, c);
return;
}
parser.saveText();
}
parser.Push(ParseUtil.internalText(parser, c, font ? { mathvariant: font } : {}));
}
new CommandMap('textcomp-macros', {
textasciicircum: [Insert, '\u005E'],
textasciitilde: [Insert, '\u007E'],
textasteriskcentered: [Insert, '\u002A'],
textbackslash: [Insert, '\u005C'],
textbar: [Insert, '\u007C'],
textbraceleft: [Insert, '\u007B'],
textbraceright: [Insert, '\u007D'],
textbullet: [Insert, '\u2022'],
textdagger: [Insert, '\u2020'],
textdaggerdbl: [Insert, '\u2021'],
textellipsis: [Insert, '\u2026'],
textemdash: [Insert, '\u2014'],
textendash: [Insert, '\u2013'],
textexclamdown: [Insert, '\u00A1'],
textgreater: [Insert, '\u003E'],
textless: [Insert, '\u003C'],
textordfeminine: [Insert, '\u00AA'],
textordmasculine: [Insert, '\u00BA'],
textparagraph: [Insert, '\u00B6'],
textperiodcentered: [Insert, '\u00B7'],
textquestiondown: [Insert, '\u00BF'],
textquotedblleft: [Insert, '\u201C'],
textquotedblright: [Insert, '\u201D'],
textquoteleft: [Insert, '\u2018'],
textquoteright: [Insert, '\u2019'],
textsection: [Insert, '\u00A7'],
textunderscore: [Insert, '\u005F'],
textvisiblespace: [Insert, '\u2423'],
textacutedbl: [Insert, '\u02DD'],
textasciiacute: [Insert, '\u00B4'],
textasciibreve: [Insert, '\u02D8'],
textasciicaron: [Insert, '\u02C7'],
textasciidieresis: [Insert, '\u00A8'],
textasciimacron: [Insert, '\u00AF'],
textgravedbl: [Insert, '\u02F5'],
texttildelow: [Insert, '\u02F7'],
textbaht: [Insert, '\u0E3F'],
textcent: [Insert, '\u00A2'],
textcolonmonetary: [Insert, '\u20A1'],
textcurrency: [Insert, '\u00A4'],
textdollar: [Insert, '\u0024'],
textdong: [Insert, '\u20AB'],
texteuro: [Insert, '\u20AC'],
textflorin: [Insert, '\u0192'],
textguarani: [Insert, '\u20B2'],
textlira: [Insert, '\u20A4'],
textnaira: [Insert, '\u20A6'],
textpeso: [Insert, '\u20B1'],
textsterling: [Insert, '\u00A3'],
textwon: [Insert, '\u20A9'],
textyen: [Insert, '\u00A5'],
textcircledP: [Insert, '\u2117'],
textcompwordmark: [Insert, '\u200C'],
textcopyleft: [Insert, '\u{1F12F}'],
textcopyright: [Insert, '\u00A9'],
textregistered: [Insert, '\u00AE'],
textservicemark: [Insert, '\u2120'],
texttrademark: [Insert, '\u2122'],
textbardbl: [Insert, '\u2016'],
textbigcircle: [Insert, '\u25EF'],
textblank: [Insert, '\u2422'],
textbrokenbar: [Insert, '\u00A6'],
textdiscount: [Insert, '\u2052'],
textestimated: [Insert, '\u212E'],
textinterrobang: [Insert, '\u203D'],
textinterrobangdown: [Insert, '\u2E18'],
textmusicalnote: [Insert, '\u266A'],
textnumero: [Insert, '\u2116'],
textopenbullet: [Insert, '\u25E6'],
textpertenthousand: [Insert, '\u2031'],
textperthousand: [Insert, '\u2030'],
textrecipe: [Insert, '\u211E'],
textreferencemark: [Insert, '\u203B'],
textlangle: [Insert, '\u2329'],
textrangle: [Insert, '\u232A'],
textlbrackdbl: [Insert, '\u27E6'],
textrbrackdbl: [Insert, '\u27E7'],
textlquill: [Insert, '\u2045'],
textrquill: [Insert, '\u2046'],
textcelsius: [Insert, '\u2103'],
textdegree: [Insert, '\u00B0'],
textdiv: [Insert, '\u00F7'],
textdownarrow: [Insert, '\u2193'],
textfractionsolidus: [Insert, '\u2044'],
textleftarrow: [Insert, '\u2190'],
textlnot: [Insert, '\u00AC'],
textmho: [Insert, '\u2127'],
textminus: [Insert, '\u2212'],
textmu: [Insert, '\u00B5'],
textohm: [Insert, '\u2126'],
textonehalf: [Insert, '\u00BD'],
textonequarter: [Insert, '\u00BC'],
textonesuperior: [Insert, '\u00B9'],
textpm: [Insert, '\u00B1'],
textrightarrow: [Insert, '\u2192'],
textsurd: [Insert, '\u221A'],
textthreequarters: [Insert, '\u00BE'],
textthreesuperior: [Insert, '\u00B3'],
texttimes: [Insert, '\u00D7'],
texttwosuperior: [Insert, '\u00B2'],
textuparrow: [Insert, '\u2191'],
textborn: [Insert, '\u002A'],
textdied: [Insert, '\u2020'],
textdivorced: [Insert, '\u26AE'],
textmarried: [Insert, '\u26AD'],
textcentoldstyle: [Insert, '\u00A2', TexConstant.Variant.OLDSTYLE],
textdollaroldstyle: [Insert, '\u0024', TexConstant.Variant.OLDSTYLE],
textzerooldstyle: [Insert, '0', TexConstant.Variant.OLDSTYLE],
textoneoldstyle: [Insert, '1', TexConstant.Variant.OLDSTYLE],
texttwooldstyle: [Insert, '2', TexConstant.Variant.OLDSTYLE],
textthreeoldstyle: [Insert, '3', TexConstant.Variant.OLDSTYLE],
textfouroldstyle: [Insert, '4', TexConstant.Variant.OLDSTYLE],
textfiveoldstyle: [Insert, '5', TexConstant.Variant.OLDSTYLE],
textsixoldstyle: [Insert, '6', TexConstant.Variant.OLDSTYLE],
textsevenoldstyle: [Insert, '7', TexConstant.Variant.OLDSTYLE],
texteightoldstyle: [Insert, '8', TexConstant.Variant.OLDSTYLE],
textnineoldstyle: [Insert, '9', TexConstant.Variant.OLDSTYLE],
});
//# sourceMappingURL=TextcompMappings.js.map
;// ./mjs/input/tex/textcomp/TextcompConfiguration.js
Configuration.create('text-textcomp', {
[ConfigurationType.PARSER]: 'text',
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['textcomp-macros'] },
});
const TextcompConfiguration = Configuration.create('textcomp', {
[ConfigurationType.HANDLER]: { macro: ['textcomp-macros'] },
config(_config, jax) {
const textmacros = jax.parseOptions.packageData.get('textmacros');
if (textmacros) {
textmacros.parseOptions.options.textmacros.packages.push('text-textcomp');
textmacros.textConf.add('text-textcomp', jax, {});
}
},
});
//# sourceMappingURL=TextcompConfiguration.js.map
;// ./components/mjs/input/tex/extensions/textcomp/lib/textcomp.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/textcomp', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
textcomp: {
TextcompConfiguration: TextcompConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/textcomp/textcomp.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/require.js 0000644 0001762 0000144 00000024240 15112352665 023426 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/require/RequireConfiguration.js
var RequireConfiguration_namespaceObject = {};
__webpack_require__.r(RequireConfiguration_namespaceObject);
__webpack_require__.d(RequireConfiguration_namespaceObject, {
RequireConfiguration: () => (RequireConfiguration),
RequireLoad: () => (RequireLoad),
RequireMethods: () => (RequireMethods),
options: () => (options)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/startup/lib/components/startup.js
const startup_g = (typeof window !== 'undefined' ? window : global);
const startup_def = startup_g.MathJax._.components.startup;
const Startup = startup_def.Startup;
const startup_MathJax = startup_def.MathJax;
const CONFIG = startup_def.CONFIG;
;// ./components/mjs/startup/lib/components/package.js
const package_def = MathJax._.components.package;
const PackageError = package_def.PackageError;
const Package = package_def.Package;
;// ./components/mjs/startup/lib/components/loader.js
const loader_g = (typeof window !== 'undefined' ? window : global);
const loader_def = loader_g.MathJax._.components.loader;
const PathFilters = loader_def.PathFilters;
const Loader = loader_def.Loader;
const loader_MathJax = loader_def.MathJax;
const loader_CONFIG = loader_def.CONFIG;
;// ./components/mjs/core/lib/mathjax.js
const mathjax_def = MathJax._.mathjax;
const mathjax = mathjax_def.mathjax;
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./mjs/input/tex/require/RequireConfiguration.js
const MJCONFIG = startup_MathJax.config;
function RegisterExtension(jax, name) {
const require = jax.parseOptions.options.require;
const required = jax.parseOptions.packageData.get('require')
.required;
const extension = name.substring(require.prefix.length);
if (!required.includes(extension)) {
required.push(extension);
const retry = RegisterDependencies(jax, loader_CONFIG.dependencies[name]);
if (retry) {
mathjax.retryAfter(retry.then(() => ProcessExtension(jax, name, extension)));
}
else {
ProcessExtension(jax, name, extension);
}
}
}
function ProcessExtension(jax, name, extension) {
const handler = ConfigurationHandler.get(extension);
if (handler) {
let options = MJCONFIG[name] || {};
if (handler.options &&
Object.keys(handler.options).length === 1 &&
handler.options[extension]) {
options = { [extension]: options };
}
jax.configuration.add(extension, jax, options);
const configured = jax.parseOptions.packageData.get('require').configured;
if (handler.preprocessors.length && !configured.has(extension)) {
configured.set(extension, true);
mathjax.retryAfter(Promise.resolve());
}
}
}
function RegisterDependencies(jax, names = []) {
const prefix = jax.parseOptions.options.require.prefix;
const retries = [];
for (const name of names) {
if (name.substring(0, prefix.length) === prefix) {
try {
RegisterExtension(jax, name);
}
catch (err) {
if (!err.retry)
throw err;
retries.push(err.retry);
}
}
}
return retries.length ? Promise.all(retries) : null;
}
function RequireLoad(parser, name) {
var _a, _b;
const options = parser.options.require;
const allow = options.allow;
const extension = (name.substring(0, 1) === '[' ? '' : options.prefix) + name;
const allowed = Object.hasOwn(allow, extension)
? allow[extension]
: Object.hasOwn(allow, name)
? allow[name]
: options.defaultAllow;
if (!allowed) {
throw new TexError('BadRequire', 'Extension "%1" is not allowed to be loaded', extension);
}
const data = Package.packages.get(extension);
if (!data) {
mathjax.retryAfter(Loader.load(extension).catch((_) => { }));
}
if (data.hasFailed) {
throw new TexError('RequireFail', 'Extension "%1" failed to load', name);
}
const require = (_a = loader_CONFIG[extension]) === null || _a === void 0 ? void 0 : _a.rendererExtensions;
const menu = (_b = startup_MathJax.startup.document) === null || _b === void 0 ? void 0 : _b.menu;
if (require && menu) {
menu.addRequiredExtensions(require);
}
RegisterExtension(parser.configuration.packageData.get('require').jax, extension);
}
function config(_config, jax) {
jax.parseOptions.packageData.set('require', {
jax: jax,
required: [...jax.options.packages],
configured: new Map()
});
const options = jax.parseOptions.options.require;
const prefix = options.prefix;
if (prefix.match(/[^_a-zA-Z0-9]/)) {
throw Error('Illegal characters used in \\require prefix');
}
if (!loader_CONFIG.paths[prefix]) {
loader_CONFIG.paths[prefix] = '[mathjax]/input/tex/extensions';
}
options.prefix = '[' + prefix + ']/';
}
const RequireMethods = {
Require(parser, name) {
const required = parser.GetArgument(name);
if (required.match(/[^_a-zA-Z0-9]/) || required === '') {
throw new TexError('BadPackageName', 'Argument for %1 is not a valid package name', name);
}
RequireLoad(parser, required);
parser.Push(parser.itemFactory.create('null'));
},
};
const options = {
require: {
allow: expandable({
base: false,
autoload: false,
configmacros: false,
tagformat: false,
setoptions: false,
texhtml: false,
}),
defaultAllow: true,
prefix: 'tex',
},
};
new CommandMap('require', { require: RequireMethods.Require });
const RequireConfiguration = Configuration.create('require', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['require'],
},
[ConfigurationType.CONFIG]: config,
[ConfigurationType.OPTIONS]: options,
});
//# sourceMappingURL=RequireConfiguration.js.map
;// ./components/mjs/input/tex/extensions/require/lib/require.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/require', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
require: {
RequireConfiguration: RequireConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/require/require.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/mathtools.js 0000644 0001762 0000144 00000137503 15112352656 023773 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/mathtools/MathtoolsUtil.js
var MathtoolsUtil_namespaceObject = {};
__webpack_require__.r(MathtoolsUtil_namespaceObject);
__webpack_require__.d(MathtoolsUtil_namespaceObject, {
MathtoolsUtil: () => (MathtoolsUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/mathtools/MathtoolsMethods.js
var MathtoolsMethods_namespaceObject = {};
__webpack_require__.r(MathtoolsMethods_namespaceObject);
__webpack_require__.d(MathtoolsMethods_namespaceObject, {
LEGACYCONFIG: () => (LEGACYCONFIG),
LEGACYPRIORITY: () => (LEGACYPRIORITY),
MathtoolsMethods: () => (MathtoolsMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/mathtools/MathtoolsTags.js
var MathtoolsTags_namespaceObject = {};
__webpack_require__.r(MathtoolsTags_namespaceObject);
__webpack_require__.d(MathtoolsTags_namespaceObject, {
MathtoolsTagFormat: () => (MathtoolsTagFormat)
});
// NAMESPACE OBJECT: ./mjs/input/tex/mathtools/MathtoolsItems.js
var MathtoolsItems_namespaceObject = {};
__webpack_require__.r(MathtoolsItems_namespaceObject);
__webpack_require__.d(MathtoolsItems_namespaceObject, {
MultlinedItem: () => (MultlinedItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/mathtools/MathtoolsConfiguration.js
var MathtoolsConfiguration_namespaceObject = {};
__webpack_require__.r(MathtoolsConfiguration_namespaceObject);
__webpack_require__.d(MathtoolsConfiguration_namespaceObject, {
MathtoolsConfiguration: () => (MathtoolsConfiguration),
fixPrescripts: () => (fixPrescripts)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/Token.js
const Token_def = MathJax._.input.tex.Token;
const Token = Token_def.Token;
const Macro = Token_def.Macro;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./components/mjs/core/lib/util/Options.js
const Options_def = MathJax._.util.Options;
const Options_isObject = Options_def.isObject;
const APPEND = Options_def.APPEND;
const REMOVE = Options_def.REMOVE;
const OPTIONS = Options_def.OPTIONS;
const Expandable = Options_def.Expandable;
const expandable = Options_def.expandable;
const makeArray = Options_def.makeArray;
const keys = Options_def.keys;
const copy = Options_def.copy;
const insert = Options_def.insert;
const defaultOptions = Options_def.defaultOptions;
const userOptions = Options_def.userOptions;
const selectOptions = Options_def.selectOptions;
const selectOptionsFromKeys = Options_def.selectOptionsFromKeys;
const separateOptions = Options_def.separateOptions;
const lookup = Options_def.lookup;
;// ./components/mjs/input/tex/extensions/newcommand/lib/input/tex/newcommand/NewcommandConfiguration.js
const NewcommandConfiguration_def = MathJax._.input.tex.newcommand.NewcommandConfiguration;
const NewcommandConfig = NewcommandConfiguration_def.NewcommandConfig;
const NewcommandConfiguration = NewcommandConfiguration_def.NewcommandConfiguration;
;// ./components/mjs/input/tex/extensions/newcommand/lib/input/tex/newcommand/NewcommandUtil.js
const NewcommandUtil_def = MathJax._.input.tex.newcommand.NewcommandUtil;
const NewcommandTables = NewcommandUtil_def.NewcommandTables;
const NewcommandPriority = NewcommandUtil_def.NewcommandPriority;
const NewcommandUtil = NewcommandUtil_def.NewcommandUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseMethods.js
const ParseMethods_def = MathJax._.input.tex.ParseMethods;
/* harmony default export */ const ParseMethods = (ParseMethods_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexConstants.js
const TexConstants_def = MathJax._.input.tex.TexConstants;
const TexConstant = TexConstants_def.TexConstant;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/UnitUtil.js
const UnitUtil_def = MathJax._.input.tex.UnitUtil;
const UnitUtil = UnitUtil_def.UnitUtil;
;// ./components/mjs/input/tex/extensions/ams/lib/input/tex/ams/AmsMethods.js
const AmsMethods_def = MathJax._.input.tex.ams.AmsMethods;
const AmsMethods = AmsMethods_def.AmsMethods;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexParser.js
const TexParser_def = MathJax._.input.tex.TexParser;
/* harmony default export */ const TexParser = (TexParser_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/core/lib/core/MmlTree/MmlNode.js
const MmlNode_def = MathJax._.core.MmlTree.MmlNode;
const TEXCLASS = MmlNode_def.TEXCLASS;
const TEXCLASSNAMES = MmlNode_def.TEXCLASSNAMES;
const MATHVARIANTS = MmlNode_def.MATHVARIANTS;
const indentAttributes = MmlNode_def.indentAttributes;
const AbstractMmlNode = MmlNode_def.AbstractMmlNode;
const AbstractMmlTokenNode = MmlNode_def.AbstractMmlTokenNode;
const AbstractMmlLayoutNode = MmlNode_def.AbstractMmlLayoutNode;
const AbstractMmlBaseNode = MmlNode_def.AbstractMmlBaseNode;
const AbstractMmlEmptyNode = MmlNode_def.AbstractMmlEmptyNode;
const TextNode = MmlNode_def.TextNode;
const XMLNode = MmlNode_def.XMLNode;
;// ./components/mjs/core/lib/util/lengths.js
const lengths_def = MathJax._.util.lengths;
const BIGDIMEN = lengths_def.BIGDIMEN;
const UNITS = lengths_def.UNITS;
const RELUNITS = lengths_def.RELUNITS;
const MATHSPACE = lengths_def.MATHSPACE;
const length2em = lengths_def.length2em;
const percent = lengths_def.percent;
const em = lengths_def.em;
const px = lengths_def.px;
;// ./components/mjs/input/tex/extensions/newcommand/lib/input/tex/newcommand/NewcommandMethods.js
const NewcommandMethods_def = MathJax._.input.tex.newcommand.NewcommandMethods;
/* harmony default export */ const NewcommandMethods = (NewcommandMethods_def.default);
;// ./components/mjs/core/lib/util/PrioritizedList.js
const PrioritizedList_def = MathJax._.util.PrioritizedList;
const PrioritizedList = PrioritizedList_def.PrioritizedList;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseItems.js
const BaseItems_def = MathJax._.input.tex.base.BaseItems;
const StartItem = BaseItems_def.StartItem;
const StopItem = BaseItems_def.StopItem;
const OpenItem = BaseItems_def.OpenItem;
const CloseItem = BaseItems_def.CloseItem;
const NullItem = BaseItems_def.NullItem;
const PrimeItem = BaseItems_def.PrimeItem;
const SubsupItem = BaseItems_def.SubsupItem;
const OverItem = BaseItems_def.OverItem;
const LeftItem = BaseItems_def.LeftItem;
const Middle = BaseItems_def.Middle;
const RightItem = BaseItems_def.RightItem;
const BreakItem = BaseItems_def.BreakItem;
const BeginItem = BaseItems_def.BeginItem;
const EndItem = BaseItems_def.EndItem;
const StyleItem = BaseItems_def.StyleItem;
const PositionItem = BaseItems_def.PositionItem;
const CellItem = BaseItems_def.CellItem;
const MmlItem = BaseItems_def.MmlItem;
const FnItem = BaseItems_def.FnItem;
const NotItem = BaseItems_def.NotItem;
const NonscriptItem = BaseItems_def.NonscriptItem;
const DotsItem = BaseItems_def.DotsItem;
const ArrayItem = BaseItems_def.ArrayItem;
const EqnArrayItem = BaseItems_def.EqnArrayItem;
const MstyleItem = BaseItems_def.MstyleItem;
const EquationItem = BaseItems_def.EquationItem;
;// ./mjs/input/tex/mathtools/MathtoolsUtil.js
const MathtoolsUtil = {
setDisplayLevel(mml, style) {
if (!style)
return;
const [display, script] = lookup(style, {
'\\displaystyle': [true, 0],
'\\textstyle': [false, 0],
'\\scriptstyle': [false, 1],
'\\scriptscriptstyle': [false, 2],
}, [null, null]);
if (display !== null) {
mml.attributes.set('displaystyle', display);
mml.attributes.set('scriptlevel', script);
}
},
checkAlignment(parser, name) {
const top = parser.stack.Top();
if (top.kind !== EqnArrayItem.prototype.kind) {
throw new TexError('NotInAlignment', '%1 can only be used in aligment environments', name);
}
return top;
},
addPairedDelims(parser, cs, args) {
if (parser.configuration.handlers.get(HandlerType.MACRO).contains(cs)) {
throw new TexError('CommadExists', 'Command %1 already defined', `\\${cs}`);
}
NewcommandUtil.addMacro(parser, cs, MathtoolsMethods.PairedDelimiters, args);
},
spreadLines(mtable, spread) {
if (!mtable.isKind('mtable'))
return;
let rowspacing = mtable.attributes.get('rowspacing');
const add = UnitUtil.dimen2em(spread);
rowspacing = rowspacing
.split(/ /)
.map((s) => UnitUtil.em(Math.max(0, UnitUtil.dimen2em(s) + add)))
.join(' ');
mtable.attributes.set('rowspacing', rowspacing);
},
plusOrMinus(name, n) {
n = n.trim();
if (!n.match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)$/)) {
throw new TexError('NotANumber', 'Argument to %1 is not a number', name);
}
return n.match(/^[-+]/) ? n : '+' + n;
},
getScript(parser, name, pos) {
let arg = UnitUtil.trimSpaces(parser.GetArgument(name));
if (arg === '') {
return parser.create('node', 'none');
}
const format = parser.options.mathtools[`prescript-${pos}-format`];
if (format) {
arg = `${format}{${arg}}`;
}
const mml = new TexParser(arg, parser.stack.env, parser.configuration).mml();
return mml.isKind('TeXAtom') && mml.childNodes[0].childNodes.length === 0
? parser.create('node', 'none')
: mml;
},
};
//# sourceMappingURL=MathtoolsUtil.js.map
;// ./mjs/input/tex/mathtools/MathtoolsMethods.js
const LEGACYCONFIG = {
[HandlerType.MACRO]: ['mathtools-legacycolonsymbols'],
};
const LEGACYPRIORITY = PrioritizedList.DEFAULTPRIORITY - 1;
const MathtoolsMethods = {
MtMatrix(parser, begin, open, close) {
const align = parser.GetBrackets(`\\begin{${begin.getName()}}`, 'c');
return MathtoolsMethods.Array(parser, begin, open, close, align);
},
MtSmallMatrix(parser, begin, open, close, align) {
if (!align) {
align = parser.GetBrackets(`\\begin{${begin.getName()}}`, parser.options.mathtools['smallmatrix-align']);
}
return MathtoolsMethods.Array(parser, begin, open, close, align, UnitUtil.em(1 / 3), '.2em', 'S', 1);
},
MtMultlined(parser, begin) {
const name = `\\begin{${begin.getName()}}`;
let pos = parser.options.mathtools['multlined-pos'] || 'c';
let width = parser.options.mathtools['multlined-width'] || '';
if (!parser.nextIsSpace()) {
const arg = parser.GetBrackets(name, pos);
if (arg.match(/^[ctb]$/)) {
pos = arg;
width = !parser.nextIsSpace() ? parser.GetBrackets(name, '') : '';
}
else {
width = arg;
}
if (width && !UnitUtil.matchDimen(width)[0]) {
throw new TexError('BadWidth', 'Width for %1 must be a dimension', name);
}
}
parser.Push(begin);
const item = parser.itemFactory.create('multlined', parser, begin);
item.arraydef = {
displaystyle: true,
rowspacing: '.5em',
width: width || 'auto',
columnwidth: '100%',
};
return ParseUtil.setArrayAlign(item, pos);
},
HandleShove(parser, name, shove) {
const top = parser.stack.Top();
if (top.kind !== 'multline' && top.kind !== 'multlined') {
throw new TexError('CommandInMultlined', '%1 can only appear within the multline or multlined environments', name);
}
if (top.Size()) {
throw new TexError('CommandAtTheBeginingOfLine', '%1 must come at the beginning of the line', name);
}
top.setProperty('shove', shove);
const shift = parser.GetBrackets(name);
let mml = parser.ParseArg(name);
if (shift) {
const mrow = parser.create('node', 'mrow', []);
const mspace = parser.create('node', 'mspace', [], { width: shift });
if (shove === 'left') {
mrow.appendChild(mspace);
mrow.appendChild(mml);
}
else {
mrow.appendChild(mml);
mrow.appendChild(mspace);
}
mml = mrow;
}
parser.Push(mml);
},
SpreadLines(parser, begin) {
if (parser.stack.env.closing === begin.getName()) {
delete parser.stack.env.closing;
const top = parser.stack.Pop();
const mml = top.toMml();
const spread = top.getProperty('spread');
if (mml.isInferred) {
for (const child of NodeUtil.getChildren(mml)) {
MathtoolsUtil.spreadLines(child, spread);
}
}
else {
MathtoolsUtil.spreadLines(mml, spread);
}
parser.Push(mml);
}
else {
const spread = parser.GetDimen(`\\begin{${begin.getName()}}`);
begin.setProperty('spread', spread);
begin.setProperty('nestStart', true);
ParseUtil.checkEqnEnv(parser);
parser.Push(begin);
}
},
Cases(parser, begin, open, close, style) {
const array = parser.itemFactory
.create('array')
.setProperty('casesEnv', begin.getName());
array.arraydef = {
rowspacing: '.2em',
columnspacing: '1em',
columnalign: 'left',
};
if (style === 'D') {
array.arraydef.displaystyle = true;
}
array.setProperties({ open, close });
parser.Push(begin);
return array;
},
MathLap(parser, name, pos, cramped) {
const style = parser.GetBrackets(name, '').trim();
const mml = parser.create('node', 'mstyle', [
parser.create('node', 'mpadded', [parser.ParseArg(name)], Object.assign({ width: 0 }, (pos === 'r'
? {}
: { lspace: pos === 'l' ? '-1width' : '-.5width' }))),
], { 'data-cramped': cramped });
MathtoolsUtil.setDisplayLevel(mml, style);
parser.Push(parser.create('node', 'TeXAtom', [mml]));
},
Cramped(parser, name) {
const style = parser.GetBrackets(name, '').trim();
const arg = parser.ParseArg(name);
const mml = parser.create('node', 'mstyle', [arg], {
'data-cramped': true,
});
MathtoolsUtil.setDisplayLevel(mml, style);
parser.Push(mml);
},
MtLap(parser, name, pos) {
const content = ParseUtil.internalMath(parser, parser.GetArgument(name), 0);
const mml = parser.create('node', 'mpadded', content, { width: 0 });
if (pos !== 'r') {
NodeUtil.setAttribute(mml, 'lspace', pos === 'l' ? '-1width' : '-.5width');
}
parser.Push(mml);
},
MathMakeBox(parser, name) {
const width = parser.GetBrackets(name);
const pos = parser.GetBrackets(name, 'c');
const mml = parser.create('node', 'mpadded', [parser.ParseArg(name)]);
if (width) {
NodeUtil.setAttribute(mml, 'width', width);
}
const align = lookup(pos.toLowerCase(), { c: 'center', r: 'right' }, '');
if (align) {
NodeUtil.setAttribute(mml, 'data-align', align);
}
if (pos.toLowerCase() !== pos) {
NodeUtil.setAttribute(mml, 'data-overflow', 'linebreak');
}
parser.Push(mml);
},
MathMBox(parser, name) {
parser.Push(parser.create('node', 'mrow', [parser.ParseArg(name)]));
},
UnderOverBracket(parser, name) {
const thickness = length2em(parser.GetBrackets(name, '.1em'), 0.1);
const height = parser.GetBrackets(name, '.2em');
const arg = parser.GetArgument(name);
const [pos, accent, border] = name.charAt(1) === 'o'
? ['over', 'accent', 'bottom']
: ['under', 'accentunder', 'top'];
const t = em(thickness);
const base = new TexParser(arg, parser.stack.env, parser.configuration).mml();
const copy = new TexParser(arg, parser.stack.env, parser.configuration).mml();
const script = parser.create('node', 'mpadded', [parser.create('node', 'mphantom', [copy])], {
style: `border: ${t} solid; border-${border}: none`,
height: height,
depth: 0,
});
const node = ParseUtil.underOver(parser, base, script, pos, true);
const munderover = NodeUtil.getChildAt(NodeUtil.getChildAt(node, 0), 0);
NodeUtil.setAttribute(munderover, accent, true);
parser.Push(node);
},
Aboxed(parser, name, box = 'boxed', math = true) {
const top = MathtoolsUtil.checkAlignment(parser, name);
if (top.row.length % 2 === 1) {
top.row.push(parser.create('node', 'mtd', []));
}
const arg = parser.GetArgument(name);
const rest = parser.string.substring(parser.i);
parser.string = arg + '&&\\endAboxed';
parser.i = 0;
const left = parser.GetUpTo(name, '&');
const right = parser.GetUpTo(name, '&');
parser.GetUpTo(name, '\\endAboxed');
const [bmath, emath] = math ? ['', ''] : ['$\\displaystyle{', '}$'];
const tex = ParseUtil.substituteArgs(parser, [left, right], `\\rlap{\\${box}{${bmath}#1{}#2${emath}}}` +
'\\kern.267em\\phantom{#1}&\\phantom{{}#2}\\kern.267em');
parser.string = tex + rest;
parser.i = 0;
},
MakeAboxedCommand(parser, name) {
const star = parser.GetStar();
const cs = NewcommandUtil.GetCSname(parser, name);
const box = NewcommandUtil.GetCSname(parser, name + '\\' + cs);
const handlers = parser.configuration.handlers;
if (handlers.get(HandlerType.MACRO).lookup(cs)) {
throw new TexError('AlreadyDefined', '%1 is already defined', '\\' + cs);
}
const handler = handlers.retrieve(NewcommandTables.NEW_COMMAND);
handler.add(cs, new Macro(cs, MathtoolsMethods.Aboxed, [box, star]));
parser.Push(parser.itemFactory.create('null'));
},
ArrowBetweenLines(parser, name) {
const top = MathtoolsUtil.checkAlignment(parser, name);
if (top.Size() || top.row.length) {
throw new TexError('BetweenLines', '%1 must be on a row by itself', name);
}
const star = parser.GetStar();
const symbol = parser.GetBrackets(name, '\\Updownarrow');
if (star) {
top.EndEntry();
top.EndEntry();
}
const tex = star ? '\\quad' + symbol : symbol + '\\quad';
const mml = new TexParser(tex, parser.stack.env, parser.configuration).mml();
parser.Push(mml);
top.EndEntry();
top.EndRow();
},
VDotsWithin(parser, name) {
const arg = '\\mmlToken{mi}{}' + parser.GetArgument(name) + '\\mmlToken{mi}{}';
const base = new TexParser(arg, parser.stack.env, parser.configuration).mml();
const mml = parser.create('node', 'mpadded', [
parser.create('node', 'mpadded', [parser.create('node', 'mo', [parser.create('text', '\u22EE')])], { width: 0, lspace: '-.5width' }),
parser.create('node', 'mphantom', [base]),
], {
lspace: '.5width',
});
parser.Push(mml);
},
ShortVDotsWithin(parser, _name) {
const top = parser.stack.Top();
const star = parser.GetStar();
if (top.EndEntry) {
MathtoolsMethods.FlushSpaceAbove(parser, '\\MTFlushSpaceAbove');
if (!star) {
top.EndEntry();
}
}
MathtoolsMethods.VDotsWithin(parser, '\\vdotswithin');
if (top.EndEntry) {
if (star) {
top.EndEntry();
}
MathtoolsMethods.FlushSpaceBelow(parser, '\\MTFlushSpaceBelow');
}
},
FlushSpaceAbove(parser, name) {
const top = MathtoolsUtil.checkAlignment(parser, name);
if (top.table) {
top.setProperty('flushspaceabove', top.table.length);
top.addRowSpacing('-' + parser.options.mathtools['shortvdotsadjustabove']);
}
},
FlushSpaceBelow(parser, name) {
const top = MathtoolsUtil.checkAlignment(parser, name);
if (top.table) {
if (top.Size()) {
top.EndEntry();
}
top.EndRow();
top.addRowSpacing('-' + parser.options.mathtools['shortvdotsadjustbelow']);
}
},
PairedDelimiters(parser, name, open, close, body = '#1', n = 1, pre = '', post = '') {
const star = parser.GetStar();
const size = star ? '' : parser.GetBrackets(name);
const [left, right, after] = star
? ['\\mathopen{\\left', '\\right', '}\\mathclose{}']
: size
? [size + 'l', size + 'r', '']
: ['', '', ''];
const delim = star ? '\\middle' : size || '';
if (n) {
const args = [];
for (let i = args.length; i < n; i++) {
args.push(parser.GetArgument(name));
}
pre = ParseUtil.substituteArgs(parser, args, pre);
body = ParseUtil.substituteArgs(parser, args, body);
post = ParseUtil.substituteArgs(parser, args, post);
}
body = body.replace(/\\delimsize/g, delim);
parser.string = [
pre,
left,
open,
body,
right,
close,
after,
post,
parser.string.substring(parser.i),
].reduce((s, part) => ParseUtil.addArgs(parser, s, part), '');
parser.i = 0;
ParseUtil.checkMaxMacros(parser);
},
DeclarePairedDelimiter(parser, name) {
const cs = NewcommandUtil.GetCsNameArgument(parser, name);
const open = parser.GetArgument(name);
const close = parser.GetArgument(name);
MathtoolsUtil.addPairedDelims(parser, cs, [open, close]);
parser.Push(parser.itemFactory.create('null'));
},
DeclarePairedDelimiterX(parser, name) {
const cs = NewcommandUtil.GetCsNameArgument(parser, name);
const n = NewcommandUtil.GetArgCount(parser, name);
const open = parser.GetArgument(name);
const close = parser.GetArgument(name);
const body = parser.GetArgument(name);
MathtoolsUtil.addPairedDelims(parser, cs, [open, close, body, n]);
parser.Push(parser.itemFactory.create('null'));
},
DeclarePairedDelimiterXPP(parser, name) {
const cs = NewcommandUtil.GetCsNameArgument(parser, name);
const n = NewcommandUtil.GetArgCount(parser, name);
const pre = parser.GetArgument(name);
const open = parser.GetArgument(name);
const close = parser.GetArgument(name);
const post = parser.GetArgument(name);
const body = parser.GetArgument(name);
MathtoolsUtil.addPairedDelims(parser, cs, [
open,
close,
body,
n,
pre,
post,
]);
parser.Push(parser.itemFactory.create('null'));
},
CenterColon(parser, _name, center, force = false, thin = false) {
const options = parser.options.mathtools;
let mml = parser.create('token', 'mo', {}, ':');
if (center && (options['centercolon'] || force)) {
const dy = options['centercolon-offset'];
mml = parser.create('node', 'mpadded', [mml], Object.assign({ voffset: dy, height: `+${dy}`, depth: `-${dy}` }, (thin
? { width: options['thincolon-dw'], lspace: options['thincolon-dx'] }
: {})));
}
parser.Push(mml);
},
Relation(parser, _name, tex, unicode) {
const options = parser.options.mathtools;
if (options['use-unicode'] && unicode) {
parser.Push(parser.create('token', 'mo', { texClass: TEXCLASS.REL }, unicode));
}
else {
tex =
'\\mathrel{' +
tex.replace(/:/g, '\\MTThinColon').replace(/-/g, '\\mathrel{-}') +
'}';
parser.string = ParseUtil.addArgs(parser, tex, parser.string.substring(parser.i));
parser.i = 0;
}
},
NArrow(parser, _name, c, dy) {
parser.Push(parser.create('node', 'TeXAtom', [
parser.create('token', 'mtext', {}, c),
parser.create('node', 'mpadded', [
parser.create('node', 'mpadded', [
parser.create('node', 'menclose', [
parser.create('node', 'mspace', [], {
height: '.2em',
depth: 0,
width: '.4em',
}),
], {
notation: 'updiagonalstrike',
'data-thickness': '.05em',
'data-padding': 0,
}),
], { width: 0, lspace: '-.5width', voffset: dy }),
parser.create('node', 'mphantom', [
parser.create('token', 'mtext', {}, c),
]),
], { width: 0, lspace: '-.5width' }),
], { texClass: TEXCLASS.REL }));
},
SplitFrac(parser, name, display) {
const num = parser.ParseArg(name);
const den = parser.ParseArg(name);
parser.Push(parser.create('node', 'mstyle', [
parser.create('node', 'mfrac', [
parser.create('node', 'mstyle', [
num,
parser.create('token', 'mi'),
parser.create('token', 'mspace', { width: '1em' }),
], { scriptlevel: 0 }),
parser.create('node', 'mstyle', [
parser.create('token', 'mspace', { width: '1em' }),
parser.create('token', 'mi'),
den,
], { scriptlevel: 0 }),
], { linethickness: 0, numalign: 'left', denomalign: 'right' }),
], { displaystyle: display, scriptlevel: 0 }));
},
XMathStrut(parser, name) {
let dd = parser.GetBrackets(name);
let dh = parser.GetArgument(name);
dh = MathtoolsUtil.plusOrMinus(name, dh);
dd = MathtoolsUtil.plusOrMinus(name, dd || dh);
parser.Push(parser.create('node', 'TeXAtom', [
parser.create('node', 'mpadded', [
parser.create('node', 'mphantom', [
parser.create('token', 'mo', { stretchy: false }, '('),
]),
], { width: 0, height: dh + 'height', depth: dd + 'depth' }),
], { texClass: TEXCLASS.ORD }));
},
Prescript(parser, name) {
const sup = MathtoolsUtil.getScript(parser, name, 'sup');
const sub = MathtoolsUtil.getScript(parser, name, 'sub');
const base = MathtoolsUtil.getScript(parser, name, 'arg');
if (NodeUtil.isType(sup, 'none') && NodeUtil.isType(sub, 'none')) {
parser.Push(base);
return;
}
const mml = parser.create('node', 'mmultiscripts', [base]);
NodeUtil.getChildren(mml).push(null, null);
NodeUtil.appendChildren(mml, [
parser.create('node', 'mprescripts'),
sub,
sup,
]);
mml.setProperty('fixPrescript', true);
parser.Push(mml);
},
NewTagForm(parser, name, renew = false) {
const tags = parser.tags;
if (!('mtFormats' in tags)) {
throw new TexError('TagsNotMT', '%1 can only be used with ams or mathtools tags', name);
}
const id = parser.GetArgument(name).trim();
if (!id) {
throw new TexError('InvalidTagFormID', "Tag form name can't be empty");
}
const format = parser.GetBrackets(name, '');
const left = parser.GetArgument(name);
const right = parser.GetArgument(name);
if (!renew && tags.mtFormats.has(id)) {
throw new TexError('DuplicateTagForm', 'Duplicate tag form: %1', id);
}
tags.mtFormats.set(id, [left, right, format]);
parser.Push(parser.itemFactory.create('null'));
},
UseTagForm(parser, name) {
const tags = parser.tags;
if (!('mtFormats' in tags)) {
throw new TexError('TagsNotMT', '%1 can only be used with ams or mathtools tags', name);
}
const id = parser.GetArgument(name).trim();
if (!id) {
tags.mtCurrent = null;
parser.Push(parser.itemFactory.create('null'));
return;
}
if (!tags.mtFormats.has(id)) {
throw new TexError('UndefinedTagForm', 'Undefined tag form: %1', id);
}
tags.mtCurrent = tags.mtFormats.get(id);
parser.Push(parser.itemFactory.create('null'));
},
SetOptions(parser, name) {
const options = parser.options.mathtools;
if (!options['allow-mathtoolsset']) {
throw new TexError('ForbiddenMathtoolsSet', '%1 is disabled', name);
}
const allowed = {};
Object.keys(options).forEach((id) => {
if (id !== 'pariedDelimiters' &&
id !== 'tagforms' &&
id !== 'allow-mathtoolsset') {
allowed[id] = 1;
}
});
const args = parser.GetArgument(name);
const keys = ParseUtil.keyvalOptions(args, allowed, true);
for (const id of Object.keys(keys)) {
if (id === 'legacycolonsymbols' && options[id] !== keys[id]) {
if (options[id]) {
parser.configuration.handlers.remove(LEGACYCONFIG, {});
}
else {
parser.configuration.handlers.add(LEGACYCONFIG, {}, LEGACYPRIORITY);
}
}
options[id] = keys[id];
}
parser.Push(parser.itemFactory.create('null'));
},
Array: BaseMethods.Array,
Macro: BaseMethods.Macro,
xArrow: AmsMethods.xArrow,
HandleRef: AmsMethods.HandleRef,
AmsEqnArray: AmsMethods.AmsEqnArray,
MacroWithTemplate: NewcommandMethods.MacroWithTemplate,
};
//# sourceMappingURL=MathtoolsMethods.js.map
;// ./mjs/input/tex/mathtools/MathtoolsMappings.js
new CommandMap('mathtools-macros', {
shoveleft: [MathtoolsMethods.HandleShove, TexConstant.Align.LEFT],
shoveright: [MathtoolsMethods.HandleShove, TexConstant.Align.RIGHT],
xleftrightarrow: [MathtoolsMethods.xArrow, 0x2194, 10, 10],
xLeftarrow: [MathtoolsMethods.xArrow, 0x21d0, 12, 7],
xRightarrow: [MathtoolsMethods.xArrow, 0x21d2, 7, 12],
xLeftrightarrow: [MathtoolsMethods.xArrow, 0x21d4, 12, 12],
xhookleftarrow: [MathtoolsMethods.xArrow, 0x21a9, 10, 5],
xhookrightarrow: [MathtoolsMethods.xArrow, 0x21aa, 5, 10],
xmapsto: [MathtoolsMethods.xArrow, 0x21a6, 10, 10],
xrightharpoondown: [MathtoolsMethods.xArrow, 0x21c1, 5, 10],
xleftharpoondown: [MathtoolsMethods.xArrow, 0x21bd, 10, 5],
xrightleftharpoons: [MathtoolsMethods.xArrow, 0x21cc, 10, 10],
xrightharpoonup: [MathtoolsMethods.xArrow, 0x21c0, 5, 10],
xleftharpoonup: [MathtoolsMethods.xArrow, 0x21bc, 10, 5],
xleftrightharpoons: [MathtoolsMethods.xArrow, 0x21cb, 10, 10],
xlongrightarrow: [MathtoolsMethods.xArrow, 0x27f6, 7, 12, 1.45],
xlongleftarrow: [MathtoolsMethods.xArrow, 0x27f5, 12, 7, 1.45],
xLongrightarrow: [MathtoolsMethods.xArrow, 0x27f9, 7, 12, 1.45],
xLongleftarrow: [MathtoolsMethods.xArrow, 0x27f8, 12, 7, 1.45],
mathllap: [MathtoolsMethods.MathLap, 'l', false],
mathrlap: [MathtoolsMethods.MathLap, 'r', false],
mathclap: [MathtoolsMethods.MathLap, 'c', false],
clap: [MathtoolsMethods.MtLap, 'c'],
textllap: [MathtoolsMethods.MtLap, 'l'],
textrlap: [MathtoolsMethods.MtLap, 'r'],
textclap: [MathtoolsMethods.MtLap, 'c'],
cramped: MathtoolsMethods.Cramped,
crampedllap: [MathtoolsMethods.MathLap, 'l', true],
crampedrlap: [MathtoolsMethods.MathLap, 'r', true],
crampedclap: [MathtoolsMethods.MathLap, 'c', true],
crampedsubstack: [
MathtoolsMethods.Macro,
'\\begin{crampedsubarray}{c}#1\\end{crampedsubarray}',
1,
],
mathmbox: MathtoolsMethods.MathMBox,
mathmakebox: MathtoolsMethods.MathMakeBox,
overbracket: MathtoolsMethods.UnderOverBracket,
underbracket: MathtoolsMethods.UnderOverBracket,
refeq: MathtoolsMethods.HandleRef,
MoveEqLeft: [
MathtoolsMethods.Macro,
'\\hspace{#1em}&\\hspace{-#1em}',
1,
'2',
],
Aboxed: MathtoolsMethods.Aboxed,
MakeAboxedCommand: MathtoolsMethods.MakeAboxedCommand,
ArrowBetweenLines: MathtoolsMethods.ArrowBetweenLines,
vdotswithin: MathtoolsMethods.VDotsWithin,
shortvdotswithin: MathtoolsMethods.ShortVDotsWithin,
MTFlushSpaceAbove: MathtoolsMethods.FlushSpaceAbove,
MTFlushSpaceBelow: MathtoolsMethods.FlushSpaceBelow,
DeclarePairedDelimiter: MathtoolsMethods.DeclarePairedDelimiter,
DeclarePairedDelimiterX: MathtoolsMethods.DeclarePairedDelimiterX,
DeclarePairedDelimiterXPP: MathtoolsMethods.DeclarePairedDelimiterXPP,
DeclarePairedDelimiters: MathtoolsMethods.DeclarePairedDelimiter,
DeclarePairedDelimitersX: MathtoolsMethods.DeclarePairedDelimiterX,
DeclarePairedDelimitersXPP: MathtoolsMethods.DeclarePairedDelimiterXPP,
vcentercolon: [MathtoolsMethods.CenterColon, true, true],
ordinarycolon: [MathtoolsMethods.CenterColon, false],
MTThinColon: [MathtoolsMethods.CenterColon, true, true, true],
coloneqq: [MathtoolsMethods.Relation, ':=', '\u2254'],
Coloneqq: [MathtoolsMethods.Relation, '::=', '\u2A74'],
coloneq: [MathtoolsMethods.Relation, ':=', '\u2254'],
Coloneq: [MathtoolsMethods.Relation, '::=', '\u2A7A'],
eqqcolon: [MathtoolsMethods.Relation, '=:', '\u2255'],
Eqqcolon: [MathtoolsMethods.Relation, '=::'],
eqcolon: [MathtoolsMethods.Relation, '=:', '\u2255'],
Eqcolon: [MathtoolsMethods.Relation, '=::'],
colonapprox: [MathtoolsMethods.Relation, ':\\approx'],
Colonapprox: [MathtoolsMethods.Relation, '::\\approx'],
colonsim: [MathtoolsMethods.Relation, ':\\sim'],
Colonsim: [MathtoolsMethods.Relation, '::\\sim'],
dblcolon: [MathtoolsMethods.Relation, '::', '\u2237'],
approxcolon: [MathtoolsMethods.Relation, '\\approx:'],
Approxcolon: [MathtoolsMethods.Relation, '\\approx::'],
simcolon: [MathtoolsMethods.Relation, '\\sim:'],
Simcolon: [MathtoolsMethods.Relation, '\\sim::'],
colondash: [MathtoolsMethods.Relation, ':-'],
Colondash: [MathtoolsMethods.Relation, '::-'],
dashcolon: [MathtoolsMethods.Relation, '-:', '\u2239'],
Dashcolon: [MathtoolsMethods.Relation, '-::'],
nuparrow: [MathtoolsMethods.NArrow, '\u2191', '.06em'],
ndownarrow: [MathtoolsMethods.NArrow, '\u2193', '.25em'],
bigtimes: [
MathtoolsMethods.Macro,
'\\mathop{\\Large\\kern-.1em\\boldsymbol{\\times}\\kern-.1em}',
],
splitfrac: [MathtoolsMethods.SplitFrac, false],
splitdfrac: [MathtoolsMethods.SplitFrac, true],
xmathstrut: MathtoolsMethods.XMathStrut,
prescript: MathtoolsMethods.Prescript,
newtagform: [MathtoolsMethods.NewTagForm, false],
renewtagform: [MathtoolsMethods.NewTagForm, true],
usetagform: MathtoolsMethods.UseTagForm,
adjustlimits: [
MathtoolsMethods.MacroWithTemplate,
'\\mathop{{#1}\\vphantom{{#3}}}_{{#2}\\vphantom{{#4}}}\\mathop{{#3}\\vphantom{{#1}}}_{{#4}\\vphantom{{#2}}}',
4,
,
'_',
,
'_',
],
mathtoolsset: MathtoolsMethods.SetOptions,
});
new CommandMap('mathtools-legacycolonsymbols', {
coloneq: [MathtoolsMethods.Relation, ':-'],
Coloneq: [MathtoolsMethods.Relation, '::-'],
eqcolon: [MathtoolsMethods.Relation, '-:', '\u2239'],
Eqcolon: [MathtoolsMethods.Relation, '-::'],
});
new EnvironmentMap('mathtools-environments', ParseMethods.environment, {
dcases: [MathtoolsMethods.Array, null, '\\{', '', 'll', null, '.2em', 'D'],
rcases: [MathtoolsMethods.Array, null, '', '\\}', 'll', null, '.2em'],
drcases: [MathtoolsMethods.Array, null, '', '\\}', 'll', null, '.2em', 'D'],
'dcases*': [MathtoolsMethods.Cases, null, '{', '', 'D'],
'rcases*': [MathtoolsMethods.Cases, null, '', '}'],
'drcases*': [MathtoolsMethods.Cases, null, '', '}', 'D'],
'cases*': [MathtoolsMethods.Cases, null, '{', ''],
'matrix*': [MathtoolsMethods.MtMatrix, null, null, null],
'pmatrix*': [MathtoolsMethods.MtMatrix, null, '(', ')'],
'bmatrix*': [MathtoolsMethods.MtMatrix, null, '[', ']'],
'Bmatrix*': [MathtoolsMethods.MtMatrix, null, '\\{', '\\}'],
'vmatrix*': [MathtoolsMethods.MtMatrix, null, '\\vert', '\\vert'],
'Vmatrix*': [MathtoolsMethods.MtMatrix, null, '\\Vert', '\\Vert'],
'smallmatrix*': [MathtoolsMethods.MtSmallMatrix, null, null, null],
psmallmatrix: [MathtoolsMethods.MtSmallMatrix, null, '(', ')', 'c'],
'psmallmatrix*': [MathtoolsMethods.MtSmallMatrix, null, '(', ')'],
bsmallmatrix: [MathtoolsMethods.MtSmallMatrix, null, '[', ']', 'c'],
'bsmallmatrix*': [MathtoolsMethods.MtSmallMatrix, null, '[', ']'],
Bsmallmatrix: [MathtoolsMethods.MtSmallMatrix, null, '\\{', '\\}', 'c'],
'Bsmallmatrix*': [MathtoolsMethods.MtSmallMatrix, null, '\\{', '\\}'],
vsmallmatrix: [MathtoolsMethods.MtSmallMatrix, null, '\\vert', '\\vert', 'c'],
'vsmallmatrix*': [MathtoolsMethods.MtSmallMatrix, null, '\\vert', '\\vert'],
Vsmallmatrix: [MathtoolsMethods.MtSmallMatrix, null, '\\Vert', '\\Vert', 'c'],
'Vsmallmatrix*': [MathtoolsMethods.MtSmallMatrix, null, '\\Vert', '\\Vert'],
crampedsubarray: [
MathtoolsMethods.Array,
null,
null,
null,
null,
'0em',
'0.1em',
"S'",
1,
],
multlined: MathtoolsMethods.MtMultlined,
spreadlines: [MathtoolsMethods.SpreadLines, true],
lgathered: [
MathtoolsMethods.AmsEqnArray,
null,
null,
null,
'l',
't',
null,
'.5em',
'D',
],
rgathered: [
MathtoolsMethods.AmsEqnArray,
null,
null,
null,
'r',
't',
null,
'.5em',
'D',
],
});
new DelimiterMap('mathtools-delimiters', ParseMethods.delimiter, {
'\\lparen': '(',
'\\rparen': ')',
});
new CommandMap('mathtools-characters', {
':': [MathtoolsMethods.CenterColon, true],
});
//# sourceMappingURL=MathtoolsMappings.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/Tags.js
const Tags_def = MathJax._.input.tex.Tags;
const Label = Tags_def.Label;
const TagInfo = Tags_def.TagInfo;
const AbstractTags = Tags_def.AbstractTags;
const NoTags = Tags_def.NoTags;
const AllTags = Tags_def.AllTags;
const TagsFactory = Tags_def.TagsFactory;
;// ./mjs/input/tex/mathtools/MathtoolsTags.js
let tagID = 0;
function MathtoolsTagFormat(config, jax) {
const tags = jax.parseOptions.options.tags;
if (tags !== 'base' && Object.hasOwn(config.tags, tags)) {
TagsFactory.add(tags, config.tags[tags]);
}
const TagClass = TagsFactory.create(jax.parseOptions.options.tags)
.constructor;
class TagFormat extends TagClass {
constructor() {
super();
this.mtFormats = new Map();
this.mtCurrent = null;
const forms = jax.parseOptions.options.mathtools.tagforms;
for (const form of Object.keys(forms)) {
if (!Array.isArray(forms[form]) || forms[form].length !== 3) {
throw new TexError('InvalidTagFormDef', 'The tag form definition for "%1" should be an array of three strings', form);
}
this.mtFormats.set(form, forms[form]);
}
}
formatTag(tag) {
if (this.mtCurrent) {
const [left, right, format] = this.mtCurrent;
return format
? `${left}${format}{${tag}}${right}`
: `${left}${tag}${right}`;
}
return super.formatTag(tag);
}
}
tagID++;
const tagName = 'MathtoolsTags-' + tagID;
TagsFactory.add(tagName, TagFormat);
jax.parseOptions.options.tags = tagName;
}
//# sourceMappingURL=MathtoolsTags.js.map
;// ./components/mjs/input/tex/extensions/ams/lib/input/tex/ams/AmsItems.js
const AmsItems_def = MathJax._.input.tex.ams.AmsItems;
const MultlineItem = AmsItems_def.MultlineItem;
const FlalignItem = AmsItems_def.FlalignItem;
;// ./mjs/input/tex/mathtools/MathtoolsItems.js
class MultlinedItem extends MultlineItem {
get kind() {
return 'multlined';
}
EndTable() {
if (this.Size() || this.row.length) {
this.EndEntry();
this.EndRow();
}
if (this.table.length > 1) {
const options = this.factory.configuration.options.mathtools;
const gap = options['multlined-gap'];
const firstskip = options['firstline-afterskip'] || gap;
const lastskip = options['lastline-preskip'] || gap;
const first = NodeUtil.getChildren(this.table[0])[0];
if (NodeUtil.getAttribute(first, 'columnalign') !== TexConstant.Align.RIGHT) {
first.appendChild(this.create('node', 'mspace', [], { width: firstskip }));
}
const last = NodeUtil.getChildren(this.table[this.table.length - 1])[0];
if (NodeUtil.getAttribute(last, 'columnalign') !== TexConstant.Align.LEFT) {
const top = NodeUtil.getChildren(last)[0];
top.childNodes.unshift(null);
const space = this.create('node', 'mspace', [], { width: lastskip });
NodeUtil.setChild(top, 0, space);
}
}
super.EndTable.call(this);
}
}
//# sourceMappingURL=MathtoolsItems.js.map
;// ./mjs/input/tex/mathtools/MathtoolsConfiguration.js
function configMathtools(config, jax) {
NewcommandConfig(config, jax);
const parser = jax.parseOptions;
const pairedDelims = parser.options.mathtools.pairedDelimiters;
const handler = config.handlers.retrieve(NewcommandTables.NEW_COMMAND);
for (const [cs, args] of Object.entries(pairedDelims)) {
handler.add(cs, new Macro(cs, MathtoolsMethods.PairedDelimiters, args));
}
if (parser.options.mathtools.legacycolonsymbols) {
config.handlers.add(LEGACYCONFIG, {}, LEGACYPRIORITY);
}
MathtoolsTagFormat(config, jax);
}
function fixPrescripts({ data }) {
for (const node of data.getList('mmultiscripts')) {
if (!node.getProperty('fixPrescript'))
continue;
const childNodes = NodeUtil.getChildren(node);
let n = 0;
for (const i of [1, 2]) {
if (!childNodes[i]) {
NodeUtil.setChild(node, i, data.nodeFactory.create('node', 'none'));
n++;
}
}
if (n === 2) {
childNodes.splice(1, 2);
}
}
}
const MathtoolsConfiguration = Configuration.create('mathtools', {
[ConfigurationType.HANDLER]: {
macro: ['mathtools-macros', 'mathtools-delimiters'],
[HandlerType.ENVIRONMENT]: ['mathtools-environments'],
[HandlerType.DELIMITER]: ['mathtools-delimiters'],
[HandlerType.CHARACTER]: ['mathtools-characters'],
},
[ConfigurationType.ITEMS]: {
[MultlinedItem.prototype.kind]: MultlinedItem,
},
[ConfigurationType.CONFIG]: configMathtools,
[ConfigurationType.POSTPROCESSORS]: [[fixPrescripts, -6]],
[ConfigurationType.OPTIONS]: {
mathtools: {
'multlined-gap': '1em',
'multlined-pos': 'c',
'multlined-width': '',
'firstline-afterskip': '',
'lastline-preskip': '',
'smallmatrix-align': 'c',
'shortvdotsadjustabove': '.2em',
'shortvdotsadjustbelow': '.2em',
'centercolon': false,
'centercolon-offset': '.04em',
'thincolon-dx': '-.04em',
'thincolon-dw': '-.08em',
'use-unicode': false,
'legacycolonsymbols': false,
'prescript-sub-format': '',
'prescript-sup-format': '',
'prescript-arg-format': '',
'allow-mathtoolsset': true,
pairedDelimiters: expandable({}),
tagforms: expandable({}),
}
},
});
//# sourceMappingURL=MathtoolsConfiguration.js.map
;// ./components/mjs/input/tex/extensions/mathtools/lib/mathtools.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/mathtools', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
mathtools: {
MathtoolsConfiguration: MathtoolsConfiguration_namespaceObject,
MathtoolsItems: MathtoolsItems_namespaceObject,
MathtoolsMethods: MathtoolsMethods_namespaceObject,
MathtoolsTags: MathtoolsTags_namespaceObject,
MathtoolsUtil: MathtoolsUtil_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/mathtools/mathtools.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/gensymb.js 0000644 0001762 0000144 00000010740 15112352654 023414 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/gensymb/GensymbConfiguration.js
var GensymbConfiguration_namespaceObject = {};
__webpack_require__.r(GensymbConfiguration_namespaceObject);
__webpack_require__.d(GensymbConfiguration_namespaceObject, {
GensymbConfiguration: () => (GensymbConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TexConstants.js
const TexConstants_def = MathJax._.input.tex.TexConstants;
const TexConstant = TexConstants_def.TexConstant;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./mjs/input/tex/gensymb/GensymbConfiguration.js
function mathcharUnit(parser, mchar) {
const def = mchar.attributes || {};
def.mathvariant = TexConstant.Variant.NORMAL;
def.class = 'MathML-Unit';
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
}
new CharacterMap('gensymb-symbols', mathcharUnit, {
ohm: '\u2126',
degree: '\u00B0',
celsius: '\u2103',
perthousand: '\u2030',
micro: '\u00B5',
});
const GensymbConfiguration = Configuration.create('gensymb', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['gensymb-symbols'] },
});
//# sourceMappingURL=GensymbConfiguration.js.map
;// ./components/mjs/input/tex/extensions/gensymb/lib/gensymb.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/gensymb', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
gensymb: {
GensymbConfiguration: GensymbConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/gensymb/gensymb.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/textmacros.js 0000644 0001762 0000144 00000060460 15112352673 024146 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/textmacros/TextParser.js
var TextParser_namespaceObject = {};
__webpack_require__.r(TextParser_namespaceObject);
__webpack_require__.d(TextParser_namespaceObject, {
TextParser: () => (TextParser)
});
// NAMESPACE OBJECT: ./mjs/input/tex/textmacros/TextMacrosMethods.js
var TextMacrosMethods_namespaceObject = {};
__webpack_require__.r(TextMacrosMethods_namespaceObject);
__webpack_require__.d(TextMacrosMethods_namespaceObject, {
TextMacrosMethods: () => (TextMacrosMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/textmacros/TextMacrosConfiguration.js
var TextMacrosConfiguration_namespaceObject = {};
__webpack_require__.r(TextMacrosConfiguration_namespaceObject);
__webpack_require__.d(TextMacrosConfiguration_namespaceObject, {
TextBaseConfiguration: () => (TextBaseConfiguration),
TextMacrosConfiguration: () => (TextMacrosConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseOptions.js
const ParseOptions_def = MathJax._.input.tex.ParseOptions;
/* harmony default export */ const ParseOptions = (ParseOptions_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/Tags.js
const Tags_def = MathJax._.input.tex.Tags;
const Label = Tags_def.Label;
const TagInfo = Tags_def.TagInfo;
const AbstractTags = Tags_def.AbstractTags;
const NoTags = Tags_def.NoTags;
const AllTags = Tags_def.AllTags;
const TagsFactory = Tags_def.TagsFactory;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseItems.js
const BaseItems_def = MathJax._.input.tex.base.BaseItems;
const StartItem = BaseItems_def.StartItem;
const StopItem = BaseItems_def.StopItem;
const OpenItem = BaseItems_def.OpenItem;
const CloseItem = BaseItems_def.CloseItem;
const NullItem = BaseItems_def.NullItem;
const PrimeItem = BaseItems_def.PrimeItem;
const SubsupItem = BaseItems_def.SubsupItem;
const OverItem = BaseItems_def.OverItem;
const LeftItem = BaseItems_def.LeftItem;
const Middle = BaseItems_def.Middle;
const RightItem = BaseItems_def.RightItem;
const BreakItem = BaseItems_def.BreakItem;
const BeginItem = BaseItems_def.BeginItem;
const EndItem = BaseItems_def.EndItem;
const StyleItem = BaseItems_def.StyleItem;
const PositionItem = BaseItems_def.PositionItem;
const CellItem = BaseItems_def.CellItem;
const MmlItem = BaseItems_def.MmlItem;
const FnItem = BaseItems_def.FnItem;
const NotItem = BaseItems_def.NotItem;
const NonscriptItem = BaseItems_def.NonscriptItem;
const DotsItem = BaseItems_def.DotsItem;
const ArrayItem = BaseItems_def.ArrayItem;
const EqnArrayItem = BaseItems_def.EqnArrayItem;
const MstyleItem = BaseItems_def.MstyleItem;
const EquationItem = BaseItems_def.EquationItem;
;// ./components/mjs/input/tex-base/lib/input/tex/TexParser.js
const TexParser_def = MathJax._.input.tex.TexParser;
/* harmony default export */ const TexParser = (TexParser_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/core/lib/core/MmlTree/MmlNode.js
const MmlNode_def = MathJax._.core.MmlTree.MmlNode;
const TEXCLASS = MmlNode_def.TEXCLASS;
const TEXCLASSNAMES = MmlNode_def.TEXCLASSNAMES;
const MATHVARIANTS = MmlNode_def.MATHVARIANTS;
const indentAttributes = MmlNode_def.indentAttributes;
const AbstractMmlNode = MmlNode_def.AbstractMmlNode;
const AbstractMmlTokenNode = MmlNode_def.AbstractMmlTokenNode;
const AbstractMmlLayoutNode = MmlNode_def.AbstractMmlLayoutNode;
const AbstractMmlBaseNode = MmlNode_def.AbstractMmlBaseNode;
const AbstractMmlEmptyNode = MmlNode_def.AbstractMmlEmptyNode;
const TextNode = MmlNode_def.TextNode;
const XMLNode = MmlNode_def.XMLNode;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./mjs/input/tex/textmacros/TextParser.js
class TextParser extends TexParser {
get texParser() {
return this.configuration.packageData.get('textmacros').texParser;
}
get tags() {
return this.texParser.tags;
}
constructor(text, env, configuration, level) {
super(text, env, configuration);
this.level = level;
}
mml() {
this.copyLists();
this.configuration.popParser();
return this.level != null
? this.create('node', 'mstyle', this.nodes, {
displaystyle: false,
scriptlevel: this.level,
})
: this.nodes.length === 1
? this.nodes[0]
: this.create('node', 'mrow', this.nodes);
}
copyLists() {
const parseOptions = this.texParser.configuration;
for (const [name, list] of Object.entries(this.configuration.nodeLists)) {
for (const node of list) {
parseOptions.addNode(name, node);
}
}
this.configuration.nodeLists = {};
}
Parse() {
this.text = '';
this.nodes = [];
this.envStack = [];
super.Parse();
}
saveText() {
if (this.text) {
const mathvariant = this.stack.env.mathvariant;
const text = ParseUtil.internalText(this, this.text, mathvariant ? { mathvariant } : {});
this.text = '';
this.Push(text);
}
}
Push(mml) {
if (this.text) {
this.saveText();
}
if (mml instanceof StopItem) {
return super.Push(mml);
}
if (mml instanceof StyleItem) {
this.stack.env.mathcolor = this.stack.env.color;
return;
}
if (mml instanceof AbstractMmlNode) {
this.addAttributes(mml);
this.nodes.push(mml);
}
}
PushMath(mml) {
const env = this.stack.env;
for (const name of ['mathsize', 'mathcolor']) {
if (env[name] && !mml.attributes.hasExplicit(name)) {
if (!mml.isToken && !mml.isKind('mstyle')) {
mml = this.create('node', 'mstyle', [mml]);
}
NodeUtil.setAttribute(mml, name, env[name]);
}
}
if (mml.isInferred) {
mml = this.create('node', 'mrow', mml.childNodes);
}
if (!mml.isKind('TeXAtom')) {
mml = this.create('node', 'TeXAtom', [mml]);
}
this.nodes.push(mml);
}
addAttributes(mml) {
const env = this.stack.env;
if (!mml.isToken)
return;
for (const name of ['mathsize', 'mathcolor', 'mathvariant']) {
if (env[name] && !mml.attributes.hasExplicit(name)) {
NodeUtil.setAttribute(mml, name, env[name]);
}
}
}
ParseTextArg(name, env) {
const text = this.GetArgument(name);
env = Object.assign(Object.assign({}, this.stack.env), env);
return new TextParser(text, env, this.configuration).mml();
}
ParseArg(name) {
return new TextParser(this.GetArgument(name), this.stack.env, this.configuration).mml();
}
Error(id, message, ...args) {
throw new TexError(id, message, ...args);
}
}
//# sourceMappingURL=TextParser.js.map
;// ./components/mjs/core/lib/util/Retries.js
const Retries_def = MathJax._.util.Retries;
const handleRetriesFor = Retries_def.handleRetriesFor;
const retryAfter = Retries_def.retryAfter;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./mjs/input/tex/textmacros/TextMacrosMethods.js
const TextMacrosMethods = {
Comment(parser, _c) {
while (parser.i < parser.string.length &&
parser.string.charAt(parser.i) !== '\n') {
parser.i++;
}
parser.i++;
},
Math(parser, open) {
parser.saveText();
const i = parser.i;
let j, c;
let braces = 0;
while ((c = parser.GetNext())) {
j = parser.i++;
switch (c) {
case '\\': {
const cs = parser.GetCS();
if (cs === ')')
c = '\\(';
}
case '$':
if (braces === 0 && open === c) {
const config = parser.texParser.configuration;
const mml = new TexParser(parser.string.substring(i, j), parser.stack.env, config).mml();
parser.PushMath(mml);
return;
}
break;
case '{':
braces++;
break;
case '}':
if (braces === 0) {
parser.Error('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
braces--;
break;
}
}
parser.Error('MathNotTerminated', 'Math mode is not properly terminated');
},
MathModeOnly(parser, c) {
parser.Error('MathModeOnly', "'%1' allowed only in math mode", c);
},
Misplaced(parser, c) {
parser.Error('Misplaced', "Misplaced '%1'", c);
},
OpenBrace(parser, _c) {
const env = parser.stack.env;
parser.envStack.push(env);
parser.stack.env = Object.assign({}, env);
},
CloseBrace(parser, _c) {
if (parser.envStack.length) {
parser.saveText();
parser.stack.env = parser.envStack.pop();
}
else {
parser.Error('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
},
OpenQuote(parser, c) {
if (parser.string.charAt(parser.i) === c) {
parser.text += '\u201C';
parser.i++;
}
else {
parser.text += '\u2018';
}
},
CloseQuote(parser, c) {
if (parser.string.charAt(parser.i) === c) {
parser.text += '\u201D';
parser.i++;
}
else {
parser.text += '\u2019';
}
},
Tilde(parser, _c) {
parser.text += '\u00A0';
},
Space(parser, _c) {
parser.text += ' ';
parser.GetNext();
},
SelfQuote(parser, name) {
parser.text += name.substring(1);
},
Insert(parser, _name, c) {
parser.text += c;
},
Accent(parser, name, c) {
const base = parser.ParseArg(name);
const accent = parser.create('token', 'mo', {}, c);
parser.addAttributes(accent);
parser.Push(parser.create('node', 'mover', [base, accent]));
},
Emph(parser, name) {
const variant = parser.stack.env.mathvariant === '-tex-mathit' ? 'normal' : '-tex-mathit';
parser.Push(parser.ParseTextArg(name, { mathvariant: variant }));
},
TextFont(parser, name, variant) {
parser.saveText();
parser.Push(parser.ParseTextArg(name, { mathvariant: variant }));
},
SetFont(parser, _name, variant) {
parser.saveText();
parser.stack.env.mathvariant = variant;
},
SetSize(parser, _name, size) {
parser.saveText();
parser.stack.env.mathsize = size;
},
CheckAutoload(parser, name) {
const autoload = parser.configuration.packageData.get('autoload');
const texParser = parser.texParser;
name = name.slice(1);
const macro = texParser.lookup(HandlerType.MACRO, name);
if (!macro || (autoload && macro._func === autoload.Autoload)) {
texParser.parse(HandlerType.MACRO, [texParser, name]);
if (!macro)
return;
retryAfter(Promise.resolve());
}
texParser.parse(HandlerType.MACRO, [parser, name]);
},
Macro: BaseMethods.Macro,
Spacer: BaseMethods.Spacer,
Hskip: BaseMethods.Hskip,
rule: BaseMethods.rule,
Rule: BaseMethods.Rule,
HandleRef: BaseMethods.HandleRef,
UnderOver: BaseMethods.UnderOver,
Lap: BaseMethods.Lap,
Phantom: BaseMethods.Phantom,
Smash: BaseMethods.Smash,
MmlToken: BaseMethods.MmlToken,
};
//# sourceMappingURL=TextMacrosMethods.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexConstants.js
const TexConstants_def = MathJax._.input.tex.TexConstants;
const TexConstant = TexConstants_def.TexConstant;
;// ./components/mjs/core/lib/util/lengths.js
const lengths_def = MathJax._.util.lengths;
const BIGDIMEN = lengths_def.BIGDIMEN;
const UNITS = lengths_def.UNITS;
const RELUNITS = lengths_def.RELUNITS;
const MATHSPACE = lengths_def.MATHSPACE;
const length2em = lengths_def.length2em;
const percent = lengths_def.percent;
const em = lengths_def.em;
const px = lengths_def.px;
;// ./mjs/input/tex/textmacros/TextMacrosMappings.js
const VARIANT = TexConstant.Variant;
new MacroMap('text-special', {
$: TextMacrosMethods.Math,
'%': TextMacrosMethods.Comment,
'^': TextMacrosMethods.MathModeOnly,
_: TextMacrosMethods.MathModeOnly,
'&': TextMacrosMethods.Misplaced,
'#': TextMacrosMethods.Misplaced,
'~': TextMacrosMethods.Tilde,
' ': TextMacrosMethods.Space,
'\t': TextMacrosMethods.Space,
'\r': TextMacrosMethods.Space,
'\n': TextMacrosMethods.Space,
'\u00A0': TextMacrosMethods.Tilde,
'{': TextMacrosMethods.OpenBrace,
'}': TextMacrosMethods.CloseBrace,
'`': TextMacrosMethods.OpenQuote,
"'": TextMacrosMethods.CloseQuote,
});
new CommandMap('text-macros', {
'(': TextMacrosMethods.Math,
$: TextMacrosMethods.SelfQuote,
_: TextMacrosMethods.SelfQuote,
'%': TextMacrosMethods.SelfQuote,
'{': TextMacrosMethods.SelfQuote,
'}': TextMacrosMethods.SelfQuote,
' ': TextMacrosMethods.SelfQuote,
'&': TextMacrosMethods.SelfQuote,
'#': TextMacrosMethods.SelfQuote,
'\\': [TextMacrosMethods.Macro, '$\\\\$'],
"'": [TextMacrosMethods.Accent, '\u00B4'],
'\u2019': [TextMacrosMethods.Accent, '\u00B4'],
'`': [TextMacrosMethods.Accent, '\u0060'],
'\u2018': [TextMacrosMethods.Accent, '\u0060'],
'^': [TextMacrosMethods.Accent, '^'],
'"': [TextMacrosMethods.Accent, '\u00A8'],
'~': [TextMacrosMethods.Accent, '~'],
'=': [TextMacrosMethods.Accent, '\u00AF'],
'.': [TextMacrosMethods.Accent, '\u02D9'],
u: [TextMacrosMethods.Accent, '\u02D8'],
v: [TextMacrosMethods.Accent, '\u02C7'],
emph: TextMacrosMethods.Emph,
rm: [TextMacrosMethods.SetFont, VARIANT.NORMAL],
mit: [TextMacrosMethods.SetFont, VARIANT.ITALIC],
oldstyle: [TextMacrosMethods.SetFont, VARIANT.OLDSTYLE],
cal: [TextMacrosMethods.SetFont, VARIANT.CALLIGRAPHIC],
it: [TextMacrosMethods.SetFont, '-tex-mathit'],
bf: [TextMacrosMethods.SetFont, VARIANT.BOLD],
sf: [TextMacrosMethods.SetFont, VARIANT.SANSSERIF],
tt: [TextMacrosMethods.SetFont, VARIANT.MONOSPACE],
frak: [TextMacrosMethods.TextFont, VARIANT.FRAKTUR],
Bbb: [TextMacrosMethods.TextFont, VARIANT.DOUBLESTRUCK],
tiny: [TextMacrosMethods.SetSize, 0.5],
Tiny: [TextMacrosMethods.SetSize, 0.6],
scriptsize: [TextMacrosMethods.SetSize, 0.7],
small: [TextMacrosMethods.SetSize, 0.85],
normalsize: [TextMacrosMethods.SetSize, 1.0],
large: [TextMacrosMethods.SetSize, 1.2],
Large: [TextMacrosMethods.SetSize, 1.44],
LARGE: [TextMacrosMethods.SetSize, 1.73],
huge: [TextMacrosMethods.SetSize, 2.07],
Huge: [TextMacrosMethods.SetSize, 2.49],
textnormal: [TextMacrosMethods.Macro, '{\\rm #1}', 1],
textup: [TextMacrosMethods.Macro, '{\\rm #1}', 1],
textrm: [TextMacrosMethods.Macro, '{\\rm #1}', 1],
textit: [TextMacrosMethods.Macro, '{\\it #1}', 1],
textbf: [TextMacrosMethods.Macro, '{\\bf #1}', 1],
textsf: [TextMacrosMethods.Macro, '{\\sf #1}', 1],
texttt: [TextMacrosMethods.Macro, '{\\tt #1}', 1],
dagger: [TextMacrosMethods.Insert, '\u2020'],
ddagger: [TextMacrosMethods.Insert, '\u2021'],
S: [TextMacrosMethods.Insert, '\u00A7'],
AA: [TextMacrosMethods.Insert, '\u212B'],
ldots: [TextMacrosMethods.Insert, '\u2026'],
vdots: [TextMacrosMethods.Insert, '\u22EE'],
',': [TextMacrosMethods.Spacer, MATHSPACE.thinmathspace],
':': [TextMacrosMethods.Spacer, MATHSPACE.mediummathspace],
'>': [TextMacrosMethods.Spacer, MATHSPACE.mediummathspace],
';': [TextMacrosMethods.Spacer, MATHSPACE.thickmathspace],
'!': [TextMacrosMethods.Spacer, MATHSPACE.negativethinmathspace],
enspace: [TextMacrosMethods.Spacer, 0.5],
quad: [TextMacrosMethods.Spacer, 1],
qquad: [TextMacrosMethods.Spacer, 2],
thinspace: [TextMacrosMethods.Spacer, MATHSPACE.thinmathspace],
negthinspace: [TextMacrosMethods.Spacer, MATHSPACE.negativethinmathspace],
hskip: TextMacrosMethods.Hskip,
hspace: TextMacrosMethods.Hskip,
kern: TextMacrosMethods.Hskip,
mskip: TextMacrosMethods.Hskip,
mspace: TextMacrosMethods.Hskip,
mkern: TextMacrosMethods.Hskip,
rule: TextMacrosMethods.rule,
Rule: [TextMacrosMethods.Rule],
Space: [TextMacrosMethods.Rule, 'blank'],
color: TextMacrosMethods.CheckAutoload,
textcolor: TextMacrosMethods.CheckAutoload,
colorbox: TextMacrosMethods.CheckAutoload,
fcolorbox: TextMacrosMethods.CheckAutoload,
href: TextMacrosMethods.CheckAutoload,
style: TextMacrosMethods.CheckAutoload,
class: TextMacrosMethods.CheckAutoload,
data: TextMacrosMethods.CheckAutoload,
cssId: TextMacrosMethods.CheckAutoload,
unicode: TextMacrosMethods.CheckAutoload,
U: TextMacrosMethods.CheckAutoload,
char: TextMacrosMethods.CheckAutoload,
ref: [TextMacrosMethods.HandleRef, false],
eqref: [TextMacrosMethods.HandleRef, true],
underline: [TextMacrosMethods.UnderOver, '2015'],
llap: TextMacrosMethods.Lap,
rlap: TextMacrosMethods.Lap,
phantom: TextMacrosMethods.Phantom,
vphantom: [TextMacrosMethods.Phantom, 1, 0],
hphantom: [TextMacrosMethods.Phantom, 0, 1],
smash: TextMacrosMethods.Smash,
mmlToken: TextMacrosMethods.MmlToken,
});
//# sourceMappingURL=TextMacrosMappings.js.map
;// ./mjs/input/tex/textmacros/TextMacrosConfiguration.js
const TextBaseConfiguration = Configuration.create('text-base', {
[ConfigurationType.PARSER]: 'text',
[ConfigurationType.PRIORITY]: 1,
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['command', 'text-special'],
[HandlerType.MACRO]: ['text-macros'],
},
[ConfigurationType.FALLBACK]: {
[HandlerType.CHARACTER]: (parser, c) => {
parser.text += c;
},
[HandlerType.MACRO]: (parser, name) => {
const texParser = parser.texParser;
const macro = texParser.lookup(HandlerType.MACRO, name);
if (macro && macro._func !== TextMacrosMethods.Macro) {
parser.Error('MathMacro', '%1 is only supported in math mode', '\\' + name);
}
texParser.parse(HandlerType.MACRO, [parser, name]);
},
},
[ConfigurationType.ITEMS]: {
[StartItem.prototype.kind]: StartItem,
[StopItem.prototype.kind]: StopItem,
[MmlItem.prototype.kind]: MmlItem,
[StyleItem.prototype.kind]: StyleItem,
},
});
function internalMath(parser, text, level, mathvariant) {
const config = parser.configuration.packageData.get('textmacros');
if (!(parser instanceof TextParser)) {
config.texParser = parser;
}
config.parseOptions.clear();
return [
new TextParser(text, mathvariant ? { mathvariant } : {}, config.parseOptions, level).mml(),
];
}
const TextMacrosConfiguration = Configuration.create('textmacros', {
[ConfigurationType.PRIORITY]: 1,
[ConfigurationType.CONFIG]: (_config, jax) => {
const textConf = new ParserConfiguration(jax.parseOptions.options.textmacros.packages, ['tex', 'text']);
textConf.init();
const parseOptions = new ParseOptions(textConf, []);
parseOptions.options = jax.parseOptions.options;
textConf.config(jax);
TagsFactory.addTags(textConf.tags);
parseOptions.tags = TagsFactory.getDefault();
parseOptions.tags.configuration = parseOptions;
parseOptions.packageData = jax.parseOptions.packageData;
parseOptions.packageData.set('textmacros', {
textConf,
parseOptions,
jax,
texParser: null,
});
parseOptions.options.internalMath = internalMath;
},
[ConfigurationType.PREPROCESSORS]: [
(data) => {
const config = data.data.packageData.get('textmacros');
config.parseOptions.nodeFactory.setMmlFactory(config.jax.mmlFactory);
},
],
[ConfigurationType.OPTIONS]: {
textmacros: {
packages: ['text-base'],
},
},
});
//# sourceMappingURL=TextMacrosConfiguration.js.map
;// ./components/mjs/input/tex/extensions/textmacros/lib/textmacros.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/textmacros', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
textmacros: {
TextMacrosConfiguration: TextMacrosConfiguration_namespaceObject,
TextMacrosMethods: TextMacrosMethods_namespaceObject,
TextParser: TextParser_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/textmacros/textmacros.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/mhchem.js 0000644 0001762 0000144 00000252227 15112352657 023224 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/mhchem/MhchemConfiguration.js
var MhchemConfiguration_namespaceObject = {};
__webpack_require__.r(MhchemConfiguration_namespaceObject);
__webpack_require__.d(MhchemConfiguration_namespaceObject, {
MhchemConfiguration: () => (MhchemConfiguration),
MhchemMethods: () => (MhchemMethods),
MhchemReplacements: () => (MhchemReplacements),
MhchemUtils: () => (MhchemUtils)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./components/mjs/input/tex/extensions/ams/lib/input/tex/ams/AmsMethods.js
const AmsMethods_def = MathJax._.input.tex.ams.AmsMethods;
const AmsMethods = AmsMethods_def.AmsMethods;
;// ./node_modules/.pnpm/mhchemparser@4.2.1/node_modules/mhchemparser/esm/mhchemParser.js
/*!
*************************************************************************
*
* mhchemParser.ts
* 4.2.1
*
* Parser for the \ce command and \pu command for MathJax and Co.
*
* mhchem's \ce is a tool for writing beautiful chemical equations easily.
* mhchem's \pu is a tool for writing physical units easily.
*
* ----------------------------------------------------------------------
*
* Copyright (c) 2015-2023 Martin Hensel
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ----------------------------------------------------------------------
*
* https://github.com/mhchem/mhchemParser
*
*/
class mhchemParser {
static toTex(input, type) {
return _mhchemTexify.go(_mhchemParser.go(input, type), type !== "tex");
}
}
function _mhchemCreateTransitions(o) {
let pattern, state;
let transitions = {};
for (pattern in o) {
for (state in o[pattern]) {
let stateArray = state.split("|");
o[pattern][state].stateArray = stateArray;
for (let i = 0; i < stateArray.length; i++) {
transitions[stateArray[i]] = [];
}
}
}
for (pattern in o) {
for (state in o[pattern]) {
let stateArray = o[pattern][state].stateArray || [];
for (let i = 0; i < stateArray.length; i++) {
const p = o[pattern][state];
p.action_ = [].concat(p.action_);
for (let k = 0; k < p.action_.length; k++) {
if (typeof p.action_[k] === "string") {
p.action_[k] = { type_: p.action_[k] };
}
}
const patternArray = pattern.split("|");
for (let j = 0; j < patternArray.length; j++) {
if (stateArray[i] === '*') {
let t;
for (t in transitions) {
transitions[t].push({ pattern: patternArray[j], task: p });
}
}
else {
transitions[stateArray[i]].push({ pattern: patternArray[j], task: p });
}
}
}
}
}
return transitions;
}
;
const _mhchemParser = {
go: function (input, stateMachine) {
if (!input) {
return [];
}
if (stateMachine === undefined) {
stateMachine = 'ce';
}
let state = '0';
let buffer = {};
buffer['parenthesisLevel'] = 0;
input = input.replace(/\n/g, " ");
input = input.replace(/[\u2212\u2013\u2014\u2010]/g, "-");
input = input.replace(/[\u2026]/g, "...");
let lastInput;
let watchdog = 10;
let output = [];
while (true) {
if (lastInput !== input) {
watchdog = 10;
lastInput = input;
}
else {
watchdog--;
}
let machine = _mhchemParser.stateMachines[stateMachine];
let t = machine.transitions[state] || machine.transitions['*'];
iterateTransitions: for (let i = 0; i < t.length; i++) {
let matches = _mhchemParser.patterns.match_(t[i].pattern, input);
if (matches) {
const task = t[i].task;
for (let iA = 0; iA < task.action_.length; iA++) {
let o;
if (machine.actions[task.action_[iA].type_]) {
o = machine.actions[task.action_[iA].type_](buffer, matches.match_, task.action_[iA].option);
}
else if (_mhchemParser.actions[task.action_[iA].type_]) {
o = _mhchemParser.actions[task.action_[iA].type_](buffer, matches.match_, task.action_[iA].option);
}
else {
throw ["MhchemBugA", "mhchem bug A. Please report. (" + task.action_[iA].type_ + ")"];
}
_mhchemParser.concatArray(output, o);
}
state = task.nextState || state;
if (input.length > 0) {
if (!task.revisit) {
input = matches.remainder;
}
if (!task.toContinue) {
break iterateTransitions;
}
}
else {
return output;
}
}
}
if (watchdog <= 0) {
throw ["MhchemBugU", "mhchem bug U. Please report."];
}
}
},
concatArray: function (a, b) {
if (b) {
if (Array.isArray(b)) {
for (let iB = 0; iB < b.length; iB++) {
a.push(b[iB]);
}
}
else {
a.push(b);
}
}
},
patterns: {
patterns: {
'empty': /^$/,
'else': /^./,
'else2': /^./,
'space': /^\s/,
'space A': /^\s(?=[A-Z\\$])/,
'space$': /^\s$/,
'a-z': /^[a-z]/,
'x': /^x/,
'x$': /^x$/,
'i$': /^i$/,
'letters': /^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,
'\\greek': /^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,
'one lowercase latin letter $': /^(?:([a-z])(?:$|[^a-zA-Z]))$/,
'$one lowercase latin letter$ $': /^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,
'one lowercase greek letter $': /^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,
'digits': /^[0-9]+/,
'-9.,9': /^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,
'-9.,9 no missing 0': /^[+\-]?[0-9]+(?:[.,][0-9]+)?/,
'(-)(9.,9)(e)(99)': function (input) {
const match = input.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);
if (match && match[0]) {
return { match_: match.slice(1), remainder: input.substr(match[0].length) };
}
return null;
},
'(-)(9)^(-9)': /^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/,
'state of aggregation $': function (input) {
const a = _mhchemParser.patterns.findObserveGroups(input, "", /^\([a-z]{1,3}(?=[\),])/, ")", "");
if (a && a.remainder.match(/^($|[\s,;\)\]\}])/)) {
return a;
}
const match = input.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);
if (match) {
return { match_: match[0], remainder: input.substr(match[0].length) };
}
return null;
},
'_{(state of aggregation)}$': /^_\{(\([a-z]{1,3}\))\}/,
'{[(': /^(?:\\\{|\[|\()/,
')]}': /^(?:\)|\]|\\\})/,
', ': /^[,;]\s*/,
',': /^[,;]/,
'.': /^[.]/,
'. __* ': /^([.\u22C5\u00B7\u2022]|[*])\s*/,
'...': /^\.\.\.(?=$|[^.])/,
'^{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "^{", "", "", "}"); },
'^($...$)': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "^", "$", "$", ""); },
'^a': /^\^([0-9]+|[^\\_])/,
'^\\x{}{}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "^", /^\\[a-zA-Z]+\{/, "}", "", "", "{", "}", "", true); },
'^\\x{}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "^", /^\\[a-zA-Z]+\{/, "}", ""); },
'^\\x': /^\^(\\[a-zA-Z]+)\s*/,
'^(-1)': /^\^(-?\d+)/,
'\'': /^'/,
'_{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "_{", "", "", "}"); },
'_($...$)': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "_", "$", "$", ""); },
'_9': /^_([+\-]?[0-9]+|[^\\])/,
'_\\x{}{}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "_", /^\\[a-zA-Z]+\{/, "}", "", "", "{", "}", "", true); },
'_\\x{}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "_", /^\\[a-zA-Z]+\{/, "}", ""); },
'_\\x': /^_(\\[a-zA-Z]+)\s*/,
'^_': /^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,
'{}^': /^\{\}(?=\^)/,
'{}': /^\{\}/,
'{...}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "", "{", "}", ""); },
'{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "{", "", "", "}"); },
'$...$': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "", "$", "$", ""); },
'${(...)}$__$(...)$': function (input) {
return _mhchemParser.patterns.findObserveGroups(input, "${", "", "", "}$") || _mhchemParser.patterns.findObserveGroups(input, "$", "", "", "$");
},
'=<>': /^[=<>]/,
'#': /^[#\u2261]/,
'+': /^\+/,
'-$': /^-(?=[\s_},;\]/]|$|\([a-z]+\))/,
'-9': /^-(?=[0-9])/,
'- orbital overlap': /^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,
'-': /^-/,
'pm-operator': /^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,
'operator': /^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,
'arrowUpDown': /^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,
'\\bond{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "\\bond{", "", "", "}"); },
'->': /^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,
'CMT': /^[CMT](?=\[)/,
'[(...)]': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "[", "", "", "]"); },
'1st-level escape': /^(&|\\\\|\\hline)\s*/,
'\\,': /^(?:\\[,\ ;:])/,
'\\x{}{}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "", /^\\[a-zA-Z]+\{/, "}", "", "", "{", "}", "", true); },
'\\x{}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "", /^\\[a-zA-Z]+\{/, "}", ""); },
'\\ca': /^\\ca(?:\s+|(?![a-zA-Z]))/,
'\\x': /^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,
'orbital': /^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,
'others': /^[\/~|]/,
'\\frac{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "\\frac{", "", "", "}", "{", "", "", "}"); },
'\\overset{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "\\overset{", "", "", "}", "{", "", "", "}"); },
'\\underset{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "\\underset{", "", "", "}", "{", "", "", "}"); },
'\\underbrace{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "\\underbrace{", "", "", "}_", "{", "", "", "}"); },
'\\color{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "\\color{", "", "", "}"); },
'\\color{(...)}{(...)}': function (input) {
return _mhchemParser.patterns.findObserveGroups(input, "\\color{", "", "", "}", "{", "", "", "}") ||
_mhchemParser.patterns.findObserveGroups(input, "\\color", "\\", "", /^(?=\{)/, "{", "", "", "}");
},
'\\ce{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "\\ce{", "", "", "}"); },
'\\pu{(...)}': function (input) { return _mhchemParser.patterns.findObserveGroups(input, "\\pu{", "", "", "}"); },
'oxidation$': /^(?:[+-][IVX]+|(?:\\pm|\$\\pm\$|\+-|\+\/-)\s*0)$/,
'd-oxidation$': /^(?:[+-]?[IVX]+|(?:\\pm|\$\\pm\$|\+-|\+\/-)\s*0)$/,
'1/2$': /^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,
'amount': function (input) {
let match;
match = input.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/);
if (match) {
return { match_: match[0], remainder: input.substr(match[0].length) };
}
const a = _mhchemParser.patterns.findObserveGroups(input, "", "$", "$", "");
if (a) {
match = a.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/);
if (match) {
return { match_: match[0], remainder: input.substr(match[0].length) };
}
}
return null;
},
'amount2': function (input) { return this['amount'](input); },
'(KV letters),': /^(?:[A-Z][a-z]{0,2}|i)(?=,)/,
'formula$': function (input) {
if (input.match(/^\([a-z]+\)$/)) {
return null;
}
const match = input.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);
if (match) {
return { match_: match[0], remainder: input.substr(match[0].length) };
}
return null;
},
'uprightEntities': /^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,
'/': /^\s*(\/)\s*/,
'//': /^\s*(\/\/)\s*/,
'*': /^\s*[*.]\s*/
},
findObserveGroups: function (input, begExcl, begIncl, endIncl, endExcl, beg2Excl, beg2Incl, end2Incl, end2Excl, combine) {
const _match = function (input, pattern) {
if (typeof pattern === "string") {
if (input.indexOf(pattern) !== 0) {
return null;
}
return pattern;
}
else {
const match = input.match(pattern);
if (!match) {
return null;
}
return match[0];
}
};
const _findObserveGroups = function (input, i, endChars) {
let braces = 0;
while (i < input.length) {
let a = input.charAt(i);
const match = _match(input.substr(i), endChars);
if (match !== null && braces === 0) {
return { endMatchBegin: i, endMatchEnd: i + match.length };
}
else if (a === "{") {
braces++;
}
else if (a === "}") {
if (braces === 0) {
throw ["ExtraCloseMissingOpen", "Extra close brace or missing open brace"];
}
else {
braces--;
}
}
i++;
}
if (braces > 0) {
return null;
}
return null;
};
let match = _match(input, begExcl);
if (match === null) {
return null;
}
input = input.substr(match.length);
match = _match(input, begIncl);
if (match === null) {
return null;
}
const e = _findObserveGroups(input, match.length, endIncl || endExcl);
if (e === null) {
return null;
}
const match1 = input.substring(0, (endIncl ? e.endMatchEnd : e.endMatchBegin));
if (!(beg2Excl || beg2Incl)) {
return {
match_: match1,
remainder: input.substr(e.endMatchEnd)
};
}
else {
const group2 = this.findObserveGroups(input.substr(e.endMatchEnd), beg2Excl, beg2Incl, end2Incl, end2Excl);
if (group2 === null) {
return null;
}
const matchRet = [match1, group2.match_];
return {
match_: (combine ? matchRet.join("") : matchRet),
remainder: group2.remainder
};
}
},
match_: function (m, input) {
const pattern = _mhchemParser.patterns.patterns[m];
if (pattern === undefined) {
throw ["MhchemBugP", "mhchem bug P. Please report. (" + m + ")"];
}
else if (typeof pattern === "function") {
return _mhchemParser.patterns.patterns[m](input);
}
else {
const match = input.match(pattern);
if (match) {
if (match.length > 2) {
return { match_: match.slice(1), remainder: input.substr(match[0].length) };
}
else {
return { match_: match[1] || match[0], remainder: input.substr(match[0].length) };
}
}
return null;
}
}
},
actions: {
'a=': function (buffer, m) { buffer.a = (buffer.a || "") + m; return undefined; },
'b=': function (buffer, m) { buffer.b = (buffer.b || "") + m; return undefined; },
'p=': function (buffer, m) { buffer.p = (buffer.p || "") + m; return undefined; },
'o=': function (buffer, m) { buffer.o = (buffer.o || "") + m; return undefined; },
'o=+p1': function (buffer, _m, a) { buffer.o = (buffer.o || "") + a; return undefined; },
'q=': function (buffer, m) { buffer.q = (buffer.q || "") + m; return undefined; },
'd=': function (buffer, m) { buffer.d = (buffer.d || "") + m; return undefined; },
'rm=': function (buffer, m) { buffer.rm = (buffer.rm || "") + m; return undefined; },
'text=': function (buffer, m) { buffer.text_ = (buffer.text_ || "") + m; return undefined; },
'insert': function (_buffer, _m, a) { return { type_: a }; },
'insert+p1': function (_buffer, m, a) { return { type_: a, p1: m }; },
'insert+p1+p2': function (_buffer, m, a) { return { type_: a, p1: m[0], p2: m[1] }; },
'copy': function (_buffer, m) { return m; },
'write': function (_buffer, _m, a) { return a; },
'rm': function (_buffer, m) { return { type_: 'rm', p1: m }; },
'text': function (_buffer, m) { return _mhchemParser.go(m, 'text'); },
'tex-math': function (_buffer, m) { return _mhchemParser.go(m, 'tex-math'); },
'tex-math tight': function (_buffer, m) { return _mhchemParser.go(m, 'tex-math tight'); },
'bond': function (_buffer, m, k) { return { type_: 'bond', kind_: k || m }; },
'color0-output': function (_buffer, m) { return { type_: 'color0', color: m }; },
'ce': function (_buffer, m) { return _mhchemParser.go(m, 'ce'); },
'pu': function (_buffer, m) { return _mhchemParser.go(m, 'pu'); },
'1/2': function (_buffer, m) {
let ret = [];
if (m.match(/^[+\-]/)) {
ret.push(m.substr(0, 1));
m = m.substr(1);
}
const n = m.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);
n[1] = n[1].replace(/\$/g, "");
ret.push({ type_: 'frac', p1: n[1], p2: n[2] });
if (n[3]) {
n[3] = n[3].replace(/\$/g, "");
ret.push({ type_: 'tex-math', p1: n[3] });
}
return ret;
},
'9,9': function (_buffer, m) { return _mhchemParser.go(m, '9,9'); }
},
stateMachines: {
'tex': {
transitions: _mhchemCreateTransitions({
'empty': {
'0': { action_: 'copy' }
},
'\\ce{(...)}': {
'0': { action_: [{ type_: 'write', option: "{" }, 'ce', { type_: 'write', option: "}" }] }
},
'\\pu{(...)}': {
'0': { action_: [{ type_: 'write', option: "{" }, 'pu', { type_: 'write', option: "}" }] }
},
'else': {
'0': { action_: 'copy' }
},
}),
actions: {}
},
'ce': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: 'output' }
},
'else': {
'0|1|2': { action_: 'beginsWithBond=false', revisit: true, toContinue: true }
},
'oxidation$': {
'0': { action_: 'oxidation-output' }
},
'CMT': {
'r': { action_: 'rdt=', nextState: 'rt' },
'rd': { action_: 'rqt=', nextState: 'rdt' }
},
'arrowUpDown': {
'0|1|2|as': { action_: ['sb=false', 'output', 'operator'], nextState: '1' }
},
'uprightEntities': {
'0|1|2': { action_: ['o=', 'output'], nextState: '1' }
},
'orbital': {
'0|1|2|3': { action_: 'o=', nextState: 'o' }
},
'->': {
'0|1|2|3': { action_: 'r=', nextState: 'r' },
'a|as': { action_: ['output', 'r='], nextState: 'r' },
'*': { action_: ['output', 'r='], nextState: 'r' }
},
'+': {
'o': { action_: 'd= kv', nextState: 'd' },
'd|D': { action_: 'd=', nextState: 'd' },
'q': { action_: 'd=', nextState: 'qd' },
'qd|qD': { action_: 'd=', nextState: 'qd' },
'dq': { action_: ['output', 'd='], nextState: 'd' },
'3': { action_: ['sb=false', 'output', 'operator'], nextState: '0' }
},
'amount': {
'0|2': { action_: 'a=', nextState: 'a' }
},
'pm-operator': {
'0|1|2|a|as': { action_: ['sb=false', 'output', { type_: 'operator', option: '\\pm' }], nextState: '0' }
},
'operator': {
'0|1|2|a|as': { action_: ['sb=false', 'output', 'operator'], nextState: '0' }
},
'-$': {
'o|q': { action_: ['charge or bond', 'output'], nextState: 'qd' },
'd': { action_: 'd=', nextState: 'd' },
'D': { action_: ['output', { type_: 'bond', option: "-" }], nextState: '3' },
'q': { action_: 'd=', nextState: 'qd' },
'qd': { action_: 'd=', nextState: 'qd' },
'qD|dq': { action_: ['output', { type_: 'bond', option: "-" }], nextState: '3' }
},
'-9': {
'3|o': { action_: ['output', { type_: 'insert', option: 'hyphen' }], nextState: '3' }
},
'- orbital overlap': {
'o': { action_: ['output', { type_: 'insert', option: 'hyphen' }], nextState: '2' },
'd': { action_: ['output', { type_: 'insert', option: 'hyphen' }], nextState: '2' }
},
'-': {
'0|1|2': { action_: [{ type_: 'output', option: 1 }, 'beginsWithBond=true', { type_: 'bond', option: "-" }], nextState: '3' },
'3': { action_: { type_: 'bond', option: "-" } },
'a': { action_: ['output', { type_: 'insert', option: 'hyphen' }], nextState: '2' },
'as': { action_: [{ type_: 'output', option: 2 }, { type_: 'bond', option: "-" }], nextState: '3' },
'b': { action_: 'b=' },
'o': { action_: { type_: '- after o/d', option: false }, nextState: '2' },
'q': { action_: { type_: '- after o/d', option: false }, nextState: '2' },
'd|qd|dq': { action_: { type_: '- after o/d', option: true }, nextState: '2' },
'D|qD|p': { action_: ['output', { type_: 'bond', option: "-" }], nextState: '3' }
},
'amount2': {
'1|3': { action_: 'a=', nextState: 'a' }
},
'letters': {
'0|1|2|3|a|as|b|p|bp|o': { action_: 'o=', nextState: 'o' },
'q|dq': { action_: ['output', 'o='], nextState: 'o' },
'd|D|qd|qD': { action_: 'o after d', nextState: 'o' }
},
'digits': {
'o': { action_: 'q=', nextState: 'q' },
'd|D': { action_: 'q=', nextState: 'dq' },
'q': { action_: ['output', 'o='], nextState: 'o' },
'a': { action_: 'o=', nextState: 'o' }
},
'space A': {
'b|p|bp': { action_: [] }
},
'space': {
'a': { action_: [], nextState: 'as' },
'0': { action_: 'sb=false' },
'1|2': { action_: 'sb=true' },
'r|rt|rd|rdt|rdq': { action_: 'output', nextState: '0' },
'*': { action_: ['output', 'sb=true'], nextState: '1' }
},
'1st-level escape': {
'1|2': { action_: ['output', { type_: 'insert+p1', option: '1st-level escape' }] },
'*': { action_: ['output', { type_: 'insert+p1', option: '1st-level escape' }], nextState: '0' }
},
'[(...)]': {
'r|rt': { action_: 'rd=', nextState: 'rd' },
'rd|rdt': { action_: 'rq=', nextState: 'rdq' }
},
'...': {
'o|d|D|dq|qd|qD': { action_: ['output', { type_: 'bond', option: "..." }], nextState: '3' },
'*': { action_: [{ type_: 'output', option: 1 }, { type_: 'insert', option: 'ellipsis' }], nextState: '1' }
},
'. __* ': {
'*': { action_: ['output', { type_: 'insert', option: 'addition compound' }], nextState: '1' }
},
'state of aggregation $': {
'*': { action_: ['output', 'state of aggregation'], nextState: '1' }
},
'{[(': {
'a|as|o': { action_: ['o=', 'output', 'parenthesisLevel++'], nextState: '2' },
'0|1|2|3': { action_: ['o=', 'output', 'parenthesisLevel++'], nextState: '2' },
'*': { action_: ['output', 'o=', 'output', 'parenthesisLevel++'], nextState: '2' }
},
')]}': {
'0|1|2|3|b|p|bp|o': { action_: ['o=', 'parenthesisLevel--'], nextState: 'o' },
'a|as|d|D|q|qd|qD|dq': { action_: ['output', 'o=', 'parenthesisLevel--'], nextState: 'o' }
},
', ': {
'*': { action_: ['output', 'comma'], nextState: '0' }
},
'^_': {
'*': { action_: [] }
},
'^{(...)}|^($...$)': {
'0|1|2|as': { action_: 'b=', nextState: 'b' },
'p': { action_: 'b=', nextState: 'bp' },
'3|o': { action_: 'd= kv', nextState: 'D' },
'q': { action_: 'd=', nextState: 'qD' },
'd|D|qd|qD|dq': { action_: ['output', 'd='], nextState: 'D' }
},
'^a|^\\x{}{}|^\\x{}|^\\x|\'': {
'0|1|2|as': { action_: 'b=', nextState: 'b' },
'p': { action_: 'b=', nextState: 'bp' },
'3|o': { action_: 'd= kv', nextState: 'd' },
'q': { action_: 'd=', nextState: 'qd' },
'd|qd|D|qD': { action_: 'd=' },
'dq': { action_: ['output', 'd='], nextState: 'd' }
},
'_{(state of aggregation)}$': {
'd|D|q|qd|qD|dq': { action_: ['output', 'q='], nextState: 'q' }
},
'_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x': {
'0|1|2|as': { action_: 'p=', nextState: 'p' },
'b': { action_: 'p=', nextState: 'bp' },
'3|o': { action_: 'q=', nextState: 'q' },
'd|D': { action_: 'q=', nextState: 'dq' },
'q|qd|qD|dq': { action_: ['output', 'q='], nextState: 'q' }
},
'=<>': {
'0|1|2|3|a|as|o|q|d|D|qd|qD|dq': { action_: [{ type_: 'output', option: 2 }, 'bond'], nextState: '3' }
},
'#': {
'0|1|2|3|a|as|o': { action_: [{ type_: 'output', option: 2 }, { type_: 'bond', option: "#" }], nextState: '3' }
},
'{}^': {
'*': { action_: [{ type_: 'output', option: 1 }, { type_: 'insert', option: 'tinySkip' }], nextState: '1' }
},
'{}': {
'*': { action_: { type_: 'output', option: 1 }, nextState: '1' }
},
'{...}': {
'0|1|2|3|a|as|b|p|bp': { action_: 'o=', nextState: 'o' },
'o|d|D|q|qd|qD|dq': { action_: ['output', 'o='], nextState: 'o' }
},
'$...$': {
'a': { action_: 'a=' },
'0|1|2|3|as|b|p|bp|o': { action_: 'o=', nextState: 'o' },
'as|o': { action_: 'o=' },
'q|d|D|qd|qD|dq': { action_: ['output', 'o='], nextState: 'o' }
},
'\\bond{(...)}': {
'*': { action_: [{ type_: 'output', option: 2 }, 'bond'], nextState: "3" }
},
'\\frac{(...)}': {
'*': { action_: [{ type_: 'output', option: 1 }, 'frac-output'], nextState: '3' }
},
'\\overset{(...)}': {
'*': { action_: [{ type_: 'output', option: 2 }, 'overset-output'], nextState: '3' }
},
'\\underset{(...)}': {
'*': { action_: [{ type_: 'output', option: 2 }, 'underset-output'], nextState: '3' }
},
'\\underbrace{(...)}': {
'*': { action_: [{ type_: 'output', option: 2 }, 'underbrace-output'], nextState: '3' }
},
'\\color{(...)}{(...)}': {
'*': { action_: [{ type_: 'output', option: 2 }, 'color-output'], nextState: '3' }
},
'\\color{(...)}': {
'*': { action_: [{ type_: 'output', option: 2 }, 'color0-output'] }
},
'\\ce{(...)}': {
'*': { action_: [{ type_: 'output', option: 2 }, 'ce'], nextState: '3' }
},
'\\,': {
'*': { action_: [{ type_: 'output', option: 1 }, 'copy'], nextState: '1' }
},
'\\pu{(...)}': {
'*': { action_: ['output', { type_: 'write', option: "{" }, 'pu', { type_: 'write', option: "}" }], nextState: '3' }
},
'\\x{}{}|\\x{}|\\x': {
'0|1|2|3|a|as|b|p|bp|o|c0': { action_: ['o=', 'output'], nextState: '3' },
'*': { action_: ['output', 'o=', 'output'], nextState: '3' }
},
'others': {
'*': { action_: [{ type_: 'output', option: 1 }, 'copy'], nextState: '3' }
},
'else2': {
'a': { action_: 'a to o', nextState: 'o', revisit: true },
'as': { action_: ['output', 'sb=true'], nextState: '1', revisit: true },
'r|rt|rd|rdt|rdq': { action_: ['output'], nextState: '0', revisit: true },
'*': { action_: ['output', 'copy'], nextState: '3' }
}
}),
actions: {
'o after d': function (buffer, m) {
let ret;
if ((buffer.d || "").match(/^[1-9][0-9]*$/)) {
const tmp = buffer.d;
buffer.d = undefined;
ret = this['output'](buffer);
ret.push({ type_: 'tinySkip' });
buffer.b = tmp;
}
else {
ret = this['output'](buffer);
}
_mhchemParser.actions['o='](buffer, m);
return ret;
},
'd= kv': function (buffer, m) {
buffer.d = m;
buffer.dType = 'kv';
return undefined;
},
'charge or bond': function (buffer, m) {
if (buffer['beginsWithBond']) {
let ret = [];
_mhchemParser.concatArray(ret, this['output'](buffer));
_mhchemParser.concatArray(ret, _mhchemParser.actions['bond'](buffer, m, "-"));
return ret;
}
else {
buffer.d = m;
return undefined;
}
},
'- after o/d': function (buffer, m, isAfterD) {
let c1 = _mhchemParser.patterns.match_('orbital', buffer.o || "");
const c2 = _mhchemParser.patterns.match_('one lowercase greek letter $', buffer.o || "");
const c3 = _mhchemParser.patterns.match_('one lowercase latin letter $', buffer.o || "");
const c4 = _mhchemParser.patterns.match_('$one lowercase latin letter$ $', buffer.o || "");
const hyphenFollows = m === "-" && (c1 && c1.remainder === "" || c2 || c3 || c4);
if (hyphenFollows && !buffer.a && !buffer.b && !buffer.p && !buffer.d && !buffer.q && !c1 && c3) {
buffer.o = '$' + buffer.o + '$';
}
let ret = [];
if (hyphenFollows) {
_mhchemParser.concatArray(ret, this['output'](buffer));
ret.push({ type_: 'hyphen' });
}
else {
c1 = _mhchemParser.patterns.match_('digits', buffer.d || "");
if (isAfterD && c1 && c1.remainder === '') {
_mhchemParser.concatArray(ret, _mhchemParser.actions['d='](buffer, m));
_mhchemParser.concatArray(ret, this['output'](buffer));
}
else {
_mhchemParser.concatArray(ret, this['output'](buffer));
_mhchemParser.concatArray(ret, _mhchemParser.actions['bond'](buffer, m, "-"));
}
}
return ret;
},
'a to o': function (buffer) {
buffer.o = buffer.a;
buffer.a = undefined;
return undefined;
},
'sb=true': function (buffer) { buffer.sb = true; return undefined; },
'sb=false': function (buffer) { buffer.sb = false; return undefined; },
'beginsWithBond=true': function (buffer) { buffer['beginsWithBond'] = true; return undefined; },
'beginsWithBond=false': function (buffer) { buffer['beginsWithBond'] = false; return undefined; },
'parenthesisLevel++': function (buffer) { buffer['parenthesisLevel']++; return undefined; },
'parenthesisLevel--': function (buffer) { buffer['parenthesisLevel']--; return undefined; },
'state of aggregation': function (_buffer, m) {
return { type_: 'state of aggregation', p1: _mhchemParser.go(m, 'o') };
},
'comma': function (buffer, m) {
const a = m.replace(/\s*$/, '');
const withSpace = (a !== m);
if (withSpace && buffer['parenthesisLevel'] === 0) {
return { type_: 'comma enumeration L', p1: a };
}
else {
return { type_: 'comma enumeration M', p1: a };
}
},
'output': function (buffer, _m, entityFollows) {
let ret;
if (!buffer.r) {
ret = [];
if (!buffer.a && !buffer.b && !buffer.p && !buffer.o && !buffer.q && !buffer.d && !entityFollows) {
}
else {
if (buffer.sb) {
ret.push({ type_: 'entitySkip' });
}
if (!buffer.o && !buffer.q && !buffer.d && !buffer.b && !buffer.p && entityFollows !== 2) {
buffer.o = buffer.a;
buffer.a = undefined;
}
else if (!buffer.o && !buffer.q && !buffer.d && (buffer.b || buffer.p)) {
buffer.o = buffer.a;
buffer.d = buffer.b;
buffer.q = buffer.p;
buffer.a = buffer.b = buffer.p = undefined;
}
else {
if (buffer.o && buffer.dType === 'kv' && _mhchemParser.patterns.match_('d-oxidation$', buffer.d || "")) {
buffer.dType = 'oxidation';
}
else if (buffer.o && buffer.dType === 'kv' && !buffer.q) {
buffer.dType = undefined;
}
}
ret.push({
type_: 'chemfive',
a: _mhchemParser.go(buffer.a, 'a'),
b: _mhchemParser.go(buffer.b, 'bd'),
p: _mhchemParser.go(buffer.p, 'pq'),
o: _mhchemParser.go(buffer.o, 'o'),
q: _mhchemParser.go(buffer.q, 'pq'),
d: _mhchemParser.go(buffer.d, (buffer.dType === 'oxidation' ? 'oxidation' : 'bd')),
dType: buffer.dType
});
}
}
else {
let rd;
if (buffer.rdt === 'M') {
rd = _mhchemParser.go(buffer.rd, 'tex-math');
}
else if (buffer.rdt === 'T') {
rd = [{ type_: 'text', p1: buffer.rd || "" }];
}
else {
rd = _mhchemParser.go(buffer.rd, 'ce');
}
let rq;
if (buffer.rqt === 'M') {
rq = _mhchemParser.go(buffer.rq, 'tex-math');
}
else if (buffer.rqt === 'T') {
rq = [{ type_: 'text', p1: buffer.rq || "" }];
}
else {
rq = _mhchemParser.go(buffer.rq, 'ce');
}
ret = {
type_: 'arrow',
r: buffer.r,
rd: rd,
rq: rq
};
}
for (const p in buffer) {
if (p !== 'parenthesisLevel' && p !== 'beginsWithBond') {
delete buffer[p];
}
}
return ret;
},
'oxidation-output': function (_buffer, m) {
let ret = ["{"];
_mhchemParser.concatArray(ret, _mhchemParser.go(m, 'oxidation'));
ret.push("}");
return ret;
},
'frac-output': function (_buffer, m) {
return { type_: 'frac-ce', p1: _mhchemParser.go(m[0], 'ce'), p2: _mhchemParser.go(m[1], 'ce') };
},
'overset-output': function (_buffer, m) {
return { type_: 'overset', p1: _mhchemParser.go(m[0], 'ce'), p2: _mhchemParser.go(m[1], 'ce') };
},
'underset-output': function (_buffer, m) {
return { type_: 'underset', p1: _mhchemParser.go(m[0], 'ce'), p2: _mhchemParser.go(m[1], 'ce') };
},
'underbrace-output': function (_buffer, m) {
return { type_: 'underbrace', p1: _mhchemParser.go(m[0], 'ce'), p2: _mhchemParser.go(m[1], 'ce') };
},
'color-output': function (_buffer, m) {
return { type_: 'color', color1: m[0], color2: _mhchemParser.go(m[1], 'ce') };
},
'r=': function (buffer, m) { buffer.r = m; return undefined; },
'rdt=': function (buffer, m) { buffer.rdt = m; return undefined; },
'rd=': function (buffer, m) { buffer.rd = m; return undefined; },
'rqt=': function (buffer, m) { buffer.rqt = m; return undefined; },
'rq=': function (buffer, m) { buffer.rq = m; return undefined; },
'operator': function (_buffer, m, p1) { return { type_: 'operator', kind_: (p1 || m) }; }
}
},
'a': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: [] }
},
'1/2$': {
'0': { action_: '1/2' }
},
'else': {
'0': { action_: [], nextState: '1', revisit: true }
},
'${(...)}$__$(...)$': {
'*': { action_: 'tex-math tight', nextState: '1' }
},
',': {
'*': { action_: { type_: 'insert', option: 'commaDecimal' } }
},
'else2': {
'*': { action_: 'copy' }
}
}),
actions: {}
},
'o': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: [] }
},
'1/2$': {
'0': { action_: '1/2' }
},
'else': {
'0': { action_: [], nextState: '1', revisit: true }
},
'letters': {
'*': { action_: 'rm' }
},
'\\ca': {
'*': { action_: { type_: 'insert', option: 'circa' } }
},
'\\pu{(...)}': {
'*': { action_: [{ type_: 'write', option: "{" }, 'pu', { type_: 'write', option: "}" }] }
},
'\\x{}{}|\\x{}|\\x': {
'*': { action_: 'copy' }
},
'${(...)}$__$(...)$': {
'*': { action_: 'tex-math' }
},
'{(...)}': {
'*': { action_: [{ type_: 'write', option: "{" }, 'text', { type_: 'write', option: "}" }] }
},
'else2': {
'*': { action_: 'copy' }
}
}),
actions: {}
},
'text': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: 'output' }
},
'{...}': {
'*': { action_: 'text=' }
},
'${(...)}$__$(...)$': {
'*': { action_: 'tex-math' }
},
'\\greek': {
'*': { action_: ['output', 'rm'] }
},
'\\pu{(...)}': {
'*': { action_: ['output', { type_: 'write', option: "{" }, 'pu', { type_: 'write', option: "}" }] }
},
'\\,|\\x{}{}|\\x{}|\\x': {
'*': { action_: ['output', 'copy'] }
},
'else': {
'*': { action_: 'text=' }
}
}),
actions: {
'output': function (buffer) {
if (buffer.text_) {
let ret = { type_: 'text', p1: buffer.text_ };
for (const p in buffer) {
delete buffer[p];
}
return ret;
}
return undefined;
}
}
},
'pq': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: [] }
},
'state of aggregation $': {
'*': { action_: 'state of aggregation' }
},
'i$': {
'0': { action_: [], nextState: '!f', revisit: true }
},
'(KV letters),': {
'0': { action_: 'rm', nextState: '0' }
},
'formula$': {
'0': { action_: [], nextState: 'f', revisit: true }
},
'1/2$': {
'0': { action_: '1/2' }
},
'else': {
'0': { action_: [], nextState: '!f', revisit: true }
},
'${(...)}$__$(...)$': {
'*': { action_: 'tex-math' }
},
'{(...)}': {
'*': { action_: 'text' }
},
'a-z': {
'f': { action_: 'tex-math' }
},
'letters': {
'*': { action_: 'rm' }
},
'-9.,9': {
'*': { action_: '9,9' }
},
',': {
'*': { action_: { type_: 'insert+p1', option: 'comma enumeration S' } }
},
'\\color{(...)}{(...)}': {
'*': { action_: 'color-output' }
},
'\\color{(...)}': {
'*': { action_: 'color0-output' }
},
'\\ce{(...)}': {
'*': { action_: 'ce' }
},
'\\pu{(...)}': {
'*': { action_: [{ type_: 'write', option: "{" }, 'pu', { type_: 'write', option: "}" }] }
},
'\\,|\\x{}{}|\\x{}|\\x': {
'*': { action_: 'copy' }
},
'else2': {
'*': { action_: 'copy' }
}
}),
actions: {
'state of aggregation': function (_buffer, m) {
return { type_: 'state of aggregation subscript', p1: _mhchemParser.go(m, 'o') };
},
'color-output': function (_buffer, m) {
return { type_: 'color', color1: m[0], color2: _mhchemParser.go(m[1], 'pq') };
}
}
},
'bd': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: [] }
},
'x$': {
'0': { action_: [], nextState: '!f', revisit: true }
},
'formula$': {
'0': { action_: [], nextState: 'f', revisit: true }
},
'else': {
'0': { action_: [], nextState: '!f', revisit: true }
},
'-9.,9 no missing 0': {
'*': { action_: '9,9' }
},
'.': {
'*': { action_: { type_: 'insert', option: 'electron dot' } }
},
'a-z': {
'f': { action_: 'tex-math' }
},
'x': {
'*': { action_: { type_: 'insert', option: 'KV x' } }
},
'letters': {
'*': { action_: 'rm' }
},
'\'': {
'*': { action_: { type_: 'insert', option: 'prime' } }
},
'${(...)}$__$(...)$': {
'*': { action_: 'tex-math' }
},
'{(...)}': {
'*': { action_: 'text' }
},
'\\color{(...)}{(...)}': {
'*': { action_: 'color-output' }
},
'\\color{(...)}': {
'*': { action_: 'color0-output' }
},
'\\ce{(...)}': {
'*': { action_: 'ce' }
},
'\\pu{(...)}': {
'*': { action_: [{ type_: 'write', option: "{" }, 'pu', { type_: 'write', option: "}" }] }
},
'\\,|\\x{}{}|\\x{}|\\x': {
'*': { action_: 'copy' }
},
'else2': {
'*': { action_: 'copy' }
}
}),
actions: {
'color-output': function (_buffer, m) {
return { type_: 'color', color1: m[0], color2: _mhchemParser.go(m[1], 'bd') };
}
}
},
'oxidation': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: 'roman-numeral' }
},
'pm-operator': {
'*': { action_: { type_: 'o=+p1', option: "\\pm" } }
},
'else': {
'*': { action_: 'o=' }
}
}),
actions: {
'roman-numeral': function (buffer) { return { type_: 'roman numeral', p1: buffer.o || "" }; }
}
},
'tex-math': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: 'output' }
},
'\\ce{(...)}': {
'*': { action_: ['output', 'ce'] }
},
'\\pu{(...)}': {
'*': { action_: ['output', { type_: 'write', option: "{" }, 'pu', { type_: 'write', option: "}" }] }
},
'{...}|\\,|\\x{}{}|\\x{}|\\x': {
'*': { action_: 'o=' }
},
'else': {
'*': { action_: 'o=' }
}
}),
actions: {
'output': function (buffer) {
if (buffer.o) {
let ret = { type_: 'tex-math', p1: buffer.o };
for (const p in buffer) {
delete buffer[p];
}
return ret;
}
return undefined;
}
}
},
'tex-math tight': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: 'output' }
},
'\\ce{(...)}': {
'*': { action_: ['output', 'ce'] }
},
'\\pu{(...)}': {
'*': { action_: ['output', { type_: 'write', option: "{" }, 'pu', { type_: 'write', option: "}" }] }
},
'{...}|\\,|\\x{}{}|\\x{}|\\x': {
'*': { action_: 'o=' }
},
'-|+': {
'*': { action_: 'tight operator' }
},
'else': {
'*': { action_: 'o=' }
}
}),
actions: {
'tight operator': function (buffer, m) { buffer.o = (buffer.o || "") + "{" + m + "}"; return undefined; },
'output': function (buffer) {
if (buffer.o) {
let ret = { type_: 'tex-math', p1: buffer.o };
for (const p in buffer) {
delete buffer[p];
}
return ret;
}
return undefined;
}
}
},
'9,9': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: [] }
},
',': {
'*': { action_: 'comma' }
},
'else': {
'*': { action_: 'copy' }
}
}),
actions: {
'comma': function () { return { type_: 'commaDecimal' }; }
}
},
'pu': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: 'output' }
},
'space$': {
'*': { action_: ['output', 'space'] }
},
'{[(|)]}': {
'0|a': { action_: 'copy' }
},
'(-)(9)^(-9)': {
'0': { action_: 'number^', nextState: 'a' }
},
'(-)(9.,9)(e)(99)': {
'0': { action_: 'enumber', nextState: 'a' }
},
'space': {
'0|a': { action_: [] }
},
'pm-operator': {
'0|a': { action_: { type_: 'operator', option: '\\pm' }, nextState: '0' }
},
'operator': {
'0|a': { action_: 'copy', nextState: '0' }
},
'//': {
'd': { action_: 'o=', nextState: '/' }
},
'/': {
'd': { action_: 'o=', nextState: '/' }
},
'{...}|else': {
'0|d': { action_: 'd=', nextState: 'd' },
'a': { action_: ['space', 'd='], nextState: 'd' },
'/|q': { action_: 'q=', nextState: 'q' }
}
}),
actions: {
'enumber': function (_buffer, m) {
let ret = [];
if (m[0] === "+-" || m[0] === "+/-") {
ret.push("\\pm ");
}
else if (m[0]) {
ret.push(m[0]);
}
if (m[1]) {
_mhchemParser.concatArray(ret, _mhchemParser.go(m[1], 'pu-9,9'));
if (m[2]) {
if (m[2].match(/[,.]/)) {
_mhchemParser.concatArray(ret, _mhchemParser.go(m[2], 'pu-9,9'));
}
else {
ret.push(m[2]);
}
}
if (m[3] || m[4]) {
if (m[3] === "e" || m[4] === "*") {
ret.push({ type_: 'cdot' });
}
else {
ret.push({ type_: 'times' });
}
}
}
if (m[5]) {
ret.push("10^{" + m[5] + "}");
}
return ret;
},
'number^': function (_buffer, m) {
let ret = [];
if (m[0] === "+-" || m[0] === "+/-") {
ret.push("\\pm ");
}
else if (m[0]) {
ret.push(m[0]);
}
_mhchemParser.concatArray(ret, _mhchemParser.go(m[1], 'pu-9,9'));
ret.push("^{" + m[2] + "}");
return ret;
},
'operator': function (_buffer, m, p1) { return { type_: 'operator', kind_: (p1 || m) }; },
'space': function () { return { type_: 'pu-space-1' }; },
'output': function (buffer) {
let ret;
const md = _mhchemParser.patterns.match_('{(...)}', buffer.d || "");
if (md && md.remainder === '') {
buffer.d = md.match_;
}
const mq = _mhchemParser.patterns.match_('{(...)}', buffer.q || "");
if (mq && mq.remainder === '') {
buffer.q = mq.match_;
}
if (buffer.d) {
buffer.d = buffer.d.replace(/\u00B0C|\^oC|\^{o}C/g, "{}^{\\circ}C");
buffer.d = buffer.d.replace(/\u00B0F|\^oF|\^{o}F/g, "{}^{\\circ}F");
}
if (buffer.q) {
buffer.q = buffer.q.replace(/\u00B0C|\^oC|\^{o}C/g, "{}^{\\circ}C");
buffer.q = buffer.q.replace(/\u00B0F|\^oF|\^{o}F/g, "{}^{\\circ}F");
const b5 = {
d: _mhchemParser.go(buffer.d, 'pu'),
q: _mhchemParser.go(buffer.q, 'pu')
};
if (buffer.o === '//') {
ret = { type_: 'pu-frac', p1: b5.d, p2: b5.q };
}
else {
ret = b5.d;
if (b5.d.length > 1 || b5.q.length > 1) {
ret.push({ type_: ' / ' });
}
else {
ret.push({ type_: '/' });
}
_mhchemParser.concatArray(ret, b5.q);
}
}
else {
ret = _mhchemParser.go(buffer.d, 'pu-2');
}
for (const p in buffer) {
delete buffer[p];
}
return ret;
}
}
},
'pu-2': {
transitions: _mhchemCreateTransitions({
'empty': {
'*': { action_: 'output' }
},
'*': {
'*': { action_: ['output', 'cdot'], nextState: '0' }
},
'\\x': {
'*': { action_: 'rm=' }
},
'space': {
'*': { action_: ['output', 'space'], nextState: '0' }
},
'^{(...)}|^(-1)': {
'1': { action_: '^(-1)' }
},
'-9.,9': {
'0': { action_: 'rm=', nextState: '0' },
'1': { action_: '^(-1)', nextState: '0' }
},
'{...}|else': {
'*': { action_: 'rm=', nextState: '1' }
}
}),
actions: {
'cdot': function () { return { type_: 'tight cdot' }; },
'^(-1)': function (buffer, m) { buffer.rm += "^{" + m + "}"; return undefined; },
'space': function () { return { type_: 'pu-space-2' }; },
'output': function (buffer) {
let ret = [];
if (buffer.rm) {
const mrm = _mhchemParser.patterns.match_('{(...)}', buffer.rm || "");
if (mrm && mrm.remainder === '') {
ret = _mhchemParser.go(mrm.match_, 'pu');
}
else {
ret = { type_: 'rm', p1: buffer.rm };
}
}
for (const p in buffer) {
delete buffer[p];
}
return ret;
}
}
},
'pu-9,9': {
transitions: _mhchemCreateTransitions({
'empty': {
'0': { action_: 'output-0' },
'o': { action_: 'output-o' }
},
',': {
'0': { action_: ['output-0', 'comma'], nextState: 'o' }
},
'.': {
'0': { action_: ['output-0', 'copy'], nextState: 'o' }
},
'else': {
'*': { action_: 'text=' }
}
}),
actions: {
'comma': function () { return { type_: 'commaDecimal' }; },
'output-0': function (buffer) {
let ret = [];
buffer.text_ = buffer.text_ || "";
if (buffer.text_.length > 4) {
let a = buffer.text_.length % 3;
if (a === 0) {
a = 3;
}
for (let i = buffer.text_.length - 3; i > 0; i -= 3) {
ret.push(buffer.text_.substr(i, 3));
ret.push({ type_: '1000 separator' });
}
ret.push(buffer.text_.substr(0, a));
ret.reverse();
}
else {
ret.push(buffer.text_);
}
for (const p in buffer) {
delete buffer[p];
}
return ret;
},
'output-o': function (buffer) {
let ret = [];
buffer.text_ = buffer.text_ || "";
if (buffer.text_.length > 4) {
const a = buffer.text_.length - 3;
let i;
for (i = 0; i < a; i += 3) {
ret.push(buffer.text_.substr(i, 3));
ret.push({ type_: '1000 separator' });
}
ret.push(buffer.text_.substr(i));
}
else {
ret.push(buffer.text_);
}
for (const p in buffer) {
delete buffer[p];
}
return ret;
}
}
}
}
};
const _mhchemTexify = {
go: function (input, addOuterBraces) {
if (!input) {
return "";
}
let res = "";
let cee = false;
for (let i = 0; i < input.length; i++) {
const inputi = input[i];
if (typeof inputi === "string") {
res += inputi;
}
else {
res += _mhchemTexify._go2(inputi);
if (inputi.type_ === '1st-level escape') {
cee = true;
}
}
}
if (addOuterBraces && !cee && res) {
res = "{" + res + "}";
}
return res;
},
_goInner: function (input) {
return _mhchemTexify.go(input, false);
},
_go2: function (buf) {
let res;
switch (buf.type_) {
case 'chemfive':
res = "";
const b5 = {
a: _mhchemTexify._goInner(buf.a),
b: _mhchemTexify._goInner(buf.b),
p: _mhchemTexify._goInner(buf.p),
o: _mhchemTexify._goInner(buf.o),
q: _mhchemTexify._goInner(buf.q),
d: _mhchemTexify._goInner(buf.d)
};
if (b5.a) {
if (b5.a.match(/^[+\-]/)) {
b5.a = "{" + b5.a + "}";
}
res += b5.a + "\\,";
}
if (b5.b || b5.p) {
res += "{\\vphantom{A}}";
res += "^{\\hphantom{" + (b5.b || "") + "}}_{\\hphantom{" + (b5.p || "") + "}}";
res += "\\mkern-1.5mu";
res += "{\\vphantom{A}}";
res += "^{\\smash[t]{\\vphantom{2}}\\llap{" + (b5.b || "") + "}}";
res += "_{\\vphantom{2}\\llap{\\smash[t]{" + (b5.p || "") + "}}}";
}
if (b5.o) {
if (b5.o.match(/^[+\-]/)) {
b5.o = "{" + b5.o + "}";
}
res += b5.o;
}
if (buf.dType === 'kv') {
if (b5.d || b5.q) {
res += "{\\vphantom{A}}";
}
if (b5.d) {
res += "^{" + b5.d + "}";
}
if (b5.q) {
res += "_{\\smash[t]{" + b5.q + "}}";
}
}
else if (buf.dType === 'oxidation') {
if (b5.d) {
res += "{\\vphantom{A}}";
res += "^{" + b5.d + "}";
}
if (b5.q) {
res += "{\\vphantom{A}}";
res += "_{\\smash[t]{" + b5.q + "}}";
}
}
else {
if (b5.q) {
res += "{\\vphantom{A}}";
res += "_{\\smash[t]{" + b5.q + "}}";
}
if (b5.d) {
res += "{\\vphantom{A}}";
res += "^{" + b5.d + "}";
}
}
break;
case 'rm':
res = "\\mathrm{" + buf.p1 + "}";
break;
case 'text':
if (buf.p1.match(/[\^_]/)) {
buf.p1 = buf.p1.replace(" ", "~").replace("-", "\\text{-}");
res = "\\mathrm{" + buf.p1 + "}";
}
else {
res = "\\text{" + buf.p1 + "}";
}
break;
case 'roman numeral':
res = "\\mathrm{" + buf.p1 + "}";
break;
case 'state of aggregation':
res = "\\mskip2mu " + _mhchemTexify._goInner(buf.p1);
break;
case 'state of aggregation subscript':
res = "\\mskip1mu " + _mhchemTexify._goInner(buf.p1);
break;
case 'bond':
res = _mhchemTexify._getBond(buf.kind_);
if (!res) {
throw ["MhchemErrorBond", "mhchem Error. Unknown bond type (" + buf.kind_ + ")"];
}
break;
case 'frac':
const c = "\\frac{" + buf.p1 + "}{" + buf.p2 + "}";
res = "\\mathchoice{\\textstyle" + c + "}{" + c + "}{" + c + "}{" + c + "}";
break;
case 'pu-frac':
const d = "\\frac{" + _mhchemTexify._goInner(buf.p1) + "}{" + _mhchemTexify._goInner(buf.p2) + "}";
res = "\\mathchoice{\\textstyle" + d + "}{" + d + "}{" + d + "}{" + d + "}";
break;
case 'tex-math':
res = buf.p1 + " ";
break;
case 'frac-ce':
res = "\\frac{" + _mhchemTexify._goInner(buf.p1) + "}{" + _mhchemTexify._goInner(buf.p2) + "}";
break;
case 'overset':
res = "\\overset{" + _mhchemTexify._goInner(buf.p1) + "}{" + _mhchemTexify._goInner(buf.p2) + "}";
break;
case 'underset':
res = "\\underset{" + _mhchemTexify._goInner(buf.p1) + "}{" + _mhchemTexify._goInner(buf.p2) + "}";
break;
case 'underbrace':
res = "\\underbrace{" + _mhchemTexify._goInner(buf.p1) + "}_{" + _mhchemTexify._goInner(buf.p2) + "}";
break;
case 'color':
res = "{\\color{" + buf.color1 + "}{" + _mhchemTexify._goInner(buf.color2) + "}}";
break;
case 'color0':
res = "\\color{" + buf.color + "}";
break;
case 'arrow':
const b6 = {
rd: _mhchemTexify._goInner(buf.rd),
rq: _mhchemTexify._goInner(buf.rq)
};
let arrow = _mhchemTexify._getArrow(buf.r);
if (b6.rd || b6.rq) {
if (buf.r === "<=>" || buf.r === "<=>>" || buf.r === "<<=>" || buf.r === "<-->") {
arrow = "\\long" + arrow;
if (b6.rd) {
arrow = "\\overset{" + b6.rd + "}{" + arrow + "}";
}
if (b6.rq) {
if (buf.r === "<-->") {
arrow = "\\underset{\\lower2mu{" + b6.rq + "}}{" + arrow + "}";
}
else {
arrow = "\\underset{\\lower6mu{" + b6.rq + "}}{" + arrow + "}";
}
}
arrow = " {}\\mathrel{" + arrow + "}{} ";
}
else {
if (b6.rq) {
arrow += "[{" + b6.rq + "}]";
}
arrow += "{" + b6.rd + "}";
arrow = " {}\\mathrel{\\x" + arrow + "}{} ";
}
}
else {
arrow = " {}\\mathrel{\\long" + arrow + "}{} ";
}
res = arrow;
break;
case 'operator':
res = _mhchemTexify._getOperator(buf.kind_);
break;
case '1st-level escape':
res = buf.p1 + " ";
break;
case 'space':
res = " ";
break;
case 'tinySkip':
res = '\\mkern2mu';
break;
case 'entitySkip':
res = "~";
break;
case 'pu-space-1':
res = "~";
break;
case 'pu-space-2':
res = "\\mkern3mu ";
break;
case '1000 separator':
res = "\\mkern2mu ";
break;
case 'commaDecimal':
res = "{,}";
break;
case 'comma enumeration L':
res = "{" + buf.p1 + "}\\mkern6mu ";
break;
case 'comma enumeration M':
res = "{" + buf.p1 + "}\\mkern3mu ";
break;
case 'comma enumeration S':
res = "{" + buf.p1 + "}\\mkern1mu ";
break;
case 'hyphen':
res = "\\text{-}";
break;
case 'addition compound':
res = "\\,{\\cdot}\\,";
break;
case 'electron dot':
res = "\\mkern1mu \\bullet\\mkern1mu ";
break;
case 'KV x':
res = "{\\times}";
break;
case 'prime':
res = "\\prime ";
break;
case 'cdot':
res = "\\cdot ";
break;
case 'tight cdot':
res = "\\mkern1mu{\\cdot}\\mkern1mu ";
break;
case 'times':
res = "\\times ";
break;
case 'circa':
res = "{\\sim}";
break;
case '^':
res = "uparrow";
break;
case 'v':
res = "downarrow";
break;
case 'ellipsis':
res = "\\ldots ";
break;
case '/':
res = "/";
break;
case ' / ':
res = "\\,/\\,";
break;
default:
assertNever(buf);
throw ["MhchemBugT", "mhchem bug T. Please report."];
}
return res;
},
_getArrow: function (a) {
switch (a) {
case "->": return "rightarrow";
case "\u2192": return "rightarrow";
case "\u27F6": return "rightarrow";
case "<-": return "leftarrow";
case "<->": return "leftrightarrow";
case "<-->": return "leftrightarrows";
case "<=>": return "rightleftharpoons";
case "\u21CC": return "rightleftharpoons";
case "<=>>": return "Rightleftharpoons";
case "<<=>": return "Leftrightharpoons";
default:
assertNever(a);
throw ["MhchemBugT", "mhchem bug T. Please report."];
}
},
_getBond: function (a) {
switch (a) {
case "-": return "{-}";
case "1": return "{-}";
case "=": return "{=}";
case "2": return "{=}";
case "#": return "{\\equiv}";
case "3": return "{\\equiv}";
case "~": return "{\\tripledash}";
case "~-": return "{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";
case "~=": return "{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";
case "~--": return "{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";
case "-~-": return "{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";
case "...": return "{{\\cdot}{\\cdot}{\\cdot}}";
case "....": return "{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";
case "->": return "{\\rightarrow}";
case "<-": return "{\\leftarrow}";
case "<": return "{<}";
case ">": return "{>}";
default:
assertNever(a);
throw ["MhchemBugT", "mhchem bug T. Please report."];
}
},
_getOperator: function (a) {
switch (a) {
case "+": return " {}+{} ";
case "-": return " {}-{} ";
case "=": return " {}={} ";
case "<": return " {}<{} ";
case ">": return " {}>{} ";
case "<<": return " {}\\ll{} ";
case ">>": return " {}\\gg{} ";
case "\\pm": return " {}\\pm{} ";
case "\\approx": return " {}\\approx{} ";
case "$\\approx$": return " {}\\approx{} ";
case "v": return " \\downarrow{} ";
case "(v)": return " \\downarrow{} ";
case "^": return " \\uparrow{} ";
case "(^)": return " \\uparrow{} ";
default:
assertNever(a);
throw ["MhchemBugT", "mhchem bug T. Please report."];
}
}
};
function assertNever(a) { }
;// ./components/mjs/core/lib/core/MmlTree/MmlNode.js
const MmlNode_def = MathJax._.core.MmlTree.MmlNode;
const TEXCLASS = MmlNode_def.TEXCLASS;
const TEXCLASSNAMES = MmlNode_def.TEXCLASSNAMES;
const MATHVARIANTS = MmlNode_def.MATHVARIANTS;
const indentAttributes = MmlNode_def.indentAttributes;
const AbstractMmlNode = MmlNode_def.AbstractMmlNode;
const AbstractMmlTokenNode = MmlNode_def.AbstractMmlTokenNode;
const AbstractMmlLayoutNode = MmlNode_def.AbstractMmlLayoutNode;
const AbstractMmlBaseNode = MmlNode_def.AbstractMmlBaseNode;
const AbstractMmlEmptyNode = MmlNode_def.AbstractMmlEmptyNode;
const TextNode = MmlNode_def.TextNode;
const XMLNode = MmlNode_def.XMLNode;
;// ./mjs/input/tex/mhchem/MhchemConfiguration.js
const MhchemUtils = {
relmo(parser, mchar) {
const def = Object.assign({ stretchy: true, texClass: TEXCLASS.REL, mathvariant: '-mhchem' }, (mchar.attributes || {}));
const node = parser.create('token', 'mo', def, mchar.char);
parser.Push(node);
},
};
const MhchemReplacements = new Map([
[
'\\mhchemx$3[$1]{$2}',
/\\underset{\\lower2mu{(.*?)}}{\\overset{(.*?)}{\\long(.*?)}}/g,
],
['\\mhchemx$2{$1}', /\\overset{(.*?)}{\\long(.*?)}/g],
[
'\\mhchemBondTD',
/\\rlap\{\\lower\.1em\{-\}\}\\raise\.1em\{\\tripledash\}/g,
],
[
'\\mhchemBondTDD',
/\\rlap\{\\lower\.2em\{-\}\}\\rlap\{\\raise\.2em\{\\tripledash\}\}-/g,
],
[
'\\mhchemBondDTD',
/\\rlap\{\\lower\.2em\{-\}\}\\rlap\{\\raise.2em\{-\}\}\\tripledash/g,
],
[
'\\mhchem$1',
/\\(x?(?:long)?(?:left|right|[Ll]eftright|[Rr]ightleft)(?:arrow|harpoons))/g,
],
]);
const MhchemMethods = {
Machine(parser, name, machine) {
const arg = parser.GetArgument(name);
let tex;
try {
tex = mhchemParser.toTex(arg, machine);
for (const [name, pattern] of MhchemReplacements.entries()) {
tex = tex.replace(pattern, name);
}
}
catch (err) {
throw new TexError(err[0], err[1]);
}
parser.string = tex + parser.string.substring(parser.i);
parser.i = 0;
},
Macro: BaseMethods.Macro,
xArrow: AmsMethods.xArrow,
};
new CommandMap('mhchem', {
ce: [MhchemMethods.Machine, 'ce'],
pu: [MhchemMethods.Machine, 'pu'],
mhchemxrightarrow: [MhchemMethods.xArrow, 0xe429, 5, 9],
mhchemxleftarrow: [MhchemMethods.xArrow, 0xe428, 9, 5],
mhchemxleftrightarrow: [MhchemMethods.xArrow, 0xe42a, 9, 9],
mhchemxleftrightarrows: [MhchemMethods.xArrow, 0xe42b, 9, 9],
mhchemxrightleftharpoons: [MhchemMethods.xArrow, 0xe408, 5, 9],
mhchemxRightleftharpoons: [MhchemMethods.xArrow, 0xe409, 5, 9],
mhchemxLeftrightharpoons: [MhchemMethods.xArrow, 0xe40a, 9, 11],
});
new CharacterMap('mhchem-chars', MhchemUtils.relmo, {
tripledash: ['\uE410', { stretchy: false }],
mhchemBondTD: ['\uE411', { stretchy: false }],
mhchemBondTDD: ['\uE412', { stretchy: false }],
mhchemBondDTD: ['\uE413', { stretchy: false }],
mhchemlongleftarrow: '\uE428',
mhchemlongrightarrow: '\uE429',
mhchemlongleftrightarrow: '\uE42A',
mhchemlongrightleftharpoons: '\uE408',
mhchemlongRightleftharpoons: '\uE409',
mhchemlongLeftrightharpoons: '\uE40A',
mhchemlongleftrightarrows: '\uE42B',
mhchemrightarrow: '\uE42C',
mhchemleftarrow: '\uE42D',
mhchemleftrightarrow: '\uE42E',
});
const MhchemConfiguration = Configuration.create('mhchem', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['mhchem', 'mhchem-chars'],
},
});
//# sourceMappingURL=MhchemConfiguration.js.map
;// ./components/mjs/input/tex/extensions/mhchem/lib/mhchem.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/mhchem', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
mhchem: {
MhchemConfiguration: MhchemConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/core/lib/util/context.js
const context_def = MathJax._.util.context;
const hasWindow = context_def.hasWindow;
const context = context_def.context;
;// ./components/mjs/input/tex/extension.js
function fontExtension(id, name, pkg = `@mathjax/${name}`) {
if (MathJax.loader) {
const FONTPATH = hasWindow ? `https://cdn.jsdelivr.net/npm/${pkg}` : pkg;
const path = name.replace(/-font-extension$/, '-extension');
const jax = (MathJax.config?.startup?.output || 'chtml');
combineDefaults(MathJax.config.loader, 'paths', {[path]: FONTPATH});
combineDefaults(MathJax.config.loader, 'dependencies', {[`[${path}]/${jax}`]: [`output/${jax}`]});
MathJax.loader.addPackageData(id, {
extraLoads: [`[${path}]/${jax}`],
rendererExtensions: [path]
});
}
}
;// ./components/mjs/input/tex/extensions/mhchem/mhchem.js
fontExtension('[tex]/mhchem', 'mathjax-mhchem-font-extension');
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/bbox.js 0000644 0001762 0000144 00000014406 15112352632 022701 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/bbox/BboxConfiguration.js
var BboxConfiguration_namespaceObject = {};
__webpack_require__.r(BboxConfiguration_namespaceObject);
__webpack_require__.d(BboxConfiguration_namespaceObject, {
BboxConfiguration: () => (BboxConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./mjs/input/tex/bbox/BboxConfiguration.js
const BboxMethods = {
BBox(parser, name) {
const bbox = parser.GetBrackets(name, '');
let math = parser.ParseArg(name);
const parts = bbox.split(/,/);
let def, background, style;
for (let i = 0, m = parts.length; i < m; i++) {
const part = parts[i].trim();
const match = part.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);
if (match) {
if (def) {
throw new TexError('MultipleBBoxProperty', '%1 specified twice in %2', 'Padding', name);
}
const pad = BBoxPadding(match[1] + match[3]);
if (pad) {
def = {
height: '+' + pad,
depth: '+' + pad,
lspace: pad,
width: '+' + 2 * parseInt(match[1], 10) + match[3],
};
}
}
else if (part.match(/^([a-z0-9]+|#[0-9a-f]{6}|#[0-9a-f]{3})$/i)) {
if (background) {
throw new TexError('MultipleBBoxProperty', '%1 specified twice in %2', 'Background', name);
}
background = part;
}
else if (part.match(/^[-a-z]+:/i)) {
if (style) {
throw new TexError('MultipleBBoxProperty', '%1 specified twice in %2', 'Style', name);
}
style = BBoxStyle(part);
}
else if (part !== '') {
throw new TexError('InvalidBBoxProperty', '"%1" doesn\'t look like a color, a padding dimension, or a style', part);
}
}
if (def) {
math = parser.create('node', 'mpadded', [math], def);
}
if (background || style) {
def = {};
if (background) {
Object.assign(def, { mathbackground: background });
}
if (style) {
Object.assign(def, { style: style });
}
math = parser.create('node', 'mstyle', [math], def);
}
parser.Push(math);
},
};
function BBoxStyle(styles) {
return styles;
}
function BBoxPadding(pad) {
return pad;
}
new CommandMap('bbox', { bbox: BboxMethods.BBox });
const BboxConfiguration = Configuration.create('bbox', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['bbox'] },
});
//# sourceMappingURL=BboxConfiguration.js.map
;// ./components/mjs/input/tex/extensions/bbox/lib/bbox.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/bbox', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
bbox: {
BboxConfiguration: BboxConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/bbox/bbox.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/bboldx.js 0000644 0001762 0000144 00000033777 15112352631 023234 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/bboldx/BboldxMethods.js
var BboldxMethods_namespaceObject = {};
__webpack_require__.r(BboldxMethods_namespaceObject);
__webpack_require__.d(BboldxMethods_namespaceObject, {
BboldxMethods: () => (BboldxMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/bboldx/BboldxConfiguration.js
var BboldxConfiguration_namespaceObject = {};
__webpack_require__.r(BboldxConfiguration_namespaceObject);
__webpack_require__.d(BboldxConfiguration_namespaceObject, {
BboldxConfiguration: () => (BboldxConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex/extensions/textmacros/lib/input/tex/textmacros/TextMacrosMethods.js
const TextMacrosMethods_def = MathJax._.input.tex.textmacros.TextMacrosMethods;
const TextMacrosMethods = TextMacrosMethods_def.TextMacrosMethods;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./mjs/input/tex/bboldx/BboldxMethods.js
const BboldxMethods = {
Macro: BaseMethods.Macro,
ChooseFont: function (parser, name, normal, light, bfbb) {
const font = getBbxFont(parser, normal, light, bfbb);
BaseMethods.MathFont(parser, name, font);
},
ChooseTextFont: function (parser, name, normal, light, bfbb) {
const font = getBbxFont(parser, normal, light, bfbb);
TextMacrosMethods.TextFont(parser, name, font);
},
mathchar0miNormal: function (parser, mchar) {
const font = getBbxFont(parser, '-bboldx', '-bboldx-light', '-bboldx-bold');
const node = parser.create('token', 'mi', { mathvariant: font }, mchar.char);
parser.Push(node);
},
delimiterNormal: function (parser, delim) {
const font = getBbxFont(parser, '-bboldx', '-bboldx-light', '-bboldx-bold');
const def = { stretchy: false, mathvariant: font };
const node = parser.create('token', 'mo', def, delim.char);
parser.Push(node);
},
mathchar0miBold: function (parser, mchar) {
const font = getBbxFont(parser, '-bboldx-bold', '-bboldx', '-bboldx-bold');
const node = parser.create('token', 'mi', { mathvariant: font }, mchar.char);
parser.Push(node);
},
delimiterBold: function (parser, delim) {
const font = getBbxFont(parser, '-bboldx-bold', '-bboldx', '-bboldx-bold');
const def = { stretchy: false, mathvariant: font };
const node = parser.create('token', 'mo', def, delim.char);
parser.Push(node);
},
};
function getBbxFont(parser, normal, light, bfbb) {
const options = parser.options.bboldx;
return options.bfbb ? bfbb : options.light ? light : normal;
}
//# sourceMappingURL=BboldxMethods.js.map
;// ./mjs/input/tex/bboldx/BboldxMappings.js
new CharacterMap('bboldx-mathchar0miNormal', BboldxMethods.mathchar0miNormal, {
bbGamma: '\u0393',
bbDelta: '\u2206',
bbTheta: '\u0398',
bbLambda: '\u039B',
bbXi: '\u039E',
bbPi: '\u03A0',
bbSigma: '\u03A3',
bbUpsilon: '\u03A5',
bbPhi: '\u03A6',
bbPsi: '\u03A8',
bbOmega: '\u2126',
bbalpha: '\u03B1',
bbbeta: '\u03B2',
bbgamma: '\u03B3',
bbdelta: '\u03B4',
bbepsilon: '\u03B5',
bbzeta: '\u03B6',
bbeta: '\u03B7',
bbtheta: '\u03B8',
bbiota: '\u03B9',
bbkappa: '\u03BA',
bblambda: '\u03BB',
bbmu: '\u00B5',
bbnu: '\u03BD',
bbxi: '\u03BE',
bbpi: '\u03C0',
bbrho: '\u03C1',
bbsigma: '\u03C3',
bbtau: '\u03C4',
bbupsilon: '\u03C5',
bbphi: '\u03C6',
bbchi: '\u03C7',
bbpsi: '\u03C8',
bbomega: '\u03C9',
bbdotlessi: '\u0131',
bbdotlessj: '\u0237',
});
new CharacterMap('bboldx-delimiterNormal', BboldxMethods.delimiterNormal, {
bbLparen: '\u0028',
bbRparen: '\u0029',
bbLbrack: '\u005B',
bbRbrack: '\u005D',
bbLangle: '\u2329',
bbRangle: '\u232A',
});
new CharacterMap('bboldx-mathchar0miBold', BboldxMethods.mathchar0miBold, {
bfbbGamma: '\u0393',
bfbbDelta: '\u2206',
bfbbTheta: '\u0398',
bfbbLambda: '\u039B',
bfbbXi: '\u039E',
bfbbPi: '\u03A0',
bfbbSigma: '\u03A3',
bfbbUpsilon: '\u03A5',
bfbbPhi: '\u03A6',
bfbbPsi: '\u03A8',
bfbbOmega: '\u2126',
bfbbalpha: '\u03B1',
bfbbbeta: '\u03B2',
bfbbgamma: '\u03B3',
bfbbdelta: '\u03B4',
bfbbepsilon: '\u03B5',
bfbbzeta: '\u03B6',
bfbbeta: '\u03B7',
bfbbtheta: '\u03B8',
bfbbiota: '\u03B9',
bfbbkappa: '\u03BA',
bfbblambda: '\u03BFBB',
bfbbmu: '\u00B5',
bfbbnu: '\u03BD',
bfbbxi: '\u03BE',
bfbbpi: '\u03C0',
bfbbrho: '\u03C1',
bfbbsigma: '\u03C3',
bfbbtau: '\u03C4',
bfbbupsilon: '\u03C5',
bfbbphi: '\u03C6',
bfbbchi: '\u03C7',
bfbbpsi: '\u03C8',
bfbbomega: '\u03C9',
bfbbdotlessi: '\u0131',
bfbbdotlessj: '\u0237',
});
new CharacterMap('bboldx-delimiterBold', BboldxMethods.delimiterBold, {
bfbbLparen: '\u0028',
bfbbRparen: '\u0029',
bfbbLbrack: '\u005B',
bfbbRbrack: '\u005D',
bfbbLangle: '\u2329',
bfbbRangle: '\u232A',
});
new CommandMap('bboldx', {
mathbb: [
BboldxMethods.ChooseFont,
'-bboldx',
'-bboldx-light',
'-bboldx-bold',
],
mathbfbb: [
BboldxMethods.ChooseFont,
'-bboldx-bold',
'-bboldx',
'-bboldx-bold',
],
imathbb: [BboldxMethods.Macro, '\\bbdotlessi'],
jmathbb: [BboldxMethods.Macro, '\\bbdotlessj'],
imathbfbb: [BboldxMethods.Macro, '\\bfbbdotlessi'],
jmathbfbb: [BboldxMethods.Macro, '\\bfbbdotlessj'],
});
new CharacterMap('text-bboldx-mathchar0miNormal', BboldxMethods.mathchar0miNormal, {
txtbbGamma: '\u0393',
txtbbDelta: '\u2206',
txtbbTheta: '\u0398',
txtbbLambda: '\u039B',
txtbbXi: '\u039E',
txtbbPi: '\u03A0',
txtbbSigma: '\u03A3',
txtbbUpsilon: '\u03A5',
txtbbPhi: '\u03A6',
txtbbPsi: '\u03A8',
txtbbOmega: '\u2126',
txtbbalpha: '\u03B1',
txtbbbeta: '\u03B2',
txtbbgamma: '\u03B3',
txtbbdelta: '\u03B4',
txtbbepsilon: '\u03B5',
txtbbzeta: '\u03B6',
txtbbeta: '\u03B7',
txtbbtheta: '\u03B8',
txtbbiota: '\u03B9',
txtbbkappa: '\u03BA',
txtbblambda: '\u03BB',
txtbbmu: '\u00B5',
txtbbnu: '\u03BD',
txtbbxi: '\u03BE',
txtbbpi: '\u03C0',
txtbbrho: '\u03C1',
txtbbsigma: '\u03C3',
txtbbtau: '\u03C4',
txtbbupsilon: '\u03C5',
txtbbphi: '\u03C6',
txtbbchi: '\u03C7',
txtbbpsi: '\u03C8',
txtbbomega: '\u03C9',
txtbbdotlessi: '\u0131',
txtbbdotlessj: '\u0237',
});
new CharacterMap('text-bboldx-delimiterNormal', BboldxMethods.delimiterNormal, {
txtbbLparen: '\u0028',
txtbbRparen: '\u0029',
txtbbLbrack: '\u005B',
txtbbRbrack: '\u005D',
txtbbLangle: '\u2329',
txtbbRangle: '\u232A',
});
new CharacterMap('text-bboldx-mathchar0miBold', BboldxMethods.mathchar0miBold, {
txtbfbbGamma: '\u0393',
txtbfbbDelta: '\u2206',
txtbfbbTheta: '\u0398',
txtbfbbLambda: '\u039B',
txtbfbbXi: '\u039E',
txtbfbbPi: '\u03A0',
txtbfbbSigma: '\u03A3',
txtbfbbUpsilon: '\u03A5',
txtbfbbPhi: '\u03A6',
txtbfbbPsi: '\u03A8',
txtbfbbOmega: '\u2126',
txtbfbbalpha: '\u03B1',
txtbfbbbeta: '\u03B2',
txtbfbbgamma: '\u03B3',
txtbfbbdelta: '\u03B4',
txtbfbbepsilon: '\u03B5',
txtbfbbzeta: '\u03B6',
txtbfbbeta: '\u03B7',
txtbfbbtheta: '\u03B8',
txtbfbbiota: '\u03B9',
txtbfbbkappa: '\u03BA',
txtbfbblambda: '\u03BB',
txtbfbbmu: '\u00B5',
txtbfbbnu: '\u03BD',
txtbfbbxi: '\u03BE',
txtbfbbpi: '\u03C0',
txtbfbbrho: '\u03C1',
txtbfbbsigma: '\u03C3',
txtbfbbtau: '\u03C4',
txtbfbbupsilon: '\u03C5',
txtbfbbphi: '\u03C6',
txtbfbbchi: '\u03C7',
txtbfbbpsi: '\u03C8',
txtbfbbomega: '\u03C9',
txtbfbbdotlessi: '\u0131',
txtbfbbdotlessj: '\u0237',
});
new CharacterMap('text-bboldx-delimiterBold', BboldxMethods.delimiterBold, {
txtbfbbLparen: '\u0028',
txtbfbbRparen: '\u0029',
txtbfbbLbrack: '\u005B',
txtbfbbRbrack: '\u005D',
txtbfbbLangle: '\u2329',
txtbfbbRangle: '\u232A',
});
new CommandMap('text-bboldx', {
textbb: [
BboldxMethods.ChooseTextFont,
'-bboldx',
'-bboldx-light',
'-bboldx-bold',
],
textbfbb: [
BboldxMethods.ChooseTextFont,
'-bboldx-bold',
'-bboldx',
'-bboldx-bold',
],
itextbb: [BboldxMethods.Macro, '\\txtbbdotlessi'],
jtextbb: [BboldxMethods.Macro, '\\txtbbdotlessj'],
itextbfbb: [BboldxMethods.Macro, '\\txtbfbbdotlessi'],
jtextbfbb: [BboldxMethods.Macro, '\\txtbfbbdotlessj'],
});
//# sourceMappingURL=BboldxMappings.js.map
;// ./mjs/input/tex/bboldx/BboldxConfiguration.js
Configuration.create('text-bboldx', {
parser: 'text',
handler: {
macro: [
'text-bboldx',
'text-bboldx-mathchar0miNormal',
'text-bboldx-delimiterNormal',
'text-bboldx-mathchar0miBold',
'text-bboldx-delimiterBold',
],
},
});
const BboldxConfiguration = Configuration.create('bboldx', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: [
'bboldx',
'bboldx-mathchar0miNormal',
'bboldx-delimiterNormal',
'bboldx-mathchar0miBold',
'bboldx-delimiterBold',
],
},
[ConfigurationType.OPTIONS]: {
bboldx: {
bfbb: false,
light: false,
},
},
config(_config, jax) {
const textmacros = jax.parseOptions.packageData.get('textmacros');
if (textmacros) {
textmacros.parseOptions.options.textmacros.packages.push('text-bboldx');
textmacros.textConf.add('text-bboldx', jax, {});
}
},
priority: 3,
});
//# sourceMappingURL=BboldxConfiguration.js.map
;// ./components/mjs/input/tex/extensions/bboldx/lib/bboldx.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/bboldx', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
bboldx: {
BboldxConfiguration: BboldxConfiguration_namespaceObject,
BboldxMethods: BboldxMethods_namespaceObject
}
}
}
}});
;// ./components/mjs/core/lib/util/context.js
const context_def = MathJax._.util.context;
const hasWindow = context_def.hasWindow;
const context = context_def.context;
;// ./components/mjs/input/tex/extension.js
function fontExtension(id, name, pkg = `@mathjax/${name}`) {
if (MathJax.loader) {
const FONTPATH = hasWindow ? `https://cdn.jsdelivr.net/npm/${pkg}` : pkg;
const path = name.replace(/-font-extension$/, '-extension');
const jax = (MathJax.config?.startup?.output || 'chtml');
combineDefaults(MathJax.config.loader, 'paths', {[path]: FONTPATH});
combineDefaults(MathJax.config.loader, 'dependencies', {[`[${path}]/${jax}`]: [`output/${jax}`]});
MathJax.loader.addPackageData(id, {
extraLoads: [`[${path}]/${jax}`],
rendererExtensions: [path]
});
}
}
;// ./components/mjs/input/tex/extensions/bboldx/bboldx.js
fontExtension('[tex]/bboldx', 'mathjax-bboldx-font-extension');
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/unicode.js 0000644 0001762 0000144 00000022331 15112352674 023377 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/unicode/UnicodeConfiguration.js
var UnicodeConfiguration_namespaceObject = {};
__webpack_require__.r(UnicodeConfiguration_namespaceObject);
__webpack_require__.d(UnicodeConfiguration_namespaceObject, {
UnicodeConfiguration: () => (UnicodeConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/UnitUtil.js
const UnitUtil_def = MathJax._.input.tex.UnitUtil;
const UnitUtil = UnitUtil_def.UnitUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./components/mjs/core/lib/util/Entities.js
const Entities_def = MathJax._.util.Entities;
const options = Entities_def.options;
const entities = Entities_def.entities;
const add = Entities_def.add;
const remove = Entities_def.remove;
const translate = Entities_def.translate;
const numeric = Entities_def.numeric;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseConfiguration.js
const BaseConfiguration_def = MathJax._.input.tex.base.BaseConfiguration;
const Other = BaseConfiguration_def.Other;
const BaseTags = BaseConfiguration_def.BaseTags;
const BaseConfiguration = BaseConfiguration_def.BaseConfiguration;
;// ./mjs/input/tex/unicode/UnicodeConfiguration.js
const UnicodeCache = {};
const UnicodeMethods = {
Unicode(parser, name) {
const HD = parser.GetBrackets(name);
let HDsplit = null;
let font = '';
if (HD) {
if (HD.replace(/ /g, '').match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)) {
HDsplit = HD.replace(/ /g, '').split(/,/);
font = parser.GetBrackets(name) || '';
}
else {
font = HD;
}
}
if (font.match(/;/)) {
throw new TexError('BadFont', "Font name for %1 can't contain semicolons", parser.currentCS);
}
const n = UnitUtil.trimSpaces(parser.GetArgument(name)).replace(/^0x/, 'x');
if (!n.match(/^(x[0-9A-Fa-f]+|[0-9]+)$/)) {
throw new TexError('BadUnicode', 'Argument to %1 must be a number', parser.currentCS);
}
const N = parseInt(n.match(/^x/) ? '0' + n : n);
if (!UnicodeCache[N]) {
UnicodeCache[N] = [800, 200, font, N];
}
else if (!font) {
font = UnicodeCache[N][2];
}
if (HDsplit) {
UnicodeCache[N][0] = Math.floor(parseFloat(HDsplit[0]) * 1000);
UnicodeCache[N][1] = Math.floor(parseFloat(HDsplit[1]) * 1000);
}
const variant = parser.stack.env.font;
const def = {};
if (font) {
UnicodeCache[N][2] = def.fontfamily = font.replace(/'/g, "'");
if (variant) {
if (variant.match(/bold/)) {
def.fontweight = 'bold';
}
if (variant.match(/italic|-mathit/)) {
def.fontstyle = 'italic';
}
}
}
else if (variant) {
def.mathvariant = variant;
}
const node = parser.create('token', 'mtext', def, numeric(n));
NodeUtil.setProperty(node, 'unicode', true);
parser.Push(node);
},
RawUnicode(parser, name) {
const hex = parser.GetArgument(name).trim();
if (!hex.match(/^[0-9A-F]{1,6}$/)) {
throw new TexError('BadRawUnicode', 'Argument to %1 must a hexadecimal number with 1 to 6 digits', parser.currentCS);
}
const n = parseInt(hex, 16);
parser.string = String.fromCodePoint(n) + parser.string.substring(parser.i);
parser.i = 0;
},
Char(parser, _name) {
let match;
const next = parser.GetNext();
let c = '';
const text = parser.string.substring(parser.i);
if (next === "'") {
match = text.match(/^'([0-7]{1,7}) ?/u);
if (match) {
c = String.fromCodePoint(parseInt(match[1], 8));
}
}
else if (next === '"') {
match = text.match(/^"([0-9A-F]{1,6}) ?/);
if (match) {
c = String.fromCodePoint(parseInt(match[1], 16));
}
}
else if (next === '`') {
match = text.match(/^`(?:(\\\S)|(.))/u);
if (match) {
if (match[2]) {
c = match[2];
}
else {
parser.i += 2;
const cs = [...parser.GetCS()];
if (cs.length > 1) {
throw new TexError('InvalidAlphanumeric', 'Invalid alphanumeric constant for %1', parser.currentCS);
}
c = cs[0];
match = [''];
}
}
}
else {
match = text.match(/^([0-9]{1,7}) ?/);
if (match) {
c = String.fromCodePoint(parseInt(match[1]));
}
}
if (!c) {
throw new TexError('MissingNumber', 'Missing numeric constant for %1', parser.currentCS);
}
parser.i += match[0].length;
if (c >= '0' && c <= '9') {
parser.Push(parser.create('token', 'mn', {}, c));
}
else if (c.match(/[A-Za-z]/)) {
parser.Push(parser.create('token', 'mi', {}, c));
}
else {
Other(parser, c);
}
},
};
new CommandMap('unicode', {
unicode: UnicodeMethods.Unicode,
U: UnicodeMethods.RawUnicode,
char: UnicodeMethods.Char,
});
const UnicodeConfiguration = Configuration.create('unicode', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['unicode'] },
});
//# sourceMappingURL=UnicodeConfiguration.js.map
;// ./components/mjs/input/tex/extensions/unicode/lib/unicode.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/unicode', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
unicode: {
UnicodeConfiguration: UnicodeConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/unicode/unicode.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/enclose.js 0000644 0001762 0000144 00000011535 15112352652 023401 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/enclose/EncloseConfiguration.js
var EncloseConfiguration_namespaceObject = {};
__webpack_require__.r(EncloseConfiguration_namespaceObject);
__webpack_require__.d(EncloseConfiguration_namespaceObject, {
ENCLOSE_OPTIONS: () => (ENCLOSE_OPTIONS),
EncloseConfiguration: () => (EncloseConfiguration),
EncloseMethods: () => (EncloseMethods)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./mjs/input/tex/enclose/EncloseConfiguration.js
const ENCLOSE_OPTIONS = {
'data-arrowhead': 1,
color: 1,
mathcolor: 1,
background: 1,
mathbackground: 1,
'data-padding': 1,
'data-thickness': 1,
};
const EncloseMethods = {
Enclose(parser, name) {
const notation = parser.GetArgument(name).replace(/,/g, ' ');
const attr = parser.GetBrackets(name, '');
const math = parser.ParseArg(name);
const def = ParseUtil.keyvalOptions(attr, ENCLOSE_OPTIONS);
def.notation = notation;
parser.Push(parser.create('node', 'menclose', [math], def));
},
};
new CommandMap('enclose', { enclose: EncloseMethods.Enclose });
const EncloseConfiguration = Configuration.create('enclose', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['enclose'] },
});
//# sourceMappingURL=EncloseConfiguration.js.map
;// ./components/mjs/input/tex/extensions/enclose/lib/enclose.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/enclose', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
enclose: {
EncloseConfiguration: EncloseConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/enclose/enclose.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/bbm.js 0000644 0001762 0000144 00000013236 15112352630 022505 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/bbm/BbmConfiguration.js
var BbmConfiguration_namespaceObject = {};
__webpack_require__.r(BbmConfiguration_namespaceObject);
__webpack_require__.d(BbmConfiguration_namespaceObject, {
BbmConfiguration: () => (BbmConfiguration),
BbmMethods: () => (BbmMethods)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./mjs/input/tex/bbm/BbmConfiguration.js
const BbmMethods = {
ChooseFont(parser, name, regular, bold) {
BaseMethods.MathFont(parser, name, parser.options.bbm.bold ? bold : regular);
},
ChangeBold(parser, name) {
const font = parser.GetArgument(name);
parser.options.bbm.bold = font === 'bold' ? true : false;
},
MathFont: BaseMethods.MathFont,
};
new CommandMap('bbm', {
mathversion: BbmMethods.ChangeBold,
mathbbm: [BbmMethods.ChooseFont, '-bbm-normal', '-bbm-bold'],
mathbbmss: [BbmMethods.ChooseFont, '-bbm-sans-serif', '-bbm-sans-serif-bold'],
mathbbmtt: [BbmMethods.MathFont, '-bbm-monospace'],
});
const BbmConfiguration = Configuration.create('bbm', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['bbm'],
},
[ConfigurationType.OPTIONS]: {
bbm: {
bold: false,
},
},
});
//# sourceMappingURL=BbmConfiguration.js.map
;// ./components/mjs/input/tex/extensions/bbm/lib/bbm.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/bbm', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
bbm: {
BbmConfiguration: BbmConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/core/lib/util/context.js
const context_def = MathJax._.util.context;
const hasWindow = context_def.hasWindow;
const context = context_def.context;
;// ./components/mjs/input/tex/extension.js
function fontExtension(id, name, pkg = `@mathjax/${name}`) {
if (MathJax.loader) {
const FONTPATH = hasWindow ? `https://cdn.jsdelivr.net/npm/${pkg}` : pkg;
const path = name.replace(/-font-extension$/, '-extension');
const jax = (MathJax.config?.startup?.output || 'chtml');
combineDefaults(MathJax.config.loader, 'paths', {[path]: FONTPATH});
combineDefaults(MathJax.config.loader, 'dependencies', {[`[${path}]/${jax}`]: [`output/${jax}`]});
MathJax.loader.addPackageData(id, {
extraLoads: [`[${path}]/${jax}`],
rendererExtensions: [path]
});
}
}
;// ./components/mjs/input/tex/extensions/bbm/bbm.js
fontExtension('[tex]/bbm', 'mathjax-bbm-font-extension');
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/noundefined.js 0000644 0001762 0000144 00000007750 15112352663 024255 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/noundefined/NoUndefinedConfiguration.js
var NoUndefinedConfiguration_namespaceObject = {};
__webpack_require__.r(NoUndefinedConfiguration_namespaceObject);
__webpack_require__.d(NoUndefinedConfiguration_namespaceObject, {
NoUndefinedConfiguration: () => (NoUndefinedConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./mjs/input/tex/noundefined/NoUndefinedConfiguration.js
function noUndefined(parser, name) {
const textNode = parser.create('text', '\\' + name);
const options = parser.options.noundefined;
const def = {};
for (const id of ['color', 'background', 'size']) {
if (options[id]) {
def['math' + id] = options[id];
}
}
parser.Push(parser.create('node', 'mtext', [], def, textNode));
}
const NoUndefinedConfiguration = Configuration.create('noundefined', {
[ConfigurationType.FALLBACK]: { [HandlerType.MACRO]: noUndefined },
[ConfigurationType.OPTIONS]: {
noundefined: {
color: 'red',
background: '',
size: '',
},
},
[ConfigurationType.PRIORITY]: 3,
});
//# sourceMappingURL=NoUndefinedConfiguration.js.map
;// ./components/mjs/input/tex/extensions/noundefined/lib/noundefined.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/noundefined', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
noundefined: {
NoUndefinedConfiguration: NoUndefinedConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/noundefined/noundefined.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/cases.js 0000644 0001762 0000144 00000025674 15112352641 023056 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/cases/CasesConfiguration.js
var CasesConfiguration_namespaceObject = {};
__webpack_require__.r(CasesConfiguration_namespaceObject);
__webpack_require__.d(CasesConfiguration_namespaceObject, {
CasesBeginItem: () => (CasesBeginItem),
CasesConfiguration: () => (CasesConfiguration),
CasesMethods: () => (CasesMethods),
CasesTags: () => (CasesTags)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseItems.js
const BaseItems_def = MathJax._.input.tex.base.BaseItems;
const StartItem = BaseItems_def.StartItem;
const StopItem = BaseItems_def.StopItem;
const OpenItem = BaseItems_def.OpenItem;
const CloseItem = BaseItems_def.CloseItem;
const NullItem = BaseItems_def.NullItem;
const PrimeItem = BaseItems_def.PrimeItem;
const SubsupItem = BaseItems_def.SubsupItem;
const OverItem = BaseItems_def.OverItem;
const LeftItem = BaseItems_def.LeftItem;
const Middle = BaseItems_def.Middle;
const RightItem = BaseItems_def.RightItem;
const BreakItem = BaseItems_def.BreakItem;
const BeginItem = BaseItems_def.BeginItem;
const EndItem = BaseItems_def.EndItem;
const StyleItem = BaseItems_def.StyleItem;
const PositionItem = BaseItems_def.PositionItem;
const CellItem = BaseItems_def.CellItem;
const MmlItem = BaseItems_def.MmlItem;
const FnItem = BaseItems_def.FnItem;
const NotItem = BaseItems_def.NotItem;
const NonscriptItem = BaseItems_def.NonscriptItem;
const DotsItem = BaseItems_def.DotsItem;
const ArrayItem = BaseItems_def.ArrayItem;
const EqnArrayItem = BaseItems_def.EqnArrayItem;
const MstyleItem = BaseItems_def.MstyleItem;
const EquationItem = BaseItems_def.EquationItem;
;// ./components/mjs/input/tex/extensions/ams/lib/input/tex/ams/AmsConfiguration.js
const AmsConfiguration_def = MathJax._.input.tex.ams.AmsConfiguration;
const AmsTags = AmsConfiguration_def.AmsTags;
const AmsConfiguration = AmsConfiguration_def.AmsConfiguration;
;// ./components/mjs/input/tex/extensions/empheq/lib/input/tex/empheq/EmpheqUtil.js
const EmpheqUtil_def = MathJax._.input.tex.empheq.EmpheqUtil;
const EmpheqUtil = EmpheqUtil_def.EmpheqUtil;
;// ./mjs/input/tex/cases/CasesConfiguration.js
class CasesBeginItem extends BeginItem {
get kind() {
return 'cases-begin';
}
checkItem(item) {
if (item.isKind('end') && item.getName() === this.getName()) {
if (this.getProperty('end')) {
this.setProperty('end', false);
return [[], true];
}
}
return super.checkItem(item);
}
}
class CasesTags extends AmsTags {
constructor() {
super(...arguments);
this.subcounter = 0;
}
start(env, taggable, defaultTags) {
this.subcounter = 0;
super.start(env, taggable, defaultTags);
}
autoTag() {
if (this.currentTag.tag != null)
return;
if (this.currentTag.env === 'subnumcases') {
if (this.subcounter === 0) {
this.counter++;
}
this.subcounter++;
this.tag(this.formatNumber(this.counter, this.subcounter), false);
}
else {
if (this.currentTag.env !== 'numcases-left') {
this.counter++;
}
this.tag(this.formatNumber(this.counter), false);
}
}
formatNumber(n, m = null) {
return n.toString() + (m === null ? '' : String.fromCharCode(0x60 + m));
}
}
const CasesMethods = {
NumCases(parser, begin) {
if (parser.stack.env.closing === begin.getName()) {
delete parser.stack.env.closing;
parser.Push(parser.itemFactory.create('end').setProperty('name', begin.getName()));
const cases = parser.stack.Top();
const table = cases.Last;
const original = ParseUtil.copyNode(table, parser);
const left = cases.getProperty('left');
EmpheqUtil.left(table, original, left + '\\mmlToken{mo}{\\U{7B}}\\,', parser, 'numcases-left');
parser.Push(parser.itemFactory.create('end').setProperty('name', begin.getName()));
return null;
}
else {
const left = parser.GetArgument('\\begin{' + begin.getName() + '}');
begin.setProperty('left', left);
const array = BaseMethods.EqnArray(parser, begin, true, true, 'll', 'tt');
array.arraydef.displaystyle = false;
array.arraydef.rowspacing = '.2em';
array.setProperty('numCases', true);
parser.Push(begin);
return array;
}
},
Entry(parser, name) {
if (!parser.stack.Top().getProperty('numCases')) {
return BaseMethods.Entry(parser, name);
}
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isEntry: true, name: name }));
const tex = parser.string;
let braces = 0;
let i = parser.i;
const m = tex.length;
while (i < m) {
const c = tex.charAt(i);
if (c === '{') {
braces++;
i++;
}
else if (c === '}') {
if (braces === 0) {
break;
}
else {
braces--;
i++;
}
}
else if (c === '&' && braces === 0) {
throw new TexError('ExtraCasesAlignTab', 'Extra alignment tab in text for numcase environment');
}
else if (c === '\\' && braces === 0) {
const cs = (tex.slice(i + 1).match(/^[a-z]+|./i) || [])[0];
if (cs === '\\' ||
cs === 'cr' ||
cs === 'end' ||
cs === 'label' ||
cs === undefined) {
break;
}
else {
i += cs.length;
}
}
else {
i++;
}
}
const text = tex.substring(parser.i, i).replace(/^\s*/, '');
parser.PushAll(ParseUtil.internalMath(parser, text, 0));
parser.i = i;
return null;
},
environment(parser, env, func, args) {
const item = parser.itemFactory
.create('cases-begin')
.setProperties({ name: env, end: true });
parser.Push(func(parser, item, ...args));
},
};
new EnvironmentMap('cases-env', CasesMethods.environment, {
numcases: [CasesMethods.NumCases, 'cases'],
subnumcases: [CasesMethods.NumCases, 'cases'],
});
new MacroMap('cases-macros', {
'&': CasesMethods.Entry,
});
const CasesConfiguration = Configuration.create('cases', {
[ConfigurationType.HANDLER]: {
[HandlerType.ENVIRONMENT]: ['cases-env'],
[HandlerType.CHARACTER]: ['cases-macros'],
},
[ConfigurationType.ITEMS]: {
[CasesBeginItem.prototype.kind]: CasesBeginItem,
},
[ConfigurationType.TAGS]: { cases: CasesTags },
});
//# sourceMappingURL=CasesConfiguration.js.map
;// ./components/mjs/input/tex/extensions/cases/lib/cases.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/cases', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
cases: {
CasesConfiguration: CasesConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/cases/cases.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/braket.js 0000644 0001762 0000144 00000027667 15112352635 023237 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/braket/BraketItems.js
var BraketItems_namespaceObject = {};
__webpack_require__.r(BraketItems_namespaceObject);
__webpack_require__.d(BraketItems_namespaceObject, {
BraketItem: () => (BraketItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/braket/BraketMethods.js
var BraketMethods_namespaceObject = {};
__webpack_require__.r(BraketMethods_namespaceObject);
__webpack_require__.d(BraketMethods_namespaceObject, {
"default": () => (braket_BraketMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/braket/BraketConfiguration.js
var BraketConfiguration_namespaceObject = {};
__webpack_require__.r(BraketConfiguration_namespaceObject);
__webpack_require__.d(BraketConfiguration_namespaceObject, {
BraketConfiguration: () => (BraketConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/StackItem.js
const StackItem_def = MathJax._.input.tex.StackItem;
const MmlStack = StackItem_def.MmlStack;
const BaseItem = StackItem_def.BaseItem;
;// ./components/mjs/core/lib/core/MmlTree/MmlNode.js
const MmlNode_def = MathJax._.core.MmlTree.MmlNode;
const TEXCLASS = MmlNode_def.TEXCLASS;
const TEXCLASSNAMES = MmlNode_def.TEXCLASSNAMES;
const MATHVARIANTS = MmlNode_def.MATHVARIANTS;
const indentAttributes = MmlNode_def.indentAttributes;
const AbstractMmlNode = MmlNode_def.AbstractMmlNode;
const AbstractMmlTokenNode = MmlNode_def.AbstractMmlTokenNode;
const AbstractMmlLayoutNode = MmlNode_def.AbstractMmlLayoutNode;
const AbstractMmlBaseNode = MmlNode_def.AbstractMmlBaseNode;
const AbstractMmlEmptyNode = MmlNode_def.AbstractMmlEmptyNode;
const TextNode = MmlNode_def.TextNode;
const XMLNode = MmlNode_def.XMLNode;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/core/lib/util/lengths.js
const lengths_def = MathJax._.util.lengths;
const BIGDIMEN = lengths_def.BIGDIMEN;
const UNITS = lengths_def.UNITS;
const RELUNITS = lengths_def.RELUNITS;
const MATHSPACE = lengths_def.MATHSPACE;
const length2em = lengths_def.length2em;
const percent = lengths_def.percent;
const em = lengths_def.em;
const px = lengths_def.px;
;// ./mjs/input/tex/braket/BraketItems.js
const THINSPACE = em(MATHSPACE.thinmathspace);
class BraketItem extends BaseItem {
constructor() {
super(...arguments);
this.barNodes = [];
}
get kind() {
return 'braket';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('close')) {
if (item.getProperty('braketbar')) {
this.barNodes.push(...super.toMml(true, true).childNodes);
this.Clear();
return BaseItem.fail;
}
return [[this.factory.create('mml', this.toMml())], true];
}
if (item.isKind('mml')) {
this.Push(item.toMml());
if (this.getProperty('single')) {
return [[this.toMml()], true];
}
return BaseItem.fail;
}
return super.checkItem(item);
}
toMml(inferred = true, forceRow) {
let inner = super.toMml(inferred, forceRow);
if (!inferred) {
return inner;
}
const open = this.getProperty('open');
const close = this.getProperty('close');
if (this.barNodes.length) {
inner = this.create('node', 'inferredMrow', [...this.barNodes, inner]);
}
if (this.getProperty('stretchy')) {
if (this.getProperty('space')) {
inner = this.create('node', 'inferredMrow', [
this.create('token', 'mspace', { width: THINSPACE }),
inner,
this.create('token', 'mspace', { width: THINSPACE }),
]);
}
return ParseUtil.fenced(this.factory.configuration, open, inner, close);
}
const attrs = {
fence: true,
stretchy: false,
symmetric: true,
texClass: TEXCLASS.OPEN,
};
const openNode = this.create('token', 'mo', attrs, open);
attrs.texClass = TEXCLASS.CLOSE;
const closeNode = this.create('token', 'mo', attrs, close);
const mrow = this.create('node', 'mrow', [openNode, inner, closeNode], {
open: open,
close: close,
});
return mrow;
}
}
//# sourceMappingURL=BraketItems.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./mjs/input/tex/braket/BraketMethods.js
const BraketMethods = {
Braket(parser, _name, open, close, stretchy, barmax, space = false) {
const next = parser.GetNext();
if (next === '') {
throw new TexError('MissingArgFor', 'Missing argument for %1', parser.currentCS);
}
let single = true;
if (next === '{') {
parser.i++;
single = false;
}
const node = parser.itemFactory.create('braket');
node.setProperties({
barcount: 0,
barmax,
open,
close,
stretchy,
single,
space,
});
parser.Push(node);
node.env.braketItem = parser.stack.height - 1;
},
Bar(parser, name) {
let c = name === '|' ? '|' : '\u2016';
const n = parser.stack.height - parser.stack.env.braketItem;
const top = parser.stack.Top(n);
if (!top ||
!top.isKind('braket') ||
top.getProperty('barcount') >= top.getProperty('barmax')) {
return false;
}
if (c === '|' && parser.GetNext() === '|') {
parser.i++;
c = '\u2016';
}
if (!top.getProperty('stretchy')) {
const node = parser.create('token', 'mo', { stretchy: false, 'data-braketbar': true, texClass: TEXCLASS.ORD }, c);
parser.Push(node);
return true;
}
const close = parser.itemFactory
.create('close')
.setProperty('braketbar', true);
parser.Push(close);
top.barNodes.push(parser.create('node', 'TeXAtom', [], { texClass: TEXCLASS.CLOSE }), parser.create('token', 'mo', { stretchy: true, 'data-braketbar': true, texClass: TEXCLASS.BIN }, c), parser.create('node', 'TeXAtom', [], { texClass: TEXCLASS.OPEN }));
top.setProperty('barcount', top.getProperty('barcount') + 1);
return true;
},
Macro: BaseMethods.Macro,
};
/* harmony default export */ const braket_BraketMethods = (BraketMethods);
//# sourceMappingURL=BraketMethods.js.map
;// ./mjs/input/tex/braket/BraketMappings.js
new CommandMap('Braket-macros', {
bra: [braket_BraketMethods.Macro, '{\\langle {#1} \\vert}', 1],
ket: [braket_BraketMethods.Macro, '{\\vert {#1} \\rangle}', 1],
braket: [braket_BraketMethods.Braket, '\u27E8', '\u27E9', false, Infinity],
set: [braket_BraketMethods.Braket, '{', '}', false, 1],
Bra: [braket_BraketMethods.Macro, '{\\left\\langle {#1} \\right\\vert}', 1],
Ket: [braket_BraketMethods.Macro, '{\\left\\vert {#1} \\right\\rangle}', 1],
Braket: [braket_BraketMethods.Braket, '\u27E8', '\u27E9', true, Infinity],
Set: [braket_BraketMethods.Braket, '{', '}', true, 1, true],
ketbra: [
braket_BraketMethods.Macro,
'{\\vert {#1} \\rangle\\langle {#2} \\vert}',
2,
],
Ketbra: [
braket_BraketMethods.Macro,
'{\\left\\vert {#1} \\right\\rangle\\left\\langle {#2} \\right\\vert}',
2,
],
'|': braket_BraketMethods.Bar,
});
new MacroMap('Braket-characters', {
'|': braket_BraketMethods.Bar,
});
//# sourceMappingURL=BraketMappings.js.map
;// ./mjs/input/tex/braket/BraketConfiguration.js
const BraketConfiguration = Configuration.create('braket', {
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['Braket-characters'],
[HandlerType.MACRO]: ['Braket-macros'],
},
[ConfigurationType.ITEMS]: {
[BraketItem.prototype.kind]: BraketItem,
},
[ConfigurationType.PRIORITY]: 3,
});
//# sourceMappingURL=BraketConfiguration.js.map
;// ./components/mjs/input/tex/extensions/braket/lib/braket.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/braket', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
braket: {
BraketConfiguration: BraketConfiguration_namespaceObject,
BraketItems: BraketItems_namespaceObject,
BraketMethods: BraketMethods_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/braket/braket.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/boldsymbol.js 0000644 0001762 0000144 00000014547 15112352634 024125 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/boldsymbol/BoldsymbolConfiguration.js
var BoldsymbolConfiguration_namespaceObject = {};
__webpack_require__.r(BoldsymbolConfiguration_namespaceObject);
__webpack_require__.d(BoldsymbolConfiguration_namespaceObject, {
BoldsymbolConfiguration: () => (BoldsymbolConfiguration),
BoldsymbolMethods: () => (BoldsymbolMethods),
createBoldToken: () => (createBoldToken),
rewriteBoldTokens: () => (rewriteBoldTokens)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexConstants.js
const TexConstants_def = MathJax._.input.tex.TexConstants;
const TexConstant = TexConstants_def.TexConstant;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeFactory.js
const NodeFactory_def = MathJax._.input.tex.NodeFactory;
const NodeFactory = NodeFactory_def.NodeFactory;
;// ./mjs/input/tex/boldsymbol/BoldsymbolConfiguration.js
const BOLDVARIANT = {};
BOLDVARIANT[TexConstant.Variant.NORMAL] = TexConstant.Variant.BOLD;
BOLDVARIANT[TexConstant.Variant.ITALIC] = TexConstant.Variant.BOLDITALIC;
BOLDVARIANT[TexConstant.Variant.FRAKTUR] = TexConstant.Variant.BOLDFRAKTUR;
BOLDVARIANT[TexConstant.Variant.SCRIPT] = TexConstant.Variant.BOLDSCRIPT;
BOLDVARIANT[TexConstant.Variant.SANSSERIF] = TexConstant.Variant.BOLDSANSSERIF;
BOLDVARIANT['-tex-calligraphic'] = '-tex-bold-calligraphic';
BOLDVARIANT['-tex-oldstyle'] = '-tex-bold-oldstyle';
BOLDVARIANT['-tex-mathit'] = TexConstant.Variant.BOLDITALIC;
const BoldsymbolMethods = {
Boldsymbol(parser, name) {
const boldsymbol = parser.stack.env['boldsymbol'];
parser.stack.env['boldsymbol'] = true;
const mml = parser.ParseArg(name);
parser.stack.env['boldsymbol'] = boldsymbol;
parser.Push(mml);
},
};
new CommandMap('boldsymbol', { boldsymbol: BoldsymbolMethods.Boldsymbol });
function createBoldToken(factory, kind, def, text) {
const token = NodeFactory.createToken(factory, kind, def, text);
if (kind !== 'mtext' &&
factory.configuration.parser.stack.env['boldsymbol']) {
NodeUtil.setProperty(token, 'fixBold', true);
factory.configuration.addNode('fixBold', token);
}
return token;
}
function rewriteBoldTokens(arg) {
for (const node of arg.data.getList('fixBold')) {
if (NodeUtil.getProperty(node, 'fixBold')) {
const variant = NodeUtil.getAttribute(node, 'mathvariant');
NodeUtil.setAttribute(node, 'mathvariant', BOLDVARIANT[variant] || variant);
NodeUtil.removeProperties(node, 'fixBold');
}
}
}
const BoldsymbolConfiguration = Configuration.create('boldsymbol', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['boldsymbol'] },
[ConfigurationType.NODES]: { token: createBoldToken },
[ConfigurationType.POSTPROCESSORS]: [rewriteBoldTokens],
});
//# sourceMappingURL=BoldsymbolConfiguration.js.map
;// ./components/mjs/input/tex/extensions/boldsymbol/lib/boldsymbol.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/boldsymbol', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
boldsymbol: {
BoldsymbolConfiguration: BoldsymbolConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/boldsymbol/boldsymbol.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/begingroup.js 0000644 0001762 0000144 00000026013 15112352633 024106 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/begingroup/BegingroupStack.js
var BegingroupStack_namespaceObject = {};
__webpack_require__.r(BegingroupStack_namespaceObject);
__webpack_require__.d(BegingroupStack_namespaceObject, {
BegingroupStack: () => (BegingroupStack),
begingroupStack: () => (begingroupStack)
});
// NAMESPACE OBJECT: ./mjs/input/tex/begingroup/BegingroupMethods.js
var BegingroupMethods_namespaceObject = {};
__webpack_require__.r(BegingroupMethods_namespaceObject);
__webpack_require__.d(BegingroupMethods_namespaceObject, {
BegingroupMethods: () => (BegingroupMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/begingroup/BegingroupConfiguration.js
var BegingroupConfiguration_namespaceObject = {};
__webpack_require__.r(BegingroupConfiguration_namespaceObject);
__webpack_require__.d(BegingroupConfiguration_namespaceObject, {
BegingroupConfiguration: () => (BegingroupConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/MapHandler.js
const MapHandler_def = MathJax._.input.tex.MapHandler;
const MapHandler = MapHandler_def.MapHandler;
const SubHandler = MapHandler_def.SubHandler;
const SubHandlers = MapHandler_def.SubHandlers;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/input/tex/extensions/newcommand/lib/input/tex/newcommand/NewcommandUtil.js
const NewcommandUtil_def = MathJax._.input.tex.newcommand.NewcommandUtil;
const NewcommandTables = NewcommandUtil_def.NewcommandTables;
const NewcommandPriority = NewcommandUtil_def.NewcommandPriority;
const NewcommandUtil = NewcommandUtil_def.NewcommandUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseMethods.js
const ParseMethods_def = MathJax._.input.tex.ParseMethods;
/* harmony default export */ const ParseMethods = (ParseMethods_def.default);
;// ./mjs/input/tex/begingroup/BegingroupStack.js
class BegingroupStack {
constructor(parser) {
this.i = NewcommandPriority;
this.top = NewcommandPriority;
this.base = NewcommandPriority;
this.MARKER = Symbol('marker');
this.handlers = parser.handlers;
this.getGlobal();
}
getGlobal() {
this.global = {
[NewcommandTables.NEW_DELIMITER]: MapHandler.getMap(NewcommandTables.NEW_DELIMITER),
[NewcommandTables.NEW_ENVIRONMENT]: MapHandler.getMap(NewcommandTables.NEW_ENVIRONMENT),
[NewcommandTables.NEW_COMMAND]: MapHandler.getMap(NewcommandTables.NEW_COMMAND),
};
}
checkGlobal(tokens, maps) {
for (const name of maps) {
const token = tokens.shift();
const handler = this.handlers.get(BegingroupStack.handlerMap[name]);
this.global[name].add(token, this.MARKER);
let item;
do {
const map = handler.applicable(token);
item = map.lookup(token);
map.remove(token);
} while (item && item !== this.MARKER);
}
return maps.map((name) => this.global[name]);
}
push() {
new DelimiterMap(NewcommandTables.NEW_DELIMITER, ParseMethods.delimiter, {});
new CommandMap(NewcommandTables.NEW_COMMAND, {});
new EnvironmentMap(NewcommandTables.NEW_ENVIRONMENT, ParseMethods.environment, {});
this.handlers.add(BegingroupStack.handlerConfig, {}, --this.i);
}
pop() {
if (this.i === this.base) {
throw new TexError('MissingBegingroup', 'Missing \\begingroup or extra \\endgroup');
}
this.handlers.remove(BegingroupStack.handlerConfig, {});
for (const name of [NewcommandTables.NEW_COMMAND, NewcommandTables.NEW_ENVIRONMENT, NewcommandTables.NEW_DELIMITER]) {
MapHandler.register(this.handlers.retrieve(name));
}
this.i++;
}
finish() {
this.top = this.i;
}
remove() {
while (this.i < this.top) {
this.pop();
}
}
reset() {
this.top = this.base;
this.remove();
}
sandbox() {
this.base = NewcommandPriority;
this.reset();
this.push();
this.getGlobal();
this.base = NewcommandPriority - 1;
}
}
BegingroupStack.handlerConfig = {
[HandlerType.DELIMITER]: [NewcommandTables.NEW_DELIMITER],
[HandlerType.ENVIRONMENT]: [NewcommandTables.NEW_ENVIRONMENT],
[HandlerType.MACRO]: [NewcommandTables.NEW_DELIMITER, NewcommandTables.NEW_COMMAND],
};
BegingroupStack.handlerMap = {
[NewcommandTables.NEW_DELIMITER]: HandlerType.DELIMITER,
[NewcommandTables.NEW_ENVIRONMENT]: HandlerType.ENVIRONMENT,
[NewcommandTables.NEW_COMMAND]: HandlerType.MACRO,
};
function begingroupStack(parser) {
return parser.packageData.get('begingroup').stack;
}
//# sourceMappingURL=BegingroupStack.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./mjs/input/tex/begingroup/BegingroupMethods.js
const BegingroupMethods = {
begingroup(parser, _name) {
begingroupStack(parser.configuration).push();
},
endgroup(parser, _name) {
begingroupStack(parser.configuration).pop();
},
reset(parser, _name) {
begingroupStack(parser.configuration).reset();
},
sandbox(parser, _name) {
begingroupStack(parser.configuration).sandbox();
parser.stack.global.isSandbox = true;
},
global(parser, _name) {
const i = parser.i;
const cs = parser.GetNext() === '\\' ? (parser.i++, parser.GetCS()) : '';
parser.i = i;
if (!parser.options.begingroup.allowGlobal.includes(cs)) {
throw new TexError('IllegalGlobal', 'Invalid use of %1', parser.currentCS);
}
parser.stack.env.isGlobal = true;
},
macro: BaseMethods.Macro,
};
new CommandMap('begingroup', {
begingroup: BegingroupMethods.begingroup,
endgroup: BegingroupMethods.endgroup,
global: BegingroupMethods.global,
gdef: [BegingroupMethods.macro, '\\global\\def'],
begingroupReset: BegingroupMethods.reset,
begingroupSandbox: BegingroupMethods.sandbox,
});
//# sourceMappingURL=BegingroupMethods.js.map
;// ./mjs/input/tex/begingroup/BegingroupConfiguration.js
new CommandMap('begingroup', {
begingroup: BegingroupMethods.begingroup,
endgroup: BegingroupMethods.endgroup,
global: BegingroupMethods.global,
gdef: [BegingroupMethods.macro, '\\global\\def'],
begingroupReset: BegingroupMethods.reset,
begingroupSandbox: BegingroupMethods.sandbox,
});
const BegingroupConfiguration = Configuration.create('begingroup', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['begingroup'],
},
[ConfigurationType.CONFIG]: (_config, jax) => {
jax.parseOptions.packageData.set('begingroup', {
stack: new BegingroupStack(jax.parseOptions),
});
},
[ConfigurationType.OPTIONS]: {
begingroup: {
allowGlobal: [
'let',
'def',
'newcommand',
'DeclareMathOperator',
'Newextarrow',
],
},
},
[ConfigurationType.PREPROCESSORS]: [
({ data: parser }) => begingroupStack(parser).remove(),
],
[ConfigurationType.POSTPROCESSORS]: [
({ data: parser }) => begingroupStack(parser).finish(),
],
});
//# sourceMappingURL=BegingroupConfiguration.js.map
;// ./components/mjs/input/tex/extensions/begingroup/lib/begingroup.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/begingroup', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
begingroup: {
BegingroupConfiguration: BegingroupConfiguration_namespaceObject,
BegingroupMethods: BegingroupMethods_namespaceObject,
BegingroupStack: BegingroupStack_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/begingroup/begingroup.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/dsfont.js 0000644 0001762 0000144 00000012414 15112352647 023247 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/dsfont/DsfontConfiguration.js
var DsfontConfiguration_namespaceObject = {};
__webpack_require__.r(DsfontConfiguration_namespaceObject);
__webpack_require__.d(DsfontConfiguration_namespaceObject, {
DsfontConfiguration: () => (DsfontConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/base/BaseMethods.js
const BaseMethods_def = MathJax._.input.tex.base.BaseMethods;
const splitAlignArray = BaseMethods_def.splitAlignArray;
/* harmony default export */ const BaseMethods = (BaseMethods_def.default);
;// ./mjs/input/tex/dsfont/DsfontConfiguration.js
function ChooseFont(parser, name) {
BaseMethods.MathFont(parser, name, parser.options.dsfont.sans ? '-ds-ss' : '-ds-rm');
}
new CommandMap('dsfont', {
mathds: ChooseFont,
});
const DsfontConfiguration = Configuration.create('dsfont', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['dsfont'],
},
[ConfigurationType.OPTIONS]: {
dsfont: {
sans: false,
},
},
});
//# sourceMappingURL=DsfontConfiguration.js.map
;// ./components/mjs/input/tex/extensions/dsfont/lib/dsfont.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/dsfont', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
dsfont: {
DsfontConfiguration: DsfontConfiguration_namespaceObject
}
}
}
}});
;// ./components/mjs/core/lib/util/context.js
const context_def = MathJax._.util.context;
const hasWindow = context_def.hasWindow;
const context = context_def.context;
;// ./components/mjs/input/tex/extension.js
function fontExtension(id, name, pkg = `@mathjax/${name}`) {
if (MathJax.loader) {
const FONTPATH = hasWindow ? `https://cdn.jsdelivr.net/npm/${pkg}` : pkg;
const path = name.replace(/-font-extension$/, '-extension');
const jax = (MathJax.config?.startup?.output || 'chtml');
combineDefaults(MathJax.config.loader, 'paths', {[path]: FONTPATH});
combineDefaults(MathJax.config.loader, 'dependencies', {[`[${path}]/${jax}`]: [`output/${jax}`]});
MathJax.loader.addPackageData(id, {
extraLoads: [`[${path}]/${jax}`],
rendererExtensions: [path]
});
}
}
;// ./components/mjs/input/tex/extensions/dsfont/dsfont.js
fontExtension('[tex]/dsfont', 'mathjax-dsfont-font-extension');
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/html.js 0000644 0001762 0000144 00000017017 15112352655 022721 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/html/HtmlMethods.js
var HtmlMethods_namespaceObject = {};
__webpack_require__.r(HtmlMethods_namespaceObject);
__webpack_require__.d(HtmlMethods_namespaceObject, {
"default": () => (html_HtmlMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/html/HtmlConfiguration.js
var HtmlConfiguration_namespaceObject = {};
__webpack_require__.r(HtmlConfiguration_namespaceObject);
__webpack_require__.d(HtmlConfiguration_namespaceObject, {
HtmlConfiguration: () => (HtmlConfiguration)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/NodeUtil.js
const NodeUtil_def = MathJax._.input.tex.NodeUtil;
/* harmony default export */ const NodeUtil = (NodeUtil_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./mjs/input/tex/html/HtmlMethods.js
const nonCharacterRegexp = /[\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;
function isLegalAttributeName(name) {
return !(name.match(/[\x00-\x1f\x7f-\x9f "'>/=]/) ||
name.match(nonCharacterRegexp));
}
const HtmlMethods = {
Data(parser, name) {
const dataset = parser.GetArgument(name);
const arg = GetArgumentMML(parser, name);
const data = ParseUtil.keyvalOptions(dataset);
for (const key in data) {
if (!isLegalAttributeName(key)) {
throw new TexError('InvalidHTMLAttr', 'Invalid HTML attribute: %1', `data-${key}`);
}
NodeUtil.setAttribute(arg, `data-${key}`, data[key]);
}
parser.Push(arg);
},
Href(parser, name) {
const url = parser.GetArgument(name);
const arg = GetArgumentMML(parser, name);
NodeUtil.setAttribute(arg, 'href', url);
parser.Push(arg);
},
Class(parser, name) {
let CLASS = parser.GetArgument(name);
const arg = GetArgumentMML(parser, name);
const oldClass = NodeUtil.getAttribute(arg, 'class');
if (oldClass) {
CLASS = oldClass + ' ' + CLASS;
}
NodeUtil.setAttribute(arg, 'class', CLASS);
parser.Push(arg);
},
Style(parser, name) {
let style = parser.GetArgument(name);
const arg = GetArgumentMML(parser, name);
let oldStyle = NodeUtil.getAttribute(arg, 'style');
if (oldStyle) {
if (oldStyle.charAt(style.length - 1) !== ';') {
oldStyle += ';';
}
style = oldStyle + ' ' + style;
}
NodeUtil.setAttribute(arg, 'style', style);
parser.Push(arg);
},
Id(parser, name) {
const ID = parser.GetArgument(name);
const arg = GetArgumentMML(parser, name);
NodeUtil.setAttribute(arg, 'id', ID);
parser.Push(arg);
},
};
const GetArgumentMML = function (parser, name) {
const arg = parser.ParseArg(name);
if (!NodeUtil.isInferred(arg)) {
return arg;
}
const mrow = parser.create('node', 'mrow');
NodeUtil.copyChildren(arg, mrow);
NodeUtil.copyAttributes(arg, mrow);
return mrow;
};
/* harmony default export */ const html_HtmlMethods = (HtmlMethods);
//# sourceMappingURL=HtmlMethods.js.map
;// ./mjs/input/tex/html/HtmlConfiguration.js
new CommandMap('html_macros', {
data: html_HtmlMethods.Data,
href: html_HtmlMethods.Href,
class: html_HtmlMethods.Class,
style: html_HtmlMethods.Style,
cssId: html_HtmlMethods.Id,
});
const HtmlConfiguration = Configuration.create('html', {
[ConfigurationType.HANDLER]: { [HandlerType.MACRO]: ['html_macros'] },
});
//# sourceMappingURL=HtmlConfiguration.js.map
;// ./components/mjs/input/tex/extensions/html/lib/html.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/html', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
html: {
HtmlConfiguration: HtmlConfiguration_namespaceObject,
HtmlMethods: HtmlMethods_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/html/html.js
/******/ })()
; mathjaxr/inst/doc/mathjax/input/tex/extensions/empheq.js 0000644 0001762 0000144 00000031704 15112352651 023227 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
// NAMESPACE OBJECT: ./mjs/input/tex/empheq/EmpheqUtil.js
var EmpheqUtil_namespaceObject = {};
__webpack_require__.r(EmpheqUtil_namespaceObject);
__webpack_require__.d(EmpheqUtil_namespaceObject, {
EmpheqUtil: () => (EmpheqUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/empheq/EmpheqConfiguration.js
var EmpheqConfiguration_namespaceObject = {};
__webpack_require__.r(EmpheqConfiguration_namespaceObject);
__webpack_require__.d(EmpheqConfiguration_namespaceObject, {
EmpheqConfiguration: () => (EmpheqConfiguration),
EmpheqMethods: () => (EmpheqMethods)
});
;// ./components/mjs/core/lib/components/global.js
const g = (typeof window !== 'undefined' ? window : global);
const def = g.MathJax._.components.global;
const GLOBAL = def.GLOBAL;
const isObject = def.isObject;
const combineConfig = def.combineConfig;
const combineDefaults = def.combineDefaults;
const combineWithMathJax = def.combineWithMathJax;
const global_MathJax = def.MathJax;
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/HandlerTypes.js
const HandlerTypes_def = MathJax._.input.tex.HandlerTypes;
const ConfigurationType = HandlerTypes_def.ConfigurationType;
const HandlerType = HandlerTypes_def.HandlerType;
;// ./components/mjs/input/tex-base/lib/input/tex/Configuration.js
const Configuration_def = MathJax._.input.tex.Configuration;
const Configuration = Configuration_def.Configuration;
const ConfigurationHandler = Configuration_def.ConfigurationHandler;
const ParserConfiguration = Configuration_def.ParserConfiguration;
;// ./components/mjs/input/tex-base/lib/input/tex/TokenMap.js
const TokenMap_def = MathJax._.input.tex.TokenMap;
const parseResult = TokenMap_def.parseResult;
const AbstractTokenMap = TokenMap_def.AbstractTokenMap;
const RegExpMap = TokenMap_def.RegExpMap;
const AbstractParseMap = TokenMap_def.AbstractParseMap;
const CharacterMap = TokenMap_def.CharacterMap;
const DelimiterMap = TokenMap_def.DelimiterMap;
const MacroMap = TokenMap_def.MacroMap;
const CommandMap = TokenMap_def.CommandMap;
const EnvironmentMap = TokenMap_def.EnvironmentMap;
;// ./components/mjs/input/tex-base/lib/input/tex/ParseUtil.js
const ParseUtil_def = MathJax._.input.tex.ParseUtil;
const KeyValueDef = ParseUtil_def.KeyValueDef;
const KeyValueTypes = ParseUtil_def.KeyValueTypes;
const ParseUtil = ParseUtil_def.ParseUtil;
;// ./components/mjs/input/tex-base/lib/input/tex/TexError.js
const TexError_def = MathJax._.input.tex.TexError;
/* harmony default export */ const TexError = (TexError_def.default);
;// ./components/mjs/input/tex-base/lib/input/tex/TexParser.js
const TexParser_def = MathJax._.input.tex.TexParser;
/* harmony default export */ const TexParser = (TexParser_def.default);
;// ./mjs/input/tex/empheq/EmpheqUtil.js
const EmpheqUtil = {
splitOptions(text, allowed = null) {
return ParseUtil.keyvalOptions(text, allowed, true);
},
columnCount(table) {
let m = 0;
for (const row of table.childNodes) {
const n = row.childNodes.length - (row.isKind('mlabeledtr') ? 1 : 0);
if (n > m)
m = n;
}
return m;
},
cellBlock(tex, table, parser, env) {
const mpadded = parser.create('node', 'mpadded', [], {
height: 0,
depth: 0,
voffset: '-1height',
});
const result = new TexParser(tex, parser.stack.env, parser.configuration);
const mml = result.mml();
if (env && result.configuration.tags.label) {
result.configuration.tags.currentTag.env = env;
result.configuration.tags.getTag(true);
}
for (const child of mml.isInferred ? mml.childNodes : [mml]) {
mpadded.appendChild(child);
}
mpadded.appendChild(parser.create('node', 'mphantom', [
parser.create('node', 'mpadded', [table], { width: 0 }),
]));
return mpadded;
},
topRowTable(original, parser) {
const table = ParseUtil.copyNode(original, parser);
table.setChildren(table.childNodes.slice(0, 1));
table.attributes.set('align', 'baseline 1');
return original.factory.create('mphantom', {}, [
parser.create('node', 'mpadded', [table], { width: 0 }),
]);
},
rowspanCell(mtd, tex, table, parser, env) {
mtd.appendChild(parser.create('node', 'mpadded', [
this.cellBlock(tex, ParseUtil.copyNode(table, parser), parser, env),
this.topRowTable(table, parser),
], { height: 0, depth: 0, voffset: 'height' }));
},
left(table, original, left, parser, env = '') {
table.attributes.set('columnalign', 'right ' + table.attributes.get('columnalign'));
table.attributes.set('columnspacing', '0em ' + table.attributes.get('columnspacing'));
if (table.childNodes.length === 0) {
table.appendChild(parser.create('node', 'mtr'));
}
let mtd;
for (const row of table.childNodes.slice(0).reverse()) {
mtd = parser.create('node', 'mtd');
row.childNodes.unshift(mtd);
mtd.parent = row;
if (row.isKind('mlabeledtr')) {
row.childNodes[0] = row.childNodes[1];
row.childNodes[1] = mtd;
}
}
this.rowspanCell(mtd, left, original, parser, env);
},
right(table, original, right, parser, env = '') {
if (table.childNodes.length === 0) {
table.appendChild(parser.create('node', 'mtr'));
}
const row = table.childNodes[0];
const m = EmpheqUtil.columnCount(table) + (row.isKind('mlabeledtr') ? 1 : 0);
while (row.childNodes.length < m) {
row.appendChild(parser.create('node', 'mtd'));
}
const mtd = row.appendChild(parser.create('node', 'mtd'));
EmpheqUtil.rowspanCell(mtd, right, original, parser, env);
table.attributes.set('columnalign', (table.attributes.get('columnalign') || '')
.split(/ /)
.slice(0, m)
.join(' ') + ' left');
table.attributes.set('columnspacing', table.attributes.get('columnspacing')
.split(/ /)
.slice(0, m - 1)
.join(' ') + ' 0em');
},
adjustTable(empheq, parser) {
const left = empheq.getProperty('left');
const right = empheq.getProperty('right');
if (left || right) {
const table = empheq.Last;
const original = ParseUtil.copyNode(table, parser);
if (left)
this.left(table, original, left, parser);
if (right)
this.right(table, original, right, parser);
}
},
allowEnv: {
equation: true,
align: true,
gather: true,
flalign: true,
alignat: true,
multline: true,
},
checkEnv(env) {
return Object.hasOwn(this.allowEnv, env.replace(/\*$/, '')) || false;
},
};
//# sourceMappingURL=EmpheqUtil.js.map
;// ./components/mjs/input/tex-base/lib/input/tex/ParseMethods.js
const ParseMethods_def = MathJax._.input.tex.ParseMethods;
/* harmony default export */ const ParseMethods = (ParseMethods_def.default);
;// ./mjs/input/tex/empheq/EmpheqConfiguration.js
const EmpheqMethods = {
Empheq(parser, begin) {
if (parser.stack.env.closing === begin.getName()) {
delete parser.stack.env.closing;
parser.Push(parser.itemFactory
.create('end')
.setProperty('name', parser.stack.global.empheq));
parser.stack.global.empheq = '';
const empheq = parser.stack.Top();
EmpheqUtil.adjustTable(empheq, parser);
parser.Push(parser.itemFactory.create('end').setProperty('name', 'empheq'));
}
else {
ParseUtil.checkEqnEnv(parser);
const opts = parser.GetBrackets('\\begin{' + begin.getName() + '}') || '';
const [env, n] = parser
.GetArgument('\\begin{' + begin.getName() + '}')
.split(/=/);
if (!EmpheqUtil.checkEnv(env)) {
throw new TexError('EmpheqInvalidEnv', 'Invalid environment "%1" for %2', env, begin.getName());
}
begin.setProperty('nestStart', true);
if (opts) {
begin.setProperties(EmpheqUtil.splitOptions(opts, { left: 1, right: 1 }));
}
parser.stack.global.empheq = env;
parser.string =
'\\begin{' +
env +
'}' +
(n ? '{' + n + '}' : '') +
parser.string.slice(parser.i);
parser.i = 0;
parser.Push(begin);
}
},
EmpheqMO(parser, _name, c) {
parser.Push(parser.create('token', 'mo', {}, c));
},
EmpheqDelim(parser, name) {
const c = parser.GetDelimiter(name);
parser.Push(parser.create('token', 'mo', { stretchy: true, symmetric: true }, c));
},
};
new EnvironmentMap('empheq-env', ParseMethods.environment, {
empheq: [EmpheqMethods.Empheq, 'empheq'],
});
new CommandMap('empheq-macros', {
empheqlbrace: [EmpheqMethods.EmpheqMO, '{'],
empheqrbrace: [EmpheqMethods.EmpheqMO, '}'],
empheqlbrack: [EmpheqMethods.EmpheqMO, '['],
empheqrbrack: [EmpheqMethods.EmpheqMO, ']'],
empheqlangle: [EmpheqMethods.EmpheqMO, '\u27E8'],
empheqrangle: [EmpheqMethods.EmpheqMO, '\u27E9'],
empheqlparen: [EmpheqMethods.EmpheqMO, '('],
empheqrparen: [EmpheqMethods.EmpheqMO, ')'],
empheqlvert: [EmpheqMethods.EmpheqMO, '|'],
empheqrvert: [EmpheqMethods.EmpheqMO, '|'],
empheqlVert: [EmpheqMethods.EmpheqMO, '\u2016'],
empheqrVert: [EmpheqMethods.EmpheqMO, '\u2016'],
empheqlfloor: [EmpheqMethods.EmpheqMO, '\u230A'],
empheqrfloor: [EmpheqMethods.EmpheqMO, '\u230B'],
empheqlceil: [EmpheqMethods.EmpheqMO, '\u2308'],
empheqrceil: [EmpheqMethods.EmpheqMO, '\u2309'],
empheqbiglbrace: [EmpheqMethods.EmpheqMO, '{'],
empheqbigrbrace: [EmpheqMethods.EmpheqMO, '}'],
empheqbiglbrack: [EmpheqMethods.EmpheqMO, '['],
empheqbigrbrack: [EmpheqMethods.EmpheqMO, ']'],
empheqbiglangle: [EmpheqMethods.EmpheqMO, '\u27E8'],
empheqbigrangle: [EmpheqMethods.EmpheqMO, '\u27E9'],
empheqbiglparen: [EmpheqMethods.EmpheqMO, '('],
empheqbigrparen: [EmpheqMethods.EmpheqMO, ')'],
empheqbiglvert: [EmpheqMethods.EmpheqMO, '|'],
empheqbigrvert: [EmpheqMethods.EmpheqMO, '|'],
empheqbiglVert: [EmpheqMethods.EmpheqMO, '\u2016'],
empheqbigrVert: [EmpheqMethods.EmpheqMO, '\u2016'],
empheqbiglfloor: [EmpheqMethods.EmpheqMO, '\u230A'],
empheqbigrfloor: [EmpheqMethods.EmpheqMO, '\u230B'],
empheqbiglceil: [EmpheqMethods.EmpheqMO, '\u2308'],
empheqbigrceil: [EmpheqMethods.EmpheqMO, '\u2309'],
empheql: EmpheqMethods.EmpheqDelim,
empheqr: EmpheqMethods.EmpheqDelim,
empheqbigl: EmpheqMethods.EmpheqDelim,
empheqbigr: EmpheqMethods.EmpheqDelim,
});
const EmpheqConfiguration = Configuration.create('empheq', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['empheq-macros'],
[HandlerType.ENVIRONMENT]: ['empheq-env'],
},
});
//# sourceMappingURL=EmpheqConfiguration.js.map
;// ./components/mjs/input/tex/extensions/empheq/lib/empheq.js
if (MathJax.loader) {
MathJax.loader.checkVersion('[tex]/empheq', VERSION, 'tex-extension');
}
combineWithMathJax({_: {
input: {
tex: {
empheq: {
EmpheqConfiguration: EmpheqConfiguration_namespaceObject,
EmpheqUtil: EmpheqUtil_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/extensions/empheq/empheq.js
/******/ })()
; mathjaxr/inst/doc/mathjax/tex-chtml.js 0000644 0001762 0000144 00007461737 15112352723 017543 0 ustar ligges users /******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 74:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ f: () => (/* binding */ SystemExternal)
/* harmony export */ });
/* harmony import */ var _variables_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(714);
/* harmony import */ var _lib_external_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(268);
const windowSupported = (() => !(typeof window === 'undefined'))();
const documentSupported = (() => windowSupported && !(typeof window.document === 'undefined'))();
const webworker = (() => !(typeof DedicatedWorkerGlobalScope === 'undefined'))();
const nodeRequire = () => {
try {
return eval('require');
}
catch (_err) {
return (_file) => null;
}
};
const SystemExternal = {
extRequire(library) {
if (typeof process !== 'undefined' && typeof require !== 'undefined') {
return nodeRequire()(library);
}
return null;
},
windowSupported: windowSupported,
documentSupported: documentSupported,
webworker: webworker,
xmldom: _lib_external_js__WEBPACK_IMPORTED_MODULE_1__/* .xmldom */ .Gb,
document: _lib_external_js__WEBPACK_IMPORTED_MODULE_1__/* .document */ .Al,
fs: documentSupported || webworker ? null : nodeRequire()('fs'),
url: _variables_js__WEBPACK_IMPORTED_MODULE_0__/* .Variables */ .u.url,
jsonPath: (function () {
if (documentSupported || webworker) {
return _variables_js__WEBPACK_IMPORTED_MODULE_0__/* .Variables */ .u.url;
}
if (process.env.SRE_JSON_PATH || global.SRE_JSON_PATH) {
return process.env.SRE_JSON_PATH || global.SRE_JSON_PATH;
}
try {
const path = nodeRequire().resolve('speech-rule-engine');
return path.replace(/sre\.js$/, '') + 'mathmaps';
}
catch (_err) {
}
try {
const path = nodeRequire().resolve('.');
return path.replace(/sre\.js$/, '') + 'mathmaps';
}
catch (_err) {
}
return typeof __dirname !== 'undefined'
? __dirname + (__dirname.match(/lib?$/) ? '/mathmaps' : '/lib/mathmaps')
: process.cwd() + '/lib/mathmaps';
})(),
xpath: _lib_external_js__WEBPACK_IMPORTED_MODULE_1__/* .xpath */ .Oe
};
//# sourceMappingURL=system_external.js.map
/***/ }),
/***/ 159:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var freeze = (__webpack_require__(870).freeze);
/**
* The entities that are predefined in every XML document.
*
* @see https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-predefined-ent W3C XML 1.1
* @see https://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent W3C XML 1.0
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML
* Wikipedia
*/
exports.XML_ENTITIES = freeze({
amp: '&',
apos: "'",
gt: '>',
lt: '<',
quot: '"',
});
/**
* A map of all entities that are detected in an HTML document.
* They contain all entries from `XML_ENTITIES`.
*
* @see {@link XML_ENTITIES}
* @see {@link DOMParser.parseFromString}
* @see {@link DOMImplementation.prototype.createHTMLDocument}
* @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5)
* Spec
* @see https://html.spec.whatwg.org/entities.json JSON
* @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names
* @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML
* Wikipedia (HTML)
* @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML
* Wikpedia (XHTML)
*/
exports.HTML_ENTITIES = freeze({
Aacute: '\u00C1',
aacute: '\u00E1',
Abreve: '\u0102',
abreve: '\u0103',
ac: '\u223E',
acd: '\u223F',
acE: '\u223E\u0333',
Acirc: '\u00C2',
acirc: '\u00E2',
acute: '\u00B4',
Acy: '\u0410',
acy: '\u0430',
AElig: '\u00C6',
aelig: '\u00E6',
af: '\u2061',
Afr: '\uD835\uDD04',
afr: '\uD835\uDD1E',
Agrave: '\u00C0',
agrave: '\u00E0',
alefsym: '\u2135',
aleph: '\u2135',
Alpha: '\u0391',
alpha: '\u03B1',
Amacr: '\u0100',
amacr: '\u0101',
amalg: '\u2A3F',
AMP: '\u0026',
amp: '\u0026',
And: '\u2A53',
and: '\u2227',
andand: '\u2A55',
andd: '\u2A5C',
andslope: '\u2A58',
andv: '\u2A5A',
ang: '\u2220',
ange: '\u29A4',
angle: '\u2220',
angmsd: '\u2221',
angmsdaa: '\u29A8',
angmsdab: '\u29A9',
angmsdac: '\u29AA',
angmsdad: '\u29AB',
angmsdae: '\u29AC',
angmsdaf: '\u29AD',
angmsdag: '\u29AE',
angmsdah: '\u29AF',
angrt: '\u221F',
angrtvb: '\u22BE',
angrtvbd: '\u299D',
angsph: '\u2222',
angst: '\u00C5',
angzarr: '\u237C',
Aogon: '\u0104',
aogon: '\u0105',
Aopf: '\uD835\uDD38',
aopf: '\uD835\uDD52',
ap: '\u2248',
apacir: '\u2A6F',
apE: '\u2A70',
ape: '\u224A',
apid: '\u224B',
apos: '\u0027',
ApplyFunction: '\u2061',
approx: '\u2248',
approxeq: '\u224A',
Aring: '\u00C5',
aring: '\u00E5',
Ascr: '\uD835\uDC9C',
ascr: '\uD835\uDCB6',
Assign: '\u2254',
ast: '\u002A',
asymp: '\u2248',
asympeq: '\u224D',
Atilde: '\u00C3',
atilde: '\u00E3',
Auml: '\u00C4',
auml: '\u00E4',
awconint: '\u2233',
awint: '\u2A11',
backcong: '\u224C',
backepsilon: '\u03F6',
backprime: '\u2035',
backsim: '\u223D',
backsimeq: '\u22CD',
Backslash: '\u2216',
Barv: '\u2AE7',
barvee: '\u22BD',
Barwed: '\u2306',
barwed: '\u2305',
barwedge: '\u2305',
bbrk: '\u23B5',
bbrktbrk: '\u23B6',
bcong: '\u224C',
Bcy: '\u0411',
bcy: '\u0431',
bdquo: '\u201E',
becaus: '\u2235',
Because: '\u2235',
because: '\u2235',
bemptyv: '\u29B0',
bepsi: '\u03F6',
bernou: '\u212C',
Bernoullis: '\u212C',
Beta: '\u0392',
beta: '\u03B2',
beth: '\u2136',
between: '\u226C',
Bfr: '\uD835\uDD05',
bfr: '\uD835\uDD1F',
bigcap: '\u22C2',
bigcirc: '\u25EF',
bigcup: '\u22C3',
bigodot: '\u2A00',
bigoplus: '\u2A01',
bigotimes: '\u2A02',
bigsqcup: '\u2A06',
bigstar: '\u2605',
bigtriangledown: '\u25BD',
bigtriangleup: '\u25B3',
biguplus: '\u2A04',
bigvee: '\u22C1',
bigwedge: '\u22C0',
bkarow: '\u290D',
blacklozenge: '\u29EB',
blacksquare: '\u25AA',
blacktriangle: '\u25B4',
blacktriangledown: '\u25BE',
blacktriangleleft: '\u25C2',
blacktriangleright: '\u25B8',
blank: '\u2423',
blk12: '\u2592',
blk14: '\u2591',
blk34: '\u2593',
block: '\u2588',
bne: '\u003D\u20E5',
bnequiv: '\u2261\u20E5',
bNot: '\u2AED',
bnot: '\u2310',
Bopf: '\uD835\uDD39',
bopf: '\uD835\uDD53',
bot: '\u22A5',
bottom: '\u22A5',
bowtie: '\u22C8',
boxbox: '\u29C9',
boxDL: '\u2557',
boxDl: '\u2556',
boxdL: '\u2555',
boxdl: '\u2510',
boxDR: '\u2554',
boxDr: '\u2553',
boxdR: '\u2552',
boxdr: '\u250C',
boxH: '\u2550',
boxh: '\u2500',
boxHD: '\u2566',
boxHd: '\u2564',
boxhD: '\u2565',
boxhd: '\u252C',
boxHU: '\u2569',
boxHu: '\u2567',
boxhU: '\u2568',
boxhu: '\u2534',
boxminus: '\u229F',
boxplus: '\u229E',
boxtimes: '\u22A0',
boxUL: '\u255D',
boxUl: '\u255C',
boxuL: '\u255B',
boxul: '\u2518',
boxUR: '\u255A',
boxUr: '\u2559',
boxuR: '\u2558',
boxur: '\u2514',
boxV: '\u2551',
boxv: '\u2502',
boxVH: '\u256C',
boxVh: '\u256B',
boxvH: '\u256A',
boxvh: '\u253C',
boxVL: '\u2563',
boxVl: '\u2562',
boxvL: '\u2561',
boxvl: '\u2524',
boxVR: '\u2560',
boxVr: '\u255F',
boxvR: '\u255E',
boxvr: '\u251C',
bprime: '\u2035',
Breve: '\u02D8',
breve: '\u02D8',
brvbar: '\u00A6',
Bscr: '\u212C',
bscr: '\uD835\uDCB7',
bsemi: '\u204F',
bsim: '\u223D',
bsime: '\u22CD',
bsol: '\u005C',
bsolb: '\u29C5',
bsolhsub: '\u27C8',
bull: '\u2022',
bullet: '\u2022',
bump: '\u224E',
bumpE: '\u2AAE',
bumpe: '\u224F',
Bumpeq: '\u224E',
bumpeq: '\u224F',
Cacute: '\u0106',
cacute: '\u0107',
Cap: '\u22D2',
cap: '\u2229',
capand: '\u2A44',
capbrcup: '\u2A49',
capcap: '\u2A4B',
capcup: '\u2A47',
capdot: '\u2A40',
CapitalDifferentialD: '\u2145',
caps: '\u2229\uFE00',
caret: '\u2041',
caron: '\u02C7',
Cayleys: '\u212D',
ccaps: '\u2A4D',
Ccaron: '\u010C',
ccaron: '\u010D',
Ccedil: '\u00C7',
ccedil: '\u00E7',
Ccirc: '\u0108',
ccirc: '\u0109',
Cconint: '\u2230',
ccups: '\u2A4C',
ccupssm: '\u2A50',
Cdot: '\u010A',
cdot: '\u010B',
cedil: '\u00B8',
Cedilla: '\u00B8',
cemptyv: '\u29B2',
cent: '\u00A2',
CenterDot: '\u00B7',
centerdot: '\u00B7',
Cfr: '\u212D',
cfr: '\uD835\uDD20',
CHcy: '\u0427',
chcy: '\u0447',
check: '\u2713',
checkmark: '\u2713',
Chi: '\u03A7',
chi: '\u03C7',
cir: '\u25CB',
circ: '\u02C6',
circeq: '\u2257',
circlearrowleft: '\u21BA',
circlearrowright: '\u21BB',
circledast: '\u229B',
circledcirc: '\u229A',
circleddash: '\u229D',
CircleDot: '\u2299',
circledR: '\u00AE',
circledS: '\u24C8',
CircleMinus: '\u2296',
CirclePlus: '\u2295',
CircleTimes: '\u2297',
cirE: '\u29C3',
cire: '\u2257',
cirfnint: '\u2A10',
cirmid: '\u2AEF',
cirscir: '\u29C2',
ClockwiseContourIntegral: '\u2232',
CloseCurlyDoubleQuote: '\u201D',
CloseCurlyQuote: '\u2019',
clubs: '\u2663',
clubsuit: '\u2663',
Colon: '\u2237',
colon: '\u003A',
Colone: '\u2A74',
colone: '\u2254',
coloneq: '\u2254',
comma: '\u002C',
commat: '\u0040',
comp: '\u2201',
compfn: '\u2218',
complement: '\u2201',
complexes: '\u2102',
cong: '\u2245',
congdot: '\u2A6D',
Congruent: '\u2261',
Conint: '\u222F',
conint: '\u222E',
ContourIntegral: '\u222E',
Copf: '\u2102',
copf: '\uD835\uDD54',
coprod: '\u2210',
Coproduct: '\u2210',
COPY: '\u00A9',
copy: '\u00A9',
copysr: '\u2117',
CounterClockwiseContourIntegral: '\u2233',
crarr: '\u21B5',
Cross: '\u2A2F',
cross: '\u2717',
Cscr: '\uD835\uDC9E',
cscr: '\uD835\uDCB8',
csub: '\u2ACF',
csube: '\u2AD1',
csup: '\u2AD0',
csupe: '\u2AD2',
ctdot: '\u22EF',
cudarrl: '\u2938',
cudarrr: '\u2935',
cuepr: '\u22DE',
cuesc: '\u22DF',
cularr: '\u21B6',
cularrp: '\u293D',
Cup: '\u22D3',
cup: '\u222A',
cupbrcap: '\u2A48',
CupCap: '\u224D',
cupcap: '\u2A46',
cupcup: '\u2A4A',
cupdot: '\u228D',
cupor: '\u2A45',
cups: '\u222A\uFE00',
curarr: '\u21B7',
curarrm: '\u293C',
curlyeqprec: '\u22DE',
curlyeqsucc: '\u22DF',
curlyvee: '\u22CE',
curlywedge: '\u22CF',
curren: '\u00A4',
curvearrowleft: '\u21B6',
curvearrowright: '\u21B7',
cuvee: '\u22CE',
cuwed: '\u22CF',
cwconint: '\u2232',
cwint: '\u2231',
cylcty: '\u232D',
Dagger: '\u2021',
dagger: '\u2020',
daleth: '\u2138',
Darr: '\u21A1',
dArr: '\u21D3',
darr: '\u2193',
dash: '\u2010',
Dashv: '\u2AE4',
dashv: '\u22A3',
dbkarow: '\u290F',
dblac: '\u02DD',
Dcaron: '\u010E',
dcaron: '\u010F',
Dcy: '\u0414',
dcy: '\u0434',
DD: '\u2145',
dd: '\u2146',
ddagger: '\u2021',
ddarr: '\u21CA',
DDotrahd: '\u2911',
ddotseq: '\u2A77',
deg: '\u00B0',
Del: '\u2207',
Delta: '\u0394',
delta: '\u03B4',
demptyv: '\u29B1',
dfisht: '\u297F',
Dfr: '\uD835\uDD07',
dfr: '\uD835\uDD21',
dHar: '\u2965',
dharl: '\u21C3',
dharr: '\u21C2',
DiacriticalAcute: '\u00B4',
DiacriticalDot: '\u02D9',
DiacriticalDoubleAcute: '\u02DD',
DiacriticalGrave: '\u0060',
DiacriticalTilde: '\u02DC',
diam: '\u22C4',
Diamond: '\u22C4',
diamond: '\u22C4',
diamondsuit: '\u2666',
diams: '\u2666',
die: '\u00A8',
DifferentialD: '\u2146',
digamma: '\u03DD',
disin: '\u22F2',
div: '\u00F7',
divide: '\u00F7',
divideontimes: '\u22C7',
divonx: '\u22C7',
DJcy: '\u0402',
djcy: '\u0452',
dlcorn: '\u231E',
dlcrop: '\u230D',
dollar: '\u0024',
Dopf: '\uD835\uDD3B',
dopf: '\uD835\uDD55',
Dot: '\u00A8',
dot: '\u02D9',
DotDot: '\u20DC',
doteq: '\u2250',
doteqdot: '\u2251',
DotEqual: '\u2250',
dotminus: '\u2238',
dotplus: '\u2214',
dotsquare: '\u22A1',
doublebarwedge: '\u2306',
DoubleContourIntegral: '\u222F',
DoubleDot: '\u00A8',
DoubleDownArrow: '\u21D3',
DoubleLeftArrow: '\u21D0',
DoubleLeftRightArrow: '\u21D4',
DoubleLeftTee: '\u2AE4',
DoubleLongLeftArrow: '\u27F8',
DoubleLongLeftRightArrow: '\u27FA',
DoubleLongRightArrow: '\u27F9',
DoubleRightArrow: '\u21D2',
DoubleRightTee: '\u22A8',
DoubleUpArrow: '\u21D1',
DoubleUpDownArrow: '\u21D5',
DoubleVerticalBar: '\u2225',
DownArrow: '\u2193',
Downarrow: '\u21D3',
downarrow: '\u2193',
DownArrowBar: '\u2913',
DownArrowUpArrow: '\u21F5',
DownBreve: '\u0311',
downdownarrows: '\u21CA',
downharpoonleft: '\u21C3',
downharpoonright: '\u21C2',
DownLeftRightVector: '\u2950',
DownLeftTeeVector: '\u295E',
DownLeftVector: '\u21BD',
DownLeftVectorBar: '\u2956',
DownRightTeeVector: '\u295F',
DownRightVector: '\u21C1',
DownRightVectorBar: '\u2957',
DownTee: '\u22A4',
DownTeeArrow: '\u21A7',
drbkarow: '\u2910',
drcorn: '\u231F',
drcrop: '\u230C',
Dscr: '\uD835\uDC9F',
dscr: '\uD835\uDCB9',
DScy: '\u0405',
dscy: '\u0455',
dsol: '\u29F6',
Dstrok: '\u0110',
dstrok: '\u0111',
dtdot: '\u22F1',
dtri: '\u25BF',
dtrif: '\u25BE',
duarr: '\u21F5',
duhar: '\u296F',
dwangle: '\u29A6',
DZcy: '\u040F',
dzcy: '\u045F',
dzigrarr: '\u27FF',
Eacute: '\u00C9',
eacute: '\u00E9',
easter: '\u2A6E',
Ecaron: '\u011A',
ecaron: '\u011B',
ecir: '\u2256',
Ecirc: '\u00CA',
ecirc: '\u00EA',
ecolon: '\u2255',
Ecy: '\u042D',
ecy: '\u044D',
eDDot: '\u2A77',
Edot: '\u0116',
eDot: '\u2251',
edot: '\u0117',
ee: '\u2147',
efDot: '\u2252',
Efr: '\uD835\uDD08',
efr: '\uD835\uDD22',
eg: '\u2A9A',
Egrave: '\u00C8',
egrave: '\u00E8',
egs: '\u2A96',
egsdot: '\u2A98',
el: '\u2A99',
Element: '\u2208',
elinters: '\u23E7',
ell: '\u2113',
els: '\u2A95',
elsdot: '\u2A97',
Emacr: '\u0112',
emacr: '\u0113',
empty: '\u2205',
emptyset: '\u2205',
EmptySmallSquare: '\u25FB',
emptyv: '\u2205',
EmptyVerySmallSquare: '\u25AB',
emsp: '\u2003',
emsp13: '\u2004',
emsp14: '\u2005',
ENG: '\u014A',
eng: '\u014B',
ensp: '\u2002',
Eogon: '\u0118',
eogon: '\u0119',
Eopf: '\uD835\uDD3C',
eopf: '\uD835\uDD56',
epar: '\u22D5',
eparsl: '\u29E3',
eplus: '\u2A71',
epsi: '\u03B5',
Epsilon: '\u0395',
epsilon: '\u03B5',
epsiv: '\u03F5',
eqcirc: '\u2256',
eqcolon: '\u2255',
eqsim: '\u2242',
eqslantgtr: '\u2A96',
eqslantless: '\u2A95',
Equal: '\u2A75',
equals: '\u003D',
EqualTilde: '\u2242',
equest: '\u225F',
Equilibrium: '\u21CC',
equiv: '\u2261',
equivDD: '\u2A78',
eqvparsl: '\u29E5',
erarr: '\u2971',
erDot: '\u2253',
Escr: '\u2130',
escr: '\u212F',
esdot: '\u2250',
Esim: '\u2A73',
esim: '\u2242',
Eta: '\u0397',
eta: '\u03B7',
ETH: '\u00D0',
eth: '\u00F0',
Euml: '\u00CB',
euml: '\u00EB',
euro: '\u20AC',
excl: '\u0021',
exist: '\u2203',
Exists: '\u2203',
expectation: '\u2130',
ExponentialE: '\u2147',
exponentiale: '\u2147',
fallingdotseq: '\u2252',
Fcy: '\u0424',
fcy: '\u0444',
female: '\u2640',
ffilig: '\uFB03',
fflig: '\uFB00',
ffllig: '\uFB04',
Ffr: '\uD835\uDD09',
ffr: '\uD835\uDD23',
filig: '\uFB01',
FilledSmallSquare: '\u25FC',
FilledVerySmallSquare: '\u25AA',
fjlig: '\u0066\u006A',
flat: '\u266D',
fllig: '\uFB02',
fltns: '\u25B1',
fnof: '\u0192',
Fopf: '\uD835\uDD3D',
fopf: '\uD835\uDD57',
ForAll: '\u2200',
forall: '\u2200',
fork: '\u22D4',
forkv: '\u2AD9',
Fouriertrf: '\u2131',
fpartint: '\u2A0D',
frac12: '\u00BD',
frac13: '\u2153',
frac14: '\u00BC',
frac15: '\u2155',
frac16: '\u2159',
frac18: '\u215B',
frac23: '\u2154',
frac25: '\u2156',
frac34: '\u00BE',
frac35: '\u2157',
frac38: '\u215C',
frac45: '\u2158',
frac56: '\u215A',
frac58: '\u215D',
frac78: '\u215E',
frasl: '\u2044',
frown: '\u2322',
Fscr: '\u2131',
fscr: '\uD835\uDCBB',
gacute: '\u01F5',
Gamma: '\u0393',
gamma: '\u03B3',
Gammad: '\u03DC',
gammad: '\u03DD',
gap: '\u2A86',
Gbreve: '\u011E',
gbreve: '\u011F',
Gcedil: '\u0122',
Gcirc: '\u011C',
gcirc: '\u011D',
Gcy: '\u0413',
gcy: '\u0433',
Gdot: '\u0120',
gdot: '\u0121',
gE: '\u2267',
ge: '\u2265',
gEl: '\u2A8C',
gel: '\u22DB',
geq: '\u2265',
geqq: '\u2267',
geqslant: '\u2A7E',
ges: '\u2A7E',
gescc: '\u2AA9',
gesdot: '\u2A80',
gesdoto: '\u2A82',
gesdotol: '\u2A84',
gesl: '\u22DB\uFE00',
gesles: '\u2A94',
Gfr: '\uD835\uDD0A',
gfr: '\uD835\uDD24',
Gg: '\u22D9',
gg: '\u226B',
ggg: '\u22D9',
gimel: '\u2137',
GJcy: '\u0403',
gjcy: '\u0453',
gl: '\u2277',
gla: '\u2AA5',
glE: '\u2A92',
glj: '\u2AA4',
gnap: '\u2A8A',
gnapprox: '\u2A8A',
gnE: '\u2269',
gne: '\u2A88',
gneq: '\u2A88',
gneqq: '\u2269',
gnsim: '\u22E7',
Gopf: '\uD835\uDD3E',
gopf: '\uD835\uDD58',
grave: '\u0060',
GreaterEqual: '\u2265',
GreaterEqualLess: '\u22DB',
GreaterFullEqual: '\u2267',
GreaterGreater: '\u2AA2',
GreaterLess: '\u2277',
GreaterSlantEqual: '\u2A7E',
GreaterTilde: '\u2273',
Gscr: '\uD835\uDCA2',
gscr: '\u210A',
gsim: '\u2273',
gsime: '\u2A8E',
gsiml: '\u2A90',
Gt: '\u226B',
GT: '\u003E',
gt: '\u003E',
gtcc: '\u2AA7',
gtcir: '\u2A7A',
gtdot: '\u22D7',
gtlPar: '\u2995',
gtquest: '\u2A7C',
gtrapprox: '\u2A86',
gtrarr: '\u2978',
gtrdot: '\u22D7',
gtreqless: '\u22DB',
gtreqqless: '\u2A8C',
gtrless: '\u2277',
gtrsim: '\u2273',
gvertneqq: '\u2269\uFE00',
gvnE: '\u2269\uFE00',
Hacek: '\u02C7',
hairsp: '\u200A',
half: '\u00BD',
hamilt: '\u210B',
HARDcy: '\u042A',
hardcy: '\u044A',
hArr: '\u21D4',
harr: '\u2194',
harrcir: '\u2948',
harrw: '\u21AD',
Hat: '\u005E',
hbar: '\u210F',
Hcirc: '\u0124',
hcirc: '\u0125',
hearts: '\u2665',
heartsuit: '\u2665',
hellip: '\u2026',
hercon: '\u22B9',
Hfr: '\u210C',
hfr: '\uD835\uDD25',
HilbertSpace: '\u210B',
hksearow: '\u2925',
hkswarow: '\u2926',
hoarr: '\u21FF',
homtht: '\u223B',
hookleftarrow: '\u21A9',
hookrightarrow: '\u21AA',
Hopf: '\u210D',
hopf: '\uD835\uDD59',
horbar: '\u2015',
HorizontalLine: '\u2500',
Hscr: '\u210B',
hscr: '\uD835\uDCBD',
hslash: '\u210F',
Hstrok: '\u0126',
hstrok: '\u0127',
HumpDownHump: '\u224E',
HumpEqual: '\u224F',
hybull: '\u2043',
hyphen: '\u2010',
Iacute: '\u00CD',
iacute: '\u00ED',
ic: '\u2063',
Icirc: '\u00CE',
icirc: '\u00EE',
Icy: '\u0418',
icy: '\u0438',
Idot: '\u0130',
IEcy: '\u0415',
iecy: '\u0435',
iexcl: '\u00A1',
iff: '\u21D4',
Ifr: '\u2111',
ifr: '\uD835\uDD26',
Igrave: '\u00CC',
igrave: '\u00EC',
ii: '\u2148',
iiiint: '\u2A0C',
iiint: '\u222D',
iinfin: '\u29DC',
iiota: '\u2129',
IJlig: '\u0132',
ijlig: '\u0133',
Im: '\u2111',
Imacr: '\u012A',
imacr: '\u012B',
image: '\u2111',
ImaginaryI: '\u2148',
imagline: '\u2110',
imagpart: '\u2111',
imath: '\u0131',
imof: '\u22B7',
imped: '\u01B5',
Implies: '\u21D2',
in: '\u2208',
incare: '\u2105',
infin: '\u221E',
infintie: '\u29DD',
inodot: '\u0131',
Int: '\u222C',
int: '\u222B',
intcal: '\u22BA',
integers: '\u2124',
Integral: '\u222B',
intercal: '\u22BA',
Intersection: '\u22C2',
intlarhk: '\u2A17',
intprod: '\u2A3C',
InvisibleComma: '\u2063',
InvisibleTimes: '\u2062',
IOcy: '\u0401',
iocy: '\u0451',
Iogon: '\u012E',
iogon: '\u012F',
Iopf: '\uD835\uDD40',
iopf: '\uD835\uDD5A',
Iota: '\u0399',
iota: '\u03B9',
iprod: '\u2A3C',
iquest: '\u00BF',
Iscr: '\u2110',
iscr: '\uD835\uDCBE',
isin: '\u2208',
isindot: '\u22F5',
isinE: '\u22F9',
isins: '\u22F4',
isinsv: '\u22F3',
isinv: '\u2208',
it: '\u2062',
Itilde: '\u0128',
itilde: '\u0129',
Iukcy: '\u0406',
iukcy: '\u0456',
Iuml: '\u00CF',
iuml: '\u00EF',
Jcirc: '\u0134',
jcirc: '\u0135',
Jcy: '\u0419',
jcy: '\u0439',
Jfr: '\uD835\uDD0D',
jfr: '\uD835\uDD27',
jmath: '\u0237',
Jopf: '\uD835\uDD41',
jopf: '\uD835\uDD5B',
Jscr: '\uD835\uDCA5',
jscr: '\uD835\uDCBF',
Jsercy: '\u0408',
jsercy: '\u0458',
Jukcy: '\u0404',
jukcy: '\u0454',
Kappa: '\u039A',
kappa: '\u03BA',
kappav: '\u03F0',
Kcedil: '\u0136',
kcedil: '\u0137',
Kcy: '\u041A',
kcy: '\u043A',
Kfr: '\uD835\uDD0E',
kfr: '\uD835\uDD28',
kgreen: '\u0138',
KHcy: '\u0425',
khcy: '\u0445',
KJcy: '\u040C',
kjcy: '\u045C',
Kopf: '\uD835\uDD42',
kopf: '\uD835\uDD5C',
Kscr: '\uD835\uDCA6',
kscr: '\uD835\uDCC0',
lAarr: '\u21DA',
Lacute: '\u0139',
lacute: '\u013A',
laemptyv: '\u29B4',
lagran: '\u2112',
Lambda: '\u039B',
lambda: '\u03BB',
Lang: '\u27EA',
lang: '\u27E8',
langd: '\u2991',
langle: '\u27E8',
lap: '\u2A85',
Laplacetrf: '\u2112',
laquo: '\u00AB',
Larr: '\u219E',
lArr: '\u21D0',
larr: '\u2190',
larrb: '\u21E4',
larrbfs: '\u291F',
larrfs: '\u291D',
larrhk: '\u21A9',
larrlp: '\u21AB',
larrpl: '\u2939',
larrsim: '\u2973',
larrtl: '\u21A2',
lat: '\u2AAB',
lAtail: '\u291B',
latail: '\u2919',
late: '\u2AAD',
lates: '\u2AAD\uFE00',
lBarr: '\u290E',
lbarr: '\u290C',
lbbrk: '\u2772',
lbrace: '\u007B',
lbrack: '\u005B',
lbrke: '\u298B',
lbrksld: '\u298F',
lbrkslu: '\u298D',
Lcaron: '\u013D',
lcaron: '\u013E',
Lcedil: '\u013B',
lcedil: '\u013C',
lceil: '\u2308',
lcub: '\u007B',
Lcy: '\u041B',
lcy: '\u043B',
ldca: '\u2936',
ldquo: '\u201C',
ldquor: '\u201E',
ldrdhar: '\u2967',
ldrushar: '\u294B',
ldsh: '\u21B2',
lE: '\u2266',
le: '\u2264',
LeftAngleBracket: '\u27E8',
LeftArrow: '\u2190',
Leftarrow: '\u21D0',
leftarrow: '\u2190',
LeftArrowBar: '\u21E4',
LeftArrowRightArrow: '\u21C6',
leftarrowtail: '\u21A2',
LeftCeiling: '\u2308',
LeftDoubleBracket: '\u27E6',
LeftDownTeeVector: '\u2961',
LeftDownVector: '\u21C3',
LeftDownVectorBar: '\u2959',
LeftFloor: '\u230A',
leftharpoondown: '\u21BD',
leftharpoonup: '\u21BC',
leftleftarrows: '\u21C7',
LeftRightArrow: '\u2194',
Leftrightarrow: '\u21D4',
leftrightarrow: '\u2194',
leftrightarrows: '\u21C6',
leftrightharpoons: '\u21CB',
leftrightsquigarrow: '\u21AD',
LeftRightVector: '\u294E',
LeftTee: '\u22A3',
LeftTeeArrow: '\u21A4',
LeftTeeVector: '\u295A',
leftthreetimes: '\u22CB',
LeftTriangle: '\u22B2',
LeftTriangleBar: '\u29CF',
LeftTriangleEqual: '\u22B4',
LeftUpDownVector: '\u2951',
LeftUpTeeVector: '\u2960',
LeftUpVector: '\u21BF',
LeftUpVectorBar: '\u2958',
LeftVector: '\u21BC',
LeftVectorBar: '\u2952',
lEg: '\u2A8B',
leg: '\u22DA',
leq: '\u2264',
leqq: '\u2266',
leqslant: '\u2A7D',
les: '\u2A7D',
lescc: '\u2AA8',
lesdot: '\u2A7F',
lesdoto: '\u2A81',
lesdotor: '\u2A83',
lesg: '\u22DA\uFE00',
lesges: '\u2A93',
lessapprox: '\u2A85',
lessdot: '\u22D6',
lesseqgtr: '\u22DA',
lesseqqgtr: '\u2A8B',
LessEqualGreater: '\u22DA',
LessFullEqual: '\u2266',
LessGreater: '\u2276',
lessgtr: '\u2276',
LessLess: '\u2AA1',
lesssim: '\u2272',
LessSlantEqual: '\u2A7D',
LessTilde: '\u2272',
lfisht: '\u297C',
lfloor: '\u230A',
Lfr: '\uD835\uDD0F',
lfr: '\uD835\uDD29',
lg: '\u2276',
lgE: '\u2A91',
lHar: '\u2962',
lhard: '\u21BD',
lharu: '\u21BC',
lharul: '\u296A',
lhblk: '\u2584',
LJcy: '\u0409',
ljcy: '\u0459',
Ll: '\u22D8',
ll: '\u226A',
llarr: '\u21C7',
llcorner: '\u231E',
Lleftarrow: '\u21DA',
llhard: '\u296B',
lltri: '\u25FA',
Lmidot: '\u013F',
lmidot: '\u0140',
lmoust: '\u23B0',
lmoustache: '\u23B0',
lnap: '\u2A89',
lnapprox: '\u2A89',
lnE: '\u2268',
lne: '\u2A87',
lneq: '\u2A87',
lneqq: '\u2268',
lnsim: '\u22E6',
loang: '\u27EC',
loarr: '\u21FD',
lobrk: '\u27E6',
LongLeftArrow: '\u27F5',
Longleftarrow: '\u27F8',
longleftarrow: '\u27F5',
LongLeftRightArrow: '\u27F7',
Longleftrightarrow: '\u27FA',
longleftrightarrow: '\u27F7',
longmapsto: '\u27FC',
LongRightArrow: '\u27F6',
Longrightarrow: '\u27F9',
longrightarrow: '\u27F6',
looparrowleft: '\u21AB',
looparrowright: '\u21AC',
lopar: '\u2985',
Lopf: '\uD835\uDD43',
lopf: '\uD835\uDD5D',
loplus: '\u2A2D',
lotimes: '\u2A34',
lowast: '\u2217',
lowbar: '\u005F',
LowerLeftArrow: '\u2199',
LowerRightArrow: '\u2198',
loz: '\u25CA',
lozenge: '\u25CA',
lozf: '\u29EB',
lpar: '\u0028',
lparlt: '\u2993',
lrarr: '\u21C6',
lrcorner: '\u231F',
lrhar: '\u21CB',
lrhard: '\u296D',
lrm: '\u200E',
lrtri: '\u22BF',
lsaquo: '\u2039',
Lscr: '\u2112',
lscr: '\uD835\uDCC1',
Lsh: '\u21B0',
lsh: '\u21B0',
lsim: '\u2272',
lsime: '\u2A8D',
lsimg: '\u2A8F',
lsqb: '\u005B',
lsquo: '\u2018',
lsquor: '\u201A',
Lstrok: '\u0141',
lstrok: '\u0142',
Lt: '\u226A',
LT: '\u003C',
lt: '\u003C',
ltcc: '\u2AA6',
ltcir: '\u2A79',
ltdot: '\u22D6',
lthree: '\u22CB',
ltimes: '\u22C9',
ltlarr: '\u2976',
ltquest: '\u2A7B',
ltri: '\u25C3',
ltrie: '\u22B4',
ltrif: '\u25C2',
ltrPar: '\u2996',
lurdshar: '\u294A',
luruhar: '\u2966',
lvertneqq: '\u2268\uFE00',
lvnE: '\u2268\uFE00',
macr: '\u00AF',
male: '\u2642',
malt: '\u2720',
maltese: '\u2720',
Map: '\u2905',
map: '\u21A6',
mapsto: '\u21A6',
mapstodown: '\u21A7',
mapstoleft: '\u21A4',
mapstoup: '\u21A5',
marker: '\u25AE',
mcomma: '\u2A29',
Mcy: '\u041C',
mcy: '\u043C',
mdash: '\u2014',
mDDot: '\u223A',
measuredangle: '\u2221',
MediumSpace: '\u205F',
Mellintrf: '\u2133',
Mfr: '\uD835\uDD10',
mfr: '\uD835\uDD2A',
mho: '\u2127',
micro: '\u00B5',
mid: '\u2223',
midast: '\u002A',
midcir: '\u2AF0',
middot: '\u00B7',
minus: '\u2212',
minusb: '\u229F',
minusd: '\u2238',
minusdu: '\u2A2A',
MinusPlus: '\u2213',
mlcp: '\u2ADB',
mldr: '\u2026',
mnplus: '\u2213',
models: '\u22A7',
Mopf: '\uD835\uDD44',
mopf: '\uD835\uDD5E',
mp: '\u2213',
Mscr: '\u2133',
mscr: '\uD835\uDCC2',
mstpos: '\u223E',
Mu: '\u039C',
mu: '\u03BC',
multimap: '\u22B8',
mumap: '\u22B8',
nabla: '\u2207',
Nacute: '\u0143',
nacute: '\u0144',
nang: '\u2220\u20D2',
nap: '\u2249',
napE: '\u2A70\u0338',
napid: '\u224B\u0338',
napos: '\u0149',
napprox: '\u2249',
natur: '\u266E',
natural: '\u266E',
naturals: '\u2115',
nbsp: '\u00A0',
nbump: '\u224E\u0338',
nbumpe: '\u224F\u0338',
ncap: '\u2A43',
Ncaron: '\u0147',
ncaron: '\u0148',
Ncedil: '\u0145',
ncedil: '\u0146',
ncong: '\u2247',
ncongdot: '\u2A6D\u0338',
ncup: '\u2A42',
Ncy: '\u041D',
ncy: '\u043D',
ndash: '\u2013',
ne: '\u2260',
nearhk: '\u2924',
neArr: '\u21D7',
nearr: '\u2197',
nearrow: '\u2197',
nedot: '\u2250\u0338',
NegativeMediumSpace: '\u200B',
NegativeThickSpace: '\u200B',
NegativeThinSpace: '\u200B',
NegativeVeryThinSpace: '\u200B',
nequiv: '\u2262',
nesear: '\u2928',
nesim: '\u2242\u0338',
NestedGreaterGreater: '\u226B',
NestedLessLess: '\u226A',
NewLine: '\u000A',
nexist: '\u2204',
nexists: '\u2204',
Nfr: '\uD835\uDD11',
nfr: '\uD835\uDD2B',
ngE: '\u2267\u0338',
nge: '\u2271',
ngeq: '\u2271',
ngeqq: '\u2267\u0338',
ngeqslant: '\u2A7E\u0338',
nges: '\u2A7E\u0338',
nGg: '\u22D9\u0338',
ngsim: '\u2275',
nGt: '\u226B\u20D2',
ngt: '\u226F',
ngtr: '\u226F',
nGtv: '\u226B\u0338',
nhArr: '\u21CE',
nharr: '\u21AE',
nhpar: '\u2AF2',
ni: '\u220B',
nis: '\u22FC',
nisd: '\u22FA',
niv: '\u220B',
NJcy: '\u040A',
njcy: '\u045A',
nlArr: '\u21CD',
nlarr: '\u219A',
nldr: '\u2025',
nlE: '\u2266\u0338',
nle: '\u2270',
nLeftarrow: '\u21CD',
nleftarrow: '\u219A',
nLeftrightarrow: '\u21CE',
nleftrightarrow: '\u21AE',
nleq: '\u2270',
nleqq: '\u2266\u0338',
nleqslant: '\u2A7D\u0338',
nles: '\u2A7D\u0338',
nless: '\u226E',
nLl: '\u22D8\u0338',
nlsim: '\u2274',
nLt: '\u226A\u20D2',
nlt: '\u226E',
nltri: '\u22EA',
nltrie: '\u22EC',
nLtv: '\u226A\u0338',
nmid: '\u2224',
NoBreak: '\u2060',
NonBreakingSpace: '\u00A0',
Nopf: '\u2115',
nopf: '\uD835\uDD5F',
Not: '\u2AEC',
not: '\u00AC',
NotCongruent: '\u2262',
NotCupCap: '\u226D',
NotDoubleVerticalBar: '\u2226',
NotElement: '\u2209',
NotEqual: '\u2260',
NotEqualTilde: '\u2242\u0338',
NotExists: '\u2204',
NotGreater: '\u226F',
NotGreaterEqual: '\u2271',
NotGreaterFullEqual: '\u2267\u0338',
NotGreaterGreater: '\u226B\u0338',
NotGreaterLess: '\u2279',
NotGreaterSlantEqual: '\u2A7E\u0338',
NotGreaterTilde: '\u2275',
NotHumpDownHump: '\u224E\u0338',
NotHumpEqual: '\u224F\u0338',
notin: '\u2209',
notindot: '\u22F5\u0338',
notinE: '\u22F9\u0338',
notinva: '\u2209',
notinvb: '\u22F7',
notinvc: '\u22F6',
NotLeftTriangle: '\u22EA',
NotLeftTriangleBar: '\u29CF\u0338',
NotLeftTriangleEqual: '\u22EC',
NotLess: '\u226E',
NotLessEqual: '\u2270',
NotLessGreater: '\u2278',
NotLessLess: '\u226A\u0338',
NotLessSlantEqual: '\u2A7D\u0338',
NotLessTilde: '\u2274',
NotNestedGreaterGreater: '\u2AA2\u0338',
NotNestedLessLess: '\u2AA1\u0338',
notni: '\u220C',
notniva: '\u220C',
notnivb: '\u22FE',
notnivc: '\u22FD',
NotPrecedes: '\u2280',
NotPrecedesEqual: '\u2AAF\u0338',
NotPrecedesSlantEqual: '\u22E0',
NotReverseElement: '\u220C',
NotRightTriangle: '\u22EB',
NotRightTriangleBar: '\u29D0\u0338',
NotRightTriangleEqual: '\u22ED',
NotSquareSubset: '\u228F\u0338',
NotSquareSubsetEqual: '\u22E2',
NotSquareSuperset: '\u2290\u0338',
NotSquareSupersetEqual: '\u22E3',
NotSubset: '\u2282\u20D2',
NotSubsetEqual: '\u2288',
NotSucceeds: '\u2281',
NotSucceedsEqual: '\u2AB0\u0338',
NotSucceedsSlantEqual: '\u22E1',
NotSucceedsTilde: '\u227F\u0338',
NotSuperset: '\u2283\u20D2',
NotSupersetEqual: '\u2289',
NotTilde: '\u2241',
NotTildeEqual: '\u2244',
NotTildeFullEqual: '\u2247',
NotTildeTilde: '\u2249',
NotVerticalBar: '\u2224',
npar: '\u2226',
nparallel: '\u2226',
nparsl: '\u2AFD\u20E5',
npart: '\u2202\u0338',
npolint: '\u2A14',
npr: '\u2280',
nprcue: '\u22E0',
npre: '\u2AAF\u0338',
nprec: '\u2280',
npreceq: '\u2AAF\u0338',
nrArr: '\u21CF',
nrarr: '\u219B',
nrarrc: '\u2933\u0338',
nrarrw: '\u219D\u0338',
nRightarrow: '\u21CF',
nrightarrow: '\u219B',
nrtri: '\u22EB',
nrtrie: '\u22ED',
nsc: '\u2281',
nsccue: '\u22E1',
nsce: '\u2AB0\u0338',
Nscr: '\uD835\uDCA9',
nscr: '\uD835\uDCC3',
nshortmid: '\u2224',
nshortparallel: '\u2226',
nsim: '\u2241',
nsime: '\u2244',
nsimeq: '\u2244',
nsmid: '\u2224',
nspar: '\u2226',
nsqsube: '\u22E2',
nsqsupe: '\u22E3',
nsub: '\u2284',
nsubE: '\u2AC5\u0338',
nsube: '\u2288',
nsubset: '\u2282\u20D2',
nsubseteq: '\u2288',
nsubseteqq: '\u2AC5\u0338',
nsucc: '\u2281',
nsucceq: '\u2AB0\u0338',
nsup: '\u2285',
nsupE: '\u2AC6\u0338',
nsupe: '\u2289',
nsupset: '\u2283\u20D2',
nsupseteq: '\u2289',
nsupseteqq: '\u2AC6\u0338',
ntgl: '\u2279',
Ntilde: '\u00D1',
ntilde: '\u00F1',
ntlg: '\u2278',
ntriangleleft: '\u22EA',
ntrianglelefteq: '\u22EC',
ntriangleright: '\u22EB',
ntrianglerighteq: '\u22ED',
Nu: '\u039D',
nu: '\u03BD',
num: '\u0023',
numero: '\u2116',
numsp: '\u2007',
nvap: '\u224D\u20D2',
nVDash: '\u22AF',
nVdash: '\u22AE',
nvDash: '\u22AD',
nvdash: '\u22AC',
nvge: '\u2265\u20D2',
nvgt: '\u003E\u20D2',
nvHarr: '\u2904',
nvinfin: '\u29DE',
nvlArr: '\u2902',
nvle: '\u2264\u20D2',
nvlt: '\u003C\u20D2',
nvltrie: '\u22B4\u20D2',
nvrArr: '\u2903',
nvrtrie: '\u22B5\u20D2',
nvsim: '\u223C\u20D2',
nwarhk: '\u2923',
nwArr: '\u21D6',
nwarr: '\u2196',
nwarrow: '\u2196',
nwnear: '\u2927',
Oacute: '\u00D3',
oacute: '\u00F3',
oast: '\u229B',
ocir: '\u229A',
Ocirc: '\u00D4',
ocirc: '\u00F4',
Ocy: '\u041E',
ocy: '\u043E',
odash: '\u229D',
Odblac: '\u0150',
odblac: '\u0151',
odiv: '\u2A38',
odot: '\u2299',
odsold: '\u29BC',
OElig: '\u0152',
oelig: '\u0153',
ofcir: '\u29BF',
Ofr: '\uD835\uDD12',
ofr: '\uD835\uDD2C',
ogon: '\u02DB',
Ograve: '\u00D2',
ograve: '\u00F2',
ogt: '\u29C1',
ohbar: '\u29B5',
ohm: '\u03A9',
oint: '\u222E',
olarr: '\u21BA',
olcir: '\u29BE',
olcross: '\u29BB',
oline: '\u203E',
olt: '\u29C0',
Omacr: '\u014C',
omacr: '\u014D',
Omega: '\u03A9',
omega: '\u03C9',
Omicron: '\u039F',
omicron: '\u03BF',
omid: '\u29B6',
ominus: '\u2296',
Oopf: '\uD835\uDD46',
oopf: '\uD835\uDD60',
opar: '\u29B7',
OpenCurlyDoubleQuote: '\u201C',
OpenCurlyQuote: '\u2018',
operp: '\u29B9',
oplus: '\u2295',
Or: '\u2A54',
or: '\u2228',
orarr: '\u21BB',
ord: '\u2A5D',
order: '\u2134',
orderof: '\u2134',
ordf: '\u00AA',
ordm: '\u00BA',
origof: '\u22B6',
oror: '\u2A56',
orslope: '\u2A57',
orv: '\u2A5B',
oS: '\u24C8',
Oscr: '\uD835\uDCAA',
oscr: '\u2134',
Oslash: '\u00D8',
oslash: '\u00F8',
osol: '\u2298',
Otilde: '\u00D5',
otilde: '\u00F5',
Otimes: '\u2A37',
otimes: '\u2297',
otimesas: '\u2A36',
Ouml: '\u00D6',
ouml: '\u00F6',
ovbar: '\u233D',
OverBar: '\u203E',
OverBrace: '\u23DE',
OverBracket: '\u23B4',
OverParenthesis: '\u23DC',
par: '\u2225',
para: '\u00B6',
parallel: '\u2225',
parsim: '\u2AF3',
parsl: '\u2AFD',
part: '\u2202',
PartialD: '\u2202',
Pcy: '\u041F',
pcy: '\u043F',
percnt: '\u0025',
period: '\u002E',
permil: '\u2030',
perp: '\u22A5',
pertenk: '\u2031',
Pfr: '\uD835\uDD13',
pfr: '\uD835\uDD2D',
Phi: '\u03A6',
phi: '\u03C6',
phiv: '\u03D5',
phmmat: '\u2133',
phone: '\u260E',
Pi: '\u03A0',
pi: '\u03C0',
pitchfork: '\u22D4',
piv: '\u03D6',
planck: '\u210F',
planckh: '\u210E',
plankv: '\u210F',
plus: '\u002B',
plusacir: '\u2A23',
plusb: '\u229E',
pluscir: '\u2A22',
plusdo: '\u2214',
plusdu: '\u2A25',
pluse: '\u2A72',
PlusMinus: '\u00B1',
plusmn: '\u00B1',
plussim: '\u2A26',
plustwo: '\u2A27',
pm: '\u00B1',
Poincareplane: '\u210C',
pointint: '\u2A15',
Popf: '\u2119',
popf: '\uD835\uDD61',
pound: '\u00A3',
Pr: '\u2ABB',
pr: '\u227A',
prap: '\u2AB7',
prcue: '\u227C',
prE: '\u2AB3',
pre: '\u2AAF',
prec: '\u227A',
precapprox: '\u2AB7',
preccurlyeq: '\u227C',
Precedes: '\u227A',
PrecedesEqual: '\u2AAF',
PrecedesSlantEqual: '\u227C',
PrecedesTilde: '\u227E',
preceq: '\u2AAF',
precnapprox: '\u2AB9',
precneqq: '\u2AB5',
precnsim: '\u22E8',
precsim: '\u227E',
Prime: '\u2033',
prime: '\u2032',
primes: '\u2119',
prnap: '\u2AB9',
prnE: '\u2AB5',
prnsim: '\u22E8',
prod: '\u220F',
Product: '\u220F',
profalar: '\u232E',
profline: '\u2312',
profsurf: '\u2313',
prop: '\u221D',
Proportion: '\u2237',
Proportional: '\u221D',
propto: '\u221D',
prsim: '\u227E',
prurel: '\u22B0',
Pscr: '\uD835\uDCAB',
pscr: '\uD835\uDCC5',
Psi: '\u03A8',
psi: '\u03C8',
puncsp: '\u2008',
Qfr: '\uD835\uDD14',
qfr: '\uD835\uDD2E',
qint: '\u2A0C',
Qopf: '\u211A',
qopf: '\uD835\uDD62',
qprime: '\u2057',
Qscr: '\uD835\uDCAC',
qscr: '\uD835\uDCC6',
quaternions: '\u210D',
quatint: '\u2A16',
quest: '\u003F',
questeq: '\u225F',
QUOT: '\u0022',
quot: '\u0022',
rAarr: '\u21DB',
race: '\u223D\u0331',
Racute: '\u0154',
racute: '\u0155',
radic: '\u221A',
raemptyv: '\u29B3',
Rang: '\u27EB',
rang: '\u27E9',
rangd: '\u2992',
range: '\u29A5',
rangle: '\u27E9',
raquo: '\u00BB',
Rarr: '\u21A0',
rArr: '\u21D2',
rarr: '\u2192',
rarrap: '\u2975',
rarrb: '\u21E5',
rarrbfs: '\u2920',
rarrc: '\u2933',
rarrfs: '\u291E',
rarrhk: '\u21AA',
rarrlp: '\u21AC',
rarrpl: '\u2945',
rarrsim: '\u2974',
Rarrtl: '\u2916',
rarrtl: '\u21A3',
rarrw: '\u219D',
rAtail: '\u291C',
ratail: '\u291A',
ratio: '\u2236',
rationals: '\u211A',
RBarr: '\u2910',
rBarr: '\u290F',
rbarr: '\u290D',
rbbrk: '\u2773',
rbrace: '\u007D',
rbrack: '\u005D',
rbrke: '\u298C',
rbrksld: '\u298E',
rbrkslu: '\u2990',
Rcaron: '\u0158',
rcaron: '\u0159',
Rcedil: '\u0156',
rcedil: '\u0157',
rceil: '\u2309',
rcub: '\u007D',
Rcy: '\u0420',
rcy: '\u0440',
rdca: '\u2937',
rdldhar: '\u2969',
rdquo: '\u201D',
rdquor: '\u201D',
rdsh: '\u21B3',
Re: '\u211C',
real: '\u211C',
realine: '\u211B',
realpart: '\u211C',
reals: '\u211D',
rect: '\u25AD',
REG: '\u00AE',
reg: '\u00AE',
ReverseElement: '\u220B',
ReverseEquilibrium: '\u21CB',
ReverseUpEquilibrium: '\u296F',
rfisht: '\u297D',
rfloor: '\u230B',
Rfr: '\u211C',
rfr: '\uD835\uDD2F',
rHar: '\u2964',
rhard: '\u21C1',
rharu: '\u21C0',
rharul: '\u296C',
Rho: '\u03A1',
rho: '\u03C1',
rhov: '\u03F1',
RightAngleBracket: '\u27E9',
RightArrow: '\u2192',
Rightarrow: '\u21D2',
rightarrow: '\u2192',
RightArrowBar: '\u21E5',
RightArrowLeftArrow: '\u21C4',
rightarrowtail: '\u21A3',
RightCeiling: '\u2309',
RightDoubleBracket: '\u27E7',
RightDownTeeVector: '\u295D',
RightDownVector: '\u21C2',
RightDownVectorBar: '\u2955',
RightFloor: '\u230B',
rightharpoondown: '\u21C1',
rightharpoonup: '\u21C0',
rightleftarrows: '\u21C4',
rightleftharpoons: '\u21CC',
rightrightarrows: '\u21C9',
rightsquigarrow: '\u219D',
RightTee: '\u22A2',
RightTeeArrow: '\u21A6',
RightTeeVector: '\u295B',
rightthreetimes: '\u22CC',
RightTriangle: '\u22B3',
RightTriangleBar: '\u29D0',
RightTriangleEqual: '\u22B5',
RightUpDownVector: '\u294F',
RightUpTeeVector: '\u295C',
RightUpVector: '\u21BE',
RightUpVectorBar: '\u2954',
RightVector: '\u21C0',
RightVectorBar: '\u2953',
ring: '\u02DA',
risingdotseq: '\u2253',
rlarr: '\u21C4',
rlhar: '\u21CC',
rlm: '\u200F',
rmoust: '\u23B1',
rmoustache: '\u23B1',
rnmid: '\u2AEE',
roang: '\u27ED',
roarr: '\u21FE',
robrk: '\u27E7',
ropar: '\u2986',
Ropf: '\u211D',
ropf: '\uD835\uDD63',
roplus: '\u2A2E',
rotimes: '\u2A35',
RoundImplies: '\u2970',
rpar: '\u0029',
rpargt: '\u2994',
rppolint: '\u2A12',
rrarr: '\u21C9',
Rrightarrow: '\u21DB',
rsaquo: '\u203A',
Rscr: '\u211B',
rscr: '\uD835\uDCC7',
Rsh: '\u21B1',
rsh: '\u21B1',
rsqb: '\u005D',
rsquo: '\u2019',
rsquor: '\u2019',
rthree: '\u22CC',
rtimes: '\u22CA',
rtri: '\u25B9',
rtrie: '\u22B5',
rtrif: '\u25B8',
rtriltri: '\u29CE',
RuleDelayed: '\u29F4',
ruluhar: '\u2968',
rx: '\u211E',
Sacute: '\u015A',
sacute: '\u015B',
sbquo: '\u201A',
Sc: '\u2ABC',
sc: '\u227B',
scap: '\u2AB8',
Scaron: '\u0160',
scaron: '\u0161',
sccue: '\u227D',
scE: '\u2AB4',
sce: '\u2AB0',
Scedil: '\u015E',
scedil: '\u015F',
Scirc: '\u015C',
scirc: '\u015D',
scnap: '\u2ABA',
scnE: '\u2AB6',
scnsim: '\u22E9',
scpolint: '\u2A13',
scsim: '\u227F',
Scy: '\u0421',
scy: '\u0441',
sdot: '\u22C5',
sdotb: '\u22A1',
sdote: '\u2A66',
searhk: '\u2925',
seArr: '\u21D8',
searr: '\u2198',
searrow: '\u2198',
sect: '\u00A7',
semi: '\u003B',
seswar: '\u2929',
setminus: '\u2216',
setmn: '\u2216',
sext: '\u2736',
Sfr: '\uD835\uDD16',
sfr: '\uD835\uDD30',
sfrown: '\u2322',
sharp: '\u266F',
SHCHcy: '\u0429',
shchcy: '\u0449',
SHcy: '\u0428',
shcy: '\u0448',
ShortDownArrow: '\u2193',
ShortLeftArrow: '\u2190',
shortmid: '\u2223',
shortparallel: '\u2225',
ShortRightArrow: '\u2192',
ShortUpArrow: '\u2191',
shy: '\u00AD',
Sigma: '\u03A3',
sigma: '\u03C3',
sigmaf: '\u03C2',
sigmav: '\u03C2',
sim: '\u223C',
simdot: '\u2A6A',
sime: '\u2243',
simeq: '\u2243',
simg: '\u2A9E',
simgE: '\u2AA0',
siml: '\u2A9D',
simlE: '\u2A9F',
simne: '\u2246',
simplus: '\u2A24',
simrarr: '\u2972',
slarr: '\u2190',
SmallCircle: '\u2218',
smallsetminus: '\u2216',
smashp: '\u2A33',
smeparsl: '\u29E4',
smid: '\u2223',
smile: '\u2323',
smt: '\u2AAA',
smte: '\u2AAC',
smtes: '\u2AAC\uFE00',
SOFTcy: '\u042C',
softcy: '\u044C',
sol: '\u002F',
solb: '\u29C4',
solbar: '\u233F',
Sopf: '\uD835\uDD4A',
sopf: '\uD835\uDD64',
spades: '\u2660',
spadesuit: '\u2660',
spar: '\u2225',
sqcap: '\u2293',
sqcaps: '\u2293\uFE00',
sqcup: '\u2294',
sqcups: '\u2294\uFE00',
Sqrt: '\u221A',
sqsub: '\u228F',
sqsube: '\u2291',
sqsubset: '\u228F',
sqsubseteq: '\u2291',
sqsup: '\u2290',
sqsupe: '\u2292',
sqsupset: '\u2290',
sqsupseteq: '\u2292',
squ: '\u25A1',
Square: '\u25A1',
square: '\u25A1',
SquareIntersection: '\u2293',
SquareSubset: '\u228F',
SquareSubsetEqual: '\u2291',
SquareSuperset: '\u2290',
SquareSupersetEqual: '\u2292',
SquareUnion: '\u2294',
squarf: '\u25AA',
squf: '\u25AA',
srarr: '\u2192',
Sscr: '\uD835\uDCAE',
sscr: '\uD835\uDCC8',
ssetmn: '\u2216',
ssmile: '\u2323',
sstarf: '\u22C6',
Star: '\u22C6',
star: '\u2606',
starf: '\u2605',
straightepsilon: '\u03F5',
straightphi: '\u03D5',
strns: '\u00AF',
Sub: '\u22D0',
sub: '\u2282',
subdot: '\u2ABD',
subE: '\u2AC5',
sube: '\u2286',
subedot: '\u2AC3',
submult: '\u2AC1',
subnE: '\u2ACB',
subne: '\u228A',
subplus: '\u2ABF',
subrarr: '\u2979',
Subset: '\u22D0',
subset: '\u2282',
subseteq: '\u2286',
subseteqq: '\u2AC5',
SubsetEqual: '\u2286',
subsetneq: '\u228A',
subsetneqq: '\u2ACB',
subsim: '\u2AC7',
subsub: '\u2AD5',
subsup: '\u2AD3',
succ: '\u227B',
succapprox: '\u2AB8',
succcurlyeq: '\u227D',
Succeeds: '\u227B',
SucceedsEqual: '\u2AB0',
SucceedsSlantEqual: '\u227D',
SucceedsTilde: '\u227F',
succeq: '\u2AB0',
succnapprox: '\u2ABA',
succneqq: '\u2AB6',
succnsim: '\u22E9',
succsim: '\u227F',
SuchThat: '\u220B',
Sum: '\u2211',
sum: '\u2211',
sung: '\u266A',
Sup: '\u22D1',
sup: '\u2283',
sup1: '\u00B9',
sup2: '\u00B2',
sup3: '\u00B3',
supdot: '\u2ABE',
supdsub: '\u2AD8',
supE: '\u2AC6',
supe: '\u2287',
supedot: '\u2AC4',
Superset: '\u2283',
SupersetEqual: '\u2287',
suphsol: '\u27C9',
suphsub: '\u2AD7',
suplarr: '\u297B',
supmult: '\u2AC2',
supnE: '\u2ACC',
supne: '\u228B',
supplus: '\u2AC0',
Supset: '\u22D1',
supset: '\u2283',
supseteq: '\u2287',
supseteqq: '\u2AC6',
supsetneq: '\u228B',
supsetneqq: '\u2ACC',
supsim: '\u2AC8',
supsub: '\u2AD4',
supsup: '\u2AD6',
swarhk: '\u2926',
swArr: '\u21D9',
swarr: '\u2199',
swarrow: '\u2199',
swnwar: '\u292A',
szlig: '\u00DF',
Tab: '\u0009',
target: '\u2316',
Tau: '\u03A4',
tau: '\u03C4',
tbrk: '\u23B4',
Tcaron: '\u0164',
tcaron: '\u0165',
Tcedil: '\u0162',
tcedil: '\u0163',
Tcy: '\u0422',
tcy: '\u0442',
tdot: '\u20DB',
telrec: '\u2315',
Tfr: '\uD835\uDD17',
tfr: '\uD835\uDD31',
there4: '\u2234',
Therefore: '\u2234',
therefore: '\u2234',
Theta: '\u0398',
theta: '\u03B8',
thetasym: '\u03D1',
thetav: '\u03D1',
thickapprox: '\u2248',
thicksim: '\u223C',
ThickSpace: '\u205F\u200A',
thinsp: '\u2009',
ThinSpace: '\u2009',
thkap: '\u2248',
thksim: '\u223C',
THORN: '\u00DE',
thorn: '\u00FE',
Tilde: '\u223C',
tilde: '\u02DC',
TildeEqual: '\u2243',
TildeFullEqual: '\u2245',
TildeTilde: '\u2248',
times: '\u00D7',
timesb: '\u22A0',
timesbar: '\u2A31',
timesd: '\u2A30',
tint: '\u222D',
toea: '\u2928',
top: '\u22A4',
topbot: '\u2336',
topcir: '\u2AF1',
Topf: '\uD835\uDD4B',
topf: '\uD835\uDD65',
topfork: '\u2ADA',
tosa: '\u2929',
tprime: '\u2034',
TRADE: '\u2122',
trade: '\u2122',
triangle: '\u25B5',
triangledown: '\u25BF',
triangleleft: '\u25C3',
trianglelefteq: '\u22B4',
triangleq: '\u225C',
triangleright: '\u25B9',
trianglerighteq: '\u22B5',
tridot: '\u25EC',
trie: '\u225C',
triminus: '\u2A3A',
TripleDot: '\u20DB',
triplus: '\u2A39',
trisb: '\u29CD',
tritime: '\u2A3B',
trpezium: '\u23E2',
Tscr: '\uD835\uDCAF',
tscr: '\uD835\uDCC9',
TScy: '\u0426',
tscy: '\u0446',
TSHcy: '\u040B',
tshcy: '\u045B',
Tstrok: '\u0166',
tstrok: '\u0167',
twixt: '\u226C',
twoheadleftarrow: '\u219E',
twoheadrightarrow: '\u21A0',
Uacute: '\u00DA',
uacute: '\u00FA',
Uarr: '\u219F',
uArr: '\u21D1',
uarr: '\u2191',
Uarrocir: '\u2949',
Ubrcy: '\u040E',
ubrcy: '\u045E',
Ubreve: '\u016C',
ubreve: '\u016D',
Ucirc: '\u00DB',
ucirc: '\u00FB',
Ucy: '\u0423',
ucy: '\u0443',
udarr: '\u21C5',
Udblac: '\u0170',
udblac: '\u0171',
udhar: '\u296E',
ufisht: '\u297E',
Ufr: '\uD835\uDD18',
ufr: '\uD835\uDD32',
Ugrave: '\u00D9',
ugrave: '\u00F9',
uHar: '\u2963',
uharl: '\u21BF',
uharr: '\u21BE',
uhblk: '\u2580',
ulcorn: '\u231C',
ulcorner: '\u231C',
ulcrop: '\u230F',
ultri: '\u25F8',
Umacr: '\u016A',
umacr: '\u016B',
uml: '\u00A8',
UnderBar: '\u005F',
UnderBrace: '\u23DF',
UnderBracket: '\u23B5',
UnderParenthesis: '\u23DD',
Union: '\u22C3',
UnionPlus: '\u228E',
Uogon: '\u0172',
uogon: '\u0173',
Uopf: '\uD835\uDD4C',
uopf: '\uD835\uDD66',
UpArrow: '\u2191',
Uparrow: '\u21D1',
uparrow: '\u2191',
UpArrowBar: '\u2912',
UpArrowDownArrow: '\u21C5',
UpDownArrow: '\u2195',
Updownarrow: '\u21D5',
updownarrow: '\u2195',
UpEquilibrium: '\u296E',
upharpoonleft: '\u21BF',
upharpoonright: '\u21BE',
uplus: '\u228E',
UpperLeftArrow: '\u2196',
UpperRightArrow: '\u2197',
Upsi: '\u03D2',
upsi: '\u03C5',
upsih: '\u03D2',
Upsilon: '\u03A5',
upsilon: '\u03C5',
UpTee: '\u22A5',
UpTeeArrow: '\u21A5',
upuparrows: '\u21C8',
urcorn: '\u231D',
urcorner: '\u231D',
urcrop: '\u230E',
Uring: '\u016E',
uring: '\u016F',
urtri: '\u25F9',
Uscr: '\uD835\uDCB0',
uscr: '\uD835\uDCCA',
utdot: '\u22F0',
Utilde: '\u0168',
utilde: '\u0169',
utri: '\u25B5',
utrif: '\u25B4',
uuarr: '\u21C8',
Uuml: '\u00DC',
uuml: '\u00FC',
uwangle: '\u29A7',
vangrt: '\u299C',
varepsilon: '\u03F5',
varkappa: '\u03F0',
varnothing: '\u2205',
varphi: '\u03D5',
varpi: '\u03D6',
varpropto: '\u221D',
vArr: '\u21D5',
varr: '\u2195',
varrho: '\u03F1',
varsigma: '\u03C2',
varsubsetneq: '\u228A\uFE00',
varsubsetneqq: '\u2ACB\uFE00',
varsupsetneq: '\u228B\uFE00',
varsupsetneqq: '\u2ACC\uFE00',
vartheta: '\u03D1',
vartriangleleft: '\u22B2',
vartriangleright: '\u22B3',
Vbar: '\u2AEB',
vBar: '\u2AE8',
vBarv: '\u2AE9',
Vcy: '\u0412',
vcy: '\u0432',
VDash: '\u22AB',
Vdash: '\u22A9',
vDash: '\u22A8',
vdash: '\u22A2',
Vdashl: '\u2AE6',
Vee: '\u22C1',
vee: '\u2228',
veebar: '\u22BB',
veeeq: '\u225A',
vellip: '\u22EE',
Verbar: '\u2016',
verbar: '\u007C',
Vert: '\u2016',
vert: '\u007C',
VerticalBar: '\u2223',
VerticalLine: '\u007C',
VerticalSeparator: '\u2758',
VerticalTilde: '\u2240',
VeryThinSpace: '\u200A',
Vfr: '\uD835\uDD19',
vfr: '\uD835\uDD33',
vltri: '\u22B2',
vnsub: '\u2282\u20D2',
vnsup: '\u2283\u20D2',
Vopf: '\uD835\uDD4D',
vopf: '\uD835\uDD67',
vprop: '\u221D',
vrtri: '\u22B3',
Vscr: '\uD835\uDCB1',
vscr: '\uD835\uDCCB',
vsubnE: '\u2ACB\uFE00',
vsubne: '\u228A\uFE00',
vsupnE: '\u2ACC\uFE00',
vsupne: '\u228B\uFE00',
Vvdash: '\u22AA',
vzigzag: '\u299A',
Wcirc: '\u0174',
wcirc: '\u0175',
wedbar: '\u2A5F',
Wedge: '\u22C0',
wedge: '\u2227',
wedgeq: '\u2259',
weierp: '\u2118',
Wfr: '\uD835\uDD1A',
wfr: '\uD835\uDD34',
Wopf: '\uD835\uDD4E',
wopf: '\uD835\uDD68',
wp: '\u2118',
wr: '\u2240',
wreath: '\u2240',
Wscr: '\uD835\uDCB2',
wscr: '\uD835\uDCCC',
xcap: '\u22C2',
xcirc: '\u25EF',
xcup: '\u22C3',
xdtri: '\u25BD',
Xfr: '\uD835\uDD1B',
xfr: '\uD835\uDD35',
xhArr: '\u27FA',
xharr: '\u27F7',
Xi: '\u039E',
xi: '\u03BE',
xlArr: '\u27F8',
xlarr: '\u27F5',
xmap: '\u27FC',
xnis: '\u22FB',
xodot: '\u2A00',
Xopf: '\uD835\uDD4F',
xopf: '\uD835\uDD69',
xoplus: '\u2A01',
xotime: '\u2A02',
xrArr: '\u27F9',
xrarr: '\u27F6',
Xscr: '\uD835\uDCB3',
xscr: '\uD835\uDCCD',
xsqcup: '\u2A06',
xuplus: '\u2A04',
xutri: '\u25B3',
xvee: '\u22C1',
xwedge: '\u22C0',
Yacute: '\u00DD',
yacute: '\u00FD',
YAcy: '\u042F',
yacy: '\u044F',
Ycirc: '\u0176',
ycirc: '\u0177',
Ycy: '\u042B',
ycy: '\u044B',
yen: '\u00A5',
Yfr: '\uD835\uDD1C',
yfr: '\uD835\uDD36',
YIcy: '\u0407',
yicy: '\u0457',
Yopf: '\uD835\uDD50',
yopf: '\uD835\uDD6A',
Yscr: '\uD835\uDCB4',
yscr: '\uD835\uDCCE',
YUcy: '\u042E',
yucy: '\u044E',
Yuml: '\u0178',
yuml: '\u00FF',
Zacute: '\u0179',
zacute: '\u017A',
Zcaron: '\u017D',
zcaron: '\u017E',
Zcy: '\u0417',
zcy: '\u0437',
Zdot: '\u017B',
zdot: '\u017C',
zeetrf: '\u2128',
ZeroWidthSpace: '\u200B',
Zeta: '\u0396',
zeta: '\u03B6',
Zfr: '\u2128',
zfr: '\uD835\uDD37',
ZHcy: '\u0416',
zhcy: '\u0436',
zigrarr: '\u21DD',
Zopf: '\u2124',
zopf: '\uD835\uDD6B',
Zscr: '\uD835\uDCB5',
zscr: '\uD835\uDCCF',
zwj: '\u200D',
zwnj: '\u200C',
});
/**
* @deprecated
* Use `HTML_ENTITIES` instead.
* @see {@link HTML_ENTITIES}
*/
exports.entityMap = exports.HTML_ENTITIES;
/***/ }),
/***/ 268:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
var _xmldom_xmldom__WEBPACK_IMPORTED_MODULE_0___namespace_cache;
var wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1___namespace_cache;
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Al: () => (/* binding */ document),
/* harmony export */ Gb: () => (/* binding */ xmldom),
/* harmony export */ Oe: () => (/* binding */ xpath)
/* harmony export */ });
/* harmony import */ var _xmldom_xmldom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(546);
/* harmony import */ var wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(999);
const xmldom = /*#__PURE__*/ (_xmldom_xmldom__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (_xmldom_xmldom__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(_xmldom_xmldom__WEBPACK_IMPORTED_MODULE_0__, 2)));
const document = new xmldom.DOMImplementation().createDocument('', '');
const install = (/*#__PURE__*/ (wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __webpack_require__.t(wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1__, 2))) === null || /*#__PURE__*/ (wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1___namespace_cache || (wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1___namespace_cache = __webpack_require__.t(wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1__, 2))) === void 0 ? void 0 : wicked_good_xpath__WEBPACK_IMPORTED_MODULE_1__.install) || window.wgxpath.install;
const Xpath = (function () {
const win = { document: {}, XPathResult: {} };
install(win);
win.document.XPathResult = win.XPathResult;
return win.document;
})();
const xpath = {
currentDocument: document,
evaluate: Xpath.evaluate,
result: Xpath.XPathResult,
createNSResolver: Xpath.createNSResolver
};
//# sourceMappingURL=lib_external.js.map
/***/ }),
/***/ 546:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var conventions = __webpack_require__(870);
exports.assign = conventions.assign;
exports.hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace;
exports.isHTMLMimeType = conventions.isHTMLMimeType;
exports.isValidMimeType = conventions.isValidMimeType;
exports.MIME_TYPE = conventions.MIME_TYPE;
exports.NAMESPACE = conventions.NAMESPACE;
var errors = __webpack_require__(767);
exports.DOMException = errors.DOMException;
exports.DOMExceptionName = errors.DOMExceptionName;
exports.ExceptionCode = errors.ExceptionCode;
exports.ParseError = errors.ParseError;
var dom = __webpack_require__(786);
exports.Attr = dom.Attr;
exports.CDATASection = dom.CDATASection;
exports.CharacterData = dom.CharacterData;
exports.Comment = dom.Comment;
exports.Document = dom.Document;
exports.DocumentFragment = dom.DocumentFragment;
exports.DocumentType = dom.DocumentType;
exports.DOMImplementation = dom.DOMImplementation;
exports.Element = dom.Element;
exports.Entity = dom.Entity;
exports.EntityReference = dom.EntityReference;
exports.LiveNodeList = dom.LiveNodeList;
exports.NamedNodeMap = dom.NamedNodeMap;
exports.Node = dom.Node;
exports.NodeList = dom.NodeList;
exports.Notation = dom.Notation;
exports.ProcessingInstruction = dom.ProcessingInstruction;
exports.Text = dom.Text;
exports.XMLSerializer = dom.XMLSerializer;
var domParser = __webpack_require__(576);
exports.DOMParser = domParser.DOMParser;
exports.normalizeLineEndings = domParser.normalizeLineEndings;
exports.onErrorStopParsing = domParser.onErrorStopParsing;
exports.onWarningStopParsing = domParser.onWarningStopParsing;
/***/ }),
/***/ 576:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var conventions = __webpack_require__(870);
var dom = __webpack_require__(786);
var errors = __webpack_require__(767);
var entities = __webpack_require__(159);
var sax = __webpack_require__(802);
var DOMImplementation = dom.DOMImplementation;
var hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace;
var isHTMLMimeType = conventions.isHTMLMimeType;
var isValidMimeType = conventions.isValidMimeType;
var MIME_TYPE = conventions.MIME_TYPE;
var NAMESPACE = conventions.NAMESPACE;
var ParseError = errors.ParseError;
var XMLReader = sax.XMLReader;
/**
* Normalizes line ending according to ,
* including some Unicode "newline" characters:
*
* > XML parsed entities are often stored in computer files which,
* > for editing convenience, are organized into lines.
* > These lines are typically separated by some combination
* > of the characters CARRIAGE RETURN (#xD) and LINE FEED (#xA).
* >
* > To simplify the tasks of applications, the XML processor must behave
* > as if it normalized all line breaks in external parsed entities (including the document entity)
* > on input, before parsing, by translating the following to a single #xA character:
* >
* > 1. the two-character sequence #xD #xA,
* > 2. the two-character sequence #xD #x85,
* > 3. the single character #x85,
* > 4. the single character #x2028,
* > 5. the single character #x2029,
* > 6. any #xD character that is not immediately followed by #xA or #x85.
*
* @param {string} input
* @returns {string}
* @prettierignore
*/
function normalizeLineEndings(input) {
return input.replace(/\r[\n\u0085]/g, '\n').replace(/[\r\u0085\u2028\u2029]/g, '\n');
}
/**
* @typedef Locator
* @property {number} [columnNumber]
* @property {number} [lineNumber]
*/
/**
* @typedef DOMParserOptions
* @property {typeof assign} [assign]
* The method to use instead of `conventions.assign`, which is used to copy values from
* `options` before they are used for parsing.
* @property {typeof DOMHandler} [domHandler]
* For internal testing: The class for creating an instance for handling events from the SAX
* parser.
* *****Warning: By configuring a faulty implementation, the specified behavior can completely
* be broken.*****.
* @property {Function} [errorHandler]
* DEPRECATED! use `onError` instead.
* @property {function(level:ErrorLevel, message:string, context: DOMHandler):void}
* [onError]
* A function invoked for every error that occurs during parsing.
*
* If it is not provided, all errors are reported to `console.error`
* and only `fatalError`s are thrown as a `ParseError`,
* which prevents any further processing.
* If the provided method throws, a `ParserError` is thrown,
* which prevents any further processing.
*
* Be aware that many `warning`s are considered an error that prevents further processing in
* most implementations.
* @property {boolean} [locator=true]
* Configures if the nodes created during parsing will have a `lineNumber` and a `columnNumber`
* attribute describing their location in the XML string.
* Default is true.
* @property {(string) => string} [normalizeLineEndings]
* used to replace line endings before parsing, defaults to exported `normalizeLineEndings`,
* which normalizes line endings according to ,
* including some Unicode "newline" characters.
* @property {Object} [xmlns]
* The XML namespaces that should be assumed when parsing.
* The default namespace can be provided by the key that is the empty string.
* When the `mimeType` for HTML, XHTML or SVG are passed to `parseFromString`,
* the default namespace that will be used,
* will be overridden according to the specification.
* @see {@link normalizeLineEndings}
*/
/**
* The DOMParser interface provides the ability to parse XML or HTML source code from a string
* into a DOM `Document`.
*
* ***xmldom is different from the spec in that it allows an `options` parameter,
* to control the behavior***.
*
* @class
* @param {DOMParserOptions} [options]
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization
*/
function DOMParser(options) {
options = options || {};
if (options.locator === undefined) {
options.locator = true;
}
/**
* The method to use instead of `conventions.assign`, which is used to copy values from
* `options`
* before they are used for parsing.
*
* @type {conventions.assign}
* @private
* @see {@link conventions.assign}
* @readonly
*/
this.assign = options.assign || conventions.assign;
/**
* For internal testing: The class for creating an instance for handling events from the SAX
* parser.
* *****Warning: By configuring a faulty implementation, the specified behavior can completely
* be broken*****.
*
* @type {typeof DOMHandler}
* @private
* @readonly
*/
this.domHandler = options.domHandler || DOMHandler;
/**
* A function that is invoked for every error that occurs during parsing.
*
* If it is not provided, all errors are reported to `console.error`
* and only `fatalError`s are thrown as a `ParseError`,
* which prevents any further processing.
* If the provided method throws, a `ParserError` is thrown,
* which prevents any further processing.
*
* Be aware that many `warning`s are considered an error that prevents further processing in
* most implementations.
*
* @type {function(level:ErrorLevel, message:string, context: DOMHandler):void}
* @see {@link onErrorStopParsing}
* @see {@link onWarningStopParsing}
*/
this.onError = options.onError || options.errorHandler;
if (options.errorHandler && typeof options.errorHandler !== 'function') {
throw new TypeError('errorHandler object is no longer supported, switch to onError!');
} else if (options.errorHandler) {
options.errorHandler('warning', 'The `errorHandler` option has been deprecated, use `onError` instead!', this);
}
/**
* used to replace line endings before parsing, defaults to `normalizeLineEndings`
*
* @type {(string) => string}
* @readonly
*/
this.normalizeLineEndings = options.normalizeLineEndings || normalizeLineEndings;
/**
* Configures if the nodes created during parsing will have a `lineNumber` and a
* `columnNumber`
* attribute describing their location in the XML string.
* Default is true.
*
* @type {boolean}
* @readonly
*/
this.locator = !!options.locator;
/**
* The default namespace can be provided by the key that is the empty string.
* When the `mimeType` for HTML, XHTML or SVG are passed to `parseFromString`,
* the default namespace that will be used,
* will be overridden according to the specification.
*
* @type {Readonly}
* @readonly
*/
this.xmlns = this.assign(Object.create(null), options.xmlns);
}
/**
* Parses `source` using the options in the way configured by the `DOMParserOptions` of `this`
* `DOMParser`. If `mimeType` is `text/html` an HTML `Document` is created,
* otherwise an XML `Document` is created.
*
* __It behaves different from the description in the living standard__:
* - Uses the `options` passed to the `DOMParser` constructor to modify the behavior.
* - Any unexpected input is reported to `onError` with either a `warning`,
* `error` or `fatalError` level.
* - Any `fatalError` throws a `ParseError` which prevents further processing.
* - Any error thrown by `onError` is converted to a `ParseError` which prevents further
* processing - If no `Document` was created during parsing it is reported as a `fatalError`.
* *****Warning: By configuring a faulty DOMHandler implementation,
* the specified behavior can completely be broken*****.
*
* @param {string} source
* The XML mime type only allows string input!
* @param {string} [mimeType='application/xml']
* the mimeType or contentType of the document to be created determines the `type` of document
* created (XML or HTML)
* @returns {Document}
* The `Document` node.
* @throws {ParseError}
* for any `fatalError` or anything that is thrown by `onError`
* @throws {TypeError}
* for any invalid `mimeType`
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString
* @see https://html.spec.whatwg.org/#dom-domparser-parsefromstring-dev
*/
DOMParser.prototype.parseFromString = function (source, mimeType) {
if (!isValidMimeType(mimeType)) {
throw new TypeError('DOMParser.parseFromString: the provided mimeType "' + mimeType + '" is not valid.');
}
var defaultNSMap = this.assign(Object.create(null), this.xmlns);
var entityMap = entities.XML_ENTITIES;
var defaultNamespace = defaultNSMap[''] || null;
if (hasDefaultHTMLNamespace(mimeType)) {
entityMap = entities.HTML_ENTITIES;
defaultNamespace = NAMESPACE.HTML;
} else if (mimeType === MIME_TYPE.XML_SVG_IMAGE) {
defaultNamespace = NAMESPACE.SVG;
}
defaultNSMap[''] = defaultNamespace;
defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML;
var domBuilder = new this.domHandler({
mimeType: mimeType,
defaultNamespace: defaultNamespace,
onError: this.onError,
});
var locator = this.locator ? {} : undefined;
if (this.locator) {
domBuilder.setDocumentLocator(locator);
}
var sax = new XMLReader();
sax.errorHandler = domBuilder;
sax.domBuilder = domBuilder;
var isXml = !conventions.isHTMLMimeType(mimeType);
if (isXml && typeof source !== 'string') {
sax.errorHandler.fatalError('source is not a string');
}
sax.parse(this.normalizeLineEndings(String(source)), defaultNSMap, entityMap);
if (!domBuilder.doc.documentElement) {
sax.errorHandler.fatalError('missing root element');
}
return domBuilder.doc;
};
/**
* @typedef DOMHandlerOptions
* @property {string} [mimeType=MIME_TYPE.XML_APPLICATION]
* @property {string | null} [defaultNamespace=null]
*/
/**
* The class that is used to handle events from the SAX parser to create the related DOM
* elements.
*
* Some methods are only implemented as an empty function,
* since they are (at least currently) not relevant for xmldom.
*
* @class
* @param {DOMHandlerOptions} [options]
* @see http://www.saxproject.org/apidoc/org/xml/sax/ext/DefaultHandler2.html
*/
function DOMHandler(options) {
var opt = options || {};
/**
* The mime type is used to determine if the DOM handler will create an XML or HTML document.
* Only if it is set to `text/html` it will create an HTML document.
* It defaults to MIME_TYPE.XML_APPLICATION.
*
* @type {string}
* @see {@link MIME_TYPE}
* @readonly
*/
this.mimeType = opt.mimeType || MIME_TYPE.XML_APPLICATION;
/**
* The namespace to use to create an XML document.
* For the following reasons this is required:
* - The SAX API for `startDocument` doesn't offer any way to pass a namespace,
* since at that point there is no way for the parser to know what the default namespace from
* the document will be.
* - When creating using `DOMImplementation.createDocument` it is required to pass a
* namespace,
* to determine the correct `Document.contentType`, which should match `this.mimeType`.
* - When parsing an XML document with the `application/xhtml+xml` mimeType,
* the HTML namespace needs to be the default namespace.
*
* @type {string | null}
* @private
* @readonly
*/
this.defaultNamespace = opt.defaultNamespace || null;
/**
* @type {boolean}
* @private
*/
this.cdata = false;
/**
* The last `Element` that was created by `startElement`.
* `endElement` sets it to the `currentElement.parentNode`.
*
* Note: The sax parser currently sets it to white space text nodes between tags.
*
* @type {Element | Node | undefined}
* @private
*/
this.currentElement = undefined;
/**
* The Document that is created as part of `startDocument`,
* and returned by `DOMParser.parseFromString`.
*
* @type {Document | undefined}
* @readonly
*/
this.doc = undefined;
/**
* The locator is stored as part of setDocumentLocator.
* It is controlled and mutated by the SAX parser to store the current parsing position.
* It is used by DOMHandler to set `columnNumber` and `lineNumber`
* on the DOM nodes.
*
* @type {Readonly | undefined}
* @private
* @readonly (the
* sax parser currently sometimes set's it)
*/
this.locator = undefined;
/**
* @type {function (level:ErrorLevel ,message:string, context:DOMHandler):void}
* @readonly
*/
this.onError = opt.onError;
}
function position(locator, node) {
node.lineNumber = locator.lineNumber;
node.columnNumber = locator.columnNumber;
}
DOMHandler.prototype = {
/**
* Either creates an XML or an HTML document and stores it under `this.doc`.
* If it is an XML document, `this.defaultNamespace` is used to create it,
* and it will not contain any `childNodes`.
* If it is an HTML document, it will be created without any `childNodes`.
*
* @see http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html
*/
startDocument: function () {
var impl = new DOMImplementation();
this.doc = isHTMLMimeType(this.mimeType) ? impl.createHTMLDocument(false) : impl.createDocument(this.defaultNamespace, '');
},
startElement: function (namespaceURI, localName, qName, attrs) {
var doc = this.doc;
var el = doc.createElementNS(namespaceURI, qName || localName);
var len = attrs.length;
appendElement(this, el);
this.currentElement = el;
this.locator && position(this.locator, el);
for (var i = 0; i < len; i++) {
var namespaceURI = attrs.getURI(i);
var value = attrs.getValue(i);
var qName = attrs.getQName(i);
var attr = doc.createAttributeNS(namespaceURI, qName);
this.locator && position(attrs.getLocator(i), attr);
attr.value = attr.nodeValue = value;
el.setAttributeNode(attr);
}
},
endElement: function (namespaceURI, localName, qName) {
this.currentElement = this.currentElement.parentNode;
},
startPrefixMapping: function (prefix, uri) {},
endPrefixMapping: function (prefix) {},
processingInstruction: function (target, data) {
var ins = this.doc.createProcessingInstruction(target, data);
this.locator && position(this.locator, ins);
appendElement(this, ins);
},
ignorableWhitespace: function (ch, start, length) {},
characters: function (chars, start, length) {
chars = _toString.apply(this, arguments);
//console.log(chars)
if (chars) {
if (this.cdata) {
var charNode = this.doc.createCDATASection(chars);
} else {
var charNode = this.doc.createTextNode(chars);
}
if (this.currentElement) {
this.currentElement.appendChild(charNode);
} else if (/^\s*$/.test(chars)) {
this.doc.appendChild(charNode);
//process xml
}
this.locator && position(this.locator, charNode);
}
},
skippedEntity: function (name) {},
endDocument: function () {
this.doc.normalize();
},
/**
* Stores the locator to be able to set the `columnNumber` and `lineNumber`
* on the created DOM nodes.
*
* @param {Locator} locator
*/
setDocumentLocator: function (locator) {
if (locator) {
locator.lineNumber = 0;
}
this.locator = locator;
},
//LexicalHandler
comment: function (chars, start, length) {
chars = _toString.apply(this, arguments);
var comm = this.doc.createComment(chars);
this.locator && position(this.locator, comm);
appendElement(this, comm);
},
startCDATA: function () {
//used in characters() methods
this.cdata = true;
},
endCDATA: function () {
this.cdata = false;
},
startDTD: function (name, publicId, systemId, internalSubset) {
var impl = this.doc.implementation;
if (impl && impl.createDocumentType) {
var dt = impl.createDocumentType(name, publicId, systemId, internalSubset);
this.locator && position(this.locator, dt);
appendElement(this, dt);
this.doc.doctype = dt;
}
},
reportError: function (level, message) {
if (typeof this.onError === 'function') {
try {
this.onError(level, message, this);
} catch (e) {
throw new ParseError('Reporting ' + level + ' "' + message + '" caused ' + e, this.locator);
}
} else {
console.error('[xmldom ' + level + ']\t' + message, _locator(this.locator));
}
},
/**
* @see http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html
*/
warning: function (message) {
this.reportError('warning', message);
},
error: function (message) {
this.reportError('error', message);
},
/**
* This function reports a fatal error and throws a ParseError.
*
* @param {string} message
* - The message to be used for reporting and throwing the error.
* @returns {never}
* This function always throws an error and never returns a value.
* @throws {ParseError}
* Always throws a ParseError with the provided message.
*/
fatalError: function (message) {
this.reportError('fatalError', message);
throw new ParseError(message, this.locator);
},
};
function _locator(l) {
if (l) {
return '\n@#[line:' + l.lineNumber + ',col:' + l.columnNumber + ']';
}
}
function _toString(chars, start, length) {
if (typeof chars == 'string') {
return chars.substr(start, length);
} else {
//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
if (chars.length >= start + length || start) {
return new java.lang.String(chars, start, length) + '';
}
return chars;
}
}
/*
* @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html
* used method of org.xml.sax.ext.LexicalHandler:
* #comment(chars, start, length)
* #startCDATA()
* #endCDATA()
* #startDTD(name, publicId, systemId)
*
*
* IGNORED method of org.xml.sax.ext.LexicalHandler:
* #endDTD()
* #startEntity(name)
* #endEntity(name)
*
*
* @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html
* IGNORED method of org.xml.sax.ext.DeclHandler
* #attributeDecl(eName, aName, type, mode, value)
* #elementDecl(name, model)
* #externalEntityDecl(name, publicId, systemId)
* #internalEntityDecl(name, value)
* @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html
* IGNORED method of org.xml.sax.EntityResolver2
* #resolveEntity(String name,String publicId,String baseURI,String systemId)
* #resolveEntity(publicId, systemId)
* #getExternalSubset(name, baseURI)
* @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html
* IGNORED method of org.xml.sax.DTDHandler
* #notationDecl(name, publicId, systemId) {};
* #unparsedEntityDecl(name, publicId, systemId, notationName) {};
*/
'endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl'.replace(
/\w+/g,
function (key) {
DOMHandler.prototype[key] = function () {
return null;
};
}
);
/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */
function appendElement(handler, node) {
if (!handler.currentElement) {
handler.doc.appendChild(node);
} else {
handler.currentElement.appendChild(node);
}
}
/**
* A method that prevents any further parsing when an `error`
* with level `error` is reported during parsing.
*
* @see {@link DOMParserOptions.onError}
* @see {@link onWarningStopParsing}
*/
function onErrorStopParsing(level) {
if (level === 'error') throw 'onErrorStopParsing';
}
/**
* A method that prevents any further parsing when any `error` is reported during parsing.
*
* @see {@link DOMParserOptions.onError}
* @see {@link onErrorStopParsing}
*/
function onWarningStopParsing() {
throw 'onWarningStopParsing';
}
exports.__DOMHandler = DOMHandler;
exports.DOMParser = DOMParser;
exports.normalizeLineEndings = normalizeLineEndings;
exports.onErrorStopParsing = onErrorStopParsing;
exports.onWarningStopParsing = onWarningStopParsing;
/***/ }),
/***/ 714:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ u: () => (/* binding */ Variables)
/* harmony export */ });
class Variables {
static ensureLocale(loc, def) {
if (!Variables.LOCALES.get(loc)) {
console.error(`Locale ${loc} does not exist! Using` +
` ${Variables.LOCALES.get(def)} instead.`);
return def;
}
return loc;
}
}
Variables.VERSION = '5.0.0-beta.1';
Variables.LOCALES = new Map([
['af', 'Africaans'],
['ca', 'Catalan'],
['da', 'Danish'],
['de', 'German'],
['en', 'English'],
['es', 'Spanish'],
['euro', 'Euro'],
['fr', 'French'],
['hi', 'Hindi'],
['it', 'Italian'],
['ko', 'Korean'],
['nb', 'Bokmål'],
['nn', 'Nynorsk'],
['sv', 'Swedish'],
['nemeth', 'Nemeth']
]);
Variables.mathjaxVersion = '4.0.0';
Variables.url = 'https://cdn.jsdelivr.net/npm/speech-rule-engine@' +
Variables.VERSION +
'/lib/mathmaps';
//# sourceMappingURL=variables.js.map
/***/ }),
/***/ 731:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Detects relevant unicode support for regular expressions in the runtime.
* Should the runtime not accepts the flag `u` or unicode ranges,
* character classes without unicode handling will be used.
*
* @param {typeof RegExp} [RegExpImpl=RegExp]
* For testing: the RegExp class.
* @returns {boolean}
* @see https://node.green/#ES2015-syntax-RegExp--y--and--u--flags
*/
function detectUnicodeSupport(RegExpImpl) {
try {
if (typeof RegExpImpl !== 'function') {
RegExpImpl = RegExp;
}
// eslint-disable-next-line es5/no-unicode-regex,es5/no-unicode-code-point-escape
var match = new RegExpImpl('\u{1d306}', 'u').exec('𝌆');
return !!match && match[0].length === 2;
} catch (error) {}
return false;
}
var UNICODE_SUPPORT = detectUnicodeSupport();
/**
* Removes `[`, `]` and any trailing quantifiers from the source of a RegExp.
*
* @param {RegExp} regexp
*/
function chars(regexp) {
if (regexp.source[0] !== '[') {
throw new Error(regexp + ' can not be used with chars');
}
return regexp.source.slice(1, regexp.source.lastIndexOf(']'));
}
/**
* Creates a new character list regular expression,
* by removing `search` from the source of `regexp`.
*
* @param {RegExp} regexp
* @param {string} search
* The character(s) to remove.
* @returns {RegExp}
*/
function chars_without(regexp, search) {
if (regexp.source[0] !== '[') {
throw new Error('/' + regexp.source + '/ can not be used with chars_without');
}
if (!search || typeof search !== 'string') {
throw new Error(JSON.stringify(search) + ' is not a valid search');
}
if (regexp.source.indexOf(search) === -1) {
throw new Error('"' + search + '" is not is /' + regexp.source + '/');
}
if (search === '-' && regexp.source.indexOf(search) !== 1) {
throw new Error('"' + search + '" is not at the first postion of /' + regexp.source + '/');
}
return new RegExp(regexp.source.replace(search, ''), UNICODE_SUPPORT ? 'u' : '');
}
/**
* Combines and Regular expressions correctly by using `RegExp.source`.
*
* @param {...(RegExp | string)[]} args
* @returns {RegExp}
*/
function reg(args) {
var self = this;
return new RegExp(
Array.prototype.slice
.call(arguments)
.map(function (part) {
var isStr = typeof part === 'string';
if (isStr && self === undefined && part === '|') {
throw new Error('use regg instead of reg to wrap expressions with `|`!');
}
return isStr ? part : part.source;
})
.join(''),
UNICODE_SUPPORT ? 'mu' : 'm'
);
}
/**
* Like `reg` but wraps the expression in `(?:`,`)` to create a non tracking group.
*
* @param {...(RegExp | string)[]} args
* @returns {RegExp}
*/
function regg(args) {
if (arguments.length === 0) {
throw new Error('no parameters provided');
}
return reg.apply(regg, ['(?:'].concat(Array.prototype.slice.call(arguments), [')']));
}
// /**
// * Append ^ to the beginning of the expression.
// * @param {...(RegExp | string)[]} args
// * @returns {RegExp}
// */
// function reg_start(args) {
// if (arguments.length === 0) {
// throw new Error('no parameters provided');
// }
// return reg.apply(reg_start, ['^'].concat(Array.prototype.slice.call(arguments)));
// }
// https://www.w3.org/TR/xml/#document
// `[1] document ::= prolog element Misc*`
// https://www.w3.org/TR/xml11/#NT-document
// `[1] document ::= ( prolog element Misc* ) - ( Char* RestrictedChar Char* )`
/**
* A character usually appearing in wrongly converted strings.
*
* @type {string}
* @see https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character
* @see https://nodejs.dev/en/api/v18/buffer/#buffers-and-character-encodings
* @see https://www.unicode.org/faq/utf_bom.html#BOM
* @readonly
*/
var UNICODE_REPLACEMENT_CHARACTER = '\uFFFD';
// https://www.w3.org/TR/xml/#NT-Char
// any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
// `[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]`
// https://www.w3.org/TR/xml11/#NT-Char
// `[2] Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]`
// https://www.w3.org/TR/xml11/#NT-RestrictedChar
// `[2a] RestrictedChar ::= [#x1-#x8] | [#xB-#xC] | [#xE-#x1F] | [#x7F-#x84] | [#x86-#x9F]`
// https://www.w3.org/TR/xml11/#charsets
var Char = /[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/; // without \u10000-\uEFFFF
if (UNICODE_SUPPORT) {
// eslint-disable-next-line es5/no-unicode-code-point-escape
Char = reg('[', chars(Char), '\\u{10000}-\\u{10FFFF}', ']');
}
var _SChar = /[\x20\x09\x0D\x0A]/;
var SChar_s = chars(_SChar);
// https://www.w3.org/TR/xml11/#NT-S
// `[3] S ::= (#x20 | #x9 | #xD | #xA)+`
var S = reg(_SChar, '+');
// optional whitespace described as `S?` in the grammar,
// simplified to 0-n occurrences of the character class
// instead of 0-1 occurrences of a non-capturing group around S
var S_OPT = reg(_SChar, '*');
// https://www.w3.org/TR/xml11/#NT-NameStartChar
// `[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]`
var NameStartChar =
/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; // without \u10000-\uEFFFF
if (UNICODE_SUPPORT) {
// eslint-disable-next-line es5/no-unicode-code-point-escape
NameStartChar = reg('[', chars(NameStartChar), '\\u{10000}-\\u{10FFFF}', ']');
}
var NameStartChar_s = chars(NameStartChar);
// https://www.w3.org/TR/xml11/#NT-NameChar
// `[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]`
var NameChar = reg('[', NameStartChar_s, chars(/[-.0-9\xB7]/), chars(/[\u0300-\u036F\u203F-\u2040]/), ']');
// https://www.w3.org/TR/xml11/#NT-Name
// `[5] Name ::= NameStartChar (NameChar)*`
var Name = reg(NameStartChar, NameChar, '*');
/*
https://www.w3.org/TR/xml11/#NT-Names
`[6] Names ::= Name (#x20 Name)*`
*/
// https://www.w3.org/TR/xml11/#NT-Nmtoken
// `[7] Nmtoken ::= (NameChar)+`
var Nmtoken = reg(NameChar, '+');
/*
https://www.w3.org/TR/xml11/#NT-Nmtokens
`[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*`
var Nmtokens = reg(Nmtoken, regg(/\x20/, Nmtoken), '*');
*/
// https://www.w3.org/TR/xml11/#NT-EntityRef
// `[68] EntityRef ::= '&' Name ';'` [WFC: Entity Declared] [VC: Entity Declared] [WFC: Parsed Entity] [WFC: No Recursion]
var EntityRef = reg('&', Name, ';');
// https://www.w3.org/TR/xml11/#NT-CharRef
// `[66] CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';'` [WFC: Legal Character]
var CharRef = regg(/[0-9]+;|[0-9a-fA-F]+;/);
/*
https://www.w3.org/TR/xml11/#NT-Reference
- `[67] Reference ::= EntityRef | CharRef`
- `[66] CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';'` [WFC: Legal Character]
- `[68] EntityRef ::= '&' Name ';'` [WFC: Entity Declared] [VC: Entity Declared] [WFC: Parsed Entity] [WFC: No Recursion]
*/
var Reference = regg(EntityRef, '|', CharRef);
// https://www.w3.org/TR/xml11/#NT-PEReference
// `[69] PEReference ::= '%' Name ';'`
// [VC: Entity Declared] [WFC: No Recursion] [WFC: In DTD]
var PEReference = reg('%', Name, ';');
// https://www.w3.org/TR/xml11/#NT-EntityValue
// `[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'"`
var EntityValue = regg(
reg('"', regg(/[^%&"]/, '|', PEReference, '|', Reference), '*', '"'),
'|',
reg("'", regg(/[^%&']/, '|', PEReference, '|', Reference), '*', "'")
);
// https://www.w3.org/TR/xml11/#NT-AttValue
// `[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"`
var AttValue = regg('"', regg(/[^<&"]/, '|', Reference), '*', '"', '|', "'", regg(/[^<&']/, '|', Reference), '*', "'");
// https://www.w3.org/TR/xml-names/#ns-decl
// https://www.w3.org/TR/xml-names/#ns-qualnames
// NameStartChar without ":"
var NCNameStartChar = chars_without(NameStartChar, ':');
// https://www.w3.org/TR/xml-names/#orphans
// `[5] NCNameChar ::= NameChar - ':'`
// An XML NameChar, minus the ":"
var NCNameChar = chars_without(NameChar, ':');
// https://www.w3.org/TR/xml-names/#NT-NCName
// `[4] NCName ::= Name - (Char* ':' Char*)`
// An XML Name, minus the ":"
var NCName = reg(NCNameStartChar, NCNameChar, '*');
/**
https://www.w3.org/TR/xml-names/#ns-qualnames
```
[7] QName ::= PrefixedName | UnprefixedName
=== (NCName ':' NCName) | NCName
=== NCName (':' NCName)?
[8] PrefixedName ::= Prefix ':' LocalPart
=== NCName ':' NCName
[9] UnprefixedName ::= LocalPart
=== NCName
[10] Prefix ::= NCName
[11] LocalPart ::= NCName
```
*/
var QName = reg(NCName, regg(':', NCName), '?');
var QName_exact = reg('^', QName, '$');
var QName_group = reg('(', QName, ')');
// https://www.w3.org/TR/xml11/#NT-SystemLiteral
// `[11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")`
var SystemLiteral = regg(/"[^"]*"|'[^']*'/);
/*
https://www.w3.org/TR/xml11/#NT-PI
```
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
[16] PI ::= '' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
```
target /xml/i is not excluded!
*/
var PI = reg(/^<\?/, '(', Name, ')', regg(S, '(', Char, '*?)'), '?', /\?>/);
// https://www.w3.org/TR/xml11/#NT-PubidChar
// `[13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]`
var PubidChar = /[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/;
// https://www.w3.org/TR/xml11/#NT-PubidLiteral
// `[12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"`
var PubidLiteral = regg('"', PubidChar, '*"', '|', "'", chars_without(PubidChar, "'"), "*'");
// https://www.w3.org/TR/xml11/#NT-CharData
// `[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)`
var COMMENT_START = '';
// https://www.w3.org/TR/xml11/#NT-Comment
// `[15] Comment ::= ''`
var Comment = reg(COMMENT_START, regg(chars_without(Char, '-'), '|', reg('-', chars_without(Char, '-'))), '*', COMMENT_END);
var PCDATA = '#PCDATA';
// https://www.w3.org/TR/xml11/#NT-Mixed
// `[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')'`
// https://www.w3.org/TR/xml-names/#NT-Mixed
// `[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? QName)* S? ')*' | '(' S? '#PCDATA' S? ')'`
// [VC: Proper Group/PE Nesting] [VC: No Duplicate Types]
var Mixed = regg(
reg(/\(/, S_OPT, PCDATA, regg(S_OPT, /\|/, S_OPT, QName), '*', S_OPT, /\)\*/),
'|',
reg(/\(/, S_OPT, PCDATA, S_OPT, /\)/)
);
var _children_quantity = /[?*+]?/;
/*
`[49] choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'` [VC: Proper Group/PE Nesting]
`[50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'` [VC: Proper Group/PE Nesting]
simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting"
var _choice_or_seq = reg('[', NameChar_s, SChar_s, chars(_children_quantity), '()|,]*');
```
[48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?
=== (Name | '(' S? cp ( S? '|' S? cp )+ S? ')' | '(' S? cp ( S? ',' S? cp )* S? ')') ('?' | '*' | '+')?
!== (Name | [_choice_or_seq]*) ('?' | '*' | '+')?
```
simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting"
var cp = reg(regg(Name, '|', _choice_or_seq), _children_quantity);
*/
/*
Inefficient regular expression (High)
This part of the regular expression may cause exponential backtracking on strings starting with '(|' and containing many repetitions of '|'.
https://github.com/xmldom/xmldom/security/code-scanning/91
var choice = regg(/\(/, S_OPT, cp, regg(S_OPT, /\|/, S_OPT, cp), '+', S_OPT, /\)/);
*/
/*
Inefficient regular expression (High)
This part of the regular expression may cause exponential backtracking on strings starting with '(,' and containing many repetitions of ','.
https://github.com/xmldom/xmldom/security/code-scanning/92
var seq = regg(/\(/, S_OPT, cp, regg(S_OPT, /,/, S_OPT, cp), '*', S_OPT, /\)/);
*/
// `[47] children ::= (choice | seq) ('?' | '*' | '+')?`
// simplification to solve circular referencing, but doesn't check validity constraint "Proper Group/PE Nesting"
var children = reg(/\([^>]+\)/, _children_quantity /*regg(choice, '|', seq), _children_quantity*/);
// https://www.w3.org/TR/xml11/#NT-contentspec
// `[46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children`
var contentspec = regg('EMPTY', '|', 'ANY', '|', Mixed, '|', children);
var ELEMENTDECL_START = ''`
// https://www.w3.org/TR/xml-names/#NT-elementdecl
// `[17] elementdecl ::= ''`
// because of https://www.w3.org/TR/xml11/#NT-PEReference
// since xmldom is not supporting replacements of PEReferences in the DTD
// this also supports PEReference in the possible places
var elementdecl = reg(ELEMENTDECL_START, S, regg(QName, '|', PEReference), S, regg(contentspec, '|', PEReference), S_OPT, '>');
// https://www.w3.org/TR/xml11/#NT-NotationType
// `[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'`
// [VC: Notation Attributes] [VC: One Notation Per Element Type] [VC: No Notation on Empty Element] [VC: No Duplicate Tokens]
var NotationType = reg('NOTATION', S, /\(/, S_OPT, Name, regg(S_OPT, /\|/, S_OPT, Name), '*', S_OPT, /\)/);
// https://www.w3.org/TR/xml11/#NT-Enumeration
// `[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'`
// [VC: Enumeration] [VC: No Duplicate Tokens]
var Enumeration = reg(/\(/, S_OPT, Nmtoken, regg(S_OPT, /\|/, S_OPT, Nmtoken), '*', S_OPT, /\)/);
// https://www.w3.org/TR/xml11/#NT-EnumeratedType
// `[57] EnumeratedType ::= NotationType | Enumeration`
var EnumeratedType = regg(NotationType, '|', Enumeration);
/*
```
[55] StringType ::= 'CDATA'
[56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default]
| 'IDREF' [VC: IDREF]
| 'IDREFS' [VC: IDREF]
| 'ENTITY' [VC: Entity Name]
| 'ENTITIES' [VC: Entity Name]
| 'NMTOKEN' [VC: Name Token]
| 'NMTOKENS' [VC: Name Token]
[54] AttType ::= StringType | TokenizedType | EnumeratedType
```*/
var AttType = regg(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/, '|', EnumeratedType);
// `[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)`
// [WFC: No < in Attribute Values] [WFC: No External Entity References]
// [VC: Fixed Attribute Default] [VC: Required Attribute] [VC: Attribute Default Value Syntactically Correct]
var DefaultDecl = regg(/#REQUIRED|#IMPLIED/, '|', regg(regg('#FIXED', S), '?', AttValue));
// https://www.w3.org/TR/xml11/#NT-AttDef
// [53] AttDef ::= S Name S AttType S DefaultDecl
// https://www.w3.org/TR/xml-names/#NT-AttDef
// [1] NSAttName ::= PrefixedAttName | DefaultAttName
// [2] PrefixedAttName ::= 'xmlns:' NCName [NSC: Reserved Prefixes and Namespace Names]
// [3] DefaultAttName ::= 'xmlns'
// [21] AttDef ::= S (QName | NSAttName) S AttType S DefaultDecl
// === S Name S AttType S DefaultDecl
// xmldom is not distinguishing between QName and NSAttName on this level
// to support XML without namespaces in DTD we can not restrict it to QName
var AttDef = regg(S, Name, S, AttType, S, DefaultDecl);
var ATTLIST_DECL_START = ''`
// https://www.w3.org/TR/xml-names/#NT-AttlistDecl
// `[20] AttlistDecl ::= ''`
// to support XML without namespaces in DTD we can not restrict it to QName
var AttlistDecl = reg(ATTLIST_DECL_START, S, Name, AttDef, '*', S_OPT, '>');
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#about:legacy-compat
var ABOUT_LEGACY_COMPAT = 'about:legacy-compat';
var ABOUT_LEGACY_COMPAT_SystemLiteral = regg('"' + ABOUT_LEGACY_COMPAT + '"', '|', "'" + ABOUT_LEGACY_COMPAT + "'");
var SYSTEM = 'SYSTEM';
var PUBLIC = 'PUBLIC';
// https://www.w3.org/TR/xml11/#NT-ExternalID
// `[75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral`
var ExternalID = regg(regg(SYSTEM, S, SystemLiteral), '|', regg(PUBLIC, S, PubidLiteral, S, SystemLiteral));
var ExternalID_match = reg(
'^',
regg(
regg(SYSTEM, S, '(?', SystemLiteral, ')'),
'|',
regg(PUBLIC, S, '(?', PubidLiteral, ')', S, '(?', SystemLiteral, ')')
)
);
// https://www.w3.org/TR/xml11/#NT-NDataDecl
// `[76] NDataDecl ::= S 'NDATA' S Name` [VC: Notation Declared]
var NDataDecl = regg(S, 'NDATA', S, Name);
// https://www.w3.org/TR/xml11/#NT-EntityDef
// `[73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)`
var EntityDef = regg(EntityValue, '|', regg(ExternalID, NDataDecl, '?'));
var ENTITY_DECL_START = ''`
var GEDecl = reg(ENTITY_DECL_START, S, Name, S, EntityDef, S_OPT, '>');
// https://www.w3.org/TR/xml11/#NT-PEDef
// `[74] PEDef ::= EntityValue | ExternalID`
var PEDef = regg(EntityValue, '|', ExternalID);
// https://www.w3.org/TR/xml11/#NT-PEDecl
// `[72] PEDecl ::= ''`
var PEDecl = reg(ENTITY_DECL_START, S, '%', S, Name, S, PEDef, S_OPT, '>');
// https://www.w3.org/TR/xml11/#NT-EntityDecl
// `[70] EntityDecl ::= GEDecl | PEDecl`
var EntityDecl = regg(GEDecl, '|', PEDecl);
// https://www.w3.org/TR/xml11/#NT-PublicID
// `[83] PublicID ::= 'PUBLIC' S PubidLiteral`
var PublicID = reg(PUBLIC, S, PubidLiteral);
// https://www.w3.org/TR/xml11/#NT-NotationDecl
// `[82] NotationDecl ::= ''` [VC: Unique Notation Name]
var NotationDecl = reg('');
// https://www.w3.org/TR/xml11/#NT-Eq
// `[25] Eq ::= S? '=' S?`
var Eq = reg(S_OPT, '=', S_OPT);
// https://www.w3.org/TR/xml/#NT-VersionNum
// `[26] VersionNum ::= '1.' [0-9]+`
// https://www.w3.org/TR/xml11/#NT-VersionNum
// `[26] VersionNum ::= '1.1'`
var VersionNum = /1[.]\d+/;
// https://www.w3.org/TR/xml11/#NT-VersionInfo
// `[24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')`
var VersionInfo = reg(S, 'version', Eq, regg("'", VersionNum, "'", '|', '"', VersionNum, '"'));
// https://www.w3.org/TR/xml11/#NT-EncName
// `[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*`
var EncName = /[A-Za-z][-A-Za-z0-9._]*/;
// https://www.w3.org/TR/xml11/#NT-EncDecl
// `[80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )`
var EncodingDecl = regg(S, 'encoding', Eq, regg('"', EncName, '"', '|', "'", EncName, "'"));
// https://www.w3.org/TR/xml11/#NT-SDDecl
// `[32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))`
var SDDecl = regg(S, 'standalone', Eq, regg("'", regg('yes', '|', 'no'), "'", '|', '"', regg('yes', '|', 'no'), '"'));
// https://www.w3.org/TR/xml11/#NT-XMLDecl
// [23] XMLDecl ::= ''
var XMLDecl = reg(/^<\?xml/, VersionInfo, EncodingDecl, '?', SDDecl, '?', S_OPT, /\?>/);
/*
https://www.w3.org/TR/xml/#NT-markupdecl
https://www.w3.org/TR/xml11/#NT-markupdecl
`[29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment`
var markupdecl = regg(elementdecl, '|', AttlistDecl, '|', EntityDecl, '|', NotationDecl, '|', PI_unsafe, '|', Comment);
*/
/*
https://www.w3.org/TR/xml-names/#NT-doctypedecl
`[28a] DeclSep ::= PEReference | S`
https://www.w3.org/TR/xml11/#NT-intSubset
```
[28b] intSubset ::= (markupdecl | DeclSep)*
=== (markupdecl | PEReference | S)*
```
[WFC: PE Between Declarations]
var intSubset = reg(regg(markupdecl, '|', PEReference, '|', S), '*');
*/
var DOCTYPE_DECL_START = ''`
https://www.afterwardsw3.org/TR/xml-names/#NT-doctypedecl
`[16] doctypedecl ::= ''`
var doctypedecl = reg('');
*/
var CDATA_START = '';
var CDStart = //;
var CData = reg(Char, '*?', CDEnd);
/*
https://www.w3.org/TR/xml/#dt-cdsection
`[18] CDSect ::= CDStart CData CDEnd`
`[19] CDStart ::= '' Char*))`
`[21] CDEnd ::= ']]>'`
*/
var CDSect = reg(CDStart, CData);
// unit tested
exports.chars = chars;
exports.chars_without = chars_without;
exports.detectUnicodeSupport = detectUnicodeSupport;
exports.reg = reg;
exports.regg = regg;
exports.ABOUT_LEGACY_COMPAT = ABOUT_LEGACY_COMPAT;
exports.ABOUT_LEGACY_COMPAT_SystemLiteral = ABOUT_LEGACY_COMPAT_SystemLiteral;
exports.AttlistDecl = AttlistDecl;
exports.CDATA_START = CDATA_START;
exports.CDATA_END = CDATA_END;
exports.CDSect = CDSect;
exports.Char = Char;
exports.Comment = Comment;
exports.COMMENT_START = COMMENT_START;
exports.COMMENT_END = COMMENT_END;
exports.DOCTYPE_DECL_START = DOCTYPE_DECL_START;
exports.elementdecl = elementdecl;
exports.EntityDecl = EntityDecl;
exports.EntityValue = EntityValue;
exports.ExternalID = ExternalID;
exports.ExternalID_match = ExternalID_match;
exports.Name = Name;
exports.NotationDecl = NotationDecl;
exports.Reference = Reference;
exports.PEReference = PEReference;
exports.PI = PI;
exports.PUBLIC = PUBLIC;
exports.PubidLiteral = PubidLiteral;
exports.QName = QName;
exports.QName_exact = QName_exact;
exports.QName_group = QName_group;
exports.S = S;
exports.SChar_s = SChar_s;
exports.S_OPT = S_OPT;
exports.SYSTEM = SYSTEM;
exports.SystemLiteral = SystemLiteral;
exports.UNICODE_REPLACEMENT_CHARACTER = UNICODE_REPLACEMENT_CHARACTER;
exports.UNICODE_SUPPORT = UNICODE_SUPPORT;
exports.XMLDecl = XMLDecl;
/***/ }),
/***/ 767:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var conventions = __webpack_require__(870);
function extendError(constructor, writableName) {
constructor.prototype = Object.create(Error.prototype, {
constructor: { value: constructor },
name: { value: constructor.name, enumerable: true, writable: writableName },
});
}
var DOMExceptionName = conventions.freeze({
/**
* the default value as defined by the spec
*/
Error: 'Error',
/**
* @deprecated
* Use RangeError instead.
*/
IndexSizeError: 'IndexSizeError',
/**
* @deprecated
* Just to match the related static code, not part of the spec.
*/
DomstringSizeError: 'DomstringSizeError',
HierarchyRequestError: 'HierarchyRequestError',
WrongDocumentError: 'WrongDocumentError',
InvalidCharacterError: 'InvalidCharacterError',
/**
* @deprecated
* Just to match the related static code, not part of the spec.
*/
NoDataAllowedError: 'NoDataAllowedError',
NoModificationAllowedError: 'NoModificationAllowedError',
NotFoundError: 'NotFoundError',
NotSupportedError: 'NotSupportedError',
InUseAttributeError: 'InUseAttributeError',
InvalidStateError: 'InvalidStateError',
SyntaxError: 'SyntaxError',
InvalidModificationError: 'InvalidModificationError',
NamespaceError: 'NamespaceError',
/**
* @deprecated
* Use TypeError for invalid arguments,
* "NotSupportedError" DOMException for unsupported operations,
* and "NotAllowedError" DOMException for denied requests instead.
*/
InvalidAccessError: 'InvalidAccessError',
/**
* @deprecated
* Just to match the related static code, not part of the spec.
*/
ValidationError: 'ValidationError',
/**
* @deprecated
* Use TypeError instead.
*/
TypeMismatchError: 'TypeMismatchError',
SecurityError: 'SecurityError',
NetworkError: 'NetworkError',
AbortError: 'AbortError',
/**
* @deprecated
* Just to match the related static code, not part of the spec.
*/
URLMismatchError: 'URLMismatchError',
QuotaExceededError: 'QuotaExceededError',
TimeoutError: 'TimeoutError',
InvalidNodeTypeError: 'InvalidNodeTypeError',
DataCloneError: 'DataCloneError',
EncodingError: 'EncodingError',
NotReadableError: 'NotReadableError',
UnknownError: 'UnknownError',
ConstraintError: 'ConstraintError',
DataError: 'DataError',
TransactionInactiveError: 'TransactionInactiveError',
ReadOnlyError: 'ReadOnlyError',
VersionError: 'VersionError',
OperationError: 'OperationError',
NotAllowedError: 'NotAllowedError',
OptOutError: 'OptOutError',
});
var DOMExceptionNames = Object.keys(DOMExceptionName);
function isValidDomExceptionCode(value) {
return typeof value === 'number' && value >= 1 && value <= 25;
}
function endsWithError(value) {
return typeof value === 'string' && value.substring(value.length - DOMExceptionName.Error.length) === DOMExceptionName.Error;
}
/**
* DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation
* is impossible to perform (either for logical reasons, because data is lost, or because the
* implementation has become unstable). In general, DOM methods return specific error values in
* ordinary processing situations, such as out-of-bound errors when using NodeList.
*
* Implementations should raise other exceptions under other circumstances. For example,
* implementations should raise an implementation-dependent exception if a null argument is
* passed when null was not expected.
*
* This implementation supports the following usages:
* 1. according to the living standard (both arguments are optional):
* ```
* new DOMException("message (can be empty)", DOMExceptionNames.HierarchyRequestError)
* ```
* 2. according to previous xmldom implementation (only the first argument is required):
* ```
* new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "optional message")
* ```
* both result in the proper name being set.
*
* @class DOMException
* @param {number | string} messageOrCode
* The reason why an operation is not acceptable.
* If it is a number, it is used to determine the `name`, see
* {@link https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF ExceptionCode}
* @param {string | keyof typeof DOMExceptionName | Error} [nameOrMessage]
* The `name` to use for the error.
* If `messageOrCode` is a number, this arguments is used as the `message` instead.
* @augments Error
* @see https://webidl.spec.whatwg.org/#idl-DOMException
* @see https://webidl.spec.whatwg.org/#dfn-error-names-table
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-17189187
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
* @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
*/
function DOMException(messageOrCode, nameOrMessage) {
// support old way of passing arguments: first argument is a valid number
if (isValidDomExceptionCode(messageOrCode)) {
this.name = DOMExceptionNames[messageOrCode];
this.message = nameOrMessage || '';
} else {
this.message = messageOrCode;
this.name = endsWithError(nameOrMessage) ? nameOrMessage : DOMExceptionName.Error;
}
if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
}
extendError(DOMException, true);
Object.defineProperties(DOMException.prototype, {
code: {
enumerable: true,
get: function () {
var code = DOMExceptionNames.indexOf(this.name);
if (isValidDomExceptionCode(code)) return code;
return 0;
},
},
});
var ExceptionCode = {
INDEX_SIZE_ERR: 1,
DOMSTRING_SIZE_ERR: 2,
HIERARCHY_REQUEST_ERR: 3,
WRONG_DOCUMENT_ERR: 4,
INVALID_CHARACTER_ERR: 5,
NO_DATA_ALLOWED_ERR: 6,
NO_MODIFICATION_ALLOWED_ERR: 7,
NOT_FOUND_ERR: 8,
NOT_SUPPORTED_ERR: 9,
INUSE_ATTRIBUTE_ERR: 10,
INVALID_STATE_ERR: 11,
SYNTAX_ERR: 12,
INVALID_MODIFICATION_ERR: 13,
NAMESPACE_ERR: 14,
INVALID_ACCESS_ERR: 15,
VALIDATION_ERR: 16,
TYPE_MISMATCH_ERR: 17,
SECURITY_ERR: 18,
NETWORK_ERR: 19,
ABORT_ERR: 20,
URL_MISMATCH_ERR: 21,
QUOTA_EXCEEDED_ERR: 22,
TIMEOUT_ERR: 23,
INVALID_NODE_TYPE_ERR: 24,
DATA_CLONE_ERR: 25,
};
var entries = Object.entries(ExceptionCode);
for (var i = 0; i < entries.length; i++) {
var key = entries[i][0];
DOMException[key] = entries[i][1];
}
/**
* Creates an error that will not be caught by XMLReader aka the SAX parser.
*
* @class
* @param {string} message
* @param {any} [locator]
*/
function ParseError(message, locator) {
this.message = message;
this.locator = locator;
if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError);
}
extendError(ParseError);
exports.DOMException = DOMException;
exports.DOMExceptionName = DOMExceptionName;
exports.ExceptionCode = ExceptionCode;
exports.ParseError = ParseError;
/***/ }),
/***/ 786:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var conventions = __webpack_require__(870);
var find = conventions.find;
var hasDefaultHTMLNamespace = conventions.hasDefaultHTMLNamespace;
var hasOwn = conventions.hasOwn;
var isHTMLMimeType = conventions.isHTMLMimeType;
var isHTMLRawTextElement = conventions.isHTMLRawTextElement;
var isHTMLVoidElement = conventions.isHTMLVoidElement;
var MIME_TYPE = conventions.MIME_TYPE;
var NAMESPACE = conventions.NAMESPACE;
/**
* Private DOM Constructor symbol
*
* Internal symbol used for construction of all classes whose constructors should be private.
* Currently used for checks in `Node`, `Document`, `Element`, `Attr`, `CharacterData`, `Text`, `Comment`,
* `CDATASection`, `DocumentType`, `Notation`, `Entity`, `EntityReference`, `DocumentFragment`, `ProcessingInstruction`
* so the constructor can't be used from outside the module.
*/
var PDC = Symbol();
var errors = __webpack_require__(767);
var DOMException = errors.DOMException;
var DOMExceptionName = errors.DOMExceptionName;
var g = __webpack_require__(731);
/**
* Checks if the given symbol equals the Private DOM Constructor symbol (PDC)
* and throws an Illegal constructor exception when the symbols don't match.
* This ensures that the constructor remains private and can't be used outside this module.
*/
function checkSymbol(symbol) {
if (symbol !== PDC) {
throw new TypeError('Illegal constructor');
}
}
/**
* A prerequisite for `[].filter`, to drop elements that are empty.
*
* @param {string} input
* The string to be checked.
* @returns {boolean}
* Returns `true` if the input string is not empty, `false` otherwise.
*/
function notEmptyString(input) {
return input !== '';
}
/**
* Splits a string on ASCII whitespace characters (U+0009 TAB, U+000A LF, U+000C FF, U+000D CR,
* U+0020 SPACE).
* It follows the definition from the infra specification from WHATWG.
*
* @param {string} input
* The string to be split.
* @returns {string[]}
* An array of the split strings. The array can be empty if the input string is empty or only
* contains whitespace characters.
* @see {@link https://infra.spec.whatwg.org/#split-on-ascii-whitespace}
* @see {@link https://infra.spec.whatwg.org/#ascii-whitespace}
*/
function splitOnASCIIWhitespace(input) {
// U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE
return input ? input.split(/[\t\n\f\r ]+/).filter(notEmptyString) : [];
}
/**
* Adds element as a key to current if it is not already present.
*
* @param {Record} current
* The current record object to which the element will be added as a key.
* The object's keys are string types and values are either boolean or undefined.
* @param {string} element
* The string to be added as a key to the current record.
* @returns {Record}
* The updated record object after the addition of the new element.
*/
function orderedSetReducer(current, element) {
if (!hasOwn(current, element)) {
current[element] = true;
}
return current;
}
/**
* Converts a string into an ordered set by splitting the input on ASCII whitespace and
* ensuring uniqueness of elements.
* This follows the definition of an ordered set from the infra specification by WHATWG.
*
* @param {string} input
* The input string to be transformed into an ordered set.
* @returns {string[]}
* An array of unique strings obtained from the input, preserving the original order.
* The array can be empty if the input string is empty or only contains whitespace characters.
* @see {@link https://infra.spec.whatwg.org/#ordered-set}
*/
function toOrderedSet(input) {
if (!input) return [];
var list = splitOnASCIIWhitespace(input);
return Object.keys(list.reduce(orderedSetReducer, {}));
}
/**
* Uses `list.indexOf` to implement a function that behaves like `Array.prototype.includes`.
* This function is used in environments where `Array.prototype.includes` may not be available.
*
* @param {any[]} list
* The array in which to search for the element.
* @returns {function(any): boolean}
* A function that accepts an element and returns a boolean indicating whether the element is
* included in the provided list.
*/
function arrayIncludes(list) {
return function (element) {
return list && list.indexOf(element) !== -1;
};
}
/**
* Validates a qualified name based on the criteria provided in the DOM specification by
* WHATWG.
*
* @param {string} qualifiedName
* The qualified name to be validated.
* @throws {DOMException}
* With code {@link DOMException.INVALID_CHARACTER_ERR} if the qualified name contains an
* invalid character.
* @see {@link https://dom.spec.whatwg.org/#validate}
*/
function validateQualifiedName(qualifiedName) {
if (!g.QName_exact.test(qualifiedName)) {
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'invalid character in qualified name "' + qualifiedName + '"');
}
}
/**
* Validates a qualified name and the namespace associated with it,
* based on the criteria provided in the DOM specification by WHATWG.
*
* @param {string | null} namespace
* The namespace to be validated. It can be a string or null.
* @param {string} qualifiedName
* The qualified name to be validated.
* @returns {[namespace: string | null, prefix: string | null, localName: string]}
* Returns a tuple with the namespace,
* prefix and local name of the qualified name.
* @throws {DOMException}
* Throws a DOMException if the qualified name or the namespace is not valid.
* @see {@link https://dom.spec.whatwg.org/#validate-and-extract}
*/
function validateAndExtract(namespace, qualifiedName) {
validateQualifiedName(qualifiedName);
namespace = namespace || null;
/**
* @type {string | null}
*/
var prefix = null;
var localName = qualifiedName;
if (qualifiedName.indexOf(':') >= 0) {
var splitResult = qualifiedName.split(':');
prefix = splitResult[0];
localName = splitResult[1];
}
if (prefix !== null && namespace === null) {
throw new DOMException(DOMException.NAMESPACE_ERR, 'prefix is non-null and namespace is null');
}
if (prefix === 'xml' && namespace !== conventions.NAMESPACE.XML) {
throw new DOMException(DOMException.NAMESPACE_ERR, 'prefix is "xml" and namespace is not the XML namespace');
}
if ((prefix === 'xmlns' || qualifiedName === 'xmlns') && namespace !== conventions.NAMESPACE.XMLNS) {
throw new DOMException(
DOMException.NAMESPACE_ERR,
'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace'
);
}
if (namespace === conventions.NAMESPACE.XMLNS && prefix !== 'xmlns' && qualifiedName !== 'xmlns') {
throw new DOMException(
DOMException.NAMESPACE_ERR,
'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"'
);
}
return [namespace, prefix, localName];
}
/**
* Copies properties from one object to another.
* It only copies the object's own (not inherited) properties.
*
* @param {Object} src
* The source object from which properties are copied.
* @param {Object} dest
* The destination object to which properties are copied.
*/
function copy(src, dest) {
for (var p in src) {
if (hasOwn(src, p)) {
dest[p] = src[p];
}
}
}
/**
* Extends a class with the properties and methods of a super class.
* It uses a form of prototypal inheritance, and establishes the `constructor` property
* correctly(?).
*
* It is not clear to the current maintainers if this implementation is making sense,
* since it creates an intermediate prototype function,
* which all properties of `Super` are copied onto using `_copy`.
*
* @param {Object} Class
* The class that is to be extended.
* @param {Object} Super
* The super class from which properties and methods are inherited.
* @private
*/
function _extends(Class, Super) {
var pt = Class.prototype;
if (!(pt instanceof Super)) {
function t() {}
t.prototype = Super.prototype;
t = new t();
copy(pt, t);
Class.prototype = pt = t;
}
if (pt.constructor != Class) {
if (typeof Class != 'function') {
console.error('unknown Class:' + Class);
}
pt.constructor = Class;
}
}
var NodeType = {};
var ELEMENT_NODE = (NodeType.ELEMENT_NODE = 1);
var ATTRIBUTE_NODE = (NodeType.ATTRIBUTE_NODE = 2);
var TEXT_NODE = (NodeType.TEXT_NODE = 3);
var CDATA_SECTION_NODE = (NodeType.CDATA_SECTION_NODE = 4);
var ENTITY_REFERENCE_NODE = (NodeType.ENTITY_REFERENCE_NODE = 5);
var ENTITY_NODE = (NodeType.ENTITY_NODE = 6);
var PROCESSING_INSTRUCTION_NODE = (NodeType.PROCESSING_INSTRUCTION_NODE = 7);
var COMMENT_NODE = (NodeType.COMMENT_NODE = 8);
var DOCUMENT_NODE = (NodeType.DOCUMENT_NODE = 9);
var DOCUMENT_TYPE_NODE = (NodeType.DOCUMENT_TYPE_NODE = 10);
var DOCUMENT_FRAGMENT_NODE = (NodeType.DOCUMENT_FRAGMENT_NODE = 11);
var NOTATION_NODE = (NodeType.NOTATION_NODE = 12);
var DocumentPosition = conventions.freeze({
DOCUMENT_POSITION_DISCONNECTED: 1,
DOCUMENT_POSITION_PRECEDING: 2,
DOCUMENT_POSITION_FOLLOWING: 4,
DOCUMENT_POSITION_CONTAINS: 8,
DOCUMENT_POSITION_CONTAINED_BY: 16,
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32,
});
//helper functions for compareDocumentPosition
/**
* Finds the common ancestor in two parent chains.
*
* @param {Node[]} a
* The first parent chain.
* @param {Node[]} b
* The second parent chain.
* @returns {Node}
* The common ancestor node if it exists. If there is no common ancestor, the function will
* return `null`.
*/
function commonAncestor(a, b) {
if (b.length < a.length) return commonAncestor(b, a);
var c = null;
for (var n in a) {
if (a[n] !== b[n]) return c;
c = a[n];
}
return c;
}
/**
* Assigns a unique identifier to a document to ensure consistency while comparing unrelated
* nodes.
*
* @param {Document} doc
* The document to which a unique identifier is to be assigned.
* @returns {string}
* The unique identifier of the document. If the document already had a unique identifier, the
* function will return the existing one.
*/
function docGUID(doc) {
if (!doc.guid) doc.guid = Math.random();
return doc.guid;
}
//-- end of helper functions
/**
* The NodeList interface provides the abstraction of an ordered collection of nodes,
* without defining or constraining how this collection is implemented.
* NodeList objects in the DOM are live.
* The items in the NodeList are accessible via an integral index, starting from 0.
* You can also access the items of the NodeList with a `for...of` loop.
*
* @class NodeList
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177
* @constructs NodeList
*/
function NodeList() {}
NodeList.prototype = {
/**
* The number of nodes in the list. The range of valid child node indices is 0 to length-1
* inclusive.
*
* @type {number}
*/
length: 0,
/**
* Returns the item at `index`. If index is greater than or equal to the number of nodes in
* the list, this returns null.
*
* @param index
* Unsigned long Index into the collection.
* @returns {Node | null}
* The node at position `index` in the NodeList,
* or null if that is not a valid index.
*/
item: function (index) {
return index >= 0 && index < this.length ? this[index] : null;
},
/**
* Returns a string representation of the NodeList.
*
* @param {unknown} nodeFilter
* __A filter function? Not implemented according to the spec?__.
* @returns {string}
* A string representation of the NodeList.
*/
toString: function (nodeFilter) {
for (var buf = [], i = 0; i < this.length; i++) {
serializeToString(this[i], buf, nodeFilter);
}
return buf.join('');
},
/**
* Filters the NodeList based on a predicate.
*
* @param {function(Node): boolean} predicate
* - A predicate function to filter the NodeList.
* @returns {Node[]}
* An array of nodes that satisfy the predicate.
* @private
*/
filter: function (predicate) {
return Array.prototype.filter.call(this, predicate);
},
/**
* Returns the first index at which a given node can be found in the NodeList, or -1 if it is
* not present.
*
* @param {Node} item
* - The Node item to locate in the NodeList.
* @returns {number}
* The first index of the node in the NodeList; -1 if not found.
* @private
*/
indexOf: function (item) {
return Array.prototype.indexOf.call(this, item);
},
};
NodeList.prototype[Symbol.iterator] = function () {
var me = this;
var index = 0;
return {
next: function () {
if (index < me.length) {
return {
value: me[index++],
done: false,
};
} else {
return {
done: true,
};
}
},
return: function () {
return {
done: true,
};
},
};
};
/**
* Represents a live collection of nodes that is automatically updated when its associated
* document changes.
*
* @class LiveNodeList
* @param {Node} node
* The associated node.
* @param {function} refresh
* The function to refresh the live node list.
* @augments NodeList
* @constructs LiveNodeList
*/
function LiveNodeList(node, refresh) {
this._node = node;
this._refresh = refresh;
_updateLiveList(this);
}
/**
* Updates the live node list.
*
* @param {LiveNodeList} list
* The live node list to update.
* @private
*/
function _updateLiveList(list) {
var inc = list._node._inc || list._node.ownerDocument._inc;
if (list._inc !== inc) {
var ls = list._refresh(list._node);
__set__(list, 'length', ls.length);
if (!list.$$length || ls.length < list.$$length) {
for (var i = ls.length; i in list; i++) {
if (hasOwn(list, i)) {
delete list[i];
}
}
}
copy(ls, list);
list._inc = inc;
}
}
/**
* Returns the node at position `index` in the LiveNodeList, or null if that is not a valid
* index.
*
* @param {number} i
* Index into the collection.
* @returns {Node | null}
* The node at position `index` in the LiveNodeList, or null if that is not a valid index.
*/
LiveNodeList.prototype.item = function (i) {
_updateLiveList(this);
return this[i] || null;
};
_extends(LiveNodeList, NodeList);
/**
* Objects implementing the NamedNodeMap interface are used to represent collections of nodes
* that can be accessed by name.
* Note that NamedNodeMap does not inherit from NodeList;
* NamedNodeMaps are not maintained in any particular order.
* Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal
* index,
* but this is simply to allow convenient enumeration of the contents of a NamedNodeMap,
* and does not imply that the DOM specifies an order to these Nodes.
* NamedNodeMap objects in the DOM are live.
* used for attributes or DocumentType entities
*
* This implementation only supports property indices, but does not support named properties,
* as specified in the living standard.
*
* @class NamedNodeMap
* @see https://dom.spec.whatwg.org/#interface-namednodemap
* @see https://webidl.spec.whatwg.org/#dfn-supported-property-names
* @constructs NamedNodeMap
*/
function NamedNodeMap() {}
/**
* Returns the index of a node within the list.
*
* @param {Array} list
* The list of nodes.
* @param {Node} node
* The node to find.
* @returns {number}
* The index of the node within the list, or -1 if not found.
* @private
*/
function _findNodeIndex(list, node) {
var i = 0;
while (i < list.length) {
if (list[i] === node) {
return i;
}
i++;
}
}
/**
* Adds a new attribute to the list and updates the owner element of the attribute.
*
* @param {Element} el
* The element which will become the owner of the new attribute.
* @param {NamedNodeMap} list
* The list to which the new attribute will be added.
* @param {Attr} newAttr
* The new attribute to be added.
* @param {Attr} oldAttr
* The old attribute to be replaced, or null if no attribute is to be replaced.
* @returns {void}
* @private
*/
function _addNamedNode(el, list, newAttr, oldAttr) {
if (oldAttr) {
list[_findNodeIndex(list, oldAttr)] = newAttr;
} else {
list[list.length] = newAttr;
list.length++;
}
if (el) {
newAttr.ownerElement = el;
var doc = el.ownerDocument;
if (doc) {
oldAttr && _onRemoveAttribute(doc, el, oldAttr);
_onAddAttribute(doc, el, newAttr);
}
}
}
/**
* Removes an attribute from the list and updates the owner element of the attribute.
*
* @param {Element} el
* The element which is the current owner of the attribute.
* @param {NamedNodeMap} list
* The list from which the attribute will be removed.
* @param {Attr} attr
* The attribute to be removed.
* @returns {void}
* @private
*/
function _removeNamedNode(el, list, attr) {
//console.log('remove attr:'+attr)
var i = _findNodeIndex(list, attr);
if (i >= 0) {
var lastIndex = list.length - 1;
while (i <= lastIndex) {
list[i] = list[++i];
}
list.length = lastIndex;
if (el) {
var doc = el.ownerDocument;
if (doc) {
_onRemoveAttribute(doc, el, attr);
}
attr.ownerElement = null;
}
}
}
NamedNodeMap.prototype = {
length: 0,
item: NodeList.prototype.item,
/**
* Get an attribute by name. Note: Name is in lower case in case of HTML namespace and
* document.
*
* @param {string} localName
* The local name of the attribute.
* @returns {Attr | null}
* The attribute with the given local name, or null if no such attribute exists.
* @see https://dom.spec.whatwg.org/#concept-element-attributes-get-by-name
*/
getNamedItem: function (localName) {
if (this._ownerElement && this._ownerElement._isInHTMLDocumentAndNamespace()) {
localName = localName.toLowerCase();
}
var i = 0;
while (i < this.length) {
var attr = this[i];
if (attr.nodeName === localName) {
return attr;
}
i++;
}
return null;
},
/**
* Set an attribute.
*
* @param {Attr} attr
* The attribute to set.
* @returns {Attr | null}
* The old attribute with the same local name and namespace URI as the new one, or null if no
* such attribute exists.
* @throws {DOMException}
* With code:
* - {@link INUSE_ATTRIBUTE_ERR} - If the attribute is already an attribute of another
* element.
* @see https://dom.spec.whatwg.org/#concept-element-attributes-set
*/
setNamedItem: function (attr) {
var el = attr.ownerElement;
if (el && el !== this._ownerElement) {
throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR);
}
var oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName);
if (oldAttr === attr) {
return attr;
}
_addNamedNode(this._ownerElement, this, attr, oldAttr);
return oldAttr;
},
/**
* Set an attribute, replacing an existing attribute with the same local name and namespace
* URI if one exists.
*
* @param {Attr} attr
* The attribute to set.
* @returns {Attr | null}
* The old attribute with the same local name and namespace URI as the new one, or null if no
* such attribute exists.
* @throws {DOMException}
* Throws a DOMException with the name "InUseAttributeError" if the attribute is already an
* attribute of another element.
* @see https://dom.spec.whatwg.org/#concept-element-attributes-set
*/
setNamedItemNS: function (attr) {
return this.setNamedItem(attr);
},
/**
* Removes an attribute specified by the local name.
*
* @param {string} localName
* The local name of the attribute to be removed.
* @returns {Attr}
* The attribute node that was removed.
* @throws {DOMException}
* With code:
* - {@link DOMException.NOT_FOUND_ERR} if no attribute with the given name is found.
* @see https://dom.spec.whatwg.org/#dom-namednodemap-removenameditem
* @see https://dom.spec.whatwg.org/#concept-element-attributes-remove-by-name
*/
removeNamedItem: function (localName) {
var attr = this.getNamedItem(localName);
if (!attr) {
throw new DOMException(DOMException.NOT_FOUND_ERR, localName);
}
_removeNamedNode(this._ownerElement, this, attr);
return attr;
},
/**
* Removes an attribute specified by the namespace and local name.
*
* @param {string | null} namespaceURI
* The namespace URI of the attribute to be removed.
* @param {string} localName
* The local name of the attribute to be removed.
* @returns {Attr}
* The attribute node that was removed.
* @throws {DOMException}
* With code:
* - {@link DOMException.NOT_FOUND_ERR} if no attribute with the given namespace URI and local
* name is found.
* @see https://dom.spec.whatwg.org/#dom-namednodemap-removenameditemns
* @see https://dom.spec.whatwg.org/#concept-element-attributes-remove-by-namespace
*/
removeNamedItemNS: function (namespaceURI, localName) {
var attr = this.getNamedItemNS(namespaceURI, localName);
if (!attr) {
throw new DOMException(DOMException.NOT_FOUND_ERR, namespaceURI ? namespaceURI + ' : ' + localName : localName);
}
_removeNamedNode(this._ownerElement, this, attr);
return attr;
},
/**
* Get an attribute by namespace and local name.
*
* @param {string | null} namespaceURI
* The namespace URI of the attribute.
* @param {string} localName
* The local name of the attribute.
* @returns {Attr | null}
* The attribute with the given namespace URI and local name, or null if no such attribute
* exists.
* @see https://dom.spec.whatwg.org/#concept-element-attributes-get-by-namespace
*/
getNamedItemNS: function (namespaceURI, localName) {
if (!namespaceURI) {
namespaceURI = null;
}
var i = 0;
while (i < this.length) {
var node = this[i];
if (node.localName === localName && node.namespaceURI === namespaceURI) {
return node;
}
i++;
}
return null;
},
};
NamedNodeMap.prototype[Symbol.iterator] = function () {
var me = this;
var index = 0;
return {
next: function () {
if (index < me.length) {
return {
value: me[index++],
done: false,
};
} else {
return {
done: true,
};
}
},
return: function () {
return {
done: true,
};
},
};
};
/**
* The DOMImplementation interface provides a number of methods for performing operations that
* are independent of any particular instance of the document object model.
*
* The DOMImplementation interface represents an object providing methods which are not
* dependent on any particular document.
* Such an object is returned by the `Document.implementation` property.
*
* **The individual methods describe the differences compared to the specs**.
*
* @class DOMImplementation
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN
* @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core
* (Initial)
* @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core
* @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard
* @constructs DOMImplementation
*/
function DOMImplementation() {}
DOMImplementation.prototype = {
/**
* Test if the DOM implementation implements a specific feature and version, as specified in
* {@link https://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMFeatures DOM Features}.
*
* The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given
* feature is supported. The different implementations fairly diverged in what kind of
* features were reported. The latest version of the spec settled to force this method to
* always return true, where the functionality was accurate and in use.
*
* @deprecated
* It is deprecated and modern browsers return true in all cases.
* @function DOMImplementation#hasFeature
* @param {string} feature
* The name of the feature to test.
* @param {string} [version]
* This is the version number of the feature to test.
* @returns {boolean}
* Always returns true.
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN
* @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core
* @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-5CED94D7 DOM Level 3 Core
*/
hasFeature: function (feature, version) {
return true;
},
/**
* Creates a DOM Document object of the specified type with its document element. Note that
* based on the {@link DocumentType}
* given to create the document, the implementation may instantiate specialized
* {@link Document} objects that support additional features than the "Core", such as "HTML"
* {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#DOM2HTML DOM Level 2 HTML}.
* On the other hand, setting the {@link DocumentType} after the document was created makes
* this very unlikely to happen. Alternatively, specialized {@link Document} creation methods,
* such as createHTMLDocument
* {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#DOM2HTML DOM Level 2 HTML},
* can be used to obtain specific types of {@link Document} objects.
*
* __It behaves slightly different from the description in the living standard__:
* - There is no interface/class `XMLDocument`, it returns a `Document`
* instance (with it's `type` set to `'xml'`).
* - `encoding`, `mode`, `origin`, `url` fields are currently not declared.
*
* @function DOMImplementation.createDocument
* @param {string | null} namespaceURI
* The
* {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-namespaceURI namespace URI}
* of the document element to create or null.
* @param {string | null} qualifiedName
* The
* {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-qualifiedname qualified name}
* of the document element to be created or null.
* @param {DocumentType | null} [doctype=null]
* The type of document to be created or null. When doctype is not null, its
* {@link Node#ownerDocument} attribute is set to the document being created. Default is
* `null`
* @returns {Document}
* A new {@link Document} object with its document element. If the NamespaceURI,
* qualifiedName, and doctype are null, the returned {@link Document} is empty with no
* document element.
* @throws {DOMException}
* With code:
*
* - `INVALID_CHARACTER_ERR`: Raised if the specified qualified name is not an XML name
* according to {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#XML XML 1.0}.
* - `NAMESPACE_ERR`: Raised if the qualifiedName is malformed, if the qualifiedName has a
* prefix and the namespaceURI is null, or if the qualifiedName is null and the namespaceURI
* is different from null, or if the qualifiedName has a prefix that is "xml" and the
* namespaceURI is different from "{@link http://www.w3.org/XML/1998/namespace}"
* {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#Namespaces XML Namespaces},
* or if the DOM implementation does not support the "XML" feature but a non-null namespace
* URI was provided, since namespaces were defined by XML.
* - `WRONG_DOCUMENT_ERR`: Raised if doctype has already been used with a different document
* or was created from a different implementation.
* - `NOT_SUPPORTED_ERR`: May be raised if the implementation does not support the feature
* "XML" and the language exposed through the Document does not support XML Namespaces (such
* as {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#HTML40 HTML 4.01}).
* @since DOM Level 2.
* @see {@link #createHTMLDocument}
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Living Standard
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocument DOM
* Level 3 Core
* @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM
* Level 2 Core (initial)
*/
createDocument: function (namespaceURI, qualifiedName, doctype) {
var contentType = MIME_TYPE.XML_APPLICATION;
if (namespaceURI === NAMESPACE.HTML) {
contentType = MIME_TYPE.XML_XHTML_APPLICATION;
} else if (namespaceURI === NAMESPACE.SVG) {
contentType = MIME_TYPE.XML_SVG_IMAGE;
}
var doc = new Document(PDC, { contentType: contentType });
doc.implementation = this;
doc.childNodes = new NodeList();
doc.doctype = doctype || null;
if (doctype) {
doc.appendChild(doctype);
}
if (qualifiedName) {
var root = doc.createElementNS(namespaceURI, qualifiedName);
doc.appendChild(root);
}
return doc;
},
/**
* Creates an empty DocumentType node. Entity declarations and notations are not made
* available. Entity reference expansions and default attribute additions do not occur.
*
* **This behavior is slightly different from the one in the specs**:
* - `encoding`, `mode`, `origin`, `url` fields are currently not declared.
* - `publicId` and `systemId` contain the raw data including any possible quotes,
* so they can always be serialized back to the original value
* - `internalSubset` contains the raw string between `[` and `]` if present,
* but is not parsed or validated in any form.
*
* @function DOMImplementation#createDocumentType
* @param {string} qualifiedName
* The {@link https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-qualifiedname qualified
* name} of the document type to be created.
* @param {string} [publicId]
* The external subset public identifier.
* @param {string} [systemId]
* The external subset system identifier.
* @param {string} [internalSubset]
* the internal subset or an empty string if it is not present
* @returns {DocumentType}
* A new {@link DocumentType} node with {@link Node#ownerDocument} set to null.
* @throws {DOMException}
* With code:
*
* - `INVALID_CHARACTER_ERR`: Raised if the specified qualified name is not an XML name
* according to {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#XML XML 1.0}.
* - `NAMESPACE_ERR`: Raised if the qualifiedName is malformed.
* - `NOT_SUPPORTED_ERR`: May be raised if the implementation does not support the feature
* "XML" and the language exposed through the Document does not support XML Namespaces (such
* as {@link https://www.w3.org/TR/DOM-Level-3-Core/references.html#HTML40 HTML 4.01}).
* @since DOM Level 2.
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType
* MDN
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living
* Standard
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-3-Core-DOM-createDocType DOM
* Level 3 Core
* @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM
* Level 2 Core
* @see https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md#050
* @see https://www.w3.org/TR/DOM-Level-2-Core/#core-ID-Core-DocType-internalSubset
* @prettierignore
*/
createDocumentType: function (qualifiedName, publicId, systemId, internalSubset) {
validateQualifiedName(qualifiedName);
var node = new DocumentType(PDC);
node.name = qualifiedName;
node.nodeName = qualifiedName;
node.publicId = publicId || '';
node.systemId = systemId || '';
node.internalSubset = internalSubset || '';
node.childNodes = new NodeList();
return node;
},
/**
* Returns an HTML document, that might already have a basic DOM structure.
*
* __It behaves slightly different from the description in the living standard__:
* - If the first argument is `false` no initial nodes are added (steps 3-7 in the specs are
* omitted)
* - `encoding`, `mode`, `origin`, `url` fields are currently not declared.
*
* @param {string | false} [title]
* A string containing the title to give the new HTML document.
* @returns {Document}
* The HTML document.
* @since WHATWG Living Standard.
* @see {@link #createDocument}
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument
* @see https://dom.spec.whatwg.org/#html-document
*/
createHTMLDocument: function (title) {
var doc = new Document(PDC, { contentType: MIME_TYPE.HTML });
doc.implementation = this;
doc.childNodes = new NodeList();
if (title !== false) {
doc.doctype = this.createDocumentType('html');
doc.doctype.ownerDocument = doc;
doc.appendChild(doc.doctype);
var htmlNode = doc.createElement('html');
doc.appendChild(htmlNode);
var headNode = doc.createElement('head');
htmlNode.appendChild(headNode);
if (typeof title === 'string') {
var titleNode = doc.createElement('title');
titleNode.appendChild(doc.createTextNode(title));
headNode.appendChild(titleNode);
}
htmlNode.appendChild(doc.createElement('body'));
}
return doc;
},
};
/**
* The DOM Node interface is an abstract base class upon which many other DOM API objects are
* based, thus letting those object types to be used similarly and often interchangeably. As an
* abstract class, there is no such thing as a plain Node object. All objects that implement
* Node functionality are based on one of its subclasses. Most notable are Document, Element,
* and DocumentFragment.
*
* In addition, every kind of DOM node is represented by an interface based on Node. These
* include Attr, CharacterData (which Text, Comment, CDATASection and ProcessingInstruction are
* all based on), and DocumentType.
*
* In some cases, a particular feature of the base Node interface may not apply to one of its
* child interfaces; in that case, the inheriting node may return null or throw an exception,
* depending on circumstances. For example, attempting to add children to a node type that
* cannot have children will throw an exception.
*
* **This behavior is slightly different from the in the specs**:
* - unimplemented interfaces: `EventTarget`
*
* @class
* @abstract
* @param {Symbol} symbol
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
* @see https://dom.spec.whatwg.org/#node
* @prettierignore
*/
function Node(symbol) {
checkSymbol(symbol);
}
Node.prototype = {
/**
* The first child of this node.
*
* @type {Node | null}
*/
firstChild: null,
/**
* The last child of this node.
*
* @type {Node | null}
*/
lastChild: null,
/**
* The previous sibling of this node.
*
* @type {Node | null}
*/
previousSibling: null,
/**
* The next sibling of this node.
*
* @type {Node | null}
*/
nextSibling: null,
/**
* The parent node of this node.
*
* @type {Node | null}
*/
parentNode: null,
/**
* The parent element of this node.
*
* @type {Element | null}
*/
get parentElement() {
return this.parentNode && this.parentNode.nodeType === this.ELEMENT_NODE ? this.parentNode : null;
},
/**
* The child nodes of this node.
*
* @type {NodeList}
*/
childNodes: null,
/**
* The document object associated with this node.
*
* @type {Document | null}
*/
ownerDocument: null,
/**
* The value of this node.
*
* @type {string | null}
*/
nodeValue: null,
/**
* The namespace URI of this node.
*
* @type {string | null}
*/
namespaceURI: null,
/**
* The prefix of the namespace for this node.
*
* @type {string | null}
*/
prefix: null,
/**
* The local part of the qualified name of this node.
*
* @type {string | null}
*/
localName: null,
/**
* The baseURI is currently always `about:blank`,
* since that's what happens when you create a document from scratch.
*
* @type {'about:blank'}
*/
baseURI: 'about:blank',
/**
* Is true if this node is part of a document.
*
* @type {boolean}
*/
get isConnected() {
var rootNode = this.getRootNode();
return rootNode && rootNode.nodeType === rootNode.DOCUMENT_NODE;
},
/**
* Checks whether `other` is an inclusive descendant of this node.
*
* @param {Node | null | undefined} other
* The node to check.
* @returns {boolean}
* True if `other` is an inclusive descendant of this node; false otherwise.
* @see https://dom.spec.whatwg.org/#dom-node-contains
*/
contains: function (other) {
if (!other) return false;
var parent = other;
do {
if (this === parent) return true;
parent = other.parentNode;
} while (parent);
return false;
},
/**
* @typedef GetRootNodeOptions
* @property {boolean} [composed=false]
*/
/**
* Searches for the root node of this node.
*
* **This behavior is slightly different from the in the specs**:
* - ignores `options.composed`, since `ShadowRoot`s are unsupported, always returns root.
*
* @param {GetRootNodeOptions} [options]
* @returns {Node}
* Root node.
* @see https://dom.spec.whatwg.org/#dom-node-getrootnode
* @see https://dom.spec.whatwg.org/#concept-shadow-including-root
*/
getRootNode: function (options) {
var parent = this;
do {
if (!parent.parentNode) {
return parent;
}
parent = parent.parentNode;
} while (parent);
},
/**
* Checks whether the given node is equal to this node.
*
* @param {Node} [otherNode]
* @see https://dom.spec.whatwg.org/#concept-node-equals
*/
isEqualNode: function (otherNode) {
if (!otherNode) return false;
if (this.nodeType !== otherNode.nodeType) return false;
switch (this.nodeType) {
case this.DOCUMENT_TYPE_NODE:
if (this.name !== otherNode.name) return false;
if (this.publicId !== otherNode.publicId) return false;
if (this.systemId !== otherNode.systemId) return false;
break;
case this.ELEMENT_NODE:
if (this.namespaceURI !== otherNode.namespaceURI) return false;
if (this.prefix !== otherNode.prefix) return false;
if (this.localName !== otherNode.localName) return false;
if (this.attributes.length !== otherNode.attributes.length) return false;
for (var i = 0; i < this.attributes.length; i++) {
var attr = this.attributes.item(i);
if (!attr.isEqualNode(otherNode.getAttributeNodeNS(attr.namespaceURI, attr.localName))) {
return false;
}
}
break;
case this.ATTRIBUTE_NODE:
if (this.namespaceURI !== otherNode.namespaceURI) return false;
if (this.localName !== otherNode.localName) return false;
if (this.value !== otherNode.value) return false;
break;
case this.PROCESSING_INSTRUCTION_NODE:
if (this.target !== otherNode.target || this.data !== otherNode.data) {
return false;
}
break;
case this.TEXT_NODE:
case this.COMMENT_NODE:
if (this.data !== otherNode.data) return false;
break;
}
if (this.childNodes.length !== otherNode.childNodes.length) {
return false;
}
for (var i = 0; i < this.childNodes.length; i++) {
if (!this.childNodes[i].isEqualNode(otherNode.childNodes[i])) {
return false;
}
}
return true;
},
/**
* Checks whether or not the given node is this node.
*
* @param {Node} [otherNode]
*/
isSameNode: function (otherNode) {
return this === otherNode;
},
/**
* Inserts a node before a reference node as a child of this node.
*
* @param {Node} newChild
* The new child node to be inserted.
* @param {Node | null} refChild
* The reference node before which newChild will be inserted.
* @returns {Node}
* The new child node successfully inserted.
* @throws {DOMException}
* Throws a DOMException if inserting the node would result in a DOM tree that is not
* well-formed, or if `child` is provided but is not a child of `parent`.
* See {@link _insertBefore} for more details.
* @since Modified in DOM L2
*/
insertBefore: function (newChild, refChild) {
return _insertBefore(this, newChild, refChild);
},
/**
* Replaces an old child node with a new child node within this node.
*
* @param {Node} newChild
* The new node that is to replace the old node.
* If it already exists in the DOM, it is removed from its original position.
* @param {Node} oldChild
* The existing child node to be replaced.
* @returns {Node}
* Returns the replaced child node.
* @throws {DOMException}
* Throws a DOMException if replacing the node would result in a DOM tree that is not
* well-formed, or if `oldChild` is not a child of `this`.
* This can also occur if the pre-replacement validity assertion fails.
* See {@link _insertBefore}, {@link Node.removeChild}, and
* {@link assertPreReplacementValidityInDocument} for more details.
* @see https://dom.spec.whatwg.org/#concept-node-replace
*/
replaceChild: function (newChild, oldChild) {
_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);
if (oldChild) {
this.removeChild(oldChild);
}
},
/**
* Removes an existing child node from this node.
*
* @param {Node} oldChild
* The child node to be removed.
* @returns {Node}
* Returns the removed child node.
* @throws {DOMException}
* Throws a DOMException if `oldChild` is not a child of `this`.
* See {@link _removeChild} for more details.
*/
removeChild: function (oldChild) {
return _removeChild(this, oldChild);
},
/**
* Appends a child node to this node.
*
* @param {Node} newChild
* The child node to be appended to this node.
* If it already exists in the DOM, it is removed from its original position.
* @returns {Node}
* Returns the appended child node.
* @throws {DOMException}
* Throws a DOMException if appending the node would result in a DOM tree that is not
* well-formed, or if `newChild` is not a valid Node.
* See {@link insertBefore} for more details.
*/
appendChild: function (newChild) {
return this.insertBefore(newChild, null);
},
/**
* Determines whether this node has any child nodes.
*
* @returns {boolean}
* Returns true if this node has any child nodes, and false otherwise.
*/
hasChildNodes: function () {
return this.firstChild != null;
},
/**
* Creates a copy of the calling node.
*
* @param {boolean} deep
* If true, the contents of the node are recursively copied.
* If false, only the node itself (and its attributes, if it is an element) are copied.
* @returns {Node}
* Returns the newly created copy of the node.
* @throws {DOMException}
* May throw a DOMException if operations within {@link Element#setAttributeNode} or
* {@link Node#appendChild} (which are potentially invoked in this method) do not meet their
* specific constraints.
* @see {@link cloneNode}
*/
cloneNode: function (deep) {
return cloneNode(this.ownerDocument || this, this, deep);
},
/**
* Puts the specified node and all of its subtree into a "normalized" form. In a normalized
* subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.
*
* Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType`
* is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text
* nodes.
*
* This method operates recursively, so it also normalizes any and all descendent nodes within
* the subtree.
*
* @throws {DOMException}
* May throw a DOMException if operations within removeChild or appendData (which are
* potentially invoked in this method) do not meet their specific constraints.
* @since Modified in DOM Level 2
* @see {@link Node.removeChild}
* @see {@link CharacterData.appendData}
*/
normalize: function () {
var child = this.firstChild;
while (child) {
var next = child.nextSibling;
if (next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE) {
this.removeChild(next);
child.appendData(next.data);
} else {
child.normalize();
child = next;
}
}
},
/**
* Checks whether the DOM implementation implements a specific feature and its version.
*
* @deprecated
* Since `DOMImplementation.hasFeature` is deprecated and always returns true.
* @param {string} feature
* The package name of the feature to test. This is the same name that can be passed to the
* method `hasFeature` on `DOMImplementation`.
* @param {string} version
* This is the version number of the package name to test.
* @returns {boolean}
* Returns true in all cases in the current implementation.
* @since Introduced in DOM Level 2
* @see {@link DOMImplementation.hasFeature}
*/
isSupported: function (feature, version) {
return this.ownerDocument.implementation.hasFeature(feature, version);
},
/**
* Look up the prefix associated to the given namespace URI, starting from this node.
* **The default namespace declarations are ignored by this method.**
* See Namespace Prefix Lookup for details on the algorithm used by this method.
*
* **This behavior is different from the in the specs**:
* - no node type specific handling
* - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes
*
* @param {string | null} namespaceURI
* The namespace URI for which to find the associated prefix.
* @returns {string | null}
* The associated prefix, if found; otherwise, null.
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix
* @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo
* @see https://dom.spec.whatwg.org/#dom-node-lookupprefix
* @see https://github.com/xmldom/xmldom/issues/322
* @prettierignore
*/
lookupPrefix: function (namespaceURI) {
var el = this;
while (el) {
var map = el._nsMap;
//console.dir(map)
if (map) {
for (var n in map) {
if (hasOwn(map, n) && map[n] === namespaceURI) {
return n;
}
}
}
el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;
}
return null;
},
/**
* This function is used to look up the namespace URI associated with the given prefix,
* starting from this node.
*
* **This behavior is different from the in the specs**:
* - no node type specific handling
* - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes
*
* @param {string | null} prefix
* The prefix for which to find the associated namespace URI.
* @returns {string | null}
* The associated namespace URI, if found; otherwise, null.
* @since DOM Level 3
* @see https://dom.spec.whatwg.org/#dom-node-lookupnamespaceuri
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI
* @prettierignore
*/
lookupNamespaceURI: function (prefix) {
var el = this;
while (el) {
var map = el._nsMap;
//console.dir(map)
if (map) {
if (hasOwn(map, prefix)) {
return map[prefix];
}
}
el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode;
}
return null;
},
/**
* Determines whether the given namespace URI is the default namespace.
*
* The function works by looking up the prefix associated with the given namespace URI. If no
* prefix is found (i.e., the namespace URI is not registered in the namespace map of this
* node or any of its ancestors), it returns `true`, implying the namespace URI is considered
* the default.
*
* **This behavior is different from the in the specs**:
* - no node type specific handling
* - uses the internal attribute _nsMap for resolving namespaces that is updated when changing attributes
*
* @param {string | null} namespaceURI
* The namespace URI to be checked.
* @returns {boolean}
* Returns true if the given namespace URI is the default namespace, false otherwise.
* @since DOM Level 3
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace
* @see https://dom.spec.whatwg.org/#dom-node-isdefaultnamespace
* @prettierignore
*/
isDefaultNamespace: function (namespaceURI) {
var prefix = this.lookupPrefix(namespaceURI);
return prefix == null;
},
/**
* Compares the reference node with a node with regard to their position in the document and
* according to the document order.
*
* @param {Node} other
* The node to compare the reference node to.
* @returns {number}
* Returns how the node is positioned relatively to the reference node according to the
* bitmask. 0 if reference node and given node are the same.
* @since DOM Level 3
* @see https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Node3-compare
* @see https://dom.spec.whatwg.org/#dom-node-comparedocumentposition
*/
compareDocumentPosition: function (other) {
if (this === other) return 0;
var node1 = other;
var node2 = this;
var attr1 = null;
var attr2 = null;
if (node1 instanceof Attr) {
attr1 = node1;
node1 = attr1.ownerElement;
}
if (node2 instanceof Attr) {
attr2 = node2;
node2 = attr2.ownerElement;
if (attr1 && node1 && node2 === node1) {
for (var i = 0, attr; (attr = node2.attributes[i]); i++) {
if (attr === attr1)
return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + DocumentPosition.DOCUMENT_POSITION_PRECEDING;
if (attr === attr2)
return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + DocumentPosition.DOCUMENT_POSITION_FOLLOWING;
}
}
}
if (!node1 || !node2 || node2.ownerDocument !== node1.ownerDocument) {
return (
DocumentPosition.DOCUMENT_POSITION_DISCONNECTED +
DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC +
(docGUID(node2.ownerDocument) > docGUID(node1.ownerDocument)
? DocumentPosition.DOCUMENT_POSITION_FOLLOWING
: DocumentPosition.DOCUMENT_POSITION_PRECEDING)
);
}
if (attr2 && node1 === node2) {
return DocumentPosition.DOCUMENT_POSITION_CONTAINS + DocumentPosition.DOCUMENT_POSITION_PRECEDING;
}
if (attr1 && node1 === node2) {
return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY + DocumentPosition.DOCUMENT_POSITION_FOLLOWING;
}
var chain1 = [];
var ancestor1 = node1.parentNode;
while (ancestor1) {
if (!attr2 && ancestor1 === node2) {
return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY + DocumentPosition.DOCUMENT_POSITION_FOLLOWING;
}
chain1.push(ancestor1);
ancestor1 = ancestor1.parentNode;
}
chain1.reverse();
var chain2 = [];
var ancestor2 = node2.parentNode;
while (ancestor2) {
if (!attr1 && ancestor2 === node1) {
return DocumentPosition.DOCUMENT_POSITION_CONTAINS + DocumentPosition.DOCUMENT_POSITION_PRECEDING;
}
chain2.push(ancestor2);
ancestor2 = ancestor2.parentNode;
}
chain2.reverse();
var ca = commonAncestor(chain1, chain2);
for (var n in ca.childNodes) {
var child = ca.childNodes[n];
if (child === node2) return DocumentPosition.DOCUMENT_POSITION_FOLLOWING;
if (child === node1) return DocumentPosition.DOCUMENT_POSITION_PRECEDING;
if (chain2.indexOf(child) >= 0) return DocumentPosition.DOCUMENT_POSITION_FOLLOWING;
if (chain1.indexOf(child) >= 0) return DocumentPosition.DOCUMENT_POSITION_PRECEDING;
}
return 0;
},
};
/**
* Encodes special XML characters to their corresponding entities.
*
* @param {string} c
* The character to be encoded.
* @returns {string}
* The encoded character.
* @private
*/
function _xmlEncoder(c) {
return (
(c == '<' && '<') || (c == '>' && '>') || (c == '&' && '&') || (c == '"' && '"') || '' + c.charCodeAt() + ';'
);
}
copy(NodeType, Node);
copy(NodeType, Node.prototype);
copy(DocumentPosition, Node);
copy(DocumentPosition, Node.prototype);
/**
* @param callback
* Return true for continue,false for break.
* @returns
* boolean true: break visit;
*/
function _visitNode(node, callback) {
if (callback(node)) {
return true;
}
if ((node = node.firstChild)) {
do {
if (_visitNode(node, callback)) {
return true;
}
} while ((node = node.nextSibling));
}
}
/**
* @typedef DocumentOptions
* @property {string} [contentType=MIME_TYPE.XML_APPLICATION]
*/
/**
* The Document interface describes the common properties and methods for any kind of document.
*
* It should usually be created using `new DOMImplementation().createDocument(...)`
* or `new DOMImplementation().createHTMLDocument(...)`.
*
* The constructor is considered a private API and offers to initially set the `contentType`
* property via it's options parameter.
*
* @class
* @param {Symbol} symbol
* @param {DocumentOptions} [options]
* @augments Node
* @private
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document
* @see https://dom.spec.whatwg.org/#interface-document
*/
function Document(symbol, options) {
checkSymbol(symbol);
var opt = options || {};
this.ownerDocument = this;
/**
* The mime type of the document is determined at creation time and can not be modified.
*
* @type {string}
* @see https://dom.spec.whatwg.org/#concept-document-content-type
* @see {@link DOMImplementation}
* @see {@link MIME_TYPE}
* @readonly
*/
this.contentType = opt.contentType || MIME_TYPE.XML_APPLICATION;
/**
* @type {'html' | 'xml'}
* @see https://dom.spec.whatwg.org/#concept-document-type
* @see {@link DOMImplementation}
* @readonly
*/
this.type = isHTMLMimeType(this.contentType) ? 'html' : 'xml';
}
/**
* Updates the namespace mapping of an element when a new attribute is added.
*
* @param {Document} doc
* The document that the element belongs to.
* @param {Element} el
* The element to which the attribute is being added.
* @param {Attr} newAttr
* The new attribute being added.
* @private
*/
function _onAddAttribute(doc, el, newAttr) {
doc && doc._inc++;
var ns = newAttr.namespaceURI;
if (ns === NAMESPACE.XMLNS) {
//update namespace
el._nsMap[newAttr.prefix ? newAttr.localName : ''] = newAttr.value;
}
}
/**
* Updates the namespace mapping of an element when an attribute is removed.
*
* @param {Document} doc
* The document that the element belongs to.
* @param {Element} el
* The element from which the attribute is being removed.
* @param {Attr} newAttr
* The attribute being removed.
* @param {boolean} remove
* Indicates whether the attribute is to be removed.
* @private
*/
function _onRemoveAttribute(doc, el, newAttr, remove) {
doc && doc._inc++;
var ns = newAttr.namespaceURI;
if (ns === NAMESPACE.XMLNS) {
//update namespace
delete el._nsMap[newAttr.prefix ? newAttr.localName : ''];
}
}
/**
* Updates `parent.childNodes`, adjusting the indexed items and its `length`.
* If `newChild` is provided and has no nextSibling, it will be appended.
* Otherwise, it's assumed that an item has been removed or inserted,
* and `parent.firstNode` and its `.nextSibling` to re-indexing all child nodes of `parent`.
*
* @param {Document} doc
* The parent document of `el`.
* @param {Node} parent
* The parent node whose childNodes list needs to be updated.
* @param {Node} [newChild]
* The new child node to be appended. If not provided, the function assumes a node has been
* removed.
* @private
*/
function _onUpdateChild(doc, parent, newChild) {
if (doc && doc._inc) {
doc._inc++;
var childNodes = parent.childNodes;
// assumes nextSibling and previousSibling were already configured upfront
if (newChild && !newChild.nextSibling) {
// if an item has been appended, we only need to update the last index and the length
childNodes[childNodes.length++] = newChild;
} else {
// otherwise we need to reindex all items,
// which can take a while when processing nodes with a lot of children
var child = parent.firstChild;
var i = 0;
while (child) {
childNodes[i++] = child;
child = child.nextSibling;
}
childNodes.length = i;
delete childNodes[childNodes.length];
}
}
}
/**
* Removes the connections between `parentNode` and `child`
* and any existing `child.previousSibling` or `child.nextSibling`.
*
* @param {Node} parentNode
* The parent node from which the child node is to be removed.
* @param {Node} child
* The child node to be removed from the parentNode.
* @returns {Node}
* Returns the child node that was removed.
* @throws {DOMException}
* With code:
* - {@link DOMException.NOT_FOUND_ERR} If the parentNode is not the parent of the child node.
* @private
* @see https://github.com/xmldom/xmldom/issues/135
* @see https://github.com/xmldom/xmldom/issues/145
*/
function _removeChild(parentNode, child) {
if (parentNode !== child.parentNode) {
throw new DOMException(DOMException.NOT_FOUND_ERR, "child's parent is not parent");
}
var oldPreviousSibling = child.previousSibling;
var oldNextSibling = child.nextSibling;
if (oldPreviousSibling) {
oldPreviousSibling.nextSibling = oldNextSibling;
} else {
parentNode.firstChild = oldNextSibling;
}
if (oldNextSibling) {
oldNextSibling.previousSibling = oldPreviousSibling;
} else {
parentNode.lastChild = oldPreviousSibling;
}
_onUpdateChild(parentNode.ownerDocument, parentNode);
child.parentNode = null;
child.previousSibling = null;
child.nextSibling = null;
return child;
}
/**
* Returns `true` if `node` can be a parent for insertion.
*
* @param {Node} node
* @returns {boolean}
*/
function hasValidParentNodeType(node) {
return (
node &&
(node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE)
);
}
/**
* Returns `true` if `node` can be inserted according to it's `nodeType`.
*
* @param {Node} node
* @returns {boolean}
*/
function hasInsertableNodeType(node) {
return (
node &&
(node.nodeType === Node.CDATA_SECTION_NODE ||
node.nodeType === Node.COMMENT_NODE ||
node.nodeType === Node.DOCUMENT_FRAGMENT_NODE ||
node.nodeType === Node.DOCUMENT_TYPE_NODE ||
node.nodeType === Node.ELEMENT_NODE ||
node.nodeType === Node.PROCESSING_INSTRUCTION_NODE ||
node.nodeType === Node.TEXT_NODE)
);
}
/**
* Returns true if `node` is a DOCTYPE node.
*
* @param {Node} node
* @returns {boolean}
*/
function isDocTypeNode(node) {
return node && node.nodeType === Node.DOCUMENT_TYPE_NODE;
}
/**
* Returns true if the node is an element.
*
* @param {Node} node
* @returns {boolean}
*/
function isElementNode(node) {
return node && node.nodeType === Node.ELEMENT_NODE;
}
/**
* Returns true if `node` is a text node.
*
* @param {Node} node
* @returns {boolean}
*/
function isTextNode(node) {
return node && node.nodeType === Node.TEXT_NODE;
}
/**
* Check if en element node can be inserted before `child`, or at the end if child is falsy,
* according to the presence and position of a doctype node on the same level.
*
* @param {Document} doc
* The document node.
* @param {Node} child
* The node that would become the nextSibling if the element would be inserted.
* @returns {boolean}
* `true` if an element can be inserted before child.
* @private
*/
function isElementInsertionPossible(doc, child) {
var parentChildNodes = doc.childNodes || [];
if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {
return false;
}
var docTypeNode = find(parentChildNodes, isDocTypeNode);
return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));
}
/**
* Check if en element node can be inserted before `child`, or at the end if child is falsy,
* according to the presence and position of a doctype node on the same level.
*
* @param {Node} doc
* The document node.
* @param {Node} child
* The node that would become the nextSibling if the element would be inserted.
* @returns {boolean}
* `true` if an element can be inserted before child.
* @private
*/
function isElementReplacementPossible(doc, child) {
var parentChildNodes = doc.childNodes || [];
function hasElementChildThatIsNotChild(node) {
return isElementNode(node) && node !== child;
}
if (find(parentChildNodes, hasElementChildThatIsNotChild)) {
return false;
}
var docTypeNode = find(parentChildNodes, isDocTypeNode);
return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));
}
/**
* Asserts pre-insertion validity of a node into a parent before a child.
* Throws errors for invalid node combinations that would result in an ill-formed DOM.
*
* @param {Node} parent
* The parent node to insert `node` into.
* @param {Node} node
* The node to insert.
* @param {Node | null} child
* The node that should become the `nextSibling` of `node`. If null, no sibling is considered.
* @throws {DOMException}
* With code:
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `parent` is not a Document,
* DocumentFragment, or Element node.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a host-including inclusive
* ancestor of `parent`. (Currently not implemented)
* - {@link DOMException.NOT_FOUND_ERR} If `child` is non-null and its `parent` is not
* `parent`.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is not a DocumentFragment,
* DocumentType, Element, or CharacterData node.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If either `node` is a Text node and `parent` is
* a document, or if `node` is a doctype and `parent` is not a document.
* @private
* @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
* @see https://dom.spec.whatwg.org/#concept-node-replace
*/
function assertPreInsertionValidity1to5(parent, node, child) {
// 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a "HierarchyRequestError" DOMException.
if (!hasValidParentNodeType(parent)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);
}
// 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a "HierarchyRequestError" DOMException.
// not implemented!
// 3. If `child` is non-null and its parent is not `parent`, then throw a "NotFoundError" DOMException.
if (child && child.parentNode !== parent) {
throw new DOMException(DOMException.NOT_FOUND_ERR, 'child not in parent');
}
if (
// 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException.
!hasInsertableNodeType(node) ||
// 5. If either `node` is a Text node and `parent` is a document,
// the sax parser currently adds top level text nodes, this will be fixed in 0.9.0
// || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)
// or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException.
(isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE)
) {
throw new DOMException(
DOMException.HIERARCHY_REQUEST_ERR,
'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType
);
}
}
/**
* Asserts pre-insertion validity of a node into a document before a child.
* Throws errors for invalid node combinations that would result in an ill-formed DOM.
*
* @param {Document} parent
* The parent node to insert `node` into.
* @param {Node} node
* The node to insert.
* @param {Node | undefined} child
* The node that should become the `nextSibling` of `node`. If undefined, no sibling is
* considered.
* @returns {Node}
* @throws {DOMException}
* With code:
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentFragment with more than
* one element child or has a Text node child.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentFragment with one
* element child and either `parent` has an element child, `child` is a doctype, or `child` is
* non-null and a doctype is following `child`.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is an Element and `parent` has an
* element child, `child` is a doctype, or `child` is non-null and a doctype is following
* `child`.
* - {@link DOMException.HIERARCHY_REQUEST_ERR} If `node` is a DocumentType and `parent` has a
* doctype child, `child` is non-null and an element is preceding `child`, or `child` is null
* and `parent` has an element child.
* @private
* @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
* @see https://dom.spec.whatwg.org/#concept-node-replace
*/
function assertPreInsertionValidityInDocument(parent, node, child) {
var parentChildNodes = parent.childNodes || [];
var nodeChildNodes = node.childNodes || [];
// DocumentFragment
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
var nodeChildElements = nodeChildNodes.filter(isElementNode);
// If node has more than one element child or has a Text node child.
if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');
}
// Otherwise, if `node` has one element child and either `parent` has an element child,
// `child` is a doctype, or `child` is non-null and a doctype is following `child`.
if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');
}
}
// Element
if (isElementNode(node)) {
// `parent` has an element child, `child` is a doctype,
// or `child` is non-null and a doctype is following `child`.
if (!isElementInsertionPossible(parent, child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');
}
}
// DocumentType
if (isDocTypeNode(node)) {
// `parent` has a doctype child,
if (find(parentChildNodes, isDocTypeNode)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');
}
var parentElementChild = find(parentChildNodes, isElementNode);
// `child` is non-null and an element is preceding `child`,
if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');
}
// or `child` is null and `parent` has an element child.
if (!child && parentElementChild) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');
}
}
}
/**
* @param {Document} parent
* The parent node to insert `node` into.
* @param {Node} node
* The node to insert.
* @param {Node | undefined} child
* the node that should become the `nextSibling` of `node`
* @returns {Node}
* @throws {DOMException}
* For several node combinations that would create a DOM that is not well-formed.
* @throws {DOMException}
* If `child` is provided but is not a child of `parent`.
* @private
* @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
* @see https://dom.spec.whatwg.org/#concept-node-replace
*/
function assertPreReplacementValidityInDocument(parent, node, child) {
var parentChildNodes = parent.childNodes || [];
var nodeChildNodes = node.childNodes || [];
// DocumentFragment
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
var nodeChildElements = nodeChildNodes.filter(isElementNode);
// If `node` has more than one element child or has a Text node child.
if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');
}
// Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.
if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');
}
}
// Element
if (isElementNode(node)) {
// `parent` has an element child that is not `child` or a doctype is following `child`.
if (!isElementReplacementPossible(parent, child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');
}
}
// DocumentType
if (isDocTypeNode(node)) {
function hasDoctypeChildThatIsNotChild(node) {
return isDocTypeNode(node) && node !== child;
}
// `parent` has a doctype child that is not `child`,
if (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');
}
var parentElementChild = find(parentChildNodes, isElementNode);
// or an element is preceding `child`.
if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');
}
}
}
/**
* Inserts a node into a parent node before a child node.
*
* @param {Node} parent
* The parent node to insert the node into.
* @param {Node} node
* The node to insert into the parent.
* @param {Node | null} child
* The node that should become the next sibling of the node.
* If null, the function inserts the node at the end of the children of the parent node.
* @param {Function} [_inDocumentAssertion]
* An optional function to check pre-insertion validity if parent is a document node.
* Defaults to {@link assertPreInsertionValidityInDocument}
* @returns {Node}
* Returns the inserted node.
* @throws {DOMException}
* Throws a DOMException if inserting the node would result in a DOM tree that is not
* well-formed. See {@link assertPreInsertionValidity1to5},
* {@link assertPreInsertionValidityInDocument}.
* @throws {DOMException}
* Throws a DOMException if child is provided but is not a child of the parent. See
* {@link Node.removeChild}
* @private
* @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
*/
function _insertBefore(parent, node, child, _inDocumentAssertion) {
// To ensure pre-insertion validity of a node into a parent before a child, run these steps:
assertPreInsertionValidity1to5(parent, node, child);
// If parent is a document, and any of the statements below, switched on the interface node implements,
// are true, then throw a "HierarchyRequestError" DOMException.
if (parent.nodeType === Node.DOCUMENT_NODE) {
(_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);
}
var cp = node.parentNode;
if (cp) {
cp.removeChild(node); //remove and update
}
if (node.nodeType === DOCUMENT_FRAGMENT_NODE) {
var newFirst = node.firstChild;
if (newFirst == null) {
return node;
}
var newLast = node.lastChild;
} else {
newFirst = newLast = node;
}
var pre = child ? child.previousSibling : parent.lastChild;
newFirst.previousSibling = pre;
newLast.nextSibling = child;
if (pre) {
pre.nextSibling = newFirst;
} else {
parent.firstChild = newFirst;
}
if (child == null) {
parent.lastChild = newLast;
} else {
child.previousSibling = newLast;
}
do {
newFirst.parentNode = parent;
} while (newFirst !== newLast && (newFirst = newFirst.nextSibling));
_onUpdateChild(parent.ownerDocument || parent, parent, node);
if (node.nodeType == DOCUMENT_FRAGMENT_NODE) {
node.firstChild = node.lastChild = null;
}
return node;
}
Document.prototype = {
/**
* The implementation that created this document.
*
* @type DOMImplementation
* @readonly
*/
implementation: null,
nodeName: '#document',
nodeType: DOCUMENT_NODE,
/**
* The DocumentType node of the document.
*
* @type DocumentType
* @readonly
*/
doctype: null,
documentElement: null,
_inc: 1,
insertBefore: function (newChild, refChild) {
//raises
if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) {
var child = newChild.firstChild;
while (child) {
var next = child.nextSibling;
this.insertBefore(child, refChild);
child = next;
}
return newChild;
}
_insertBefore(this, newChild, refChild);
newChild.ownerDocument = this;
if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {
this.documentElement = newChild;
}
return newChild;
},
removeChild: function (oldChild) {
var removed = _removeChild(this, oldChild);
if (removed === this.documentElement) {
this.documentElement = null;
}
return removed;
},
replaceChild: function (newChild, oldChild) {
//raises
_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);
newChild.ownerDocument = this;
if (oldChild) {
this.removeChild(oldChild);
}
if (isElementNode(newChild)) {
this.documentElement = newChild;
}
},
// Introduced in DOM Level 2:
importNode: function (importedNode, deep) {
return importNode(this, importedNode, deep);
},
// Introduced in DOM Level 2:
getElementById: function (id) {
var rtv = null;
_visitNode(this.documentElement, function (node) {
if (node.nodeType == ELEMENT_NODE) {
if (node.getAttribute('id') == id) {
rtv = node;
return true;
}
}
});
return rtv;
},
/**
* Creates a new `Element` that is owned by this `Document`.
* In HTML Documents `localName` is the lower cased `tagName`,
* otherwise no transformation is being applied.
* When `contentType` implies the HTML namespace, it will be set as `namespaceURI`.
*
* __This implementation differs from the specification:__ - The provided name is not checked
* against the `Name` production,
* so no related error will be thrown.
* - There is no interface `HTMLElement`, it is always an `Element`.
* - There is no support for a second argument to indicate using custom elements.
*
* @param {string} tagName
* @returns {Element}
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
* @see https://dom.spec.whatwg.org/#dom-document-createelement
* @see https://dom.spec.whatwg.org/#concept-create-element
*/
createElement: function (tagName) {
var node = new Element(PDC);
node.ownerDocument = this;
if (this.type === 'html') {
tagName = tagName.toLowerCase();
}
if (hasDefaultHTMLNamespace(this.contentType)) {
node.namespaceURI = NAMESPACE.HTML;
}
node.nodeName = tagName;
node.tagName = tagName;
node.localName = tagName;
node.childNodes = new NodeList();
var attrs = (node.attributes = new NamedNodeMap());
attrs._ownerElement = node;
return node;
},
/**
* @returns {DocumentFragment}
*/
createDocumentFragment: function () {
var node = new DocumentFragment(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
return node;
},
/**
* @param {string} data
* @returns {Text}
*/
createTextNode: function (data) {
var node = new Text(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.appendData(data);
return node;
},
/**
* @param {string} data
* @returns {Comment}
*/
createComment: function (data) {
var node = new Comment(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.appendData(data);
return node;
},
/**
* @param {string} data
* @returns {CDATASection}
*/
createCDATASection: function (data) {
var node = new CDATASection(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.appendData(data);
return node;
},
/**
* @param {string} target
* @param {string} data
* @returns {ProcessingInstruction}
*/
createProcessingInstruction: function (target, data) {
var node = new ProcessingInstruction(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.nodeName = node.target = target;
node.nodeValue = node.data = data;
return node;
},
/**
* Creates an `Attr` node that is owned by this document.
* In HTML Documents `localName` is the lower cased `name`,
* otherwise no transformation is being applied.
*
* __This implementation differs from the specification:__ - The provided name is not checked
* against the `Name` production,
* so no related error will be thrown.
*
* @param {string} name
* @returns {Attr}
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createAttribute
* @see https://dom.spec.whatwg.org/#dom-document-createattribute
*/
createAttribute: function (name) {
if (!g.QName_exact.test(name)) {
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'invalid character in name "' + name + '"');
}
if (this.type === 'html') {
name = name.toLowerCase();
}
return this._createAttribute(name);
},
_createAttribute: function (name) {
var node = new Attr(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.name = name;
node.nodeName = name;
node.localName = name;
node.specified = true;
return node;
},
/**
* Creates an EntityReference object.
* The current implementation does not fill the `childNodes` with those of the corresponding
* `Entity`
*
* @deprecated
* In DOM Level 4.
* @param {string} name
* The name of the entity to reference. No namespace well-formedness checks are performed.
* @returns {EntityReference}
* @throws {DOMException}
* With code `INVALID_CHARACTER_ERR` when `name` is not valid.
* @throws {DOMException}
* with code `NOT_SUPPORTED_ERR` when the document is of type `html`
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE
*/
createEntityReference: function (name) {
if (!g.Name.test(name)) {
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"');
}
if (this.type === 'html') {
throw new DOMException('document is an html document', DOMExceptionName.NotSupportedError);
}
var node = new EntityReference(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.nodeName = name;
return node;
},
// Introduced in DOM Level 2:
/**
* @param {string} namespaceURI
* @param {string} qualifiedName
* @returns {Element}
*/
createElementNS: function (namespaceURI, qualifiedName) {
var validated = validateAndExtract(namespaceURI, qualifiedName);
var node = new Element(PDC);
var attrs = (node.attributes = new NamedNodeMap());
node.childNodes = new NodeList();
node.ownerDocument = this;
node.nodeName = qualifiedName;
node.tagName = qualifiedName;
node.namespaceURI = validated[0];
node.prefix = validated[1];
node.localName = validated[2];
attrs._ownerElement = node;
return node;
},
// Introduced in DOM Level 2:
/**
* @param {string} namespaceURI
* @param {string} qualifiedName
* @returns {Attr}
*/
createAttributeNS: function (namespaceURI, qualifiedName) {
var validated = validateAndExtract(namespaceURI, qualifiedName);
var node = new Attr(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.nodeName = qualifiedName;
node.name = qualifiedName;
node.specified = true;
node.namespaceURI = validated[0];
node.prefix = validated[1];
node.localName = validated[2];
return node;
},
};
_extends(Document, Node);
function Element(symbol) {
checkSymbol(symbol);
this._nsMap = Object.create(null);
}
Element.prototype = {
nodeType: ELEMENT_NODE,
/**
* The attributes of this element.
*
* @type {NamedNodeMap | null}
*/
attributes: null,
getQualifiedName: function () {
return this.prefix ? this.prefix + ':' + this.localName : this.localName;
},
_isInHTMLDocumentAndNamespace: function () {
return this.ownerDocument.type === 'html' && this.namespaceURI === NAMESPACE.HTML;
},
/**
* Implementaton of Level2 Core function hasAttributes.
*
* @returns {boolean}
* True if attribute list is not empty.
* @see https://www.w3.org/TR/DOM-Level-2-Core/#core-ID-NodeHasAttrs
*/
hasAttributes: function () {
return !!(this.attributes && this.attributes.length);
},
hasAttribute: function (name) {
return !!this.getAttributeNode(name);
},
/**
* Returns element’s first attribute whose qualified name is `name`, and `null`
* if there is no such attribute.
*
* @param {string} name
* @returns {string | null}
*/
getAttribute: function (name) {
var attr = this.getAttributeNode(name);
return attr ? attr.value : null;
},
getAttributeNode: function (name) {
if (this._isInHTMLDocumentAndNamespace()) {
name = name.toLowerCase();
}
return this.attributes.getNamedItem(name);
},
/**
* Sets the value of element’s first attribute whose qualified name is qualifiedName to value.
*
* @param {string} name
* @param {string} value
*/
setAttribute: function (name, value) {
if (this._isInHTMLDocumentAndNamespace()) {
name = name.toLowerCase();
}
var attr = this.getAttributeNode(name);
if (attr) {
attr.value = attr.nodeValue = '' + value;
} else {
attr = this.ownerDocument._createAttribute(name);
attr.value = attr.nodeValue = '' + value;
this.setAttributeNode(attr);
}
},
removeAttribute: function (name) {
var attr = this.getAttributeNode(name);
attr && this.removeAttributeNode(attr);
},
setAttributeNode: function (newAttr) {
return this.attributes.setNamedItem(newAttr);
},
setAttributeNodeNS: function (newAttr) {
return this.attributes.setNamedItemNS(newAttr);
},
removeAttributeNode: function (oldAttr) {
//console.log(this == oldAttr.ownerElement)
return this.attributes.removeNamedItem(oldAttr.nodeName);
},
//get real attribute name,and remove it by removeAttributeNode
removeAttributeNS: function (namespaceURI, localName) {
var old = this.getAttributeNodeNS(namespaceURI, localName);
old && this.removeAttributeNode(old);
},
hasAttributeNS: function (namespaceURI, localName) {
return this.getAttributeNodeNS(namespaceURI, localName) != null;
},
/**
* Returns element’s attribute whose namespace is `namespaceURI` and local name is
* `localName`,
* or `null` if there is no such attribute.
*
* @param {string} namespaceURI
* @param {string} localName
* @returns {string | null}
*/
getAttributeNS: function (namespaceURI, localName) {
var attr = this.getAttributeNodeNS(namespaceURI, localName);
return attr ? attr.value : null;
},
/**
* Sets the value of element’s attribute whose namespace is `namespaceURI` and local name is
* `localName` to value.
*
* @param {string} namespaceURI
* @param {string} qualifiedName
* @param {string} value
* @see https://dom.spec.whatwg.org/#dom-element-setattributens
*/
setAttributeNS: function (namespaceURI, qualifiedName, value) {
var validated = validateAndExtract(namespaceURI, qualifiedName);
var localName = validated[2];
var attr = this.getAttributeNodeNS(namespaceURI, localName);
if (attr) {
attr.value = attr.nodeValue = '' + value;
} else {
attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
attr.value = attr.nodeValue = '' + value;
this.setAttributeNode(attr);
}
},
getAttributeNodeNS: function (namespaceURI, localName) {
return this.attributes.getNamedItemNS(namespaceURI, localName);
},
/**
* Returns a LiveNodeList of all child elements which have **all** of the given class name(s).
*
* Returns an empty list if `classNames` is an empty string or only contains HTML white space
* characters.
*
* Warning: This returns a live LiveNodeList.
* Changes in the DOM will reflect in the array as the changes occur.
* If an element selected by this array no longer qualifies for the selector,
* it will automatically be removed. Be aware of this for iteration purposes.
*
* @param {string} classNames
* Is a string representing the class name(s) to match; multiple class names are separated by
* (ASCII-)whitespace.
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByClassName
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
* @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname
*/
getElementsByClassName: function (classNames) {
var classNamesSet = toOrderedSet(classNames);
return new LiveNodeList(this, function (base) {
var ls = [];
if (classNamesSet.length > 0) {
_visitNode(base, function (node) {
if (node !== base && node.nodeType === ELEMENT_NODE) {
var nodeClassNames = node.getAttribute('class');
// can be null if the attribute does not exist
if (nodeClassNames) {
// before splitting and iterating just compare them for the most common case
var matches = classNames === nodeClassNames;
if (!matches) {
var nodeClassNamesSet = toOrderedSet(nodeClassNames);
matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet));
}
if (matches) {
ls.push(node);
}
}
}
});
}
return ls;
});
},
/**
* Returns a LiveNodeList of elements with the given qualifiedName.
* Searching for all descendants can be done by passing `*` as `qualifiedName`.
*
* All descendants of the specified element are searched, but not the element itself.
* The returned list is live, which means it updates itself with the DOM tree automatically.
* Therefore, there is no need to call `Element.getElementsByTagName()`
* with the same element and arguments repeatedly if the DOM changes in between calls.
*
* When called on an HTML element in an HTML document,
* `getElementsByTagName` lower-cases the argument before searching for it.
* This is undesirable when trying to match camel-cased SVG elements (such as
* ``) in an HTML document.
* Instead, use `Element.getElementsByTagNameNS()`,
* which preserves the capitalization of the tag name.
*
* `Element.getElementsByTagName` is similar to `Document.getElementsByTagName()`,
* except that it only searches for elements that are descendants of the specified element.
*
* @param {string} qualifiedName
* @returns {LiveNodeList}
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByTagName
* @see https://dom.spec.whatwg.org/#concept-getelementsbytagname
*/
getElementsByTagName: function (qualifiedName) {
var isHTMLDocument = (this.nodeType === DOCUMENT_NODE ? this : this.ownerDocument).type === 'html';
var lowerQualifiedName = qualifiedName.toLowerCase();
return new LiveNodeList(this, function (base) {
var ls = [];
_visitNode(base, function (node) {
if (node === base || node.nodeType !== ELEMENT_NODE) {
return;
}
if (qualifiedName === '*') {
ls.push(node);
} else {
var nodeQualifiedName = node.getQualifiedName();
var matchingQName = isHTMLDocument && node.namespaceURI === NAMESPACE.HTML ? lowerQualifiedName : qualifiedName;
if (nodeQualifiedName === matchingQName) {
ls.push(node);
}
}
});
return ls;
});
},
getElementsByTagNameNS: function (namespaceURI, localName) {
return new LiveNodeList(this, function (base) {
var ls = [];
_visitNode(base, function (node) {
if (
node !== base &&
node.nodeType === ELEMENT_NODE &&
(namespaceURI === '*' || node.namespaceURI === namespaceURI) &&
(localName === '*' || node.localName == localName)
) {
ls.push(node);
}
});
return ls;
});
},
};
Document.prototype.getElementsByClassName = Element.prototype.getElementsByClassName;
Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
_extends(Element, Node);
function Attr(symbol) {
checkSymbol(symbol);
this.namespaceURI = null;
this.prefix = null;
this.ownerElement = null;
}
Attr.prototype.nodeType = ATTRIBUTE_NODE;
_extends(Attr, Node);
function CharacterData(symbol) {
checkSymbol(symbol);
}
CharacterData.prototype = {
data: '',
substringData: function (offset, count) {
return this.data.substring(offset, offset + count);
},
appendData: function (text) {
text = this.data + text;
this.nodeValue = this.data = text;
this.length = text.length;
},
insertData: function (offset, text) {
this.replaceData(offset, 0, text);
},
deleteData: function (offset, count) {
this.replaceData(offset, count, '');
},
replaceData: function (offset, count, text) {
var start = this.data.substring(0, offset);
var end = this.data.substring(offset + count);
text = start + text + end;
this.nodeValue = this.data = text;
this.length = text.length;
},
};
_extends(CharacterData, Node);
function Text(symbol) {
checkSymbol(symbol);
}
Text.prototype = {
nodeName: '#text',
nodeType: TEXT_NODE,
splitText: function (offset) {
var text = this.data;
var newText = text.substring(offset);
text = text.substring(0, offset);
this.data = this.nodeValue = text;
this.length = text.length;
var newNode = this.ownerDocument.createTextNode(newText);
if (this.parentNode) {
this.parentNode.insertBefore(newNode, this.nextSibling);
}
return newNode;
},
};
_extends(Text, CharacterData);
function Comment(symbol) {
checkSymbol(symbol);
}
Comment.prototype = {
nodeName: '#comment',
nodeType: COMMENT_NODE,
};
_extends(Comment, CharacterData);
function CDATASection(symbol) {
checkSymbol(symbol);
}
CDATASection.prototype = {
nodeName: '#cdata-section',
nodeType: CDATA_SECTION_NODE,
};
_extends(CDATASection, Text);
function DocumentType(symbol) {
checkSymbol(symbol);
}
DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
_extends(DocumentType, Node);
function Notation(symbol) {
checkSymbol(symbol);
}
Notation.prototype.nodeType = NOTATION_NODE;
_extends(Notation, Node);
function Entity(symbol) {
checkSymbol(symbol);
}
Entity.prototype.nodeType = ENTITY_NODE;
_extends(Entity, Node);
function EntityReference(symbol) {
checkSymbol(symbol);
}
EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
_extends(EntityReference, Node);
function DocumentFragment(symbol) {
checkSymbol(symbol);
}
DocumentFragment.prototype.nodeName = '#document-fragment';
DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
_extends(DocumentFragment, Node);
function ProcessingInstruction(symbol) {
checkSymbol(symbol);
}
ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
_extends(ProcessingInstruction, CharacterData);
function XMLSerializer() {}
XMLSerializer.prototype.serializeToString = function (node, nodeFilter) {
return nodeSerializeToString.call(node, nodeFilter);
};
Node.prototype.toString = nodeSerializeToString;
function nodeSerializeToString(nodeFilter) {
var buf = [];
var refNode = (this.nodeType === DOCUMENT_NODE && this.documentElement) || this;
var prefix = refNode.prefix;
var uri = refNode.namespaceURI;
if (uri && prefix == null) {
var prefix = refNode.lookupPrefix(uri);
if (prefix == null) {
var visibleNamespaces = [
{ namespace: uri, prefix: null },
//{namespace:uri,prefix:''}
];
}
}
serializeToString(this, buf, nodeFilter, visibleNamespaces);
return buf.join('');
}
function needNamespaceDefine(node, isHTML, visibleNamespaces) {
var prefix = node.prefix || '';
var uri = node.namespaceURI;
// According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,
// and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :
// > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.
// in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)
// and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :
// > [...] Furthermore, the attribute value [...] must not be an empty string.
// so serializing empty namespace value like xmlns:ds="" would produce an invalid XML document.
if (!uri) {
return false;
}
if ((prefix === 'xml' && uri === NAMESPACE.XML) || uri === NAMESPACE.XMLNS) {
return false;
}
var i = visibleNamespaces.length;
while (i--) {
var ns = visibleNamespaces[i];
// get namespace prefix
if (ns.prefix === prefix) {
return ns.namespace !== uri;
}
}
return true;
}
/**
* Literal whitespace other than space that appear in attribute values are serialized as
* their entity references, so they will be preserved.
* (In contrast to whitespace literals in the input which are normalized to spaces).
*
* Well-formed constraint: No < in Attribute Values:
* > The replacement text of any entity referred to directly or indirectly
* > in an attribute value must not contain a <.
*
* @see https://www.w3.org/TR/xml11/#CleanAttrVals
* @see https://www.w3.org/TR/xml11/#NT-AttValue
* @see https://www.w3.org/TR/xml11/#AVNormalize
* @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
* @prettierignore
*/
function addSerializedAttribute(buf, qualifiedName, value) {
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
}
function serializeToString(node, buf, nodeFilter, visibleNamespaces) {
if (!visibleNamespaces) {
visibleNamespaces = [];
}
var doc = node.nodeType === DOCUMENT_NODE ? node : node.ownerDocument;
var isHTML = doc.type === 'html';
if (nodeFilter) {
node = nodeFilter(node);
if (node) {
if (typeof node == 'string') {
buf.push(node);
return;
}
} else {
return;
}
//buf.sort.apply(attrs, attributeSorter);
}
switch (node.nodeType) {
case ELEMENT_NODE:
var attrs = node.attributes;
var len = attrs.length;
var child = node.firstChild;
var nodeName = node.tagName;
var prefixedNodeName = nodeName;
if (!isHTML && !node.prefix && node.namespaceURI) {
var defaultNS;
// lookup current default ns from `xmlns` attribute
for (var ai = 0; ai < attrs.length; ai++) {
if (attrs.item(ai).name === 'xmlns') {
defaultNS = attrs.item(ai).value;
break;
}
}
if (!defaultNS) {
// lookup current default ns in visibleNamespaces
for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
var namespace = visibleNamespaces[nsi];
if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {
defaultNS = namespace.namespace;
break;
}
}
}
if (defaultNS !== node.namespaceURI) {
for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
var namespace = visibleNamespaces[nsi];
if (namespace.namespace === node.namespaceURI) {
if (namespace.prefix) {
prefixedNodeName = namespace.prefix + ':' + nodeName;
}
break;
}
}
}
}
buf.push('<', prefixedNodeName);
for (var i = 0; i < len; i++) {
// add namespaces for attributes
var attr = attrs.item(i);
if (attr.prefix == 'xmlns') {
visibleNamespaces.push({
prefix: attr.localName,
namespace: attr.value,
});
} else if (attr.nodeName == 'xmlns') {
visibleNamespaces.push({ prefix: '', namespace: attr.value });
}
}
for (var i = 0; i < len; i++) {
var attr = attrs.item(i);
if (needNamespaceDefine(attr, isHTML, visibleNamespaces)) {
var prefix = attr.prefix || '';
var uri = attr.namespaceURI;
addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : 'xmlns', uri);
visibleNamespaces.push({ prefix: prefix, namespace: uri });
}
serializeToString(attr, buf, nodeFilter, visibleNamespaces);
}
// add namespace for current node
if (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) {
var prefix = node.prefix || '';
var uri = node.namespaceURI;
addSerializedAttribute(buf, prefix ? 'xmlns:' + prefix : 'xmlns', uri);
visibleNamespaces.push({ prefix: prefix, namespace: uri });
}
// in XML elements can be closed when they have no children
var canCloseTag = !child;
if (canCloseTag && (isHTML || node.namespaceURI === NAMESPACE.HTML)) {
// in HTML (doc or ns) only void elements can be closed right away
canCloseTag = isHTMLVoidElement(nodeName);
}
if (canCloseTag) {
buf.push('/>');
} else {
buf.push('>');
//if is cdata child node
if (isHTML && isHTMLRawTextElement(nodeName)) {
while (child) {
if (child.data) {
buf.push(child.data);
} else {
serializeToString(child, buf, nodeFilter, visibleNamespaces.slice());
}
child = child.nextSibling;
}
} else {
while (child) {
serializeToString(child, buf, nodeFilter, visibleNamespaces.slice());
child = child.nextSibling;
}
}
buf.push('', prefixedNodeName, '>');
}
// remove added visible namespaces
//visibleNamespaces.length = startVisibleNamespaces;
return;
case DOCUMENT_NODE:
case DOCUMENT_FRAGMENT_NODE:
var child = node.firstChild;
while (child) {
serializeToString(child, buf, nodeFilter, visibleNamespaces.slice());
child = child.nextSibling;
}
return;
case ATTRIBUTE_NODE:
return addSerializedAttribute(buf, node.name, node.value);
case TEXT_NODE:
/*
* The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
* except when used as markup delimiters, or within a comment, a processing instruction,
* or a CDATA section.
* If they are needed elsewhere, they must be escaped using either numeric character
* references or the strings `&` and `<` respectively.
* The right angle bracket (>) may be represented using the string " > ",
* and must, for compatibility, be escaped using either `>`,
* or a character reference when it appears in the string `]]>` in content,
* when that string is not marking the end of a CDATA section.
*
* In the content of elements, character data is any string of characters which does not
* contain the start-delimiter of any markup and does not include the CDATA-section-close
* delimiter, `]]>`.
*
* @see https://www.w3.org/TR/xml/#NT-CharData
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
*/
return buf.push(node.data.replace(/[<&>]/g, _xmlEncoder));
case CDATA_SECTION_NODE:
return buf.push(g.CDATA_START, node.data, g.CDATA_END);
case COMMENT_NODE:
return buf.push(g.COMMENT_START, node.data, g.COMMENT_END);
case DOCUMENT_TYPE_NODE:
var pubid = node.publicId;
var sysid = node.systemId;
buf.push(g.DOCTYPE_DECL_START, ' ', node.name);
if (pubid) {
buf.push(' ', g.PUBLIC, ' ', pubid);
if (sysid && sysid !== '.') {
buf.push(' ', sysid);
}
} else if (sysid && sysid !== '.') {
buf.push(' ', g.SYSTEM, ' ', sysid);
}
if (node.internalSubset) {
buf.push(' [', node.internalSubset, ']');
}
buf.push('>');
return;
case PROCESSING_INSTRUCTION_NODE:
return buf.push('', node.target, ' ', node.data, '?>');
case ENTITY_REFERENCE_NODE:
return buf.push('&', node.nodeName, ';');
//case ENTITY_NODE:
//case NOTATION_NODE:
default:
buf.push('??', node.nodeName);
}
}
function importNode(doc, node, deep) {
var node2;
switch (node.nodeType) {
case ELEMENT_NODE:
node2 = node.cloneNode(false);
node2.ownerDocument = doc;
//var attrs = node2.attributes;
//var len = attrs.length;
//for(var i=0;i {
"use strict";
var conventions = __webpack_require__(870);
var g = __webpack_require__(731);
var errors = __webpack_require__(767);
var isHTMLEscapableRawTextElement = conventions.isHTMLEscapableRawTextElement;
var isHTMLMimeType = conventions.isHTMLMimeType;
var isHTMLRawTextElement = conventions.isHTMLRawTextElement;
var hasOwn = conventions.hasOwn;
var NAMESPACE = conventions.NAMESPACE;
var ParseError = errors.ParseError;
var DOMException = errors.DOMException;
//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE
var S_TAG = 0; //tag name offerring
var S_ATTR = 1; //attr name offerring
var S_ATTR_SPACE = 2; //attr name end and space offer
var S_EQ = 3; //=space?
var S_ATTR_NOQUOT_VALUE = 4; //attr value(no quot value only)
var S_ATTR_END = 5; //attr value end and no space(quot end)
var S_TAG_SPACE = 6; //(attr value end || tag end ) && (space offer)
var S_TAG_CLOSE = 7; //closed el
function XMLReader() {}
XMLReader.prototype = {
parse: function (source, defaultNSMap, entityMap) {
var domBuilder = this.domBuilder;
domBuilder.startDocument();
_copy(defaultNSMap, (defaultNSMap = Object.create(null)));
parse(source, defaultNSMap, entityMap, domBuilder, this.errorHandler);
domBuilder.endDocument();
},
};
/**
* Detecting everything that might be a reference,
* including those without ending `;`, since those are allowed in HTML.
* The entityReplacer takes care of verifying and transforming each occurrence,
* and reports to the errorHandler on those that are not OK,
* depending on the context.
*/
var ENTITY_REG = /?\w+;?/g;
function parse(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {
var isHTML = isHTMLMimeType(domBuilder.mimeType);
if (source.indexOf(g.UNICODE_REPLACEMENT_CHARACTER) >= 0) {
errorHandler.warning('Unicode replacement character detected, source encoding issues?');
}
function fixedFromCharCode(code) {
// String.prototype.fromCharCode does not supports
// > 2 bytes unicode chars directly
if (code > 0xffff) {
code -= 0x10000;
var surrogate1 = 0xd800 + (code >> 10),
surrogate2 = 0xdc00 + (code & 0x3ff);
return String.fromCharCode(surrogate1, surrogate2);
} else {
return String.fromCharCode(code);
}
}
function entityReplacer(a) {
var complete = a[a.length - 1] === ';' ? a : a + ';';
if (!isHTML && complete !== a) {
errorHandler.error('EntityRef: expecting ;');
return a;
}
var match = g.Reference.exec(complete);
if (!match || match[0].length !== complete.length) {
errorHandler.error('entity not matching Reference production: ' + a);
return a;
}
var k = complete.slice(1, -1);
if (hasOwn(entityMap, k)) {
return entityMap[k];
} else if (k.charAt(0) === '#') {
return fixedFromCharCode(parseInt(k.substring(1).replace('x', '0x')));
} else {
errorHandler.error('entity not found:' + a);
return a;
}
}
function appendText(end) {
//has some bugs
if (end > start) {
var xt = source.substring(start, end).replace(ENTITY_REG, entityReplacer);
locator && position(start);
domBuilder.characters(xt, 0, end - start);
start = end;
}
}
var lineStart = 0;
var lineEnd = 0;
var linePattern = /\r\n?|\n|$/g;
var locator = domBuilder.locator;
function position(p, m) {
while (p >= lineEnd && (m = linePattern.exec(source))) {
lineStart = lineEnd;
lineEnd = m.index + m[0].length;
locator.lineNumber++;
}
locator.columnNumber = p - lineStart + 1;
}
var parseStack = [{ currentNSMap: defaultNSMapCopy }];
var unclosedTags = [];
var start = 0;
while (true) {
try {
var tagStart = source.indexOf('<', start);
if (tagStart < 0) {
if (!isHTML && unclosedTags.length > 0) {
return errorHandler.fatalError('unclosed xml tag(s): ' + unclosedTags.join(', '));
}
if (!source.substring(start).match(/^\s*$/)) {
var doc = domBuilder.doc;
var text = doc.createTextNode(source.substring(start));
if (doc.documentElement) {
return errorHandler.error('Extra content at the end of the document');
}
doc.appendChild(text);
domBuilder.currentElement = text;
}
return;
}
if (tagStart > start) {
var fromSource = source.substring(start, tagStart);
if (!isHTML && unclosedTags.length === 0) {
fromSource = fromSource.replace(new RegExp(g.S_OPT.source, 'g'), '');
fromSource && errorHandler.error("Unexpected content outside root element: '" + fromSource + "'");
}
appendText(tagStart);
}
switch (source.charAt(tagStart + 1)) {
case '/':
var end = source.indexOf('>', tagStart + 2);
var tagNameRaw = source.substring(tagStart + 2, end > 0 ? end : undefined);
if (!tagNameRaw) {
return errorHandler.fatalError('end tag name missing');
}
var tagNameMatch = end > 0 && g.reg('^', g.QName_group, g.S_OPT, '$').exec(tagNameRaw);
if (!tagNameMatch) {
return errorHandler.fatalError('end tag name contains invalid characters: "' + tagNameRaw + '"');
}
if (!domBuilder.currentElement && !domBuilder.doc.documentElement) {
// not enough information to provide a helpful error message,
// but parsing will throw since there is no root element
return;
}
var currentTagName =
unclosedTags[unclosedTags.length - 1] ||
domBuilder.currentElement.tagName ||
domBuilder.doc.documentElement.tagName ||
'';
if (currentTagName !== tagNameMatch[1]) {
var tagNameLower = tagNameMatch[1].toLowerCase();
if (!isHTML || currentTagName.toLowerCase() !== tagNameLower) {
return errorHandler.fatalError('Opening and ending tag mismatch: "' + currentTagName + '" != "' + tagNameRaw + '"');
}
}
var config = parseStack.pop();
unclosedTags.pop();
var localNSMap = config.localNSMap;
domBuilder.endElement(config.uri, config.localName, currentTagName);
if (localNSMap) {
for (var prefix in localNSMap) {
if (hasOwn(localNSMap, prefix)) {
domBuilder.endPrefixMapping(prefix);
}
}
}
end++;
break;
// end element
case '?': // ...?>
locator && position(tagStart);
end = parseProcessingInstruction(source, tagStart, domBuilder, errorHandler);
break;
case '!': // start) {
start = end;
} else {
//Possible sax fallback here, risk of positional error
appendText(Math.max(tagStart, start) + 1);
}
}
}
function copyLocator(f, t) {
t.lineNumber = f.lineNumber;
t.columnNumber = f.columnNumber;
return t;
}
/**
* @returns
* end of the elementStartPart(end of elementEndPart for selfClosed el)
* @see {@link #appendElement}
*/
function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler, isHTML) {
/**
* @param {string} qname
* @param {string} value
* @param {number} startIndex
*/
function addAttribute(qname, value, startIndex) {
if (hasOwn(el.attributeNames, qname)) {
return errorHandler.fatalError('Attribute ' + qname + ' redefined');
}
if (!isHTML && value.indexOf('<') >= 0) {
return errorHandler.fatalError("Unescaped '<' not allowed in attributes values");
}
el.addValue(
qname,
// @see https://www.w3.org/TR/xml/#AVNormalize
// since the xmldom sax parser does not "interpret" DTD the following is not implemented:
// - recursive replacement of (DTD) entity references
// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA
value.replace(/[\t\n\r]/g, ' ').replace(ENTITY_REG, entityReplacer),
startIndex
);
}
var attrName;
var value;
var p = ++start;
var s = S_TAG; //status
while (true) {
var c = source.charAt(p);
switch (c) {
case '=':
if (s === S_ATTR) {
//attrName
attrName = source.slice(start, p);
s = S_EQ;
} else if (s === S_ATTR_SPACE) {
s = S_EQ;
} else {
//fatalError: equal must after attrName or space after attrName
throw new Error('attribute equal must after attrName'); // No known test case
}
break;
case "'":
case '"':
if (
s === S_EQ ||
s === S_ATTR //|| s == S_ATTR_SPACE
) {
//equal
if (s === S_ATTR) {
errorHandler.warning('attribute value must after "="');
attrName = source.slice(start, p);
}
start = p + 1;
p = source.indexOf(c, start);
if (p > 0) {
value = source.slice(start, p);
addAttribute(attrName, value, start - 1);
s = S_ATTR_END;
} else {
//fatalError: no end quot match
throw new Error("attribute value no end '" + c + "' match");
}
} else if (s == S_ATTR_NOQUOT_VALUE) {
value = source.slice(start, p);
addAttribute(attrName, value, start);
errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c + ')!!');
start = p + 1;
s = S_ATTR_END;
} else {
//fatalError: no equal before
throw new Error('attribute value must after "="'); // No known test case
}
break;
case '/':
switch (s) {
case S_TAG:
el.setTagName(source.slice(start, p));
case S_ATTR_END:
case S_TAG_SPACE:
case S_TAG_CLOSE:
s = S_TAG_CLOSE;
el.closed = true;
case S_ATTR_NOQUOT_VALUE:
case S_ATTR:
break;
case S_ATTR_SPACE:
el.closed = true;
break;
//case S_EQ:
default:
throw new Error("attribute invalid close char('/')"); // No known test case
}
break;
case '': //end document
errorHandler.error('unexpected end of input');
if (s == S_TAG) {
el.setTagName(source.slice(start, p));
}
return p;
case '>':
switch (s) {
case S_TAG:
el.setTagName(source.slice(start, p));
case S_ATTR_END:
case S_TAG_SPACE:
case S_TAG_CLOSE:
break; //normal
case S_ATTR_NOQUOT_VALUE: //Compatible state
case S_ATTR:
value = source.slice(start, p);
if (value.slice(-1) === '/') {
el.closed = true;
value = value.slice(0, -1);
}
case S_ATTR_SPACE:
if (s === S_ATTR_SPACE) {
value = attrName;
}
if (s == S_ATTR_NOQUOT_VALUE) {
errorHandler.warning('attribute "' + value + '" missed quot(")!');
addAttribute(attrName, value, start);
} else {
if (!isHTML) {
errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!');
}
addAttribute(value, value, start);
}
break;
case S_EQ:
if (!isHTML) {
return errorHandler.fatalError('AttValue: \' or " expected');
}
}
return p;
/*xml space '\x20' | #x9 | #xD | #xA; */
case '\u0080':
c = ' ';
default:
if (c <= ' ') {
//space
switch (s) {
case S_TAG:
el.setTagName(source.slice(start, p)); //tagName
s = S_TAG_SPACE;
break;
case S_ATTR:
attrName = source.slice(start, p);
s = S_ATTR_SPACE;
break;
case S_ATTR_NOQUOT_VALUE:
var value = source.slice(start, p);
errorHandler.warning('attribute "' + value + '" missed quot(")!!');
addAttribute(attrName, value, start);
case S_ATTR_END:
s = S_TAG_SPACE;
break;
//case S_TAG_SPACE:
//case S_EQ:
//case S_ATTR_SPACE:
// void();break;
//case S_TAG_CLOSE:
//ignore warning
}
} else {
//not space
//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE
//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE
switch (s) {
//case S_TAG:void();break;
//case S_ATTR:void();break;
//case S_ATTR_NOQUOT_VALUE:void();break;
case S_ATTR_SPACE:
if (!isHTML) {
errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!');
}
addAttribute(attrName, attrName, start);
start = p;
s = S_ATTR;
break;
case S_ATTR_END:
errorHandler.warning('attribute space is required"' + attrName + '"!!');
case S_TAG_SPACE:
s = S_ATTR;
start = p;
break;
case S_EQ:
s = S_ATTR_NOQUOT_VALUE;
start = p;
break;
case S_TAG_CLOSE:
throw new Error("elements closed character '/' and '>' must be connected to");
}
}
} //end outer switch
p++;
}
}
/**
* @returns
* `true` if a new namespace has been defined.
*/
function appendElement(el, domBuilder, currentNSMap) {
var tagName = el.tagName;
var localNSMap = null;
var i = el.length;
while (i--) {
var a = el[i];
var qName = a.qName;
var value = a.value;
var nsp = qName.indexOf(':');
if (nsp > 0) {
var prefix = (a.prefix = qName.slice(0, nsp));
var localName = qName.slice(nsp + 1);
var nsPrefix = prefix === 'xmlns' && localName;
} else {
localName = qName;
prefix = null;
nsPrefix = qName === 'xmlns' && '';
}
//can not set prefix,because prefix !== ''
a.localName = localName;
//prefix == null for no ns prefix attribute
if (nsPrefix !== false) {
//hack!!
if (localNSMap == null) {
localNSMap = Object.create(null);
_copy(currentNSMap, (currentNSMap = Object.create(null)));
}
currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
a.uri = NAMESPACE.XMLNS;
domBuilder.startPrefixMapping(nsPrefix, value);
}
}
var i = el.length;
while (i--) {
a = el[i];
if (a.prefix) {
//no prefix attribute has no namespace
if (a.prefix === 'xml') {
a.uri = NAMESPACE.XML;
}
if (a.prefix !== 'xmlns') {
a.uri = currentNSMap[a.prefix];
}
}
}
var nsp = tagName.indexOf(':');
if (nsp > 0) {
prefix = el.prefix = tagName.slice(0, nsp);
localName = el.localName = tagName.slice(nsp + 1);
} else {
prefix = null; //important!!
localName = el.localName = tagName;
}
//no prefix element has default namespace
var ns = (el.uri = currentNSMap[prefix || '']);
domBuilder.startElement(ns, localName, tagName, el);
//endPrefixMapping and startPrefixMapping have not any help for dom builder
//localNSMap = null
if (el.closed) {
domBuilder.endElement(ns, localName, tagName);
if (localNSMap) {
for (prefix in localNSMap) {
if (hasOwn(localNSMap, prefix)) {
domBuilder.endPrefixMapping(prefix);
}
}
}
} else {
el.currentNSMap = currentNSMap;
el.localNSMap = localNSMap;
//parseStack.push(el);
return true;
}
}
function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) {
// https://html.spec.whatwg.org/#raw-text-elements
// https://html.spec.whatwg.org/#escapable-raw-text-elements
// https://html.spec.whatwg.org/#cdata-rcdata-restrictions:raw-text-elements
// TODO: https://html.spec.whatwg.org/#cdata-rcdata-restrictions
var isEscapableRaw = isHTMLEscapableRawTextElement(tagName);
if (isEscapableRaw || isHTMLRawTextElement(tagName)) {
var elEndStart = source.indexOf('' + tagName + '>', elStartEnd);
var text = source.substring(elStartEnd + 1, elEndStart);
if (isEscapableRaw) {
text = text.replace(ENTITY_REG, entityReplacer);
}
domBuilder.characters(text, 0, text.length);
return elEndStart;
}
return elStartEnd + 1;
}
function _copy(source, target) {
for (var n in source) {
if (hasOwn(source, n)) {
target[n] = source[n];
}
}
}
/**
* @typedef ParseUtils
* @property {function(relativeIndex: number?): string | undefined} char
* Provides look ahead access to a singe character relative to the current index.
* @property {function(): number} getIndex
* Provides read-only access to the current index.
* @property {function(reg: RegExp): string | null} getMatch
* Applies the provided regular expression enforcing that it starts at the current index and
* returns the complete matching string,
* and moves the current index by the length of the matching string.
* @property {function(): string} getSource
* Provides read-only access to the complete source.
* @property {function(places: number?): void} skip
* moves the current index by places (defaults to 1)
* @property {function(): number} skipBlanks
* Moves the current index by the amount of white space that directly follows the current index
* and returns the amount of whitespace chars skipped (0..n),
* or -1 if the end of the source was reached.
* @property {function(): string} substringFromIndex
* creates a substring from the current index to the end of `source`
* @property {function(compareWith: string): boolean} substringStartsWith
* Checks if `source` contains `compareWith`, starting from the current index.
* @property {function(compareWith: string): boolean} substringStartsWithCaseInsensitive
* Checks if `source` contains `compareWith`, starting from the current index,
* comparing the upper case of both sides.
* @see {@link parseUtils}
*/
/**
* A temporary scope for parsing and look ahead operations in `source`,
* starting from index `start`.
*
* Some operations move the current index by a number of positions,
* after which `getIndex` returns the new index.
*
* @param {string} source
* @param {number} start
* @returns {ParseUtils}
*/
function parseUtils(source, start) {
var index = start;
function char(n) {
n = n || 0;
return source.charAt(index + n);
}
function skip(n) {
n = n || 1;
index += n;
}
function skipBlanks() {
var blanks = 0;
while (index < source.length) {
var c = char();
if (c !== ' ' && c !== '\n' && c !== '\t' && c !== '\r') {
return blanks;
}
blanks++;
skip();
}
return -1;
}
function substringFromIndex() {
return source.substring(index);
}
function substringStartsWith(text) {
return source.substring(index, index + text.length) === text;
}
function substringStartsWithCaseInsensitive(text) {
return source.substring(index, index + text.length).toUpperCase() === text.toUpperCase();
}
function getMatch(args) {
var expr = g.reg('^', args);
var match = expr.exec(substringFromIndex());
if (match) {
skip(match[0].length);
return match[0];
}
return null;
}
return {
char: char,
getIndex: function () {
return index;
},
getMatch: getMatch,
getSource: function () {
return source;
},
skip: skip,
skipBlanks: skipBlanks,
substringFromIndex: substringFromIndex,
substringStartsWith: substringStartsWith,
substringStartsWithCaseInsensitive: substringStartsWithCaseInsensitive,
};
}
/**
* @param {ParseUtils} p
* @param {DOMHandler} errorHandler
* @returns {string}
*/
function parseDoctypeInternalSubset(p, errorHandler) {
/**
* @param {ParseUtils} p
* @param {DOMHandler} errorHandler
* @returns {string}
*/
function parsePI(p, errorHandler) {
var match = g.PI.exec(p.substringFromIndex());
if (!match) {
return errorHandler.fatalError('processing instruction is not well-formed at position ' + p.getIndex());
}
if (match[1].toLowerCase() === 'xml') {
return errorHandler.fatalError(
'xml declaration is only allowed at the start of the document, but found at position ' + p.getIndex()
);
}
p.skip(match[0].length);
return match[0];
}
// Parse internal subset
var source = p.getSource();
if (p.char() === '[') {
p.skip(1);
var intSubsetStart = p.getIndex();
while (p.getIndex() < source.length) {
p.skipBlanks();
if (p.char() === ']') {
var internalSubset = source.substring(intSubsetStart, p.getIndex());
p.skip(1);
return internalSubset;
}
var current = null;
// Only in external subset
// if (char() === '<' && char(1) === '!' && char(2) === '[') {
// parseConditionalSections(p, errorHandler);
// } else
if (p.char() === '<' && p.char(1) === '!') {
switch (p.char(2)) {
case 'E': // ELEMENT | ENTITY
if (p.char(3) === 'L') {
current = p.getMatch(g.elementdecl);
} else if (p.char(3) === 'N') {
current = p.getMatch(g.EntityDecl);
}
break;
case 'A': // ATTRIBUTE
current = p.getMatch(g.AttlistDecl);
break;
case 'N': // NOTATION
current = p.getMatch(g.NotationDecl);
break;
case '-': // COMMENT
current = p.getMatch(g.Comment);
break;
}
} else if (p.char() === '<' && p.char(1) === '?') {
current = parsePI(p, errorHandler);
} else if (p.char() === '%') {
current = p.getMatch(g.PEReference);
} else {
return errorHandler.fatalError('Error detected in Markup declaration');
}
if (!current) {
return errorHandler.fatalError('Error in internal subset at position ' + p.getIndex());
}
}
return errorHandler.fatalError('doctype internal subset is not well-formed, missing ]');
}
}
/**
* Called when the parser encounters an element starting with '') {
return errorHandler.fatalError('doctype not terminated with > at position ' + p.getIndex());
}
p.skip(1);
domBuilder.startDTD(doctype.name, doctype.publicId, doctype.systemId, doctype.internalSubset);
domBuilder.endDTD();
return p.getIndex();
}
default:
return errorHandler.fatalError('Not well-formed XML starting with " 0) {
return errorHandler.fatalError(
'processing instruction at position ' + start + ' is an xml declaration which is only at the start of the document'
);
}
if (!g.XMLDecl.test(source.substring(start))) {
return errorHandler.fatalError('xml declaration is not well-formed');
}
}
domBuilder.processingInstruction(match[1], match[2]);
return start + match[0].length;
}
function ElementAttributes() {
this.attributeNames = Object.create(null);
}
ElementAttributes.prototype = {
setTagName: function (tagName) {
if (!g.QName_exact.test(tagName)) {
throw new Error('invalid tagName:' + tagName);
}
this.tagName = tagName;
},
addValue: function (qName, value, offset) {
if (!g.QName_exact.test(qName)) {
throw new Error('invalid attribute:' + qName);
}
this.attributeNames[qName] = this.length;
this[this.length++] = { qName: qName, value: value, offset: offset };
},
length: 0,
getLocalName: function (i) {
return this[i].localName;
},
getLocator: function (i) {
return this[i].locator;
},
getQName: function (i) {
return this[i].qName;
},
getURI: function (i) {
return this[i].uri;
},
getValue: function (i) {
return this[i].value;
},
// ,getIndex:function(uri, localName)){
// if(localName){
//
// }else{
// var qName = uri
// }
// },
// getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},
// getType:function(uri,localName){}
// getType:function(i){},
};
exports.XMLReader = XMLReader;
exports.parseUtils = parseUtils;
exports.parseDoctypeCommentOrCData = parseDoctypeCommentOrCData;
/***/ }),
/***/ 870:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
/**
* Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.
*
* Works with anything that has a `length` property and index access properties,
* including NodeList.
*
* @param {T[] | { length: number; [number]: T }} list
* @param {function (item: T, index: number, list:T[]):boolean} predicate
* @param {Partial>?} ac
* Allows injecting a custom implementation in tests (`Array.prototype` by default).
* @returns {T | undefined}
* @template {unknown} T
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
* @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find
*/
function find(list, predicate, ac) {
if (ac === undefined) {
ac = Array.prototype;
}
if (list && typeof ac.find === 'function') {
return ac.find.call(list, predicate);
}
for (var i = 0; i < list.length; i++) {
if (hasOwn(list, i)) {
var item = list[i];
if (predicate.call(undefined, item, i, list)) {
return item;
}
}
}
}
/**
* "Shallow freezes" an object to render it immutable.
* Uses `Object.freeze` if available,
* otherwise the immutability is only in the type.
*
* Is used to create "enum like" objects.
*
* If `Object.getOwnPropertyDescriptors` is available,
* a new object with all properties of object but without any prototype is created and returned
* after freezing it.
*
* @param {T} object
* The object to freeze.
* @param {Pick} [oc=Object]
* `Object` by default,
* allows to inject custom object constructor for tests.
* @returns {Readonly}
* @template {Object} T
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
* @prettierignore
*/
function freeze(object, oc) {
if (oc === undefined) {
oc = Object;
}
if (oc && typeof oc.getOwnPropertyDescriptors === 'function') {
object = oc.create(null, oc.getOwnPropertyDescriptors(object));
}
return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object;
}
/**
* Implementation for `Object.hasOwn` but ES5 compatible.
*
* @param {any} object
* @param {string | number} key
* @returns {boolean}
*/
function hasOwn(object, key) {
return Object.prototype.hasOwnProperty.call(object, key);
}
/**
* Since xmldom can not rely on `Object.assign`,
* it uses/provides a simplified version that is sufficient for its needs.
*
* @param {Object} target
* @param {Object | null | undefined} source
* @returns {Object}
* The target with the merged/overridden properties.
* @throws {TypeError}
* If target is not an object.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
* @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign
*/
function assign(target, source) {
if (target === null || typeof target !== 'object') {
throw new TypeError('target is not an object');
}
for (var key in source) {
if (hasOwn(source, key)) {
target[key] = source[key];
}
}
return target;
}
/**
* A number of attributes are boolean attributes.
* The presence of a boolean attribute on an element represents the `true` value,
* and the absence of the attribute represents the `false` value.
*
* If the attribute is present, its value must either be the empty string, or a value that is
* an ASCII case-insensitive match for the attribute's canonical name,
* with no leading or trailing whitespace.
*
* Note: The values `"true"` and `"false"` are not allowed on boolean attributes.
* To represent a `false` value, the attribute has to be omitted altogether.
*
* @see https://html.spec.whatwg.org/#boolean-attributes
* @see https://html.spec.whatwg.org/#attributes-3
*/
var HTML_BOOLEAN_ATTRIBUTES = freeze({
allowfullscreen: true,
async: true,
autofocus: true,
autoplay: true,
checked: true,
controls: true,
default: true,
defer: true,
disabled: true,
formnovalidate: true,
hidden: true,
ismap: true,
itemscope: true,
loop: true,
multiple: true,
muted: true,
nomodule: true,
novalidate: true,
open: true,
playsinline: true,
readonly: true,
required: true,
reversed: true,
selected: true,
});
/**
* Check if `name` is matching one of the HTML boolean attribute names.
* This method doesn't check if such attributes are allowed in the context of the current
* document/parsing.
*
* @param {string} name
* @returns {boolean}
* @see {@link HTML_BOOLEAN_ATTRIBUTES}
* @see https://html.spec.whatwg.org/#boolean-attributes
* @see https://html.spec.whatwg.org/#attributes-3
*/
function isHTMLBooleanAttribute(name) {
return hasOwn(HTML_BOOLEAN_ATTRIBUTES, name.toLowerCase());
}
/**
* Void elements only have a start tag; end tags must not be specified for void elements.
* These elements should be written as self-closing like this: ` `.
* This should not be confused with optional tags that HTML allows to omit the end tag for
* (like `li`, `tr` and others), which can have content after them,
* so they can not be written as self-closing.
* xmldom does not have any logic for optional end tags cases,
* and will report them as a warning.
* Content that would go into the unopened element,
* will instead be added as a sibling text node.
*
* @type {Readonly<{
* area: boolean;
* col: boolean;
* img: boolean;
* wbr: boolean;
* link: boolean;
* hr: boolean;
* source: boolean;
* br: boolean;
* input: boolean;
* param: boolean;
* meta: boolean;
* embed: boolean;
* track: boolean;
* base: boolean;
* }>}
* @see https://html.spec.whatwg.org/#void-elements
* @see https://html.spec.whatwg.org/#optional-tags
*/
var HTML_VOID_ELEMENTS = freeze({
area: true,
base: true,
br: true,
col: true,
embed: true,
hr: true,
img: true,
input: true,
link: true,
meta: true,
param: true,
source: true,
track: true,
wbr: true,
});
/**
* Check if `tagName` is matching one of the HTML void element names.
* This method doesn't check if such tags are allowed in the context of the current
* document/parsing.
*
* @param {string} tagName
* @returns {boolean}
* @see {@link HTML_VOID_ELEMENTS}
* @see https://html.spec.whatwg.org/#void-elements
*/
function isHTMLVoidElement(tagName) {
return hasOwn(HTML_VOID_ELEMENTS, tagName.toLowerCase());
}
/**
* Tag names that are raw text elements according to HTML spec.
* The value denotes whether they are escapable or not.
*
* @see {@link isHTMLEscapableRawTextElement}
* @see {@link isHTMLRawTextElement}
* @see https://html.spec.whatwg.org/#raw-text-elements
* @see https://html.spec.whatwg.org/#escapable-raw-text-elements
*/
var HTML_RAW_TEXT_ELEMENTS = freeze({
script: false,
style: false,
textarea: true,
title: true,
});
/**
* Check if `tagName` is matching one of the HTML raw text element names.
* This method doesn't check if such tags are allowed in the context of the current
* document/parsing.
*
* @param {string} tagName
* @returns {boolean}
* @see {@link isHTMLEscapableRawTextElement}
* @see {@link HTML_RAW_TEXT_ELEMENTS}
* @see https://html.spec.whatwg.org/#raw-text-elements
* @see https://html.spec.whatwg.org/#escapable-raw-text-elements
*/
function isHTMLRawTextElement(tagName) {
var key = tagName.toLowerCase();
return hasOwn(HTML_RAW_TEXT_ELEMENTS, key) && !HTML_RAW_TEXT_ELEMENTS[key];
}
/**
* Check if `tagName` is matching one of the HTML escapable raw text element names.
* This method doesn't check if such tags are allowed in the context of the current
* document/parsing.
*
* @param {string} tagName
* @returns {boolean}
* @see {@link isHTMLRawTextElement}
* @see {@link HTML_RAW_TEXT_ELEMENTS}
* @see https://html.spec.whatwg.org/#raw-text-elements
* @see https://html.spec.whatwg.org/#escapable-raw-text-elements
*/
function isHTMLEscapableRawTextElement(tagName) {
var key = tagName.toLowerCase();
return hasOwn(HTML_RAW_TEXT_ELEMENTS, key) && HTML_RAW_TEXT_ELEMENTS[key];
}
/**
* Only returns true if `value` matches MIME_TYPE.HTML, which indicates an HTML document.
*
* @param {string} mimeType
* @returns {mimeType is 'text/html'}
* @see https://www.iana.org/assignments/media-types/text/html
* @see https://en.wikipedia.org/wiki/HTML
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring
*/
function isHTMLMimeType(mimeType) {
return mimeType === MIME_TYPE.HTML;
}
/**
* For both the `text/html` and the `application/xhtml+xml` namespace the spec defines that the
* HTML namespace is provided as the default.
*
* @param {string} mimeType
* @returns {boolean}
* @see https://dom.spec.whatwg.org/#dom-document-createelement
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument
*/
function hasDefaultHTMLNamespace(mimeType) {
return isHTMLMimeType(mimeType) || mimeType === MIME_TYPE.XML_XHTML_APPLICATION;
}
/**
* All mime types that are allowed as input to `DOMParser.parseFromString`
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02
* MDN
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype
* WHATWG HTML Spec
* @see {@link DOMParser.prototype.parseFromString}
*/
var MIME_TYPE = freeze({
/**
* `text/html`, the only mime type that triggers treating an XML document as HTML.
*
* @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration
* @see https://en.wikipedia.org/wiki/HTML Wikipedia
* @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring
* WHATWG HTML Spec
*/
HTML: 'text/html',
/**
* `application/xml`, the standard mime type for XML documents.
*
* @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType
* registration
* @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303
* @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia
*/
XML_APPLICATION: 'application/xml',
/**
* `text/xml`, an alias for `application/xml`.
*
* @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303
* @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration
* @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia
*/
XML_TEXT: 'text/xml',
/**
* `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,
* but is parsed as an XML document.
*
* @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType
* registration
* @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec
* @see https://en.wikipedia.org/wiki/XHTML Wikipedia
*/
XML_XHTML_APPLICATION: 'application/xhtml+xml',
/**
* `image/svg+xml`,
*
* @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration
* @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1
* @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia
*/
XML_SVG_IMAGE: 'image/svg+xml',
});
/**
* @typedef {'application/xhtml+xml' | 'application/xml' | 'image/svg+xml' | 'text/html' | 'text/xml'}
* MimeType
*/
/**
* @type {MimeType[]}
* @private
* Basically `Object.values`, which is not available in ES5.
*/
var _MIME_TYPES = Object.keys(MIME_TYPE).map(function (key) {
return MIME_TYPE[key];
});
/**
* Only returns true if `mimeType` is one of the allowed values for
* `DOMParser.parseFromString`.
*
* @param {string} mimeType
* @returns {mimeType is 'application/xhtml+xml' | 'application/xml' | 'image/svg+xml' | 'text/html' | 'text/xml'}
*
*/
function isValidMimeType(mimeType) {
return _MIME_TYPES.indexOf(mimeType) > -1;
}
/**
* Namespaces that are used in this code base.
*
* @see http://www.w3.org/TR/REC-xml-names
*/
var NAMESPACE = freeze({
/**
* The XHTML namespace.
*
* @see http://www.w3.org/1999/xhtml
*/
HTML: 'http://www.w3.org/1999/xhtml',
/**
* The SVG namespace.
*
* @see http://www.w3.org/2000/svg
*/
SVG: 'http://www.w3.org/2000/svg',
/**
* The `xml:` namespace.
*
* @see http://www.w3.org/XML/1998/namespace
*/
XML: 'http://www.w3.org/XML/1998/namespace',
/**
* The `xmlns:` namespace.
*
* @see https://www.w3.org/2000/xmlns/
*/
XMLNS: 'http://www.w3.org/2000/xmlns/',
});
exports.assign = assign;
exports.find = find;
exports.freeze = freeze;
exports.HTML_BOOLEAN_ATTRIBUTES = HTML_BOOLEAN_ATTRIBUTES;
exports.HTML_RAW_TEXT_ELEMENTS = HTML_RAW_TEXT_ELEMENTS;
exports.HTML_VOID_ELEMENTS = HTML_VOID_ELEMENTS;
exports.hasDefaultHTMLNamespace = hasDefaultHTMLNamespace;
exports.hasOwn = hasOwn;
exports.isHTMLBooleanAttribute = isHTMLBooleanAttribute;
exports.isHTMLRawTextElement = isHTMLRawTextElement;
exports.isHTMLEscapableRawTextElement = isHTMLEscapableRawTextElement;
exports.isHTMLMimeType = isHTMLMimeType;
exports.isHTMLVoidElement = isHTMLVoidElement;
exports.isValidMimeType = isValidMimeType;
exports.MIME_TYPE = MIME_TYPE;
exports.NAMESPACE = NAMESPACE;
/***/ }),
/***/ 999:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
(function(){'use strict';var k=this;
function aa(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==
b&&"undefined"==typeof a.call)return"object";return b}function l(a){return"string"==typeof a}function ba(a,b,c){return a.call.apply(a.bind,arguments)}function ca(a,b,c){if(!a)throw Error();if(2b?1:0};var ha=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(l(a))return l(b)&&1==b.length?a.indexOf(b,c):-1;for(;cc?null:l(a)?a.charAt(c):a[c]}function la(a){return Array.prototype.concat.apply(Array.prototype,arguments)}function ma(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var u;a:{var na=k.navigator;if(na){var oa=na.userAgent;if(oa){u=oa;break a}}u=""};var pa=q(u,"Opera")||q(u,"OPR"),v=q(u,"Trident")||q(u,"MSIE"),qa=q(u,"Edge"),ra=q(u,"Gecko")&&!(q(u.toLowerCase(),"webkit")&&!q(u,"Edge"))&&!(q(u,"Trident")||q(u,"MSIE"))&&!q(u,"Edge"),sa=q(u.toLowerCase(),"webkit")&&!q(u,"Edge");function ta(){var a=k.document;return a?a.documentMode:void 0}var ua;
a:{var va="",wa=function(){var a=u;if(ra)return/rv\:([^\);]+)(\)|;)/.exec(a);if(qa)return/Edge\/([\d\.]+)/.exec(a);if(v)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(sa)return/WebKit\/(\S+)/.exec(a);if(pa)return/(?:Version)[ \/]?(\S+)/.exec(a)}();wa&&(va=wa?wa[1]:"");if(v){var xa=ta();if(null!=xa&&xa>parseFloat(va)){ua=String(xa);break a}}ua=va}var ya={};
function za(a){if(!ya[a]){for(var b=0,c=fa(String(ua)).split("."),d=fa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f",4,2,function(a,b,c){return O(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return O(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return O(function(a,b){return a>=b},a,b,c)});var Wa=P("=",3,2,function(a,b,c){return O(function(a,b){return a==b},a,b,c,!0)});P("!=",3,2,function(a,b,c){return O(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return M(a,c)&&M(b,c)});P("or",1,2,function(a,b,c){return M(a,c)||M(b,c)});function Q(a,b,c){this.a=a;this.b=b||1;this.f=c||1};function Za(a,b){if(b.a.length&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");n.call(this,a.i);this.c=a;this.h=b;this.g=a.g;this.b=a.b}m(Za);Za.prototype.a=function(a){a=this.c.a(a);return $a(this.h,a)};Za.prototype.toString=function(){var a;a="Filter:"+J(this.c);return a+=J(this.h)};function ab(a,b){if(b.lengtha.v)throw Error("Function "+a.j+" expects at most "+a.v+" arguments, "+b.length+" given");a.B&&r(b,function(b,d){if(4!=b.i)throw Error("Argument "+d+" to function "+a.j+" is not of type Nodeset: "+b);});n.call(this,a.i);this.h=a;this.c=b;Ua(this,a.g||ja(b,function(a){return a.g}));Va(this,a.D&&!b.length||a.C&&!!b.length||ja(b,function(a){return a.b}))}m(ab);
ab.prototype.a=function(a){return this.h.m.apply(null,la(a,this.c))};ab.prototype.toString=function(){var a="Function: "+this.h;if(this.c.length)var b=t(this.c,function(a,b){return a+J(b)},"Arguments:"),a=a+J(b);return a};function bb(a,b,c,d,e,f,g,h,p){this.j=a;this.i=b;this.g=c;this.D=d;this.C=e;this.m=f;this.A=g;this.v=void 0!==h?h:g;this.B=!!p}bb.prototype.toString=function(){return this.j};var cb={};
function R(a,b,c,d,e,f,g,h){if(cb.hasOwnProperty(a))throw Error("Function already created: "+a+".");cb[a]=new bb(a,b,c,d,!1,e,f,g,h)}R("boolean",2,!1,!1,function(a,b){return M(b,a)},1);R("ceiling",1,!1,!1,function(a,b){return Math.ceil(K(b,a))},1);R("concat",3,!1,!1,function(a,b){return t(ma(arguments,1),function(b,d){return b+L(d,a)},"")},2,null);R("contains",2,!1,!1,function(a,b,c){return q(L(b,a),L(c,a))},2);R("count",1,!1,!1,function(a,b){return b.a(a).l},1,1,!0);
R("false",2,!1,!1,function(){return!1},0);R("floor",1,!1,!1,function(a,b){return Math.floor(K(b,a))},1);R("id",4,!1,!1,function(a,b){function c(a){if(w){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ka(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),f=[];r(d,function(a){a=c(a);!a||0<=ha(f,a)||f.push(a)});f.sort(La);var g=new C;r(f,function(a){F(g,a)});return g},1);
R("lang",2,!1,!1,function(){return!1},1);R("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);R("local-name",3,!1,!0,function(a,b){var c=b?Ra(b.a(a)):a.a;return c?c.localName||c.nodeName.toLowerCase():""},0,1,!0);R("name",3,!1,!0,function(a,b){var c=b?Ra(b.a(a)):a.a;return c?c.nodeName.toLowerCase():""},0,1,!0);R("namespace-uri",3,!0,!1,function(){return""},0,1,!0);
R("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):z(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);R("not",2,!1,!1,function(a,b){return!M(b,a)},1);R("number",1,!1,!0,function(a,b){return b?K(b,a):+z(a.a)},0,1);R("position",1,!0,!1,function(a){return a.b},0);R("round",1,!1,!1,function(a,b){return Math.round(K(b,a))},1);R("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,!1,!0,function(a,b){return b?L(b,a):z(a.a)},0,1);
R("string-length",1,!1,!0,function(a,b){return(b?L(b,a):z(a.a)).length},0,1);R("substring",3,!1,!1,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);R("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
R("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,!1,!1,function(a,b){for(var c=H(b.a(a)),d=0,e=I(c);e;e=I(c))d+=+z(e);return d},1,1,!0);R("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(d,a);a={};for(d=0;d]=|\s+|./g,hb=/^\s/;function S(a,b){return a.b[a.a+(b||0)]}function T(a){return a.b[a.a++]}function ib(a){return a.b.length<=a.a};function jb(a){n.call(this,3);this.c=a.substring(1,a.length-1)}m(jb);jb.prototype.a=function(){return this.c};jb.prototype.toString=function(){return"Literal: "+this.c};function E(a,b){this.j=a.toLowerCase();var c;c="*"==this.j?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():c}E.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=void 0!==a.localName?a.localName:a.nodeName;return"*"!=this.j&&this.j!=b.toLowerCase()?!1:"*"==this.c?!0:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};E.prototype.f=function(){return this.j};
E.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.j};function kb(a,b){n.call(this,a.i);this.h=a;this.c=b;this.g=a.g;this.b=a.b;if(1==this.c.length){var c=this.c[0];c.u||c.c!=lb||(c=c.o,"*"!=c.f()&&(this.f={name:c.f(),s:null}))}}m(kb);function mb(){n.call(this,4)}m(mb);mb.prototype.a=function(a){var b=new C;a=a.a;9==a.nodeType?F(b,a):F(b,a.ownerDocument);return b};mb.prototype.toString=function(){return"Root Helper Expression"};function nb(){n.call(this,4)}m(nb);nb.prototype.a=function(a){var b=new C;F(b,a.a);return b};nb.prototype.toString=function(){return"Context Helper Expression"};
function ob(a){return"/"==a||"//"==a}kb.prototype.a=function(a){var b=this.h.a(a);if(!(b instanceof C))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;ca.length)throw Error("Unclosed literal string");return new jb(a)}
function Hb(a){var b,c=[],d;if(ob(S(a.a))){b=T(a.a);d=S(a.a);if("/"==b&&(ib(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new mb;d=new mb;W(a,"Missing next location step.");b=Ib(a,b);c.push(b)}else{a:{b=S(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":T(a.a);b=Cb(a);W(a,'unclosed "("');Eb(a,")");break;case '"':case "'":b=Gb(a);break;default:if(isNaN(+b))if(!db(b)&&/(?![0-9])[\w]/.test(d)&&"("==S(a.a,1)){b=T(a.a);
b=cb[b]||null;T(a.a);for(d=[];")"!=S(a.a);){W(a,"Missing function argument list.");d.push(Cb(a));if(","!=S(a.a))break;T(a.a)}W(a,"Unclosed function argument list.");Fb(a);b=new ab(b,d)}else{b=null;break a}else b=new Ab(+T(a.a))}"["==S(a.a)&&(d=new sb(Jb(a)),b=new Za(b,d))}if(b)if(ob(S(a.a)))d=b;else return b;else b=Ib(a,"/"),d=new nb,c.push(b)}for(;ob(S(a.a));)b=T(a.a),W(a,"Missing next location step."),b=Ib(a,b),c.push(b);return new kb(d,c)}
function Ib(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==S(a.a))return d=new U(yb,new G("node")),T(a.a),d;if(".."==S(a.a))return d=new U(xb,new G("node")),T(a.a),d;var f;if("@"==S(a.a))f=lb,T(a.a),W(a,"Missing attribute name");else if("::"==S(a.a,1)){if(!/(?![0-9])[\w]/.test(S(a.a).charAt(0)))throw Error("Bad token: "+T(a.a));c=T(a.a);f=wb[c]||null;if(!f)throw Error("No axis with name: "+c);T(a.a);W(a,"Missing node name")}else f=tb;c=S(a.a);if(/(?![0-9])[\w\*]/.test(c.charAt(0)))if("("==
S(a.a,1)){if(!db(c))throw Error("Invalid node type: "+c);c=T(a.a);if(!db(c))throw Error("Invalid type name: "+c);Eb(a,"(");W(a,"Bad nodetype");e=S(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Gb(a);W(a,"Bad nodetype");Fb(a);c=new G(c,g)}else if(c=T(a.a),e=c.indexOf(":"),-1==e)c=new E(c);else{var g=c.substring(0,e),h;if("*"==g)h="*";else if(h=a.b(g),!h)throw Error("Namespace prefix not declared: "+g);c=c.substr(e+1);c=new E(c,h)}else throw Error("Bad token: "+T(a.a));e=new sb(Jb(a),f.a);return d||
new U(f,c,e,"//"==b)}function Jb(a){for(var b=[];"["==S(a.a);){T(a.a);W(a,"Missing predicate expression.");var c=Cb(a);b.push(c);W(a,"Unclosed predicate expression.");Eb(a,"]")}return b}function Db(a){if("-"==S(a.a))return T(a.a),new zb(Db(a));var b=Hb(a);if("|"!=S(a.a))a=b;else{for(b=[b];"|"==T(a.a);)W(a,"Missing next union location path."),b.push(Hb(a));a.a.a--;a=new rb(b)}return a};function Kb(a){switch(a.nodeType){case 1:return ea(Lb,a);case 9:return Kb(a.documentElement);case 11:case 10:case 6:case 12:return Mb;default:return a.parentNode?Kb(a.parentNode):Mb}}function Mb(){return null}function Lb(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?Lb(a.parentNode,b):null};function Nb(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=fb(a);if(ib(c))throw Error("Invalid XPath expression.");b?"function"==aa(b)||(b=da(b.lookupNamespaceURI,b)):b=function(){return null};var d=Cb(new Bb(c,b));if(!ib(c))throw Error("Bad token: "+T(c));this.evaluate=function(a,b){var c=d.a(new Q(a));return new Y(c,b)}}
function Y(a,b){if(0==b)if(a instanceof C)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof C))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof C?Sa(a):""+a;break;case 1:this.numberValue=a instanceof C?+Sa(a):+a;break;case 3:this.booleanValue=a instanceof C?0=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=c.length||
0>a?null:c[a]}}Y.ANY_TYPE=0;Y.NUMBER_TYPE=1;Y.STRING_TYPE=2;Y.BOOLEAN_TYPE=3;Y.UNORDERED_NODE_ITERATOR_TYPE=4;Y.ORDERED_NODE_ITERATOR_TYPE=5;Y.UNORDERED_NODE_SNAPSHOT_TYPE=6;Y.ORDERED_NODE_SNAPSHOT_TYPE=7;Y.ANY_UNORDERED_NODE_TYPE=8;Y.FIRST_ORDERED_NODE_TYPE=9;function Ob(a){this.lookupNamespaceURI=Kb(a)}
function Pb(a,b){var c=a||k,d=c.Document&&c.Document.prototype||c.document;if(!d.evaluate||b)c.XPathResult=Y,d.evaluate=function(a,b,c,d){return(new Nb(a,c)).evaluate(b,d)},d.createExpression=function(a,b){return new Nb(a,b)},d.createNSResolver=function(a){return new Ob(a)}}var Qb=["wgxpath","install"],Z=k;Qb[0]in Z||!Z.execScript||Z.execScript("var "+Qb[0]);for(var Rb;Qb.length&&(Rb=Qb.shift());)Qb.length||void 0===Pb?Z[Rb]?Z=Z[Rb]:Z=Z[Rb]={}:Z[Rb]=Pb;module.exports.install=Pb;module.exports.XPathResultType={ANY_TYPE:0,NUMBER_TYPE:1,STRING_TYPE:2,BOOLEAN_TYPE:3,UNORDERED_NODE_ITERATOR_TYPE:4,ORDERED_NODE_ITERATOR_TYPE:5,UNORDERED_NODE_SNAPSHOT_TYPE:6,ORDERED_NODE_SNAPSHOT_TYPE:7,ANY_UNORDERED_NODE_TYPE:8,FIRST_ORDERED_NODE_TYPE:9};}).call(__webpack_require__.g)
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/create fake namespace object */
/******/ (() => {
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
/******/ var leafPrototypes;
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 16: return value when it's Promise-like
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = this(value);
/******/ if(mode & 8) return value;
/******/ if(typeof value === 'object' && value) {
/******/ if((mode & 4) && value.__esModule) return value;
/******/ if((mode & 16) && typeof value.then === 'function') return value;
/******/ }
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ var def = {};
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
/******/ }
/******/ def['default'] = () => (value);
/******/ __webpack_require__.d(ns, def);
/******/ return ns;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
(() => {
"use strict";
// NAMESPACE OBJECT: ./mjs/components/global.js
var global_namespaceObject = {};
__webpack_require__.r(global_namespaceObject);
__webpack_require__.d(global_namespaceObject, {
GLOBAL: () => (GLOBAL),
MathJax: () => (global_MathJax),
combineConfig: () => (combineConfig),
combineDefaults: () => (combineDefaults),
combineWithMathJax: () => (combineWithMathJax),
isObject: () => (isObject)
});
// NAMESPACE OBJECT: ./mjs/util/context.js
var context_namespaceObject = {};
__webpack_require__.r(context_namespaceObject);
__webpack_require__.d(context_namespaceObject, {
context: () => (context),
hasWindow: () => (hasWindow)
});
// NAMESPACE OBJECT: ./mjs/components/package.js
var package_namespaceObject = {};
__webpack_require__.r(package_namespaceObject);
__webpack_require__.d(package_namespaceObject, {
Package: () => (Package),
PackageError: () => (PackageError)
});
// NAMESPACE OBJECT: ./mjs/util/PrioritizedList.js
var PrioritizedList_namespaceObject = {};
__webpack_require__.r(PrioritizedList_namespaceObject);
__webpack_require__.d(PrioritizedList_namespaceObject, {
PrioritizedList: () => (PrioritizedList)
});
// NAMESPACE OBJECT: ./mjs/util/FunctionList.js
var FunctionList_namespaceObject = {};
__webpack_require__.r(FunctionList_namespaceObject);
__webpack_require__.d(FunctionList_namespaceObject, {
FunctionList: () => (FunctionList)
});
// NAMESPACE OBJECT: ./mjs/components/loader.js
var loader_namespaceObject = {};
__webpack_require__.r(loader_namespaceObject);
__webpack_require__.d(loader_namespaceObject, {
CONFIG: () => (CONFIG),
Loader: () => (Loader),
MathJax: () => (loader_MathJax),
PathFilters: () => (PathFilters)
});
// NAMESPACE OBJECT: ./mjs/util/Options.js
var Options_namespaceObject = {};
__webpack_require__.r(Options_namespaceObject);
__webpack_require__.d(Options_namespaceObject, {
APPEND: () => (APPEND),
Expandable: () => (Expandable),
OPTIONS: () => (OPTIONS),
REMOVE: () => (REMOVE),
copy: () => (copy),
defaultOptions: () => (defaultOptions),
expandable: () => (expandable),
insert: () => (insert),
isObject: () => (Options_isObject),
keys: () => (keys),
lookup: () => (lookup),
makeArray: () => (makeArray),
selectOptions: () => (selectOptions),
selectOptionsFromKeys: () => (selectOptionsFromKeys),
separateOptions: () => (separateOptions),
userOptions: () => (userOptions)
});
// NAMESPACE OBJECT: ./mjs/components/startup.js
var startup_namespaceObject = {};
__webpack_require__.r(startup_namespaceObject);
__webpack_require__.d(startup_namespaceObject, {
CONFIG: () => (startup_CONFIG),
MathJax: () => (startup_MathJax),
Startup: () => (Startup)
});
// NAMESPACE OBJECT: ./mjs/core/DOMAdaptor.js
var DOMAdaptor_namespaceObject = {};
__webpack_require__.r(DOMAdaptor_namespaceObject);
__webpack_require__.d(DOMAdaptor_namespaceObject, {
AbstractDOMAdaptor: () => (AbstractDOMAdaptor)
});
// NAMESPACE OBJECT: ./mjs/adaptors/HTMLAdaptor.js
var HTMLAdaptor_namespaceObject = {};
__webpack_require__.r(HTMLAdaptor_namespaceObject);
__webpack_require__.d(HTMLAdaptor_namespaceObject, {
HTMLAdaptor: () => (HTMLAdaptor)
});
// NAMESPACE OBJECT: ./mjs/adaptors/browserAdaptor.js
var browserAdaptor_namespaceObject = {};
__webpack_require__.r(browserAdaptor_namespaceObject);
__webpack_require__.d(browserAdaptor_namespaceObject, {
browserAdaptor: () => (browserAdaptor)
});
// NAMESPACE OBJECT: ./mjs/core/FindMath.js
var FindMath_namespaceObject = {};
__webpack_require__.r(FindMath_namespaceObject);
__webpack_require__.d(FindMath_namespaceObject, {
AbstractFindMath: () => (AbstractFindMath)
});
// NAMESPACE OBJECT: ./mjs/core/InputJax.js
var InputJax_namespaceObject = {};
__webpack_require__.r(InputJax_namespaceObject);
__webpack_require__.d(InputJax_namespaceObject, {
AbstractInputJax: () => (AbstractInputJax)
});
// NAMESPACE OBJECT: ./mjs/core/OutputJax.js
var OutputJax_namespaceObject = {};
__webpack_require__.r(OutputJax_namespaceObject);
__webpack_require__.d(OutputJax_namespaceObject, {
AbstractOutputJax: () => (AbstractOutputJax)
});
// NAMESPACE OBJECT: ./mjs/util/LinkedList.js
var LinkedList_namespaceObject = {};
__webpack_require__.r(LinkedList_namespaceObject);
__webpack_require__.d(LinkedList_namespaceObject, {
END: () => (END),
LinkedList: () => (LinkedList),
ListItem: () => (ListItem)
});
// NAMESPACE OBJECT: ./mjs/core/MathList.js
var MathList_namespaceObject = {};
__webpack_require__.r(MathList_namespaceObject);
__webpack_require__.d(MathList_namespaceObject, {
AbstractMathList: () => (AbstractMathList)
});
// NAMESPACE OBJECT: ./mjs/core/MathItem.js
var MathItem_namespaceObject = {};
__webpack_require__.r(MathItem_namespaceObject);
__webpack_require__.d(MathItem_namespaceObject, {
AbstractMathItem: () => (AbstractMathItem),
STATE: () => (STATE),
newState: () => (newState),
protoItem: () => (protoItem)
});
// NAMESPACE OBJECT: ./mjs/core/Tree/Factory.js
var Factory_namespaceObject = {};
__webpack_require__.r(Factory_namespaceObject);
__webpack_require__.d(Factory_namespaceObject, {
AbstractFactory: () => (AbstractFactory)
});
// NAMESPACE OBJECT: ./mjs/core/Tree/NodeFactory.js
var NodeFactory_namespaceObject = {};
__webpack_require__.r(NodeFactory_namespaceObject);
__webpack_require__.d(NodeFactory_namespaceObject, {
AbstractNodeFactory: () => (AbstractNodeFactory)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/Attributes.js
var Attributes_namespaceObject = {};
__webpack_require__.r(Attributes_namespaceObject);
__webpack_require__.d(Attributes_namespaceObject, {
Attributes: () => (Attributes),
INHERIT: () => (INHERIT)
});
// NAMESPACE OBJECT: ./mjs/core/Tree/Node.js
var Node_namespaceObject = {};
__webpack_require__.r(Node_namespaceObject);
__webpack_require__.d(Node_namespaceObject, {
AbstractEmptyNode: () => (AbstractEmptyNode),
AbstractNode: () => (AbstractNode)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNode.js
var MmlNode_namespaceObject = {};
__webpack_require__.r(MmlNode_namespaceObject);
__webpack_require__.d(MmlNode_namespaceObject, {
AbstractMmlBaseNode: () => (AbstractMmlBaseNode),
AbstractMmlEmptyNode: () => (AbstractMmlEmptyNode),
AbstractMmlLayoutNode: () => (AbstractMmlLayoutNode),
AbstractMmlNode: () => (AbstractMmlNode),
AbstractMmlTokenNode: () => (AbstractMmlTokenNode),
MATHVARIANTS: () => (MATHVARIANTS),
TEXCLASS: () => (TEXCLASS),
TEXCLASSNAMES: () => (TEXCLASSNAMES),
TextNode: () => (TextNode),
XMLNode: () => (XMLNode),
indentAttributes: () => (indentAttributes)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/math.js
var math_namespaceObject = {};
__webpack_require__.r(math_namespaceObject);
__webpack_require__.d(math_namespaceObject, {
MmlMath: () => (MmlMath)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mi.js
var mi_namespaceObject = {};
__webpack_require__.r(mi_namespaceObject);
__webpack_require__.d(mi_namespaceObject, {
MmlMi: () => (MmlMi)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mn.js
var mn_namespaceObject = {};
__webpack_require__.r(mn_namespaceObject);
__webpack_require__.d(mn_namespaceObject, {
MmlMn: () => (MmlMn)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/OperatorDictionary.js
var OperatorDictionary_namespaceObject = {};
__webpack_require__.r(OperatorDictionary_namespaceObject);
__webpack_require__.d(OperatorDictionary_namespaceObject, {
MMLSPACING: () => (MMLSPACING),
MO: () => (MO),
OPDEF: () => (OPDEF),
OPTABLE: () => (OPTABLE),
RANGES: () => (RANGES),
getRange: () => (getRange)
});
// NAMESPACE OBJECT: ./mjs/util/string.js
var string_namespaceObject = {};
__webpack_require__.r(string_namespaceObject);
__webpack_require__.d(string_namespaceObject, {
isPercent: () => (isPercent),
quotePattern: () => (quotePattern),
replaceUnicode: () => (replaceUnicode),
sortLength: () => (sortLength),
split: () => (split),
toEntity: () => (toEntity),
unicodeChars: () => (unicodeChars),
unicodeString: () => (unicodeString)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mo.js
var mo_namespaceObject = {};
__webpack_require__.r(mo_namespaceObject);
__webpack_require__.d(mo_namespaceObject, {
MmlMo: () => (MmlMo)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mtext.js
var mtext_namespaceObject = {};
__webpack_require__.r(mtext_namespaceObject);
__webpack_require__.d(mtext_namespaceObject, {
MmlMtext: () => (MmlMtext)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mspace.js
var mspace_namespaceObject = {};
__webpack_require__.r(mspace_namespaceObject);
__webpack_require__.d(mspace_namespaceObject, {
MmlMspace: () => (MmlMspace)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/ms.js
var ms_namespaceObject = {};
__webpack_require__.r(ms_namespaceObject);
__webpack_require__.d(ms_namespaceObject, {
MmlMs: () => (MmlMs)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mrow.js
var mrow_namespaceObject = {};
__webpack_require__.r(mrow_namespaceObject);
__webpack_require__.d(mrow_namespaceObject, {
MmlInferredMrow: () => (MmlInferredMrow),
MmlMrow: () => (MmlMrow)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mfrac.js
var mfrac_namespaceObject = {};
__webpack_require__.r(mfrac_namespaceObject);
__webpack_require__.d(mfrac_namespaceObject, {
MmlMfrac: () => (MmlMfrac)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/msqrt.js
var msqrt_namespaceObject = {};
__webpack_require__.r(msqrt_namespaceObject);
__webpack_require__.d(msqrt_namespaceObject, {
MmlMsqrt: () => (MmlMsqrt)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mroot.js
var mroot_namespaceObject = {};
__webpack_require__.r(mroot_namespaceObject);
__webpack_require__.d(mroot_namespaceObject, {
MmlMroot: () => (MmlMroot)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mstyle.js
var mstyle_namespaceObject = {};
__webpack_require__.r(mstyle_namespaceObject);
__webpack_require__.d(mstyle_namespaceObject, {
MmlMstyle: () => (MmlMstyle)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/merror.js
var merror_namespaceObject = {};
__webpack_require__.r(merror_namespaceObject);
__webpack_require__.d(merror_namespaceObject, {
MmlMerror: () => (MmlMerror)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mpadded.js
var mpadded_namespaceObject = {};
__webpack_require__.r(mpadded_namespaceObject);
__webpack_require__.d(mpadded_namespaceObject, {
MmlMpadded: () => (MmlMpadded)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mphantom.js
var mphantom_namespaceObject = {};
__webpack_require__.r(mphantom_namespaceObject);
__webpack_require__.d(mphantom_namespaceObject, {
MmlMphantom: () => (MmlMphantom)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mfenced.js
var mfenced_namespaceObject = {};
__webpack_require__.r(mfenced_namespaceObject);
__webpack_require__.d(mfenced_namespaceObject, {
MmlMfenced: () => (MmlMfenced)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/menclose.js
var menclose_namespaceObject = {};
__webpack_require__.r(menclose_namespaceObject);
__webpack_require__.d(menclose_namespaceObject, {
MmlMenclose: () => (MmlMenclose)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/maction.js
var maction_namespaceObject = {};
__webpack_require__.r(maction_namespaceObject);
__webpack_require__.d(maction_namespaceObject, {
MmlMaction: () => (MmlMaction)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/msubsup.js
var msubsup_namespaceObject = {};
__webpack_require__.r(msubsup_namespaceObject);
__webpack_require__.d(msubsup_namespaceObject, {
MmlMsub: () => (MmlMsub),
MmlMsubsup: () => (MmlMsubsup),
MmlMsup: () => (MmlMsup)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/munderover.js
var munderover_namespaceObject = {};
__webpack_require__.r(munderover_namespaceObject);
__webpack_require__.d(munderover_namespaceObject, {
MmlMover: () => (MmlMover),
MmlMunder: () => (MmlMunder),
MmlMunderover: () => (MmlMunderover)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mmultiscripts.js
var mmultiscripts_namespaceObject = {};
__webpack_require__.r(mmultiscripts_namespaceObject);
__webpack_require__.d(mmultiscripts_namespaceObject, {
MmlMmultiscripts: () => (MmlMmultiscripts),
MmlMprescripts: () => (MmlMprescripts),
MmlNone: () => (MmlNone)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mtable.js
var mtable_namespaceObject = {};
__webpack_require__.r(mtable_namespaceObject);
__webpack_require__.d(mtable_namespaceObject, {
MmlMtable: () => (MmlMtable)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mtr.js
var mtr_namespaceObject = {};
__webpack_require__.r(mtr_namespaceObject);
__webpack_require__.d(mtr_namespaceObject, {
MmlMlabeledtr: () => (MmlMlabeledtr),
MmlMtr: () => (MmlMtr)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mtd.js
var mtd_namespaceObject = {};
__webpack_require__.r(mtd_namespaceObject);
__webpack_require__.d(mtd_namespaceObject, {
MmlMtd: () => (MmlMtd)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/maligngroup.js
var maligngroup_namespaceObject = {};
__webpack_require__.r(maligngroup_namespaceObject);
__webpack_require__.d(maligngroup_namespaceObject, {
MmlMaligngroup: () => (MmlMaligngroup)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/malignmark.js
var malignmark_namespaceObject = {};
__webpack_require__.r(malignmark_namespaceObject);
__webpack_require__.d(malignmark_namespaceObject, {
MmlMalignmark: () => (MmlMalignmark)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mglyph.js
var mglyph_namespaceObject = {};
__webpack_require__.r(mglyph_namespaceObject);
__webpack_require__.d(mglyph_namespaceObject, {
MmlMglyph: () => (MmlMglyph)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/semantics.js
var semantics_namespaceObject = {};
__webpack_require__.r(semantics_namespaceObject);
__webpack_require__.d(semantics_namespaceObject, {
MmlAnnotation: () => (MmlAnnotation),
MmlAnnotationXML: () => (MmlAnnotationXML),
MmlSemantics: () => (MmlSemantics)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/TeXAtom.js
var TeXAtom_namespaceObject = {};
__webpack_require__.r(TeXAtom_namespaceObject);
__webpack_require__.d(TeXAtom_namespaceObject, {
TeXAtom: () => (TeXAtom)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/mathchoice.js
var mathchoice_namespaceObject = {};
__webpack_require__.r(mathchoice_namespaceObject);
__webpack_require__.d(mathchoice_namespaceObject, {
MathChoice: () => (MathChoice)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlNodes/HtmlNode.js
var HtmlNode_namespaceObject = {};
__webpack_require__.r(HtmlNode_namespaceObject);
__webpack_require__.d(HtmlNode_namespaceObject, {
HtmlNode: () => (HtmlNode)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MML.js
var MML_namespaceObject = {};
__webpack_require__.r(MML_namespaceObject);
__webpack_require__.d(MML_namespaceObject, {
MML: () => (MML)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlFactory.js
var MmlFactory_namespaceObject = {};
__webpack_require__.r(MmlFactory_namespaceObject);
__webpack_require__.d(MmlFactory_namespaceObject, {
MmlFactory: () => (MmlFactory)
});
// NAMESPACE OBJECT: ./mjs/util/BitField.js
var BitField_namespaceObject = {};
__webpack_require__.r(BitField_namespaceObject);
__webpack_require__.d(BitField_namespaceObject, {
BitField: () => (BitField),
BitFieldClass: () => (BitFieldClass)
});
// NAMESPACE OBJECT: ./mjs/util/Retries.js
var Retries_namespaceObject = {};
__webpack_require__.r(Retries_namespaceObject);
__webpack_require__.d(Retries_namespaceObject, {
handleRetriesFor: () => (handleRetriesFor),
retryAfter: () => (retryAfter)
});
// NAMESPACE OBJECT: ./mjs/core/MathDocument.js
var MathDocument_namespaceObject = {};
__webpack_require__.r(MathDocument_namespaceObject);
__webpack_require__.d(MathDocument_namespaceObject, {
AbstractMathDocument: () => (AbstractMathDocument),
RenderList: () => (RenderList),
resetAllOptions: () => (resetAllOptions),
resetOptions: () => (resetOptions)
});
// NAMESPACE OBJECT: ./mjs/core/Handler.js
var Handler_namespaceObject = {};
__webpack_require__.r(Handler_namespaceObject);
__webpack_require__.d(Handler_namespaceObject, {
AbstractHandler: () => (AbstractHandler)
});
// NAMESPACE OBJECT: ./mjs/core/HandlerList.js
var HandlerList_namespaceObject = {};
__webpack_require__.r(HandlerList_namespaceObject);
__webpack_require__.d(HandlerList_namespaceObject, {
HandlerList: () => (HandlerList)
});
// NAMESPACE OBJECT: ./mjs/core/Tree/Visitor.js
var Visitor_namespaceObject = {};
__webpack_require__.r(Visitor_namespaceObject);
__webpack_require__.d(Visitor_namespaceObject, {
AbstractVisitor: () => (AbstractVisitor)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MmlVisitor.js
var MmlVisitor_namespaceObject = {};
__webpack_require__.r(MmlVisitor_namespaceObject);
__webpack_require__.d(MmlVisitor_namespaceObject, {
DATAMJX: () => (DATAMJX),
MmlVisitor: () => (MmlVisitor)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/MathMLVisitor.js
var MathMLVisitor_namespaceObject = {};
__webpack_require__.r(MathMLVisitor_namespaceObject);
__webpack_require__.d(MathMLVisitor_namespaceObject, {
MathMLVisitor: () => (MathMLVisitor)
});
// NAMESPACE OBJECT: ./mjs/core/MmlTree/SerializedMmlVisitor.js
var SerializedMmlVisitor_namespaceObject = {};
__webpack_require__.r(SerializedMmlVisitor_namespaceObject);
__webpack_require__.d(SerializedMmlVisitor_namespaceObject, {
SerializedMmlVisitor: () => (SerializedMmlVisitor)
});
// NAMESPACE OBJECT: ./mjs/core/Tree/Wrapper.js
var Wrapper_namespaceObject = {};
__webpack_require__.r(Wrapper_namespaceObject);
__webpack_require__.d(Wrapper_namespaceObject, {
AbstractWrapper: () => (AbstractWrapper)
});
// NAMESPACE OBJECT: ./mjs/core/Tree/WrapperFactory.js
var WrapperFactory_namespaceObject = {};
__webpack_require__.r(WrapperFactory_namespaceObject);
__webpack_require__.d(WrapperFactory_namespaceObject, {
AbstractWrapperFactory: () => (AbstractWrapperFactory)
});
// NAMESPACE OBJECT: ./mjs/mathjax.js
var mathjax_namespaceObject = {};
__webpack_require__.r(mathjax_namespaceObject);
__webpack_require__.d(mathjax_namespaceObject, {
mathjax: () => (mathjax)
});
// NAMESPACE OBJECT: ./mjs/handlers/html/HTMLMathItem.js
var HTMLMathItem_namespaceObject = {};
__webpack_require__.r(HTMLMathItem_namespaceObject);
__webpack_require__.d(HTMLMathItem_namespaceObject, {
HTMLMathItem: () => (HTMLMathItem)
});
// NAMESPACE OBJECT: ./mjs/handlers/html/HTMLMathList.js
var HTMLMathList_namespaceObject = {};
__webpack_require__.r(HTMLMathList_namespaceObject);
__webpack_require__.d(HTMLMathList_namespaceObject, {
HTMLMathList: () => (HTMLMathList)
});
// NAMESPACE OBJECT: ./mjs/handlers/html/HTMLDomStrings.js
var HTMLDomStrings_namespaceObject = {};
__webpack_require__.r(HTMLDomStrings_namespaceObject);
__webpack_require__.d(HTMLDomStrings_namespaceObject, {
HTMLDomStrings: () => (HTMLDomStrings)
});
// NAMESPACE OBJECT: ./mjs/handlers/html/HTMLDocument.js
var HTMLDocument_namespaceObject = {};
__webpack_require__.r(HTMLDocument_namespaceObject);
__webpack_require__.d(HTMLDocument_namespaceObject, {
HTMLDocument: () => (HTMLDocument)
});
// NAMESPACE OBJECT: ./mjs/handlers/html/HTMLHandler.js
var HTMLHandler_namespaceObject = {};
__webpack_require__.r(HTMLHandler_namespaceObject);
__webpack_require__.d(HTMLHandler_namespaceObject, {
HTMLHandler: () => (HTMLHandler)
});
// NAMESPACE OBJECT: ./mjs/handlers/html.js
var html_namespaceObject = {};
__webpack_require__.r(html_namespaceObject);
__webpack_require__.d(html_namespaceObject, {
RegisterHTMLHandler: () => (RegisterHTMLHandler)
});
// NAMESPACE OBJECT: ./mjs/util/AsyncLoad.js
var AsyncLoad_namespaceObject = {};
__webpack_require__.r(AsyncLoad_namespaceObject);
__webpack_require__.d(AsyncLoad_namespaceObject, {
asyncLoad: () => (asyncLoad)
});
// NAMESPACE OBJECT: ./mjs/util/lengths.js
var lengths_namespaceObject = {};
__webpack_require__.r(lengths_namespaceObject);
__webpack_require__.d(lengths_namespaceObject, {
BIGDIMEN: () => (BIGDIMEN),
MATHSPACE: () => (MATHSPACE),
RELUNITS: () => (RELUNITS),
UNITS: () => (UNITS),
em: () => (em),
length2em: () => (length2em),
percent: () => (percent),
px: () => (px)
});
// NAMESPACE OBJECT: ./mjs/util/BBox.js
var BBox_namespaceObject = {};
__webpack_require__.r(BBox_namespaceObject);
__webpack_require__.d(BBox_namespaceObject, {
BBox: () => (BBox)
});
// NAMESPACE OBJECT: ./mjs/util/Entities.js
var Entities_namespaceObject = {};
__webpack_require__.r(Entities_namespaceObject);
__webpack_require__.d(Entities_namespaceObject, {
add: () => (add),
entities: () => (entities),
numeric: () => (numeric),
options: () => (options),
remove: () => (remove),
translate: () => (translate)
});
// NAMESPACE OBJECT: ./mjs/util/StyleJson.js
var StyleJson_namespaceObject = {};
__webpack_require__.r(StyleJson_namespaceObject);
__webpack_require__.d(StyleJson_namespaceObject, {
StyleJsonSheet: () => (StyleJsonSheet)
});
// NAMESPACE OBJECT: ./mjs/util/Styles.js
var Styles_namespaceObject = {};
__webpack_require__.r(Styles_namespaceObject);
__webpack_require__.d(Styles_namespaceObject, {
Styles: () => (Styles),
TRBL: () => (TRBL),
WSC: () => (WSC)
});
// NAMESPACE OBJECT: ./mjs/util/numeric.js
var numeric_namespaceObject = {};
__webpack_require__.r(numeric_namespaceObject);
__webpack_require__.d(numeric_namespaceObject, {
max: () => (max),
sum: () => (sum)
});
// NAMESPACE OBJECT: ./mjs/input/tex/FindTeX.js
var FindTeX_namespaceObject = {};
__webpack_require__.r(FindTeX_namespaceObject);
__webpack_require__.d(FindTeX_namespaceObject, {
FindTeX: () => (FindTeX)
});
// NAMESPACE OBJECT: ./mjs/input/tex/NodeUtil.js
var NodeUtil_namespaceObject = {};
__webpack_require__.r(NodeUtil_namespaceObject);
__webpack_require__.d(NodeUtil_namespaceObject, {
"default": () => (tex_NodeUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/FilterUtil.js
var FilterUtil_namespaceObject = {};
__webpack_require__.r(FilterUtil_namespaceObject);
__webpack_require__.d(FilterUtil_namespaceObject, {
"default": () => (tex_FilterUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/HandlerTypes.js
var HandlerTypes_namespaceObject = {};
__webpack_require__.r(HandlerTypes_namespaceObject);
__webpack_require__.d(HandlerTypes_namespaceObject, {
ConfigurationType: () => (ConfigurationType),
HandlerType: () => (HandlerType)
});
// NAMESPACE OBJECT: ./mjs/input/tex/UnitUtil.js
var UnitUtil_namespaceObject = {};
__webpack_require__.r(UnitUtil_namespaceObject);
__webpack_require__.d(UnitUtil_namespaceObject, {
UnitUtil: () => (UnitUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Stack.js
var Stack_namespaceObject = {};
__webpack_require__.r(Stack_namespaceObject);
__webpack_require__.d(Stack_namespaceObject, {
"default": () => (Stack)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TexError.js
var TexError_namespaceObject = {};
__webpack_require__.r(TexError_namespaceObject);
__webpack_require__.d(TexError_namespaceObject, {
"default": () => (tex_TexError)
});
// NAMESPACE OBJECT: ./mjs/input/tex/StackItem.js
var StackItem_namespaceObject = {};
__webpack_require__.r(StackItem_namespaceObject);
__webpack_require__.d(StackItem_namespaceObject, {
BaseItem: () => (BaseItem),
MmlStack: () => (MmlStack)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TexConstants.js
var TexConstants_namespaceObject = {};
__webpack_require__.r(TexConstants_namespaceObject);
__webpack_require__.d(TexConstants_namespaceObject, {
TexConstant: () => (TexConstant)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TexParser.js
var TexParser_namespaceObject = {};
__webpack_require__.r(TexParser_namespaceObject);
__webpack_require__.d(TexParser_namespaceObject, {
"default": () => (TexParser)
});
// NAMESPACE OBJECT: ./mjs/input/tex/StackItemFactory.js
var StackItemFactory_namespaceObject = {};
__webpack_require__.r(StackItemFactory_namespaceObject);
__webpack_require__.d(StackItemFactory_namespaceObject, {
"default": () => (tex_StackItemFactory)
});
// NAMESPACE OBJECT: ./mjs/input/tex/NodeFactory.js
var tex_NodeFactory_namespaceObject = {};
__webpack_require__.r(tex_NodeFactory_namespaceObject);
__webpack_require__.d(tex_NodeFactory_namespaceObject, {
NodeFactory: () => (NodeFactory)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ParseUtil.js
var ParseUtil_namespaceObject = {};
__webpack_require__.r(ParseUtil_namespaceObject);
__webpack_require__.d(ParseUtil_namespaceObject, {
KeyValueDef: () => (KeyValueDef),
KeyValueTypes: () => (KeyValueTypes),
ParseUtil: () => (ParseUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ColumnParser.js
var ColumnParser_namespaceObject = {};
__webpack_require__.r(ColumnParser_namespaceObject);
__webpack_require__.d(ColumnParser_namespaceObject, {
ColumnParser: () => (ColumnParser)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ParseOptions.js
var ParseOptions_namespaceObject = {};
__webpack_require__.r(ParseOptions_namespaceObject);
__webpack_require__.d(ParseOptions_namespaceObject, {
"default": () => (tex_ParseOptions)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Tags.js
var Tags_namespaceObject = {};
__webpack_require__.r(Tags_namespaceObject);
__webpack_require__.d(Tags_namespaceObject, {
AbstractTags: () => (AbstractTags),
AllTags: () => (AllTags),
Label: () => (Label),
NoTags: () => (NoTags),
TagInfo: () => (TagInfo),
TagsFactory: () => (TagsFactory)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Token.js
var Token_namespaceObject = {};
__webpack_require__.r(Token_namespaceObject);
__webpack_require__.d(Token_namespaceObject, {
Macro: () => (Macro),
Token: () => (Token)
});
// NAMESPACE OBJECT: ./mjs/input/tex/TokenMap.js
var TokenMap_namespaceObject = {};
__webpack_require__.r(TokenMap_namespaceObject);
__webpack_require__.d(TokenMap_namespaceObject, {
AbstractParseMap: () => (AbstractParseMap),
AbstractTokenMap: () => (AbstractTokenMap),
CharacterMap: () => (CharacterMap),
CommandMap: () => (CommandMap),
DelimiterMap: () => (DelimiterMap),
EnvironmentMap: () => (EnvironmentMap),
MacroMap: () => (MacroMap),
RegExpMap: () => (RegExpMap),
parseResult: () => (parseResult)
});
// NAMESPACE OBJECT: ./mjs/input/tex/MapHandler.js
var MapHandler_namespaceObject = {};
__webpack_require__.r(MapHandler_namespaceObject);
__webpack_require__.d(MapHandler_namespaceObject, {
MapHandler: () => (MapHandler),
SubHandler: () => (SubHandler),
SubHandlers: () => (SubHandlers)
});
// NAMESPACE OBJECT: ./mjs/input/tex/Configuration.js
var Configuration_namespaceObject = {};
__webpack_require__.r(Configuration_namespaceObject);
__webpack_require__.d(Configuration_namespaceObject, {
Configuration: () => (Configuration),
ConfigurationHandler: () => (ConfigurationHandler),
ParserConfiguration: () => (ParserConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/base/BaseItems.js
var BaseItems_namespaceObject = {};
__webpack_require__.r(BaseItems_namespaceObject);
__webpack_require__.d(BaseItems_namespaceObject, {
ArrayItem: () => (ArrayItem),
BeginItem: () => (BeginItem),
BreakItem: () => (BreakItem),
CellItem: () => (CellItem),
CloseItem: () => (CloseItem),
DotsItem: () => (DotsItem),
EndItem: () => (EndItem),
EqnArrayItem: () => (EqnArrayItem),
EquationItem: () => (EquationItem),
FnItem: () => (FnItem),
LeftItem: () => (LeftItem),
Middle: () => (Middle),
MmlItem: () => (MmlItem),
MstyleItem: () => (MstyleItem),
NonscriptItem: () => (NonscriptItem),
NotItem: () => (NotItem),
NullItem: () => (NullItem),
OpenItem: () => (OpenItem),
OverItem: () => (OverItem),
PositionItem: () => (PositionItem),
PrimeItem: () => (PrimeItem),
RightItem: () => (RightItem),
StartItem: () => (StartItem),
StopItem: () => (StopItem),
StyleItem: () => (StyleItem),
SubsupItem: () => (SubsupItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/base/BaseMethods.js
var BaseMethods_namespaceObject = {};
__webpack_require__.r(BaseMethods_namespaceObject);
__webpack_require__.d(BaseMethods_namespaceObject, {
"default": () => (base_BaseMethods),
splitAlignArray: () => (splitAlignArray)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ParseMethods.js
var ParseMethods_namespaceObject = {};
__webpack_require__.r(ParseMethods_namespaceObject);
__webpack_require__.d(ParseMethods_namespaceObject, {
"default": () => (tex_ParseMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/base/BaseConfiguration.js
var BaseConfiguration_namespaceObject = {};
__webpack_require__.r(BaseConfiguration_namespaceObject);
__webpack_require__.d(BaseConfiguration_namespaceObject, {
BaseConfiguration: () => (BaseConfiguration),
BaseTags: () => (BaseTags),
Other: () => (Other)
});
// NAMESPACE OBJECT: ./mjs/input/tex.js
var tex_namespaceObject = {};
__webpack_require__.r(tex_namespaceObject);
__webpack_require__.d(tex_namespaceObject, {
TeX: () => (TeX)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ams/AmsItems.js
var AmsItems_namespaceObject = {};
__webpack_require__.r(AmsItems_namespaceObject);
__webpack_require__.d(AmsItems_namespaceObject, {
FlalignItem: () => (FlalignItem),
MultlineItem: () => (MultlineItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandUtil.js
var NewcommandUtil_namespaceObject = {};
__webpack_require__.r(NewcommandUtil_namespaceObject);
__webpack_require__.d(NewcommandUtil_namespaceObject, {
NewcommandPriority: () => (NewcommandPriority),
NewcommandTables: () => (NewcommandTables),
NewcommandUtil: () => (NewcommandUtil)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ams/AmsMethods.js
var AmsMethods_namespaceObject = {};
__webpack_require__.r(AmsMethods_namespaceObject);
__webpack_require__.d(AmsMethods_namespaceObject, {
AmsMethods: () => (AmsMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandItems.js
var NewcommandItems_namespaceObject = {};
__webpack_require__.r(NewcommandItems_namespaceObject);
__webpack_require__.d(NewcommandItems_namespaceObject, {
BeginEnvItem: () => (BeginEnvItem)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandMethods.js
var NewcommandMethods_namespaceObject = {};
__webpack_require__.r(NewcommandMethods_namespaceObject);
__webpack_require__.d(NewcommandMethods_namespaceObject, {
"default": () => (newcommand_NewcommandMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/newcommand/NewcommandConfiguration.js
var NewcommandConfiguration_namespaceObject = {};
__webpack_require__.r(NewcommandConfiguration_namespaceObject);
__webpack_require__.d(NewcommandConfiguration_namespaceObject, {
NewcommandConfig: () => (NewcommandConfig),
NewcommandConfiguration: () => (NewcommandConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/ams/AmsConfiguration.js
var AmsConfiguration_namespaceObject = {};
__webpack_require__.r(AmsConfiguration_namespaceObject);
__webpack_require__.d(AmsConfiguration_namespaceObject, {
AmsConfiguration: () => (AmsConfiguration),
AmsTags: () => (AmsTags)
});
// NAMESPACE OBJECT: ./mjs/input/tex/require/RequireConfiguration.js
var RequireConfiguration_namespaceObject = {};
__webpack_require__.r(RequireConfiguration_namespaceObject);
__webpack_require__.d(RequireConfiguration_namespaceObject, {
RequireConfiguration: () => (RequireConfiguration),
RequireLoad: () => (RequireLoad),
RequireMethods: () => (RequireMethods),
options: () => (RequireConfiguration_options)
});
// NAMESPACE OBJECT: ./mjs/input/tex/autoload/AutoloadConfiguration.js
var AutoloadConfiguration_namespaceObject = {};
__webpack_require__.r(AutoloadConfiguration_namespaceObject);
__webpack_require__.d(AutoloadConfiguration_namespaceObject, {
AutoloadConfiguration: () => (AutoloadConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/configmacros/ConfigMacrosConfiguration.js
var ConfigMacrosConfiguration_namespaceObject = {};
__webpack_require__.r(ConfigMacrosConfiguration_namespaceObject);
__webpack_require__.d(ConfigMacrosConfiguration_namespaceObject, {
ConfigMacrosConfiguration: () => (ConfigMacrosConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/noundefined/NoUndefinedConfiguration.js
var NoUndefinedConfiguration_namespaceObject = {};
__webpack_require__.r(NoUndefinedConfiguration_namespaceObject);
__webpack_require__.d(NoUndefinedConfiguration_namespaceObject, {
NoUndefinedConfiguration: () => (NoUndefinedConfiguration)
});
// NAMESPACE OBJECT: ./mjs/input/tex/textmacros/TextParser.js
var TextParser_namespaceObject = {};
__webpack_require__.r(TextParser_namespaceObject);
__webpack_require__.d(TextParser_namespaceObject, {
TextParser: () => (TextParser)
});
// NAMESPACE OBJECT: ./mjs/input/tex/textmacros/TextMacrosMethods.js
var TextMacrosMethods_namespaceObject = {};
__webpack_require__.r(TextMacrosMethods_namespaceObject);
__webpack_require__.d(TextMacrosMethods_namespaceObject, {
TextMacrosMethods: () => (TextMacrosMethods)
});
// NAMESPACE OBJECT: ./mjs/input/tex/textmacros/TextMacrosConfiguration.js
var TextMacrosConfiguration_namespaceObject = {};
__webpack_require__.r(TextMacrosConfiguration_namespaceObject);
__webpack_require__.d(TextMacrosConfiguration_namespaceObject, {
TextBaseConfiguration: () => (TextBaseConfiguration),
TextMacrosConfiguration: () => (TextMacrosConfiguration)
});
// NAMESPACE OBJECT: ./mjs/output/common/Direction.js
var Direction_namespaceObject = {};
__webpack_require__.r(Direction_namespaceObject);
__webpack_require__.d(Direction_namespaceObject, {
DIRECTION: () => (DIRECTION),
H: () => (H),
V: () => (V)
});
// NAMESPACE OBJECT: ./mjs/output/common/FontData.js
var FontData_namespaceObject = {};
__webpack_require__.r(FontData_namespaceObject);
__webpack_require__.d(FontData_namespaceObject, {
DIRECTION: () => (DIRECTION),
FontData: () => (FontData),
NOSTRETCH: () => (NOSTRETCH),
mergeOptions: () => (mergeOptions)
});
// NAMESPACE OBJECT: ./mjs/output/common/LineBBox.js
var LineBBox_namespaceObject = {};
__webpack_require__.r(LineBBox_namespaceObject);
__webpack_require__.d(LineBBox_namespaceObject, {
LineBBox: () => (LineBBox)
});
// NAMESPACE OBJECT: ./mjs/output/common/LinebreakVisitor.js
var LinebreakVisitor_namespaceObject = {};
__webpack_require__.r(LinebreakVisitor_namespaceObject);
__webpack_require__.d(LinebreakVisitor_namespaceObject, {
LinebreakVisitor: () => (LinebreakVisitor),
Linebreaks: () => (Linebreaks),
NOBREAK: () => (NOBREAK)
});
// NAMESPACE OBJECT: ./mjs/output/common.js
var common_namespaceObject = {};
__webpack_require__.r(common_namespaceObject);
__webpack_require__.d(common_namespaceObject, {
CommonOutputJax: () => (CommonOutputJax),
FONTPATH: () => (FONTPATH)
});
// NAMESPACE OBJECT: ./mjs/output/common/WrapperFactory.js
var common_WrapperFactory_namespaceObject = {};
__webpack_require__.r(common_WrapperFactory_namespaceObject);
__webpack_require__.d(common_WrapperFactory_namespaceObject, {
CommonWrapperFactory: () => (CommonWrapperFactory)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrapper.js
var common_Wrapper_namespaceObject = {};
__webpack_require__.r(common_Wrapper_namespaceObject);
__webpack_require__.d(common_Wrapper_namespaceObject, {
CommonWrapper: () => (CommonWrapper),
SPACE: () => (SPACE)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrapper.js
var chtml_Wrapper_namespaceObject = {};
__webpack_require__.r(chtml_Wrapper_namespaceObject);
__webpack_require__.d(chtml_Wrapper_namespaceObject, {
ChtmlWrapper: () => (ChtmlWrapper),
FONTSIZE: () => (FONTSIZE)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/math.js
var Wrappers_math_namespaceObject = {};
__webpack_require__.r(Wrappers_math_namespaceObject);
__webpack_require__.d(Wrappers_math_namespaceObject, {
CommonMathMixin: () => (CommonMathMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/math.js
var chtml_Wrappers_math_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_math_namespaceObject);
__webpack_require__.d(chtml_Wrappers_math_namespaceObject, {
ChtmlMath: () => (ChtmlMath)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mi.js
var Wrappers_mi_namespaceObject = {};
__webpack_require__.r(Wrappers_mi_namespaceObject);
__webpack_require__.d(Wrappers_mi_namespaceObject, {
CommonMiMixin: () => (CommonMiMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mi.js
var chtml_Wrappers_mi_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mi_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mi_namespaceObject, {
ChtmlMi: () => (ChtmlMi)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mo.js
var Wrappers_mo_namespaceObject = {};
__webpack_require__.r(Wrappers_mo_namespaceObject);
__webpack_require__.d(Wrappers_mo_namespaceObject, {
CommonMoMixin: () => (CommonMoMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Usage.js
var Usage_namespaceObject = {};
__webpack_require__.r(Usage_namespaceObject);
__webpack_require__.d(Usage_namespaceObject, {
Usage: () => (Usage)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/FontData.js
var chtml_FontData_namespaceObject = {};
__webpack_require__.r(chtml_FontData_namespaceObject);
__webpack_require__.d(chtml_FontData_namespaceObject, {
AddCSS: () => (AddCSS),
ChtmlFontData: () => (ChtmlFontData),
DIRECTION: () => (DIRECTION),
FontData: () => (FontData),
NOSTRETCH: () => (NOSTRETCH),
mergeOptions: () => (mergeOptions)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mo.js
var chtml_Wrappers_mo_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mo_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mo_namespaceObject, {
ChtmlMo: () => (ChtmlMo)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mn.js
var Wrappers_mn_namespaceObject = {};
__webpack_require__.r(Wrappers_mn_namespaceObject);
__webpack_require__.d(Wrappers_mn_namespaceObject, {
CommonMnMixin: () => (CommonMnMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mn.js
var chtml_Wrappers_mn_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mn_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mn_namespaceObject, {
ChtmlMn: () => (ChtmlMn)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/ms.js
var Wrappers_ms_namespaceObject = {};
__webpack_require__.r(Wrappers_ms_namespaceObject);
__webpack_require__.d(Wrappers_ms_namespaceObject, {
CommonMsMixin: () => (CommonMsMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/ms.js
var chtml_Wrappers_ms_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_ms_namespaceObject);
__webpack_require__.d(chtml_Wrappers_ms_namespaceObject, {
ChtmlMs: () => (ChtmlMs)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mtext.js
var Wrappers_mtext_namespaceObject = {};
__webpack_require__.r(Wrappers_mtext_namespaceObject);
__webpack_require__.d(Wrappers_mtext_namespaceObject, {
CommonMtextMixin: () => (CommonMtextMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mtext.js
var chtml_Wrappers_mtext_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mtext_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mtext_namespaceObject, {
ChtmlMtext: () => (ChtmlMtext)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mspace.js
var Wrappers_mspace_namespaceObject = {};
__webpack_require__.r(Wrappers_mspace_namespaceObject);
__webpack_require__.d(Wrappers_mspace_namespaceObject, {
CommonMspaceMixin: () => (CommonMspaceMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mspace.js
var chtml_Wrappers_mspace_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mspace_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mspace_namespaceObject, {
ChtmlMspace: () => (ChtmlMspace)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mpadded.js
var Wrappers_mpadded_namespaceObject = {};
__webpack_require__.r(Wrappers_mpadded_namespaceObject);
__webpack_require__.d(Wrappers_mpadded_namespaceObject, {
CommonMpaddedMixin: () => (CommonMpaddedMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mpadded.js
var chtml_Wrappers_mpadded_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mpadded_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mpadded_namespaceObject, {
ChtmlMpadded: () => (ChtmlMpadded)
});
// NAMESPACE OBJECT: ./mjs/output/common/Notation.js
var Notation_namespaceObject = {};
__webpack_require__.r(Notation_namespaceObject);
__webpack_require__.d(Notation_namespaceObject, {
ARROWDX: () => (ARROWDX),
ARROWX: () => (ARROWX),
ARROWY: () => (ARROWY),
CommonArrow: () => (CommonArrow),
CommonBorder: () => (CommonBorder),
CommonBorder2: () => (CommonBorder2),
CommonDiagonalArrow: () => (CommonDiagonalArrow),
CommonDiagonalStrike: () => (CommonDiagonalStrike),
PADDING: () => (PADDING),
SOLID: () => (SOLID),
THICKNESS: () => (THICKNESS),
arrowBBox: () => (arrowBBox),
arrowBBoxHD: () => (arrowBBoxHD),
arrowBBoxW: () => (arrowBBoxW),
arrowDef: () => (arrowDef),
arrowHead: () => (arrowHead),
diagonalArrowDef: () => (diagonalArrowDef),
fullBBox: () => (fullBBox),
fullBorder: () => (fullBorder),
fullPadding: () => (fullPadding),
sideIndex: () => (sideIndex),
sideNames: () => (sideNames)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/menclose.js
var Wrappers_menclose_namespaceObject = {};
__webpack_require__.r(Wrappers_menclose_namespaceObject);
__webpack_require__.d(Wrappers_menclose_namespaceObject, {
CommonMencloseMixin: () => (CommonMencloseMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Notation.js
var chtml_Notation_namespaceObject = {};
__webpack_require__.r(chtml_Notation_namespaceObject);
__webpack_require__.d(chtml_Notation_namespaceObject, {
ARROWDX: () => (ARROWDX),
ARROWX: () => (ARROWX),
ARROWY: () => (ARROWY),
Arrow: () => (Arrow),
Border: () => (Border),
Border2: () => (Border2),
CommonArrow: () => (CommonArrow),
CommonBorder: () => (CommonBorder),
CommonBorder2: () => (CommonBorder2),
CommonDiagonalArrow: () => (CommonDiagonalArrow),
CommonDiagonalStrike: () => (CommonDiagonalStrike),
DiagonalArrow: () => (DiagonalArrow),
DiagonalStrike: () => (DiagonalStrike),
PADDING: () => (PADDING),
RenderElement: () => (RenderElement),
SOLID: () => (SOLID),
THICKNESS: () => (THICKNESS),
arrowBBox: () => (arrowBBox),
arrowBBoxHD: () => (arrowBBoxHD),
arrowBBoxW: () => (arrowBBoxW),
arrowDef: () => (arrowDef),
arrowHead: () => (arrowHead),
diagonalArrowDef: () => (diagonalArrowDef),
fullBBox: () => (fullBBox),
fullBorder: () => (fullBorder),
fullPadding: () => (fullPadding),
sideIndex: () => (sideIndex),
sideNames: () => (sideNames)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/menclose.js
var chtml_Wrappers_menclose_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_menclose_namespaceObject);
__webpack_require__.d(chtml_Wrappers_menclose_namespaceObject, {
ChtmlMenclose: () => (ChtmlMenclose)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mrow.js
var Wrappers_mrow_namespaceObject = {};
__webpack_require__.r(Wrappers_mrow_namespaceObject);
__webpack_require__.d(Wrappers_mrow_namespaceObject, {
CommonInferredMrowMixin: () => (CommonInferredMrowMixin),
CommonMrowMixin: () => (CommonMrowMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mrow.js
var chtml_Wrappers_mrow_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mrow_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mrow_namespaceObject, {
ChtmlInferredMrow: () => (ChtmlInferredMrow),
ChtmlMrow: () => (ChtmlMrow)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mfenced.js
var Wrappers_mfenced_namespaceObject = {};
__webpack_require__.r(Wrappers_mfenced_namespaceObject);
__webpack_require__.d(Wrappers_mfenced_namespaceObject, {
CommonMfencedMixin: () => (CommonMfencedMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mfenced.js
var chtml_Wrappers_mfenced_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mfenced_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mfenced_namespaceObject, {
ChtmlMfenced: () => (ChtmlMfenced)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mfrac.js
var Wrappers_mfrac_namespaceObject = {};
__webpack_require__.r(Wrappers_mfrac_namespaceObject);
__webpack_require__.d(Wrappers_mfrac_namespaceObject, {
CommonMfracMixin: () => (CommonMfracMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mfrac.js
var chtml_Wrappers_mfrac_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mfrac_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mfrac_namespaceObject, {
ChtmlMfrac: () => (ChtmlMfrac)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/msqrt.js
var Wrappers_msqrt_namespaceObject = {};
__webpack_require__.r(Wrappers_msqrt_namespaceObject);
__webpack_require__.d(Wrappers_msqrt_namespaceObject, {
CommonMsqrtMixin: () => (CommonMsqrtMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/msqrt.js
var chtml_Wrappers_msqrt_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_msqrt_namespaceObject);
__webpack_require__.d(chtml_Wrappers_msqrt_namespaceObject, {
ChtmlMsqrt: () => (ChtmlMsqrt)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mroot.js
var Wrappers_mroot_namespaceObject = {};
__webpack_require__.r(Wrappers_mroot_namespaceObject);
__webpack_require__.d(Wrappers_mroot_namespaceObject, {
CommonMrootMixin: () => (CommonMrootMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mroot.js
var chtml_Wrappers_mroot_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mroot_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mroot_namespaceObject, {
ChtmlMroot: () => (ChtmlMroot)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/msubsup.js
var Wrappers_msubsup_namespaceObject = {};
__webpack_require__.r(Wrappers_msubsup_namespaceObject);
__webpack_require__.d(Wrappers_msubsup_namespaceObject, {
CommonMsubMixin: () => (CommonMsubMixin),
CommonMsubsupMixin: () => (CommonMsubsupMixin),
CommonMsupMixin: () => (CommonMsupMixin)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/scriptbase.js
var scriptbase_namespaceObject = {};
__webpack_require__.r(scriptbase_namespaceObject);
__webpack_require__.d(scriptbase_namespaceObject, {
CommonScriptbaseMixin: () => (CommonScriptbaseMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/scriptbase.js
var Wrappers_scriptbase_namespaceObject = {};
__webpack_require__.r(Wrappers_scriptbase_namespaceObject);
__webpack_require__.d(Wrappers_scriptbase_namespaceObject, {
ChtmlScriptbase: () => (ChtmlScriptbase)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/msubsup.js
var chtml_Wrappers_msubsup_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_msubsup_namespaceObject);
__webpack_require__.d(chtml_Wrappers_msubsup_namespaceObject, {
ChtmlMsub: () => (ChtmlMsub),
ChtmlMsubsup: () => (ChtmlMsubsup),
ChtmlMsup: () => (ChtmlMsup)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/munderover.js
var Wrappers_munderover_namespaceObject = {};
__webpack_require__.r(Wrappers_munderover_namespaceObject);
__webpack_require__.d(Wrappers_munderover_namespaceObject, {
CommonMoverMixin: () => (CommonMoverMixin),
CommonMunderMixin: () => (CommonMunderMixin),
CommonMunderoverMixin: () => (CommonMunderoverMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/munderover.js
var chtml_Wrappers_munderover_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_munderover_namespaceObject);
__webpack_require__.d(chtml_Wrappers_munderover_namespaceObject, {
ChtmlMover: () => (ChtmlMover),
ChtmlMunder: () => (ChtmlMunder),
ChtmlMunderover: () => (ChtmlMunderover)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mmultiscripts.js
var Wrappers_mmultiscripts_namespaceObject = {};
__webpack_require__.r(Wrappers_mmultiscripts_namespaceObject);
__webpack_require__.d(Wrappers_mmultiscripts_namespaceObject, {
CommonMmultiscriptsMixin: () => (CommonMmultiscriptsMixin),
NextScript: () => (NextScript),
ScriptNames: () => (ScriptNames)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mmultiscripts.js
var chtml_Wrappers_mmultiscripts_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mmultiscripts_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mmultiscripts_namespaceObject, {
ChtmlMmultiscripts: () => (ChtmlMmultiscripts)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mtable.js
var Wrappers_mtable_namespaceObject = {};
__webpack_require__.r(Wrappers_mtable_namespaceObject);
__webpack_require__.d(Wrappers_mtable_namespaceObject, {
BREAK_BELOW: () => (BREAK_BELOW),
CommonMtableMixin: () => (CommonMtableMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mtable.js
var chtml_Wrappers_mtable_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mtable_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mtable_namespaceObject, {
ChtmlMtable: () => (ChtmlMtable)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mtr.js
var Wrappers_mtr_namespaceObject = {};
__webpack_require__.r(Wrappers_mtr_namespaceObject);
__webpack_require__.d(Wrappers_mtr_namespaceObject, {
CommonMlabeledtrMixin: () => (CommonMlabeledtrMixin),
CommonMtrMixin: () => (CommonMtrMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mtr.js
var chtml_Wrappers_mtr_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mtr_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mtr_namespaceObject, {
ChtmlMlabeledtr: () => (ChtmlMlabeledtr),
ChtmlMtr: () => (ChtmlMtr)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mtd.js
var Wrappers_mtd_namespaceObject = {};
__webpack_require__.r(Wrappers_mtd_namespaceObject);
__webpack_require__.d(Wrappers_mtd_namespaceObject, {
CommonMtdMixin: () => (CommonMtdMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mtd.js
var chtml_Wrappers_mtd_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mtd_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mtd_namespaceObject, {
ChtmlMtd: () => (ChtmlMtd)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/maction.js
var Wrappers_maction_namespaceObject = {};
__webpack_require__.r(Wrappers_maction_namespaceObject);
__webpack_require__.d(Wrappers_maction_namespaceObject, {
CommonMactionMixin: () => (CommonMactionMixin),
TooltipData: () => (TooltipData)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/maction.js
var chtml_Wrappers_maction_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_maction_namespaceObject);
__webpack_require__.d(chtml_Wrappers_maction_namespaceObject, {
ChtmlMaction: () => (ChtmlMaction)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/mglyph.js
var Wrappers_mglyph_namespaceObject = {};
__webpack_require__.r(Wrappers_mglyph_namespaceObject);
__webpack_require__.d(Wrappers_mglyph_namespaceObject, {
CommonMglyphMixin: () => (CommonMglyphMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/mglyph.js
var chtml_Wrappers_mglyph_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_mglyph_namespaceObject);
__webpack_require__.d(chtml_Wrappers_mglyph_namespaceObject, {
ChtmlMglyph: () => (ChtmlMglyph)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/semantics.js
var Wrappers_semantics_namespaceObject = {};
__webpack_require__.r(Wrappers_semantics_namespaceObject);
__webpack_require__.d(Wrappers_semantics_namespaceObject, {
CommonSemanticsMixin: () => (CommonSemanticsMixin)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/XmlNode.js
var XmlNode_namespaceObject = {};
__webpack_require__.r(XmlNode_namespaceObject);
__webpack_require__.d(XmlNode_namespaceObject, {
CommonXmlNodeMixin: () => (CommonXmlNodeMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/semantics.js
var chtml_Wrappers_semantics_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_semantics_namespaceObject);
__webpack_require__.d(chtml_Wrappers_semantics_namespaceObject, {
ChtmlAnnotation: () => (ChtmlAnnotation),
ChtmlAnnotationXML: () => (ChtmlAnnotationXML),
ChtmlSemantics: () => (ChtmlSemantics),
ChtmlXmlNode: () => (ChtmlXmlNode)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/TeXAtom.js
var Wrappers_TeXAtom_namespaceObject = {};
__webpack_require__.r(Wrappers_TeXAtom_namespaceObject);
__webpack_require__.d(Wrappers_TeXAtom_namespaceObject, {
CommonTeXAtomMixin: () => (CommonTeXAtomMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/TeXAtom.js
var chtml_Wrappers_TeXAtom_namespaceObject = {};
__webpack_require__.r(chtml_Wrappers_TeXAtom_namespaceObject);
__webpack_require__.d(chtml_Wrappers_TeXAtom_namespaceObject, {
ChtmlTeXAtom: () => (ChtmlTeXAtom)
});
// NAMESPACE OBJECT: ./mjs/output/common/Wrappers/TextNode.js
var TextNode_namespaceObject = {};
__webpack_require__.r(TextNode_namespaceObject);
__webpack_require__.d(TextNode_namespaceObject, {
CommonTextNodeMixin: () => (CommonTextNodeMixin)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/TextNode.js
var Wrappers_TextNode_namespaceObject = {};
__webpack_require__.r(Wrappers_TextNode_namespaceObject);
__webpack_require__.d(Wrappers_TextNode_namespaceObject, {
ChtmlTextNode: () => (ChtmlTextNode)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers/HtmlNode.js
var Wrappers_HtmlNode_namespaceObject = {};
__webpack_require__.r(Wrappers_HtmlNode_namespaceObject);
__webpack_require__.d(Wrappers_HtmlNode_namespaceObject, {
ChtmlHtmlNode: () => (ChtmlHtmlNode)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/Wrappers.js
var Wrappers_namespaceObject = {};
__webpack_require__.r(Wrappers_namespaceObject);
__webpack_require__.d(Wrappers_namespaceObject, {
ChtmlWrappers: () => (ChtmlWrappers)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/WrapperFactory.js
var chtml_WrapperFactory_namespaceObject = {};
__webpack_require__.r(chtml_WrapperFactory_namespaceObject);
__webpack_require__.d(chtml_WrapperFactory_namespaceObject, {
ChtmlWrapperFactory: () => (ChtmlWrapperFactory)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/DefaultFont.js
var DefaultFont_namespaceObject = {};
__webpack_require__.r(DefaultFont_namespaceObject);
__webpack_require__.d(DefaultFont_namespaceObject, {
DefaultFont: () => (DefaultFont),
fontName: () => (fontName)
});
// NAMESPACE OBJECT: ./mjs/output/chtml.js
var output_chtml_namespaceObject = {};
__webpack_require__.r(output_chtml_namespaceObject);
__webpack_require__.d(output_chtml_namespaceObject, {
CHTML: () => (CHTML)
});
// NAMESPACE OBJECT: ./mjs/output/chtml/DynamicFonts.js
var DynamicFonts_namespaceObject = {};
__webpack_require__.r(DynamicFonts_namespaceObject);
__webpack_require__.d(DynamicFonts_namespaceObject, {
AddFontIds: () => (AddFontIds)
});
// NAMESPACE OBJECT: ./mjs/ui/menu/MJContextMenu.js
var MJContextMenu_namespaceObject = {};
__webpack_require__.r(MJContextMenu_namespaceObject);
__webpack_require__.d(MJContextMenu_namespaceObject, {
MJContextMenu: () => (MJContextMenu)
});
// NAMESPACE OBJECT: ./mjs/a11y/sre.js
var sre_namespaceObject = {};
__webpack_require__.r(sre_namespaceObject);
__webpack_require__.d(sre_namespaceObject, {
addPreference: () => (sre_addPreference),
engineSetup: () => (engineSetup),
fromPreference: () => (sre_fromPreference),
locales: () => (locales),
parseDOM: () => (parseDOM),
setupEngine: () => (setupEngine),
toEnriched: () => (toEnriched),
toPreference: () => (sre_toPreference)
});
// NAMESPACE OBJECT: ./mjs/a11y/speech/SpeechMenu.js
var SpeechMenu_namespaceObject = {};
__webpack_require__.r(SpeechMenu_namespaceObject);
__webpack_require__.d(SpeechMenu_namespaceObject, {
clearspeakMenu: () => (clearspeakMenu),
localeMenu: () => (localeMenu)
});
// NAMESPACE OBJECT: ./mjs/ui/menu/MenuUtil.js
var MenuUtil_namespaceObject = {};
__webpack_require__.r(MenuUtil_namespaceObject);
__webpack_require__.d(MenuUtil_namespaceObject, {
copyToClipboard: () => (copyToClipboard),
isMac: () => (isMac)
});
// NAMESPACE OBJECT: ./mjs/ui/menu/AnnotationMenu.js
var AnnotationMenu_namespaceObject = {};
__webpack_require__.r(AnnotationMenu_namespaceObject);
__webpack_require__.d(AnnotationMenu_namespaceObject, {
annotation: () => (annotation),
copyAnnotations: () => (copyAnnotations),
showAnnotations: () => (showAnnotations)
});
// NAMESPACE OBJECT: ./mjs/ui/menu/RadioCompare.js
var RadioCompare_namespaceObject = {};
__webpack_require__.r(RadioCompare_namespaceObject);
__webpack_require__.d(RadioCompare_namespaceObject, {
RadioCompare: () => (RadioCompare)
});
// NAMESPACE OBJECT: ./mjs/ui/menu/MmlVisitor.js
var menu_MmlVisitor_namespaceObject = {};
__webpack_require__.r(menu_MmlVisitor_namespaceObject);
__webpack_require__.d(menu_MmlVisitor_namespaceObject, {
MmlVisitor: () => (MmlVisitor_MmlVisitor)
});
// NAMESPACE OBJECT: ./mjs/ui/menu/SelectableInfo.js
var SelectableInfo_namespaceObject = {};
__webpack_require__.r(SelectableInfo_namespaceObject);
__webpack_require__.d(SelectableInfo_namespaceObject, {
SelectableInfo: () => (SelectableInfo)
});
// NAMESPACE OBJECT: ./mjs/ui/menu/Menu.js
var Menu_namespaceObject = {};
__webpack_require__.r(Menu_namespaceObject);
__webpack_require__.d(Menu_namespaceObject, {
Menu: () => (Menu)
});
// NAMESPACE OBJECT: ./mjs/ui/menu/MenuHandler.js
var MenuHandler_namespaceObject = {};
__webpack_require__.r(MenuHandler_namespaceObject);
__webpack_require__.d(MenuHandler_namespaceObject, {
MenuHandler: () => (MenuHandler),
MenuMathDocumentMixin: () => (MenuMathDocumentMixin),
MenuMathItemMixin: () => (MenuMathItemMixin)
});
// NAMESPACE OBJECT: ./mjs/input/mathml/FindMathML.js
var FindMathML_namespaceObject = {};
__webpack_require__.r(FindMathML_namespaceObject);
__webpack_require__.d(FindMathML_namespaceObject, {
FindMathML: () => (FindMathML)
});
// NAMESPACE OBJECT: ./mjs/input/mathml/MathMLCompile.js
var MathMLCompile_namespaceObject = {};
__webpack_require__.r(MathMLCompile_namespaceObject);
__webpack_require__.d(MathMLCompile_namespaceObject, {
MathMLCompile: () => (MathMLCompile)
});
// NAMESPACE OBJECT: ./mjs/input/mathml.js
var mathml_namespaceObject = {};
__webpack_require__.r(mathml_namespaceObject);
__webpack_require__.d(mathml_namespaceObject, {
MathML: () => (MathML)
});
// NAMESPACE OBJECT: ./mjs/a11y/semantic-enrich.js
var semantic_enrich_namespaceObject = {};
__webpack_require__.r(semantic_enrich_namespaceObject);
__webpack_require__.d(semantic_enrich_namespaceObject, {
EnrichHandler: () => (EnrichHandler),
EnrichedMathDocumentMixin: () => (EnrichedMathDocumentMixin),
EnrichedMathItemMixin: () => (EnrichedMathItemMixin),
enrichVisitor: () => (enrichVisitor)
});
// NAMESPACE OBJECT: ./mjs/a11y/speech/SpeechUtil.js
var SpeechUtil_namespaceObject = {};
__webpack_require__.r(SpeechUtil_namespaceObject);
__webpack_require__.d(SpeechUtil_namespaceObject, {
InPlace: () => (InPlace),
SemAttr: () => (SemAttr),
buildLabel: () => (buildLabel),
buildSpeech: () => (buildSpeech),
honk: () => (honk),
ssmlParsing: () => (ssmlParsing)
});
// NAMESPACE OBJECT: ./mjs/a11y/speech/GeneratorPool.js
var GeneratorPool_namespaceObject = {};
__webpack_require__.r(GeneratorPool_namespaceObject);
__webpack_require__.d(GeneratorPool_namespaceObject, {
GeneratorPool: () => (GeneratorPool)
});
// NAMESPACE OBJECT: ./mjs/a11y/speech/WebWorker.js
var WebWorker_namespaceObject = {};
__webpack_require__.r(WebWorker_namespaceObject);
__webpack_require__.d(WebWorker_namespaceObject, {
WorkerHandler: () => (WorkerHandler)
});
// NAMESPACE OBJECT: ./mjs/a11y/speech.js
var speech_namespaceObject = {};
__webpack_require__.r(speech_namespaceObject);
__webpack_require__.d(speech_namespaceObject, {
SpeechHandler: () => (SpeechHandler),
SpeechMathDocumentMixin: () => (SpeechMathDocumentMixin),
SpeechMathItemMixin: () => (SpeechMathItemMixin)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/Highlighter.js
var Highlighter_namespaceObject = {};
__webpack_require__.r(Highlighter_namespaceObject);
__webpack_require__.d(Highlighter_namespaceObject, {
getHighlighter: () => (getHighlighter)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/Region.js
var Region_namespaceObject = {};
__webpack_require__.r(Region_namespaceObject);
__webpack_require__.d(Region_namespaceObject, {
AbstractRegion: () => (AbstractRegion),
DummyRegion: () => (DummyRegion),
HoverRegion: () => (HoverRegion),
LiveRegion: () => (LiveRegion),
SpeechRegion: () => (SpeechRegion),
StringRegion: () => (StringRegion),
ToolTip: () => (ToolTip)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/Explorer.js
var Explorer_namespaceObject = {};
__webpack_require__.r(Explorer_namespaceObject);
__webpack_require__.d(Explorer_namespaceObject, {
AbstractExplorer: () => (AbstractExplorer)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/KeyExplorer.js
var KeyExplorer_namespaceObject = {};
__webpack_require__.r(KeyExplorer_namespaceObject);
__webpack_require__.d(KeyExplorer_namespaceObject, {
SpeechExplorer: () => (SpeechExplorer),
hasModifiers: () => (hasModifiers),
isContainer: () => (isContainer)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/MouseExplorer.js
var MouseExplorer_namespaceObject = {};
__webpack_require__.r(MouseExplorer_namespaceObject);
__webpack_require__.d(MouseExplorer_namespaceObject, {
AbstractMouseExplorer: () => (AbstractMouseExplorer),
ContentHoverer: () => (ContentHoverer),
FlameHoverer: () => (FlameHoverer),
Hoverer: () => (Hoverer),
ValueHoverer: () => (ValueHoverer)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/TreeExplorer.js
var TreeExplorer_namespaceObject = {};
__webpack_require__.r(TreeExplorer_namespaceObject);
__webpack_require__.d(TreeExplorer_namespaceObject, {
AbstractTreeExplorer: () => (AbstractTreeExplorer),
ContrastPicker: () => (ContrastPicker),
FlameColorer: () => (FlameColorer),
TreeColorer: () => (TreeColorer)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer/ExplorerPool.js
var ExplorerPool_namespaceObject = {};
__webpack_require__.r(ExplorerPool_namespaceObject);
__webpack_require__.d(ExplorerPool_namespaceObject, {
ExplorerPool: () => (ExplorerPool),
RegionPool: () => (RegionPool)
});
// NAMESPACE OBJECT: ./mjs/a11y/explorer.js
var explorer_namespaceObject = {};
__webpack_require__.r(explorer_namespaceObject);
__webpack_require__.d(explorer_namespaceObject, {
ExplorerHandler: () => (ExplorerHandler),
ExplorerMathDocumentMixin: () => (ExplorerMathDocumentMixin),
ExplorerMathItemMixin: () => (ExplorerMathItemMixin),
setA11yOption: () => (setA11yOption),
setA11yOptions: () => (setA11yOptions)
});
;// ./mjs/components/version.js
const VERSION = '4.0.0';
//# sourceMappingURL=version.js.map
;// ./mjs/components/global.js
const defaultGlobal = {};
const GLOBAL = (() => {
if (typeof window !== 'undefined')
return window;
if (typeof global !== 'undefined')
return global;
if (typeof globalThis !== 'undefined')
return globalThis;
return defaultGlobal;
})();
function isObject(x) {
return typeof x === 'object' && x !== null;
}
function combineConfig(dst, src, check = false) {
var _a;
for (const id of Object.keys(src)) {
if (id === '__esModule' ||
dst[id] === src[id] ||
src[id] === null ||
src[id] === undefined) {
continue;
}
if (isObject(dst[id]) && isObject(src[id])) {
combineConfig(dst[id], src[id], check || id === '_');
}
else if (!check || !((_a = Object.getOwnPropertyDescriptor(dst, id)) === null || _a === void 0 ? void 0 : _a.get)) {
dst[id] = src[id];
}
}
return dst;
}
function combineDefaults(dst, name, src) {
if (!dst[name]) {
dst[name] = {};
}
dst = dst[name];
for (const id of Object.keys(src)) {
if (isObject(dst[id]) && isObject(src[id])) {
combineDefaults(dst, id, src[id]);
}
else if (dst[id] == null && src[id] != null) {
dst[id] = src[id];
}
}
return dst;
}
function combineWithMathJax(config) {
return combineConfig(global_MathJax, config);
}
if (typeof GLOBAL.MathJax === 'undefined' ||
GLOBAL.MathJax.constructor !== {}.constructor) {
GLOBAL.MathJax = {};
}
if (!GLOBAL.MathJax.version) {
GLOBAL.MathJax = {
version: VERSION,
_: {},
config: GLOBAL.MathJax,
};
}
const global_MathJax = GLOBAL.MathJax;
//# sourceMappingURL=global.js.map
;// ./mjs/util/context.js
const hasWindow = typeof window !== 'undefined';
const context = {
window: hasWindow ? window : null,
document: hasWindow ? window.document : null,
os: (() => {
if (hasWindow && window.navigator) {
const app = window.navigator.appVersion;
const osNames = [
['Win', 'Windows'],
['Mac', 'MacOS'],
['X11', 'Unix'],
['Linux', 'Unix'],
];
for (const [key, os] of osNames) {
if (app.includes(key)) {
return os;
}
}
if (window.navigator.userAgent.includes('Android')) {
return 'Unix';
}
}
return 'unknown';
})(),
};
//# sourceMappingURL=context.js.map
;// ./mjs/components/package.js
class PackageError extends Error {
constructor(message, name) {
super(message);
this.package = name;
}
}
class Package {
get canLoad() {
return (this.dependencyCount === 0 &&
!this.noLoad &&
!this.isLoading &&
!this.hasFailed);
}
static loadPromise(name) {
const config = (CONFIG[name] || {});
const promise = config.extraLoads
? Loader.load(...config.extraLoads)
: Promise.resolve();
const checkReady = config.checkReady || (() => Promise.resolve());
return promise.then(() => checkReady());
}
static resolvePath(name, addExtension = true) {
const data = { name, original: name, addExtension };
Loader.pathFilters.execute(data);
return data.name;
}
static loadAll() {
for (const extension of this.packages.values()) {
if (extension.canLoad) {
extension.load();
}
}
}
constructor(name, noLoad = false) {
this.isLoaded = false;
this.result = {};
this.isLoading = false;
this.hasFailed = false;
this.dependents = [];
this.dependencies = [];
this.dependencyCount = 0;
this.provided = [];
this.name = name;
this.noLoad = noLoad;
Package.packages.set(name, this);
this.promise = this.makePromise(this.makeDependencies());
}
makeDependencies() {
const promises = [];
const map = Package.packages;
const noLoad = this.noLoad;
const name = this.name;
const dependencies = [];
if (Object.hasOwn(CONFIG.dependencies, name)) {
dependencies.push(...CONFIG.dependencies[name]);
}
else if (name !== 'core') {
dependencies.push('core');
}
for (const dependent of dependencies) {
const extension = map.get(dependent) || new Package(dependent, noLoad);
if (!this.dependencies.includes(extension)) {
extension.addDependent(this, noLoad);
this.dependencies.push(extension);
if (!extension.isLoaded) {
this.dependencyCount++;
promises.push(extension.promise);
}
}
}
return promises;
}
makePromise(promises) {
let promise = new Promise(((resolve, reject) => {
this.resolve = resolve;
this.reject = reject;
}));
const config = (CONFIG[this.name] || {});
if (config.ready) {
promise = promise.then((_name) => config.ready(this.name));
}
if (promises.length) {
promises.push(promise);
promise = Promise.all(promises).then((names) => names.join(', '));
}
if (config.failed) {
promise.catch((message) => config.failed(new PackageError(message, this.name)));
}
return promise;
}
load() {
if (!this.isLoaded && !this.isLoading && !this.noLoad) {
this.isLoading = true;
const url = Package.resolvePath(this.name);
if (CONFIG.require) {
this.loadCustom(url);
}
else {
this.loadScript(url);
}
}
}
loadCustom(url) {
try {
const result = CONFIG.require(url);
if (result instanceof Promise) {
result
.then((result) => (this.result = result))
.then(() => this.checkLoad())
.catch((err) => this.failed('Can\'t load "' + url + '"\n' + err.message.trim()));
}
else {
this.result = result;
this.checkLoad();
}
}
catch (err) {
this.failed(err.message);
}
}
loadScript(url) {
const script = context.document.createElement('script');
script.src = url;
script.charset = 'UTF-8';
script.onload = (_event) => this.checkLoad();
script.onerror = (_event) => this.failed('Can\'t load "' + url + '"');
context.document.head.appendChild(script);
}
loaded() {
this.isLoaded = true;
this.isLoading = false;
for (const dependent of this.dependents) {
dependent.requirementSatisfied();
}
for (const provided of this.provided) {
provided.loaded();
}
this.resolve(this.name);
}
failed(message) {
this.hasFailed = true;
this.isLoading = false;
this.reject(new PackageError(message, this.name));
}
checkLoad() {
Package.loadPromise(this.name)
.then(() => this.loaded())
.catch((message) => this.failed(message));
}
requirementSatisfied() {
if (this.dependencyCount) {
this.dependencyCount--;
if (this.canLoad) {
this.load();
}
}
}
provides(names = []) {
for (const name of names) {
let provided = Package.packages.get(name);
if (!provided) {
if (!CONFIG.dependencies[name]) {
CONFIG.dependencies[name] = [];
}
CONFIG.dependencies[name].push(name);
provided = new Package(name, true);
provided.isLoading = true;
}
this.provided.push(provided);
}
}
addDependent(extension, noLoad) {
this.dependents.push(extension);
if (!noLoad) {
this.checkNoLoad();
}
}
checkNoLoad() {
if (this.noLoad) {
this.noLoad = false;
for (const dependency of this.dependencies) {
dependency.checkNoLoad();
}
}
}
}
Package.packages = new Map();
//# sourceMappingURL=package.js.map
;// ./mjs/util/PrioritizedList.js
class PrioritizedList {
constructor() {
this.items = [];
this.items = [];
}
[Symbol.iterator]() {
let i = 0;
const items = this.items;
return {
next() {
return { value: items[i++], done: i > items.length };
},
};
}
add(item, priority = PrioritizedList.DEFAULTPRIORITY) {
let i = this.items.length;
do {
i--;
} while (i >= 0 && priority < this.items[i].priority);
this.items.splice(i + 1, 0, { item: item, priority: priority });
return item;
}
remove(item) {
let i = this.items.length;
do {
i--;
} while (i >= 0 && this.items[i].item !== item);
if (i >= 0) {
this.items.splice(i, 1);
}
return this;
}
}
PrioritizedList.DEFAULTPRIORITY = 5;
//# sourceMappingURL=PrioritizedList.js.map
;// ./mjs/util/FunctionList.js
class FunctionList extends PrioritizedList {
constructor(list = null) {
super();
if (list) {
this.addList(list);
}
}
addList(list) {
for (const item of list) {
if (Array.isArray(item)) {
this.add(item[0], item[1]);
}
else {
this.add(item);
}
}
}
execute(...data) {
for (const item of this) {
const result = item.item(...data);
if (result === false) {
return false;
}
}
return true;
}
asyncExecute(...data) {
let i = -1;
const items = this.items;
return new Promise((ok, fail) => {
(function execute() {
while (++i < items.length) {
const result = items[i].item(...data);
if (result instanceof Promise) {
result.then(execute).catch((err) => fail(err));
return;
}
if (result === false) {
ok(false);
return;
}
}
ok(true);
})();
});
}
}
//# sourceMappingURL=FunctionList.js.map
;// ./mjs/components/mjs/root.js
//
// Replacement for __dirname for root directory
//
const config = global_MathJax.config || {};
const mjxRoot = () => config?.loader?.paths?.mathjax || config?.__dirname || '/';
;// ./mjs/components/loader.js
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const PathFilters = {
source: (data) => {
if (Object.hasOwn(CONFIG.source, data.name)) {
data.name = CONFIG.source[data.name];
}
return true;
},
normalize: (data) => {
const name = data.name;
if (!name.match(/^(?:[a-z]+:\/)?\/|[a-z]:\\|\[/i)) {
data.name = '[mathjax]/' + name.replace(/^\.\//, '');
}
return true;
},
prefix: (data) => {
let match;
while ((match = data.name.match(/^\[([^\]]*)\]/))) {
if (!Object.hasOwn(CONFIG.paths, match[1]))
break;
data.name = CONFIG.paths[match[1]] + data.name.substring(match[0].length);
}
return true;
},
addExtension: (data) => {
if (data.addExtension && !data.name.match(/\.[^/]+$/)) {
data.name += '.js';
}
return true;
},
};
const loader_VERSION = global_MathJax.version;
const Loader = {
versions: new Map(),
nestedLoads: [],
ready(...names) {
if (names.length === 0) {
names = Array.from(Package.packages.keys());
}
const promises = [];
for (const name of names) {
const extension = Package.packages.get(name) || new Package(name, true);
promises.push(extension.promise);
}
return Promise.all(promises);
},
load(...names) {
if (names.length === 0) {
return Promise.resolve([]);
}
let nested = [];
this.nestedLoads.unshift(nested);
const promise = Promise.resolve().then(() => __awaiter(this, void 0, void 0, function* () {
const promises = [];
for (const name of names) {
let extension = Package.packages.get(name);
if (!extension) {
extension = new Package(name);
extension.provides(CONFIG.provides[name]);
}
extension.checkNoLoad();
promises.push(extension.promise.then(() => {
if (CONFIG.versionWarnings &&
extension.isLoaded &&
!Loader.versions.has(Package.resolvePath(name))) {
console.warn(`No version information available for component ${name}`);
}
return extension.result;
}));
}
Package.loadAll();
const result = yield Promise.all(promises);
while (nested.length) {
const promise = Promise.all(nested);
nested = this.nestedLoads[this.nestedLoads.indexOf(nested)] = [];
yield promise;
}
this.nestedLoads.splice(this.nestedLoads.indexOf(nested), 1);
return result;
}));
this.nestedLoads
.slice(1)
.forEach((list) => list.push(promise));
return promise;
},
preLoaded(...names) {
for (const name of names) {
let extension = Package.packages.get(name);
if (!extension) {
extension = new Package(name, true);
extension.provides(CONFIG.provides[name]);
}
extension.loaded();
}
},
addPackageData(name, data) {
let config = CONFIG[name];
if (!config) {
config = CONFIG[name] = {};
}
for (const [key, value] of Object.entries(data)) {
if (Array.isArray(value)) {
if (!config[key]) {
config[key] = [];
}
const set = new Set([...config[key], ...value]);
config[key] = [...set];
}
else {
config[key] = value;
}
}
},
defaultReady() {
if (typeof loader_MathJax.startup !== 'undefined') {
loader_MathJax.config.startup.ready();
}
},
getRoot() {
if (context.document) {
const script = context.document.currentScript ||
context.document.getElementById('MathJax-script');
if (script && script instanceof HTMLScriptElement) {
return script.src.replace(/\/[^/]*$/, '');
}
}
return mjxRoot();
},
checkVersion(name, version, _type) {
this.saveVersion(name);
if (CONFIG.versionWarnings && version !== loader_VERSION) {
console.warn(`Component ${name} uses ${version} of MathJax; version in use is ${loader_VERSION}`);
return true;
}
return false;
},
saveVersion(name) {
Loader.versions.set(Package.resolvePath(name), loader_VERSION);
},
pathFilters: new FunctionList(),
};
Loader.pathFilters.add(PathFilters.source, 0);
Loader.pathFilters.add(PathFilters.normalize, 10);
Loader.pathFilters.add(PathFilters.prefix, 20);
Loader.pathFilters.add(PathFilters.addExtension, 30);
const loader_MathJax = global_MathJax;
if (typeof loader_MathJax.loader === 'undefined') {
combineDefaults(loader_MathJax.config, 'loader', {
paths: {
mathjax: Loader.getRoot(),
},
source: {},
dependencies: {},
provides: {},
load: [],
ready: Loader.defaultReady.bind(Loader),
failed: (error) => console.log(`MathJax(${error.package || '?'}): ${error.message}`),
require: null,
pathFilters: [],
versionWarnings: true,
});
combineWithMathJax({
loader: Loader,
});
for (const filter of loader_MathJax.config.loader.pathFilters) {
if (Array.isArray(filter)) {
Loader.pathFilters.add(filter[0], filter[1]);
}
else {
Loader.pathFilters.add(filter);
}
}
}
const CONFIG = loader_MathJax.config.loader;
//# sourceMappingURL=loader.js.map
;// ./mjs/util/Options.js
const OBJECT = {}.constructor;
function Options_isObject(obj) {
return (typeof obj === 'object' &&
obj !== null &&
(obj.constructor === OBJECT || obj.constructor === Expandable));
}
const APPEND = '[+]';
const REMOVE = '[-]';
const OPTIONS = {
invalidOption: 'warn',
optionError: (message, _key) => {
if (OPTIONS.invalidOption === 'fatal') {
throw new Error(message);
}
console.warn('MathJax: ' + message);
},
};
class Expandable {
}
function expandable(def) {
return Object.assign(Object.create(Expandable.prototype), def);
}
function makeArray(x) {
return Array.isArray(x) ? x : [x];
}
function keys(def) {
if (!def) {
return [];
}
return Object.keys(def).concat(Object.getOwnPropertySymbols(def));
}
function copy(def) {
const props = {};
for (const key of keys(def)) {
const prop = Object.getOwnPropertyDescriptor(def, key);
const value = prop.value;
if (Array.isArray(value)) {
prop.value = insert([], value, false);
}
else if (Options_isObject(value)) {
prop.value = copy(value);
}
if (prop.enumerable) {
props[key] = prop;
}
}
return Object.defineProperties(def.constructor === Expandable ? expandable({}) : {}, props);
}
function insert(dst, src, warn = true) {
for (let key of keys(src)) {
if (warn && dst[key] === undefined && dst.constructor !== Expandable) {
if (typeof key === 'symbol') {
key = key.toString();
}
OPTIONS.optionError(`Invalid option "${key}" (no default value).`, key);
continue;
}
const sval = src[key];
let dval = dst[key];
if (Options_isObject(sval) &&
dval !== null &&
(typeof dval === 'object' || typeof dval === 'function')) {
const ids = keys(sval);
if (Array.isArray(dval) &&
((ids.length === 1 &&
(ids[0] === APPEND || ids[0] === REMOVE) &&
Array.isArray(sval[ids[0]])) ||
(ids.length === 2 &&
ids.sort().join(',') === APPEND + ',' + REMOVE &&
Array.isArray(sval[APPEND]) &&
Array.isArray(sval[REMOVE])))) {
if (sval[REMOVE]) {
dval = dst[key] = dval.filter((x) => sval[REMOVE].indexOf(x) < 0);
}
if (sval[APPEND]) {
dst[key] = [...dval, ...sval[APPEND]];
}
}
else {
insert(dval, sval, warn);
}
}
else if (Array.isArray(sval)) {
dst[key] = [];
insert(dst[key], sval, false);
}
else if (Options_isObject(sval)) {
dst[key] = copy(sval);
}
else {
dst[key] = sval;
}
}
return dst;
}
function defaultOptions(options, ...defs) {
defs.forEach((def) => insert(options, def, false));
return options;
}
function userOptions(options, ...defs) {
defs.forEach((def) => insert(options, def, true));
return options;
}
function selectOptions(options, ...keys) {
const subset = {};
for (const key of keys) {
if (Object.hasOwn(options, key)) {
subset[key] = options[key];
}
}
return subset;
}
function selectOptionsFromKeys(options, object) {
return selectOptions(options, ...Object.keys(object));
}
function separateOptions(options, ...objects) {
const results = [];
for (const object of objects) {
const exists = {}, missing = {};
for (const key of Object.keys(options || {})) {
(object[key] === undefined ? missing : exists)[key] = options[key];
}
results.push(exists);
options = missing;
}
results.unshift(options);
return results;
}
function lookup(name, lookup, def = null) {
return Object.hasOwn(lookup, name) ? lookup[name] : def;
}
//# sourceMappingURL=Options.js.map
;// ./mjs/components/startup.js
var startup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
class Startup {
static toMML(node) {
return Startup.visitor.visitTree(node, this.document);
}
static registerConstructor(name, constructor) {
Startup.constructors[name] = constructor;
}
static useHandler(name, force = false) {
if (!startup_CONFIG.handler || force) {
startup_CONFIG.handler = name;
}
}
static useAdaptor(name, force = false) {
if (!startup_CONFIG.adaptor || force) {
startup_CONFIG.adaptor = name;
}
}
static useInput(name, force = false) {
if (!inputSpecified || force) {
startup_CONFIG.input.push(name);
}
}
static useOutput(name, force = false) {
if (!startup_CONFIG.output || force) {
startup_CONFIG.output = name;
}
}
static extendHandler(extend, priority = 10) {
Startup.extensions.add(extend, priority);
}
static defaultReady() {
Startup.getComponents();
Startup.makeMethods();
Startup.pagePromise
.then(() => startup_CONFIG.pageReady())
.then(() => Startup.promiseResolve())
.catch((err) => Startup.promiseReject(err));
}
static defaultPageReady() {
return (startup_CONFIG.loadAllFontFiles && Startup.output.font
? Startup.output.font.loadDynamicFiles()
: Promise.resolve())
.then(() => { var _a; return (_a = Startup.document.menu) === null || _a === void 0 ? void 0 : _a.loadingPromise; })
.then(startup_CONFIG.typeset && startup_MathJax.typesetPromise
? () => Startup.typesetPromise(startup_CONFIG.elements)
: Promise.resolve())
.then(() => Startup.promiseResolve());
}
static typesetPromise(elements) {
this.hasTypeset = true;
return Startup.document.whenReady(() => startup_awaiter(this, void 0, void 0, function* () {
Startup.document.options.elements = elements;
Startup.document.reset();
yield Startup.document.renderPromise();
}));
}
static getComponents() {
Startup.visitor =
new startup_MathJax._.core.MmlTree.SerializedMmlVisitor.SerializedMmlVisitor();
Startup.mathjax = startup_MathJax._.mathjax.mathjax;
Startup.input = Startup.getInputJax();
Startup.output = Startup.getOutputJax();
Startup.adaptor = Startup.getAdaptor();
if (Startup.handler) {
Startup.mathjax.handlers.unregister(Startup.handler);
}
Startup.handler = Startup.getHandler();
if (Startup.handler) {
Startup.mathjax.handlers.register(Startup.handler);
Startup.document = Startup.getDocument();
}
}
static makeMethods() {
if (Startup.input && Startup.output) {
Startup.makeTypesetMethods();
}
const oname = Startup.output ? Startup.output.name.toLowerCase() : '';
for (const jax of Startup.input) {
const iname = jax.name.toLowerCase();
Startup.makeMmlMethods(iname, jax);
Startup.makeResetMethod(iname, jax);
if (Startup.output) {
Startup.makeOutputMethods(iname, oname, jax);
}
}
startup_MathJax.done = () => Startup.document.done();
startup_MathJax.whenReady = (action) => Startup.document.whenReady(action);
}
static makeTypesetMethods() {
startup_MathJax.typeset = (elements = null) => {
this.hasTypeset = true;
Startup.document.options.elements = elements;
Startup.document.reset();
Startup.document.render();
};
startup_MathJax.typesetPromise = (elements = null) => {
return Startup.typesetPromise(elements);
};
startup_MathJax.typesetClear = (elements = null) => {
if (elements) {
Startup.document.clearMathItemsWithin(elements);
}
else {
Startup.document.clear();
}
};
}
static makeOutputMethods(iname, oname, input) {
const name = iname + '2' + oname;
startup_MathJax[name] = (math, options = {}) => {
options = Object.assign(Object.assign({}, options), { format: input.name });
return Startup.document.convert(math, options);
};
startup_MathJax[name + 'Promise'] = (math, options = {}) => {
options = Object.assign(Object.assign({}, options), { format: input.name });
return Startup.document.convertPromise(math, options);
};
startup_MathJax[oname + 'Stylesheet'] = () => Startup.output.styleSheet(Startup.document);
if ('getMetricsFor' in Startup.output) {
startup_MathJax.getMetricsFor = (node, display) => {
return Startup.output.getMetricsFor(node, display);
};
}
}
static makeMmlMethods(name, input) {
const STATE = startup_MathJax._.core.MathItem.STATE;
startup_MathJax[name + '2mml'] = (math, options = {}) => {
options = Object.assign(Object.assign({}, options), { end: STATE.CONVERT, format: input.name });
return Startup.toMML(Startup.document.convert(math, options));
};
startup_MathJax[name + '2mmlPromise'] = (math_1, ...args_1) => startup_awaiter(this, [math_1, ...args_1], void 0, function* (math, options = {}) {
options = Object.assign(Object.assign({}, options), { end: STATE.CONVERT, format: input.name });
const node = yield Startup.document.convertPromise(math, options);
return Startup.toMML(node);
});
}
static makeResetMethod(name, input) {
startup_MathJax[name + 'Reset'] = (...args) => input.reset(...args);
}
static getInputJax() {
const jax = [];
for (const name of startup_CONFIG.input) {
const inputClass = Startup.constructors[name];
if (inputClass) {
jax[name] = new inputClass(startup_MathJax.config[name]);
jax.push(jax[name]);
}
else {
throw Error('Input Jax "' + name + '" is not defined (has it been loaded?)');
}
}
return jax;
}
static getOutputJax() {
const name = startup_CONFIG.output;
if (!name)
return null;
const outputClass = Startup.constructors[name];
if (!outputClass) {
throw Error('Output Jax "' + name + '" is not defined (has it been loaded?)');
}
return new outputClass(startup_MathJax.config[name]);
}
static getAdaptor() {
const name = startup_CONFIG.adaptor;
if (!name || name === 'none')
return null;
const adaptor = Startup.constructors[name];
if (!adaptor) {
throw Error('DOMAdaptor "' + name + '" is not defined (has it been loaded?)');
}
return adaptor(startup_MathJax.config[name]);
}
static getHandler() {
const name = startup_CONFIG.handler;
if (!name || name === 'none' || !Startup.adaptor)
return null;
const handlerClass = Startup.constructors[name];
if (!handlerClass) {
throw Error('Handler "' + name + '" is not defined (has it been loaded?)');
}
let handler = new handlerClass(Startup.adaptor, 5);
for (const extend of Startup.extensions) {
handler = extend.item(handler);
}
return handler;
}
static getDocument(root = null) {
return Startup.mathjax.document(root || startup_CONFIG.document, Object.assign(Object.assign({}, startup_MathJax.config.options), { InputJax: Startup.input, OutputJax: Startup.output }));
}
}
Startup.extensions = new PrioritizedList();
Startup.constructors = {};
Startup.input = [];
Startup.output = null;
Startup.handler = null;
Startup.adaptor = null;
Startup.elements = null;
Startup.document = null;
Startup.promise = new Promise((resolve, reject) => {
Startup.promiseResolve = resolve;
Startup.promiseReject = reject;
});
Startup.pagePromise = new Promise((resolve, _reject) => {
const doc = GLOBAL.document;
if (!doc ||
!doc.readyState ||
doc.readyState === 'complete' ||
doc.readyState === 'interactive') {
resolve();
}
else {
const listener = () => resolve();
doc.defaultView.addEventListener('load', listener, true);
doc.defaultView.addEventListener('DOMContentLoaded', listener, true);
}
});
Startup.hasTypeset = false;
Startup.defaultOptionError = OPTIONS.optionError;
const startup_MathJax = global_MathJax;
if (typeof startup_MathJax._.startup === 'undefined') {
combineDefaults(startup_MathJax.config, 'startup', {
input: [],
output: '',
handler: null,
adaptor: null,
document: context.document || '',
elements: null,
typeset: true,
ready: Startup.defaultReady.bind(Startup),
pageReady: Startup.defaultPageReady.bind(Startup),
});
combineWithMathJax({
startup: Startup,
options: {},
});
if (startup_MathJax.config.startup.invalidOption) {
OPTIONS.invalidOption = startup_MathJax.config.startup.invalidOption;
}
if (startup_MathJax.config.startup.optionError) {
OPTIONS.optionError = startup_MathJax.config.startup.optionError;
}
}
const startup_CONFIG = startup_MathJax.config.startup;
const inputSpecified = startup_CONFIG.input.length !== 0;
//# sourceMappingURL=startup.js.map
;// ./components/mjs/startup/lib/startup.js
if (MathJax.loader) {
MathJax.loader.checkVersion('startup', VERSION, 'startup');
}
combineWithMathJax({_: {
components: {
loader: loader_namespaceObject,
package: package_namespaceObject,
startup: startup_namespaceObject
}
}});
;// ./components/mjs/dependencies.js
/*************************************************************
*
* Copyright (c) 2019-2025 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const dependencies = {
'a11y/semantic-enrich': ['input/mml', 'a11y/sre'],
'a11y/speech': ['a11y/semantic-enrich'],
'a11y/complexity': ['a11y/semantic-enrich'],
'a11y/explorer': ['a11y/speech'],
'[mml]/mml3': ['input/mml'],
'[tex]/action': ['input/tex-base'],
'[tex]/ams': ['input/tex-base', '[tex]/newcommand'],
'[tex]/amscd': ['input/tex-base'],
'[tex]/autoload': ['input/tex-base', '[tex]/require'],
'[tex]/bbm': ['input/tex-base'],
'[tex]/bboldx': ['input/tex-base', '[tex]/textmacros'],
'[tex]/bbox': ['input/tex-base'],
'[tex]/begingroup': ['input/tex-base', '[tex]/newcommand'],
'[tex]/boldsymbol': ['input/tex-base'],
'[tex]/braket': ['input/tex-base'],
'[tex]/bussproofs': ['input/tex-base'],
'[tex]/cancel': ['input/tex-base', '[tex]/enclose'],
'[tex]/cases': ['[tex]/empheq'],
'[tex]/centernot': ['input/tex-base'],
'[tex]/color': ['input/tex-base'],
'[tex]/colortbl': ['input/tex-base', '[tex]/color'],
'[tex]/colorv2': ['input/tex-base'],
'[tex]/configmacros': ['input/tex-base', '[tex]/newcommand'],
'[tex]/dsfont': ['input/tex-base'],
'[tex]/empheq': ['input/tex-base', '[tex]/ams'],
'[tex]/enclose': ['input/tex-base'],
'[tex]/extpfeil': ['input/tex-base', '[tex]/newcommand', '[tex]/ams'],
'[tex]/gensymb': ['input/tex-base'],
'[tex]/html': ['input/tex-base'],
'[tex]/mathtools': ['input/tex-base', '[tex]/newcommand', '[tex]/ams', '[tex]/boldsymbol'],
'[tex]/mhchem': ['input/tex-base', '[tex]/ams'],
'[tex]/newcommand': ['input/tex-base'],
'[tex]/noerrors': ['input/tex-base'],
'[tex]/noundefined': ['input/tex-base'],
'[tex]/physics': ['input/tex-base'],
'[tex]/require': ['input/tex-base'],
'[tex]/setoptions': ['input/tex-base'],
'[tex]/tagformat': ['input/tex-base'],
'[tex]/texhtml': ['input/tex-base'],
'[tex]/textcomp': ['input/tex-base', '[tex]/textmacros'],
'[tex]/textmacros': ['input/tex-base'],
'[tex]/unicode': ['input/tex-base'],
'[tex]/units': ['input/tex-base'],
'[tex]/upgreek': ['input/tex-base'],
'[tex]/verb': ['input/tex-base'],
'ui/menu': ['a11y/sre'],
};
const paths = {
tex: '[mathjax]/input/tex/extensions',
mml: '[mathjax]/input/mml/extensions',
sre: '[mathjax]/sre',
mathmaps: '[sre]/mathmaps',
};
const provides = {
'startup': ['loader'],
'input/tex': [
'input/tex-base',
'[tex]/ams',
'[tex]/newcommand',
'[tex]/textmacros',
'[tex]/noundefined',
'[tex]/require',
'[tex]/autoload',
'[tex]/configmacros'
]
};
//
// Compatibility with v3.0 names for TeX extensions
//
const compatibility = {
'[tex]/amsCd': '[tex]/amscd',
'[tex]/colorV2': '[tex]/colorv2',
'[tex]/configMacros': '[tex]/configmacros',
'[tex]/tagFormat': '[tex]/tagformat'
};
;// ./components/mjs/startup/init.js
Loader.preLoaded('loader', 'startup');
combineDefaults(MathJax.config.loader, 'dependencies', dependencies);
combineDefaults(MathJax.config.loader, 'paths', paths);
combineDefaults(MathJax.config.loader, 'provides', provides);
combineDefaults(MathJax.config.loader, 'source', compatibility);
function startup(ready) {
return Loader.load(...CONFIG.load)
.then(() => (ready || function () {})())
.then(() => CONFIG.ready())
.catch(error => CONFIG.failed(error));
}
;// ./mjs/core/DOMAdaptor.js
class AbstractDOMAdaptor {
constructor(document = null) {
this.canMeasureNodes = true;
this.document = document;
}
node(kind, def = {}, children = [], ns) {
const node = this.create(kind, ns);
this.setAttributes(node, def);
for (const child of children) {
this.append(node, child);
}
return node;
}
setProperty(node, name, value) {
node[name] = value;
}
getProperty(node, name) {
return node[name];
}
setAttributes(node, def) {
if (def.style && typeof def.style !== 'string') {
for (const key of Object.keys(def.style)) {
this.setStyle(node, key.replace(/-([a-z])/g, (_m, c) => c.toUpperCase()), def.style[key]);
}
}
if (def.properties) {
for (const key of Object.keys(def.properties)) {
node[key] = def.properties[key];
}
}
for (const key of Object.keys(def)) {
if ((key !== 'style' || typeof def.style === 'string') &&
key !== 'properties') {
this.setAttribute(node, key, def[key]);
}
}
}
replace(nnode, onode) {
this.insert(nnode, onode);
this.remove(onode);
return onode;
}
childNode(node, i) {
return this.childNodes(node)[i];
}
allClasses(node) {
const classes = this.getAttribute(node, 'class');
return !classes
? []
: classes
.replace(/ +/g, ' ')
.replace(/^ /, '')
.replace(/ $/, '')
.split(/ /);
}
cssText(node) {
return this.kind(node) === 'style' ? this.textContent(node) : '';
}
}
//# sourceMappingURL=DOMAdaptor.js.map
;// ./mjs/adaptors/HTMLAdaptor.js
var HTMLAdaptor_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
class HTMLAdaptor extends AbstractDOMAdaptor {
constructor(window) {
super(window.document);
this.canMeasureNodes = true;
this.window = window;
this.parser = new window.DOMParser();
}
parse(text, format = 'text/html') {
return this.parser.parseFromString(text, format);
}
create(kind, ns) {
return ns
? this.document.createElementNS(ns, kind)
: this.document.createElement(kind);
}
text(text) {
return this.document.createTextNode(text);
}
head(doc = this.document) {
return doc.head || doc;
}
body(doc = this.document) {
return doc.body || doc;
}
root(doc = this.document) {
return doc.documentElement || doc;
}
doctype(doc = this.document) {
return doc.doctype ? `` : '';
}
tags(node, name, ns = null) {
const nodes = ns
? node.getElementsByTagNameNS(ns, name)
: node.getElementsByTagName(name);
return Array.from(nodes);
}
getElements(nodes, _document) {
let containers = [];
for (const node of nodes) {
if (typeof node === 'string') {
containers = containers.concat(Array.from(this.document.querySelectorAll(node)));
}
else if (Array.isArray(node)) {
containers = containers.concat(Array.from(node));
}
else if (node instanceof this.window.NodeList ||
node instanceof this.window.HTMLCollection) {
containers = containers.concat(Array.from(node));
}
else {
containers.push(node);
}
}
return containers;
}
getElement(selector, node = this.document) {
return node.querySelector(selector);
}
contains(container, node) {
return container.contains(node);
}
parent(node) {
return node.parentNode;
}
append(node, child) {
return node.appendChild(child);
}
insert(nchild, ochild) {
return this.parent(ochild).insertBefore(nchild, ochild);
}
remove(child) {
return this.parent(child).removeChild(child);
}
replace(nnode, onode) {
return this.parent(onode).replaceChild(nnode, onode);
}
clone(node, deep = true) {
return node.cloneNode(deep);
}
split(node, n) {
return node.splitText(n);
}
next(node) {
return node.nextSibling;
}
previous(node) {
return node.previousSibling;
}
firstChild(node) {
return node.firstChild;
}
lastChild(node) {
return node.lastChild;
}
childNodes(node) {
return Array.from(node.childNodes);
}
childNode(node, i) {
return node.childNodes[i];
}
kind(node) {
const n = node.nodeType;
return n === 1 || n === 3 || n === 8 ? node.nodeName.toLowerCase() : '';
}
value(node) {
return node.nodeValue || '';
}
textContent(node) {
return node.textContent;
}
innerHTML(node) {
return node.innerHTML;
}
outerHTML(node) {
return node.outerHTML;
}
serializeXML(node) {
const serializer = new this.window.XMLSerializer();
return serializer.serializeToString(node);
}
setAttribute(node, name, value, ns = null) {
if (!ns) {
return node.setAttribute(name, value);
}
name = ns.replace(/.*\//, '') + ':' + name.replace(/^.*:/, '');
return node.setAttributeNS(ns, name, value);
}
getAttribute(node, name) {
return node.getAttribute(name);
}
removeAttribute(node, name) {
return node.removeAttribute(name);
}
hasAttribute(node, name) {
return node.hasAttribute(name);
}
allAttributes(node) {
return Array.from(node.attributes).map((x) => {
return { name: x.name, value: x.value };
});
}
addClass(node, name) {
if (node.classList) {
node.classList.add(name);
}
else {
node.className = (node.className + ' ' + name).trim();
}
}
removeClass(node, name) {
if (node.classList) {
node.classList.remove(name);
}
else {
node.className = node.className
.split(/ /)
.filter((c) => c !== name)
.join(' ');
}
}
hasClass(node, name) {
if (node.classList) {
return node.classList.contains(name);
}
return node.className.split(/ /).includes(name);
}
setStyle(node, name, value) {
node.style[name] = value;
}
getStyle(node, name) {
return node.style[name];
}
allStyles(node) {
return node.style.cssText;
}
insertRules(node, rules) {
for (const rule of rules) {
try {
node.sheet.insertRule(rule, node.sheet.cssRules.length);
}
catch (e) {
console.warn(`MathJax: can't insert css rule '${rule}': ${e.message}`);
}
}
}
cssText(node) {
if (this.kind(node) !== 'style') {
return '';
}
return Array.from(node.sheet.cssRules)
.map((rule) => rule.cssText)
.join('\n');
}
fontSize(node) {
const style = this.window.getComputedStyle(node);
return parseFloat(style.fontSize);
}
fontFamily(node) {
const style = this.window.getComputedStyle(node);
return style.fontFamily || '';
}
nodeSize(node, em = 1, local = false) {
if (local && node.getBBox) {
const { width, height } = node.getBBox();
return [width / em, height / em];
}
return [node.offsetWidth / em, node.offsetHeight / em];
}
nodeBBox(node) {
const { left, right, top, bottom } = node.getBoundingClientRect();
return { left, right, top, bottom };
}
createWorker(listener, options) {
return HTMLAdaptor_awaiter(this, void 0, void 0, function* () {
const { path, maps, worker } = options;
const file = `${path}/${worker}`;
const content = `
self.maps = '${quoted(maps)}';
importScripts('${quoted(file)}');
`;
const url = URL.createObjectURL(new Blob([content], { type: 'text/javascript' }));
const webworker = new Worker(url);
webworker.onmessage = listener;
URL.revokeObjectURL(url);
return webworker;
});
}
}
function quoted(text) {
return [...text]
.map((c) => {
if (c === '\\' || c === "'") {
c = '\\' + c;
}
else if (c < ' ' || c > '\u007e') {
c = `\\u{${c.codePointAt(0).toString(16)}}`;
}
return c;
})
.join('');
}
//# sourceMappingURL=HTMLAdaptor.js.map
;// ./mjs/adaptors/browserAdaptor.js
function browserAdaptor() {
return new HTMLAdaptor(window);
}
//# sourceMappingURL=browserAdaptor.js.map
;// ./mjs/core/FindMath.js
class AbstractFindMath {
constructor(options) {
const CLASS = this.constructor;
this.options = userOptions(defaultOptions({}, CLASS.OPTIONS), options);
}
}
AbstractFindMath.OPTIONS = {};
//# sourceMappingURL=FindMath.js.map
;// ./mjs/core/InputJax.js
class AbstractInputJax {
constructor(options = {}) {
this.adaptor = null;
this.mmlFactory = null;
const CLASS = this.constructor;
this.options = userOptions(defaultOptions({}, CLASS.OPTIONS), options);
this.preFilters = new FunctionList(this.options.preFilters);
this.postFilters = new FunctionList(this.options.postFilters);
}
get name() {
return this.constructor.NAME;
}
setAdaptor(adaptor) {
this.adaptor = adaptor;
}
setMmlFactory(mmlFactory) {
this.mmlFactory = mmlFactory;
}
initialize() { }
reset(..._args) { }
get processStrings() {
return true;
}
findMath(_node, _options) {
return [];
}
executeFilters(filters, math, document, data) {
const args = { math: math, document: document, data: data };
filters.execute(args);
return args.data;
}
}
AbstractInputJax.NAME = 'generic';
AbstractInputJax.OPTIONS = {
preFilters: [],
postFilters: [],
};
//# sourceMappingURL=InputJax.js.map
;// ./mjs/core/OutputJax.js
class AbstractOutputJax {
constructor(options = {}) {
this.adaptor = null;
const CLASS = this.constructor;
this.options = userOptions(defaultOptions({}, CLASS.OPTIONS), options);
this.preFilters = new FunctionList(this.options.preFilters);
this.postFilters = new FunctionList(this.options.postFilters);
}
get name() {
return this.constructor.NAME;
}
setAdaptor(adaptor) {
this.adaptor = adaptor;
}
initialize() { }
reset(..._args) { }
getMetrics(_document) { }
styleSheet(_document) {
return null;
}
pageElements(_document) {
return null;
}
executeFilters(filters, math, document, data) {
const args = { math, document, data };
filters.execute(args);
return args.data;
}
}
AbstractOutputJax.NAME = 'generic';
AbstractOutputJax.OPTIONS = {
preFilters: [],
postFilters: [],
};
//# sourceMappingURL=OutputJax.js.map
;// ./mjs/util/LinkedList.js
const END = Symbol();
class ListItem {
constructor(data = null) {
this.next = null;
this.prev = null;
this.data = data;
}
}
class LinkedList {
constructor(...args) {
this.list = new ListItem(END);
this.list.next = this.list.prev = this.list;
this.push(...args);
}
isBefore(a, b) {
return a < b;
}
push(...args) {
for (const data of args) {
const item = new ListItem(data);
item.next = this.list;
item.prev = this.list.prev;
this.list.prev = item;
item.prev.next = item;
}
return this;
}
pop() {
const item = this.list.prev;
if (item.data === END) {
return null;
}
this.list.prev = item.prev;
item.prev.next = this.list;
item.next = item.prev = null;
return item.data;
}
unshift(...args) {
for (const data of args.slice(0).reverse()) {
const item = new ListItem(data);
item.next = this.list.next;
item.prev = this.list;
this.list.next = item;
item.next.prev = item;
}
return this;
}
shift() {
const item = this.list.next;
if (item.data === END) {
return null;
}
this.list.next = item.next;
item.next.prev = this.list;
item.next = item.prev = null;
return item.data;
}
remove(...items) {
const map = new Map();
for (const item of items) {
map.set(item, true);
}
let item = this.list.next;
while (item.data !== END) {
const next = item.next;
if (map.has(item.data)) {
item.prev.next = item.next;
item.next.prev = item.prev;
item.next = item.prev = null;
}
item = next;
}
return this;
}
clear() {
this.list.next.prev = this.list.prev.next = null;
this.list.next = this.list.prev = this.list;
return this;
}
*[Symbol.iterator]() {
let current = this.list.next;
while (current.data !== END) {
yield current.data;
current = current.next;
}
}
*reversed() {
let current = this.list.prev;
while (current.data !== END) {
yield current.data;
current = current.prev;
}
}
insert(data, isBefore = null) {
if (isBefore === null) {
isBefore = this.isBefore.bind(this);
}
const item = new ListItem(data);
let cur = this.list.next;
while (cur.data !== END &&
isBefore(cur.data, item.data)) {
cur = cur.next;
}
item.prev = cur.prev;
item.next = cur;
cur.prev.next = cur.prev = item;
return this;
}
sort(isBefore = null) {
if (isBefore === null) {
isBefore = this.isBefore.bind(this);
}
const lists = [];
for (const item of this) {
lists.push(new LinkedList(item));
}
this.list.next = this.list.prev = this.list;
while (lists.length > 1) {
const l1 = lists.shift();
const l2 = lists.shift();
l1.merge(l2, isBefore);
lists.push(l1);
}
if (lists.length) {
this.list = lists[0].list;
}
return this;
}
merge(list, isBefore = null) {
if (isBefore === null) {
isBefore = this.isBefore.bind(this);
}
let lcur = this.list.next;
let mcur = list.list.next;
while (lcur.data !== END && mcur.data !== END) {
if (isBefore(mcur.data, lcur.data)) {
[mcur.prev.next, lcur.prev.next] = [lcur, mcur];
[mcur.prev, lcur.prev] = [lcur.prev, mcur.prev];
[this.list.prev.next, list.list.prev.next] = [list.list, this.list];
[this.list.prev, list.list.prev] = [list.list.prev, this.list.prev];
[lcur, mcur] = [mcur.next, lcur];
}
else {
lcur = lcur.next;
}
}
if (mcur.data !== END) {
this.list.prev.next = list.list.next;
list.list.next.prev = this.list.prev;
list.list.prev.next = this.list;
this.list.prev = list.list.prev;
list.list.next = list.list.prev = list.list;
}
return this;
}
}
//# sourceMappingURL=LinkedList.js.map
;// ./mjs/core/MathList.js
class AbstractMathList extends LinkedList {
isBefore(a, b) {
return (a.start.i < b.start.i ||
(a.start.i === b.start.i && a.start.n < b.start.n));
}
}
//# sourceMappingURL=MathList.js.map
;// ./mjs/core/MathItem.js
function protoItem(open, math, close, n, start, end, display = null) {
const item = {
open: open,
math: math,
close: close,
n: n,
start: { n: start },
end: { n: end },
display: display,
};
return item;
}
class AbstractMathItem {
get isEscaped() {
return this.display === null;
}
constructor(math, jax, display = true, start = { i: 0, n: 0, delim: '' }, end = { i: 0, n: 0, delim: '' }) {
this.root = null;
this.typesetRoot = null;
this.metrics = {};
this.inputData = {};
this.outputData = {};
this._state = STATE.UNPROCESSED;
this.math = math;
this.inputJax = jax;
this.display = display;
this.start = start;
this.end = end;
this.root = null;
this.typesetRoot = null;
this.metrics = {};
this.inputData = {};
this.outputData = {};
}
render(document) {
document.renderActions.renderMath(this, document);
}
rerender(document, start = STATE.RERENDER) {
if (this.state() >= start) {
this.state(start - 1);
}
document.renderActions.renderMath(this, document, start);
}
convert(document, end = STATE.LAST) {
document.renderActions.renderConvert(this, document, end);
}
compile(document) {
if (this.state() < STATE.COMPILED) {
this.root = this.inputJax.compile(this, document);
this.state(STATE.COMPILED);
}
}
typeset(document) {
if (this.state() < STATE.TYPESET) {
this.typesetRoot = document.outputJax[this.isEscaped ? 'escaped' : 'typeset'](this, document);
this.state(STATE.TYPESET);
}
}
updateDocument(_document) { }
removeFromDocument(_restore = false) {
this.clear();
}
setMetrics(em, ex, cwidth, scale) {
this.metrics = {
em: em,
ex: ex,
containerWidth: cwidth,
scale: scale,
};
}
state(state = null, restore = false) {
if (state != null) {
if (state < STATE.INSERTED && this._state >= STATE.INSERTED) {
this.removeFromDocument(restore);
}
if (state < STATE.TYPESET && this._state >= STATE.TYPESET) {
this.outputData = {};
}
if (state < STATE.COMPILED && this._state >= STATE.COMPILED) {
this.inputData = {};
}
this._state = state;
}
return this._state;
}
reset(restore = false) {
this.state(STATE.UNPROCESSED, restore);
}
clear() { }
}
const STATE = {
UNPROCESSED: 0,
FINDMATH: 10,
COMPILED: 20,
CONVERT: 100,
METRICS: 110,
RERENDER: 125,
TYPESET: 150,
INSERTED: 200,
LAST: 10000,
};
function newState(name, state) {
if (name in STATE) {
throw Error('State ' + name + ' already exists');
}
STATE[name] = state;
}
//# sourceMappingURL=MathItem.js.map
;// ./mjs/core/Tree/Factory.js
class AbstractFactory {
constructor(nodes = null) {
this.defaultKind = 'unknown';
this.nodeMap = new Map();
this.node = {};
if (nodes === null) {
nodes = this.constructor.defaultNodes;
}
for (const kind of Object.keys(nodes)) {
this.setNodeClass(kind, nodes[kind]);
}
}
create(kind, ...args) {
return (this.node[kind] || this.node[this.defaultKind])(...args);
}
setNodeClass(kind, nodeClass) {
this.nodeMap.set(kind, nodeClass);
const KIND = this.nodeMap.get(kind);
this.node[kind] = (...args) => {
return new KIND(this, ...args);
};
}
getNodeClass(kind) {
return this.nodeMap.get(kind);
}
deleteNodeClass(kind) {
this.nodeMap.delete(kind);
delete this.node[kind];
}
nodeIsKind(node, kind) {
return node instanceof this.getNodeClass(kind);
}
getKinds() {
return Array.from(this.nodeMap.keys());
}
}
AbstractFactory.defaultNodes = {};
//# sourceMappingURL=Factory.js.map
;// ./mjs/core/Tree/NodeFactory.js
class AbstractNodeFactory extends AbstractFactory {
create(kind, properties = {}, children = []) {
return this.node[kind](properties, children);
}
}
//# sourceMappingURL=NodeFactory.js.map
;// ./mjs/core/MmlTree/Attributes.js
const INHERIT = '_inherit_';
class Attributes {
constructor(defaults, global) {
this.global = global;
this.defaults = Object.create(global);
this.inherited = Object.create(this.defaults);
this.attributes = Object.create(this.inherited);
Object.assign(this.defaults, defaults);
}
set(name, value) {
this.attributes[name] = value;
}
setList(list) {
Object.assign(this.attributes, list);
}
unset(name) {
delete this.attributes[name];
}
get(name) {
let value = this.attributes[name];
if (value === INHERIT) {
value = this.global[name];
}
return value;
}
getExplicit(name) {
return this.hasExplicit(name) ? this.attributes[name] : undefined;
}
hasExplicit(name) {
return Object.hasOwn(this.attributes, name);
}
hasOneOf(names) {
for (const name of names) {
if (this.hasExplicit(name)) {
return true;
}
}
return false;
}
getList(...names) {
const values = {};
for (const name of names) {
values[name] = this.get(name);
}
return values;
}
setInherited(name, value) {
this.inherited[name] = value;
}
getInherited(name) {
return this.inherited[name];
}
getDefault(name) {
return this.defaults[name];
}
isSet(name) {
return (Object.hasOwn(this.attributes, name) ||
Object.hasOwn(this.inherited, name));
}
hasDefault(name) {
return name in this.defaults;
}
getExplicitNames() {
return Object.keys(this.attributes);
}
getInheritedNames() {
return Object.keys(this.inherited);
}
getDefaultNames() {
return Object.keys(this.defaults);
}
getGlobalNames() {
return Object.keys(this.global);
}
getAllAttributes() {
return this.attributes;
}
getAllInherited() {
return this.inherited;
}
getAllDefaults() {
return this.defaults;
}
getAllGlobals() {
return this.global;
}
}
//# sourceMappingURL=Attributes.js.map
;// ./mjs/core/Tree/Node.js
class AbstractNode {
constructor(factory, properties = {}, children = []) {
this.factory = factory;
this.parent = null;
this.properties = {};
this.childNodes = [];
for (const name of Object.keys(properties)) {
this.setProperty(name, properties[name]);
}
if (children.length) {
this.setChildren(children);
}
}
get kind() {
return 'unknown';
}
setProperty(name, value) {
this.properties[name] = value;
}
getProperty(name) {
return this.properties[name];
}
getPropertyNames() {
return Object.keys(this.properties);
}
getAllProperties() {
return this.properties;
}
removeProperty(...names) {
for (const name of names) {
delete this.properties[name];
}
}
isKind(kind) {
return this.factory.nodeIsKind(this, kind);
}
setChildren(children) {
this.childNodes = [];
for (const child of children) {
this.appendChild(child);
}
}
appendChild(child) {
this.childNodes.push(child);
child.parent = this;
return child;
}
replaceChild(newChild, oldChild) {
const i = this.childIndex(oldChild);
if (i !== null) {
this.childNodes[i] = newChild;
newChild.parent = this;
if (oldChild.parent === this) {
oldChild.parent = null;
}
}
return newChild;
}
removeChild(child) {
const i = this.childIndex(child);
if (i !== null) {
this.childNodes.splice(i, 1);
child.parent = null;
}
return child;
}
childIndex(node) {
const i = this.childNodes.indexOf(node);
return i === -1 ? null : i;
}
copy() {
const node = this.factory.create(this.kind);
node.properties = Object.assign({}, this.properties);
for (const child of this.childNodes || []) {
if (child) {
node.appendChild(child.copy());
}
}
return node;
}
findNodes(kind) {
const nodes = [];
this.walkTree((node) => {
if (node.isKind(kind)) {
nodes.push(node);
}
});
return nodes;
}
walkTree(func, data) {
func(this, data);
for (const child of this.childNodes) {
if (child) {
child.walkTree(func, data);
}
}
return data;
}
toString() {
return this.kind + '(' + this.childNodes.join(',') + ')';
}
}
class AbstractEmptyNode extends AbstractNode {
setChildren(_children) { }
appendChild(child) {
return child;
}
replaceChild(_newChild, oldChild) {
return oldChild;
}
childIndex(_node) {
return null;
}
walkTree(func, data) {
func(this, data);
return data;
}
toString() {
return this.kind;
}
}
//# sourceMappingURL=Node.js.map
;// ./mjs/core/MmlTree/MmlNode.js
const TEXCLASS = {
ORD: 0,
OP: 1,
BIN: 2,
REL: 3,
OPEN: 4,
CLOSE: 5,
PUNCT: 6,
INNER: 7,
NONE: -1,
};
const TEXCLASSNAMES = [
'ORD',
'OP',
'BIN',
'REL',
'OPEN',
'CLOSE',
'PUNCT',
'INNER',
];
const TEXSPACELENGTH = [
'',
'thinmathspace',
'mediummathspace',
'thickmathspace',
];
const TEXSPACE = [
[0, -1, 2, 3, 0, 0, 0, 1],
[-1, -1, 0, 3, 0, 0, 0, 1],
[2, 2, 0, 0, 2, 0, 0, 2],
[3, 3, 0, 0, 3, 0, 0, 3],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, -1, 2, 3, 0, 0, 0, 1],
[1, 1, 0, 1, 1, 1, 1, 1],
[1, -1, 2, 3, 1, 0, 1, 1]
];
const MATHVARIANTS = new Set([
'normal',
'bold',
'italic',
'bold-italic',
'double-struck',
'fraktur',
'bold-fraktur',
'script',
'bold-script',
'sans-serif',
'bold-sans-serif',
'sans-serif-italic',
'sans-serif-bold-italic',
'monospace',
'inital',
'tailed',
'looped',
'stretched',
]);
const indentAttributes = [
'indentalign',
'indentalignfirst',
'indentshift',
'indentshiftfirst',
];
class AbstractMmlNode extends AbstractNode {
constructor(factory, attributes = {}, children = []) {
super(factory);
this.prevClass = null;
this.prevLevel = null;
this.texclass = null;
if (this.arity < 0) {
this.childNodes = [factory.create('inferredMrow')];
this.childNodes[0].parent = this;
}
this.setChildren(children);
this.attributes = new Attributes(factory.getNodeClass(this.kind).defaults, factory.getNodeClass('math').defaults);
this.attributes.setList(attributes);
}
copy(keepIds = false) {
const node = this.factory.create(this.kind);
node.properties = Object.assign({}, this.properties);
if (this.attributes) {
const attributes = this.attributes.getAllAttributes();
for (const name of Object.keys(attributes)) {
if (name !== 'id' || keepIds) {
node.attributes.set(name, attributes[name]);
}
}
}
if (this.childNodes && this.childNodes.length) {
let children = this.childNodes;
if (children.length === 1 && children[0].isInferred) {
children = children[0].childNodes;
}
for (const child of children) {
if (child) {
node.appendChild(child.copy());
}
else {
node.childNodes.push(null);
}
}
}
return node;
}
get texClass() {
return this.texclass;
}
set texClass(texClass) {
this.texclass = texClass;
}
get isToken() {
return false;
}
get isEmbellished() {
return false;
}
get isSpacelike() {
return false;
}
get linebreakContainer() {
return false;
}
get linebreakAlign() {
return 'data-align';
}
get arity() {
return Infinity;
}
get isInferred() {
return false;
}
get Parent() {
let parent = this.parent;
while (parent && parent.notParent) {
parent = parent.Parent;
}
return parent;
}
get notParent() {
return false;
}
setChildren(children) {
if (this.arity < 0) {
return this.childNodes[0].setChildren(children);
}
return super.setChildren(children);
}
appendChild(child) {
if (this.arity < 0) {
this.childNodes[0].appendChild(child);
return child;
}
if (child.isInferred) {
if (this.arity === Infinity) {
child.childNodes.forEach((node) => super.appendChild(node));
return child;
}
const original = child;
child = this.factory.create('mrow');
child.setChildren(original.childNodes);
child.attributes = original.attributes;
for (const name of original.getPropertyNames()) {
child.setProperty(name, original.getProperty(name));
}
}
return super.appendChild(child);
}
replaceChild(newChild, oldChild) {
if (this.arity < 0) {
this.childNodes[0].replaceChild(newChild, oldChild);
return newChild;
}
return super.replaceChild(newChild, oldChild);
}
core() {
return this;
}
coreMO() {
return this;
}
coreIndex() {
return 0;
}
childPosition() {
let child = null;
let parent = this.parent;
while (parent && parent.notParent) {
child = parent;
parent = parent.parent;
}
child = child || this;
if (parent) {
let i = 0;
for (const node of parent.childNodes) {
if (node === child) {
return i;
}
i++;
}
}
return null;
}
setTeXclass(prev) {
this.getPrevClass(prev);
return this.texClass != null ? this : prev;
}
updateTeXclass(core) {
if (core) {
this.prevClass = core.prevClass;
this.prevLevel = core.prevLevel;
core.prevClass = core.prevLevel = null;
this.texClass = core.texClass;
}
}
getPrevClass(prev) {
if (prev) {
this.prevClass = prev.texClass;
this.prevLevel = prev.attributes.get('scriptlevel');
}
}
texSpacing() {
const prevClass = this.prevClass != null ? this.prevClass : TEXCLASS.NONE;
const texClass = this.texClass || TEXCLASS.ORD;
if (prevClass === TEXCLASS.NONE || texClass === TEXCLASS.NONE) {
return '';
}
const space = TEXSPACE[prevClass][texClass];
if ((this.prevLevel > 0 ||
this.attributes.get('scriptlevel') > 0) &&
space >= 0) {
return '';
}
return TEXSPACELENGTH[Math.abs(space)];
}
hasSpacingAttributes() {
return this.isEmbellished && this.coreMO().hasSpacingAttributes();
}
setInheritedAttributes(attributes = {}, display = false, level = 0, prime = false) {
var _a, _b, _c;
const defaults = this.attributes.getAllDefaults();
for (const key of Object.keys(attributes)) {
if (Object.hasOwn(defaults, key) ||
Object.hasOwn(AbstractMmlNode.alwaysInherit, key)) {
const [node, value] = attributes[key];
if (!((_b = (_a = AbstractMmlNode.noInherit[node]) === null || _a === void 0 ? void 0 : _a[this.kind]) === null || _b === void 0 ? void 0 : _b[key])) {
this.attributes.setInherited(key, value);
}
}
if ((_c = AbstractMmlNode.stopInherit[this.kind]) === null || _c === void 0 ? void 0 : _c[key]) {
attributes = Object.assign({}, attributes);
delete attributes[key];
}
}
const displaystyle = this.attributes.getExplicit('displaystyle');
if (displaystyle === undefined) {
this.attributes.setInherited('displaystyle', display);
}
const scriptlevel = this.attributes.getExplicit('scriptlevel');
if (scriptlevel === undefined) {
this.attributes.setInherited('scriptlevel', level);
}
if (prime) {
this.setProperty('texprimestyle', prime);
}
const arity = this.arity;
if (arity >= 0 &&
arity !== Infinity &&
((arity === 1 && this.childNodes.length === 0) ||
(arity !== 1 && this.childNodes.length !== arity))) {
if (arity < this.childNodes.length) {
this.childNodes = this.childNodes.slice(0, arity);
}
else {
while (this.childNodes.length < arity) {
this.appendChild(this.factory.create('mrow'));
}
}
}
if (this.linebreakContainer && !this.isEmbellished) {
const align = this.linebreakAlign;
if (align) {
const indentalign = this.attributes.get(align) || 'left';
attributes = this.addInheritedAttributes(attributes, {
indentalign,
indentshift: '0',
indentalignfirst: indentalign,
indentshiftfirst: '0',
indentalignlast: 'indentalign',
indentshiftlast: 'indentshift',
});
}
}
this.setChildInheritedAttributes(attributes, display, level, prime);
}
setChildInheritedAttributes(attributes, display, level, prime) {
for (const child of this.childNodes) {
child.setInheritedAttributes(attributes, display, level, prime);
}
}
addInheritedAttributes(current, attributes) {
const updated = Object.assign({}, current);
for (const name of Object.keys(attributes)) {
if (name !== 'displaystyle' &&
name !== 'scriptlevel' &&
name !== 'style') {
updated[name] = [this.kind, attributes[name]];
}
}
return updated;
}
inheritAttributesFrom(node) {
const attributes = node.attributes;
const display = attributes.get('displaystyle');
const scriptlevel = attributes.get('scriptlevel');
const defaults = !attributes.isSet('mathsize')
? {}
: { mathsize: ['math', attributes.get('mathsize')] };
const prime = node.getProperty('texprimestyle') || false;
this.setInheritedAttributes(defaults, display, scriptlevel, prime);
}
verifyTree(options = null) {
if (options === null) {
return;
}
this.verifyAttributes(options);
const arity = this.arity;
if (options['checkArity']) {
if (arity >= 0 &&
arity !== Infinity &&
((arity === 1 && this.childNodes.length === 0) ||
(arity !== 1 && this.childNodes.length !== arity))) {
this.mError('Wrong number of children for "' + this.kind + '" node', options, true);
}
}
this.verifyChildren(options);
}
verifyAttributes(options) {
if (options.checkAttributes) {
const attributes = this.attributes;
const bad = [];
for (const name of attributes.getExplicitNames()) {
if (name.substring(0, 5) !== 'data-' &&
attributes.getDefault(name) === undefined &&
!name.match(/^(?:class|style|id|(?:xlink:)?href)$/)) {
bad.push(name);
}
}
if (bad.length) {
this.mError('Unknown attributes for ' + this.kind + ' node: ' + bad.join(', '), options);
}
}
if (options.checkMathvariants) {
const variant = this.attributes.getExplicit('mathvariant');
if (variant &&
!MATHVARIANTS.has(variant) &&
!this.getProperty('ignore-variant')) {
this.mError(`Invalid mathvariant: ${variant}`, options, true);
}
}
}
verifyChildren(options) {
for (const child of this.childNodes) {
child.verifyTree(options);
}
}
mError(message, options, short = false) {
if (this.parent && this.parent.isKind('merror')) {
return null;
}
const merror = this.factory.create('merror');
merror.attributes.set('data-mjx-message', message);
if (options.fullErrors || short) {
const mtext = this.factory.create('mtext');
const text = this.factory.create('text');
text.setText(options.fullErrors ? message : this.kind);
mtext.appendChild(text);
merror.appendChild(mtext);
this.parent.replaceChild(merror, this);
if (!options.fullErrors) {
merror.attributes.set('title', message);
}
}
else {
this.parent.replaceChild(merror, this);
merror.appendChild(this);
}
return merror;
}
}
AbstractMmlNode.defaults = {
mathbackground: INHERIT,
mathcolor: INHERIT,
mathsize: INHERIT,
dir: INHERIT,
};
AbstractMmlNode.noInherit = {
mstyle: {
mpadded: {
width: true,
height: true,
depth: true,
lspace: true,
voffset: true,
},
mtable: { width: true, height: true, depth: true, align: true },
},
maligngroup: {
mrow: { groupalign: true },
mtable: { groupalign: true },
},
mtr: {
msqrt: { 'data-vertical-align': true },
mroot: { 'data-vertical-align': true },
},
mlabeledtr: {
msqrt: { 'data-vertical-align': true },
mroot: { 'data-vertical-align': true },
},
};
AbstractMmlNode.stopInherit = {
mtd: { columnalign: true, rowalign: true, groupalign: true },
};
AbstractMmlNode.alwaysInherit = {
scriptminsize: true,
scriptsizemultiplier: true,
infixlinebreakstyle: true,
};
AbstractMmlNode.verifyDefaults = {
checkArity: true,
checkAttributes: false,
checkMathvariants: true,
fullErrors: false,
fixMmultiscripts: true,
fixMtables: true,
};
class AbstractMmlTokenNode extends AbstractMmlNode {
get isToken() {
return true;
}
getText() {
let text = '';
for (const child of this.childNodes) {
if (child instanceof TextNode) {
text += child.getText();
}
else if ('textContent' in child) {
text += child.textContent();
}
}
return text;
}
setChildInheritedAttributes(attributes, display, level, prime) {
for (const child of this.childNodes) {
if (child instanceof AbstractMmlNode) {
child.setInheritedAttributes(attributes, display, level, prime);
}
}
}
walkTree(func, data) {
func(this, data);
for (const child of this.childNodes) {
if (child instanceof AbstractMmlNode) {
child.walkTree(func, data);
}
}
return data;
}
}
AbstractMmlTokenNode.defaults = Object.assign(Object.assign({}, AbstractMmlNode.defaults), { mathvariant: 'normal', mathsize: INHERIT });
class AbstractMmlLayoutNode extends AbstractMmlNode {
get isSpacelike() {
return this.childNodes[0].isSpacelike;
}
get isEmbellished() {
return this.childNodes[0].isEmbellished;
}
get arity() {
return -1;
}
core() {
return this.childNodes[0];
}
coreMO() {
return this.childNodes[0].coreMO();
}
setTeXclass(prev) {
prev = this.childNodes[0].setTeXclass(prev);
this.updateTeXclass(this.childNodes[0]);
return prev;
}
}
AbstractMmlLayoutNode.defaults = AbstractMmlNode.defaults;
class AbstractMmlBaseNode extends AbstractMmlNode {
get isEmbellished() {
return this.childNodes[0].isEmbellished;
}
core() {
return this.childNodes[0];
}
coreMO() {
return this.childNodes[0].coreMO();
}
setTeXclass(prev) {
this.getPrevClass(prev);
this.texClass = TEXCLASS.ORD;
const base = this.childNodes[0];
let result = null;
if (base) {
if (this.isEmbellished || base.isKind('mi')) {
result = base.setTeXclass(prev);
this.updateTeXclass(this.core());
}
else {
base.setTeXclass(null);
}
}
for (const child of this.childNodes.slice(1)) {
if (child) {
child.setTeXclass(null);
}
}
return result || this;
}
}
AbstractMmlBaseNode.defaults = AbstractMmlNode.defaults;
class AbstractMmlEmptyNode extends AbstractEmptyNode {
get isToken() {
return false;
}
get isEmbellished() {
return false;
}
get isSpacelike() {
return false;
}
get linebreakContainer() {
return false;
}
get linebreakAlign() {
return '';
}
get arity() {
return 0;
}
get isInferred() {
return false;
}
get notParent() {
return false;
}
get Parent() {
return this.parent;
}
get texClass() {
return TEXCLASS.NONE;
}
get prevClass() {
return TEXCLASS.NONE;
}
get prevLevel() {
return 0;
}
hasSpacingAttributes() {
return false;
}
get attributes() {
return null;
}
core() {
return this;
}
coreMO() {
return this;
}
coreIndex() {
return 0;
}
childPosition() {
return 0;
}
setTeXclass(prev) {
return prev;
}
texSpacing() {
return '';
}
setInheritedAttributes(_attributes, _display, _level, _prime) { }
inheritAttributesFrom(_node) { }
verifyTree(_options) { }
mError(_message, _options, _short = false) {
return null;
}
}
class TextNode extends AbstractMmlEmptyNode {
constructor() {
super(...arguments);
this.text = '';
}
get kind() {
return 'text';
}
getText() {
return this.text;
}
setText(text) {
this.text = text;
return this;
}
copy() {
return this.factory.create(this.kind).setText(this.getText());
}
toString() {
return this.text;
}
}
class XMLNode extends AbstractMmlEmptyNode {
constructor() {
super(...arguments);
this.xml = null;
this.adaptor = null;
}
get kind() {
return 'XML';
}
getXML() {
return this.xml;
}
setXML(xml, adaptor = null) {
this.xml = xml;
this.adaptor = adaptor;
return this;
}
getSerializedXML() {
return this.adaptor.serializeXML(this.xml);
}
copy() {
return this.factory.create(this.kind).setXML(this.adaptor.clone(this.xml));
}
toString() {
return 'XML data';
}
}
//# sourceMappingURL=MmlNode.js.map
;// ./mjs/core/MmlTree/MmlNodes/math.js
class MmlMath extends AbstractMmlLayoutNode {
get kind() {
return 'math';
}
get linebreakContainer() {
return true;
}
get linebreakAlign() {
return '';
}
setChildInheritedAttributes(attributes, display, level, prime) {
if (this.attributes.get('mode') === 'display') {
this.attributes.setInherited('display', 'block');
}
attributes = this.addInheritedAttributes(attributes, this.attributes.getAllAttributes());
display =
!!this.attributes.get('displaystyle') ||
(!this.attributes.get('displaystyle') &&
this.attributes.get('display') === 'block');
this.attributes.setInherited('displaystyle', display);
level = (this.attributes.get('scriptlevel') ||
this.constructor.defaults['scriptlevel']);
super.setChildInheritedAttributes(attributes, display, level, prime);
}
verifyTree(options = null) {
super.verifyTree(options);
if (this.parent) {
this.mError('Improper nesting of math tags', options, true);
}
}
}
MmlMath.defaults = Object.assign(Object.assign({}, AbstractMmlLayoutNode.defaults), { mathvariant: 'normal', mathsize: 'normal', mathcolor: '', mathbackground: 'transparent', dir: 'ltr', scriptlevel: 0, displaystyle: false, display: 'inline', maxwidth: '', overflow: 'linebreak', altimg: '', 'altimg-width': '', 'altimg-height': '', 'altimg-valign': '', alttext: '', cdgroup: '', scriptsizemultiplier: 1 / Math.sqrt(2), scriptminsize: '.4em', infixlinebreakstyle: 'before', lineleading: '100%', linebreakmultchar: '\u2062', indentshift: 'auto', indentalign: 'auto', indenttarget: '', indentalignfirst: 'indentalign', indentshiftfirst: 'indentshift', indentalignlast: 'indentalign', indentshiftlast: 'indentshift' });
//# sourceMappingURL=math.js.map
;// ./mjs/core/MmlTree/MmlNodes/mi.js
class MmlMi extends AbstractMmlTokenNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'mi';
}
setInheritedAttributes(attributes = {}, display = false, level = 0, prime = false) {
super.setInheritedAttributes(attributes, display, level, prime);
const text = this.getText();
if (text.match(MmlMi.singleCharacter) && !attributes.mathvariant) {
this.attributes.setInherited('mathvariant', 'italic');
}
}
setTeXclass(prev) {
this.getPrevClass(prev);
const name = this.getText();
if (name.length > 1 &&
name.match(MmlMi.operatorName) &&
this.attributes.get('mathvariant') === 'normal' &&
this.getProperty('autoOP') === undefined &&
this.getProperty('texClass') === undefined) {
this.texClass = TEXCLASS.OP;
this.setProperty('autoOP', true);
}
return this;
}
}
MmlMi.defaults = Object.assign({}, AbstractMmlTokenNode.defaults);
MmlMi.operatorName = /^[a-z][a-z0-9]*$/i;
MmlMi.singleCharacter = /^[\uD800-\uDBFF]?.[\u0300-\u036F\u1AB0-\u1ABE\u1DC0-\u1DFF\u20D0-\u20EF]*$/;
//# sourceMappingURL=mi.js.map
;// ./mjs/core/MmlTree/MmlNodes/mn.js
class MmlMn extends AbstractMmlTokenNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'mn';
}
}
MmlMn.defaults = Object.assign({}, AbstractMmlTokenNode.defaults);
//# sourceMappingURL=mn.js.map
;// ./mjs/core/MmlTree/OperatorDictionary.js
function OPDEF(lspace, rspace, texClass = TEXCLASS.BIN, properties = null) {
return [lspace, rspace, texClass, properties];
}
const MO = {
ORD: OPDEF(0, 0, TEXCLASS.ORD),
ORD11: OPDEF(1, 1, TEXCLASS.ORD),
ORD21: OPDEF(2, 1, TEXCLASS.ORD),
ORD02: OPDEF(0, 2, TEXCLASS.ORD),
ORD55: OPDEF(5, 5, TEXCLASS.ORD),
NONE: OPDEF(0, 0, TEXCLASS.NONE),
OP: OPDEF(1, 2, TEXCLASS.OP, {
largeop: true,
movablelimits: true,
symmetric: true,
}),
OPFIXED: OPDEF(1, 2, TEXCLASS.OP, { largeop: true, movablelimits: true }),
INTEGRAL: OPDEF(0, 1, TEXCLASS.OP, { largeop: true, symmetric: true }),
INTEGRAL2: OPDEF(1, 2, TEXCLASS.OP, { largeop: true, symmetric: true }),
BIN3: OPDEF(3, 3, TEXCLASS.BIN),
BIN4: OPDEF(4, 4, TEXCLASS.BIN),
BIN01: OPDEF(0, 1, TEXCLASS.BIN),
BIN5: OPDEF(5, 5, TEXCLASS.BIN),
TALLBIN: OPDEF(4, 4, TEXCLASS.BIN, { stretchy: true }),
BINOP: OPDEF(4, 4, TEXCLASS.BIN, { largeop: true, movablelimits: true }),
REL: OPDEF(5, 5, TEXCLASS.REL),
REL1: OPDEF(1, 1, TEXCLASS.REL, { stretchy: true }),
REL4: OPDEF(4, 4, TEXCLASS.REL),
RELSTRETCH: OPDEF(5, 5, TEXCLASS.REL, { stretchy: true }),
RELACCENT: OPDEF(5, 5, TEXCLASS.REL, { accent: true }),
WIDEREL: OPDEF(5, 5, TEXCLASS.REL, { accent: true, stretchy: true }),
OPEN: OPDEF(0, 0, TEXCLASS.OPEN, {
fence: true,
stretchy: true,
symmetric: true,
}),
CLOSE: OPDEF(0, 0, TEXCLASS.CLOSE, {
fence: true,
stretchy: true,
symmetric: true,
}),
INNER: OPDEF(0, 0, TEXCLASS.INNER),
PUNCT: OPDEF(0, 3, TEXCLASS.PUNCT),
ACCENT: OPDEF(0, 0, TEXCLASS.ORD, { accent: true }),
WIDEACCENT: OPDEF(0, 0, TEXCLASS.ORD, { accent: true, stretchy: true }),
};
const RANGES = [
[0x0020, 0x007f, TEXCLASS.REL, 'mo'],
[0x00a0, 0x00bf, TEXCLASS.ORD, 'mo'],
[0x00c0, 0x024f, TEXCLASS.ORD, 'mi'],
[0x02b0, 0x036f, TEXCLASS.ORD, 'mo'],
[0x0370, 0x1a20, TEXCLASS.ORD, 'mi'],
[0x1ab0, 0x1aff, TEXCLASS.ORD, 'mo'],
[0x1b00, 0x1dbf, TEXCLASS.ORD, 'mi'],
[0x1dc0, 0x1dff, TEXCLASS.ORD, 'mo'],
[0x1e00, 0x1fff, TEXCLASS.ORD, 'mi'],
[0x2000, 0x206f, TEXCLASS.ORD, 'mo'],
[0x2070, 0x209f, TEXCLASS.ORD, 'mo'],
[0x2100, 0x214f, TEXCLASS.ORD, 'mi'],
[0x2150, 0x218f, TEXCLASS.ORD, 'mn'],
[0x2190, 0x21ff, TEXCLASS.REL, 'mo'],
[0x2200, 0x22ff, TEXCLASS.BIN, 'mo'],
[0x2300, 0x23ff, TEXCLASS.ORD, 'mo'],
[0x2460, 0x24ff, TEXCLASS.ORD, 'mn'],
[0x2500, 0x27ef, TEXCLASS.ORD, 'mo'],
[0x27f0, 0x27ff, TEXCLASS.REL, 'mo'],
[0x2800, 0x28ff, TEXCLASS.ORD, 'mtext'],
[0x2900, 0x297f, TEXCLASS.REL, 'mo'],
[0x2980, 0x29ff, TEXCLASS.ORD, 'mo'],
[0x2a00, 0x2aff, TEXCLASS.BIN, 'mo'],
[0x2b00, 0x2b2f, TEXCLASS.ORD, 'mo'],
[0x2b30, 0x2b4f, TEXCLASS.REL, 'mo'],
[0x2b50, 0x2bff, TEXCLASS.ORD, 'mo'],
[0x2c00, 0x2de0, TEXCLASS.ORD, 'mi'],
[0x2e00, 0x2e7f, TEXCLASS.ORD, 'mo'],
[0x2e80, 0x2fdf, TEXCLASS.ORD, 'mi', 'normal'],
[0x2ff0, 0x303f, TEXCLASS.ORD, 'mo'],
[0x3040, 0xa49f, TEXCLASS.ORD, 'mi', 'normal'],
[0xa4d0, 0xa82f, TEXCLASS.ORD, 'mi'],
[0xa830, 0xa83f, TEXCLASS.ORD, 'mn'],
[0xa840, 0xd7ff, TEXCLASS.ORD, 'mi'],
[0xf900, 0xfaff, TEXCLASS.ORD, 'mi', 'normal'],
[0xfb00, 0xfdff, TEXCLASS.ORD, 'mi'],
[0xfe00, 0xfe6f, TEXCLASS.ORD, 'mo'],
[0xfe70, 0x100ff, TEXCLASS.ORD, 'mi'],
[0x10100, 0x1018f, TEXCLASS.ORD, 'mn'],
[0x10190, 0x123ff, TEXCLASS.ORD, 'mi', 'normal'],
[0x12400, 0x1247f, TEXCLASS.ORD, 'mn'],
[0x12480, 0x1bc9f, TEXCLASS.ORD, 'mi', 'normal'],
[0x1bca0, 0x1d25f, TEXCLASS.ORD, 'mo'],
[0x1d360, 0x1d37f, TEXCLASS.ORD, 'mn'],
[0x1d400, 0x1d7cd, TEXCLASS.ORD, 'mi'],
[0x1d7ce, 0x1d7ff, TEXCLASS.ORD, 'mn'],
[0x1df00, 0x1f7ff, TEXCLASS.ORD, 'mo'],
[0x1f800, 0x1f8ff, TEXCLASS.REL, 'mo'],
[0x1f900, 0x1f9ff, TEXCLASS.ORD, 'mo'],
[0x20000, 0x2fa1f, TEXCLASS.ORD, 'mi', 'normal'],
];
function getRange(text) {
const def = OPTABLE.infix[text] || OPTABLE.prefix[text] || OPTABLE.postfix[text];
if (def) {
return [0, 0, def[2], 'mo'];
}
const n = text.codePointAt(0);
for (const range of RANGES) {
if (n <= range[1]) {
if (n >= range[0]) {
return range;
}
break;
}
}
return [0, 0, TEXCLASS.REL, 'mo'];
}
const MMLSPACING = [
[0, 0],
[1, 2],
[3, 3],
[4, 4],
[0, 0],
[0, 0],
[0, 3],
];
const OPTABLE = {
prefix: {
'(': MO.OPEN,
'+': MO.BIN01,
'-': MO.BIN01,
'[': MO.OPEN,
'{': MO.OPEN,
'|': MO.OPEN,
'||': [0, 0, TEXCLASS.BIN, { fence: true, stretchy: true, symmetric: true }],
'|||': [0, 0, TEXCLASS.ORD, { fence: true, stretchy: true, symmetric: true }],
'\u00AC': MO.ORD21,
'\u00B1': MO.BIN01,
'\u2016': [0, 0, TEXCLASS.ORD, { fence: true, stretchy: true }],
'\u2018': [0, 0, TEXCLASS.OPEN, { fence: true }],
'\u201C': [0, 0, TEXCLASS.OPEN, { fence: true }],
'\u2145': MO.ORD21,
'\u2146': OPDEF(2, 0, TEXCLASS.ORD),
'\u2200': MO.ORD21,
'\u2202': MO.ORD21,
'\u2203': MO.ORD21,
'\u2204': MO.ORD21,
'\u2207': MO.ORD21,
'\u220F': MO.OP,
'\u2210': MO.OP,
'\u2211': MO.OP,
'\u2212': MO.BIN01,
'\u2213': MO.BIN01,
'\u221A': [1, 1, TEXCLASS.ORD, { stretchy: true }],
'\u221B': MO.ORD11,
'\u221C': MO.ORD11,
'\u2220': MO.ORD,
'\u2221': MO.ORD,
'\u2222': MO.ORD,
'\u222B': MO.INTEGRAL,
'\u222C': MO.INTEGRAL,
'\u222D': MO.INTEGRAL,
'\u222E': MO.INTEGRAL,
'\u222F': MO.INTEGRAL,
'\u2230': MO.INTEGRAL,
'\u2231': MO.INTEGRAL,
'\u2232': MO.INTEGRAL,
'\u2233': MO.INTEGRAL,
'\u22C0': MO.OP,
'\u22C1': MO.OP,
'\u22C2': MO.OP,
'\u22C3': MO.OP,
'\u2308': MO.OPEN,
'\u230A': MO.OPEN,
'\u2329': MO.OPEN,
'\u2772': MO.OPEN,
'\u27E6': MO.OPEN,
'\u27E8': MO.OPEN,
'\u27EA': MO.OPEN,
'\u27EC': MO.OPEN,
'\u27EE': MO.OPEN,
'\u2980': [0, 0, TEXCLASS.ORD, { fence: true, stretchy: true }],
'\u2983': MO.OPEN,
'\u2985': MO.OPEN,
'\u2987': MO.OPEN,
'\u2989': MO.OPEN,
'\u298B': MO.OPEN,
'\u298D': MO.OPEN,
'\u298F': MO.OPEN,
'\u2991': MO.OPEN,
'\u2993': MO.OPEN,
'\u2995': MO.OPEN,
'\u2997': MO.OPEN,
'\u29FC': MO.OPEN,
'\u2A00': MO.OP,
'\u2A01': MO.OP,
'\u2A02': MO.OP,
'\u2A03': MO.OP,
'\u2A04': MO.OP,
'\u2A05': MO.OP,
'\u2A06': MO.OP,
'\u2A07': MO.OP,
'\u2A08': MO.OP,
'\u2A09': MO.OP,
'\u2A0A': MO.OP,
'\u2A0B': MO.INTEGRAL2,
'\u2A0C': MO.INTEGRAL,
'\u2A0D': MO.INTEGRAL2,
'\u2A0E': MO.INTEGRAL2,
'\u2A0F': MO.INTEGRAL2,
'\u2A10': MO.OP,
'\u2A11': MO.OP,
'\u2A12': MO.OP,
'\u2A13': MO.OP,
'\u2A14': MO.OP,
'\u2A15': MO.INTEGRAL2,
'\u2A16': MO.INTEGRAL2,
'\u2A17': MO.INTEGRAL2,
'\u2A18': MO.INTEGRAL2,
'\u2A19': MO.INTEGRAL2,
'\u2A1A': MO.INTEGRAL2,
'\u2A1B': MO.INTEGRAL2,
'\u2A1C': MO.INTEGRAL2,
'\u2AFC': MO.OP,
'\u2AFF': MO.OP,
},
postfix: {
'!!': OPDEF(1, 0),
'!': [1, 0, TEXCLASS.CLOSE, null],
'"': MO.ACCENT,
'&': MO.ORD,
')': MO.CLOSE,
'++': OPDEF(0, 0),
'--': OPDEF(0, 0),
'..': OPDEF(0, 0),
'...': MO.ORD,
'\'': MO.ACCENT,
']': MO.CLOSE,
'^': MO.WIDEACCENT,
'_': MO.WIDEACCENT,
'`': MO.ACCENT,
'|': MO.CLOSE,
'}': MO.CLOSE,
'~': MO.WIDEACCENT,
'||': [0, 0, TEXCLASS.BIN, { fence: true, stretchy: true, symmetric: true }],
'|||': [0, 0, TEXCLASS.ORD, { fence: true, stretchy: true, symmetric: true }],
'\u00A8': MO.ACCENT,
'\u00AA': MO.ACCENT,
'\u00AF': MO.WIDEACCENT,
'\u00B0': MO.ORD,
'\u00B2': MO.ACCENT,
'\u00B3': MO.ACCENT,
'\u00B4': MO.ACCENT,
'\u00B8': MO.ACCENT,
'\u00B9': MO.ACCENT,
'\u00BA': MO.ACCENT,
'\u02C6': MO.WIDEACCENT,
'\u02C7': MO.WIDEACCENT,
'\u02C9': MO.WIDEACCENT,
'\u02CA': MO.ACCENT,
'\u02CB': MO.ACCENT,
'\u02CD': MO.WIDEACCENT,
'\u02D8': MO.ACCENT,
'\u02D9': MO.ACCENT,
'\u02DA': MO.ACCENT,
'\u02DC': MO.WIDEACCENT,
'\u02DD': MO.ACCENT,
'\u02F7': MO.WIDEACCENT,
'\u0302': MO.WIDEACCENT,
'\u0311': MO.ACCENT,
'\u03F6': MO.REL,
'\u2016': [0, 0, TEXCLASS.ORD, { fence: true, stretchy: true }],
'\u2019': [0, 0, TEXCLASS.CLOSE, { fence: true }],
'\u201A': MO.ACCENT,
'\u201B': MO.ACCENT,
'\u201D': [0, 0, TEXCLASS.CLOSE, { fence: true }],
'\u201E': MO.ACCENT,
'\u201F': MO.ACCENT,
'\u2032': MO.ORD,
'\u2033': MO.ORD,
'\u2034': MO.ORD,
'\u2035': MO.ORD,
'\u2036': MO.ORD,
'\u2037': MO.ORD,
'\u203E': MO.WIDEACCENT,
'\u2057': MO.ORD,
'\u20DB': MO.ACCENT,
'\u20DC': MO.ACCENT,
'\u2309': MO.CLOSE,
'\u230B': MO.CLOSE,
'\u232A': MO.CLOSE,
'\u23B4': MO.WIDEACCENT,
'\u23B5': MO.WIDEACCENT,
'\u23DC': MO.WIDEACCENT,
'\u23DD': MO.WIDEACCENT,
'\u23DE': MO.WIDEACCENT,
'\u23DF': MO.WIDEACCENT,
'\u23E0': MO.WIDEACCENT,
'\u23E1': MO.WIDEACCENT,
'\u25A0': MO.BIN3,
'\u25A1': MO.BIN3,
'\u25AA': MO.BIN3,
'\u25AB': MO.BIN3,
'\u25AD': MO.BIN3,
'\u25AE': MO.BIN3,
'\u25AF': MO.BIN3,
'\u25B0': MO.BIN3,
'\u25B1': MO.BIN3,
'\u25B2': MO.BIN4,
'\u25B4': MO.BIN4,
'\u25B6': MO.BIN4,
'\u25B7': MO.BIN4,
'\u25B8': MO.BIN4,
'\u25BC': MO.BIN4,
'\u25BE': MO.BIN4,
'\u25C0': MO.BIN4,
'\u25C1': MO.BIN4,
'\u25C2': MO.BIN4,
'\u25C4': MO.BIN4,
'\u25C5': MO.BIN4,
'\u25C6': MO.BIN4,
'\u25C7': MO.BIN4,
'\u25C8': MO.BIN4,
'\u25C9': MO.BIN4,
'\u25CC': MO.BIN4,
'\u25CD': MO.BIN4,
'\u25CE': MO.BIN4,
'\u25CF': MO.BIN4,
'\u25D6': MO.BIN4,
'\u25D7': MO.BIN4,
'\u25E6': MO.BIN4,
'\u266D': MO.ORD02,
'\u266E': MO.ORD02,
'\u266F': MO.ORD02,
'\u2773': MO.CLOSE,
'\u27E7': MO.CLOSE,
'\u27E9': MO.CLOSE,
'\u27EB': MO.CLOSE,
'\u27ED': MO.CLOSE,
'\u27EF': MO.CLOSE,
'\u2980': [0, 0, TEXCLASS.ORD, { fence: true, stretchy: true }],
'\u2984': MO.CLOSE,
'\u2986': MO.CLOSE,
'\u2988': MO.CLOSE,
'\u298A': MO.CLOSE,
'\u298C': MO.CLOSE,
'\u298E': MO.CLOSE,
'\u2990': MO.CLOSE,
'\u2992': MO.CLOSE,
'\u2994': MO.CLOSE,
'\u2996': MO.CLOSE,
'\u2998': MO.CLOSE,
'\u29FD': MO.CLOSE,
},
infix: {
'!=': MO.BIN4,
'#': MO.ORD,
'$': MO.ORD,
'%': [3, 3, TEXCLASS.ORD, null],
'&&': MO.BIN4,
'': MO.ORD,
'*': MO.BIN3,
'**': OPDEF(1, 1),
'*=': MO.BIN4,
'+': MO.BIN4,
'+=': MO.BIN4,
',': [0, 3, TEXCLASS.PUNCT, { linebreakstyle: 'after', separator: true }],
'-': MO.BIN4,
'-=': MO.BIN4,
'->': MO.BIN5,
'.': [0, 3, TEXCLASS.PUNCT, { linebreakstyle: 'after', separator: true }],
'/': MO.ORD11,
'//': OPDEF(1, 1),
'/=': MO.BIN4,
':': [1, 2, TEXCLASS.REL, null],
':=': MO.BIN4,
';': [0, 3, TEXCLASS.PUNCT, { linebreakstyle: 'after', separator: true }],
'<': MO.REL,
'<=': MO.BIN5,
'<>': OPDEF(1, 1),
'=': MO.REL,
'==': MO.BIN4,
'>': MO.REL,
'>=': MO.BIN5,
'?': [1, 1, TEXCLASS.CLOSE, null],
'@': MO.ORD11,
'\\': MO.ORD,
'^': MO.ORD11,
'_': MO.ORD11,
'|': [2, 2, TEXCLASS.ORD, { fence: true, stretchy: true, symmetric: true }],
'||': [2, 2, TEXCLASS.BIN, { fence: true, stretchy: true, symmetric: true }],
'|||': [2, 2, TEXCLASS.ORD, { fence: true, stretchy: true, symmetric: true }],
'\u00B1': MO.BIN4,
'\u00B7': MO.BIN4,
'\u00D7': MO.BIN4,
'\u00F7': MO.BIN4,
'\u02B9': MO.ORD,
'\u0300': MO.ACCENT,
'\u0301': MO.ACCENT,
'\u0303': MO.WIDEACCENT,
'\u0304': MO.ACCENT,
'\u0306': MO.ACCENT,
'\u0307': MO.ACCENT,
'\u0308': MO.ACCENT,
'\u030C': MO.ACCENT,
'\u0332': MO.WIDEACCENT,
'\u0338': MO.REL4,
'\u2015': [0, 0, TEXCLASS.ORD, { stretchy: true }],
'\u2017': [0, 0, TEXCLASS.ORD, { stretchy: true }],
'\u2020': MO.BIN3,
'\u2021': MO.BIN3,
'\u2022': MO.BIN4,
'\u2026': MO.INNER,
'\u2043': MO.BIN4,
'\u2044': MO.TALLBIN,
'\u2061': MO.NONE,
'\u2062': MO.NONE,
'\u2063': [0, 0, TEXCLASS.NONE, { linebreakstyle: 'after', separator: true }],
'\u2064': MO.NONE,
'\u20D7': MO.ACCENT,
'\u2111': MO.ORD,
'\u2113': MO.ORD,
'\u2118': MO.ORD,
'\u211C': MO.ORD,
'\u2190': MO.WIDEREL,
'\u2191': MO.RELSTRETCH,
'\u2192': MO.WIDEREL,
'\u2193': MO.RELSTRETCH,
'\u2194': MO.WIDEREL,
'\u2195': MO.RELSTRETCH,
'\u2196': MO.RELSTRETCH,
'\u2197': MO.RELSTRETCH,
'\u2198': MO.RELSTRETCH,
'\u2199': MO.RELSTRETCH,
'\u219A': MO.RELACCENT,
'\u219B': MO.RELACCENT,
'\u219C': MO.WIDEREL,
'\u219D': MO.WIDEREL,
'\u219E': MO.WIDEREL,
'\u219F': MO.WIDEREL,
'\u21A0': MO.WIDEREL,
'\u21A1': MO.RELSTRETCH,
'\u21A2': MO.WIDEREL,
'\u21A3': MO.WIDEREL,
'\u21A4': MO.WIDEREL,
'\u21A5': MO.RELSTRETCH,
'\u21A6': MO.WIDEREL,
'\u21A7': MO.RELSTRETCH,
'\u21A8': MO.RELSTRETCH,
'\u21A9': MO.WIDEREL,
'\u21AA': MO.WIDEREL,
'\u21AB': MO.WIDEREL,
'\u21AC': MO.WIDEREL,
'\u21AD': MO.WIDEREL,
'\u21AE': MO.RELACCENT,
'\u21AF': MO.RELSTRETCH,
'\u21B0': MO.RELSTRETCH,
'\u21B1': MO.RELSTRETCH,
'\u21B2': MO.RELSTRETCH,
'\u21B3': MO.RELSTRETCH,
'\u21B4': MO.RELSTRETCH,
'\u21B5': MO.RELSTRETCH,
'\u21B6': MO.RELACCENT,
'\u21B7': MO.RELACCENT,
'\u21B8': MO.REL,
'\u21B9': MO.WIDEREL,
'\u21BA': MO.REL,
'\u21BB': MO.REL,
'\u21BC': MO.WIDEREL,
'\u21BD': MO.WIDEREL,
'\u21BE': MO.RELSTRETCH,
'\u21BF': MO.RELSTRETCH,
'\u21C0': MO.WIDEREL,
'\u21C1': MO.WIDEREL,
'\u21C2': MO.RELSTRETCH,
'\u21C3': MO.RELSTRETCH,
'\u21C4': MO.WIDEREL,
'\u21C5': MO.RELSTRETCH,
'\u21C6': MO.WIDEREL,
'\u21C7': MO.WIDEREL,
'\u21C8': MO.RELSTRETCH,
'\u21C9': MO.WIDEREL,
'\u21CA': MO.RELSTRETCH,
'\u21CB': MO.WIDEREL,
'\u21CC': MO.WIDEREL,
'\u21CD': MO.RELACCENT,
'\u21CE': MO.RELACCENT,
'\u21CF': MO.RELACCENT,
'\u21D0': MO.WIDEREL,
'\u21D1': MO.RELSTRETCH,
'\u21D2': MO.WIDEREL,
'\u21D3': MO.RELSTRETCH,
'\u21D4': MO.WIDEREL,
'\u21D5': MO.RELSTRETCH,
'\u21D6': MO.RELSTRETCH,
'\u21D7': MO.RELSTRETCH,
'\u21D8': MO.RELSTRETCH,
'\u21D9': MO.RELSTRETCH,
'\u21DA': MO.WIDEREL,
'\u21DB': MO.WIDEREL,
'\u21DC': MO.WIDEREL,
'\u21DD': MO.WIDEREL,
'\u21DE': MO.REL,
'\u21DF': MO.REL,
'\u21E0': MO.WIDEREL,
'\u21E1': MO.RELSTRETCH,
'\u21E2': MO.WIDEREL,
'\u21E3': MO.RELSTRETCH,
'\u21E4': MO.WIDEREL,
'\u21E5': MO.WIDEREL,
'\u21E6': MO.WIDEREL,
'\u21E7': MO.RELSTRETCH,
'\u21E8': MO.WIDEREL,
'\u21E9': MO.RELSTRETCH,
'\u21EA': MO.RELSTRETCH,
'\u21EB': MO.RELSTRETCH,
'\u21EC': MO.RELSTRETCH,
'\u21ED': MO.RELSTRETCH,
'\u21EE': MO.RELSTRETCH,
'\u21EF': MO.RELSTRETCH,
'\u21F0': MO.WIDEREL,
'\u21F1': MO.REL,
'\u21F2': MO.REL,
'\u21F3': MO.RELSTRETCH,
'\u21F4': MO.RELACCENT,
'\u21F5': MO.RELSTRETCH,
'\u21F6': MO.WIDEREL,
'\u21F7': MO.RELACCENT,
'\u21F8': MO.RELACCENT,
'\u21F9': MO.RELACCENT,
'\u21FA': MO.RELACCENT,
'\u21FB': MO.RELACCENT,
'\u21FC': MO.RELACCENT,
'\u21FD': MO.WIDEREL,
'\u21FE': MO.WIDEREL,
'\u21FF': MO.WIDEREL,
'\u2201': OPDEF(1, 2, TEXCLASS.ORD),
'\u2205': MO.ORD,
'\u2206': MO.BIN3,
'\u2208': MO.REL,
'\u2209': MO.REL,
'\u220A': MO.REL,
'\u220B': MO.REL,
'\u220C': MO.REL,
'\u220D': MO.REL,
'\u220E': MO.BIN3,
'\u2212': MO.BIN4,
'\u2213': MO.BIN4,
'\u2214': MO.BIN4,
'\u2215': MO.TALLBIN,
'\u2216': MO.BIN4,
'\u2217': MO.BIN4,
'\u2218': MO.BIN4,
'\u2219': MO.BIN4,
'\u221D': MO.REL,
'\u221E': MO.ORD,
'\u221F': MO.REL,
'\u2223': MO.REL,
'\u2224': MO.REL,
'\u2225': MO.REL,
'\u2226': MO.REL,
'\u2227': MO.BIN4,
'\u2228': MO.BIN4,
'\u2229': MO.BIN4,
'\u222A': MO.BIN4,
'\u2234': MO.REL,
'\u2235': MO.REL,
'\u2236': MO.REL,
'\u2237': MO.REL,
'\u2238': MO.BIN4,
'\u2239': MO.REL,
'\u223A': MO.BIN4,
'\u223B': MO.REL,
'\u223C': MO.REL,
'\u223D': MO.REL,
'\u223D\u0331': MO.BIN3,
'\u223E': MO.REL,
'\u223F': MO.BIN3,
'\u2240': MO.BIN4,
'\u2241': MO.REL,
'\u2242': MO.REL,
'\u2242\u0338': MO.REL,
'\u2243': MO.REL,
'\u2244': MO.REL,
'\u2245': MO.REL,
'\u2246': MO.REL,
'\u2247': MO.REL,
'\u2248': MO.REL,
'\u2249': MO.REL,
'\u224A': MO.REL,
'\u224B': MO.REL,
'\u224C': MO.REL,
'\u224D': MO.REL,
'\u224E': MO.REL,
'\u224E\u0338': MO.REL,
'\u224F': MO.REL,
'\u224F\u0338': MO.REL,
'\u2250': MO.REL,
'\u2251': MO.REL,
'\u2252': MO.REL,
'\u2253': MO.REL,
'\u2254': MO.REL,
'\u2255': MO.REL,
'\u2256': MO.REL,
'\u2257': MO.REL,
'\u2258': MO.REL,
'\u2259': MO.REL,
'\u225A': MO.REL,
'\u225B': MO.REL,
'\u225C': MO.REL,
'\u225D': MO.REL,
'\u225E': MO.REL,
'\u225F': MO.REL,
'\u2260': MO.REL,
'\u2261': MO.REL,
'\u2262': MO.REL,
'\u2263': MO.REL,
'\u2264': MO.REL,
'\u2265': MO.REL,
'\u2266': MO.REL,
'\u2266\u0338': MO.REL,
'\u2267': MO.REL,
'\u2268': MO.REL,
'\u2269': MO.REL,
'\u226A': MO.REL,
'\u226A\u0338': MO.REL,
'\u226B': MO.REL,
'\u226B\u0338': MO.REL,
'\u226C': MO.REL,
'\u226D': MO.REL,
'\u226E': MO.REL,
'\u226F': MO.REL,
'\u2270': MO.REL,
'\u2271': MO.REL,
'\u2272': MO.REL,
'\u2273': MO.REL,
'\u2274': MO.REL,
'\u2275': MO.REL,
'\u2276': MO.REL,
'\u2277': MO.REL,
'\u2278': MO.REL,
'\u2279': MO.REL,
'\u227A': MO.REL,
'\u227B': MO.REL,
'\u227C': MO.REL,
'\u227D': MO.REL,
'\u227E': MO.REL,
'\u227F': MO.REL,
'\u227F\u0338': MO.REL,
'\u2280': MO.REL,
'\u2281': MO.REL,
'\u2282': MO.REL,
'\u2282\u20D2': MO.REL,
'\u2283': MO.REL,
'\u2283\u20D2': MO.REL,
'\u2284': MO.REL,
'\u2285': MO.REL,
'\u2286': MO.REL,
'\u2287': MO.REL,
'\u2288': MO.REL,
'\u2289': MO.REL,
'\u228A': MO.REL,
'\u228B': MO.REL,
'\u228C': MO.BIN4,
'\u228D': MO.BIN4,
'\u228E': MO.BIN4,
'\u228F': MO.REL,
'\u228F\u0338': MO.REL,
'\u2290': MO.REL,
'\u2290\u0338': MO.REL,
'\u2291': MO.REL,
'\u2292': MO.REL,
'\u2293': MO.BIN4,
'\u2294': MO.BIN4,
'\u2295': MO.BIN4,
'\u2296': MO.BIN4,
'\u2297': MO.BIN4,
'\u2298': MO.BIN4,
'\u2299': MO.BIN4,
'\u229A': MO.BIN4,
'\u229B': MO.BIN4,
'\u229C': MO.BIN4,
'\u229D': MO.BIN4,
'\u229E': MO.BIN4,
'\u229F': MO.BIN4,
'\u22A0': MO.BIN4,
'\u22A1': MO.BIN4,
'\u22A2': MO.REL,
'\u22A3': MO.REL,
'\u22A4': MO.ORD55,
'\u22A5': MO.REL,
'\u22A6': MO.REL,
'\u22A7': MO.REL,
'\u22A8': MO.REL,
'\u22A9': MO.REL,
'\u22AA': MO.REL,
'\u22AB': MO.REL,
'\u22AC': MO.REL,
'\u22AD': MO.REL,
'\u22AE': MO.REL,
'\u22AF': MO.REL,
'\u22B0': MO.REL,
'\u22B1': MO.REL,
'\u22B2': MO.REL,
'\u22B3': MO.REL,
'\u22B4': MO.REL,
'\u22B5': MO.REL,
'\u22B6': MO.REL,
'\u22B7': MO.REL,
'\u22B8': MO.REL,
'\u22B9': MO.REL,
'\u22BA': MO.BIN4,
'\u22BB': MO.BIN4,
'\u22BC': MO.BIN4,
'\u22BD': MO.BIN4,
'\u22BE': MO.BIN3,
'\u22BF': MO.BIN3,
'\u22C4': MO.BIN4,
'\u22C5': MO.BIN4,
'\u22C6': MO.BIN4,
'\u22C7': MO.BIN4,
'\u22C8': MO.REL,
'\u22C9': MO.BIN4,
'\u22CA': MO.BIN4,
'\u22CB': MO.BIN4,
'\u22CC': MO.BIN4,
'\u22CD': MO.REL,
'\u22CE': MO.BIN4,
'\u22CF': MO.BIN4,
'\u22D0': MO.REL,
'\u22D1': MO.REL,
'\u22D2': MO.BIN4,
'\u22D3': MO.BIN4,
'\u22D4': MO.REL,
'\u22D5': MO.REL,
'\u22D6': MO.REL,
'\u22D7': MO.REL,
'\u22D8': MO.REL,
'\u22D9': MO.REL,
'\u22DA': MO.REL,
'\u22DB': MO.REL,
'\u22DC': MO.REL,
'\u22DD': MO.REL,
'\u22DE': MO.REL,
'\u22DF': MO.REL,
'\u22E0': MO.REL,
'\u22E1': MO.REL,
'\u22E2': MO.REL,
'\u22E3': MO.REL,
'\u22E4': MO.REL,
'\u22E5': MO.REL,
'\u22E6': MO.REL,
'\u22E7': MO.REL,
'\u22E8': MO.REL,
'\u22E9': MO.REL,
'\u22EA': MO.REL,
'\u22EB': MO.REL,
'\u22EC': MO.REL,
'\u22ED': MO.REL,
'\u22EE': MO.ORD55,
'\u22EF': MO.INNER,
'\u22F0': MO.REL,
'\u22F1': [5, 5, TEXCLASS.INNER, null],
'\u22F2': MO.REL,
'\u22F3': MO.REL,
'\u22F4': MO.REL,
'\u22F5': MO.REL,
'\u22F6': MO.REL,
'\u22F7': MO.REL,
'\u22F8': MO.REL,
'\u22F9': MO.REL,
'\u22FA': MO.REL,
'\u22FB': MO.REL,
'\u22FC': MO.REL,
'\u22FD': MO.REL,
'\u22FE': MO.REL,
'\u22FF': MO.REL,
'\u2305': MO.BIN3,
'\u2306': MO.BIN3,
'\u2322': MO.REL4,
'\u2323': MO.REL4,
'\u2329': MO.OPEN,
'\u232A': MO.CLOSE,
'\u23AA': MO.ORD,
'\u23AF': [0, 0, TEXCLASS.ORD, { stretchy: true }],
'\u23B0': MO.OPEN,
'\u23B1': MO.CLOSE,
'\u2500': MO.ORD,
'\u25B3': MO.BIN4,
'\u25B5': MO.BIN4,
'\u25B9': MO.BIN4,
'\u25BD': MO.BIN4,
'\u25BF': MO.BIN4,
'\u25C3': MO.BIN4,
'\u25EF': MO.BIN3,
'\u2660': MO.ORD,
'\u2661': MO.ORD,
'\u2662': MO.ORD,
'\u2663': MO.ORD,
'\u2758': MO.REL,
'\u27F0': MO.RELSTRETCH,
'\u27F1': MO.RELSTRETCH,
'\u27F5': MO.WIDEREL,
'\u27F6': MO.WIDEREL,
'\u27F7': MO.WIDEREL,
'\u27F8': MO.WIDEREL,
'\u27F9': MO.WIDEREL,
'\u27FA': MO.WIDEREL,
'\u27FB': MO.WIDEREL,
'\u27FC': MO.WIDEREL,
'\u27FD': MO.WIDEREL,
'\u27FE': MO.WIDEREL,
'\u27FF': MO.WIDEREL,
'\u2900': MO.RELACCENT,
'\u2901': MO.RELACCENT,
'\u2902': MO.RELACCENT,
'\u2903': MO.RELACCENT,
'\u2904': MO.RELACCENT,
'\u2905': MO.RELACCENT,
'\u2906': MO.RELACCENT,
'\u2907': MO.RELACCENT,
'\u2908': MO.REL,
'\u2909': MO.REL,
'\u290A': MO.RELSTRETCH,
'\u290B': MO.RELSTRETCH,
'\u290C': MO.WIDEREL,
'\u290D': MO.WIDEREL,
'\u290E': MO.WIDEREL,
'\u290F': MO.WIDEREL,
'\u2910': MO.WIDEREL,
'\u2911': MO.RELACCENT,
'\u2912': MO.RELSTRETCH,
'\u2913': MO.RELSTRETCH,
'\u2914': MO.RELACCENT,
'\u2915': MO.RELACCENT,
'\u2916': MO.RELACCENT,
'\u2917': MO.RELACCENT,
'\u2918': MO.RELACCENT,
'\u2919': MO.RELACCENT,
'\u291A': MO.RELACCENT,
'\u291B': MO.RELACCENT,
'\u291C': MO.RELACCENT,
'\u291D': MO.RELACCENT,
'\u291E': MO.RELACCENT,
'\u291F': MO.RELACCENT,
'\u2920': MO.RELACCENT,
'\u2921': MO.RELSTRETCH,
'\u2922': MO.RELSTRETCH,
'\u2923': MO.REL,
'\u2924': MO.REL,
'\u2925': MO.REL,
'\u2926': MO.REL,
'\u2927': MO.REL,
'\u2928': MO.REL,
'\u2929': MO.REL,
'\u292A': MO.REL,
'\u292B': MO.REL,
'\u292C': MO.REL,
'\u292D': MO.REL,
'\u292E': MO.REL,
'\u292F': MO.REL,
'\u2930': MO.REL,
'\u2931': MO.REL,
'\u2932': MO.REL,
'\u2933': MO.RELACCENT,
'\u2934': MO.REL,
'\u2935': MO.REL,
'\u2936': MO.REL,
'\u2937': MO.REL,
'\u2938': MO.REL,
'\u2939': MO.REL,
'\u293A': MO.RELACCENT,
'\u293B': MO.RELACCENT,
'\u293C': MO.RELACCENT,
'\u293D': MO.RELACCENT,
'\u293E': MO.REL,
'\u293F': MO.REL,
'\u2940': MO.REL,
'\u2941': MO.REL,
'\u2942': MO.RELACCENT,
'\u2943': MO.RELACCENT,
'\u2944': MO.RELACCENT,
'\u2945': MO.RELACCENT,
'\u2946': MO.RELACCENT,
'\u2947': MO.RELACCENT,
'\u2948': MO.RELACCENT,
'\u2949': MO.REL,
'\u294A': MO.RELACCENT,
'\u294B': MO.RELACCENT,
'\u294C': MO.REL,
'\u294D': MO.REL,
'\u294E': MO.WIDEREL,
'\u294F': MO.RELSTRETCH,
'\u2950': MO.WIDEREL,
'\u2951': MO.RELSTRETCH,
'\u2952': MO.WIDEREL,
'\u2953': MO.WIDEREL,
'\u2954': MO.RELSTRETCH,
'\u2955': MO.RELSTRETCH,
'\u2956': MO.RELSTRETCH,
'\u2957': MO.RELSTRETCH,
'\u2958': MO.RELSTRETCH,
'\u2959': MO.RELSTRETCH,
'\u295A': MO.WIDEREL,
'\u295B': MO.WIDEREL,
'\u295C': MO.RELSTRETCH,
'\u295D': MO.RELSTRETCH,
'\u295E': MO.WIDEREL,
'\u295F': MO.WIDEREL,
'\u2960': MO.RELSTRETCH,
'\u2961': MO.RELSTRETCH,
'\u2962': MO.RELACCENT,
'\u2963': MO.REL,
'\u2964': MO.RELACCENT,
'\u2965': MO.REL,
'\u2966': MO.RELACCENT,
'\u2967': MO.RELACCENT,
'\u2968': MO.RELACCENT,
'\u2969': MO.RELACCENT,
'\u296A': MO.RELACCENT,
'\u296B': MO.RELACCENT,
'\u296C': MO.RELACCENT,
'\u296D': MO.RELACCENT,
'\u296E': MO.RELSTRETCH,
'\u296F': MO.RELSTRETCH,
'\u2970': MO.RELACCENT,
'\u2971': MO.RELACCENT,
'\u2972': MO.RELACCENT,
'\u2973': MO.RELACCENT,
'\u2974': MO.RELACCENT,
'\u2975': MO.RELACCENT,
'\u2976': MO.RELACCENT,
'\u2977': MO.RELACCENT,
'\u2978': MO.RELACCENT,
'\u2979': MO.RELACCENT,
'\u297A': MO.RELACCENT,
'\u297B': MO.RELACCENT,
'\u297C': MO.RELACCENT,
'\u297D': MO.RELACCENT,
'\u297E': MO.REL,
'\u297F': MO.REL,
'\u2981': MO.BIN3,
'\u2982': MO.BIN3,
'\u2999': MO.BIN3,
'\u299A': MO.BIN3,
'\u299B': MO.BIN3,
'\u299C': MO.BIN3,
'\u299D': MO.BIN3,
'\u299E': MO.BIN3,
'\u299F': MO.BIN3,
'\u29A0': MO.BIN3,
'\u29A1': MO.BIN3,
'\u29A2': MO.BIN3,
'\u29A3': MO.BIN3,
'\u29A4': MO.BIN3,
'\u29A5': MO.BIN3,
'\u29A6': MO.BIN3,
'\u29A7': MO.BIN3,
'\u29A8': MO.BIN3,
'\u29A9': MO.BIN3,
'\u29AA': MO.BIN3,
'\u29AB': MO.BIN3,
'\u29AC': MO.BIN3,
'\u29AD': MO.BIN3,
'\u29AE': MO.BIN3,
'\u29AF': MO.BIN3,
'\u29B0': MO.BIN3,
'\u29B1': MO.BIN3,
'\u29B2': MO.BIN3,
'\u29B3': MO.BIN3,
'\u29B4': MO.BIN3,
'\u29B5': MO.BIN3,
'\u29B6': MO.BIN4,
'\u29B7': MO.BIN4,
'\u29B8': MO.BIN4,
'\u29B9': MO.BIN4,
'\u29BA': MO.BIN4,
'\u29BB': MO.BIN4,
'\u29BC': MO.BIN4,
'\u29BD': MO.BIN4,
'\u29BE': MO.BIN4,
'\u29BF': MO.BIN4,
'\u29C0': MO.REL,
'\u29C1': MO.REL,
'\u29C2': MO.BIN3,
'\u29C3': MO.BIN3,
'\u29C4': MO.BIN4,
'\u29C5': MO.BIN4,
'\u29C6': MO.BIN4,
'\u29C7': MO.BIN4,
'\u29C8': MO.BIN4,
'\u29C9': MO.BIN3,
'\u29CA': MO.BIN3,
'\u29CB': MO.BIN3,
'\u29CC': MO.BIN3,
'\u29CD': MO.BIN3,
'\u29CE': MO.REL,
'\u29CF': MO.REL,
'\u29CF\u0338': MO.REL,
'\u29D0': MO.REL,
'\u29D0\u0338': MO.REL,
'\u29D1': MO.REL,
'\u29D2': MO.REL,
'\u29D3': MO.REL,
'\u29D4': MO.REL,
'\u29D5': MO.REL,
'\u29D6': MO.BIN4,
'\u29D7': MO.BIN4,
'\u29D8': MO.BIN3,
'\u29D9': MO.BIN3,
'\u29DB': MO.BIN3,
'\u29DC': MO.BIN3,
'\u29DD': MO.BIN3,
'\u29DE': MO.REL,
'\u29DF': MO.BIN3,
'\u29E0': MO.BIN3,
'\u29E1': MO.REL,
'\u29E2': MO.BIN4,
'\u29E3': MO.REL,
'\u29E4': MO.REL,
'\u29E5': MO.REL,
'\u29E6': MO.REL,
'\u29E7': MO.BIN3,
'\u29E8': MO.BIN3,
'\u29E9': MO.BIN3,
'\u29EA': MO.BIN3,
'\u29EB': MO.BIN3,
'\u29EC': MO.BIN3,
'\u29ED': MO.BIN3,
'\u29EE': MO.BIN3,
'\u29EF': MO.BIN3,
'\u29F0': MO.BIN3,
'\u29F1': MO.BIN3,
'\u29F2': MO.BIN3,
'\u29F3': MO.BIN3,
'\u29F4': MO.REL,
'\u29F5': MO.BIN4,
'\u29F6': MO.BIN4,
'\u29F7': MO.BIN4,
'\u29F8': MO.BIN3,
'\u29F9': MO.BIN3,
'\u29FA': MO.BIN3,
'\u29FB': MO.BIN3,
'\u29FE': MO.BIN4,
'\u29FF': MO.BIN4,
'\u2A1D': MO.BIN3,
'\u2A1E': MO.BIN3,
'\u2A1F': MO.BIN3,
'\u2A20': MO.BIN3,
'\u2A21': MO.BIN3,
'\u2A22': MO.BIN4,
'\u2A23': MO.BIN4,
'\u2A24': MO.BIN4,
'\u2A25': MO.BIN4,
'\u2A26': MO.BIN4,
'\u2A27': MO.BIN4,
'\u2A28': MO.BIN4,
'\u2A29': MO.BIN4,
'\u2A2A': MO.BIN4,
'\u2A2B': MO.BIN4,
'\u2A2C': MO.BIN4,
'\u2A2D': MO.BIN4,
'\u2A2E': MO.BIN4,
'\u2A2F': MO.BIN4,
'\u2A30': MO.BIN4,
'\u2A31': MO.BIN4,
'\u2A32': MO.BIN4,
'\u2A33': MO.BIN4,
'\u2A34': MO.BIN4,
'\u2A35': MO.BIN4,
'\u2A36': MO.BIN4,
'\u2A37': MO.BIN4,
'\u2A38': MO.BIN4,
'\u2A39': MO.BIN4,
'\u2A3A': MO.BIN4,
'\u2A3B': MO.BIN4,
'\u2A3C': MO.BIN4,
'\u2A3D': MO.BIN4,
'\u2A3E': MO.BIN4,
'\u2A3F': MO.BIN4,
'\u2A40': MO.BIN4,
'\u2A41': MO.BIN4,
'\u2A42': MO.BIN4,
'\u2A43': MO.BIN4,
'\u2A44': MO.BIN4,
'\u2A45': MO.BIN4,
'\u2A46': MO.BIN4,
'\u2A47': MO.BIN4,
'\u2A48': MO.BIN4,
'\u2A49': MO.BIN4,
'\u2A4A': MO.BIN4,
'\u2A4B': MO.BIN4,
'\u2A4C': MO.BIN4,
'\u2A4D': MO.BIN4,
'\u2A4E': MO.BIN4,
'\u2A4F': MO.BIN4,
'\u2A50': MO.BIN4,
'\u2A51': MO.BIN4,
'\u2A52': MO.BIN4,
'\u2A53': MO.BIN4,
'\u2A54': MO.BIN4,
'\u2A55': MO.BIN4,
'\u2A56': MO.BIN4,
'\u2A57': MO.BIN4,
'\u2A58': MO.BIN4,
'\u2A59': MO.REL,
'\u2A5A': MO.BIN4,
'\u2A5B': MO.BIN4,
'\u2A5C': MO.BIN4,
'\u2A5D': MO.BIN4,
'\u2A5E': MO.BIN4,
'\u2A5F': MO.BIN4,
'\u2A60': MO.BIN4,
'\u2A61': MO.BIN4,
'\u2A62': MO.BIN4,
'\u2A63': MO.BIN4,
'\u2A64': MO.BIN4,
'\u2A65': MO.BIN4,
'\u2A66': MO.REL,
'\u2A67': MO.REL,
'\u2A68': MO.REL,
'\u2A69': MO.REL,
'\u2A6A': MO.REL,
'\u2A6B': MO.REL,
'\u2A6C': MO.REL,
'\u2A6D': MO.REL,
'\u2A6E': MO.REL,
'\u2A6F': MO.REL,
'\u2A70': MO.REL,
'\u2A71': MO.BIN4,
'\u2A72': MO.BIN4,
'\u2A73': MO.REL,
'\u2A74': MO.REL,
'\u2A75': MO.REL,
'\u2A76': MO.REL,
'\u2A77': MO.REL,
'\u2A78': MO.REL,
'\u2A79': MO.REL,
'\u2A7A': MO.REL,
'\u2A7B': MO.REL,
'\u2A7C': MO.REL,
'\u2A7D': MO.REL,
'\u2A7D\u0338': MO.REL,
'\u2A7E': MO.REL,
'\u2A7E\u0338': MO.REL,
'\u2A7F': MO.REL,
'\u2A80': MO.REL,
'\u2A81': MO.REL,
'\u2A82': MO.REL,
'\u2A83': MO.REL,
'\u2A84': MO.REL,
'\u2A85': MO.REL,
'\u2A86': MO.REL,
'\u2A87': MO.REL,
'\u2A88': MO.REL,
'\u2A89': MO.REL,
'\u2A8A': MO.REL,
'\u2A8B': MO.REL,
'\u2A8C': MO.REL,
'\u2A8D': MO.REL,
'\u2A8E': MO.REL,
'\u2A8F': MO.REL,
'\u2A90': MO.REL,
'\u2A91': MO.REL,
'\u2A92': MO.REL,
'\u2A93': MO.REL,
'\u2A94': MO.REL,
'\u2A95': MO.REL,
'\u2A96': MO.REL,
'\u2A97': MO.REL,
'\u2A98': MO.REL,
'\u2A99': MO.REL,
'\u2A9A': MO.REL,
'\u2A9B': MO.REL,
'\u2A9C': MO.REL,
'\u2A9D': MO.REL,
'\u2A9E': MO.REL,
'\u2A9F': MO.REL,
'\u2AA0': MO.REL,
'\u2AA1': MO.REL,
'\u2AA1\u0338': MO.REL,
'\u2AA2': MO.REL,
'\u2AA2\u0338': MO.REL,
'\u2AA3': MO.REL,
'\u2AA4': MO.REL,
'\u2AA5': MO.REL,
'\u2AA6': MO.REL,
'\u2AA7': MO.REL,
'\u2AA8': MO.REL,
'\u2AA9': MO.REL,
'\u2AAA': MO.REL,
'\u2AAB': MO.REL,
'\u2AAC': MO.REL,
'\u2AAD': MO.REL,
'\u2AAE': MO.REL,
'\u2AAF': MO.REL,
'\u2AAF\u0338': MO.REL,
'\u2AB0': MO.REL,
'\u2AB0\u0338': MO.REL,
'\u2AB1': MO.REL,
'\u2AB2': MO.REL,
'\u2AB3': MO.REL,
'\u2AB4': MO.REL,
'\u2AB5': MO.REL,
'\u2AB6': MO.REL,
'\u2AB7': MO.REL,
'\u2AB8': MO.REL,
'\u2AB9': MO.REL,
'\u2ABA': MO.REL,
'\u2ABB': MO.REL,
'\u2ABC': MO.REL,
'\u2ABD': MO.REL,
'\u2ABE': MO.REL,
'\u2ABF': MO.REL,
'\u2AC0': MO.REL,
'\u2AC1': MO.REL,
'\u2AC2': MO.REL,
'\u2AC3': MO.REL,
'\u2AC4': MO.REL,
'\u2AC5': MO.REL,
'\u2AC6': MO.REL,
'\u2AC7': MO.REL,
'\u2AC8': MO.REL,
'\u2AC9': MO.REL,
'\u2ACA': MO.REL,
'\u2ACB': MO.REL,
'\u2ACC': MO.REL,
'\u2ACD': MO.REL,
'\u2ACE': MO.REL,
'\u2ACF': MO.REL,
'\u2AD0': MO.REL,
'\u2AD1': MO.REL,
'\u2AD2': MO.REL,
'\u2AD3': MO.REL,
'\u2AD4': MO.REL,
'\u2AD5': MO.REL,
'\u2AD6': MO.REL,
'\u2AD7': MO.REL,
'\u2AD8': MO.REL,
'\u2AD9': MO.REL,
'\u2ADA': MO.REL,
'\u2ADB': MO.REL,
'\u2ADD': MO.REL,
'\u2ADD\u0338': MO.REL,
'\u2ADE': MO.REL,
'\u2ADF': MO.REL,
'\u2AE0': MO.REL,
'\u2AE1': MO.REL,
'\u2AE2': MO.REL,
'\u2AE3': MO.REL,
'\u2AE4': MO.REL,
'\u2AE5': MO.REL,
'\u2AE6': MO.REL,
'\u2AE7': MO.REL,
'\u2AE8': MO.REL,
'\u2AE9': MO.REL,
'\u2AEA': MO.REL,
'\u2AEB': MO.REL,
'\u2AEC': MO.REL,
'\u2AED': MO.REL,
'\u2AEE': MO.REL,
'\u2AEF': MO.REL,
'\u2AF0': MO.REL,
'\u2AF1': MO.REL,
'\u2AF2': MO.REL,
'\u2AF3': MO.REL,
'\u2AF4': MO.BIN4,
'\u2AF5': MO.BIN4,
'\u2AF6': MO.BIN4,
'\u2AF7': MO.REL,
'\u2AF8': MO.REL,
'\u2AF9': MO.REL,
'\u2AFA': MO.REL,
'\u2AFB': MO.BIN4,
'\u2AFD': MO.BIN4,
'\u2AFE': MO.BIN3,
'\u2B45': MO.RELSTRETCH,
'\u2B46': MO.RELSTRETCH,
'\u3008': MO.OPEN,
'\u3009': MO.CLOSE,
'\uFE37': MO.WIDEACCENT,
'\uFE38': MO.WIDEACCENT,
}
};
OPTABLE.infix['^'] = MO.WIDEREL;
OPTABLE.infix['_'] = MO.WIDEREL;
OPTABLE.infix['\u2ADC'] = MO.REL;
//# sourceMappingURL=OperatorDictionary.js.map
;// ./mjs/util/string.js
function sortLength(a, b) {
return a.length !== b.length
? b.length - a.length
: a === b
? 0
: a < b
? -1
: 1;
}
function quotePattern(text) {
return text.replace(/([\^$(){}.+*?\-|[\]:\\])/g, '\\$1');
}
function unicodeChars(text) {
return Array.from(text).map((c) => c.codePointAt(0));
}
function unicodeString(data) {
return String.fromCodePoint(...data);
}
function isPercent(x) {
return !!x.match(/%\s*$/);
}
function split(x) {
return x.trim().split(/\s+/);
}
function replaceUnicode(text) {
return text.replace(/\\U(?:([0-9A-Fa-f]{4})|\{\s*([0-9A-Fa-f]{1,6})\s*\})|\\./g, (m, h1, h2) => m === '\\\\' ? '\\' : String.fromCodePoint(parseInt(h1 || h2, 16)));
}
function toEntity(c) {
return `${c.codePointAt(0).toString(16).toUpperCase()};`;
}
//# sourceMappingURL=string.js.map
;// ./mjs/core/MmlTree/MmlNodes/mo.js
class MmlMo extends AbstractMmlTokenNode {
constructor() {
super(...arguments);
this._texClass = null;
this.lspace = 5 / 18;
this.rspace = 5 / 18;
}
get texClass() {
if (this._texClass === null) {
return this.getOperatorDef(this.getText())[2];
}
return this._texClass;
}
set texClass(value) {
this._texClass = value;
}
get kind() {
return 'mo';
}
get isEmbellished() {
return true;
}
coreParent() {
let embellished = null;
let parent = this;
const math = this.factory.getNodeClass('math');
while (parent &&
parent.isEmbellished &&
parent.coreMO() === this &&
!(parent instanceof math)) {
embellished = parent;
parent = parent.parent;
}
return embellished || this;
}
coreText(parent) {
if (!parent) {
return '';
}
if (parent.isEmbellished) {
return parent.coreMO().getText();
}
while ((((parent.isKind('mrow') ||
parent.isKind('TeXAtom') ||
parent.isKind('mstyle') ||
parent.isKind('mphantom')) &&
parent.childNodes.length === 1) ||
parent.isKind('munderover')) &&
parent.childNodes[0]) {
parent = parent.childNodes[0];
}
return parent.isToken ? parent.getText() : '';
}
hasSpacingAttributes() {
return this.attributes.isSet('lspace') || this.attributes.isSet('rspace');
}
get isAccent() {
let accent = false;
const node = this.coreParent().parent;
if (node) {
const key = node.isKind('mover')
? node.childNodes[node.over].coreMO()
? 'accent'
: ''
: node.isKind('munder')
? node.childNodes[node.under].coreMO()
? 'accentunder'
: ''
: node.isKind('munderover')
? this === node.childNodes[node.over].coreMO()
? 'accent'
: this === node.childNodes[node.under].coreMO()
? 'accentunder'
: ''
: '';
if (key) {
const value = node.attributes.getExplicit(key);
accent = (value !== undefined ? accent : this.attributes.get('accent'));
}
}
return accent;
}
setTeXclass(prev) {
const { form, fence } = this.attributes.getList('form', 'fence');
if (this.getProperty('texClass') === undefined &&
this.hasSpacingAttributes()) {
return null;
}
if (fence && this.texClass === TEXCLASS.REL) {
if (form === 'prefix') {
this.texClass = TEXCLASS.OPEN;
}
if (form === 'postfix') {
this.texClass = TEXCLASS.CLOSE;
}
}
return this.adjustTeXclass(prev);
}
adjustTeXclass(prev) {
const texClass = this.texClass;
let prevClass = this.prevClass;
if (texClass === TEXCLASS.NONE) {
return prev;
}
if (prev) {
if (prev.getProperty('autoOP') &&
(texClass === TEXCLASS.BIN || texClass === TEXCLASS.REL)) {
prevClass = prev.texClass = TEXCLASS.ORD;
}
prevClass = this.prevClass = prev.texClass || TEXCLASS.ORD;
this.prevLevel = this.attributes.getInherited('scriptlevel');
}
else {
prevClass = this.prevClass = TEXCLASS.NONE;
}
if (texClass === TEXCLASS.BIN &&
(prevClass === TEXCLASS.NONE ||
prevClass === TEXCLASS.BIN ||
prevClass === TEXCLASS.OP ||
prevClass === TEXCLASS.REL ||
prevClass === TEXCLASS.OPEN ||
prevClass === TEXCLASS.PUNCT)) {
this.texClass = TEXCLASS.ORD;
}
else if (prevClass === TEXCLASS.BIN &&
(texClass === TEXCLASS.REL ||
texClass === TEXCLASS.CLOSE ||
texClass === TEXCLASS.PUNCT)) {
prev.texClass = this.prevClass = TEXCLASS.ORD;
}
else if (texClass === TEXCLASS.BIN) {
let child = null;
let parent = this.parent;
while (parent &&
parent.parent &&
parent.isEmbellished &&
(parent.childNodes.length === 1 ||
(!parent.isKind('mrow') && parent.core() === child))) {
child = parent;
parent = parent.parent;
}
child = child || this;
if (parent.childNodes[parent.childNodes.length - 1] === child) {
this.texClass = TEXCLASS.ORD;
}
}
return this;
}
setInheritedAttributes(attributes = {}, display = false, level = 0, prime = false) {
super.setInheritedAttributes(attributes, display, level, prime);
const mo = this.getText();
this.checkOperatorTable(mo);
this.checkPseudoScripts(mo);
this.checkPrimes(mo);
this.checkMathAccent(mo);
}
getOperatorDef(mo) {
const [form1, form2, form3] = this.handleExplicitForm(this.getForms());
this.attributes.setInherited('form', form1);
const CLASS = this.constructor;
const OPTABLE = CLASS.OPTABLE;
const def = OPTABLE[form1][mo] || OPTABLE[form2][mo] || OPTABLE[form3][mo];
if (def) {
return def;
}
this.setProperty('noDictDef', true);
const limits = this.attributes.get('movablelimits');
const isOP = !!mo.match(CLASS.opPattern);
if ((isOP || limits) && this.getProperty('texClass') === undefined) {
return OPDEF(1, 2, TEXCLASS.OP);
}
const range = getRange(mo);
const [l, r] = CLASS.MMLSPACING[range[2]];
return OPDEF(l, r, range[2]);
}
checkOperatorTable(mo) {
const def = this.getOperatorDef(mo);
if (this.getProperty('texClass') === undefined) {
this.texClass = def[2];
}
for (const name of Object.keys(def[3] || {})) {
this.attributes.setInherited(name, def[3][name]);
}
this.lspace = ((def[0] || -1) + 1) / 18;
this.rspace = ((def[1] || -1) + 1) / 18;
}
getForms() {
let core = null;
let parent = this.parent;
let Parent = this.Parent;
while (Parent && Parent.isEmbellished) {
core = parent;
parent = Parent.parent;
Parent = Parent.Parent;
}
core = core || this;
if (parent &&
parent.isKind('mrow') &&
parent.nonSpaceLength() !== 1) {
if (parent.firstNonSpace() === core) {
return ['prefix', 'infix', 'postfix'];
}
if (parent.lastNonSpace() === core) {
return ['postfix', 'infix', 'prefix'];
}
}
return ['infix', 'prefix', 'postfix'];
}
handleExplicitForm(forms) {
if (this.attributes.isSet('form')) {
const form = this.attributes.get('form');
forms = [form].concat(forms.filter((name) => name !== form));
}
return forms;
}
checkPseudoScripts(mo) {
const PSEUDOSCRIPTS = this.constructor.pseudoScripts;
if (!mo.match(PSEUDOSCRIPTS))
return;
const parent = this.coreParent().Parent;
const isPseudo = !parent || !(parent.isKind('msubsup') && !parent.isKind('msub'));
this.setProperty('pseudoscript', isPseudo);
if (isPseudo) {
this.attributes.setInherited('lspace', 0);
this.attributes.setInherited('rspace', 0);
}
}
checkPrimes(mo) {
const PRIMES = this.constructor.primes;
if (!mo.match(PRIMES))
return;
const REMAP = this.constructor.remapPrimes;
const primes = unicodeString(unicodeChars(mo).map((c) => REMAP[c]));
this.setProperty('primes', primes);
}
checkMathAccent(mo) {
const parent = this.Parent;
if (this.getProperty('mathaccent') !== undefined ||
!parent ||
!parent.isKind('munderover'))
return;
const [base, under, over] = parent.childNodes;
if (base.isEmbellished && base.coreMO() === this)
return;
const isUnder = !!(under && under.isEmbellished && under.coreMO() === this);
const isOver = !!(over && over.isEmbellished && under.coreMO() === this);
if (!isUnder && !isOver)
return;
if (this.isMathAccent(mo)) {
this.setProperty('mathaccent', true);
}
else if (this.isMathAccentWithWidth(mo)) {
this.setProperty('mathaccent', false);
}
}
isMathAccent(mo = this.getText()) {
const MATHACCENT = this.constructor.mathaccents;
return !!mo.match(MATHACCENT);
}
isMathAccentWithWidth(mo = this.getText()) {
const MATHACCENT = this.constructor.mathaccentsWithWidth;
return !!mo.match(MATHACCENT);
}
}
MmlMo.defaults = Object.assign(Object.assign({}, AbstractMmlTokenNode.defaults), { form: 'infix', fence: false, separator: false, lspace: 'thickmathspace', rspace: 'thickmathspace', stretchy: false, symmetric: false, maxsize: 'infinity', minsize: '0em', largeop: false, movablelimits: false, accent: false, linebreak: 'auto', lineleading: '100%', linebreakstyle: 'before', indentalign: 'auto', indentshift: '0', indenttarget: '', indentalignfirst: 'indentalign', indentshiftfirst: 'indentshift', indentalignlast: 'indentalign', indentshiftlast: 'indentshift' });
MmlMo.MMLSPACING = MMLSPACING;
MmlMo.OPTABLE = OPTABLE;
MmlMo.pseudoScripts = new RegExp([
'^["\'*`',
'\u00AA',
'\u00B0',
'\u00B2-\u00B4',
'\u00B9',
'\u00BA',
'\u2018-\u201F',
'\u2032-\u2037\u2057',
'\u2070\u2071',
'\u2074-\u207F',
'\u2080-\u208E',
']+$'
].join(''));
MmlMo.primes = new RegExp([
'^["\'',
'\u2018-\u201F',
']+$',
].join(''));
MmlMo.opPattern = /^[a-zA-Z]{2,}$/;
MmlMo.remapPrimes = {
0x0022: 0x2033,
0x0027: 0x2032,
0x2018: 0x2035,
0x2019: 0x2032,
0x201a: 0x2032,
0x201b: 0x2035,
0x201c: 0x2036,
0x201d: 0x2033,
0x201e: 0x2033,
0x201f: 0x2036,
};
MmlMo.mathaccents = new RegExp([
'^[',
'\u00B4\u0301\u02CA',
'\u0060\u0300\u02CB',
'\u00A8\u0308',
'\u007E\u0303\u02DC',
'\u00AF\u0304\u02C9',
'\u02D8\u0306',
'\u02C7\u030C',
'\u005E\u0302\u02C6',
'\u20D0\u20D1',
'\u20D6\u20D7\u20E1',
'\u02D9\u0307',
'\u02DA\u030A',
'\u20DB',
'\u20DC',
']$'
].join(''));
MmlMo.mathaccentsWithWidth = new RegExp([
'^[',
'\u2190\u2192\u2194',
'\u23DC\u23DD',
'\u23DE\u23DF',
']$'
].join(''));
//# sourceMappingURL=mo.js.map
;// ./mjs/core/MmlTree/MmlNodes/mtext.js
class MmlMtext extends AbstractMmlTokenNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'mtext';
}
get isSpacelike() {
return (!!this.getText().match(/^\s*$/) &&
!this.attributes.hasOneOf(MmlMtext.NONSPACELIKE));
}
}
MmlMtext.NONSPACELIKE = ['style', 'mathbackground', 'background'];
MmlMtext.defaults = Object.assign({}, AbstractMmlTokenNode.defaults);
//# sourceMappingURL=mtext.js.map
;// ./mjs/core/MmlTree/MmlNodes/mspace.js
class MmlMspace extends AbstractMmlTokenNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.NONE;
}
setTeXclass(prev) {
return prev;
}
get kind() {
return 'mspace';
}
get arity() {
return 0;
}
get isSpacelike() {
return !this.attributes.hasExplicit('linebreak') && this.canBreak;
}
get hasNewline() {
const linebreak = this.attributes.get('linebreak');
return (this.canBreak &&
(linebreak === 'newline' || linebreak === 'indentingnewline'));
}
get canBreak() {
return (!this.attributes.hasOneOf(MmlMspace.NONSPACELIKE) &&
String(this.attributes.get('width')).trim().charAt(0) !== '-');
}
}
MmlMspace.NONSPACELIKE = [
'height',
'depth',
'style',
'mathbackground',
'background',
];
MmlMspace.defaults = Object.assign(Object.assign({}, AbstractMmlTokenNode.defaults), { width: '0em', height: '0ex', depth: '0ex', linebreak: 'auto', indentshift: 'auto', indentalign: 'auto', indenttarget: '', indentalignfirst: 'indentalign', indentshiftfirst: 'indentshift', indentalignlast: 'indentalign', indentshiftlast: 'indentshift' });
//# sourceMappingURL=mspace.js.map
;// ./mjs/core/MmlTree/MmlNodes/ms.js
class MmlMs extends AbstractMmlTokenNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'ms';
}
}
MmlMs.defaults = Object.assign(Object.assign({}, AbstractMmlTokenNode.defaults), { lquote: '"', rquote: '"' });
//# sourceMappingURL=ms.js.map
;// ./mjs/core/MmlTree/MmlNodes/mrow.js
class MmlMrow extends AbstractMmlNode {
constructor() {
super(...arguments);
this._core = null;
}
get kind() {
return 'mrow';
}
get isSpacelike() {
for (const child of this.childNodes) {
if (!child.isSpacelike) {
return false;
}
}
return true;
}
get isEmbellished() {
let embellished = false;
let i = 0;
for (const child of this.childNodes) {
if (child) {
if (child.isEmbellished) {
if (embellished) {
return false;
}
embellished = true;
this._core = i;
}
else if (!child.isSpacelike) {
return false;
}
}
i++;
}
return embellished;
}
core() {
if (!this.isEmbellished || this._core == null) {
return this;
}
return this.childNodes[this._core];
}
coreMO() {
if (!this.isEmbellished || this._core == null) {
return this;
}
return this.childNodes[this._core].coreMO();
}
nonSpaceLength() {
let n = 0;
for (const child of this.childNodes) {
if (child && !child.isSpacelike) {
n++;
}
}
return n;
}
firstNonSpace() {
for (const child of this.childNodes) {
if (child && !child.isSpacelike) {
return child;
}
}
return null;
}
lastNonSpace() {
let i = this.childNodes.length;
while (--i >= 0) {
const child = this.childNodes[i];
if (child && !child.isSpacelike) {
return child;
}
}
return null;
}
setTeXclass(prev) {
if (this.getProperty('open') != null || this.getProperty('close') != null) {
this.getPrevClass(prev);
prev = null;
for (const child of this.childNodes) {
prev = child.setTeXclass(prev);
}
if (this.texClass == null) {
this.texClass = TEXCLASS.INNER;
}
return this;
}
for (const child of this.childNodes) {
prev = child.setTeXclass(prev);
}
if (this.childNodes[0]) {
this.updateTeXclass(this.childNodes[0]);
}
return prev;
}
}
MmlMrow.defaults = Object.assign({}, AbstractMmlNode.defaults);
class MmlInferredMrow extends MmlMrow {
get kind() {
return 'inferredMrow';
}
get isInferred() {
return true;
}
get notParent() {
return true;
}
toString() {
return '[' + this.childNodes.join(',') + ']';
}
}
MmlInferredMrow.defaults = MmlMrow.defaults;
//# sourceMappingURL=mrow.js.map
;// ./mjs/core/MmlTree/MmlNodes/mfrac.js
class MmlMfrac extends AbstractMmlBaseNode {
get kind() {
return 'mfrac';
}
get arity() {
return 2;
}
get linebreakContainer() {
return true;
}
get linebreakAlign() {
return '';
}
setTeXclass(prev) {
this.getPrevClass(prev);
for (const child of this.childNodes) {
child.setTeXclass(null);
}
return this;
}
setChildInheritedAttributes(attributes, display, level, prime) {
if (!display || level > 0) {
level++;
}
const numalign = this.attributes.get('numalign');
const denalign = this.attributes.get('denomalign');
const numAttributes = this.addInheritedAttributes(Object.assign({}, attributes), {
numalign,
indentshift: '0',
indentalignfirst: numalign,
indentshiftfirst: '0',
indentalignlast: 'indentalign',
indentshiftlast: 'indentshift',
});
const denAttributes = this.addInheritedAttributes(Object.assign({}, attributes), {
denalign,
indentshift: '0',
indentalignfirst: denalign,
indentshiftfirst: '0',
indentalignlast: 'indentalign',
indentshiftlast: 'indentshift',
});
this.childNodes[0].setInheritedAttributes(numAttributes, false, level, prime);
this.childNodes[1].setInheritedAttributes(denAttributes, false, level, true);
}
}
MmlMfrac.defaults = Object.assign(Object.assign({}, AbstractMmlBaseNode.defaults), { linethickness: 'medium', numalign: 'center', denomalign: 'center', bevelled: false });
//# sourceMappingURL=mfrac.js.map
;// ./mjs/core/MmlTree/MmlNodes/msqrt.js
class MmlMsqrt extends AbstractMmlNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'msqrt';
}
get arity() {
return -1;
}
get linebreakContainer() {
return true;
}
setTeXclass(prev) {
this.getPrevClass(prev);
this.childNodes[0].setTeXclass(null);
return this;
}
setChildInheritedAttributes(attributes, display, level, _prime) {
this.childNodes[0].setInheritedAttributes(attributes, display, level, true);
}
}
MmlMsqrt.defaults = Object.assign(Object.assign({}, AbstractMmlNode.defaults), { 'data-vertical-align': 'bottom' });
//# sourceMappingURL=msqrt.js.map
;// ./mjs/core/MmlTree/MmlNodes/mroot.js
class MmlMroot extends AbstractMmlNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'mroot';
}
get arity() {
return 2;
}
get linebreakContainer() {
return true;
}
setTeXclass(prev) {
this.getPrevClass(prev);
this.childNodes[0].setTeXclass(null);
this.childNodes[1].setTeXclass(null);
return this;
}
setChildInheritedAttributes(attributes, display, level, prime) {
this.childNodes[0].setInheritedAttributes(attributes, display, level, true);
this.childNodes[1].setInheritedAttributes(attributes, false, level + 2, prime);
}
}
MmlMroot.defaults = Object.assign(Object.assign({}, AbstractMmlNode.defaults), { 'data-vertical-align': 'bottom' });
//# sourceMappingURL=mroot.js.map
;// ./mjs/core/MmlTree/MmlNodes/mstyle.js
class MmlMstyle extends AbstractMmlLayoutNode {
get kind() {
return 'mstyle';
}
get notParent() {
return this.childNodes[0] && this.childNodes[0].childNodes.length === 1;
}
setInheritedAttributes(attributes = {}, display = false, level = 0, prime = false) {
this.attributes.setInherited('displaystyle', display);
this.attributes.setInherited('scriptlevel', level);
super.setInheritedAttributes(attributes, display, level, prime);
}
setChildInheritedAttributes(attributes, display, level, prime) {
let scriptlevel = this.attributes.getExplicit('scriptlevel');
if (scriptlevel != null) {
scriptlevel = scriptlevel.toString();
if (scriptlevel.match(/^\s*[-+]/)) {
level += parseInt(scriptlevel);
}
else {
level = parseInt(scriptlevel);
}
prime = false;
}
const displaystyle = this.attributes.getExplicit('displaystyle');
if (displaystyle != null) {
display = displaystyle === true;
prime = false;
}
const cramped = this.attributes.getExplicit('data-cramped');
if (cramped != null) {
prime = cramped;
}
attributes = this.addInheritedAttributes(attributes, this.attributes.getAllAttributes());
this.childNodes[0].setInheritedAttributes(attributes, display, level, prime);
}
}
MmlMstyle.defaults = Object.assign(Object.assign({}, AbstractMmlLayoutNode.defaults), { scriptlevel: INHERIT, displaystyle: INHERIT, scriptsizemultiplier: 1 / Math.sqrt(2), scriptminsize: '.4em', mathbackground: INHERIT, mathcolor: INHERIT, dir: INHERIT, infixlinebreakstyle: 'before' });
//# sourceMappingURL=mstyle.js.map
;// ./mjs/core/MmlTree/MmlNodes/merror.js
class MmlMerror extends AbstractMmlNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'merror';
}
get arity() {
return -1;
}
get linebreakContainer() {
return true;
}
}
MmlMerror.defaults = Object.assign({}, AbstractMmlNode.defaults);
//# sourceMappingURL=merror.js.map
;// ./mjs/core/MmlTree/MmlNodes/mpadded.js
class MmlMpadded extends AbstractMmlLayoutNode {
get kind() {
return 'mpadded';
}
get linebreakContainer() {
return true;
}
setTeXclass(prev) {
if (!this.getProperty('vbox')) {
return super.setTeXclass(prev);
}
this.getPrevClass(prev);
this.texClass = TEXCLASS.ORD;
this.childNodes[0].setTeXclass(null);
return this;
}
}
MmlMpadded.defaults = Object.assign(Object.assign({}, AbstractMmlLayoutNode.defaults), { width: '', height: '', depth: '', lspace: 0, voffset: 0 });
//# sourceMappingURL=mpadded.js.map
;// ./mjs/core/MmlTree/MmlNodes/mphantom.js
class MmlMphantom extends AbstractMmlLayoutNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'mphantom';
}
}
MmlMphantom.defaults = Object.assign({}, AbstractMmlLayoutNode.defaults);
//# sourceMappingURL=mphantom.js.map
;// ./mjs/core/MmlTree/MmlNodes/mfenced.js
class MmlMfenced extends AbstractMmlNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.INNER;
this.separators = [];
this.open = null;
this.close = null;
}
get kind() {
return 'mfenced';
}
setTeXclass(prev) {
this.getPrevClass(prev);
if (this.open) {
prev = this.open.setTeXclass(prev);
}
if (this.childNodes[0]) {
prev = this.childNodes[0].setTeXclass(prev);
}
for (let i = 1, m = this.childNodes.length; i < m; i++) {
if (this.separators[i - 1]) {
prev = this.separators[i - 1].setTeXclass(prev);
}
if (this.childNodes[i]) {
prev = this.childNodes[i].setTeXclass(prev);
}
}
if (this.close) {
prev = this.close.setTeXclass(prev);
}
this.updateTeXclass(this.open);
return prev;
}
setChildInheritedAttributes(attributes, display, level, prime) {
this.addFakeNodes();
for (const child of [this.open, this.close].concat(this.separators)) {
if (child) {
child.setInheritedAttributes(attributes, display, level, prime);
}
}
super.setChildInheritedAttributes(attributes, display, level, prime);
}
addFakeNodes() {
let { open, close, separators } = this.attributes.getList('open', 'close', 'separators');
open = open.replace(/[ \t\n\r]/g, '');
close = close.replace(/[ \t\n\r]/g, '');
separators = separators.replace(/[ \t\n\r]/g, '');
if (open) {
this.open = this.fakeNode(open, { fence: true, form: 'prefix' }, TEXCLASS.OPEN);
}
if (separators) {
while (separators.length < this.childNodes.length - 1) {
separators += separators.charAt(separators.length - 1);
}
let i = 0;
for (const child of this.childNodes.slice(1)) {
if (child) {
this.separators.push(this.fakeNode(separators.charAt(i++)));
}
}
}
if (close) {
this.close = this.fakeNode(close, { fence: true, form: 'postfix' }, TEXCLASS.CLOSE);
}
}
fakeNode(c, properties = {}, texClass = null) {
const text = this.factory.create('text').setText(c);
const node = this.factory.create('mo', properties, [text]);
node.texClass = texClass;
node.parent = this;
return node;
}
}
MmlMfenced.defaults = Object.assign(Object.assign({}, AbstractMmlNode.defaults), { open: '(', close: ')', separators: ',' });
//# sourceMappingURL=mfenced.js.map
;// ./mjs/core/MmlTree/MmlNodes/menclose.js
class MmlMenclose extends AbstractMmlNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'menclose';
}
get arity() {
return -1;
}
get linebreakContainer() {
return true;
}
setTeXclass(prev) {
prev = this.childNodes[0].setTeXclass(prev);
this.updateTeXclass(this.childNodes[0]);
return prev;
}
}
MmlMenclose.defaults = Object.assign(Object.assign({}, AbstractMmlNode.defaults), { notation: 'longdiv' });
//# sourceMappingURL=menclose.js.map
;// ./mjs/core/MmlTree/MmlNodes/maction.js
class MmlMaction extends AbstractMmlNode {
get kind() {
return 'maction';
}
get arity() {
return 1;
}
get selected() {
const selection = this.attributes.get('selection');
const i = Math.max(1, Math.min(this.childNodes.length, selection)) - 1;
return this.childNodes[i] || this.factory.create('mrow');
}
get isEmbellished() {
return this.selected.isEmbellished;
}
get isSpacelike() {
return this.selected.isSpacelike;
}
core() {
return this.selected.core();
}
coreMO() {
return this.selected.coreMO();
}
verifyAttributes(options) {
super.verifyAttributes(options);
if (this.attributes.get('actiontype') !== 'toggle' &&
this.attributes.hasExplicit('selection')) {
this.attributes.unset('selection');
}
}
setTeXclass(prev) {
if (this.attributes.get('actiontype') === 'tooltip' && this.childNodes[1]) {
this.childNodes[1].setTeXclass(null);
}
const selected = this.selected;
prev = selected.setTeXclass(prev);
this.updateTeXclass(selected);
return prev;
}
nextToggleSelection() {
let selection = Math.max(1, parseInt(this.attributes.get('selection')) + 1);
if (selection > this.childNodes.length) {
selection = 1;
}
this.attributes.set('selection', selection);
}
setChildInheritedAttributes(attributes, display, level, prime) {
var _a, _b;
if (this.attributes.get('actiontype').toLowerCase() !== 'tooltip') {
super.setChildInheritedAttributes(attributes, display, level, prime);
return;
}
(_a = this.childNodes[0]) === null || _a === void 0 ? void 0 : _a.setInheritedAttributes(attributes, display, level, prime);
(_b = this.childNodes[1]) === null || _b === void 0 ? void 0 : _b.setInheritedAttributes(attributes, false, 1, false);
}
}
MmlMaction.defaults = Object.assign(Object.assign({}, AbstractMmlNode.defaults), { actiontype: 'toggle', selection: 1 });
//# sourceMappingURL=maction.js.map
;// ./mjs/core/MmlTree/MmlNodes/msubsup.js
class MmlMsubsup extends AbstractMmlBaseNode {
get kind() {
return 'msubsup';
}
get arity() {
return 3;
}
get base() {
return 0;
}
get sub() {
return 1;
}
get sup() {
return 2;
}
setChildInheritedAttributes(attributes, display, level, prime) {
const nodes = this.childNodes;
nodes[0].setInheritedAttributes(attributes, display, level, prime);
nodes[1].setInheritedAttributes(attributes, false, level + 1, prime || this.sub === 1);
if (!nodes[2]) {
return;
}
nodes[2].setInheritedAttributes(attributes, false, level + 1, prime || this.sub === 2);
}
}
MmlMsubsup.defaults = Object.assign(Object.assign({}, AbstractMmlBaseNode.defaults), { subscriptshift: '', superscriptshift: '' });
class MmlMsub extends MmlMsubsup {
get kind() {
return 'msub';
}
get arity() {
return 2;
}
}
MmlMsub.defaults = Object.assign({}, MmlMsubsup.defaults);
class MmlMsup extends MmlMsubsup {
get kind() {
return 'msup';
}
get arity() {
return 2;
}
get sup() {
return 1;
}
get sub() {
return 2;
}
}
MmlMsup.defaults = Object.assign({}, MmlMsubsup.defaults);
//# sourceMappingURL=msubsup.js.map
;// ./mjs/core/MmlTree/MmlNodes/munderover.js
class MmlMunderover extends AbstractMmlBaseNode {
get kind() {
return 'munderover';
}
get arity() {
return 3;
}
get base() {
return 0;
}
get under() {
return 1;
}
get over() {
return 2;
}
get linebreakContainer() {
return true;
}
setChildInheritedAttributes(attributes, display, level, prime) {
const nodes = this.childNodes;
nodes[0].setInheritedAttributes(attributes, display, level, prime || !!nodes[this.over]);
const force = !!(!display && nodes[0].coreMO().attributes.get('movablelimits'));
const ACCENTS = this.constructor.ACCENTS;
nodes[1].setInheritedAttributes(attributes, false, this.getScriptlevel(ACCENTS[1], force, level), prime || this.under === 1);
this.setInheritedAccent(1, ACCENTS[1], display, level, prime, force);
if (!nodes[2]) {
return;
}
nodes[2].setInheritedAttributes(attributes, false, this.getScriptlevel(ACCENTS[2], force, level), prime || this.under === 2);
this.setInheritedAccent(2, ACCENTS[2], display, level, prime, force);
}
getScriptlevel(accent, force, level) {
if (force || !this.attributes.get(accent)) {
level++;
}
return level;
}
setInheritedAccent(n, accent, display, level, prime, force) {
const node = this.childNodes[n];
if (!this.attributes.hasExplicit(accent) && node.isEmbellished) {
const value = node.coreMO().attributes.get('accent');
this.attributes.setInherited(accent, value);
if (value !== this.attributes.getDefault(accent)) {
node.setInheritedAttributes({}, display, this.getScriptlevel(accent, force, level), prime);
}
}
}
}
MmlMunderover.defaults = Object.assign(Object.assign({}, AbstractMmlBaseNode.defaults), { accent: false, accentunder: false, align: 'center' });
MmlMunderover.ACCENTS = ['', 'accentunder', 'accent'];
class MmlMunder extends MmlMunderover {
get kind() {
return 'munder';
}
get arity() {
return 2;
}
}
MmlMunder.defaults = Object.assign({}, MmlMunderover.defaults);
class MmlMover extends MmlMunderover {
get kind() {
return 'mover';
}
get arity() {
return 2;
}
get over() {
return 1;
}
get under() {
return 2;
}
}
MmlMover.defaults = Object.assign({}, MmlMunderover.defaults);
MmlMover.ACCENTS = ['', 'accent', 'accentunder'];
//# sourceMappingURL=munderover.js.map
;// ./mjs/core/MmlTree/MmlNodes/mmultiscripts.js
class MmlMmultiscripts extends MmlMsubsup {
get kind() {
return 'mmultiscripts';
}
get arity() {
return 1;
}
setChildInheritedAttributes(attributes, display, level, prime) {
this.childNodes[0].setInheritedAttributes(attributes, display, level, prime);
let prescripts = false;
for (let i = 1, n = 0; i < this.childNodes.length; i++) {
const child = this.childNodes[i];
if (child.isKind('mprescripts')) {
if (!prescripts) {
prescripts = true;
if (i % 2 === 0) {
const none = this.factory.create('none');
this.childNodes.splice(i, 0, none);
none.parent = this;
i++;
}
}
}
else {
const primestyle = prime || n % 2 === 0;
child.setInheritedAttributes(attributes, false, level + 1, primestyle);
n++;
}
}
if (this.childNodes.length % 2 === (prescripts ? 1 : 0)) {
this.appendChild(this.factory.create('none'));
this.childNodes[this.childNodes.length - 1].setInheritedAttributes(attributes, false, level + 1, prime);
}
}
verifyChildren(options) {
let prescripts = false;
const fix = options['fixMmultiscripts'];
for (let i = 0; i < this.childNodes.length; i++) {
const child = this.childNodes[i];
if (child.isKind('mprescripts')) {
if (prescripts) {
child.mError(child.kind + ' can only appear once in ' + this.kind, options, true);
}
else {
prescripts = true;
if (i % 2 === 0 && !fix) {
this.mError('There must be an equal number of prescripts of each type', options);
}
}
}
}
if (this.childNodes.length % 2 === (prescripts ? 1 : 0) && !fix) {
this.mError('There must be an equal number of scripts of each type', options);
}
super.verifyChildren(options);
}
}
MmlMmultiscripts.defaults = Object.assign({}, MmlMsubsup.defaults);
class MmlMprescripts extends AbstractMmlNode {
get kind() {
return 'mprescripts';
}
get arity() {
return 0;
}
verifyTree(options) {
super.verifyTree(options);
if (this.parent && !this.parent.isKind('mmultiscripts')) {
this.mError(this.kind + ' must be a child of mmultiscripts', options, true);
}
}
}
MmlMprescripts.defaults = Object.assign({}, AbstractMmlNode.defaults);
class MmlNone extends AbstractMmlNode {
get kind() {
return 'none';
}
get arity() {
return 0;
}
verifyTree(options) {
super.verifyTree(options);
if (this.parent && !this.parent.isKind('mmultiscripts')) {
this.mError(this.kind + ' must be a child of mmultiscripts', options, true);
}
}
}
MmlNone.defaults = Object.assign({}, AbstractMmlNode.defaults);
//# sourceMappingURL=mmultiscripts.js.map
;// ./mjs/core/MmlTree/MmlNodes/mtable.js
class MmlMtable extends AbstractMmlNode {
constructor() {
super(...arguments);
this.properties = {
useHeight: true,
};
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'mtable';
}
get linebreakContainer() {
return true;
}
get linebreakAlign() {
return '';
}
setInheritedAttributes(attributes, display, level, prime) {
for (const name of indentAttributes) {
if (attributes[name]) {
this.attributes.setInherited(name, attributes[name][1]);
}
if (this.attributes.hasExplicit(name)) {
this.attributes.unset(name);
}
}
super.setInheritedAttributes(attributes, display, level, prime);
}
setChildInheritedAttributes(attributes, display, level, _prime) {
for (const child of this.childNodes) {
if (!child.isKind('mtr')) {
this.replaceChild(this.factory.create('mtr'), child).appendChild(child);
}
}
display = !!(this.attributes.getExplicit('displaystyle') ||
this.attributes.getDefault('displaystyle'));
attributes = this.addInheritedAttributes(attributes, {
columnalign: this.attributes.get('columnalign'),
rowalign: 'center',
'data-break-align': this.attributes.get('data-break-align'),
});
const cramped = this.attributes.getExplicit('data-cramped');
const ralign = split(this.attributes.get('rowalign'));
for (const child of this.childNodes) {
attributes.rowalign[1] = ralign.shift() || attributes.rowalign[1];
child.setInheritedAttributes(attributes, display, level, !!cramped);
}
}
verifyChildren(options) {
let mtr = null;
const factory = this.factory;
for (let i = 0; i < this.childNodes.length; i++) {
const child = this.childNodes[i];
if (child.isKind('mtr')) {
mtr = null;
}
else {
const isMtd = child.isKind('mtd');
if (mtr) {
this.removeChild(child);
i--;
}
else {
mtr = this.replaceChild(factory.create('mtr'), child);
}
mtr.appendChild(isMtd ? child : factory.create('mtd', {}, [child]));
if (!options['fixMtables']) {
child.parent.removeChild(child);
child.parent = this;
if (isMtd) {
mtr.appendChild(factory.create('mtd'));
}
const merror = child.mError('Children of ' + this.kind + ' must be mtr or mlabeledtr', options, isMtd);
mtr.childNodes[mtr.childNodes.length - 1].appendChild(merror);
}
}
}
super.verifyChildren(options);
}
setTeXclass(prev) {
this.getPrevClass(prev);
for (const child of this.childNodes) {
child.setTeXclass(null);
}
return this;
}
}
MmlMtable.defaults = Object.assign(Object.assign({}, AbstractMmlNode.defaults), { align: 'axis', rowalign: 'baseline', columnalign: 'center', groupalign: '{left}', alignmentscope: true, columnwidth: 'auto', width: 'auto', rowspacing: '1ex', columnspacing: '.8em', rowlines: 'none', columnlines: 'none', frame: 'none', framespacing: '0.4em 0.5ex', equalrows: false, equalcolumns: false, displaystyle: false, side: 'right', minlabelspacing: '0.8em', 'data-break-align': 'top' });
//# sourceMappingURL=mtable.js.map
;// ./mjs/core/MmlTree/MmlNodes/mtr.js
class MmlMtr extends AbstractMmlNode {
get kind() {
return 'mtr';
}
get linebreakContainer() {
return true;
}
get linebreakAlign() {
return '';
}
setChildInheritedAttributes(attributes, display, level, prime) {
for (const child of this.childNodes) {
if (!child.isKind('mtd')) {
this.replaceChild(this.factory.create('mtd'), child).appendChild(child);
}
}
const calign = split(this.attributes.get('columnalign'));
const balign = split(this.attributes.get('data-break-align'));
if (this.arity === 1) {
calign.unshift(this.parent.attributes.get('side'));
balign.unshift('top');
}
attributes = this.addInheritedAttributes(attributes, {
rowalign: this.attributes.get('rowalign'),
columnalign: 'center',
'data-break-align': 'top',
});
for (const child of this.childNodes) {
attributes.columnalign[1] = calign.shift() || attributes.columnalign[1];
attributes['data-vertical-align'] = [
this.kind,
balign.shift() || attributes['data-break-align'][1],
];
child.setInheritedAttributes(attributes, display, level, prime);
}
}
verifyChildren(options) {
if (this.parent && !this.parent.isKind('mtable')) {
this.mError(this.kind + ' can only be a child of an mtable', options, true);
return;
}
for (const child of this.childNodes) {
if (!child.isKind('mtd')) {
const mtd = this.replaceChild(this.factory.create('mtd'), child);
mtd.appendChild(child);
if (!options['fixMtables']) {
child.mError('Children of ' + this.kind + ' must be mtd', options);
}
}
}
super.verifyChildren(options);
}
setTeXclass(prev) {
this.getPrevClass(prev);
for (const child of this.childNodes) {
child.setTeXclass(null);
}
return this;
}
}
MmlMtr.defaults = Object.assign(Object.assign({}, AbstractMmlNode.defaults), { rowalign: INHERIT, columnalign: INHERIT, groupalign: INHERIT, 'data-break-align': 'top' });
class MmlMlabeledtr extends MmlMtr {
get kind() {
return 'mlabeledtr';
}
get arity() {
return 1;
}
}
//# sourceMappingURL=mtr.js.map
;// ./mjs/core/MmlTree/MmlNodes/mtd.js
class MmlMtd extends AbstractMmlBaseNode {
get kind() {
return 'mtd';
}
get arity() {
return -1;
}
get linebreakContainer() {
return true;
}
get linebreakAlign() {
return 'columnalign';
}
verifyChildren(options) {
if (this.parent && !this.parent.isKind('mtr')) {
this.mError(this.kind + ' can only be a child of an mtr or mlabeledtr', options, true);
return;
}
super.verifyChildren(options);
}
setTeXclass(prev) {
this.getPrevClass(prev);
this.childNodes[0].setTeXclass(null);
return this;
}
}
MmlMtd.defaults = Object.assign(Object.assign({}, AbstractMmlBaseNode.defaults), { rowspan: 1, columnspan: 1, rowalign: INHERIT, columnalign: INHERIT, groupalign: INHERIT, 'data-vertical-align': 'top' });
//# sourceMappingURL=mtd.js.map
;// ./mjs/core/MmlTree/MmlNodes/maligngroup.js
class MmlMaligngroup extends AbstractMmlLayoutNode {
get kind() {
return 'maligngroup';
}
get isSpacelike() {
return true;
}
setChildInheritedAttributes(attributes, display, level, prime) {
attributes = this.addInheritedAttributes(attributes, this.attributes.getAllAttributes());
super.setChildInheritedAttributes(attributes, display, level, prime);
}
}
MmlMaligngroup.defaults = Object.assign(Object.assign({}, AbstractMmlLayoutNode.defaults), { groupalign: INHERIT });
//# sourceMappingURL=maligngroup.js.map
;// ./mjs/core/MmlTree/MmlNodes/malignmark.js
class MmlMalignmark extends AbstractMmlNode {
get kind() {
return 'malignmark';
}
get arity() {
return 0;
}
get isSpacelike() {
return true;
}
}
MmlMalignmark.defaults = Object.assign(Object.assign({}, AbstractMmlNode.defaults), { edge: 'left' });
//# sourceMappingURL=malignmark.js.map
;// ./mjs/core/MmlTree/MmlNodes/mglyph.js
class MmlMglyph extends AbstractMmlTokenNode {
constructor() {
super(...arguments);
this.texclass = TEXCLASS.ORD;
}
get kind() {
return 'mglyph';
}
verifyAttributes(options) {
const { src, fontfamily, index } = this.attributes.getList('src', 'fontfamily', 'index');
if (src === '' && (fontfamily === '' || index === '')) {
this.mError('mglyph must have either src or fontfamily and index attributes', options, true);
}
else {
super.verifyAttributes(options);
}
}
}
MmlMglyph.defaults = Object.assign(Object.assign({}, AbstractMmlTokenNode.defaults), { alt: '', src: '', index: '', width: 'auto', height: 'auto', valign: '0em' });
//# sourceMappingURL=mglyph.js.map
;// ./mjs/core/MmlTree/MmlNodes/semantics.js
class MmlSemantics extends AbstractMmlBaseNode {
get kind() {
return 'semantics';
}
get arity() {
return 1;
}
get notParent() {
return true;
}
}
MmlSemantics.defaults = Object.assign(Object.assign({}, AbstractMmlBaseNode.defaults), { definitionUrl: null, encoding: null });
class MmlAnnotationXML extends AbstractMmlNode {
get kind() {
return 'annotation-xml';
}
setChildInheritedAttributes() { }
}
MmlAnnotationXML.defaults = Object.assign(Object.assign({}, AbstractMmlNode.defaults), { definitionUrl: null, encoding: null, cd: 'mathmlkeys', name: '', src: null });
class MmlAnnotation extends MmlAnnotationXML {
constructor() {
super(...arguments);
this.properties = {
isChars: true,
};
}
get kind() {
return 'annotation';
}
}
MmlAnnotation.defaults = Object.assign({}, MmlAnnotationXML.defaults);
//# sourceMappingURL=semantics.js.map
;// ./mjs/core/MmlTree/MmlNodes/TeXAtom.js
class TeXAtom extends AbstractMmlBaseNode {
get kind() {
return 'TeXAtom';
}
get arity() {
return -1;
}
get notParent() {
return true;
}
constructor(factory, attributes, children) {
super(factory, attributes, children);
this.texclass = TEXCLASS.ORD;
this.setProperty('texClass', this.texClass);
}
setTeXclass(prev) {
this.childNodes[0].setTeXclass(null);
return this.adjustTeXclass(prev);
}
adjustTeXclass(prev) {
return prev;
}
}
TeXAtom.defaults = Object.assign({}, AbstractMmlBaseNode.defaults);
TeXAtom.prototype.adjustTeXclass = MmlMo.prototype.adjustTeXclass;
//# sourceMappingURL=TeXAtom.js.map
;// ./mjs/core/MmlTree/MmlNodes/mathchoice.js
class MathChoice extends AbstractMmlBaseNode {
get kind() {
return 'MathChoice';
}
get arity() {
return 4;
}
get notParent() {
return true;
}
setInheritedAttributes(attributes, display, level, prime) {
const selection = display ? 0 : Math.max(0, Math.min(level, 2)) + 1;
const child = this.childNodes[selection] || this.factory.create('mrow');
this.parent.replaceChild(child, this);
child.setInheritedAttributes(attributes, display, level, prime);
}
}
MathChoice.defaults = Object.assign({}, AbstractMmlBaseNode.defaults);
//# sourceMappingURL=mathchoice.js.map
;// ./mjs/core/MmlTree/MmlNodes/HtmlNode.js
class HtmlNode extends XMLNode {
get kind() {
return 'html';
}
getHTML() {
return this.getXML();
}
setHTML(html, adaptor = null) {
try {
adaptor.getAttribute(html, 'data-mjx-hdw');
}
catch (_error) {
html = adaptor.node('span', {}, [html]);
}
return this.setXML(html, adaptor);
}
getSerializedHTML() {
return this.adaptor.outerHTML(this.xml);
}
textContent() {
return this.adaptor.textContent(this.xml);
}
toString() {
const kind = this.adaptor.kind(this.xml);
return `HTML=<${kind}>...${kind}>`;
}
verifyTree(options) {
if (this.parent && !this.parent.isToken) {
this.mError('HTML can only be a child of a token element', options, true);
return;
}
}
}
//# sourceMappingURL=HtmlNode.js.map
;// ./mjs/core/MmlTree/MML.js
const MML = {
[MmlMath.prototype.kind]: MmlMath,
[MmlMi.prototype.kind]: MmlMi,
[MmlMn.prototype.kind]: MmlMn,
[MmlMo.prototype.kind]: MmlMo,
[MmlMtext.prototype.kind]: MmlMtext,
[MmlMspace.prototype.kind]: MmlMspace,
[MmlMs.prototype.kind]: MmlMs,
[MmlMrow.prototype.kind]: MmlMrow,
[MmlInferredMrow.prototype.kind]: MmlInferredMrow,
[MmlMfrac.prototype.kind]: MmlMfrac,
[MmlMsqrt.prototype.kind]: MmlMsqrt,
[MmlMroot.prototype.kind]: MmlMroot,
[MmlMstyle.prototype.kind]: MmlMstyle,
[MmlMerror.prototype.kind]: MmlMerror,
[MmlMpadded.prototype.kind]: MmlMpadded,
[MmlMphantom.prototype.kind]: MmlMphantom,
[MmlMfenced.prototype.kind]: MmlMfenced,
[MmlMenclose.prototype.kind]: MmlMenclose,
[MmlMaction.prototype.kind]: MmlMaction,
[MmlMsub.prototype.kind]: MmlMsub,
[MmlMsup.prototype.kind]: MmlMsup,
[MmlMsubsup.prototype.kind]: MmlMsubsup,
[MmlMunder.prototype.kind]: MmlMunder,
[MmlMover.prototype.kind]: MmlMover,
[MmlMunderover.prototype.kind]: MmlMunderover,
[MmlMmultiscripts.prototype.kind]: MmlMmultiscripts,
[MmlMprescripts.prototype.kind]: MmlMprescripts,
[MmlNone.prototype.kind]: MmlNone,
[MmlMtable.prototype.kind]: MmlMtable,
[MmlMlabeledtr.prototype.kind]: MmlMlabeledtr,
[MmlMtr.prototype.kind]: MmlMtr,
[MmlMtd.prototype.kind]: MmlMtd,
[MmlMaligngroup.prototype.kind]: MmlMaligngroup,
[MmlMalignmark.prototype.kind]: MmlMalignmark,
[MmlMglyph.prototype.kind]: MmlMglyph,
[MmlSemantics.prototype.kind]: MmlSemantics,
[MmlAnnotation.prototype.kind]: MmlAnnotation,
[MmlAnnotationXML.prototype.kind]: MmlAnnotationXML,
[TeXAtom.prototype.kind]: TeXAtom,
[MathChoice.prototype.kind]: MathChoice,
[TextNode.prototype.kind]: TextNode,
[XMLNode.prototype.kind]: XMLNode,
[HtmlNode.prototype.kind]: HtmlNode,
};
//# sourceMappingURL=MML.js.map
;// ./mjs/core/MmlTree/MmlFactory.js
class MmlFactory extends AbstractNodeFactory {
get MML() {
return this.node;
}
}
MmlFactory.defaultNodes = MML;
//# sourceMappingURL=MmlFactory.js.map
;// ./mjs/util/BitField.js
class BitField {
constructor() {
this.bits = 0;
}
static allocate(...names) {
for (const name of names) {
if (this.has(name)) {
throw new Error('Bit already allocated for ' + name);
}
if (this.next === BitField.MAXBIT) {
throw new Error('Maximum number of bits already allocated');
}
this.names.set(name, this.next);
this.next <<= 1;
}
}
static has(name) {
return this.names.has(name);
}
set(name) {
this.bits |= this.getBit(name);
}
clear(name) {
this.bits &= ~this.getBit(name);
}
isSet(name) {
return !!(this.bits & this.getBit(name));
}
reset() {
this.bits = 0;
}
getBit(name) {
const bit = this.constructor.names.get(name);
if (!bit) {
throw new Error('Unknown bit-field name: ' + name);
}
return bit;
}
}
BitField.MAXBIT = 1 << 31;
BitField.next = 1;
BitField.names = new Map();
function BitFieldClass(...names) {
const bits = class extends BitField {
};
bits.allocate(...names);
return bits;
}
//# sourceMappingURL=BitField.js.map
;// ./mjs/util/Retries.js
function handleRetriesFor(code) {
return new Promise(function run(ok, fail) {
const handleRetry = (err) => {
var _a;
if (err.retry instanceof Promise) {
err.retry.then(() => run(ok, fail)).catch((e) => fail(e));
}
else if ((_a = err.restart) === null || _a === void 0 ? void 0 : _a.isCallback) {
MathJax.Callback.After(() => run(ok, fail), err.restart);
}
else {
fail(err);
}
};
try {
const result = code();
if (result instanceof Promise) {
result.then((value) => ok(value)).catch((err) => handleRetry(err));
}
else {
ok(result);
}
}
catch (err) {
handleRetry(err);
}
});
}
function retryAfter(promise) {
const err = new Error('MathJax retry -- an asynchronous action is required; ' +
'try using one of the promise-based functions and await its resolution.');
err.retry = promise;
throw err;
}
//# sourceMappingURL=Retries.js.map
;// ./mjs/core/MathDocument.js
var MathDocument_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
class RenderList extends PrioritizedList {
static create(actions) {
const list = new this();
for (const id of Object.keys(actions)) {
const [action, priority] = this.action(id, actions[id]);
if (priority) {
list.add(action, priority);
}
}
return list;
}
static action(id, action) {
let renderDoc, renderMath;
let convert = true;
const priority = action[0];
if (action.length === 1 || typeof action[1] === 'boolean') {
if (action.length === 2) {
convert = action[1];
}
[renderDoc, renderMath] = this.methodActions(id);
}
else if (typeof action[1] === 'string') {
if (typeof action[2] === 'string') {
if (action.length === 4) {
convert = action[3];
}
const [method1, method2] = action.slice(1);
[renderDoc, renderMath] = this.methodActions(method1, method2);
}
else {
if (action.length === 3) {
convert = action[2];
}
[renderDoc, renderMath] = this.methodActions(action[1]);
}
}
else {
if (action.length === 4) {
convert = action[3];
}
[renderDoc, renderMath] = action.slice(1);
}
return [
{ id, renderDoc, renderMath, convert },
priority,
];
}
static methodActions(method1, method2 = method1) {
return [
(document) => {
if (method1) {
document[method1]();
}
return false;
},
(math, document) => {
if (method2) {
math[method2](document);
}
return false;
},
];
}
renderDoc(document, start = STATE.UNPROCESSED) {
for (const item of this.items) {
if (item.priority >= start) {
if (item.item.renderDoc(document))
return;
}
}
}
renderMath(math, document, start = STATE.UNPROCESSED) {
for (const item of this.items) {
if (item.priority >= start) {
if (item.item.renderMath(math, document))
return;
}
}
}
renderConvert(math, document, end = STATE.LAST) {
for (const item of this.items) {
if (item.priority > end)
return;
if (item.item.convert) {
if (item.item.renderMath(math, document))
return;
}
}
}
findID(id) {
for (const item of this.items) {
if (item.item.id === id) {
return item.item;
}
}
return null;
}
}
const resetOptions = {
all: false,
processed: false,
inputJax: null,
outputJax: null,
};
const resetAllOptions = {
all: true,
processed: true,
inputJax: [],
outputJax: [],
};
class DefaultInputJax extends AbstractInputJax {
compile(_math) {
return null;
}
}
class DefaultOutputJax extends AbstractOutputJax {
typeset(_math, _document = null) {
return null;
}
escaped(_math, _document) {
return null;
}
}
class DefaultMathList extends AbstractMathList {
}
class DefaultMathItem extends AbstractMathItem {
}
class AbstractMathDocument {
constructor(document, adaptor, options) {
const CLASS = this.constructor;
this.document = document;
this.options = userOptions(defaultOptions({}, CLASS.OPTIONS), options);
this.math = new (this.options['MathList'] || DefaultMathList)();
this.renderActions = RenderList.create(this.options['renderActions']);
this._actionPromises = [];
this._readyPromise = Promise.resolve();
this.processed = new AbstractMathDocument.ProcessBits();
this.outputJax =
this.options['OutputJax'] || new DefaultOutputJax();
let inputJax = this.options['InputJax'] || [new DefaultInputJax()];
if (!Array.isArray(inputJax)) {
inputJax = [inputJax];
}
this.inputJax = inputJax;
this.adaptor = adaptor;
this.outputJax.setAdaptor(adaptor);
this.inputJax.map((jax) => jax.setAdaptor(adaptor));
this.mmlFactory = this.options['MmlFactory'] || new MmlFactory();
this.inputJax.map((jax) => jax.setMmlFactory(this.mmlFactory));
this.outputJax.initialize();
this.inputJax.map((jax) => jax.initialize());
}
get kind() {
return this.constructor.KIND;
}
addRenderAction(id, ...action) {
const [fn, p] = RenderList.action(id, action);
this.renderActions.add(fn, p);
}
removeRenderAction(id) {
const action = this.renderActions.findID(id);
if (action) {
this.renderActions.remove(action);
}
}
render() {
this.clearPromises();
this.renderActions.renderDoc(this);
return this;
}
renderPromise() {
return this.whenReady(() => handleRetriesFor(() => MathDocument_awaiter(this, void 0, void 0, function* () {
this.render();
yield this.actionPromises();
this.clearPromises();
return this;
})));
}
rerender(start = STATE.RERENDER) {
this.state(start - 1);
this.render();
return this;
}
rerenderPromise(start = STATE.RERENDER) {
return this.whenReady(() => handleRetriesFor(() => MathDocument_awaiter(this, void 0, void 0, function* () {
this.rerender(start);
yield this.actionPromises();
this.clearPromises();
return this;
})));
}
convert(math, options = {}) {
let { format, display, end, ex, em, containerWidth, scale, family } = userOptions({
format: this.inputJax[0].name,
display: true,
end: STATE.LAST,
em: 16,
ex: 8,
containerWidth: null,
scale: 1,
family: '',
}, options);
if (containerWidth === null) {
containerWidth = 80 * ex;
}
const jax = this.inputJax.reduce((jax, ijax) => (ijax.name === format ? ijax : jax), null);
const mitem = new this.options.MathItem(math, jax, display);
mitem.start.node = this.adaptor.body(this.document);
mitem.setMetrics(em, ex, containerWidth, scale);
if (family && this.outputJax.options.mtextInheritFont) {
mitem.outputData.mtextFamily = family;
}
if (family && this.outputJax.options.merrorInheritFont) {
mitem.outputData.merrorFamily = family;
}
this.clearPromises();
mitem.convert(this, end);
return mitem.typesetRoot || mitem.root;
}
convertPromise(math, options = {}) {
return this.whenReady(() => handleRetriesFor(() => MathDocument_awaiter(this, void 0, void 0, function* () {
const node = this.convert(math, options);
yield this.actionPromises();
this.clearPromises();
return node;
})));
}
whenReady(action) {
return (this._readyPromise = this._readyPromise
.catch((_) => { })
.then(() => {
const ready = this._readyPromise;
this._readyPromise = Promise.resolve();
const result = action();
const promise = this._readyPromise.then(() => result);
this._readyPromise = ready;
return promise;
}));
}
actionPromises() {
return Promise.all(this._actionPromises);
}
clearPromises() {
this._actionPromises = [];
}
savePromise(promise) {
this._actionPromises.push(promise);
}
findMath(_options = null) {
this.processed.set('findMath');
return this;
}
compile() {
if (!this.processed.isSet('compile')) {
const recompile = [];
for (const math of this.math) {
this.compileMath(math);
if (math.inputData.recompile !== undefined) {
recompile.push(math);
}
}
for (const math of recompile) {
const data = math.inputData.recompile;
math.state(data.state);
math.inputData.recompile = data;
this.compileMath(math);
}
this.processed.set('compile');
}
return this;
}
compileMath(math) {
try {
math.compile(this);
}
catch (err) {
if (err.retry || err.restart) {
throw err;
}
this.options['compileError'](this, math, err);
math.inputData['error'] = err;
}
}
compileError(math, err) {
math.root = this.mmlFactory.create('math', null, [
this.mmlFactory.create('merror', { 'data-mjx-error': err.message, title: err.message }, [
this.mmlFactory.create('mtext', null, [
this.mmlFactory.create('text').setText('Math input error'),
]),
]),
]);
if (math.display) {
math.root.attributes.set('display', 'block');
}
math.inputData.error = err.message;
}
typeset() {
if (!this.processed.isSet('typeset')) {
for (const math of this.math) {
try {
math.typeset(this);
}
catch (err) {
if (err.retry || err.restart) {
throw err;
}
this.options['typesetError'](this, math, err);
math.outputData['error'] = err;
}
}
this.processed.set('typeset');
}
return this;
}
typesetError(math, err) {
math.typesetRoot = this.adaptor.node('mjx-container', {
class: 'MathJax mjx-output-error',
jax: this.outputJax.name,
}, [
this.adaptor.node('span', {
'data-mjx-error': err.message,
title: err.message,
style: {
color: 'red',
'background-color': 'yellow',
'line-height': 'normal',
},
}, [this.adaptor.text('Math output error')]),
]);
if (math.display) {
this.adaptor.setAttributes(math.typesetRoot, {
style: {
display: 'block',
margin: '1em 0',
'text-align': 'center',
},
});
}
math.outputData.error = err.message;
}
getMetrics() {
if (!this.processed.isSet('getMetrics')) {
this.outputJax.getMetrics(this);
this.processed.set('getMetrics');
}
return this;
}
updateDocument() {
if (!this.processed.isSet('updateDocument')) {
for (const math of this.math.reversed()) {
math.updateDocument(this);
}
this.processed.set('updateDocument');
}
return this;
}
removeFromDocument(_restore = false) {
return this;
}
state(state, restore = false) {
for (const math of this.math) {
math.state(state, restore);
}
if (state < STATE.INSERTED) {
this.processed.clear('updateDocument');
}
if (state < STATE.TYPESET) {
this.processed.clear('typeset');
this.processed.clear('getMetrics');
}
if (state < STATE.COMPILED) {
this.processed.clear('compile');
}
if (state < STATE.FINDMATH) {
this.processed.clear('findMath');
}
return this;
}
reset(options = { processed: true }) {
options = userOptions(Object.assign({}, resetOptions), options);
if (options.all) {
Object.assign(options, resetAllOptions);
}
if (options.processed) {
this.processed.reset();
}
if (options.inputJax) {
this.inputJax.forEach((jax) => jax.reset(...options.inputJax));
}
if (options.outputJax) {
this.outputJax.reset(...options.outputJax);
}
return this;
}
clear() {
this.reset();
this.math.clear();
return this;
}
done() {
return Promise.resolve();
}
concat(list) {
this.math.merge(list);
return this;
}
clearMathItemsWithin(containers) {
const items = this.getMathItemsWithin(containers);
for (const item of items.slice(0).reverse()) {
item.clear();
}
this.math.remove(...items);
return items;
}
getMathItemsWithin(elements) {
if (!Array.isArray(elements)) {
elements = [elements];
}
const adaptor = this.adaptor;
const items = [];
const containers = adaptor.getElements(elements, this.document);
ITEMS: for (const item of this.math) {
for (const container of containers) {
if (item.start.node && adaptor.contains(container, item.start.node)) {
items.push(item);
continue ITEMS;
}
}
}
return items;
}
}
AbstractMathDocument.KIND = 'MathDocument';
AbstractMathDocument.OPTIONS = {
OutputJax: null,
InputJax: null,
MmlFactory: null,
MathList: DefaultMathList,
MathItem: DefaultMathItem,
compileError: (doc, math, err) => {
doc.compileError(math, err);
},
typesetError: (doc, math, err) => {
doc.typesetError(math, err);
},
renderActions: expandable({
find: [STATE.FINDMATH, 'findMath', '', false],
compile: [STATE.COMPILED],
metrics: [STATE.METRICS, 'getMetrics', '', false],
typeset: [STATE.TYPESET],
update: [STATE.INSERTED, 'updateDocument', false],
}),
};
AbstractMathDocument.ProcessBits = BitFieldClass('findMath', 'compile', 'getMetrics', 'typeset', 'updateDocument');
//# sourceMappingURL=MathDocument.js.map
;// ./mjs/core/Handler.js
class DefaultMathDocument extends AbstractMathDocument {
}
class AbstractHandler {
constructor(adaptor, priority = 5) {
this.documentClass = DefaultMathDocument;
this.adaptor = adaptor;
this.priority = priority;
}
get name() {
return this.constructor.NAME;
}
handlesDocument(_document) {
return false;
}
create(document, options) {
return new this.documentClass(document, this.adaptor, options);
}
}
AbstractHandler.NAME = 'generic';
//# sourceMappingURL=Handler.js.map
;// ./mjs/core/HandlerList.js
class HandlerList extends PrioritizedList {
register(handler) {
return this.add(handler, handler.priority);
}
unregister(handler) {
this.remove(handler);
}
handlesDocument(document) {
for (const item of this) {
const handler = item.item;
if (handler.handlesDocument(document)) {
return handler;
}
}
throw new Error(`Can't find handler for document`);
}
document(document, options = null) {
return this.handlesDocument(document).create(document, options);
}
}
//# sourceMappingURL=HandlerList.js.map
;// ./mjs/core/Tree/Visitor.js
class AbstractVisitor {
static methodName(kind) {
return ('visit' +
(kind.charAt(0).toUpperCase() + kind.substring(1)).replace(/[^a-z0-9_]/gi, '_') +
'Node');
}
constructor(factory) {
this.nodeHandlers = new Map();
for (const kind of factory.getKinds()) {
const method = this[AbstractVisitor.methodName(kind)];
if (method) {
this.nodeHandlers.set(kind, method);
}
}
}
visitTree(tree, ...args) {
return this.visitNode(tree, ...args);
}
visitNode(node, ...args) {
const handler = this.nodeHandlers.get(node.kind) || this.visitDefault;
return handler.call(this, node, ...args);
}
visitDefault(node, ...args) {
if ('childNodes' in node) {
for (const child of node.childNodes) {
this.visitNode(child, ...args);
}
}
}
setNodeHandler(kind, handler) {
this.nodeHandlers.set(kind, handler);
}
removeNodeHandler(kind) {
this.nodeHandlers.delete(kind);
}
}
//# sourceMappingURL=Visitor.js.map
;// ./mjs/core/MmlTree/MmlVisitor.js
const DATAMJX = 'data-mjx-';
class MmlVisitor extends AbstractVisitor {
constructor(factory = null) {
if (!factory) {
factory = new MmlFactory();
}
super(factory);
}
visitTextNode(_node, ..._args) { }
visitXMLNode(_node, ..._args) { }
visitHtmlNode(_node, ..._args) { }
getKind(node) {
const kind = node.kind;
return lookup(kind, this.constructor.rename, kind);
}
getAttributeList(node) {
const CLASS = this.constructor;
const defaults = lookup(node.kind, CLASS.defaultAttributes, {});
const attributes = Object.assign({}, defaults, this.getDataAttributes(node), node.attributes.getAllAttributes());
const variants = CLASS.variants;
if (Object.hasOwn(attributes, 'mathvariant')) {
if (Object.hasOwn(variants, attributes.mathvariant)) {
attributes.mathvariant = variants[attributes.mathvariant];
}
else if (node.getProperty('ignore-variant')) {
delete attributes.mathvariant;
}
}
return attributes;
}
getDataAttributes(node) {
const data = {};
const variant = node.attributes.getExplicit('mathvariant');
const variants = this.constructor.variants;
if (variant &&
(node.getProperty('ignore-variant') || Object.hasOwn(variants, variant))) {
this.setDataAttribute(data, 'variant', variant);
}
if (node.getProperty('variantForm')) {
this.setDataAttribute(data, 'alternate', '1');
}
if (node.getProperty('pseudoscript')) {
this.setDataAttribute(data, 'pseudoscript', 'true');
}
if (node.getProperty('autoOP') === false) {
this.setDataAttribute(data, 'auto-op', 'false');
}
const vbox = node.getProperty('vbox');
if (vbox) {
this.setDataAttribute(data, 'vbox', vbox);
}
const scriptalign = node.getProperty('scriptalign');
if (scriptalign) {
this.setDataAttribute(data, 'script-align', scriptalign);
}
const accent = node.getProperty('mathaccent');
if (accent !== undefined) {
if ((accent && !node.isMathAccent()) ||
(!accent && !node.isMathAccentWithWidth())) {
this.setDataAttribute(data, 'mathaccent', accent.toString());
}
}
const texclass = node.getProperty('texClass');
if (texclass !== undefined) {
let setclass = true;
if (texclass === TEXCLASS.OP && node.isKind('mi')) {
const name = node.getText();
setclass = !(name.length > 1 && name.match(MmlMi.operatorName));
}
if (setclass) {
this.setDataAttribute(data, 'texclass', texclass < 0 ? 'NONE' : TEXCLASSNAMES[texclass]);
}
}
if (node.getProperty('smallmatrix')) {
this.setDataAttribute(data, 'smallmatrix', 'true');
}
return data;
}
setDataAttribute(data, name, value) {
data[DATAMJX + name] = value;
}
}
MmlVisitor.rename = {
TeXAtom: 'mrow',
};
MmlVisitor.variants = {
'-tex-calligraphic': 'script',
'-tex-bold-calligraphic': 'bold-script',
'-tex-oldstyle': 'normal',
'-tex-bold-oldstyle': 'bold',
'-tex-mathit': 'italic',
};
MmlVisitor.defaultAttributes = {
math: {
xmlns: 'http://www.w3.org/1998/Math/MathML',
},
};
//# sourceMappingURL=MmlVisitor.js.map
;// ./mjs/core/MmlTree/MathMLVisitor.js
class MathMLVisitor extends MmlVisitor {
constructor() {
super(...arguments);
this.document = null;
}
visitTree(node, document) {
this.document = document;
const root = document.createElement('top');
this.visitNode(node, root);
this.document = null;
return root.firstChild;
}
visitTextNode(node, parent) {
parent.appendChild(this.document.createTextNode(node.getText()));
}
visitXMLNode(node, parent) {
parent.appendChild(node.getXML().cloneNode(true));
}
visitHtmlNode(node, parent) {
parent.appendChild(node.getHTML().cloneNode(true));
}
visitInferredMrowNode(node, parent) {
for (const child of node.childNodes) {
this.visitNode(child, parent);
}
}
visitDefault(node, parent) {
const mml = this.document.createElement(this.getKind(node));
this.addAttributes(node, mml);
for (const child of node.childNodes) {
this.visitNode(child, mml);
}
parent.appendChild(mml);
}
addAttributes(node, mml) {
const attributes = this.getAttributeList(node);
for (const name of Object.keys(attributes)) {
mml.setAttribute(name, attributes[name].toString());
}
}
}
//# sourceMappingURL=MathMLVisitor.js.map
;// ./mjs/core/MmlTree/SerializedMmlVisitor.js
class SerializedMmlVisitor extends MmlVisitor {
visitTree(node) {
return this.visitNode(node, '');
}
visitTextNode(node, _space) {
return this.quoteHTML(node.getText());
}
visitXMLNode(node, space) {
return space + node.getSerializedXML();
}
visitHtmlNode(node, _space) {
return node.getSerializedHTML();
}
visitInferredMrowNode(node, space) {
const mml = [];
for (const child of node.childNodes) {
mml.push(this.visitNode(child, space));
}
return mml.join('\n');
}
visitAnnotationNode(node, space) {
const children = this.childNodeMml(node, '', '');
return `${space}${children} `;
}
visitDefault(node, space) {
const kind = this.getKind(node);
const [nl, endspace] = node.isToken || node.childNodes.length === 0 ? ['', ''] : ['\n', space];
const children = this.childNodeMml(node, space + ' ', nl);
const childNode = children.match(/\S/) ? nl + children + endspace : '';
return `${space}<${kind}${this.getAttributes(node)}>${childNode}${kind}>`;
}
childNodeMml(node, space, nl) {
let mml = '';
for (const child of node.childNodes) {
mml += this.visitNode(child, space) + nl;
}
return mml;
}
getAttributes(node) {
const attr = [];
const attributes = this.getAttributeList(node);
for (const name of Object.keys(attributes)) {
const value = String(attributes[name]);
if (value === undefined)
continue;
attr.push(name + '="' + this.quoteHTML(value) + '"');
}
return attr.length ? ' ' + attr.join(' ') : '';
}
quoteHTML(value) {
return value
.replace(/&/g, '&')
.replace(//g, '>')
.replace(/"/g, '"')
.replace(/[\uD800-\uDBFF]./g, this.toEntity)
.replace(/[\u0080-\uD7FF\uE000-\uFFFF]/g, this.toEntity);
}
toEntity(c) {
return toEntity(c);
}
}
//# sourceMappingURL=SerializedMmlVisitor.js.map
;// ./mjs/core/Tree/Wrapper.js
class AbstractWrapper {
get kind() {
return this.node.kind;
}
constructor(factory, node) {
this.factory = factory;
this.node = node;
}
wrap(node) {
return this.factory.wrap(node);
}
walkTree(func, data) {
func(this, data);
if ('childNodes' in this) {
for (const child of this.childNodes) {
if (child) {
child.walkTree(func, data);
}
}
}
return data;
}
}
//# sourceMappingURL=Wrapper.js.map
;// ./mjs/core/Tree/WrapperFactory.js
class AbstractWrapperFactory extends AbstractFactory {
wrap(node, ...args) {
return this.create(node.kind, node, ...args);
}
}
//# sourceMappingURL=WrapperFactory.js.map
;// ./mjs/mathjax.js
const mathjax = {
version: VERSION,
context: context,
handlers: new HandlerList(),
document: function (document, options) {
return mathjax.handlers.document(document, options);
},
handleRetriesFor: handleRetriesFor,
retryAfter: retryAfter,
asyncLoad: null,
asyncIsSynchronous: false,
};
//# sourceMappingURL=mathjax.js.map
;// ./mjs/handlers/html/HTMLMathItem.js
class HTMLMathItem extends AbstractMathItem {
get adaptor() {
return this.inputJax.adaptor;
}
constructor(math, jax, display = true, start = { node: null, n: 0, delim: '' }, end = { node: null, n: 0, delim: '' }) {
super(math, jax, display, start, end);
}
updateDocument(_html) {
if (this.state() < STATE.INSERTED) {
if (this.inputJax.processStrings) {
let node = this.start.node;
if (node === this.end.node) {
if (this.end.n &&
this.end.n < this.adaptor.value(this.end.node).length) {
this.adaptor.split(this.end.node, this.end.n);
}
if (this.start.n) {
node = this.adaptor.split(this.start.node, this.start.n);
}
this.adaptor.replace(this.typesetRoot, node);
}
else {
if (this.start.n) {
node = this.adaptor.split(node, this.start.n);
}
while (node !== this.end.node) {
const next = this.adaptor.next(node);
this.adaptor.remove(node);
node = next;
}
this.adaptor.insert(this.typesetRoot, node);
if (this.end.n < this.adaptor.value(node).length) {
this.adaptor.split(node, this.end.n);
}
this.adaptor.remove(node);
}
}
else {
this.adaptor.replace(this.typesetRoot, this.start.node);
}
this.start.node = this.end.node = this.typesetRoot;
this.start.n = this.end.n = 0;
this.state(STATE.INSERTED);
}
}
updateStyleSheet(document) {
document.addStyleSheet();
}
removeFromDocument(restore = false) {
super.removeFromDocument(restore);
if (this.state() >= STATE.TYPESET) {
const adaptor = this.adaptor;
const node = this.start.node;
let math = adaptor.text('');
if (restore) {
const text = this.start.delim + this.math + this.end.delim;
if (this.inputJax.processStrings) {
math = adaptor.text(text);
}
else {
const doc = adaptor.parse(text, 'text/html');
math = adaptor.firstChild(adaptor.body(doc));
}
}
if (adaptor.parent(node)) {
adaptor.replace(math, node);
}
this.start.node = this.end.node = math;
this.start.n = this.end.n = 0;
}
}
}
//# sourceMappingURL=HTMLMathItem.js.map
;// ./mjs/handlers/html/HTMLMathList.js
class HTMLMathList extends AbstractMathList {
}
//# sourceMappingURL=HTMLMathList.js.map
;// ./mjs/handlers/html/HTMLDomStrings.js
class HTMLDomStrings {
constructor(options = null) {
const CLASS = this.constructor;
this.options = userOptions(defaultOptions({}, CLASS.OPTIONS), options);
this.init();
this.getPatterns();
}
init() {
this.strings = [];
this.string = '';
this.snodes = [];
this.nodes = [];
this.stack = [];
}
getPatterns() {
const skip = makeArray(this.options['skipHtmlTags']);
const ignore = makeArray(this.options['ignoreHtmlClass']);
const process = makeArray(this.options['processHtmlClass']);
this.skipHtmlTags = new RegExp('^(?:' + skip.join('|') + ')$', 'i');
this.ignoreHtmlClass = new RegExp('(?:^| )(?:' + ignore.join('|') + ')(?: |$)');
this.processHtmlClass = new RegExp('(?:^| )(?:' + process + ')(?: |$)');
}
pushString() {
if (this.string.match(/\S/)) {
this.strings.push(this.string);
this.nodes.push(this.snodes);
}
this.string = '';
this.snodes = [];
}
extendString(node, text) {
this.snodes.push([node, text.length]);
this.string += text;
}
handleText(node, ignore) {
if (!ignore) {
this.extendString(node, this.adaptor.value(node));
}
return this.adaptor.next(node);
}
handleTag(node, ignore) {
if (!ignore) {
const text = this.options['includeHtmlTags'][this.adaptor.kind(node)];
if (text instanceof Function) {
this.extendString(node, text(node, this.adaptor));
}
else {
this.extendString(node, text);
}
}
return this.adaptor.next(node);
}
handleContainer(node, ignore) {
this.pushString();
const cname = this.adaptor.getAttribute(node, 'class') || '';
const tname = this.adaptor.kind(node) || '';
const process = this.processHtmlClass.exec(cname);
let next = node;
if (this.adaptor.firstChild(node) &&
!this.adaptor.getAttribute(node, 'data-MJX') &&
(process || !this.skipHtmlTags.exec(tname))) {
if (this.adaptor.next(node)) {
this.stack.push([this.adaptor.next(node), ignore]);
}
next = this.adaptor.firstChild(node);
ignore = (ignore || this.ignoreHtmlClass.exec(cname)) && !process;
}
else {
next = this.adaptor.next(node);
}
return [next, ignore];
}
handleOther(node, _ignore) {
this.pushString();
return this.adaptor.next(node);
}
find(node) {
this.init();
const stop = this.adaptor.next(node);
let ignore = false;
const include = this.options['includeHtmlTags'];
while (node && node !== stop) {
const kind = this.adaptor.kind(node);
if (kind === '#text') {
node = this.handleText(node, ignore);
}
else if (Object.hasOwn(include, kind)) {
node = this.handleTag(node, ignore);
}
else if (kind) {
[node, ignore] = this.handleContainer(node, ignore);
}
else {
node = this.handleOther(node, ignore);
}
if (!node && this.stack.length) {
this.pushString();
[node, ignore] = this.stack.pop();
}
}
this.pushString();
const result = [this.strings, this.nodes];
this.init();
return result;
}
}
HTMLDomStrings.OPTIONS = {
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code',
'math', 'select', 'option', 'mjx-container'],
includeHtmlTags: expandable({ br: '\n', wbr: '', '#comment': '' }),
ignoreHtmlClass: 'mathjax_ignore',
processHtmlClass: 'mathjax_process'
};
//# sourceMappingURL=HTMLDomStrings.js.map
;// ./mjs/handlers/html/HTMLDocument.js
newState('STYLES', STATE.INSERTED + 1);
class HTMLDocument extends AbstractMathDocument {
constructor(document, adaptor, options) {
const [html, dom] = separateOptions(options, HTMLDomStrings.OPTIONS);
super(document, adaptor, html);
this.domStrings =
this.options['DomStrings'] || new HTMLDomStrings(dom);
this.domStrings.adaptor = adaptor;
this.styles = [];
}
findPosition(N, index, delim, nodes) {
const adaptor = this.adaptor;
const inc = 1 / (nodes[N].length || 1);
let i = N;
for (const [node, n] of nodes[N]) {
if (index <= n && adaptor.kind(node) === '#text') {
return { i, node, n: Math.max(index, 0), delim };
}
index -= n;
i += inc;
}
return { node: null, n: 0, delim };
}
mathItem(item, jax, nodes) {
const math = item.math;
const start = this.findPosition(item.n, item.start.n, item.open, nodes);
const end = this.findPosition(item.n, item.end.n, item.close, nodes);
return new this.options.MathItem(math, jax, item.display, start, end);
}
findMath(options) {
if (!this.processed.isSet('findMath')) {
this.adaptor.document = this.document;
options = userOptions({
elements: this.options.elements || [this.adaptor.body(this.document)],
}, options);
const containers = this.adaptor.getElements(options.elements, this.document);
for (const jax of this.inputJax) {
const list = jax.processStrings
? this.findMathFromStrings(jax, containers)
: this.findMathFromDOM(jax, containers);
this.math.merge(list);
}
this.processed.set('findMath');
}
return this;
}
findMathFromStrings(jax, containers) {
const strings = [];
const nodes = [];
for (const container of containers) {
const [slist, nlist] = this.domStrings.find(container);
strings.push(...slist);
nodes.push(...nlist);
}
const list = new this.options.MathList();
for (const math of jax.findMath(strings)) {
list.push(this.mathItem(math, jax, nodes));
}
return list;
}
findMathFromDOM(jax, containers) {
const items = [];
for (const container of containers) {
for (const math of jax.findMath(container)) {
items.push(new this.options.MathItem(math.math, jax, math.display, math.start, math.end));
}
}
return new this.options.MathList(...items);
}
updateDocument() {
if (!this.processed.isSet('updateDocument')) {
this.addPageElements();
this.addStyleSheet();
super.updateDocument();
this.processed.set('updateDocument');
}
return this;
}
addPageElements() {
const adaptor = this.adaptor;
const body = adaptor.body(this.document);
const node = this.documentPageElements();
if (node) {
const child = adaptor.firstChild(body);
if (child) {
adaptor.insert(node, child);
}
else {
adaptor.append(body, node);
}
}
}
addStyleSheet() {
const sheet = this.documentStyleSheet();
const adaptor = this.adaptor;
if (sheet && !adaptor.parent(sheet)) {
const head = adaptor.head(this.document);
const styles = this.findSheet(head, adaptor.getAttribute(sheet, 'id'));
if (styles) {
adaptor.replace(sheet, styles);
}
else {
adaptor.append(head, sheet);
}
}
}
findSheet(head, id) {
if (id) {
for (const sheet of this.adaptor.tags(head, 'style')) {
if (this.adaptor.getAttribute(sheet, 'id') === id) {
return sheet;
}
}
}
return null;
}
removeFromDocument(restore = false) {
if (this.processed.isSet('updateDocument')) {
for (const math of this.math) {
if (math.state() >= STATE.INSERTED) {
math.state(STATE.TYPESET, restore);
}
}
}
this.processed.clear('updateDocument');
return this;
}
documentStyleSheet() {
return this.outputJax.styleSheet(this);
}
documentPageElements() {
return this.outputJax.pageElements(this);
}
addStyles(styles) {
this.styles.push(styles);
if ('insertStyles' in this.outputJax) {
this.outputJax.insertStyles(styles);
}
}
getStyles() {
return this.styles;
}
}
HTMLDocument.KIND = 'HTML';
HTMLDocument.OPTIONS = Object.assign(Object.assign({}, AbstractMathDocument.OPTIONS), { renderActions: expandable(Object.assign(Object.assign({}, AbstractMathDocument.OPTIONS.renderActions), { styles: [STATE.STYLES, '', 'updateStyleSheet', false] })), MathList: HTMLMathList, MathItem: HTMLMathItem, DomStrings: null });
//# sourceMappingURL=HTMLDocument.js.map
;// ./mjs/handlers/html/HTMLHandler.js
class HTMLHandler extends AbstractHandler {
constructor() {
super(...arguments);
this.documentClass = HTMLDocument;
}
handlesDocument(document) {
const adaptor = this.adaptor;
if (typeof document === 'string') {
try {
document = adaptor.parse(document, 'text/html');
}
catch (_err) {
}
}
if (document instanceof adaptor.window.Document ||
document instanceof adaptor.window.HTMLElement ||
document instanceof adaptor.window.DocumentFragment) {
return true;
}
return false;
}
create(document, options) {
const adaptor = this.adaptor;
if (typeof document === 'string') {
document = adaptor.parse(document, 'text/html');
}
else if (document instanceof adaptor.window.HTMLElement ||
document instanceof adaptor.window.DocumentFragment) {
const child = document;
document = adaptor.parse('', 'text/html');
adaptor.append(adaptor.body(document), child);
}
return super.create(document, options);
}
}
//# sourceMappingURL=HTMLHandler.js.map
;// ./mjs/handlers/html.js
function RegisterHTMLHandler(adaptor) {
const handler = new HTMLHandler(adaptor);
mathjax.handlers.register(handler);
return handler;
}
//# sourceMappingURL=html.js.map
;// ./mjs/util/AsyncLoad.js
function asyncLoad(name) {
if (!mathjax.asyncLoad) {
return Promise.reject(`Can't load '${name}': No mathjax.asyncLoad method specified`);
}
return new Promise((ok, fail) => {
const result = mathjax.asyncLoad(name);
if (result instanceof Promise) {
result.then((value) => ok(value)).catch((err) => fail(err));
}
else {
ok(result);
}
});
}
//# sourceMappingURL=AsyncLoad.js.map
;// ./mjs/util/lengths.js
const BIGDIMEN = 1000000;
const UNITS = {
px: 1,
'in': 96,
cm: 96 / 2.54,
mm: 96 / 25.4
};
const RELUNITS = {
em: 1,
ex: .431,
pt: 1 / 10,
pc: 12 / 10,
mu: 1 / 18
};
const MATHSPACE = {
veryverythinmathspace: 1 / 18,
verythinmathspace: 2 / 18,
thinmathspace: 3 / 18,
mediummathspace: 4 / 18,
thickmathspace: 5 / 18,
verythickmathspace: 6 / 18,
veryverythickmathspace: 7 / 18,
negativeveryverythinmathspace: -1 / 18,
negativeverythinmathspace: -2 / 18,
negativethinmathspace: -3 / 18,
negativemediummathspace: -4 / 18,
negativethickmathspace: -5 / 18,
negativeverythickmathspace: -6 / 18,
negativeveryverythickmathspace: -7 / 18,
thin: .04,
medium: .06,
thick: .1,
normal: 1,
big: 2,
small: 1 / Math.sqrt(2),
infinity: BIGDIMEN
};
function length2em(length, size = 0, scale = 1, em = 16) {
if (typeof length !== 'string') {
length = String(length);
}
if (length === '' || length == null) {
return size;
}
if (MATHSPACE[length]) {
return MATHSPACE[length];
}
const match = length.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);
if (!match || match[0] === '') {
return size;
}
const m = parseFloat(match[1] || '1');
const unit = match[2];
if (Object.hasOwn(UNITS, unit)) {
return (m * UNITS[unit]) / em / scale;
}
if (Object.hasOwn(RELUNITS, unit)) {
return m * RELUNITS[unit];
}
if (unit === '%') {
return (m / 100) * size;
}
return m * size;
}
function percent(m) {
return (100 * m).toFixed(1).replace(/\.?0+$/, '') + '%';
}
function em(m) {
if (Math.abs(m) < 0.001)
return '0';
return m.toFixed(3).replace(/\.?0+$/, '') + 'em';
}
function px(m, M = -BIGDIMEN, em = 16) {
m *= em;
if (M && m < M)
m = M;
if (Math.abs(m) < 0.1)
return '0';
return m.toFixed(1).replace(/\.0$/, '') + 'px';
}
//# sourceMappingURL=lengths.js.map
;// ./mjs/util/BBox.js
class BBox {
static zero() {
return new BBox({ h: 0, d: 0, w: 0 });
}
static empty() {
return new BBox();
}
constructor(def = { w: 0, h: -BIGDIMEN, d: -BIGDIMEN }) {
this.w = def.w || 0;
this.h = 'h' in def ? def.h : -BIGDIMEN;
this.d = 'd' in def ? def.d : -BIGDIMEN;
this.L = this.R = this.ic = this.oc = this.sk = this.dx = 0;
this.scale = this.rscale = 1;
this.pwidth = '';
}
empty() {
this.w = 0;
this.h = this.d = -BIGDIMEN;
return this;
}
clean() {
if (this.w === -BIGDIMEN)
this.w = 0;
if (this.h === -BIGDIMEN)
this.h = 0;
if (this.d === -BIGDIMEN)
this.d = 0;
}
rescale(scale) {
this.w *= scale;
this.h *= scale;
this.d *= scale;
}
combine(cbox, x = 0, y = 0) {
const rscale = cbox.rscale;
const w = x + rscale * (cbox.w + cbox.L + cbox.R);
const h = y + rscale * cbox.h;
const d = rscale * cbox.d - y;
if (w > this.w)
this.w = w;
if (h > this.h)
this.h = h;
if (d > this.d)
this.d = d;
}
append(cbox) {
const scale = cbox.rscale;
this.w += scale * (cbox.w + cbox.L + cbox.R);
if (scale * cbox.h > this.h) {
this.h = scale * cbox.h;
}
if (scale * cbox.d > this.d) {
this.d = scale * cbox.d;
}
}
updateFrom(cbox) {
this.h = cbox.h;
this.d = cbox.d;
this.w = cbox.w;
if (cbox.pwidth) {
this.pwidth = cbox.pwidth;
}
}
copy() {
const bbox = new BBox();
Object.assign(bbox, this);
return bbox;
}
}
BBox.fullWidth = '100%';
BBox.boxSides = [
['Top', 0, 'h'],
['Right', 1, 'w'],
['Bottom', 2, 'd'],
['Left', 3, 'w'],
];
//# sourceMappingURL=BBox.js.map
;// ./mjs/util/Entities.js
const options = {
loadMissingEntities: true,
};
const entities = {
ApplyFunction: '\u2061',
Backslash: '\u2216',
Because: '\u2235',
Breve: '\u02D8',
Cap: '\u22D2',
CenterDot: '\u00B7',
CircleDot: '\u2299',
CircleMinus: '\u2296',
CirclePlus: '\u2295',
CircleTimes: '\u2297',
Congruent: '\u2261',
ContourIntegral: '\u222E',
Coproduct: '\u2210',
Cross: '\u2A2F',
Cup: '\u22D3',
CupCap: '\u224D',
Dagger: '\u2021',
Del: '\u2207',
Delta: '\u0394',
Diamond: '\u22C4',
DifferentialD: '\u2146',
DotEqual: '\u2250',
DoubleDot: '\u00A8',
DoubleRightTee: '\u22A8',
DoubleVerticalBar: '\u2225',
DownArrow: '\u2193',
DownLeftVector: '\u21BD',
DownRightVector: '\u21C1',
DownTee: '\u22A4',
Downarrow: '\u21D3',
Element: '\u2208',
EqualTilde: '\u2242',
Equilibrium: '\u21CC',
Exists: '\u2203',
ExponentialE: '\u2147',
FilledVerySmallSquare: '\u25AA',
ForAll: '\u2200',
Gamma: '\u0393',
Gg: '\u22D9',
GreaterEqual: '\u2265',
GreaterEqualLess: '\u22DB',
GreaterFullEqual: '\u2267',
GreaterLess: '\u2277',
GreaterSlantEqual: '\u2A7E',
GreaterTilde: '\u2273',
Hacek: '\u02C7',
Hat: '\u005E',
HumpDownHump: '\u224E',
HumpEqual: '\u224F',
Im: '\u2111',
ImaginaryI: '\u2148',
Integral: '\u222B',
Intersection: '\u22C2',
InvisibleComma: '\u2063',
InvisibleTimes: '\u2062',
Lambda: '\u039B',
Larr: '\u219E',
LeftAngleBracket: '\u27E8',
LeftArrow: '\u2190',
LeftArrowRightArrow: '\u21C6',
LeftCeiling: '\u2308',
LeftDownVector: '\u21C3',
LeftFloor: '\u230A',
LeftRightArrow: '\u2194',
LeftTee: '\u22A3',
LeftTriangle: '\u22B2',
LeftTriangleEqual: '\u22B4',
LeftUpVector: '\u21BF',
LeftVector: '\u21BC',
Leftarrow: '\u21D0',
Leftrightarrow: '\u21D4',
LessEqualGreater: '\u22DA',
LessFullEqual: '\u2266',
LessGreater: '\u2276',
LessSlantEqual: '\u2A7D',
LessTilde: '\u2272',
Ll: '\u22D8',
Lleftarrow: '\u21DA',
LongLeftArrow: '\u27F5',
LongLeftRightArrow: '\u27F7',
LongRightArrow: '\u27F6',
Longleftarrow: '\u27F8',
Longleftrightarrow: '\u27FA',
Longrightarrow: '\u27F9',
Lsh: '\u21B0',
MinusPlus: '\u2213',
NestedGreaterGreater: '\u226B',
NestedLessLess: '\u226A',
NotDoubleVerticalBar: '\u2226',
NotElement: '\u2209',
NotEqual: '\u2260',
NotExists: '\u2204',
NotGreater: '\u226F',
NotGreaterEqual: '\u2271',
NotLeftTriangle: '\u22EA',
NotLeftTriangleEqual: '\u22EC',
NotLess: '\u226E',
NotLessEqual: '\u2270',
NotPrecedes: '\u2280',
NotPrecedesSlantEqual: '\u22E0',
NotRightTriangle: '\u22EB',
NotRightTriangleEqual: '\u22ED',
NotSubsetEqual: '\u2288',
NotSucceeds: '\u2281',
NotSucceedsSlantEqual: '\u22E1',
NotSupersetEqual: '\u2289',
NotTilde: '\u2241',
NotVerticalBar: '\u2224',
Omega: '\u03A9',
OverBar: '\u203E',
OverBrace: '\u23DE',
PartialD: '\u2202',
Phi: '\u03A6',
Pi: '\u03A0',
PlusMinus: '\u00B1',
Precedes: '\u227A',
PrecedesEqual: '\u2AAF',
PrecedesSlantEqual: '\u227C',
PrecedesTilde: '\u227E',
Product: '\u220F',
Proportional: '\u221D',
Psi: '\u03A8',
Rarr: '\u21A0',
Re: '\u211C',
ReverseEquilibrium: '\u21CB',
RightAngleBracket: '\u27E9',
RightArrow: '\u2192',
RightArrowLeftArrow: '\u21C4',
RightCeiling: '\u2309',
RightDownVector: '\u21C2',
RightFloor: '\u230B',
RightTee: '\u22A2',
RightTeeArrow: '\u21A6',
RightTriangle: '\u22B3',
RightTriangleEqual: '\u22B5',
RightUpVector: '\u21BE',
RightVector: '\u21C0',
Rightarrow: '\u21D2',
Rrightarrow: '\u21DB',
Rsh: '\u21B1',
Sigma: '\u03A3',
SmallCircle: '\u2218',
Sqrt: '\u221A',
Square: '\u25A1',
SquareIntersection: '\u2293',
SquareSubset: '\u228F',
SquareSubsetEqual: '\u2291',
SquareSuperset: '\u2290',
SquareSupersetEqual: '\u2292',
SquareUnion: '\u2294',
Star: '\u22C6',
Subset: '\u22D0',
SubsetEqual: '\u2286',
Succeeds: '\u227B',
SucceedsEqual: '\u2AB0',
SucceedsSlantEqual: '\u227D',
SucceedsTilde: '\u227F',
SuchThat: '\u220B',
Sum: '\u2211',
Superset: '\u2283',
SupersetEqual: '\u2287',
Supset: '\u22D1',
Therefore: '\u2234',
Theta: '\u0398',
Tilde: '\u223C',
TildeEqual: '\u2243',
TildeFullEqual: '\u2245',
TildeTilde: '\u2248',
UnderBar: '\u005F',
UnderBrace: '\u23DF',
Union: '\u22C3',
UnionPlus: '\u228E',
UpArrow: '\u2191',
UpDownArrow: '\u2195',
UpTee: '\u22A5',
Uparrow: '\u21D1',
Updownarrow: '\u21D5',
Upsilon: '\u03A5',
Vdash: '\u22A9',
Vee: '\u22C1',
VerticalBar: '\u2223',
VerticalTilde: '\u2240',
Vvdash: '\u22AA',
Wedge: '\u22C0',
Xi: '\u039E',
amp: '\u0026',
acute: '\u00B4',
aleph: '\u2135',
alpha: '\u03B1',
amalg: '\u2A3F',
and: '\u2227',
ang: '\u2220',
angmsd: '\u2221',
angsph: '\u2222',
ape: '\u224A',
backprime: '\u2035',
backsim: '\u223D',
backsimeq: '\u22CD',
beta: '\u03B2',
beth: '\u2136',
between: '\u226C',
bigcirc: '\u25EF',
bigodot: '\u2A00',
bigoplus: '\u2A01',
bigotimes: '\u2A02',
bigsqcup: '\u2A06',
bigstar: '\u2605',
bigtriangledown: '\u25BD',
bigtriangleup: '\u25B3',
biguplus: '\u2A04',
blacklozenge: '\u29EB',
blacktriangle: '\u25B4',
blacktriangledown: '\u25BE',
blacktriangleleft: '\u25C2',
bowtie: '\u22C8',
boxdl: '\u2510',
boxdr: '\u250C',
boxminus: '\u229F',
boxplus: '\u229E',
boxtimes: '\u22A0',
boxul: '\u2518',
boxur: '\u2514',
bsol: '\u005C',
bull: '\u2022',
cap: '\u2229',
check: '\u2713',
chi: '\u03C7',
circ: '\u02C6',
circeq: '\u2257',
circlearrowleft: '\u21BA',
circlearrowright: '\u21BB',
circledR: '\u00AE',
circledS: '\u24C8',
circledast: '\u229B',
circledcirc: '\u229A',
circleddash: '\u229D',
clubs: '\u2663',
colon: '\u003A',
comp: '\u2201',
ctdot: '\u22EF',
cuepr: '\u22DE',
cuesc: '\u22DF',
cularr: '\u21B6',
cup: '\u222A',
curarr: '\u21B7',
curlyvee: '\u22CE',
curlywedge: '\u22CF',
dagger: '\u2020',
daleth: '\u2138',
ddarr: '\u21CA',
deg: '\u00B0',
delta: '\u03B4',
digamma: '\u03DD',
div: '\u00F7',
divideontimes: '\u22C7',
dot: '\u02D9',
doteqdot: '\u2251',
dotplus: '\u2214',
dotsquare: '\u22A1',
dtdot: '\u22F1',
ecir: '\u2256',
efDot: '\u2252',
egs: '\u2A96',
ell: '\u2113',
els: '\u2A95',
empty: '\u2205',
epsi: '\u03B5',
epsiv: '\u03F5',
erDot: '\u2253',
eta: '\u03B7',
eth: '\u00F0',
flat: '\u266D',
fork: '\u22D4',
frown: '\u2322',
gEl: '\u2A8C',
gamma: '\u03B3',
gap: '\u2A86',
gimel: '\u2137',
gnE: '\u2269',
gnap: '\u2A8A',
gne: '\u2A88',
gnsim: '\u22E7',
gt: '\u003E',
gtdot: '\u22D7',
harrw: '\u21AD',
hbar: '\u210F',
hellip: '\u2026',
hookleftarrow: '\u21A9',
hookrightarrow: '\u21AA',
imath: '\u0131',
infin: '\u221E',
intcal: '\u22BA',
iota: '\u03B9',
jmath: '\u0237',
kappa: '\u03BA',
kappav: '\u03F0',
lEg: '\u2A8B',
lambda: '\u03BB',
lap: '\u2A85',
larrlp: '\u21AB',
larrtl: '\u21A2',
lbrace: '\u007B',
lbrack: '\u005B',
le: '\u2264',
leftleftarrows: '\u21C7',
leftthreetimes: '\u22CB',
lessdot: '\u22D6',
lmoust: '\u23B0',
lnE: '\u2268',
lnap: '\u2A89',
lne: '\u2A87',
lnsim: '\u22E6',
longmapsto: '\u27FC',
looparrowright: '\u21AC',
lowast: '\u2217',
loz: '\u25CA',
lt: '\u003C',
ltimes: '\u22C9',
ltri: '\u25C3',
macr: '\u00AF',
malt: '\u2720',
mho: '\u2127',
mu: '\u03BC',
multimap: '\u22B8',
nLeftarrow: '\u21CD',
nLeftrightarrow: '\u21CE',
nRightarrow: '\u21CF',
nVDash: '\u22AF',
nVdash: '\u22AE',
natur: '\u266E',
nearr: '\u2197',
nharr: '\u21AE',
nlarr: '\u219A',
not: '\u00AC',
nrarr: '\u219B',
nu: '\u03BD',
nvDash: '\u22AD',
nvdash: '\u22AC',
nwarr: '\u2196',
omega: '\u03C9',
omicron: '\u03BF',
or: '\u2228',
osol: '\u2298',
period: '\u002E',
phi: '\u03C6',
phiv: '\u03D5',
pi: '\u03C0',
piv: '\u03D6',
prap: '\u2AB7',
precnapprox: '\u2AB9',
precneqq: '\u2AB5',
precnsim: '\u22E8',
prime: '\u2032',
psi: '\u03C8',
quot: '\u0022',
rarrtl: '\u21A3',
rbrace: '\u007D',
rbrack: '\u005D',
rho: '\u03C1',
rhov: '\u03F1',
rightrightarrows: '\u21C9',
rightthreetimes: '\u22CC',
ring: '\u02DA',
rmoust: '\u23B1',
rtimes: '\u22CA',
rtri: '\u25B9',
scap: '\u2AB8',
scnE: '\u2AB6',
scnap: '\u2ABA',
scnsim: '\u22E9',
sdot: '\u22C5',
searr: '\u2198',
sect: '\u00A7',
sharp: '\u266F',
sigma: '\u03C3',
sigmav: '\u03C2',
simne: '\u2246',
smile: '\u2323',
spades: '\u2660',
sub: '\u2282',
subE: '\u2AC5',
subnE: '\u2ACB',
subne: '\u228A',
supE: '\u2AC6',
supnE: '\u2ACC',
supne: '\u228B',
swarr: '\u2199',
tau: '\u03C4',
theta: '\u03B8',
thetav: '\u03D1',
tilde: '\u02DC',
times: '\u00D7',
triangle: '\u25B5',
triangleq: '\u225C',
upsi: '\u03C5',
upuparrows: '\u21C8',
veebar: '\u22BB',
vellip: '\u22EE',
weierp: '\u2118',
xi: '\u03BE',
yen: '\u00A5',
zeta: '\u03B6',
zigrarr: '\u21DD',
nbsp: '\u00A0',
rsquo: '\u2019',
lsquo: '\u2018',
};
const loaded = {};
function add(additions, file) {
Object.assign(entities, additions);
loaded[file] = true;
}
function remove(entity) {
delete entities[entity];
}
function translate(text) {
return text.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi, replace);
}
function replace(match, entity) {
if (entity.charAt(0) === '#') {
return numeric(entity.slice(1));
}
if (entities[entity]) {
return entities[entity];
}
if (options['loadMissingEntities']) {
const file = entity.match(/^[a-zA-Z](fr|scr|opf)$/)
? RegExp.$1
: entity.charAt(0).toLowerCase();
if (!loaded[file]) {
loaded[file] = true;
retryAfter(asyncLoad('./util/entities/' + file + '.js'));
}
}
return match;
}
function numeric(entity) {
const n = entity.charAt(0) === 'x' ? parseInt(entity.slice(1), 16) : parseInt(entity);
return String.fromCodePoint(n);
}
//# sourceMappingURL=Entities.js.map
;// ./mjs/util/StyleJson.js
class StyleJsonSheet {
get cssText() {
return this.getStyleString();
}
constructor(styles = null) {
this.styles = {};
this.addStyles(styles);
}
addStyles(styles) {
if (!styles)
return;
for (const style of Object.keys(styles)) {
if (!this.styles[style]) {
this.styles[style] = {};
}
Object.assign(this.styles[style], styles[style]);
}
}
removeStyles(...selectors) {
for (const selector of selectors) {
delete this.styles[selector];
}
}
clear() {
this.styles = {};
}
getStyleString() {
return this.getStyleRules().join('\n\n');
}
getStyleRules() {
const selectors = Object.keys(this.styles);
const defs = new Array(selectors.length);
let i = 0;
for (const selector of selectors) {
defs[i++] =
selector +
' {\n' +
this.getStyleDefString(this.styles[selector]) +
'\n}';
}
return defs;
}
getStyleDefString(styles) {
const properties = Object.keys(styles);
const values = new Array(properties.length);
let i = 0;
for (const property of properties) {
values[i++] = ' ' + property + ': ' + styles[property] + ';';
}
return values.join('\n');
}
}
//# sourceMappingURL=StyleJson.js.map
;// ./mjs/util/Styles.js
const TRBL = ['top', 'right', 'bottom', 'left'];
const WSC = ['width', 'style', 'color'];
function splitSpaces(text) {
const parts = text.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g);
const split = [];
while (parts.length > 1) {
parts.shift();
split.push(parts.shift());
}
return split;
}
function splitTRBL(name) {
const parts = splitSpaces(this.styles[name]);
if (parts.length === 0) {
parts.push('');
}
if (parts.length === 1) {
parts.push(parts[0]);
}
if (parts.length === 2) {
parts.push(parts[0]);
}
if (parts.length === 3) {
parts.push(parts[1]);
}
for (const child of Styles.connect[name].children) {
this.setStyle(this.childName(name, child), parts.shift());
}
}
function combineTRBL(name) {
const children = Styles.connect[name].children;
const parts = [];
for (const child of children) {
const part = this.styles[name + '-' + child];
if (!part) {
delete this.styles[name];
return;
}
parts.push(part);
}
if (parts[3] === parts[1]) {
parts.pop();
if (parts[2] === parts[0]) {
parts.pop();
if (parts[1] === parts[0]) {
parts.pop();
}
}
}
this.styles[name] = parts.join(' ');
}
function splitSame(name) {
for (const child of Styles.connect[name].children) {
this.setStyle(this.childName(name, child), this.styles[name]);
}
}
function combineSame(name) {
const children = [...Styles.connect[name].children];
const value = this.styles[this.childName(name, children.shift())];
for (const child of children) {
if (this.styles[this.childName(name, child)] !== value) {
delete this.styles[name];
return;
}
}
this.styles[name] = value;
}
const BORDER = {
width: /^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,
style: /^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/,
};
function splitWSC(name) {
const parts = { width: '', style: '', color: '' };
for (const part of splitSpaces(this.styles[name])) {
if (part.match(BORDER.width) && parts.width === '') {
parts.width = part;
}
else if (part.match(BORDER.style) && parts.style === '') {
parts.style = part;
}
else {
parts.color = part;
}
}
for (const child of Styles.connect[name].children) {
this.setStyle(this.childName(name, child), parts[child]);
}
}
function combineWSC(name) {
const parts = [];
for (const child of Styles.connect[name].children) {
const value = this.styles[this.childName(name, child)];
if (value) {
parts.push(value);
}
}
if (parts.length) {
this.styles[name] = parts.join(' ');
}
else {
delete this.styles[name];
}
}
const FONT = {
style: /^(?:normal|italic|oblique|inherit|initial|unset)$/,
variant: new RegExp('^(?:' +
[
'normal|none',
'inherit|initial|unset',
'common-ligatures|no-common-ligatures',
'discretionary-ligatures|no-discretionary-ligatures',
'historical-ligatures|no-historical-ligatures',
'contextual|no-contextual',
'(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)',
'small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps',
'lining-nums|oldstyle-nums|proportional-nums|tabular-nums',
'diagonal-fractions|stacked-fractions',
'ordinal|slashed-zero',
'jis78|jis83|jis90|jis04|simplified|traditional',
'full-width|proportional-width',
'ruby',
].join('|') +
')$'),
weight: /^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,
stretch: new RegExp('^(?:' +
[
'normal',
'(?:(?:ultra|extra|semi)-)?(?:condensed|expanded)',
'inherit|initial|unset',
].join('|') +
')$'),
size: new RegExp('^(?:' +
[
'xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller',
'[\\d.]+%|[\\d.]+[a-z]+',
'inherit|initial|unset',
].join('|') +
')' +
'(?:/(?:normal|[\\d.]+(?:%|[a-z]+)?))?$'),
};
function splitFont(name) {
const parts = splitSpaces(this.styles[name]);
const value = {
style: '',
variant: [],
weight: '',
stretch: '',
size: '',
family: '',
'line-height': '',
};
for (const part of parts) {
if (!value.family) {
value.family = part;
}
for (const name of Object.keys(FONT)) {
if ((Array.isArray(value[name]) || value[name] === '') &&
part.match(FONT[name])) {
if (value.family === part) {
value.family = '';
}
if (name === 'size') {
const [size, height] = part.split(/\//);
value[name] = size;
if (height) {
value['line-height'] = height;
}
}
else if (value.size === '') {
if (Array.isArray(value[name])) {
value[name].push(part);
}
else if (value[name] === '') {
value[name] = part;
}
}
}
}
}
saveFontParts.call(this, name, value);
delete this.styles[name];
}
function saveFontParts(name, value) {
for (const child of Styles.connect[name].children) {
const cname = this.childName(name, child);
if (Array.isArray(value[child])) {
const values = value[child];
if (values.length) {
this.styles[cname] = values.join(' ');
}
}
else if (value[child] !== '') {
this.styles[cname] = value[child];
}
}
}
function combineFont(_name) { }
class Styles {
constructor(cssText = '') {
this.parse(cssText);
}
sanitizeValue(text) {
const PATTERN = this.constructor.pattern;
if (!text.match(PATTERN.sanitize)) {
return text;
}
text = text.replace(PATTERN.value, '$1');
const test = text
.replace(/\\./g, '')
.replace(/(['"]).*?\1/g, '')
.replace(/[^'"]/g, '');
if (test.length) {
text += test.charAt(0);
}
return text;
}
get cssText() {
var _a, _b;
const styles = [];
for (const name of Object.keys(this.styles)) {
const parent = this.parentName(name);
const cname = name.replace(/.*-/, '');
if (!this.styles[parent] ||
!((_b = (_a = Styles.connect[parent]) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.includes(cname))) {
styles.push(`${name}: ${this.styles[name]};`);
}
}
return styles.join(' ');
}
get styleList() {
return Object.assign({}, this.styles);
}
set(name, value) {
var _a, _b;
name = this.normalizeName(name);
this.setStyle(name, String(value));
if (Styles.connect[name] && !Styles.connect[name].combine) {
this.combineChildren(name);
delete this.styles[name];
}
while (name.match(/-/)) {
const cname = name;
name = this.parentName(name);
if (!Styles.connect[cname] &&
!((_b = (_a = Styles.connect[name]) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.includes(cname.substring(name.length + 1)))) {
break;
}
Styles.connect[name].combine.call(this, name);
}
}
get(name) {
name = this.normalizeName(name);
return Object.hasOwn(this.styles, name) ? this.styles[name] : '';
}
setStyle(name, value) {
this.styles[name] = this.sanitizeValue(value);
if (Styles.connect[name] && Styles.connect[name].children) {
Styles.connect[name].split.call(this, name);
}
if (value === '') {
delete this.styles[name];
}
}
combineChildren(name) {
const parent = this.parentName(name);
for (const child of Styles.connect[name].children) {
const cname = this.childName(parent, child);
Styles.connect[cname].combine.call(this, cname);
}
}
parentName(name) {
const parent = name.replace(/-[^-]*$/, '');
return name === parent ? '' : parent;
}
childName(name, child) {
if (child.match(/-/)) {
return child;
}
if (Styles.connect[name] && !Styles.connect[name].combine) {
child += name.replace(/.*-/, '-');
name = this.parentName(name);
}
return name + '-' + child;
}
normalizeName(name) {
return name.replace(/[A-Z]/g, (c) => '-' + c.toLowerCase());
}
parse(cssText = '') {
const PATTERN = this.constructor.pattern;
this.styles = {};
const parts = cssText
.replace(/\n/g, ' ')
.replace(PATTERN.comment, '')
.split(PATTERN.style);
while (parts.length > 1) {
const [space, name, value] = parts.splice(0, 3);
if (space.match(/[^\s\n;]/))
return;
this.set(name, value);
}
}
}
Styles.pattern = {
sanitize: /['";]/,
value: /^((:?'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$).*/,
style: /([-a-z]+)[\s\n]*:[\s\n]*((?:'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$)/g,
comment: /\/\*[^]*?\*\//g,
};
Styles.connect = {
padding: {
children: TRBL,
split: splitTRBL,
combine: combineTRBL,
},
border: {
children: TRBL,
split: splitSame,
combine: combineSame,
},
'border-top': {
children: WSC,
split: splitWSC,
combine: combineWSC,
},
'border-right': {
children: WSC,
split: splitWSC,
combine: combineWSC,
},
'border-bottom': {
children: WSC,
split: splitWSC,
combine: combineWSC,
},
'border-left': {
children: WSC,
split: splitWSC,
combine: combineWSC,
},
'border-width': {
children: TRBL,
split: splitTRBL,
combine: null,
},
'border-style': {
children: TRBL,
split: splitTRBL,
combine: null,
},
'border-color': {
children: TRBL,
split: splitTRBL,
combine: null,
},
font: {
children: [
'style',
'variant',
'weight',
'stretch',
'line-height',
'size',
'family',
],
split: splitFont,
combine: combineFont,
},
};
//# sourceMappingURL=Styles.js.map
;// ./mjs/util/numeric.js
function sum(A) {
return A.reduce((a, b) => a + b, 0);
}
function max(A) {
return A.reduce((a, b) => Math.max(a, b), 0);
}
//# sourceMappingURL=numeric.js.map
;// ./components/mjs/core/lib/core.js
if (MathJax.loader) {
MathJax.loader.checkVersion('core', VERSION, 'core');
}
combineWithMathJax({_: {
adaptors: {
HTMLAdaptor: HTMLAdaptor_namespaceObject,
browserAdaptor: browserAdaptor_namespaceObject
},
components: {
global: global_namespaceObject
},
core: {
DOMAdaptor: DOMAdaptor_namespaceObject,
FindMath: FindMath_namespaceObject,
Handler: Handler_namespaceObject,
HandlerList: HandlerList_namespaceObject,
InputJax: InputJax_namespaceObject,
MathDocument: MathDocument_namespaceObject,
MathItem: MathItem_namespaceObject,
MathList: MathList_namespaceObject,
MmlTree: {
Attributes: Attributes_namespaceObject,
MML: MML_namespaceObject,
MathMLVisitor: MathMLVisitor_namespaceObject,
MmlFactory: MmlFactory_namespaceObject,
MmlNode: MmlNode_namespaceObject,
MmlNodes: {
HtmlNode: HtmlNode_namespaceObject,
TeXAtom: TeXAtom_namespaceObject,
maction: maction_namespaceObject,
maligngroup: maligngroup_namespaceObject,
malignmark: malignmark_namespaceObject,
math: math_namespaceObject,
mathchoice: mathchoice_namespaceObject,
menclose: menclose_namespaceObject,
merror: merror_namespaceObject,
mfenced: mfenced_namespaceObject,
mfrac: mfrac_namespaceObject,
mglyph: mglyph_namespaceObject,
mi: mi_namespaceObject,
mmultiscripts: mmultiscripts_namespaceObject,
mn: mn_namespaceObject,
mo: mo_namespaceObject,
mpadded: mpadded_namespaceObject,
mphantom: mphantom_namespaceObject,
mroot: mroot_namespaceObject,
mrow: mrow_namespaceObject,
ms: ms_namespaceObject,
mspace: mspace_namespaceObject,
msqrt: msqrt_namespaceObject,
mstyle: mstyle_namespaceObject,
msubsup: msubsup_namespaceObject,
mtable: mtable_namespaceObject,
mtd: mtd_namespaceObject,
mtext: mtext_namespaceObject,
mtr: mtr_namespaceObject,
munderover: munderover_namespaceObject,
semantics: semantics_namespaceObject
},
MmlVisitor: MmlVisitor_namespaceObject,
OperatorDictionary: OperatorDictionary_namespaceObject,
SerializedMmlVisitor: SerializedMmlVisitor_namespaceObject
},
OutputJax: OutputJax_namespaceObject,
Tree: {
Factory: Factory_namespaceObject,
Node: Node_namespaceObject,
NodeFactory: NodeFactory_namespaceObject,
Visitor: Visitor_namespaceObject,
Wrapper: Wrapper_namespaceObject,
WrapperFactory: WrapperFactory_namespaceObject
}
},
handlers: {
html_ts: html_namespaceObject,
html: {
HTMLDocument: HTMLDocument_namespaceObject,
HTMLDomStrings: HTMLDomStrings_namespaceObject,
HTMLHandler: HTMLHandler_namespaceObject,
HTMLMathItem: HTMLMathItem_namespaceObject,
HTMLMathList: HTMLMathList_namespaceObject
}
},
mathjax: mathjax_namespaceObject,
util: {
AsyncLoad: AsyncLoad_namespaceObject,
BBox: BBox_namespaceObject,
BitField: BitField_namespaceObject,
Entities: Entities_namespaceObject,
FunctionList: FunctionList_namespaceObject,
LinkedList: LinkedList_namespaceObject,
Options: Options_namespaceObject,
PrioritizedList: PrioritizedList_namespaceObject,
Retries: Retries_namespaceObject,
StyleJson: StyleJson_namespaceObject,
Styles: Styles_namespaceObject,
context: context_namespaceObject,
lengths: lengths_namespaceObject,
numeric: numeric_namespaceObject,
string: string_namespaceObject
}
}});
;// ./components/mjs/core/core.js
if (MathJax.startup) {
MathJax.startup.registerConstructor('HTMLHandler', HTMLHandler);
MathJax.startup.registerConstructor('browserAdaptor', browserAdaptor);
MathJax.startup.useHandler('HTMLHandler');
MathJax.startup.useAdaptor('browserAdaptor');
}
if (MathJax.loader) {
const config = MathJax.config.loader;
MathJax._.mathjax.mathjax.asyncLoad = (
(name) => name.substring(0, 5) === 'node:'
? config.require(name)
: MathJax.loader.load(name).then(result => result[0])
);
}
;// ./mjs/input/tex/FindTeX.js
class FindTeX extends AbstractFindMath {
constructor(options) {
super(options);
this.getPatterns();
}
getPatterns() {
const options = this.options;
const starts = [];
const parts = [];
const subparts = [];
this.end = {};
this.env = this.sub = 0;
let i = 1;
options['inlineMath'].forEach((delims) => this.addPattern(starts, delims, false));
options['displayMath'].forEach((delims) => this.addPattern(starts, delims, true));
if (starts.length) {
parts.push(starts.sort(sortLength).join('|'));
}
if (options['processEnvironments']) {
parts.push('\\\\begin\\s*\\{([^}]*)\\}');
this.env = i;
i++;
}
if (options['processEscapes']) {
subparts.push('\\\\([\\\\$])');
}
if (options['processRefs']) {
subparts.push('(\\\\(?:eq)?ref\\s*\\{[^}]*\\})');
}
if (subparts.length) {
parts.push('(' + subparts.join('|') + ')');
this.sub = i;
}
this.start = new RegExp(parts.join('|'), 'g');
this.hasPatterns = parts.length > 0;
}
addPattern(starts, delims, display) {
const [open, close] = delims;
starts.push(quotePattern(open));
this.end[open] = [close, display, this.endPattern(close)];
}
endPattern(end, endp) {
return new RegExp((endp || quotePattern(end)) + '|\\\\(?:[a-zA-Z]|.)|[{}]', 'g');
}
findEnd(text, n, start, end) {
const [close, display, pattern] = end;
const i = (pattern.lastIndex = start.index + start[0].length);
let match, braces = 0;
while ((match = pattern.exec(text))) {
if ((match[1] || match[0]) === close && braces === 0) {
return protoItem(start[0], text.substring(i, match.index), match[0], n, start.index, match.index + match[0].length, display);
}
else if (match[0] === '{') {
braces++;
}
else if (match[0] === '}' && braces) {
braces--;
}
}
return null;
}
findMathInString(math, n, text) {
let start, match;
this.start.lastIndex = 0;
while ((start = this.start.exec(text))) {
if (start[this.env] !== undefined && this.env) {
const end = '\\\\end\\s*(\\{' + quotePattern(start[this.env]) + '\\})';
match = this.findEnd(text, n, start, [
'{' + start[this.env] + '}',
true,
this.endPattern(null, end),
]);
if (match) {
match.math = match.open + match.math + match.close;
match.open = match.close = '';
}
}
else if (start[this.sub] !== undefined && this.sub) {
const math = start[this.sub];
const end = start.index + start[this.sub].length;
if (math.length === 2) {
match = protoItem('\\', math.substring(1), '', n, start.index, end);
}
else {
match = protoItem('', math, '', n, start.index, end, false);
}
}
else {
match = this.findEnd(text, n, start, this.end[start[0]]);
}
if (match) {
math.push(match);
this.start.lastIndex = match.end.n;
}
}
}
findMath(strings) {
const math = [];
if (this.hasPatterns) {
for (let i = 0, m = strings.length; i < m; i++) {
this.findMathInString(math, i, strings[i]);
}
}
return math;
}
}
FindTeX.OPTIONS = {
inlineMath: [
['\\(', '\\)']
],
displayMath: [
['$$', '$$'],
['\\[', '\\]']
],
processEscapes: true,
processEnvironments: true,
processRefs: true,
};
//# sourceMappingURL=FindTeX.js.map
;// ./mjs/input/tex/NodeUtil.js
const NodeUtil = {
attrs: new Set([
'autoOP',
'fnOP',
'movesupsub',
'subsupOK',
'texprimestyle',
'useHeight',
'variantForm',
'withDelims',
'mathaccent',
'open',
'close',
]),
createEntity(code) {
return String.fromCodePoint(parseInt(code, 16));
},
getChildren(node) {
return node.childNodes;
},
getText(node) {
return node.getText();
},
appendChildren(node, children) {
for (const child of children) {
node.appendChild(child);
}
},
setAttribute(node, attribute, value) {
node.attributes.set(attribute, value);
},
setProperty(node, property, value) {
node.setProperty(property, value);
},
setProperties(node, properties) {
for (const name of Object.keys(properties)) {
const value = properties[name];
if (name === 'texClass') {
node.texClass = value;
node.setProperty(name, value);
}
else if (name === 'movablelimits') {
node.setProperty('movablelimits', value);
if (node.isKind('mo') || node.isKind('mstyle')) {
node.attributes.set('movablelimits', value);
}
}
else if (name === 'inferred') {
}
else if (NodeUtil.attrs.has(name)) {
node.setProperty(name, value);
}
else {
node.attributes.set(name, value);
}
}
},
getProperty(node, property) {
return node.getProperty(property);
},
getAttribute(node, attr) {
return node.attributes.get(attr);
},
removeAttribute(node, attr) {
node.attributes.unset(attr);
},
removeProperties(node, ...properties) {
node.removeProperty(...properties);
},
getChildAt(node, position) {
return node.childNodes[position];
},
setChild(node, position, child) {
const children = node.childNodes;
children[position] = child;
if (child) {
child.parent = node;
}
},
copyChildren(oldNode, newNode) {
const children = oldNode.childNodes;
for (let i = 0; i < children.length; i++) {
this.setChild(newNode, i, children[i]);
}
},
copyAttributes(oldNode, newNode) {
newNode.attributes = oldNode.attributes;
this.setProperties(newNode, oldNode.getAllProperties());
},
isType(node, kind) {
return node.isKind(kind);
},
isEmbellished(node) {
return node.isEmbellished;
},
getTexClass(node) {
return node.texClass;
},
getCoreMO(node) {
return node.coreMO();
},
isNode(item) {
return (item instanceof AbstractMmlNode || item instanceof AbstractMmlEmptyNode);
},
isInferred(node) {
return node.isInferred;
},
getForm(node) {
if (!node.isKind('mo')) {
return null;
}
const mo = node;
const forms = mo.getForms();
for (const form of forms) {
const symbol = this.getOp(mo, form);
if (symbol) {
return symbol;
}
}
return null;
},
getOp(mo, form = 'infix') {
return MmlMo.OPTABLE[form][mo.getText()] || null;
},
getMoAttribute(mo, attr) {
var _a, _b;
if (!mo.attributes.isSet(attr)) {
for (const form of ['infix', 'postfix', 'prefix']) {
const value = (_b = (_a = this.getOp(mo, form)) === null || _a === void 0 ? void 0 : _a[3]) === null || _b === void 0 ? void 0 : _b[attr];
if (value !== undefined) {
return value;
}
}
}
return mo.attributes.get(attr);
},
};
/* harmony default export */ const tex_NodeUtil = (NodeUtil);
//# sourceMappingURL=NodeUtil.js.map
;// ./mjs/input/tex/FilterUtil.js
function _copyExplicit(attrs, node1, node2) {
const attr1 = node1.attributes;
const attr2 = node2.attributes;
attrs.forEach((x) => {
const attr = attr2.getExplicit(x);
if (attr != null) {
attr1.set(x, attr);
}
});
}
function _compareExplicit(node1, node2) {
const filter = (attr, space) => {
const exp = attr.getExplicitNames();
return exp.filter((x) => {
return (x !== space &&
(x !== 'stretchy' || attr.getExplicit('stretchy')) &&
x !== 'data-latex' &&
x !== 'data-latex-item');
});
};
const attr1 = node1.attributes;
const attr2 = node2.attributes;
const exp1 = filter(attr1, 'lspace');
const exp2 = filter(attr2, 'rspace');
if (exp1.length !== exp2.length) {
return false;
}
for (const name of exp1) {
if (attr1.getExplicit(name) !== attr2.getExplicit(name)) {
return false;
}
}
return true;
}
function _cleanSubSup(options, low, up) {
const remove = [];
for (const mml of options.getList('m' + low + up)) {
const children = mml.childNodes;
if (children[mml[low]] && children[mml[up]]) {
continue;
}
const parent = mml.parent;
const newNode = children[mml[low]]
? options.nodeFactory.create('node', 'm' + low, [
children[mml.base],
children[mml[low]],
])
: options.nodeFactory.create('node', 'm' + up, [
children[mml.base],
children[mml[up]],
]);
tex_NodeUtil.copyAttributes(mml, newNode);
parent.replaceChild(newNode, mml);
remove.push(mml);
}
options.removeFromList('m' + low + up, remove);
}
function _moveLimits(options, underover, subsup) {
const remove = [];
for (const mml of options.getList(underover)) {
if (mml.attributes.get('displaystyle')) {
continue;
}
const base = mml.childNodes[mml.base];
const mo = base.coreMO();
if (base.getProperty('movablelimits') &&
!mo.attributes.hasExplicit('movablelimits')) {
const node = options.nodeFactory.create('node', subsup, mml.childNodes);
tex_NodeUtil.copyAttributes(mml, node);
mml.parent.replaceChild(node, mml);
remove.push(mml);
}
}
options.removeFromList(underover, remove);
}
const FilterUtil = {
cleanStretchy(arg) {
const options = arg.data;
for (const mo of options.getList('fixStretchy')) {
if (tex_NodeUtil.getProperty(mo, 'fixStretchy')) {
const symbol = tex_NodeUtil.getForm(mo);
if (symbol && symbol[3] && symbol[3]['stretchy']) {
tex_NodeUtil.setAttribute(mo, 'stretchy', false);
}
const parent = mo.parent;
if (!tex_NodeUtil.getTexClass(mo) && (!symbol || !symbol[2])) {
const texAtom = options.nodeFactory.create('node', 'TeXAtom', [mo]);
parent.replaceChild(texAtom, mo);
texAtom.inheritAttributesFrom(mo);
}
tex_NodeUtil.removeProperties(mo, 'fixStretchy');
}
}
},
cleanAttributes(arg) {
const node = arg.data.root;
node.walkTree((mml, _d) => {
const attribs = mml.attributes;
const keep = new Set((attribs.get('mjx-keep-attrs') || '').split(/ /));
attribs.unset('mjx-keep-attrs');
for (const key of attribs.getExplicitNames()) {
if (!keep.has(key) &&
attribs.get(key) === mml.attributes.getInherited(key)) {
attribs.unset(key);
}
}
}, {});
},
combineRelations(arg) {
const remove = [];
for (const mo of arg.data.getList('mo')) {
if (mo.getProperty('relationsCombined') ||
!mo.parent ||
(mo.parent && !tex_NodeUtil.isType(mo.parent, 'mrow')) ||
tex_NodeUtil.getTexClass(mo) !== TEXCLASS.REL) {
continue;
}
const mml = mo.parent;
let m2;
const children = mml.childNodes;
const next = children.indexOf(mo) + 1;
const variantForm = tex_NodeUtil.getProperty(mo, 'variantForm');
while (next < children.length &&
(m2 = children[next]) &&
tex_NodeUtil.isType(m2, 'mo') &&
tex_NodeUtil.getTexClass(m2) === TEXCLASS.REL) {
if (variantForm === tex_NodeUtil.getProperty(m2, 'variantForm') &&
_compareExplicit(mo, m2)) {
tex_NodeUtil.appendChildren(mo, tex_NodeUtil.getChildren(m2));
_copyExplicit(['stretchy', 'rspace'], mo, m2);
for (const name of m2.getPropertyNames()) {
mo.setProperty(name, m2.getProperty(name));
}
if (m2.attributes.get('data-latex')) {
mo.attributes.set('data-latex', mo.attributes.get('data-latex') +
m2.attributes.get('data-latex'));
}
children.splice(next, 1);
remove.push(m2);
m2.parent = null;
m2.setProperty('relationsCombined', true);
mo.setProperty('texClass', TEXCLASS.REL);
}
else {
if (!mo.attributes.hasExplicit('rspace')) {
tex_NodeUtil.setAttribute(mo, 'rspace', '0pt');
}
if (!m2.attributes.hasExplicit('lspace')) {
tex_NodeUtil.setAttribute(m2, 'lspace', '0pt');
}
break;
}
}
mo.attributes.setInherited('form', mo.getForms()[0]);
}
arg.data.removeFromList('mo', remove);
},
cleanSubSup(arg) {
const options = arg.data;
if (options.error) {
return;
}
_cleanSubSup(options, 'sub', 'sup');
_cleanSubSup(options, 'under', 'over');
},
moveLimits(arg) {
const options = arg.data;
_moveLimits(options, 'munderover', 'msubsup');
_moveLimits(options, 'munder', 'msub');
_moveLimits(options, 'mover', 'msup');
},
setInherited(arg) {
arg.data.root.setInheritedAttributes({}, arg.math['display'], 0, false);
},
checkScriptlevel(arg) {
const options = arg.data;
const remove = [];
for (const mml of options.getList('mstyle')) {
if (mml.childNodes[0].childNodes.length !== 1) {
continue;
}
const attributes = mml.attributes;
for (const key of ['displaystyle', 'scriptlevel']) {
if (attributes.getExplicit(key) === attributes.getInherited(key)) {
attributes.unset(key);
}
}
const names = attributes.getExplicitNames();
if (names.filter((key) => key.substring(0, 10) !== 'data-latex').length ===
0) {
const child = mml.childNodes[0].childNodes[0];
names.forEach((key) => child.attributes.set(key, attributes.get(key)));
mml.parent.replaceChild(child, mml);
remove.push(mml);
}
}
options.removeFromList('mstyle', remove);
},
};
/* harmony default export */ const tex_FilterUtil = (FilterUtil);
//# sourceMappingURL=FilterUtil.js.map
;// ./mjs/input/tex/HandlerTypes.js
var ConfigurationType;
(function (ConfigurationType) {
ConfigurationType["HANDLER"] = "handler";
ConfigurationType["FALLBACK"] = "fallback";
ConfigurationType["ITEMS"] = "items";
ConfigurationType["TAGS"] = "tags";
ConfigurationType["OPTIONS"] = "options";
ConfigurationType["NODES"] = "nodes";
ConfigurationType["PREPROCESSORS"] = "preprocessors";
ConfigurationType["POSTPROCESSORS"] = "postprocessors";
ConfigurationType["INIT"] = "init";
ConfigurationType["CONFIG"] = "config";
ConfigurationType["PRIORITY"] = "priority";
ConfigurationType["PARSER"] = "parser";
})(ConfigurationType || (ConfigurationType = {}));
var HandlerType;
(function (HandlerType) {
HandlerType["DELIMITER"] = "delimiter";
HandlerType["MACRO"] = "macro";
HandlerType["CHARACTER"] = "character";
HandlerType["ENVIRONMENT"] = "environment";
})(HandlerType || (HandlerType = {}));
//# sourceMappingURL=HandlerTypes.js.map
;// ./mjs/input/tex/UnitUtil.js
class UnitMap {
constructor(map) {
this.num = '([-+]?([.,]\\d+|\\d+([.,]\\d*)?))';
this.unit = '';
this.dimenEnd = /./;
this.dimenRest = /./;
this.map = new Map(map);
this.updateDimen();
}
updateDimen() {
this.unit = `(${Array.from(this.map.keys()).join('|')})`;
this.dimenEnd = RegExp('^\\s*' + this.num + '\\s*' + this.unit + '\\s*$');
this.dimenRest = RegExp('^\\s*' + this.num + '\\s*' + this.unit + ' ?');
}
set(name, ems) {
this.map.set(name, ems);
this.updateDimen();
return this;
}
get(name) {
return this.map.get(name) || this.map.get('pt');
}
delete(name) {
if (this.map.delete(name)) {
this.updateDimen();
return true;
}
return false;
}
}
const emPerInch = 7.2;
const pxPerInch = 72;
function muReplace([value, unit, length]) {
if (unit !== 'mu') {
return [value, unit, length];
}
const em = UnitUtil.em(UnitUtil.UNIT_CASES.get(unit) * parseFloat(value));
return [em.slice(0, -2), 'em', length];
}
const UnitUtil = {
UNIT_CASES: new UnitMap([
['em', 1],
['ex', .43],
['pt', 1 / 10],
['pc', 1.2],
['px', emPerInch / pxPerInch],
['in', emPerInch],
['cm', emPerInch / 2.54],
['mm', emPerInch / 25.4],
['mu', 1 / 18],
]),
matchDimen(dim, rest = false) {
const match = dim.match(rest ? UnitUtil.UNIT_CASES.dimenRest : UnitUtil.UNIT_CASES.dimenEnd);
return match
? muReplace([match[1].replace(/,/, '.'), match[4], match[0].length])
: [null, null, 0];
},
dimen2em(dim) {
const [value, unit] = UnitUtil.matchDimen(dim);
const m = parseFloat(value || '1');
const factor = UnitUtil.UNIT_CASES.get(unit);
return factor * m;
},
em(m) {
if (Math.abs(m) < 0.0006) {
return '0em';
}
return m.toFixed(3).replace(/\.?0+$/, '') + 'em';
},
trimSpaces(text) {
if (typeof text !== 'string') {
return text;
}
let TEXT = text.trim();
if (TEXT.match(/\\$/) && text.match(/ $/)) {
TEXT += ' ';
}
return TEXT;
},
};
//# sourceMappingURL=UnitUtil.js.map
;// ./mjs/input/tex/Stack.js
class Stack {
constructor(_factory, _env, inner) {
this._factory = _factory;
this._env = _env;
this.global = {};
this.stack = [];
this.global = { isInner: inner };
this.stack = [this._factory.create('start', this.global)];
if (_env) {
this.stack[0].env = _env;
}
this.env = this.stack[0].env;
}
set env(env) {
this._env = env;
}
get env() {
return this._env;
}
Push(...args) {
for (const node of args) {
if (!node) {
continue;
}
const item = tex_NodeUtil.isNode(node)
? this._factory.create('mml', node)
: node;
item.global = this.global;
const [top, success] = this.stack.length
? this.Top().checkItem(item)
: [null, true];
if (!success) {
continue;
}
if (top) {
this.Pop();
this.Push(...top);
continue;
}
if (!item.isKind('null')) {
this.stack.push(item);
}
if (item.env) {
if (item.copyEnv) {
Object.assign(item.env, this.env);
}
this.env = item.env;
}
else {
item.env = this.env;
}
}
}
Pop() {
const item = this.stack.pop();
if (!item.isOpen) {
delete item.env;
}
this.env = this.stack.length ? this.Top().env : {};
return item;
}
Top(n = 1) {
return this.stack.length < n ? null : this.stack[this.stack.length - n];
}
Prev(noPop) {
const top = this.Top();
return noPop ? top.First : top.Pop();
}
get height() {
return this.stack.length;
}
toString() {
return 'stack[\n ' + this.stack.join('\n ') + '\n]';
}
}
//# sourceMappingURL=Stack.js.map
;// ./mjs/input/tex/TexError.js
class TexError {
static processString(str, args) {
const parts = str.split(TexError.pattern);
for (let i = 1, m = parts.length; i < m; i += 2) {
let c = parts[i].charAt(0);
if (c >= '0' && c <= '9') {
parts[i] = args[parseInt(parts[i], 10) - 1];
if (typeof parts[i] === 'number') {
parts[i] = parts[i].toString();
}
}
else if (c === '{') {
c = parts[i].substring(1);
if (c >= '0' && c <= '9') {
parts[i] =
args[parseInt(parts[i].substring(1, parts[i].length - 1), 10) - 1];
if (typeof parts[i] === 'number') {
parts[i] = parts[i].toString();
}
}
else {
const match = parts[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
if (match) {
parts[i] = '%' + parts[i];
}
}
}
}
return parts.join('');
}
constructor(id, message, ...rest) {
this.id = id;
this.message = TexError.processString(message, rest);
}
}
TexError.pattern = /%(\d+|\{\d+\}|\{[a-z]+:%\d+(?:\|(?:%\{\d+\}|%.|[^}])*)+\}|.)/g;
/* harmony default export */ const tex_TexError = (TexError);
//# sourceMappingURL=TexError.js.map
;// ./mjs/input/tex/StackItem.js
class MmlStack {
constructor(_nodes) {
this._nodes = _nodes;
this.startStr = '';
this.startI = 0;
this.stopI = 0;
}
get nodes() {
return this._nodes;
}
Push(...nodes) {
this._nodes.push(...nodes);
}
Pop() {
return this._nodes.pop();
}
get First() {
return this._nodes[this.Size() - 1];
}
set First(node) {
this._nodes[this.Size() - 1] = node;
}
get Last() {
return this._nodes[0];
}
set Last(node) {
this._nodes[0] = node;
}
Peek(n) {
if (n == null) {
n = 1;
}
return this._nodes.slice(this.Size() - n);
}
Size() {
return this._nodes.length;
}
Clear() {
this._nodes = [];
}
toMml(inferred = true, forceRow) {
if (this._nodes.length === 1 && !forceRow) {
return this.First;
}
return this.create('node', inferred ? 'inferredMrow' : 'mrow', this._nodes, {});
}
create(kind, ...rest) {
return this.factory.configuration.nodeFactory.create(kind, ...rest);
}
}
class BaseItem extends MmlStack {
constructor(factory, ...nodes) {
super(nodes);
this.factory = factory;
this.global = {};
this._properties = {};
if (this.isOpen) {
this._env = {};
}
}
get kind() {
return 'base';
}
get env() {
return this._env;
}
set env(value) {
this._env = value;
}
get copyEnv() {
return true;
}
getProperty(key) {
return this._properties[key];
}
setProperty(key, value) {
this._properties[key] = value;
return this;
}
get isOpen() {
return false;
}
get isClose() {
return false;
}
get isFinal() {
return false;
}
isKind(kind) {
return kind === this.kind;
}
checkItem(item) {
if (item.isKind('over') && this.isOpen) {
item.setProperty('num', this.toMml(false));
this.Clear();
}
if (item.isKind('cell') && this.isOpen) {
if (item.getProperty('linebreak')) {
return BaseItem.fail;
}
throw new tex_TexError('Misplaced', 'Misplaced %1', item.getName());
}
if (item.isClose && this.getErrors(item.kind)) {
const [id, message] = this.getErrors(item.kind);
throw new tex_TexError(id, message, item.getName());
}
if (!item.isFinal) {
return BaseItem.success;
}
this.Push(item.First);
return BaseItem.fail;
}
clearEnv() {
for (const id of Object.keys(this.env)) {
delete this.env[id];
}
}
setProperties(def) {
Object.assign(this._properties, def);
return this;
}
getName() {
return this.getProperty('name');
}
toString() {
return this.kind + '[' + this.nodes.join('; ') + ']';
}
getErrors(kind) {
const CLASS = this.constructor;
return CLASS.errors[kind] || BaseItem.errors[kind];
}
}
BaseItem.fail = [null, false];
BaseItem.success = [null, true];
BaseItem.errors = {
end: ['MissingBeginExtraEnd', 'Missing \\begin{%1} or extra \\end{%1}'],
close: ['ExtraCloseMissingOpen', 'Extra close brace or missing open brace'],
right: ['MissingLeftExtraRight', 'Missing \\left or extra \\right'],
middle: ['ExtraMiddle', 'Extra \\middle'],
};
//# sourceMappingURL=StackItem.js.map
;// ./mjs/input/tex/TexConstants.js
const TexConstant = {
Variant: {
NORMAL: 'normal',
BOLD: 'bold',
ITALIC: 'italic',
BOLDITALIC: 'bold-italic',
DOUBLESTRUCK: 'double-struck',
FRAKTUR: 'fraktur',
BOLDFRAKTUR: 'bold-fraktur',
SCRIPT: 'script',
BOLDSCRIPT: 'bold-script',
SANSSERIF: 'sans-serif',
BOLDSANSSERIF: 'bold-sans-serif',
SANSSERIFITALIC: 'sans-serif-italic',
SANSSERIFBOLDITALIC: 'sans-serif-bold-italic',
MONOSPACE: 'monospace',
INITIAL: 'inital',
TAILED: 'tailed',
LOOPED: 'looped',
STRETCHED: 'stretched',
CALLIGRAPHIC: '-tex-calligraphic',
BOLDCALLIGRAPHIC: '-tex-bold-calligraphic',
OLDSTYLE: '-tex-oldstyle',
BOLDOLDSTYLE: '-tex-bold-oldstyle',
MATHITALIC: '-tex-mathit',
},
Form: {
PREFIX: 'prefix',
INFIX: 'infix',
POSTFIX: 'postfix',
},
LineBreak: {
AUTO: 'auto',
NEWLINE: 'newline',
NOBREAK: 'nobreak',
GOODBREAK: 'goodbreak',
BADBREAK: 'badbreak',
},
LineBreakStyle: {
BEFORE: 'before',
AFTER: 'after',
DUPLICATE: 'duplicate',
INFIXLINBREAKSTYLE: 'infixlinebreakstyle',
},
IndentAlign: {
LEFT: 'left',
CENTER: 'center',
RIGHT: 'right',
AUTO: 'auto',
ID: 'id',
INDENTALIGN: 'indentalign',
},
IndentShift: {
INDENTSHIFT: 'indentshift',
},
LineThickness: {
THIN: 'thin',
MEDIUM: 'medium',
THICK: 'thick',
},
Notation: {
LONGDIV: 'longdiv',
ACTUARIAL: 'actuarial',
PHASORANGLE: 'phasorangle',
RADICAL: 'radical',
BOX: 'box',
ROUNDEDBOX: 'roundedbox',
CIRCLE: 'circle',
LEFT: 'left',
RIGHT: 'right',
TOP: 'top',
BOTTOM: 'bottom',
UPDIAGONALSTRIKE: 'updiagonalstrike',
DOWNDIAGONALSTRIKE: 'downdiagonalstrike',
VERTICALSTRIKE: 'verticalstrike',
HORIZONTALSTRIKE: 'horizontalstrike',
NORTHEASTARROW: 'northeastarrow',
MADRUWB: 'madruwb',
UPDIAGONALARROW: 'updiagonalarrow',
},
Align: {
TOP: 'top',
BOTTOM: 'bottom',
CENTER: 'center',
BASELINE: 'baseline',
AXIS: 'axis',
LEFT: 'left',
RIGHT: 'right',
},
Lines: {
NONE: 'none',
SOLID: 'solid',
DASHED: 'dashed',
},
Side: {
LEFT: 'left',
RIGHT: 'right',
LEFTOVERLAP: 'leftoverlap',
RIGHTOVERLAP: 'rightoverlap',
},
Width: {
AUTO: 'auto',
FIT: 'fit',
},
Actiontype: {
TOGGLE: 'toggle',
STATUSLINE: 'statusline',
TOOLTIP: 'tooltip',
INPUT: 'input',
},
Overflow: {
LINBREAK: 'linebreak',
SCROLL: 'scroll',
ELIDE: 'elide',
TRUNCATE: 'truncate',
SCALE: 'scale',
},
Unit: {
EM: 'em',
EX: 'ex',
PX: 'px',
IN: 'in',
CM: 'cm',
MM: 'mm',
PT: 'pt',
PC: 'pc',
},
Attr: {
LATEX: 'data-latex',
LATEXITEM: 'data-latex-item',
},
};
//# sourceMappingURL=TexConstants.js.map
;// ./mjs/input/tex/TexParser.js
class TexParser {
constructor(_string, env, configuration) {
this._string = _string;
this.configuration = configuration;
this.macroCount = 0;
this.i = 0;
this.currentCS = '';
this.saveI = 0;
const inner = Object.hasOwn(env, 'isInner');
const isInner = env['isInner'];
delete env['isInner'];
let ENV;
if (env) {
ENV = {};
for (const id of Object.keys(env)) {
ENV[id] = env[id];
}
}
this.configuration.pushParser(this);
this.stack = new Stack(this.itemFactory, ENV, inner ? isInner : true);
this.Parse();
this.Push(this.itemFactory.create('stop'));
this.updateResult(this.string, this.i);
this.stack.env = ENV;
}
get options() {
return this.configuration.options;
}
get itemFactory() {
return this.configuration.itemFactory;
}
get tags() {
return this.configuration.tags;
}
set string(str) {
this._string = str;
}
get string() {
return this._string;
}
parse(kind, input) {
const i = this.saveI;
this.saveI = this.i;
const result = this.configuration.handlers.get(kind).parse(input);
this.updateResult(input[1], i);
this.saveI = i;
return result;
}
lookup(kind, token) {
return this.configuration.handlers.get(kind).lookup(token);
}
contains(kind, token) {
return this.configuration.handlers.get(kind).contains(token);
}
toString() {
let str = '';
for (const config of Array.from(this.configuration.handlers.keys())) {
str +=
config +
': ' +
this.configuration.handlers.get(config) +
'\n';
}
return str;
}
Parse() {
let c;
while (this.i < this.string.length) {
c = this.getCodePoint();
this.i += c.length;
this.parse(HandlerType.CHARACTER, [this, c]);
}
}
Push(arg) {
if (arg instanceof BaseItem) {
arg.startI = this.saveI;
arg.stopI = this.i;
arg.startStr = this.string;
}
if (arg instanceof AbstractMmlNode && arg.isInferred) {
this.PushAll(arg.childNodes);
}
else {
this.stack.Push(arg);
}
}
PushAll(args) {
for (const arg of args) {
this.stack.Push(arg);
}
}
mml() {
if (!this.stack.Top().isKind('mml')) {
return null;
}
const node = this.stack.Top().First;
this.configuration.popParser();
node.attributes.set(TexConstant.Attr.LATEX, this.string);
return node;
}
convertDelimiter(c) {
var _a;
const token = this.lookup(HandlerType.DELIMITER, c);
return (_a = token === null || token === void 0 ? void 0 : token.char) !== null && _a !== void 0 ? _a : null;
}
getCodePoint() {
const code = this.string.codePointAt(this.i);
return code === undefined ? '' : String.fromCodePoint(code);
}
nextIsSpace() {
return !!this.string.charAt(this.i).match(/\s/);
}
GetNext() {
while (this.nextIsSpace()) {
this.i++;
}
return this.getCodePoint();
}
GetCS() {
const CS = this.string
.slice(this.i)
.match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);
if (CS) {
this.i += CS[0].length;
return CS[2] || CS[1];
}
else {
this.i++;
return ' ';
}
}
GetArgument(_name, noneOK = false) {
switch (this.GetNext()) {
case '':
if (!noneOK) {
throw new tex_TexError('MissingArgFor', 'Missing argument for %1', this.currentCS);
}
return null;
case '}':
if (!noneOK) {
throw new tex_TexError('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
return null;
case '\\':
this.i++;
return '\\' + this.GetCS();
case '{': {
const j = ++this.i;
let parens = 1;
while (this.i < this.string.length) {
switch (this.string.charAt(this.i++)) {
case '\\':
this.i++;
break;
case '{':
parens++;
break;
case '}':
if (--parens === 0) {
return this.string.slice(j, this.i - 1);
}
break;
}
}
throw new tex_TexError('MissingCloseBrace', 'Missing close brace');
}
}
const c = this.getCodePoint();
this.i += c.length;
return c;
}
GetBrackets(_name, def, matchBrackets = false) {
if (this.GetNext() !== '[') {
return def;
}
const j = ++this.i;
let braces = 0;
let brackets = 0;
while (this.i < this.string.length) {
switch (this.string.charAt(this.i++)) {
case '{':
braces++;
break;
case '\\':
this.i++;
break;
case '}':
if (braces-- <= 0) {
throw new tex_TexError('ExtraCloseLooking', 'Extra close brace while looking for %1', "']'");
}
break;
case '[':
if (braces === 0)
brackets++;
break;
case ']':
if (braces === 0) {
if (!matchBrackets || brackets === 0) {
return this.string.slice(j, this.i - 1);
}
brackets--;
}
break;
}
}
throw new tex_TexError('MissingCloseBracket', "Could not find closing ']' for argument to %1", this.currentCS);
}
GetDelimiter(name, braceOK = false) {
let c = this.GetNext();
this.i += c.length;
if (this.i <= this.string.length) {
if (c === '\\') {
c += this.GetCS();
}
else if (c === '{' && braceOK) {
this.i--;
c = this.GetArgument(name).trim();
}
if (this.contains(HandlerType.DELIMITER, c)) {
return this.convertDelimiter(c);
}
}
throw new tex_TexError('MissingOrUnrecognizedDelim', 'Missing or unrecognized delimiter for %1', this.currentCS);
}
GetDimen(name) {
if (this.GetNext() === '{') {
const dimen = this.GetArgument(name);
const [value, unit] = UnitUtil.matchDimen(dimen);
if (value) {
return value + unit;
}
}
else {
const dimen = this.string.slice(this.i);
const [value, unit, length] = UnitUtil.matchDimen(dimen, true);
if (value) {
this.i += length;
return value + unit;
}
}
throw new tex_TexError('MissingDimOrUnits', 'Missing dimension or its units for %1', this.currentCS);
}
GetUpTo(_name, token) {
while (this.nextIsSpace()) {
this.i++;
}
const j = this.i;
let braces = 0;
while (this.i < this.string.length) {
const k = this.i;
let c = this.GetNext();
this.i += c.length;
switch (c) {
case '\\':
c += this.GetCS();
break;
case '{':
braces++;
break;
case '}':
if (braces === 0) {
throw new tex_TexError('ExtraCloseLooking', 'Extra close brace while looking for %1', token);
}
braces--;
break;
}
if (braces === 0 && c === token) {
return this.string.slice(j, k);
}
}
throw new tex_TexError('TokenNotFoundForCommand', 'Could not find %1 for %2', token, this.currentCS);
}
ParseArg(name) {
return new TexParser(this.GetArgument(name), this.stack.env, this.configuration).mml();
}
ParseUpTo(name, token) {
return new TexParser(this.GetUpTo(name, token), this.stack.env, this.configuration).mml();
}
GetDelimiterArg(name) {
const c = UnitUtil.trimSpaces(this.GetArgument(name));
if (c === '') {
return null;
}
if (this.contains(HandlerType.DELIMITER, c)) {
return c;
}
throw new tex_TexError('MissingOrUnrecognizedDelim', 'Missing or unrecognized delimiter for %1', this.currentCS);
}
GetStar() {
const star = this.GetNext() === '*';
if (star) {
this.i++;
}
return star;
}
create(kind, ...rest) {
const node = this.configuration.nodeFactory.create(kind, ...rest);
if (node.isToken && node.attributes.hasExplicit('mathvariant')) {
if (node.attributes.get('mathvariant').charAt(0) === '-') {
node.setProperty('ignore-variant', true);
}
}
return node;
}
updateResult(input, old) {
const node = this.stack.Prev(true);
if (!node) {
return;
}
const existing = node.attributes.get(TexConstant.Attr.LATEXITEM);
if (existing !== undefined) {
node.attributes.set(TexConstant.Attr.LATEX, existing);
return;
}
old = old < this.saveI ? this.saveI : old;
let str = old !== this.i ? this.string.slice(old, this.i) : input;
str = str.trim();
if (!str) {
return;
}
if (input === '\\') {
str = '\\' + str;
}
if (node.attributes.get(TexConstant.Attr.LATEX) === '^' &&
str !== '^' &&
str !== '\\^') {
if (node.childNodes[2]) {
if (str === '}') {
this.composeBraces(node.childNodes[2]);
}
else {
node.childNodes[2].attributes.set(TexConstant.Attr.LATEX, str);
}
}
if (node.childNodes[1]) {
const sub = node.childNodes[1].attributes.get(TexConstant.Attr.LATEX);
this.composeLatex(node, `_${sub}^`, 0, 2);
}
else {
this.composeLatex(node, '^', 0, 2);
}
return;
}
if (node.attributes.get(TexConstant.Attr.LATEX) === '_' &&
str !== '_' &&
str !== '\\_') {
if (node.childNodes[1]) {
if (str === '}') {
this.composeBraces(node.childNodes[1]);
}
else {
node.childNodes[1].attributes.set(TexConstant.Attr.LATEX, str);
}
}
if (node.childNodes[2]) {
const sub = node.childNodes[2].attributes.get(TexConstant.Attr.LATEX);
this.composeLatex(node, `^${sub}_`, 0, 1);
}
else {
this.composeLatex(node, '_', 0, 1);
}
return;
}
if (str === '}') {
this.composeBraces(node);
return;
}
node.attributes.set(TexConstant.Attr.LATEX, str);
}
composeLatex(node, comp, pos1, pos2) {
if (!node.childNodes[pos1] || !node.childNodes[pos2])
return;
const expr = (node.childNodes[pos1].attributes.get(TexConstant.Attr.LATEX) || '') +
comp +
node.childNodes[pos2].attributes.get(TexConstant.Attr.LATEX);
node.attributes.set(TexConstant.Attr.LATEX, expr);
}
composeBraces(atom) {
const str = this.composeBracedContent(atom);
atom.attributes.set(TexConstant.Attr.LATEX, `{${str}}`);
}
composeBracedContent(atom) {
var _a, _b;
const children = ((_a = atom.childNodes[0]) === null || _a === void 0 ? void 0 : _a.childNodes) || [];
let expr = '';
for (const child of children) {
const att = (((_b = child === null || child === void 0 ? void 0 : child.attributes) === null || _b === void 0 ? void 0 : _b.get(TexConstant.Attr.LATEX)) ||
'');
if (!att)
continue;
expr +=
expr && expr.match(/[a-zA-Z]$/) && att.match(/^[a-zA-Z]/)
? ' ' + att
: att;
}
return expr;
}
}
//# sourceMappingURL=TexParser.js.map
;// ./mjs/input/tex/StackItemFactory.js
class DummyItem extends BaseItem {
}
class StackItemFactory extends AbstractFactory {
constructor() {
super(...arguments);
this.defaultKind = 'dummy';
this.configuration = null;
}
}
StackItemFactory.DefaultStackItems = {
[DummyItem.prototype.kind]: DummyItem,
};
/* harmony default export */ const tex_StackItemFactory = (StackItemFactory);
//# sourceMappingURL=StackItemFactory.js.map
;// ./mjs/input/tex/NodeFactory.js
class NodeFactory {
constructor() {
this.mmlFactory = null;
this.factory = {
node: NodeFactory.createNode,
token: NodeFactory.createToken,
text: NodeFactory.createText,
error: NodeFactory.createError,
};
}
static createNode(factory, kind, children = [], def = {}, text) {
const node = factory.mmlFactory.create(kind);
node.setChildren(children);
if (text) {
node.appendChild(text);
}
tex_NodeUtil.setProperties(node, def);
return node;
}
static createToken(factory, kind, def = {}, text = '') {
const textNode = factory.create('text', text);
return factory.create('node', kind, [], def, textNode);
}
static createText(factory, text) {
if (text == null) {
return null;
}
return factory.mmlFactory.create('text').setText(text);
}
static createError(factory, message) {
const text = factory.create('text', message);
const mtext = factory.create('node', 'mtext', [], {}, text);
const error = factory.create('node', 'merror', [mtext], {
'data-mjx-error': message,
});
return error;
}
setMmlFactory(mmlFactory) {
this.mmlFactory = mmlFactory;
}
set(kind, func) {
this.factory[kind] = func;
}
setCreators(maps) {
for (const kind in maps) {
this.set(kind, maps[kind]);
}
}
create(kind, ...rest) {
const func = this.factory[kind] || this.factory['node'];
const node = func(this, rest[0], ...rest.slice(1));
if (kind === 'node') {
this.configuration.addNode(rest[0], node);
}
return node;
}
get(kind) {
return this.factory[kind];
}
}
//# sourceMappingURL=NodeFactory.js.map
;// ./mjs/input/tex/ParseUtil.js
class KeyValueDef {
static oneof(...values) {
return new this('string', (value) => values.includes(value), (value) => value);
}
constructor(name, verify, convert) {
this.name = name;
this.verify = verify;
this.convert = convert;
}
}
const KeyValueTypes = {
boolean: new KeyValueDef('boolean', (value) => value === 'true' || value === 'false', (value) => value === 'true'),
number: new KeyValueDef('number', (value) => !!value.match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/), (value) => parseFloat(value)),
integer: new KeyValueDef('integer', (value) => !!value.match(/^[-+]?\d+$/), (value) => parseInt(value)),
string: new KeyValueDef('string', (_value) => true, (value) => value),
dimen: new KeyValueDef('dimen', (value) => UnitUtil.matchDimen(value)[0] !== null, (value) => value),
};
function readKeyval(text, l3keys = false) {
const options = {};
let rest = text;
let end, key, val;
let dropBrace = true;
while (rest) {
[key, end, rest] = readValue(rest, ['=', ','], l3keys, dropBrace);
dropBrace = false;
if (end === '=') {
[val, end, rest] = readValue(rest, [','], l3keys);
val = val === 'false' || val === 'true' ? JSON.parse(val) : val;
options[key] = val;
}
else if (key) {
options[key] = true;
}
}
return options;
}
function removeBraces(text, count) {
if (count === 0) {
return text
.replace(/^\s+/, '')
.replace(/([^\\\s]|^)((?:\\\\)*(?:\\\s)?)?\s+$/, '$1$2');
}
while (count > 0) {
text = text.trim().slice(1, -1);
count--;
}
return text;
}
function readValue(text, end, l3keys = false, dropBrace = false) {
const length = text.length;
let braces = 0;
let value = '';
let index = 0;
let start = 0;
let countBraces = true;
while (index < length) {
const c = text[index++];
switch (c) {
case '\\':
value += c + (text[index++] || '');
countBraces = false;
continue;
case ' ':
break;
case '{':
if (countBraces) {
start++;
}
braces++;
break;
case '}':
if (!braces) {
throw new tex_TexError('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
braces--;
countBraces = false;
break;
default:
if (!braces && end.includes(c)) {
return [
removeBraces(value, l3keys ? Math.min(1, start) : start),
c,
text.slice(index),
];
}
if (start > braces) {
start = braces;
}
countBraces = false;
}
value += c;
}
if (braces) {
throw new tex_TexError('ExtraOpenMissingClose', 'Extra open brace or missing close brace');
}
return dropBrace && start
? ['', '', removeBraces(value, 1)]
: [
removeBraces(value, l3keys ? Math.min(1, start) : start),
'',
text.slice(index),
];
}
const ParseUtil = {
cols(...W) {
return W.map((n) => UnitUtil.em(n)).join(' ');
},
fenced(configuration, open, mml, close, big = '', color = '') {
const nf = configuration.nodeFactory;
const mrow = nf.create('node', 'mrow', [], {
open: open,
close: close,
texClass: TEXCLASS.INNER,
});
let mo;
if (big) {
mo = new TexParser('\\' + big + 'l' + open, configuration.parser.stack.env, configuration).mml();
}
else {
const openNode = nf.create('text', open);
mo = nf.create('node', 'mo', [], {
fence: true,
stretchy: true,
symmetric: true,
texClass: TEXCLASS.OPEN,
}, openNode);
}
tex_NodeUtil.appendChildren(mrow, [mo, mml]);
if (big) {
mo = new TexParser('\\' + big + 'r' + close, configuration.parser.stack.env, configuration).mml();
}
else {
const closeNode = nf.create('text', close);
mo = nf.create('node', 'mo', [], {
fence: true,
stretchy: true,
symmetric: true,
texClass: TEXCLASS.CLOSE,
}, closeNode);
}
if (color) {
mo.attributes.set('mathcolor', color);
}
tex_NodeUtil.appendChildren(mrow, [mo]);
return mrow;
},
fixedFence(configuration, open, mml, close) {
const mrow = configuration.nodeFactory.create('node', 'mrow', [], {
open: open,
close: close,
texClass: TEXCLASS.ORD,
});
if (open) {
tex_NodeUtil.appendChildren(mrow, [
ParseUtil.mathPalette(configuration, open, 'l'),
]);
}
if (tex_NodeUtil.isType(mml, 'mrow')) {
tex_NodeUtil.appendChildren(mrow, tex_NodeUtil.getChildren(mml));
}
else {
tex_NodeUtil.appendChildren(mrow, [mml]);
}
if (close) {
tex_NodeUtil.appendChildren(mrow, [
ParseUtil.mathPalette(configuration, close, 'r'),
]);
}
return mrow;
},
mathPalette(configuration, fence, side) {
if (fence === '{' || fence === '}') {
fence = '\\' + fence;
}
const D = '{\\bigg' + side + ' ' + fence + '}';
const T = '{\\big' + side + ' ' + fence + '}';
return new TexParser('\\mathchoice' + D + T + T + T, {}, configuration).mml();
},
fixInitialMO(configuration, nodes) {
for (let i = 0, m = nodes.length; i < m; i++) {
const child = nodes[i];
if (child &&
!tex_NodeUtil.isType(child, 'mspace') &&
(!tex_NodeUtil.isType(child, 'TeXAtom') ||
(tex_NodeUtil.getChildren(child)[0] &&
tex_NodeUtil.getChildren(tex_NodeUtil.getChildren(child)[0]).length))) {
if (tex_NodeUtil.isEmbellished(child) ||
(tex_NodeUtil.isType(child, 'TeXAtom') &&
tex_NodeUtil.getTexClass(child) === TEXCLASS.REL)) {
const mi = configuration.nodeFactory.create('node', 'mi');
nodes.unshift(mi);
}
break;
}
}
},
internalMath(parser, text, level, font) {
text = text.replace(/ +/g, ' ');
if (parser.configuration.options.internalMath) {
return parser.configuration.options.internalMath(parser, text, level, font);
}
const mathvariant = font || parser.stack.env.font;
const def = mathvariant ? { mathvariant } : {};
let mml = [], i = 0, k = 0, c, node, match = '', braces = 0;
if (text.match(/\\?[${}\\]|\\\(|\\(?:eq)?ref\s*\{|\\U/)) {
while (i < text.length) {
c = text.charAt(i++);
if (c === '$') {
if (match === '$' && braces === 0) {
node = parser.create('node', 'TeXAtom', [
new TexParser(text.slice(k, i - 1), {}, parser.configuration).mml(),
]);
mml.push(node);
match = '';
k = i;
}
else if (match === '') {
if (k < i - 1) {
mml.push(ParseUtil.internalText(parser, text.slice(k, i - 1), def));
}
match = '$';
k = i;
}
}
else if (c === '{' && match !== '') {
braces++;
}
else if (c === '}') {
if (match === '}' && braces === 0) {
const atom = new TexParser(text.slice(k, i), {}, parser.configuration).mml();
node = parser.create('node', 'TeXAtom', [atom], def);
mml.push(node);
match = '';
k = i;
}
else if (match !== '') {
if (braces) {
braces--;
}
}
}
else if (c === '\\') {
if (match === '' && text.substring(i).match(/^(eq)?ref\s*\{/)) {
const len = RegExp['$&'].length;
if (k < i - 1) {
mml.push(ParseUtil.internalText(parser, text.slice(k, i - 1), def));
}
match = '}';
k = i - 1;
i += len;
}
else {
c = text.charAt(i++);
if (c === '(' && match === '') {
if (k < i - 2) {
mml.push(ParseUtil.internalText(parser, text.slice(k, i - 2), def));
}
match = ')';
k = i;
}
else if (c === ')' && match === ')' && braces === 0) {
node = parser.create('node', 'TeXAtom', [
new TexParser(text.slice(k, i - 2), {}, parser.configuration).mml(),
]);
mml.push(node);
match = '';
k = i;
}
else if (c.match(/[${}\\]/) && match === '') {
i--;
text = text.substring(0, i - 1) + text.substring(i);
}
else if (c === 'U') {
const arg = text
.substring(i)
.match(/^\s*(?:([0-9A-F])|\{\s*([0-9A-F]+)\s*\})/);
if (!arg) {
throw new tex_TexError('BadRawUnicode', 'Argument to %1 must a hexadecimal number with 1 to 6 digits', '\\U');
}
const c = String.fromCodePoint(parseInt(arg[1] || arg[2], 16));
text =
text.substring(0, i - 2) +
c +
text.substring(i + arg[0].length);
i = i - 2 + c.length;
}
}
}
}
if (match !== '') {
throw new tex_TexError('MathNotTerminated', 'Math mode is not properly terminated');
}
}
if (k < text.length) {
mml.push(ParseUtil.internalText(parser, text.slice(k), def));
}
if (level != null) {
mml = [
parser.create('node', 'mstyle', mml, {
displaystyle: false,
scriptlevel: level,
}),
];
}
else if (mml.length > 1) {
mml = [parser.create('node', 'mrow', mml)];
}
return mml;
},
internalText(parser, text, def) {
text = text
.replace(/\n+/g, ' ')
.replace(/^ +/, entities.nbsp)
.replace(/ +$/, entities.nbsp);
const textNode = parser.create('text', text);
return parser.create('node', 'mtext', [], def, textNode);
},
underOver(parser, base, script, pos, stack) {
ParseUtil.checkMovableLimits(base);
if (tex_NodeUtil.isType(base, 'munderover') && tex_NodeUtil.isEmbellished(base)) {
tex_NodeUtil.setProperties(tex_NodeUtil.getCoreMO(base), {
lspace: 0,
rspace: 0,
});
const mo = parser.create('node', 'mo', [], { rspace: 0 });
base = parser.create('node', 'mrow', [mo, base]);
}
const mml = parser.create('node', 'munderover', [base]);
tex_NodeUtil.setChild(mml, pos === 'over' ? mml.over : mml.under, script);
let node = mml;
if (stack) {
node = parser.create('node', 'TeXAtom', [
parser.create('node', 'mstyle', [mml], {
displaystyle: true,
scriptlevel: 0,
}),
], {
texClass: TEXCLASS.OP,
movesupsub: true,
});
}
tex_NodeUtil.setProperty(node, 'subsupOK', true);
return node;
},
checkMovableLimits(base) {
const symbol = tex_NodeUtil.isType(base, 'mo') ? tex_NodeUtil.getForm(base) : null;
if (tex_NodeUtil.getProperty(base, 'movablelimits') ||
(symbol && symbol[3] && symbol[3].movablelimits)) {
tex_NodeUtil.setProperties(base, { movablelimits: false });
}
},
setArrayAlign(array, align, parser) {
if (!parser) {
align = UnitUtil.trimSpaces(align || '');
}
if (align === 't') {
array.arraydef.align = 'baseline 1';
}
else if (align === 'b') {
array.arraydef.align = 'baseline -1';
}
else if (align === 'c') {
array.arraydef.align = 'axis';
}
else if (align) {
if (parser) {
parser.string = `[${align}]` + parser.string.slice(parser.i);
parser.i = 0;
}
else {
array.arraydef.align = align;
}
}
return array;
},
substituteArgs(parser, args, str) {
let text = '';
let newstring = '';
let i = 0;
while (i < str.length) {
let c = str.charAt(i++);
if (c === '\\') {
text += c + str.charAt(i++);
}
else if (c === '#') {
c = str.charAt(i++);
if (c === '#') {
text += c;
}
else {
if (!c.match(/[1-9]/) || parseInt(c, 10) > args.length) {
throw new tex_TexError('IllegalMacroParam', 'Illegal macro parameter reference');
}
newstring = ParseUtil.addArgs(parser, ParseUtil.addArgs(parser, newstring, text), args[parseInt(c, 10) - 1]);
text = '';
}
}
else {
text += c;
}
}
return ParseUtil.addArgs(parser, newstring, text);
},
addArgs(parser, s1, s2) {
if (s2.match(/^[a-z]/i) && s1.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)) {
s1 += ' ';
}
if (s1.length + s2.length > parser.configuration.options['maxBuffer']) {
throw new tex_TexError('MaxBufferSize', 'MathJax internal buffer size exceeded; is there a' +
' recursive macro call?');
}
return s1 + s2;
},
checkMaxMacros(parser, isMacro = true) {
if (++parser.macroCount <= parser.configuration.options['maxMacros']) {
return;
}
if (isMacro) {
throw new tex_TexError('MaxMacroSub1', 'MathJax maximum macro substitution count exceeded; ' +
'is here a recursive macro call?');
}
else {
throw new tex_TexError('MaxMacroSub2', 'MathJax maximum substitution count exceeded; ' +
'is there a recursive latex environment?');
}
},
checkEqnEnv(parser, nestable = true) {
const top = parser.stack.Top();
const first = top.First;
if ((top.getProperty('nestable') && nestable && !first) ||
top.getProperty('nestStart')) {
return;
}
if (!top.isKind('start') || first) {
throw new tex_TexError('ErroneousNestingEq', 'Erroneous nesting of equation structures');
}
},
copyNode(node, parser) {
const tree = node.copy();
const options = parser.configuration;
tree.walkTree((n) => {
options.addNode(n.kind, n);
const lists = (n.getProperty('in-lists') || '').split(/,/);
for (const list of lists) {
if (list) {
options.addNode(list, n);
}
}
});
return tree;
},
mmlFilterAttribute(_parser, _name, value) {
return value;
},
getFontDef(parser) {
const font = parser.stack.env['font'];
return font ? { mathvariant: font } : {};
},
keyvalOptions(attrib, allowed = null, error = false, l3keys = false) {
const def = readKeyval(attrib, l3keys);
if (allowed) {
for (const key of Object.keys(def)) {
if (Object.hasOwn(allowed, key)) {
if (allowed[key] instanceof KeyValueDef) {
const type = allowed[key];
const value = String(def[key]);
if (!type.verify(value)) {
throw new tex_TexError('InvalidValue', "Value for key '%1' is not of the expected type", key);
}
def[key] = type.convert(value);
}
}
else {
if (error) {
throw new tex_TexError('InvalidOption', 'Invalid option: %1', key);
}
delete def[key];
}
}
}
return def;
},
isLatinOrGreekChar(c) {
return !!c.normalize('NFD').match(/[a-zA-Z\u0370-\u03F0]/);
},
};
//# sourceMappingURL=ParseUtil.js.map
;// ./mjs/input/tex/ColumnParser.js
class ColumnParser {
constructor() {
this.columnHandler = {
l: (state) => (state.calign[state.j++] = 'left'),
c: (state) => (state.calign[state.j++] = 'center'),
r: (state) => (state.calign[state.j++] = 'right'),
p: (state) => this.getColumn(state, 'top'),
m: (state) => this.getColumn(state, 'middle'),
b: (state) => this.getColumn(state, 'bottom'),
w: (state) => this.getColumn(state, 'top', ''),
W: (state) => this.getColumn(state, 'top', ''),
'|': (state) => this.addRule(state, 'solid'),
':': (state) => this.addRule(state, 'dashed'),
'>': (state) => (state.cstart[state.j] =
(state.cstart[state.j] || '') + this.getBraces(state)),
'<': (state) => (state.cend[state.j - 1] =
(state.cend[state.j - 1] || '') + this.getBraces(state)),
'@': (state) => this.addAt(state, this.getBraces(state)),
'!': (state) => this.addBang(state, this.getBraces(state)),
'*': (state) => this.repeat(state),
P: (state) => this.macroColumn(state, '>{$}p{#1}<{$}', 1),
M: (state) => this.macroColumn(state, '>{$}m{#1}<{$}', 1),
B: (state) => this.macroColumn(state, '>{$}b{#1}<{$}', 1),
' ': (_state) => { },
};
this.MAXCOLUMNS = 10000;
}
process(parser, template, array) {
const state = {
parser,
template,
i: 0,
j: 0,
c: '',
cwidth: [],
calign: [],
cspace: [],
clines: [],
cstart: array.cstart,
cend: array.cend,
ralign: array.ralign,
cextra: array.cextra,
};
let n = 0;
while (state.i < state.template.length) {
if (n++ > this.MAXCOLUMNS) {
throw new tex_TexError('MaxColumns', 'Too many column specifiers (perhaps looping column definitions?)');
}
const code = state.template.codePointAt(state.i);
const c = (state.c = String.fromCodePoint(code));
state.i += c.length;
if (!Object.hasOwn(this.columnHandler, c)) {
throw new tex_TexError('BadPreamToken', 'Illegal pream-token (%1)', c);
}
this.columnHandler[c](state);
}
this.setColumnAlign(state, array);
this.setColumnWidths(state, array);
this.setColumnSpacing(state, array);
this.setColumnLines(state, array);
this.setPadding(state, array);
}
setColumnAlign(state, array) {
array.arraydef.columnalign = state.calign.join(' ');
}
setColumnWidths(state, array) {
if (!state.cwidth.length)
return;
const cwidth = [...state.cwidth];
if (cwidth.length < state.calign.length) {
cwidth.push('auto');
}
array.arraydef.columnwidth = cwidth.map((w) => w || 'auto').join(' ');
}
setColumnSpacing(state, array) {
if (!state.cspace.length)
return;
const cspace = [...state.cspace];
if (cspace.length < state.calign.length) {
cspace.push('1em');
}
array.arraydef.columnspacing = cspace
.slice(1)
.map((d) => d || '1em')
.join(' ');
}
setColumnLines(state, array) {
if (!state.clines.length)
return;
const clines = [...state.clines];
if (clines[0]) {
array.frame.push(['left', clines[0]]);
}
if (clines.length > state.calign.length) {
array.frame.push(['right', clines.pop()]);
}
else if (clines.length < state.calign.length) {
clines.push('none');
}
if (clines.length > 1) {
array.arraydef.columnlines = clines
.slice(1)
.map((l) => l || 'none')
.join(' ');
}
}
setPadding(state, array) {
if (!state.cextra[0] && !state.cextra[state.calign.length - 1])
return;
const i = state.calign.length - 1;
const cspace = state.cspace;
const space = !state.cextra[i] ? null : cspace[i];
array.arraydef['data-array-padding'] =
`${cspace[0] || '.5em'} ${space || '.5em'}`;
}
getColumn(state, ralign, calign = 'left') {
state.calign[state.j] = calign || this.getAlign(state);
state.cwidth[state.j] = this.getDimen(state);
state.ralign[state.j] = [
ralign,
state.cwidth[state.j],
state.calign[state.j],
];
state.j++;
}
getDimen(state) {
const dim = this.getBraces(state);
if (!UnitUtil.matchDimen(dim)[0]) {
throw new tex_TexError('MissingColumnDimOrUnits', 'Missing dimension or its units for %1 column declaration', state.c);
}
return dim;
}
getAlign(state) {
const align = this.getBraces(state);
return lookup(align.toLowerCase(), { l: 'left', c: 'center', r: 'right' }, '');
}
getBraces(state) {
while (state.template[state.i] === ' ')
state.i++;
if (state.i >= state.template.length) {
throw new tex_TexError('MissingArgForColumn', 'Missing argument for %1 column declaration', state.c);
}
if (state.template[state.i] !== '{') {
return state.template[state.i++];
}
const i = ++state.i;
let braces = 1;
while (state.i < state.template.length) {
switch (state.template.charAt(state.i++)) {
case '\\':
state.i++;
break;
case '{':
braces++;
break;
case '}':
if (--braces === 0) {
return state.template.slice(i, state.i - 1);
}
break;
}
}
throw new tex_TexError('MissingCloseBrace', 'Missing close brace');
}
macroColumn(state, macro, n) {
const args = [];
while (n > 0 && n--) {
args.push(this.getBraces(state));
}
state.template =
ParseUtil.substituteArgs(state.parser, args, macro) +
state.template.slice(state.i);
state.i = 0;
}
addRule(state, rule) {
if (state.clines[state.j]) {
this.addAt(state, '\\,');
}
state.clines[state.j] = rule;
if (state.cspace[state.j] === '0') {
state.cstart[state.j] = '\\hspace{.5em}';
}
}
addAt(state, macro) {
const { cstart, cspace, j } = state;
state.cextra[j] = true;
state.calign[j] = 'center';
if (state.clines[j]) {
if (cspace[j] === '.5em') {
cstart[j - 1] += '\\hspace{.25em}';
}
else if (!cspace[j]) {
state.cend[j - 1] = (state.cend[j - 1] || '') + '\\hspace{.5em}';
}
}
cstart[j] = macro;
cspace[j] = '0';
cspace[++state.j] = '0';
}
addBang(state, macro) {
const { cstart, cspace, j } = state;
state.cextra[j] = true;
state.calign[j] = 'center';
cstart[j] =
(cspace[j] === '0' && state.clines[j] ? '\\hspace{.25em}' : '') + macro;
if (!cspace[j]) {
cspace[j] = '.5em';
}
cspace[++state.j] = '.5em';
}
repeat(state) {
const num = this.getBraces(state);
const cols = this.getBraces(state);
const n = parseInt(num);
if (String(n) !== num) {
throw new tex_TexError('ColArgNotNum', 'First argument to %1 column specifier must be a number', '*');
}
state.template =
new Array(n).fill(cols).join('') + state.template.substring(state.i);
state.i = 0;
}
}
//# sourceMappingURL=ColumnParser.js.map
;// ./mjs/input/tex/ParseOptions.js
const MATHVARIANT = TexConstant.Variant;
class ParseOptions {
constructor(configuration, options = []) {
this.options = {};
this.columnParser = new ColumnParser();
this.packageData = new Map();
this.parsers = [];
this.root = null;
this.nodeLists = {};
this.error = false;
this.handlers = configuration.handlers;
this.nodeFactory = new NodeFactory();
this.nodeFactory.configuration = this;
this.nodeFactory.setCreators(configuration.nodes);
this.itemFactory = new tex_StackItemFactory(configuration.items);
this.itemFactory.configuration = this;
defaultOptions(this.options, ...options);
defaultOptions(this.options, configuration.options);
this.mathStyle =
ParseOptions.getVariant.get(this.options.mathStyle) ||
ParseOptions.getVariant.get('TeX');
}
pushParser(parser) {
this.parsers.unshift(parser);
}
popParser() {
this.parsers.shift();
}
get parser() {
return this.parsers[0];
}
clear() {
this.parsers = [];
this.root = null;
this.nodeLists = {};
this.error = false;
this.tags.resetTag();
}
addNode(property, node) {
let list = this.nodeLists[property];
if (!list) {
list = this.nodeLists[property] = [];
}
list.push(node);
if (node.kind !== property) {
const inlists = tex_NodeUtil.getProperty(node, 'in-lists') || '';
const lists = (inlists ? inlists.split(/,/) : [])
.concat(property)
.join(',');
tex_NodeUtil.setProperty(node, 'in-lists', lists);
}
}
getList(property) {
const list = this.nodeLists[property] || [];
const result = [];
for (const node of list) {
if (this.inTree(node)) {
result.push(node);
}
}
this.nodeLists[property] = result;
return result;
}
removeFromList(property, nodes) {
const list = this.nodeLists[property] || [];
for (const node of nodes) {
const i = list.indexOf(node);
if (i >= 0) {
list.splice(i, 1);
}
}
}
inTree(node) {
while (node && node !== this.root) {
node = node.parent;
}
return !!node;
}
}
ParseOptions.getVariant = new Map([
[
'TeX',
(c, b) => b ? (c.match(/^[\u0391-\u03A9\u03F4]/) ? MATHVARIANT.NORMAL : '') : '',
],
['ISO', (_c) => MATHVARIANT.ITALIC],
[
'French',
(c) => c.normalize('NFD').match(/^[a-z]/)
? MATHVARIANT.ITALIC
: MATHVARIANT.NORMAL,
],
['upright', (_c) => MATHVARIANT.NORMAL],
]);
/* harmony default export */ const tex_ParseOptions = (ParseOptions);
//# sourceMappingURL=ParseOptions.js.map
;// ./mjs/input/tex/Tags.js
class Label {
constructor(tag = '???', id = '') {
this.tag = tag;
this.id = id;
}
}
class TagInfo {
constructor(env = '', taggable = false, defaultTags = false, tag = null, tagId = '', tagFormat = '', noTag = false, labelId = '') {
this.env = env;
this.taggable = taggable;
this.defaultTags = defaultTags;
this.tag = tag;
this.tagId = tagId;
this.tagFormat = tagFormat;
this.noTag = noTag;
this.labelId = labelId;
}
}
class AbstractTags {
constructor() {
this.counter = 0;
this.allCounter = 0;
this.configuration = null;
this.ids = {};
this.allIds = {};
this.labels = {};
this.allLabels = {};
this.redo = false;
this.refUpdate = false;
this.currentTag = new TagInfo();
this.history = [];
this.stack = [];
this.enTag = function (node, tag) {
const nf = this.configuration.nodeFactory;
const cell = nf.create('node', 'mtd', [node]);
const row = nf.create('node', 'mlabeledtr', [tag, cell]);
const table = nf.create('node', 'mtable', [row], {
side: this.configuration.options['tagSide'],
minlabelspacing: this.configuration.options['tagIndent'],
displaystyle: true,
});
return table;
};
}
start(env, taggable, defaultTags) {
if (this.currentTag) {
this.stack.push(this.currentTag);
}
const label = this.label;
this.currentTag = new TagInfo(env, taggable, defaultTags);
this.label = label;
}
get env() {
return this.currentTag.env;
}
end() {
this.history.push(this.currentTag);
const label = this.label;
this.currentTag = this.stack.pop();
if (label && !this.label) {
this.label = label;
}
}
tag(tag, noFormat) {
this.currentTag.tag = tag;
this.currentTag.tagFormat = noFormat ? tag : this.formatTag(tag);
this.currentTag.noTag = false;
}
notag() {
this.tag('', true);
this.currentTag.noTag = true;
}
get noTag() {
return this.currentTag.noTag;
}
set label(label) {
this.currentTag.labelId = label;
}
get label() {
return this.currentTag.labelId;
}
formatUrl(id, base) {
return base + '#' + encodeURIComponent(id);
}
formatTag(tag) {
return '(' + tag + ')';
}
formatRef(tag) {
return this.formatTag(tag);
}
formatId(id) {
return 'mjx-eqn:' + id.replace(/\s/g, '_');
}
formatNumber(n) {
return n.toString();
}
autoTag() {
if (this.currentTag.tag == null) {
this.counter++;
this.tag(this.formatNumber(this.counter), false);
}
}
clearTag() {
this.tag(null, true);
this.currentTag.tagId = '';
}
getTag(force = false) {
if (force) {
this.autoTag();
return this.makeTag();
}
const ct = this.currentTag;
if (ct.taggable && !ct.noTag) {
if (ct.defaultTags) {
this.autoTag();
}
if (ct.tag) {
return this.makeTag();
}
}
return null;
}
resetTag() {
this.history = [];
this.redo = false;
this.refUpdate = false;
this.clearTag();
}
reset(offset = 0) {
this.resetTag();
this.counter = this.allCounter = offset;
this.allLabels = {};
this.allIds = {};
this.label = '';
}
startEquation(math) {
this.history = [];
this.stack = [];
this.clearTag();
this.currentTag = new TagInfo('', undefined, undefined);
this.labels = {};
this.ids = {};
this.counter = this.allCounter;
this.redo = false;
const recompile = math.inputData.recompile;
if (recompile) {
this.refUpdate = true;
this.counter = recompile.counter;
}
}
finishEquation(math) {
if (this.redo) {
math.inputData.recompile = {
state: math.state(),
counter: this.allCounter,
};
}
if (!this.refUpdate) {
this.allCounter = this.counter;
}
Object.assign(this.allIds, this.ids);
Object.assign(this.allLabels, this.labels);
}
finalize(node, env) {
if (!env.display || this.currentTag.env || this.currentTag.tag == null) {
return node;
}
const tag = this.makeTag();
const table = this.enTag(node, tag);
return table;
}
makeId() {
this.currentTag.tagId = this.formatId(this.configuration.options['useLabelIds']
? this.label || this.currentTag.tag
: this.currentTag.tag);
}
makeTag() {
this.makeId();
if (this.label) {
this.labels[this.label] = new Label(this.currentTag.tag, this.currentTag.tagId);
this.label = '';
}
const mml = new TexParser('\\text{' + this.currentTag.tagFormat + '}', {}, this.configuration).mml();
return this.configuration.nodeFactory.create('node', 'mtd', [mml], {
id: this.currentTag.tagId,
rowalign: this.configuration.options.tagAlign,
});
}
}
class NoTags extends AbstractTags {
autoTag() { }
getTag() {
return !this.currentTag.tag ? null : super.getTag();
}
}
class AllTags extends AbstractTags {
finalize(node, env) {
if (!env.display ||
this.history.find(function (x) {
return x.taggable;
})) {
return node;
}
const tag = this.getTag(true);
return this.enTag(node, tag);
}
}
const tagsMapping = new Map([
['none', NoTags],
['all', AllTags],
]);
let defaultTags = 'none';
const TagsFactory = {
OPTIONS: {
tags: defaultTags,
tagSide: 'right',
tagIndent: '0.8em',
useLabelIds: true,
ignoreDuplicateLabels: false,
tagAlign: 'baseline',
},
add(name, constr) {
tagsMapping.set(name, constr);
},
addTags(tags) {
for (const key of Object.keys(tags)) {
TagsFactory.add(key, tags[key]);
}
},
create(name) {
const constr = tagsMapping.get(name) || tagsMapping.get(defaultTags);
if (!constr) {
throw Error('Unknown tags class');
}
return new constr();
},
setDefault(name) {
defaultTags = name;
},
getDefault() {
return TagsFactory.create(defaultTags);
},
};
//# sourceMappingURL=Tags.js.map
;// ./mjs/input/tex/Token.js
class Token {
constructor(_token, _char, _attributes) {
this._token = _token;
this._char = _char;
this._attributes = _attributes;
}
get token() {
return this._token;
}
get char() {
return this._char;
}
get attributes() {
return this._attributes;
}
}
class Macro {
constructor(_token, _func, _args = []) {
this._token = _token;
this._func = _func;
this._args = _args;
}
get token() {
return this._token;
}
get func() {
return this._func;
}
get args() {
return this._args;
}
}
//# sourceMappingURL=Token.js.map
;// ./mjs/input/tex/TokenMap.js
function parseResult(result) {
return result === void 0 ? true : result;
}
class AbstractTokenMap {
constructor(_name, _parser) {
this._name = _name;
this._parser = _parser;
MapHandler.register(this);
}
get name() {
return this._name;
}
parserFor(token) {
return this.contains(token) ? this.parser : null;
}
parse([env, token]) {
const parser = this.parserFor(token);
const mapped = this.lookup(token);
return parser && mapped ? parseResult(parser(env, mapped)) : null;
}
set parser(parser) {
this._parser = parser;
}
get parser() {
return this._parser;
}
}
class RegExpMap extends AbstractTokenMap {
constructor(name, parser, _regExp) {
super(name, parser);
this._regExp = _regExp;
}
contains(token) {
return this._regExp.test(token);
}
lookup(token) {
return this.contains(token) ? token : null;
}
}
class AbstractParseMap extends AbstractTokenMap {
constructor() {
super(...arguments);
this.map = new Map();
}
lookup(token) {
return this.map.get(token);
}
contains(token) {
return this.map.has(token);
}
add(token, object) {
this.map.set(token, object);
}
remove(token) {
this.map.delete(token);
}
}
class CharacterMap extends AbstractParseMap {
constructor(name, parser, json) {
super(name, parser);
for (const key of Object.keys(json)) {
const value = json[key];
const [char, attrs] = typeof value === 'string' ? [value, null] : value;
const character = new Token(key, char, attrs);
this.add(key, character);
}
}
}
class DelimiterMap extends CharacterMap {
parse([env, token]) {
return super.parse([env, '\\' + token]);
}
}
class MacroMap extends AbstractParseMap {
constructor(name, json, functionMap = {}) {
super(name, null);
const getMethod = (func) => typeof func === 'string' ? functionMap[func] : func;
for (const [key, value] of Object.entries(json)) {
let func;
let args;
if (Array.isArray(value)) {
func = getMethod(value[0]);
args = value.slice(1);
}
else {
func = getMethod(value);
args = [];
}
const character = new Macro(key, func, args);
this.add(key, character);
}
}
parserFor(token) {
const macro = this.lookup(token);
return macro ? macro.func : null;
}
parse([env, token]) {
const macro = this.lookup(token);
const parser = this.parserFor(token);
if (!macro || !parser) {
return null;
}
return parseResult(parser(env, macro.token, ...macro.args));
}
}
class CommandMap extends MacroMap {
parse([env, token]) {
const macro = this.lookup(token);
const parser = this.parserFor(token);
if (!macro || !parser) {
return null;
}
const saveCommand = env.currentCS;
env.currentCS = '\\' + token;
const result = parser(env, '\\' + macro.token, ...macro.args);
env.currentCS = saveCommand;
return parseResult(result);
}
}
class EnvironmentMap extends MacroMap {
constructor(name, parser, json, functionMap = {}) {
super(name, json, functionMap);
this.parser = parser;
}
parse([env, token]) {
const macro = this.lookup(token);
const envParser = this.parserFor(token);
if (!macro || !envParser) {
return null;
}
return parseResult(this.parser(env, macro.token, envParser, macro.args));
}
}
//# sourceMappingURL=TokenMap.js.map
;// ./mjs/input/tex/MapHandler.js
const maps = new Map();
const MapHandler = {
register(map) {
maps.set(map.name, map);
},
getMap(name) {
return maps.get(name);
},
};
class SubHandler {
constructor() {
this._configuration = new PrioritizedList();
this._fallback = new FunctionList();
}
add(maps, fallback, priority = PrioritizedList.DEFAULTPRIORITY) {
for (const name of maps.slice().reverse()) {
const map = MapHandler.getMap(name);
if (!map) {
this.warn(`Configuration '${name}' not found! Omitted.`);
return;
}
this._configuration.add(map, priority);
}
if (fallback) {
this._fallback.add(fallback, priority);
}
}
remove(maps, fallback = null) {
for (const name of maps) {
const map = this.retrieve(name);
if (map) {
this._configuration.remove(map);
}
}
if (fallback) {
this._fallback.remove(fallback);
}
}
parse(input) {
for (const { item: map } of this._configuration) {
const result = map.parse(input);
if (result === SubHandler.FALLBACK) {
break;
}
if (result) {
return result;
}
}
const [env, token] = input;
Array.from(this._fallback)[0].item(env, token);
return;
}
lookup(token) {
const map = this.applicable(token);
return map ? map.lookup(token) : null;
}
contains(token) {
const map = this.applicable(token);
return (!!map && !(map instanceof CharacterMap && map.lookup(token).char === null));
}
toString() {
const names = [];
for (const { item: map } of this._configuration) {
names.push(map.name);
}
return names.join(', ');
}
applicable(token) {
for (const { item: map } of this._configuration) {
if (map.contains(token)) {
return map;
}
}
return null;
}
retrieve(name) {
for (const { item: map } of this._configuration) {
if (map.name === name) {
return map;
}
}
return null;
}
warn(message) {
console.log('TexParser Warning: ' + message);
}
}
SubHandler.FALLBACK = Symbol('fallback');
class SubHandlers {
constructor() {
this.map = new Map();
}
add(handlers, fallbacks, priority = PrioritizedList.DEFAULTPRIORITY) {
for (const key of Object.keys(handlers)) {
const name = key;
let subHandler = this.get(name);
if (!subHandler) {
subHandler = new SubHandler();
this.set(name, subHandler);
}
subHandler.add(handlers[name], fallbacks[name], priority);
}
}
remove(handlers, fallbacks) {
for (const name of Object.keys(handlers)) {
const subHandler = this.get(name);
if (subHandler) {
subHandler.remove(handlers[name], fallbacks[name]);
}
}
}
set(name, subHandler) {
this.map.set(name, subHandler);
}
get(name) {
return this.map.get(name);
}
retrieve(name) {
for (const handler of this.map.values()) {
const map = handler.retrieve(name);
if (map) {
return map;
}
}
return null;
}
keys() {
return this.map.keys();
}
}
//# sourceMappingURL=MapHandler.js.map
;// ./mjs/input/tex/Configuration.js
class Configuration {
static makeProcessor(func, priority) {
return Array.isArray(func) ? func : [func, priority];
}
static _create(name, config = {}) {
var _a;
const priority = (_a = config.priority) !== null && _a !== void 0 ? _a : PrioritizedList.DEFAULTPRIORITY;
const init = config.init ? this.makeProcessor(config.init, priority) : null;
const conf = config.config
? this.makeProcessor(config.config, priority)
: null;
const preprocessors = (config.preprocessors || []).map((pre) => this.makeProcessor(pre, priority));
const postprocessors = (config.postprocessors || []).map((post) => this.makeProcessor(post, priority));
const parser = config.parser || 'tex';
return new Configuration(name, config[ConfigurationType.HANDLER] || {}, config[ConfigurationType.FALLBACK] || {}, config[ConfigurationType.ITEMS] || {}, config[ConfigurationType.TAGS] || {}, config[ConfigurationType.OPTIONS] || {}, config[ConfigurationType.NODES] || {}, preprocessors, postprocessors, init, conf, priority, parser);
}
static create(name, config = {}) {
const configuration = Configuration._create(name, config);
ConfigurationHandler.set(name, configuration);
return configuration;
}
static local(config = {}) {
return Configuration._create('', config);
}
constructor(name, handler = {}, fallback = {}, items = {}, tags = {}, options = {}, nodes = {}, preprocessors = [], postprocessors = [], initMethod = null, configMethod = null, priority, parser) {
this.name = name;
this.handler = handler;
this.fallback = fallback;
this.items = items;
this.tags = tags;
this.options = options;
this.nodes = nodes;
this.preprocessors = preprocessors;
this.postprocessors = postprocessors;
this.initMethod = initMethod;
this.configMethod = configMethod;
this.priority = priority;
this.parser = parser;
this.handler = Object.assign({
[HandlerType.CHARACTER]: [],
[HandlerType.DELIMITER]: [],
[HandlerType.MACRO]: [],
[HandlerType.ENVIRONMENT]: [],
}, handler);
}
get init() {
return this.initMethod ? this.initMethod[0] : null;
}
get config() {
return this.configMethod ? this.configMethod[0] : null;
}
}
const Configuration_maps = new Map();
const ConfigurationHandler = {
set(name, map) {
Configuration_maps.set(name, map);
},
get(name) {
return Configuration_maps.get(name);
},
keys() {
return Configuration_maps.keys();
},
};
class ParserConfiguration {
constructor(packages, parsers = ['tex']) {
this.initMethod = new FunctionList();
this.configMethod = new FunctionList();
this.configurations = new PrioritizedList();
this.parsers = [];
this.handlers = new SubHandlers();
this.items = {};
this.tags = {};
this.options = {};
this.nodes = {};
this.parsers = parsers;
for (const pkg of packages.slice().reverse()) {
this.addPackage(pkg);
}
for (const { item: config, priority: priority } of this.configurations) {
this.append(config, priority);
}
}
init() {
this.initMethod.execute(this);
}
config(jax) {
this.configMethod.execute(this, jax);
for (const config of this.configurations) {
this.addFilters(jax, config.item);
}
}
addPackage(pkg) {
const name = typeof pkg === 'string' ? pkg : pkg[0];
const conf = this.getPackage(name);
if (conf) {
this.configurations.add(conf, typeof pkg === 'string' ? conf.priority : pkg[1]);
}
}
add(name, jax, options = {}) {
const config = this.getPackage(name);
this.append(config);
this.configurations.add(config, config.priority);
this.init();
const parser = jax.parseOptions;
parser.nodeFactory.setCreators(config.nodes);
for (const kind of Object.keys(config.items)) {
parser.itemFactory.setNodeClass(kind, config.items[kind]);
}
TagsFactory.addTags(config.tags);
defaultOptions(parser.options, config.options);
userOptions(parser.options, options);
this.addFilters(jax, config);
if (config.config) {
config.config(this, jax);
}
}
getPackage(name) {
const config = ConfigurationHandler.get(name);
if (config && !this.parsers.includes(config.parser)) {
throw Error(`Package '${name}' doesn't target the proper parser`);
}
if (!config) {
this.warn(`Package '${name}' not found. Omitted.`);
}
return config;
}
append(config, priority) {
priority = priority || config.priority;
if (config.initMethod) {
this.initMethod.add(config.initMethod[0], config.initMethod[1]);
}
if (config.configMethod) {
this.configMethod.add(config.configMethod[0], config.configMethod[1]);
}
this.handlers.add(config.handler, config.fallback, priority);
Object.assign(this.items, config.items);
Object.assign(this.tags, config.tags);
defaultOptions(this.options, config.options);
Object.assign(this.nodes, config.nodes);
}
addFilters(jax, config) {
for (const [pre, priority] of config.preprocessors) {
jax.preFilters.add(pre, priority);
}
for (const [post, priority] of config.postprocessors) {
jax.postFilters.add(post, priority);
}
}
warn(message) {
console.warn('MathJax Warning: ' + message);
}
}
//# sourceMappingURL=Configuration.js.map
;// ./mjs/input/tex/base/BaseItems.js
class StartItem extends BaseItem {
constructor(factory, global) {
super(factory);
this.global = global;
}
get kind() {
return 'start';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('stop')) {
let node = this.toMml();
if (!this.global.isInner) {
node = this.factory.configuration.tags.finalize(node, this.env);
}
return [[this.factory.create('mml', node)], true];
}
return super.checkItem(item);
}
}
class StopItem extends BaseItem {
get kind() {
return 'stop';
}
get isClose() {
return true;
}
}
class OpenItem extends BaseItem {
get kind() {
return 'open';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('close')) {
const mml = this.toMml();
const node = this.create('node', 'TeXAtom', [mml]);
addLatexItem(node, item);
return [[this.factory.create('mml', node)], true];
}
return super.checkItem(item);
}
}
OpenItem.errors = Object.assign(Object.create(BaseItem.errors), {
stop: ['ExtraOpenMissingClose', 'Extra open brace or missing close brace'],
});
class CloseItem extends BaseItem {
get kind() {
return 'close';
}
get isClose() {
return true;
}
}
class NullItem extends BaseItem {
get kind() {
return 'null';
}
}
class PrimeItem extends BaseItem {
get kind() {
return 'prime';
}
checkItem(item) {
const [top0, top1] = this.Peek(2);
const isSup = (tex_NodeUtil.isType(top0, 'msubsup') || tex_NodeUtil.isType(top0, 'msup')) &&
!tex_NodeUtil.getChildAt(top0, top0.sup);
const isOver = (tex_NodeUtil.isType(top0, 'munderover') || tex_NodeUtil.isType(top0, 'mover')) &&
!tex_NodeUtil.getChildAt(top0, top0.over) &&
!tex_NodeUtil.getProperty(top0, 'subsupOK');
if (!isSup && !isOver) {
const node = this.create('node', top0.getProperty('movesupsub') ? 'mover' : 'msup', [top0, top1]);
return [[node, item], true];
}
const pos = isSup ? top0.sup : top0.over;
tex_NodeUtil.setChild(top0, pos, top1);
return [[top0, item], true];
}
}
class SubsupItem extends BaseItem {
get kind() {
return 'subsup';
}
checkItem(item) {
if (item.isKind('open') || item.isKind('left')) {
return BaseItem.success;
}
const top = this.First;
const position = this.getProperty('position');
if (item.isKind('mml')) {
if (this.getProperty('primes')) {
if (position !== 2) {
tex_NodeUtil.setChild(top, 2, this.getProperty('primes'));
}
else {
tex_NodeUtil.setProperty(this.getProperty('primes'), 'variantForm', true);
const node = this.create('node', 'mrow', [
this.getProperty('primes'),
item.First,
]);
item.First = node;
}
}
tex_NodeUtil.setChild(top, position, item.First);
if (this.getProperty('movesupsub') != null) {
tex_NodeUtil.setProperty(top, 'movesupsub', this.getProperty('movesupsub'));
}
const result = this.factory.create('mml', top);
return [[result], true];
}
super.checkItem(item);
const error = this.getErrors(['', 'sub', 'sup'][position]);
throw new tex_TexError(error[0], error[1], ...error.splice(2));
}
}
SubsupItem.errors = Object.assign(Object.create(BaseItem.errors), {
stop: ['MissingScript', 'Missing superscript or subscript argument'],
sup: ['MissingOpenForSup', 'Missing open brace for superscript'],
sub: ['MissingOpenForSub', 'Missing open brace for subscript'],
});
class OverItem extends BaseItem {
constructor(factory) {
super(factory);
this.setProperty('name', '\\over');
}
get kind() {
return 'over';
}
get isClose() {
return true;
}
checkItem(item) {
if (item.isKind('over')) {
throw new tex_TexError('AmbiguousUseOf', 'Ambiguous use of %1', item.getName());
}
if (item.isClose) {
let mml = this.create('node', 'mfrac', [
this.getProperty('num'),
this.toMml(false),
]);
if (this.getProperty('thickness') != null) {
tex_NodeUtil.setAttribute(mml, 'linethickness', this.getProperty('thickness'));
}
if (this.getProperty('ldelim') || this.getProperty('rdelim')) {
tex_NodeUtil.setProperty(mml, 'withDelims', true);
mml = ParseUtil.fixedFence(this.factory.configuration, this.getProperty('ldelim'), mml, this.getProperty('rdelim'));
}
mml.attributes.set(TexConstant.Attr.LATEXITEM, this.getProperty('name'));
return [[this.factory.create('mml', mml), item], true];
}
return super.checkItem(item);
}
toString() {
return ('over[' + this.getProperty('num') + ' / ' + this.nodes.join('; ') + ']');
}
}
class LeftItem extends BaseItem {
constructor(factory, delim) {
super(factory);
this.setProperty('delim', delim);
}
get kind() {
return 'left';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('right')) {
const fenced = ParseUtil.fenced(this.factory.configuration, this.getProperty('delim'), this.toMml(), item.getProperty('delim'), '', item.getProperty('color'));
const left = fenced.childNodes[0];
const right = fenced.childNodes[fenced.childNodes.length - 1];
const mrow = this.factory.create('mml', fenced);
addLatexItem(left, this, '\\left');
addLatexItem(right, item, '\\right');
mrow
.Peek()[0]
.attributes.set(TexConstant.Attr.LATEXITEM, '\\left' + item.startStr.slice(this.startI, item.stopI));
return [[mrow], true];
}
if (item.isKind('middle')) {
const def = { stretchy: true };
if (item.getProperty('color')) {
def.mathcolor = item.getProperty('color');
}
const middle = this.create('token', 'mo', def, item.getProperty('delim'));
addLatexItem(middle, item, '\\middle');
this.Push(this.create('node', 'TeXAtom', [], { texClass: TEXCLASS.CLOSE }), middle, this.create('node', 'TeXAtom', [], { texClass: TEXCLASS.OPEN }));
this.env = {};
return [[this], true];
}
return super.checkItem(item);
}
}
LeftItem.errors = Object.assign(Object.create(BaseItem.errors), {
stop: ['ExtraLeftMissingRight', 'Extra \\left or missing \\right'],
});
class Middle extends BaseItem {
constructor(factory, delim, color) {
super(factory);
this.setProperty('delim', delim);
if (color) {
this.setProperty('color', color);
}
}
get kind() {
return 'middle';
}
get isClose() {
return true;
}
}
class RightItem extends BaseItem {
constructor(factory, delim, color) {
super(factory);
this.setProperty('delim', delim);
if (color) {
this.setProperty('color', color);
}
}
get kind() {
return 'right';
}
get isClose() {
return true;
}
}
class BreakItem extends BaseItem {
get kind() {
return 'break';
}
constructor(factory, linebreak, insert) {
super(factory);
this.setProperty('linebreak', linebreak);
this.setProperty('insert', insert);
}
checkItem(item) {
var _a, _b;
const linebreak = this.getProperty('linebreak');
if (item.isKind('mml')) {
const mml = item.First;
if (mml.isKind('mo')) {
const style = ((_b = (_a = tex_NodeUtil.getOp(mml)) === null || _a === void 0 ? void 0 : _a[3]) === null || _b === void 0 ? void 0 : _b.linebreakstyle) ||
tex_NodeUtil.getAttribute(mml, 'linebreakstyle');
if (style !== 'after') {
tex_NodeUtil.setAttribute(mml, 'linebreak', linebreak);
return [[item], true];
}
if (!this.getProperty('insert')) {
return [[item], true];
}
}
}
const mml = this.create('token', 'mspace', { linebreak });
return [[this.factory.create('mml', mml), item], true];
}
}
class BeginItem extends BaseItem {
get kind() {
return 'begin';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('end')) {
if (item.getName() !== this.getName()) {
throw new tex_TexError('EnvBadEnd', '\\begin{%1} ended with \\end{%2}', this.getName(), item.getName());
}
const node = this.toMml();
addLatexItem(node, item);
return [[this.factory.create('mml', node)], true];
}
if (item.isKind('stop')) {
throw new tex_TexError('EnvMissingEnd', 'Missing \\end{%1}', this.getName());
}
return super.checkItem(item);
}
}
class EndItem extends BaseItem {
get kind() {
return 'end';
}
get isClose() {
return true;
}
}
class StyleItem extends BaseItem {
get kind() {
return 'style';
}
checkItem(item) {
if (!item.isClose) {
return super.checkItem(item);
}
const mml = this.create('node', 'mstyle', this.nodes, this.getProperty('styles'));
return [[this.factory.create('mml', mml), item], true];
}
}
class PositionItem extends BaseItem {
get kind() {
return 'position';
}
checkItem(item) {
if (item.isClose) {
throw new tex_TexError('MissingBoxFor', 'Missing box for %1', this.getName());
}
if (item.isFinal) {
let mml = item.toMml();
switch (this.getProperty('move')) {
case 'vertical':
mml = this.create('node', 'mpadded', [mml], {
height: this.getProperty('dh'),
depth: this.getProperty('dd'),
voffset: this.getProperty('dh'),
});
return [[this.factory.create('mml', mml)], true];
case 'horizontal':
return [
[
this.factory.create('mml', this.getProperty('left')),
item,
this.factory.create('mml', this.getProperty('right')),
],
true,
];
}
}
return super.checkItem(item);
}
}
class CellItem extends BaseItem {
get kind() {
return 'cell';
}
get isClose() {
return true;
}
}
class MmlItem extends BaseItem {
get isFinal() {
return true;
}
get kind() {
return 'mml';
}
}
class FnItem extends BaseItem {
get kind() {
return 'fn';
}
checkItem(item) {
const top = this.First;
if (top) {
if (item.isOpen) {
return BaseItem.success;
}
if (!item.isKind('fn')) {
let mml = item.First;
if (!item.isKind('mml') || !mml) {
return [[top, item], true];
}
if ((tex_NodeUtil.isType(mml, 'mstyle') &&
mml.childNodes.length &&
tex_NodeUtil.isType(mml.childNodes[0].childNodes[0], 'mspace')) ||
tex_NodeUtil.isType(mml, 'mspace')) {
return [[top, item], true];
}
if (tex_NodeUtil.isEmbellished(mml)) {
mml = tex_NodeUtil.getCoreMO(mml);
}
const form = tex_NodeUtil.getForm(mml);
if (form != null && [0, 0, 1, 1, 0, 1, 1, 0, 0, 0][form[2]]) {
return [[top, item], true];
}
}
const node = this.create('token', 'mo', { texClass: TEXCLASS.NONE }, entities.ApplyFunction);
return [[top, node, item], true];
}
return super.checkItem(item);
}
}
class NotItem extends BaseItem {
constructor() {
super(...arguments);
this.remap = MapHandler.getMap('not_remap');
}
get kind() {
return 'not';
}
checkItem(item) {
let mml;
let c;
let textNode;
if (item.isKind('open') || item.isKind('left')) {
return BaseItem.success;
}
if (item.isKind('mml') &&
(tex_NodeUtil.isType(item.First, 'mo') ||
tex_NodeUtil.isType(item.First, 'mi') ||
tex_NodeUtil.isType(item.First, 'mtext'))) {
mml = item.First;
c = tex_NodeUtil.getText(mml);
if (c.length === 1 &&
!tex_NodeUtil.getProperty(mml, 'movesupsub') &&
tex_NodeUtil.getChildren(mml).length === 1) {
if (this.remap.contains(c)) {
textNode = this.create('text', this.remap.lookup(c).char);
tex_NodeUtil.setChild(mml, 0, textNode);
}
else {
textNode = this.create('text', '\u0338');
tex_NodeUtil.appendChildren(mml, [textNode]);
}
return [[item], true];
}
}
textNode = this.create('text', '\u29F8');
const mtextNode = this.create('node', 'mtext', [], {}, textNode);
const paddedNode = this.create('node', 'mpadded', [mtextNode], {
width: 0,
});
mml = this.create('node', 'TeXAtom', [paddedNode], {
texClass: TEXCLASS.REL,
});
return [[mml, item], true];
}
}
class NonscriptItem extends BaseItem {
get kind() {
return 'nonscript';
}
checkItem(item) {
if (item.isKind('mml') && item.Size() === 1) {
let mml = item.First;
if (mml.isKind('mstyle') && mml.notParent) {
mml = tex_NodeUtil.getChildren(tex_NodeUtil.getChildren(mml)[0])[0];
}
if (mml.isKind('mspace')) {
if (mml !== item.First) {
const mrow = this.create('node', 'mrow', [item.Pop()]);
item.Push(mrow);
}
this.factory.configuration.addNode('nonscript', item.First);
}
}
return [[item], true];
}
}
class DotsItem extends BaseItem {
get kind() {
return 'dots';
}
checkItem(item) {
if (item.isKind('open') || item.isKind('left')) {
return BaseItem.success;
}
let dots = this.getProperty('ldots');
const top = item.First;
if (item.isKind('mml') && tex_NodeUtil.isEmbellished(top)) {
const tclass = tex_NodeUtil.getTexClass(tex_NodeUtil.getCoreMO(top));
if (tclass === TEXCLASS.BIN || tclass === TEXCLASS.REL) {
dots = this.getProperty('cdots');
}
}
return [[dots, item], true];
}
}
class ArrayItem extends BaseItem {
constructor() {
super(...arguments);
this.table = [];
this.row = [];
this.frame = [];
this.hfill = [];
this.arraydef = {};
this.cstart = [];
this.cend = [];
this.cextra = [];
this.atEnd = false;
this.ralign = [];
this.breakAlign = {
cell: '',
row: '',
table: '',
};
this.templateSubs = 0;
}
get kind() {
return 'array';
}
get isOpen() {
return true;
}
get copyEnv() {
return false;
}
checkItem(item) {
if (item.isClose && !item.isKind('over')) {
if (item.getProperty('isEntry')) {
this.EndEntry();
this.clearEnv();
this.StartEntry();
return BaseItem.fail;
}
if (item.getProperty('isCR')) {
this.EndEntry();
this.EndRow();
this.clearEnv();
this.StartEntry();
return BaseItem.fail;
}
this.EndTable();
this.clearEnv();
const newItem = this.factory.create('mml', this.createMml());
if (this.getProperty('requireClose')) {
if (item.isKind('close')) {
return [[newItem], true];
}
throw new tex_TexError('MissingCloseBrace', 'Missing close brace');
}
return [[newItem, item], true];
}
return super.checkItem(item);
}
createMml() {
const scriptlevel = this.arraydef['scriptlevel'];
delete this.arraydef['scriptlevel'];
let mml = this.create('node', 'mtable', this.table, this.arraydef);
if (scriptlevel) {
mml.setProperty('smallmatrix', true);
}
if (this.breakAlign.table) {
tex_NodeUtil.setAttribute(mml, 'data-break-align', this.breakAlign.table);
}
if (this.getProperty('arrayPadding')) {
tex_NodeUtil.setAttribute(mml, 'data-frame-styles', '');
tex_NodeUtil.setAttribute(mml, 'framespacing', this.getProperty('arrayPadding'));
}
mml = this.handleFrame(mml);
if (scriptlevel !== undefined) {
mml = this.create('node', 'mstyle', [mml], { scriptlevel });
}
if (this.getProperty('open') || this.getProperty('close')) {
mml = ParseUtil.fenced(this.factory.configuration, this.getProperty('open'), mml, this.getProperty('close'));
}
return mml;
}
handleFrame(mml) {
if (!this.frame.length)
return mml;
const sides = new Map(this.frame);
const fstyle = this.frame.reduce((fstyle, [, style]) => (style === fstyle ? style : ''), this.frame[0][1]);
if (fstyle) {
if (this.frame.length === 4) {
tex_NodeUtil.setAttribute(mml, 'frame', fstyle);
tex_NodeUtil.removeAttribute(mml, 'data-frame-styles');
return mml;
}
if (fstyle === 'solid') {
tex_NodeUtil.setAttribute(mml, 'data-frame-styles', '');
mml = this.create('node', 'menclose', [mml], {
notation: Array.from(sides.keys()).join(' '),
'data-padding': 0,
});
return mml;
}
}
const styles = TRBL.map((side) => sides.get(side) || 'none').join(' ');
tex_NodeUtil.setAttribute(mml, 'data-frame-styles', styles);
return mml;
}
StartEntry() {
const n = this.row.length;
let start = this.cstart[n];
let end = this.cend[n];
const ralign = this.ralign[n];
const cextra = this.cextra;
if (!start && !end && !ralign && !cextra[n] && !cextra[n + 1])
return;
let [prefix, entry, term, found] = this.getEntry();
if (cextra[n] && (!this.atEnd || cextra[n + 1])) {
start += '&';
}
if (term !== '&') {
found =
!!entry.trim() || !!(n || (term && term.substring(0, 4) !== '\\end'));
if (cextra[n + 1] && !cextra[n]) {
end = (end || '') + '&';
this.atEnd = true;
}
}
if (!found && !prefix)
return;
const parser = this.parser;
if (found) {
if (start) {
entry = ParseUtil.addArgs(parser, start, entry);
}
if (end) {
entry = ParseUtil.addArgs(parser, entry, end);
}
if (ralign) {
entry = '\\text{' + entry.trim() + '}';
}
if (start || end || ralign) {
if (++this.templateSubs >
parser.configuration.options.maxTemplateSubtitutions) {
throw new tex_TexError('MaxTemplateSubs', 'Maximum template substitutions exceeded; ' +
'is there an invalid use of \\\\ in the template?');
}
}
}
if (prefix) {
entry = ParseUtil.addArgs(parser, prefix, entry);
}
parser.string = ParseUtil.addArgs(parser, entry, parser.string);
parser.i = 0;
}
getEntry() {
const parser = this.parser;
const pattern = /^([^]*?)([&{}]|\\\\|\\(?:begin|end)\s*\{array\}|\\cr|\\)/;
let braces = 0;
let envs = 0;
let i = parser.i;
let match;
const fail = ['', '', '', false];
while ((match = parser.string.slice(i).match(pattern)) !== null) {
i += match[0].length;
switch (match[2]) {
case '\\':
i++;
break;
case '{':
braces++;
break;
case '}':
if (!braces)
return fail;
braces--;
break;
case '\\begin{array}':
if (!braces) {
envs++;
}
break;
case '\\end{array}':
if (!braces && envs) {
envs--;
break;
}
default: {
if (braces || envs)
continue;
i -= match[2].length;
let entry = parser.string.slice(parser.i, i).trim();
const prefix = entry.match(/^(?:\s*\\(?:h(?:dash)?line|hfil{1,3}|rowcolor\s*\{.*?\}))+/);
if (prefix) {
entry = entry.slice(prefix[0].length);
}
parser.string = parser.string.slice(i);
parser.i = 0;
return [(prefix === null || prefix === void 0 ? void 0 : prefix[0]) || '', entry, match[2], true];
}
}
}
return fail;
}
EndEntry() {
const mtd = this.create('node', 'mtd', this.nodes);
if (this.hfill.length) {
if (this.hfill[0] === 0) {
tex_NodeUtil.setAttribute(mtd, 'columnalign', 'right');
}
if (this.hfill[this.hfill.length - 1] === this.Size()) {
tex_NodeUtil.setAttribute(mtd, 'columnalign', tex_NodeUtil.getAttribute(mtd, 'columnalign') ? 'center' : 'left');
}
}
const ralign = this.ralign[this.row.length];
if (ralign) {
const [valign, cwidth, calign] = ralign;
const box = this.create('node', 'mpadded', mtd.childNodes[0].childNodes, {
width: cwidth,
'data-overflow': 'auto',
'data-align': calign,
'data-vertical-align': valign,
});
box.setProperty('vbox', valign);
mtd.childNodes[0].childNodes = [];
mtd.appendChild(box);
}
else if (this.breakAlign.cell) {
tex_NodeUtil.setAttribute(mtd, 'data-vertical-align', this.breakAlign.cell);
}
this.breakAlign.cell = '';
this.row.push(mtd);
this.Clear();
this.hfill = [];
}
EndRow() {
let type = 'mtr';
if (this.getProperty('isNumbered') && this.row.length === 3) {
this.row.unshift(this.row.pop());
type = 'mlabeledtr';
}
else if (this.getProperty('isLabeled')) {
type = 'mlabeledtr';
this.setProperty('isLabeled', false);
}
const node = this.create('node', type, this.row);
if (this.breakAlign.row) {
tex_NodeUtil.setAttribute(node, 'data-break-align', this.breakAlign.row);
this.breakAlign.row = '';
}
addLatexItem(node, this);
this.table.push(node);
this.row = [];
this.atEnd = false;
}
EndTable() {
if (this.Size() || this.row.length) {
this.EndEntry();
this.EndRow();
}
this.checkLines();
}
checkLines() {
if (this.arraydef.rowlines) {
const lines = this.arraydef.rowlines.split(/ /);
if (lines.length === this.table.length) {
this.frame.push(['bottom', lines.pop()]);
if (lines.length) {
this.arraydef.rowlines = lines.join(' ');
}
else {
delete this.arraydef.rowlines;
}
}
else if (lines.length < this.table.length - 1) {
this.arraydef.rowlines += ' none';
}
}
if (this.getProperty('rowspacing')) {
const rows = this.arraydef.rowspacing.split(/ /);
while (rows.length < this.table.length) {
rows.push(this.getProperty('rowspacing') + 'em');
}
this.arraydef.rowspacing = rows.join(' ');
}
}
addRowSpacing(spacing) {
if (this.arraydef['rowspacing']) {
const rows = this.arraydef['rowspacing'].split(/ /);
if (!this.getProperty('rowspacing')) {
const dimem = UnitUtil.dimen2em(rows[0]);
this.setProperty('rowspacing', dimem);
}
const rowspacing = this.getProperty('rowspacing');
while (rows.length < this.table.length) {
rows.push(UnitUtil.em(rowspacing));
}
rows[this.table.length - 1] = UnitUtil.em(Math.max(0, rowspacing + UnitUtil.dimen2em(spacing)));
this.arraydef['rowspacing'] = rows.join(' ');
}
}
}
class EqnArrayItem extends ArrayItem {
constructor(factory, ...args) {
super(factory);
this.maxrow = 0;
this.factory.configuration.tags.start(args[0], args[2], args[1]);
}
get kind() {
return 'eqnarray';
}
EndEntry() {
const calign = this.arraydef.columnalign.split(/ /);
const align = this.row.length && calign.length
? calign[this.row.length % calign.length]
: 'right';
if (align !== 'right') {
ParseUtil.fixInitialMO(this.factory.configuration, this.nodes);
}
super.EndEntry();
}
EndRow() {
if (this.row.length > this.maxrow) {
this.maxrow = this.row.length;
}
const tag = this.factory.configuration.tags.getTag();
if (tag) {
this.row = [tag].concat(this.row);
this.setProperty('isLabeled', true);
}
this.factory.configuration.tags.clearTag();
super.EndRow();
}
EndTable() {
super.EndTable();
this.factory.configuration.tags.end();
this.extendArray('columnalign', this.maxrow);
this.extendArray('columnwidth', this.maxrow);
this.extendArray('columnspacing', this.maxrow - 1);
this.extendArray('data-break-align', this.maxrow);
this.addIndentshift();
}
extendArray(name, max) {
if (!this.arraydef[name])
return;
const repeat = this.arraydef[name].split(/ /);
const columns = [...repeat];
if (columns.length > 1) {
while (columns.length < max) {
columns.push(...repeat);
}
this.arraydef[name] = columns.slice(0, max).join(' ');
}
}
addIndentshift() {
const align = this.arraydef.columnalign.split(/ /);
let prev = '';
for (const i of align.keys()) {
if (align[i] === 'left' && i > 0) {
const indentshift = prev === 'center' ? '.7em' : '2em';
for (const row of this.table) {
const cell = row.childNodes[row.isKind('mlabeledtr') ? i + 1 : i];
if (cell) {
const mstyle = this.create('node', 'mstyle', cell.childNodes[0].childNodes, { indentshift });
cell.childNodes[0].childNodes = [];
cell.appendChild(mstyle);
}
}
}
prev = align[i];
}
}
}
class MstyleItem extends BeginItem {
get kind() {
return 'mstyle';
}
constructor(factory, attr, name) {
super(factory);
this.attrList = attr;
this.setProperty('name', name);
}
checkItem(item) {
if (item.isKind('end') && item.getName() === this.getName()) {
const mml = this.create('node', 'mstyle', [this.toMml()], this.attrList);
return [[mml], true];
}
return super.checkItem(item);
}
}
class EquationItem extends BaseItem {
constructor(factory, ...args) {
super(factory);
this.factory.configuration.tags.start('equation', true, args[0]);
}
get kind() {
return 'equation';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('end')) {
const mml = this.toMml();
const tag = this.factory.configuration.tags.getTag();
this.factory.configuration.tags.end();
return [
[tag ? this.factory.configuration.tags.enTag(mml, tag) : mml, item],
true,
];
}
if (item.isKind('stop')) {
throw new tex_TexError('EnvMissingEnd', 'Missing \\end{%1}', this.getName());
}
return super.checkItem(item);
}
}
function addLatexItem(node, item, prefix = '') {
const str = item.startStr.slice(item.startI, item.stopI);
if (str) {
node.attributes.set(TexConstant.Attr.LATEXITEM, prefix ? prefix + str : str);
node.attributes.set(TexConstant.Attr.LATEX, prefix ? prefix + str : str);
}
}
//# sourceMappingURL=BaseItems.js.map
;// ./mjs/input/tex/base/BaseMethods.js
const P_HEIGHT = 1.2 / 0.85;
const MmlTokenAllow = {
fontfamily: 1,
fontsize: 1,
fontweight: 1,
fontstyle: 1,
color: 1,
background: 1,
id: 1,
class: 1,
href: 1,
style: 1,
};
function splitAlignArray(align, n = Infinity) {
const list = align
.replace(/\s+/g, '')
.split('')
.map((s) => {
const name = { t: 'top', b: 'bottom', m: 'middle', c: 'center' }[s];
if (!name) {
throw new tex_TexError('BadBreakAlign', 'Invalid alignment character: %1', s);
}
return name;
});
if (list.length > n) {
throw new tex_TexError('TooManyAligns', 'Too many alignment characters: %1', align);
}
return n === 1 ? list[0] : list.join(' ');
}
function parseRoot(parser, n) {
const env = parser.stack.env;
const inRoot = env['inRoot'];
env['inRoot'] = true;
const newParser = new TexParser(n, env, parser.configuration);
let node = newParser.mml();
const global = newParser.stack.global;
if (global['leftRoot'] || global['upRoot']) {
const def = {};
if (global['leftRoot']) {
def['width'] = global['leftRoot'];
}
if (global['upRoot']) {
def['voffset'] = global['upRoot'];
def['height'] = global['upRoot'];
}
node = parser.create('node', 'mpadded', [node], def);
}
env['inRoot'] = inRoot;
return node;
}
const BaseMethods = {
Open(parser, _c) {
parser.Push(parser.itemFactory.create('open'));
},
Close(parser, _c) {
parser.Push(parser.itemFactory.create('close'));
},
Bar(parser, c) {
parser.Push(parser.create('token', 'mo', { stretchy: false, texClass: TEXCLASS.ORD }, c));
},
Tilde(parser, _c) {
parser.Push(parser.create('token', 'mtext', {}, entities.nbsp));
},
Space(_parser, _c) { },
Superscript(parser, _c) {
if (parser.GetNext().match(/\d/)) {
parser.string =
parser.string.substring(0, parser.i + 1) +
' ' +
parser.string.substring(parser.i + 1);
}
let primes;
let base;
const top = parser.stack.Top();
if (top.isKind('prime')) {
[base, primes] = top.Peek(2);
parser.stack.Pop();
}
else {
base = parser.stack.Prev();
if (!base) {
base = parser.create('token', 'mi', {}, '');
}
}
const movesupsub = tex_NodeUtil.getProperty(base, 'movesupsub');
let position = tex_NodeUtil.isType(base, 'msubsup')
? base.sup
: base.over;
if ((tex_NodeUtil.isType(base, 'msubsup') &&
!tex_NodeUtil.isType(base, 'msup') &&
tex_NodeUtil.getChildAt(base, base.sup)) ||
(tex_NodeUtil.isType(base, 'munderover') &&
!tex_NodeUtil.isType(base, 'mover') &&
tex_NodeUtil.getChildAt(base, base.over) &&
!tex_NodeUtil.getProperty(base, 'subsupOK'))) {
throw new tex_TexError('DoubleExponent', 'Double exponent: use braces to clarify');
}
if (!tex_NodeUtil.isType(base, 'msubsup') || tex_NodeUtil.isType(base, 'msup')) {
if (movesupsub) {
if (!tex_NodeUtil.isType(base, 'munderover') ||
tex_NodeUtil.isType(base, 'mover') ||
tex_NodeUtil.getChildAt(base, base.over)) {
base = parser.create('node', 'munderover', [base], {
movesupsub: true,
});
}
position = base.over;
}
else {
base = parser.create('node', 'msubsup', [base]);
position = base.sup;
}
}
parser.Push(parser.itemFactory.create('subsup', base).setProperties({
position: position,
primes: primes,
movesupsub: movesupsub,
}));
},
Subscript(parser, _c) {
if (parser.GetNext().match(/\d/)) {
parser.string =
parser.string.substring(0, parser.i + 1) +
' ' +
parser.string.substring(parser.i + 1);
}
let primes, base;
const top = parser.stack.Top();
if (top.isKind('prime')) {
[base, primes] = top.Peek(2);
parser.stack.Pop();
}
else {
base = parser.stack.Prev();
if (!base) {
base = parser.create('token', 'mi', {}, '');
}
}
const movesupsub = tex_NodeUtil.getProperty(base, 'movesupsub');
let position = tex_NodeUtil.isType(base, 'msubsup')
? base.sub
: base.under;
if ((tex_NodeUtil.isType(base, 'msubsup') &&
!tex_NodeUtil.isType(base, 'msup') &&
tex_NodeUtil.getChildAt(base, base.sub)) ||
(tex_NodeUtil.isType(base, 'munderover') &&
!tex_NodeUtil.isType(base, 'mover') &&
tex_NodeUtil.getChildAt(base, base.under) &&
!tex_NodeUtil.getProperty(base, 'subsupOK'))) {
throw new tex_TexError('DoubleSubscripts', 'Double subscripts: use braces to clarify');
}
if (!tex_NodeUtil.isType(base, 'msubsup') || tex_NodeUtil.isType(base, 'msup')) {
if (movesupsub) {
if (!tex_NodeUtil.isType(base, 'munderover') ||
tex_NodeUtil.isType(base, 'mover') ||
tex_NodeUtil.getChildAt(base, base.under)) {
base = parser.create('node', 'munderover', [base], {
movesupsub: true,
});
}
position = base.under;
}
else {
base = parser.create('node', 'msubsup', [base]);
position = base.sub;
}
}
parser.Push(parser.itemFactory.create('subsup', base).setProperties({
position: position,
primes: primes,
movesupsub: movesupsub,
}));
},
Prime(parser, c) {
let base = parser.stack.Prev();
if (!base) {
base = parser.create('token', 'mi');
}
if ((tex_NodeUtil.isType(base, 'msubsup') &&
!tex_NodeUtil.isType(base, 'msup') &&
tex_NodeUtil.getChildAt(base, base.sup)) ||
(tex_NodeUtil.isType(base, 'munderover') &&
!tex_NodeUtil.isType(base, 'mover') &&
tex_NodeUtil.getChildAt(base, base.over) &&
!tex_NodeUtil.getProperty(base, 'subsupOK'))) {
throw new tex_TexError('DoubleExponentPrime', 'Prime causes double exponent: use braces to clarify');
}
let sup = '';
parser.i--;
do {
sup += entities.prime;
parser.i++;
c = parser.GetNext();
} while (c === "'" || c === entities.rsquo);
sup = ['', '\u2032', '\u2033', '\u2034', '\u2057'][sup.length] || sup;
const node = parser.create('token', 'mo', { variantForm: true }, sup);
parser.Push(parser.itemFactory.create('prime', base, node));
},
Comment(parser, _c) {
while (parser.i < parser.string.length &&
parser.string.charAt(parser.i) !== '\n') {
parser.i++;
}
},
Hash(_parser, _c) {
throw new tex_TexError('CantUseHash1', "You can't use 'macro parameter character #' in math mode");
},
MathFont(parser, name, variant, italic = '') {
const text = parser.GetArgument(name);
const mml = new TexParser(text, Object.assign(Object.assign({ multiLetterIdentifiers: parser.options.identifierPattern }, parser.stack.env), { font: variant, italicFont: italic, noAutoOP: true }), parser.configuration).mml();
parser.Push(parser.create('node', 'TeXAtom', [mml]));
},
SetFont(parser, _name, font) {
parser.stack.env['font'] = font;
parser.Push(parser.itemFactory.create('null'));
},
SetStyle(parser, _name, texStyle, style, level) {
parser.stack.env['style'] = texStyle;
parser.stack.env['level'] = level;
parser.Push(parser.itemFactory
.create('style')
.setProperty('styles', { displaystyle: style, scriptlevel: level }));
},
SetSize(parser, _name, size) {
parser.stack.env['size'] = size;
parser.Push(parser.itemFactory
.create('style')
.setProperty('styles', { mathsize: em(size) }));
},
Spacer(parser, _name, space) {
const node = parser.create('node', 'mspace', [], { width: em(space) });
const style = parser.create('node', 'mstyle', [node], { scriptlevel: 0 });
parser.Push(style);
},
DiscretionaryTimes(parser, _name) {
parser.Push(parser.create('token', 'mo', { linebreakmultchar: '\u00D7' }, '\u2062'));
},
AllowBreak(parser, _name) {
parser.Push(parser.create('token', 'mspace'));
},
Break(parser, _name) {
parser.Push(parser.create('token', 'mspace', {
linebreak: TexConstant.LineBreak.NEWLINE,
}));
},
Linebreak(parser, _name, linebreak) {
let insert = true;
const prev = parser.stack.Prev(true);
if (prev && prev.isKind('mo')) {
const style = tex_NodeUtil.getMoAttribute(prev, 'linebreakstyle');
if (style !== TexConstant.LineBreakStyle.BEFORE) {
prev.attributes.set('linebreak', linebreak);
insert = false;
}
}
parser.Push(parser.itemFactory.create('break', linebreak, insert));
},
LeftRight(parser, name) {
const first = name.substring(1);
parser.Push(parser.itemFactory.create(first, parser.GetDelimiter(name), parser.stack.env.color));
},
NamedFn(parser, name, id) {
if (!id) {
id = name.substring(1);
}
const mml = parser.create('token', 'mi', { texClass: TEXCLASS.OP }, id);
parser.Push(parser.itemFactory.create('fn', mml));
},
NamedOp(parser, name, id) {
if (!id) {
id = name.substring(1);
}
id = id.replace(/ /, '\u2006');
const mml = parser.create('token', 'mo', {
movablelimits: true,
movesupsub: true,
form: TexConstant.Form.PREFIX,
texClass: TEXCLASS.OP,
}, id);
parser.Push(mml);
},
Limits(parser, _name, limits) {
let op = parser.stack.Prev(true);
if (!op ||
(tex_NodeUtil.getTexClass(tex_NodeUtil.getCoreMO(op)) !== TEXCLASS.OP &&
tex_NodeUtil.getProperty(op, 'movesupsub') == null)) {
throw new tex_TexError('MisplacedLimits', '%1 is allowed only on operators', parser.currentCS);
}
const top = parser.stack.Top();
let node;
if (tex_NodeUtil.isType(op, 'munderover') && !limits) {
node = parser.create('node', 'msubsup');
tex_NodeUtil.copyChildren(op, node);
op = top.Last = node;
}
else if (tex_NodeUtil.isType(op, 'msubsup') && limits) {
node = parser.create('node', 'munderover');
tex_NodeUtil.copyChildren(op, node);
op = top.Last = node;
}
tex_NodeUtil.setProperty(op, 'movesupsub', limits ? true : false);
tex_NodeUtil.setProperties(tex_NodeUtil.getCoreMO(op), { movablelimits: false });
if ((tex_NodeUtil.isType(op, 'mo')
? tex_NodeUtil.getMoAttribute(op, 'movableLimits')
: tex_NodeUtil.getAttribute(op, 'movablelimits')) ||
tex_NodeUtil.getProperty(op, 'movablelimits')) {
tex_NodeUtil.setProperties(op, { movablelimits: false });
}
},
Over(parser, name, open, close) {
const mml = parser.itemFactory
.create('over')
.setProperty('name', parser.currentCS);
if (open || close) {
mml.setProperty('ldelim', open);
mml.setProperty('rdelim', close);
}
else if (name.match(/withdelims$/)) {
mml.setProperty('ldelim', parser.GetDelimiter(name));
mml.setProperty('rdelim', parser.GetDelimiter(name));
}
if (name.match(/^\\above/)) {
mml.setProperty('thickness', parser.GetDimen(name));
}
else if (name.match(/^\\atop/) || open || close) {
mml.setProperty('thickness', 0);
}
parser.Push(mml);
},
Frac(parser, name) {
const num = parser.ParseArg(name);
const den = parser.ParseArg(name);
const node = parser.create('node', 'mfrac', [num, den]);
parser.Push(node);
},
Sqrt(parser, name) {
const n = parser.GetBrackets(name);
let arg = parser.GetArgument(name);
if (arg === '\\frac') {
arg +=
'{' + parser.GetArgument(arg) + '}{' + parser.GetArgument(arg) + '}';
}
let mml = new TexParser(arg, parser.stack.env, parser.configuration).mml();
if (!n) {
mml = parser.create('node', 'msqrt', [mml]);
}
else {
mml = parser.create('node', 'mroot', [mml, parseRoot(parser, n)]);
}
parser.Push(mml);
},
Root(parser, name) {
const n = parser.GetUpTo(name, '\\of');
const arg = parser.ParseArg(name);
const node = parser.create('node', 'mroot', [arg, parseRoot(parser, n)]);
parser.Push(node);
},
MoveRoot(parser, name, id) {
if (!parser.stack.env['inRoot']) {
throw new tex_TexError('MisplacedMoveRoot', '%1 can appear only within a root', parser.currentCS);
}
if (parser.stack.global[id]) {
throw new tex_TexError('MultipleMoveRoot', 'Multiple use of %1', parser.currentCS);
}
let n = parser.GetArgument(name);
if (!n.match(/-?[0-9]+/)) {
throw new tex_TexError('IntegerArg', 'The argument to %1 must be an integer', parser.currentCS);
}
n = parseInt(n, 10) / 15 + 'em';
if (n.substring(0, 1) !== '-') {
n = '+' + n;
}
parser.stack.global[id] = n;
},
Accent(parser, name, accent, stretchy) {
const c = parser.ParseArg(name);
const def = Object.assign(Object.assign({}, ParseUtil.getFontDef(parser)), { accent: true, mathaccent: stretchy === undefined ? true : stretchy });
const entity = tex_NodeUtil.createEntity(accent);
const mml = parser.create('token', 'mo', def, entity);
tex_NodeUtil.setAttribute(mml, 'stretchy', stretchy ? true : false);
const mo = tex_NodeUtil.isEmbellished(c) ? tex_NodeUtil.getCoreMO(c) : c;
if (tex_NodeUtil.isType(mo, 'mo') ||
tex_NodeUtil.getProperty(mo, 'movablelimits')) {
tex_NodeUtil.setProperties(mo, { movablelimits: false });
}
const muoNode = parser.create('node', 'munderover');
tex_NodeUtil.setChild(muoNode, 0, c);
tex_NodeUtil.setChild(muoNode, 1, null);
tex_NodeUtil.setChild(muoNode, 2, mml);
const texAtom = parser.create('node', 'TeXAtom', [muoNode]);
parser.Push(texAtom);
},
UnderOver(parser, name, c, stack) {
const entity = tex_NodeUtil.createEntity(c);
const mo = parser.create('token', 'mo', { stretchy: true, accent: true }, entity);
if (entity.match(MmlMo.mathaccentsWithWidth)) {
mo.setProperty('mathaccent', false);
}
const pos = name.charAt(1) === 'o' ? 'over' : 'under';
const base = parser.ParseArg(name);
parser.Push(ParseUtil.underOver(parser, base, mo, pos, stack));
},
Overset(parser, name) {
const top = parser.ParseArg(name);
const base = parser.ParseArg(name);
const topMo = top.coreMO();
const accent = topMo.isKind('mo') && tex_NodeUtil.getMoAttribute(topMo, 'accent') === true;
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'mover', [base, top], { accent });
parser.Push(node);
},
Underset(parser, name) {
const bot = parser.ParseArg(name);
const base = parser.ParseArg(name);
const botMo = bot.coreMO();
const accentunder = botMo.isKind('mo') && tex_NodeUtil.getMoAttribute(botMo, 'accent') === true;
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'munder', [base, bot], { accentunder });
parser.Push(node);
},
Overunderset(parser, name) {
const top = parser.ParseArg(name);
const bot = parser.ParseArg(name);
const base = parser.ParseArg(name);
const topMo = top.coreMO();
const botMo = bot.coreMO();
const accent = topMo.isKind('mo') && tex_NodeUtil.getMoAttribute(topMo, 'accent') === true;
const accentunder = botMo.isKind('mo') && tex_NodeUtil.getMoAttribute(botMo, 'accent') === true;
ParseUtil.checkMovableLimits(base);
const node = parser.create('node', 'munderover', [base, bot, top], {
accent,
accentunder,
});
parser.Push(node);
},
TeXAtom(parser, name, mclass) {
const def = { texClass: mclass };
let mml;
let node;
if (mclass === TEXCLASS.OP) {
def['movesupsub'] = def['movablelimits'] = true;
const arg = parser.GetArgument(name);
const match = arg.match(/^\s*\\rm\s+([a-zA-Z0-9 ]+)$/);
if (match) {
def['mathvariant'] = TexConstant.Variant.NORMAL;
node = parser.create('token', 'mi', def, match[1]);
}
else {
const parsed = new TexParser(arg, parser.stack.env, parser.configuration).mml();
node = parser.create('node', 'TeXAtom', [parsed], def);
}
mml = parser.itemFactory.create('fn', node);
}
else {
mml = parser.create('node', 'TeXAtom', [parser.ParseArg(name)], def);
}
parser.Push(mml);
},
VBox(parser, name, align) {
const arg = new TexParser(parser.GetArgument(name), parser.stack.env, parser.configuration);
const def = {
'data-vertical-align': align,
texClass: TEXCLASS.ORD,
};
if (arg.stack.env.hsize) {
def.width = arg.stack.env.hsize;
def['data-overflow'] = 'linebreak';
}
const mml = parser.create('node', 'mpadded', [arg.mml()], def);
mml.setProperty('vbox', align);
parser.Push(mml);
},
Hsize(parser, name) {
if (parser.GetNext() === '=') {
parser.i++;
}
parser.stack.env.hsize = parser.GetDimen(name);
parser.Push(parser.itemFactory.create('null'));
},
ParBox(parser, name) {
const c = parser.GetBrackets(name, 'c');
const width = parser.GetDimen(name);
const text = ParseUtil.internalMath(parser, parser.GetArgument(name));
const align = splitAlignArray(c, 1);
const mml = parser.create('node', 'mpadded', text, {
width: width,
'data-overflow': 'linebreak',
'data-vertical-align': align,
});
mml.setProperty('vbox', align);
parser.Push(mml);
},
BreakAlign(parser, name) {
const top = parser.stack.Top();
if (!(top instanceof ArrayItem)) {
throw new tex_TexError('BreakNotInArray', '%1 must be used in an alignment environment', parser.currentCS);
}
const type = parser.GetArgument(name).trim();
switch (type) {
case 'c':
if (top.First) {
throw new tex_TexError('BreakFirstInEntry', '%1 must be at the beginning of an alignment entry', parser.currentCS + '{c}');
}
top.breakAlign.cell = splitAlignArray(parser.GetArgument(name), 1);
break;
case 'r':
if (top.row.length || top.First) {
throw new tex_TexError('BreakFirstInRow', '%1 must be at the beginning of an alignment row', parser.currentCS + '{r}');
}
top.breakAlign.row = splitAlignArray(parser.GetArgument(name));
break;
case 't':
if (top.table.length || top.row.length || top.First) {
throw new tex_TexError('BreakFirstInTable', '%1 must be at the beginning of an alignment', parser.currentCS + '{t}');
}
top.breakAlign.table = splitAlignArray(parser.GetArgument(name));
break;
default:
throw new tex_TexError('BreakType', 'First argument to %1 must be one of c, r, or t', parser.currentCS);
}
},
MmlToken(parser, name) {
const kind = parser.GetArgument(name);
let attr = parser.GetBrackets(name, '').replace(/^\s+/, '');
const text = parser.GetArgument(name);
const def = {};
const keep = [];
let node;
try {
node = parser.create('node', kind);
}
catch (_e) {
node = null;
}
if (!node || !node.isToken) {
throw new tex_TexError('NotMathMLToken', '%1 is not a token element', kind);
}
while (attr !== '') {
const match = attr.match(/^([a-z]+)\s*=\s*('[^']*'|"[^"]*"|[^ ,]*)\s*,?\s*/i);
if (!match) {
throw new tex_TexError('InvalidMathMLAttr', 'Invalid MathML attribute: %1', attr);
}
if (!node.attributes.hasDefault(match[1]) && !MmlTokenAllow[match[1]]) {
throw new tex_TexError('UnknownAttrForElement', '%1 is not a recognized attribute for %2', match[1], kind);
}
let value = ParseUtil.mmlFilterAttribute(parser, match[1], match[2].replace(/^(['"])(.*)\1$/, '$2'));
if (value) {
if (value.toLowerCase() === 'true') {
value = true;
}
else if (value.toLowerCase() === 'false') {
value = false;
}
def[match[1]] = value;
keep.push(match[1]);
}
attr = attr.substring(match[0].length);
}
if (keep.length) {
def['mjx-keep-attrs'] = keep.join(' ');
}
const textNode = parser.create('text', replaceUnicode(text));
node.appendChild(textNode);
tex_NodeUtil.setProperties(node, def);
parser.Push(node);
},
Strut(parser, _name) {
const row = parser.create('node', 'mrow');
const padded = parser.create('node', 'mpadded', [row], {
height: '8.6pt',
depth: '3pt',
width: 0,
});
parser.Push(padded);
},
Phantom(parser, name, v, h) {
let box = parser.create('node', 'mphantom', [parser.ParseArg(name)]);
if (v || h) {
box = parser.create('node', 'mpadded', [box]);
if (h) {
tex_NodeUtil.setAttribute(box, 'height', 0);
tex_NodeUtil.setAttribute(box, 'depth', 0);
}
if (v) {
tex_NodeUtil.setAttribute(box, 'width', 0);
}
}
const atom = parser.create('node', 'TeXAtom', [box]);
parser.Push(atom);
},
Smash(parser, name) {
const bt = UnitUtil.trimSpaces(parser.GetBrackets(name, ''));
const smash = parser.create('node', 'mpadded', [parser.ParseArg(name)]);
switch (bt) {
case 'b':
tex_NodeUtil.setAttribute(smash, 'depth', 0);
break;
case 't':
tex_NodeUtil.setAttribute(smash, 'height', 0);
break;
default:
tex_NodeUtil.setAttribute(smash, 'height', 0);
tex_NodeUtil.setAttribute(smash, 'depth', 0);
}
const atom = parser.create('node', 'TeXAtom', [smash]);
parser.Push(atom);
},
Lap(parser, name) {
const mml = parser.create('node', 'mpadded', [parser.ParseArg(name)], {
width: 0,
});
if (name === '\\llap') {
tex_NodeUtil.setAttribute(mml, 'lspace', '-1width');
}
const atom = parser.create('node', 'TeXAtom', [mml]);
parser.Push(atom);
},
RaiseLower(parser, name) {
let h = parser.GetDimen(name);
const item = parser.itemFactory
.create('position')
.setProperties({ name: parser.currentCS, move: 'vertical' });
if (h.charAt(0) === '-') {
h = h.slice(1);
name = name.substring(1) === 'raise' ? '\\lower' : '\\raise';
}
if (name === '\\lower') {
item.setProperty('dh', '-' + h);
item.setProperty('dd', '+' + h);
}
else {
item.setProperty('dh', '+' + h);
item.setProperty('dd', '-' + h);
}
parser.Push(item);
},
MoveLeftRight(parser, name) {
let h = parser.GetDimen(name);
let nh = h.charAt(0) === '-' ? h.slice(1) : '-' + h;
if (name === '\\moveleft') {
const tmp = h;
h = nh;
nh = tmp;
}
parser.Push(parser.itemFactory.create('position').setProperties({
name: parser.currentCS,
move: 'horizontal',
left: parser.create('node', 'mspace', [], { width: h }),
right: parser.create('node', 'mspace', [], { width: nh }),
}));
},
Hskip(parser, name, nobreak = false) {
const node = parser.create('node', 'mspace', [], {
width: parser.GetDimen(name),
});
if (nobreak) {
tex_NodeUtil.setAttribute(node, 'linebreak', 'nobreak');
}
parser.Push(node);
},
Nonscript(parser, _name) {
parser.Push(parser.itemFactory.create('nonscript'));
},
Rule(parser, name, style) {
const w = parser.GetDimen(name), h = parser.GetDimen(name), d = parser.GetDimen(name);
const def = { width: w, height: h, depth: d };
if (style !== 'blank') {
def['mathbackground'] = parser.stack.env['color'] || 'black';
}
const node = parser.create('node', 'mspace', [], def);
parser.Push(node);
},
rule(parser, name) {
const v = parser.GetBrackets(name), w = parser.GetDimen(name), h = parser.GetDimen(name);
let mml = parser.create('node', 'mspace', [], {
width: w,
height: h,
mathbackground: parser.stack.env['color'] || 'black',
});
if (v) {
mml = parser.create('node', 'mpadded', [mml], { voffset: v });
if (v.match(/^-/)) {
tex_NodeUtil.setAttribute(mml, 'height', v);
tex_NodeUtil.setAttribute(mml, 'depth', '+' + v.substring(1));
}
else {
tex_NodeUtil.setAttribute(mml, 'height', '+' + v);
}
}
parser.Push(mml);
},
MakeBig(parser, name, mclass, size) {
size *= P_HEIGHT;
const sizeStr = String(size).replace(/(\.\d\d\d).+/, '$1') + 'em';
const delim = parser.GetDelimiter(name, true);
const mo = parser.create('token', 'mo', {
minsize: sizeStr,
maxsize: sizeStr,
fence: true,
stretchy: true,
symmetric: true,
}, delim);
const node = parser.create('node', 'TeXAtom', [mo], { texClass: mclass });
parser.Push(node);
},
BuildRel(parser, name) {
const top = parser.ParseUpTo(name, '\\over');
const bot = parser.ParseArg(name);
const node = parser.create('node', 'munderover');
tex_NodeUtil.setChild(node, 0, bot);
tex_NodeUtil.setChild(node, 1, null);
tex_NodeUtil.setChild(node, 2, top);
const atom = parser.create('node', 'TeXAtom', [node], {
texClass: TEXCLASS.REL,
});
parser.Push(atom);
},
HBox(parser, name, style, font) {
parser.PushAll(ParseUtil.internalMath(parser, parser.GetArgument(name), style, font));
},
FBox(parser, name) {
const internal = ParseUtil.internalMath(parser, parser.GetArgument(name));
const node = parser.create('node', 'menclose', internal, {
notation: 'box',
});
parser.Push(node);
},
FrameBox(parser, name) {
const width = parser.GetBrackets(name);
const pos = parser.GetBrackets(name) || 'c';
let mml = ParseUtil.internalMath(parser, parser.GetArgument(name));
if (width) {
mml = [
parser.create('node', 'mpadded', mml, {
width,
'data-align': lookup(pos, { l: 'left', r: 'right' }, 'center'),
}),
];
}
const node = parser.create('node', 'TeXAtom', [parser.create('node', 'menclose', mml, { notation: 'box' })], { texClass: TEXCLASS.ORD });
parser.Push(node);
},
MakeBox(parser, name) {
const width = parser.GetBrackets(name);
const pos = parser.GetBrackets(name, 'c');
const mml = parser.create('node', 'mpadded', ParseUtil.internalMath(parser, parser.GetArgument(name)));
if (width) {
tex_NodeUtil.setAttribute(mml, 'width', width);
}
const align = lookup(pos.toLowerCase(), { c: 'center', r: 'right' }, '');
if (align) {
tex_NodeUtil.setAttribute(mml, 'data-align', align);
}
if (pos.toLowerCase() !== pos) {
tex_NodeUtil.setAttribute(mml, 'data-overflow', 'linebreak');
}
parser.Push(mml);
},
Not(parser, _name) {
parser.Push(parser.itemFactory.create('not'));
},
Dots(parser, _name) {
const ldotsEntity = tex_NodeUtil.createEntity('2026');
const cdotsEntity = tex_NodeUtil.createEntity('22EF');
const ldots = parser.create('token', 'mo', { stretchy: false }, ldotsEntity);
const cdots = parser.create('token', 'mo', { stretchy: false }, cdotsEntity);
parser.Push(parser.itemFactory.create('dots').setProperties({
ldots: ldots,
cdots: cdots,
}));
},
Matrix(parser, _name, open, close, align, spacing, vspacing, style, cases, numbered) {
const c = parser.GetNext();
if (c === '') {
throw new tex_TexError('MissingArgFor', 'Missing argument for %1', parser.currentCS);
}
if (c === '{') {
parser.i++;
}
else {
parser.string = c + '}' + parser.string.slice(parser.i + 1);
parser.i = 0;
}
const array = parser.itemFactory
.create('array')
.setProperty('requireClose', true);
if (open || !align) {
array.setProperty('arrayPadding', '.2em .125em');
}
array.arraydef = {
rowspacing: vspacing || '4pt',
columnspacing: spacing || '1em',
};
if (cases) {
array.setProperty('isCases', true);
}
if (numbered) {
array.setProperty('isNumbered', true);
array.arraydef.side = numbered;
}
if (open || close) {
array.setProperty('open', open);
array.setProperty('close', close);
}
if (style === 'D') {
array.arraydef.displaystyle = true;
}
if (align != null) {
array.arraydef.columnalign = align;
}
parser.Push(array);
},
Entry(parser, name) {
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isEntry: true, name: name }));
const top = parser.stack.Top();
const env = top.getProperty('casesEnv');
const cases = top.getProperty('isCases');
if (!cases && !env)
return;
const str = parser.string;
let braces = 0;
let close = -1;
let i = parser.i;
let m = str.length;
const end = env
? new RegExp(`^\\\\end\\s*\\{${env.replace(/\*/, '\\*')}\\}`)
: null;
while (i < m) {
const c = str.charAt(i);
if (c === '{') {
braces++;
i++;
}
else if (c === '}') {
if (braces === 0) {
m = 0;
}
else {
braces--;
if (braces === 0 && close < 0) {
close = i - parser.i;
}
i++;
}
}
else if (c === '&' && braces === 0) {
throw new tex_TexError('ExtraAlignTab', 'Extra alignment tab in \\cases text');
}
else if (c === '\\') {
const rest = str.substring(i);
if (rest.match(/^((\\cr)[^a-zA-Z]|\\\\)/) || (end && rest.match(end))) {
m = 0;
}
else {
i += 2;
}
}
else {
i++;
}
}
const text = str.substring(parser.i, i);
if (!text.match(/^\s*\\text[^a-zA-Z]/) ||
close !== text.replace(/\s+$/, '').length - 1) {
const internal = ParseUtil.internalMath(parser, UnitUtil.trimSpaces(text), 0);
parser.PushAll(internal);
parser.i = i;
}
},
Cr(parser, name) {
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isCR: true, name: name }));
},
CrLaTeX(parser, name, nobrackets = false) {
let n;
if (!nobrackets) {
if (parser.string.charAt(parser.i) === '*') {
parser.i++;
}
if (parser.string.charAt(parser.i) === '[') {
const dim = parser.GetBrackets(name, '');
const [value, unit] = UnitUtil.matchDimen(dim);
if (dim && !value) {
throw new tex_TexError('BracketMustBeDimension', 'Bracket argument to %1 must be a dimension', parser.currentCS);
}
n = value + unit;
}
}
parser.Push(parser.itemFactory
.create('cell')
.setProperties({ isCR: true, name: name, linebreak: true }));
const top = parser.stack.Top();
let node;
if (top instanceof ArrayItem) {
if (n) {
top.addRowSpacing(n);
}
}
else {
node = parser.create('node', 'mspace', [], {
linebreak: TexConstant.LineBreak.NEWLINE,
});
if (n) {
tex_NodeUtil.setAttribute(node, 'data-lineleading', n);
}
parser.Push(node);
}
},
HLine(parser, _name, style) {
if (style == null) {
style = 'solid';
}
const top = parser.stack.Top();
if (!(top instanceof ArrayItem) || top.Size()) {
throw new tex_TexError('Misplaced', 'Misplaced %1', parser.currentCS);
}
if (!top.table.length) {
top.frame.push(['top', style]);
}
else {
const lines = top.arraydef['rowlines']
? top.arraydef['rowlines'].split(/ /)
: [];
while (lines.length < top.table.length) {
lines.push('none');
}
lines[top.table.length - 1] = style;
top.arraydef['rowlines'] = lines.join(' ');
}
},
HFill(parser, _name) {
const top = parser.stack.Top();
if (top instanceof ArrayItem) {
top.hfill.push(top.Size());
}
else {
throw new tex_TexError('UnsupportedHFill', 'Unsupported use of %1', parser.currentCS);
}
},
NewColumnType(parser, name) {
const c = parser.GetArgument(name);
const n = parser.GetBrackets(name, '0');
const macro = parser.GetArgument(name);
if (c.length !== 1) {
throw new tex_TexError('BadColumnName', 'Column specifier must be exactly one character: %1', c);
}
if (!n.match(/^\d+$/)) {
throw new tex_TexError('PositiveIntegerArg', 'Argument to %1 must be a positive integer', n);
}
const cparser = parser.configuration.columnParser;
cparser.columnHandler[c] = (state) => cparser.macroColumn(state, macro, parseInt(n));
parser.Push(parser.itemFactory.create('null'));
},
BeginEnd(parser, name) {
const env = parser.GetArgument(name);
if (env.match(/\\/)) {
throw new tex_TexError('InvalidEnv', "Invalid environment name '%1'", env);
}
const macro = parser.configuration.handlers
.get(HandlerType.ENVIRONMENT)
.lookup(env);
if (macro && name === '\\end') {
if (!macro.args[0]) {
const mml = parser.itemFactory.create('end').setProperty('name', env);
parser.Push(mml);
return;
}
parser.stack.env['closing'] = env;
}
ParseUtil.checkMaxMacros(parser, false);
parser.parse(HandlerType.ENVIRONMENT, [parser, env]);
},
Array(parser, begin, open, close, align, spacing, vspacing, style, raggedHeight) {
if (!align) {
align = parser.GetArgument('\\begin{' + begin.getName() + '}');
}
const array = parser.itemFactory.create('array');
if (begin.getName() === 'array') {
array.setProperty('arrayPadding', '.5em .125em');
}
array.parser = parser;
array.arraydef = {
columnspacing: spacing || '1em',
rowspacing: vspacing || '4pt',
};
parser.configuration.columnParser.process(parser, align, array);
if (open) {
array.setProperty('open', parser.convertDelimiter(open));
}
if (close) {
array.setProperty('close', parser.convertDelimiter(close));
}
if ((style || '').charAt(1) === "'") {
array.arraydef['data-cramped'] = true;
style = style.charAt(0);
}
if (style === 'D') {
array.arraydef['displaystyle'] = true;
}
else if (style) {
array.arraydef['displaystyle'] = false;
}
array.arraydef['scriptlevel'] = style === 'S' ? 1 : 0;
if (raggedHeight) {
array.arraydef['useHeight'] = false;
}
parser.Push(begin);
array.StartEntry();
return array;
},
AlignedArray(parser, begin, style = '') {
const align = parser.GetBrackets('\\begin{' + begin.getName() + '}');
const item = BaseMethods.Array(parser, begin, null, null, null, null, null, style);
return ParseUtil.setArrayAlign(item, align);
},
IndentAlign(parser, begin) {
const name = `\\begin{${begin.getName()}}`;
const first = parser.GetBrackets(name, '');
const shift = parser.GetBrackets(name, '');
const last = parser.GetBrackets(name, '');
if ((first && !UnitUtil.matchDimen(first)[0]) ||
(shift && !UnitUtil.matchDimen(shift)[0]) ||
(last && !UnitUtil.matchDimen(last)[0])) {
throw new tex_TexError('BracketMustBeDimension', 'Bracket argument to %1 must be a dimension', name);
}
const lcr = parser.GetArgument(name);
if (lcr && !lcr.match(/^([lcr]{1,3})?$/)) {
throw new tex_TexError('BadAlignment', 'Alignment must be one to three copies of l, c, or r');
}
const align = [...lcr].map((c) => ({ l: 'left', c: 'center', r: 'right' })[c]);
if (align.length === 1) {
align.push(align[0]);
}
const attr = {};
for (const [name, value] of [
['indentshiftfirst', first],
['indentshift', shift || first],
['indentshiftlast', last],
['indentalignfirst', align[0]],
['indentalign', align[1]],
['indentalignlast', align[2]],
]) {
if (value) {
attr[name] = value;
}
}
parser.Push(parser.itemFactory.create('mstyle', attr, begin.getName()));
},
Equation(parser, begin, numbered, display = true) {
parser.configuration.mathItem.display = display;
parser.stack.env.display = display;
ParseUtil.checkEqnEnv(parser);
parser.Push(begin);
return parser.itemFactory
.create('equation', numbered)
.setProperty('name', begin.getName());
},
EqnArray(parser, begin, numbered, taggable, align, balign, spacing) {
const name = begin.getName();
const isGather = name === 'gather' || name === 'gather*';
if (taggable) {
ParseUtil.checkEqnEnv(parser, !isGather);
}
parser.Push(begin);
align = align
.replace(/[^clr]/g, '')
.split('')
.join(' ');
align = align
.replace(/l/g, 'left')
.replace(/r/g, 'right')
.replace(/c/g, 'center');
balign = splitAlignArray(balign);
const newItem = parser.itemFactory.create('eqnarray', name, numbered, taggable, parser.stack.global);
newItem.arraydef = {
displaystyle: true,
columnalign: align,
columnspacing: spacing || '1em',
rowspacing: '3pt',
'data-break-align': balign,
side: parser.options['tagSide'],
minlabelspacing: parser.options['tagIndent'],
};
if (isGather) {
newItem.setProperty('nestable', true);
}
return newItem;
},
HandleNoTag(parser, _name) {
parser.tags.notag();
},
HandleLabel(parser, name) {
const label = parser.GetArgument(name);
if (label === '') {
return;
}
if (!parser.tags.refUpdate) {
if (parser.tags.label) {
throw new tex_TexError('MultipleCommand', 'Multiple %1', parser.currentCS);
}
parser.tags.label = label;
if ((parser.tags.allLabels[label] || parser.tags.labels[label]) &&
!parser.options['ignoreDuplicateLabels']) {
throw new tex_TexError('MultipleLabel', "Label '%1' multiply defined", label);
}
parser.tags.labels[label] = new Label();
}
},
HandleRef(parser, name, eqref) {
const label = parser.GetArgument(name);
let ref = parser.tags.allLabels[label] || parser.tags.labels[label];
if (!ref) {
if (!parser.tags.refUpdate) {
parser.tags.redo = true;
}
ref = new Label();
}
let tag = ref.tag;
if (eqref) {
tag = parser.tags.formatRef(tag);
}
const node = parser.create('node', 'mrow', ParseUtil.internalMath(parser, tag), {
href: parser.tags.formatUrl(ref.id, parser.options.baseURL),
class: 'MathJax_ref',
});
parser.Push(node);
},
Macro(parser, name, macro, argcount, def) {
if (argcount) {
const args = [];
if (def != null) {
const optional = parser.GetBrackets(name);
args.push(optional == null ? def : optional);
}
for (let i = args.length; i < argcount; i++) {
args.push(parser.GetArgument(name));
}
macro = ParseUtil.substituteArgs(parser, args, macro);
}
parser.string = ParseUtil.addArgs(parser, macro, parser.string.slice(parser.i));
parser.i = 0;
ParseUtil.checkMaxMacros(parser);
},
MathChoice(parser, name) {
const D = parser.ParseArg(name);
const T = parser.ParseArg(name);
const S = parser.ParseArg(name);
const SS = parser.ParseArg(name);
parser.Push(parser.create('node', 'MathChoice', [D, T, S, SS]));
},
};
/* harmony default export */ const base_BaseMethods = (BaseMethods);
//# sourceMappingURL=BaseMethods.js.map
;// ./mjs/input/tex/ParseMethods.js
const ParseMethods_MATHVARIANT = TexConstant.Variant;
const ParseMethods = {
variable(parser, c) {
var _a;
const def = ParseUtil.getFontDef(parser);
const env = parser.stack.env;
if (env.multiLetterIdentifiers && env.font !== '') {
c =
((_a = parser.string
.substring(parser.i - 1)
.match(env.multiLetterIdentifiers)) === null || _a === void 0 ? void 0 : _a[0]) || c;
parser.i += c.length - 1;
if (def.mathvariant === ParseMethods_MATHVARIANT.NORMAL &&
env.noAutoOP &&
c.length > 1) {
def.autoOP = false;
}
}
if (!def.mathvariant && ParseUtil.isLatinOrGreekChar(c)) {
const variant = parser.configuration.mathStyle(c);
if (variant) {
def.mathvariant = variant;
}
}
const node = parser.create('token', 'mi', def, c);
parser.Push(node);
},
digit(parser, _c) {
const pattern = parser.configuration.options['numberPattern'];
const n = parser.string.slice(parser.i - 1).match(pattern);
const def = ParseUtil.getFontDef(parser);
if (!n) {
return false;
}
const mml = parser.create('token', 'mn', def, n[0].replace(/[{}]/g, ''));
parser.i += n[0].length - 1;
parser.Push(mml);
return true;
},
controlSequence(parser, _c) {
const name = parser.GetCS();
parser.parse(HandlerType.MACRO, [parser, name]);
},
lcGreek(parser, mchar) {
const def = {
mathvariant: parser.configuration.mathStyle(mchar.char) || ParseMethods_MATHVARIANT.ITALIC,
};
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
ucGreek(parser, mchar) {
const def = {
mathvariant: parser.stack.env['font'] ||
parser.configuration.mathStyle(mchar.char, true) ||
ParseMethods_MATHVARIANT.NORMAL,
};
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
mathchar0mi(parser, mchar) {
const def = mchar.attributes || { mathvariant: ParseMethods_MATHVARIANT.ITALIC };
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
mathchar0mo(parser, mchar) {
const def = mchar.attributes || {};
def['stretchy'] = false;
const node = parser.create('token', 'mo', def, mchar.char);
tex_NodeUtil.setProperty(node, 'fixStretchy', true);
parser.configuration.addNode('fixStretchy', node);
parser.Push(node);
},
mathchar7(parser, mchar) {
const def = mchar.attributes || { mathvariant: ParseMethods_MATHVARIANT.NORMAL };
if (parser.stack.env['font']) {
def['mathvariant'] = parser.stack.env['font'];
}
const node = parser.create('token', 'mi', def, mchar.char);
parser.Push(node);
},
delimiter(parser, delim) {
let def = delim.attributes || {};
def = Object.assign({ fence: false, stretchy: false }, def);
const node = parser.create('token', 'mo', def, delim.char);
parser.Push(node);
},
environment(parser, env, func, args) {
const mml = parser.itemFactory.create('begin').setProperty('name', env);
parser.Push(func(parser, mml, ...args.slice(1)));
},
};
/* harmony default export */ const tex_ParseMethods = (ParseMethods);
//# sourceMappingURL=ParseMethods.js.map
;// ./mjs/input/tex/base/BaseMappings.js
const THICKMATHSPACE = em(MATHSPACE.thickmathspace);
const VARIANT = TexConstant.Variant;
new RegExpMap('letter', tex_ParseMethods.variable, /[a-z]/i);
new RegExpMap('digit', tex_ParseMethods.digit, /[0-9.,]/);
new RegExpMap('command', tex_ParseMethods.controlSequence, /^\\/);
new MacroMap('special', {
'{': base_BaseMethods.Open,
'}': base_BaseMethods.Close,
'~': base_BaseMethods.Tilde,
'^': base_BaseMethods.Superscript,
_: base_BaseMethods.Subscript,
'|': base_BaseMethods.Bar,
' ': base_BaseMethods.Space,
'\t': base_BaseMethods.Space,
'\r': base_BaseMethods.Space,
'\n': base_BaseMethods.Space,
"'": base_BaseMethods.Prime,
'%': base_BaseMethods.Comment,
'&': base_BaseMethods.Entry,
'#': base_BaseMethods.Hash,
'\u00A0': base_BaseMethods.Space,
'\u2019': base_BaseMethods.Prime,
});
new CharacterMap('lcGreek', tex_ParseMethods.lcGreek, {
alpha: '\u03B1',
beta: '\u03B2',
gamma: '\u03B3',
delta: '\u03B4',
epsilon: '\u03F5',
zeta: '\u03B6',
eta: '\u03B7',
theta: '\u03B8',
iota: '\u03B9',
kappa: '\u03BA',
lambda: '\u03BB',
mu: '\u03BC',
nu: '\u03BD',
xi: '\u03BE',
omicron: '\u03BF',
pi: '\u03C0',
rho: '\u03C1',
sigma: '\u03C3',
tau: '\u03C4',
upsilon: '\u03C5',
phi: '\u03D5',
chi: '\u03C7',
psi: '\u03C8',
omega: '\u03C9',
varepsilon: '\u03B5',
vartheta: '\u03D1',
varpi: '\u03D6',
varrho: '\u03F1',
varsigma: '\u03C2',
varphi: '\u03C6',
});
new CharacterMap('ucGreek', tex_ParseMethods.ucGreek, {
Gamma: '\u0393',
Delta: '\u0394',
Theta: '\u0398',
Lambda: '\u039B',
Xi: '\u039E',
Pi: '\u03A0',
Sigma: '\u03A3',
Upsilon: '\u03A5',
Phi: '\u03A6',
Psi: '\u03A8',
Omega: '\u03A9',
});
new CharacterMap('mathchar0mi', tex_ParseMethods.mathchar0mi, {
AA: '\u212B',
S: ['\u00A7', { mathvariant: VARIANT.NORMAL }],
aleph: ['\u2135', { mathvariant: VARIANT.NORMAL }],
hbar: ['\u210F', { variantForm: true }],
imath: '\u0131',
jmath: '\u0237',
ell: '\u2113',
wp: ['\u2118', { mathvariant: VARIANT.NORMAL }],
Re: ['\u211C', { mathvariant: VARIANT.NORMAL }],
Im: ['\u2111', { mathvariant: VARIANT.NORMAL }],
partial: ['\u2202', { mathvariant: VARIANT.ITALIC }],
infty: ['\u221E', { mathvariant: VARIANT.NORMAL }],
prime: ['\u2032', { variantForm: true }],
emptyset: ['\u2205', { mathvariant: VARIANT.NORMAL }],
nabla: ['\u2207', { mathvariant: VARIANT.NORMAL }],
top: ['\u22A4', { mathvariant: VARIANT.NORMAL }],
bot: ['\u22A5', { mathvariant: VARIANT.NORMAL }],
angle: ['\u2220', { mathvariant: VARIANT.NORMAL }],
triangle: ['\u25B3', { mathvariant: VARIANT.NORMAL }],
backslash: ['\\', { mathvariant: VARIANT.NORMAL }],
forall: ['\u2200', { mathvariant: VARIANT.NORMAL }],
exists: ['\u2203', { mathvariant: VARIANT.NORMAL }],
neg: ['\u00AC', { mathvariant: VARIANT.NORMAL }],
lnot: ['\u00AC', { mathvariant: VARIANT.NORMAL }],
flat: ['\u266D', { mathvariant: VARIANT.NORMAL }],
natural: ['\u266E', { mathvariant: VARIANT.NORMAL }],
sharp: ['\u266F', { mathvariant: VARIANT.NORMAL }],
clubsuit: ['\u2663', { mathvariant: VARIANT.NORMAL }],
diamondsuit: ['\u2662', { mathvariant: VARIANT.NORMAL }],
heartsuit: ['\u2661', { mathvariant: VARIANT.NORMAL }],
spadesuit: ['\u2660', { mathvariant: VARIANT.NORMAL }],
});
new CharacterMap('mathchar0mo', tex_ParseMethods.mathchar0mo, {
surd: '\u221A',
coprod: ['\u2210', { movesupsub: true }],
bigvee: ['\u22C1', { movesupsub: true }],
bigwedge: ['\u22C0', { movesupsub: true }],
biguplus: ['\u2A04', { movesupsub: true }],
bigcap: ['\u22C2', { movesupsub: true }],
bigcup: ['\u22C3', { movesupsub: true }],
int: '\u222B',
intop: ['\u222B', { movesupsub: true, movablelimits: true }],
iint: '\u222C',
iiint: '\u222D',
prod: ['\u220F', { movesupsub: true }],
sum: ['\u2211', { movesupsub: true }],
bigotimes: ['\u2A02', { movesupsub: true }],
bigoplus: ['\u2A01', { movesupsub: true }],
bigodot: ['\u2A00', { movesupsub: true }],
oint: '\u222E',
ointop: ['\u222E', { movesupsub: true, movablelimits: true }],
oiint: '\u222F',
oiiint: '\u2230',
bigsqcup: ['\u2A06', { movesupsub: true }],
smallint: ['\u222B', { largeop: false }],
triangleleft: '\u25C3',
triangleright: '\u25B9',
bigtriangleup: '\u25B3',
bigtriangledown: '\u25BD',
wedge: '\u2227',
land: '\u2227',
vee: '\u2228',
lor: '\u2228',
cap: '\u2229',
cup: '\u222A',
ddagger: '\u2021',
dagger: '\u2020',
sqcap: '\u2293',
sqcup: '\u2294',
uplus: '\u228E',
amalg: '\u2A3F',
diamond: '\u22C4',
bullet: '\u2219',
wr: '\u2240',
div: '\u00F7',
odot: ['\u2299', { largeop: false }],
oslash: ['\u2298', { largeop: false }],
otimes: ['\u2297', { largeop: false }],
ominus: ['\u2296', { largeop: false }],
oplus: ['\u2295', { largeop: false }],
mp: '\u2213',
pm: '\u00B1',
circ: '\u2218',
bigcirc: '\u25EF',
setminus: '\u2216',
cdot: '\u22C5',
ast: '\u2217',
times: '\u00D7',
star: '\u22C6',
propto: '\u221D',
sqsubseteq: '\u2291',
sqsupseteq: '\u2292',
parallel: '\u2225',
mid: '\u2223',
dashv: '\u22A3',
vdash: '\u22A2',
leq: '\u2264',
le: '\u2264',
geq: '\u2265',
ge: '\u2265',
lt: '\u003C',
gt: '\u003E',
succ: '\u227B',
prec: '\u227A',
approx: '\u2248',
succeq: '\u2AB0',
preceq: '\u2AAF',
supset: '\u2283',
subset: '\u2282',
supseteq: '\u2287',
subseteq: '\u2286',
in: '\u2208',
ni: '\u220B',
notin: '\u2209',
owns: '\u220B',
gg: '\u226B',
ll: '\u226A',
sim: '\u223C',
simeq: '\u2243',
perp: '\u27C2',
equiv: '\u2261',
asymp: '\u224D',
smile: '\u2323',
frown: '\u2322',
ne: '\u2260',
neq: '\u2260',
cong: '\u2245',
doteq: '\u2250',
bowtie: '\u22C8',
models: '\u22A7',
notChar: '\u29F8',
Leftrightarrow: '\u21D4',
Leftarrow: '\u21D0',
Rightarrow: '\u21D2',
leftrightarrow: '\u2194',
leftarrow: '\u2190',
gets: '\u2190',
rightarrow: '\u2192',
to: ['\u2192', { accent: false }],
mapsto: '\u21A6',
leftharpoonup: '\u21BC',
leftharpoondown: '\u21BD',
rightharpoonup: '\u21C0',
rightharpoondown: '\u21C1',
nearrow: '\u2197',
searrow: '\u2198',
nwarrow: '\u2196',
swarrow: '\u2199',
rightleftharpoons: '\u21CC',
hookrightarrow: '\u21AA',
hookleftarrow: '\u21A9',
longleftarrow: '\u27F5',
Longleftarrow: '\u27F8',
longrightarrow: '\u27F6',
Longrightarrow: '\u27F9',
Longleftrightarrow: '\u27FA',
longleftrightarrow: '\u27F7',
longmapsto: '\u27FC',
ldots: '\u2026',
cdots: '\u22EF',
vdots: '\u22EE',
ddots: '\u22F1',
iddots: '\u22F0',
dotsc: '\u2026',
dotsb: '\u22EF',
dotsm: '\u22EF',
dotsi: '\u22EF',
dotso: '\u2026',
ldotp: ['\u002E', { texClass: TEXCLASS.PUNCT }],
cdotp: ['\u22C5', { texClass: TEXCLASS.PUNCT }],
colon: ['\u003A', { texClass: TEXCLASS.PUNCT }],
});
new CharacterMap('mathchar7', tex_ParseMethods.mathchar7, {
_: '\u005F',
'#': '\u0023',
$: '\u0024',
'%': '\u0025',
'&': '\u0026',
And: '\u0026',
});
new DelimiterMap('delimiter', tex_ParseMethods.delimiter, {
'(': '(',
')': ')',
'[': '[',
']': ']',
'<': '\u27E8',
'>': '\u27E9',
'\\lt': '\u27E8',
'\\gt': '\u27E9',
'/': '/',
'|': ['|', { texClass: TEXCLASS.ORD }],
'.': '',
'\\lmoustache': '\u23B0',
'\\rmoustache': '\u23B1',
'\\lgroup': '\u27EE',
'\\rgroup': '\u27EF',
'\\arrowvert': '\u23D0',
'\\Arrowvert': '\u2016',
'\\bracevert': '\u23AA',
'\\Vert': ['\u2016', { texClass: TEXCLASS.ORD }],
'\\|': ['\u2016', { texClass: TEXCLASS.ORD }],
'\\vert': ['|', { texClass: TEXCLASS.ORD }],
'\\uparrow': '\u2191',
'\\downarrow': '\u2193',
'\\updownarrow': '\u2195',
'\\Uparrow': '\u21D1',
'\\Downarrow': '\u21D3',
'\\Updownarrow': '\u21D5',
'\\backslash': '\\',
'\\rangle': '\u27E9',
'\\langle': '\u27E8',
'\\rbrace': '}',
'\\lbrace': '{',
'\\}': '}',
'\\{': '{',
'\\rceil': '\u2309',
'\\lceil': '\u2308',
'\\rfloor': '\u230B',
'\\lfloor': '\u230A',
'\\lbrack': '[',
'\\rbrack': ']',
});
new CommandMap('macros', {
displaystyle: [base_BaseMethods.SetStyle, 'D', true, 0],
textstyle: [base_BaseMethods.SetStyle, 'T', false, 0],
scriptstyle: [base_BaseMethods.SetStyle, 'S', false, 1],
scriptscriptstyle: [base_BaseMethods.SetStyle, 'SS', false, 2],
rm: [base_BaseMethods.SetFont, VARIANT.NORMAL],
mit: [base_BaseMethods.SetFont, VARIANT.ITALIC],
oldstyle: [base_BaseMethods.SetFont, VARIANT.OLDSTYLE],
cal: [base_BaseMethods.SetFont, VARIANT.CALLIGRAPHIC],
it: [base_BaseMethods.SetFont, VARIANT.MATHITALIC],
bf: [base_BaseMethods.SetFont, VARIANT.BOLD],
sf: [base_BaseMethods.SetFont, VARIANT.SANSSERIF],
tt: [base_BaseMethods.SetFont, VARIANT.MONOSPACE],
frak: [base_BaseMethods.MathFont, VARIANT.FRAKTUR],
Bbb: [base_BaseMethods.MathFont, VARIANT.DOUBLESTRUCK],
mathrm: [base_BaseMethods.MathFont, VARIANT.NORMAL],
mathup: [base_BaseMethods.MathFont, VARIANT.NORMAL],
mathnormal: [base_BaseMethods.MathFont, ''],
mathbf: [base_BaseMethods.MathFont, VARIANT.BOLD],
mathbfup: [base_BaseMethods.MathFont, VARIANT.BOLD],
mathit: [base_BaseMethods.MathFont, VARIANT.MATHITALIC],
mathbfit: [base_BaseMethods.MathFont, VARIANT.BOLDITALIC],
mathbb: [base_BaseMethods.MathFont, VARIANT.DOUBLESTRUCK],
mathfrak: [base_BaseMethods.MathFont, VARIANT.FRAKTUR],
mathbffrak: [base_BaseMethods.MathFont, VARIANT.BOLDFRAKTUR],
mathscr: [base_BaseMethods.MathFont, VARIANT.SCRIPT],
mathbfscr: [base_BaseMethods.MathFont, VARIANT.BOLDSCRIPT],
mathsf: [base_BaseMethods.MathFont, VARIANT.SANSSERIF],
mathsfup: [base_BaseMethods.MathFont, VARIANT.SANSSERIF],
mathbfsf: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
mathbfsfup: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
mathsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFITALIC],
mathbfsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFBOLDITALIC],
mathtt: [base_BaseMethods.MathFont, VARIANT.MONOSPACE],
mathcal: [base_BaseMethods.MathFont, VARIANT.CALLIGRAPHIC],
mathbfcal: [base_BaseMethods.MathFont, VARIANT.BOLDCALLIGRAPHIC],
symrm: [base_BaseMethods.MathFont, VARIANT.NORMAL],
symup: [base_BaseMethods.MathFont, VARIANT.NORMAL],
symnormal: [base_BaseMethods.MathFont, ''],
symbf: [base_BaseMethods.MathFont, VARIANT.BOLD, VARIANT.BOLDITALIC],
symbfup: [base_BaseMethods.MathFont, VARIANT.BOLD],
symit: [base_BaseMethods.MathFont, VARIANT.ITALIC],
symbfit: [base_BaseMethods.MathFont, VARIANT.BOLDITALIC],
symbb: [base_BaseMethods.MathFont, VARIANT.DOUBLESTRUCK],
symfrak: [base_BaseMethods.MathFont, VARIANT.FRAKTUR],
symbffrak: [base_BaseMethods.MathFont, VARIANT.BOLDFRAKTUR],
symscr: [base_BaseMethods.MathFont, VARIANT.SCRIPT],
symbfscr: [base_BaseMethods.MathFont, VARIANT.BOLDSCRIPT],
symsf: [base_BaseMethods.MathFont, VARIANT.SANSSERIF, VARIANT.SANSSERIFITALIC],
symsfup: [base_BaseMethods.MathFont, VARIANT.SANSSERIF],
symbfsf: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
symbfsfup: [base_BaseMethods.MathFont, VARIANT.BOLDSANSSERIF],
symsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFITALIC],
symbfsfit: [base_BaseMethods.MathFont, VARIANT.SANSSERIFBOLDITALIC],
symtt: [base_BaseMethods.MathFont, VARIANT.MONOSPACE],
symcal: [base_BaseMethods.MathFont, VARIANT.CALLIGRAPHIC],
symbfcal: [base_BaseMethods.MathFont, VARIANT.BOLDCALLIGRAPHIC],
textrm: [base_BaseMethods.HBox, null, VARIANT.NORMAL],
textup: [base_BaseMethods.HBox, null, VARIANT.NORMAL],
textnormal: [base_BaseMethods.HBox],
textit: [base_BaseMethods.HBox, null, VARIANT.ITALIC],
textbf: [base_BaseMethods.HBox, null, VARIANT.BOLD],
textsf: [base_BaseMethods.HBox, null, VARIANT.SANSSERIF],
texttt: [base_BaseMethods.HBox, null, VARIANT.MONOSPACE],
tiny: [base_BaseMethods.SetSize, 0.5],
Tiny: [base_BaseMethods.SetSize, 0.6],
scriptsize: [base_BaseMethods.SetSize, 0.7],
small: [base_BaseMethods.SetSize, 0.85],
normalsize: [base_BaseMethods.SetSize, 1.0],
large: [base_BaseMethods.SetSize, 1.2],
Large: [base_BaseMethods.SetSize, 1.44],
LARGE: [base_BaseMethods.SetSize, 1.73],
huge: [base_BaseMethods.SetSize, 2.07],
Huge: [base_BaseMethods.SetSize, 2.49],
arcsin: base_BaseMethods.NamedFn,
arccos: base_BaseMethods.NamedFn,
arctan: base_BaseMethods.NamedFn,
arg: base_BaseMethods.NamedFn,
cos: base_BaseMethods.NamedFn,
cosh: base_BaseMethods.NamedFn,
cot: base_BaseMethods.NamedFn,
coth: base_BaseMethods.NamedFn,
csc: base_BaseMethods.NamedFn,
deg: base_BaseMethods.NamedFn,
det: base_BaseMethods.NamedOp,
dim: base_BaseMethods.NamedFn,
exp: base_BaseMethods.NamedFn,
gcd: base_BaseMethods.NamedOp,
hom: base_BaseMethods.NamedFn,
inf: base_BaseMethods.NamedOp,
ker: base_BaseMethods.NamedFn,
lg: base_BaseMethods.NamedFn,
lim: base_BaseMethods.NamedOp,
liminf: [base_BaseMethods.NamedOp, 'lim inf'],
limsup: [base_BaseMethods.NamedOp, 'lim sup'],
ln: base_BaseMethods.NamedFn,
log: base_BaseMethods.NamedFn,
max: base_BaseMethods.NamedOp,
min: base_BaseMethods.NamedOp,
Pr: base_BaseMethods.NamedOp,
sec: base_BaseMethods.NamedFn,
sin: base_BaseMethods.NamedFn,
sinh: base_BaseMethods.NamedFn,
sup: base_BaseMethods.NamedOp,
tan: base_BaseMethods.NamedFn,
tanh: base_BaseMethods.NamedFn,
limits: [base_BaseMethods.Limits, true],
nolimits: [base_BaseMethods.Limits, false],
overline: [base_BaseMethods.UnderOver, '2015'],
underline: [base_BaseMethods.UnderOver, '2015'],
overbrace: [base_BaseMethods.UnderOver, '23DE', true],
underbrace: [base_BaseMethods.UnderOver, '23DF', true],
overparen: [base_BaseMethods.UnderOver, '23DC'],
underparen: [base_BaseMethods.UnderOver, '23DD'],
overrightarrow: [base_BaseMethods.UnderOver, '2192'],
underrightarrow: [base_BaseMethods.UnderOver, '2192'],
overleftarrow: [base_BaseMethods.UnderOver, '2190'],
underleftarrow: [base_BaseMethods.UnderOver, '2190'],
overleftrightarrow: [base_BaseMethods.UnderOver, '2194'],
underleftrightarrow: [base_BaseMethods.UnderOver, '2194'],
overset: base_BaseMethods.Overset,
underset: base_BaseMethods.Underset,
overunderset: base_BaseMethods.Overunderset,
stackrel: [base_BaseMethods.Macro, '\\mathrel{\\mathop{#2}\\limits^{#1}}', 2],
stackbin: [base_BaseMethods.Macro, '\\mathbin{\\mathop{#2}\\limits^{#1}}', 2],
over: base_BaseMethods.Over,
overwithdelims: base_BaseMethods.Over,
atop: base_BaseMethods.Over,
atopwithdelims: base_BaseMethods.Over,
above: base_BaseMethods.Over,
abovewithdelims: base_BaseMethods.Over,
brace: [base_BaseMethods.Over, '{', '}'],
brack: [base_BaseMethods.Over, '[', ']'],
choose: [base_BaseMethods.Over, '(', ')'],
frac: base_BaseMethods.Frac,
sqrt: base_BaseMethods.Sqrt,
root: base_BaseMethods.Root,
uproot: [base_BaseMethods.MoveRoot, 'upRoot'],
leftroot: [base_BaseMethods.MoveRoot, 'leftRoot'],
left: base_BaseMethods.LeftRight,
right: base_BaseMethods.LeftRight,
middle: base_BaseMethods.LeftRight,
llap: base_BaseMethods.Lap,
rlap: base_BaseMethods.Lap,
raise: base_BaseMethods.RaiseLower,
lower: base_BaseMethods.RaiseLower,
moveleft: base_BaseMethods.MoveLeftRight,
moveright: base_BaseMethods.MoveLeftRight,
',': [base_BaseMethods.Spacer, MATHSPACE.thinmathspace],
':': [base_BaseMethods.Spacer, MATHSPACE.mediummathspace],
'>': [base_BaseMethods.Spacer, MATHSPACE.mediummathspace],
';': [base_BaseMethods.Spacer, MATHSPACE.thickmathspace],
'!': [base_BaseMethods.Spacer, MATHSPACE.negativethinmathspace],
enspace: [base_BaseMethods.Spacer, 0.5],
quad: [base_BaseMethods.Spacer, 1],
qquad: [base_BaseMethods.Spacer, 2],
thinspace: [base_BaseMethods.Spacer, MATHSPACE.thinmathspace],
negthinspace: [base_BaseMethods.Spacer, MATHSPACE.negativethinmathspace],
'*': base_BaseMethods.DiscretionaryTimes,
allowbreak: base_BaseMethods.AllowBreak,
goodbreak: [base_BaseMethods.Linebreak, TexConstant.LineBreak.GOODBREAK],
badbreak: [base_BaseMethods.Linebreak, TexConstant.LineBreak.BADBREAK],
nobreak: [base_BaseMethods.Linebreak, TexConstant.LineBreak.NOBREAK],
break: base_BaseMethods.Break,
hskip: base_BaseMethods.Hskip,
hspace: base_BaseMethods.Hskip,
kern: [base_BaseMethods.Hskip, true],
mskip: base_BaseMethods.Hskip,
mspace: base_BaseMethods.Hskip,
mkern: [base_BaseMethods.Hskip, true],
rule: base_BaseMethods.rule,
Rule: [base_BaseMethods.Rule],
Space: [base_BaseMethods.Rule, 'blank'],
nonscript: base_BaseMethods.Nonscript,
big: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 0.85],
Big: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 1.15],
bigg: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 1.45],
Bigg: [base_BaseMethods.MakeBig, TEXCLASS.ORD, 1.75],
bigl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 0.85],
Bigl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 1.15],
biggl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 1.45],
Biggl: [base_BaseMethods.MakeBig, TEXCLASS.OPEN, 1.75],
bigr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 0.85],
Bigr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 1.15],
biggr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 1.45],
Biggr: [base_BaseMethods.MakeBig, TEXCLASS.CLOSE, 1.75],
bigm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 0.85],
Bigm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 1.15],
biggm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 1.45],
Biggm: [base_BaseMethods.MakeBig, TEXCLASS.REL, 1.75],
mathord: [base_BaseMethods.TeXAtom, TEXCLASS.ORD],
mathop: [base_BaseMethods.TeXAtom, TEXCLASS.OP],
mathopen: [base_BaseMethods.TeXAtom, TEXCLASS.OPEN],
mathclose: [base_BaseMethods.TeXAtom, TEXCLASS.CLOSE],
mathbin: [base_BaseMethods.TeXAtom, TEXCLASS.BIN],
mathrel: [base_BaseMethods.TeXAtom, TEXCLASS.REL],
mathpunct: [base_BaseMethods.TeXAtom, TEXCLASS.PUNCT],
mathinner: [base_BaseMethods.TeXAtom, TEXCLASS.INNER],
vtop: [base_BaseMethods.VBox, 'top'],
vcenter: [base_BaseMethods.VBox, 'center'],
vbox: [base_BaseMethods.VBox, 'bottom'],
hsize: base_BaseMethods.Hsize,
parbox: base_BaseMethods.ParBox,
breakAlign: base_BaseMethods.BreakAlign,
buildrel: base_BaseMethods.BuildRel,
hbox: [base_BaseMethods.HBox, 0],
text: base_BaseMethods.HBox,
mbox: [base_BaseMethods.HBox, 0],
fbox: base_BaseMethods.FBox,
boxed: [base_BaseMethods.Macro, '\\fbox{$\\displaystyle{#1}$}', 1],
framebox: base_BaseMethods.FrameBox,
makebox: base_BaseMethods.MakeBox,
strut: base_BaseMethods.Strut,
mathstrut: [base_BaseMethods.Macro, '\\vphantom{(}'],
phantom: base_BaseMethods.Phantom,
vphantom: [base_BaseMethods.Phantom, 1, 0],
hphantom: [base_BaseMethods.Phantom, 0, 1],
smash: base_BaseMethods.Smash,
acute: [base_BaseMethods.Accent, '00B4'],
grave: [base_BaseMethods.Accent, '0060'],
ddot: [base_BaseMethods.Accent, '00A8'],
dddot: [base_BaseMethods.Accent, '20DB'],
ddddot: [base_BaseMethods.Accent, '20DC'],
tilde: [base_BaseMethods.Accent, '007E'],
bar: [base_BaseMethods.Accent, '00AF'],
breve: [base_BaseMethods.Accent, '02D8'],
check: [base_BaseMethods.Accent, '02C7'],
hat: [base_BaseMethods.Accent, '005E'],
vec: [base_BaseMethods.Accent, '2192', false],
dot: [base_BaseMethods.Accent, '02D9'],
widetilde: [base_BaseMethods.Accent, '007E', true],
widehat: [base_BaseMethods.Accent, '005E', true],
matrix: base_BaseMethods.Matrix,
array: base_BaseMethods.Matrix,
pmatrix: [base_BaseMethods.Matrix, '(', ')'],
cases: [base_BaseMethods.Matrix, '{', '', 'left left', null, '.2em', null, true],
eqalign: [
base_BaseMethods.Matrix,
null,
null,
'right left',
THICKMATHSPACE,
'.5em',
'D',
],
displaylines: [base_BaseMethods.Matrix, null, null, 'center', null, '.5em', 'D'],
cr: base_BaseMethods.Cr,
'\\': base_BaseMethods.CrLaTeX,
newline: [base_BaseMethods.CrLaTeX, true],
hline: base_BaseMethods.HLine,
hdashline: [base_BaseMethods.HLine, 'dashed'],
eqalignno: [
base_BaseMethods.Matrix,
null,
null,
'right left',
THICKMATHSPACE,
'.5em',
'D',
null,
'right',
],
leqalignno: [
base_BaseMethods.Matrix,
null,
null,
'right left',
THICKMATHSPACE,
'.5em',
'D',
null,
'left',
],
hfill: base_BaseMethods.HFill,
hfil: base_BaseMethods.HFill,
hfilll: base_BaseMethods.HFill,
bmod: [
base_BaseMethods.Macro,
'\\mmlToken{mo}[lspace="' +
THICKMATHSPACE +
'"' +
' rspace="' +
THICKMATHSPACE +
'"]{mod}',
],
pmod: [base_BaseMethods.Macro, '\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}', 1],
mod: [
base_BaseMethods.Macro,
'\\mathchoice{\\kern18mu}{\\kern12mu}' +
'{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1',
1,
],
pod: [
base_BaseMethods.Macro,
'\\mathchoice{\\kern18mu}{\\kern8mu}' + '{\\kern8mu}{\\kern8mu}(#1)',
1,
],
iff: [base_BaseMethods.Macro, '\\;\\Longleftrightarrow\\;'],
skew: [base_BaseMethods.Macro, '{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}', 3],
pmb: [base_BaseMethods.Macro, '\\rlap{#1}\\kern1px{#1}', 1],
TeX: [base_BaseMethods.Macro, 'T\\kern-.14em\\lower.5ex{E}\\kern-.115em X'],
LaTeX: [
base_BaseMethods.Macro,
'L\\kern-.325em\\raise.21em' + '{\\scriptstyle{A}}\\kern-.17em\\TeX',
],
not: base_BaseMethods.Not,
dots: base_BaseMethods.Dots,
space: base_BaseMethods.Tilde,
'\u00A0': base_BaseMethods.Tilde,
' ': base_BaseMethods.Tilde,
begin: base_BaseMethods.BeginEnd,
end: base_BaseMethods.BeginEnd,
label: base_BaseMethods.HandleLabel,
ref: base_BaseMethods.HandleRef,
nonumber: base_BaseMethods.HandleNoTag,
newcolumntype: base_BaseMethods.NewColumnType,
mathchoice: base_BaseMethods.MathChoice,
mmlToken: base_BaseMethods.MmlToken,
});
new EnvironmentMap('environment', tex_ParseMethods.environment, {
displaymath: [base_BaseMethods.Equation, null, false],
math: [base_BaseMethods.Equation, null, false, false],
array: [base_BaseMethods.AlignedArray],
darray: [base_BaseMethods.AlignedArray, null, 'D'],
equation: [base_BaseMethods.Equation, null, true],
eqnarray: [
base_BaseMethods.EqnArray,
null,
true,
true,
'rcl',
'bmt',
ParseUtil.cols(0, MATHSPACE.thickmathspace),
'.5em',
],
indentalign: [base_BaseMethods.IndentAlign],
});
new CharacterMap('not_remap', null, {
'\u2190': '\u219A',
'\u2192': '\u219B',
'\u2194': '\u21AE',
'\u21D0': '\u21CD',
'\u21D2': '\u21CF',
'\u21D4': '\u21CE',
'\u2208': '\u2209',
'\u220B': '\u220C',
'\u2223': '\u2224',
'\u2225': '\u2226',
'\u223C': '\u2241',
'\u007E': '\u2241',
'\u2243': '\u2244',
'\u2245': '\u2247',
'\u2248': '\u2249',
'\u224D': '\u226D',
'\u003D': '\u2260',
'\u2261': '\u2262',
'\u003C': '\u226E',
'\u003E': '\u226F',
'\u2264': '\u2270',
'\u2265': '\u2271',
'\u2272': '\u2274',
'\u2273': '\u2275',
'\u2276': '\u2278',
'\u2277': '\u2279',
'\u227A': '\u2280',
'\u227B': '\u2281',
'\u2282': '\u2284',
'\u2283': '\u2285',
'\u2286': '\u2288',
'\u2287': '\u2289',
'\u22A2': '\u22AC',
'\u22A8': '\u22AD',
'\u22A9': '\u22AE',
'\u22AB': '\u22AF',
'\u227C': '\u22E0',
'\u227D': '\u22E1',
'\u2291': '\u22E2',
'\u2292': '\u22E3',
'\u22B2': '\u22EA',
'\u22B3': '\u22EB',
'\u22B4': '\u22EC',
'\u22B5': '\u22ED',
'\u2203': '\u2204',
});
//# sourceMappingURL=BaseMappings.js.map
;// ./mjs/input/tex/base/BaseConfiguration.js
const BaseConfiguration_MATHVARIANT = TexConstant.Variant;
new CharacterMap('remap', null, {
'-': '\u2212',
'*': '\u2217',
'`': '\u2018',
});
function Other(parser, char) {
const font = parser.stack.env['font'];
const ifont = parser.stack.env['italicFont'];
const def = font ? { mathvariant: font } : {};
const remap = MapHandler.getMap('remap').lookup(char);
const range = getRange(char);
const type = range[3];
const mo = parser.create('token', type, def, remap ? remap.char : char);
const style = ParseUtil.isLatinOrGreekChar(char)
? parser.configuration.mathStyle(char, true) || ifont
: '';
const variant = range[4] || (font && style === BaseConfiguration_MATHVARIANT.NORMAL ? '' : style);
if (variant) {
mo.attributes.set('mathvariant', variant);
}
if (type === 'mo') {
tex_NodeUtil.setProperty(mo, 'fixStretchy', true);
parser.configuration.addNode('fixStretchy', mo);
}
parser.Push(mo);
}
function csUndefined(_parser, name) {
throw new tex_TexError('UndefinedControlSequence', 'Undefined control sequence %1', '\\' + name);
}
function envUndefined(_parser, env) {
throw new tex_TexError('UnknownEnv', "Unknown environment '%1'", env);
}
function filterNonscript({ data }) {
for (const mml of data.getList('nonscript')) {
if (mml.attributes.get('scriptlevel') > 0) {
const parent = mml.parent;
parent.childNodes.splice(parent.childIndex(mml), 1);
data.removeFromList(mml.kind, [mml]);
if (mml.isKind('mrow')) {
const mstyle = mml.childNodes[0];
data.removeFromList('mstyle', [mstyle]);
data.removeFromList('mspace', mstyle.childNodes[0].childNodes);
}
}
else if (mml.isKind('mrow')) {
mml.parent.replaceChild(mml.childNodes[0], mml);
data.removeFromList('mrow', [mml]);
}
}
}
class BaseTags extends AbstractTags {
}
const BaseConfiguration = Configuration.create('base', {
[ConfigurationType.CONFIG]: function (config, jax) {
const options = jax.parseOptions.options;
if (options.digits) {
options.numberPattern = options.digits;
}
new RegExpMap('digit', tex_ParseMethods.digit, options.initialDigit);
new RegExpMap('letter', tex_ParseMethods.variable, options.initialLetter);
const handler = config.handlers.get(HandlerType.CHARACTER);
handler.add(['letter', 'digit'], null, 4);
},
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['command', 'special'],
[HandlerType.DELIMITER]: ['delimiter'],
[HandlerType.MACRO]: [
'delimiter',
'macros',
'lcGreek',
'ucGreek',
'mathchar0mi',
'mathchar0mo',
'mathchar7',
],
[HandlerType.ENVIRONMENT]: ['environment'],
},
[ConfigurationType.FALLBACK]: {
[HandlerType.CHARACTER]: Other,
[HandlerType.MACRO]: csUndefined,
[HandlerType.ENVIRONMENT]: envUndefined,
},
[ConfigurationType.ITEMS]: {
[StartItem.prototype.kind]: StartItem,
[StopItem.prototype.kind]: StopItem,
[OpenItem.prototype.kind]: OpenItem,
[CloseItem.prototype.kind]: CloseItem,
[NullItem.prototype.kind]: NullItem,
[PrimeItem.prototype.kind]: PrimeItem,
[SubsupItem.prototype.kind]: SubsupItem,
[OverItem.prototype.kind]: OverItem,
[LeftItem.prototype.kind]: LeftItem,
[Middle.prototype.kind]: Middle,
[RightItem.prototype.kind]: RightItem,
[BreakItem.prototype.kind]: BreakItem,
[BeginItem.prototype.kind]: BeginItem,
[EndItem.prototype.kind]: EndItem,
[StyleItem.prototype.kind]: StyleItem,
[PositionItem.prototype.kind]: PositionItem,
[CellItem.prototype.kind]: CellItem,
[MmlItem.prototype.kind]: MmlItem,
[FnItem.prototype.kind]: FnItem,
[NotItem.prototype.kind]: NotItem,
[NonscriptItem.prototype.kind]: NonscriptItem,
[DotsItem.prototype.kind]: DotsItem,
[ArrayItem.prototype.kind]: ArrayItem,
[EqnArrayItem.prototype.kind]: EqnArrayItem,
[EquationItem.prototype.kind]: EquationItem,
[MstyleItem.prototype.kind]: MstyleItem,
},
[ConfigurationType.OPTIONS]: {
maxMacros: 1000,
digits: '',
numberPattern: /^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,
initialDigit: /[0-9.,]/,
identifierPattern: /^[a-zA-Z]+/,
initialLetter: /[a-zA-Z]/,
baseURL: !context.document ||
context.document.getElementsByTagName('base').length === 0
? ''
: String(context.document.location).replace(/#.*$/, ''),
},
[ConfigurationType.TAGS]: {
base: BaseTags,
},
[ConfigurationType.POSTPROCESSORS]: [[filterNonscript, -4]],
});
//# sourceMappingURL=BaseConfiguration.js.map
;// ./mjs/input/tex.js
class TeX extends AbstractInputJax {
static configure(packages) {
const configuration = new ParserConfiguration(packages, ['tex']);
configuration.init();
return configuration;
}
static tags(options, configuration) {
TagsFactory.addTags(configuration.tags);
TagsFactory.setDefault(options.options.tags);
options.tags = TagsFactory.getDefault();
options.tags.configuration = options;
}
constructor(options = {}) {
const [rest, tex, find] = separateOptions(options, TeX.OPTIONS, FindTeX.OPTIONS);
super(tex);
this.findTeX = this.options['FindTeX'] || new FindTeX(find);
const packages = this.options.packages;
const configuration = (this.configuration = TeX.configure(packages));
const parseOptions = (this._parseOptions = new tex_ParseOptions(configuration, [
this.options,
TagsFactory.OPTIONS,
]));
userOptions(parseOptions.options, rest);
configuration.config(this);
TeX.tags(parseOptions, configuration);
this.postFilters.addList([
[tex_FilterUtil.cleanSubSup, -7],
[tex_FilterUtil.setInherited, -6],
[tex_FilterUtil.checkScriptlevel, -5],
[tex_FilterUtil.moveLimits, -4],
[tex_FilterUtil.cleanStretchy, -3],
[tex_FilterUtil.cleanAttributes, -2],
[tex_FilterUtil.combineRelations, -1],
]);
}
setMmlFactory(mmlFactory) {
super.setMmlFactory(mmlFactory);
this._parseOptions.nodeFactory.setMmlFactory(mmlFactory);
}
get parseOptions() {
return this._parseOptions;
}
reset(tag = 0) {
this.parseOptions.tags.reset(tag);
}
compile(math, document) {
this.parseOptions.clear();
this.parseOptions.mathItem = math;
this.executeFilters(this.preFilters, math, document, this.parseOptions);
this.latex = math.math;
let node;
this.parseOptions.tags.startEquation(math);
let parser;
try {
parser = new TexParser(this.latex, { display: math.display, isInner: false }, this.parseOptions);
node = parser.mml();
}
catch (err) {
if (!(err instanceof tex_TexError)) {
throw err;
}
this.parseOptions.error = true;
node = this.options.formatError(this, err);
}
node = this.parseOptions.nodeFactory.create('node', 'math', [node]);
node.attributes.set(TexConstant.Attr.LATEX, this.latex);
if (math.display) {
tex_NodeUtil.setAttribute(node, 'display', 'block');
}
this.parseOptions.tags.finishEquation(math);
this.parseOptions.root = node;
this.executeFilters(this.postFilters, math, document, this.parseOptions);
if (parser && parser.stack.env.hsize) {
tex_NodeUtil.setAttribute(node, 'maxwidth', parser.stack.env.hsize);
tex_NodeUtil.setAttribute(node, 'overflow', 'linebreak');
}
this.mathNode = this.parseOptions.root;
return this.mathNode;
}
findMath(strings) {
return this.findTeX.findMath(strings);
}
formatError(err) {
const message = err.message.replace(/\n.*/, '');
return this.parseOptions.nodeFactory.create('error', message, err.id, this.latex);
}
}
TeX.NAME = 'TeX';
TeX.OPTIONS = Object.assign(Object.assign({}, AbstractInputJax.OPTIONS), { FindTeX: null, packages: ['base'], maxBuffer: 5 * 1024, maxTemplateSubtitutions: 10000, mathStyle: 'TeX', formatError: (jax, err) => jax.formatError(err) });
//# sourceMappingURL=tex.js.map
;// ./mjs/input/tex/ams/AmsItems.js
class MultlineItem extends ArrayItem {
constructor(factory, ...args) {
super(factory);
this.factory.configuration.tags.start('multline', true, args[0]);
}
get kind() {
return 'multline';
}
EndEntry() {
if (this.table.length) {
ParseUtil.fixInitialMO(this.factory.configuration, this.nodes);
}
const shove = this.getProperty('shove');
const mtd = this.create('node', 'mtd', this.nodes, shove ? { columnalign: shove } : {});
this.setProperty('shove', null);
this.row.push(mtd);
this.Clear();
}
EndRow() {
if (this.row.length !== 1) {
throw new tex_TexError('MultlineRowsOneCol', 'The rows within the %1 environment must have exactly one column', 'multline');
}
const row = this.create('node', 'mtr', this.row);
this.table.push(row);
this.row = [];
}
EndTable() {
super.EndTable();
if (this.table.length) {
const m = this.table.length - 1;
let label = -1;
if (!tex_NodeUtil.getAttribute(tex_NodeUtil.getChildren(this.table[0])[0], 'columnalign')) {
tex_NodeUtil.setAttribute(tex_NodeUtil.getChildren(this.table[0])[0], 'columnalign', TexConstant.Align.LEFT);
}
if (!tex_NodeUtil.getAttribute(tex_NodeUtil.getChildren(this.table[m])[0], 'columnalign')) {
tex_NodeUtil.setAttribute(tex_NodeUtil.getChildren(this.table[m])[0], 'columnalign', TexConstant.Align.RIGHT);
}
const tag = this.factory.configuration.tags.getTag();
if (tag) {
label =
this.arraydef.side === TexConstant.Align.LEFT
? 0
: this.table.length - 1;
const mtr = this.table[label];
const mlabel = this.create('node', 'mlabeledtr', [tag].concat(tex_NodeUtil.getChildren(mtr)));
tex_NodeUtil.copyAttributes(mtr, mlabel);
this.table[label] = mlabel;
}
}
this.factory.configuration.tags.end();
}
}
class FlalignItem extends EqnArrayItem {
get kind() {
return 'flalign';
}
constructor(factory, name, numbered, padded, center) {
super(factory);
this.name = name;
this.numbered = numbered;
this.padded = padded;
this.center = center;
this.factory.configuration.tags.start(name, numbered, numbered);
}
EndEntry() {
super.EndEntry();
const n = this.getProperty('xalignat');
if (!n)
return;
if (this.row.length > n) {
throw new tex_TexError('XalignOverflow', 'Extra %1 in row of %2', '&', this.name);
}
}
EndRow() {
let cell;
const row = this.row;
const n = this.getProperty('xalignat');
while (row.length < n) {
row.push(this.create('node', 'mtd'));
}
this.row = [];
if (this.padded) {
this.row.push(this.create('node', 'mtd'));
}
while ((cell = row.shift())) {
this.row.push(cell);
cell = row.shift();
if (cell)
this.row.push(cell);
if (row.length || this.padded) {
this.row.push(this.create('node', 'mtd'));
}
}
if (this.row.length > this.maxrow) {
this.maxrow = this.row.length;
}
super.EndRow();
const mtr = this.table[this.table.length - 1];
if (this.getProperty('zeroWidthLabel') && mtr.isKind('mlabeledtr')) {
const mtd = tex_NodeUtil.getChildren(mtr)[0];
const side = this.factory.configuration.options['tagSide'];
const def = Object.assign({ width: 0 }, (side === 'right' ? { lspace: '-1width' } : {}));
const mpadded = this.create('node', 'mpadded', tex_NodeUtil.getChildren(mtd), def);
mtd.setChildren([mpadded]);
}
}
EndTable() {
super.EndTable();
if (this.center) {
if (this.maxrow <= 2) {
const def = this.arraydef;
delete def.width;
delete this.global.indentalign;
}
}
}
}
//# sourceMappingURL=AmsItems.js.map
;// ./mjs/input/tex/newcommand/NewcommandUtil.js
var NewcommandTables;
(function (NewcommandTables) {
NewcommandTables["NEW_DELIMITER"] = "new-Delimiter";
NewcommandTables["NEW_COMMAND"] = "new-Command";
NewcommandTables["NEW_ENVIRONMENT"] = "new-Environment";
})(NewcommandTables || (NewcommandTables = {}));
const NewcommandPriority = -100;
const NewcommandUtil = {
GetCSname(parser, cmd) {
const c = parser.GetNext();
if (c !== '\\') {
throw new tex_TexError('MissingCS', '%1 must be followed by a control sequence', cmd);
}
const cs = UnitUtil.trimSpaces(parser.GetArgument(cmd)).substring(1);
this.checkProtectedMacros(parser, cs);
return cs;
},
GetCsNameArgument(parser, name) {
let cs = UnitUtil.trimSpaces(parser.GetArgument(name));
if (cs.charAt(0) === '\\') {
cs = cs.substring(1);
}
if (!cs.match(/^(.|[a-z]+)$/i)) {
throw new tex_TexError('IllegalControlSequenceName', 'Illegal control sequence name for %1', name);
}
this.checkProtectedMacros(parser, cs);
return cs;
},
GetArgCount(parser, name) {
let n = parser.GetBrackets(name);
if (n) {
n = UnitUtil.trimSpaces(n);
if (!n.match(/^[0-9]+$/)) {
throw new tex_TexError('IllegalParamNumber', 'Illegal number of parameters specified in %1', name);
}
}
return n;
},
GetTemplate(parser, cmd, cs) {
let c = parser.GetNext();
const params = [];
let n = 0;
let i = parser.i;
while (parser.i < parser.string.length) {
c = parser.GetNext();
if (c === '#') {
if (i !== parser.i) {
params[n] = parser.string.substring(i, parser.i);
}
c = parser.string.charAt(++parser.i);
if (!c.match(/^[1-9]$/)) {
throw new tex_TexError('CantUseHash2', 'Illegal use of # in template for %1', cs);
}
if (parseInt(c) !== ++n) {
throw new tex_TexError('SequentialParam', 'Parameters for %1 must be numbered sequentially', cs);
}
i = parser.i + 1;
}
else if (c === '{') {
if (i !== parser.i) {
params[n] = parser.string.substring(i, parser.i);
}
if (params.length > 0) {
return [n.toString()].concat(params);
}
else {
return n;
}
}
parser.i++;
}
throw new tex_TexError('MissingReplacementString', 'Missing replacement string for definition of %1', cmd);
},
GetParameter(parser, name, param) {
if (param == null) {
return parser.GetArgument(name);
}
let i = parser.i;
let j = 0;
let hasBraces = false;
while (parser.i < parser.string.length) {
const c = parser.string.charAt(parser.i);
if (c === '{') {
hasBraces = parser.i === i;
parser.GetArgument(name);
j = parser.i - i;
}
else if (this.MatchParam(parser, param)) {
if (hasBraces) {
i++;
j -= 2;
}
return parser.string.substring(i, i + j);
}
else if (c === '\\') {
parser.i++;
j++;
hasBraces = false;
const match = parser.string.substring(parser.i).match(/[a-z]+|./i);
if (match) {
parser.i += match[0].length;
j = parser.i - i;
}
}
else {
parser.i++;
j++;
hasBraces = false;
}
}
throw new tex_TexError('RunawayArgument', 'Runaway argument for %1?', name);
},
MatchParam(parser, param) {
if (parser.string.substring(parser.i, parser.i + param.length) !== param) {
return 0;
}
if (param.match(/\\[a-z]+$/i) &&
parser.string.charAt(parser.i + param.length).match(/[a-z]/i)) {
return 0;
}
parser.i += param.length;
return 1;
},
checkGlobal(parser, tokens, maps) {
return (parser.stack.env.isGlobal
? parser.configuration.packageData
.get('begingroup')
.stack.checkGlobal(tokens, maps)
: maps.map((name) => parser.configuration.handlers.retrieve(name)));
},
checkProtectedMacros(parser, cs) {
var _a;
if ((_a = parser.options.protectedMacros) === null || _a === void 0 ? void 0 : _a.includes(cs)) {
throw new tex_TexError('ProtectedMacro', "The control sequence %1 can't be redefined", `\\${cs}`);
}
},
addDelimiter(parser, cs, char, attr) {
const name = cs.substring(1);
this.checkProtectedMacros(parser, name);
const [macros, delims] = NewcommandUtil.checkGlobal(parser, [name, cs], [NewcommandTables.NEW_COMMAND, NewcommandTables.NEW_DELIMITER]);
if (name !== cs) {
macros.remove(name);
}
delims.add(cs, new Token(cs, char, attr));
delete parser.stack.env.isGlobal;
},
addMacro(parser, cs, func, attr, token = '') {
this.checkProtectedMacros(parser, cs);
const macros = NewcommandUtil.checkGlobal(parser, [cs], [NewcommandTables.NEW_COMMAND])[0];
this.undefineDelimiter(parser, '\\' + cs);
macros.add(cs, new Macro(token ? token : cs, func, attr));
delete parser.stack.env.isGlobal;
},
addEnvironment(parser, env, func, attr) {
const envs = NewcommandUtil.checkGlobal(parser, [env], [NewcommandTables.NEW_ENVIRONMENT])[0];
envs.add(env, new Macro(env, func, attr));
delete parser.stack.env.isGlobal;
},
undefineMacro(parser, cs) {
const macros = NewcommandUtil.checkGlobal(parser, [cs], [NewcommandTables.NEW_COMMAND])[0];
macros.remove(cs);
if (parser.configuration.handlers.get(HandlerType.MACRO).applicable(cs)) {
macros.add(cs, new Macro(cs, () => SubHandler.FALLBACK, []));
this.undefineDelimiter(parser, '\\' + cs);
}
delete parser.stack.env.isGlobal;
},
undefineDelimiter(parser, cs) {
const delims = NewcommandUtil.checkGlobal(parser, [cs], [NewcommandTables.NEW_DELIMITER])[0];
delims.remove(cs);
if (parser.configuration.handlers.get(HandlerType.DELIMITER).applicable(cs)) {
delims.add(cs, new Token(cs, null, {}));
}
delete parser.stack.env.isGlobal;
},
};
//# sourceMappingURL=NewcommandUtil.js.map
;// ./mjs/input/tex/ams/AmsMethods.js
function splitSideSet(mml) {
if (!mml || (mml.isInferred && mml.childNodes.length === 0)) {
return [null, null];
}
if (mml.isKind('msubsup') && checkSideSetBase(mml)) {
return [mml, null];
}
const child = tex_NodeUtil.getChildAt(mml, 0);
if (!(mml.isInferred && child && checkSideSetBase(child))) {
return [null, mml];
}
mml.childNodes.splice(0, 1);
return [child, mml];
}
function checkSideSetBase(mml) {
const base = mml.childNodes[0];
return (base && base.isKind('mi') && base.getText() === '');
}
const AmsMethods = {
AmsEqnArray(parser, begin, numbered, taggable, align, balign, spacing, style) {
const args = parser.GetBrackets('\\begin{' + begin.getName() + '}');
const array = base_BaseMethods.EqnArray(parser, begin, numbered, taggable, align, balign, spacing, style);
return ParseUtil.setArrayAlign(array, args, parser);
},
AlignAt(parser, begin, numbered, taggable) {
const name = begin.getName();
let valign;
let align = '';
let balign = '';
const spacing = [];
if (!taggable) {
valign = parser.GetBrackets('\\begin{' + name + '}');
}
const n = parser.GetArgument('\\begin{' + name + '}');
if (n.match(/[^0-9]/)) {
throw new tex_TexError('PositiveIntegerArg', 'Argument to %1 must be a positive integer', '\\begin{' + name + '}');
}
let count = parseInt(n, 10);
while (count > 0) {
align += 'rl';
balign += 'bt';
spacing.push('0em 0em');
count--;
}
const spaceStr = spacing.join(' ');
if (taggable) {
return AmsMethods.EqnArray(parser, begin, numbered, taggable, align, balign, spaceStr);
}
const array = AmsMethods.EqnArray(parser, begin, numbered, taggable, align, balign, spaceStr);
return ParseUtil.setArrayAlign(array, valign, parser);
},
Multline(parser, begin, numbered) {
ParseUtil.checkEqnEnv(parser);
parser.Push(begin);
const padding = parser.options.ams['multlineIndent'];
const item = parser.itemFactory.create('multline', numbered, parser.stack);
item.arraydef = {
displaystyle: true,
rowspacing: '.5em',
columnspacing: '100%',
width: parser.options.ams['multlineWidth'],
side: parser.options['tagSide'],
minlabelspacing: parser.options['tagIndent'],
'data-array-padding': `${padding} ${padding}`,
'data-width-includes-label': true,
};
return item;
},
XalignAt(parser, begin, numbered, padded) {
const n = parser.GetArgument('\\begin{' + begin.getName() + '}');
if (n.match(/[^0-9]/)) {
throw new tex_TexError('PositiveIntegerArg', 'Argument to %1 must be a positive integer', '\\begin{' + begin.getName() + '}');
}
const align = padded ? 'crl' : 'rlc';
const balign = padded ? 'mbt' : 'btm';
const width = padded ? 'fit auto auto' : 'auto auto fit';
const item = AmsMethods.FlalignArray(parser, begin, numbered, padded, false, align, balign, width, true);
item.setProperty('xalignat', 2 * parseInt(n));
return item;
},
FlalignArray(parser, begin, numbered, padded, center, align, balign, width, zeroWidthLabel = false) {
ParseUtil.checkEqnEnv(parser);
parser.Push(begin);
align = align
.split('')
.join(' ')
.replace(/r/g, 'right')
.replace(/l/g, 'left')
.replace(/c/g, 'center');
balign = splitAlignArray(balign);
const item = parser.itemFactory.create('flalign', begin.getName(), numbered, padded, center, parser.stack);
item.arraydef = {
width: '100%',
displaystyle: true,
columnalign: align,
columnspacing: '0em',
columnwidth: width,
rowspacing: '3pt',
'data-break-align': balign,
side: parser.options['tagSide'],
minlabelspacing: zeroWidthLabel ? '0' : parser.options['tagIndent'],
'data-width-includes-label': true,
};
item.setProperty('zeroWidthLabel', zeroWidthLabel);
return item;
},
HandleDeclareOp(parser, name) {
const star = parser.GetStar() ? '*' : '';
const cs = NewcommandUtil.GetCsNameArgument(parser, name);
const op = parser.GetArgument(name);
NewcommandUtil.addMacro(parser, cs, AmsMethods.Macro, [
`\\operatorname${star}{${op}}`,
]);
parser.Push(parser.itemFactory.create('null'));
},
HandleOperatorName(parser, name) {
const star = parser.GetStar();
const op = UnitUtil.trimSpaces(parser.GetArgument(name));
let mml = new TexParser(op, Object.assign(Object.assign({}, parser.stack.env), { font: TexConstant.Variant.NORMAL, multiLetterIdentifiers: parser.options.ams.operatornamePattern, operatorLetters: true }), parser.configuration).mml();
if (!mml.isKind('mi')) {
mml = parser.create('node', 'TeXAtom', [mml]);
}
tex_NodeUtil.setProperties(mml, {
movesupsub: star,
movablelimits: true,
texClass: TEXCLASS.OP,
});
if (!star) {
const c = parser.GetNext();
const i = parser.i;
if (c === '\\' && ++parser.i && parser.GetCS() !== 'limits') {
parser.i = i;
}
}
parser.Push(parser.itemFactory.create('fn', mml));
},
SideSet(parser, name) {
const [preScripts, preRest] = splitSideSet(parser.ParseArg(name));
const [postScripts, postRest] = splitSideSet(parser.ParseArg(name));
const base = parser.ParseArg(name);
let mml = base;
if (preScripts) {
if (preRest) {
preScripts.replaceChild(parser.create('node', 'mphantom', [
parser.create('node', 'mpadded', [ParseUtil.copyNode(base, parser)], { width: 0 }),
]), tex_NodeUtil.getChildAt(preScripts, 0));
}
else {
mml = parser.create('node', 'mmultiscripts', [base]);
if (postScripts) {
tex_NodeUtil.appendChildren(mml, [
tex_NodeUtil.getChildAt(postScripts, 1) ||
parser.create('node', 'none'),
tex_NodeUtil.getChildAt(postScripts, 2) ||
parser.create('node', 'none'),
]);
}
tex_NodeUtil.setProperty(mml, 'scriptalign', 'left');
tex_NodeUtil.appendChildren(mml, [
parser.create('node', 'mprescripts'),
tex_NodeUtil.getChildAt(preScripts, 1) || parser.create('node', 'none'),
tex_NodeUtil.getChildAt(preScripts, 2) || parser.create('node', 'none'),
]);
}
}
if (postScripts && mml === base) {
postScripts.replaceChild(base, tex_NodeUtil.getChildAt(postScripts, 0));
mml = postScripts;
}
const mrow = parser.create('node', 'TeXAtom', [], {
texClass: TEXCLASS.OP,
movesupsub: true,
movablelimits: true,
});
if (preRest) {
if (preScripts) {
mrow.appendChild(preScripts);
}
mrow.appendChild(preRest);
}
mrow.appendChild(mml);
if (postRest) {
mrow.appendChild(postRest);
}
parser.Push(mrow);
},
operatorLetter(parser, c) {
return parser.stack.env.operatorLetters
? tex_ParseMethods.variable(parser, c)
: false;
},
MultiIntegral(parser, name, integral) {
let next = parser.GetNext();
if (next === '\\') {
const i = parser.i;
next = parser.GetArgument(name);
parser.i = i;
if (next === '\\limits') {
integral = '\\!\\!\\mathop{\\,\\,' + integral + '}';
}
}
parser.string = integral + ' ' + parser.string.slice(parser.i);
parser.i = 0;
},
xArrow(parser, name, chr, l, r, m = 0) {
const def = {
width: '+' + UnitUtil.em((l + r) / 18),
lspace: UnitUtil.em(l / 18),
};
const bot = parser.GetBrackets(name);
const first = parser.ParseArg(name);
const dstrut = parser.create('node', 'mspace', [], { depth: '.2em' });
let arrow = parser.create('token', 'mo', { stretchy: true, texClass: TEXCLASS.REL }, String.fromCodePoint(chr));
if (m) {
arrow.attributes.set('minsize', UnitUtil.em(m));
}
arrow = parser.create('node', 'mstyle', [arrow], { scriptlevel: 0 });
const mml = parser.create('node', 'munderover', [arrow]);
let mpadded = parser.create('node', 'mpadded', [first, dstrut], def);
tex_NodeUtil.setAttribute(mpadded, 'voffset', '-.2em');
tex_NodeUtil.setAttribute(mpadded, 'height', '-.2em');
tex_NodeUtil.setChild(mml, mml.over, mpadded);
if (bot) {
const bottom = new TexParser(bot, parser.stack.env, parser.configuration).mml();
const bstrut = parser.create('node', 'mspace', [], { height: '.75em' });
mpadded = parser.create('node', 'mpadded', [bottom, bstrut], def);
tex_NodeUtil.setAttribute(mpadded, 'voffset', '.15em');
tex_NodeUtil.setAttribute(mpadded, 'depth', '-.15em');
tex_NodeUtil.setChild(mml, mml.under, mpadded);
}
tex_NodeUtil.setProperty(mml, 'subsupOK', true);
parser.Push(mml);
},
HandleShove(parser, _name, shove) {
const top = parser.stack.Top();
if (top.kind !== 'multline') {
throw new tex_TexError('CommandOnlyAllowedInEnv', '%1 only allowed in %2 environment', parser.currentCS, 'multline');
}
if (top.Size()) {
throw new tex_TexError('CommandAtTheBeginingOfLine', '%1 must come at the beginning of the line', parser.currentCS);
}
top.setProperty('shove', shove);
},
CFrac(parser, name) {
let lr = UnitUtil.trimSpaces(parser.GetBrackets(name, ''));
const num = parser.GetArgument(name);
const den = parser.GetArgument(name);
const lrMap = {
l: TexConstant.Align.LEFT,
r: TexConstant.Align.RIGHT,
'': '',
};
const numNode = new TexParser('\\strut\\textstyle{' + num + '}', parser.stack.env, parser.configuration).mml();
const denNode = new TexParser('\\strut\\textstyle{' + den + '}', parser.stack.env, parser.configuration).mml();
const frac = parser.create('node', 'mfrac', [numNode, denNode]);
lr = lrMap[lr];
if (lr == null) {
throw new tex_TexError('IllegalAlign', 'Illegal alignment specified in %1', parser.currentCS);
}
if (lr) {
tex_NodeUtil.setProperties(frac, { numalign: lr, denomalign: lr });
}
parser.Push(frac);
},
Genfrac(parser, name, left, right, thick, style) {
if (left == null) {
left = parser.GetDelimiterArg(name);
}
if (right == null) {
right = parser.GetDelimiterArg(name);
}
if (thick == null) {
thick = parser.GetArgument(name);
}
if (style == null) {
style = UnitUtil.trimSpaces(parser.GetArgument(name));
}
const num = parser.ParseArg(name);
const den = parser.ParseArg(name);
let frac = parser.create('node', 'mfrac', [num, den]);
if (thick !== '') {
tex_NodeUtil.setAttribute(frac, 'linethickness', thick);
}
if (left || right) {
tex_NodeUtil.setProperty(frac, 'withDelims', true);
frac = ParseUtil.fixedFence(parser.configuration, left, frac, right);
}
if (style !== '') {
const styleDigit = parseInt(style, 10);
const styleAlpha = ['D', 'T', 'S', 'SS'][styleDigit];
if (styleAlpha == null) {
throw new tex_TexError('BadMathStyleFor', 'Bad math style for %1', parser.currentCS);
}
frac = parser.create('node', 'mstyle', [frac]);
if (styleAlpha === 'D') {
tex_NodeUtil.setProperties(frac, { displaystyle: true, scriptlevel: 0 });
}
else {
tex_NodeUtil.setProperties(frac, {
displaystyle: false,
scriptlevel: styleDigit - 1,
});
}
}
parser.Push(frac);
},
HandleTag(parser, name) {
if (!parser.tags.currentTag.taggable && parser.tags.env) {
throw new tex_TexError('CommandNotAllowedInEnv', '%1 not allowed in %2 environment', parser.currentCS, parser.tags.env);
}
if (parser.tags.currentTag.tag) {
throw new tex_TexError('MultipleCommand', 'Multiple %1', parser.currentCS);
}
const star = parser.GetStar();
const tagId = UnitUtil.trimSpaces(parser.GetArgument(name));
parser.tags.tag(tagId, star);
parser.Push(parser.itemFactory.create('null'));
},
HandleNoTag: base_BaseMethods.HandleNoTag,
HandleRef: base_BaseMethods.HandleRef,
Macro: base_BaseMethods.Macro,
Accent: base_BaseMethods.Accent,
Tilde: base_BaseMethods.Tilde,
Array: base_BaseMethods.Array,
Spacer: base_BaseMethods.Spacer,
NamedOp: base_BaseMethods.NamedOp,
EqnArray: base_BaseMethods.EqnArray,
Equation: base_BaseMethods.Equation,
};
//# sourceMappingURL=AmsMethods.js.map
;// ./mjs/input/tex/ams/AmsMappings.js
new CharacterMap('AMSmath-mathchar0mo', tex_ParseMethods.mathchar0mo, {
iiiint: ['\u2A0C', { texClass: TEXCLASS.OP }],
});
new RegExpMap('AMSmath-operatorLetter', AmsMethods.operatorLetter, /[-*]/i);
new CommandMap('AMSmath-macros', {
mathring: [AmsMethods.Accent, '02DA'],
nobreakspace: AmsMethods.Tilde,
negmedspace: [AmsMethods.Spacer, MATHSPACE.negativemediummathspace],
negthickspace: [AmsMethods.Spacer, MATHSPACE.negativethickmathspace],
idotsint: [AmsMethods.MultiIntegral, '\\int\\cdots\\int'],
dddot: [AmsMethods.Accent, '20DB'],
ddddot: [AmsMethods.Accent, '20DC'],
sideset: AmsMethods.SideSet,
boxed: [AmsMethods.Macro, '\\fbox{$\\displaystyle{#1}$}', 1],
tag: AmsMethods.HandleTag,
notag: AmsMethods.HandleNoTag,
eqref: [AmsMethods.HandleRef, true],
substack: [AmsMethods.Macro, '\\begin{subarray}{c}#1\\end{subarray}', 1],
injlim: [AmsMethods.NamedOp, 'inj lim'],
projlim: [AmsMethods.NamedOp, 'proj lim'],
varliminf: [AmsMethods.Macro, '\\mathop{\\underline{\\mmlToken{mi}{lim}}}'],
varlimsup: [AmsMethods.Macro, '\\mathop{\\overline{\\mmlToken{mi}{lim}}}'],
varinjlim: [
AmsMethods.Macro,
'\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}}}',
],
varprojlim: [
AmsMethods.Macro,
'\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}}}',
],
DeclareMathOperator: AmsMethods.HandleDeclareOp,
operatorname: AmsMethods.HandleOperatorName,
genfrac: AmsMethods.Genfrac,
frac: [AmsMethods.Genfrac, '', '', '', ''],
tfrac: [AmsMethods.Genfrac, '', '', '', '1'],
dfrac: [AmsMethods.Genfrac, '', '', '', '0'],
binom: [AmsMethods.Genfrac, '(', ')', '0', ''],
tbinom: [AmsMethods.Genfrac, '(', ')', '0', '1'],
dbinom: [AmsMethods.Genfrac, '(', ')', '0', '0'],
cfrac: AmsMethods.CFrac,
shoveleft: [AmsMethods.HandleShove, TexConstant.Align.LEFT],
shoveright: [AmsMethods.HandleShove, TexConstant.Align.RIGHT],
xrightarrow: [AmsMethods.xArrow, 0x2192, 5, 10],
xleftarrow: [AmsMethods.xArrow, 0x2190, 10, 5],
});
new EnvironmentMap('AMSmath-environment', tex_ParseMethods.environment, {
'equation*': [AmsMethods.Equation, null, false],
'eqnarray*': [
AmsMethods.EqnArray,
null,
false,
true,
'rcl',
'bmt',
ParseUtil.cols(0, MATHSPACE.thickmathspace),
'.5em',
],
align: [
AmsMethods.EqnArray,
null,
true,
true,
'rl',
'bt',
ParseUtil.cols(0, 2),
],
'align*': [
AmsMethods.EqnArray,
null,
false,
true,
'rl',
'bt',
ParseUtil.cols(0, 2),
],
multline: [AmsMethods.Multline, null, true],
'multline*': [AmsMethods.Multline, null, false],
split: [
AmsMethods.EqnArray,
null,
false,
false,
'rl',
'bt',
ParseUtil.cols(0),
],
gather: [AmsMethods.EqnArray, null, true, true, 'c', 'm'],
'gather*': [AmsMethods.EqnArray, null, false, true, 'c', 'm'],
alignat: [AmsMethods.AlignAt, null, true, true],
'alignat*': [AmsMethods.AlignAt, null, false, true],
alignedat: [AmsMethods.AlignAt, null, false, false],
aligned: [
AmsMethods.AmsEqnArray,
null,
null,
null,
'rl',
'bt',
ParseUtil.cols(0, 2),
'.5em',
'D',
],
gathered: [
AmsMethods.AmsEqnArray,
null,
null,
null,
'c',
'm',
null,
'.5em',
'D',
],
xalignat: [AmsMethods.XalignAt, null, true, true],
'xalignat*': [AmsMethods.XalignAt, null, false, true],
xxalignat: [AmsMethods.XalignAt, null, false, false],
flalign: [
AmsMethods.FlalignArray,
null,
true,
false,
true,
'rlc',
'btm',
'auto auto fit',
],
'flalign*': [
AmsMethods.FlalignArray,
null,
false,
false,
true,
'rlc',
'btm',
'auto auto fit',
],
subarray: [
AmsMethods.Array,
null,
null,
null,
null,
ParseUtil.cols(0),
'0.1em',
'S',
true,
],
smallmatrix: [
AmsMethods.Array,
null,
null,
null,
'c',
ParseUtil.cols(1 / 3),
'.2em',
'S',
true,
],
matrix: [AmsMethods.Array, null, null, null, 'c'],
pmatrix: [AmsMethods.Array, null, '(', ')', 'c'],
bmatrix: [AmsMethods.Array, null, '[', ']', 'c'],
Bmatrix: [AmsMethods.Array, null, '\\{', '\\}', 'c'],
vmatrix: [AmsMethods.Array, null, '\\vert', '\\vert', 'c'],
Vmatrix: [AmsMethods.Array, null, '\\Vert', '\\Vert', 'c'],
cases: [AmsMethods.Array, null, '\\{', '.', 'll', null, '.2em', 'T'],
});
new DelimiterMap('AMSmath-delimiter', tex_ParseMethods.delimiter, {
'\\lvert': ['\u007C', { texClass: TEXCLASS.OPEN }],
'\\rvert': ['\u007C', { texClass: TEXCLASS.CLOSE }],
'\\lVert': ['\u2016', { texClass: TEXCLASS.OPEN }],
'\\rVert': ['\u2016', { texClass: TEXCLASS.CLOSE }],
});
new CharacterMap('AMSsymbols-mathchar0mi', tex_ParseMethods.mathchar0mi, {
digamma: '\u03DD',
varkappa: '\u03F0',
varGamma: ['\u0393', { mathvariant: TexConstant.Variant.ITALIC }],
varDelta: ['\u0394', { mathvariant: TexConstant.Variant.ITALIC }],
varTheta: ['\u0398', { mathvariant: TexConstant.Variant.ITALIC }],
varLambda: ['\u039B', { mathvariant: TexConstant.Variant.ITALIC }],
varXi: ['\u039E', { mathvariant: TexConstant.Variant.ITALIC }],
varPi: ['\u03A0', { mathvariant: TexConstant.Variant.ITALIC }],
varSigma: ['\u03A3', { mathvariant: TexConstant.Variant.ITALIC }],
varUpsilon: ['\u03A5', { mathvariant: TexConstant.Variant.ITALIC }],
varPhi: ['\u03A6', { mathvariant: TexConstant.Variant.ITALIC }],
varPsi: ['\u03A8', { mathvariant: TexConstant.Variant.ITALIC }],
varOmega: ['\u03A9', { mathvariant: TexConstant.Variant.ITALIC }],
beth: '\u2136',
gimel: '\u2137',
daleth: '\u2138',
backprime: ['\u2035', { variantForm: true }],
hslash: '\u210F',
varnothing: ['\u2205', { variantForm: true }],
blacktriangle: '\u25B4',
triangledown: ['\u25BD', { variantForm: true }],
blacktriangledown: '\u25BE',
square: '\u25FB',
Box: '\u25FB',
blacksquare: '\u25FC',
lozenge: '\u25CA',
Diamond: '\u25CA',
blacklozenge: '\u29EB',
circledS: ['\u24C8', { mathvariant: TexConstant.Variant.NORMAL }],
bigstar: '\u2605',
sphericalangle: '\u2222',
measuredangle: '\u2221',
nexists: '\u2204',
complement: '\u2201',
mho: '\u2127',
eth: ['\u00F0', { mathvariant: TexConstant.Variant.NORMAL }],
Finv: '\u2132',
diagup: '\u2571',
Game: '\u2141',
diagdown: '\u2572',
Bbbk: ['\u006B', { mathvariant: TexConstant.Variant.DOUBLESTRUCK }],
yen: '\u00A5',
circledR: '\u00AE',
checkmark: '\u2713',
maltese: '\u2720',
});
new CharacterMap('AMSsymbols-mathchar0mo', tex_ParseMethods.mathchar0mo, {
dotplus: '\u2214',
ltimes: '\u22C9',
smallsetminus: ['\u2216', { variantForm: true }],
rtimes: '\u22CA',
Cap: '\u22D2',
doublecap: '\u22D2',
leftthreetimes: '\u22CB',
Cup: '\u22D3',
doublecup: '\u22D3',
rightthreetimes: '\u22CC',
barwedge: '\u22BC',
curlywedge: '\u22CF',
veebar: '\u22BB',
curlyvee: '\u22CE',
doublebarwedge: '\u2A5E',
boxminus: '\u229F',
circleddash: '\u229D',
boxtimes: '\u22A0',
circledast: '\u229B',
boxdot: '\u22A1',
circledcirc: '\u229A',
boxplus: '\u229E',
centerdot: ['\u22C5', { variantForm: true }],
divideontimes: '\u22C7',
intercal: '\u22BA',
leqq: '\u2266',
geqq: '\u2267',
leqslant: '\u2A7D',
geqslant: '\u2A7E',
eqslantless: '\u2A95',
eqslantgtr: '\u2A96',
lesssim: '\u2272',
gtrsim: '\u2273',
lessapprox: '\u2A85',
gtrapprox: '\u2A86',
approxeq: '\u224A',
lessdot: '\u22D6',
gtrdot: '\u22D7',
lll: '\u22D8',
llless: '\u22D8',
ggg: '\u22D9',
gggtr: '\u22D9',
lessgtr: '\u2276',
gtrless: '\u2277',
lesseqgtr: '\u22DA',
gtreqless: '\u22DB',
lesseqqgtr: '\u2A8B',
gtreqqless: '\u2A8C',
doteqdot: '\u2251',
Doteq: '\u2251',
eqcirc: '\u2256',
risingdotseq: '\u2253',
circeq: '\u2257',
fallingdotseq: '\u2252',
triangleq: '\u225C',
backsim: '\u223D',
thicksim: ['\u223C', { variantForm: true }],
backsimeq: '\u22CD',
thickapprox: ['\u2248', { variantForm: true }],
subseteqq: '\u2AC5',
supseteqq: '\u2AC6',
Subset: '\u22D0',
Supset: '\u22D1',
sqsubset: '\u228F',
sqsupset: '\u2290',
preccurlyeq: '\u227C',
succcurlyeq: '\u227D',
curlyeqprec: '\u22DE',
curlyeqsucc: '\u22DF',
precsim: '\u227E',
succsim: '\u227F',
precapprox: '\u2AB7',
succapprox: '\u2AB8',
vartriangleleft: '\u22B2',
lhd: '\u22B2',
vartriangleright: '\u22B3',
rhd: '\u22B3',
trianglelefteq: '\u22B4',
unlhd: '\u22B4',
trianglerighteq: '\u22B5',
unrhd: '\u22B5',
vDash: '\u22A8',
Vdash: '\u22A9',
Vvdash: '\u22AA',
smallsmile: ['\u2323', { variantForm: true }],
shortmid: ['\u2223', { variantForm: true }],
smallfrown: ['\u2322', { variantForm: true }],
shortparallel: ['\u2225', { variantForm: true }],
bumpeq: '\u224F',
between: '\u226C',
Bumpeq: '\u224E',
pitchfork: '\u22D4',
varpropto: ['\u221D', { variantForm: true }],
backepsilon: '\u220D',
blacktriangleleft: '\u25C2',
blacktriangleright: '\u25B8',
therefore: '\u2234',
because: '\u2235',
eqsim: '\u2242',
vartriangle: ['\u25B3', { variantForm: true }],
Join: '\u22C8',
nless: '\u226E',
ngtr: '\u226F',
nleq: '\u2270',
ngeq: '\u2271',
nleqslant: ['\u2A87', { variantForm: true }],
ngeqslant: ['\u2A88', { variantForm: true }],
nleqq: ['\u2270', { variantForm: true }],
ngeqq: ['\u2271', { variantForm: true }],
lneq: '\u2A87',
gneq: '\u2A88',
lneqq: '\u2268',
gneqq: '\u2269',
lvertneqq: ['\u2268', { variantForm: true }],
gvertneqq: ['\u2269', { variantForm: true }],
lnsim: '\u22E6',
gnsim: '\u22E7',
lnapprox: '\u2A89',
gnapprox: '\u2A8A',
nprec: '\u2280',
nsucc: '\u2281',
npreceq: ['\u22E0', { variantForm: true }],
nsucceq: ['\u22E1', { variantForm: true }],
precneqq: '\u2AB5',
succneqq: '\u2AB6',
precnsim: '\u22E8',
succnsim: '\u22E9',
precnapprox: '\u2AB9',
succnapprox: '\u2ABA',
nsim: '\u2241',
ncong: '\u2247',
nshortmid: ['\u2224', { variantForm: true }],
nshortparallel: ['\u2226', { variantForm: true }],
nmid: '\u2224',
nparallel: '\u2226',
nvdash: '\u22AC',
nvDash: '\u22AD',
nVdash: '\u22AE',
nVDash: '\u22AF',
ntriangleleft: '\u22EA',
ntriangleright: '\u22EB',
ntrianglelefteq: '\u22EC',
ntrianglerighteq: '\u22ED',
nsubseteq: '\u2288',
nsupseteq: '\u2289',
nsubseteqq: ['\u2288', { variantForm: true }],
nsupseteqq: ['\u2289', { variantForm: true }],
subsetneq: '\u228A',
supsetneq: '\u228B',
varsubsetneq: ['\u228A', { variantForm: true }],
varsupsetneq: ['\u228B', { variantForm: true }],
subsetneqq: '\u2ACB',
supsetneqq: '\u2ACC',
varsubsetneqq: ['\u2ACB', { variantForm: true }],
varsupsetneqq: ['\u2ACC', { variantForm: true }],
leftleftarrows: '\u21C7',
rightrightarrows: '\u21C9',
leftrightarrows: '\u21C6',
rightleftarrows: '\u21C4',
Lleftarrow: '\u21DA',
Rrightarrow: '\u21DB',
twoheadleftarrow: '\u219E',
twoheadrightarrow: '\u21A0',
leftarrowtail: '\u21A2',
rightarrowtail: '\u21A3',
looparrowleft: '\u21AB',
looparrowright: '\u21AC',
leftrightharpoons: '\u21CB',
rightleftharpoons: ['\u21CC', { variantForm: true }],
curvearrowleft: '\u21B6',
curvearrowright: '\u21B7',
circlearrowleft: '\u21BA',
circlearrowright: '\u21BB',
Lsh: '\u21B0',
Rsh: '\u21B1',
upuparrows: '\u21C8',
downdownarrows: '\u21CA',
upharpoonleft: '\u21BF',
upharpoonright: '\u21BE',
downharpoonleft: '\u21C3',
restriction: '\u21BE',
multimap: '\u22B8',
downharpoonright: '\u21C2',
leftrightsquigarrow: '\u21AD',
rightsquigarrow: '\u21DD',
leadsto: '\u21DD',
dashrightarrow: '\u21E2',
dashleftarrow: '\u21E0',
nleftarrow: '\u219A',
nrightarrow: '\u219B',
nLeftarrow: '\u21CD',
nRightarrow: '\u21CF',
nleftrightarrow: '\u21AE',
nLeftrightarrow: '\u21CE',
});
new DelimiterMap('AMSsymbols-delimiter', tex_ParseMethods.delimiter, {
'\\ulcorner': '\u231C',
'\\urcorner': '\u231D',
'\\llcorner': '\u231E',
'\\lrcorner': '\u231F',
});
new CommandMap('AMSsymbols-macros', {
implies: [AmsMethods.Macro, '\\;\\Longrightarrow\\;'],
impliedby: [AmsMethods.Macro, '\\;\\Longleftarrow\\;'],
});
//# sourceMappingURL=AmsMappings.js.map
;// ./mjs/input/tex/newcommand/NewcommandItems.js
class BeginEnvItem extends BaseItem {
get kind() {
return 'beginEnv';
}
get isOpen() {
return true;
}
checkItem(item) {
if (item.isKind('end')) {
if (item.getName() !== this.getName()) {
throw new tex_TexError('EnvBadEnd', '\\begin{%1} ended with \\end{%2}', this.getName(), item.getName());
}
return [[this.factory.create('mml', this.toMml())], true];
}
if (item.isKind('stop')) {
throw new tex_TexError('EnvMissingEnd', 'Missing \\end{%1}', this.getName());
}
return super.checkItem(item);
}
}
//# sourceMappingURL=NewcommandItems.js.map
;// ./mjs/input/tex/newcommand/NewcommandMethods.js
const NewcommandMethods = {
NewCommand(parser, name) {
const cs = NewcommandUtil.GetCsNameArgument(parser, name);
const n = NewcommandUtil.GetArgCount(parser, name);
const opt = parser.GetBrackets(name);
const def = parser.GetArgument(name);
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [def, n, opt]);
parser.Push(parser.itemFactory.create('null'));
},
NewEnvironment(parser, name) {
const env = UnitUtil.trimSpaces(parser.GetArgument(name));
const n = NewcommandUtil.GetArgCount(parser, name);
const opt = parser.GetBrackets(name);
const bdef = parser.GetArgument(name);
const edef = parser.GetArgument(name);
NewcommandUtil.addEnvironment(parser, env, NewcommandMethods.BeginEnv, [
true,
bdef,
edef,
n,
opt,
]);
parser.Push(parser.itemFactory.create('null'));
},
MacroDef(parser, name) {
const cs = NewcommandUtil.GetCSname(parser, name);
const params = NewcommandUtil.GetTemplate(parser, name, '\\' + cs);
const def = parser.GetArgument(name);
!(params instanceof Array)
?
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [
def,
params,
])
:
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.MacroWithTemplate, [def].concat(params));
parser.Push(parser.itemFactory.create('null'));
},
Let(parser, name) {
const cs = NewcommandUtil.GetCSname(parser, name);
let c = parser.GetNext();
if (c === '=') {
parser.i++;
c = parser.GetNext();
}
const handlers = parser.configuration.handlers;
parser.Push(parser.itemFactory.create('null'));
if (c === '\\') {
name = NewcommandUtil.GetCSname(parser, name);
if (cs === name) {
return;
}
const map = handlers.get(HandlerType.MACRO).applicable(name);
if (map instanceof MacroMap) {
const macro = map.lookup(name);
NewcommandUtil.addMacro(parser, cs, macro.func, macro.args, macro.token);
return;
}
if (map instanceof CharacterMap && !(map instanceof DelimiterMap)) {
const macro = map.lookup(name);
const method = (p) => map.parser(p, macro);
NewcommandUtil.addMacro(parser, cs, method, [cs, macro.char]);
return;
}
const macro = handlers
.get(HandlerType.DELIMITER)
.lookup('\\' + name);
if (macro) {
NewcommandUtil.addDelimiter(parser, '\\' + cs, macro.char, macro.attributes);
return;
}
NewcommandUtil.checkProtectedMacros(parser, cs);
NewcommandUtil.undefineMacro(parser, cs);
NewcommandUtil.undefineDelimiter(parser, '\\' + cs);
return;
}
parser.i++;
const macro = handlers.get(HandlerType.DELIMITER).lookup(c);
if (macro) {
NewcommandUtil.addDelimiter(parser, '\\' + cs, macro.char, macro.attributes);
return;
}
NewcommandUtil.addMacro(parser, cs, NewcommandMethods.Macro, [c]);
},
MacroWithTemplate(parser, name, text, n, ...params) {
const argCount = parseInt(n, 10);
if (params.length) {
const args = [];
parser.GetNext();
if (params[0] && !NewcommandUtil.MatchParam(parser, params[0])) {
throw new tex_TexError('MismatchUseDef', "Use of %1 doesn't match its definition", name);
}
if (argCount) {
for (let i = 0; i < argCount; i++) {
args.push(NewcommandUtil.GetParameter(parser, name, params[i + 1]));
}
text = ParseUtil.substituteArgs(parser, args, text);
}
}
parser.string = ParseUtil.addArgs(parser, text, parser.string.slice(parser.i));
parser.i = 0;
ParseUtil.checkMaxMacros(parser);
},
BeginEnv(parser, begin, bdef, edef, n, def) {
const name = begin.getName();
if (parser.stack.env['closing'] === name) {
delete parser.stack.env['closing'];
const beginN = parser.stack.global['beginEnv'];
if (beginN) {
parser.stack.global['beginEnv']--;
if (edef) {
const rest = parser.string.slice(parser.i);
parser.string = ParseUtil.addArgs(parser, parser.string.substring(0, parser.i), edef);
parser.Parse();
parser.string = rest;
parser.i = 0;
}
}
return parser.itemFactory.create('end').setProperty('name', name);
}
if (n) {
const args = [];
if (def != null) {
const optional = parser.GetBrackets(`\\begin{${name}}`);
args.push(optional == null ? def : optional);
}
for (let i = args.length; i < n; i++) {
args.push(parser.GetArgument(`\\begin{${name}}`));
}
bdef = ParseUtil.substituteArgs(parser, args, bdef);
edef = ParseUtil.substituteArgs(parser, [], edef);
}
parser.string = ParseUtil.addArgs(parser, bdef, parser.string.slice(parser.i));
parser.i = 0;
parser.stack.global['beginEnv'] =
(parser.stack.global['beginEnv'] || 0) + 1;
return parser.itemFactory.create('beginEnv').setProperty('name', name);
},
Macro: base_BaseMethods.Macro,
};
/* harmony default export */ const newcommand_NewcommandMethods = (NewcommandMethods);
//# sourceMappingURL=NewcommandMethods.js.map
;// ./mjs/input/tex/newcommand/NewcommandMappings.js
new CommandMap('Newcommand-macros', {
newcommand: newcommand_NewcommandMethods.NewCommand,
renewcommand: newcommand_NewcommandMethods.NewCommand,
newenvironment: newcommand_NewcommandMethods.NewEnvironment,
renewenvironment: newcommand_NewcommandMethods.NewEnvironment,
def: newcommand_NewcommandMethods.MacroDef,
let: newcommand_NewcommandMethods.Let,
});
//# sourceMappingURL=NewcommandMappings.js.map
;// ./mjs/input/tex/newcommand/NewcommandConfiguration.js
function NewcommandConfig(_config, jax) {
if (jax.parseOptions.packageData.has('newcommand')) {
return;
}
jax.parseOptions.packageData.set('newcommand', {});
new DelimiterMap(NewcommandTables.NEW_DELIMITER, tex_ParseMethods.delimiter, {});
new CommandMap(NewcommandTables.NEW_COMMAND, {});
new EnvironmentMap(NewcommandTables.NEW_ENVIRONMENT, tex_ParseMethods.environment, {});
jax.parseOptions.handlers.add({
[HandlerType.CHARACTER]: [],
[HandlerType.DELIMITER]: [NewcommandTables.NEW_DELIMITER],
[HandlerType.MACRO]: [
NewcommandTables.NEW_DELIMITER,
NewcommandTables.NEW_COMMAND,
],
[HandlerType.ENVIRONMENT]: [NewcommandTables.NEW_ENVIRONMENT],
}, {}, NewcommandPriority);
}
const NewcommandConfiguration = Configuration.create('newcommand', {
[ConfigurationType.HANDLER]: {
macro: ['Newcommand-macros'],
},
[ConfigurationType.ITEMS]: {
[BeginEnvItem.prototype.kind]: BeginEnvItem,
},
[ConfigurationType.OPTIONS]: {
maxMacros: 1000,
protectedMacros: ['begingroupSandbox'],
},
[ConfigurationType.CONFIG]: NewcommandConfig,
});
//# sourceMappingURL=NewcommandConfiguration.js.map
;// ./mjs/input/tex/ams/AmsConfiguration.js
class AmsTags extends AbstractTags {
}
const AmsConfiguration = Configuration.create('ams', {
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['AMSmath-operatorLetter'],
[HandlerType.DELIMITER]: ['AMSsymbols-delimiter', 'AMSmath-delimiter'],
[HandlerType.MACRO]: [
'AMSsymbols-mathchar0mi',
'AMSsymbols-mathchar0mo',
'AMSsymbols-delimiter',
'AMSsymbols-macros',
'AMSmath-mathchar0mo',
'AMSmath-macros',
'AMSmath-delimiter',
],
[HandlerType.ENVIRONMENT]: ['AMSmath-environment'],
},
[ConfigurationType.ITEMS]: {
[MultlineItem.prototype.kind]: MultlineItem,
[FlalignItem.prototype.kind]: FlalignItem,
},
[ConfigurationType.TAGS]: { ams: AmsTags },
[ConfigurationType.OPTIONS]: {
multlineWidth: '',
ams: {
operatornamePattern: /^[-*a-zA-Z]+/,
multlineWidth: '100%',
multlineIndent: '1em',
},
},
[ConfigurationType.CONFIG]: NewcommandConfig,
});
//# sourceMappingURL=AmsConfiguration.js.map
;// ./mjs/input/tex/require/RequireConfiguration.js
const MJCONFIG = startup_MathJax.config;
function RegisterExtension(jax, name) {
const require = jax.parseOptions.options.require;
const required = jax.parseOptions.packageData.get('require')
.required;
const extension = name.substring(require.prefix.length);
if (!required.includes(extension)) {
required.push(extension);
const retry = RegisterDependencies(jax, CONFIG.dependencies[name]);
if (retry) {
mathjax.retryAfter(retry.then(() => ProcessExtension(jax, name, extension)));
}
else {
ProcessExtension(jax, name, extension);
}
}
}
function ProcessExtension(jax, name, extension) {
const handler = ConfigurationHandler.get(extension);
if (handler) {
let options = MJCONFIG[name] || {};
if (handler.options &&
Object.keys(handler.options).length === 1 &&
handler.options[extension]) {
options = { [extension]: options };
}
jax.configuration.add(extension, jax, options);
const configured = jax.parseOptions.packageData.get('require').configured;
if (handler.preprocessors.length && !configured.has(extension)) {
configured.set(extension, true);
mathjax.retryAfter(Promise.resolve());
}
}
}
function RegisterDependencies(jax, names = []) {
const prefix = jax.parseOptions.options.require.prefix;
const retries = [];
for (const name of names) {
if (name.substring(0, prefix.length) === prefix) {
try {
RegisterExtension(jax, name);
}
catch (err) {
if (!err.retry)
throw err;
retries.push(err.retry);
}
}
}
return retries.length ? Promise.all(retries) : null;
}
function RequireLoad(parser, name) {
var _a, _b;
const options = parser.options.require;
const allow = options.allow;
const extension = (name.substring(0, 1) === '[' ? '' : options.prefix) + name;
const allowed = Object.hasOwn(allow, extension)
? allow[extension]
: Object.hasOwn(allow, name)
? allow[name]
: options.defaultAllow;
if (!allowed) {
throw new tex_TexError('BadRequire', 'Extension "%1" is not allowed to be loaded', extension);
}
const data = Package.packages.get(extension);
if (!data) {
mathjax.retryAfter(Loader.load(extension).catch((_) => { }));
}
if (data.hasFailed) {
throw new tex_TexError('RequireFail', 'Extension "%1" failed to load', name);
}
const require = (_a = CONFIG[extension]) === null || _a === void 0 ? void 0 : _a.rendererExtensions;
const menu = (_b = startup_MathJax.startup.document) === null || _b === void 0 ? void 0 : _b.menu;
if (require && menu) {
menu.addRequiredExtensions(require);
}
RegisterExtension(parser.configuration.packageData.get('require').jax, extension);
}
function RequireConfiguration_config(_config, jax) {
jax.parseOptions.packageData.set('require', {
jax: jax,
required: [...jax.options.packages],
configured: new Map()
});
const options = jax.parseOptions.options.require;
const prefix = options.prefix;
if (prefix.match(/[^_a-zA-Z0-9]/)) {
throw Error('Illegal characters used in \\require prefix');
}
if (!CONFIG.paths[prefix]) {
CONFIG.paths[prefix] = '[mathjax]/input/tex/extensions';
}
options.prefix = '[' + prefix + ']/';
}
const RequireMethods = {
Require(parser, name) {
const required = parser.GetArgument(name);
if (required.match(/[^_a-zA-Z0-9]/) || required === '') {
throw new tex_TexError('BadPackageName', 'Argument for %1 is not a valid package name', name);
}
RequireLoad(parser, required);
parser.Push(parser.itemFactory.create('null'));
},
};
const RequireConfiguration_options = {
require: {
allow: expandable({
base: false,
autoload: false,
configmacros: false,
tagformat: false,
setoptions: false,
texhtml: false,
}),
defaultAllow: true,
prefix: 'tex',
},
};
new CommandMap('require', { require: RequireMethods.Require });
const RequireConfiguration = Configuration.create('require', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['require'],
},
[ConfigurationType.CONFIG]: RequireConfiguration_config,
[ConfigurationType.OPTIONS]: RequireConfiguration_options,
});
//# sourceMappingURL=RequireConfiguration.js.map
;// ./mjs/input/tex/autoload/AutoloadConfiguration.js
function Autoload(parser, name, extension, isMacro) {
if (Package.packages.has(parser.options.require.prefix + extension)) {
const def = parser.options.autoload[extension];
const [macros, envs] = def.length === 2 && Array.isArray(def[0]) ? def : [def, []];
for (const macro of macros) {
AutoloadMacros.remove(macro);
}
for (const env of envs) {
AutoloadEnvironments.remove(env);
}
parser.string =
(isMacro ? name + ' ' : '\\begin{' + name.slice(1) + '}') +
parser.string.slice(parser.i);
parser.i = 0;
}
RequireLoad(parser, extension);
}
function initAutoload(config) {
if (!config.options.require) {
defaultOptions(config.options, RequireConfiguration.options);
}
}
function configAutoload(config, jax) {
const parser = jax.parseOptions;
const macros = parser.handlers.get(HandlerType.MACRO);
const environments = parser.handlers.get(HandlerType.ENVIRONMENT);
const autoload = parser.options.autoload;
parser.packageData.set('autoload', { Autoload });
for (const extension of Object.keys(autoload)) {
const def = autoload[extension];
const [macs, envs] = def.length === 2 && Array.isArray(def[0]) ? def : [def, []];
for (const name of macs) {
if (!macros.lookup(name) || name === 'color') {
AutoloadMacros.add(name, new Macro(name, Autoload, [extension, true]));
}
}
for (const name of envs) {
if (!environments.lookup(name)) {
AutoloadEnvironments.add(name, new Macro(name, Autoload, [extension, false]));
}
}
}
if (!parser.packageData.get('require')) {
RequireConfiguration.config(config, jax);
}
}
const AutoloadMacros = new CommandMap('autoload-macros', {});
const AutoloadEnvironments = new CommandMap('autoload-environments', {});
const AutoloadConfiguration = Configuration.create('autoload', {
[ConfigurationType.HANDLER]: {
[HandlerType.MACRO]: ['autoload-macros'],
[HandlerType.ENVIRONMENT]: ['autoload-environments'],
},
[ConfigurationType.OPTIONS]: {
autoload: expandable({
action: ['toggle', 'mathtip', 'texttip'],
amscd: [[], ['CD']],
bbox: ['bbox'],
boldsymbol: ['boldsymbol'],
braket: [
'bra',
'ket',
'braket',
'set',
'Bra',
'Ket',
'Braket',
'Set',
'ketbra',
'Ketbra',
],
bussproofs: [[], ['prooftree']],
cancel: ['cancel', 'bcancel', 'xcancel', 'cancelto'],
color: ['color', 'definecolor', 'textcolor', 'colorbox', 'fcolorbox'],
enclose: ['enclose'],
extpfeil: [
'xtwoheadrightarrow',
'xtwoheadleftarrow',
'xmapsto',
'xlongequal',
'xtofrom',
'Newextarrow',
],
html: ['data', 'href', 'class', 'style', 'cssId'],
mhchem: ['ce', 'pu'],
newcommand: [
'newcommand',
'renewcommand',
'newenvironment',
'renewenvironment',
'def',
'let',
],
unicode: ['unicode', 'U', 'char'],
verb: ['verb'],
}),
},
[ConfigurationType.CONFIG]: configAutoload,
[ConfigurationType.INIT]: initAutoload,
[ConfigurationType.PRIORITY]: 10,
});
//# sourceMappingURL=AutoloadConfiguration.js.map
;// ./mjs/input/tex/configmacros/ConfigMacrosConfiguration.js
const MACROSMAP = 'configmacros-map';
const ACTIVEMAP = 'configmacros-active-map';
const ENVIRONMENTMAP = 'configmacros-env-map';
function configmacrosInit(config) {
new MacroMap(ACTIVEMAP, {});
new CommandMap(MACROSMAP, {});
new EnvironmentMap(ENVIRONMENTMAP, tex_ParseMethods.environment, {});
config.append(Configuration.local({
handler: {
[HandlerType.CHARACTER]: [ACTIVEMAP],
[HandlerType.MACRO]: [MACROSMAP],
[HandlerType.ENVIRONMENT]: [ENVIRONMENTMAP],
},
priority: 3,
}));
}
function configmacrosConfig(_config, jax) {
configActives(jax);
configMacros(jax);
configEnvironments(jax);
}
function setMacros(name, map, jax) {
const handler = jax.parseOptions.handlers.retrieve(map);
const macros = jax.parseOptions.options[name];
for (const cs of Object.keys(macros)) {
const def = typeof macros[cs] === 'string' ? [macros[cs]] : macros[cs];
const macro = Array.isArray(def[2])
? new Macro(cs, newcommand_NewcommandMethods.MacroWithTemplate, def.slice(0, 2).concat(def[2]))
: new Macro(cs, newcommand_NewcommandMethods.Macro, def);
handler.add(cs, macro);
}
}
function configActives(jax) {
setMacros('active', ACTIVEMAP, jax);
}
function configMacros(jax) {
setMacros('macros', MACROSMAP, jax);
}
function configEnvironments(jax) {
const handler = jax.parseOptions.handlers.retrieve(ENVIRONMENTMAP);
const environments = jax.parseOptions.options.environments;
for (const env of Object.keys(environments)) {
handler.add(env, new Macro(env, newcommand_NewcommandMethods.BeginEnv, [true].concat(environments[env])));
}
}
const ConfigMacrosConfiguration = Configuration.create('configmacros', {
[ConfigurationType.INIT]: configmacrosInit,
[ConfigurationType.CONFIG]: configmacrosConfig,
[ConfigurationType.ITEMS]: {
[BeginEnvItem.prototype.kind]: BeginEnvItem,
},
[ConfigurationType.OPTIONS]: {
active: expandable({}),
macros: expandable({}),
environments: expandable({}),
},
});
//# sourceMappingURL=ConfigMacrosConfiguration.js.map
;// ./mjs/input/tex/noundefined/NoUndefinedConfiguration.js
function noUndefined(parser, name) {
const textNode = parser.create('text', '\\' + name);
const options = parser.options.noundefined;
const def = {};
for (const id of ['color', 'background', 'size']) {
if (options[id]) {
def['math' + id] = options[id];
}
}
parser.Push(parser.create('node', 'mtext', [], def, textNode));
}
const NoUndefinedConfiguration = Configuration.create('noundefined', {
[ConfigurationType.FALLBACK]: { [HandlerType.MACRO]: noUndefined },
[ConfigurationType.OPTIONS]: {
noundefined: {
color: 'red',
background: '',
size: '',
},
},
[ConfigurationType.PRIORITY]: 3,
});
//# sourceMappingURL=NoUndefinedConfiguration.js.map
;// ./mjs/input/tex/textmacros/TextParser.js
class TextParser extends TexParser {
get texParser() {
return this.configuration.packageData.get('textmacros').texParser;
}
get tags() {
return this.texParser.tags;
}
constructor(text, env, configuration, level) {
super(text, env, configuration);
this.level = level;
}
mml() {
this.copyLists();
this.configuration.popParser();
return this.level != null
? this.create('node', 'mstyle', this.nodes, {
displaystyle: false,
scriptlevel: this.level,
})
: this.nodes.length === 1
? this.nodes[0]
: this.create('node', 'mrow', this.nodes);
}
copyLists() {
const parseOptions = this.texParser.configuration;
for (const [name, list] of Object.entries(this.configuration.nodeLists)) {
for (const node of list) {
parseOptions.addNode(name, node);
}
}
this.configuration.nodeLists = {};
}
Parse() {
this.text = '';
this.nodes = [];
this.envStack = [];
super.Parse();
}
saveText() {
if (this.text) {
const mathvariant = this.stack.env.mathvariant;
const text = ParseUtil.internalText(this, this.text, mathvariant ? { mathvariant } : {});
this.text = '';
this.Push(text);
}
}
Push(mml) {
if (this.text) {
this.saveText();
}
if (mml instanceof StopItem) {
return super.Push(mml);
}
if (mml instanceof StyleItem) {
this.stack.env.mathcolor = this.stack.env.color;
return;
}
if (mml instanceof AbstractMmlNode) {
this.addAttributes(mml);
this.nodes.push(mml);
}
}
PushMath(mml) {
const env = this.stack.env;
for (const name of ['mathsize', 'mathcolor']) {
if (env[name] && !mml.attributes.hasExplicit(name)) {
if (!mml.isToken && !mml.isKind('mstyle')) {
mml = this.create('node', 'mstyle', [mml]);
}
tex_NodeUtil.setAttribute(mml, name, env[name]);
}
}
if (mml.isInferred) {
mml = this.create('node', 'mrow', mml.childNodes);
}
if (!mml.isKind('TeXAtom')) {
mml = this.create('node', 'TeXAtom', [mml]);
}
this.nodes.push(mml);
}
addAttributes(mml) {
const env = this.stack.env;
if (!mml.isToken)
return;
for (const name of ['mathsize', 'mathcolor', 'mathvariant']) {
if (env[name] && !mml.attributes.hasExplicit(name)) {
tex_NodeUtil.setAttribute(mml, name, env[name]);
}
}
}
ParseTextArg(name, env) {
const text = this.GetArgument(name);
env = Object.assign(Object.assign({}, this.stack.env), env);
return new TextParser(text, env, this.configuration).mml();
}
ParseArg(name) {
return new TextParser(this.GetArgument(name), this.stack.env, this.configuration).mml();
}
Error(id, message, ...args) {
throw new tex_TexError(id, message, ...args);
}
}
//# sourceMappingURL=TextParser.js.map
;// ./mjs/input/tex/textmacros/TextMacrosMethods.js
const TextMacrosMethods = {
Comment(parser, _c) {
while (parser.i < parser.string.length &&
parser.string.charAt(parser.i) !== '\n') {
parser.i++;
}
parser.i++;
},
Math(parser, open) {
parser.saveText();
const i = parser.i;
let j, c;
let braces = 0;
while ((c = parser.GetNext())) {
j = parser.i++;
switch (c) {
case '\\': {
const cs = parser.GetCS();
if (cs === ')')
c = '\\(';
}
case '$':
if (braces === 0 && open === c) {
const config = parser.texParser.configuration;
const mml = new TexParser(parser.string.substring(i, j), parser.stack.env, config).mml();
parser.PushMath(mml);
return;
}
break;
case '{':
braces++;
break;
case '}':
if (braces === 0) {
parser.Error('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
braces--;
break;
}
}
parser.Error('MathNotTerminated', 'Math mode is not properly terminated');
},
MathModeOnly(parser, c) {
parser.Error('MathModeOnly', "'%1' allowed only in math mode", c);
},
Misplaced(parser, c) {
parser.Error('Misplaced', "Misplaced '%1'", c);
},
OpenBrace(parser, _c) {
const env = parser.stack.env;
parser.envStack.push(env);
parser.stack.env = Object.assign({}, env);
},
CloseBrace(parser, _c) {
if (parser.envStack.length) {
parser.saveText();
parser.stack.env = parser.envStack.pop();
}
else {
parser.Error('ExtraCloseMissingOpen', 'Extra close brace or missing open brace');
}
},
OpenQuote(parser, c) {
if (parser.string.charAt(parser.i) === c) {
parser.text += '\u201C';
parser.i++;
}
else {
parser.text += '\u2018';
}
},
CloseQuote(parser, c) {
if (parser.string.charAt(parser.i) === c) {
parser.text += '\u201D';
parser.i++;
}
else {
parser.text += '\u2019';
}
},
Tilde(parser, _c) {
parser.text += '\u00A0';
},
Space(parser, _c) {
parser.text += ' ';
parser.GetNext();
},
SelfQuote(parser, name) {
parser.text += name.substring(1);
},
Insert(parser, _name, c) {
parser.text += c;
},
Accent(parser, name, c) {
const base = parser.ParseArg(name);
const accent = parser.create('token', 'mo', {}, c);
parser.addAttributes(accent);
parser.Push(parser.create('node', 'mover', [base, accent]));
},
Emph(parser, name) {
const variant = parser.stack.env.mathvariant === '-tex-mathit' ? 'normal' : '-tex-mathit';
parser.Push(parser.ParseTextArg(name, { mathvariant: variant }));
},
TextFont(parser, name, variant) {
parser.saveText();
parser.Push(parser.ParseTextArg(name, { mathvariant: variant }));
},
SetFont(parser, _name, variant) {
parser.saveText();
parser.stack.env.mathvariant = variant;
},
SetSize(parser, _name, size) {
parser.saveText();
parser.stack.env.mathsize = size;
},
CheckAutoload(parser, name) {
const autoload = parser.configuration.packageData.get('autoload');
const texParser = parser.texParser;
name = name.slice(1);
const macro = texParser.lookup(HandlerType.MACRO, name);
if (!macro || (autoload && macro._func === autoload.Autoload)) {
texParser.parse(HandlerType.MACRO, [texParser, name]);
if (!macro)
return;
retryAfter(Promise.resolve());
}
texParser.parse(HandlerType.MACRO, [parser, name]);
},
Macro: base_BaseMethods.Macro,
Spacer: base_BaseMethods.Spacer,
Hskip: base_BaseMethods.Hskip,
rule: base_BaseMethods.rule,
Rule: base_BaseMethods.Rule,
HandleRef: base_BaseMethods.HandleRef,
UnderOver: base_BaseMethods.UnderOver,
Lap: base_BaseMethods.Lap,
Phantom: base_BaseMethods.Phantom,
Smash: base_BaseMethods.Smash,
MmlToken: base_BaseMethods.MmlToken,
};
//# sourceMappingURL=TextMacrosMethods.js.map
;// ./mjs/input/tex/textmacros/TextMacrosMappings.js
const TextMacrosMappings_VARIANT = TexConstant.Variant;
new MacroMap('text-special', {
$: TextMacrosMethods.Math,
'%': TextMacrosMethods.Comment,
'^': TextMacrosMethods.MathModeOnly,
_: TextMacrosMethods.MathModeOnly,
'&': TextMacrosMethods.Misplaced,
'#': TextMacrosMethods.Misplaced,
'~': TextMacrosMethods.Tilde,
' ': TextMacrosMethods.Space,
'\t': TextMacrosMethods.Space,
'\r': TextMacrosMethods.Space,
'\n': TextMacrosMethods.Space,
'\u00A0': TextMacrosMethods.Tilde,
'{': TextMacrosMethods.OpenBrace,
'}': TextMacrosMethods.CloseBrace,
'`': TextMacrosMethods.OpenQuote,
"'": TextMacrosMethods.CloseQuote,
});
new CommandMap('text-macros', {
'(': TextMacrosMethods.Math,
$: TextMacrosMethods.SelfQuote,
_: TextMacrosMethods.SelfQuote,
'%': TextMacrosMethods.SelfQuote,
'{': TextMacrosMethods.SelfQuote,
'}': TextMacrosMethods.SelfQuote,
' ': TextMacrosMethods.SelfQuote,
'&': TextMacrosMethods.SelfQuote,
'#': TextMacrosMethods.SelfQuote,
'\\': [TextMacrosMethods.Macro, '$\\\\$'],
"'": [TextMacrosMethods.Accent, '\u00B4'],
'\u2019': [TextMacrosMethods.Accent, '\u00B4'],
'`': [TextMacrosMethods.Accent, '\u0060'],
'\u2018': [TextMacrosMethods.Accent, '\u0060'],
'^': [TextMacrosMethods.Accent, '^'],
'"': [TextMacrosMethods.Accent, '\u00A8'],
'~': [TextMacrosMethods.Accent, '~'],
'=': [TextMacrosMethods.Accent, '\u00AF'],
'.': [TextMacrosMethods.Accent, '\u02D9'],
u: [TextMacrosMethods.Accent, '\u02D8'],
v: [TextMacrosMethods.Accent, '\u02C7'],
emph: TextMacrosMethods.Emph,
rm: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.NORMAL],
mit: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.ITALIC],
oldstyle: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.OLDSTYLE],
cal: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.CALLIGRAPHIC],
it: [TextMacrosMethods.SetFont, '-tex-mathit'],
bf: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.BOLD],
sf: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.SANSSERIF],
tt: [TextMacrosMethods.SetFont, TextMacrosMappings_VARIANT.MONOSPACE],
frak: [TextMacrosMethods.TextFont, TextMacrosMappings_VARIANT.FRAKTUR],
Bbb: [TextMacrosMethods.TextFont, TextMacrosMappings_VARIANT.DOUBLESTRUCK],
tiny: [TextMacrosMethods.SetSize, 0.5],
Tiny: [TextMacrosMethods.SetSize, 0.6],
scriptsize: [TextMacrosMethods.SetSize, 0.7],
small: [TextMacrosMethods.SetSize, 0.85],
normalsize: [TextMacrosMethods.SetSize, 1.0],
large: [TextMacrosMethods.SetSize, 1.2],
Large: [TextMacrosMethods.SetSize, 1.44],
LARGE: [TextMacrosMethods.SetSize, 1.73],
huge: [TextMacrosMethods.SetSize, 2.07],
Huge: [TextMacrosMethods.SetSize, 2.49],
textnormal: [TextMacrosMethods.Macro, '{\\rm #1}', 1],
textup: [TextMacrosMethods.Macro, '{\\rm #1}', 1],
textrm: [TextMacrosMethods.Macro, '{\\rm #1}', 1],
textit: [TextMacrosMethods.Macro, '{\\it #1}', 1],
textbf: [TextMacrosMethods.Macro, '{\\bf #1}', 1],
textsf: [TextMacrosMethods.Macro, '{\\sf #1}', 1],
texttt: [TextMacrosMethods.Macro, '{\\tt #1}', 1],
dagger: [TextMacrosMethods.Insert, '\u2020'],
ddagger: [TextMacrosMethods.Insert, '\u2021'],
S: [TextMacrosMethods.Insert, '\u00A7'],
AA: [TextMacrosMethods.Insert, '\u212B'],
ldots: [TextMacrosMethods.Insert, '\u2026'],
vdots: [TextMacrosMethods.Insert, '\u22EE'],
',': [TextMacrosMethods.Spacer, MATHSPACE.thinmathspace],
':': [TextMacrosMethods.Spacer, MATHSPACE.mediummathspace],
'>': [TextMacrosMethods.Spacer, MATHSPACE.mediummathspace],
';': [TextMacrosMethods.Spacer, MATHSPACE.thickmathspace],
'!': [TextMacrosMethods.Spacer, MATHSPACE.negativethinmathspace],
enspace: [TextMacrosMethods.Spacer, 0.5],
quad: [TextMacrosMethods.Spacer, 1],
qquad: [TextMacrosMethods.Spacer, 2],
thinspace: [TextMacrosMethods.Spacer, MATHSPACE.thinmathspace],
negthinspace: [TextMacrosMethods.Spacer, MATHSPACE.negativethinmathspace],
hskip: TextMacrosMethods.Hskip,
hspace: TextMacrosMethods.Hskip,
kern: TextMacrosMethods.Hskip,
mskip: TextMacrosMethods.Hskip,
mspace: TextMacrosMethods.Hskip,
mkern: TextMacrosMethods.Hskip,
rule: TextMacrosMethods.rule,
Rule: [TextMacrosMethods.Rule],
Space: [TextMacrosMethods.Rule, 'blank'],
color: TextMacrosMethods.CheckAutoload,
textcolor: TextMacrosMethods.CheckAutoload,
colorbox: TextMacrosMethods.CheckAutoload,
fcolorbox: TextMacrosMethods.CheckAutoload,
href: TextMacrosMethods.CheckAutoload,
style: TextMacrosMethods.CheckAutoload,
class: TextMacrosMethods.CheckAutoload,
data: TextMacrosMethods.CheckAutoload,
cssId: TextMacrosMethods.CheckAutoload,
unicode: TextMacrosMethods.CheckAutoload,
U: TextMacrosMethods.CheckAutoload,
char: TextMacrosMethods.CheckAutoload,
ref: [TextMacrosMethods.HandleRef, false],
eqref: [TextMacrosMethods.HandleRef, true],
underline: [TextMacrosMethods.UnderOver, '2015'],
llap: TextMacrosMethods.Lap,
rlap: TextMacrosMethods.Lap,
phantom: TextMacrosMethods.Phantom,
vphantom: [TextMacrosMethods.Phantom, 1, 0],
hphantom: [TextMacrosMethods.Phantom, 0, 1],
smash: TextMacrosMethods.Smash,
mmlToken: TextMacrosMethods.MmlToken,
});
//# sourceMappingURL=TextMacrosMappings.js.map
;// ./mjs/input/tex/textmacros/TextMacrosConfiguration.js
const TextBaseConfiguration = Configuration.create('text-base', {
[ConfigurationType.PARSER]: 'text',
[ConfigurationType.PRIORITY]: 1,
[ConfigurationType.HANDLER]: {
[HandlerType.CHARACTER]: ['command', 'text-special'],
[HandlerType.MACRO]: ['text-macros'],
},
[ConfigurationType.FALLBACK]: {
[HandlerType.CHARACTER]: (parser, c) => {
parser.text += c;
},
[HandlerType.MACRO]: (parser, name) => {
const texParser = parser.texParser;
const macro = texParser.lookup(HandlerType.MACRO, name);
if (macro && macro._func !== TextMacrosMethods.Macro) {
parser.Error('MathMacro', '%1 is only supported in math mode', '\\' + name);
}
texParser.parse(HandlerType.MACRO, [parser, name]);
},
},
[ConfigurationType.ITEMS]: {
[StartItem.prototype.kind]: StartItem,
[StopItem.prototype.kind]: StopItem,
[MmlItem.prototype.kind]: MmlItem,
[StyleItem.prototype.kind]: StyleItem,
},
});
function internalMath(parser, text, level, mathvariant) {
const config = parser.configuration.packageData.get('textmacros');
if (!(parser instanceof TextParser)) {
config.texParser = parser;
}
config.parseOptions.clear();
return [
new TextParser(text, mathvariant ? { mathvariant } : {}, config.parseOptions, level).mml(),
];
}
const TextMacrosConfiguration = Configuration.create('textmacros', {
[ConfigurationType.PRIORITY]: 1,
[ConfigurationType.CONFIG]: (_config, jax) => {
const textConf = new ParserConfiguration(jax.parseOptions.options.textmacros.packages, ['tex', 'text']);
textConf.init();
const parseOptions = new tex_ParseOptions(textConf, []);
parseOptions.options = jax.parseOptions.options;
textConf.config(jax);
TagsFactory.addTags(textConf.tags);
parseOptions.tags = TagsFactory.getDefault();
parseOptions.tags.configuration = parseOptions;
parseOptions.packageData = jax.parseOptions.packageData;
parseOptions.packageData.set('textmacros', {
textConf,
parseOptions,
jax,
texParser: null,
});
parseOptions.options.internalMath = internalMath;
},
[ConfigurationType.PREPROCESSORS]: [
(data) => {
const config = data.data.packageData.get('textmacros');
config.parseOptions.nodeFactory.setMmlFactory(config.jax.mmlFactory);
},
],
[ConfigurationType.OPTIONS]: {
textmacros: {
packages: ['text-base'],
},
},
});
//# sourceMappingURL=TextMacrosConfiguration.js.map
;// ./components/mjs/input/tex/lib/tex.js
if (MathJax.loader) {
MathJax.loader.checkVersion('input/tex', VERSION, 'input');
}
combineWithMathJax({_: {
input: {
tex_ts: tex_namespaceObject,
tex: {
ColumnParser: ColumnParser_namespaceObject,
Configuration: Configuration_namespaceObject,
FilterUtil: FilterUtil_namespaceObject,
FindTeX: FindTeX_namespaceObject,
HandlerTypes: HandlerTypes_namespaceObject,
MapHandler: MapHandler_namespaceObject,
NodeFactory: tex_NodeFactory_namespaceObject,
NodeUtil: NodeUtil_namespaceObject,
ParseMethods: ParseMethods_namespaceObject,
ParseOptions: ParseOptions_namespaceObject,
ParseUtil: ParseUtil_namespaceObject,
Stack: Stack_namespaceObject,
StackItem: StackItem_namespaceObject,
StackItemFactory: StackItemFactory_namespaceObject,
Tags: Tags_namespaceObject,
TexConstants: TexConstants_namespaceObject,
TexError: TexError_namespaceObject,
TexParser: TexParser_namespaceObject,
Token: Token_namespaceObject,
TokenMap: TokenMap_namespaceObject,
UnitUtil: UnitUtil_namespaceObject,
ams: {
AmsConfiguration: AmsConfiguration_namespaceObject,
AmsItems: AmsItems_namespaceObject,
AmsMethods: AmsMethods_namespaceObject
},
autoload: {
AutoloadConfiguration: AutoloadConfiguration_namespaceObject
},
base: {
BaseConfiguration: BaseConfiguration_namespaceObject,
BaseItems: BaseItems_namespaceObject,
BaseMethods: BaseMethods_namespaceObject
},
configmacros: {
ConfigMacrosConfiguration: ConfigMacrosConfiguration_namespaceObject
},
newcommand: {
NewcommandConfiguration: NewcommandConfiguration_namespaceObject,
NewcommandItems: NewcommandItems_namespaceObject,
NewcommandMethods: NewcommandMethods_namespaceObject,
NewcommandUtil: NewcommandUtil_namespaceObject
},
noundefined: {
NoUndefinedConfiguration: NoUndefinedConfiguration_namespaceObject
},
require: {
RequireConfiguration: RequireConfiguration_namespaceObject
},
textmacros: {
TextMacrosConfiguration: TextMacrosConfiguration_namespaceObject,
TextMacrosMethods: TextMacrosMethods_namespaceObject,
TextParser: TextParser_namespaceObject
}
}
}
}});
;// ./components/mjs/input/tex/register.js
function registerTeX(packageList = [], tex = true) {
if (MathJax.startup) {
if (tex) {
MathJax.startup.registerConstructor('tex', MathJax._.input.tex_ts.TeX);
MathJax.startup.useInput('tex');
}
if (!MathJax.config.tex) {
MathJax.config.tex = {};
}
let packages = MathJax.config.tex.packages;
MathJax.config.tex.packages = packageList;
if (packages) {
if (Array.isArray(packages)) {
packages = {'[+]': packages.filter((name) => !packageList.includes(name))};
}
insert(MathJax.config.tex, {packages});
}
}
}
;// ./components/mjs/input/tex/tex.js
Loader.preLoaded(
'input/tex-base',
'[tex]/ams',
'[tex]/newcommand',
'[tex]/textmacros',
'[tex]/noundefined',
'[tex]/require',
'[tex]/autoload',
'[tex]/configmacros'
);
registerTeX([
'base',
'ams',
'newcommand',
'textmacros',
'noundefined',
'require',
'autoload',
'configmacros'
]);
;// ./mjs/output/common/Direction.js
const DIRECTION = { None: '', Vertical: 'v', Horizontal: 'h' };
const V = DIRECTION.Vertical;
const H = DIRECTION.Horizontal;
//# sourceMappingURL=Direction.js.map
;// ./mjs/output/common/FontData.js
var FontData_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const NOSTRETCH = { dir: DIRECTION.None };
function mergeOptions(obj, dst, src) {
return src ? defaultOptions(obj, { [dst]: src })[dst] : obj[dst];
}
class FontData {
get CLASS() {
return this.constructor;
}
static charOptions(font, n) {
const char = font[n];
if (!Array.isArray(char)) {
throw Error(`Character data hasn't been loaded for 0x${n.toString(16).toUpperCase()}`);
}
if (char.length === 3) {
char[3] = {};
}
return char[3];
}
static defineDynamicFiles(dynamicFiles, extension = '') {
const list = {};
(dynamicFiles || []).forEach(([file, variants, delimiters]) => {
list[file] = {
extension,
file,
variants,
delimiters: delimiters || [],
promise: null,
failed: false,
setup: (_font) => {
list[file].failed = true;
},
};
});
return list;
}
static dynamicSetup(extension, file, variants, delimiters = {}, fonts = null) {
const data = extension ? this.dynamicExtensions.get(extension) : null;
const files = extension ? data.files : this.dynamicFiles;
files[file].setup = (font) => {
Object.keys(variants).forEach((name) => font.defineChars(name, variants[name]));
font.defineDelimiters(delimiters);
if (extension) {
this.adjustDelimiters(font.delimiters, Object.keys(delimiters), data.sizeN, data.stretchN);
}
if (fonts) {
font.addDynamicFontCss(fonts);
}
};
}
static adjustDelimiters(delimiters, keys, sizeN, stretchN) {
keys.forEach((id) => {
const delim = delimiters[parseInt(id)];
if ('dir' in delim) {
if (delim.variants) {
delim.variants = this.adjustArrayIndices(delim.variants, sizeN);
}
if (delim.stretchv) {
delim.stretchv = this.adjustArrayIndices(delim.stretchv, stretchN);
}
}
});
}
static adjustArrayIndices(list, N) {
return list.map((n) => (n < 0 ? N - 1 - n : n));
}
static addExtension(data, prefix = '') {
const extension = {
name: data.name,
prefix: prefix || `[${data.name}-extension]/${this.JAX.toLowerCase()}/dynamic`,
files: this.defineDynamicFiles(data.ranges, data.name),
sizeN: this.defaultSizeVariants.length,
stretchN: this.defaultStretchVariants.length,
};
this.dynamicExtensions.set(data.name, extension);
for (const [src, dst] of [
['options', 'OPTIONS'],
['variants', 'defaultVariants'],
['variantSmp', 'VariantSmp'],
['cssFonts', 'defaultCssFonts'],
['accentMap', 'defaultAccentMap'],
['moMap', 'defaultMoMap'],
['mnMap', 'defaultMnMap'],
['parameters', 'defaultParams'],
['chars', 'defaultChars'],
['sizeVariants', 'defaultSizeVariants'],
['stretchVariants', 'defaultStretchVariants'],
]) {
mergeOptions(this, dst, data[src]);
}
if (data.delimiters) {
Object.assign(this.defaultDelimiters, data.delimiters);
this.adjustDelimiters(this.defaultDelimiters, Object.keys(data.delimiters), extension.sizeN, extension.stretchN);
}
}
constructor(options = null) {
this.variant = {};
this.delimiters = {};
this.cssFontMap = {};
this.cssFontPrefix = '';
this.remapChars = {};
this.skewIcFactor = 0.75;
const CLASS = this.CLASS;
this.options = userOptions(defaultOptions({}, CLASS.OPTIONS), options);
this.params = Object.assign({}, CLASS.defaultParams);
this.sizeVariants = [...CLASS.defaultSizeVariants];
this.stretchVariants = [...CLASS.defaultStretchVariants];
this.defineCssFonts(CLASS.defaultCssFonts);
this.cssFamilyPrefix = CLASS.defaultCssFamilyPrefix;
this.createVariants(CLASS.defaultVariants);
this.defineDelimiters(CLASS.defaultDelimiters);
Object.keys(CLASS.defaultChars).forEach((name) => this.defineChars(name, CLASS.defaultChars[name]));
this.defineRemap('accent', CLASS.defaultAccentMap);
this.defineRemap('mo', CLASS.defaultMoMap);
this.defineRemap('mn', CLASS.defaultMnMap);
this.defineDynamicCharacters(CLASS.dynamicFiles);
CLASS.dynamicExtensions.forEach((data) => this.defineDynamicCharacters(data.files));
}
setOptions(options) {
defaultOptions(this.options, options);
}
addExtension(data, prefix = '') {
const jax = this.constructor.JAX.toLowerCase();
const dynamicFont = {
name: data.name,
prefix: prefix || `[${data.name}-extension]/${jax}/dynamic`,
files: this.CLASS.defineDynamicFiles(data.ranges, prefix),
sizeN: this.sizeVariants.length,
stretchN: this.stretchVariants.length,
};
this.CLASS.dynamicExtensions.set(data.name, dynamicFont);
defaultOptions(this.options, data.options || {});
defaultOptions(this.params, data.parameters || {});
mergeOptions(this, 'sizeVariants', data.sizeVariants);
mergeOptions(this, 'stretchVariants', data.stretchVariants);
mergeOptions(this.constructor, 'VariantSmp', data.variantSmp);
this.defineCssFonts(mergeOptions({ cssFonts: {} }, 'cssFonts', data.cssFonts));
this.createVariants(mergeOptions({ variants: [] }, 'variants', data.variants));
if (data.delimiters) {
this.defineDelimiters(mergeOptions({ delimiters: {} }, 'delimiters', data.delimiters));
this.CLASS.adjustDelimiters(this.delimiters, Object.keys(data.delimiters), dynamicFont.sizeN, dynamicFont.stretchN);
}
for (const name of Object.keys(data.chars || {})) {
this.defineChars(name, data.chars[name]);
}
this.defineRemap('accent', data.accentMap);
this.defineRemap('mo', data.moMap);
this.defineRemap('mn', data.mnMap);
if (data.ranges) {
this.defineDynamicCharacters(dynamicFont.files);
}
return [];
}
get styles() {
return this._styles;
}
set styles(style) {
this._styles = style;
}
createVariant(name, inherit = null, link = null) {
const variant = {
linked: [],
chars: Object.create(inherit ? this.variant[inherit].chars : {}),
};
if (this.variant[link]) {
Object.assign(variant.chars, this.variant[link].chars);
this.variant[link].linked.push(variant.chars);
variant.chars = Object.create(variant.chars);
}
this.remapSmpChars(variant.chars, name);
this.variant[name] = variant;
}
remapSmpChars(chars, name) {
const CLASS = this.CLASS;
let remap = CLASS.VariantSmp[name];
if (typeof remap === 'string') {
remap = CLASS.VariantSmp[remap];
}
if (!remap)
return;
const SmpRemap = CLASS.SmpRemap;
const SmpGreek = [null, null, CLASS.SmpRemapGreekU, CLASS.SmpRemapGreekL];
for (const [i, lo, hi] of CLASS.SmpRanges) {
const base = remap[i];
if (!base)
continue;
for (let n = lo; n <= hi; n++) {
if (n === 0x3a2)
continue;
const smp = base + n - lo;
chars[n] = this.smpChar(SmpRemap[smp] || smp);
}
if (SmpGreek[i]) {
for (const n of Object.keys(SmpGreek[i]).map((x) => parseInt(x))) {
chars[n] = this.smpChar(base + SmpGreek[i][n]);
}
}
}
const extra = remap[5] || {};
for (const n of Object.keys(extra)) {
chars[n] = this.smpChar(remap[5][n]);
}
}
smpChar(n) {
return [, , , { smp: n }];
}
createVariants(variants) {
for (const variant of variants) {
this.createVariant(variant[0], variant[1], variant[2]);
}
}
defineChars(name, chars) {
const variant = this.variant[name];
Object.assign(variant.chars, chars);
for (const link of variant.linked) {
Object.assign(link, chars);
}
}
defineCssFonts(fonts) {
Object.assign(this.cssFontMap, fonts);
for (const name of Object.keys(fonts)) {
if (this.cssFontMap[name][0] === 'unknown') {
this.cssFontMap[name][0] = this.options.unknownFamily;
}
}
}
defineDelimiters(delims) {
Object.assign(this.delimiters, delims);
}
defineRemap(name, remap) {
if (remap) {
if (!Object.hasOwn(this.remapChars, name)) {
this.remapChars[name] = {};
}
Object.assign(this.remapChars[name], remap);
}
}
defineDynamicCharacters(dynamicFiles) {
for (const file of Object.keys(dynamicFiles)) {
const dynamic = dynamicFiles[file];
for (const name of Object.keys(dynamic.variants)) {
this.defineChars(name, this.flattenRanges(dynamic.variants[name], dynamic));
}
this.defineDelimiters(this.flattenRanges(dynamic.delimiters, dynamic));
}
}
flattenRanges(ranges, dynamic) {
const chars = {};
for (const n of ranges) {
if (Array.isArray(n)) {
for (let j = n[0]; j <= n[1]; j++) {
chars[j] = dynamic;
}
}
else {
chars[n] = dynamic;
}
}
return chars;
}
dynamicFileName(dynamic) {
const prefix = !dynamic.extension
? this.options.dynamicPrefix
: this.CLASS.dynamicExtensions.get(dynamic.extension).prefix;
return dynamic.file.match(/^(?:[/[]|[a-z]+:\/\/|[a-z]:)/i)
? dynamic.file
: prefix + '/' + dynamic.file.replace(/(\.js)?$/, '.js');
}
loadDynamicFile(dynamic) {
return FontData_awaiter(this, void 0, void 0, function* () {
if (dynamic.failed)
return Promise.reject(new Error(`dynamic file '${dynamic.file}' failed to load`));
if (!dynamic.promise) {
dynamic.promise = asyncLoad(this.dynamicFileName(dynamic)).catch((err) => {
dynamic.failed = true;
console.warn(err);
});
}
return dynamic.promise.then(() => dynamic.setup(this));
});
}
loadDynamicFiles() {
const dynamicFiles = this.CLASS.dynamicFiles;
const promises = Object.keys(dynamicFiles).map((name) => this.loadDynamicFile(dynamicFiles[name]));
for (const data of this.CLASS.dynamicExtensions.values()) {
promises.push(...Object.keys(data.files).map((name) => this.loadDynamicFile(data.files[name])));
}
return Promise.all(promises);
}
loadDynamicFilesSync() {
if (!mathjax.asyncIsSynchronous) {
throw Error('MathJax(loadDynamicFilesSync): mathjax.asyncLoad must be specified and synchronous\n' +
' Try importing #js/../components/require.mjs and #js/util/asyncLoad/node.js');
}
const dynamicFiles = this.CLASS.dynamicFiles;
Object.keys(dynamicFiles).forEach((name) => this.loadDynamicFileSync(dynamicFiles[name]));
for (const data of this.CLASS.dynamicExtensions.values()) {
Object.keys(data.files).forEach((name) => this.loadDynamicFileSync(data.files[name]));
}
}
loadDynamicFileSync(dynamic) {
if (!dynamic.promise) {
dynamic.promise = Promise.resolve();
try {
mathjax.asyncLoad(this.dynamicFileName(dynamic));
}
catch (err) {
dynamic.failed = true;
console.warn(err);
}
dynamic.setup(this);
}
}
addDynamicFontCss(_fonts, _root) { }
getDelimiter(n) {
const delim = this.delimiters[n];
if (delim && !('dir' in delim)) {
this.delimiters[n] = null;
retryAfter(this.loadDynamicFile(delim));
return null;
}
return delim;
}
getSizeVariant(n, i) {
const delim = this.getDelimiter(n);
if (delim && delim.variants) {
i = delim.variants[i];
}
return this.sizeVariants[i];
}
getStretchVariant(n, i) {
const delim = this.getDelimiter(n);
return this.stretchVariants[delim.stretchv ? delim.stretchv[i] : 0];
}
getStretchVariants(n) {
return [0, 1, 2, 3].map((i) => this.getStretchVariant(n, i));
}
getChar(name, n) {
const char = this.variant[name].chars[n];
if (char && !Array.isArray(char)) {
const variant = this.variant[name];
delete variant.chars[n];
variant.linked.forEach((link) => delete link[n]);
retryAfter(this.loadDynamicFile(char));
return null;
}
return char;
}
getVariant(name) {
return this.variant[name];
}
getCssFont(variant) {
return this.cssFontMap[variant] || ['serif', false, false];
}
getFamily(family) {
return this.cssFamilyPrefix ? this.cssFamilyPrefix + ', ' + family : family;
}
getRemappedChar(name, c) {
const map = this.remapChars[name] || {};
return map[c];
}
}
FontData.OPTIONS = {
unknownFamily: 'serif',
dynamicPrefix: '.',
};
FontData.JAX = 'common';
FontData.NAME = '';
FontData.defaultVariants = [
['normal'],
['bold', 'normal'],
['italic', 'normal'],
['bold-italic', 'italic', 'bold'],
['double-struck', 'bold'],
['fraktur', 'normal'],
['bold-fraktur', 'bold', 'fraktur'],
['script', 'italic'],
['bold-script', 'bold-italic', 'script'],
['sans-serif', 'normal'],
['bold-sans-serif', 'bold', 'sans-serif'],
['sans-serif-italic', 'italic', 'sans-serif'],
['sans-serif-bold-italic', 'bold-italic', 'bold-sans-serif'],
['monospace', 'normal'],
['-smallop', 'normal'],
['-largeop', 'normal'],
['-tex-calligraphic', 'italic'],
['-tex-bold-calligraphic', 'bold-italic'],
['-tex-oldstyle', 'normal'],
['-tex-bold-oldstyle', 'bold'],
['-tex-mathit', 'italic'],
['-tex-variant', 'normal'],
];
FontData.defaultCssFonts = {
normal: ['unknown', false, false],
bold: ['unknown', false, true],
italic: ['unknown', true, false],
'bold-italic': ['unknown', true, true],
'double-struck': ['unknown', false, true],
fraktur: ['unknown', false, false],
'bold-fraktur': ['unknown', false, true],
script: ['cursive', false, false],
'bold-script': ['cursive', false, true],
'sans-serif': ['sans-serif', false, false],
'bold-sans-serif': ['sans-serif', false, true],
'sans-serif-italic': ['sans-serif', true, false],
'sans-serif-bold-italic': ['sans-serif', true, true],
monospace: ['monospace', false, false],
'-smallop': ['unknown', false, false],
'-largeop': ['unknown', false, false],
'-tex-calligraphic': ['cursive', true, false],
'-tex-bold-calligraphic': ['cursive', true, true],
'-tex-oldstyle': ['unknown', false, false],
'-tex-bold-oldstyle': ['unknown', false, true],
'-tex-mathit': ['unknown', true, false],
'-tex-variant': ['unknown', false, false],
};
FontData.defaultCssFamilyPrefix = '';
FontData.VariantSmp = {
bold: [
0x1d400,
0x1d41a,
0x1d6a8,
0x1d6c2,
0x1d7ce,
{ 0x3dc: 0x1d7ca, 0x3dd: 0x1d7cb },
],
italic: [0x1d434, 0x1d44e, 0x1d6e2, 0x1d6fc],
'bold-italic': [0x1d468, 0x1d482, 0x1d71c, 0x1d736],
script: [0x1d49c, 0x1d4b6],
'bold-script': [0x1d4d0, 0x1d4ea],
fraktur: [0x1d504, 0x1d51e],
'double-struck': [0x1d538, 0x1d552, , , 0x1d7d8],
'bold-fraktur': [0x1d56c, 0x1d586],
'sans-serif': [0x1d5a0, 0x1d5ba, , , 0x1d7e2],
'bold-sans-serif': [0x1d5d4, 0x1d5ee, 0x1d756, 0x1d770, 0x1d7ec],
'sans-serif-italic': [0x1d608, 0x1d622],
'sans-serif-bold-italic': [0x1d63c, 0x1d656, 0x1d790, 0x1d7aa],
monospace: [0x1d670, 0x1d68a, , , 0x1d7f6],
};
FontData.SmpRanges = [
[0, 0x41, 0x5A],
[1, 0x61, 0x7A],
[2, 0x391, 0x3A9],
[3, 0x3B1, 0x3C9],
[4, 0x30, 0x39]
];
FontData.SmpRemap = {
0x1D455: 0x210E,
0x1D49D: 0x212C,
0x1D4A0: 0x2130,
0x1D4A1: 0x2131,
0x1D4A3: 0x210B,
0x1D4A4: 0x2110,
0x1D4A7: 0x2112,
0x1D4A8: 0x2133,
0x1D4AD: 0x211B,
0x1D4BA: 0x212F,
0x1D4BC: 0x210A,
0x1D4C4: 0x2134,
0x1D506: 0x212D,
0x1D50B: 0x210C,
0x1D50C: 0x2111,
0x1D515: 0x211C,
0x1D51D: 0x2128,
0x1D53A: 0x2102,
0x1D53F: 0x210D,
0x1D545: 0x2115,
0x1D547: 0x2119,
0x1D548: 0x211A,
0x1D549: 0x211D,
0x1D551: 0x2124,
};
FontData.SmpRemapGreekU = {
0x2207: 0x19,
0x03F4: 0x11
};
FontData.SmpRemapGreekL = {
0x3D1: 0x1B,
0x3D5: 0x1D,
0x3D6: 0x1F,
0x3F0: 0x1C,
0x3F1: 0x1E,
0x3F5: 0x1A,
0x2202: 0x19
};
FontData.defaultAccentMap = {
0x005E: '\u02C6',
0x007E: '\u02DC',
0x0300: '\u02CB',
0x0301: '\u02CA',
0x0302: '\u02C6',
0x0303: '\u02DC',
0x0304: '\u02C9',
0x0306: '\u02D8',
0x0307: '\u02D9',
0x0308: '\u00A8',
0x030A: '\u02DA',
0x030C: '\u02C7',
0x2192: '\u20D7'
};
FontData.defaultMoMap = {
0x002d: '\u2212',
};
FontData.defaultMnMap = {
0x002d: '\u2212',
};
FontData.defaultParams = {
x_height: .442,
quad: 1,
num1: .676,
num2: .394,
num3: .444,
denom1: .686,
denom2: .345,
sup1: .413,
sup2: .363,
sup3: .289,
sub1: .15,
sub2: .247,
sup_drop: .386,
sub_drop: .05,
delim1: 2.39,
delim2: 1.0,
axis_height: .25,
rule_thickness: .06,
big_op_spacing1: .111,
big_op_spacing2: .167,
big_op_spacing3: .2,
big_op_spacing4: .6,
big_op_spacing5: .1,
surd_height: .06,
scriptspace: .05,
nulldelimiterspace: .12,
delimiterfactor: 901,
delimitershortfall: .3,
rule_factor: 1.25,
min_rule_thickness: 1.25,
separation_factor: 1.75,
extra_ic: .033,
extender_factor: .333
};
FontData.defaultDelimiters = {};
FontData.defaultChars = {};
FontData.defaultSizeVariants = [];
FontData.defaultStretchVariants = [];
FontData.dynamicFiles = {};
FontData.dynamicExtensions = new Map();
//# sourceMappingURL=FontData.js.map
;// ./mjs/output/common/LineBBox.js
class LineBBox extends BBox {
static from(bbox, leading, indent = null) {
const nbox = new this();
Object.assign(nbox, bbox);
nbox.lineLeading = leading;
if (indent) {
nbox.indentData = indent;
}
return nbox;
}
constructor(def, start = null) {
super(def);
this.indentData = null;
this.isFirst = false;
this.originalL = this.L;
if (start) {
this.start = start;
}
}
append(cbox) {
if (this.isFirst) {
cbox.originalL += cbox.L;
cbox.L = 0;
}
if (cbox.indentData) {
this.indentData = cbox.indentData;
}
this.lineLeading = cbox.lineLeading;
super.append(cbox);
this.isFirst = cbox.isFirst;
}
copy() {
const bbox = LineBBox.from(this, this.lineLeading);
bbox.indentData = this.indentData;
bbox.lineLeading = this.lineLeading;
return bbox;
}
getIndentData(node) {
let { indentalign, indentshift, indentalignfirst, indentshiftfirst, indentalignlast, indentshiftlast, } = node.attributes.getAllAttributes();
if (indentalignfirst === 'indentalign') {
indentalignfirst = node.attributes.getInherited('indentalign');
}
if (indentshiftfirst === 'indentshift') {
indentshiftfirst = node.attributes.getInherited('indentshift');
}
if (indentalignlast === 'indentalign') {
indentalignlast = indentalign;
}
if (indentshiftlast === 'indentshift') {
indentshiftlast = indentshift;
}
this.indentData = [
[indentalignfirst, indentshiftfirst],
[indentalign, indentshift],
[indentalignlast, indentshiftlast],
];
}
copyIndentData(bbox) {
return bbox.indentData.map(([align, indent]) => [align, indent]);
}
}
//# sourceMappingURL=LineBBox.js.map
;// ./mjs/output/common/LinebreakVisitor.js
const NOBREAK = 1000000;
class Linebreaks extends AbstractVisitor {
breakToWidth(_wrapper, _W) { }
}
class LinebreakVisitor extends Linebreaks {
constructor() {
super(...arguments);
this.PENALTY = {
newline: (_p) => 0,
nobreak: (_p) => NOBREAK,
goodbreak: (p) => p - 200 * this.state.depth,
badbreak: (p) => p + 200 * this.state.depth,
auto: (p) => p,
};
this.FACTORS = {
depth: (p) => p + 800 * this.state.depth,
width: (p) => p +
Math.floor(((this.state.width - this.state.w) / this.state.width) * 2500),
tail: (p) => p +
Math.floor((this.state.width /
Math.max(0.0001, this.state.mathLeft - this.state.w)) *
500),
open: (p, mo) => {
const prevClass = mo.node.prevClass;
if (prevClass === TEXCLASS.BIN ||
prevClass === TEXCLASS.REL ||
prevClass === TEXCLASS.OP) {
return p + 5000;
}
const prev = this.getPrevious(mo);
if (prev &&
(prev.attributes.get('form') !== 'postfix' ||
prev.attributes.get('linebreak') === 'nobreak')) {
return p + 5000;
}
const parent = mo.node.Parent;
if ((parent === null || parent === void 0 ? void 0 : parent.isKind('mmultiscripts')) &&
mo.node === this.getFirstToken(parent)) {
const prescripts = !!parent.childNodes.filter((node) => node.isKind('mprescripts')).length;
if (prescripts)
return NOBREAK;
}
return p - 500;
},
close: (p, mo) => {
var _a;
const parent = mo.node.Parent;
if ((parent === null || parent === void 0 ? void 0 : parent.isKind('msubsup')) &&
!(parent.isKind('mmultiscripts') &&
((_a = parent.childNodes[1]) === null || _a === void 0 ? void 0 : _a.isKind('mprescripts'))) &&
mo.node === this.getLastToken(parent.childNodes[0])) {
return NOBREAK;
}
return p + 500;
},
space: (p, node) => {
const mspace = node;
if (!mspace.canBreak)
return NOBREAK;
const w = mspace.getBBox().w;
return w < 0 ? NOBREAK : w < 1 ? p : p - 100 * (w + 4);
},
separator: (p) => p + 500,
fuzz: (p) => p * 0.99,
};
this.TEXCLASS = {
[TEXCLASS.BIN]: (p) => p - 250,
[TEXCLASS.REL]: (p) => p - 500,
};
}
breakToWidth(wrapper, W) {
const state = this.state;
this.state = this.createState(wrapper);
this.state.width = W;
const n = wrapper.breakCount;
for (let i = 0; i <= n; i++) {
const line = wrapper.lineBBox[i] || wrapper.getLineBBox(i);
if (line.w > W) {
this.breakLineToWidth(wrapper, i);
}
}
for (const [ww, ij] of this.state.breaks) {
if (ij === null) {
const mo = ww.coreMO();
mo.setBreakStyle(mo.node.attributes.get('linebreakstyle') || 'before');
}
else {
ww.setBreakAt(ij);
}
ww.invalidateBBox();
}
this.state = state;
}
createState(wrapper) {
const mathWidth = wrapper.getBBox().w;
return {
breaks: new Set(),
potential: [],
width: 0,
w: 0,
prevWidth: 0,
prevBreak: null,
depth: 0,
mathWidth: mathWidth,
mathLeft: mathWidth,
};
}
breakLineToWidth(wrapper, i) {
const state = this.state;
state.potential = [];
state.w = 0;
state.prevWidth = 0;
state.prevBreak = null;
state.depth = 0;
this.visitNode(wrapper, i);
}
addWidth(bbox, w = null) {
if (w === null) {
w = bbox.L + bbox.w + bbox.R;
}
if (!w)
return;
w *= bbox.rscale;
this.state.w += w;
if (this.state.potential.length) {
this.state.potential[0][4] += w;
}
this.processBreak();
}
processBreak() {
const state = this.state;
while (state.potential.length && state.w > this.state.width) {
const br = state.potential.pop();
const [ww, , pw, dw, w] = br;
state.breaks.add(ww);
state.w = state.potential.reduce((w, brk) => w + brk[4], dw + w);
if (state.prevBreak && state.prevWidth + pw <= state.width) {
state.breaks.delete(state.prevBreak[0]);
state.prevWidth += pw;
}
else {
state.prevWidth = pw + dw;
}
state.potential.forEach((data) => (data[2] -= pw));
state.prevBreak = br;
state.mathLeft -= pw;
}
}
pushBreak(wrapper, penalty, w, ij) {
var _a;
const state = this.state;
if (penalty >= NOBREAK || (state.w === 0 && state.prevWidth === 0))
return;
while (state.potential.length &&
state.potential[0][1] > this.FACTORS.fuzz(penalty)) {
const data = state.potential.shift();
if (state.potential.length) {
state.potential[0][4] += data[4];
}
}
state.potential.unshift([
[wrapper, ij],
penalty,
state.w - (((_a = state.prevBreak) === null || _a === void 0 ? void 0 : _a[3]) || 0),
w,
0,
]);
}
getBorderLR(wrapper) {
var _a;
const data = wrapper.styleData;
if (!data)
return [0, 0];
const border = ((_a = data === null || data === void 0 ? void 0 : data.border) === null || _a === void 0 ? void 0 : _a.width) || [0, 0, 0, 0];
const padding = (data === null || data === void 0 ? void 0 : data.padding) || [0, 0, 0, 0];
return [border[3] + padding[3], border[1] + padding[1]];
}
getFirstToken(node) {
return node.isToken ? node : this.getFirstToken(node.childNodes[0]);
}
getLastToken(node) {
return node.isToken
? node
: this.getLastToken(node.childNodes[node.childNodes.length - 1]);
}
visitNode(wrapper, i) {
if (!wrapper)
return;
this.state.depth++;
if (wrapper.node.isEmbellished && !wrapper.node.isKind('mo')) {
this.visitEmbellishedOperator(wrapper, i);
}
else {
super.visitNode(wrapper, i);
}
this.state.depth--;
}
visitDefault(wrapper, i) {
var _a;
const bbox = wrapper.getLineBBox(i);
if (wrapper.node.isToken ||
wrapper.node.linebreakContainer ||
!((_a = wrapper.childNodes) === null || _a === void 0 ? void 0 : _a[0])) {
this.addWidth(bbox);
}
else {
const [L, R] = this.getBorderLR(wrapper);
if (i === 0) {
this.addWidth(bbox, bbox.L + L);
}
this.visitNode(wrapper.childNodes[0], i);
if (i === wrapper.breakCount) {
this.addWidth(bbox, bbox.R + R);
}
}
}
visitEmbellishedOperator(wrapper, _i) {
const mo = wrapper.coreMO();
const bbox = LineBBox.from(wrapper.getOuterBBox(), wrapper.linebreakOptions.lineleading);
bbox.getIndentData(mo.node);
const style = mo.getBreakStyle(mo.node.attributes.get('linebreakstyle'));
const dw = mo.processIndent('', bbox.indentData[1][1], '', bbox.indentData[0][1], this.state.width)[1];
const penalty = this.moPenalty(mo);
if (style === 'before') {
this.pushBreak(wrapper, penalty, dw - bbox.L, null);
this.addWidth(bbox);
}
else {
this.addWidth(bbox);
const w = (style === 'after'
? 0
: mo.multChar
? mo.multChar.getBBox().w
: bbox.w) + dw;
this.pushBreak(wrapper, penalty, w, null);
}
}
visitMoNode(wrapper, _i) {
const mo = wrapper;
const bbox = LineBBox.from(mo.getOuterBBox(), mo.linebreakOptions.lineleading);
bbox.getIndentData(mo.node);
const style = mo.getBreakStyle(mo.node.attributes.get('linebreakstyle'));
const dw = mo.processIndent('', bbox.indentData[1][1], '', bbox.indentData[0][1], this.state.width)[1];
const penalty = this.moPenalty(mo);
if (style === 'before') {
this.pushBreak(wrapper, penalty, dw - bbox.L, null);
this.addWidth(bbox);
}
else {
this.addWidth(bbox);
const w = (style === 'after'
? 0
: mo.multChar
? mo.multChar.getBBox().w
: bbox.w) + dw;
this.pushBreak(wrapper, penalty, w, null);
}
}
moPenalty(mo) {
const { linebreak, fence, form } = mo.node.attributes.getList('linebreak', 'fence', 'form');
const FACTORS = this.FACTORS;
let penalty = FACTORS.tail(FACTORS.width(0));
const isOpen = (fence && form === 'prefix') || mo.node.texClass === TEXCLASS.OPEN;
const isClose = (fence && form === 'postfix') || mo.node.texClass === TEXCLASS.CLOSE;
if (isOpen) {
penalty = FACTORS.open(penalty, mo);
this.state.depth++;
}
if (isClose) {
penalty = FACTORS.close(penalty, mo);
this.state.depth--;
}
penalty = (this.TEXCLASS[mo.node.texClass] || ((p) => p))(penalty);
return (this.PENALTY[linebreak] || ((p) => p))(FACTORS.depth(penalty));
}
getPrevious(mo) {
let child = mo.node;
let parent = child.parent;
let i = parent.childIndex(child);
while (parent && (parent.notParent || parent.isKind('mrow')) && i === 0) {
child = parent;
parent = child.parent;
i = parent.childIndex(child);
}
if (!parent || !i)
return null;
const prev = parent.childNodes[i - 1];
return prev.isEmbellished ? prev.coreMO() : null;
}
visitMspaceNode(wrapper, i) {
const bbox = wrapper.getLineBBox(i);
const mspace = wrapper;
if (mspace.canBreak) {
const penalty = this.mspacePenalty(mspace);
bbox.getIndentData(wrapper.node);
const dw = wrapper.processIndent('', bbox.indentData[1][1], '', bbox.indentData[0][1], this.state.width)[1];
this.pushBreak(wrapper, penalty, dw - bbox.w, null);
}
this.addWidth(bbox);
}
mspacePenalty(mspace) {
const linebreak = mspace.node.attributes.get('linebreak');
const FACTORS = this.FACTORS;
const penalty = FACTORS.space(FACTORS.tail(FACTORS.width(0)), mspace);
return (this.PENALTY[linebreak] || ((p) => p))(FACTORS.depth(penalty));
}
visitMtextNode(wrapper, i) {
if (!wrapper.getText().match(/ /)) {
this.visitDefault(wrapper, i);
return;
}
const mtext = wrapper;
mtext.clearBreakPoints();
const space = mtext.textWidth(' ');
const bbox = wrapper.getBBox();
const [L, R] = this.getBorderLR(wrapper);
this.addWidth(bbox, bbox.L + L);
const children = mtext.childNodes;
for (const j of children.keys()) {
const child = children[j];
if (child.node.isKind('text')) {
const words = child.node.getText().split(/ /);
const last = words.pop();
for (const k of words.keys()) {
this.addWidth(bbox, mtext.textWidth(words[k]));
this.pushBreak(wrapper, this.mtextPenalty(), -space, [j, k + 1]);
this.addWidth(bbox, space);
}
this.addWidth(bbox, mtext.textWidth(last));
}
else {
this.addWidth(child.getBBox());
}
}
this.addWidth(bbox, bbox.R + R);
}
mtextPenalty() {
const FACTORS = this.FACTORS;
return FACTORS.depth(FACTORS.tail(FACTORS.width(0)));
}
visitMrowNode(wrapper, i) {
const line = wrapper.lineBBox[i] || wrapper.getLineBBox(i);
const [start, startL] = line.start || [0, 0];
const [end, endL] = line.end || [wrapper.childNodes.length - 1, 0];
const [L, R] = this.getBorderLR(wrapper);
this.addWidth(line, line.L + L);
for (let i = start; i <= end; i++) {
this.visitNode(wrapper.childNodes[i], i === start ? startL : i === end ? endL : 0);
}
this.addWidth(line, line.R + R);
}
visitInferredMrowNode(wrapper, i) {
this.state.depth--;
this.visitMrowNode(wrapper, i);
this.state.depth++;
}
visitMfracNode(wrapper, i) {
const mfrac = wrapper;
if (!mfrac.node.attributes.get('bevelled') &&
mfrac.getOuterBBox().w > this.state.width) {
this.breakToWidth(mfrac.childNodes[0], this.state.width);
this.breakToWidth(mfrac.childNodes[1], this.state.width);
}
this.visitDefault(wrapper, i);
}
visitMsqrtNode(wrapper, i) {
if (wrapper.getOuterBBox().w > this.state.width) {
const msqrt = wrapper;
const base = msqrt.childNodes[msqrt.base];
this.breakToWidth(base, this.state.width - msqrt.rootWidth());
msqrt.getStretchedSurd();
}
this.visitDefault(wrapper, i);
}
visitMrootNode(wrapper, i) {
this.visitMsqrtNode(wrapper, i);
}
visitMsubNode(wrapper, i) {
this.visitDefault(wrapper, i);
const msub = wrapper;
const x = msub.getOffset()[0];
const sbox = msub.scriptChild.getOuterBBox();
const [L, R] = this.getBorderLR(wrapper);
this.addWidth(msub.getLineBBox(i), x + L + sbox.rscale * sbox.w + msub.font.params.scriptspace + R);
}
visitMsupNode(wrapper, i) {
this.visitDefault(wrapper, i);
const msup = wrapper;
const x = msup.getOffset()[0];
const sbox = msup.scriptChild.getOuterBBox();
const [L, R] = this.getBorderLR(wrapper);
this.addWidth(msup.getLineBBox(i), x + L + sbox.rscale * sbox.w + msup.font.params.scriptspace + R);
}
visitMsubsupNode(wrapper, i) {
this.visitDefault(wrapper, i);
const msubsup = wrapper;
const subbox = msubsup.subChild.getOuterBBox();
const supbox = msubsup.supChild.getOuterBBox();
const x = msubsup.getAdjustedIc();
const w = Math.max(subbox.rscale * subbox.w, x + supbox.rscale * supbox.w) +
msubsup.font.params.scriptspace;
const [L, R] = this.getBorderLR(wrapper);
this.addWidth(wrapper.getLineBBox(i), L + w + R);
}
visitMmultiscriptsNode(wrapper, i) {
const mmultiscripts = wrapper;
const data = mmultiscripts.scriptData;
if (data.numPrescripts) {
const w = Math.max(data.psup.rscale * data.psup.w, data.psub.rscale * data.psub.w);
this.addWidth(wrapper.getLineBBox(i), w + mmultiscripts.font.params.scriptspace);
}
this.visitDefault(wrapper, i);
if (data.numScripts) {
const w = Math.max(data.sup.rscale * data.sup.w, data.sub.rscale * data.sub.w);
this.addWidth(wrapper.getLineBBox(i), w + mmultiscripts.font.params.scriptspace);
}
}
visitMfencedNode(wrapper, i) {
const mfenced = wrapper;
const bbox = wrapper.getLineBBox(i);
const [L, R] = this.getBorderLR(wrapper);
if (i === 0) {
this.addWidth(bbox, bbox.L + L);
}
this.visitNode(mfenced.mrow, i);
if (i === wrapper.breakCount) {
this.addWidth(bbox, bbox.R + R);
}
}
visitMactionNode(wrapper, i) {
const maction = wrapper;
const bbox = wrapper.getLineBBox(i);
const [L, R] = this.getBorderLR(wrapper);
if (i === 0) {
this.addWidth(bbox, bbox.L + L);
}
this.visitNode(maction.selected, i);
if (i === wrapper.breakCount) {
this.addWidth(bbox, bbox.R + R);
}
}
}
(function () {
for (const op of Object.keys(OPTABLE.postfix)) {
const data = OPTABLE.postfix[op][3];
if (data && data.fence) {
data.linebreakstyle = 'after';
}
}
OPTABLE.infix['\u2061'] = [...OPTABLE.infix['\u2061']];
OPTABLE.infix['\u2061'][3] = { linebreak: 'nobreak' };
})();
//# sourceMappingURL=LinebreakVisitor.js.map
;// ./mjs/output/common.js
const FONTPATH = '@mathjax/%%FONT%%-font';
class CommonOutputJax extends AbstractOutputJax {
get forceInlineBreaks() {
return false;
}
constructor(options = {}, defaultFactory = null, defaultFont = null) {
const [fontClass, font] = options.fontData instanceof FontData
? [options.fontData.constructor, options.fontData]
: [options.fontData || defaultFont, null];
const [jaxOptions, fontOptions] = separateOptions(options, fontClass.OPTIONS);
super(jaxOptions);
this.factory =
this.options.wrapperFactory ||
new defaultFactory();
this.factory.jax = this;
this.styleJson = this.options.styleJson || new StyleJsonSheet();
this.font = font || new fontClass(fontOptions);
this.font.setOptions({ mathmlSpacing: this.options.mathmlSpacing });
this.unknownCache = new Map();
const linebreaks = (this.options.linebreaks.LinebreakVisitor ||
LinebreakVisitor);
this.linebreaks = new linebreaks(this.factory);
}
setAdaptor(adaptor) {
super.setAdaptor(adaptor);
if (this.options.htmlHDW === 'auto') {
this.options.htmlHDW = adaptor.canMeasureNodes ? 'ignore' : 'force';
}
}
addExtension(font, prefix = '') {
return this.font.addExtension(font, prefix);
}
typeset(math, html) {
this.setDocument(html);
const node = this.createNode();
this.toDOM(math, node, html);
return node;
}
createNode() {
const jax = this.constructor.NAME;
return this.html('mjx-container', { class: 'MathJax', jax: jax });
}
setScale(node, wrapper) {
let scale = this.getInitialScale() * this.options.scale;
if (wrapper.node.attributes.get('overflow') === 'scale' &&
this.math.display) {
const w = wrapper.getOuterBBox().w;
const W = this.math.metrics.containerWidth / this.pxPerEm;
if (w > W && w) {
scale *= W / w;
}
}
if (scale !== 1) {
this.adaptor.setStyle(node, 'fontSize', percent(scale));
}
}
getInitialScale() {
return this.math.metrics.scale;
}
toDOM(math, node, html = null) {
var _a;
this.setDocument(html);
this.math = math;
this.container = node;
this.pxPerEm = math.metrics.ex / this.font.params.x_height;
this.executeFilters(this.preFilters, math, html, node);
this.nodeMap = new Map();
math.root.attributes.getAllInherited().overflow =
this.options.displayOverflow;
const overflow = math.root.attributes.get('overflow');
this.adaptor.setAttribute(node, 'overflow', overflow);
const linebreak = overflow === 'linebreak';
if (linebreak) {
this.getLinebreakWidth();
}
const makeBreaks = this.options.linebreaks.inline && !math.display;
let inlineMarked = !!math.root.getProperty('inlineMarked');
if (inlineMarked &&
(!makeBreaks ||
this.forceInlineBreaks !== math.root.getProperty('inlineForced'))) {
this.unmarkInlineBreaks(math.root);
math.root.removeProperty('inlineMarked');
math.root.removeProperty('inlineForced');
inlineMarked = false;
}
if (makeBreaks && !inlineMarked) {
this.markInlineBreaks((_a = math.root.childNodes) === null || _a === void 0 ? void 0 : _a[0]);
math.root.setProperty('inlineMarked', true);
math.root.setProperty('inlineForced', this.forceInlineBreaks);
}
math.root.setTeXclass(null);
const wrapper = this.factory.wrap(math.root);
this.setScale(node, wrapper);
this.processMath(wrapper, node);
this.nodeMap = null;
this.executeFilters(this.postFilters, math, html, node);
}
getBBox(math, html) {
this.setDocument(html);
this.math = math;
math.root.setTeXclass(null);
this.nodeMap = new Map();
const bbox = this.factory.wrap(math.root).getOuterBBox();
this.nodeMap = null;
return bbox;
}
getLinebreakWidth() {
const W = this.math.metrics.containerWidth / this.pxPerEm;
const width = this.math.root.attributes.get('maxwidth') ||
this.options.linebreaks.width;
this.containerWidth = length2em(width, W, 1, this.pxPerEm);
}
markInlineBreaks(node) {
if (!node)
return;
const forcebreak = this.forceInlineBreaks;
let postbreak = false;
let marked = false;
let markNext = '';
for (const child of node.childNodes) {
if (markNext) {
marked = this.markInlineBreak(marked, forcebreak, markNext, node, child);
markNext = '';
postbreak = false;
}
else if (child.isEmbellished) {
if (child === node.childNodes[0]) {
continue;
}
const mo = child.coreMO();
const texClass = mo.texClass;
const linebreak = mo.attributes.get('linebreak');
const linebreakstyle = mo.attributes.get('linebreakstyle');
if ((texClass === TEXCLASS.BIN ||
texClass === TEXCLASS.REL ||
(texClass === TEXCLASS.ORD && mo.hasSpacingAttributes()) ||
linebreak !== 'auto') &&
linebreak !== 'nobreak') {
if (linebreakstyle === 'before') {
if (!postbreak || linebreak !== 'auto') {
marked = this.markInlineBreak(marked, forcebreak, linebreak, node, child, mo);
}
}
else {
markNext = linebreak;
}
}
postbreak = linebreak === 'newline' && linebreakstyle === 'after';
}
else if (child.isKind('mspace')) {
const linebreak = child.attributes.get('linebreak');
if (linebreak !== 'nobreak' && child.canBreak) {
marked = this.markInlineBreak(marked, forcebreak, linebreak, node, child);
}
postbreak = linebreak === 'newline';
}
else {
postbreak = false;
if ((child.isKind('mstyle') &&
!child.attributes.get('style') &&
!child.attributes.hasExplicit('mathbackground')) ||
child.isKind('semantics')) {
this.markInlineBreaks(child.childNodes[0]);
if (child.getProperty('process-breaks')) {
child.setProperty('inline-breaks', true);
child.childNodes[0].setProperty('inline-breaks', true);
node.parent.setProperty('process-breaks', 'true');
}
}
else if (child.isKind('mrow') &&
child.attributes.get('data-semantic-added')) {
this.markInlineBreaks(child);
if (child.getProperty('process-breaks')) {
child.setProperty('inline-breaks', true);
node.parent.setProperty('process-breaks', 'true');
}
}
}
}
}
markInlineBreak(marked, forcebreak, linebreak, node, child, mo = null) {
child.setProperty('breakable', true);
if (forcebreak && linebreak !== 'newline') {
child.setProperty('forcebreak', true);
mo === null || mo === void 0 ? void 0 : mo.setProperty('forcebreak', true);
}
else {
child.removeProperty('forcebreak');
mo === null || mo === void 0 ? void 0 : mo.removeProperty('forcebreak');
if (linebreak === 'newline') {
child.setProperty('newline', true);
}
}
if (!marked) {
node.setProperty('process-breaks', true);
node.parent.setProperty('process-breaks', true);
marked = true;
}
return marked;
}
unmarkInlineBreaks(node) {
if (!node)
return;
node.removeProperty('forcebreak');
node.removeProperty('breakable');
if (node.getProperty('process-breaks')) {
node.removeProperty('process-breaks');
for (const child of node.childNodes) {
this.unmarkInlineBreaks(child);
}
}
}
getMetrics(html) {
this.setDocument(html);
const adaptor = this.adaptor;
const maps = this.getMetricMaps(html);
for (const math of html.math) {
const parent = adaptor.parent(math.start.node);
if (math.state() < STATE.METRICS && parent) {
const map = maps[math.display ? 1 : 0];
const { em, ex, containerWidth, scale, family } = map.get(parent);
math.setMetrics(em, ex, containerWidth, scale);
if (this.options.mtextInheritFont) {
math.outputData.mtextFamily = family;
}
if (this.options.merrorInheritFont) {
math.outputData.merrorFamily = family;
}
math.state(STATE.METRICS);
}
}
}
getMetricsFor(node, display) {
const getFamily = this.options.mtextInheritFont || this.options.merrorInheritFont;
const test = this.getTestElement(node, display);
const metrics = Object.assign(Object.assign({}, this.measureMetrics(test, getFamily)), { display });
this.adaptor.remove(test);
return metrics;
}
getMetricMaps(html) {
const adaptor = this.adaptor;
const domMaps = [
new Map(),
new Map(),
];
for (const math of html.math) {
const node = adaptor.parent(math.start.node);
if (node && math.state() < STATE.METRICS) {
const map = domMaps[math.display ? 1 : 0];
if (!map.has(node)) {
map.set(node, this.getTestElement(node, math.display));
}
}
}
const getFamily = this.options.mtextInheritFont || this.options.merrorInheritFont;
const maps = [new Map(), new Map()];
for (const i of maps.keys()) {
for (const node of domMaps[i].keys()) {
maps[i].set(node, this.measureMetrics(domMaps[i].get(node), getFamily));
}
}
for (const i of maps.keys()) {
for (const node of domMaps[i].values()) {
adaptor.remove(node);
}
}
return maps;
}
getTestElement(node, display) {
const adaptor = this.adaptor;
if (!this.testInline) {
this.testInline = this.html('mjx-test', {
style: {
display: 'inline-block',
width: '100%',
'font-style': 'normal',
'font-weight': 'normal',
'font-size': '100%',
'font-size-adjust': 'none',
'text-indent': 0,
'text-transform': 'none',
'letter-spacing': 'normal',
'word-spacing': 'normal',
overflow: 'hidden',
height: '1px',
'margin-right': '-1px',
},
}, [
this.html('mjx-left-box', {
style: {
display: 'inline-block',
width: 0,
float: 'left',
},
}),
this.html('mjx-ex-box', {
style: {
position: 'absolute',
overflow: 'hidden',
width: '1px',
height: '60ex',
},
}),
this.html('mjx-right-box', {
style: {
display: 'inline-block',
width: 0,
float: 'right',
},
}),
]);
this.testDisplay = adaptor.clone(this.testInline);
adaptor.setStyle(this.testDisplay, 'display', 'table');
adaptor.setStyle(this.testDisplay, 'margin-right', '');
adaptor.setStyle(adaptor.firstChild(this.testDisplay), 'display', 'none');
const right = adaptor.lastChild(this.testDisplay);
adaptor.setStyle(right, 'display', 'table-cell');
adaptor.setStyle(right, 'width', '10000em');
adaptor.setStyle(right, 'float', '');
}
return adaptor.append(node, adaptor.clone(display ? this.testDisplay : this.testInline));
}
measureMetrics(node, getFamily) {
const adaptor = this.adaptor;
const family = getFamily ? adaptor.fontFamily(node) : '';
const em = adaptor.fontSize(node);
const [w, h] = adaptor.nodeSize(adaptor.childNode(node, 1));
const ex = w ? h / 60 : em * this.options.exFactor;
const containerWidth = !w
? 1000000
: adaptor.getStyle(node, 'display') === 'table'
? adaptor.nodeSize(adaptor.lastChild(node))[0] - 1
: adaptor.nodeBBox(adaptor.lastChild(node)).left -
adaptor.nodeBBox(adaptor.firstChild(node)).left -
2;
const scale = Math.max(this.options.minScale, this.options.matchFontHeight ? ex / this.font.params.x_height / em : 1);
return { em, ex, containerWidth, scale, family };
}
styleSheet(html) {
this.setDocument(html);
this.styleJson.clear();
this.styleJson.addStyles(this.constructor.commonStyles);
if ('getStyles' in html) {
for (const styles of html.getStyles()) {
this.styleJson.addStyles(styles);
}
}
this.addWrapperStyles(this.styleJson);
this.addFontStyles(this.styleJson);
const sheet = this.html('style', { id: 'MJX-styles' }, [
this.text('\n' + this.styleJson.cssText + '\n'),
]);
return sheet;
}
addFontStyles(styles) {
styles.addStyles(this.font.styles);
}
addWrapperStyles(styles) {
for (const kind of this.factory.getKinds()) {
this.addClassStyles(this.factory.getNodeClass(kind), styles);
}
}
addClassStyles(CLASS, styles) {
CLASS.addStyles(styles, this);
}
insertStyles(_styles) { }
setDocument(html) {
if (html) {
this.document = html;
this.adaptor.document = html.document;
}
}
html(type, def = {}, content = [], ns) {
return this.adaptor.node(type, def, content, ns);
}
text(text) {
return this.adaptor.text(text);
}
fixed(m, n = 3) {
if (Math.abs(m) < 0.0006) {
return '0';
}
return m.toFixed(n).replace(/\.?0+$/, '');
}
measureText(text, variant, font = ['', false, false]) {
const node = this.unknownText(text, variant);
if (variant === '-explicitFont') {
const styles = this.cssFontStyles(font);
this.adaptor.setAttributes(node, { style: styles });
}
return this.measureTextNodeWithCache(node, text, variant, font);
}
measureTextNodeWithCache(text, chars, variant, font = ['', false, false]) {
if (variant === '-explicitFont') {
variant = [font[0], font[1] ? 'T' : 'F', font[2] ? 'T' : 'F', ''].join('-');
}
if (!this.unknownCache.has(variant)) {
this.unknownCache.set(variant, new Map());
}
const map = this.unknownCache.get(variant);
const cached = map.get(chars);
if (cached)
return cached;
const bbox = this.measureTextNode(text);
map.set(chars, bbox);
return bbox;
}
cssFontStyles(font, styles = {}) {
const [family, italic, bold] = font;
styles['font-family'] = this.font.getFamily(family);
if (italic)
styles['font-style'] = 'italic';
if (bold)
styles['font-weight'] = 'bold';
return styles;
}
getFontData(styles) {
if (!styles) {
styles = new Styles();
}
return [
this.font.getFamily(styles.get('font-family')),
styles.get('font-style') === 'italic',
styles.get('font-weight') === 'bold',
];
}
}
CommonOutputJax.NAME = 'Common';
CommonOutputJax.OPTIONS = Object.assign(Object.assign({}, AbstractOutputJax.OPTIONS), { scale: 1, minScale: .5, mtextInheritFont: false, merrorInheritFont: false, mtextFont: '', merrorFont: 'serif', mathmlSpacing: false, skipAttributes: {}, exFactor: .5, displayAlign: 'center', displayIndent: '0', displayOverflow: 'overflow', linebreaks: {
inline: true,
width: '100%',
lineleading: .2,
LinebreakVisitor: null,
}, font: '', htmlHDW: 'auto', wrapperFactory: null, fontData: null, fontPath: FONTPATH, styleJson: null });
CommonOutputJax.commonStyles = {
'mjx-container[overflow="scroll"][display]': {
overflow: 'auto clip',
'min-width': 'initial !important',
},
'mjx-container[overflow="truncate"][display]': {
overflow: 'hidden clip',
'min-width': 'initial !important',
},
'mjx-container[display]': {
display: 'block',
'text-align': 'center',
'justify-content': 'center',
margin: 'calc(1em - 2px) 0',
padding: '2px 0',
},
'mjx-container[display][width="full"]': {
display: 'flex',
},
'mjx-container[justify="left"]': {
'text-align': 'left',
'justify-content': 'left',
},
'mjx-container[justify="right"]': {
'text-align': 'right',
'justify-content': 'right',
},
};
//# sourceMappingURL=common.js.map
;// ./mjs/output/common/WrapperFactory.js
class CommonWrapperFactory extends AbstractWrapperFactory {
constructor() {
super(...arguments);
this.jax = null;
}
get Wrappers() {
return this.node;
}
}
CommonWrapperFactory.defaultNodes = {};
//# sourceMappingURL=WrapperFactory.js.map
;// ./mjs/output/common/Wrapper.js
const SMALLSIZE = 2 / 18;
const MOSPACE = 5 / 18;
function MathMLSpace(script, nodict, size) {
return nodict
? script
? SMALLSIZE
: MOSPACE
: script
? size < SMALLSIZE
? 0
: SMALLSIZE
: size;
}
const SPACE = {
[em(0)]: '0',
[em(2 / 18)]: '1',
[em(3 / 18)]: '2',
[em(4 / 18)]: '3',
[em(5 / 18)]: '4',
[em(6 / 18)]: '5'
};
class CommonWrapper extends AbstractWrapper {
static addStyles(styles, _jax) {
styles.addStyles(this.styles);
}
get jax() {
return this.factory.jax;
}
get adaptor() {
return this.factory.jax.adaptor;
}
get metrics() {
return this.factory.jax.math.metrics;
}
get containerWidth() {
return this.jax.containerWidth;
}
get linebreaks() {
return this.jax.linebreaks;
}
get linebreakOptions() {
return this.jax.options.linebreaks;
}
get fixesPWidth() {
return !this.node.notParent && !this.node.isToken;
}
get breakCount() {
if (this._breakCount < 0) {
const node = this.node;
this._breakCount = node.isEmbellished
? this.coreMO().embellishedBreakCount
: node.arity < 0 &&
!node.linebreakContainer &&
this.childNodes[0]
.isStack
? this.childNodes[0].breakCount
: 0;
}
return this._breakCount;
}
breakTop(mrow, _child) {
return this.node.linebreakContainer || !this.parent
? mrow
: this.parent.breakTop(mrow, this);
}
constructor(factory, node, parent = null) {
super(factory, node);
this.parent = null;
this.dom = null;
this.removedStyles = null;
this.styles = null;
this.styleData = null;
this.variant = '';
this.bboxComputed = false;
this._breakCount = -1;
this.lineBBox = [];
this.stretch = NOSTRETCH;
this.font = null;
this.parent = parent;
this.font = factory.jax.font;
this.bbox = BBox.zero();
this.getStyles();
this.getStyleData();
this.getVariant();
this.getScale();
this.getSpace();
this.childNodes = node.childNodes.map((child) => {
const wrapped = this.wrap(child);
if (wrapped.bbox.pwidth && (node.notParent || node.isKind('math'))) {
this.bbox.pwidth = BBox.fullWidth;
}
return wrapped;
});
}
wrap(node, parent = null) {
const wrapped = this.factory.wrap(node, parent || this);
if (parent) {
parent.childNodes.push(wrapped);
}
this.jax.nodeMap.set(node, wrapped);
return wrapped;
}
getBBox(save = true) {
if (this.bboxComputed) {
return this.bbox;
}
const bbox = save ? this.bbox : BBox.zero();
this.computeBBox(bbox);
this.bboxComputed = save;
return bbox;
}
getOuterBBox(save = true) {
var _a;
const bbox = this.getBBox(save);
if (!this.styleData)
return bbox;
const padding = this.styleData.padding;
const border = ((_a = this.styleData.border) === null || _a === void 0 ? void 0 : _a.width) || [0, 0, 0, 0];
const obox = bbox.copy();
for (const [, i, side] of BBox.boxSides) {
obox[side] += padding[i] + border[i];
}
return obox;
}
getUnbrokenHD() {
const n = this.breakCount + 1;
let H = 0;
let D = 0;
for (let i = 0; i < n; i++) {
const { h, d } = this.getLineBBox(i);
if (h > H) {
H = h;
}
if (d > D) {
D = d;
}
}
return [H, D];
}
computeBBox(bbox, recompute = false) {
bbox.empty();
for (const child of this.childNodes) {
bbox.append(child.getOuterBBox());
}
bbox.clean();
if (this.fixesPWidth && this.setChildPWidths(recompute)) {
this.computeBBox(bbox, true);
}
}
getLineBBox(i) {
if (!this.lineBBox[i]) {
const n = this.breakCount;
if (n) {
const line = this.embellishedBBox(i) || this.computeLineBBox(i);
this.lineBBox[i] = line;
if (i === 0) {
if (!this.node.isKind('mo') && this.node.isEmbellished) {
line.originalL = this.getBBox().L;
}
else {
line.L = this.getBBox().L;
}
}
if (i === n) {
line.R = this.getBBox().R;
}
}
else {
const obox = this.getOuterBBox();
this.lineBBox[i] = LineBBox.from(obox, this.linebreakOptions.lineleading);
}
}
return this.lineBBox[i];
}
embellishedBBox(i) {
if (!this.node.isEmbellished || this.node.isKind('mo'))
return null;
const mo = this.coreMO();
return mo.moLineBBox(i, mo.embellishedBreakStyle, this.getOuterBBox());
}
computeLineBBox(i) {
return this.getChildLineBBox(this.childNodes[0], i);
}
getBreakNode(bbox) {
var _a, _b;
if (!bbox.start) {
return [this, null];
}
const [i, j] = bbox.start;
if (this.node.isEmbellished) {
return [this, this.coreMO()];
}
const childNodes = ((_b = (_a = this.childNodes[0]) === null || _a === void 0 ? void 0 : _a.node) === null || _b === void 0 ? void 0 : _b.isInferred)
? this.childNodes[0].childNodes
: this.childNodes;
if (this.node.isToken || !childNodes[i]) {
return [this, null];
}
return childNodes[i].getBreakNode(childNodes[i].getLineBBox(j));
}
getChildLineBBox(child, i) {
const n = this.breakCount;
let cbox = child.getLineBBox(i);
if (this.styleData || this.bbox.L || this.bbox.R) {
cbox = cbox.copy();
}
this.addMiddleBorders(cbox);
if (i === 0) {
cbox.L += this.bbox.L;
this.addLeftBorders(cbox);
}
else if (i === n) {
cbox.R += this.bbox.R;
this.addRightBorders(cbox);
}
return cbox;
}
addLeftBorders(bbox) {
var _a;
if (!this.styleData)
return;
const border = this.styleData.border;
const padding = this.styleData.padding;
bbox.w += (((_a = border === null || border === void 0 ? void 0 : border.width) === null || _a === void 0 ? void 0 : _a[3]) || 0) + ((padding === null || padding === void 0 ? void 0 : padding[3]) || 0);
}
addMiddleBorders(bbox) {
var _a, _b;
if (!this.styleData)
return;
const border = this.styleData.border;
const padding = this.styleData.padding;
bbox.h += (((_a = border === null || border === void 0 ? void 0 : border.width) === null || _a === void 0 ? void 0 : _a[0]) || 0) + ((padding === null || padding === void 0 ? void 0 : padding[0]) || 0);
bbox.d += (((_b = border === null || border === void 0 ? void 0 : border.width) === null || _b === void 0 ? void 0 : _b[2]) || 0) + ((padding === null || padding === void 0 ? void 0 : padding[2]) || 0);
}
addRightBorders(bbox) {
var _a;
if (!this.styleData)
return;
const border = this.styleData.border;
const padding = this.styleData.padding;
bbox.w += (((_a = border === null || border === void 0 ? void 0 : border.width) === null || _a === void 0 ? void 0 : _a[1]) || 0) + ((padding === null || padding === void 0 ? void 0 : padding[1]) || 0);
}
setChildPWidths(recompute, w = null, clear = true) {
if (recompute) {
return false;
}
if (clear) {
this.bbox.pwidth = '';
}
let changed = false;
for (const child of this.childNodes) {
const cbox = child.getBBox();
if (cbox.pwidth &&
child.setChildPWidths(recompute, w === null ? cbox.w : w, clear)) {
changed = true;
}
}
return changed;
}
breakToWidth(_W) {
}
invalidateBBox(bubble = true) {
if (this.bboxComputed || this._breakCount >= 0) {
this.bboxComputed = false;
this.lineBBox = [];
this._breakCount = -1;
if (this.parent && bubble) {
this.parent.invalidateBBox();
}
}
}
copySkewIC(bbox) {
var _a, _b, _c;
const first = this.childNodes[0];
if ((_a = first === null || first === void 0 ? void 0 : first.bbox) === null || _a === void 0 ? void 0 : _a.sk) {
bbox.sk = first.bbox.sk;
}
if ((_b = first === null || first === void 0 ? void 0 : first.bbox) === null || _b === void 0 ? void 0 : _b.dx) {
bbox.dx = first.bbox.dx;
}
const last = this.childNodes[this.childNodes.length - 1];
if ((_c = last === null || last === void 0 ? void 0 : last.bbox) === null || _c === void 0 ? void 0 : _c.ic) {
bbox.ic = last.bbox.ic;
bbox.w += bbox.ic;
}
}
getStyles() {
const styleString = this.node.attributes.getExplicit('style');
if (!styleString)
return;
const style = (this.styles = new Styles(styleString));
for (let i = 0, m = CommonWrapper.removeStyles.length; i < m; i++) {
const id = CommonWrapper.removeStyles[i];
if (style.get(id)) {
if (!this.removedStyles)
this.removedStyles = {};
this.removedStyles[id] = style.get(id);
style.set(id, '');
}
}
}
getStyleData() {
if (!this.styles)
return;
const padding = Array(4).fill(0);
const width = Array(4).fill(0);
const style = Array(4);
const color = Array(4);
let hasPadding = false;
let hasBorder = false;
for (const [name, i] of BBox.boxSides) {
const key = 'border' + name;
const w = this.styles.get(key + 'Width');
if (w) {
hasBorder = true;
width[i] = Math.max(0, this.length2em(w, 1));
style[i] = this.styles.get(key + 'Style') || 'solid';
color[i] = this.styles.get(key + 'Color');
}
const p = this.styles.get('padding' + name);
if (p) {
hasPadding = true;
padding[i] = Math.max(0, this.length2em(p, 1));
}
}
this.styleData =
hasPadding || hasBorder
? {
padding,
border: hasBorder ? { width, style, color } : null,
}
: null;
}
getVariant() {
if (!this.node.isToken)
return;
const attributes = this.node.attributes;
let variant = attributes.get('mathvariant');
if (attributes.hasExplicit('mathvariant')) {
if (!this.font.getVariant(variant)) {
console.warn(`Invalid variant: ${variant}`);
variant = 'normal';
}
}
else {
const values = attributes.getList('fontfamily', 'fontweight', 'fontstyle');
if (this.removedStyles) {
const style = this.removedStyles;
if (style.fontFamily)
values.family = style.fontFamily;
if (style.fontWeight)
values.weight = style.fontWeight;
if (style.fontStyle)
values.style = style.fontStyle;
}
if (values.fontfamily)
values.family = values.fontfamily;
if (values.fontweight)
values.weight = values.fontweight;
if (values.fontstyle)
values.style = values.fontstyle;
if (values.weight && values.weight.match(/^\d+$/)) {
values.weight = parseInt(values.weight) > 600 ? 'bold' : 'normal';
}
if (values.family) {
variant = this.explicitVariant(values.family, values.weight, values.style);
}
else {
if (this.node.getProperty('variantForm'))
variant = '-tex-variant';
variant =
(CommonWrapper.BOLDVARIANTS[values.weight] || {})[variant] || variant;
variant =
(CommonWrapper.ITALICVARIANTS[values.style] || {})[variant] ||
variant;
}
}
this.variant = variant;
}
explicitVariant(fontFamily, fontWeight, fontStyle) {
let style = this.styles;
if (!style)
style = this.styles = new Styles();
style.set('fontFamily', fontFamily);
if (fontWeight)
style.set('fontWeight', fontWeight);
if (fontStyle)
style.set('fontStyle', fontStyle);
return '-explicitFont';
}
getScale() {
let scale = 1;
const parent = this.parent;
const pscale = parent ? parent.bbox.scale : 1;
const attributes = this.node.attributes;
const scriptlevel = Math.min(attributes.get('scriptlevel'), 2);
let fontsize = attributes.get('fontsize');
let mathsize = this.node.isToken || this.node.isKind('mstyle')
? attributes.get('mathsize')
: attributes.getInherited('mathsize');
if (scriptlevel !== 0) {
scale = Math.pow(attributes.get('scriptsizemultiplier'), scriptlevel);
}
if (this.removedStyles && this.removedStyles.fontSize && !fontsize) {
fontsize = this.removedStyles.fontSize;
}
if (fontsize && !attributes.hasExplicit('mathsize')) {
mathsize = fontsize;
}
if (mathsize !== '1') {
scale *= this.length2em(mathsize, 1, 1);
}
if (scriptlevel !== 0) {
const scriptminsize = this.length2em(attributes.get('scriptminsize'), 0.4, 1);
if (scale < scriptminsize)
scale = scriptminsize;
}
this.bbox.scale = scale;
this.bbox.rscale = scale / pscale;
}
getSpace() {
const isTop = this.isTopEmbellished();
const hasSpacing = this.node.hasSpacingAttributes();
if (this.jax.options.mathmlSpacing || hasSpacing) {
if (isTop) {
this.getMathMLSpacing();
}
}
else {
this.getTeXSpacing(isTop, hasSpacing);
}
}
getMathMLSpacing() {
const node = this.node.coreMO();
const child = node.coreParent();
const parent = child.parent;
if (!parent || !parent.isKind('mrow') || parent.childNodes.length === 1) {
return;
}
const n = parent.childIndex(child);
if (n === null)
return;
const noDictDef = node.getProperty('noDictDef');
const attributes = node.attributes;
const isScript = attributes.get('scriptlevel') > 0;
this.bbox.L = attributes.isSet('lspace')
? Math.max(0, this.length2em(attributes.get('lspace')))
: MathMLSpace(isScript, noDictDef, node.lspace);
this.bbox.R = attributes.isSet('rspace')
? Math.max(0, this.length2em(attributes.get('rspace')))
: MathMLSpace(isScript, noDictDef, node.rspace);
if (!n)
return;
const prev = parent.childNodes[n - 1];
if (!prev.isEmbellished)
return;
const bbox = this.jax.nodeMap.get(prev).getBBox();
if (bbox.R) {
this.bbox.L = Math.max(0, this.bbox.L - bbox.R);
}
}
getTeXSpacing(isTop, hasSpacing) {
if (!hasSpacing) {
const space = this.node.texSpacing();
if (space) {
this.bbox.L = this.length2em(space);
}
}
if (isTop || hasSpacing) {
const attributes = this.node.coreMO().attributes;
if (attributes.isSet('lspace')) {
this.bbox.L = Math.max(0, this.length2em(attributes.get('lspace')));
}
if (attributes.isSet('rspace')) {
this.bbox.R = Math.max(0, this.length2em(attributes.get('rspace')));
}
}
}
isTopEmbellished() {
return (this.node.isEmbellished &&
!(this.node.parent && this.node.parent.isEmbellished));
}
core() {
return this.jax.nodeMap.get(this.node.core());
}
coreMO() {
return this.jax.nodeMap.get(this.node.coreMO());
}
coreRScale() {
let rscale = this.bbox.rscale;
let node = this.coreMO();
while (node !== this && node) {
rscale *= node.bbox.rscale;
node = node.parent;
}
return rscale;
}
getRScale() {
let rscale = 1;
let node = this;
while (node) {
rscale *= node.bbox.rscale;
node = node.parent;
}
return rscale;
}
getText() {
let text = '';
if (this.node.isToken) {
for (const child of this.node.childNodes) {
if (child instanceof TextNode) {
text += child.getText();
}
}
}
return text;
}
canStretch(direction) {
this.stretch = NOSTRETCH;
if (this.node.isEmbellished) {
const core = this.core();
if (core && core.node !== this.node) {
if (core.canStretch(direction)) {
this.stretch = core.stretch;
}
}
}
return this.stretch.dir !== DIRECTION.None;
}
getAlignShift() {
let { indentalign, indentshift, indentalignfirst, indentshiftfirst } = this.node.attributes.getAllAttributes();
if (indentalignfirst !== 'indentalign') {
indentalign = indentalignfirst;
}
if (indentshiftfirst !== 'indentshift') {
indentshift = indentshiftfirst;
}
return this.processIndent(indentalign, indentshift);
}
processIndent(indentalign, indentshift, align = '', shift = '', width = this.metrics.containerWidth) {
if (!this.jax.math.display) {
return ['left', 0];
}
if (!align || align === 'auto') {
align = this.jax.math.root.getProperty('inlineMarked')
? 'left'
: this.jax.options.displayAlign;
}
if (!shift || shift === 'auto') {
shift = this.jax.math.root.getProperty('inlineMarked')
? '0'
: this.jax.options.displayIndent;
}
if (indentalign === 'auto') {
indentalign = align;
}
if (indentshift === 'auto') {
indentshift = shift;
if (indentalign === 'right' && !indentshift.match(/^\s*0[a-z]*\s*$/)) {
indentshift = ('-' + indentshift.trim()).replace(/^--/, '');
}
}
const indent = this.length2em(indentshift, width);
return [indentalign, indent];
}
getAlignX(W, bbox, align) {
return align === 'right'
? W - (bbox.w + bbox.R) * bbox.rscale
: align === 'left'
? bbox.L * bbox.rscale
: (W - bbox.w * bbox.rscale) / 2;
}
getAlignY(H, D, h, d, align) {
return align === 'top'
? H - h
: align === 'bottom'
? d - D
: align === 'center'
? (H - h - (D - d)) / 2
: 0;
}
getWrapWidth(i) {
return this.childNodes[i].getBBox().w;
}
getChildAlign(_i) {
return 'left';
}
percent(m) {
return percent(m);
}
em(m) {
return em(m);
}
px(m, M = -BIGDIMEN) {
return px(m, M, this.metrics.em);
}
length2em(length, size = 1, scale = null) {
if (scale === null) {
scale = this.bbox.scale;
}
const t = this.font.params.rule_thickness;
const factor = lookup(length, { medium: 1, thin: 2 / 3, thick: 5 / 3 }, 0);
return factor
? factor * t
: length2em(length, size, scale, this.jax.pxPerEm);
}
unicodeChars(text, name = this.variant) {
let chars = unicodeChars(text);
const variant = this.font.getVariant(name);
if (variant && variant.chars) {
const map = variant.chars;
chars = chars.map((n) => { var _a, _b; return ((_b = (_a = map[n]) === null || _a === void 0 ? void 0 : _a[3]) === null || _b === void 0 ? void 0 : _b.smp) || n; });
}
return chars;
}
remapChars(chars) {
return chars;
}
mmlText(text) {
return this.node.factory.create('text').setText(text);
}
mmlNode(kind, properties = {}, children = []) {
return this.node.factory.create(kind, properties, children);
}
createMo(text) {
const mmlFactory = this.node.factory;
const textNode = mmlFactory.create('text').setText(text);
const mml = mmlFactory.create('mo', { stretchy: true }, [textNode]);
mml.inheritAttributesFrom(this.node);
mml.parent = this.node.parent;
const node = this.wrap(mml);
node.parent = this;
return node;
}
getVariantChar(variant, n) {
const char = this.font.getChar(variant, n) || [0, 0, 0, { unknown: true }];
if (char.length === 3) {
char[3] = {};
}
return char;
}
html(type, def = {}, content = []) {
return this.jax.html(type, def, content);
}
}
CommonWrapper.kind = 'unknown';
CommonWrapper.styles = {};
CommonWrapper.removeStyles = [
'fontSize',
'fontFamily',
'fontWeight',
'fontStyle',
'fontVariant',
'font',
];
CommonWrapper.skipAttributes = {
fontfamily: true,
fontsize: true,
fontweight: true,
fontstyle: true,
color: true,
background: true,
class: true,
href: true,
style: true,
xmlns: true,
};
CommonWrapper.BOLDVARIANTS = {
bold: {
normal: 'bold',
italic: 'bold-italic',
fraktur: 'bold-fraktur',
script: 'bold-script',
'sans-serif': 'bold-sans-serif',
'sans-serif-italic': 'sans-serif-bold-italic',
},
normal: {
bold: 'normal',
'bold-italic': 'italic',
'bold-fraktur': 'fraktur',
'bold-script': 'script',
'bold-sans-serif': 'sans-serif',
'sans-serif-bold-italic': 'sans-serif-italic',
},
};
CommonWrapper.ITALICVARIANTS = {
italic: {
normal: 'italic',
bold: 'bold-italic',
'sans-serif': 'sans-serif-italic',
'bold-sans-serif': 'sans-serif-bold-italic',
},
normal: {
italic: 'normal',
'bold-italic': 'bold',
'sans-serif-italic': 'sans-serif',
'sans-serif-bold-italic': 'bold-sans-serif',
},
};
//# sourceMappingURL=Wrapper.js.map
;// ./mjs/output/chtml/Wrapper.js
const FONTSIZE = {
'70.7%': 's',
'70%': 's',
'50%': 'ss',
'60%': 'Tn',
'85%': 'sm',
'120%': 'lg',
'144%': 'Lg',
'173%': 'LG',
'207%': 'hg',
'249%': 'HG',
};
class ChtmlWrapper extends CommonWrapper {
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
this.addChildren(this.standardChtmlNodes(parents));
}
toEmbellishedCHTML(parents) {
if (parents.length <= 1 || !this.node.isEmbellished)
return false;
const adaptor = this.adaptor;
parents.forEach((dom) => adaptor.append(dom, this.html('mjx-linestrut')));
const style = this.coreMO().embellishedBreakStyle;
const dom = [];
for (const [parent, STYLE] of [
[parents[0], 'before'],
[parents[1], 'after'],
]) {
if (style !== STYLE) {
this.toCHTML([parent]);
dom.push(this.dom[0]);
if (STYLE === 'after') {
adaptor.removeAttribute(this.dom[0], 'space');
}
}
else {
dom.push(this.createChtmlNodes([parent])[0]);
}
}
this.dom = dom;
return true;
}
addChildren(parents) {
for (const child of this.childNodes) {
child.toCHTML(parents);
}
}
standardChtmlNodes(parents) {
this.markUsed();
const chtml = this.createChtmlNodes(parents);
this.handleStyles();
this.handleScale();
this.handleBorders();
this.handleColor();
this.handleSpace();
this.handleAttributes();
this.handlePWidth();
return chtml;
}
markUsed() {
this.jax.wrapperUsage.add(this.kind);
}
createChtmlNodes(parents) {
this.dom = parents.map((_parent) => this.html('mjx-' + this.node.kind));
parents = this.handleHref(parents);
for (const i of parents.keys()) {
this.adaptor.append(parents[i], this.dom[i]);
}
return this.dom;
}
handleHref(parents) {
const href = this.node.attributes.get('href');
if (!href)
return parents;
return parents.map((parent) => this.adaptor.append(parent, this.html('a', { href: href })));
}
handleStyles() {
if (!this.styles)
return;
const styles = this.styles.cssText;
if (styles) {
const adaptor = this.adaptor;
this.dom.forEach((dom) => adaptor.setAttribute(dom, 'style', styles));
const family = this.styles.get('font-family');
if (family) {
this.dom.forEach((dom) => adaptor.setStyle(dom, 'font-family', this.font.cssFamilyPrefix + ', ' + family));
}
}
}
handleScale() {
this.dom.forEach((dom) => this.setScale(dom, this.bbox.rscale));
}
setScale(chtml, rscale) {
const scale = Math.abs(rscale - 1) < 0.001 ? 1 : rscale;
if (chtml && scale !== 1) {
const size = this.percent(scale);
if (FONTSIZE[size]) {
this.adaptor.setAttribute(chtml, 'size', FONTSIZE[size]);
}
else {
this.adaptor.setStyle(chtml, 'fontSize', size);
}
}
return chtml;
}
handleSpace() {
const adaptor = this.adaptor;
const breakable = !!this.node.getProperty('breakable') && !this.node.getProperty('newline');
const n = this.dom.length - 1;
for (const data of [
[this.getLineBBox(0).L, 'space', 'marginLeft', 0],
[this.getLineBBox(n).R, 'rspace', 'marginRight', n],
]) {
const [dimen, name, margin, i] = data;
const space = this.em(dimen);
if (breakable && name === 'space') {
const node = adaptor.node('mjx-break', SPACE[space]
? { size: SPACE[space] }
: { style: `letter-spacing: ${this.em(dimen - 1)}` }, [adaptor.text(' ')]);
adaptor.insert(node, this.dom[i]);
}
else if (dimen) {
if (SPACE[space]) {
adaptor.setAttribute(this.dom[i], name, SPACE[space]);
}
else {
adaptor.setStyle(this.dom[i], margin, space);
}
}
}
}
handleBorders() {
var _a, _b;
const border = (_a = this.styleData) === null || _a === void 0 ? void 0 : _a.border;
const padding = (_b = this.styleData) === null || _b === void 0 ? void 0 : _b.padding;
const n = this.dom.length - 1;
if (!border || !n)
return;
const adaptor = this.adaptor;
for (const k of this.dom.keys()) {
const dom = this.dom[k];
if (k) {
if (border.width[3]) {
adaptor.setStyle(dom, 'border-left', ' none');
}
if (padding[3]) {
adaptor.setStyle(dom, 'padding-left', '0');
}
}
if (k !== n) {
if (border.width[1]) {
adaptor.setStyle(dom, 'border-right', 'none');
}
if (padding[1]) {
adaptor.setStyle(dom, 'padding-right', '0');
}
}
}
}
handleColor() {
var _a;
const adaptor = this.adaptor;
const attributes = this.node.attributes;
const color = (attributes.getExplicit('mathcolor') ||
attributes.getExplicit('color'));
const background = (attributes.getExplicit('mathbackground') ||
attributes.getExplicit('background') ||
((_a = this.styles) === null || _a === void 0 ? void 0 : _a.get('background-color')));
if (color) {
this.dom.forEach((dom) => adaptor.setStyle(dom, 'color', color));
}
if (background) {
this.dom.forEach((dom) => adaptor.setStyle(dom, 'backgroundColor', background));
}
}
handleAttributes() {
const adaptor = this.adaptor;
const attributes = this.node.attributes;
const defaults = attributes.getAllDefaults();
const skip = ChtmlWrapper.skipAttributes;
for (const name of attributes.getExplicitNames()) {
if (skip[name] === false ||
(!(name in defaults) &&
!skip[name] &&
!adaptor.hasAttribute(this.dom[0], name))) {
const value = attributes.getExplicit(name);
this.dom.forEach((dom) => adaptor.setAttribute(dom, name, value));
}
}
if (attributes.get('class')) {
const names = attributes.get('class').trim().split(/ +/);
for (const name of names) {
this.dom.forEach((dom) => adaptor.addClass(dom, name));
}
}
if (this.node.getProperty('inline-breaks')) {
this.dom.forEach((dom) => adaptor.setAttribute(dom, 'inline-breaks', 'true'));
}
}
handlePWidth() {
if (this.bbox.pwidth) {
const adaptor = this.adaptor;
if (this.bbox.pwidth === BBox.fullWidth) {
this.dom.forEach((dom) => adaptor.setAttribute(dom, 'width', 'full'));
}
else {
this.dom.forEach((dom) => adaptor.setStyle(dom, 'width', this.bbox.pwidth));
}
}
}
setIndent(chtml, align, shift) {
const adaptor = this.adaptor;
if (align === 'center' || align === 'left') {
const L = this.getBBox().L;
adaptor.setStyle(chtml, 'margin-left', this.em(shift + L));
}
if (align === 'center' || align === 'right') {
const R = this.getBBox().R;
adaptor.setStyle(chtml, 'margin-right', this.em(-shift + R));
}
}
drawBBox() {
const { w, h, d, R } = this.getOuterBBox();
const box = this.html('mjx-box', {
style: {
opacity: 0.25,
'margin-left': this.em(-w - R),
},
}, [
this.html('mjx-box', {
style: {
height: this.em(h),
width: this.em(w),
'background-color': 'red',
},
}),
this.html('mjx-box', {
style: {
height: this.em(d),
width: this.em(w),
'margin-left': this.em(-w),
'vertical-align': this.em(-d),
'background-color': 'green',
},
}),
]);
const node = this.dom[0] || this.parent.dom[0];
const size = this.adaptor.getAttribute(node, 'size');
if (size) {
this.adaptor.setAttribute(box, 'size', size);
}
const fontsize = this.adaptor.getStyle(node, 'fontSize');
if (fontsize) {
this.adaptor.setStyle(box, 'fontSize', fontsize);
}
this.adaptor.append(this.adaptor.parent(node), box);
this.adaptor.setStyle(node, 'backgroundColor', '#FFEE00');
}
html(type, def = {}, content = []) {
return this.jax.html(type, def, content);
}
text(text) {
return this.jax.text(text);
}
char(n) {
return this.font.charSelector(n).substring(1);
}
}
ChtmlWrapper.kind = 'unknown';
ChtmlWrapper.autoStyle = true;
//# sourceMappingURL=Wrapper.js.map
;// ./mjs/output/common/Wrappers/math.js
function CommonMathMixin(Base) {
return class CommonMathMixin extends Base {
getWrapWidth(_i) {
return this.parent
? this.getBBox().w
: this.metrics.containerWidth / this.jax.pxPerEm;
}
computeBBox(bbox, recompute = false) {
super.computeBBox(bbox, recompute);
const attributes = this.node.attributes;
if (!this.parent &&
this.jax.math.display &&
attributes.get('overflow') === 'linebreak') {
const W = this.containerWidth;
if (bbox.w > W) {
this.childNodes[0].breakToWidth(W);
}
bbox.updateFrom(this.childNodes[0].getBBox());
}
}
};
}
//# sourceMappingURL=math.js.map
;// ./mjs/output/chtml/Wrappers/math.js
const ChtmlMath = (function () {
var _a;
const Base = CommonMathMixin(ChtmlWrapper);
return _a = class ChtmlMath extends Base {
handleDisplay(parent) {
const adaptor = this.adaptor;
const [align, shift] = this.getAlignShift();
if (align !== 'center') {
adaptor.setAttribute(parent, 'justify', align);
}
if (this.bbox.pwidth === BBox.fullWidth) {
adaptor.setAttribute(parent, 'width', 'full');
if (this.jax.table) {
let { L, w, R } = this.jax.table.getOuterBBox();
if (align === 'right') {
R = Math.max(R || -shift, -shift);
}
else if (align === 'left') {
L = Math.max(L || shift, shift);
}
else if (align === 'center') {
w += 2 * Math.abs(shift);
}
const W = this.em(Math.max(0, L + w + R));
adaptor.setStyle(parent, 'min-width', W);
adaptor.setStyle(this.jax.table.dom[0], 'min-width', W);
}
}
else {
this.setIndent(this.dom[0], align, shift);
}
}
handleInline(parent) {
const adaptor = this.adaptor;
const margin = adaptor.getStyle(this.dom[0], 'margin-right');
if (margin) {
adaptor.setStyle(this.dom[0], 'margin-right', '');
adaptor.setStyle(parent, 'margin-right', margin);
adaptor.setStyle(parent, 'width', '0');
}
}
toCHTML(parents) {
super.toCHTML(parents);
const adaptor = this.adaptor;
const display = this.node.attributes.get('display') === 'block';
if (display) {
adaptor.setAttribute(this.dom[0], 'display', 'true');
adaptor.setAttribute(parents[0], 'display', 'true');
this.handleDisplay(parents[0]);
}
else {
this.handleInline(parents[0]);
}
adaptor.addClass(this.dom[0], `${this.font.cssFontPrefix}-N`);
}
setChildPWidths(recompute, w = null, clear = true) {
return this.parent ? super.setChildPWidths(recompute, w, clear) : false;
}
handleAttributes() {
super.handleAttributes();
const adaptor = this.adaptor;
if (this.node.getProperty('process-breaks')) {
this.dom.forEach((dom) => adaptor.setAttribute(dom, 'breakable', 'true'));
}
}
},
_a.kind = MmlMath.prototype.kind,
_a.styles = {
'mjx-math': {
'line-height': 0,
'text-align': 'left',
'text-indent': 0,
'font-style': 'normal',
'font-weight': 'normal',
'font-size': '100%',
'font-size-adjust': 'none',
'letter-spacing': 'normal',
'word-wrap': 'normal',
'word-spacing': 'normal',
direction: 'ltr',
padding: '1px 0',
},
'mjx-container[jax="CHTML"][display="true"] mjx-math': {
padding: 0,
},
'mjx-math[breakable]': {
display: 'inline',
},
'mjx-container[jax="CHTML"] mjx-break': {
'white-space': 'normal',
'line-height': '0',
'clip-path': 'rect(0 0 0 0)',
'font-family': 'MJX-BRK !important',
},
'mjx-break[size="0"]': {
'letter-spacing': 0.001 - 1 + 'em',
},
'mjx-break[size="1"]': {
'letter-spacing': 0.111 - 1 + 'em',
},
'mjx-break[size="2"]': {
'letter-spacing': 0.167 - 1 + 'em',
},
'mjx-break[size="3"]': {
'letter-spacing': 0.222 - 1 + 'em',
},
'mjx-break[size="4"]': {
'letter-spacing': 0.278 - 1 + 'em',
},
'mjx-break[size="5"]': {
'letter-spacing': 0.333 - 1 + 'em',
},
},
_a;
})();
//# sourceMappingURL=math.js.map
;// ./mjs/output/common/Wrappers/mi.js
function CommonMiMixin(Base) {
return class CommonMiMixin extends Base {
computeBBox(bbox, _recompute = false) {
super.computeBBox(bbox);
this.copySkewIC(bbox);
}
};
}
//# sourceMappingURL=mi.js.map
;// ./mjs/output/chtml/Wrappers/mi.js
const ChtmlMi = (function () {
var _a;
const Base = CommonMiMixin(ChtmlWrapper);
return _a = class ChtmlMi extends Base {
},
_a.kind = MmlMi.prototype.kind,
_a;
})();
//# sourceMappingURL=mi.js.map
;// ./mjs/output/common/Wrappers/mo.js
function CommonMoMixin(Base) {
return class CommonMoMixin extends Base {
get breakCount() {
return this.breakStyle ? 1 : 0;
}
get embellishedBreakCount() {
return this.embellishedBreakStyle ? 1 : 0;
}
get embellishedBreakStyle() {
return this.breakStyle || this.getBreakStyle();
}
protoBBox(bbox) {
const stretchy = this.stretch.dir !== DIRECTION.None;
if (stretchy && this.size === null) {
this.getStretchedVariant([0]);
}
if (stretchy && this.size < 0)
return;
super.computeBBox(bbox);
if (bbox.w === 0 &&
this.node.attributes.hasExplicit('fence') &&
this.node.getText() === '' &&
(this.node.texClass === TEXCLASS.OPEN ||
this.node.texClass === TEXCLASS.CLOSE) &&
!this.jax.options.mathmlSpacing) {
bbox.R = this.font.params.nulldelimiterspace;
}
this.copySkewIC(bbox);
}
getAccentOffset() {
const bbox = BBox.empty();
this.protoBBox(bbox);
return -bbox.w / 2;
}
getCenterOffset(bbox = null) {
if (!bbox) {
bbox = BBox.empty();
super.computeBBox(bbox);
}
return (bbox.h + bbox.d) / 2 + this.font.params.axis_height - bbox.h;
}
getStretchedVariant(WH, exact = false) {
if (this.stretch.dir !== DIRECTION.None) {
let D = this.getWH(WH);
const min = this.getSize('minsize', 0);
const max = this.getSize('maxsize', Infinity);
const mathaccent = this.node.getProperty('mathaccent');
D = Math.max(min, Math.min(max, D));
const df = this.font.params.delimiterfactor / 1000;
const ds = this.font.params.delimitershortfall;
const m = min || exact
? D
: mathaccent
? Math.min(D / df, D + ds)
: Math.max(D * df, D - ds);
const delim = this.stretch;
const c = delim.c || this.getText().codePointAt(0);
let i = 0;
if (delim.sizes) {
for (const d of delim.sizes) {
if (d >= m) {
if (mathaccent && i) {
i--;
}
this.setDelimSize(c, i);
return;
}
i++;
}
}
if (delim.stretch) {
this.size = -1;
this.invalidateBBox();
this.getStretchBBox(WH, this.checkExtendedHeight(D, delim), delim);
}
else {
this.setDelimSize(c, i - 1);
}
}
}
setDelimSize(c, i) {
const delim = this.stretch;
this.variant = this.font.getSizeVariant(c, i);
this.size = i;
const schar = delim.schar
? delim.schar[Math.min(i, delim.schar.length - 1)] || c
: c;
this.stretch = Object.assign(Object.assign({}, delim), { c: schar });
this.childNodes[0].invalidateBBox();
}
getSize(name, value) {
const attributes = this.node.attributes;
if (attributes.isSet(name)) {
value = this.length2em(attributes.get(name), 1, 1);
}
return value;
}
getWH(WH) {
if (WH.length === 0)
return 0;
if (WH.length === 1)
return WH[0];
const [H, D] = WH;
const a = this.font.params.axis_height;
return this.node.attributes.get('symmetric')
? 2 * Math.max(H - a, D + a)
: H + D;
}
getStretchBBox(WHD, D, C) {
if (Object.hasOwn(C, 'min') && C.min > D) {
D = C.min;
}
let [h, d, w] = C.HDW;
if (this.stretch.dir === DIRECTION.Vertical) {
[h, d] = this.getBaseline(WHD, D, C);
}
else {
w = D;
if (this.stretch.hd && !this.jax.options.mathmlSpacing) {
const t = this.font.params.extender_factor;
h = h * (1 - t) + this.stretch.hd[0] * t;
d = d * (1 - t) + this.stretch.hd[1] * t;
}
}
this.bbox.h = h;
this.bbox.d = d;
this.bbox.w = w;
}
getBaseline(WHD, HD, C) {
const hasWHD = WHD.length === 2 && WHD[0] + WHD[1] === HD;
const symmetric = this.node.attributes.get('symmetric');
const [H, D] = hasWHD ? WHD : [HD, 0];
let [h, d] = [H + D, 0];
if (symmetric) {
const a = this.font.params.axis_height;
if (hasWHD) {
h = 2 * Math.max(H - a, D + a);
}
d = h / 2 - a;
}
else if (hasWHD) {
d = D;
}
else {
const [ch, cd] = C.HDW || [0.75, 0.25];
d = cd * (h / (ch + cd));
}
return [h - d, d];
}
checkExtendedHeight(D, C) {
if (C.fullExt) {
const [extSize, endSize] = C.fullExt;
const n = Math.ceil(Math.max(0, D - endSize) / extSize);
D = endSize + n * extSize;
}
return D;
}
setBreakStyle(linebreak = '') {
this.breakStyle =
this.node.parent.isEmbellished && !linebreak
? ''
: this.getBreakStyle(linebreak);
if (!this.breakCount)
return;
if (this.multChar) {
const i = this.parent.node.childIndex(this.node);
const next = this.parent.node.childNodes[i + 1];
if (next) {
next.setTeXclass(this.multChar.node);
}
}
}
getBreakStyle(linebreak = '') {
const attributes = this.node.attributes;
let style = linebreak ||
(attributes.get('linebreak') === 'newline' ||
this.node.getProperty('forcebreak')
? attributes.get('linebreakstyle')
: '');
if (style === 'infixlinebreakstyle') {
style = attributes.get(style);
}
return style;
}
getMultChar() {
const multChar = this.node.attributes.get('linebreakmultchar');
if (multChar && this.getText() === '\u2062' && multChar !== '\u2062') {
this.multChar = this.createMo(multChar);
}
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.size = null;
this.isAccent = this.node.isAccent;
this.getMultChar();
this.setBreakStyle();
}
computeBBox(bbox, _recompute = false) {
this.protoBBox(bbox);
if (this.node.attributes.get('symmetric') &&
this.stretch.dir !== DIRECTION.Horizontal) {
const d = this.getCenterOffset(bbox);
bbox.h += d;
bbox.d -= d;
}
if (this.node.getProperty('mathaccent') &&
(this.stretch.dir === DIRECTION.None || this.size >= 0)) {
bbox.w = 0;
}
}
computeLineBBox(i) {
return this.moLineBBox(i, this.breakStyle);
}
moLineBBox(i, style, obox = null) {
const leadingString = this.node.attributes.get('lineleading');
const leading = this.length2em(leadingString, this.linebreakOptions.lineleading);
if (i === 0 && style === 'before') {
const bbox = LineBBox.from(BBox.zero(), leading);
bbox.originalL = this.bbox.L;
this.bbox.L = 0;
return bbox;
}
let bbox = LineBBox.from(obox || this.getOuterBBox(), leading);
if (i === 1) {
if (style === 'after') {
bbox.w = bbox.h = bbox.d = 0;
bbox.isFirst = true;
this.bbox.R = 0;
}
else if (style === 'duplicate') {
bbox.L = 0;
}
else if (this.multChar) {
bbox = LineBBox.from(this.multChar.getOuterBBox(), leading);
}
bbox.getIndentData(this.node);
}
return bbox;
}
canStretch(direction) {
if (this.stretch.dir !== DIRECTION.None) {
return this.stretch.dir === direction;
}
const attributes = this.node.attributes;
if (!attributes.get('stretchy'))
return false;
const c = this.getText();
if (Array.from(c).length !== 1)
return false;
const delim = this.font.getDelimiter(c.codePointAt(0));
this.stretch = (delim && delim.dir === direction ? delim : NOSTRETCH);
return this.stretch.dir !== DIRECTION.None;
}
getVariant() {
if (this.node.attributes.get('largeop')) {
this.variant = this.node.attributes.get('displaystyle')
? '-largeop'
: '-smallop';
return;
}
if (!this.node.attributes.hasExplicit('mathvariant') &&
this.node.getProperty('pseudoscript') === false) {
this.variant = '-tex-variant';
return;
}
super.getVariant();
}
remapChars(chars) {
const primes = this.node.getProperty('primes');
if (primes) {
return unicodeChars(primes);
}
if (chars.length === 1) {
const parent = this.node.coreParent().parent;
const isAccent = this.isAccent && !parent.isKind('mrow');
const map = isAccent ? 'accent' : 'mo';
const text = this.font.getRemappedChar(map, chars[0]);
if (text) {
chars = this.unicodeChars(text, this.variant);
}
}
return chars;
}
};
}
//# sourceMappingURL=mo.js.map
;// ./mjs/output/chtml/Usage.js
class Usage {
constructor() {
this.used = new Set();
this.needsUpdate = [];
}
add(item) {
const name = JSON.stringify(item);
if (!this.used.has(name)) {
this.needsUpdate.push(item);
}
this.used.add(name);
}
has(item) {
return this.used.has(JSON.stringify(item));
}
clear() {
this.used.clear();
this.needsUpdate = [];
}
update() {
const update = this.needsUpdate;
this.needsUpdate = [];
return update;
}
}
//# sourceMappingURL=Usage.js.map
;// ./mjs/output/chtml/FontData.js
class ChtmlFontData extends FontData {
constructor() {
super(...arguments);
this.charUsage = new Usage();
this.delimUsage = new Usage();
this.fontUsage = {};
this.newFonts = 0;
}
static charOptions(font, n) {
return super.charOptions(font, n);
}
static addFontURLs(styles, fonts, url) {
for (const name of Object.keys(fonts)) {
const font = Object.assign({}, fonts[name]);
font.src = font.src.replace(/%%URL%%/, url);
styles[name] = font;
}
}
static addDynamicFontCss(styles, fonts, root) {
const fontStyles = {};
for (const font of fonts) {
const name = font.slice(4);
fontStyles[`@font-face /* ${name} */`] = {
'font-family': font,
src: `url("%%URL%%/${font.toLowerCase()}.woff2") format("woff2")`,
};
styles[`.${name}`] = {
'font-family': `${this.defaultCssFamilyPrefix}, ${font}`,
};
}
this.addFontURLs(styles, fontStyles, root);
}
static addExtension(data, prefix = '') {
super.addExtension(data, prefix);
if (data.fonts) {
this.addDynamicFontCss(this.defaultStyles, data.fonts, data.fontURL);
}
}
addExtension(data, prefix = '') {
super.addExtension(data, prefix);
if (!data.fonts || !this.options.adaptiveCSS) {
return [];
}
const css = {};
const styles = new StyleJsonSheet();
this.constructor.addDynamicFontCss(css, data.fonts, data.fontURL);
styles.addStyles(css);
return styles.getStyleRules();
}
adaptiveCSS(adapt) {
this.options.adaptiveCSS = adapt;
}
clearCache() {
if (this.options.adaptiveCSS) {
this.charUsage.clear();
this.delimUsage.clear();
}
}
createVariant(name, inherit = null, link = null) {
super.createVariant(name, inherit, link);
this.variant[name].letter = this.constructor.defaultVariantLetters[name];
}
defineChars(name, chars) {
super.defineChars(name, chars);
const letter = this.variant[name].letter;
const CLASS = this.constructor;
for (const n of Object.keys(chars)) {
const i = parseInt(n);
if (!Array.isArray(chars[i]))
continue;
const options = CLASS.charOptions(chars, i);
if (options.f === undefined) {
options.f = letter;
}
for (const [m, M] of CLASS.combiningChars) {
if (i >= m && i <= M) {
options.cmb = true;
break;
}
}
}
}
addDynamicFontCss(fonts, root = this.options.fontURL) {
this.constructor.addDynamicFontCss(this.fontUsage, fonts, root);
}
updateDynamicStyles() {
const styles = this.fontUsage;
this.fontUsage = {};
if (!this.options.adaptiveCSS) {
this.updateStyles(styles);
}
return styles;
}
get styles() {
const CLASS = this.constructor;
const styles = Object.assign(Object.assign({}, CLASS.defaultStyles), this.fontUsage);
this.fontUsage = {};
CLASS.addFontURLs(styles, CLASS.defaultFonts, this.options.fontURL);
if (this.options.adaptiveCSS) {
this.updateStyles(styles);
}
else {
this.allStyles(styles);
}
return styles;
}
updateStyles(styles) {
for (const N of this.delimUsage.update()) {
this.addDelimiterStyles(styles, N, this.getDelimiter(N));
}
for (const [name, N] of this.charUsage.update()) {
const variant = this.variant[name];
this.addCharStyles(styles, variant.letter, N, variant.chars[N]);
}
return styles;
}
allStyles(styles) {
var _a;
for (const n of Object.keys(this.delimiters)) {
const N = parseInt(n);
this.addDelimiterStyles(styles, N, this.delimiters[N]);
}
for (const name of Object.keys(this.variant)) {
const variant = this.variant[name];
const vletter = variant.letter;
for (const n of Object.keys(variant.chars)) {
const N = parseInt(n);
const char = variant.chars[N];
if (((_a = char === null || char === void 0 ? void 0 : char[3]) === null || _a === void 0 ? void 0 : _a.smp) || !Array.isArray(char))
continue;
if (char.length < 4) {
char[3] = {};
}
this.addCharStyles(styles, vletter, N, char);
}
}
}
addDelimiterStyles(styles, n, data) {
if (!data.stretch)
return;
const c = data.c && data.c !== n ? this.charSelector(data.c) : this.charSelector(n);
if (data.dir === DIRECTION.Vertical) {
this.addDelimiterVStyles(styles, n, c, data);
}
else {
this.addDelimiterHStyles(styles, n, c, data);
}
}
addDelimiterVStyles(styles, n, c, data) {
const HDW = data.HDW;
const [beg, ext, end, mid] = data.stretch;
const [begV, extV, endV, midV] = this.getStretchVariants(n);
const Hb = this.addDelimiterVPart(styles, c, 'beg', beg, begV, HDW);
this.addDelimiterVPart(styles, c, 'ext', ext, extV, HDW);
const He = this.addDelimiterVPart(styles, c, 'end', end, endV, HDW);
if (mid) {
const Hm = this.addDelimiterVPart(styles, c, 'mid', mid, midV, HDW);
const m = this.em(Hm / 2 - 0.03);
styles[`mjx-stretchy-v${c} > mjx-ext:first-of-type`] = {
height: '50%',
'border-width': `${this.em1(Hb - 0.03)} 0 ${m}`,
};
styles[`mjx-stretchy-v${c} > mjx-ext:last-of-type`] = {
height: '50%',
'border-width': `${m} 0 ${this.em1(He - 0.03)}`,
};
}
else if (He || Hb) {
styles[`mjx-stretchy-v${c} > mjx-ext`]['border-width'] =
`${this.em1(Hb - 0.03)} 0 ${this.em1(He - 0.03)}`;
}
}
addDelimiterVPart(styles, c, part, n, v, HDW) {
if (!n)
return 0;
const [h, d, w] = this.getChar(v, n);
const css = { width: this.em0(w) };
if (part !== 'ext') {
const dw = w > HDW[2] ? this.em((HDW[2] - w) / 2) : 'auto';
const y = part === 'beg' ? h : part === 'end' ? -d : (h - d) / 2;
css.margin = `${this.em(y)} ${dw} ${this.em(-y)}`;
}
else {
css['line-height'] = this.em0(h + d + 0.005);
styles[`mjx-stretchy-v${c} > mjx-${part} > mjx-spacer`] = {
'margin-top': this.em(-d),
};
}
styles[`mjx-stretchy-v${c} > mjx-${part}`] = css;
return h + d;
}
addDelimiterHStyles(styles, n, c, data) {
const HDW = [...data.HDW];
const [beg, ext, end, mid] = data.stretch;
const [begV, extV, endV, midV] = this.getStretchVariants(n);
if (data.hd && !this.options.mathmlSpacing) {
const t = this.params.extender_factor;
HDW[0] = HDW[0] * (1 - t) + data.hd[0] * t;
HDW[1] = HDW[1] * (1 - t) + data.hd[1] * t;
}
const Wb = this.addDelimiterHPart(styles, c, 'beg', beg, begV, HDW);
this.addDelimiterHPart(styles, c, 'ext', ext, extV, HDW);
const We = this.addDelimiterHPart(styles, c, 'end', end, endV, HDW);
if (mid) {
const Wm = this.addDelimiterHPart(styles, c, 'mid', mid, midV, HDW);
const m = this.em0(Wm / 2 - 0.03);
styles[`mjx-stretchy-h${c} > mjx-ext:first-of-type`] = {
width: '50%',
'border-width': `0 ${m} 0 ${this.em0(Wb - 0.03)}`,
};
styles[`mjx-stretchy-h${c} > mjx-ext:last-of-type`] = {
width: '50%',
'border-width': `0 ${this.em0(We - 0.03)} 0 ${m}`,
};
}
else if (Wb || We) {
styles[`mjx-stretchy-h${c} > mjx-ext`]['border-width'] =
`0 ${this.em0(We - 0.06)} 0 ${this.em0(Wb - 0.06)}`;
}
if (data.ext) {
styles[`mjx-stretchy-h${c} > mjx-ext > mjx-spacer`]['letter-spacing'] =
this.em(-data.ext);
}
}
addDelimiterHPart(styles, c, part, n, v, HDW) {
if (!n)
return 0;
let [, , w, options] = this.getChar(v, n);
const css = {
padding: this.padding(HDW, w - HDW[2]),
};
if (part === 'ext') {
if (!w && options.dx) {
w = 2 * options.dx - 0.06;
}
styles[`mjx-stretchy-h${c} > mjx-${part} > mjx-spacer`] = {
'margin-left': this.em(-w / 2),
};
if (options.cmb) {
styles[`mjx-stretchy-h${c} > mjx-${part} > mjx-c`] = {
width: this.em(w),
'text-align': 'right',
};
}
}
else {
if (part === 'mid') {
css['margin'] = `0 ${this.em(-w / 2)}`;
}
else {
css[part == 'end' ? 'margin-left' : 'margin-right'] = this.em(-w);
}
this.checkCombiningChar(options, css);
}
styles[`mjx-stretchy-h${c} > mjx-${part}`] = css;
return w;
}
addCharStyles(styles, vletter, n, data) {
const options = data[3];
const letter = options.f !== undefined ? options.f : vletter;
const font = options.ff || (letter ? `${this.cssFontPrefix}-${letter}` : '');
const selector = 'mjx-c' + this.charSelector(n) + (font ? '.' + font : '');
const padding = options.oc || options.ic || 0;
styles[selector] = {
padding: this.padding(data, padding),
};
if (options.oc) {
styles[selector + '[noic]'] = { 'padding-right': this.em(data[2]) };
}
this.checkCombiningChar(options, styles[selector]);
}
checkCombiningChar(options, css) {
if (!options.cmb)
return;
const pad = css.padding.split(/ /);
css.width = pad[1];
pad[1] = '0';
if (!pad[3]) {
pad.pop();
}
css.padding = pad.join(' ');
}
em(n) {
return em(n);
}
em0(n) {
return em(Math.max(0, n));
}
em1(n) {
const m = em(Math.max(0, n));
return m === '0' ? '.1px' : m;
}
padding([h, d, w], ic = 0) {
return [h, w + ic, d, 0].map(this.em0).join(' ');
}
charSelector(n) {
return '.mjx-c' + n.toString(16).toUpperCase();
}
}
ChtmlFontData.OPTIONS = Object.assign(Object.assign({}, FontData.OPTIONS), { dynamicPrefix: './chtml/dynamic', fontURL: './chtml/woff2' });
ChtmlFontData.JAX = 'CHTML';
ChtmlFontData.defaultVariantLetters = {};
ChtmlFontData.defaultStyles = {};
ChtmlFontData.defaultFonts = {};
ChtmlFontData.combiningChars = [
[0x300, 0x36f],
[0x20d0, 0x20ff],
];
function AddCSS(font, options) {
for (const c of Object.keys(options)) {
const n = parseInt(c);
const data = options[n];
if (data.c) {
data.c = data.c.replace(/\\[0-9A-F]+/gi, (x) => String.fromCodePoint(parseInt(x.substring(1), 16)));
}
Object.assign(FontData.charOptions(font, n), data);
}
return font;
}
//# sourceMappingURL=FontData.js.map
;// ./mjs/output/chtml/Wrappers/mo.js
const ChtmlMo = (function () {
var _a;
const Base = CommonMoMixin(ChtmlWrapper);
return _a = class ChtmlMo extends Base {
toCHTML(parents) {
const adaptor = this.adaptor;
const attributes = this.node.attributes;
const symmetric = attributes.get('symmetric') &&
this.stretch.dir !== DIRECTION.Horizontal;
const stretchy = this.stretch.dir !== DIRECTION.None;
if (stretchy && this.size === null) {
this.getStretchedVariant([]);
}
if (parents.length > 1) {
parents.forEach((dom) => adaptor.append(dom, this.html('mjx-linestrut')));
}
const chtml = this.standardChtmlNodes(parents);
if (chtml.length > 1 && this.breakStyle !== 'duplicate') {
const i = this.breakStyle === 'after' ? 1 : 0;
adaptor.remove(chtml[i]);
chtml[i] = null;
}
if (stretchy && this.size < 0) {
this.stretchHTML(chtml);
}
else {
if (symmetric || attributes.get('largeop')) {
const u = this.em(this.getCenterOffset());
if (u !== '0') {
chtml.forEach((dom) => dom && adaptor.setStyle(dom, 'verticalAlign', u));
}
}
if (this.node.getProperty('mathaccent')) {
chtml.forEach((dom) => {
adaptor.setStyle(dom, 'width', '0');
adaptor.setStyle(dom, 'margin-left', this.em(this.getAccentOffset()));
});
}
if (chtml[0]) {
this.addChildren([chtml[0]]);
}
if (chtml[1]) {
(this.multChar || this).addChildren([chtml[1]]);
}
}
}
stretchHTML(chtml) {
const c = this.getText().codePointAt(0);
this.font.delimUsage.add(c);
this.childNodes[0].markUsed();
const delim = this.stretch;
const stretch = delim.stretch;
const stretchv = this.font.getStretchVariants(c);
const dom = [];
const parts = [];
for (let i = 0; i < stretch.length; i++) {
if (stretch[i]) {
parts[i] = this.font.getChar(stretchv[i], stretch[i]);
}
}
const { h, d, w } = this.bbox;
const styles = {};
if (delim.dir === DIRECTION.Vertical) {
this.createAssembly(parts, stretch, stretchv, dom, h + d, 0.05, '\n');
dom.push(this.html('mjx-mark'));
styles.height = this.em(h + d);
styles.verticalAlign = this.em(-d);
}
else {
this.createAssembly(parts, stretch, stretchv, dom, w, delim.ext || 0);
styles.width = this.em(w);
}
const properties = { class: this.char(delim.c || c), style: styles };
const html = this.html('mjx-stretchy-' + delim.dir, properties, dom);
const adaptor = this.adaptor;
if (chtml[0]) {
adaptor.append(chtml[0], html);
}
if (chtml[1]) {
adaptor.append(chtml[1], chtml[0] ? adaptor.clone(html) : html);
}
}
createAssembly(parts, sn, sv, dom, wh, ext, nl = '') {
parts = [...parts, null, null, null].slice(0, 4);
let [WHb, WHx, WHe, WHm] = parts.map((part) => part ? (nl ? part[0] + part[1] : part[2]) : 0);
WHx = Math.max(0, WHx - ext);
const [WH1, WH2] = parts[3]
? [(wh - WHm) / 2 - WHb, (wh - WHm) / 2 - WHe]
: [wh - WHb - WHe, 0];
this.createPart('mjx-beg', parts[0], sn[0], sv[0], dom);
this.createPart('mjx-ext', parts[1], sn[1], sv[1], dom, WH1, WHx, nl);
if (parts[3]) {
this.createPart('mjx-mid', parts[3], sn[3], sv[3], dom);
this.createPart('mjx-ext', parts[1], sn[1], sv[1], dom, WH2, WHx, nl);
}
this.createPart('mjx-end', parts[2], sn[2], sv[2], dom);
}
createPart(part, data, n, v, dom, W = 0, Wx = 0, nl = '') {
if (n) {
const options = data[3];
const letter = options.f || (v === 'normal' ? '' : this.font.getVariant(v).letter);
const font = options.ff || (letter ? `${this.font.cssFontPrefix}-${letter}` : '');
const c = options.c || String.fromCodePoint(n);
let nodes = [];
if (part === 'mjx-ext' && (Wx || options.dx)) {
if (!Wx) {
Wx = Math.max(0.06, 2 * options.dx - 0.06);
}
const n = Math.min(Math.ceil(W / Wx) + 1, 500);
if (options.cmb) {
nodes.push(this.html('mjx-spacer'));
for (let i = 0; i < n; i++) {
nodes.push(this.html('mjx-c', {}, [this.text(c)]));
}
}
else {
nodes = [
this.html('mjx-spacer', {}, [
this.text(Array(n).fill(c).join(nl)),
]),
];
}
}
else {
nodes = [this.text(c)];
}
dom.push(this.html(part, font ? { class: font } : {}, nodes));
}
}
},
_a.kind = MmlMo.prototype.kind,
_a.styles = {
'mjx-stretchy-h': {
display: 'inline-block',
},
'mjx-stretchy-h > *': {
display: 'inline-block',
width: 0,
'text-align': 'right',
},
'mjx-stretchy-h > mjx-ext': {
'clip-path': 'padding-box xywh(0 -1em 100% calc(100% + 2em))',
width: '100%',
border: '0px solid transparent',
'box-sizing': 'border-box',
'text-align': 'left',
},
'mjx-stretchy-v': {
display: 'inline-block',
'text-align': 'center',
},
'mjx-stretchy-v > *': {
display: 'block',
height: 0,
margin: '0 auto',
},
'mjx-stretchy-v > mjx-ext > mjx-spacer': {
display: 'block',
},
'mjx-stretchy-v > mjx-ext': {
'clip-path': 'padding-box xywh(-1em 0 calc(100% + 2em) 100%)',
height: '100%',
border: '0.1px solid transparent',
'box-sizing': 'border-box',
'white-space': 'wrap',
},
'mjx-mark': {
display: 'inline-block',
height: 0,
},
},
_a;
})();
//# sourceMappingURL=mo.js.map
;// ./mjs/output/common/Wrappers/mn.js
function CommonMnMixin(Base) {
return class CommonMnMixin extends Base {
remapChars(chars) {
if (chars.length) {
const text = this.font.getRemappedChar('mn', chars[0]);
if (text) {
const c = this.unicodeChars(text, this.variant);
if (c.length === 1) {
chars[0] = c[0];
}
else {
chars = c.concat(chars.slice(1));
}
}
}
return chars;
}
};
}
//# sourceMappingURL=mn.js.map
;// ./mjs/output/chtml/Wrappers/mn.js
const ChtmlMn = (function () {
var _a;
const Base = CommonMnMixin(ChtmlWrapper);
return _a = class ChtmlMn extends Base {
},
_a.kind = MmlMn.prototype.kind,
_a;
})();
//# sourceMappingURL=mn.js.map
;// ./mjs/output/common/Wrappers/ms.js
function CommonMsMixin(Base) {
return class CommonMsMixin extends Base {
createText(text) {
const node = this.wrap(this.mmlText(text));
node.parent = this;
return node;
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
const attributes = this.node.attributes;
const quotes = attributes.getList('lquote', 'rquote');
if (this.variant !== 'monospace') {
if (!attributes.isSet('lquote') && quotes.lquote === '"') {
quotes.lquote = '\u201C';
}
if (!attributes.isSet('rquote') && quotes.rquote === '"') {
quotes.rquote = '\u201D';
}
}
this.childNodes.unshift(this.createText(quotes.lquote));
this.childNodes.push(this.createText(quotes.rquote));
}
};
}
//# sourceMappingURL=ms.js.map
;// ./mjs/output/chtml/Wrappers/ms.js
const ChtmlMs = (function () {
var _a;
const Base = CommonMsMixin(ChtmlWrapper);
return _a = class ChtmlMs extends Base {
},
_a.kind = MmlMs.prototype.kind,
_a;
})();
//# sourceMappingURL=ms.js.map
;// ./mjs/output/common/Wrappers/mtext.js
function CommonMtextMixin(Base) {
var _a;
return _a = class CommonMtextMixin extends Base {
constructor() {
super(...arguments);
this.breakPoints = [];
}
textWidth(text) {
let textNode = this.textNode;
if (!textNode) {
const text = this.node.factory.create('text');
text.parent = this.node;
textNode = this.textNode = this.factory.wrap(text);
textNode.parent = this;
}
textNode.node.setText(text);
textNode.invalidateBBox(false);
return textNode.getBBox().w;
}
get breakCount() {
return this.breakPoints.length;
}
getVariant() {
const options = this.jax.options;
const data = this.jax.math.outputData;
const merror = (!!data.merrorFamily || !!options.merrorFont) &&
this.node.Parent.isKind('merror');
if (!!data.mtextFamily || !!options.mtextFont || merror) {
const variant = this.node.attributes.get('mathvariant');
const font = this.constructor.INHERITFONTS[variant] ||
this.jax.font.getCssFont(variant);
const family = font[0] ||
(merror
? data.merrorFamily || options.merrorFont
: data.mtextFamily || options.mtextFont);
this.variant = this.explicitVariant(family, font[2] ? 'bold' : '', font[1] ? 'italic' : '');
return;
}
super.getVariant();
}
setBreakAt(ij) {
this.breakPoints.push(ij);
}
clearBreakPoints() {
this.breakPoints = [];
}
computeLineBBox(i) {
const bbox = LineBBox.from(this.getOuterBBox(), this.linebreakOptions.lineleading);
if (!this.breakCount)
return bbox;
bbox.w = this.getBreakWidth(i);
if (i === 0) {
bbox.R = 0;
this.addLeftBorders(bbox);
}
else {
bbox.L = 0;
bbox.indentData = [
['left', '0'],
['left', '0'],
['left', '0'],
];
if (i === this.breakCount) {
this.addRightBorders(bbox);
}
}
return bbox;
}
getBreakWidth(i) {
const childNodes = this.childNodes;
let [si, sj] = this.breakPoints[i - 1] || [0, 0];
const [ei, ej] = this.breakPoints[i] || [childNodes.length, 0];
let words = childNodes[si].node.getText().split(/ /);
if (si === ei) {
return this.textWidth(words.slice(sj, ej).join(' '));
}
let w = this.textWidth(words.slice(sj).join(' '));
while (++si < ei && si < childNodes.length) {
w += childNodes[si].getBBox().w;
}
if (si < childNodes.length) {
words = childNodes[si].node.getText().split(/ /);
w += this.textWidth(words.slice(0, ej).join(' '));
}
return w;
}
},
_a.INHERITFONTS = {
normal: ['', false, false],
bold: ['', false, true],
italic: ['', true, false],
'bold-italic': ['', true, true],
},
_a;
}
//# sourceMappingURL=mtext.js.map
;// ./mjs/output/chtml/Wrappers/mtext.js
const ChtmlMtext = (function () {
var _a;
const Base = CommonMtextMixin(ChtmlWrapper);
return _a = class ChtmlMtext extends Base {
toCHTML(parents) {
if (!this.breakCount) {
super.toCHTML(parents);
return;
}
const chtml = this.standardChtmlNodes(parents);
const textNode = this.textNode.node;
const childNodes = this.childNodes;
for (const i of chtml.keys()) {
const DOM = [chtml[i]];
this.adaptor.append(chtml[i], this.html('mjx-linestrut'));
let [si, sj] = this.breakPoints[i - 1] || [0, 0];
const [ei, ej] = this.breakPoints[i] || [childNodes.length, 0];
let words = childNodes[si].node.getText().split(/ /);
if (si === ei) {
textNode.setText(words.slice(sj, ej).join(' '));
this.textNode.toCHTML(DOM);
continue;
}
textNode.setText(words.slice(sj).join(' '));
this.textNode.toCHTML(DOM);
while (++si < ei && si < childNodes.length) {
childNodes[si].toCHTML(DOM);
}
if (si < childNodes.length) {
words = childNodes[si].node.getText().split(/ /);
textNode.setText(words.slice(0, ej).join(' '));
this.textNode.toCHTML(DOM);
}
}
}
},
_a.kind = MmlMtext.prototype.kind,
_a;
})();
//# sourceMappingURL=mtext.js.map
;// ./mjs/output/common/Wrappers/mspace.js
function CommonMspaceMixin(Base) {
return class CommonMspaceMixin extends Base {
get canBreak() {
return this.node.canBreak;
}
get breakCount() {
return this.breakStyle ? 1 : 0;
}
setBreakStyle(linebreak = '') {
this.breakStyle =
linebreak ||
(this.node.hasNewline ||
this.node.getProperty('forcebreak')
? 'before'
: '');
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.setBreakStyle();
}
computeBBox(bbox, _recompute = false) {
const attributes = this.node.attributes;
bbox.w = this.length2em(attributes.get('width'), 0);
bbox.h = this.length2em(attributes.get('height'), 0);
bbox.d = this.length2em(attributes.get('depth'), 0);
}
computeLineBBox(i) {
const leadingString = this.node.attributes.get('data-lineleading');
const leading = this.length2em(leadingString, this.linebreakOptions.lineleading);
const bbox = LineBBox.from(BBox.zero(), leading);
if (i === 1) {
bbox.getIndentData(this.node);
bbox.w = this.getBBox().w;
bbox.isFirst = bbox.w === 0;
}
return bbox;
}
};
}
//# sourceMappingURL=mspace.js.map
;// ./mjs/output/chtml/Wrappers/mspace.js
const ChtmlMspace = (function () {
var _a;
const Base = CommonMspaceMixin(ChtmlWrapper);
return _a = class ChtmlMspace extends Base {
toCHTML(parents) {
if (parents.length > 1) {
parents.forEach((dom) => this.adaptor.append(dom, this.html('mjx-linestrut')));
}
const chtml = this.standardChtmlNodes(parents);
let { w, h, d } = this.getBBox();
if (w < 0) {
this.adaptor.setStyle(chtml[0], 'marginRight', this.em(w));
w = 0;
}
if (w && !this.breakCount) {
this.adaptor.setStyle(chtml[0], 'width', this.em(w));
}
h = Math.max(0, h + d);
if (h) {
this.adaptor.setStyle(chtml[0], 'height', this.em(Math.max(0, h)));
}
if (d) {
this.adaptor.setStyle(chtml[0], 'verticalAlign', this.em(-d));
}
}
},
_a.kind = MmlMspace.prototype.kind,
_a;
})();
//# sourceMappingURL=mspace.js.map
;// ./mjs/output/common/Wrappers/mpadded.js
function CommonMpaddedMixin(Base) {
return class CommonMpaddedMixin extends Base {
getDimens() {
const values = this.node.attributes.getList('width', 'height', 'depth', 'lspace', 'voffset');
const bbox = this.childNodes[0].getOuterBBox();
let { w, h, d } = bbox;
const W = w;
const H = h;
const D = d;
let x = 0;
let y = 0;
let dx = 0;
if (values.width !== '')
w = this.dimen(values.width, bbox, 'w', 0);
if (values.height !== '')
h = this.dimen(values.height, bbox, 'h', 0);
if (values.depth !== '')
d = this.dimen(values.depth, bbox, 'd', 0);
if (values.voffset !== '')
y = this.dimen(values.voffset, bbox);
if (values.lspace !== '')
x = this.dimen(values.lspace, bbox);
const align = this.node.attributes.get('data-align');
if (align) {
dx = this.getAlignX(w, bbox, align);
}
return [H, D, W, h - H, d - D, w - W, x, y, dx];
}
dimen(length, bbox, d = '', m = null) {
length = String(length);
const match = length.match(/width|height|depth/);
const size = (match
? bbox[match[0].charAt(0)]
: d
? bbox[d]
: 0);
let dimen = this.length2em(length, size) || 0;
if (length.match(/^[-+]/) && d) {
dimen += size;
}
if (m != null) {
dimen = Math.max(m, dimen);
}
return dimen;
}
setBBoxDimens(bbox) {
const [H, D, W, dh, dd, dw] = this.getDimens();
bbox.w = W + dw;
bbox.h = H + dh;
bbox.d = D + dd;
}
computeBBox(bbox, recompute = false) {
this.setBBoxDimens(bbox);
const w = this.childNodes[0].getOuterBBox().w;
if (w > bbox.w) {
const overflow = this.node.attributes.get('data-overflow');
if (overflow === 'linebreak' ||
(overflow === 'auto' &&
this.jax.math.root.attributes.get('overflow') === 'linebreak')) {
this.childNodes[0].breakToWidth(bbox.w);
this.setBBoxDimens(bbox);
}
}
this.setChildPWidths(recompute, bbox.w);
}
getWrapWidth(_i) {
return this.getBBox().w;
}
getChildAlign(_i) {
return this.node.attributes.get('data-align') || 'left';
}
};
}
//# sourceMappingURL=mpadded.js.map
;// ./mjs/output/chtml/Wrappers/mpadded.js
const ChtmlMpadded = (function () {
var _a;
const Base = CommonMpaddedMixin(ChtmlWrapper);
return _a = class ChtmlMpadded extends Base {
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
let chtml = this.standardChtmlNodes(parents);
const content = [];
const style = {};
const [, , W, dh, dd, dw, x, y, dx] = this.getDimens();
if (dw || this.childNodes[0].getBBox().pwidth) {
style.width = this.em(W + dw);
}
if (dh || dd) {
style.margin = this.em(dh) + ' 0 ' + this.em(dd);
}
if (x + dx || y) {
style.position = 'relative';
const rbox = this.html('mjx-rbox', {
style: {
left: this.em(x + dx),
top: this.em(-y),
'max-width': style.width,
},
});
if (x + dx && this.childNodes[0].getBBox().pwidth) {
this.adaptor.setAttribute(rbox, 'width', 'full');
this.adaptor.setStyle(rbox, 'left', this.em(x));
}
content.push(rbox);
}
chtml = [
this.adaptor.append(chtml[0], this.html('mjx-block', { style: style }, content)),
];
if (this.childNodes[0].childNodes.length) {
this.childNodes[0].toCHTML([content[0] || chtml[0]]);
}
else if (dh || dd) {
this.adaptor.append(content[0] || chtml[0], this.html('mjx-box'));
}
}
},
_a.kind = MmlMpadded.prototype.kind,
_a.styles = {
'mjx-mpadded': {
display: 'inline-block',
},
'mjx-rbox': {
display: 'inline-block',
position: 'relative',
},
},
_a;
})();
//# sourceMappingURL=mpadded.js.map
;// ./mjs/output/common/Notation.js
const ARROWX = 4;
const ARROWDX = 1;
const ARROWY = 2;
const THICKNESS = 0.067;
const PADDING = 0.2;
const SOLID = THICKNESS + 'em solid';
const sideIndex = { top: 0, right: 1, bottom: 2, left: 3 };
const sideNames = Object.keys(sideIndex);
const fullBBox = ((node) => new Array(4).fill(node.thickness + node.padding));
const fullPadding = ((node) => new Array(4).fill(node.padding));
const fullBorder = ((node) => new Array(4).fill(node.thickness));
const arrowHead = (node) => {
return Math.max(node.padding, node.thickness * (node.arrowhead.x + node.arrowhead.dx + 1));
};
const arrowBBoxHD = (node, TRBL) => {
if (node.childNodes[0]) {
const { h, d } = node.childNodes[0].getBBox();
TRBL[0] = TRBL[2] = Math.max(0, node.thickness * node.arrowhead.y - (h + d) / 2);
}
return TRBL;
};
const arrowBBoxW = (node, TRBL) => {
if (node.childNodes[0]) {
const { w } = node.childNodes[0].getBBox();
TRBL[1] = TRBL[3] = Math.max(0, node.thickness * node.arrowhead.y - w / 2);
}
return TRBL;
};
const arrowDef = {
up: [-Math.PI / 2, false, true, 'verticalstrike'],
down: [Math.PI / 2, false, true, 'verticakstrike'],
right: [0, false, false, 'horizontalstrike'],
left: [Math.PI, false, false, 'horizontalstrike'],
updown: [Math.PI / 2, true, true, 'verticalstrike uparrow downarrow'],
leftright: [0, true, false, 'horizontalstrike leftarrow rightarrow'],
};
const diagonalArrowDef = {
updiagonal: [-1, 0, false, 'updiagonalstrike northeastarrow'],
northeast: [-1, 0, false, 'updiagonalstrike updiagonalarrow'],
southeast: [1, 0, false, 'downdiagonalstrike'],
northwest: [1, Math.PI, false, 'downdiagonalstrike'],
southwest: [-1, Math.PI, false, 'updiagonalstrike'],
northeastsouthwest: [
-1,
0,
true,
'updiagonalstrike northeastarrow updiagonalarrow southwestarrow',
],
northwestsoutheast: [
1,
0,
true,
'downdiagonalstrike northwestarrow southeastarrow',
],
};
const arrowBBox = {
up: (node) => arrowBBoxW(node, [arrowHead(node), 0, node.padding, 0]),
down: (node) => arrowBBoxW(node, [node.padding, 0, arrowHead(node), 0]),
right: (node) => arrowBBoxHD(node, [0, arrowHead(node), 0, node.padding]),
left: (node) => arrowBBoxHD(node, [0, node.padding, 0, arrowHead(node)]),
updown: (node) => arrowBBoxW(node, [arrowHead(node), 0, arrowHead(node), 0]),
leftright: (node) => arrowBBoxHD(node, [0, arrowHead(node), 0, arrowHead(node)]),
};
const CommonBorder = function (render) {
return (side) => {
const i = sideIndex[side];
return [
side,
{
renderer: render,
bbox: (node) => {
const bbox = [0, 0, 0, 0];
bbox[i] = node.thickness + node.padding;
return bbox;
},
border: (node) => {
const bbox = [0, 0, 0, 0];
bbox[i] = node.thickness;
return bbox;
},
},
];
};
};
const CommonBorder2 = function (render) {
return (name, side1, side2) => {
const i1 = sideIndex[side1];
const i2 = sideIndex[side2];
return [
name,
{
renderer: render,
bbox: (node) => {
const t = node.thickness + node.padding;
const bbox = [0, 0, 0, 0];
bbox[i1] = bbox[i2] = t;
return bbox;
},
border: (node) => {
const bbox = [0, 0, 0, 0];
bbox[i1] = bbox[i2] = node.thickness;
return bbox;
},
remove: side1 + ' ' + side2,
},
];
};
};
const CommonDiagonalStrike = function (render) {
return (name) => {
const cname = 'mjx-' + name.charAt(0) + 'strike';
return [
name + 'diagonalstrike',
{
renderer: render(cname),
bbox: fullBBox,
},
];
};
};
const CommonDiagonalArrow = function (render) {
return (name) => {
const [c, pi, double, remove] = diagonalArrowDef[name];
return [
name + 'arrow',
{
renderer: (node, _child) => {
const [a, W] = node.arrowAW();
const arrow = node.arrow(W, c * (a - pi), double);
render(node, arrow);
},
bbox: (node) => {
const { a, x, y } = node.arrowData();
const [ax, ay, adx] = [
node.arrowhead.x,
node.arrowhead.y,
node.arrowhead.dx,
];
const [b, ar] = node.getArgMod(ax + adx, ay);
const dy = y + (b > a ? node.thickness * ar * Math.sin(b - a) : 0);
const dx = x +
(b > Math.PI / 2 - a
? node.thickness * ar * Math.sin(b + a - Math.PI / 2)
: 0);
return [dy, dx, dy, dx];
},
remove: remove,
},
];
};
};
const CommonArrow = function (render) {
return (name) => {
const [angle, double, isVertical, remove] = arrowDef[name];
return [
name + 'arrow',
{
renderer: (node, _child) => {
const { w, h, d } = node.getBBox();
const [W, offset] = isVertical ? [h + d, 'X'] : [w, 'Y'];
const dd = node.getOffset(offset);
const arrow = node.arrow(W, angle, double, offset, dd);
render(node, arrow);
},
bbox: arrowBBox[name],
remove: remove,
},
];
};
};
//# sourceMappingURL=Notation.js.map
;// ./mjs/output/common/Wrappers/menclose.js
function CommonMencloseMixin(Base) {
return class CommonMencloseMixin extends Base {
getParameters() {
const attributes = this.node.attributes;
const padding = attributes.get('data-padding');
if (padding !== undefined) {
this.padding = this.length2em(padding, PADDING);
}
const thickness = attributes.get('data-thickness');
if (thickness !== undefined) {
this.thickness = this.length2em(thickness, THICKNESS);
}
const arrowhead = attributes.get('data-arrowhead');
if (arrowhead !== undefined) {
const [x, y, dx] = split(arrowhead);
this.arrowhead = {
x: x ? parseFloat(x) : ARROWX,
y: y ? parseFloat(y) : ARROWY,
dx: dx ? parseFloat(dx) : ARROWDX,
};
}
}
getNotations() {
const Notations = this.constructor.notations;
for (const name of split(this.node.attributes.get('notation'))) {
const notation = Notations.get(name);
if (notation) {
this.notations[name] = notation;
if (notation.renderChild) {
this.renderChild = notation.renderer;
}
}
}
}
removeRedundantNotations() {
for (const name of Object.keys(this.notations)) {
if (this.notations[name]) {
const remove = this.notations[name].remove || '';
for (const notation of remove.split(/ /)) {
delete this.notations[notation];
}
}
}
}
initializeNotations() {
for (const name of Object.keys(this.notations)) {
const init = this.notations[name].init;
if (init) {
init(this);
}
}
}
getBBoxExtenders() {
const TRBL = [0, 0, 0, 0];
for (const name of Object.keys(this.notations)) {
this.maximizeEntries(TRBL, this.notations[name].bbox(this));
}
return TRBL;
}
getPadding() {
const BTRBL = [0, 0, 0, 0];
for (const name of Object.keys(this.notations)) {
const border = this.notations[name].border;
if (border) {
this.maximizeEntries(BTRBL, border(this));
}
}
return [0, 1, 2, 3].map((i) => this.TRBL[i] - BTRBL[i]);
}
maximizeEntries(X, Y) {
for (let i = 0; i < X.length; i++) {
if (X[i] < Y[i]) {
X[i] = Y[i];
}
}
}
getOffset(direction) {
const [T, R, B, L] = this.TRBL;
const d = (direction === 'X' ? R - L : B - T) / 2;
return Math.abs(d) > 0.001 ? d : 0;
}
getArgMod(w, h) {
return [Math.atan2(h, w), Math.sqrt(w * w + h * h)];
}
arrow(_w, _a, _double, _offset = '', _dist = 0) {
return null;
}
arrowData() {
const [p, t] = [this.padding, this.thickness];
const r = t * (this.arrowhead.x + Math.max(1, this.arrowhead.dx));
const { h, d, w } = this.childNodes[0].getBBox();
const H = h + d;
const R = Math.sqrt(H * H + w * w);
const x = Math.max(p, (r * w) / R);
const y = Math.max(p, (r * H) / R);
const [a, W] = this.getArgMod(w + 2 * x, H + 2 * y);
return { a, W, x, y };
}
arrowAW() {
const { h, d, w } = this.childNodes[0].getBBox();
const [T, R, B, L] = this.TRBL;
return this.getArgMod(L + w + R, T + h + d + B);
}
createMsqrt(child) {
const mmlFactory = this.node.factory;
const mml = mmlFactory.create('msqrt');
mml.inheritAttributesFrom(this.node);
mml.childNodes[0] = child.node;
const node = this.wrap(mml);
node.parent = this;
return node;
}
sqrtTRBL() {
const bbox = this.msqrt.getBBox();
const cbox = this.msqrt.childNodes[0].getBBox();
return [bbox.h - cbox.h, 0, bbox.d - cbox.d, bbox.w - cbox.w];
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.notations = {};
this.renderChild = null;
this.msqrt = null;
this.padding = PADDING;
this.thickness = THICKNESS;
this.arrowhead = {
x: ARROWX,
y: ARROWY,
dx: ARROWDX,
};
this.TRBL = [0, 0, 0, 0];
this.getParameters();
this.getNotations();
this.removeRedundantNotations();
this.initializeNotations();
this.TRBL = this.getBBoxExtenders();
}
computeBBox(bbox, recompute = false) {
const [T, R, B, L] = this.TRBL;
const child = this.childNodes[0].getBBox();
bbox.combine(child, L, 0);
bbox.h += T;
bbox.d += B;
bbox.w += R;
this.setChildPWidths(recompute);
}
};
}
//# sourceMappingURL=menclose.js.map
;// ./mjs/output/chtml/Notation.js
const RenderElement = function (name, offset = '') {
return ((node, _child) => {
const shape = node.adjustBorder(node.html('mjx-' + name));
if (offset) {
const d = node.getOffset(offset);
if (node.thickness !== THICKNESS || d) {
const transform = `translate${offset}(${node.Em(node.thickness / 2 - d)})`;
node.adaptor.setStyle(shape, 'transform', transform);
}
}
node.adaptor.append(node.dom[0], shape);
});
};
const Border = function (side) {
return CommonBorder((node, child) => {
node.adaptor.setStyle(child, 'border-' + side, node.Em(node.thickness) + ' solid');
})(side);
};
const Border2 = function (name, side1, side2) {
return CommonBorder2((node, child) => {
const border = node.Em(node.thickness) + ' solid';
node.adaptor.setStyle(child, 'border-' + side1, border);
node.adaptor.setStyle(child, 'border-' + side2, border);
})(name, side1, side2);
};
const DiagonalStrike = function (name, neg) {
return CommonDiagonalStrike((cname) => (node, _child) => {
const { w, h, d } = node.getBBox();
const [a, W] = node.getArgMod(w, h + d);
const t = (neg * node.thickness) / 2;
const strike = node.adjustBorder(node.html(cname, {
style: {
width: node.Em(W),
transform: 'rotate(' + node.fixed(-neg * a) + 'rad) translateY(' + t + 'em)',
},
}));
node.adaptor.append(node.dom[0], strike);
})(name);
};
const DiagonalArrow = function (name) {
return CommonDiagonalArrow((node, arrow) => {
node.adaptor.append(node.dom[0], arrow);
})(name);
};
const Arrow = function (name) {
return CommonArrow((node, arrow) => {
node.adaptor.append(node.dom[0], arrow);
})(name);
};
//# sourceMappingURL=Notation.js.map
;// ./mjs/output/chtml/Wrappers/menclose.js
function Angle(x, y) {
return Math.atan2(x, y)
.toFixed(3)
.replace(/\.?0+$/, '');
}
const ANGLE = Angle(ARROWDX, ARROWY);
const ChtmlMenclose = (function () {
var _a;
const Base = CommonMencloseMixin(ChtmlWrapper);
return _a = class ChtmlMenclose extends Base {
adjustArrow(arrow, double) {
const t = this.thickness;
const head = this.arrowhead;
if (head.x === ARROWX &&
head.y === ARROWY &&
head.dx === ARROWDX &&
t === THICKNESS)
return;
const [x, y] = [t * head.x, t * head.y].map((x) => this.em(x));
const a = Angle(head.dx, head.y);
const [line, rthead, rbhead, lthead, lbhead] = this.adaptor.childNodes(arrow);
this.adjustHead(rthead, [y, '0', '1px', x], a);
this.adjustHead(rbhead, ['1px', '0', y, x], '-' + a);
this.adjustHead(lthead, [y, x, '1px', '0'], '-' + a);
this.adjustHead(lbhead, ['1px', x, y, '0'], a);
this.adjustLine(line, t, head.x, double);
}
adjustHead(head, border, a) {
if (head) {
this.adaptor.setStyle(head, 'border-width', border.join(' '));
this.adaptor.setStyle(head, 'transform', 'skewX(' + a + 'rad)');
}
}
adjustLine(line, t, x, double) {
this.adaptor.setStyle(line, 'borderTop', this.em(t) + ' solid');
this.adaptor.setStyle(line, 'top', this.em(-t / 2));
this.adaptor.setStyle(line, 'right', this.em(t * (x - 1)));
if (double) {
this.adaptor.setStyle(line, 'left', this.em(t * (x - 1)));
}
}
moveArrow(arrow, offset, d) {
if (!d)
return;
const transform = this.adaptor.getStyle(arrow, 'transform');
this.adaptor.setStyle(arrow, 'transform', `translate${offset}(${this.em(-d)})${transform ? ' ' + transform : ''}`);
}
adjustBorder(node) {
if (this.thickness !== THICKNESS) {
this.adaptor.setStyle(node, 'borderWidth', this.em(this.thickness));
}
return node;
}
adjustThickness(shape) {
if (this.thickness !== THICKNESS) {
this.adaptor.setStyle(shape, 'strokeWidth', this.fixed(this.thickness));
}
return shape;
}
fixed(m, n = 3) {
if (Math.abs(m) < 0.0006) {
return '0';
}
return m.toFixed(n).replace(/\.?0+$/, '');
}
Em(m) {
return super.em(m);
}
toCHTML(parents) {
const adaptor = this.adaptor;
const chtml = this.standardChtmlNodes(parents);
const block = adaptor.append(chtml[0], this.html('mjx-box'));
if (this.renderChild) {
this.renderChild(this, block);
}
else {
this.childNodes[0].toCHTML([block]);
}
for (const name of Object.keys(this.notations)) {
const notation = this.notations[name];
if (!notation.renderChild) {
notation.renderer(this, block);
}
}
const pbox = this.getPadding();
for (const name of sideNames) {
const i = sideIndex[name];
if (pbox[i] > 0) {
adaptor.setStyle(block, 'padding-' + name, this.em(pbox[i]));
}
}
}
arrow(w, a, double, offset = '', dist = 0) {
const W = this.getBBox().w;
const style = { width: this.em(w) };
if (W !== w) {
style.left = this.em((W - w) / 2);
}
if (a) {
style.transform = 'rotate(' + this.fixed(a) + 'rad)';
}
const arrow = this.html('mjx-arrow', { style: style }, [
this.html('mjx-aline'),
this.html('mjx-rthead'),
this.html('mjx-rbhead'),
]);
if (double) {
this.adaptor.append(arrow, this.html('mjx-lthead'));
this.adaptor.append(arrow, this.html('mjx-lbhead'));
this.adaptor.setAttribute(arrow, 'double', 'true');
}
this.adjustArrow(arrow, double);
this.moveArrow(arrow, offset, dist);
return arrow;
}
},
_a.kind = MmlMenclose.prototype.kind,
_a.styles = {
'mjx-menclose': {
position: 'relative',
},
'mjx-menclose > mjx-dstrike': {
display: 'inline-block',
left: 0,
top: 0,
position: 'absolute',
'border-top': SOLID,
'transform-origin': 'top left',
},
'mjx-menclose > mjx-ustrike': {
display: 'inline-block',
left: 0,
bottom: 0,
position: 'absolute',
'border-top': SOLID,
'transform-origin': 'bottom left',
},
'mjx-menclose > mjx-hstrike': {
'border-top': SOLID,
position: 'absolute',
left: 0,
right: 0,
bottom: '50%',
transform: 'translateY(' + em(THICKNESS / 2) + ')',
},
'mjx-menclose > mjx-vstrike': {
'border-left': SOLID,
position: 'absolute',
top: 0,
bottom: 0,
right: '50%',
transform: 'translateX(' + em(THICKNESS / 2) + ')',
},
'mjx-menclose > mjx-rbox': {
position: 'absolute',
top: 0,
bottom: 0,
right: 0,
left: 0,
border: SOLID,
'border-radius': em(THICKNESS + PADDING),
},
'mjx-menclose > mjx-cbox': {
position: 'absolute',
top: 0,
bottom: 0,
right: 0,
left: 0,
border: SOLID,
'border-radius': '50%',
},
'mjx-menclose > mjx-arrow': {
position: 'absolute',
left: 0,
bottom: '50%',
height: 0,
width: 0,
},
'mjx-menclose > mjx-arrow > *': {
display: 'block',
position: 'absolute',
'transform-origin': 'bottom',
'border-left': em(THICKNESS * ARROWX) + ' solid',
'border-right': 0,
'box-sizing': 'border-box',
},
'mjx-menclose > mjx-arrow > mjx-aline': {
left: 0,
top: em(-THICKNESS / 2),
right: em(THICKNESS * (ARROWX - 1)),
height: 0,
'border-top': em(THICKNESS) + ' solid',
'border-left': 0,
},
'mjx-menclose > mjx-arrow[double] > mjx-aline': {
left: em(THICKNESS * (ARROWX - 1)),
height: 0,
},
'mjx-menclose > mjx-arrow > mjx-rthead': {
transform: 'skewX(' + ANGLE + 'rad)',
right: 0,
bottom: '-1px',
'border-bottom': '1px solid transparent',
'border-top': em(THICKNESS * ARROWY) + ' solid transparent',
},
'mjx-menclose > mjx-arrow > mjx-rbhead': {
transform: 'skewX(-' + ANGLE + 'rad)',
'transform-origin': 'top',
right: 0,
top: '-1px',
'border-top': '1px solid transparent',
'border-bottom': em(THICKNESS * ARROWY) + ' solid transparent',
},
'mjx-menclose > mjx-arrow > mjx-lthead': {
transform: 'skewX(-' + ANGLE + 'rad)',
left: 0,
bottom: '-1px',
'border-left': 0,
'border-right': em(THICKNESS * ARROWX) + ' solid',
'border-bottom': '1px solid transparent',
'border-top': em(THICKNESS * ARROWY) + ' solid transparent',
},
'mjx-menclose > mjx-arrow > mjx-lbhead': {
transform: 'skewX(' + ANGLE + 'rad)',
'transform-origin': 'top',
left: 0,
top: '-1px',
'border-left': 0,
'border-right': em(THICKNESS * ARROWX) + ' solid',
'border-top': '1px solid transparent',
'border-bottom': em(THICKNESS * ARROWY) + ' solid transparent',
},
'mjx-menclose > mjx-dbox-top': {
position: 'absolute',
top: 0,
bottom: '50%',
left: 0,
width: em(1.5 * PADDING),
border: em(THICKNESS) + ' solid',
'border-style': 'solid solid none none',
'border-radius': '0 100% 0 0',
'box-sizing': 'border-box',
},
'mjx-menclose > mjx-dbox-bot': {
position: 'absolute',
top: '50%',
bottom: 0,
left: 0,
width: em(1.5 * PADDING),
'border-width': em(THICKNESS),
'border-style': 'none solid solid none',
'border-radius': '0 0 100% 0',
'box-sizing': 'border-box',
},
},
_a.notations = new Map([
Border('top'),
Border('right'),
Border('bottom'),
Border('left'),
Border2('actuarial', 'top', 'right'),
Border2('madruwb', 'bottom', 'right'),
DiagonalStrike('up', 1),
DiagonalStrike('down', -1),
[
'horizontalstrike',
{
renderer: RenderElement('hstrike', 'Y'),
bbox: (node) => [0, node.padding, 0, node.padding],
},
],
[
'verticalstrike',
{
renderer: RenderElement('vstrike', 'X'),
bbox: (node) => [node.padding, 0, node.padding, 0],
},
],
[
'box',
{
renderer: (node, child) => {
node.adaptor.setStyle(child, 'border', node.Em(node.thickness) + ' solid');
},
bbox: fullBBox,
border: fullBorder,
remove: 'left right top bottom',
},
],
[
'roundedbox',
{
renderer: RenderElement('rbox'),
bbox: fullBBox,
},
],
[
'circle',
{
renderer: RenderElement('cbox'),
bbox: fullBBox,
},
],
[
'phasorangle',
{
renderer: (node, child) => {
const { h, d } = node.getBBox();
const [a, W] = node.getArgMod(1.75 * node.padding, h + d);
const t = node.thickness * Math.sin(a) * 0.9;
node.adaptor.setStyle(child, 'border-bottom', node.Em(node.thickness) + ' solid');
const strike = node.adjustBorder(node.html('mjx-ustrike', {
style: {
width: node.Em(W),
transform: `translateX(${node.Em(t)}) rotate(${node.fixed(-a)}rad)`,
},
}));
node.adaptor.append(node.dom[0], strike);
},
bbox: (node) => {
const p = node.padding / 2;
const t = node.thickness;
return [2 * p, p, p + t, 3 * p + t];
},
border: (node) => [0, 0, node.thickness, 0],
remove: 'bottom',
},
],
Arrow('up'),
Arrow('down'),
Arrow('left'),
Arrow('right'),
Arrow('updown'),
Arrow('leftright'),
DiagonalArrow('updiagonal'),
DiagonalArrow('northeast'),
DiagonalArrow('southeast'),
DiagonalArrow('northwest'),
DiagonalArrow('southwest'),
DiagonalArrow('northeastsouthwest'),
DiagonalArrow('northwestsoutheast'),
[
'longdiv',
{
renderer: (node, child) => {
const adaptor = node.adaptor;
adaptor.setStyle(child, 'border-top', node.Em(node.thickness) + ' solid');
const arc1 = adaptor.append(node.dom[0], node.html('mjx-dbox-top'));
const arc2 = adaptor.append(node.dom[0], node.html('mjx-dbox-bot'));
const t = node.thickness;
const p = node.padding;
if (t !== THICKNESS) {
adaptor.setStyle(arc1, 'border-width', node.Em(t));
adaptor.setStyle(arc2, 'border-width', node.Em(t));
}
if (p !== PADDING) {
adaptor.setStyle(arc1, 'width', node.Em(1.5 * p));
adaptor.setStyle(arc2, 'width', node.Em(1.5 * p));
}
},
bbox: (node) => {
const p = node.padding;
const t = node.thickness;
return [p + t, p, p, 2 * p + t / 2];
},
},
],
[
'radical',
{
renderer: (node, child) => {
node.msqrt.toCHTML([child]);
const TRBL = node.sqrtTRBL();
node.adaptor.setStyle(node.msqrt.dom[0], 'margin', TRBL.map((x) => node.Em(-x)).join(' '));
},
init: (node) => {
node.msqrt = node.createMsqrt(node.childNodes[0]);
},
bbox: (node) => node.sqrtTRBL(),
renderChild: true,
},
],
]),
_a;
})();
//# sourceMappingURL=menclose.js.map
;// ./mjs/output/common/Wrappers/mrow.js
function CommonMrowMixin(Base) {
return class CommonMrowMixin extends Base {
stretchChildren() {
const stretchy = [];
for (const child of this.childNodes) {
if (child.canStretch(DIRECTION.Vertical)) {
stretchy.push(child);
}
}
const count = stretchy.length;
const nodeCount = this.childNodes.length;
if (count && nodeCount > 1) {
let H = 0;
let D = 0;
const all = count > 1 && count === nodeCount;
for (const child of this.childNodes) {
const noStretch = child.stretch.dir === DIRECTION.None;
if (all || noStretch) {
const rscale = child.getBBox().rscale;
let [h, d] = child.getUnbrokenHD();
h *= rscale;
d *= rscale;
if (h > H)
H = h;
if (d > D)
D = d;
}
}
for (const child of stretchy) {
const rscale = child.coreRScale();
child.coreMO().getStretchedVariant([H / rscale, D / rscale]);
}
}
}
get fixesPWidth() {
return false;
}
get breakCount() {
if (this._breakCount < 0) {
this._breakCount = !this.childNodes.length
? 0
: this.childNodes.reduce((n, child) => n + child.breakCount, 0);
}
return this._breakCount;
}
breakTop(_mrow, _child) {
const node = this;
return this.isStack ? this.parent.breakTop(node, node) : node;
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.dh = 0;
const self = this;
this.isStack =
!this.parent ||
this.parent.node.isInferred ||
this.parent.breakTop(self, self) !== self;
this.stretchChildren();
for (const child of this.childNodes) {
if (child.bbox.pwidth) {
this.bbox.pwidth = BBox.fullWidth;
break;
}
}
}
computeBBox(bbox, recompute = false) {
const breaks = this.breakCount;
this.lineBBox = breaks
? [new LineBBox({ h: 0.75, d: 0.25, w: 0 }, [0, 0])]
: [];
bbox.empty();
for (const i of this.childNodes.keys()) {
const child = this.childNodes[i];
bbox.append(child.getOuterBBox());
if (breaks) {
this.computeChildLineBBox(child, i);
}
}
bbox.clean();
if (breaks && !this.coreMO().node.isEmbellished) {
this.computeLinebreakBBox(bbox);
}
if (this.fixesPWidth && this.setChildPWidths(recompute)) {
this.computeBBox(bbox, true);
}
this.vboxAdjust(bbox);
}
computeLinebreakBBox(bbox) {
var _a;
bbox.empty();
const isStack = this.isStack;
const lines = this.lineBBox;
const n = lines.length - 1;
if (isStack) {
for (const k of lines.keys()) {
const line = lines[k];
this.addMiddleBorders(line);
if (k === 0) {
this.addLeftBorders(line);
}
if (k === n) {
this.addRightBorders(line);
}
}
}
let y = 0;
for (const k of lines.keys()) {
const line = lines[k];
bbox.combine(line, 0, y);
y -=
Math.max(0.25, line.d) +
line.lineLeading +
Math.max(0.75, ((_a = lines[k + 1]) === null || _a === void 0 ? void 0 : _a.h) || 0);
}
if (isStack) {
lines[0].L = this.bbox.L;
lines[n].R = this.bbox.R;
}
else {
bbox.w = Math.max(...this.lineBBox.map((bbox) => bbox.w));
this.shiftLines(bbox.w);
if (!this.jax.math.display && !this.linebreakOptions.inline) {
bbox.pwidth = BBox.fullWidth;
if (this.node.isInferred) {
this.parent.bbox.pwidth = BBox.fullWidth;
}
}
}
bbox.clean();
}
vboxAdjust(bbox) {
if (!this.parent)
return;
const n = this.breakCount;
const valign = this.parent.node.attributes.get('data-vertical-align');
if (n && valign === 'bottom') {
this.dh = n ? bbox.d - this.lineBBox[n - 1].d : 0;
}
else if (valign === 'center' || (n && valign === 'middle')) {
const { h, d } = bbox;
const a = this.font.params.axis_height;
this.dh = (h + d) / 2 + a - h;
}
else {
this.dh = 0;
return;
}
bbox.h += this.dh;
bbox.d -= this.dh;
}
computeChildLineBBox(child, i) {
const lbox = this.lineBBox[this.lineBBox.length - 1];
lbox.end = [i, 0];
lbox.append(child.getLineBBox(0));
const parts = child.breakCount + 1;
if (parts === 1)
return;
for (let l = 1; l < parts; l++) {
const bbox = new LineBBox({ h: 0.75, d: 0.25, w: 0 });
bbox.start = bbox.end = [i, l];
bbox.isFirst = true;
bbox.append(child.getLineBBox(l));
this.lineBBox.push(bbox);
}
}
getLineBBox(i) {
this.getBBox();
return this.isStack
? super.getLineBBox(i)
: LineBBox.from(this.getOuterBBox(), this.linebreakOptions.lineleading);
}
shiftLines(W) {
var _a, _b;
const lines = this.lineBBox;
const n = lines.length - 1;
const [alignfirst, shiftfirst] = ((_a = lines[1].indentData) === null || _a === void 0 ? void 0 : _a[0]) || [
'left',
'0',
];
for (const i of lines.keys()) {
const bbox = lines[i];
const [indentalign, indentshift] = i === 0
? [alignfirst, shiftfirst]
: ((_b = bbox.indentData) === null || _b === void 0 ? void 0 : _b[i === n ? 2 : 1]) || ['left', '0'];
const [align, shift] = this.processIndent(indentalign, indentshift, alignfirst, shiftfirst, W);
bbox.L = 0;
bbox.L = this.getAlignX(W, bbox, align) + shift;
}
}
setChildPWidths(recompute, w = null, clear = true) {
if (!this.breakCount)
return super.setChildPWidths(recompute, w, clear);
if (recompute)
return false;
if (w !== null && this.bbox.w !== w) {
this.bbox.w = w;
this.shiftLines(w);
}
return true;
}
breakToWidth(W) {
this.linebreaks.breakToWidth(this, W);
}
};
}
function CommonInferredMrowMixin(Base) {
return class CommonInferredMrowMixin extends Base {
getScale() {
this.bbox.scale = this.parent.bbox.scale;
this.bbox.rscale = 1;
}
};
}
//# sourceMappingURL=mrow.js.map
;// ./mjs/output/chtml/Wrappers/mrow.js
const ChtmlMrow = (function () {
var _a;
const Base = CommonMrowMixin(ChtmlWrapper);
return _a = class ChtmlMrow extends Base {
constructor() {
super(...arguments);
this.linebreakCount = 0;
}
toCHTML(parents) {
const n = (this.linebreakCount = this.isStack ? 0 : this.breakCount);
if (n || !this.node.isInferred) {
parents = this.standardChtmlNodes(parents);
}
else {
this.dom = parents;
}
this.addChildren(parents);
if (n) {
this.placeLines(parents, n);
}
else {
this.handleVerticalAlign(parents[0]);
this.handleNegativeWidth(parents[0]);
}
}
placeLines(parents, n) {
var _b, _c;
this.getBBox();
const lines = this.lineBBox;
const adaptor = this.adaptor;
const [alignfirst, shiftfirst] = ((_b = lines[1].indentData) === null || _b === void 0 ? void 0 : _b[0]) || [
'left',
'0',
];
for (const i of parents.keys()) {
const bbox = lines[i];
const [indentalign, indentshift] = i === 0
? [alignfirst, shiftfirst]
: ((_c = bbox.indentData) === null || _c === void 0 ? void 0 : _c[i === n ? 2 : 1]) || ['left', '0'];
const [align, shift] = this.processIndent(indentalign, indentshift, alignfirst, shiftfirst);
adaptor.setAttribute(parents[i], 'align', align);
if (shift) {
adaptor.setStyle(parents[i], 'position', 'relative');
adaptor.setStyle(parents[i], 'left', this.em(shift));
}
if (i < n && this.jax.math.display) {
adaptor.setStyle(parents[i], 'margin-bottom', this.em(bbox.lineLeading));
}
}
}
handleVerticalAlign(dom) {
if (this.dh) {
this.adaptor.setStyle(this.adaptor.parent(dom), 'vertical-align', this.em(this.dh));
}
}
handleNegativeWidth(dom) {
const { w } = this.getBBox();
if (w < 0) {
this.adaptor.setStyle(dom, 'width', this.em(Math.max(0, w)));
this.adaptor.setStyle(dom, 'marginRight', this.em(w));
}
}
createChtmlNodes(parents) {
const n = this.linebreakCount;
if (!n)
return super.createChtmlNodes(parents);
const adaptor = this.adaptor;
const kind = this.node.isInferred
? 'mjx-linestack'
: 'mjx-' + this.node.kind;
this.dom = [adaptor.append(parents[0], this.html(kind))];
if (kind === 'mjx-mrow' && !this.isStack) {
adaptor.setAttribute(this.dom[0], 'break-top', 'true');
}
if (this.node.getProperty('process-breaks')) {
adaptor.setAttribute(this.dom[0], 'breakable', 'true');
}
if (this.node.isInferred || !this.isStack) {
const valign = this.parent.node.attributes.get('data-vertical-align');
if (valign === 'middle' || valign === 'center' || valign === 'bottom') {
adaptor.setAttribute(this.dom[0], 'break-align', valign);
}
}
this.dom = [
adaptor.append(this.handleHref(parents)[0], this.dom[0]),
];
const chtml = Array(n);
for (let i = 0; i <= n; i++) {
chtml[i] = adaptor.append(this.dom[0], this.html('mjx-linebox', { lineno: i }));
}
return chtml;
}
addChildren(parents) {
let i = 0;
for (const child of this.childNodes) {
const n = child.breakCount;
child.toCHTML(parents.slice(i, i + n + 1));
i += n;
}
}
},
_a.kind = MmlMrow.prototype.kind,
_a.styles = {
'mjx-linestack, mjx-mrow[break-top]': {
display: 'inline-table',
width: '100%',
},
'mjx-linestack[break-align="bottom"], mjx-mrow[break-top][break-align="bottom"]': {
display: 'inline-block',
},
'mjx-linestack[break-align="middle"], mjx-mrow[break-top][break-align="middle"]': {
'vertical-align': 'middle',
},
'mjx-linestack[break-align="center"], mjx-mrow[break-top][break-align="center"]': {
'vertical-align': 'middle',
},
'mjx-linestack[breakable]': {
display: 'inline',
},
'mjx-linestack[breakable] > mjx-linebox': {
display: 'inline',
},
'mjx-linestack[breakable] > mjx-linebox::before': {
'white-space': 'pre',
content: '"\\A"',
},
'mjx-linestack[breakable] > mjx-linebox::after': {
'white-space': 'normal',
content: '" "',
'letter-spacing': '-.999em',
'font-family': 'MJX-BRK',
},
'mjx-linestack[breakable] > mjx-linebox:first-of-type::before': {
display: 'none',
},
'mjx-linestack[breakable] > mjx-linebox:last-of-type::after': {
display: 'none',
},
'mjx-linebox': {
display: 'block',
},
'mjx-linebox[align="left"]': {
'text-align': 'left',
},
'mjx-linebox[align="center"]': {
'text-align': 'center',
},
'mjx-linebox[align="right"]': {
'text-align': 'right',
},
'mjx-linestrut': {
display: 'inline-block',
height: '1em',
'vertical-align': '-.25em',
},
},
_a;
})();
const ChtmlInferredMrow = (function () {
var _a;
const Base = CommonInferredMrowMixin(ChtmlMrow);
return _a = class ChtmlInferredMrow extends Base {
},
_a.kind = MmlInferredMrow.prototype.kind,
_a;
})();
//# sourceMappingURL=mrow.js.map
;// ./mjs/output/common/Wrappers/mfenced.js
function CommonMfencedMixin(Base) {
return class CommonMfencedMixin extends Base {
createMrow() {
const mmlFactory = this.node.factory;
const mrow = mmlFactory.create('inferredMrow');
mrow.inheritAttributesFrom(this.node);
this.mrow = this.wrap(mrow);
this.mrow.parent = this;
}
addMrowChildren() {
const mfenced = this.node;
const mrow = this.mrow;
this.addMo(mfenced.open);
if (this.childNodes.length) {
mrow.childNodes.push(this.childNodes[0]);
}
let i = 0;
for (const child of this.childNodes.slice(1)) {
this.addMo(mfenced.separators[i++]);
mrow.childNodes.push(child);
}
this.addMo(mfenced.close);
mrow.stretchChildren();
}
addMo(node) {
if (!node)
return;
const mo = this.wrap(node);
this.mrow.childNodes.push(mo);
mo.parent = this.mrow;
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.mrow = null;
this.createMrow();
this.addMrowChildren();
}
computeBBox(bbox, recompute = false) {
bbox.updateFrom(this.mrow.getOuterBBox());
this.setChildPWidths(recompute);
}
get breakCount() {
return this.mrow.breakCount;
}
computeLineBBox(i) {
return this.mrow.getLineBBox(i);
}
};
}
//# sourceMappingURL=mfenced.js.map
;// ./mjs/output/chtml/Wrappers/mfenced.js
const ChtmlMfenced = (function () {
var _a;
const Base = CommonMfencedMixin(ChtmlWrapper);
return _a = class ChtmlMfenced extends Base {
toCHTML(parents) {
const chtml = this.standardChtmlNodes(parents);
this.mrow.toCHTML(chtml);
}
},
_a.kind = MmlMfenced.prototype.kind,
_a;
})();
//# sourceMappingURL=mfenced.js.map
;// ./mjs/output/common/Wrappers/mfrac.js
function CommonMfracMixin(Base) {
return class CommonMfracMixin extends Base {
getFractionBBox(bbox, display, t) {
const nbox = this.childNodes[0].getOuterBBox();
const dbox = this.childNodes[1].getOuterBBox();
const tex = this.font.params;
const a = tex.axis_height;
const { T, u, v } = this.getTUV(display, t);
bbox.combine(nbox, 0, a + T + Math.max(nbox.d * nbox.rscale, u));
bbox.combine(dbox, 0, a - T - Math.max(dbox.h * dbox.rscale, v));
bbox.w += 2 * this.pad + 0.2;
}
getTUV(display, t) {
const tex = this.font.params;
const a = tex.axis_height;
const T = (display ? 3.5 : 1.5) * t;
return {
T: (display ? 3.5 : 1.5) * t,
u: (display ? tex.num1 : tex.num2) - a - T,
v: (display ? tex.denom1 : tex.denom2) + a - T,
};
}
getAtopBBox(bbox, display) {
const { u, v, nbox, dbox } = this.getUVQ(display);
bbox.combine(nbox, 0, u);
bbox.combine(dbox, 0, -v);
bbox.w += 2 * this.pad;
}
getUVQ(display) {
const nbox = this.childNodes[0].getOuterBBox();
const dbox = this.childNodes[1].getOuterBBox();
const tex = this.font.params;
let [u, v] = display ? [tex.num1, tex.denom1] : [tex.num3, tex.denom2];
const p = (display ? 7 : 3) * tex.rule_thickness;
let q = u - nbox.d * nbox.scale - (dbox.h * dbox.scale - v);
if (q < p) {
u += (p - q) / 2;
v += (p - q) / 2;
q = p;
}
return { u, v, q, nbox, dbox };
}
getBevelledBBox(bbox, display) {
const { u, v, delta, nbox, dbox } = this.getBevelData(display);
const lbox = this.bevel.getOuterBBox();
bbox.combine(nbox, 0, u);
bbox.combine(lbox, bbox.w - delta / 2, 0);
bbox.combine(dbox, bbox.w - delta / 2, v);
}
getBevelData(display) {
const nbox = this.childNodes[0].getOuterBBox();
const dbox = this.childNodes[1].getOuterBBox();
const delta = display ? 0.4 : 0.15;
const H = Math.max(nbox.scale * (nbox.h + nbox.d), dbox.scale * (dbox.h + dbox.d)) +
2 * delta;
const a = this.font.params.axis_height;
const u = (nbox.scale * (nbox.d - nbox.h)) / 2 + a + delta;
const v = (dbox.scale * (dbox.d - dbox.h)) / 2 + a - delta;
return { H, delta, u, v, nbox, dbox };
}
isDisplay() {
const { displaystyle, scriptlevel } = this.node.attributes.getList('displaystyle', 'scriptlevel');
return displaystyle && scriptlevel === 0;
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.bevel = null;
this.pad = this.node.getProperty('withDelims')
? 0
: this.font.params.nulldelimiterspace;
if (this.node.attributes.get('bevelled')) {
const { H } = this.getBevelData(this.isDisplay());
const bevel = (this.bevel = this.createMo('/'));
bevel.node.attributes.set('symmetric', true);
bevel.canStretch(DIRECTION.Vertical);
bevel.getStretchedVariant([H], true);
}
}
computeBBox(bbox, recompute = false) {
bbox.empty();
const { linethickness, bevelled } = this.node.attributes.getList('linethickness', 'bevelled');
const display = this.isDisplay();
let w = null;
if (bevelled) {
this.getBevelledBBox(bbox, display);
}
else {
const thickness = this.length2em(String(linethickness), 0.06);
w = -2 * this.pad;
if (thickness === 0) {
this.getAtopBBox(bbox, display);
}
else {
this.getFractionBBox(bbox, display, thickness);
w -= 0.2;
}
w += bbox.w;
}
bbox.clean();
this.setChildPWidths(recompute, w);
}
canStretch(_direction) {
return false;
}
getChildAlign(i) {
const attributes = this.node.attributes;
return attributes.get('bevelled')
? 'left'
: attributes.get(['numalign', 'denomalign'][i]);
}
getWrapWidth(i) {
const attributes = this.node.attributes;
if (attributes.get('bevelled')) {
return this.childNodes[i].getOuterBBox().w;
}
const w = this.getBBox().w;
const thickness = this.length2em(attributes.get('linethickness'));
return w - (thickness ? 0.2 : 0) - 2 * this.pad;
}
};
}
//# sourceMappingURL=mfrac.js.map
;// ./mjs/output/chtml/Wrappers/mfrac.js
const ChtmlMfrac = (function () {
var _a;
const Base = CommonMfracMixin(ChtmlWrapper);
return _a = class ChtmlMfrac extends Base {
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
this.standardChtmlNodes(parents);
const { linethickness, bevelled } = this.node.attributes.getList('linethickness', 'bevelled');
const display = this.isDisplay();
if (bevelled) {
this.makeBevelled(display);
}
else {
const thickness = this.length2em(String(linethickness), 0.06);
if (thickness === 0) {
this.makeAtop(display);
}
else {
this.makeFraction(display, thickness);
}
}
}
makeFraction(display, t) {
const { numalign, denomalign } = this.node.attributes.getList('numalign', 'denomalign');
const withDelims = this.node.getProperty('withDelims');
const attr = (display ? { type: 'd' } : {});
const fattr = (withDelims ? Object.assign(Object.assign({}, attr), { delims: 'true' }) : Object.assign({}, attr));
const nattr = (numalign !== 'center' ? { align: numalign } : {});
const dattr = (denomalign !== 'center' ? { align: denomalign } : {});
const dsattr = Object.assign({}, attr), nsattr = Object.assign({}, attr);
const tex = this.font.params;
if (t !== 0.06) {
const a = tex.axis_height;
const r = this.font.params.rule_factor;
const tEm = this.em(t);
const { T, u, v } = this.getTUV(display, t);
const m = (display ? this.em(3 * t) : tEm) + ' -.1em';
attr.style = {
height: tEm,
'border-top': this.em(t * r) + ' solid',
margin: m,
};
const nh = this.em(Math.max(0, u));
nsattr.style = { height: nh, 'vertical-align': '-' + nh };
dsattr.style = { height: this.em(Math.max(0, v)) };
fattr.style = { 'vertical-align': this.em(a - T) };
}
let num, den;
this.adaptor.append(this.dom[0], this.html('mjx-frac', fattr, [
(num = this.html('mjx-num', nattr, [
this.html('mjx-nstrut', nsattr),
])),
this.html('mjx-dbox', {}, [
this.html('mjx-dtable', {}, [
this.html('mjx-line', attr),
this.html('mjx-row', {}, [
(den = this.html('mjx-den', dattr, [
this.html('mjx-dstrut', dsattr),
])),
]),
]),
]),
]));
this.childNodes[0].toCHTML([num]);
this.childNodes[1].toCHTML([den]);
}
makeAtop(display) {
const { numalign, denomalign } = this.node.attributes.getList('numalign', 'denomalign');
const withDelims = this.node.getProperty('withDelims');
const attr = (display ? { type: 'd', atop: true } : { atop: true });
const fattr = (withDelims ? Object.assign(Object.assign({}, attr), { delims: true }) : Object.assign({}, attr));
const nattr = (numalign !== 'center' ? { align: numalign } : {});
const dattr = (denomalign !== 'center' ? { align: denomalign } : {});
const { v, q } = this.getUVQ(display);
nattr.style = { 'padding-bottom': this.em(q) };
fattr.style = { 'vertical-align': this.em(-v) };
let num, den;
this.adaptor.append(this.dom[0], this.html('mjx-frac', fattr, [
(num = this.html('mjx-num', nattr)),
(den = this.html('mjx-den', dattr)),
]));
this.childNodes[0].toCHTML([num]);
this.childNodes[1].toCHTML([den]);
}
makeBevelled(display) {
const adaptor = this.adaptor;
adaptor.setAttribute(this.dom[0], 'bevelled', 'ture');
const num = adaptor.append(this.dom[0], this.html('mjx-num'));
this.childNodes[0].toCHTML([num]);
this.bevel.toCHTML(this.dom);
const den = adaptor.append(this.dom[0], this.html('mjx-den'));
this.childNodes[1].toCHTML([den]);
const { u, v, delta, nbox, dbox } = this.getBevelData(display);
if (u) {
adaptor.setStyle(num, 'verticalAlign', this.em(u / nbox.scale));
}
if (v) {
adaptor.setStyle(den, 'verticalAlign', this.em(v / dbox.scale));
}
const dx = this.em(-delta / 2);
adaptor.setStyle(this.bevel.dom[0], 'marginLeft', dx);
adaptor.setStyle(this.bevel.dom[0], 'marginRight', dx);
}
},
_a.kind = MmlMfrac.prototype.kind,
_a.styles = {
'mjx-frac': {
display: 'inline-block',
'vertical-align': '0.17em',
padding: '0 .22em'
},
'mjx-frac[type="d"]': {
'vertical-align': '.04em'
},
'mjx-frac[delims]': {
padding: '0 .1em'
},
'mjx-frac[atop]': {
padding: '0 .12em'
},
'mjx-frac[atop][delims]': {
padding: '0'
},
'mjx-dtable': {
display: 'inline-table',
width: '100%'
},
'mjx-dtable > *': {
'font-size': '2000%'
},
'mjx-dbox': {
display: 'block',
'font-size': '5%'
},
'mjx-num': {
display: 'block',
'text-align': 'center'
},
'mjx-den': {
display: 'block',
'text-align': 'center'
},
'mjx-mfrac[bevelled] > mjx-num': {
display: 'inline-block'
},
'mjx-mfrac[bevelled] > mjx-den': {
display: 'inline-block'
},
'mjx-den[align="right"], mjx-num[align="right"]': {
'text-align': 'right'
},
'mjx-den[align="left"], mjx-num[align="left"]': {
'text-align': 'left'
},
'mjx-nstrut': {
display: 'inline-block',
height: '.054em',
width: 0,
'vertical-align': '-.054em'
},
'mjx-nstrut[type="d"]': {
height: '.217em',
'vertical-align': '-.217em',
},
'mjx-dstrut': {
display: 'inline-block',
height: '.505em',
width: 0
},
'mjx-dstrut[type="d"]': {
height: '.726em',
},
'mjx-line': {
display: 'block',
'box-sizing': 'border-box',
'min-height': '1px',
height: '.06em',
'border-top': '.075em solid',
margin: '.06em -.1em',
overflow: 'hidden'
},
'mjx-line[type="d"]': {
margin: '.18em -.1em'
}
},
_a;
})();
//# sourceMappingURL=mfrac.js.map
;// ./mjs/output/common/Wrappers/msqrt.js
function CommonMsqrtMixin(Base) {
return class CommonMsqrtMixin extends Base {
get base() {
return 0;
}
get root() {
return null;
}
combineRootBBox(_bbox, _sbox, _H) { }
getPQ(sbox) {
const t = this.font.params.rule_thickness;
const s = this.font.params.surd_height;
const p = this.node.attributes.get('displaystyle')
? this.font.params.x_height
: t;
const q = sbox.h + sbox.d > this.surdH
? (sbox.h + sbox.d - (this.surdH - t - s - p / 2)) / 2
: s + p / 4;
return [p, q];
}
getRootDimens(_sbox, _H) {
return [0, 0, 0, 0];
}
rootWidth() {
return 1.25;
}
getStretchedSurd() {
const t = this.font.params.rule_thickness;
const s = this.font.params.surd_height;
const p = this.node.attributes.get('displaystyle')
? this.font.params.x_height
: t;
const { h, d } = this.childNodes[this.base].getOuterBBox();
this.surdH = h + d + t + s + p / 4;
this.surd.getStretchedVariant([this.surdH - d, d], true);
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.surd = this.createMo('\u221A');
this.surd.canStretch(DIRECTION.Vertical);
this.getStretchedSurd();
}
computeBBox(bbox, recompute = false) {
bbox.empty();
const surdbox = this.surd.getBBox();
const basebox = new BBox(this.childNodes[this.base].getOuterBBox());
const q = this.getPQ(surdbox)[1];
const t = this.font.params.rule_thickness;
const s = this.font.params.surd_height;
const H = basebox.h + q + t;
const [x] = this.getRootDimens(surdbox, H);
bbox.h = H + s;
this.combineRootBBox(bbox, surdbox, H);
bbox.combine(surdbox, x, H - surdbox.h);
bbox.combine(basebox, x + surdbox.w, 0);
bbox.clean();
this.setChildPWidths(recompute);
}
invalidateBBox() {
super.invalidateBBox();
this.surd.childNodes[0].invalidateBBox();
}
};
}
//# sourceMappingURL=msqrt.js.map
;// ./mjs/output/chtml/Wrappers/msqrt.js
const ChtmlMsqrt = (function () {
var _a;
const Base = CommonMsqrtMixin(ChtmlWrapper);
return _a = class ChtmlMsqrt extends Base {
toCHTML(parents) {
const surd = this.surd;
const base = this.childNodes[this.base];
const sbox = surd.getBBox();
const bbox = base.getOuterBBox();
const [, q] = this.getPQ(sbox);
const t = this.font.params.surd_height;
const H = bbox.h + q + t;
const adaptor = this.adaptor;
const CHTML = this.standardChtmlNodes(parents);
let SURD, BASE, ROOT, root;
if (this.root != null) {
ROOT = adaptor.append(CHTML[0], this.html('mjx-root'));
root = this.childNodes[this.root];
}
const SQRT = adaptor.append(CHTML[0], this.html('mjx-sqrt', {}, [
(SURD = this.html('mjx-surd')),
(BASE = this.html('mjx-box', { style: { paddingTop: this.em(q) } })),
]));
if (t !== 0.06) {
adaptor.setStyle(BASE, 'border-top-width', this.em(t * this.font.params.rule_factor));
}
this.addRoot(ROOT, root, sbox, H);
surd.toCHTML([SURD]);
base.toCHTML([BASE]);
if (surd.size < 0) {
adaptor.addClass(SQRT, 'mjx-tall');
}
}
addRoot(_ROOT, _root, _sbox, _H) { }
},
_a.kind = MmlMsqrt.prototype.kind,
_a.styles = {
'mjx-root': {
display: 'inline-block',
'white-space': 'nowrap',
},
'mjx-surd': {
display: 'inline-block',
'vertical-align': 'top',
},
'mjx-sqrt': {
display: 'inline-block',
'padding-top': '.075em',
},
'mjx-sqrt > mjx-box': {
'border-top': '.075em solid',
'padding-left': '.03em',
'margin-left': '-.03em',
},
'mjx-sqrt.mjx-tall > mjx-box': {
'padding-left': '.3em',
'margin-left': '-.3em',
},
},
_a;
})();
//# sourceMappingURL=msqrt.js.map
;// ./mjs/output/common/Wrappers/mroot.js
function CommonMrootMixin(Base) {
return class CommonMrootMixin extends Base {
get root() {
return 1;
}
combineRootBBox(BBOX, sbox, H) {
const bbox = this.childNodes[this.root].getOuterBBox();
const h = this.getRootDimens(sbox, H)[1];
BBOX.combine(bbox, 0, h);
}
getRootDimens(sbox, H) {
const surd = this.surd;
const bbox = this.childNodes[this.root].getOuterBBox();
const offset = (surd.size < 0 ? 0.5 : 0.6) * sbox.w;
const { w, rscale } = bbox;
const W = Math.max(w, offset / rscale);
const dx = Math.max(0, W - w);
const h = this.rootHeight(bbox, sbox, surd.size, H);
const x = W * rscale - offset;
return [x, h, dx];
}
rootHeight(rbox, sbox, size, H) {
const h = sbox.h + sbox.d;
const b = (size < 0 ? 1.9 : 0.55 * h) - (h - H);
return b + Math.max(0, rbox.d * rbox.rscale);
}
rootWidth() {
const bbox = this.childNodes[this.root].getOuterBBox();
return 0.4 + bbox.w * bbox.rscale;
}
};
}
//# sourceMappingURL=mroot.js.map
;// ./mjs/output/chtml/Wrappers/mroot.js
const ChtmlMroot = (function () {
var _a;
const Base = CommonMrootMixin(ChtmlMsqrt);
return _a = class ChtmlMroot extends Base {
addRoot(ROOT, root, sbox, H) {
root.toCHTML([ROOT]);
const adaptor = this.adaptor;
const [x, h, dx] = this.getRootDimens(sbox, H);
adaptor.setStyle(ROOT, 'verticalAlign', this.em(h));
adaptor.setStyle(ROOT, 'width', this.em(x));
if (dx) {
adaptor.setStyle(adaptor.firstChild(ROOT), 'paddingLeft', this.em(dx));
}
}
},
_a.kind = MmlMroot.prototype.kind,
_a;
})();
//# sourceMappingURL=mroot.js.map
;// ./mjs/output/common/Wrappers/msubsup.js
function CommonMsubMixin(Base) {
var _a;
return _a = class CommonMsubMixin extends Base {
get scriptChild() {
return this.childNodes[this.node.sub];
}
getOffset() {
const x = this.baseIsChar ? 0 : this.getAdjustedIc();
return [x, -this.getV()];
}
},
_a.useIC = false,
_a;
}
function CommonMsupMixin(Base) {
return class CommonMsupMixin extends Base {
get scriptChild() {
return this.childNodes[this.node.sup];
}
getOffset() {
const x = this.getAdjustedIc() - (this.baseRemoveIc ? 0 : this.baseIc);
return [x, this.getU()];
}
};
}
function CommonMsubsupMixin(Base) {
var _a;
return _a = class CommonMsubsupMixin extends Base {
constructor() {
super(...arguments);
this.UVQ = null;
}
get subChild() {
return this.childNodes[this.node.sub];
}
get supChild() {
return this.childNodes[this.node.sup];
}
get scriptChild() {
return this.supChild;
}
getUVQ(subbox = this.subChild.getOuterBBox(), supbox = this.supChild.getOuterBBox()) {
const base = this.baseCore;
const bbox = base.getLineBBox(base.breakCount);
if (this.UVQ)
return this.UVQ;
const tex = this.font.params;
const t = 3 * tex.rule_thickness;
const subscriptshift = this.length2em(this.node.attributes.get('subscriptshift'), tex.sub2);
const drop = this.baseCharZero(bbox.d * this.baseScale + tex.sub_drop * subbox.rscale);
const supd = supbox.d * supbox.rscale;
const subh = subbox.h * subbox.rscale;
let [u, v] = [this.getU(), Math.max(drop, subscriptshift)];
let q = u - supd - (subh - v);
if (q < t) {
v += t - q;
const p = (4 / 5) * tex.x_height - (u - supd);
if (p > 0) {
u += p;
v -= p;
}
}
u = Math.max(this.length2em(this.node.attributes.get('superscriptshift'), u), u);
v = Math.max(this.length2em(this.node.attributes.get('subscriptshift'), v), v);
q = u - supd - (subh - v);
this.UVQ = [u, -v, q];
return this.UVQ;
}
appendScripts(bbox) {
const [subbox, supbox] = [
this.subChild.getOuterBBox(),
this.supChild.getOuterBBox(),
];
const w = this.getBaseWidth();
const x = this.getAdjustedIc();
const [u, v] = this.getUVQ();
const y = bbox.d - this.baseChild.getLineBBox(this.baseChild.breakCount).d;
bbox.combine(subbox, w + (this.baseIsChar ? 0 : x), v - y);
bbox.combine(supbox, w + x, u - y);
bbox.w += this.font.params.scriptspace;
return bbox;
}
},
_a.useIC = false,
_a;
}
//# sourceMappingURL=msubsup.js.map
;// ./mjs/output/common/Wrappers/scriptbase.js
function CommonScriptbaseMixin(Base) {
var _a;
return _a = class CommonScriptbaseMixin extends Base {
get baseChild() {
return this.childNodes[this.node.base];
}
get scriptChild() {
return this.childNodes[1];
}
getBaseCore() {
let core = this.getSemanticBase() || this.childNodes[0];
let node = core === null || core === void 0 ? void 0 : core.node;
while (core &&
((core.childNodes.length === 1 &&
(node.isKind('mrow') ||
node.isKind('TeXAtom') ||
node.isKind('mstyle') ||
(node.isKind('mpadded') && !node.getProperty('vbox')) ||
node.isKind('mphantom') ||
node.isKind('semantics'))) ||
(node.isKind('munderover') &&
core.isMathAccent))) {
this.setBaseAccentsFor(core);
core = core.childNodes[0];
node = core === null || core === void 0 ? void 0 : core.node;
}
if (!core) {
this.baseHasAccentOver = this.baseHasAccentUnder = false;
}
return core || this.childNodes[0];
}
setBaseAccentsFor(core) {
if (core.node.isKind('munderover')) {
if (this.baseHasAccentOver === null) {
this.baseHasAccentOver = !!core.node.attributes.get('accent');
}
if (this.baseHasAccentUnder === null) {
this.baseHasAccentUnder = !!core.node.attributes.get('accentunder');
}
}
}
getSemanticBase() {
const fence = this.node.attributes.getExplicit('data-semantic-fencepointer');
return this.getBaseFence(this.baseChild, fence);
}
getBaseFence(fence, id) {
if (!fence || !fence.node.attributes || !id) {
return null;
}
if (fence.node.attributes.getExplicit('data-semantic-id') === id) {
return fence;
}
for (const child of fence.childNodes) {
const result = this.getBaseFence(child, id);
if (result) {
return result;
}
}
return null;
}
getBaseScale() {
let child = this.baseCore;
let scale = 1;
while (child && child !== this) {
const bbox = child.getOuterBBox();
scale *= bbox.rscale;
child = child.parent;
}
return scale;
}
getBaseIc() {
return this.baseCore.getOuterBBox().ic * this.baseScale;
}
getAdjustedIc() {
return this.baseIc ? 1.05 * this.baseIc + 0.05 : 0;
}
isCharBase() {
const base = this.baseCore;
return (((base.node.isKind('mo') && base.size === null) ||
base.node.isKind('mi') ||
base.node.isKind('mn')) &&
base.bbox.rscale === 1 &&
Array.from(base.getText()).length === 1);
}
checkLineAccents() {
if (!this.node.isKind('munderover'))
return;
if (this.node.isKind('mover')) {
this.isLineAbove = this.isLineAccent(this.scriptChild);
}
else if (this.node.isKind('munder')) {
this.isLineBelow = this.isLineAccent(this.scriptChild);
}
else {
const mml = this;
this.isLineAbove = this.isLineAccent(mml.overChild);
this.isLineBelow = this.isLineAccent(mml.underChild);
}
}
isLineAccent(script) {
const node = script.coreMO().node;
return node.isToken && node.getText() === '\u2015';
}
getBaseWidth() {
const bbox = this.baseChild.getLineBBox(this.baseChild.breakCount);
return (bbox.w * bbox.rscale -
(this.baseRemoveIc ? this.baseIc : 0) +
this.font.params.extra_ic);
}
getOffset() {
return [0, 0];
}
baseCharZero(n) {
const largeop = !!this.baseCore.node.attributes.get('largeop');
const sized = !!(this.baseCore.node.isKind('mo') &&
this.baseCore.size);
const scale = this.baseScale;
return this.baseIsChar && !largeop && !sized && scale === 1 ? 0 : n;
}
getV() {
const base = this.baseCore;
const bbox = base.getLineBBox(base.breakCount);
const sbox = this.scriptChild.getOuterBBox();
const tex = this.font.params;
const subscriptshift = this.length2em(this.node.attributes.get('subscriptshift'), tex.sub1);
return Math.max(this.baseCharZero(bbox.d * this.baseScale + tex.sub_drop * sbox.rscale), subscriptshift, sbox.h * sbox.rscale - (4 / 5) * tex.x_height);
}
getU() {
const base = this.baseCore;
const bbox = base.getLineBBox(base.breakCount);
const sbox = this.scriptChild.getOuterBBox();
const tex = this.font.params;
const attr = this.node.attributes.getList('displaystyle', 'superscriptshift');
const prime = this.node.getProperty('texprimestyle');
const p = prime ? tex.sup3 : attr.displaystyle ? tex.sup1 : tex.sup2;
const superscriptshift = this.length2em(attr.superscriptshift, p);
return Math.max(this.baseCharZero(bbox.h * this.baseScale - tex.sup_drop * sbox.rscale), superscriptshift, sbox.d * sbox.rscale + (1 / 4) * tex.x_height);
}
hasMovableLimits() {
const display = this.node.attributes.get('displaystyle');
const mo = this.baseChild.coreMO().node;
return !display && !!mo.attributes.get('movablelimits');
}
getOverKU(basebox, overbox) {
const accent = this.node.attributes.get('accent');
const tex = this.font.params;
const d = overbox.d * overbox.rscale;
const t = tex.rule_thickness * tex.separation_factor;
const delta = this.baseHasAccentOver ? t : 0;
const T = this.isLineAbove ? 3 * tex.rule_thickness : t;
const k = (accent
? T
: Math.max(tex.big_op_spacing1, tex.big_op_spacing3 - Math.max(0, d))) - delta;
return [k, basebox.h * basebox.rscale + k + d];
}
getUnderKV(basebox, underbox) {
const accent = this.node.attributes.get('accentunder');
const tex = this.font.params;
const h = underbox.h * underbox.rscale;
const t = tex.rule_thickness * tex.separation_factor;
const delta = this.baseHasAccentUnder ? t : 0;
const T = this.isLineBelow ? 3 * tex.rule_thickness : t;
const k = (accent ? T : Math.max(tex.big_op_spacing2, tex.big_op_spacing4 - h)) -
delta;
return [k, -(basebox.d * basebox.rscale + k + h)];
}
getDeltaW(boxes, delta = [0, 0, 0]) {
const align = this.node.attributes.get('align');
const widths = boxes.map((box) => box.w * box.rscale);
widths[0] -=
this.baseRemoveIc && !this.baseCore.node.attributes.get('largeop')
? this.baseIc
: 0;
const w = Math.max(...widths);
const dw = [];
let m = 0;
for (const i of widths.keys()) {
dw[i] =
(align === 'center'
? (w - widths[i]) / 2
: align === 'right'
? w - widths[i]
: 0) + delta[i];
if (dw[i] < m) {
m = -dw[i];
}
}
if (m) {
for (const i of dw.keys()) {
dw[i] += m;
}
}
[1, 2].map((i) => (dw[i] += boxes[i] ? boxes[i].dx * boxes[0].rscale : 0));
return dw;
}
getDelta(script, noskew = false) {
const accent = this.node.attributes.get('accent');
let { sk, ic } = this.baseCore.getOuterBBox();
if (accent) {
sk -= script.getOuterBBox().sk;
}
return (((accent && !noskew ? sk : 0) + this.font.skewIcFactor * ic) *
this.baseScale);
}
stretchChildren() {
const stretchy = [];
for (const child of this.childNodes) {
if (child.canStretch(DIRECTION.Horizontal)) {
stretchy.push(child);
}
}
const count = stretchy.length;
const nodeCount = this.childNodes.length;
if (count && nodeCount > 1) {
let W = 0;
const all = count > 1 && count === nodeCount;
for (const child of this.childNodes) {
const noStretch = child.stretch.dir === DIRECTION.None;
if (all || noStretch) {
const { w, rscale } = child.getOuterBBox(noStretch);
if (w * rscale > W)
W = w * rscale;
}
}
for (const child of stretchy) {
const core = child.coreMO();
if (core.size === null) {
core.getStretchedVariant([W / child.coreRScale()]);
}
}
}
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.baseScale = 1;
this.baseIc = 0;
this.baseRemoveIc = false;
this.baseIsChar = false;
this.baseHasAccentOver = null;
this.baseHasAccentUnder = null;
this.isLineAbove = false;
this.isLineBelow = false;
this.isMathAccent = false;
const core = (this.baseCore = this.getBaseCore());
if (!core)
return;
this.setBaseAccentsFor(core);
this.baseScale = this.getBaseScale();
this.baseIc = this.getBaseIc();
this.baseIsChar = this.isCharBase();
this.isMathAccent =
this.baseIsChar &&
this.scriptChild &&
this.scriptChild.coreMO().node.getProperty('mathaccent') !== undefined;
this.checkLineAccents();
this.baseRemoveIc =
!this.isLineAbove &&
!this.isLineBelow &&
(!(this.constructor
.useIC) ||
this.isMathAccent);
}
computeBBox(bbox, recompute = false) {
bbox.empty();
bbox.append(this.baseChild.getOuterBBox());
this.appendScripts(bbox);
bbox.clean();
this.setChildPWidths(recompute);
}
appendScripts(bbox) {
const w = this.getBaseWidth();
const [x, y] = this.getOffset();
bbox.combine(this.scriptChild.getOuterBBox(), w + x, y);
bbox.w += this.font.params.scriptspace;
return bbox;
}
get breakCount() {
if (this._breakCount < 0) {
this._breakCount = this.node.isEmbellished
? this.coreMO().embellishedBreakCount
: !this.node.linebreakContainer
? this.childNodes[0].breakCount
: 0;
}
return this._breakCount;
}
breakTop(mrow, child) {
return this.node.linebreakContainer ||
!this.parent ||
this.node.childIndex(child.node)
? mrow
: this.parent.breakTop(mrow, this);
}
computeLineBBox(i) {
const n = this.breakCount;
if (!n)
return LineBBox.from(this.getOuterBBox(), this.linebreakOptions.lineleading);
const bbox = this.baseChild.getLineBBox(i).copy();
if (i < n) {
if (i === 0) {
this.addLeftBorders(bbox);
}
this.addMiddleBorders(bbox);
}
else {
this.appendScripts(bbox);
this.addMiddleBorders(bbox);
this.addRightBorders(bbox);
}
return bbox;
}
},
_a.useIC = true,
_a;
}
//# sourceMappingURL=scriptbase.js.map
;// ./mjs/output/chtml/Wrappers/scriptbase.js
const ChtmlScriptbase = (function () {
var _a;
const Base = CommonScriptbaseMixin(ChtmlWrapper);
return _a = class ChtmlScriptbase extends Base {
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
this.dom = this.standardChtmlNodes(parents);
const [x, v] = this.getOffset();
const dx = x - (this.baseRemoveIc ? this.baseIc : 0);
const style = { 'vertical-align': this.em(v) };
if (dx) {
style['margin-left'] = this.em(dx);
}
this.baseChild.toCHTML(this.dom);
const dom = this.dom[this.dom.length - 1];
this.scriptChild.toCHTML([
this.adaptor.append(dom, this.html('mjx-script', { style })),
]);
}
markUsed() {
super.markUsed();
this.jax.wrapperUsage.add(ChtmlMsubsup.kind);
}
setDeltaW(nodes, dx) {
for (let i = 0; i < dx.length; i++) {
if (dx[i]) {
this.adaptor.setStyle(nodes[i], 'paddingLeft', this.em(dx[i]));
}
}
}
adjustOverDepth(over, overbox) {
if (overbox.d >= 0)
return;
this.adaptor.setStyle(over, 'marginBottom', this.em(overbox.d * overbox.rscale));
}
adjustUnderDepth(under, underbox) {
if (underbox.d >= 0)
return;
const adaptor = this.adaptor;
const v = this.em(underbox.d);
const box = this.html('mjx-box', {
style: { 'margin-bottom': v, 'vertical-align': v },
});
for (const child of adaptor.childNodes(adaptor.firstChild(under))) {
adaptor.append(box, child);
}
adaptor.append(adaptor.firstChild(under), box);
}
adjustBaseHeight(base, basebox) {
if (this.node.attributes.get('accent')) {
const minH = this.font.params.x_height * this.baseScale;
if (basebox.h < minH) {
this.adaptor.setStyle(base, 'paddingTop', this.em(minH - basebox.h));
basebox.h = minH;
}
}
}
},
_a.kind = 'scriptbase',
_a;
})();
//# sourceMappingURL=scriptbase.js.map
;// ./mjs/output/chtml/Wrappers/msubsup.js
const ChtmlMsub = (function () {
var _a;
const Base = CommonMsubMixin(ChtmlScriptbase);
return _a = class ChtmlMsub extends Base {
},
_a.kind = MmlMsub.prototype.kind,
_a;
})();
const ChtmlMsup = (function () {
var _a;
const Base = CommonMsupMixin(ChtmlScriptbase);
return _a = class ChtmlMsup extends Base {
},
_a.kind = MmlMsup.prototype.kind,
_a;
})();
const ChtmlMsubsup = (function () {
var _a;
const Base = CommonMsubsupMixin(ChtmlScriptbase);
return _a = class ChtmlMsubsup extends Base {
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
const adaptor = this.adaptor;
const chtml = this.standardChtmlNodes(parents);
const [base, sup, sub] = [this.baseChild, this.supChild, this.subChild];
const [, v, q] = this.getUVQ();
const style = { 'vertical-align': this.em(v) };
base.toCHTML(chtml);
const stack = adaptor.append(chtml[chtml.length - 1], this.html('mjx-script', { style }));
sup.toCHTML([stack]);
adaptor.append(stack, this.html('mjx-spacer', { style: { 'margin-top': this.em(q) } }));
sub.toCHTML([stack]);
const ic = this.getAdjustedIc();
if (ic) {
adaptor.setStyle(sup.dom[0], 'marginLeft', this.em(ic / sup.bbox.rscale));
if (!this.baseIsChar) {
adaptor.setStyle(sub.dom[0], 'marginLeft', this.em(ic / sup.bbox.rscale));
}
}
if (this.baseRemoveIc) {
adaptor.setStyle(stack, 'marginLeft', this.em(-this.baseIc));
}
}
},
_a.kind = MmlMsubsup.prototype.kind,
_a.styles = {
'mjx-script': {
display: 'inline-block',
'padding-right': '.05em',
'padding-left': '.033em',
},
'mjx-script > mjx-spacer': {
display: 'block',
},
},
_a;
})();
//# sourceMappingURL=msubsup.js.map
;// ./mjs/output/common/Wrappers/munderover.js
function CommonMunderMixin(Base) {
return class CommonMunderMixin extends Base {
get scriptChild() {
return this.childNodes[this.node.under];
}
constructor(...args) {
super(...args);
this.stretchChildren();
}
computeBBox(bbox, recompute = false) {
if (this.hasMovableLimits()) {
super.computeBBox(bbox, recompute);
return;
}
bbox.empty();
const basebox = this.baseChild.getOuterBBox();
const underbox = this.scriptChild.getOuterBBox();
const v = this.getUnderKV(basebox, underbox)[1];
const delta = this.isLineBelow
? 0
: this.getDelta(this.scriptChild, true);
const [bw, uw] = this.getDeltaW([basebox, underbox], [0, -delta]);
bbox.combine(basebox, bw, 0);
bbox.combine(underbox, uw, v);
bbox.d += this.font.params.big_op_spacing5;
bbox.clean();
this.setChildPWidths(recompute);
}
};
}
function CommonMoverMixin(Base) {
return class CommonMoverMixin extends Base {
get scriptChild() {
return this.childNodes[this.node.over];
}
constructor(...args) {
super(...args);
this.stretchChildren();
}
computeBBox(bbox) {
if (this.hasMovableLimits()) {
super.computeBBox(bbox);
return;
}
bbox.empty();
const basebox = this.baseChild.getOuterBBox();
const overbox = this.scriptChild.getOuterBBox();
if (this.node.attributes.get('accent')) {
basebox.h = Math.max(basebox.h, this.font.params.x_height * this.baseScale);
}
const u = this.getOverKU(basebox, overbox)[1];
const delta = this.isLineAbove ? 0 : this.getDelta(this.scriptChild);
const [bw, ow] = this.getDeltaW([basebox, overbox], [0, delta]);
bbox.combine(basebox, bw, 0);
bbox.combine(overbox, ow, u);
bbox.h += this.font.params.big_op_spacing5;
bbox.clean();
}
};
}
function CommonMunderoverMixin(Base) {
return class CommonMunderoverMixin extends Base {
get underChild() {
return this.childNodes[this.node.under];
}
get overChild() {
return this.childNodes[this.node.over];
}
get subChild() {
return this.underChild;
}
get supChild() {
return this.overChild;
}
constructor(...args) {
super(...args);
this.stretchChildren();
}
computeBBox(bbox) {
if (this.hasMovableLimits()) {
super.computeBBox(bbox);
return;
}
bbox.empty();
const overbox = this.overChild.getOuterBBox();
const basebox = this.baseChild.getOuterBBox();
const underbox = this.underChild.getOuterBBox();
if (this.node.attributes.get('accent')) {
basebox.h = Math.max(basebox.h, this.font.params.x_height * this.baseScale);
}
const u = this.getOverKU(basebox, overbox)[1];
const v = this.getUnderKV(basebox, underbox)[1];
const odelta = this.getDelta(this.overChild);
const udelta = this.getDelta(this.underChild, true);
const [bw, uw, ow] = this.getDeltaW([basebox, underbox, overbox], [0, this.isLineBelow ? 0 : -udelta, this.isLineAbove ? 0 : odelta]);
bbox.combine(basebox, bw, 0);
bbox.combine(overbox, ow, u);
bbox.combine(underbox, uw, v);
const z = this.font.params.big_op_spacing5;
bbox.h += z;
bbox.d += z;
bbox.clean();
}
};
}
//# sourceMappingURL=munderover.js.map
;// ./mjs/output/chtml/Wrappers/munderover.js
const ChtmlMunder = (function () {
var _a;
const Base = CommonMunderMixin(ChtmlMsub);
return _a = class ChtmlMunder extends Base {
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
if (this.hasMovableLimits()) {
super.toCHTML(parents);
this.adaptor.setAttribute(this.dom[0], 'limits', 'false');
return;
}
this.dom = this.standardChtmlNodes(parents);
const base = this.adaptor.append(this.adaptor.append(this.dom[0], this.html('mjx-row')), this.html('mjx-base'));
const under = this.adaptor.append(this.adaptor.append(this.dom[0], this.html('mjx-row')), this.html('mjx-under'));
this.baseChild.toCHTML([base]);
this.scriptChild.toCHTML([under]);
const basebox = this.baseChild.getOuterBBox();
const underbox = this.scriptChild.getOuterBBox();
const k = this.getUnderKV(basebox, underbox)[0];
const delta = this.isLineBelow
? 0
: this.getDelta(this.scriptChild, true);
this.adaptor.setStyle(under, 'paddingTop', this.em(k));
this.setDeltaW([base, under], this.getDeltaW([basebox, underbox], [0, -delta]));
this.adjustUnderDepth(under, underbox);
}
},
_a.kind = MmlMunder.prototype.kind,
_a.styles = {
'mjx-over': {
'text-align': 'left',
},
'mjx-munder:not([limits="false"])': {
display: 'inline-table',
},
'mjx-munder > mjx-row': {
'text-align': 'left',
},
'mjx-under': {
'padding-bottom': '.1em',
},
},
_a;
})();
const ChtmlMover = (function () {
var _a;
const Base = CommonMoverMixin(ChtmlMsup);
return _a = class ChtmlMover extends Base {
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
if (this.hasMovableLimits()) {
super.toCHTML(parents);
this.adaptor.setAttribute(this.dom[0], 'limits', 'false');
return;
}
this.dom = this.standardChtmlNodes(parents);
const over = this.adaptor.append(this.dom[0], this.html('mjx-over'));
const base = this.adaptor.append(this.dom[0], this.html('mjx-base'));
this.scriptChild.toCHTML([over]);
this.baseChild.toCHTML([base]);
const overbox = this.scriptChild.getOuterBBox();
const basebox = this.baseChild.getOuterBBox();
this.adjustBaseHeight(base, basebox);
const k = this.getOverKU(basebox, overbox)[0];
const delta = this.isLineAbove ? 0 : this.getDelta(this.scriptChild);
this.adaptor.setStyle(over, 'paddingBottom', this.em(k));
this.setDeltaW([base, over], this.getDeltaW([basebox, overbox], [0, delta]));
this.adjustOverDepth(over, overbox);
}
},
_a.kind = MmlMover.prototype.kind,
_a.styles = {
'mjx-mover:not([limits="false"])': {
'padding-top': '.1em',
},
'mjx-mover:not([limits="false"]) > *': {
display: 'block',
'text-align': 'left',
},
},
_a;
})();
const ChtmlMunderover = (function () {
var _a;
const Base = CommonMunderoverMixin(ChtmlMsubsup);
return _a = class ChtmlMunderover extends Base {
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
if (this.hasMovableLimits()) {
super.toCHTML(parents);
this.adaptor.setAttribute(this.dom[0], 'limits', 'false');
return;
}
this.dom = this.standardChtmlNodes(parents);
const over = this.adaptor.append(this.dom[0], this.html('mjx-over'));
const table = this.adaptor.append(this.adaptor.append(this.dom[0], this.html('mjx-box')), this.html('mjx-munder'));
const base = this.adaptor.append(this.adaptor.append(table, this.html('mjx-row')), this.html('mjx-base'));
const under = this.adaptor.append(this.adaptor.append(table, this.html('mjx-row')), this.html('mjx-under'));
this.overChild.toCHTML([over]);
this.baseChild.toCHTML([base]);
this.underChild.toCHTML([under]);
const overbox = this.overChild.getOuterBBox();
const basebox = this.baseChild.getOuterBBox();
const underbox = this.underChild.getOuterBBox();
this.adjustBaseHeight(base, basebox);
const ok = this.getOverKU(basebox, overbox)[0];
const uk = this.getUnderKV(basebox, underbox)[0];
const odelta = this.getDelta(this.overChild);
const udelta = this.getDelta(this.underChild, true);
this.adaptor.setStyle(over, 'paddingBottom', this.em(ok));
this.adaptor.setStyle(under, 'paddingTop', this.em(uk));
this.setDeltaW([base, under, over], this.getDeltaW([basebox, underbox, overbox], [0, this.isLineBelow ? 0 : -udelta, this.isLineAbove ? 0 : odelta]));
this.adjustOverDepth(over, overbox);
this.adjustUnderDepth(under, underbox);
}
},
_a.kind = MmlMunderover.prototype.kind,
_a.styles = {
'mjx-munderover:not([limits="false"])': {
'padding-top': '.1em',
},
'mjx-munderover:not([limits="false"]) > *': {
display: 'block',
},
},
_a;
})();
//# sourceMappingURL=munderover.js.map
;// ./mjs/output/common/Wrappers/mmultiscripts.js
const NextScript = {
base: 'subList',
subList: 'supList',
supList: 'subList',
psubList: 'psupList',
psupList: 'psubList',
};
const ScriptNames = ['sup', 'sup', 'psup', 'psub'];
function CommonMmultiscriptsMixin(Base) {
return class CommonMmultiscriptsMixin extends Base {
combinePrePost(pre, post) {
const bbox = new BBox(pre);
bbox.combine(post, 0, 0);
return bbox;
}
getScriptData() {
const data = (this.scriptData = {
base: null,
sub: BBox.empty(),
sup: BBox.empty(),
psub: BBox.empty(),
psup: BBox.empty(),
numPrescripts: 0,
numScripts: 0,
});
const lists = this.getScriptBBoxLists();
this.combineBBoxLists(data.sub, data.sup, lists.subList, lists.supList);
this.combineBBoxLists(data.psub, data.psup, lists.psubList, lists.psupList);
data.base = lists.base[0];
data.numPrescripts = lists.psubList.length;
data.numScripts = lists.subList.length;
}
getScriptBBoxLists() {
const lists = {
base: [],
subList: [],
supList: [],
psubList: [],
psupList: [],
};
let script = 'base';
for (const child of this.childNodes) {
if (child.node.isKind('mprescripts')) {
script = 'psubList';
}
else {
lists[script].push(child.getOuterBBox());
script = NextScript[script];
}
}
this.firstPrescript = lists.subList.length + lists.supList.length + 2;
this.padLists(lists.subList, lists.supList);
this.padLists(lists.psubList, lists.psupList);
return lists;
}
padLists(list1, list2) {
if (list1.length > list2.length) {
list2.push(BBox.empty());
}
}
combineBBoxLists(bbox1, bbox2, list1, list2) {
for (let i = 0; i < list1.length; i++) {
const [w1, h1, d1] = this.getScaledWHD(list1[i]);
const [w2, h2, d2] = this.getScaledWHD(list2[i]);
const w = Math.max(w1, w2);
bbox1.w += w;
bbox2.w += w;
if (h1 > bbox1.h)
bbox1.h = h1;
if (d1 > bbox1.d)
bbox1.d = d1;
if (h2 > bbox2.h)
bbox2.h = h2;
if (d2 > bbox2.d)
bbox2.d = d2;
}
}
getScaledWHD(bbox) {
const { w, h, d, rscale } = bbox;
return [w * rscale, h * rscale, d * rscale];
}
getCombinedUV() {
const data = this.scriptData;
const sub = this.combinePrePost(data.sub, data.psub);
const sup = this.combinePrePost(data.sup, data.psup);
return this.getUVQ(sub, sup);
}
addPrescripts(bbox, u, v) {
const data = this.scriptData;
if (data.numPrescripts) {
const scriptspace = this.font.params.scriptspace;
bbox.combine(data.psup, scriptspace, u);
bbox.combine(data.psub, scriptspace, v);
}
return bbox;
}
addPostscripts(bbox, u, v) {
const data = this.scriptData;
if (data.numScripts) {
const x = bbox.w;
bbox.combine(data.sup, x, u);
bbox.combine(data.sub, x, v);
bbox.w += this.font.params.scriptspace;
}
return bbox;
}
constructor(...args) {
super(...args);
this.scriptData = null;
this.firstPrescript = 0;
this.getScriptData();
}
appendScripts(bbox) {
bbox.empty();
const [u, v] = this.getCombinedUV();
this.addPrescripts(bbox, u, v);
bbox.append(this.scriptData.base);
this.addPostscripts(bbox, u, v);
bbox.clean();
return bbox;
}
computeLineBBox(i) {
const n = this.baseChild.breakCount;
const cbox = this.baseChild.getLineBBox(i).copy();
let bbox = cbox;
const [u, v] = this.getCombinedUV();
if (i === 0) {
bbox = LineBBox.from(this.addPrescripts(BBox.zero(), u, v), this.linebreakOptions.lineleading);
bbox.append(cbox);
this.addLeftBorders(bbox);
bbox.L = this.bbox.L;
}
else if (i === n) {
bbox = this.addPostscripts(bbox, u, v);
this.addRightBorders(bbox);
bbox.R = this.bbox.R;
}
this.addMiddleBorders(bbox);
return bbox;
}
getUVQ(subbox, supbox) {
if (!this.UVQ) {
let [u, v, q] = [0, 0, 0];
if (subbox.w === 0) {
u = this.getU();
}
else if (supbox.w === 0) {
u = -this.getV();
}
else {
[u, v, q] = super.getUVQ(subbox, supbox);
}
this.UVQ = [u, v, q];
}
return this.UVQ;
}
};
}
//# sourceMappingURL=mmultiscripts.js.map
;// ./mjs/output/chtml/Wrappers/mmultiscripts.js
const ChtmlMmultiscripts = (function () {
var _a;
const Base = CommonMmultiscriptsMixin(ChtmlMsubsup);
return _a = class ChtmlMmultiscripts extends Base {
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
const chtml = this.standardChtmlNodes(parents);
const data = this.scriptData;
const scriptalign = this.node.getProperty('scriptalign') || 'right left';
const [preAlign, postAlign] = split(scriptalign + ' ' + scriptalign);
const [u, v] = this.getCombinedUV();
if (data.numPrescripts) {
const scripts = this.addScripts(this.dom[0], u, -v, true, data.psub, data.psup, this.firstPrescript, data.numPrescripts);
if (preAlign !== 'right') {
this.adaptor.setAttribute(scripts, 'script-align', preAlign);
}
}
this.childNodes[0].toCHTML(chtml);
if (data.numScripts) {
const scripts = this.addScripts(this.dom[this.dom.length - 1], u, -v, false, data.sub, data.sup, 1, data.numScripts);
if (postAlign !== 'left') {
this.adaptor.setAttribute(scripts, 'script-align', postAlign);
}
}
}
addScripts(dom, u, v, isPre, sub, sup, i, n) {
const adaptor = this.adaptor;
const q = u - sup.d + (v - sub.h);
const U = u < 0 && v === 0 ? sub.h + u : u;
const rowdef = q > 0 ? { style: { height: this.em(q) } } : {};
const tabledef = U ? { style: { 'vertical-align': this.em(U) } } : {};
const supRow = this.html('mjx-row');
const sepRow = this.html('mjx-row', rowdef);
const subRow = this.html('mjx-row');
const name = 'mjx-' + (isPre ? 'pre' : '') + 'scripts';
const m = i + 2 * n;
while (i < m) {
this.childNodes[i++].toCHTML([
adaptor.append(subRow, this.html('mjx-cell')),
]);
this.childNodes[i++].toCHTML([
adaptor.append(supRow, this.html('mjx-cell')),
]);
}
return adaptor.append(dom, this.html(name, tabledef, [supRow, sepRow, subRow]));
}
},
_a.kind = MmlMmultiscripts.prototype.kind,
_a.styles = {
'mjx-prescripts': {
display: 'inline-table',
'padding-left': '.05em',
},
'mjx-scripts': {
display: 'inline-table',
'padding-right': '.05em',
},
'mjx-prescripts > mjx-row > mjx-cell': {
'text-align': 'right',
},
'[script-align="left"] > mjx-row > mjx-cell': {
'text-align': 'left',
},
'[script-align="center"] > mjx-row > mjx-cell': {
'text-align': 'center',
},
'[script-align="right"] > mjx-row > mjx-cell': {
'text-align': 'right',
},
'mjx-none': {
display: 'inline-block',
height: '1px',
},
},
_a;
})();
//# sourceMappingURL=mmultiscripts.js.map
;// ./mjs/output/common/Wrappers/mtable.js
const BREAK_BELOW = 0.333;
function CommonMtableMixin(Base) {
return class CommonMtableMixin extends Base {
get tableRows() {
return this.childNodes;
}
findContainer() {
let node = this;
let parent = node.parent;
while (parent && (parent.node.notParent || parent.node.isKind('mrow'))) {
node = parent;
parent = parent.parent;
}
this.container = parent;
this.containerI = node.node.childPosition();
}
getPercentageWidth() {
if (this.hasLabels) {
this.bbox.pwidth = BBox.fullWidth;
}
else {
const width = this.node.attributes.get('width');
if (isPercent(width)) {
this.bbox.pwidth = width;
}
}
}
stretchRows() {
const equal = this.node.attributes.get('equalrows');
const HD = equal ? this.getEqualRowHeight() : 0;
const { H, D } = equal ? this.getTableData() : { H: [0], D: [0] };
const rows = this.tableRows;
for (let i = 0; i < this.numRows; i++) {
const hd = equal
? [(HD + H[i] - D[i]) / 2, (HD - H[i] + D[i]) / 2]
: null;
rows[i].stretchChildren(hd);
}
}
stretchColumns() {
const swidths = this.getColumnAttributes('columnwidth', 0);
for (let i = 0; i < this.numCols; i++) {
const width = typeof this.cWidths[i] === 'number'
? this.cWidths[i]
: null;
this.stretchColumn(i, width);
if (width !== null) {
this.breakColumn(i, width, swidths[i]);
}
}
}
stretchColumn(i, W) {
const stretchy = [];
for (const row of this.tableRows) {
const cell = row.getChild(i);
if (cell) {
const child = cell.childNodes[0];
if (child.stretch.dir === DIRECTION.None &&
child.canStretch(DIRECTION.Horizontal)) {
stretchy.push(child);
}
}
}
const count = stretchy.length;
const nodeCount = this.childNodes.length;
if (count && nodeCount > 1 && W === null) {
W = 0;
const all = count > 1 && count === nodeCount;
for (const row of this.tableRows) {
const cell = row.getChild(i);
if (cell) {
const child = cell.childNodes[0];
const noStretch = child.stretch.dir === DIRECTION.None;
if (all || noStretch) {
const { w } = child.getBBox(noStretch);
if (w > W) {
W = w;
}
}
}
}
}
if (W !== null) {
for (const child of stretchy) {
child
.coreMO()
.getStretchedVariant([
Math.max(W, child.getBBox().w) / child.coreRScale(),
]);
}
}
}
breakColumn(i, W, type) {
if (this.jax.math.root.attributes.get('overflow') !== 'linebreak' ||
!this.jax.math.display)
return;
const { D } = this.getTableData();
let j = 0;
let w = 0;
for (const row of this.tableRows) {
const cell = row.getChild(i);
if (cell && cell.getBBox().w > W) {
cell.childNodes[0].breakToWidth(W);
const bbox = cell.getBBox();
D[j] = Math.max(D[j], bbox.d);
if (bbox.w > w) {
w = bbox.w;
}
}
j++;
}
if (type === 'fit' ||
type === 'auto' ||
isPercent(type) ||
w > this.cWidths[i]) {
this.cWidths[i] = w;
}
}
getTableData() {
if (this.data) {
return this.data;
}
const H = new Array(this.numRows).fill(0);
const D = new Array(this.numRows).fill(0);
const W = new Array(this.numCols).fill(0);
const NH = new Array(this.numRows);
const ND = new Array(this.numRows);
const LW = [0];
const rows = this.tableRows;
for (let j = 0; j < rows.length; j++) {
let M = 0;
const row = rows[j];
const align = row.node.attributes.get('rowalign');
for (let i = 0; i < row.numCells; i++) {
const cell = row.getChild(i);
M = this.updateHDW(cell, i, j, align, H, D, W, M);
this.recordPWidthCell(cell, i);
}
NH[j] = H[j];
ND[j] = D[j];
if (row.labeled) {
M = this.updateHDW(row.childNodes[0], 0, j, align, H, D, LW, M);
}
this.extendHD(j, H, D, M);
this.extendHD(j, NH, ND, M);
}
const L = LW[0];
this.data = { H, D, W, NH, ND, L };
return this.data;
}
updateHDW(cell, i, j, align, H, D, W, M) {
let { h, d, w } = cell.getBBox();
const scale = cell.parent.bbox.rscale;
if (cell.parent.bbox.rscale !== 1) {
h *= scale;
d *= scale;
w *= scale;
}
if (this.node.getProperty('useHeight')) {
if (h < 0.75)
h = 0.75;
if (d < 0.25)
d = 0.25;
}
let m = 0;
align = cell.node.attributes.get('rowalign') || align;
if (align !== 'baseline' && align !== 'axis') {
m = h + d;
h = d = 0;
}
if (h > H[j])
H[j] = h;
if (d > D[j])
D[j] = d;
if (m > M)
M = m;
if (W && w > W[i])
W[i] = w;
return M;
}
extendHD(i, H, D, M) {
const d = (M - (H[i] + D[i])) / 2;
if (d < 0.00001)
return;
H[i] += d;
D[i] += d;
}
recordPWidthCell(cell, i) {
if (cell.childNodes[0] && cell.childNodes[0].getBBox().pwidth) {
this.pwidthCells.push([cell, i]);
}
}
setColumnPWidths() {
const W = this.cWidths;
for (const [cell, i] of this.pwidthCells) {
if (cell.setChildPWidths(false, W[i])) {
cell.invalidateBBox();
cell.getBBox();
}
}
}
getBBoxHD(height) {
const [align, row] = this.getAlignmentRow();
if (row === null) {
const a = this.font.params.axis_height;
const h2 = height / 2;
const HD = {
top: [0, height],
center: [h2, h2],
bottom: [height, 0],
baseline: [h2, h2],
axis: [h2 + a, h2 - a],
};
return HD[align] || [h2, h2];
}
else {
const y = this.getVerticalPosition(row, align);
return [y, height - y];
}
}
getBBoxLR() {
var _a;
if (this.hasLabels) {
const attributes = this.node.attributes;
const side = attributes.get('side');
let [pad, align] = this.getPadAlignShift(side);
const labels = this.hasLabels && !!attributes.get('data-width-includes-label');
if (labels && this.frame && this.fSpace[0]) {
pad -= this.fSpace[0];
}
return align === 'center' && !labels
? [pad, pad]
: side === 'left'
? [pad, 0]
: [0, pad];
}
return [((_a = this.bbox) === null || _a === void 0 ? void 0 : _a.L) || 0, 0];
}
getPadAlignShift(side) {
const { L } = this.getTableData();
const sep = this.length2em(this.node.attributes.get('minlabelspacing'));
let pad = L + sep;
const [lpad, rpad] = this.styles == null
? ['', '']
: [this.styles.get('padding-left'), this.styles.get('padding-right')];
if (lpad || rpad) {
pad = Math.max(pad, this.length2em(lpad || '0'), this.length2em(rpad || '0'));
}
let [align, shift] = this.getAlignShift();
if (align === side) {
shift =
side === 'left'
? Math.max(pad, shift) - pad
: Math.min(-pad, shift) + pad;
}
return [pad, align, shift];
}
getWidth() {
return this.pWidth || this.getBBox().w;
}
adjustWideTable() {
const attributes = this.node.attributes;
if (attributes.get('width') !== 'auto')
return;
const [pad, align] = this.getPadAlignShift(attributes.get('side'));
const W = Math.max(this.containerWidth / 10, this.containerWidth - pad - (align === 'center' ? pad : 0));
if (this.naturalWidth() > W) {
this.adjustColumnWidths(W);
}
}
naturalWidth() {
const CW = this.getComputedWidths();
return (sum(CW.concat(this.cLines, this.cSpace)) +
2 * this.fLine +
this.fSpace[0] +
this.fSpace[2]);
}
getEqualRowHeight() {
const { H, D } = this.getTableData();
const HD = Array.from(H.keys()).map((i) => H[i] + D[i]);
return Math.max(...HD);
}
getComputedWidths() {
const W = this.getTableData().W;
let CW = Array.from(W.keys()).map((i) => {
return typeof this.cWidths[i] === 'number'
? this.cWidths[i]
: W[i];
});
if (this.node.attributes.get('equalcolumns')) {
CW = Array(CW.length).fill(max(CW));
}
return CW;
}
getColumnWidths() {
const width = this.node.attributes.get('width');
if (this.node.attributes.get('equalcolumns')) {
return this.getEqualColumns(width);
}
const swidths = this.getColumnAttributes('columnwidth', 0);
if (width === 'auto') {
return this.getColumnWidthsAuto(swidths);
}
if (isPercent(width)) {
return this.getColumnWidthsPercent(swidths);
}
return this.getColumnWidthsFixed(swidths, this.length2em(width));
}
getEqualColumns(width) {
const n = Math.max(1, this.numCols);
let cwidth;
if (width === 'auto') {
const { W } = this.getTableData();
cwidth = max(W);
}
else if (isPercent(width)) {
cwidth = this.percent(1 / n);
}
else {
const w = sum([].concat(this.cLines, this.cSpace)) +
this.fSpace[0] +
this.fSpace[2];
cwidth = Math.max(0, this.length2em(width) - w) / n;
}
return Array(this.numCols).fill(cwidth);
}
getColumnWidthsAuto(swidths) {
return swidths.map((x) => {
if (x === 'auto' || x === 'fit')
return null;
if (isPercent(x))
return x;
return this.length2em(x);
});
}
getColumnWidthsPercent(swidths) {
const hasFit = swidths.includes('fit');
const { W } = hasFit ? this.getTableData() : { W: null };
return Array.from(swidths.keys()).map((i) => {
const x = swidths[i];
if (x === 'fit')
return null;
if (x === 'auto')
return hasFit ? W[i] : null;
if (isPercent(x))
return x;
return this.length2em(x);
});
}
getColumnWidthsFixed(swidths, width) {
const indices = Array.from(swidths.keys());
const fit = indices.filter((i) => swidths[i] === 'fit');
const auto = indices.filter((i) => swidths[i] === 'auto');
const n = fit.length || auto.length;
const { W } = n ? this.getTableData() : { W: null };
const cwidth = width -
sum([].concat(this.cLines, this.cSpace)) -
this.fSpace[0] -
this.fSpace[2];
let dw = cwidth;
indices.forEach((i) => {
const x = swidths[i];
dw -= x === 'fit' || x === 'auto' ? W[i] : this.length2em(x, cwidth);
});
const fw = n && dw > 0 ? dw / n : 0;
return indices.map((i) => {
const x = swidths[i];
if (x === 'fit')
return W[i] + fw;
if (x === 'auto')
return W[i] + (fit.length === 0 ? fw : 0);
return this.length2em(x, cwidth);
});
}
adjustColumnWidths(width) {
const { W } = this.getTableData();
const swidths = this.getColumnAttributes('columnwidth', 0);
const indices = Array.from(swidths.keys());
const fit = indices
.filter((i) => swidths[i] === 'fit')
.sort((a, b) => W[b] - W[a]);
const auto = indices
.filter((i) => swidths[i] === 'auto')
.sort((a, b) => W[b] - W[a]);
const percent = indices
.filter((i) => isPercent(swidths[i]))
.sort((a, b) => W[b] - W[a]);
const fixed = indices
.filter((i) => swidths[i] !== 'fit' &&
swidths[i] !== 'auto' &&
!isPercent(swidths[i]))
.sort((a, b) => W[b] - W[a]);
const columns = [...fit, ...auto, ...percent, ...fixed];
if (!columns.length)
return;
this.cWidths = indices.map((i) => typeof this.cWidths[i] === 'number' ? this.cWidths[i] : W[i]);
const cwidth = width -
sum([].concat(this.cLines, this.cSpace)) -
this.fSpace[0] -
this.fSpace[2];
let dw = sum(this.cWidths) - cwidth;
let w = 0;
let n = 0;
while (n < columns.length) {
w += W[columns[n++]];
if (w && dw / w < BREAK_BELOW)
break;
}
dw = 1 - dw / w;
columns.slice(0, n).forEach((i) => (this.cWidths[i] *= dw));
}
getVerticalPosition(i, align) {
const equal = this.node.attributes.get('equalrows');
const { H, D } = this.getTableData();
const HD = equal ? this.getEqualRowHeight() : 0;
const space = this.getRowHalfSpacing();
let y = this.fLine;
for (let j = 0; j < i; j++) {
y +=
space[j] + (equal ? HD : H[j] + D[j]) + space[j + 1] + this.rLines[j];
}
const [h, d] = equal
? [(HD + H[i] - D[i]) / 2, (HD - H[i] + D[i]) / 2]
: [H[i], D[i]];
const offset = {
top: 0,
center: space[i] + (h + d) / 2,
bottom: space[i] + h + d + space[i + 1],
baseline: space[i] + h,
axis: space[i] + h - 0.25,
};
y += offset[align] || 0;
return y;
}
getFrameSpacing() {
const fspace = this.fframe
? this.convertLengths(this.getAttributeArray('framespacing'))
: [0, 0];
fspace[2] = fspace[0];
const padding = this.node.attributes.get('data-array-padding');
if (padding) {
const [L, R] = this.convertLengths(split(padding));
fspace[0] = L;
fspace[2] = R;
}
return fspace;
}
getEmHalfSpacing(fspace, space, scale = 1) {
const spaceEm = this.addEm(space, 2 / scale);
spaceEm.unshift(this.em(fspace[0] * scale));
spaceEm.push(this.em(fspace[1] * scale));
return spaceEm;
}
getRowHalfSpacing() {
const space = this.rSpace.map((x) => x / 2);
space.unshift(this.fSpace[1]);
space.push(this.fSpace[1]);
return space;
}
getColumnHalfSpacing() {
const space = this.cSpace.map((x) => x / 2);
space.unshift(this.fSpace[0]);
space.push(this.fSpace[2]);
return space;
}
getAlignmentRow() {
const [align, row] = split(this.node.attributes.get('align'));
if (row == null)
return [align, null];
let i = parseInt(row);
if (i < 0)
i += this.numRows + 1;
return [align, i < 1 || i > this.numRows ? null : i - 1];
}
getColumnAttributes(name, i = 1) {
const n = this.numCols - i;
const columns = this.getAttributeArray(name);
if (columns.length === 0)
return null;
while (columns.length < n) {
columns.push(columns[columns.length - 1]);
}
if (columns.length > n) {
columns.splice(n);
}
return columns;
}
getRowAttributes(name, i = 1) {
const n = this.numRows - i;
const rows = this.getAttributeArray(name);
if (rows.length === 0)
return null;
while (rows.length < n) {
rows.push(rows[rows.length - 1]);
}
if (rows.length > n) {
rows.splice(n);
}
return rows;
}
getAttributeArray(name) {
const value = this.node.attributes.get(name);
if (!value)
return [this.node.attributes.getDefault(name)];
return split(value);
}
addEm(list, n = 1) {
if (!list)
return null;
return list.map((x) => this.em(x / n));
}
convertLengths(list) {
if (!list)
return null;
return list.map((x) => this.length2em(x));
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.numCols = 0;
this.numRows = 0;
this.data = null;
this.pwidthCells = [];
this.pWidth = 0;
this.numCols = max(this.tableRows.map((row) => row.numCells));
this.numRows = this.childNodes.length;
this.hasLabels = this.childNodes.reduce((value, row) => value || row.node.isKind('mlabeledtr'), false);
this.findContainer();
this.isTop =
!this.container ||
(this.container.node.isKind('math') && !this.container.parent);
if (this.isTop) {
this.jax.table = this;
}
this.getPercentageWidth();
const attributes = this.node.attributes;
const frame = attributes.get('frame');
this.frame = frame !== 'none';
this.fframe =
this.frame || attributes.get('data-frame-styles') !== undefined;
this.fLine = this.frame ? 0.07 : 0;
this.fSpace = this.getFrameSpacing();
this.cSpace = this.convertLengths(this.getColumnAttributes('columnspacing'));
this.rSpace = this.convertLengths(this.getRowAttributes('rowspacing'));
this.cLines = this.getColumnAttributes('columnlines').map((x) => x === 'none' ? 0 : 0.07);
this.rLines = this.getRowAttributes('rowlines').map((x) => x === 'none' ? 0 : 0.07);
this.cWidths = this.getColumnWidths();
this.adjustWideTable();
this.stretchColumns();
this.stretchRows();
}
getStyles() {
super.getStyles();
const frame = this.node.attributes.get('data-frame-styles');
if (!frame)
return;
if (!this.styles) {
this.styles = new Styles('');
}
const fstyles = frame.split(/ /);
for (const i of TRBL.keys()) {
const style = fstyles[i];
if (style === 'none')
continue;
this.styles.set(`border-${TRBL[i]}`, `.07em ${style}`);
}
}
computeBBox(bbox, _recompute = false) {
const { H, D } = this.getTableData();
let height, width;
if (this.node.attributes.get('equalrows')) {
const HD = this.getEqualRowHeight();
height = sum([].concat(this.rLines, this.rSpace)) + HD * this.numRows;
}
else {
height = sum(H.concat(D, this.rLines, this.rSpace));
}
height += 2 * (this.fLine + this.fSpace[1]);
width = this.naturalWidth();
const w = this.node.attributes.get('width');
if (w !== 'auto') {
width = Math.max(this.length2em(w, 0) + 2 * this.fLine, width);
}
const [h, d] = this.getBBoxHD(height);
bbox.h = h;
bbox.d = d;
bbox.w = width;
const [L, R] = this.getBBoxLR();
bbox.L = L;
bbox.R = R;
if (!isPercent(w)) {
this.setColumnPWidths();
}
}
setChildPWidths(_recompute, cwidth, _clear) {
const width = this.node.attributes.get('width');
if (!isPercent(width))
return false;
if (!this.hasLabels) {
this.bbox.pwidth = '';
this.container.bbox.pwidth = '';
}
const { w, L, R } = this.bbox;
const labelInWidth = this.node.attributes.get('data-width-includes-label');
const W = Math.max(w, this.length2em(width, Math.max(cwidth, L + w + R))) -
(labelInWidth ? L + R : 0);
const cols = this.node.attributes.get('equalcolumns')
? Array(this.numCols).fill(this.percent(1 / Math.max(1, this.numCols)))
: this.getColumnAttributes('columnwidth', 0);
this.cWidths = this.getColumnWidthsFixed(cols, W);
this.pWidth = this.naturalWidth();
if (this.isTop) {
this.bbox.w = this.pWidth;
}
this.setColumnPWidths();
if (this.pWidth !== w) {
this.parent.invalidateBBox();
}
return this.pWidth !== w;
}
getAlignShift() {
return this.isTop
? super.getAlignShift()
: [this.container.getChildAlign(this.containerI), 0];
}
};
}
//# sourceMappingURL=mtable.js.map
;// ./mjs/output/chtml/Wrappers/mtable.js
const ChtmlMtable = (function () {
var _a;
const Base = CommonMtableMixin(ChtmlWrapper);
return _a = class ChtmlMtable extends Base {
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.itable = this.html('mjx-itable');
this.labels = this.html('mjx-itable');
}
getAlignShift() {
const data = super.getAlignShift();
if (!this.isTop) {
data[1] = 0;
}
return data;
}
toCHTML(parents) {
const chtml = this.standardChtmlNodes(parents);
this.adaptor.append(chtml[0], this.html('mjx-table', {}, [this.itable]));
for (const child of this.childNodes) {
child.toCHTML([this.itable]);
}
this.padRows();
this.handleColumnSpacing();
this.handleColumnLines();
this.handleColumnWidths();
this.handleRowSpacing();
this.handleRowLines();
this.handleRowHeights();
this.handleFrame();
this.handleWidth();
this.handleLabels();
this.handleAlign();
this.handleJustify();
this.shiftColor();
}
shiftColor() {
const adaptor = this.adaptor;
const color = adaptor.getStyle(this.dom[0], 'backgroundColor');
if (color) {
adaptor.setStyle(this.dom[0], 'backgroundColor', '');
adaptor.setStyle(this.itable, 'backgroundColor', color);
}
}
padRows() {
const adaptor = this.adaptor;
for (const row of adaptor.childNodes(this.itable)) {
while (adaptor.childNodes(row).length < this.numCols) {
adaptor.append(row, this.html('mjx-mtd', { extra: true }));
}
}
}
handleColumnSpacing() {
const scale = this.childNodes[0]
? 1 / this.childNodes[0].getBBox().rscale
: 1;
const spacing = this.getEmHalfSpacing([this.fSpace[0], this.fSpace[2]], this.cSpace, scale);
for (const row of this.tableRows) {
let i = 0;
for (const cell of row.tableCells) {
const lspace = spacing[i++];
const rspace = spacing[i];
const styleNode = cell
? cell.dom[0]
: this.adaptor.childNodes(row.dom[0])[i];
if ((i > 1 && lspace !== '0.4em') || (lspace !== '0' && i === 1)) {
this.adaptor.setStyle(styleNode, 'paddingLeft', lspace);
}
if ((i < this.numCols && rspace !== '0.4em') ||
(rspace !== '0' && i === this.numCols)) {
this.adaptor.setStyle(styleNode, 'paddingRight', rspace);
}
}
}
}
handleColumnLines() {
if (this.node.attributes.get('columnlines') === 'none')
return;
const lines = this.getColumnAttributes('columnlines');
for (const row of this.childNodes) {
let i = 0;
const cells = this.adaptor.childNodes(row.dom[0]).slice(1);
for (const cell of cells) {
const line = lines[i++];
if (line === 'none')
continue;
this.adaptor.setStyle(cell, 'borderLeft', '.07em ' + line);
}
}
}
handleColumnWidths() {
for (const row of this.childNodes) {
let i = 0;
for (const cell of this.adaptor.childNodes(row.dom[0])) {
const w = this.cWidths[i++];
if (w !== null) {
const width = typeof w === 'number' ? this.em(w) : w;
this.adaptor.setStyle(cell, 'width', width);
this.adaptor.setStyle(cell, 'maxWidth', width);
this.adaptor.setStyle(cell, 'minWidth', width);
}
}
}
}
handleRowSpacing() {
const scale = this.childNodes[0]
? 1 / this.childNodes[0].getBBox().rscale
: 1;
const spacing = this.getEmHalfSpacing([this.fSpace[1], this.fSpace[1]], this.rSpace, scale);
const frame = this.fframe;
let i = 0;
for (const row of this.childNodes) {
const tspace = spacing[i++];
const bspace = spacing[i];
for (const cell of row.childNodes) {
if ((i > 1 && tspace !== '0.215em') || (frame && i === 1)) {
this.adaptor.setStyle(cell.dom[0], 'paddingTop', tspace);
}
if ((i < this.numRows && bspace !== '0.215em') ||
(frame && i === this.numRows)) {
this.adaptor.setStyle(cell.dom[0], 'paddingBottom', bspace);
}
}
}
}
handleRowLines() {
if (this.node.attributes.get('rowlines') === 'none')
return;
const lines = this.getRowAttributes('rowlines');
let i = 0;
for (const row of this.childNodes.slice(1)) {
const line = lines[i++];
if (line === 'none')
continue;
for (const cell of this.adaptor.childNodes(row.dom[0])) {
this.adaptor.setStyle(cell, 'borderTop', '.07em ' + line);
}
}
}
handleRowHeights() {
if (this.node.attributes.get('equalrows')) {
this.handleEqualRows();
}
}
handleEqualRows() {
const space = this.getRowHalfSpacing();
const { H, D, NH, ND } = this.getTableData();
const HD = this.getEqualRowHeight();
for (let i = 0; i < this.numRows; i++) {
const row = this.childNodes[i];
this.setRowHeight(row, HD + space[i] + space[i + 1] + this.rLines[i]);
if (HD !== NH[i] + ND[i]) {
this.setRowBaseline(row, HD, (HD - H[i] + D[i]) / 2);
}
}
}
setRowHeight(row, HD) {
this.adaptor.setStyle(row.dom[0], 'height', this.em(HD));
}
setRowBaseline(row, HD, D) {
const ralign = row.node.attributes.get('rowalign');
for (const cell of row.childNodes) {
if (this.setCellBaseline(cell, ralign, HD, D))
break;
}
}
setCellBaseline(cell, ralign, HD, D) {
const calign = cell.node.attributes.get('rowalign');
if (calign === 'baseline' || calign === 'axis') {
const adaptor = this.adaptor;
const child = adaptor.lastChild(cell.dom[0]);
adaptor.setStyle(child, 'height', this.em(HD));
adaptor.setStyle(child, 'verticalAlign', this.em(-D));
const row = cell.parent;
if ((!row.node.isKind('mlabeledtr') || cell !== row.childNodes[0]) &&
(ralign === 'baseline' || ralign === 'axis')) {
return true;
}
}
return false;
}
handleFrame() {
if (this.frame && this.fLine) {
const frame = this.node.attributes.get('frame');
this.adaptor.setStyle(this.itable, 'border', `${this.em(this.fLine)} ${frame}`);
}
}
handleWidth() {
const adaptor = this.adaptor;
const dom = this.dom[0];
const { w, L, R } = this.getBBox();
adaptor.setStyle(dom, 'minWidth', this.em(L + w + R));
let W = this.node.attributes.get('width');
if (isPercent(W)) {
adaptor.setStyle(dom, 'width', '');
adaptor.setAttribute(dom, 'width', 'full');
}
else if (!this.hasLabels) {
if (W === 'auto')
return;
W = this.em(this.length2em(W) + 2 * this.fLine);
}
const table = adaptor.firstChild(dom);
adaptor.setStyle(table, 'width', W);
adaptor.setStyle(table, 'minWidth', this.em(w));
if (L || R) {
adaptor.setStyle(dom, 'margin', '');
const style = this.node.attributes.get('data-width-includes-label')
? 'padding'
: 'margin';
if (L === R) {
adaptor.setStyle(table, style, '0 ' + this.em(R));
}
else {
adaptor.setStyle(table, style, '0 ' + this.em(R) + ' 0 ' + this.em(L));
}
}
adaptor.setAttribute(this.itable, 'width', 'full');
}
handleAlign() {
const [align, row] = this.getAlignmentRow();
const dom = this.dom[0];
if (row === null) {
if (align !== 'axis') {
this.adaptor.setAttribute(dom, 'align', align);
}
}
else {
const y = this.getVerticalPosition(row, align);
this.adaptor.setAttribute(dom, 'align', 'top');
this.adaptor.setStyle(dom, 'verticalAlign', this.em(y));
}
}
handleJustify() {
const align = this.getAlignShift()[0];
if (align !== 'center') {
this.adaptor.setAttribute(this.dom[0], 'justify', align);
}
}
handleLabels() {
if (!this.hasLabels)
return;
const labels = this.labels;
const attributes = this.node.attributes;
const adaptor = this.adaptor;
const side = attributes.get('side');
adaptor.setAttribute(this.dom[0], 'side', side);
adaptor.setAttribute(labels, 'align', side);
adaptor.setStyle(labels, side, '0');
const [align, shift] = this.addLabelPadding(side);
if (shift) {
const table = adaptor.firstChild(this.dom[0]);
this.setIndent(table, align, shift);
}
this.updateRowHeights();
this.addLabelSpacing();
}
addLabelPadding(side) {
const [, align, shift] = this.getPadAlignShift(side);
const styles = {};
if (side === 'right' &&
!this.node.attributes.get('data-width-includes-label')) {
const W = this.node.attributes.get('width');
const { w, L, R } = this.getBBox();
styles.style = {
width: isPercent(W)
? 'calc(' + W + ' + ' + this.em(L + R) + ')'
: this.em(L + w + R),
};
}
this.adaptor.append(this.dom[0], this.html('mjx-labels', styles, [this.labels]));
return [align, shift];
}
updateRowHeights() {
const { H, D, NH, ND } = this.getTableData();
const space = this.getRowHalfSpacing();
for (let i = 0; i < this.numRows; i++) {
const row = this.childNodes[i];
this.setRowHeight(row, H[i] + D[i] + space[i] + space[i + 1] + this.rLines[i]);
if (H[i] !== NH[i] || D[i] !== ND[i]) {
this.setRowBaseline(row, H[i] + D[i], D[i]);
}
else if (row.node.isKind('mlabeledtr')) {
this.setCellBaseline(row.childNodes[0], '', H[i] + D[i], D[i]);
}
}
}
addLabelSpacing() {
const adaptor = this.adaptor;
const equal = this.node.attributes.get('equalrows');
const { H, D } = this.getTableData();
const HD = equal ? this.getEqualRowHeight() : 0;
const space = this.getRowHalfSpacing();
let h = this.fLine;
let current = adaptor.firstChild(this.labels);
for (let i = 0; i < this.numRows; i++) {
const row = this.childNodes[i];
if (row.node.isKind('mlabeledtr')) {
if (h) {
adaptor.insert(this.html('mjx-mtr', { style: { height: this.em(h) } }), current);
}
adaptor.setStyle(current, 'height', this.em((equal ? HD : H[i] + D[i]) + space[i] + space[i + 1]));
current = adaptor.next(current);
h = this.rLines[i];
}
else {
h +=
space[i] +
(equal ? HD : H[i] + D[i]) +
space[i + 1] +
this.rLines[i];
}
}
}
},
_a.kind = MmlMtable.prototype.kind,
_a.styles = {
'mjx-mtable': {
'vertical-align': '.25em',
'text-align': 'center',
position: 'relative',
'box-sizing': 'border-box',
'border-spacing': 0,
'border-collapse': 'collapse',
},
'mjx-mstyle[size="s"] mjx-mtable': {
'vertical-align': '.354em',
},
'mjx-labels': {
position: 'absolute',
left: 0,
top: 0,
},
'mjx-table': {
display: 'inline-block',
'vertical-align': '-.5ex',
'box-sizing': 'border-box',
},
'mjx-table > mjx-itable': {
'vertical-align': 'middle',
'text-align': 'left',
'box-sizing': 'border-box',
},
'mjx-labels > mjx-itable': {
position: 'absolute',
top: 0,
},
'mjx-mtable[justify="left"]': {
'text-align': 'left',
},
'mjx-mtable[justify="right"]': {
'text-align': 'right',
},
'mjx-mtable[justify="left"][side="left"]': {
'padding-right': '0 ! important',
},
'mjx-mtable[justify="left"][side="right"]': {
'padding-left': '0 ! important',
},
'mjx-mtable[justify="right"][side="left"]': {
'padding-right': '0 ! important',
},
'mjx-mtable[justify="right"][side="right"]': {
'padding-left': '0 ! important',
},
'mjx-mtable[align]': {
'vertical-align': 'baseline',
},
'mjx-mtable[align="top"] > mjx-table': {
'vertical-align': 'top',
},
'mjx-mtable[align="bottom"] > mjx-table': {
'vertical-align': 'bottom',
},
'mjx-mtable[side="right"] mjx-labels': {
'min-width': '100%',
},
},
_a;
})();
//# sourceMappingURL=mtable.js.map
;// ./mjs/output/common/Wrappers/mtr.js
function CommonMtrMixin(Base) {
return class CommonMtrMixin extends Base {
get numCells() {
return this.childNodes.length;
}
get labeled() {
return false;
}
get tableCells() {
return this.childNodes;
}
getChild(i) {
return this.childNodes[i];
}
getChildBBoxes() {
return this.childNodes.map((cell) => cell.getBBox());
}
stretchChildren(HD = null) {
const stretchy = [];
const children = this.labeled
? this.childNodes.slice(1)
: this.childNodes;
for (const mtd of children) {
const child = mtd.childNodes[0];
if (child.canStretch(DIRECTION.Vertical)) {
stretchy.push(child);
}
}
const count = stretchy.length;
const nodeCount = this.childNodes.length;
if (count && nodeCount > 1 && !HD) {
let H = 0;
let D = 0;
const all = count > 1 && count === nodeCount;
for (const mtd of children) {
const child = mtd.childNodes[0];
const noStretch = child.stretch.dir === DIRECTION.None;
if (all || noStretch) {
const { h, d } = child.getBBox(noStretch);
if (h > H) {
H = h;
}
if (d > D) {
D = d;
}
}
}
HD = [H, D];
}
if (HD) {
for (const child of stretchy) {
const rscale = child.coreRScale();
child.coreMO().getStretchedVariant(HD.map((x) => x * rscale));
}
}
}
get fixesPWidth() {
return false;
}
};
}
function CommonMlabeledtrMixin(Base) {
return class CommonMlabeledtrMixin extends Base {
get numCells() {
return Math.max(0, this.childNodes.length - 1);
}
get labeled() {
return true;
}
get tableCells() {
return this.childNodes.slice(1);
}
getChild(i) {
return this.childNodes[i + 1];
}
getChildBBoxes() {
return this.childNodes.slice(1).map((cell) => cell.getBBox());
}
};
}
//# sourceMappingURL=mtr.js.map
;// ./mjs/output/chtml/Wrappers/mtr.js
const ChtmlMtr = (function () {
var _a;
const Base = CommonMtrMixin(ChtmlWrapper);
return _a = class ChtmlMtr extends Base {
toCHTML(parents) {
super.toCHTML(parents);
const align = this.node.attributes.get('rowalign');
if (align !== 'baseline') {
this.adaptor.setAttribute(this.dom[0], 'rowalign', align);
}
}
},
_a.kind = MmlMtr.prototype.kind,
_a.styles = {
'mjx-mtr': {
display: 'table-row',
},
'mjx-mtr[rowalign="top"] > mjx-mtd': {
'vertical-align': 'top',
},
'mjx-mtr[rowalign="center"] > mjx-mtd': {
'vertical-align': 'middle',
},
'mjx-mtr[rowalign="bottom"] > mjx-mtd': {
'vertical-align': 'bottom',
},
'mjx-mtr[rowalign="baseline"] > mjx-mtd': {
'vertical-align': 'baseline',
},
'mjx-mtr[rowalign="axis"] > mjx-mtd': {
'vertical-align': '.25em',
},
},
_a;
})();
const ChtmlMlabeledtr = (function () {
var _a;
const Base = CommonMlabeledtrMixin(ChtmlMtr);
return _a = class ChtmlMlabeledtr extends Base {
toCHTML(parents) {
super.toCHTML(parents);
const child = this.adaptor.firstChild(this.dom[0]);
if (child) {
this.adaptor.remove(child);
const align = this.node.attributes.get('rowalign');
const attr = align !== 'baseline' && align !== 'axis' ? { rowalign: align } : {};
const row = this.html('mjx-mtr', attr, [child]);
this.adaptor.append(this.parent.labels, row);
}
}
markUsed() {
super.markUsed();
this.jax.wrapperUsage.add(ChtmlMtr.kind);
}
},
_a.kind = MmlMlabeledtr.prototype.kind,
_a.styles = {
'mjx-mlabeledtr': {
display: 'table-row',
},
'mjx-mlabeledtr[rowalign="top"] > mjx-mtd': {
'vertical-align': 'top',
},
'mjx-mlabeledtr[rowalign="center"] > mjx-mtd': {
'vertical-align': 'middle',
},
'mjx-mlabeledtr[rowalign="bottom"] > mjx-mtd': {
'vertical-align': 'bottom',
},
'mjx-mlabeledtr[rowalign="baseline"] > mjx-mtd': {
'vertical-align': 'baseline',
},
'mjx-mlabeledtr[rowalign="axis"] > mjx-mtd': {
'vertical-align': '.25em',
},
},
_a;
})();
//# sourceMappingURL=mtr.js.map
;// ./mjs/output/common/Wrappers/mtd.js
function CommonMtdMixin(Base) {
return class CommonMtdMixin extends Base {
get fixesPWidth() {
return false;
}
invalidateBBox() {
this.bboxComputed = false;
this.lineBBox = [];
}
getWrapWidth(_j) {
const table = this.parent.parent;
const row = this.parent;
const i = this.node.childPosition() - (row.labeled ? 1 : 0);
return (typeof table.cWidths[i] === 'number'
? table.cWidths[i]
: table.getTableData().W[i]);
}
getChildAlign(_i) {
return this.node.attributes.get('columnalign');
}
};
}
//# sourceMappingURL=mtd.js.map
;// ./mjs/output/chtml/Wrappers/mtd.js
const ChtmlMtd = (function () {
var _a;
const Base = CommonMtdMixin(ChtmlWrapper);
return _a = class ChtmlMtd extends Base {
toCHTML(parents) {
super.toCHTML(parents);
const ralign = this.node.attributes.get('rowalign');
const calign = this.node.attributes.get('columnalign');
const palign = this.parent.node.attributes.get('rowalign');
if (ralign !== palign) {
this.adaptor.setAttribute(this.dom[0], 'rowalign', ralign);
}
if (calign !== 'center' &&
(this.parent.kind !== 'mlabeledtr' ||
this !== this.parent.childNodes[0] ||
calign !== this.parent.parent.node.attributes.get('side'))) {
this.adaptor.setStyle(this.dom[0], 'textAlign', calign);
}
if (this.parent.parent.node.getProperty('useHeight')) {
this.adaptor.append(this.dom[0], this.html('mjx-tstrut'));
}
}
},
_a.kind = MmlMtd.prototype.kind,
_a.styles = {
'mjx-mtd': {
display: 'table-cell',
'text-align': 'center',
padding: '.215em .4em',
},
'mjx-mtd:first-child': {
'padding-left': 0,
},
'mjx-mtd:last-child': {
'padding-right': 0,
},
'mjx-mtable > * > mjx-itable > *:first-child > mjx-mtd': {
'padding-top': 0,
},
'mjx-mtable > * > mjx-itable > *:last-child > mjx-mtd': {
'padding-bottom': 0,
},
'mjx-tstrut': {
display: 'inline-block',
height: '1em',
'vertical-align': '-.25em',
},
'mjx-labels[align="left"] > mjx-mtr > mjx-mtd': {
'text-align': 'left',
},
'mjx-labels[align="right"] > mjx-mtr > mjx-mtd': {
'text-align': 'right',
},
'mjx-mtd[extra]': {
padding: 0,
},
'mjx-mtd[rowalign="top"]': {
'vertical-align': 'top',
},
'mjx-mtd[rowalign="center"]': {
'vertical-align': 'middle',
},
'mjx-mtd[rowalign="bottom"]': {
'vertical-align': 'bottom',
},
'mjx-mtd[rowalign="baseline"]': {
'vertical-align': 'baseline',
},
'mjx-mtd[rowalign="axis"]': {
'vertical-align': '.25em',
},
},
_a;
})();
//# sourceMappingURL=mtd.js.map
;// ./mjs/output/common/Wrappers/maction.js
const TooltipData = {
dx: '.2em',
dy: '.1em',
postDelay: 600,
clearDelay: 100,
hoverTimer: new Map(),
clearTimer: new Map(),
stopTimers: (node, data) => {
if (data.clearTimer.has(node)) {
clearTimeout(data.clearTimer.get(node));
data.clearTimer.delete(node);
}
if (data.hoverTimer.has(node)) {
clearTimeout(data.hoverTimer.get(node));
data.hoverTimer.delete(node);
}
}
};
function CommonMactionMixin(Base) {
return class CommonMactionMixin extends Base {
get selected() {
const selection = this.node.attributes.get('selection');
const i = Math.max(1, Math.min(this.childNodes.length, selection)) - 1;
return (this.childNodes[i] || this.wrap(this.node.selected));
}
getParameters() {
const offsets = this.node.attributes.get('data-offsets');
const [dx, dy] = split(offsets || '');
this.tipDx = this.length2em(dx || TooltipData.dx);
this.tipDy = this.length2em(dy || TooltipData.dy);
}
constructor(factory, node, parent = null) {
super(factory, node, parent);
const actions = this.constructor
.actions;
const action = this.node.attributes.get('actiontype');
const [handler, data] = actions.get(action) || [
((_node, _data) => { }),
{},
];
this.action = handler;
this.data = data;
this.getParameters();
}
computeBBox(bbox, recompute = false) {
bbox.updateFrom(this.selected.getOuterBBox());
this.selected.setChildPWidths(recompute);
}
get breakCount() {
return this.node.isEmbellished
? this.selected.coreMO().embellishedBreakCount
: this.selected.breakCount;
}
computeLineBBox(i) {
return this.getChildLineBBox(this.selected, i);
}
};
}
//# sourceMappingURL=maction.js.map
;// ./mjs/output/chtml/Wrappers/maction.js
const ChtmlMaction = (function () {
var _a;
const Base = CommonMactionMixin(ChtmlWrapper);
return _a = class ChtmlMaction extends Base {
setEventHandler(type, handler, dom = null) {
(dom ? [dom] : this.dom).forEach((node) => node.addEventListener(type, handler));
}
Em(m) {
return this.em(m);
}
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
const chtml = this.standardChtmlNodes(parents);
const child = this.selected;
child.toCHTML(chtml);
this.action(this, this.data);
}
},
_a.kind = MmlMaction.prototype.kind,
_a.styles = {
'mjx-maction': {
position: 'relative',
},
'mjx-maction > mjx-tool': {
display: 'none',
position: 'absolute',
bottom: 0,
right: 0,
width: 0,
height: 0,
'z-index': 500,
},
'mjx-tool > mjx-tip': {
display: 'inline-block',
'line-height': 0,
padding: '.2em',
border: '1px solid #888',
'background-color': '#F8F8F8',
color: 'black',
'box-shadow': '2px 2px 5px #AAAAAA',
},
'mjx-maction[toggle]': {
cursor: 'pointer',
},
'mjx-status': {
display: 'block',
position: 'fixed',
left: '1em',
bottom: '1em',
'min-width': '25%',
padding: '.2em .4em',
border: '1px solid #888',
'font-size': '90%',
'background-color': '#F8F8F8',
color: 'black',
},
},
_a.actions = new Map([
[
'toggle',
[
(node, _data) => {
node.dom.forEach((dom) => {
node.adaptor.setAttribute(dom, 'toggle', node.node.attributes.get('selection'));
});
const math = node.factory.jax.math;
const document = node.factory.jax.document;
const mml = node.node;
node.setEventHandler('click', (event) => {
if (!math.end.node) {
math.start.node = math.end.node = math.typesetRoot;
math.start.n = math.end.n = 0;
}
mml.nextToggleSelection();
math.rerender(document, mml.attributes.get('data-maction-id')
? STATE.ENRICHED
: STATE.RERENDER);
event.stopPropagation();
});
},
{},
],
],
[
'tooltip',
[
(node, data) => {
const tip = node.childNodes[1];
if (!tip)
return;
if (tip.node.isKind('mtext')) {
const text = tip.node.getText();
node.dom.forEach((dom) => node.adaptor.setAttribute(dom, 'title', text));
}
else {
const adaptor = node.adaptor;
for (const dom of node.dom) {
const tool = adaptor.append(dom, node.html('mjx-tool', {
style: {
bottom: node.Em(-node.tipDy),
right: node.Em(-node.tipDx),
},
}, [node.html('mjx-tip')]));
tip.toCHTML([adaptor.firstChild(tool)]);
node.setEventHandler('mouseover', (event) => {
data.stopTimers(dom, data);
const timeout = setTimeout(() => adaptor.setStyle(tool, 'display', 'block'), data.postDelay);
data.hoverTimer.set(dom, timeout);
event.stopPropagation();
}, dom);
node.setEventHandler('mouseout', (event) => {
data.stopTimers(dom, data);
const timeout = setTimeout(() => adaptor.setStyle(tool, 'display', ''), data.clearDelay);
data.clearTimer.set(dom, timeout);
event.stopPropagation();
}, dom);
}
}
},
TooltipData,
],
],
[
'statusline',
[
(node, data) => {
const tip = node.childNodes[1];
if (!tip)
return;
if (tip.node.isKind('mtext')) {
const adaptor = node.adaptor;
const text = tip.node.getText();
node.dom.forEach((dom) => adaptor.setAttribute(dom, 'statusline', text));
node.setEventHandler('mouseover', (event) => {
if (data.status === null) {
const body = adaptor.body(adaptor.document);
data.status = adaptor.append(body, node.html('mjx-status', {}, [node.text(text)]));
}
event.stopPropagation();
});
node.setEventHandler('mouseout', (event) => {
if (data.status) {
adaptor.remove(data.status);
data.status = null;
}
event.stopPropagation();
});
}
},
{
status: null,
},
],
],
]),
_a;
})();
//# sourceMappingURL=maction.js.map
;// ./mjs/output/common/Wrappers/mglyph.js
function CommonMglyphMixin(Base) {
return class CommonMglyphMixin extends Base {
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.getParameters();
}
getParameters() {
const { width, height, valign, src, index } = this.node.attributes.getList('width', 'height', 'valign', 'src', 'index');
if (src) {
this.width = width === 'auto' ? 1 : this.length2em(width);
this.height = height === 'auto' ? 1 : this.length2em(height);
this.valign = this.length2em(valign || '0');
}
else {
const text = String.fromCodePoint(parseInt(index));
const mmlFactory = this.node.factory;
this.charWrapper = this.wrap(mmlFactory.create('text').setText(text));
this.charWrapper.parent = this;
}
}
computeBBox(bbox, _recompute = false) {
if (this.charWrapper) {
bbox.updateFrom(this.charWrapper.getBBox());
}
else {
bbox.w = this.width;
bbox.h = this.height + this.valign;
bbox.d = -this.valign;
}
}
};
}
//# sourceMappingURL=mglyph.js.map
;// ./mjs/output/chtml/Wrappers/mglyph.js
const ChtmlMglyph = (function () {
var _a;
const Base = CommonMglyphMixin(ChtmlWrapper);
return _a = class ChtmlMglyph extends Base {
toCHTML(parents) {
const chtml = this.standardChtmlNodes(parents);
if (this.charWrapper) {
this.charWrapper.toCHTML(chtml);
return;
}
const { src, alt } = this.node.attributes.getList('src', 'alt');
const styles = {
width: this.em(this.width),
height: this.em(this.height),
};
if (this.valign) {
styles.verticalAlign = this.em(this.valign);
}
const img = this.html('img', {
src: src,
style: styles,
alt: alt,
title: alt,
});
this.adaptor.append(chtml[0], img);
}
},
_a.kind = MmlMglyph.prototype.kind,
_a.styles = {
'mjx-mglyph > img': {
display: 'inline-block',
border: 0,
padding: 0,
},
},
_a;
})();
//# sourceMappingURL=mglyph.js.map
;// ./mjs/output/common/Wrappers/semantics.js
function CommonSemanticsMixin(Base) {
return class CommonSemanticsMixin extends Base {
computeBBox(bbox, _recompute = false) {
if (this.childNodes.length) {
const { w, h, d } = this.childNodes[0].getBBox();
bbox.w = w;
bbox.h = h;
bbox.d = d;
}
}
get breakCount() {
return this.node.isEmbellished
? this.coreMO().embellishedBreakCount
: this.childNodes[0].breakCount;
}
};
}
//# sourceMappingURL=semantics.js.map
;// ./mjs/output/common/Wrappers/XmlNode.js
function CommonXmlNodeMixin(Base) {
class CommonXmlNodeMixin extends Base {
constructor(factory, node, parent = null) {
super(factory, node, parent);
this.rscale = this.getRScale();
}
computeBBox(bbox, _recompute = false) {
const xml = this.node.getXML();
const hdw = this.getHDW(xml, 'use', 'force');
const { h, d, w } = hdw ? this.splitHDW(hdw) : this.measureXmlNode(xml);
bbox.w = w;
bbox.h = h;
bbox.d = d;
}
getHTML() {
const adaptor = this.adaptor;
let html = adaptor.clone(this.node.getXML());
const styles = this.getFontStyles();
const hdw = this.getHDW(html, 'force');
if (hdw || this.jax.options.scale !== 1) {
html = this.addHDW(html, styles);
}
return this.html('mjx-html', { variant: this.parent.variant, style: styles }, [html]);
}
getHDW(xml, use, force = use) {
const option = this.jax.options.htmlHDW;
const hdw = this.adaptor.getAttribute(xml, 'data-mjx-hdw');
return hdw && (option === use || option === force) ? hdw : null;
}
splitHDW(hdw) {
const scale = 1 / this.metrics.scale;
const [h, d, w] = split(hdw).map((x) => this.length2em(x || '0') * scale);
return { h, d, w };
}
getFontStyles() {
var _a;
const adaptor = this.adaptor;
const metrics = this.metrics;
return {
'font-family': ((_a = this.parent.styles) === null || _a === void 0 ? void 0 : _a.get('font-family')) ||
metrics.family ||
adaptor.fontFamily(adaptor.parent(this.jax.math.start.node)) ||
'initial',
'font-size': this.jax.fixed(metrics.em * this.rscale) + 'px',
};
}
measureXmlNode(xml) {
const adaptor = this.adaptor;
const content = this.html('mjx-xml-block', { style: { display: 'inline-block' } }, [adaptor.clone(xml)]);
const base = this.html('mjx-baseline', {
style: { display: 'inline-block', width: 0, height: 0 },
});
const style = this.getFontStyles();
const node = this.html('mjx-measure-xml', { style }, [base, content]);
const container = this.jax.container;
adaptor.append(adaptor.parent(this.jax.math.start.node), container);
adaptor.append(container, node);
const metrics = this.metrics;
const em = metrics.em * metrics.scale * this.rscale;
const { left, right, bottom, top } = adaptor.nodeBBox(content);
const w = (right - left) / em;
const h = (adaptor.nodeBBox(base).top - top) / em;
const d = (bottom - top) / em - h;
adaptor.remove(container);
adaptor.remove(node);
return { w, h, d };
}
getStyles() { }
getScale() { }
getVariant() { }
}
CommonXmlNodeMixin.autoStyle = false;
CommonXmlNodeMixin.styles = {
'mjx-measure-xml': {
position: 'absolute',
left: 0,
top: 0,
display: 'inline-block',
'line-height': 'normal',
'white-space': 'normal',
},
'mjx-html': {
display: 'inline-block',
'line-height': 'normal',
'text-align': 'initial',
'white-space': 'initial',
},
'mjx-html-holder': {
display: 'block',
position: 'absolute',
top: 0,
left: 0,
bottom: 0,
right: 0,
},
};
return CommonXmlNodeMixin;
}
//# sourceMappingURL=XmlNode.js.map
;// ./mjs/output/chtml/Wrappers/semantics.js
const ChtmlSemantics = (function () {
var _a;
const Base = CommonSemanticsMixin(ChtmlWrapper);
return _a = class ChtmlSemantics extends Base {
toCHTML(parents) {
if (this.toEmbellishedCHTML(parents))
return;
const chtml = this.standardChtmlNodes(parents);
if (this.childNodes.length) {
this.childNodes[0].toCHTML(chtml);
}
}
},
_a.kind = MmlSemantics.prototype.kind,
_a;
})();
const ChtmlAnnotation = (function () {
var _a;
return _a = class ChtmlAnnotation extends ChtmlWrapper {
toCHTML(parents) {
super.toCHTML(parents);
}
computeBBox() {
return this.bbox;
}
},
_a.kind = MmlAnnotation.prototype.kind,
_a;
})();
const ChtmlAnnotationXML = (function () {
var _a;
return _a = class ChtmlAnnotationXML extends ChtmlWrapper {
},
_a.kind = MmlAnnotationXML.prototype.kind,
_a.styles = {
'mjx-annotation-xml': {
'font-family': 'initial',
'line-height': 'normal',
},
},
_a;
})();
const ChtmlXmlNode = (function () {
var _a;
const Base = CommonXmlNodeMixin(ChtmlWrapper);
return _a = class ChtmlXmlNode extends Base {
toCHTML(parents) {
this.markUsed();
this.dom = [this.adaptor.append(parents[0], this.getHTML())];
}
addHDW(html, styles) {
const scale = this.jax.options.scale;
const { h, d, w } = this.bbox;
const rscale = scale * this.metrics.scale;
styles.width = this.em(w * rscale);
styles.height = this.em((h + d) * rscale);
styles['vertical-align'] = this.em(-d * rscale);
styles.position = 'relative';
return this.html('mjx-html-holder', {
style: {
transform: `scale(${this.jax.fixed(scale)})`,
'transform-origin': 'top left',
},
}, [html]);
}
},
_a.kind = XMLNode.prototype.kind,
_a;
})();
//# sourceMappingURL=semantics.js.map
;// ./mjs/output/common/Wrappers/TeXAtom.js
function CommonTeXAtomMixin(Base) {
return class CommonTeXAtomMixin extends Base {
computeBBox(bbox, recompute = false) {
super.computeBBox(bbox, recompute);
if (this.childNodes[0] && this.childNodes[0].bbox.ic) {
bbox.ic = this.childNodes[0].bbox.ic;
}
}
};
}
//# sourceMappingURL=TeXAtom.js.map
;// ./mjs/output/chtml/Wrappers/TeXAtom.js
const ChtmlTeXAtom = (function () {
var _a;
const Base = CommonTeXAtomMixin(ChtmlWrapper);
return _a = class ChtmlTeXAtom extends Base {
toCHTML(parents) {
super.toCHTML(parents);
this.dom.forEach((dom) => this.adaptor.setAttribute(dom, 'texclass', TEXCLASSNAMES[this.node.texClass]));
}
},
_a.kind = TeXAtom.prototype.kind,
_a;
})();
//# sourceMappingURL=TeXAtom.js.map
;// ./mjs/output/common/Wrappers/TextNode.js
function CommonTextNodeMixin(Base) {
return class CommonTextNodeMixin extends Base {
remappedText(text, variant) {
const c = this.parent.stretch.c;
return c ? [c] : this.parent.remapChars(this.unicodeChars(text, variant));
}
computeBBox(bbox, _recompute = false) {
const variant = this.parent.variant;
const text = this.node.getText();
if (variant === '-explicitFont') {
const font = this.jax.getFontData(this.parent.styles);
const { w, h, d } = this.jax.measureText(text, variant, font);
bbox.h = h;
bbox.d = d;
bbox.w = w;
}
else {
const chars = this.remappedText(text, variant);
let utext = '';
bbox.empty();
for (let i = 0; i < chars.length; i++) {
const [h, d, w, data] = this.getVariantChar(variant, chars[i]);
if (data.unknown) {
utext += String.fromCodePoint(chars[i]);
}
else {
utext = this.addUtextBBox(bbox, utext, variant);
this.updateBBox(bbox, h, d, w);
bbox.ic = data.ic || 0;
bbox.sk = data.sk || 0;
bbox.dx = data.dx || 0;
if (!data.oc || i < chars.length - 1)
continue;
const children = this.parent.childNodes;
if (this.node !== children[children.length - 1].node)
continue;
const parent = this.parent.parent.node;
let next = parent.isKind('mrow') || parent.isInferred
? parent.childNodes[parent.childIndex(this.parent.node) + 1]
: null;
if ((next === null || next === void 0 ? void 0 : next.isKind('mo')) && next.getText() === '\u2062') {
next = parent.childNodes[parent.childIndex(next) + 1];
}
if (!next || next.attributes.get('mathvariant') !== variant) {
bbox.ic = data.oc;
}
else {
bbox.oc = data.oc;
}
}
}
this.addUtextBBox(bbox, utext, variant);
if (chars.length > 1) {
bbox.sk = 0;
}
bbox.clean();
}
}
addUtextBBox(bbox, utext, variant) {
if (utext) {
const { h, d, w } = this.jax.measureText(utext, variant);
this.updateBBox(bbox, h, d, w);
}
return '';
}
updateBBox(bbox, h, d, w) {
bbox.w += w;
if (h > bbox.h) {
bbox.h = h;
}
if (d > bbox.d) {
bbox.d = d;
}
}
getStyles() { }
getVariant() { }
getScale() { }
getSpace() { }
};
}
//# sourceMappingURL=TextNode.js.map
;// ./mjs/output/chtml/Wrappers/TextNode.js
const ChtmlTextNode = (function () {
var _a;
const Base = CommonTextNodeMixin(ChtmlWrapper);
return _a = class ChtmlTextNode extends Base {
toCHTML(parents) {
this.markUsed();
const parent = parents[0];
const adaptor = this.adaptor;
const variant = this.parent.variant;
const text = this.node.getText();
if (text.length === 0)
return;
const bbox = this.getBBox();
if (variant === '-explicitFont') {
adaptor.append(parent, this.jax.unknownText(text, variant, bbox.w));
}
else {
let utext = '';
const chars = this.remappedText(text, variant);
const H = chars.length > 1 ? this.em(this.parent.getBBox().h) : '';
const m = chars.length;
for (let i = 0; i < m; i++) {
const n = chars[i];
const data = this.getVariantChar(variant, n)[3];
if (data.unknown) {
utext += String.fromCodePoint(n);
}
else {
utext = this.addUtext(utext, variant, parent);
const font = data.ff || (data.f ? `${this.font.cssFontPrefix}-${data.f}` : '');
const node = adaptor.append(parent, this.html('mjx-c', { class: this.char(n) + (font ? ' ' + font : '') }, [this.text(data.c || String.fromCodePoint(n))]));
if (i < m - 1 || bbox.oc) {
adaptor.setAttribute(node, 'noic', 'true');
}
if (H) {
adaptor.setStyle(node, 'padding-top', H);
}
this.font.charUsage.add([variant, n]);
}
}
this.addUtext(utext, variant, parent);
}
}
addUtext(utext, variant, parent) {
if (utext) {
this.adaptor.append(parent, this.jax.unknownText(utext, variant));
}
return '';
}
},
_a.kind = TextNode.prototype.kind,
_a.autoStyle = false,
_a.styles = {
'mjx-c': {
display: 'inline-block',
width: 0,
'text-align': 'right',
},
'mjx-utext': {
display: 'inline-block',
padding: '.75em 0 .2em 0',
},
},
_a;
})();
//# sourceMappingURL=TextNode.js.map
;// ./mjs/output/chtml/Wrappers/HtmlNode.js
const ChtmlHtmlNode = (function () {
var _a;
return _a = class ChtmlHtmlNode extends ChtmlXmlNode {
},
_a.kind = HtmlNode.prototype.kind,
_a;
})();
//# sourceMappingURL=HtmlNode.js.map
;// ./mjs/output/chtml/Wrappers.js
const ChtmlWrappers = {
[ChtmlMath.kind]: ChtmlMath,
[ChtmlMrow.kind]: ChtmlMrow,
[ChtmlInferredMrow.kind]: ChtmlInferredMrow,
[ChtmlMi.kind]: ChtmlMi,
[ChtmlMo.kind]: ChtmlMo,
[ChtmlMn.kind]: ChtmlMn,
[ChtmlMs.kind]: ChtmlMs,
[ChtmlMtext.kind]: ChtmlMtext,
[ChtmlMspace.kind]: ChtmlMspace,
[ChtmlMpadded.kind]: ChtmlMpadded,
[ChtmlMenclose.kind]: ChtmlMenclose,
[ChtmlMfrac.kind]: ChtmlMfrac,
[ChtmlMsqrt.kind]: ChtmlMsqrt,
[ChtmlMroot.kind]: ChtmlMroot,
[ChtmlMsub.kind]: ChtmlMsub,
[ChtmlMsup.kind]: ChtmlMsup,
[ChtmlMsubsup.kind]: ChtmlMsubsup,
[ChtmlMunder.kind]: ChtmlMunder,
[ChtmlMover.kind]: ChtmlMover,
[ChtmlMunderover.kind]: ChtmlMunderover,
[ChtmlMmultiscripts.kind]: ChtmlMmultiscripts,
[ChtmlMfenced.kind]: ChtmlMfenced,
[ChtmlMtable.kind]: ChtmlMtable,
[ChtmlMtr.kind]: ChtmlMtr,
[ChtmlMlabeledtr.kind]: ChtmlMlabeledtr,
[ChtmlMtd.kind]: ChtmlMtd,
[ChtmlMaction.kind]: ChtmlMaction,
[ChtmlMglyph.kind]: ChtmlMglyph,
[ChtmlSemantics.kind]: ChtmlSemantics,
[ChtmlAnnotation.kind]: ChtmlAnnotation,
[ChtmlAnnotationXML.kind]: ChtmlAnnotationXML,
[ChtmlXmlNode.kind]: ChtmlXmlNode,
[ChtmlTeXAtom.kind]: ChtmlTeXAtom,
[ChtmlTextNode.kind]: ChtmlTextNode,
[ChtmlHtmlNode.kind]: ChtmlHtmlNode,
[ChtmlWrapper.kind]: ChtmlWrapper,
};
//# sourceMappingURL=Wrappers.js.map
;// ./mjs/output/chtml/WrapperFactory.js
class ChtmlWrapperFactory extends CommonWrapperFactory {
}
ChtmlWrapperFactory.defaultNodes = ChtmlWrappers;
//# sourceMappingURL=WrapperFactory.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/common.js
function CommonMathJaxNewcmFontMixin(Base) {
var _a;
return _a = class extends Base {
},
_a.defaultVariants = [
...FontData.defaultVariants,
['-size3', 'normal'],
['-size4', 'normal'],
['-size5', 'normal'],
['-size6', 'normal'],
['-size7', 'normal'],
['-lf-tp', 'normal'],
['-rt-bt', 'normal'],
['-ex-md', 'normal'],
['-bbold', 'normal'],
['-upsmall', 'normal'],
['-uplarge', 'normal']
],
_a.VariantSmp = Object.assign(Object.assign({}, FontData.VariantSmp), { '-bbold': [120120, 120146, , , 120792] }),
_a.defaultCssFonts = Object.assign(Object.assign({}, FontData.defaultCssFonts), { '-size3': ['serif', false, false], '-size4': ['serif', false, false], '-size5': ['serif', false, false], '-size6': ['serif', false, false], '-size7': ['serif', false, false], '-lf-tp': ['serif', false, false], '-rt-bt': ['serif', false, false], '-ex-md': ['serif', false, false], '-bbold': ['serif', false, false], '-upsmall': ['serif', false, false], '-uplarge': ['serif', false, false] }),
_a.defaultAccentMap = {
0x005E: '\u02C6',
0x007E: '\u02DC',
0x0300: '\u02CB',
0x0301: '\u02CA',
0x0302: '\u02C6',
0x0303: '\u02DC',
0x0304: '\u02C9',
0x0306: '\u02D8',
0x0307: '\u02D9',
0x0308: '\u00A8',
0x030A: '\u02DA',
0x030C: '\u02C7',
0x2192: '\u20D7'
},
_a.defaultParams = Object.assign(Object.assign({}, FontData.defaultParams), { x_height: .442 }),
_a.defaultSizeVariants = [
'normal', '-smallop', '-largeop', '-size3', '-size4', '-size5', '-size6', '-size7'
],
_a.defaultStretchVariants = [
'normal', '-ex-md', '-size3', '-lf-tp', '-rt-bt'
],
_a;
}
//# sourceMappingURL=common.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/normal.js
const normal = {
0x20: [0, 0, .332],
0x21: [.716, 0, .278],
0x22: [.705, -.423, .374],
0x23: [.694, .194, .833],
0x24: [.75, .056, .5],
0x25: [.75, .056, .833],
0x26: [.716, .022, .778],
0x27: [.705, -.423, .278],
0x28: [.748, .248, .389],
0x29: [.748, .248, .389],
0x2A: [.75, -.32, .5],
0x2B: [.583, .083, .778],
0x2C: [.106, .193, .278],
0x2D: [.245, -.187, .333],
0x2E: [.106, 0, .278],
0x2F: [.75, .25, .5],
0x30: [.666, .022, .5],
0x31: [.666, 0, .5],
0x32: [.666, 0, .5, { sk: -.01 }],
0x33: [.666, .022, .5],
0x34: [.677, 0, .5, { sk: .103 }],
0x35: [.666, .022, .5],
0x36: [.666, .022, .5, { sk: .068 }],
0x37: [.676, .022, .5, { sk: -.147 }],
0x38: [.666, .022, .5, { sk: .011 }],
0x39: [.666, .022, .5],
0x3A: [.431, 0, .278],
0x3B: [.431, .193, .278],
0x3C: [.547, .052, .778],
0x3D: [.367, -.133, .778],
0x3E: [.547, .047, .778],
0x3F: [.705, 0, .472],
0x40: [.705, .011, .778],
0x41: [.716, 0, .75],
0x42: [.683, 0, .708, { sk: -.014 }],
0x43: [.705, .022, .722, { sk: .044 }],
0x44: [.683, 0, .764],
0x45: [.68, 0, .681, { sk: .013 }],
0x46: [.68, 0, .653],
0x47: [.705, .022, .785, { sk: .013 }],
0x48: [.683, 0, .75],
0x49: [.683, 0, .361],
0x4A: [.683, .022, .514, { sk: .06 }],
0x4B: [.683, 0, .778, { sk: -.011 }],
0x4C: [.683, 0, .625, { sk: -.119 }],
0x4D: [.683, 0, .917],
0x4E: [.683, 0, .75],
0x4F: [.705, .022, .778],
0x50: [.683, 0, .681],
0x51: [.705, .194, .778],
0x52: [.683, .022, .736, { sk: -.026 }],
0x53: [.705, .022, .556],
0x54: [.677, 0, .722],
0x55: [.683, .022, .75, { sk: .02 }],
0x56: [.683, .022, .75],
0x57: [.683, .022, 1.028],
0x58: [.683, 0, .75],
0x59: [.683, 0, .75],
0x5A: [.683, 0, .611, { sk: .011 }],
0x5B: [.75, .25, .278],
0x5C: [.75, .25, .5],
0x5D: [.75, .25, .278],
0x5E: [.745, -.561, .556, { ic: .006 }],
0x5F: [-.1, .14, .333],
0x60: [.698, -.509, .5, { sk: -.031 }],
0x61: [.448, .011, .5, { sk: -.036 }],
0x62: [.694, .011, .556, { sk: -.142 }],
0x63: [.448, .011, .444, { sk: .027 }],
0x64: [.694, .011, .556, { sk: .109 }],
0x65: [.448, .011, .444, { sk: .014 }],
0x66: [.705, 0, .306, { ic: .051, sk: .043 }],
0x67: [.453, .206, .5, { sk: -.024 }],
0x68: [.694, 0, .556, { sk: -.132 }],
0x69: [.657, 0, .278],
0x6A: [.657, .205, .306],
0x6B: [.694, 0, .528, { sk: -.128 }],
0x6C: [.694, 0, .278],
0x6D: [.442, 0, .833],
0x6E: [.442, 0, .556, { sk: .013 }],
0x6F: [.448, .011, .5],
0x70: [.442, .194, .556, { sk: .032 }],
0x71: [.442, .194, .528],
0x72: [.442, 0, .392, { sk: -.015 }],
0x73: [.448, .011, .394],
0x74: [.615, .011, .389, { sk: -.034 }],
0x75: [.442, .011, .556, { sk: -.017 }],
0x76: [.431, .011, .528, { sk: .014 }],
0x77: [.431, .011, .722],
0x78: [.431, 0, .528],
0x79: [.431, .205, .528],
0x7A: [.431, 0, .444],
0x7B: [.75, .25, .5],
0x7C: [.75, .25, .278],
0x7D: [.75, .25, .5],
0x7E: [.309, -.191, .556, { ic: .001 }],
0xA0: [0, 0, .332],
0xA3: [.683, .035, .75],
0xA5: [.683, 0, .75],
0xA7: [.705, .205, .444],
0xA8: [.652, -.557, .5],
0xAC: [.367, -.133, .667],
0xAF: [.62, -.589, .5],
0xB0: [.683, -.406, .375],
0xB1: [.583, .084, .778],
0xB4: [.698, -.509, .5, { sk: .031 }],
0xB5: [.441, .194, .556],
0xB6: [.694, .194, .611],
0xB7: [.303, -.197, .278],
0xD7: [.491, -.009, .778],
0xF0: [.696, .011, .5],
0xF7: [.504, .004, .778],
0x131: [.442, 0, .278],
0x237: [.442, .205, .306],
0x2C6: [.694, -.515, .5],
0x2C7: [.693, -.514, .5],
0x2C9: [.62, -.589, .5],
0x2CA: [.698, -.509, .5, { sk: .031 }],
0x2CB: [.698, -.509, .5, { sk: -.031 }],
0x2CD: [-.193, .233, .333, { ic: .018 }],
0x2D8: [.69, -.518, .5],
0x2D9: [.657, -.551, .278],
0x2DA: [.705, -.529, .75],
0x2DC: [.653, -.556, .5],
0x2FF: [-.025, .275, 0, { dx: .274 }],
0x300: [.733, -.544, 0, { dx: .294 }],
0x301: [.733, -.544, 0, { dx: .234 }],
0x302: [.694, -.515, .5],
0x303: [.653, -.556, .5, { sk: .016 }],
0x304: [.64, -.609, 0, { dx: .264 }],
0x305: [.67, -.63, 0, { dx: .264 }],
0x306: [.73, -.592, 0, { dx: .264 }],
0x307: [.677, -.571, 0, { dx: .265 }],
0x308: [.672, -.577, 0, { dx: .264 }],
0x30A: [.725, -.549, 0, { dx: .264 }],
0x30C: [.726, -.577, 0, { dx: .264 }],
0x338: [.75, .25, 0, { sk: -.263 }],
0x391: [.716, 0, .75],
0x392: [.683, 0, .708, { sk: -.068 }],
0x393: [.68, 0, .625, { sk: -.015 }],
0x394: [.716, 0, .833],
0x395: [.68, 0, .681, { sk: -.022 }],
0x396: [.683, 0, .611, { sk: .011 }],
0x397: [.683, 0, .75],
0x398: [.705, .022, .778],
0x399: [.683, 0, .361],
0x39A: [.683, 0, .778, { sk: -.011 }],
0x39B: [.716, 0, .694],
0x39C: [.683, 0, .917],
0x39D: [.683, 0, .75],
0x39E: [.677, 0, .667],
0x39F: [.705, .022, .778],
0x3A0: [.68, 0, .75],
0x3A1: [.683, 0, .681, { sk: -.058 }],
0x3A3: [.683, 0, .722, { sk: -.011 }],
0x3A4: [.677, 0, .722],
0x3A5: [.705, 0, .778],
0x3A6: [.683, 0, .722],
0x3A7: [.683, 0, .75, { sk: -.014 }],
0x3A8: [.683, 0, .778],
0x3A9: [.705, 0, .722],
0x3B1: [.442, .011, .641, { ic: .006, sk: .031 }],
0x3B2: [.706, .194, .558],
0x3B3: [.442, .215, .586],
0x3B4: [.712, .011, .474],
0x3B5: [.453, .022, .535, { sk: -.024 }],
0x3B6: [.697, .205, .53, { sk: -.041 }],
0x3B7: [.442, .216, .53, { sk: -.047 }],
0x3B8: [.705, .011, .488],
0x3B9: [.442, .011, .308, { sk: -.056 }],
0x3BA: [.442, .011, .53, { sk: -.018 }],
0x3BB: [.694, .013, .537, { ic: .029, sk: -.204 }],
0x3BC: [.442, .216, .53, { sk: -.028 }],
0x3BD: [.442, 0, .502, { sk: -.042 }],
0x3BE: [.697, .205, .53, { sk: -.069 }],
0x3BF: [.448, .011, .5],
0x3C0: [.431, .011, .586, { sk: -.014 }],
0x3C1: [.442, .216, .488],
0x3C2: [.442, .108, .474],
0x3C3: [.431, .011, .599],
0x3C4: [.431, .012, .53, { sk: -.033 }],
0x3C5: [.442, .011, .53, { sk: -.014 }],
0x3C6: [.442, .218, .641, { sk: -.018 }],
0x3C7: [.442, .205, .641, { ic: .004, sk: -.057 }],
0x3C8: [.694, .205, .641, { sk: .028 }],
0x3C9: [.442, .011, .641],
0x3D1: [.705, .011, .53, { sk: .026 }],
0x3D2: [.715, 0, .778],
0x3D5: [.694, .205, .641],
0x3D6: [.431, .011, .836, { sk: -.014 }],
0x3F0: [.442, .012, .624, { sk: -.015 }],
0x3F1: [.442, .194, .488],
0x3F4: [.705, .022, .778],
0x3F5: [.431, .011, .414, { ic: .015, sk: .024 }],
0x3F6: [.431, .011, .414, { ic: .058 }],
0x2000: [0, 0, .5],
0x2001: [0, 0, 1],
0x2002: [0, 0, .5],
0x2003: [0, 0, 1],
0x2004: [0, 0, .333],
0x2005: [0, 0, .25],
0x2006: [0, 0, .167],
0x2007: [0, 0, .5],
0x2008: [0, 0, .25],
0x2009: [0, 0, .2],
0x200A: [0, 0, .1],
0x200B: [0, 0, 0],
0x2010: [.245, -.187, .333],
0x2011: [.245, -.187, .333],
0x2012: [.342, -.302, .68],
0x2013: [.277, -.255, .5],
0x2014: [.277, -.255, 1],
0x2015: [.27, -.23, 1.152],
0x2016: [.75, .25, .398],
0x2018: [.693, -.394, .278],
0x2019: [.694, -.395, .278],
0x201C: [.693, -.394, .472],
0x201D: [.694, -.395, .472],
0x2020: [.705, .216, .444],
0x2021: [.705, .205, .444],
0x2026: [.106, 0, .837],
0x2027: [.266, -.16, .276],
0x202F: [0, 0, .2],
0x2032: [.748, -.43, .311],
0x2033: [.748, -.43, .511],
0x2034: [.748, -.43, .711],
0x2035: [.748, -.43, .311],
0x2036: [.748, -.43, .511],
0x2037: [.748, -.43, .711],
0x2044: [.75, .25, .5],
0x2057: [.748, -.43, .911],
0x205F: [0, 0, .222],
0x2060: [0, 0, 0],
0x2061: [0, 0, 0],
0x2062: [0, 0, 0],
0x2063: [0, 0, 0],
0x2064: [0, 0, 0],
0x20A4: [.683, .035, .75],
0x20AC: [.705, .022, .627],
0x20D0: [.711, -.601, 0, { dx: .264 }],
0x20D1: [.711, -.601, 0, { dx: .264 }],
0x20D2: [.75, .25, 0, { sk: -.264 }],
0x20D6: [.711, -.521, 0, { dx: .264 }],
0x20D7: [.711, -.521, 0, { dx: .264 }],
0x20DB: [.696, -.604, 0, { dx: .264 }],
0x20DC: [.696, -.604, 0, { dx: .264 }],
0x20E1: [.711, -.521, 0, { dx: .264 }],
0x20EC: [-.171, .281, 0, { dx: .264 }],
0x20ED: [-.171, .281, 0, { dx: .264 }],
0x20EE: [-.091, .281, 0, { dx: .264 }],
0x20EF: [-.091, .281, 0, { dx: .264 }],
0x2107: [.705, .022, .53],
0x210E: [.694, .011, .576, { sk: -.033 }],
0x210F: [.694, .011, .576],
0x2126: [.705, 0, .722],
0x2127: [.684, .021, .722],
0x212A: [.683, 0, .778, { sk: -.011 }],
0x212B: [.892, 0, .75],
0x2132: [.68, 0, .653],
0x2135: [.693, 0, .611],
0x2136: [.723, .04, .604],
0x2137: [.721, .03, .528],
0x2138: [.71, .035, .574],
0x2190: [.51, .01, 1],
0x2191: [.679, .203, .5],
0x2192: [.51, .01, 1],
0x2193: [.703, .179, .5],
0x2194: [.51, .01, 1],
0x2195: [.757, .257, .5],
0x2196: [.714, .203, 1],
0x2197: [.714, .203, 1],
0x2198: [.703, .214, 1],
0x2199: [.703, .214, 1],
0x219A: [.51, .01, .997],
0x219B: [.51, .01, .997],
0x219E: [.51, .01, 1.017],
0x21A0: [.51, .01, 1.017],
0x21A2: [.51, .01, 1.192],
0x21A3: [.51, .01, 1.192],
0x21A4: [.51, .011, .977],
0x21A6: [.51, .011, .977],
0x21A9: [.55, .01, .997],
0x21AA: [.55, .01, .997],
0x21AB: [.55, .05, .997],
0x21AC: [.55, .05, .997],
0x21AE: [.51, .01, .996],
0x21B6: [.562, -.229, .98],
0x21B7: [.562, -.229, .98],
0x21BA: [.68, .06, .771],
0x21BB: [.68, .06, .771],
0x21BC: [.503, -.23, 1],
0x21BD: [.27, .003, 1.012],
0x21BE: [.697, .203, .441],
0x21BF: [.697, .203, .441],
0x21C0: [.503, -.23, 1],
0x21C1: [.27, .003, 1.012],
0x21C2: [.703, .197, .441],
0x21C3: [.703, .197, .441],
0x21C4: [.672, .172, 1.018],
0x21C5: [.703, .203, .896],
0x21C6: [.672, .172, 1.018],
0x21C7: [.75, .25, .997],
0x21C8: [.679, .203, .992],
0x21C9: [.75, .25, .997],
0x21CA: [.703, .179, .992],
0x21CB: [.6, .1, 1.018],
0x21CC: [.6, .1, 1.018],
0x21CD: [.52, .02, .991],
0x21CE: [.52, .02, 1.068],
0x21CF: [.52, .02, .991],
0x21D0: [.52, .02, 1],
0x21D1: [.676, .203, .611],
0x21D2: [.52, .02, 1],
0x21D3: [.703, .176, .611],
0x21D4: [.52, .02, 1],
0x21D5: [.728, .228, .611],
0x21DA: [.617, .117, 1.015],
0x21DB: [.617, .117, 1.015],
0x21E0: [.51, .01, 1],
0x21E1: [.692, .192, .684],
0x21E2: [.51, .01, 1],
0x21E3: [.692, .192, .684],
0x21E4: [.51, .01, 1.018],
0x21E5: [.51, .01, 1.018],
0x21F5: [.703, .203, .896],
0x21F6: [.99, .49, .997],
0x2200: [.688, -.002, .666],
0x2201: [.684, 0, .556],
0x2202: [.716, .022, .586],
0x2203: [.684, 0, .556],
0x2204: [.789, .105, .556],
0x2205: [.772, .078, .5],
0x2206: [.716, 0, .833],
0x2207: [.683, .033, .833],
0x2208: [.543, .043, .667],
0x2209: [.73, .23, .667],
0x220B: [.543, .043, .667],
0x220C: [.73, .23, .667],
0x220E: [.554, 0, .666],
0x220F: [.75, .25, .944],
0x2210: [.75, .25, .944],
0x2211: [.75, .25, 1.056],
0x2212: [.583, .083, .778],
0x2213: [.584, .083, .778],
0x2214: [.785, .083, .778],
0x2215: [.603, .103, .568],
0x2216: [.603, .103, .568],
0x2217: [.462, -.039, .5],
0x2218: [.4, -.1, .412],
0x2219: [.445, -.055, .5],
0x221A: [.04, .96, .833, { ic: .02 }],
0x221D: [.442, .011, .778],
0x221E: [.442, .011, 1],
0x221F: [.679, -.013, .778],
0x2220: [.724, -.013, .778],
0x2221: [.724, .109, .778],
0x2222: [.562, .062, .778],
0x2223: [.75, .25, .278],
0x2224: [.75, .25, .388],
0x2225: [.75, .25, .5],
0x2226: [.75, .25, .556],
0x2227: [.602, .02, .667],
0x2228: [.601, .02, .667],
0x2229: [.604, .02, .667],
0x222A: [.604, .02, .667],
0x222B: [.805, .306, .545, { ic: 0.12 }],
0x222C: [.805, .306, .915, { ic: 0.12 }],
0x222D: [.805, .306, 1.285, { ic: 0.12 }],
0x222E: [.805, .306, .615, { ic: 0.05 }],
0x222F: [.805, .306, .985, { ic: 0.05 }],
0x2230: [.805, .306, 1.355, { ic: 0.05 }],
0x2231: [.805, .306, .675, { ic: 0.02 }],
0x2232: [.805, .306, .662, { ic: 0.02 }],
0x2233: [.805, .306, .662, { ic: 0.02 }],
0x2234: [.416, -.084, .516],
0x2235: [.416, -.084, .516],
0x2236: [.422, -.078, .278],
0x2237: [.422, -.078, .516],
0x2238: [.504, -.23, .778],
0x2239: [.422, -.078, .906],
0x223C: [.366, -.134, .773],
0x223D: [.366, -.134, .773],
0x223E: [.466, -.034, .901],
0x223F: [.492, -.008, .778],
0x2240: [.583, .083, .28],
0x2241: [.482, -.018, .773],
0x2242: [.38, -.032, .778],
0x2243: [.468, -.12, .778],
0x2244: [.603, .103, .778],
0x2245: [.552, -.036, .778],
0x2246: [.614, .048, .778],
0x2247: [.603, .103, .778],
0x2248: [.457, -.043, .773],
0x2249: [.603, .103, .773],
0x224A: [.541, -.036, .778],
0x224B: [.541, .041, .773],
0x224C: [.541, -.036, .778],
0x224D: [.498, -.002, .778],
0x2250: [.601, -.133, .778],
0x2254: [.422, -.078, .906],
0x2255: [.422, -.078, .906],
0x225D: [.793, -.133, .778],
0x225F: [.803, -.133, .778],
0x2260: [.73, .23, .778],
0x2261: [.464, -.036, .778],
0x2262: [.73, .23, .778],
0x2263: [.561, .061, .778],
0x2264: [.631, .119, .778],
0x2265: [.631, .119, .778],
0x2266: [.715, .203, .778],
0x2267: [.715, .203, .778],
0x2268: [.715, .287, .778],
0x2269: [.715, .287, .778],
0x226A: [.554, .047, 1],
0x226B: [.546, .054, 1],
0x226C: [.77, .27, .434],
0x226D: [.73, .23, .778],
0x226E: [.73, .23, .778],
0x226F: [.73, .23, .778],
0x2270: [.73, .23, .778],
0x2271: [.73, .23, .778],
0x2272: [.636, .125, .776],
0x2273: [.636, .125, .776],
0x2274: [.691, .191, .776],
0x2275: [.691, .191, .776],
0x2276: [.741, .241, .778],
0x2277: [.741, .241, .778],
0x2278: [.776, .276, .778],
0x2279: [.776, .276, .778],
0x227A: [.547, .047, .778],
0x227B: [.547, .047, .778],
0x227C: [.639, .139, .738],
0x227D: [.639, .139, .738],
0x227E: [.682, .17, .773],
0x227F: [.682, .17, .773],
0x2280: [.73, .23, .778],
0x2281: [.73, .23, .778],
0x2282: [.543, .043, .778],
0x2283: [.543, .043, .778],
0x2284: [.73, .23, .778],
0x2285: [.73, .23, .778],
0x2286: [.627, .127, .778],
0x2287: [.627, .127, .778],
0x2288: [.73, .23, .778],
0x2289: [.73, .23, .778],
0x228A: [.627, .211, .778],
0x228B: [.627, .211, .778],
0x228D: [.604, .02, .667],
0x228E: [.604, .02, .667],
0x228F: [.543, .043, .778],
0x2290: [.543, .043, .778],
0x2291: [.627, .127, .778],
0x2292: [.627, .127, .778],
0x2293: [.604, .02, .667],
0x2294: [.604, .02, .667],
0x2295: [.591, .093, .782],
0x2296: [.591, .093, .782],
0x2297: [.591, .093, .782],
0x2298: [.591, .093, .782],
0x2299: [.591, .093, .782],
0x229A: [.591, .093, .782],
0x229B: [.591, .093, .782],
0x229C: [.591, .093, .782],
0x229D: [.591, .093, .782],
0x229E: [.583, .083, .778],
0x229F: [.583, .083, .778],
0x22A0: [.583, .083, .778],
0x22A1: [.583, .083, .778],
0x22A2: [.684, 0, .611],
0x22A3: [.684, 0, .611],
0x22A4: [.664, .02, .778],
0x22A5: [.684, 0, .778],
0x22A6: [.684, 0, .445],
0x22A7: [.684, 0, .445],
0x22A8: [.684, 0, .612],
0x22A9: [.684, 0, .673],
0x22AA: [.684, 0, .841],
0x22AB: [.684, 0, .653],
0x22AC: [.684, 0, .565],
0x22AD: [.684, 0, .732],
0x22AE: [.684, 0, .793],
0x22AF: [.684, 0, .773],
0x22B0: [.563, .063, .778],
0x22B1: [.563, .063, .778],
0x22B2: [.547, .047, .738],
0x22B3: [.547, .047, .738],
0x22B4: [.605, .105, .738],
0x22B5: [.605, .105, .738],
0x22BA: [.664, .02, .778],
0x22C0: [.78, .282, .833],
0x22C1: [.783, .28, .833],
0x22C2: [.772, .25, .833],
0x22C3: [.75, .272, .833],
0x22C4: [.48, -.02, .5],
0x22C5: [.303, -.197, .278],
0x22C6: [.486, -.008, .5],
0x22C8: [.505, .005, .623],
0x22C9: [.505, .005, .623],
0x22CA: [.505, .005, .623],
0x22CB: [.505, .005, .623],
0x22CC: [.505, .005, .623],
0x22CD: [.468, -.12, .778],
0x22CE: [.584, .02, .733],
0x22CF: [.584, .02, .733],
0x22E2: [.73, .23, .778],
0x22E3: [.73, .23, .778],
0x22EA: [.73, .23, .738],
0x22EB: [.73, .23, .738],
0x22EC: [.73, .23, .738],
0x22ED: [.73, .23, .738],
0x22EE: [.582, .082, .218],
0x22EF: [.303, -.197, .776],
0x22F0: [.5, 0, .613],
0x22F1: [.5, 0, .613],
0x2307: [.783, .313, .28],
0x2308: [.75, .25, .444],
0x2309: [.75, .25, .444],
0x230A: [.75, .25, .444],
0x230B: [.75, .25, .444],
0x230C: [.274, .103, .818],
0x230D: [.274, .103, .818],
0x230E: [.603, -.226, .818],
0x230F: [.603, -.226, .818],
0x2310: [.367, -.133, .667],
0x2319: [.367, -.133, .667],
0x231C: [.77, -.49, .392],
0x231D: [.77, -.49, .392],
0x231E: [.01, .27, .392],
0x231F: [.01, .27, .392],
0x2320: [1.344, 0, 1.185],
0x2321: [.806, .538, 1.185],
0x2322: [.381, -.13, 1],
0x2323: [.371, -.133, 1],
0x2329: [.75, .25, .389],
0x232A: [.75, .25, .389],
0x239B: [1.495, 0, .875],
0x239C: [.498, 0, .875],
0x239D: [1.495, 0, .875],
0x239E: [1.495, 0, .875],
0x239F: [.498, 0, .875],
0x23A0: [1.495, 0, .875],
0x23A1: [1.5, 0, .667],
0x23A2: [1, 0, .667],
0x23A3: [1.5, 0, .667],
0x23A4: [1.5, 0, .667],
0x23A5: [1, 0, .667],
0x23A6: [1.5, 0, .667],
0x23A7: [.75, 0, .902],
0x23A8: [1.5, 0, .902],
0x23A9: [.75, 0, .902],
0x23AA: [.748, 0, .902],
0x23AB: [.75, 0, .902],
0x23AC: [1.5, 0, .902],
0x23AD: [.75, 0, .902],
0x23AE: [.806, 0, 1.185],
0x23AF: [.27, -.23, .396],
0x23B0: [.75, .375, .752],
0x23B1: [.75, .375, .752],
0x23B2: [.846, 0, 1.576],
0x23B3: [.847, 0, 1.576],
0x23B4: [.726, -.552, .36],
0x23B5: [-.122, .296, .36],
0x23B7: [1.82, 0, 1.056],
0x23B8: [1.765, .235, .659],
0x23B9: [1.765, .235, .659],
0x23D0: [.642, 0, .333],
0x23DC: [.727, -.572, .504],
0x23DD: [-.142, .297, .504],
0x23DE: [.783, -.539, .492],
0x23DF: [-.109, .353, .492],
0x23E0: [.829, -.657, .546, { ic: .006 }],
0x23E1: [-.227, .399, .546, { ic: .006 }],
0x23F4: [.422, -.082, .356],
0x23F5: [.422, -.078, .356],
0x23F6: [.38, -.12, .356],
0x23F7: [.38, -.12, .356],
0x25A0: [.583, .083, .778],
0x25A1: [.583, .083, .778],
0x25AA: [.358, -.142, .328],
0x25AB: [.358, -.142, .328],
0x25B2: [.741, .005, .968],
0x25B3: [.741, .005, .968],
0x25B4: [.592, -.144, .626],
0x25B5: [.592, -.144, .626],
0x25B6: [.678, .178, .858],
0x25B7: [.678, .178, .858],
0x25B8: [.625, -.111, .626],
0x25B9: [.625, -.111, .626],
0x25BA: [.625, -.111, .866],
0x25BB: [.625, -.111, .866],
0x25BC: [.505, .241, .968],
0x25BD: [.505, .241, .968],
0x25BE: [.592, -.144, .626],
0x25BF: [.592, -.144, .626],
0x25C0: [.678, .178, .858],
0x25C1: [.678, .178, .858],
0x25C2: [.625, -.111, .626],
0x25C3: [.625, -.111, .626],
0x25C4: [.625, -.111, .866],
0x25C5: [.625, -.111, .866],
0x25C6: [.713, .213, 1.025],
0x25C7: [.713, .213, 1.025],
0x25CA: [.61, .11, .572],
0x25CB: [.592, .092, .796],
0x25CF: [.592, .092, .796],
0x25E6: [.445, -.055, .5],
0x25EF: [.701, .201, 1.013],
0x25F8: [.679, -.013, .778],
0x25F9: [.679, -.013, .778],
0x25FA: [.679, -.013, .778],
0x25FB: [.533, .033, .706],
0x25FC: [.533, .033, .706],
0x25FD: [.483, -.017, .566],
0x25FE: [.483, -.017, .566],
0x25FF: [.679, -.013, .778],
0x2758: [.694, .083, .525],
0x27D8: [.684, .184, .946],
0x27D9: [.684, .184, .986],
0x27DD: [.684, .184, .946],
0x27DE: [.684, .184, .946],
0x27E6: [.75, .25, .41],
0x27E7: [.75, .25, .41],
0x27E8: [.75, .25, .389],
0x27E9: [.75, .25, .389],
0x27EA: [.75, .25, .57],
0x27EB: [.75, .25, .57],
0x27EC: [.748, .248, .389],
0x27ED: [.748, .248, .389],
0x27EE: [.762, .262, .287],
0x27EF: [.762, .262, .287],
0x27F5: [.51, .01, 1.463],
0x27F6: [.51, .01, 1.463],
0x27F7: [.51, .01, 1.442],
0x27F8: [.52, .02, 1.457],
0x27F9: [.52, .02, 1.457],
0x27FA: [.52, .02, 1.534],
0x27FB: [.51, .011, 1.443],
0x27FC: [.51, .011, 1.443],
0x27FD: [.52, .021, 1.437],
0x27FE: [.52, .021, 1.437],
0x290A: [.702, .202, .846],
0x290B: [.702, .202, .846],
0x294A: [.503, .003, 1.012],
0x294B: [.503, .003, 1.012],
0x294E: [.503, -.23, 1],
0x2950: [.27, .003, 1],
0x2952: [.503, .019, 1.088],
0x2953: [.503, .019, 1.088],
0x2956: [.502, .019, 1.088],
0x2957: [.502, .019, 1.088],
0x295A: [.51, .011, 1],
0x295B: [.51, .011, 1],
0x295E: [.51, .011, 1],
0x295F: [.51, .011, 1],
0x296A: [.6, -.133, 1.018],
0x296B: [.368, .099, 1.018],
0x296C: [.6, -.133, 1.018],
0x296D: [.368, .099, 1.018],
0x296E: [.703, .203, .8],
0x296F: [.703, .203, .8],
0x297C: [.563, .063, .778],
0x297D: [.563, .063, .778],
0x297E: [.546, .046, .726],
0x297F: [.546, .046, .726],
0x2980: [.75, .25, .694],
0x2997: [.748, .248, .278],
0x2998: [.748, .248, .278],
0x29F5: [.603, .103, .556],
0x29F7: [.603, .103, .556],
0x29F8: [.75, .325, .5],
0x29F9: [.75, .325, .5],
0x2A00: [.743, .243, 1.111],
0x2A01: [.743, .243, 1.111],
0x2A02: [.743, .243, 1.111],
0x2A03: [.75, .272, .833],
0x2A04: [.75, .272, .833],
0x2A05: [.764, .264, .833],
0x2A06: [.764, .264, .833],
0x2A07: [.78, .282, 1.082],
0x2A08: [.799, .264, 1.082],
0x2A09: [.74, .24, 1.092],
0x2A0C: [.805, .306, 1.655, { ic: 0.12 }],
0x2A0D: [.805, .306, .615, { ic: 0.05 }],
0x2A0E: [.805, .306, .615, { ic: 0.05 }],
0x2A0F: [.805, .306, .615, { ic: 0.05 }],
0x2A10: [.805, .306, .615, { ic: 0.05 }],
0x2A11: [.805, .306, .675, { ic: 0.02 }],
0x2A12: [.805, .306, .615, { ic: 0.05 }],
0x2A13: [.805, .306, .615, { ic: 0.05 }],
0x2A14: [.805, .306, .615, { ic: 0.05 }],
0x2A15: [.805, .306, .545, { ic: 0.12 }],
0x2A16: [.805, .306, .545, { ic: 0.12 }],
0x2A17: [.805, .306, .794],
0x2A18: [.805, .306, .665],
0x2A19: [.805, .306, .665],
0x2A1A: [.805, .306, .645, { ic: 0.02 }],
0x2A1B: [.967, .306, .545, { ic: 0.12 }],
0x2A1C: [.805, .468, .645, { ic: 0.02 }],
0x2A2F: [.496, -.004, .778],
0x2A3F: [.683, 0, .75],
0x2A7D: [.634, .134, .778],
0x2A7E: [.634, .134, .778],
0x2A85: [.721, .205, .776],
0x2A86: [.721, .205, .776],
0x2A87: [.667, .167, .778],
0x2A88: [.667, .167, .778],
0x2A89: [.753, .321, .776],
0x2A8A: [.721, .289, .776],
0x2A8B: [.977, .477, .778],
0x2A8C: [.977, .477, .778],
0x2A95: [.629, .134, .778],
0x2A96: [.629, .129, .778],
0x2AAF: [.631, .119, .778],
0x2AB0: [.631, .119, .778],
0x2AB1: [.631, .203, .778],
0x2AB2: [.631, .203, .778],
0x2AB3: [.716, .203, .778],
0x2AB4: [.716, .203, .778],
0x2AB5: [.716, .287, .778],
0x2AB6: [.716, .287, .778],
0x2AB7: [.816, .205, .776],
0x2AB8: [.816, .205, .776],
0x2AB9: [.816, .321, .776],
0x2ABA: [.816, .321, .776],
0x2AC5: [.543, .203, .698],
0x2AC6: [.543, .203, .698],
0x2ACB: [.543, .287, .698],
0x2ACC: [.543, .287, .698],
0x2ADE: [.684, 0, .381],
0x2ADF: [.342, .02, .778],
0x2AE0: [.342, .02, .778],
0x2AE1: [.684, 0, .778],
0x2AE2: [.684, 0, .612],
0x2AE3: [.684, 0, .673],
0x2AE4: [.684, 0, .612],
0x2AE5: [.684, 0, .653],
0x2AE6: [.684, 0, .673],
0x2AE7: [.622, -.062, .784],
0x2AE8: [.622, -.062, .784],
0x2AE9: [.812, .02, .778],
0x2AEA: [.592, -.092, .784],
0x2AEB: [.592, -.092, .784],
0x2AF2: [.75, .25, .62],
0x2AF3: [.75, .25, .773],
0x2AF4: [.75, .25, .694],
0x2AF5: [.75, .25, .694],
0x2AFC: [.75, .25, .694],
0x1D400: [.698, 0, .869],
0x1D401: [.686, 0, .818, { sk: -.026 }],
0x1D402: [.697, .011, .831, { sk: .051 }],
0x1D403: [.686, 0, .882, { sk: -.04 }],
0x1D404: [.68, 0, .756],
0x1D405: [.68, 0, .724, { sk: -.02 }],
0x1D406: [.697, .011, .904, { sk: .015 }],
0x1D407: [.686, 0, .9],
0x1D408: [.686, 0, .436],
0x1D409: [.686, .011, .594, { sk: .051 }],
0x1D40A: [.686, 0, .901, { sk: -.013 }],
0x1D40B: [.686, 0, .692, { sk: -.114 }],
0x1D40C: [.686, 0, 1.092],
0x1D40D: [.686, 0, .9],
0x1D40E: [.697, .011, .864],
0x1D40F: [.686, 0, .786, { sk: -.021 }],
0x1D410: [.697, .194, .864],
0x1D411: [.686, .011, .863, { sk: -.044 }],
0x1D412: [.697, .011, .639, { sk: -.025 }],
0x1D413: [.675, 0, .8],
0x1D414: [.686, .011, .885],
0x1D415: [.686, .008, .869],
0x1D416: [.686, .008, 1.189],
0x1D417: [.686, 0, .869, { sk: -.017 }],
0x1D418: [.686, 0, .869],
0x1D419: [.686, 0, .703, { sk: .013 }],
0x1D41A: [.453, .006, .559, { sk: -.049 }],
0x1D41B: [.694, .006, .639, { sk: -.194 }],
0x1D41C: [.453, .006, .511, { sk: .043 }],
0x1D41D: [.694, .006, .639, { sk: .124 }],
0x1D41E: [.453, .006, .527, { sk: .018 }],
0x1D41F: [.7, 0, .351, { ic: .086, sk: .033 }],
0x1D420: [.455, .201, .575, { sk: -.032 }],
0x1D421: [.694, 0, .639, { sk: -.172 }],
0x1D422: [.685, 0, .319],
0x1D423: [.685, .2, .351, { sk: .013 }],
0x1D424: [.694, 0, .607, { sk: -.177 }],
0x1D425: [.694, 0, .319, { sk: -.024 }],
0x1D426: [.45, 0, .958, { sk: .012 }],
0x1D427: [.45, 0, .639],
0x1D428: [.453, .006, .575],
0x1D429: [.45, .194, .639, { sk: .043 }],
0x1D42A: [.45, .194, .607, { sk: -.013 }],
0x1D42B: [.45, 0, .474, { sk: -.021 }],
0x1D42C: [.453, .006, .454],
0x1D42D: [.635, .006, .447, { sk: -.029 }],
0x1D42E: [.45, .006, .639, { sk: -.024 }],
0x1D42F: [.444, .004, .607],
0x1D430: [.444, .004, .831],
0x1D431: [.444, 0, .607],
0x1D432: [.444, .2, .607],
0x1D433: [.444, 0, .511],
0x1D434: [.716, 0, .75, { sk: .175 }],
0x1D435: [.683, 0, .759, { sk: .115 }],
0x1D436: [.705, .022, .715, { ic: .045, sk: .105 }],
0x1D437: [.683, 0, .828, { sk: .088 }],
0x1D438: [.68, 0, .738, { ic: .028, sk: .115 }],
0x1D439: [.68, 0, .643, { ic: .108, sk: .102 }],
0x1D43A: [.705, .022, .786, { sk: .093 }],
0x1D43B: [.683, 0, .831, { ic: .05, sk: .089 }],
0x1D43C: [.684, .001, .44, { ic: .057, sk: .084 }],
0x1D43D: [.683, .022, .555, { ic: .078, sk: .151 }],
0x1D43E: [.684, 0, .849, { ic: .04, sk: .09 }],
0x1D43F: [.684, 0, .681, { sk: .019 }],
0x1D440: [.683, 0, .97, { ic: .074, sk: .085 }],
0x1D441: [.683, 0, .803, { ic: .078, sk: .082 }],
0x1D442: [.705, .022, .763, { sk: .114 }],
0x1D443: [.683, 0, .642, { ic: .112, sk: .072 }],
0x1D444: [.705, .194, .791, { sk: .1 }],
0x1D445: [.683, .022, .759, { sk: .084 }],
0x1D446: [.705, .022, .613, { ic: .032, sk: .093 }],
0x1D447: [.677, 0, .584, { ic: .12, sk: .016 }],
0x1D448: [.683, .022, .683, { ic: .077, sk: .022 }],
0x1D449: [.683, .022, .583, { ic: .187, sk: -.019 }],
0x1D44A: [.683, .022, .944, { ic: .104 }],
0x1D44B: [.683, 0, .828, { ic: .023, sk: .097 }],
0x1D44C: [.683, .001, .581, { ic: .181, sk: -.027 }],
0x1D44D: [.683, 0, .683, { ic: .04, sk: .114 }],
0x1D44E: [.442, .011, .529, { sk: .022 }],
0x1D44F: [.694, .011, .429, { sk: -.011 }],
0x1D450: [.442, .011, .433, { sk: .101 }],
0x1D451: [.694, .011, .52, { sk: .182 }],
0x1D452: [.442, .011, .466, { sk: .067 }],
0x1D453: [.705, .205, .49, { ic: .062, sk: .172 }],
0x1D454: [.442, .205, .477, { sk: .077 }],
0x1D456: [.661, .011, .345, { sk: .074 }],
0x1D457: [.661, .205, .412, { sk: .153 }],
0x1D458: [.694, .011, .521, { sk: -.011 }],
0x1D459: [.694, .011, .298, { sk: .055 }],
0x1D45A: [.442, .011, .878, { sk: .017 }],
0x1D45B: [.442, .011, .6, { sk: .025 }],
0x1D45C: [.442, .011, .485, { sk: .072 }],
0x1D45D: [.442, .194, .503, { sk: .092 }],
0x1D45E: [.442, .194, .446, { ic: .006, sk: .053 }],
0x1D45F: [.442, .011, .451, { sk: .021 }],
0x1D460: [.442, .011, .469, { sk: .061 }],
0x1D461: [.626, .011, .361, { sk: .044 }],
0x1D462: [.442, .011, .572, { sk: .019 }],
0x1D463: [.442, .011, .485, { sk: .051 }],
0x1D464: [.442, .011, .716, { sk: .047 }],
0x1D465: [.442, .011, .572, { sk: .043 }],
0x1D466: [.442, .205, .49, { sk: .059 }],
0x1D467: [.442, .011, .465, { ic: .002, sk: .102 }],
0x1D468: [.711, 0, .869, { sk: .173 }],
0x1D469: [.686, 0, .866, { sk: .11 }],
0x1D46A: [.703, .017, .817, { ic: .038, sk: .113 }],
0x1D46B: [.686, 0, .938, { sk: .063 }],
0x1D46C: [.68, 0, .81, { ic: .015, sk: .124 }],
0x1D46D: [.68, 0, .689, { ic: .12, sk: .104 }],
0x1D46E: [.703, .017, .887, { sk: .102 }],
0x1D46F: [.686, 0, .982, { ic: .045, sk: .091 }],
0x1D470: [.686, 0, .511, { ic: .055, sk: .086 }],
0x1D471: [.686, .017, .631, { ic: .063, sk: .176 }],
0x1D472: [.686, 0, .971, { ic: .032, sk: .137 }],
0x1D473: [.686, 0, .756, { sk: .018 }],
0x1D474: [.686, 0, 1.142, { ic: .074, sk: .086 }],
0x1D475: [.686, 0, .95, { ic: .077, sk: .083 }],
0x1D476: [.703, .017, .837, { sk: .11 }],
0x1D477: [.686, 0, .723, { ic: .126, sk: .07 }],
0x1D478: [.703, .194, .869, { sk: .093 }],
0x1D479: [.686, .017, .872, { ic: .009, sk: .1 }],
0x1D47A: [.703, .017, .693, { ic: .021, sk: .097 }],
0x1D47B: [.675, 0, .637, { ic: .135, sk: .014 }],
0x1D47C: [.686, .017, .8, { ic: .077, sk: .06 }],
0x1D47D: [.686, .017, .678, { ic: .207, sk: .016 }],
0x1D47E: [.686, .017, 1.093, { ic: .114 }],
0x1D47F: [.686, 0, .947, { ic: .006, sk: .132 }],
0x1D480: [.686, 0, .675, { ic: .2, sk: .022 }],
0x1D481: [.686, 0, .773, { ic: .032, sk: .122 }],
0x1D482: [.452, .008, .633, { sk: .019 }],
0x1D483: [.694, .008, .521, { sk: -.035 }],
0x1D484: [.452, .008, .513, { sk: .101 }],
0x1D485: [.694, .008, .61, { sk: .219 }],
0x1D486: [.452, .008, .554, { sk: .063 }],
0x1D487: [.702, .202, .568, { ic: .058, sk: .169 }],
0x1D488: [.452, .202, .545, { sk: .067 }],
0x1D489: [.694, .008, .668, { sk: -.078 }],
0x1D48A: [.694, .008, .405, { sk: .08 }],
0x1D48B: [.694, .202, .471, { sk: .163 }],
0x1D48C: [.694, .008, .604, { sk: -.026 }],
0x1D48D: [.694, .008, .348, { sk: .074 }],
0x1D48E: [.452, .008, 1.032, { sk: .06 }],
0x1D48F: [.452, .008, .713, { sk: .032 }],
0x1D490: [.452, .008, .585, { sk: .074 }],
0x1D491: [.452, .194, .601, { sk: .112 }],
0x1D492: [.452, .194, .542, { ic: .001, sk: .059 }],
0x1D493: [.452, .008, .529, { sk: .018 }],
0x1D494: [.452, .008, .531, { sk: .059 }],
0x1D495: [.643, .008, .415, { sk: .063 }],
0x1D496: [.452, .008, .681, { sk: .038 }],
0x1D497: [.453, .008, .567, { sk: .069 }],
0x1D498: [.453, .008, .831, { sk: .101 }],
0x1D499: [.452, .008, .659, { sk: .029 }],
0x1D49A: [.452, .202, .59, { sk: .078 }],
0x1D49B: [.452, .008, .555, { sk: .076 }],
0x1D6A4: [.442, .011, .322],
0x1D6A5: [.442, .205, .384, { sk: .083 }],
0x1D6A8: [.698, 0, .869],
0x1D6A9: [.686, 0, .818, { sk: -.075 }],
0x1D6AA: [.68, 0, .692, { sk: -.019 }],
0x1D6AB: [.698, 0, .958],
0x1D6AC: [.68, 0, .756, { sk: -.027 }],
0x1D6AD: [.686, 0, .703, { sk: .013 }],
0x1D6AE: [.686, 0, .9],
0x1D6AF: [.697, .011, .894],
0x1D6B0: [.686, 0, .436],
0x1D6B1: [.686, 0, .901, { sk: -.013 }],
0x1D6B2: [.698, 0, .806],
0x1D6B3: [.686, 0, 1.092],
0x1D6B4: [.686, 0, .9],
0x1D6B5: [.675, 0, .767],
0x1D6B6: [.697, .011, .864],
0x1D6B7: [.68, 0, .9],
0x1D6B8: [.686, 0, .786, { sk: -.063 }],
0x1D6B9: [.697, .011, .894],
0x1D6BA: [.686, 0, .831, { sk: -.015 }],
0x1D6BB: [.675, 0, .8],
0x1D6BC: [.697, 0, .894],
0x1D6BD: [.686, 0, .831],
0x1D6BE: [.686, 0, .869, { sk: -.017 }],
0x1D6BF: [.686, 0, .894],
0x1D6C0: [.697, 0, .831],
0x1D6C1: [.686, .025, .958],
0x1D6C2: [.452, .008, .743, { ic: .007, sk: .015 }],
0x1D6C3: [.703, .194, .647],
0x1D6C4: [.452, .211, .679],
0x1D6C5: [.718, .008, .551, { sk: -.011 }],
0x1D6C6: [.461, .017, .597, { sk: -.025 }],
0x1D6C7: [.703, .202, .615, { sk: -.041 }],
0x1D6C8: [.452, .211, .615, { sk: -.051 }],
0x1D6C9: [.702, .008, .567],
0x1D6CA: [.452, .008, .359, { ic: .004, sk: -.068 }],
0x1D6CB: [.452, .008, .615, { ic: .004, sk: -.034 }],
0x1D6CC: [.694, .012, .618, { ic: .048, sk: -.227 }],
0x1D6CD: [.452, .211, .615, { ic: .004, sk: -.036 }],
0x1D6CE: [.453, 0, .583, { sk: -.04 }],
0x1D6CF: [.703, .202, .615, { sk: -.072 }],
0x1D6D0: [.453, .006, .575],
0x1D6D1: [.444, .009, .679, { sk: -.011 }],
0x1D6D2: [.452, .211, .567],
0x1D6D3: [.452, .105, .551],
0x1D6D4: [.444, .008, .695],
0x1D6D5: [.444, .012, .615, { sk: -.035 }],
0x1D6D6: [.453, .008, .615, { sk: -.019 }],
0x1D6D7: [.452, .216, .743, { sk: -.015 }],
0x1D6D8: [.452, .202, .743, { ic: .003, sk: -.063 }],
0x1D6D9: [.694, .202, .743, { sk: .032 }],
0x1D6DA: [.453, .008, .743],
0x1D6DB: [.711, .017, .679],
0x1D6DC: [.444, .008, .506, { ic: .003, sk: .04 }],
0x1D6DD: [.702, .008, .615, { sk: .033 }],
0x1D6DE: [.452, .01, .724, { sk: -.018 }],
0x1D6DF: [.694, .202, .743],
0x1D6E0: [.452, .194, .567],
0x1D6E1: [.444, .008, .966, { sk: -.01 }],
0x1D6E2: [.716, 0, .75, { sk: .177 }],
0x1D6E3: [.683, 0, .759, { sk: .077 }],
0x1D6E4: [.68, 0, .615, { ic: .108, sk: .072 }],
0x1D6E5: [.716, 0, .833, { sk: .17 }],
0x1D6E6: [.68, 0, .738, { ic: .028, sk: .092 }],
0x1D6E7: [.683, 0, .683, { ic: .04, sk: .11 }],
0x1D6E8: [.683, 0, .831, { ic: .05, sk: .089 }],
0x1D6E9: [.705, .022, .763, { sk: .117 }],
0x1D6EA: [.684, .001, .44, { ic: .057, sk: .084 }],
0x1D6EB: [.684, 0, .849, { ic: .04, sk: .09 }],
0x1D6EC: [.716, 0, .694, { sk: .17 }],
0x1D6ED: [.683, 0, .97, { ic: .074, sk: .085 }],
0x1D6EE: [.683, 0, .803, { ic: .078, sk: .082 }],
0x1D6EF: [.677, 0, .742, { ic: .035, sk: .097 }],
0x1D6F0: [.705, .022, .763, { sk: .117 }],
0x1D6F1: [.68, 0, .831, { ic: .049, sk: .089 }],
0x1D6F2: [.683, 0, .642, { ic: .112, sk: .049 }],
0x1D6F3: [.705, .022, .763, { sk: .117 }],
0x1D6F4: [.683, 0, .78, { ic: .026, sk: .104 }],
0x1D6F5: [.677, 0, .584, { ic: .12, sk: .012 }],
0x1D6F6: [.705, 0, .583, { ic: .118 }],
0x1D6F7: [.683, 0, .667, { sk: .082 }],
0x1D6F8: [.683, 0, .828, { ic: .023, sk: .097 }],
0x1D6F9: [.683, 0, .612, { ic: .081, sk: .025 }],
0x1D6FA: [.705, 0, .772, { ic: .014, sk: .137 }],
0x1D6FB: [.683, .033, .833],
0x1D6FC: [.442, .011, .64, { sk: .072 }],
0x1D6FD: [.706, .194, .566, { ic: .008, sk: .148 }],
0x1D6FE: [.442, .215, .518, { ic: .025, sk: .111 }],
0x1D6FF: [.712, .011, .444, { ic: .008, sk: .107 }],
0x1D700: [.453, .022, .466, { sk: .051 }],
0x1D701: [.697, .205, .438, { ic: .036, sk: .067 }],
0x1D702: [.442, .216, .497, { sk: .1 }],
0x1D703: [.705, .011, .469, { sk: .075 }],
0x1D704: [.442, .011, .354],
0x1D705: [.442, .011, .576, { sk: .043 }],
0x1D706: [.694, .013, .583, { sk: -.053 }],
0x1D707: [.442, .216, .603, { sk: .048 }],
0x1D708: [.442, 0, .494, { ic: .03, sk: .028 }],
0x1D709: [.697, .205, .438, { ic: .008, sk: .06 }],
0x1D70A: [.442, .011, .485],
0x1D70B: [.431, .011, .57, { sk: .043 }],
0x1D70C: [.442, .216, .517, { sk: .096 }],
0x1D70D: [.442, .108, .363, { ic: .046, sk: .044 }],
0x1D70E: [.431, .011, .571],
0x1D70F: [.431, .012, .437, { ic: .074 }],
0x1D710: [.442, .011, .54, { sk: .036 }],
0x1D711: [.442, .218, .654, { sk: .028 }],
0x1D712: [.442, .205, .626, { sk: .018 }],
0x1D713: [.694, .205, .651, { sk: .143 }],
0x1D714: [.442, .011, .622, { sk: .034 }],
0x1D715: [.716, .022, .531, { ic: .035, sk: .069 }],
0x1D716: [.431, .011, .406, { sk: .066 }],
0x1D717: [.705, .011, .591, { sk: .116 }],
0x1D718: [.442, .012, .624, { sk: .053 }],
0x1D719: [.694, .205, .596, { sk: .125 }],
0x1D71A: [.442, .194, .517, { sk: .102 }],
0x1D71B: [.431, .011, .828, { sk: .039 }],
0x1D71C: [.711, 0, .869, { sk: .174 }],
0x1D71D: [.686, 0, .866, { sk: .069 }],
0x1D71E: [.68, 0, .657, { ic: .12, sk: .071 }],
0x1D71F: [.711, 0, .958, { sk: .168 }],
0x1D720: [.68, 0, .81, { ic: .015, sk: .098 }],
0x1D721: [.686, 0, .773, { ic: .032, sk: .117 }],
0x1D722: [.686, 0, .982, { ic: .045, sk: .09 }],
0x1D723: [.703, .017, .867, { sk: .108 }],
0x1D724: [.686, 0, .511, { ic: .055, sk: .085 }],
0x1D725: [.686, 0, .971, { ic: .032, sk: .093 }],
0x1D726: [.711, 0, .806, { sk: .167 }],
0x1D727: [.686, 0, 1.142, { ic: .074, sk: .085 }],
0x1D728: [.686, 0, .95, { ic: .077, sk: .082 }],
0x1D729: [.675, 0, .841, { ic: .026, sk: .104 }],
0x1D72A: [.703, .017, .837, { sk: .111 }],
0x1D72B: [.68, 0, .982, { ic: .044, sk: .09 }],
0x1D72C: [.686, 0, .723, { ic: .126, sk: .039 }],
0x1D72D: [.703, .017, .867, { sk: .108 }],
0x1D72E: [.686, 0, .885, { ic: .019, sk: .108 }],
0x1D72F: [.675, 0, .637, { ic: .135, sk: .01 }],
0x1D730: [.703, 0, .671, { ic: .131 }],
0x1D731: [.686, 0, .767, { sk: .08 }],
0x1D732: [.686, 0, .947, { ic: .006, sk: .106 }],
0x1D733: [.686, 0, .714, { ic: .078, sk: .029 }],
0x1D734: [.703, 0, .879, { ic: .007, sk: .135 }],
0x1D735: [.686, .025, .958],
0x1D736: [.452, .008, .761, { sk: .059 }],
0x1D737: [.703, .194, .66, { sk: .153 }],
0x1D738: [.452, .211, .59, { ic: .027, sk: -.02 }],
0x1D739: [.718, .008, .522, { sk: .115 }],
0x1D73A: [.461, .017, .529, { sk: .058 }],
0x1D73B: [.703, .202, .508, { ic: .014, sk: .083 }],
0x1D73C: [.452, .211, .6, { sk: .019 }],
0x1D73D: [.702, .008, .562, { sk: .062 }],
0x1D73E: [.452, .008, .412],
0x1D73F: [.452, .008, .668, { sk: .025 }],
0x1D740: [.694, .012, .671, { sk: -.072 }],
0x1D741: [.452, .211, .708, { sk: .042 }],
0x1D742: [.453, 0, .577, { ic: .026, sk: .028 }],
0x1D743: [.703, .202, .508, { sk: .061 }],
0x1D744: [.452, .008, .585],
0x1D745: [.444, .009, .682, { sk: .046 }],
0x1D746: [.452, .211, .612, { sk: .1 }],
0x1D747: [.452, .105, .424, { ic: .038, sk: -.029 }],
0x1D748: [.444, .008, .686],
0x1D749: [.444, .012, .521, { ic: .083 }],
0x1D74A: [.453, .008, .631, { sk: .037 }],
0x1D74B: [.452, .216, .747, { sk: .033 }],
0x1D74C: [.452, .202, .718, { sk: .011 }],
0x1D74D: [.694, .202, .758, { sk: .151 }],
0x1D74E: [.453, .008, .718, { sk: .039 }],
0x1D74F: [.711, .017, .628, { ic: .029, sk: .079 }],
0x1D750: [.444, .008, .483, { sk: .074 }],
0x1D751: [.702, .008, .692, { sk: .119 }],
0x1D752: [.452, .01, .724, { sk: .053 }],
0x1D753: [.694, .202, .713, { sk: .126 }],
0x1D754: [.452, .194, .612, { sk: .094 }],
0x1D755: [.444, .008, .975, { sk: .043 }],
0x1D7CA: [.68, 0, .783],
0x1D7CB: [.445, .267, .628],
0x1D7CE: [.655, .011, .575],
0x1D7CF: [.655, 0, .575],
0x1D7D0: [.655, 0, .575, { sk: -.011 }],
0x1D7D1: [.655, .011, .575],
0x1D7D2: [.656, 0, .575, { sk: .127 }],
0x1D7D3: [.655, .011, .575],
0x1D7D4: [.655, .011, .575, { sk: .048 }],
0x1D7D5: [.676, .011, .575, { sk: -.164 }],
0x1D7D6: [.655, .011, .575, { sk: .011 }],
0x1D7D7: [.655, .011, .575]
};
//# sourceMappingURL=normal.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/bold.js
const bold = {
0x20: [0, 0, .383],
0x21: [.705, 0, .35],
0x22: [.697, -.418, .481],
0x23: [.694, .194, .958],
0x24: [.75, .056, .575],
0x25: [.75, .056, .958],
0x26: [.705, .011, .894],
0x27: [.697, -.418, .319],
0x28: [.75, .249, .447],
0x29: [.75, .249, .447],
0x2A: [.75, -.306, .575],
0x2B: [.633, .132, .894],
0x2C: [.156, .194, .319],
0x2D: [.271, -.174, .383],
0x2E: [.156, 0, .319],
0x2F: [.75, .25, .575],
0x3A: [.444, 0, .319],
0x3B: [.444, .194, .319],
0x3C: [.587, .086, .894],
0x3D: [.393, -.108, .894],
0x3E: [.587, .086, .894],
0x3F: [.7, 0, .543],
0x40: [.7, .006, .894],
0x5B: [.75, .25, .319],
0x5C: [.75, .25, .575],
0x5D: [.75, .25, .319],
0x5E: [.744, -.562, .556, { ic: .005 }],
0x5F: [-.101, .189, .869],
0x60: [.704, -.509, .575],
0x7B: [.75, .25, .575],
0x7C: [.76, .26, .319],
0x7D: [.75, .25, .575],
0x7E: [.311, -.189, .556, { ic: .001 }],
0xA0: [0, 0, .575],
0xA3: [.686, .031, .869],
0xA5: [.686, 0, .869],
0xA7: [.712, .212, .695],
0xA8: [.677, -.537, .575],
0xAC: [.403, -.098, .894],
0xAF: [.633, -.581, .575],
0xB0: [.686, -.367, .431],
0xB1: [.693, 0, .894],
0xB4: [.704, -.509, .575],
0xB5: [.45, .194, .639],
0xB6: [.694, .194, .703],
0xB7: [.396, -.24, .278],
0xD7: [.543, .042, .894],
0xF0: [.702, .006, .575],
0xF7: [.582, .08, .894],
0x131: [.45, 0, .319],
0x237: [.45, .2, .351],
0x2C6: [.71, -.503, .575],
0x2C7: [.71, -.503, .575],
0x2C9: [.633, -.581, .575],
0x2CA: [.704, -.509, .575],
0x2CB: [.704, -.509, .575],
0x2CD: [-.247, .307, .383, { ic: .029 }],
0x2D8: [.7, -.513, .575],
0x2D9: [.685, -.529, .319],
0x2DA: [.714, -.492, .338],
0x2DC: [.661, -.553, .575],
0x2FF: [-.035, .286, 0, { dx: .287 }],
0x300: [.704, -.509, 0, { dx: .317 }],
0x301: [.704, -.509, 0, { dx: .242 }],
0x302: [.71, -.503, 0, { dx: .279 }],
0x303: [.661, -.553, 0, { dx: .279 }],
0x304: [.633, -.581, 0, { dx: .279 }],
0x305: [.697, -.636, .894],
0x306: [.7, -.513, 0, { dx: .279 }],
0x307: [.685, -.529, 0, { dx: .279 }],
0x308: [.677, -.537, 0, { dx: .28 }],
0x30A: [.764, -.542, 0, { dx: .28 }],
0x30C: [.71, -.503, 0, { dx: .279 }],
0x338: [.748, .249, 0],
0x3D2: [.697, 0, .87],
0x3F6: [.442, .011, .43],
0x2000: [0, 0, .575],
0x2001: [0, 0, 1.15],
0x2002: [0, 0, .575],
0x2003: [0, 0, 1.15],
0x2004: [0, 0, .383],
0x2005: [0, 0, .288],
0x2006: [0, 0, .192],
0x2007: [0, 0, .575],
0x2008: [0, 0, .319],
0x2009: [0, 0, .23],
0x200A: [0, 0, .032],
0x200B: [0, 0, 0],
0x2010: [.271, -.174, .383],
0x2011: [.271, -.174, .383],
0x2012: [.312, -.236, .575],
0x2013: [.312, -.236, .575],
0x2014: [.312, -.236, 1.15],
0x2016: [.75, .25, .499],
0x2018: [.694, -.344, .319],
0x2019: [.694, -.344, .319],
0x201C: [.694, -.344, .571],
0x201D: [.694, -.344, .571],
0x2020: [.702, .211, .511],
0x2021: [.702, .202, .511],
0x2026: [.156, 0, .838],
0x2044: [.696, .01, .648],
0x20A4: [.686, .031, .869],
0x20AC: [.697, .011, .72],
0x2126: [.697, 0, .831],
0x2127: [.686, .011, .831],
0x2190: [.5, 0, 1.15],
0x2191: [.694, .204, .575],
0x2192: [.5, 0, 1.15],
0x2193: [.704, .194, .575],
0x2197: [.725, 0, .894],
0x2198: [.694, .031, .894],
0x2206: [.698, 0, 1.028],
0x2212: [.281, -.22, .894],
0x221A: [.757, .094, .543, { ic: .064 }],
0x221E: [.47, .026, 1.15],
0x2222: [.634, .132, .894],
0x22C6: [.501, -.001, .575],
0x2322: [.365, -.15, .894],
0x2329: [.751, .25, .447],
0x232A: [.751, .25, .447],
0x25CB: [.761, .261, 1.277],
0x25E6: [.381, -.077, .894],
0x27E6: [.751, .249, .463],
0x27E7: [.751, .249, .463]
};
//# sourceMappingURL=bold.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/italic.js
const italic = {
0x20: [0, 0, .358],
0x21: [.716, 0, .307, { ic: .068 }],
0x22: [.705, -.423, .401, { ic: .048 }],
0x23: [.694, .194, .818, { ic: .01 }],
0x24: [.75, .056, .5, { ic: .091 }],
0x25: [.75, .056, .818, { ic: .028 }],
0x26: [.716, .022, .767, { ic: .037 }],
0x27: [.705, -.423, .307, { ic: .048 }],
0x28: [.75, .25, .409, { ic: .107 }],
0x29: [.75, .25, .409],
0x2A: [.75, -.319, .511, { ic: .072 }],
0x2B: [.557, .057, .767],
0x2C: [.106, .193, .307],
0x2D: [.243, -.187, .358],
0x2E: [.106, 0, .307],
0x2F: [.75, .25, .511, { ic: .105 }],
0x30: [.666, .022, .511, { ic: .044 }],
0x31: [.666, 0, .511],
0x32: [.666, .022, .511, { ic: .04 }],
0x33: [.666, .022, .511, { ic: .051 }],
0x34: [.666, .194, .511],
0x35: [.665, .022, .511, { ic: .056 }],
0x36: [.666, .022, .511, { ic: .057 }],
0x37: [.666, .022, .511, { ic: .114 }],
0x38: [.666, .022, .511, { ic: .043 }],
0x39: [.666, .022, .511, { ic: .042 }],
0x3A: [.431, 0, .307],
0x3B: [.431, .193, .307],
0x3C: [.54, .04, .778, { ic: .049 }],
0x3D: [.367, -.133, .767, { ic: .01 }],
0x3E: [.54, .04, .778],
0x3F: [.716, 0, .511, { ic: .04 }],
0x40: [.705, .011, .767, { ic: .022 }],
0x5B: [.75, .25, .307, { ic: .139 }],
0x5C: [.75, .25, .5],
0x5D: [.75, .25, .307, { ic: .052 }],
0x5E: [.745, -.561, .556, { ic: .153 }],
0x5F: [-.11, .14, .743],
0x60: [.696, -.505, .511],
0x7B: [.75, .25, .5, { ic: .113 }],
0x7C: [.75, .25, .278, { ic: .066 }],
0x7D: [.75, .25, .5],
0x7E: [.309, -.191, .556, { ic: .072 }],
0xA0: [0, 0, .511],
0xA8: [.649, -.553, .511, { ic: .032 }],
0xAF: [.616, -.586, .511, { ic: .061 }],
0xB0: [.683, -.428, .383, { ic: .079 }],
0xB4: [.696, -.505, .511, { ic: .028 }],
0x131: [.442, .011, .322],
0x237: [.442, .205, .384, { sk: .083 }],
0x2C6: [.686, -.509, .511, { ic: .024 }],
0x2C7: [.692, -.515, .511, { ic: .061 }],
0x2C9: [.616, -.586, .511, { ic: .061 }],
0x2CA: [.696, -.505, .511, { ic: .028 }],
0x2CB: [.696, -.505, .511],
0x2D8: [.686, -.516, .511, { ic: .052 }],
0x2D9: [.654, -.548, .307, { ic: .051 }],
0x2DA: [.705, -.529, .831],
0x2DC: [.651, -.55, .511, { ic: .057 }],
0x2FF: [-.025, .275, 0, { dx: .275 }],
0x300: [.696, -.505, 0, { dx: .136 }],
0x301: [.696, -.505, 0, { dx: .077 }],
0x302: [.686, -.509, 0, { dx: .123 }],
0x303: [.651, -.55, 0, { dx: .105 }],
0x304: [.616, -.586, 0, { dx: .105 }],
0x305: [.681, -.641, .766, { ic: .062 }],
0x306: [.686, -.516, 0, { dx: .089 }],
0x307: [.654, -.548, 0, { dx: .105 }],
0x308: [.649, -.553, 0, { dx: .096 }],
0x30A: [.705, -.529, 0, { dx: .101 }],
0x30C: [.692, -.515, 0, { dx: .086 }],
0x338: [.748, .248, 0],
0x3D2: [.722, 0, .778, { ic: .007 }],
0x3F6: [.442, .011, .43],
0x2000: [0, 0, .511],
0x2001: [0, 0, 1.022],
0x2002: [0, 0, .511],
0x2003: [0, 0, 1.022],
0x2004: [0, 0, .341],
0x2005: [0, 0, .256],
0x2006: [0, 0, .17],
0x2007: [0, 0, .511],
0x2008: [0, 0, .307],
0x2009: [0, 0, .204],
0x200A: [0, 0, .026],
0x200B: [0, 0, 0],
0x2010: [.243, -.187, .358, { ic: .001 }],
0x2011: [.243, -.187, .358, { ic: .001 }],
0x2012: [.277, -.255, .511, { ic: .04 }],
0x2013: [.277, -.255, .511, { ic: .04 }],
0x2014: [.277, -.255, 1.022, { ic: .014 }],
0x2016: [.75, .25, .398, { ic: .066 }],
0x2018: [.693, -.394, .307, { ic: .053 }],
0x2019: [.694, -.395, .307, { ic: .066 }],
0x201C: [.693, -.394, .49, { ic: .053 }],
0x201D: [.694, -.395, .49, { ic: .064 }],
0x2026: [.106, 0, .684],
0x2044: [.683, 0, .603, { ic: .093 }],
0x20A4: [.683, .032, .743, { ic: .003 }],
0x20AC: [.705, .022, .576, { ic: .126 }],
0x2126: [.705, 0, .716, { ic: .043 }],
0x2127: [.684, .021, .716, { ic: .071 }],
0x2190: [.512, .011, .971],
0x2191: [.694, .195, .512, { ic: .07 }],
0x2192: [.513, .01, .971],
0x2193: [.695, .194, .512],
0x2206: [.716, 0, .833],
0x2212: [.27, -.23, .767],
0x221A: [.735, .104, .46, { ic: .226 }],
0x221E: [.456, .025, .92, { ic: .022 }],
0x2222: [.557, .057, .767, { ic: .047 }],
0x22C6: [.483, -.019, .511, { ic: .063 }],
0x2329: [.751, .249, .409, { ic: .105 }],
0x232A: [.751, .249, .409],
0x25CB: [.772, .272, 1.073, { ic: .003 }],
0x25E6: [.379, -.081, .767],
0x27E6: [.751, .249, .422, { ic: .138 }],
0x27E7: [.751, .249, .422, { ic: .052 }]
};
//# sourceMappingURL=italic.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/bold-italic.js
const boldItalic = {
0x20: [0, 0, .414],
0x21: [.711, 0, .386, { ic: .044 }],
0x22: [.703, -.422, .518, { ic: .048 }],
0x23: [.694, .194, .944],
0x24: [.75, .056, .575, { ic: .079 }],
0x25: [.75, .056, .944, { ic: .002 }],
0x26: [.711, .017, .886, { ic: .011 }],
0x27: [.703, -.422, .356, { ic: .048 }],
0x28: [.75, .249, .473, { ic: .094 }],
0x29: [.75, .249, .473],
0x2A: [.75, -.306, .591, { ic: .057 }],
0x2B: [.603, .102, .886],
0x2C: [.147, .194, .356],
0x2D: [.269, -.175, .414],
0x2E: [.147, 0, .356],
0x2F: [.75, .25, .591, { ic: .09 }],
0x30: [.661, .017, .591, { ic: .045 }],
0x31: [.661, 0, .591],
0x32: [.661, .017, .591, { ic: .027 }],
0x33: [.661, .017, .591, { ic: .037 }],
0x34: [.661, .194, .591],
0x35: [.661, .017, .591, { ic: .037 }],
0x36: [.661, .017, .591, { ic: .037 }],
0x37: [.661, .017, .591, { ic: .115 }],
0x38: [.661, .017, .591, { ic: .027 }],
0x39: [.661, .017, .591, { ic: .03 }],
0x3A: [.444, 0, .356],
0x3B: [.444, .194, .356],
0x3C: [.587, .086, .894, { ic: .046 }],
0x3D: [.393, -.108, .886],
0x3E: [.587, .086, .894],
0x3F: [.711, 0, .591, { ic: .023 }],
0x40: [.702, .008, .886, { ic: .01 }],
0x5B: [.75, .25, .356, { ic: .129 }],
0x5C: [.75, .25, .575],
0x5D: [.75, .25, .356, { ic: .036 }],
0x5E: [.744, -.562, .556, { ic: .151 }],
0x5F: [-.097, .153, .866],
0x60: [.699, -.502, .591],
0x7B: [.75, .25, .575, { ic: .109 }],
0x7C: [.75, .25, .319, { ic: .059 }],
0x7D: [.75, .25, .575],
0x7E: [.307, -.193, .556, { ic: .071 }],
0xA0: [0, 0, .591],
0xA8: [.667, -.535, .591, { ic: .045 }],
0xAF: [.626, -.576, .591, { ic: .047 }],
0xB0: [.686, -.392, .443, { ic: .081 }],
0xB4: [.699, -.502, .591, { ic: .005 }],
0x131: [.452, .008, .394, { sk: -.012 }],
0x237: [.452, .202, .439, { sk: .063 }],
0x2C6: [.704, -.497, .591, { ic: .012 }],
0x2C7: [.704, -.497, .591, { ic: .052 }],
0x2C9: [.626, -.576, .591, { ic: .047 }],
0x2CA: [.699, -.502, .591, { ic: .005 }],
0x2CB: [.699, -.502, .591],
0x2CD: [-.247, .307, .383, { ic: .032 }],
0x2D8: [.69, -.511, .591, { ic: .037 }],
0x2D9: [.674, -.527, .356, { ic: .048 }],
0x2DA: [.702, -.534, .949],
0x2DC: [.66, -.541, .591, { ic: .042 }],
0x2FF: [-.035, .286, 0, { dx: .272 }],
0x300: [.699, -.502, 0, { dx: .188 }],
0x301: [.699, -.502, 0, { dx: .113 }],
0x302: [.704, -.497, 0, { dx: .165 }],
0x303: [.66, -.541, 0, { dx: .145 }],
0x304: [.626, -.576, 0, { dx: .145 }],
0x305: [.708, -.647, .885, { ic: .049 }],
0x306: [.69, -.511, 0, { dx: .13 }],
0x307: [.674, -.527, 0, { dx: .144 }],
0x308: [.667, -.535, 0, { dx: .145 }],
0x30A: [.702, -.534, 0, { dx: .141 }],
0x30C: [.704, -.497, 0, { dx: .124 }],
0x338: [.749, .249, 0],
0x3D2: [.697, 0, .87, { ic: .103 }],
0x3F6: [.442, .011, .43, { ic: .04 }],
0x2000: [0, 0, .591],
0x2001: [0, 0, 1.182],
0x2002: [0, 0, .591],
0x2003: [0, 0, 1.182],
0x2004: [0, 0, .394],
0x2005: [0, 0, .296],
0x2006: [0, 0, .197],
0x2007: [0, 0, .591],
0x2008: [0, 0, .355],
0x2009: [0, 0, .236],
0x200A: [0, 0, .029],
0x200B: [0, 0, 0],
0x2010: [.269, -.175, .414],
0x2011: [.269, -.175, .414],
0x2012: [.293, -.257, .591, { ic: .036 }],
0x2013: [.292, -.256, .591, { ic: .037 }],
0x2014: [.292, -.256, 1.182, { ic: .006 }],
0x2016: [.75, .25, .499, { ic: .059 }],
0x2018: [.694, -.353, .356, { ic: .037 }],
0x2019: [.694, -.353, .356, { ic: .059 }],
0x201C: [.694, -.353, .59, { ic: .038 }],
0x201D: [.694, -.353, .59, { ic: .059 }],
0x2026: [.147, 0, .842],
0x2044: [.696, .01, .713, { ic: .08 }],
0x20A4: [.686, .031, .866, { ic: .008 }],
0x20AC: [.703, .017, .664, { ic: .115 }],
0x2126: [.703, 0, .827, { ic: .031 }],
0x2127: [.686, .017, .827, { ic: .056 }],
0x2190: [.518, .017, 1.121],
0x2191: [.694, .204, .592, { ic: .069 }],
0x2192: [.518, .017, 1.121],
0x2193: [.704, .194, .592],
0x2206: [.699, 0, 1.028],
0x2212: [.281, -.22, .886],
0x221A: [.757, .094, .531, { ic: .243 }],
0x221E: [.473, .029, 1.06, { ic: .044 }],
0x2222: [.604, .102, .886, { ic: .035 }],
0x22C6: [.501, -.001, .591, { ic: .048 }],
0x2329: [.75, .25, .473, { ic: .09 }],
0x232A: [.751, .25, .473],
0x25CB: [.772, .272, 1.239],
0x25E6: [.386, -.072, .886],
0x27E6: [.751, .249, .488, { ic: .129 }],
0x27E7: [.751, .249, .488, { ic: .037 }]
};
//# sourceMappingURL=bold-italic.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/double-struck.js
const doubleStruck = {};
//# sourceMappingURL=double-struck.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/fraktur.js
const fraktur = {};
//# sourceMappingURL=fraktur.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/fraktur-bold.js
const frakturBold = {};
//# sourceMappingURL=fraktur-bold.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/sans-serif.js
const sansSerif = {
0x2CD: [-.208, .286, .333, { ic: .038 }],
0x2FF: [-.023, .277, 0, { dx: .274 }],
0x338: [.749, .25, 0],
0x2000: [0, 0, .5],
0x2001: [0, 0, 1],
0x2002: [0, 0, .5],
0x2003: [0, 0, 1],
0x2004: [0, 0, .333],
0x2005: [0, 0, .25],
0x2006: [0, 0, .167],
0x2007: [0, 0, .5],
0x2008: [0, 0, .278],
0x2009: [0, 0, .2],
0x200A: [0, 0, .028],
0x200B: [0, 0, 0],
0x20A4: [.694, .022, .667],
0x2197: [.718, -.001, .778],
0x2198: [.694, .024, .778],
0x2206: [.694, 0, .833],
0x22C6: [.491, .006, .5, { ic: .023 }],
0x2322: [.363, -.133, .778],
0x25CB: [.772, .272, 1.111]
};
//# sourceMappingURL=sans-serif.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/sans-serif-bold.js
const sansSerifBold = {
0x2CD: [-.253, .389, .367, { ic: .067 }],
0x2FF: [-.025, .319, 0, { dx: .294 }],
0x338: [.759, .257, 0],
0x2000: [0, 0, .55],
0x2001: [0, 0, 1.1],
0x2002: [0, 0, .55],
0x2003: [0, 0, 1.1],
0x2004: [0, 0, .367],
0x2005: [0, 0, .275],
0x2006: [0, 0, .183],
0x2007: [0, 0, .55],
0x2008: [0, 0, .305],
0x2009: [0, 0, .22],
0x200A: [0, 0, .031],
0x200B: [0, 0, 0],
0x20A4: [.694, .047, .733],
0x2197: [.734, .023, .856],
0x2198: [.72, .037, .856],
0x2206: [.694, 0, .916],
0x22C6: [.519, .031, .55, { ic: .015 }],
0x2322: [.381, -.095, .856],
0x25CB: [.772, .272, 1.222]
};
//# sourceMappingURL=sans-serif-bold.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/sans-serif-italic.js
const sansSerifItalic = {
0x2CD: [-.208, .286, .333],
0x2FF: [-.023, .277, 0, { dx: .272 }],
0x338: [.749, .25, 0],
0x2000: [0, 0, .5],
0x2001: [0, 0, .5],
0x2002: [0, 0, .333],
0x2003: [0, 0, .25],
0x2004: [0, 0, .167],
0x2005: [0, 0, .5],
0x2006: [0, 0, .278],
0x2007: [0, 0, .2],
0x2008: [0, 0, .028],
0x2009: [0, 0, 0],
0x200A: [0, 0, 0],
0x200B: [0, 0, 0],
0x20A4: [.694, .022, .667],
0x2197: [.718, -.001, .778, { ic: .095 }],
0x2198: [.694, .025, .778, { ic: .029 }],
0x2206: [.694, 0, .833],
0x22C6: [.515, .008, .5, { ic: .09 }],
0x2322: [.364, -.133, .778],
0x25CB: [.772, .272, 1.111, { ic: .008 }]
};
//# sourceMappingURL=sans-serif-italic.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/sans-serif-bold-italic.js
const sansSerifBoldItalic = {
0x2CD: [-.253, .389, .367, { ic: .003 }],
0x2FF: [-.025, .319, 0, { dx: .327 }],
0x338: [.759, .257, 0],
0x2000: [0, 0, .55],
0x2001: [0, 0, 1.1],
0x2002: [0, 0, .55],
0x2003: [0, 0, 1.1],
0x2004: [0, 0, .367],
0x2005: [0, 0, .275],
0x2006: [0, 0, .183],
0x2007: [0, 0, .55],
0x2008: [0, 0, .305],
0x2009: [0, 0, .22],
0x200A: [0, 0, .031],
0x200B: [0, 0, 0],
0x20A4: [.694, .047, .733],
0x2197: [.734, .023, .856, { ic: .086 }],
0x2198: [.72, .037, .856, { ic: .049 }],
0x2206: [.694, 0, .916],
0x22C6: [.519, .031, .55, { ic: .076 }],
0x2322: [.381, -.095, .856],
0x25CB: [.772, .272, 1.222, { ic: .046 }]
};
//# sourceMappingURL=sans-serif-bold-italic.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/monospace.js
const monospace = {
0x2CD: [-.025, .095, .525, { ic: .035 }],
0x2FF: [-.008, .359, .525],
0x338: [.694, .083, .525],
0x2001: [0, 0, .525],
0x2003: [0, 0, .525],
0x2007: [0, 0, .525],
0x2008: [0, 0, .525],
0x20A4: [.611, .011, .525],
0x2197: [.619, 0, .525, { ic: .035 }],
0x2198: [.611, .008, .525, { ic: .035 }],
0x2206: [.651, 0, .525],
0x22C6: [.555, -.057, .525],
0x2322: [.414, -.195, .525],
0x25CB: [.705, .233, .525, { ic: .075 }],
0xFB07: [0, 0, .525]
};
//# sourceMappingURL=monospace.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/smallop.js
const smallop = {
0x28: [.797, .297, .422],
0x29: [.797, .297, .422],
0x2F: [.905, .405, .617],
0x5B: [.8, .3, .34],
0x5C: [.905, .405, .617],
0x5D: [.8, .3, .34],
0x7B: [.801, .301, .54],
0x7D: [.801, .301, .54],
0x302: [.746, -.571, .644, { ic: .001 }],
0x303: [.751, -.55, .652],
0x305: [.67, -.63, .568],
0x306: [.743, -.578, .658, { ic: .001 }],
0x30C: [.741, -.566, .644, { ic: .001 }],
0x2044: [.905, .405, .617],
0x20D0: [.711, -.601, .667],
0x20D1: [.711, -.601, .667],
0x20D6: [.711, -.521, .659],
0x20D7: [.711, -.521, .659],
0x20E1: [.711, -.521, .715],
0x20EC: [-.171, .281, .667],
0x20ED: [-.171, .281, .667],
0x20EE: [-.091, .281, .659],
0x20EF: [-.091, .281, .659],
0x2215: [.605, .105, .572],
0x2216: [.605, .105, .572],
0x221A: [.85, .35, 1, { ic: .02 }],
0x2223: [.851, .351, .333],
0x2225: [.851, .351, .555],
0x2308: [.8, .3, .458],
0x2309: [.8, .3, .458],
0x230A: [.8, .3, .458],
0x230B: [.8, .3, .458],
0x23B4: [.73, -.546, .735],
0x23B5: [-.116, .3, .735],
0x23DC: [.745, -.54, 1.006],
0x23DD: [-.11, .315, 1.006],
0x23DE: [.815, -.509, .993, { ic: .001 }],
0x23DF: [-.079, .385, .993],
0x23E0: [.853, -.613, 1.048, { ic: .006 }],
0x23E1: [-.183, .423, 1.048, { ic: .006 }],
0x27E6: [.8, .3, .444],
0x27E7: [.8, .3, .444],
0x27E8: [.8, .3, .428],
0x27E9: [.8, .3, .428],
0x27EA: [.8, .3, .623],
0x27EB: [.8, .3, .623],
0x27EE: [.813, .313, .305],
0x27EF: [.813, .313, .305],
0x2983: [.801, .301, .54],
0x2984: [.801, .301, .54],
0x2985: [.797, .297, .422],
0x2986: [.797, .297, .422],
0x29FC: [.791, .291, .422],
0x29FD: [.791, .291, .422],
0x1EEF0: [.72, .017, 1.953, { sk: -.102 }],
0x1EEF1: [.708, .035, 2.524]
};
//# sourceMappingURL=smallop.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/largeop.js
const largeop = {
0x28: [.847, .347, .458],
0x29: [.847, .347, .458],
0x2F: [1.108, .608, .768],
0x5B: [.85, .35, .417],
0x5C: [1.108, .608, .768],
0x5D: [.85, .35, .417],
0x7B: [.85, .35, .583],
0x7D: [.85, .35, .583],
0x302: [.746, -.571, .768, { ic: .001 }],
0x303: [.753, -.548, .778],
0x306: [.743, -.578, .784, { ic: .001 }],
0x30C: [.741, -.566, .768, { ic: .001 }],
0x2044: [1.108, .608, .768],
0x2140: [.95, .45, 1.353, { sk: .067 }],
0x220F: [.95, .45, 1.278],
0x2210: [.95, .45, 1.278],
0x2211: [.95, .45, 1.444],
0x2215: [.608, .107, .577],
0x2216: [.608, .107, .577],
0x221A: [1.15, .651, 1, { ic: .02 }],
0x2223: [.971, .471, .333],
0x2225: [.971, .471, .555],
0x222B: [1.361, .861, .669, { ic: 0.33 }],
0x222C: [1.361, .861, 1.089, { ic: 0.33 }],
0x222D: [1.361, .861, 1.509, { ic: 0.33 }],
0x222E: [1.361, .861, .669, { ic: 0.33 }],
0x222F: [1.361, .861, 1.089, { ic: 0.33 }],
0x2230: [1.361, .861, 1.509, { ic: 0.33 }],
0x2231: [1.361, .861, .669, { ic: 0.33 }],
0x2232: [1.361, .861, .669, { ic: 0.33 }],
0x2233: [1.361, .861, .669, { ic: 0.33 }],
0x22C0: [.958, .456, 1.111],
0x22C1: [.956, .458, 1.111],
0x22C2: [.939, .417, 1.111],
0x22C3: [.917, .439, 1.111],
0x2308: [.85, .35, .472],
0x2309: [.85, .35, .472],
0x230A: [.85, .35, .472],
0x230B: [.85, .35, .472],
0x23B4: [.735, -.541, 1.11],
0x23B5: [-.111, .305, 1.11],
0x23DC: [.761, -.511, 1.508],
0x23DD: [-.081, .331, 1.508],
0x23DE: [.818, -.509, 1.494],
0x23DF: [-.078, .387, 1.494],
0x23E0: [.854, -.612, 1.55, { ic: .006 }],
0x23E1: [-.182, .424, 1.55, { ic: .006 }],
0x27A1: [.469, -.031, 1.423],
0x27D5: [.621, .006, .888, { sk: .09 }],
0x27D6: [.621, .006, .888, { sk: -.07 }],
0x27D7: [.621, .006, 1.03],
0x27E6: [.85, .35, .48],
0x27E7: [.85, .35, .48],
0x27E8: [.85, .35, .472],
0x27E9: [.85, .35, .472],
0x27EA: [.85, .35, .682],
0x27EB: [.85, .35, .682],
0x27EE: [.864, .364, .323],
0x27EF: [.864, .364, .323],
0x2983: [.85, .35, .583],
0x2984: [.85, .35, .583],
0x2985: [.847, .347, .458],
0x2986: [.847, .347, .458],
0x29F8: [1.239, .677, .597, { ic: .053 }],
0x29F9: [1.239, .677, .5, { ic: .15 }],
0x29FC: [.842, .342, .422],
0x29FD: [.842, .342, .422],
0x2A00: [.902, .402, 1.511],
0x2A01: [.902, .402, 1.511],
0x2A02: [.902, .402, 1.511],
0x2A03: [.917, .439, 1.111],
0x2A04: [.917, .439, 1.111],
0x2A05: [.936, .436, 1.111],
0x2A06: [.936, .436, 1.111],
0x2A07: [1.225, .693, 1.945, { sk: .015 }],
0x2A08: [1.23, .681, 1.945],
0x2A09: [.88, .38, 1.371],
0x2A0A: [.95, .45, 1.474, { sk: -.011 }],
0x2A0B: [1.361, .861, 1.056],
0x2A0C: [1.361, .861, 1.929, { ic: 0.33 }],
0x2A0D: [1.361, .861, .669, { ic: 0.33 }],
0x2A0E: [1.361, .861, .669, { ic: 0.33 }],
0x2A0F: [1.361, .861, .669, { ic: 0.33 }],
0x2A10: [1.361, .861, .669, { ic: 0.33 }],
0x2A11: [1.361, .861, .669, { ic: 0.33 }],
0x2A12: [1.361, .861, .669, { ic: 0.33 }],
0x2A13: [1.361, .861, .669, { ic: 0.33 }],
0x2A14: [1.361, .861, .669, { ic: 0.33 }],
0x2A15: [1.361, .861, .669, { ic: 0.33 }],
0x2A16: [1.361, .861, .669, { ic: 0.33 }],
0x2A17: [1.361, .861, .669, { ic: 0.33 }],
0x2A18: [1.361, .861, .669, { ic: 0.33 }],
0x2A19: [1.361, .861, .849, { ic: 0.15 }],
0x2A1A: [1.361, .861, .849, { ic: 0.15 }],
0x2A1B: [1.602, .861, .763, { ic: 0.44 }],
0x2A1C: [1.361, 1.124, .789, { ic: 0.33 }],
0x2A1D: [.921, .151, 1.291],
0x2A1E: [.885, .188, 1.046, { sk: .083 }],
0x2A20: [.774, .081, 1.52],
0x2A21: [.976, .284, .784],
0x2AFC: [1.237, .677, .694],
0x2AFF: [1.237, .677, .478]
};
//# sourceMappingURL=largeop.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/size3.js
const size3 = {
0x28: [.972, .472, .523],
0x29: [.972, .472, .523],
0x2F: [1.374, .874, .964],
0x5B: [.975, .475, .444],
0x5C: [1.374, .874, .964],
0x5D: [.975, .475, .444],
0x7B: [.975, .475, .624],
0x7D: [.975, .475, .624],
0x302: [.747, -.571, .919, { ic: .001 }],
0x303: [.757, -.543, .931],
0x306: [.743, -.577, .937, { ic: .001 }],
0x30C: [.741, -.565, .919, { ic: .001 }],
0x2044: [1.374, .874, .964],
0x2215: [.61, .109, .581],
0x2216: [.61, .109, .581],
0x221A: [1.45, .951, 1, { ic: .02 }],
0x2223: [1.117, .617, .333],
0x2225: [1.117, .617, .555],
0x2308: [.975, .475, .499],
0x2309: [.975, .475, .499],
0x230A: [.975, .475, .499],
0x230B: [.975, .475, .499],
0x23B4: [.742, -.535, 1.485],
0x23B5: [-.105, .312, 1.485],
0x23DC: [.767, -.509, 2.012],
0x23DD: [-.079, .337, 2.012],
0x23DE: [.825, -.506, 1.996],
0x23DF: [-.075, .394, 1.996],
0x23E0: [.858, -.61, 2.056, { ic: .006 }],
0x23E1: [-.18, .428, 2.056, { ic: .006 }],
0x27E6: [.975, .475, .555],
0x27E7: [.975, .475, .555],
0x27E8: [.975, .475, .537],
0x27E9: [.975, .475, .537],
0x27EA: [.975, .475, .781],
0x27EB: [.975, .475, .781],
0x27EE: [.991, .491, .37],
0x27EF: [.991, .491, .37],
0x2983: [.975, .475, .624],
0x2984: [.975, .475, .624],
0x2985: [.972, .472, .523],
0x2986: [.972, .472, .523],
0x29FC: [.966, .466, .467],
0x29FD: [.966, .466, .467]
};
//# sourceMappingURL=size3.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/size4.js
const size4 = {
0x28: [1.146, .646, .597],
0x29: [1.146, .646, .597],
0x2F: [1.722, 1.222, 1.222],
0x5B: [1.15, .65, .472],
0x5C: [1.722, 1.222, 1.222],
0x5D: [1.15, .65, .472],
0x7B: [1.15, .65, .667],
0x7D: [1.15, .65, .667],
0x302: [.747, -.57, 1.1, { ic: .001 }],
0x303: [.762, -.539, 1.115],
0x306: [.743, -.576, 1.12, { ic: .001 }],
0x30C: [.742, -.565, 1.1, { ic: .001 }],
0x2044: [1.722, 1.222, 1.222],
0x2215: [.613, .113, .588],
0x2216: [.613, .113, .588],
0x221A: [1.75, 1.25, 1, { ic: .02 }],
0x2223: [1.292, .792, .333],
0x2225: [1.292, .792, .555],
0x2308: [1.15, .65, .528],
0x2309: [1.15, .65, .528],
0x230A: [1.15, .65, .528],
0x230B: [1.15, .65, .528],
0x23B4: [.75, -.527, 1.86],
0x23B5: [-.097, .32, 1.86],
0x23DC: [.774, -.506, 2.516],
0x23DD: [-.076, .344, 2.516],
0x23DE: [.833, -.502, 2.498],
0x23DF: [-.071, .402, 2.498],
0x23E0: [.863, -.607, 2.564, { ic: .006 }],
0x23E1: [-.177, .433, 2.564, { ic: .006 }],
0x27E6: [1.15, .65, .66],
0x27E7: [1.15, .65, .66],
0x27E8: [1.15, .65, .611],
0x27E9: [1.15, .65, .611],
0x27EA: [1.15, .65, .905],
0x27EB: [1.15, .65, .905],
0x27EE: [1.168, .668, .432],
0x27EF: [1.168, .668, .432],
0x2983: [1.15, .65, .667],
0x2984: [1.15, .65, .667],
0x2985: [1.146, .646, .597],
0x2986: [1.146, .646, .597],
0x29FC: [1.146, .646, .467, { ic: .023 }],
0x29FD: [1.146, .646, .467, { ic: .023 }]
};
//# sourceMappingURL=size4.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/size5.js
const size5 = {
0x28: [1.296, .796, .663],
0x29: [1.296, .796, .663],
0x2F: [2.179, 1.679, 1.557],
0x5B: [1.3, .8, .499],
0x5C: [2.179, 1.679, 1.557],
0x5D: [1.3, .8, .499],
0x7B: [1.3, .8, .707],
0x7D: [1.3, .8, .707],
0x302: [.748, -.569, 1.32, { ic: .001 }],
0x303: [.766, -.534, 1.335],
0x306: [.743, -.575, 1.341, { ic: .001 }],
0x30C: [.743, -.564, 1.32, { ic: .001 }],
0x2044: [2.179, 1.679, 1.557],
0x2215: [.616, .115, .593],
0x2216: [.616, .115, .593],
0x2223: [1.502, 1.002, .333],
0x2225: [1.501, 1.001, .555],
0x2308: [1.3, .8, .555],
0x2309: [1.3, .8, .555],
0x230A: [1.3, .8, .555],
0x230B: [1.3, .8, .555],
0x23B4: [.757, -.521, 2.235],
0x23B5: [-.091, .327, 2.235],
0x23DC: [.78, -.506, 3.02],
0x23DD: [-.076, .35, 3.02],
0x23DE: [.838, -.5, 3],
0x23DF: [-.07, .408, 3],
0x23E0: [.866, -.607, 3.068, { ic: .006 }],
0x23E1: [-.177, .436, 3.068, { ic: .006 }],
0x27E6: [1.3, .8, .75],
0x27E7: [1.3, .8, .75],
0x27E8: [1.3, .8, .677],
0x27E9: [1.3, .8, .677],
0x27EA: [1.3, .8, 1.011],
0x27EB: [1.3, .8, 1.011],
0x27EE: [1.32, .82, .485],
0x27EF: [1.32, .82, .485],
0x2983: [1.3, .8, .707],
0x2984: [1.3, .8, .707],
0x2985: [1.296, .796, .663],
0x2986: [1.296, .796, .663],
0x29FC: [1.296, .796, .467, { ic: .077 }],
0x29FD: [1.296, .796, .467, { ic: .077 }]
};
//# sourceMappingURL=size5.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/size6.js
const size6 = {
0x28: [1.446, .946, .736],
0x29: [1.446, .946, .736],
0x2F: [2.777, 2.277, 1.997],
0x5B: [1.45, .95, .528],
0x5C: [2.777, 2.277, 1.997],
0x5D: [1.45, .95, .528],
0x7B: [1.45, .95, .75],
0x7D: [1.45, .95, .75],
0x302: [.748, -.57, 1.581, { ic: .001 }],
0x303: [.769, -.532, 1.599],
0x306: [.744, -.574, 1.604, { ic: .001 }],
0x30C: [.742, -.564, 1.581, { ic: .001 }],
0x2044: [2.777, 2.277, 1.997],
0x2215: [.619, .119, .6],
0x2216: [.619, .119, .6],
0x2223: [1.752, 1.252, .333],
0x2225: [1.751, 1.252, .555],
0x2308: [1.45, .95, .583],
0x2309: [1.45, .95, .583],
0x230A: [1.45, .95, .583],
0x230B: [1.45, .95, .583],
0x23B4: [.764, -.513, 2.61],
0x23B5: [-.083, .334, 2.61],
0x23DC: [.787, -.505, 3.524],
0x23DD: [-.075, .357, 3.524],
0x23DE: [.845, -.498, 3.502],
0x23DF: [-.067, .414, 3.502],
0x23E0: [.869, -.606, 3.574, { ic: .006 }],
0x23E1: [-.176, .439, 3.574, { ic: .006 }],
0x27E6: [1.45, .95, .838],
0x27E7: [1.45, .95, .838],
0x27E8: [1.45, .95, .75],
0x27E9: [1.45, .95, .75],
0x27EA: [1.45, .95, 1.124],
0x27EB: [1.45, .95, 1.124],
0x27EE: [1.472, .972, .541],
0x27EF: [1.472, .972, .541],
0x2983: [1.45, .95, .75],
0x2984: [1.45, .95, .75],
0x2985: [1.446, .946, .736],
0x2986: [1.446, .946, .736],
0x29FC: [1.447, .936, .467, { ic: .131 }],
0x29FD: [1.447, .936, .467, { ic: .131 }]
};
//# sourceMappingURL=size6.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/size7.js
const size7 = {
0x28: [1.745, 1.245, .875],
0x29: [1.745, 1.245, .875],
0x2F: [3.56, 3.06, 2.572],
0x5B: [1.75, 1.25, .667],
0x5C: [3.56, 3.06, 2.572],
0x5D: [1.75, 1.25, .667],
0x7B: [1.75, 1.25, .902],
0x7D: [1.75, 1.25, .902],
0x302: [.749, -.569, 1.896],
0x303: [.773, -.527, 1.915],
0x306: [.744, -.573, 1.92, { ic: .001 }],
0x30C: [.743, -.563, 1.896],
0x2044: [3.56, 3.06, 2.572],
0x2215: [.623, .122, .607],
0x2216: [.623, .122, .607],
0x2223: [2.052, 1.552, .333],
0x2225: [2.053, 1.553, .555],
0x2308: [1.75, 1.25, .623],
0x2309: [1.75, 1.25, .623],
0x230A: [1.75, 1.25, .623],
0x230B: [1.75, 1.25, .623],
0x23B4: [.772, -.504, 2.985],
0x23B5: [-.074, .342, 2.985],
0x23DC: [.796, -.502, 4.032],
0x23DD: [-.072, .366, 4.032],
0x23DE: [.854, -.493, 4.006],
0x23DF: [-.062, .423, 4.006],
0x23E0: [.873, -.605, 4.082, { ic: .006 }],
0x23E1: [-.175, .443, 4.082, { ic: .006 }],
0x27E6: [1.75, 1.25, 1.007],
0x27E7: [1.75, 1.25, 1.007],
0x27E8: [1.75, 1.25, .908],
0x27E9: [1.75, 1.25, .908],
0x27EA: [1.75, 1.25, 1.362],
0x27EB: [1.75, 1.25, 1.362],
0x27EE: [1.776, 1.276, .647],
0x27EF: [1.776, 1.276, .647],
0x2983: [1.75, 1.25, .902],
0x2984: [1.75, 1.25, .902],
0x2985: [1.745, 1.245, .875],
0x2986: [1.745, 1.245, .875],
0x29FC: [1.751, 1.251, .467, { ic: .257 }],
0x29FD: [1.751, 1.251, .467, { ic: .592 }]
};
//# sourceMappingURL=size7.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/tex-mathit.js
const texMathit = {
0x41: [.716, 0, .743],
0x42: [.683, 0, .704, { oc: .03 }],
0x43: [.705, .022, .716, { oc: .096 }],
0x44: [.683, 0, .755, { oc: .02 }],
0x45: [.68, 0, .678, { oc: .069 }],
0x46: [.68, 0, .653, { oc: .082 }],
0x47: [.705, .022, .774, { oc: .038 }],
0x48: [.683, 0, .743, { oc: .109 }],
0x49: [.683, 0, .386, { oc: .115 }],
0x4A: [.683, .022, .525, { oc: .097 }],
0x4B: [.683, 0, .769, { oc: .09 }],
0x4C: [.683, 0, .627],
0x4D: [.683, 0, .897, { oc: .105 }],
0x4E: [.683, 0, .743, { oc: .109 }],
0x4F: [.705, .022, .767, { oc: .021 }],
0x50: [.683, 0, .678, { oc: .052 }],
0x51: [.705, .194, .767, { oc: .021 }],
0x52: [.683, .022, .729],
0x53: [.705, .022, .562, { oc: .07 }],
0x54: [.677, 0, .716, { oc: .09 }],
0x55: [.683, .022, .743, { oc: .109 }],
0x56: [.683, .022, .743, { oc: .125 }],
0x57: [.683, .022, .999, { oc: .125 }],
0x58: [.683, 0, .743, { oc: .082 }],
0x59: [.683, 0, .743, { oc: .131 }],
0x5A: [.683, 0, .613, { oc: .091 }],
0x61: [.442, .011, .511, { oc: .014 }],
0x62: [.694, .011, .46],
0x63: [.442, .011, .46, { oc: .01 }],
0x64: [.694, .011, .511, { oc: .049 }],
0x65: [.442, .011, .46, { oc: .008 }],
0x66: [.705, .205, .307, { oc: .145 }],
0x67: [.442, .205, .46, { oc: .027 }],
0x68: [.694, .011, .511, { oc: .024 }],
0x69: [.654, .011, .307, { oc: .051 }],
0x6A: [.654, .205, .307, { oc: .051 }],
0x6B: [.694, .011, .46, { oc: .042 }],
0x6C: [.694, .011, .256, { oc: .05 }],
0x6D: [.442, .011, .818, { oc: .024 }],
0x6E: [.442, .011, .562, { oc: .024 }],
0x6F: [.442, .011, .511],
0x70: [.442, .194, .511],
0x71: [.442, .194, .46, { oc: .037 }],
0x72: [.442, .011, .422, { oc: .067 }],
0x73: [.442, .011, .409, { oc: .01 }],
0x74: [.626, .011, .332, { oc: .041 }],
0x75: [.442, .011, .537, { oc: .024 }],
0x76: [.442, .011, .46, { oc: .033 }],
0x77: [.442, .011, .664, { oc: .033 }],
0x78: [.442, .011, .464, { oc: .054 }],
0x79: [.442, .205, .486, { oc: .03 }],
0x7A: [.442, .011, .409, { oc: .055 }]
};
//# sourceMappingURL=tex-mathit.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/tex-calligraphic.js
const texCalligraphic = {};
//# sourceMappingURL=tex-calligraphic.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/tex-calligraphic-bold.js
const texCalligraphicBold = {};
//# sourceMappingURL=tex-calligraphic-bold.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/tex-oldstyle.js
const texOldstyle = {
0x30: [.472, .022, .57],
0x31: [.472, 0, .404],
0x32: [.472, 0, .554],
0x33: [.472, .216, .563],
0x34: [.485, .194, .517],
0x35: [.472, .216, .547],
0x36: [.666, .022, .563],
0x37: [.485, .213, .503],
0x38: [.666, .022, .563],
0x39: [.472, .216, .563]
};
//# sourceMappingURL=tex-oldstyle.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/tex-oldstyle-bold.js
const texOldstyleBold = {
0x30: [.461, .011, .654],
0x31: [.461, 0, .494],
0x32: [.461, 0, .636],
0x33: [.461, .205, .648],
0x34: [.488, .194, .595],
0x35: [.461, .205, .63],
0x36: [.655, .011, .648],
0x37: [.488, .199, .579],
0x38: [.655, .011, .648],
0x39: [.461, .205, .648]
};
//# sourceMappingURL=tex-oldstyle-bold.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/tex-variant.js
const texVariant = {
0x2018: [.549, -.096, .407],
0x2019: [.549, -.096, .407],
0x201A: [.549, -.096, .407],
0x201B: [.549, -.096, .407],
0x201C: [.549, -.096, .647],
0x201D: [.549, -.096, .647],
0x201E: [.549, -.096, .647],
0x201F: [.549, -.096, .647],
0x2032: [.549, -.096, .407],
0x2033: [.549, -.096, .647],
0x2034: [.549, -.096, .887],
0x2035: [.549, -.096, .407],
0x2036: [.549, -.096, .647],
0x2037: [.549, -.096, .887],
0x2057: [.549, -.096, 1.127],
0x210F: [.694, .011, .511, { ic: .024 }],
0x2190: [.437, -.063, .5],
0x2192: [.437, -.063, .5],
0x2205: [.597, .097, .778],
0x2212: [.27, -.23, .5],
0x2216: [.431, .022, .777],
0x221A: [.75, .25, .833, { ic: .02 }],
0x221D: [.472, -.028, .777],
0x2223: [.431, .022, .222],
0x2224: [.431, .022, .222, { ic: .019 }],
0x2225: [.431, .022, .388],
0x2226: [.431, .022, .388, { ic: .02 }],
0x223C: [.367, -.133, .777],
0x2248: [.483, -.056, .777],
0x2268: [.753, .276, .777],
0x2269: [.753, .276, .777],
0x2270: [.92, .42, .777],
0x2271: [.92, .42, .777],
0x2288: [.828, .328, .777],
0x2289: [.828, .328, .777],
0x228A: [.636, .248, .777],
0x228B: [.636, .248, .777],
0x22C6: [.485, -.019, .5],
0x2322: [.378, -.122, .777],
0x2323: [.378, -.142, .777],
0x2A87: [.803, .303, .777],
0x2A88: [.803, .303, .777],
0x2ACB: [.753, .325, .777],
0x2ACC: [.753, .325, .777]
};
//# sourceMappingURL=tex-variant.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/lf-tp.js
const lfTp = {
0x20D0: [.711, -.601, .208],
0x20D6: [.711, -.521, .205],
0x20ED: [-.171, .281, .208],
0x20EE: [-.091, .281, .205],
0x2190: [.51, .01, .507],
0x2191: [.505, 0, .5],
0x219A: [.51, .01, .386],
0x219E: [.51, .01, .507],
0x219F: [.505, 0, .572],
0x21A3: [.51, .01, .58],
0x21A6: [.51, .011, .499],
0x21A7: [.498, 0, .632],
0x21AA: [.546, -.226, .507],
0x21AC: [.55, .05, .507],
0x21BC: [.499, -.226, .513],
0x21BD: [.273, 0, .512],
0x21BE: [.513, 0, .441],
0x21BF: [.513, 0, .441],
0x21C4: [.432, .172, .515],
0x21C5: [.514, 0, .896],
0x21C6: [.669, -.065, .514],
0x21C7: [.75, .25, .507],
0x21C8: [.505, 0, .992],
0x21CB: [.598, -.131, .515],
0x21CC: [.369, .098, .514],
0x21CD: [.52, .02, .384],
0x21D0: [.52, .02, .504],
0x21D1: [.504, 0, .652],
0x21DA: [.617, .117, .506],
0x21F5: [.515, 0, .896],
0x221A: [.62, 0, 1.056, { ic: .013 }],
0x23B4: [.772, -.504, 1.493],
0x23B5: [-.074, .342, 1.493],
0x23DC: [.796, -.502, 2.016],
0x23DD: [-.072, .366, 2.016],
0x23DE: [.724, -.493, 1.002],
0x23DF: [-.062, .294, 1.002],
0x23E0: [.873, -.605, 2.041],
0x23E1: [-.175, .443, 2.041],
0x27E6: [1, 0, 1.007],
0x27E7: [1, 0, 1.007],
0x27EE: [1.526, 0, .647],
0x27EF: [1.526, 0, .647],
0x294C: [.513, 0, .616],
0x294D: [.513, 0, .616],
0x2B31: [.99, .49, .507]
};
//# sourceMappingURL=lf-tp.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/rt-bt.js
const rtBt = {
0x20D1: [.711, -.601, .208],
0x20D7: [.711, -.521, .205],
0x20EC: [-.171, .281, .208],
0x20EF: [-.091, .281, .205],
0x2192: [.51, .01, .507],
0x2193: [.505, 0, .5],
0x219B: [.51, .01, .386],
0x21A0: [.51, .01, .507],
0x21A1: [.505, 0, .572],
0x21A2: [.51, .01, .58],
0x21A4: [.51, .011, .499],
0x21A5: [.498, 0, .632],
0x21A9: [.546, -.226, .507],
0x21AB: [.55, .05, .507],
0x21C0: [.499, -.226, .513],
0x21C1: [.273, 0, .513],
0x21C2: [.513, 0, .441],
0x21C3: [.513, 0, .441],
0x21C4: [.669, -.065, .514],
0x21C5: [.515, 0, .896],
0x21C6: [.432, .172, .515],
0x21C9: [.75, .25, .507],
0x21CA: [.505, 0, .992],
0x21CB: [.369, .098, .514],
0x21CC: [.598, -.131, .515],
0x21CE: [.52, .02, .406],
0x21D2: [.52, .02, .504],
0x21D3: [.504, 0, .652],
0x21DB: [.617, .117, .506],
0x21F5: [.514, 0, .896],
0x21F6: [.99, .49, .507],
0x23B4: [.772, -.504, 1.492],
0x23B5: [-.074, .342, 1.492],
0x23DC: [.796, -.502, 2.016],
0x23DD: [-.072, .366, 2.016],
0x23DE: [.724, -.493, 1.001],
0x23DF: [-.062, .294, 1.001],
0x23E0: [.873, -.605, 2.041, { ic: .006 }],
0x23E1: [-.175, .443, 2.041, { ic: .006 }],
0x27E6: [1, 0, 1.007],
0x27E7: [1, 0, 1.007],
0x27EE: [1.526, 0, .647],
0x27EF: [1.526, 0, .647],
0x294C: [.513, 0, .616],
0x294D: [.513, 0, .616]
};
//# sourceMappingURL=rt-bt.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/ex-md.js
const exMd = {
0x5F: [-.188, .294, .994],
0x7B: [.748, 0, .902],
0xAF: [.724, -.618, .994],
0x305: [.67, -.63, .19],
0x20D0: [.631, -.601, .139],
0x2190: [.274, -.226, .337],
0x2191: [.337, 0, .5],
0x219A: [.51, .01, .386],
0x21A9: [.274, -.226, .337],
0x21BC: [.273, -.226, .341],
0x21BE: [.341, 0, .441],
0x21BF: [.341, 0, .441],
0x21C4: [.432, -.065, .343],
0x21C5: [.343, 0, .896],
0x21C7: [.512, .012, .337],
0x21C8: [.337, 0, .992],
0x21CB: [.369, -.131, .343],
0x21CD: [.52, .02, .384],
0x21CE: [.369, -.131, .102],
0x21D0: [.369, -.131, .336],
0x21D1: [.336, 0, .652],
0x21DA: [.466, -.034, .337],
0x21F6: [.751, .251, .337],
0x221A: [.64, 0, 1.056],
0x23B4: [.772, -.706, .995],
0x23B5: [-.276, .342, .995],
0x23DC: [.796, -.689, .994],
0x23DD: [-.259, .366, .994],
0x23DE: [.85, -.618, 2.003],
0x23DF: [-.188, .419, 2.003],
0x23E0: [.873, -.766, 1.36],
0x23E1: [-.336, .443, 1.36],
0x27E6: [1, 0, 1.007],
0x27E7: [1, 0, 1.007],
0x27EE: [.998, 0, .647],
0x27EF: [.998, 0, .647],
0x294C: [.337, 0, .616]
};
//# sourceMappingURL=ex-md.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/bbold.js
const bbold = {
0x2102: [.705, .022, .722, { sk: .042 }],
0x210D: [.683, 0, .833, { sk: .052 }],
0x2115: [.683, 0, .833],
0x2119: [.683, 0, .736],
0x211A: [.705, .194, .778],
0x211D: [.683, .022, .792],
0x2124: [.683, 0, .75, { sk: .021 }],
0x213C: [.431, .011, .687, { sk: .085 }],
0x213D: [.442, .215, .518, { ic: .025, sk: .098 }],
0x213E: [.68, 0, .737, { sk: .026 }],
0x213F: [.68, 0, .862, { sk: .056 }],
0x2140: [.683, 0, .839, { sk: .048 }],
0x2145: [.683, 0, .794, { ic: .023, sk: .115 }],
0x2146: [.694, .011, .673, { ic: .042, sk: .245 }],
0x2147: [.448, .011, .444, { ic: .03, sk: .082 }],
0x2148: [.691, 0, .395, { ic: .028, sk: .119 }],
0x2149: [.691, .205, .423, { ic: .038, sk: .12 }],
0x1D538: [.683, 0, .863, { sk: -.025 }],
0x1D539: [.683, 0, .764],
0x1D53B: [.683, 0, .794, { sk: -.043 }],
0x1D53C: [.68, 0, .736, { sk: .03 }],
0x1D53D: [.68, 0, .709, { sk: .013 }],
0x1D53E: [.705, .022, .785],
0x1D540: [.683, 0, .467, { sk: .015 }],
0x1D541: [.683, .022, .597, { sk: .065 }],
0x1D542: [.683, 0, .833, { sk: .022 }],
0x1D543: [.683, 0, .68, { sk: -.08 }],
0x1D544: [.684, 0, 1, { sk: .051 }],
0x1D546: [.705, .022, .778],
0x1D54A: [.705, .022, .556, { sk: -.018 }],
0x1D54B: [.677, 0, .754, { sk: .023 }],
0x1D54C: [.683, .022, .806, { sk: .045 }],
0x1D54D: [.683, .008, .804, { sk: .059 }],
0x1D54E: [.683, .022, 1.058, { sk: .015 }],
0x1D54F: [.683, 0, .866, { sk: .043 }],
0x1D550: [.683, 0, .868, { sk: .057 }],
0x1D552: [.448, .011, .614, { sk: -.013 }],
0x1D553: [.694, .011, .673, { sk: -.126 }],
0x1D554: [.448, .011, .444, { sk: .026 }],
0x1D555: [.694, .011, .673, { sk: .152 }],
0x1D556: [.448, .011, .444, { sk: .014 }],
0x1D557: [.705, 0, .423, { ic: .051, sk: -.028 }],
0x1D558: [.453, .206, .5, { sk: -.026 }],
0x1D559: [.694, 0, .676, { sk: -.117 }],
0x1D55A: [.691, 0, .395],
0x1D55B: [.691, .205, .423, { sk: .015 }],
0x1D55C: [.694, 0, .648, { sk: -.109 }],
0x1D55D: [.694, 0, .394, { sk: .018 }],
0x1D55E: [.442, 0, .95, { sk: -.037 }],
0x1D55F: [.442, 0, .673],
0x1D560: [.448, .011, .5],
0x1D561: [.442, .194, .673],
0x1D562: [.442, .194, .645, { sk: .019 }],
0x1D563: [.442, 0, .509, { sk: -.051 }],
0x1D564: [.448, .011, .394],
0x1D565: [.615, .011, .506, { sk: -.037 }],
0x1D566: [.442, .011, .673, { sk: .024 }],
0x1D567: [.431, .011, .635, { sk: .053 }],
0x1D568: [.431, .011, .635, { ic: .155, sk: .012 }],
0x1D569: [.431, 0, .645, { sk: .049 }],
0x1D56A: [.431, .205, .635, { sk: .05 }],
0x1D56B: [.431, 0, .561, { sk: .046 }],
0x1D7D8: [.666, .022, .5],
0x1D7D9: [.666, 0, .624, { sk: .025 }],
0x1D7DA: [.666, 0, .5],
0x1D7DB: [.666, .022, .5],
0x1D7DC: [.677, 0, .627, { sk: .11 }],
0x1D7DD: [.666, .022, .5, { sk: .011 }],
0x1D7DE: [.666, .022, .5, { sk: .013 }],
0x1D7DF: [.676, .022, .55, { sk: .038 }],
0x1D7E0: [.666, .022, .5],
0x1D7E1: [.666, .022, .5]
};
//# sourceMappingURL=bbold.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/upsmall.js
const upsmall = {
0x222B: [.805, .306, .665],
0x222C: [.805, .306, 1.035],
0x222D: [.805, .306, 1.405],
0x222E: [.81, .312, .665],
0x222F: [.805, .306, 1.035],
0x2230: [.805, .306, 1.405],
0x2231: [.805, .306, .695],
0x2232: [.805, .306, .665],
0x2233: [.805, .306, .665],
0x2A0C: [.805, .306, 1.775],
0x2A0D: [.805, .306, .665],
0x2A0E: [.805, .306, .665],
0x2A18: [.805, .306, .665],
0x2A19: [.805, .306, .665],
0x2A1A: [.805, .306, .665],
0x2A1B: [.967, .306, .665, { ic: .002 }],
0x2A1C: [.805, .468, .665],
0xE376: [.805, .306, .665],
0xE377: [.805, .306, .665],
0xE395: [.805, .306, .665],
0xE397: [.805, .306, .665],
0xE398: [.805, .306, .665],
0xE399: [.805, .306, .665],
0xE39A: [.805, .306, .665, { ic: .085 }],
0xE39B: [.798, .299, .695],
0xE3D3: [.805, .306, .665],
0xEA57: [.805, .306, .707]
};
//# sourceMappingURL=upsmall.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/uplarge.js
const uplarge = {
0x222B: [1.361, .861, .763],
0x222C: [1.361, .861, 1.175],
0x222D: [1.361, .861, 1.623],
0x222E: [1.363, .861, .899],
0x222F: [1.361, .861, 1.295],
0x2230: [1.361, .861, 1.699],
0x2231: [1.361, .861, .999],
0x2232: [1.361, .861, .999],
0x2233: [1.361, .861, .999],
0x2A0B: [1.361, .861, 1.056],
0x2A0C: [1.361, .861, 2.019],
0x2A0D: [1.361, .861, .999],
0x2A0E: [1.361, .861, .999],
0x2A0F: [1.361, .861, .999],
0x2A10: [1.361, .861, .999],
0x2A11: [1.361, .861, .999],
0x2A12: [1.361, .861, .895],
0x2A13: [1.361, .861, .871],
0x2A14: [1.361, .861, .831, { ic: .077 }],
0x2A15: [1.361, .861, .903],
0x2A16: [1.361, .861, .883],
0x2A17: [1.361, .861, .967],
0x2A18: [1.361, .861, .875],
0x2A19: [1.361, .861, .955],
0x2A1A: [1.361, .861, .967],
0x2A1B: [1.602, .861, .999],
0x2A1C: [1.361, 1.124, .807]
};
//# sourceMappingURL=uplarge.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/script.js
const script = {};
//# sourceMappingURL=script.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/script-bold.js
const scriptBold = {};
//# sourceMappingURL=script-bold.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/delimiters.js
const delimiters = {
0x28: {
dir: V,
sizes: [.997, 1.095, 1.195, 1.445, 1.793, 2.093, 2.393, 2.991],
stretch: [0x239B, 0x239C, 0x239D],
HDW: [.748, .248, .875]
},
0x29: {
dir: V,
sizes: [.997, 1.095, 1.195, 1.445, 1.793, 2.093, 2.393, 2.991],
stretch: [0x239E, 0x239F, 0x23A0],
HDW: [.748, .248, .875]
},
0x2D: {
c: 0x2212,
dir: H,
stretch: [0, 0x2212],
HDW: [0.583, 0.083, .778],
ext: 0.112,
hd: [.583, .083]
},
0x2F: {
dir: V,
sizes: [1.001, 1.311, 1.717, 2.249, 2.945, 3.859, 5.055, 6.621]
},
0x3D: {
dir: H,
stretch: [0, 0x3D],
HDW: [0.367, -0.133, .778],
ext: 0.112,
hd: [.367, -.133]
},
0x5B: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
stretch: [0x23A1, 0x23A2, 0x23A3],
HDW: [.75, .25, .667]
},
0x5C: {
dir: V,
sizes: [1.001, 1.311, 1.717, 2.249, 2.945, 3.859, 5.055, 6.621]
},
0x5D: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
stretch: [0x23A4, 0x23A5, 0x23A6],
HDW: [.75, .25, .667]
},
0x5E: {
c: 0x302,
dir: H,
sizes: [.5, .644, .768, .919, 1.1, 1.32, 1.581, 1.896]
},
0x5F: {
c: 0x2013,
dir: H,
stretch: [0, 0x2013],
HDW: [0.277, -0.255, .5],
ext: 0.001,
hd: [.277, -.255]
},
0x7B: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
stretch: [0x23A7, 0x7B, 0x23A9, 0x23A8],
stretchv: [0, 1, 0, 0],
HDW: [.75, .25, .902]
},
0x7C: {
dir: V,
sizes: [1.001, 1.203, 1.443, 1.735, 2.085, 2.505, 3.005, 3.605],
schar: [0x7C, 0x2223],
stretch: [0, 0x2223],
stretchv: [0, 2],
HDW: [.75, .25, .333]
},
0x7D: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
stretch: [0x23AB, 0x7B, 0x23AD, 0x23AC],
stretchv: [0, 1, 0, 0],
HDW: [.75, .25, .902]
},
0x7E: {
c: 0x303,
dir: H,
sizes: [.5, .652, .778, .931, 1.115, 1.335, 1.599, 1.915]
},
0xAF: {
c: 0x305,
dir: H,
sizes: [.392, .568],
stretch: [0, 0x305],
stretchv: [0, 1],
HDW: [0.67, -0.63, 0],
hd: [.67, -.63]
},
0x2C6: {
c: 0x302,
dir: H,
sizes: [.5, .644, .768, .919, 1.1, 1.32, 1.581, 1.896]
},
0x2C7: {
c: 0x30C,
dir: H,
sizes: [.366, .644, .768, .919, 1.1, 1.32, 1.581, 1.896]
},
0x2C9: {
c: 0x305,
dir: H,
sizes: [.392, .568],
stretch: [0, 0x305],
stretchv: [0, 1],
HDW: [0.67, -0.63, 0],
hd: [.67, -.63]
},
0x2D8: {
c: 0x306,
dir: H,
sizes: [.376, .658, .784, .937, 1.12, 1.341, 1.604, 1.92]
},
0x2DC: {
c: 0x303,
dir: H,
sizes: [.5, .652, .778, .931, 1.115, 1.335, 1.599, 1.915]
},
0x302: {
dir: H,
sizes: [.5, .644, .768, .919, 1.1, 1.32, 1.581, 1.896]
},
0x303: {
dir: H,
sizes: [.5, .652, .778, .931, 1.115, 1.335, 1.599, 1.915]
},
0x305: {
dir: H,
sizes: [.392, .568],
stretch: [0, 0x305],
stretchv: [0, 1],
HDW: [0.67, -0.63, 0],
hd: [.67, -.63]
},
0x306: {
dir: H,
sizes: [.376, .658, .784, .937, 1.12, 1.341, 1.604, 1.92]
},
0x30C: {
dir: H,
sizes: [.366, .644, .768, .919, 1.1, 1.32, 1.581, 1.896]
},
0x2013: {
dir: H,
stretch: [0, 0x2013],
HDW: [0.277, -0.255, .5],
ext: 0.001,
hd: [.277, -.255]
},
0x2014: {
dir: H,
stretch: [0, 0x2014],
HDW: [0.277, -0.255, 1],
ext: 0.001,
hd: [.277, -.255]
},
0x2015: {
dir: H,
stretch: [0, 0x2015],
HDW: [0.27, -0.23, 1.152],
ext: 0.112,
hd: [.27, -.23]
},
0x2016: {
dir: V,
sizes: [1.001, 1.203, 1.443, 1.735, 2.085, 2.503, 3.004, 3.607],
schar: [0x2016, 0x2225],
stretch: [0, 0x2225],
stretchv: [0, 2],
HDW: [.75, .25, .555]
},
0x203E: {
c: 0xAF,
dir: H,
sizes: [.392, .568],
stretch: [0, 0x305],
stretchv: [0, 1],
HDW: [0.67, -0.63, 0],
hd: [.67, -.63]
},
0x2044: {
dir: V,
sizes: [1.001, 1.311, 1.717, 2.249, 2.945, 3.859, 5.055, 6.621]
},
0x20D0: {
dir: H,
sizes: [.422, .667],
stretch: [0x20D0, 0x20D0],
stretchv: [3, 1],
HDW: [0.711, -0.601, 0],
hd: [.631, -.601]
},
0x20D1: {
dir: H,
sizes: [.422, .667],
stretch: [0, 0x20D0, 0x20D1],
stretchv: [0, 1, 4],
HDW: [0.711, -0.601, 0],
hd: [.631, -.601]
},
0x20D6: {
dir: H,
sizes: [.416, .659],
stretch: [0x20D6, 0x20D0],
stretchv: [3, 1],
HDW: [0.711, -0.521, 0],
hd: [.631, -.601]
},
0x20D7: {
dir: H,
sizes: [.416, .659],
stretch: [0, 0x20D0, 0x20D7],
stretchv: [0, 1, 4],
HDW: [0.711, -0.521, 0],
hd: [.631, -.601]
},
0x20E1: {
dir: H,
sizes: [.47, .715],
stretch: [0x20D6, 0x20D0, 0x20D7],
stretchv: [3, 1, 4],
HDW: [0.711, -0.521, 0],
hd: [.631, -.601]
},
0x20EC: {
dir: H,
sizes: [.422, .667],
stretch: [0, 0x34D, 0x20EC],
stretchv: [0, 1, 4],
HDW: [-0.171, 0.281, 0],
hd: [-.171, .201]
},
0x20ED: {
dir: H,
sizes: [.422, .667],
stretch: [0x20ED, 0x34D],
stretchv: [3, 1],
HDW: [-0.171, 0.281, 0],
hd: [-.171, .201]
},
0x20EE: {
dir: H,
sizes: [.416, .659],
stretch: [0x20EE, 0x34D],
stretchv: [3, 1],
HDW: [-0.091, 0.281, 0],
hd: [-.171, .201]
},
0x20EF: {
dir: H,
sizes: [.416, .659],
stretch: [0, 0x34D, 0x20EF],
stretchv: [0, 1, 4],
HDW: [-0.091, 0.281, 0],
hd: [-.171, .201]
},
0x2140: {
dir: V,
sizes: [.684, 1.401],
variants: [0, 2]
},
0x2190: {
dir: H,
sizes: [1, 1.463],
variants: [0, 0],
schar: [0x2190, 0x27F5],
stretch: [0x2190, 0x2190],
stretchv: [3, 1],
HDW: [0.51, 0.01, 1],
hd: [.274, -.226]
},
0x2191: {
dir: V,
sizes: [.883, 1.349],
variants: [0, 2],
stretch: [0x2191, 0x2191],
stretchv: [3, 1],
HDW: [.679, .203, .5]
},
0x2192: {
dir: H,
sizes: [1, 1.463],
variants: [0, 0],
schar: [0x2192, 0x27F6],
stretch: [0, 0x2190, 0x2192],
stretchv: [0, 1, 4],
HDW: [0.51, 0.01, 1],
hd: [.274, -.226]
},
0x2193: {
dir: V,
sizes: [.883, 1.349],
variants: [0, 2],
stretch: [0, 0x2191, 0x2193],
stretchv: [0, 1, 4],
HDW: [.703, .179, .5]
},
0x2194: {
dir: H,
sizes: [1, 1.442],
variants: [0, 0],
schar: [0x2194, 0x27F7],
stretch: [0x2190, 0x2190, 0x2192],
stretchv: [3, 1, 4],
HDW: [0.51, 0.01, 1],
hd: [.274, -.226]
},
0x2195: {
dir: V,
sizes: [1.015, 1.015],
variants: [0, 2],
stretch: [0x2191, 0x2191, 0x2193],
stretchv: [3, 1, 4],
HDW: [.757, .257, .5]
},
0x2196: {
dir: V,
sizes: [.918, 1.384],
variants: [0, 2]
},
0x2197: {
dir: V,
sizes: [.918, 1.384],
variants: [0, 2]
},
0x2198: {
dir: V,
sizes: [.918, 1.384],
variants: [0, 2]
},
0x2199: {
dir: V,
sizes: [.918, 1.384],
variants: [0, 2]
},
0x219A: {
dir: H,
sizes: [.997, 1.463],
variants: [0, 2],
stretch: [0x219A, 0x2190, 0, 0x219A],
stretchv: [3, 1, 0, 1],
HDW: [0.51, 0.01, .997],
hd: [.274, -.226]
},
0x219B: {
dir: H,
sizes: [.997, 1.463],
variants: [0, 2],
stretch: [0, 0x2190, 0x219B, 0x219A],
stretchv: [0, 1, 4, 1],
HDW: [0.51, 0.01, .997],
hd: [.274, -.226]
},
0x219E: {
dir: H,
sizes: [1.017, 1.463],
variants: [0, 2],
stretch: [0x219E, 0x2190],
stretchv: [3, 1],
HDW: [0.51, 0.01, 1.017],
hd: [.274, -.226]
},
0x21A0: {
dir: H,
sizes: [1.017, 1.463],
variants: [0, 2],
stretch: [0, 0x2190, 0x21A0],
stretchv: [0, 1, 4],
HDW: [0.51, 0.01, 1.017],
hd: [.274, -.226]
},
0x21A2: {
dir: H,
sizes: [1.192, 1.658],
variants: [0, 2],
stretch: [0x2190, 0x2190, 0x21A2],
stretchv: [3, 1, 4],
HDW: [0.51, 0.01, 1.192],
hd: [.274, -.226]
},
0x21A3: {
dir: H,
sizes: [1.192, 1.658],
variants: [0, 2],
stretch: [0x21A3, 0x2190, 0x2192],
stretchv: [3, 1, 4],
HDW: [0.51, 0.01, 1.192],
hd: [.274, -.226]
},
0x21A4: {
dir: H,
sizes: [.977, 1.443],
variants: [0, 0],
schar: [0x21A4, 0x27FB],
stretch: [0x2190, 0x2190, 0x21A4],
stretchv: [3, 1, 4],
HDW: [0.51, 0.011, .977],
hd: [.274, -.226]
},
0x21A6: {
dir: H,
sizes: [.977, 1.443],
variants: [0, 0],
schar: [0x21A6, 0x27FC],
stretch: [0x21A6, 0x2190, 0x2192],
stretchv: [3, 1, 4],
HDW: [0.51, 0.011, .977],
hd: [.274, -.226]
},
0x21A9: {
dir: H,
sizes: [.997, 1.463],
variants: [0, 2],
stretch: [0x2190, 0x21A9, 0x21A9],
stretchv: [3, 1, 4],
HDW: [0.546, 0.01, .997],
hd: [.274, -.226]
},
0x21AA: {
dir: H,
sizes: [.997, 1.463],
variants: [0, 2],
stretch: [0x21AA, 0x21A9, 0x2192],
stretchv: [3, 1, 4],
HDW: [0.546, 0.01, .997],
hd: [.274, -.226]
},
0x21AB: {
dir: H,
sizes: [.997, 1.463],
variants: [0, 2],
stretch: [0x2190, 0x21A9, 0x21AB],
stretchv: [3, 1, 4],
HDW: [0.55, 0.05, .997],
hd: [.274, -.226]
},
0x21AC: {
dir: H,
sizes: [.997, 1.463],
variants: [0, 2],
stretch: [0x21AC, 0x21A9, 0x2192],
stretchv: [3, 1, 4],
HDW: [0.55, 0.05, .997],
hd: [.274, -.226]
},
0x21B6: {
dir: H,
sizes: [.98, 1.33],
variants: [0, 2]
},
0x21B7: {
dir: H,
sizes: [.98, 1.33],
variants: [0, 2]
},
0x21BC: {
dir: H,
sizes: [1, 1.478],
variants: [0, 2],
stretch: [0x21BC, 0x21BC],
stretchv: [3, 1],
HDW: [0.499, -0.226, 1],
hd: [.273, -.226]
},
0x21BD: {
dir: H,
sizes: [1.012, 1.478],
variants: [0, 2],
stretch: [0x21BD, 0x21BC],
stretchv: [3, 1],
HDW: [0.273, 0, 1.012],
hd: [.273, -.226]
},
0x21BE: {
dir: V,
sizes: [.901, 1.367],
variants: [0, 2],
stretch: [0x21BE, 0x21BE],
stretchv: [3, 1],
HDW: [.697, .203, .441]
},
0x21BF: {
dir: V,
sizes: [.901, 1.367],
variants: [0, 2],
stretch: [0x21BF, 0x21BF],
stretchv: [3, 1],
HDW: [.697, .203, .441]
},
0x21C0: {
dir: H,
sizes: [1, 1.478],
variants: [0, 2],
stretch: [0, 0x21BC, 0x21C0],
stretchv: [0, 1, 4],
HDW: [0.499, -0.226, 1],
hd: [.273, -.226]
},
0x21C1: {
dir: H,
sizes: [1.012, 1.478],
variants: [0, 2],
stretch: [0, 0x21BC, 0x21C1],
stretchv: [0, 1, 4],
HDW: [0.273, 0, 1.012],
hd: [.273, -.226]
},
0x21C2: {
dir: V,
sizes: [.901, 1.367],
variants: [0, 2],
stretch: [0, 0x21BE, 0x21C2],
stretchv: [0, 1, 4],
HDW: [.703, .197, .441]
},
0x21C3: {
dir: V,
sizes: [.901, 1.367],
variants: [0, 2],
stretch: [0, 0x21BF, 0x21C3],
stretchv: [0, 1, 4],
HDW: [.703, .197, .441]
},
0x21C4: {
dir: H,
sizes: [1.018, 1.484],
variants: [0, 2],
stretch: [0x21C4, 0x21C4, 0x21C4],
stretchv: [3, 1, 4],
HDW: [0.669, 0.172, 1.018],
hd: [.432, -.065]
},
0x21C5: {
dir: V,
sizes: [.907, 1.373],
variants: [0, 2],
stretch: [0x21C5, 0x21C5, 0x21C5],
stretchv: [3, 1, 4],
HDW: [.703, .203, .896]
},
0x21C6: {
dir: H,
sizes: [1.018, 1.484],
variants: [0, 2],
stretch: [0x21C6, 0x21C4, 0x21C6],
stretchv: [3, 1, 4],
HDW: [0.669, 0.172, 1.018],
hd: [.432, -.065]
},
0x21C7: {
dir: H,
sizes: [.997, 1.463],
variants: [0, 2],
stretch: [0x21C7, 0x21C7],
stretchv: [3, 1],
HDW: [0.75, 0.25, .997],
hd: [.512, .012]
},
0x21C8: {
dir: V,
sizes: [.883, 1.349],
variants: [0, 2],
stretch: [0x21C8, 0x21C8],
stretchv: [3, 1],
HDW: [.679, .203, .992]
},
0x21C9: {
dir: H,
sizes: [.997, 1.463],
variants: [0, 2],
stretch: [0, 0x21C7, 0x21C9],
stretchv: [0, 1, 4],
HDW: [0.75, 0.25, .997],
hd: [.512, .012]
},
0x21CA: {
dir: V,
sizes: [.883, 1.349],
variants: [0, 2],
stretch: [0, 0x21C8, 0x21CA],
stretchv: [0, 1, 4],
HDW: [.703, .179, .992]
},
0x21CB: {
dir: H,
sizes: [1.018, 1.484],
variants: [0, 2],
stretch: [0x21CB, 0x21CB, 0x21CB],
stretchv: [3, 1, 4],
HDW: [0.598, 0.098, 1.018],
hd: [.369, -.131]
},
0x21CC: {
dir: H,
sizes: [1.018, 1.484],
variants: [0, 2],
stretch: [0x21CC, 0x21CB, 0x21CC],
stretchv: [3, 1, 4],
HDW: [0.598, 0.098, 1.018],
hd: [.369, -.131]
},
0x21CD: {
dir: H,
sizes: [.991, 1.457],
variants: [0, 2],
stretch: [0x21CD, 0x21CE, 0, 0x21CD],
stretchv: [3, 1, 0, 1],
HDW: [0.52, 0.02, .991],
hd: [.369, -.131]
},
0x21CE: {
dir: H,
sizes: [1.068, 1.534],
variants: [0, 2],
stretch: [0x21D0, 0x21CE, 0x21D2, 0x21CD],
stretchv: [3, 1, 4, 1],
HDW: [0.52, 0.02, 1.068],
hd: [.369, -.131]
},
0x21CF: {
dir: H,
sizes: [.991, 1.457],
variants: [0, 2],
stretch: [0, 0x21CE, 0x21D2, 0x21CD],
stretchv: [0, 1, 4, 1],
HDW: [0.52, 0.02, .991],
hd: [.369, -.131]
},
0x21D0: {
dir: H,
sizes: [1, 1.457],
variants: [0, 0],
schar: [0x21D0, 0x27F8],
stretch: [0x21D0, 0x21D0],
stretchv: [3, 1],
HDW: [0.52, 0.02, 1],
hd: [.369, -.131]
},
0x21D1: {
dir: V,
sizes: [.88, 1.346],
variants: [0, 2],
stretch: [0x21D1, 0x21D1],
stretchv: [3, 1],
HDW: [.676, .203, .652]
},
0x21D2: {
dir: H,
sizes: [1, 1.457],
variants: [0, 0],
schar: [0x21D2, 0x27F9],
stretch: [0, 0x21D0, 0x21D2],
stretchv: [0, 1, 4],
HDW: [0.52, 0.02, 1],
hd: [.369, -.131]
},
0x21D3: {
dir: V,
sizes: [.88, 1.346],
variants: [0, 2],
stretch: [0, 0x21D1, 0x21D3],
stretchv: [0, 1, 4],
HDW: [.703, .176, .652]
},
0x21D4: {
dir: H,
sizes: [1, 1.534],
variants: [0, 0],
schar: [0x21D4, 0x27FA],
stretch: [0x21D0, 0x21D0, 0x21D2],
stretchv: [3, 1, 4],
HDW: [0.52, 0.02, 1],
hd: [.369, -.131]
},
0x21D5: {
dir: V,
sizes: [.957, 1.423],
variants: [0, 2],
stretch: [0x21D1, 0x21D1, 0x21D3],
stretchv: [3, 1, 4],
HDW: [.728, .228, .652]
},
0x21DA: {
dir: H,
sizes: [1.015, 1.461],
variants: [0, 2],
stretch: [0x21DA, 0x21DA],
stretchv: [3, 1],
HDW: [0.617, 0.117, 1.015],
hd: [.466, -.034]
},
0x21DB: {
dir: H,
sizes: [1.015, 1.461],
variants: [0, 2],
stretch: [0, 0x21DA, 0x21DB],
stretchv: [0, 1, 4],
HDW: [0.617, 0.117, 1.015],
hd: [.466, -.034]
},
0x21F5: {
dir: V,
sizes: [.907, 1.373],
variants: [0, 2],
stretch: [0x21F5, 0x21C5, 0x21F5],
stretchv: [3, 1, 4],
HDW: [.703, .203, .896]
},
0x21F6: {
dir: H,
sizes: [.997, 1.463],
variants: [0, 2],
stretch: [0, 0x21F6, 0x21F6],
stretchv: [0, 1, 4],
HDW: [0.99, 0.49, .997],
hd: [.751, .251]
},
0x220F: {
dir: V,
sizes: [1.001, 1.401],
variants: [0, 2]
},
0x2210: {
dir: V,
sizes: [1.001, 1.401],
variants: [0, 2]
},
0x2211: {
dir: V,
sizes: [1.001, 1.401],
variants: [0, 2]
},
0x2212: {
dir: H,
stretch: [0, 0x2212],
HDW: [0.583, 0.083, .778],
ext: 0.112,
hd: [.583, .083]
},
0x2215: {
c: 0x2F,
dir: V,
sizes: [1.001, 1.311, 1.717, 2.249, 2.945, 3.859, 5.055, 6.621]
},
0x221A: {
dir: V,
sizes: [1.001, 1.201, 1.801, 2.401, 3.001],
stretch: [0x221A, 0x221A, 0x23B7],
stretchv: [3, 1, 0],
HDW: [.04, .96, 1.056],
fullExt: [0.64, 2.44]
},
0x2223: {
dir: V,
sizes: [1.001, 1.203, 1.443, 1.735, 2.085, 2.505, 3.005, 3.605],
stretch: [0, 0x2223],
stretchv: [0, 2],
HDW: [.75, .25, .333]
},
0x2225: {
dir: V,
sizes: [1.001, 1.203, 1.443, 1.735, 2.085, 2.503, 3.004, 3.607],
stretch: [0, 0x2225],
stretchv: [0, 2],
HDW: [.75, .25, .555]
},
0x222B: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2],
stretch: [0x2320, 0x23AE, 0x2321],
HDW: [.805, .306, 1.185]
},
0x222C: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x222D: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x222E: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x222F: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2230: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2231: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2232: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2233: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2261: {
dir: H,
stretch: [0, 0x2261],
HDW: [0.464, -0.036, .778],
ext: 0.112,
hd: [.464, -.036]
},
0x2263: {
dir: H,
stretch: [0, 0x2263],
HDW: [0.561, 0.061, .778],
ext: 0.112,
hd: [.561, .061]
},
0x22A2: {
dir: V,
sizes: [.685, .869],
variants: [0, 0],
schar: [0x22A2, 0x27DD]
},
0x22A3: {
dir: V,
sizes: [.685, .869],
variants: [0, 0],
schar: [0x22A3, 0x27DE]
},
0x22A4: {
dir: V,
sizes: [.685, .869],
variants: [0, 0],
schar: [0x22A4, 0x27D9]
},
0x22A5: {
dir: V,
sizes: [.685, .869],
variants: [0, 0],
schar: [0x22A5, 0x27D8]
},
0x22C0: {
dir: V,
sizes: [1.045, 1.394],
variants: [0, 2]
},
0x22C1: {
dir: V,
sizes: [1.045, 1.394],
variants: [0, 2]
},
0x22C2: {
dir: V,
sizes: [1.023, 1.357],
variants: [0, 2]
},
0x22C3: {
dir: V,
sizes: [1.023, 1.357],
variants: [0, 2]
},
0x2308: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
stretch: [0x23A1, 0x23A2],
HDW: [.75, .25, .667]
},
0x2309: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
stretch: [0x23A4, 0x23A5],
HDW: [.75, .25, .667]
},
0x230A: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
stretch: [0, 0x23A2, 0x23A3],
HDW: [.75, .25, .667]
},
0x230B: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
stretch: [0, 0x23A5, 0x23A6],
HDW: [.75, .25, .667]
},
0x2312: {
c: 0x23DC,
dir: H,
sizes: [.504, 1.006, 1.508, 2.012, 2.516, 3.02, 3.524, 4.032],
stretch: [0x23DC, 0x23DC, 0x23DC],
stretchv: [3, 1, 4],
HDW: [0.796, -0.502, .504],
hd: [.796, -.689]
},
0x2322: {
c: 0x23DC,
dir: H,
sizes: [.504, 1.006, 1.508, 2.012, 2.516, 3.02, 3.524, 4.032],
stretch: [0x23DC, 0x23DC, 0x23DC],
stretchv: [3, 1, 4],
HDW: [0.796, -0.502, .504],
hd: [.796, -.689]
},
0x2323: {
c: 0x23DD,
dir: H,
sizes: [.504, 1.006, 1.508, 2.012, 2.516, 3.02, 3.524, 4.032],
stretch: [0x23DD, 0x23DD, 0x23DD],
stretchv: [3, 1, 4],
HDW: [-0.072, 0.366, .504],
hd: [-.259, .366]
},
0x2329: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
schar: [0x2329, 0x27E8]
},
0x232A: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
schar: [0x232A, 0x27E9]
},
0x23AA: {
dir: V,
sizes: [.748],
stretch: [0, 0x23AA],
HDW: [.748, 0, .902]
},
0x23AF: {
c: 0x2013,
dir: H,
stretch: [0, 0x2013],
HDW: [0.277, -0.255, .5],
ext: 0.001,
hd: [.277, -.255]
},
0x23B0: {
dir: V,
sizes: [1.125],
stretch: [0x23A7, 0x23AA, 0x23AD],
HDW: [.75, .375, .902]
},
0x23B1: {
dir: V,
sizes: [1.125],
stretch: [0x23AB, 0x23AA, 0x23A9],
HDW: [.75, .375, .902]
},
0x23B4: {
dir: H,
sizes: [.36, .735, 1.11, 1.485, 1.86, 2.235, 2.61, 2.985],
stretch: [0x23B4, 0x23B4, 0x23B4],
stretchv: [3, 1, 4],
HDW: [0.772, -0.504, .36],
hd: [.772, -.706]
},
0x23B5: {
dir: H,
sizes: [.36, .735, 1.11, 1.485, 1.86, 2.235, 2.61, 2.985],
stretch: [0x23B5, 0x23B5, 0x23B5],
stretchv: [3, 1, 4],
HDW: [-0.074, 0.342, .36],
hd: [-.276, .342]
},
0x23D0: {
dir: V,
sizes: [.642],
stretch: [0, 0x23D0],
HDW: [.642, 0, .333]
},
0x23DC: {
dir: H,
sizes: [.504, 1.006, 1.508, 2.012, 2.516, 3.02, 3.524, 4.032],
stretch: [0x23DC, 0x23DC, 0x23DC],
stretchv: [3, 1, 4],
HDW: [0.796, -0.502, .504],
hd: [.796, -.689]
},
0x23DD: {
dir: H,
sizes: [.504, 1.006, 1.508, 2.012, 2.516, 3.02, 3.524, 4.032],
stretch: [0x23DD, 0x23DD, 0x23DD],
stretchv: [3, 1, 4],
HDW: [-0.072, 0.366, .504],
hd: [-.259, .366]
},
0x23DE: {
dir: H,
sizes: [.492, .993, 1.494, 1.996, 2.498, 3, 3.502, 4.006],
stretch: [0x23DE, 0xAF, 0x23DE, 0x23DE],
stretchv: [3, 1, 4, 1],
HDW: [0.85, -0.493, .492],
hd: [.724, -.618]
},
0x23DF: {
dir: H,
sizes: [.492, .993, 1.494, 1.996, 2.498, 3, 3.502, 4.006],
stretch: [0x23DF, 0x5F, 0x23DF, 0x23DF],
stretchv: [3, 1, 4, 1],
HDW: [-0.062, 0.419, .492],
hd: [-.188, .294]
},
0x23E0: {
dir: H,
sizes: [.546, 1.048, 1.55, 2.056, 2.564, 3.068, 3.574, 4.082],
stretch: [0x23E0, 0x23E0, 0x23E0],
stretchv: [3, 1, 4],
HDW: [0.873, -0.605, .546],
hd: [.873, -.766]
},
0x23E1: {
dir: H,
sizes: [.546, 1.048, 1.55, 2.056, 2.564, 3.068, 3.574, 4.082],
stretch: [0x23E1, 0x23E1, 0x23E1],
stretchv: [3, 1, 4],
HDW: [-0.175, 0.443, .546],
hd: [-.336, .443]
},
0x2500: {
c: 0x2013,
dir: H,
stretch: [0, 0x2013],
HDW: [0.277, -0.255, .5],
ext: 0.001,
hd: [.277, -.255]
},
0x2758: {
c: 0x2223,
dir: V,
sizes: [1.001, 1.203, 1.443, 1.735, 2.085, 2.505, 3.005, 3.605],
stretch: [0, 0x2223],
stretchv: [0, 2],
HDW: [.75, .25, .333]
},
0x27D5: {
dir: V,
sizes: [.511, .628],
variants: [0, 2]
},
0x27D6: {
dir: V,
sizes: [.511, .628],
variants: [0, 2]
},
0x27D7: {
dir: V,
sizes: [.511, .628],
variants: [0, 2]
},
0x27E6: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
stretch: [0x27E6, 0x27E6, 0x27E6],
stretchv: [3, 1, 4],
HDW: [.75, .25, 1.007]
},
0x27E7: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001],
stretch: [0x27E7, 0x27E7, 0x27E7],
stretchv: [3, 1, 4],
HDW: [.75, .25, 1.007]
},
0x27E8: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001]
},
0x27E9: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001]
},
0x27EA: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001]
},
0x27EB: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001]
},
0x27EE: {
dir: V,
sizes: [1.025, 1.127, 1.229, 1.483, 1.837, 2.141, 2.445, 3.053],
stretch: [0x27EE, 0x27EE, 0x27EE],
stretchv: [3, 1, 4],
HDW: [.762, .262, .647]
},
0x27EF: {
dir: V,
sizes: [1.025, 1.127, 1.229, 1.483, 1.837, 2.141, 2.445, 3.053],
stretch: [0x27EF, 0x27EF, 0x27EF],
stretchv: [3, 1, 4],
HDW: [.762, .262, .647]
},
0x27F5: {
c: 0x2190,
dir: H,
sizes: [1, 1.463],
variants: [0, 0],
schar: [0x2190, 0x27F5],
stretch: [0x2190, 0x2190],
stretchv: [3, 1],
HDW: [0.51, 0.01, 1],
hd: [.274, -.226]
},
0x27F6: {
c: 0x2192,
dir: H,
sizes: [1, 1.463],
variants: [0, 0],
schar: [0x2192, 0x27F6],
stretch: [0, 0x2190, 0x2192],
stretchv: [0, 1, 4],
HDW: [0.51, 0.01, 1],
hd: [.274, -.226]
},
0x27F7: {
c: 0x2194,
dir: H,
sizes: [1, 1.442],
variants: [0, 0],
schar: [0x2194, 0x27F7],
stretch: [0x2190, 0x2190, 0x2192],
stretchv: [3, 1, 4],
HDW: [0.51, 0.01, 1],
hd: [.274, -.226]
},
0x27F8: {
c: 0x21D0,
dir: H,
sizes: [1, 1.457],
variants: [0, 0],
schar: [0x21D0, 0x27F8],
stretch: [0x21D0, 0x21D0],
stretchv: [3, 1],
HDW: [0.52, 0.02, 1],
hd: [.369, -.131]
},
0x27F9: {
c: 0x21D2,
dir: H,
sizes: [1, 1.457],
variants: [0, 0],
schar: [0x21D2, 0x27F9],
stretch: [0, 0x21D0, 0x21D2],
stretchv: [0, 1, 4],
HDW: [0.52, 0.02, 1],
hd: [.369, -.131]
},
0x27FA: {
c: 0x21D4,
dir: H,
sizes: [1, 1.534],
variants: [0, 0],
schar: [0x21D4, 0x27FA],
stretch: [0x21D0, 0x21D0, 0x21D2],
stretchv: [3, 1, 4],
HDW: [0.52, 0.02, 1],
hd: [.369, -.131]
},
0x27FB: {
c: 0x21A4,
dir: H,
sizes: [.977, 1.443],
variants: [0, 0],
schar: [0x21A4, 0x27FB],
stretch: [0x2190, 0x2190, 0x21A4],
stretchv: [3, 1, 4],
HDW: [0.51, 0.011, .977],
hd: [.274, -.226]
},
0x27FC: {
c: 0x21A6,
dir: H,
sizes: [.977, 1.443],
variants: [0, 0],
schar: [0x21A6, 0x27FC],
stretch: [0x21A6, 0x2190, 0x2192],
stretchv: [3, 1, 4],
HDW: [0.51, 0.011, .977],
hd: [.274, -.226]
},
0x294A: {
dir: H,
sizes: [1.012],
stretch: [0x21BC, 0x21BC, 0x21C1],
stretchv: [3, 1, 4],
HDW: [0.499, 0, 1.012],
hd: [.273, -.226]
},
0x294B: {
dir: H,
sizes: [1.012],
stretch: [0x21BD, 0x21BC, 0x21C0],
stretchv: [3, 1, 4],
HDW: [0.499, 0, 1.012],
hd: [.273, -.226]
},
0x294E: {
dir: H,
sizes: [1],
stretch: [0x21BC, 0x21BC, 0x21C0],
stretchv: [3, 1, 4],
HDW: [0.499, -0.226, 1],
hd: [.273, -.226]
},
0x2950: {
dir: H,
sizes: [1],
stretch: [0x21BD, 0x21BC, 0x21C1],
stretchv: [3, 1, 4],
HDW: [0.273, 0, 1],
hd: [.273, -.226]
},
0x295A: {
dir: H,
sizes: [1],
stretch: [0x21BC, 0x21BC, 0x21A4],
stretchv: [3, 1, 4],
HDW: [0.51, 0.011, 1],
hd: [.273, -.226]
},
0x295B: {
dir: H,
sizes: [1],
stretch: [0x21A6, 0x21BC, 0x21C0],
stretchv: [3, 1, 4],
HDW: [0.51, 0.011, 1],
hd: [.273, -.226]
},
0x295E: {
dir: H,
sizes: [1],
stretch: [0x21BD, 0x21BC, 0x21A4],
stretchv: [3, 1, 4],
HDW: [0.51, 0.011, 1],
hd: [.273, -.226]
},
0x295F: {
dir: H,
sizes: [1],
stretch: [0x21A6, 0x21BC, 0x21C1],
stretchv: [3, 1, 4],
HDW: [0.51, 0.011, 1],
hd: [.273, -.226]
},
0x2983: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001]
},
0x2984: {
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001]
},
0x2985: {
dir: V,
sizes: [.997, 1.095, 1.195, 1.445, 1.793, 2.093, 2.393, 2.991]
},
0x2986: {
dir: V,
sizes: [.997, 1.095, 1.195, 1.445, 1.793, 2.093, 2.393, 2.991]
},
0x29F8: {
dir: V,
sizes: [1.076, 1.917],
variants: [0, 2]
},
0x29F9: {
dir: V,
sizes: [1.076, 1.917],
variants: [0, 2]
},
0x29FC: {
dir: V,
sizes: [1.001, 1.083, 1.185, 1.433, 1.793, 2.093, 2.383, 2.997]
},
0x29FD: {
dir: V,
sizes: [1.001, 1.083, 1.185, 1.433, 1.793, 2.093, 2.383, 2.997]
},
0x2A00: {
dir: V,
sizes: [.987, 1.305],
variants: [0, 2]
},
0x2A01: {
dir: V,
sizes: [.987, 1.305],
variants: [0, 2]
},
0x2A02: {
dir: V,
sizes: [.987, 1.305],
variants: [0, 2]
},
0x2A03: {
dir: V,
sizes: [1.023, 1.357],
variants: [0, 2]
},
0x2A04: {
dir: V,
sizes: [1.023, 1.357],
variants: [0, 2]
},
0x2A05: {
dir: V,
sizes: [1.029, 1.373],
variants: [0, 2]
},
0x2A06: {
dir: V,
sizes: [1.029, 1.373],
variants: [0, 2]
},
0x2A07: {
dir: V,
sizes: [1.045, 1.907],
variants: [0, 2]
},
0x2A08: {
dir: V,
sizes: [1.045, 1.907],
variants: [0, 2]
},
0x2A09: {
dir: V,
sizes: [.981, 1.261],
variants: [0, 2]
},
0x2A0A: {
dir: V,
sizes: [1.001, 1.401],
variants: [0, 2]
},
0x2A0B: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A0C: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A0D: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A0E: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A0F: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A10: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A11: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A12: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A13: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A14: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A15: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A16: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A17: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A18: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A19: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A1A: {
dir: V,
sizes: [1.112, 2.223],
variants: [0, 2]
},
0x2A1B: {
dir: V,
sizes: [1.274, 2.464],
variants: [0, 2]
},
0x2A1C: {
dir: V,
sizes: [1.274, 2.486],
variants: [0, 2]
},
0x2A1D: {
dir: V,
sizes: [.767, 1.073],
variants: [0, 2]
},
0x2A1E: {
dir: V,
sizes: [.767, 1.074],
variants: [0, 2]
},
0x2A20: {
dir: V,
sizes: [.595, .835],
variants: [0, 2]
},
0x2A21: {
dir: V,
sizes: [.901, 1.261],
variants: [0, 2]
},
0x2AFC: {
dir: V,
sizes: [1.001, 1.915],
variants: [0, 2]
},
0x2AFF: {
dir: V,
sizes: [1.241, 1.915],
variants: [0, 2]
},
0x3008: {
c: 0x27E8,
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001]
},
0x3009: {
c: 0x27E9,
dir: V,
sizes: [1.001, 1.101, 1.201, 1.451, 1.801, 2.101, 2.401, 3.001]
},
0xFE37: {
c: 0x23DE,
dir: H,
sizes: [.492, .993, 1.494, 1.996, 2.498, 3, 3.502, 4.006],
stretch: [0x23DE, 0xAF, 0x23DE, 0x23DE],
stretchv: [3, 1, 4, 1],
HDW: [0.85, -0.493, .492],
hd: [.724, -.618]
},
0xFE38: {
c: 0x23DF,
dir: H,
sizes: [.492, .993, 1.494, 1.996, 2.498, 3, 3.502, 4.006],
stretch: [0x23DF, 0x5F, 0x23DF, 0x23DF],
stretchv: [3, 1, 4, 1],
HDW: [-0.062, 0.419, .492],
hd: [-.188, .294]
},
0x1EEF0: {
dir: V,
sizes: [.527, .738]
},
0x1EEF1: {
dir: V,
sizes: [.531, .744]
}
};
//# sourceMappingURL=delimiters.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml.js
const Base = CommonMathJaxNewcmFontMixin(ChtmlFontData);
class MathJaxNewcmFont extends Base {
constructor() {
super(...arguments);
this.cssFontPrefix = 'NCM';
}
}
MathJaxNewcmFont.NAME = 'MathJaxNewcm';
MathJaxNewcmFont.OPTIONS = Object.assign(Object.assign({}, Base.OPTIONS), { fontURL: '@mathjax/mathjax-newcm-font/js/chtml/woff2', dynamicPrefix: '@mathjax/mathjax-newcm-font/js/chtml/dynamic' });
MathJaxNewcmFont.defaultCssFamilyPrefix = 'MJX-NCM-ZERO';
MathJaxNewcmFont.defaultVariantLetters = {
'normal': '',
'bold': 'B',
'italic': 'I',
'bold-italic': 'BI',
'double-struck': 'DS',
'fraktur': 'F',
'bold-fraktur': 'FB',
'sans-serif': 'SS',
'bold-sans-serif': 'SSB',
'sans-serif-italic': 'SSI',
'sans-serif-bold-italic': 'SSBI',
'monospace': 'M',
'-smallop': 'SO',
'-largeop': 'LO',
'-size3': 'S3',
'-size4': 'S4',
'-size5': 'S5',
'-size6': 'S6',
'-size7': 'S7',
'-tex-mathit': 'MI',
'-tex-calligraphic': 'C',
'-tex-bold-calligraphic': 'CB',
'-tex-oldstyle': 'OS',
'-tex-bold-oldstyle': 'OB',
'-tex-variant': 'V',
'-lf-tp': 'LT',
'-rt-bt': 'RB',
'-ex-md': 'EM',
'-bbold': 'Be',
'-upsmall': 'U',
'-uplarge': 'Ue',
'script': 'S',
'bold-script': 'SB'
};
MathJaxNewcmFont.defaultDelimiters = delimiters;
MathJaxNewcmFont.defaultChars = {
'normal': normal,
'bold': bold,
'italic': italic,
'bold-italic': boldItalic,
'double-struck': doubleStruck,
'fraktur': fraktur,
'bold-fraktur': frakturBold,
'sans-serif': sansSerif,
'bold-sans-serif': sansSerifBold,
'sans-serif-italic': sansSerifItalic,
'sans-serif-bold-italic': sansSerifBoldItalic,
'monospace': monospace,
'-smallop': smallop,
'-largeop': largeop,
'-size3': size3,
'-size4': size4,
'-size5': size5,
'-size6': size6,
'-size7': size7,
'-tex-mathit': texMathit,
'-tex-calligraphic': texCalligraphic,
'-tex-bold-calligraphic': texCalligraphicBold,
'-tex-oldstyle': texOldstyle,
'-tex-bold-oldstyle': texOldstyleBold,
'-tex-variant': texVariant,
'-lf-tp': lfTp,
'-rt-bt': rtBt,
'-ex-md': exMd,
'-bbold': bbold,
'-upsmall': upsmall,
'-uplarge': uplarge,
'script': script,
'bold-script': scriptBold
};
MathJaxNewcmFont.defaultStyles = Object.assign(Object.assign({}, ChtmlFontData.defaultStyles), { 'mjx-container[jax="CHTML"] > mjx-math.NCM-N[breakable] > *': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-N'
}, '.NCM-N': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-N'
}, '.NCM-B': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-B'
}, '.NCM-I': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-I'
}, '.NCM-BI': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-BI'
}, '.NCM-DS': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-DS'
}, '.NCM-F': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-F'
}, '.NCM-FB': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-FB'
}, '.NCM-SS': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-SS'
}, '.NCM-SSB': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-SSB'
}, '.NCM-SSI': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-SSI'
}, '.NCM-SSBI': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-SSBI'
}, '.NCM-M': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-M'
}, '.NCM-SO': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-SO'
}, '.NCM-LO': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-LO'
}, '.NCM-S3': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-S3'
}, '.NCM-S4': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-S4'
}, '.NCM-S5': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-S5'
}, '.NCM-S6': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-S6'
}, '.NCM-S7': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-S7'
}, '.NCM-MI': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-MI'
}, '.NCM-C': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-C'
}, '.NCM-CB': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-CB'
}, '.NCM-OS': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-OS'
}, '.NCM-OB': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-OB'
}, '.NCM-V': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-V'
}, '.NCM-LT': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-LT'
}, '.NCM-RB': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-RB'
}, '.NCM-EM': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-EM'
}, '.NCM-Be': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-Be'
}, '.NCM-U': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-U'
}, '.NCM-Ue': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-Ue'
}, '.NCM-S': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-S'
}, '.NCM-SB': {
'font-family': 'MJX-NCM-ZERO, MJX-NCM-SB'
} });
MathJaxNewcmFont.defaultFonts = Object.assign(Object.assign({}, ChtmlFontData.defaultFonts), { '@font-face /* MJX-NCM-ZERO */': {
'font-family': 'MJX-NCM-ZERO',
src: 'url("%%URL%%/mjx-ncm-zero.woff2") format("woff2")'
}, '@font-face /* MJX-BRK */': {
'font-family': 'MJX-BRK',
src: 'url("%%URL%%/mjx-ncm-brk.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-N */': {
'font-family': 'MJX-NCM-N',
src: 'url("%%URL%%/mjx-ncm-n.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-B */': {
'font-family': 'MJX-NCM-B',
src: 'url("%%URL%%/mjx-ncm-b.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-I */': {
'font-family': 'MJX-NCM-I',
src: 'url("%%URL%%/mjx-ncm-i.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-BI */': {
'font-family': 'MJX-NCM-BI',
src: 'url("%%URL%%/mjx-ncm-bi.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-DS */': {
'font-family': 'MJX-NCM-DS',
src: 'url("%%URL%%/mjx-ncm-ds.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-F */': {
'font-family': 'MJX-NCM-F',
src: 'url("%%URL%%/mjx-ncm-f.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-FB */': {
'font-family': 'MJX-NCM-FB',
src: 'url("%%URL%%/mjx-ncm-fb.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-SS */': {
'font-family': 'MJX-NCM-SS',
src: 'url("%%URL%%/mjx-ncm-ss.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-SSB */': {
'font-family': 'MJX-NCM-SSB',
src: 'url("%%URL%%/mjx-ncm-ssb.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-SSI */': {
'font-family': 'MJX-NCM-SSI',
src: 'url("%%URL%%/mjx-ncm-ssi.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-SSBI */': {
'font-family': 'MJX-NCM-SSBI',
src: 'url("%%URL%%/mjx-ncm-ssbi.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-M */': {
'font-family': 'MJX-NCM-M',
src: 'url("%%URL%%/mjx-ncm-m.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-SO */': {
'font-family': 'MJX-NCM-SO',
src: 'url("%%URL%%/mjx-ncm-so.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-LO */': {
'font-family': 'MJX-NCM-LO',
src: 'url("%%URL%%/mjx-ncm-lo.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-S3 */': {
'font-family': 'MJX-NCM-S3',
src: 'url("%%URL%%/mjx-ncm-s3.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-S4 */': {
'font-family': 'MJX-NCM-S4',
src: 'url("%%URL%%/mjx-ncm-s4.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-S5 */': {
'font-family': 'MJX-NCM-S5',
src: 'url("%%URL%%/mjx-ncm-s5.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-S6 */': {
'font-family': 'MJX-NCM-S6',
src: 'url("%%URL%%/mjx-ncm-s6.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-S7 */': {
'font-family': 'MJX-NCM-S7',
src: 'url("%%URL%%/mjx-ncm-s7.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-MI */': {
'font-family': 'MJX-NCM-MI',
src: 'url("%%URL%%/mjx-ncm-mi.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-C */': {
'font-family': 'MJX-NCM-C',
src: 'url("%%URL%%/mjx-ncm-c.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-CB */': {
'font-family': 'MJX-NCM-CB',
src: 'url("%%URL%%/mjx-ncm-cb.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-OS */': {
'font-family': 'MJX-NCM-OS',
src: 'url("%%URL%%/mjx-ncm-os.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-OB */': {
'font-family': 'MJX-NCM-OB',
src: 'url("%%URL%%/mjx-ncm-ob.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-V */': {
'font-family': 'MJX-NCM-V',
src: 'url("%%URL%%/mjx-ncm-v.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-LT */': {
'font-family': 'MJX-NCM-LT',
src: 'url("%%URL%%/mjx-ncm-lt.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-RB */': {
'font-family': 'MJX-NCM-RB',
src: 'url("%%URL%%/mjx-ncm-rb.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-EM */': {
'font-family': 'MJX-NCM-EM',
src: 'url("%%URL%%/mjx-ncm-em.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-Be */': {
'font-family': 'MJX-NCM-Be',
src: 'url("%%URL%%/mjx-ncm-be.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-U */': {
'font-family': 'MJX-NCM-U',
src: 'url("%%URL%%/mjx-ncm-u.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-Ue */': {
'font-family': 'MJX-NCM-Ue',
src: 'url("%%URL%%/mjx-ncm-ue.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-S */': {
'font-family': 'MJX-NCM-S',
src: 'url("%%URL%%/mjx-ncm-s.woff2") format("woff2")'
}, '@font-face /* MJX-NCM-SB */': {
'font-family': 'MJX-NCM-SB',
src: 'url("%%URL%%/mjx-ncm-sb.woff2") format("woff2")'
} });
MathJaxNewcmFont.dynamicFiles = ChtmlFontData.defineDynamicFiles([
['latin', {
'normal': [
[0xC0, 0xD6], [0xD8, 0xEF], [0xF1, 0xF6], [0xF8, 0x130], [0x132, 0x236], [0x238, 0x24F], [0x1E00, 0x1E9B], 0x1E9E, [0x1EA0, 0x1EF9], 0x2C71
]
}],
['latin-b', {
'bold': [
[0xC0, 0xD6], [0xD8, 0xEF], [0xF1, 0xF6], [0xF8, 0x130], [0x132, 0x236], [0x238, 0x24F], [0x1E00, 0x1E13], [0x1E18, 0x1E1B], [0x1E1E, 0x1E27], [0x1E2A, 0x1E4B], [0x1E54, 0x1E63], [0x1E68, 0x1E77], [0x1E7C, 0x1E99], 0x1E9B, 0x1E9E, [0x1EA0, 0x1EF9], 0x2C71
]
}],
['latin-i', {
'italic': [
[0xC0, 0xD6], [0xD8, 0xEF], [0xF1, 0xF6], [0xF8, 0x130], [0x132, 0x236], [0x238, 0x24F], [0x1E00, 0x1E13], [0x1E18, 0x1E1B], [0x1E1E, 0x1E27], [0x1E2A, 0x1E4B], [0x1E54, 0x1E63], [0x1E68, 0x1E77], [0x1E7C, 0x1E99], 0x1E9B, 0x1E9E, [0x1EA0, 0x1EF9]
]
}],
['latin-bi', {
'bold-italic': [
[0xC0, 0xD6], [0xD8, 0xEF], [0xF1, 0xF6], [0xF8, 0x130], [0x132, 0x236], [0x238, 0x24F], [0x1E00, 0x1E13], [0x1E18, 0x1E1B], [0x1E1E, 0x1E27], [0x1E2A, 0x1E4B], [0x1E54, 0x1E63], [0x1E68, 0x1E77], [0x1E7C, 0x1E99], 0x1E9B, 0x1E9E, [0x1EA0, 0x1EF9]
]
}],
['double-struck', {
'normal': [
0x2102, 0x210D, 0x2115, 0x2119, 0x211A, 0x211D, 0x2124, [0x213C, 0x2140], [0x2145, 0x2149], 0x1D538, 0x1D539, [0x1D53B, 0x1D53E], [0x1D540, 0x1D544], 0x1D546, [0x1D54A, 0x1D550], [0x1D552, 0x1D56B], [0x1D7D8, 0x1D7E1]
],
'double-struck': [
0x131, 0x237
]
}],
['fraktur', {
'normal': [
0x210C, 0x2111, 0x211C, 0x2128, 0x212D, 0x1D504, 0x1D505, [0x1D507, 0x1D50A], [0x1D50D, 0x1D514], [0x1D516, 0x1D51C], [0x1D51E, 0x1D537], [0x1D56C, 0x1D59F]
],
'fraktur': [
0x131, 0x237
],
'bold-fraktur': [
0x131, 0x237
]
}],
['script', {
'normal': [
0x210A, 0x210B, 0x2110, 0x2112, 0x2113, 0x2118, 0x211B, 0x212C, [0x212F, 0x2131], 0x2133, 0x2134, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A5, 0x1D4A6, [0x1D4A9, 0x1D4AC], [0x1D4AE, 0x1D4B9], 0x1D4BB, [0x1D4BD, 0x1D4C3], [0x1D4C5, 0x1D503]
],
'script': [],
'bold-script': []
}],
['sans-serif', {
'normal': [
[0x2141, 0x2144], [0x1D5A0, 0x1D66F], [0x1D756, 0x1D7C9], [0x1D7E2, 0x1D7F5]
],
'sans-serif': [
[0x20, 0x2F], [0x3A, 0x40], [0x5B, 0x60], [0x7B, 0x7E], 0xA0, 0xA3, 0xA5, 0xA7, 0xA8, 0xAC, [0xAF, 0xB1], [0xB4, 0xB7], 0xD7, 0xF0, 0xF7, 0x131, 0x237, 0x2C6, 0x2C7, [0x2C9, 0x2CB], [0x2D8, 0x2DA], 0x2DC, [0x300, 0x308], 0x30A, 0x30C, [0x391, 0x3A1], [0x3A3, 0x3A9], [0x3B1, 0x3C9], 0x3D1, 0x3D2, 0x3D5, 0x3D6, 0x3F0, 0x3F1, [0x3F4, 0x3F6], [0x2010, 0x2014], 0x2016, 0x2018, 0x2019, 0x201C, 0x201D, 0x2020, 0x2021, 0x2026, 0x2044, 0x20AC, 0x2126, 0x2127, [0x2190, 0x2193], 0x2212, 0x221E
],
'bold-sans-serif': [
0x20, 0x21, [0x23, 0x2F], 0x3A, 0x3B, 0x3D, 0x3F, 0x40, [0x5B, 0x60], [0x7B, 0x7E], 0xA0, 0xA3, 0xA5, 0xA7, 0xA8, 0xAC, [0xAF, 0xB1], [0xB4, 0xB7], 0xD7, 0xF0, 0xF7, 0x131, 0x237, 0x2C6, 0x2C7, [0x2C9, 0x2CB], [0x2D8, 0x2DA], 0x2DC, [0x300, 0x308], 0x30A, 0x30C, 0x3D2, 0x3F6, [0x2010, 0x2014], 0x2016, 0x2018, 0x2019, 0x201C, 0x201D, 0x2020, 0x2021, 0x2026, 0x2044, 0x20AC, 0x2126, 0x2127, [0x2190, 0x2193], 0x2212, 0x221E
],
'sans-serif-italic': [
[0x20, 0x40], [0x5B, 0x60], [0x7B, 0x7E], 0xA0, 0xA3, 0xA5, 0xA7, 0xA8, 0xAC, [0xAF, 0xB1], [0xB4, 0xB7], 0xD7, 0xF0, 0xF7, 0x131, 0x237, 0x2C6, 0x2C7, [0x2C9, 0x2CB], [0x2D8, 0x2DA], 0x2DC, [0x300, 0x308], 0x30A, 0x30C, [0x391, 0x3A1], [0x3A3, 0x3A9], [0x3B1, 0x3C9], 0x3D1, 0x3D2, 0x3D5, 0x3D6, 0x3F0, 0x3F1, [0x3F4, 0x3F6], [0x2010, 0x2014], 0x2016, 0x2018, 0x2019, 0x201C, 0x201D, 0x2020, 0x2021, 0x2026, 0x2044, 0x20AC, 0x2126, 0x2127, [0x2190, 0x2193], 0x2212, 0x221E
],
'sans-serif-bold-italic': [
0x20, 0x21, [0x23, 0x3B], 0x3D, 0x3F, 0x40, [0x5B, 0x60], [0x7B, 0x7E], 0xA0, 0xA3, 0xA5, 0xA7, 0xA8, 0xAC, [0xAF, 0xB1], [0xB4, 0xB7], 0xD7, 0xF0, 0xF7, 0x131, 0x237, 0x2C6, 0x2C7, [0x2C9, 0x2CB], [0x2D8, 0x2DA], 0x2DC, [0x300, 0x308], 0x30A, 0x30C, 0x3D2, 0x3F6, [0x2010, 0x2014], 0x2016, 0x2018, 0x2019, 0x201C, 0x201D, 0x2020, 0x2021, 0x2026, 0x2044, 0x20AC, 0x2126, 0x2127, [0x2190, 0x2193], 0x2212, 0x221E
]
}],
['sans-serif-r', {
'sans-serif': [
[0xC0, 0xD6], [0xD8, 0xEF], [0xF1, 0xF6], [0xF8, 0x130], [0x132, 0x236], [0x238, 0x24F], [0x1E00, 0x1E13], [0x1E18, 0x1E1B], [0x1E1E, 0x1E27], [0x1E2A, 0x1E4B], [0x1E54, 0x1E63], [0x1E68, 0x1E77], [0x1E7C, 0x1E99], 0x1E9B, 0x1E9E, [0x1EA0, 0x1EF9], 0x2C71
]
}],
['sans-serif-b', {
'bold-sans-serif': [
[0xC0, 0xD6], [0xD8, 0xEF], [0xF1, 0xF6], [0xF8, 0x130], [0x132, 0x236], [0x238, 0x24F], [0x1E00, 0x1E13], [0x1E18, 0x1E1B], [0x1E1E, 0x1E27], [0x1E2A, 0x1E4B], [0x1E54, 0x1E63], [0x1E68, 0x1E77], [0x1E7C, 0x1E99], 0x1E9B, 0x1E9E, [0x1EA0, 0x1EF9], 0x2C71
]
}],
['sans-serif-i', {
'sans-serif-italic': [
[0xC0, 0xD6], [0xD8, 0xEF], [0xF1, 0xF6], [0xF8, 0x130], [0x132, 0x236], [0x238, 0x24F], [0x1E00, 0x1E13], [0x1E18, 0x1E1B], [0x1E1E, 0x1E27], [0x1E2A, 0x1E4B], [0x1E54, 0x1E63], [0x1E68, 0x1E77], [0x1E7C, 0x1E99], 0x1E9B, 0x1E9E, [0x1EA0, 0x1EF9], 0x2C71
]
}],
['sans-serif-bi', {
'sans-serif-bold-italic': [
[0xC0, 0xD6], [0xD8, 0xEF], [0xF1, 0xF6], [0xF8, 0x130], [0x132, 0x236], [0x238, 0x24F], [0x1E00, 0x1E13], [0x1E18, 0x1E1B], [0x1E1E, 0x1E27], [0x1E2A, 0x1E4B], [0x1E54, 0x1E63], [0x1E68, 0x1E77], [0x1E7C, 0x1E99], 0x1E9B, 0x1E9E, [0x1EA0, 0x1EF9], 0x2C71
]
}],
['sans-serif-ex', {
'sans-serif': [
0xA1, 0xA2, 0xA4, 0xA6, [0xA9, 0xAB], 0xAD, 0xAE, 0xB8, [0xBA, 0xBF], [0x2B0, 0x2C5], 0x2C8, 0x2CC, [0x2CE, 0x2D7], 0x2DB, [0x2DD, 0x2FE], 0x309, 0x30B, [0x30D, 0x337], [0x339, 0x34E], [0x350, 0x36F], 0xE3F, 0x1DC4, 0x1DC5, 0x1DC8, 0x1DC9, 0x200C, 0x200D, 0x201A, 0x201B, 0x201E, 0x201F, 0x2022, 0x2029, 0x2030, 0x2031, [0x2039, 0x203B], 0x203D, 0x203F, 0x2040, 0x2045, 0x2046, 0x2052, 0x2054, 0x207F, 0x2080, 0x20A1, 0x20A6, 0x20A9, 0x20AB, 0x20B1, 0x20B2, 0x2103, 0x2116, 0x2117, 0x211E, 0x2120, 0x2122, 0x212E, [0x2190, 0x2193], 0x221A, 0x2222, 0x2300, 0x2329, 0x232A, 0x2422, 0x2423, 0x2502, 0x2551, 0x25E6, 0x262D, 0x2640, 0x266A, 0x26AD, 0x26AE, 0x26B2, 0x271D, 0x27E6, 0x27E7, 0x2E18, 0xE803, [0xEA04, 0xEA06], 0xEA09, 0xEA0B, 0xEA0D, 0xEA10, 0xEA17, 0xEA1A, 0xEA1C, 0xEA1E, 0xEA1F, 0xEA26, 0xEA2A, 0xEA2C, 0xEA2F, 0xEA35, 0xEA37, 0xEA3A, 0xEA3E, 0xEA42, 0xEA45, 0xEB03, 0xEB04, 0xEB08, 0xEB0F, 0xEB11, 0xEB12, 0xEB16, 0xEB19, 0xEB1E, 0xEB1F, 0xEB28, 0xEB29, 0xEB2B, 0xEB31, 0xEB35, 0xEB36, 0xEB3A, 0xEB3B, 0xEB40, 0xEB48, 0xEB49, 0xEB4D, 0xEB61, 0xEB63, 0xEB65, 0xEB6E, 0xEB6F, [0xEC08, 0xEC0E], 0xEC10, 0xEC11, 0xF103, 0xF104, 0xF109, [0xF117, 0xF11E], [0xF121, 0xF123], [0xF126, 0xF12D], 0xF12F, [0xF133, 0xF138], 0xF13D, [0xF141, 0xF146], [0xF14B, 0xF15C], [0xF15F, 0xF165], 0xF168, [0xF16C, 0xF172], 0xF175, [0xF179, 0xF17B], [0xF17E, 0xF180], 0xF182, 0xF184, 0xF185, [0xF188, 0xF18F], 0xF192, 0xF19A, 0xF19E, 0xF19F, 0xF1A1, 0xF1A3, 0xF1A4, [0xF1A7, 0xF1B5], 0xF282, 0xF283, 0xF29E, 0xF2A1, 0xF2A4, [0xF2A7, 0xF2A9], 0xF2AC, 0xF2AE, 0xF2AF, [0xF460, 0xF468], [0xF46A, 0xF472], 0xF6BE, [0xF6D3, 0xF6D6], 0xF6DE, [0xFB00, 0xFB04], 0xFE66
],
'bold-sans-serif': [
0xA1, 0xA2, 0xA4, 0xA6, [0xA9, 0xAB], 0xAD, 0xAE, 0xB8, [0xBA, 0xBF], [0x2B0, 0x2C5], 0x2C8, 0x2CC, [0x2CE, 0x2D7], 0x2DB, [0x2DD, 0x2FE], 0x309, 0x30B, [0x30D, 0x337], [0x339, 0x34E], [0x350, 0x36F], 0xE3F, 0x1DC4, 0x1DC5, 0x1DC8, 0x1DC9, 0x200C, 0x200D, 0x201A, 0x201B, 0x201E, 0x201F, 0x2022, 0x2029, 0x2030, 0x2031, [0x2039, 0x203B], 0x203D, 0x203F, 0x2040, 0x2045, 0x2046, 0x2052, 0x2054, 0x207F, 0x2080, 0x20A1, 0x20A6, 0x20A9, 0x20AB, 0x20B1, 0x20B2, 0x2103, 0x2116, 0x2117, 0x211E, 0x2120, 0x2122, 0x212E, [0x2190, 0x2193], 0x221A, 0x2222, 0x2300, 0x2329, 0x232A, 0x2422, 0x2423, 0x2502, 0x2551, 0x25E6, 0x262D, 0x2640, 0x266A, 0x26AD, 0x26AE, 0x26B2, 0x271D, 0x27E6, 0x27E7, 0x2E18, 0xE803, [0xEA04, 0xEA06], 0xEA09, 0xEA0B, 0xEA0D, 0xEA10, 0xEA17, 0xEA1A, 0xEA1C, 0xEA1E, 0xEA1F, 0xEA26, 0xEA2A, 0xEA2C, 0xEA2F, 0xEA35, 0xEA3A, 0xEA3E, 0xEA42, 0xEA45, 0xEB03, 0xEB04, 0xEB08, [0xEB0F, 0xEB12], 0xEB16, 0xEB19, 0xEB1E, 0xEB1F, 0xEB28, 0xEB29, 0xEB2B, 0xEB31, 0xEB35, 0xEB36, 0xEB3A, 0xEB3B, 0xEB40, 0xEB48, 0xEB49, 0xEB4D, 0xEB61, 0xEB63, 0xEB65, 0xEB6E, 0xEB6F, [0xEC08, 0xEC0E], 0xEC10, 0xEC11, 0xF103, 0xF104, 0xF109, [0xF117, 0xF11E], [0xF121, 0xF123], [0xF126, 0xF12D], 0xF12F, [0xF133, 0xF138], 0xF13D, [0xF141, 0xF146], [0xF14B, 0xF15C], [0xF15F, 0xF165], 0xF168, [0xF16C, 0xF172], 0xF175, [0xF179, 0xF17B], [0xF17E, 0xF180], 0xF182, 0xF184, 0xF185, [0xF188, 0xF18F], 0xF192, 0xF19A, 0xF19E, 0xF19F, 0xF1A1, 0xF1A3, 0xF1A4, [0xF1A7, 0xF1B5], 0xF282, 0xF283, 0xF29E, 0xF2A1, 0xF2A4, [0xF2A7, 0xF2A9], 0xF2AC, 0xF2AE, 0xF2AF, [0xF460, 0xF468], [0xF46A, 0xF472], 0xF6BE, [0xF6D3, 0xF6D6], 0xF6DE, [0xFB00, 0xFB04], 0xFE66
],
'sans-serif-italic': [
0xA1, 0xA2, 0xA4, 0xA6, [0xA9, 0xAB], 0xAD, 0xAE, 0xB8, [0xBA, 0xBF], [0x2B0, 0x2C5], 0x2C8, 0x2CC, [0x2CE, 0x2D7], 0x2DB, [0x2DD, 0x2FE], 0x309, 0x30B, [0x30D, 0x337], [0x339, 0x34E], [0x350, 0x36F], 0xE3F, 0x1DC4, 0x1DC5, 0x1DC8, 0x1DC9, 0x200C, 0x200D, 0x201A, 0x201B, 0x201E, 0x201F, 0x2022, 0x2029, 0x2030, 0x2031, [0x2039, 0x203B], 0x203D, 0x203F, 0x2040, 0x2045, 0x2046, 0x2052, 0x2054, 0x207F, 0x2080, 0x20A1, 0x20A6, 0x20A9, 0x20AB, 0x20B1, 0x20B2, 0x2103, 0x2116, 0x2117, 0x211E, 0x2120, 0x2122, 0x212E, [0x2190, 0x2193], 0x221A, 0x2222, 0x2300, 0x2329, 0x232A, 0x2422, 0x2423, 0x2502, 0x2551, 0x25E6, 0x262D, 0x2640, 0x266A, 0x26AD, 0x26AE, 0x26B2, 0x271D, 0x27E6, 0x27E7, 0x2E18, 0xE803, [0xEA04, 0xEA06], 0xEA09, 0xEA0B, 0xEA0D, 0xEA10, 0xEA17, 0xEA1A, 0xEA1C, 0xEA1E, 0xEA1F, 0xEA26, 0xEA2A, 0xEA2C, 0xEA2F, 0xEA35, 0xEA3A, 0xEA3E, 0xEA42, 0xEA45, 0xEB03, 0xEB04, 0xEB08, [0xEB0F, 0xEB12], 0xEB16, 0xEB19, 0xEB1E, 0xEB1F, 0xEB28, 0xEB29, 0xEB2B, 0xEB31, 0xEB35, 0xEB36, 0xEB3A, 0xEB3B, 0xEB40, 0xEB48, 0xEB49, 0xEB4D, 0xEB61, 0xEB63, 0xEB65, 0xEB6E, 0xEB6F, [0xEC08, 0xEC0E], 0xEC10, 0xEC11, 0xF103, 0xF104, 0xF109, [0xF117, 0xF11E], [0xF121, 0xF123], [0xF126, 0xF12D], 0xF12F, [0xF133, 0xF138], 0xF13D, [0xF141, 0xF146], [0xF14B, 0xF15C], [0xF15F, 0xF165], 0xF168, [0xF16C, 0xF172], 0xF175, [0xF179, 0xF17B], [0xF17E, 0xF180], 0xF182, 0xF184, 0xF185, [0xF188, 0xF18F], 0xF192, 0xF19A, 0xF19E, 0xF19F, 0xF1A1, 0xF1A3, 0xF1A4, [0xF1A7, 0xF1B5], 0xF282, 0xF283, 0xF29E, 0xF2A1, 0xF2A4, [0xF2A7, 0xF2A9], 0xF2AC, 0xF2AE, 0xF2AF, [0xF460, 0xF468], [0xF46A, 0xF472], 0xF6BE, [0xF6D3, 0xF6D6], 0xF6DE, [0xFB00, 0xFB04], 0xFE66
],
'sans-serif-bold-italic': [
0xA1, 0xA2, 0xA4, 0xA6, [0xA9, 0xAB], 0xAD, 0xAE, 0xB8, [0xBA, 0xBF], [0x2B0, 0x2C5], 0x2C8, 0x2CC, [0x2CE, 0x2D7], 0x2DB, [0x2DD, 0x2FE], 0x309, 0x30B, [0x30D, 0x337], [0x339, 0x36F], 0xE3F, 0x1DC4, 0x1DC5, 0x1DC8, 0x1DC9, 0x200C, 0x200D, 0x201A, 0x201B, 0x201E, 0x201F, 0x2022, 0x2029, 0x2030, 0x2031, [0x2039, 0x203B], 0x203D, 0x203F, 0x2040, 0x2045, 0x2046, 0x2052, 0x2054, 0x207F, 0x2080, 0x20A1, 0x20A6, 0x20A9, 0x20AB, 0x20B1, 0x20B2, 0x2103, 0x2116, 0x2117, 0x211E, 0x2120, 0x2122, 0x212E, [0x2190, 0x2193], 0x221A, 0x2222, 0x2300, 0x2329, 0x232A, 0x2422, 0x2423, 0x2502, 0x2551, 0x25E6, 0x262D, 0x2640, 0x266A, 0x26AD, 0x26AE, 0x26B2, 0x271D, 0x27E6, 0x27E7, 0x2E18, 0xE803, [0xEA04, 0xEA06], 0xEA09, 0xEA0B, 0xEA0D, 0xEA10, 0xEA17, 0xEA1A, 0xEA1C, 0xEA1E, 0xEA1F, 0xEA26, 0xEA2A, 0xEA2C, 0xEA2F, 0xEA35, 0xEA3A, 0xEA3E, 0xEA42, 0xEA45, 0xEB03, 0xEB04, 0xEB08, [0xEB0F, 0xEB12], 0xEB16, 0xEB19, 0xEB1E, 0xEB1F, 0xEB28, 0xEB29, 0xEB2B, 0xEB31, 0xEB35, 0xEB36, 0xEB3A, 0xEB3B, 0xEB40, 0xEB48, 0xEB49, 0xEB4D, 0xEB61, 0xEB63, 0xEB65, 0xEB6E, 0xEB6F, [0xEC08, 0xEC0E], 0xEC10, 0xEC11, 0xF103, 0xF104, 0xF109, [0xF117, 0xF11E], [0xF121, 0xF123], [0xF126, 0xF12D], 0xF12F, [0xF133, 0xF138], 0xF13D, [0xF141, 0xF146], [0xF14B, 0xF15C], [0xF15F, 0xF165], 0xF168, [0xF16C, 0xF172], 0xF175, [0xF179, 0xF17B], [0xF17E, 0xF180], 0xF182, 0xF184, 0xF185, [0xF188, 0xF18F], 0xF192, 0xF19A, 0xF19E, 0xF19F, 0xF1A1, 0xF1A3, 0xF1A4, [0xF1A7, 0xF1B5], 0xF282, 0xF283, 0xF29E, 0xF2A1, 0xF2A4, [0xF2A7, 0xF2A9], 0xF2AC, 0xF2AE, 0xF2AF, [0xF460, 0xF468], [0xF46A, 0xF472], 0xF6BE, [0xF6D3, 0xF6D6], 0xF6DE, [0xFB00, 0xFB04], 0xFE66
]
}],
['monospace', {
'normal': [
[0x1D670, 0x1D6A3], [0x1D7F6, 0x1D7FF]
],
'monospace': [
[0x20, 0x2F], [0x3A, 0x40], [0x5B, 0x60], [0x7B, 0x7E], 0xA0, 0xA3, 0xA5, 0xA7, 0xA8, 0xAC, [0xAF, 0xB1], [0xB4, 0xB7], 0xD7, 0xF0, 0xF7, 0x131, 0x237, 0x2C6, 0x2C7, [0x2D8, 0x2DA], 0x2DC, [0x300, 0x308], 0x30A, 0x30C, [0x391, 0x3A1], [0x3A3, 0x3A9], [0x3B1, 0x3C9], 0x3D1, 0x3D2, 0x3D5, 0x3D6, 0x3F0, 0x3F1, [0x3F4, 0x3F6], [0x2010, 0x2014], 0x2016, 0x2018, 0x2019, 0x201C, 0x201D, 0x2020, 0x2021, 0x2026, 0x2044, 0x20AC, 0x2126, 0x2127, [0x2190, 0x2193], 0x2212, 0x221E
]
}],
['monospace-l', {
'monospace': [
[0xC0, 0xD6], [0xD8, 0xEF], [0xF1, 0xF6], [0xF8, 0x130], [0x132, 0x236], [0x238, 0x24F], [0x1E00, 0x1E13], [0x1E18, 0x1E1B], [0x1E1E, 0x1E27], [0x1E2A, 0x1E4B], [0x1E54, 0x1E63], [0x1E68, 0x1E77], [0x1E7C, 0x1E99], 0x1E9B, 0x1E9E, [0x1EA0, 0x1EF9], 0x2C71
]
}],
['monospace-ex', {
'monospace': [
0xA1, 0xA2, 0xA4, 0xA6, [0xA9, 0xAB], 0xAD, 0xAE, 0xB8, [0xBA, 0xBF], [0x250, 0x2C5], 0x2C8, 0x2CC, [0x2CE, 0x2D7], 0x2DB, [0x2DD, 0x2FE], 0x309, 0x30B, [0x30D, 0x337], [0x339, 0x377], [0x37A, 0x37F], [0x384, 0x38A], 0x38C, [0x38E, 0x390], [0x3AA, 0x3B0], [0x3CA, 0x3D0], 0x3D3, 0x3D4, [0x3D7, 0x3E3], 0x3F2, 0x3F3, [0x3F7, 0x477], [0x47A, 0x486], [0x488, 0x4CE], [0x4D0, 0x4F9], [0x4FC, 0x4FF], 0x512, 0x513, [0x51A, 0x51D], 0xE3F, 0x1D00, 0x1D07, 0x1D0A, 0x1D0B, 0x1D0D, 0x1D18, 0x1D19, 0x1D1C, [0x1D43, 0x1D4B], 0x1D4D, [0x1D4F, 0x1D53], [0x1D56, 0x1D58], 0x1D5A, 0x1D5B, 0x1D5D, 0x1D5E, 0x1D60, 0x1D61, 0x1D78, [0x1D90, 0x1D93], 0x1D97, 0x1DC4, 0x1DC5, 0x1DC8, 0x1DC9, [0x1F00, 0x1F15], [0x1F18, 0x1F1D], [0x1F20, 0x1F45], [0x1F48, 0x1F4D], [0x1F50, 0x1F57], 0x1F59, 0x1F5B, 0x1F5D, [0x1F5F, 0x1F7D], [0x1F80, 0x1FB4], [0x1FB6, 0x1FC4], [0x1FC6, 0x1FD3], [0x1FD6, 0x1FDB], [0x1FDD, 0x1FEF], [0x1FF2, 0x1FF4], [0x1FF6, 0x1FFE], 0x201A, 0x201B, 0x201E, 0x201F, 0x2022, 0x2029, 0x2030, 0x2031, [0x2039, 0x203B], 0x203D, 0x203F, 0x2040, 0x2045, 0x2046, 0x2052, 0x2054, 0x207F, 0x2080, 0x20A1, 0x20A6, 0x20A9, 0x20AB, 0x20B1, 0x20B2, 0x2103, 0x2116, 0x2117, 0x211E, 0x2120, 0x2122, 0x212E, [0x2190, 0x2193], 0x221A, 0x2222, 0x2300, 0x2329, 0x232A, 0x2422, 0x2423, 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, 0x252C, 0x2534, 0x253C, [0x2550, 0x256B], 0x25E6, 0x262D, 0x2640, 0x266A, 0x26AD, 0x26AE, 0x26B2, 0x271D, 0x27E6, 0x27E7, 0x2E18, [0xEA04, 0xEA06], 0xEA09, 0xEA0B, 0xEA0D, 0xEA10, 0xEA17, 0xEA1A, 0xEA1C, 0xEA1E, 0xEA1F, 0xEA26, 0xEA2A, 0xEA2C, 0xEA2F, 0xEA35, 0xEA3A, 0xEA3E, 0xEA42, 0xEA45, 0xEB03, 0xEB04, 0xEB08, [0xEB0F, 0xEB12], 0xEB16, 0xEB19, 0xEB1E, 0xEB1F, 0xEB29, 0xEB2B, 0xEB31, 0xEB35, 0xEB36, 0xEB3A, 0xEB3B, 0xEB40, 0xEB48, 0xEB49, 0xEB4D, 0xEB63, 0xEB65, 0xEB6E, 0xEB6F, [0xEC08, 0xEC0E], 0xEC10, 0xEC11, 0xF103, 0xF104, 0xF109, [0xF117, 0xF11E], [0xF121, 0xF123], [0xF126, 0xF12D], 0xF12F, [0xF133, 0xF138], 0xF13D, [0xF141, 0xF146], [0xF14B, 0xF15C], [0xF15F, 0xF165], 0xF168, [0xF16C, 0xF172], 0xF175, [0xF179, 0xF17B], [0xF17E, 0xF180], 0xF182, 0xF184, 0xF185, [0xF188, 0xF18F], 0xF192, 0xF19A, 0xF19E, 0xF19F, 0xF1A1, 0xF1A3, 0xF1A4, [0xF1A7, 0xF1B5], 0xF282, 0xF283, 0xF29E, 0xF2A1, 0xF2A4, [0xF2A7, 0xF2A9], 0xF2AC, 0xF2AE, 0xF2AF, [0xF460, 0xF468], [0xF46A, 0xF472], 0xF6BE, [0xF6D3, 0xF6D6], 0xF6DE, [0xFB00, 0xFB06], 0xFE66
]
}],
['calligraphic', {
'-tex-calligraphic': [
[0x41, 0x5A]
],
'-tex-bold-calligraphic': [
[0x41, 0x5A]
]
}],
['math', {
'normal': [
0x220A, 0x220D, 0x221B, 0x221C, 0x223A, 0x223B, 0x224E, 0x224F, [0x2251, 0x2253], [0x2256, 0x225C], 0x225E, 0x228C, [0x22B6, 0x22B9], [0x22BB, 0x22BF], 0x22C7, [0x22D0, 0x22E1], [0x22E4, 0x22E9], [0x22F2, 0x22FF], [0x27C0, 0x27D7], [0x27DA, 0x27DC], [0x27DF, 0x27E5], [0x2981, 0x2996], [0x2999, 0x29F4], 0x29F6, [0x29FA, 0x29FF], 0x2A0A, 0x2A0B, [0x2A1D, 0x2A2E], [0x2A30, 0x2A3E], [0x2A40, 0x2A7C], [0x2A7F, 0x2A84], [0x2A8D, 0x2A94], [0x2A97, 0x2AAE], [0x2ABB, 0x2AC4], [0x2AC7, 0x2ACA], [0x2ACD, 0x2ADD], [0x2AEC, 0x2AF1], [0x2AF6, 0x2AFB], [0x2AFD, 0x2AFF]
]
}],
['symbols', {
'normal': [
0x7F, 0xA1, 0xA2, 0xA4, 0xA6, [0xA9, 0xAB], 0xAD, 0xAE, 0xB2, 0xB3, [0xB9, 0xBF], 0xE3F, 0x200C, 0x200D, 0x2017, 0x201A, 0x201B, 0x201E, 0x201F, [0x2022, 0x2025], 0x2029, 0x2030, 0x2031, [0x2038, 0x2043], [0x2045, 0x2056], [0x2058, 0x205E], 0x207F, 0x2080, 0x20A1, 0x20A6, [0x20A9, 0x20AB], 0x20B1, 0x20B2, 0x2100, 0x2101, [0x2103, 0x2106], 0x2108, 0x2109, 0x2114, 0x2116, 0x2117, [0x211E, 0x2123], 0x2125, 0x2129, 0x212E, [0x2139, 0x213B], [0x214A, 0x214F], [0x2300, 0x2306], [0x2311, 0x2318], 0x231A, 0x231B, [0x2324, 0x2328], [0x232B, 0x239A], 0x23B6, [0x23BA, 0x23CD], 0x23CF, [0x23D1, 0x23DB], [0x23E2, 0x23F3], [0x23F8, 0x23FF], 0x2422, 0x2423, 0x2B97, 0x2BB9, 0x2BC9, [0x2BD0, 0x2BE9], [0x2BF0, 0x2BFF], 0x2E18, 0x3012, 0x3016, 0x3017, 0x3030, [0xFB00, 0xFB06], 0xFE66, 0xFEFF
]
}, [0x2017]],
['symbols-b-i', {
'bold': [
0xA1, 0xA2, 0xA4, 0xA6, [0xA9, 0xAB], 0xAD, 0xAE, [0xBA, 0xBF], 0xE3F, 0x200C, 0x200D, 0x201A, 0x201B, 0x201E, 0x201F, 0x2022, 0x2029, 0x2030, 0x2031, [0x2039, 0x203B], 0x203D, 0x203F, 0x2040, 0x2045, 0x2046, 0x2052, 0x2054, 0x207F, 0x2080, 0x20A1, 0x20A6, [0x20A9, 0x20AB], 0x20B1, 0x20B2, 0x2103, 0x2116, 0x2117, 0x211E, 0x2120, 0x2122, 0x212E, 0x2300, 0x2422, 0x2423, 0x2E18, [0xFB00, 0xFB06], 0xFE66
],
'italic': [
[0xA1, 0xA7], [0xA9, 0xAE], 0xB1, [0xB5, 0xB7], [0xBA, 0xBF], 0xD7, 0xF0, 0xF7, 0xE3F, 0x200C, 0x200D, 0x201A, 0x201B, [0x201E, 0x2022], 0x2029, 0x2030, 0x2031, [0x2039, 0x203B], 0x203D, 0x203F, 0x2040, 0x2045, 0x2046, 0x2052, 0x2054, 0x2080, 0x20A1, 0x20A6, 0x20A9, 0x20AB, 0x20B1, 0x20B2, 0x2103, 0x2116, 0x2117, 0x211E, 0x2120, 0x2122, 0x212E, 0x2300, 0x2422, 0x2423, 0x2E18, [0xFB00, 0xFB06], 0xFE66
],
'bold-italic': [
[0xA1, 0xA7], [0xA9, 0xAE], 0xB1, [0xB5, 0xB7], [0xBA, 0xBF], 0xD7, 0xF0, 0xF7, 0xE3F, 0x200C, 0x200D, 0x201A, 0x201B, [0x201E, 0x2022], 0x2029, 0x2030, 0x2031, [0x2039, 0x203B], 0x203D, 0x203F, 0x2040, 0x2045, 0x2046, 0x2052, 0x2054, 0x2080, 0x20A1, 0x20A6, [0x20A9, 0x20AB], 0x20B1, 0x20B2, 0x2103, 0x2116, 0x2117, 0x211E, 0x2120, 0x2122, 0x212E, 0x2300, 0x2422, 0x2423, 0x2E18, [0xFB00, 0xFB06], 0xFE66
]
}],
['greek', {
'normal': [
[0x370, 0x377], [0x37A, 0x37F], [0x384, 0x38A], 0x38C, [0x38E, 0x390], [0x3AA, 0x3B0], [0x3CA, 0x3D0], 0x3D3, 0x3D4, [0x3D7, 0x3EF], 0x3F2, 0x3F3, [0x3F7, 0x3FF], [0x1F00, 0x1F15], [0x1F18, 0x1F1D], [0x1F20, 0x1F45], [0x1F48, 0x1F4D], [0x1F50, 0x1F57], 0x1F59, 0x1F5B, 0x1F5D, [0x1F5F, 0x1F7D], [0x1F80, 0x1FB4], [0x1FB6, 0x1FC4], [0x1FC6, 0x1FD3], [0x1FD6, 0x1FDB], [0x1FDD, 0x1FEF], [0x1FF2, 0x1FF4], [0x1FF6, 0x1FFE], [0x2C80, 0x2CF3], [0x2CF9, 0x2CFF]
],
'bold': [
[0x370, 0x377], [0x37A, 0x37F], [0x384, 0x38A], 0x38C, [0x38E, 0x390], [0x3AA, 0x3B0], [0x3CA, 0x3D0], 0x3D3, 0x3D4, [0x3D7, 0x3DB], [0x3DE, 0x3EF], 0x3F2, 0x3F3, [0x3F7, 0x3FF], [0x1F00, 0x1F15], [0x1F18, 0x1F1D], [0x1F20, 0x1F45], [0x1F48, 0x1F4D], [0x1F50, 0x1F57], 0x1F59, 0x1F5B, 0x1F5D, [0x1F5F, 0x1F7D], [0x1F80, 0x1FB4], [0x1FB6, 0x1FC4], [0x1FC6, 0x1FD3], [0x1FD6, 0x1FDB], [0x1FDD, 0x1FEF], [0x1FF2, 0x1FF4], [0x1FF6, 0x1FFE], [0x2C80, 0x2CF3], [0x2CF9, 0x2CFF]
],
'italic': [
[0x370, 0x377], [0x37A, 0x37F], [0x384, 0x38A], 0x38C, [0x38E, 0x390], [0x3AA, 0x3B0], [0x3CA, 0x3D0], 0x3D3, 0x3D4, [0x3D7, 0x3EF], 0x3F2, 0x3F3, [0x3F7, 0x3FF], [0x1F00, 0x1F15], [0x1F18, 0x1F1D], [0x1F20, 0x1F45], [0x1F48, 0x1F4D], [0x1F50, 0x1F57], 0x1F59, 0x1F5B, 0x1F5D, [0x1F5F, 0x1F7D], [0x1F80, 0x1FB4], [0x1FB6, 0x1FC4], [0x1FC6, 0x1FD3], [0x1FD6, 0x1FDB], [0x1FDD, 0x1FEF], [0x1FF2, 0x1FF4], [0x1FF6, 0x1FFE], [0x2C80, 0x2CF3], [0x2CF9, 0x2CFF]
],
'bold-italic': [
[0x370, 0x377], [0x37A, 0x37F], [0x384, 0x38A], 0x38C, [0x38E, 0x390], [0x3AA, 0x3B0], [0x3CA, 0x3D0], 0x3D3, 0x3D4, [0x3D7, 0x3EF], 0x3F2, 0x3F3, [0x3F7, 0x3FF], [0x1F00, 0x1F15], [0x1F18, 0x1F1D], [0x1F20, 0x1F45], [0x1F48, 0x1F4D], [0x1F50, 0x1F57], 0x1F59, 0x1F5B, 0x1F5D, [0x1F5F, 0x1F7D], [0x1F80, 0x1FB4], [0x1FB6, 0x1FC4], [0x1FC6, 0x1FD3], [0x1FD6, 0x1FDB], [0x1FDD, 0x1FEF], [0x1FF2, 0x1FF4], [0x1FF6, 0x1FFE], [0x2C80, 0x2CF3], [0x2CF9, 0x2CFF]
]
}],
['greek-ss', {
'sans-serif': [
[0x370, 0x377], [0x37A, 0x37F], [0x384, 0x38A], 0x38C, [0x38E, 0x390], [0x3AA, 0x3B0], [0x3CA, 0x3D0], 0x3D3, 0x3D4, [0x3D7, 0x3EF], 0x3F2, 0x3F3, [0x3F7, 0x3FF], [0x1F00, 0x1F15], [0x1F18, 0x1F1D], [0x1F20, 0x1F45], [0x1F48, 0x1F4D], [0x1F50, 0x1F57], 0x1F59, 0x1F5B, 0x1F5D, [0x1F5F, 0x1F7D], [0x1F80, 0x1FB4], [0x1FB6, 0x1FC4], [0x1FC6, 0x1FD3], [0x1FD6, 0x1FDB], [0x1FDD, 0x1FEF], [0x1FF2, 0x1FF4], [0x1FF6, 0x1FFE]
],
'bold-sans-serif': [
[0x370, 0x377], [0x37A, 0x37F], [0x384, 0x38A], 0x38C, [0x38E, 0x390], [0x3AA, 0x3B0], [0x3CA, 0x3D0], 0x3D3, 0x3D4, [0x3D7, 0x3EF], 0x3F2, 0x3F3, [0x3F7, 0x3FF], [0x1F00, 0x1F15], [0x1F18, 0x1F1D], [0x1F20, 0x1F45], [0x1F48, 0x1F4D], [0x1F50, 0x1F57], 0x1F59, 0x1F5B, 0x1F5D, [0x1F5F, 0x1F7D], [0x1F80, 0x1FB4], [0x1FB6, 0x1FB9], [0x1FBB, 0x1FC4], [0x1FC6, 0x1FD3], [0x1FD6, 0x1FDB], [0x1FDD, 0x1FEF], [0x1FF2, 0x1FF4], [0x1FF6, 0x1FFE]
],
'sans-serif-italic': [
[0x370, 0x377], [0x37A, 0x37F], [0x384, 0x38A], 0x38C, [0x38E, 0x390], [0x3AA, 0x3B0], [0x3CA, 0x3D0], 0x3D3, 0x3D4, [0x3D7, 0x3EF], 0x3F2, 0x3F3, [0x3F7, 0x3FF], [0x1F00, 0x1F15], [0x1F18, 0x1F1D], [0x1F20, 0x1F45], [0x1F48, 0x1F4D], [0x1F50, 0x1F57], 0x1F59, 0x1F5B, 0x1F5D, [0x1F5F, 0x1F7D], [0x1F80, 0x1FB4], [0x1FB6, 0x1FC4], [0x1FC6, 0x1FD3], [0x1FD6, 0x1FDB], [0x1FDD, 0x1FEF], [0x1FF2, 0x1FF4], [0x1FF6, 0x1FFE]
],
'sans-serif-bold-italic': [
[0x370, 0x377], [0x37A, 0x37F], [0x384, 0x38A], 0x38C, [0x38E, 0x390], [0x3AA, 0x3B0], [0x3CA, 0x3D0], 0x3D3, 0x3D4, [0x3D7, 0x3EF], 0x3F2, 0x3F3, [0x3F7, 0x3FF], [0x1F00, 0x1F15], [0x1F18, 0x1F1D], [0x1F20, 0x1F45], [0x1F48, 0x1F4D], [0x1F50, 0x1F57], 0x1F59, 0x1F5B, 0x1F5D, [0x1F5F, 0x1F7D], [0x1F80, 0x1FB4], [0x1FB6, 0x1FB9], [0x1FBB, 0x1FC4], [0x1FC6, 0x1FD3], [0x1FD6, 0x1FDB], [0x1FDD, 0x1FEF], [0x1FF2, 0x1FF4], [0x1FF6, 0x1FFE]
]
}],
['cyrillic', {
'normal': [
[0x400, 0x477], [0x47A, 0x486], [0x488, 0x4CE], [0x4D0, 0x4F9], [0x4FC, 0x4FF], 0x512, 0x513, [0x51A, 0x51D]
],
'bold': [
[0x400, 0x477], [0x47A, 0x486], [0x488, 0x4CE], [0x4D0, 0x4F9], [0x4FC, 0x4FF], 0x512, 0x513, [0x51A, 0x51D]
],
'italic': [
[0x400, 0x477], [0x47A, 0x486], [0x488, 0x4C9], [0x4CB, 0x4CE], [0x4D0, 0x4F9], [0x4FC, 0x4FF], 0x512, 0x513, [0x51A, 0x51D]
],
'bold-italic': [
[0x400, 0x477], [0x47A, 0x486], [0x488, 0x4C9], [0x4CB, 0x4CE], [0x4D0, 0x4F9], [0x4FC, 0x4FF], 0x512, 0x513, [0x51A, 0x51D]
]
}],
['cyrillic-ss', {
'sans-serif': [
[0x400, 0x477], [0x47A, 0x486], [0x488, 0x4CE], [0x4D0, 0x4F9], [0x4FC, 0x4FF], 0x512, 0x513, [0x51A, 0x51D]
],
'bold-sans-serif': [
[0x400, 0x477], [0x47A, 0x486], [0x488, 0x4CE], [0x4D0, 0x4F9], [0x4FC, 0x4FF], 0x512, 0x513, [0x51A, 0x51D]
],
'sans-serif-italic': [
[0x400, 0x477], [0x47A, 0x486], [0x488, 0x4CE], [0x4D0, 0x4F9], [0x4FC, 0x4FF], 0x512, 0x513, [0x51A, 0x51D]
],
'sans-serif-bold-italic': [
[0x400, 0x477], [0x47A, 0x486], [0x488, 0x4CE], [0x4D0, 0x4F9], [0x4FC, 0x4FF], 0x512, 0x513, [0x51A, 0x51D]
]
}],
['phonetics', {
'normal': [
[0x250, 0x2AF], 0x1D00, 0x1D07, 0x1D0A, 0x1D0B, 0x1D0D, 0x1D18, 0x1D19, 0x1D1C, [0x1D43, 0x1D4B], 0x1D4D, [0x1D4F, 0x1D53], [0x1D56, 0x1D58], 0x1D5A, 0x1D5B, 0x1D5D, 0x1D5E, 0x1D60, 0x1D61, 0x1D78, [0x1D90, 0x1D93], 0x1D97
],
'bold': [
[0x250, 0x2AF], 0x1D00, 0x1D07, 0x1D0A, 0x1D0B, 0x1D0D, 0x1D18, 0x1D19, 0x1D1C, [0x1D43, 0x1D4B], 0x1D4D, [0x1D4F, 0x1D53], [0x1D56, 0x1D58], 0x1D5A, 0x1D5B, 0x1D5D, 0x1D5E, 0x1D60, 0x1D61, 0x1D78, [0x1D90, 0x1D93], 0x1D97
],
'italic': [
[0x250, 0x2AD], 0x2AF
],
'bold-italic': [
[0x250, 0x2AF]
]
}],
['phonetics-ss', {
'sans-serif': [
[0x250, 0x2AF], 0x1D00, 0x1D07, 0x1D0A, 0x1D0B, 0x1D0D, 0x1D18, 0x1D19, 0x1D1C, [0x1D43, 0x1D4B], 0x1D4D, [0x1D4F, 0x1D53], [0x1D56, 0x1D58], 0x1D5A, 0x1D5B, 0x1D5D, 0x1D5E, 0x1D60, 0x1D61, 0x1D78, [0x1D90, 0x1D93], 0x1D97
],
'bold-sans-serif': [
[0x250, 0x2AF], 0x1D00, 0x1D07, 0x1D0A, 0x1D0B, 0x1D0D, 0x1D18, 0x1D19, 0x1D1C, [0x1D43, 0x1D4B], 0x1D4D, [0x1D4F, 0x1D53], [0x1D56, 0x1D58], 0x1D5A, 0x1D5B, 0x1D5D, 0x1D5E, 0x1D60, 0x1D61, 0x1D78, [0x1D90, 0x1D93], 0x1D97
],
'sans-serif-italic': [
[0x250, 0x2AF], 0x1D00, 0x1D07, 0x1D0A, 0x1D0B, 0x1D0D, 0x1D18, 0x1D19, 0x1D1C, [0x1D43, 0x1D4B], 0x1D4D, [0x1D4F, 0x1D53], [0x1D56, 0x1D58], 0x1D5A, 0x1D5B, 0x1D5D, 0x1D5E, 0x1D60, 0x1D61, 0x1D78, [0x1D90, 0x1D93], 0x1D97
],
'sans-serif-bold-italic': [
[0x250, 0x2AF], 0x1D00, 0x1D07, 0x1D0A, 0x1D0B, 0x1D0D, 0x1D18, 0x1D19, 0x1D1C, [0x1D43, 0x1D4B], 0x1D4D, [0x1D4F, 0x1D53], [0x1D56, 0x1D58], 0x1D5A, 0x1D5B, 0x1D5D, 0x1D5E, 0x1D60, 0x1D61, 0x1D78, [0x1D90, 0x1D93], 0x1D97
]
}],
['hebrew', {
'normal': [
[0x591, 0x5C7], [0x5D0, 0x5EA], [0x5EF, 0x5F5], 0x5F7, [0xFB1D, 0xFB4F]
],
'bold': [
[0x591, 0x5C7], [0x5D0, 0x5EB], [0x5EF, 0x5F5], 0x5F7, [0xFB1D, 0xFB4F]
],
'italic': [
[0x591, 0x5C7], [0x5D0, 0x5EA], [0x5EF, 0x5F5], 0x5F7, [0xFB1D, 0xFB4F]
],
'bold-italic': [
[0x591, 0x5C7], [0x5D0, 0x5EB], [0x5EF, 0x5F5], 0x5F7, [0xFB1D, 0xFB4F]
]
}],
['devanagari', {
'normal': [
[0x900, 0x97F]
],
'bold': [],
'italic': [],
'bold-italic': []
}],
['cherokee', {
'normal': [
[0x13A0, 0x13F5], [0x13F8, 0x13FD]
],
'bold': [
[0x13A0, 0x13F5], [0x13F8, 0x13FD]
],
'italic': [
[0x13A0, 0x13FB]
],
'bold-italic': [
[0x13A0, 0x13FB]
]
}],
['arabic', {
'normal': [
[0x1EE00, 0x1EE22], 0x1EE24, 0x1EE27, [0x1EE29, 0x1EE32], [0x1EE34, 0x1EE37], 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, [0x1EE4D, 0x1EE4F], 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, [0x1EE67, 0x1EE6A], [0x1EE6C, 0x1EE72], [0x1EE74, 0x1EE77], [0x1EE79, 0x1EE7C], [0x1EE7E, 0x1EE89], [0x1EE8B, 0x1EE9B], [0x1EEA1, 0x1EEA3], [0x1EEA5, 0x1EEA9], [0x1EEAB, 0x1EEBB], 0x1EEF0, 0x1EEF1
],
'bold': [],
'italic': [],
'bold-italic': []
}],
['braille-d', {
'normal': [
[0x2800, 0x28FF]
]
}],
['braille', {
'sans-serif': [
[0x2800, 0x28FF]
]
}],
['arrows', {
'normal': [
0x219C, 0x219D, 0x219F, 0x21A1, 0x21A5, 0x21A7, 0x21A8, 0x21AD, [0x21AF, 0x21B5], 0x21B8, 0x21B9, [0x21D6, 0x21D9], [0x21DC, 0x21DF], [0x21E6, 0x21F4], [0x21F7, 0x21FF], 0x23CE, 0x27A1, [0x27F0, 0x27F4], 0x27FF, [0x2900, 0x2909], [0x290C, 0x2949], 0x294C, 0x294D, 0x294F, 0x2951, 0x2954, 0x2955, 0x2958, 0x2959, 0x295C, 0x295D, [0x2960, 0x2969], [0x2970, 0x297B], [0x2B00, 0x2B12], [0x2B30, 0x2B4F], [0x2B5A, 0x2B73], [0x2B76, 0x2B95], [0x2B98, 0x2BB8], [0x2BEC, 0x2BEF]
],
'-largeop': [
0x2191, 0x2193, [0x2195, 0x219B], [0x219E, 0x21A3], 0x21A5, 0x21A7, [0x21A9, 0x21AE], [0x21B0, 0x21B3], 0x21B6, 0x21B7, [0x21BC, 0x21CF], 0x21D1, 0x21D3, [0x21D5, 0x21DB], [0x21E6, 0x21E9], 0x21F3, 0x21F5, 0x21F6, [0x2B04, 0x2B07], 0x2B0C, 0x2B0D, 0x2B31
],
'-lf-tp': [
[0x21E6, 0x21E9], 0x2907, 0x2B05, 0x2B06
],
'-rt-bt': [
[0x21E6, 0x21E9], 0x2906, 0x2B07, 0x2B0C
],
'-ex-md': [
0x21E6, 0x21E7, 0x2B05, 0x2B06
]
}, [0x219F, 0x21A1, 0x21A5, 0x21A7, 0x21AD, 0x21AE, [0x21B0, 0x21B3], [0x21D6, 0x21D9], 0x21DC, 0x21DD, [0x21E6, 0x21E9], 0x21F3, 0x27A1, 0x27FD, 0x27FE, 0x2906, 0x2907, 0x294C, 0x294D, 0x294F, 0x2951, 0x295C, 0x295D, 0x2960, 0x2961, [0x2B04, 0x2B07], 0x2B0C, 0x2B0D, 0x2B31]],
['marrows', {
'normal': [
[0x1F800, 0x1F80B], [0x1F810, 0x1F847], [0x1F850, 0x1F859], [0x1F860, 0x1F887], [0x1F890, 0x1F8AD], 0x1F8B0, 0x1F8B1
]
}],
['accents', {
'normal': [
0xB8, [0x2B0, 0x2C5], 0x2C8, 0x2CC, [0x2CE, 0x2D7], 0x2DB, [0x2DD, 0x2FE], 0x309, 0x30B, [0x30D, 0x337], [0x339, 0x36F], 0x1DC4, 0x1DC5, 0x1DC8, 0x1DC9, [0x20D3, 0x20D5], 0x20D8, [0x20DD, 0x20DF], [0x20E4, 0x20EB], 0x20F0
],
'-smallop': [
0x311, [0x32C, 0x330], 0x332, 0x333, 0x33F, 0x34D
],
'-largeop': [
0x311, [0x32C, 0x330]
],
'-size3': [
0x311, [0x32C, 0x330]
],
'-size4': [
0x311, [0x32C, 0x330]
],
'-size5': [
0x311, [0x32C, 0x330]
],
'-size6': [
0x311, [0x32C, 0x330]
],
'-size7': [
0x311, [0x32C, 0x330]
],
'-ex-md': [
0x332, 0x333, 0x33F, 0x34D
]
}, [0x311, [0x32C, 0x330], 0x332, 0x333, 0x33F, 0x34D, 0x20E9]],
['accents-b-i', {
'bold': [
0xB8, [0x2B0, 0x2C5], 0x2C8, 0x2CC, [0x2CE, 0x2D7], 0x2DB, [0x2DD, 0x2FE], 0x309, 0x30B, [0x30D, 0x337], [0x339, 0x34E], [0x350, 0x36F], 0x1DC4, 0x1DC5, 0x1DC8, 0x1DC9
],
'italic': [
0xB8, [0x2B0, 0x2BC], [0x2BE, 0x2C5], 0x2C8, 0x2CC, [0x2CE, 0x2D7], 0x2DB, [0x2DD, 0x2FE], 0x309, 0x30B, [0x30D, 0x337], [0x339, 0x34E], [0x350, 0x36F]
],
'bold-italic': [
0xB8, [0x2B0, 0x2C5], 0x2C8, 0x2CC, [0x2CE, 0x2D7], 0x2DB, [0x2DD, 0x2FE], 0x309, 0x30B, [0x30D, 0x337], [0x339, 0x34E], [0x350, 0x36F]
]
}],
['shapes', {
'normal': [
0x2302, [0x2326, 0x2328], 0x232B, [0x23FB, 0x23FE], [0x2500, 0x259F], [0x25A2, 0x25A9], [0x25AC, 0x25B1], 0x25C8, 0x25C9, [0x25CC, 0x25CE], [0x25D0, 0x25E5], [0x25E7, 0x25EE], [0x25F0, 0x25F7], 0x2600, 0x2605, 0x2606, 0x2609, 0x2621, 0x262D, [0x2639, 0x263E], 0x2640, 0x2642, [0x2660, 0x2667], [0x2669, 0x266B], [0x266D, 0x266F], 0x267E, [0x2680, 0x2689], 0x26A5, [0x26AA, 0x26AE], 0x26B2, 0x2713, 0x271D, 0x2720, 0x272A, 0x2736, 0x273D, 0x2772, 0x2773, 0x279B, 0x27A1, [0x2B12, 0x2B2F], [0x2B50, 0x2B59], [0x2BBA, 0x2BC8], [0x2BCA, 0x2BCF], 0x2BEA, 0x2BEB
],
'bold': [
0x2502, 0x2551, 0x262D, 0x2640, 0x266A, 0x26AD, 0x26AE, 0x26B2, 0x271D
],
'italic': [
0x262D, 0x266A, 0x26AD, 0x26AE, 0x271D
],
'bold-italic': [
0x262D, 0x266A, 0x26AD, 0x26AE, 0x271D
]
}],
['mshapes', {
'normal': [
[0x1F780, 0x1F7D8], [0x1F7E0, 0x1F7EB]
]
}],
['variants', {
'-tex-variant': [
0x22, 0x27, 0x2A, 0x60, 0x7E, 0xAA, 0xB0, 0xB2, 0xB3, 0xB9, 0xBA, 0x2014, 0x2061, 0x2070, 0x2071, [0x2074, 0x208E]
]
}],
['PUA', {
'normal': [
[0xE000, 0xE033], [0xE041, 0xE072], [0xE780, 0xE78A], 0xE803, [0xEA04, 0xEA06], 0xEA09, 0xEA0B, 0xEA0D, 0xEA10, 0xEA17, 0xEA1A, 0xEA1C, 0xEA1E, 0xEA1F, 0xEA26, 0xEA2A, 0xEA2C, 0xEA2F, 0xEA35, 0xEA3A, 0xEA3E, 0xEA42, 0xEA45, 0xEB03, 0xEB04, 0xEB08, [0xEB0F, 0xEB12], 0xEB16, 0xEB19, 0xEB1E, 0xEB1F, 0xEB28, 0xEB29, 0xEB2B, 0xEB31, 0xEB35, 0xEB36, 0xEB3A, 0xEB3B, 0xEB40, 0xEB48, 0xEB49, 0xEB4D, 0xEB61, 0xEB63, 0xEB65, 0xEB6E, 0xEB6F, [0xEC08, 0xEC0E], 0xEC10, 0xEC11, 0xF103, 0xF104, 0xF109, [0xF117, 0xF11E], [0xF121, 0xF123], [0xF126, 0xF12D], 0xF12F, [0xF133, 0xF138], 0xF13D, [0xF141, 0xF146], [0xF14B, 0xF15C], [0xF15F, 0xF165], 0xF168, [0xF16C, 0xF172], 0xF175, [0xF179, 0xF17B], [0xF17E, 0xF180], 0xF182, 0xF184, 0xF185, [0xF188, 0xF18F], 0xF192, 0xF19A, 0xF19E, 0xF19F, 0xF1A1, 0xF1A3, 0xF1A4, [0xF1A7, 0xF1B5], 0xF282, 0xF283, 0xF29E, 0xF2A1, 0xF2A4, [0xF2A7, 0xF2A9], 0xF2AC, 0xF2AE, 0xF2AF, [0xF460, 0xF468], [0xF46A, 0xF472], 0xF6BE, [0xF6D3, 0xF6D6], 0xF6DE
],
'bold': [
0xE803, [0xEA04, 0xEA06], 0xEA09, 0xEA0B, 0xEA0D, 0xEA10, 0xEA17, 0xEA1A, 0xEA1C, 0xEA1E, 0xEA1F, 0xEA26, 0xEA2A, 0xEA2C, 0xEA2F, 0xEA35, 0xEA3A, 0xEA3E, 0xEA42, 0xEA45, 0xEB03, 0xEB04, 0xEB08, [0xEB0F, 0xEB12], 0xEB16, 0xEB19, 0xEB1E, 0xEB1F, 0xEB28, 0xEB29, 0xEB2B, 0xEB31, 0xEB35, 0xEB36, 0xEB3A, 0xEB3B, 0xEB40, 0xEB48, 0xEB49, 0xEB4D, 0xEB61, 0xEB63, 0xEB65, 0xEB6E, 0xEB6F, [0xEC08, 0xEC0E], 0xEC10, 0xEC11, 0xF103, 0xF104, 0xF109, [0xF117, 0xF11E], [0xF121, 0xF123], [0xF126, 0xF12D], 0xF12F, [0xF133, 0xF138], 0xF13D, [0xF141, 0xF146], [0xF14B, 0xF15C], [0xF15F, 0xF165], 0xF168, [0xF16C, 0xF172], 0xF175, [0xF179, 0xF17B], [0xF17E, 0xF180], 0xF182, 0xF184, 0xF185, [0xF188, 0xF18F], 0xF192, 0xF19A, 0xF19E, 0xF19F, 0xF1A1, 0xF1A3, 0xF1A4, [0xF1A7, 0xF1B5], 0xF282, 0xF283, 0xF29E, 0xF2A1, 0xF2A4, [0xF2A7, 0xF2A9], 0xF2AC, 0xF2AE, 0xF2AF, [0xF460, 0xF468], [0xF46A, 0xF472], 0xF6BE, [0xF6D3, 0xF6D6], 0xF6DE
],
'italic': [
0xE803, [0xEA04, 0xEA06], 0xEA09, 0xEA0B, 0xEA0D, 0xEA10, 0xEA17, 0xEA1A, 0xEA1C, 0xEA1E, 0xEA1F, 0xEA26, 0xEA2A, 0xEA2C, 0xEA2F, 0xEA35, 0xEA3A, 0xEA3E, 0xEA42, 0xEA45, 0xEB03, 0xEB04, 0xEB08, [0xEB0F, 0xEB12], 0xEB16, 0xEB19, 0xEB1E, 0xEB1F, 0xEB28, 0xEB29, 0xEB2B, 0xEB31, 0xEB35, 0xEB36, 0xEB3A, 0xEB3B, 0xEB40, 0xEB48, 0xEB49, 0xEB4D, 0xEB61, 0xEB63, 0xEB65, 0xEB6E, 0xEB6F, [0xEC08, 0xEC0E], 0xEC10, 0xEC11, 0xF103, 0xF104, 0xF109, [0xF117, 0xF11E], [0xF121, 0xF123], [0xF126, 0xF12D], 0xF12F, [0xF133, 0xF138], 0xF13D, 0xF1AB, 0xF1AC, [0xF1B1, 0xF1B5], 0xF282, 0xF283, 0xF29E, 0xF2A1, 0xF2A4, 0xF2A7, 0xF2A8, [0xF460, 0xF468], [0xF46A, 0xF472], 0xF6BE, 0xF6C4, [0xF6C6, 0xF6C8], [0xF6D3, 0xF6D6], 0xF6DE
],
'bold-italic': [
0xE803, [0xEA04, 0xEA06], 0xEA09, 0xEA0B, 0xEA0D, 0xEA10, 0xEA17, 0xEA1A, 0xEA1C, 0xEA1E, 0xEA1F, 0xEA26, 0xEA2A, 0xEA2C, 0xEA2F, 0xEA35, 0xEA3A, 0xEA3E, 0xEA42, 0xEA45, 0xEB03, 0xEB04, 0xEB08, [0xEB0F, 0xEB12], 0xEB16, 0xEB19, 0xEB1E, 0xEB1F, 0xEB28, 0xEB29, 0xEB2B, 0xEB31, 0xEB35, 0xEB36, 0xEB3A, 0xEB3B, 0xEB40, 0xEB48, 0xEB49, 0xEB4D, 0xEB61, 0xEB63, 0xEB65, 0xEB6E, 0xEB6F, [0xEC08, 0xEC0E], 0xEC10, 0xEC11, 0xF103, 0xF104, 0xF109, [0xF117, 0xF11E], [0xF121, 0xF123], [0xF126, 0xF12D], 0xF12F, [0xF133, 0xF138], 0xF13D, 0xF1AB, 0xF1AC, [0xF1B1, 0xF1B5], 0xF282, 0xF283, 0xF29E, 0xF2A1, 0xF2A4, 0xF2A7, 0xF2A8, [0xF460, 0xF468], [0xF46A, 0xF472], 0xF6BE, 0xF6C4, [0xF6C6, 0xF6C8], [0xF6D3, 0xF6D6], 0xF6DE
]
}]
]);
//# sourceMappingURL=chtml.js.map
;// ./node_modules/.pnpm/@mathjax+mathjax-newcm-font@4.0.0/node_modules/@mathjax/mathjax-newcm-font/mjs/chtml/default.js
const Font = {
fontName: 'mathjax-newcm',
DefaultFont: MathJaxNewcmFont
};
//# sourceMappingURL=default.js.map
;// ./mjs/output/chtml/DefaultFont.js
const fontName = Font.fontName;
const DefaultFont = Font.DefaultFont;
//# sourceMappingURL=DefaultFont.js.map
;// ./mjs/output/chtml.js
class CHTML extends CommonOutputJax {
constructor(options = {}) {
super(options, ChtmlWrapperFactory, DefaultFont);
this.chtmlStyles = null;
this.font.adaptiveCSS(this.options.adaptiveCSS);
this.wrapperUsage = new Usage();
}
addExtension(font, prefix = '') {
const css = super.addExtension(font, prefix);
if (css.length && this.options.adaptiveCSS && this.chtmlStyles) {
this.adaptor.insertRules(this.chtmlStyles, css);
}
return [];
}
escaped(math, html) {
this.setDocument(html);
return this.html('span', {}, [this.text(math.math)]);
}
styleSheet(html) {
if (this.chtmlStyles) {
const styles = new StyleJsonSheet();
if (this.options.adaptiveCSS) {
this.addWrapperStyles(styles);
this.updateFontStyles(styles);
}
styles.addStyles(this.font.updateDynamicStyles());
this.adaptor.insertRules(this.chtmlStyles, styles.getStyleRules());
return this.chtmlStyles;
}
const sheet = (this.chtmlStyles = super.styleSheet(html));
this.adaptor.setAttribute(sheet, 'id', CHTML.STYLESHEETID);
this.wrapperUsage.update();
return sheet;
}
updateFontStyles(styles) {
styles.addStyles(this.font.updateStyles({}));
}
addWrapperStyles(styles) {
if (!this.options.adaptiveCSS) {
super.addWrapperStyles(styles);
return;
}
for (const kind of this.wrapperUsage.update()) {
const wrapper = this.factory.getNodeClass(kind);
if (wrapper) {
this.addClassStyles(wrapper, styles);
}
}
}
addClassStyles(wrapper, styles) {
const CLASS = wrapper;
if (CLASS.autoStyle && CLASS.kind !== 'unknown') {
styles.addStyles({
['mjx-' + CLASS.kind]: {
display: 'inline-block',
'text-align': 'left',
},
});
}
this.wrapperUsage.add(CLASS.kind);
super.addClassStyles(wrapper, styles);
}
insertStyles(styles) {
if (this.chtmlStyles) {
this.adaptor.insertRules(this.chtmlStyles, new StyleJsonSheet(styles).getStyleRules());
}
}
processMath(wrapper, parent) {
wrapper.toCHTML([parent]);
}
clearCache() {
this.styleJson.clear();
this.font.clearCache();
this.wrapperUsage.clear();
this.chtmlStyles = null;
}
reset() {
this.clearCache();
}
unknownText(text, variant, width = null) {
const styles = {};
const scale = 100 / this.math.metrics.scale;
if (scale !== 100) {
styles['font-size'] = this.fixed(scale, 1) + '%';
styles.padding =
em(75 / scale) + ' 0 ' + em(20 / scale) + ' 0';
}
if (variant !== '-explicitFont') {
const c = unicodeChars(text);
if (c.length !== 1 || c[0] < 0x1d400 || c[0] > 0x1d7ff) {
this.cssFontStyles(this.font.getCssFont(variant), styles);
}
}
if (width !== null) {
styles.width = this.fixed(width * this.math.metrics.scale) + 'em';
}
return this.html('mjx-utext', { variant: variant, style: styles }, [
this.text(text),
]);
}
measureTextNode(textNode) {
const adaptor = this.adaptor;
const text = adaptor.clone(textNode);
adaptor.setStyle(text, 'font-family', adaptor.getStyle(text, 'font-family').replace(/MJXZERO, /g, ''));
const em = this.math.metrics.em;
const style = {
position: 'absolute',
top: 0,
left: 0,
'white-space': 'nowrap',
'font-size': this.fixed(em, 3) + 'px',
};
const node = this.html('mjx-measure-text', { style }, [text]);
adaptor.append(adaptor.parent(this.math.start.node), this.container);
adaptor.append(this.container, node);
const w = adaptor.nodeSize(text, em)[0];
adaptor.remove(this.container);
adaptor.remove(node);
return { w: w, h: 0.75, d: 0.2 };
}
}
CHTML.NAME = 'CHTML';
CHTML.OPTIONS = Object.assign(Object.assign({}, CommonOutputJax.OPTIONS), { adaptiveCSS: true, matchFontHeight: true });
CHTML.commonStyles = Object.assign(Object.assign({}, CommonOutputJax.commonStyles), { 'mjx-container[jax="CHTML"]': {
'white-space': 'nowrap',
}, [[
'mjx-mo > mjx-c',
'mjx-mi > mjx-c',
'mjx-mn > mjx-c',
'mjx-ms > mjx-c',
'mjx-mtext > mjx-c',
].join(', ')]: {
'clip-path': 'padding-box xywh(-1em -2px calc(100% + 2em) calc(100% + 4px))',
}, 'mjx-stretchy-h': {
'clip-path': 'padding-box xywh(0 -2px 100% calc(100% + 4px))',
}, 'mjx-stretchy-v': {
'clip-path': 'padding-box xywh(-2px 0 calc(100% + 4px) 100%)',
}, 'mjx-container [space="1"]': { 'margin-left': '.111em' }, 'mjx-container [space="2"]': { 'margin-left': '.167em' }, 'mjx-container [space="3"]': { 'margin-left': '.222em' }, 'mjx-container [space="4"]': { 'margin-left': '.278em' }, 'mjx-container [space="5"]': { 'margin-left': '.333em' }, 'mjx-container [rspace="1"]': { 'margin-right': '.111em' }, 'mjx-container [rspace="2"]': { 'margin-right': '.167em' }, 'mjx-container [rspace="3"]': { 'margin-right': '.222em' }, 'mjx-container [rspace="4"]': { 'margin-right': '.278em' }, 'mjx-container [rspace="5"]': { 'margin-right': '.333em' }, 'mjx-container [size="s"]': { 'font-size': '70.7%' }, 'mjx-container [size="ss"]': { 'font-size': '50%' }, 'mjx-container [size="Tn"]': { 'font-size': '60%' }, 'mjx-container [size="sm"]': { 'font-size': '85%' }, 'mjx-container [size="lg"]': { 'font-size': '120%' }, 'mjx-container [size="Lg"]': { 'font-size': '144%' }, 'mjx-container [size="LG"]': { 'font-size': '173%' }, 'mjx-container [size="hg"]': { 'font-size': '207%' }, 'mjx-container [size="HG"]': { 'font-size': '249%' }, 'mjx-container [width="full"]': { width: '100%' }, 'mjx-box': { display: 'inline-block' }, 'mjx-block': { display: 'block' }, 'mjx-itable': { display: 'inline-table' }, 'mjx-row': { display: 'table-row' }, 'mjx-row > *': { display: 'table-cell' }, 'mjx-container [inline-breaks]': { display: 'inline' }, 'mjx-mtext': {
display: 'inline-block',
}, 'mjx-mstyle': {
display: 'inline-block',
}, 'mjx-merror': {
display: 'inline-block',
color: 'red',
'background-color': 'yellow',
}, 'mjx-mphantom': {
visibility: 'hidden',
} });
CHTML.STYLESHEETID = 'MJX-CHTML-styles';
//# sourceMappingURL=chtml.js.map
;// ./mjs/output/chtml/DynamicFonts.js
function AddFontIds(ranges, prefix) {
const variants = {};
for (const id of Object.keys(ranges)) {
const map = ranges[id];
for (const variant of Object.keys(map)) {
if (!variants[variant]) {
variants[variant] = {};
}
const chars = map[variant];
if (id) {
for (const c of Object.keys(chars)) {
const data = chars[parseInt(c)];
if (!data[3]) {
data[3] = {};
}
if (prefix) {
data[3].ff = prefix + '-' + id;
}
else {
data[3].f = id;
}
}
}
Object.assign(variants[variant], chars);
}
}
return variants;
}
//# sourceMappingURL=DynamicFonts.js.map
;// ./components/mjs/output/chtml/lib/chtml.js
if (MathJax.loader) {
MathJax.loader.checkVersion('output/chtml', VERSION, 'output');
}
combineWithMathJax({_: {
output: {
chtml_ts: output_chtml_namespaceObject,
chtml: {
DefaultFont: DefaultFont_namespaceObject,
DynamicFonts: DynamicFonts_namespaceObject,
FontData: chtml_FontData_namespaceObject,
Notation: chtml_Notation_namespaceObject,
Usage: Usage_namespaceObject,
Wrapper: chtml_Wrapper_namespaceObject,
WrapperFactory: chtml_WrapperFactory_namespaceObject,
Wrappers_ts: Wrappers_namespaceObject,
Wrappers: {
HtmlNode: Wrappers_HtmlNode_namespaceObject,
TeXAtom: chtml_Wrappers_TeXAtom_namespaceObject,
TextNode: Wrappers_TextNode_namespaceObject,
maction: chtml_Wrappers_maction_namespaceObject,
math: chtml_Wrappers_math_namespaceObject,
menclose: chtml_Wrappers_menclose_namespaceObject,
mfenced: chtml_Wrappers_mfenced_namespaceObject,
mfrac: chtml_Wrappers_mfrac_namespaceObject,
mglyph: chtml_Wrappers_mglyph_namespaceObject,
mi: chtml_Wrappers_mi_namespaceObject,
mmultiscripts: chtml_Wrappers_mmultiscripts_namespaceObject,
mn: chtml_Wrappers_mn_namespaceObject,
mo: chtml_Wrappers_mo_namespaceObject,
mpadded: chtml_Wrappers_mpadded_namespaceObject,
mroot: chtml_Wrappers_mroot_namespaceObject,
mrow: chtml_Wrappers_mrow_namespaceObject,
ms: chtml_Wrappers_ms_namespaceObject,
mspace: chtml_Wrappers_mspace_namespaceObject,
msqrt: chtml_Wrappers_msqrt_namespaceObject,
msubsup: chtml_Wrappers_msubsup_namespaceObject,
mtable: chtml_Wrappers_mtable_namespaceObject,
mtd: chtml_Wrappers_mtd_namespaceObject,
mtext: chtml_Wrappers_mtext_namespaceObject,
mtr: chtml_Wrappers_mtr_namespaceObject,
munderover: chtml_Wrappers_munderover_namespaceObject,
scriptbase: Wrappers_scriptbase_namespaceObject,
semantics: chtml_Wrappers_semantics_namespaceObject
}
},
common_ts: common_namespaceObject,
common: {
Direction: Direction_namespaceObject,
FontData: FontData_namespaceObject,
LineBBox: LineBBox_namespaceObject,
LinebreakVisitor: LinebreakVisitor_namespaceObject,
Notation: Notation_namespaceObject,
Wrapper: common_Wrapper_namespaceObject,
WrapperFactory: common_WrapperFactory_namespaceObject,
Wrappers: {
TeXAtom: Wrappers_TeXAtom_namespaceObject,
TextNode: TextNode_namespaceObject,
XmlNode: XmlNode_namespaceObject,
maction: Wrappers_maction_namespaceObject,
math: Wrappers_math_namespaceObject,
menclose: Wrappers_menclose_namespaceObject,
mfenced: Wrappers_mfenced_namespaceObject,
mfrac: Wrappers_mfrac_namespaceObject,
mglyph: Wrappers_mglyph_namespaceObject,
mi: Wrappers_mi_namespaceObject,
mmultiscripts: Wrappers_mmultiscripts_namespaceObject,
mn: Wrappers_mn_namespaceObject,
mo: Wrappers_mo_namespaceObject,
mpadded: Wrappers_mpadded_namespaceObject,
mroot: Wrappers_mroot_namespaceObject,
mrow: Wrappers_mrow_namespaceObject,
ms: Wrappers_ms_namespaceObject,
mspace: Wrappers_mspace_namespaceObject,
msqrt: Wrappers_msqrt_namespaceObject,
msubsup: Wrappers_msubsup_namespaceObject,
mtable: Wrappers_mtable_namespaceObject,
mtd: Wrappers_mtd_namespaceObject,
mtext: Wrappers_mtext_namespaceObject,
mtr: Wrappers_mtr_namespaceObject,
munderover: Wrappers_munderover_namespaceObject,
scriptbase: scriptbase_namespaceObject,
semantics: Wrappers_semantics_namespaceObject
}
}
}
}});
;// ./components/mjs/output/util.js
const util_FONTPATH = hasWindow ?
'https://cdn.jsdelivr.net/npm/@mathjax/%%FONT%%-font':
'@mathjax/%%FONT%%-font';
const OutputUtil = {
config(jax, jaxClass, defaultFont, fontClass) {
if (MathJax.loader) {
combineDefaults(MathJax.config, jax, MathJax.config.output || {});
let config = MathJax.config[jax];
let font = config.font || config.fontData || defaultFont;
if (typeof(font) !== 'string') {
config.fontData = font;
config.font = font = font.NAME;
}
if (font.charAt(0) !== '[') {
const path = (config.fontPath || util_FONTPATH);
const name = (font.match(/^[a-z]+:/) ? (font.match(/[^/:\\]*$/) || [jax])[0] : font);
combineDefaults(MathJax.config.loader, 'paths', {
[name]: (name === font ? path.replace(/%%FONT%%/g, font) : font)
});
font = `[${name}]`;
}
const name = font.substring(1, font.length - 1);
if (name !== defaultFont || !fontClass) {
MathJax.loader.addPackageData(`output/${jax}`, {extraLoads: [`${font}/${jax}`]});
} else {
const extraLoads = MathJax.config.loader[`${font}/${jax}`]?.extraLoads;
if (extraLoads) {
MathJax.loader.addPackageData(`output/${jax}`, {extraLoads});
}
combineWithMathJax({_: {
output: {
fonts: {
[name]: {
[jax + '_ts']: {
[fontClass.NAME + 'Font']: fontClass
}
}
}
}
}});
combineDefaults(MathJax, 'config', {
output: {
font: font,
},
[jax]: {
fontData: fontClass,
dynamicPrefix: `${font}/${jax}/dynamic`
}
});
if (jax === 'chtml') {
combineDefaults(MathJax.config, jax, {
fontURL: Package.resolvePath(`${font}/${jax}/woff2`, false),
});
}
}
}
if (MathJax.startup) {
MathJax.startup.registerConstructor(jax, jaxClass);
MathJax.startup.useOutput(jax);
}
},
loadFont(startup, jax, font, preloaded) {
if (!MathJax.loader) {
return startup;
}
if (preloaded) {
MathJax.loader.preLoaded(`[${font}]/${jax}`);
}
return Package.loadPromise(`output/${jax}`).then(startup);
}
};
;// ./components/mjs/output/chtml/chtml.js
OutputUtil.config('chtml', CHTML, fontName, DefaultFont);
function loadFont(startup, preload) {
return OutputUtil.loadFont(startup, 'chtml', fontName, preload);
}
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/key_navigatable.js
var KEY;
(function (KEY) {
KEY[KEY["RETURN"] = 13] = "RETURN";
KEY[KEY["ESCAPE"] = 27] = "ESCAPE";
KEY[KEY["SPACE"] = 32] = "SPACE";
KEY[KEY["LEFT"] = 37] = "LEFT";
KEY[KEY["UP"] = 38] = "UP";
KEY[KEY["RIGHT"] = 39] = "RIGHT";
KEY[KEY["DOWN"] = 40] = "DOWN";
})(KEY || (KEY = {}));
//# sourceMappingURL=key_navigatable.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/mouse_navigatable.js
const MOUSE = {
CLICK: 'click',
DBLCLICK: 'dblclick',
DOWN: 'mousedown',
UP: 'mouseup',
OVER: 'mouseover',
OUT: 'mouseout',
MOVE: 'mousemove',
SELECTEND: 'selectend',
SELECTSTART: 'selectstart'
};
//# sourceMappingURL=mouse_navigatable.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/abstract_navigatable.js
class AbstractNavigatable {
constructor() {
this.bubble = false;
}
bubbleKey() {
this.bubble = true;
}
keydown(event) {
switch (event.keyCode) {
case KEY.ESCAPE:
this.escape(event);
break;
case KEY.RIGHT:
this.right(event);
break;
case KEY.LEFT:
this.left(event);
break;
case KEY.UP:
this.up(event);
break;
case KEY.DOWN:
this.down(event);
break;
case KEY.RETURN:
case KEY.SPACE:
this.space(event);
break;
default:
return;
}
this.bubble ? (this.bubble = false) : this.stop(event);
}
escape(_event) { }
space(_event) { }
left(_event) { }
right(_event) { }
up(_event) { }
down(_event) { }
stop(event) {
if (event) {
event.stopPropagation();
event.preventDefault();
event.cancelBubble = true;
}
}
mousedown(event) {
return this.stop(event);
}
mouseup(event) {
return this.stop(event);
}
mouseover(event) {
return this.stop(event);
}
mouseout(event) {
return this.stop(event);
}
click(event) {
return this.stop(event);
}
addEvents(element) {
element.addEventListener(MOUSE.DOWN, this.mousedown.bind(this));
element.addEventListener(MOUSE.UP, this.mouseup.bind(this));
element.addEventListener(MOUSE.OVER, this.mouseover.bind(this));
element.addEventListener(MOUSE.OUT, this.mouseout.bind(this));
element.addEventListener(MOUSE.CLICK, this.click.bind(this));
element.addEventListener('keydown', this.keydown.bind(this));
element.addEventListener('dragstart', this.stop.bind(this));
element.addEventListener(MOUSE.SELECTSTART, this.stop.bind(this));
element.addEventListener('contextmenu', this.stop.bind(this));
element.addEventListener(MOUSE.DBLCLICK, this.stop.bind(this));
}
}
//# sourceMappingURL=abstract_navigatable.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/menu_element.js
class MenuElement extends AbstractNavigatable {
addAttributes(attributes) {
for (const attr in attributes) {
this.html.setAttribute(attr, attributes[attr]);
}
}
get html() {
if (!this._html) {
this.generateHtml();
}
return this._html;
}
set html(html) {
this._html = html;
this.addEvents(html);
}
generateHtml() {
const html = document.createElement('div');
html.classList.add(this.className);
html.setAttribute('role', this.role);
this.html = html;
}
focus() {
const html = this.html;
html.setAttribute('tabindex', '0');
html.focus();
}
unfocus() {
const html = this.html;
if (html.hasAttribute('tabindex')) {
html.setAttribute('tabindex', '-1');
}
try {
html.blur();
}
catch (e) {
}
html.blur();
}
}
//# sourceMappingURL=menu_element.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/abstract_postable.js
class AbstractPostable extends MenuElement {
constructor() {
super(...arguments);
this.posted = false;
}
isPosted() {
return this.posted;
}
post(x, y) {
if (this.posted) {
return;
}
if (typeof x !== 'undefined' && typeof y !== 'undefined') {
this.html.setAttribute('style', 'left: ' + x + 'px; top: ' + y + 'px;');
}
this.display();
this.posted = true;
}
unpost() {
if (!this.posted) {
return;
}
const html = this.html;
if (html.parentNode) {
html.parentNode.removeChild(html);
}
this.posted = false;
}
}
//# sourceMappingURL=abstract_postable.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/html_classes.js
const PREFIX = 'CtxtMenu';
function prefix_(name) {
return PREFIX + '_' + name;
}
function prefixClass_(name) {
return prefix_(name);
}
function prefixAttr_(name) {
return prefix_(name);
}
const HtmlClasses = {
ATTACHED: prefixClass_('Attached'),
CONTEXTMENU: prefixClass_('ContextMenu'),
MENU: prefixClass_('Menu'),
MENUARROW: prefixClass_('MenuArrow'),
MENUACTIVE: prefixClass_('MenuActive'),
MENUCHECK: prefixClass_('MenuCheck'),
MENUCLOSE: prefixClass_('MenuClose'),
MENUCOMBOBOX: prefixClass_('MenuComboBox'),
MENUDISABLED: prefixClass_('MenuDisabled'),
MENUFRAME: prefixClass_('MenuFrame'),
MENUITEM: prefixClass_('MenuItem'),
MENULABEL: prefixClass_('MenuLabel'),
MENURADIOCHECK: prefixClass_('MenuRadioCheck'),
MENUINPUTBOX: prefixClass_('MenuInputBox'),
MENURULE: prefixClass_('MenuRule'),
MENUSLIDER: prefixClass_('MenuSlider'),
MOUSEPOST: prefixClass_('MousePost'),
RTL: prefixClass_('RTL'),
INFO: prefixClass_('Info'),
INFOCLOSE: prefixClass_('InfoClose'),
INFOCONTENT: prefixClass_('InfoContent'),
INFOSIGNATURE: prefixClass_('InfoSignature'),
INFOTITLE: prefixClass_('InfoTitle'),
SLIDERVALUE: prefixClass_('SliderValue'),
SLIDERBAR: prefixClass_('SliderBar'),
SELECTION: prefixClass_('Selection'),
SELECTIONBOX: prefixClass_('SelectionBox'),
SELECTIONMENU: prefixClass_('SelectionMenu'),
SELECTIONDIVIDER: prefixClass_('SelectionDivider'),
SELECTIONITEM: prefixClass_('SelectionItem')
};
const HtmlAttrs = {
COUNTER: prefixAttr_('Counter'),
KEYDOWNFUNC: prefixAttr_('keydownFunc'),
CONTEXTMENUFUNC: prefixAttr_('contextmenuFunc'),
OLDTAB: prefixAttr_('Oldtabindex'),
TOUCHFUNC: prefixAttr_('TouchFunc')
};
//# sourceMappingURL=html_classes.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/abstract_entry.js
class AbstractEntry extends MenuElement {
constructor(_menu, _type) {
super();
this._menu = _menu;
this._type = _type;
this.className = HtmlClasses['MENUITEM'];
this.role = 'menuitem';
this.hidden = false;
}
get menu() {
return this._menu;
}
set menu(menu) {
this._menu = menu;
}
get type() {
return this._type;
}
hide() {
this.hidden = true;
this.menu.generateMenu();
}
show() {
this.hidden = false;
this.menu.generateMenu();
}
isHidden() {
return this.hidden;
}
}
//# sourceMappingURL=abstract_entry.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/menu_util.js
function menu_util_close(item) {
const menu = item.menu;
if (menu.baseMenu) {
menu.baseMenu.unpost();
}
else {
menu.unpost();
}
}
function getActiveElement(item) {
const menu = item.menu;
const baseMenu = (menu.baseMenu ? menu.baseMenu : menu);
return baseMenu.store.active;
}
function error(_error, msg) {
console.error('ContextMenu Error: ' + msg);
}
function counter() {
return count++;
}
let count = 0;
//# sourceMappingURL=menu_util.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/abstract_item.js
class AbstractItem extends AbstractEntry {
constructor(menu, type, _content, id) {
super(menu, type);
this._content = _content;
this.disabled = false;
this.callbacks = [];
this._id = id ? id : _content;
}
get content() {
return this._content;
}
set content(content) {
this._content = content;
this.generateHtml();
if (this.menu) {
this.menu.generateHtml();
}
}
get id() {
return this._id;
}
press() {
if (!this.disabled) {
this.executeAction();
this.executeCallbacks_();
}
}
executeAction() { }
registerCallback(func) {
if (this.callbacks.indexOf(func) === -1) {
this.callbacks.push(func);
}
}
unregisterCallback(func) {
const index = this.callbacks.indexOf(func);
if (index !== -1) {
this.callbacks.splice(index, 1);
}
}
mousedown(event) {
this.press();
this.stop(event);
}
mouseover(event) {
this.focus();
this.stop(event);
}
mouseout(event) {
this.deactivate();
this.stop(event);
}
generateHtml() {
super.generateHtml();
const html = this.html;
html.setAttribute('aria-disabled', 'false');
html.textContent = this.content;
}
activate() {
if (!this.disabled) {
this.html.classList.add(HtmlClasses['MENUACTIVE']);
}
}
deactivate() {
this.html.classList.remove(HtmlClasses['MENUACTIVE']);
}
focus() {
this.menu.focused = this;
super.focus();
this.activate();
}
unfocus() {
this.deactivate();
super.unfocus();
}
escape(_event) {
menu_util_close(this);
}
up(event) {
this.menu.up(event);
}
down(event) {
this.menu.down(event);
}
left(event) {
this.menu.left(event);
}
right(event) {
this.menu.right(event);
}
space(_event) {
this.press();
}
disable() {
this.disabled = true;
const html = this.html;
html.classList.add(HtmlClasses['MENUDISABLED']);
html.setAttribute('aria-disabled', 'true');
}
enable() {
this.disabled = false;
const html = this.html;
html.classList.remove(HtmlClasses['MENUDISABLED']);
html.removeAttribute('aria-disabled');
}
executeCallbacks_() {
for (const func of this.callbacks) {
try {
func(this);
}
catch (e) {
error(e, 'Callback for menu entry ' + this.id + ' failed.');
}
}
}
}
//# sourceMappingURL=abstract_item.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/item_submenu.js
class Submenu extends AbstractItem {
static fromJson(factory, { content: content, menu: submenu, id: id }, menu) {
const item = new this(menu, content, id);
const sm = factory.get('subMenu')(factory, submenu, item);
item.submenu = sm;
return item;
}
constructor(menu, content, id) {
super(menu, 'submenu', content, id);
this._submenu = null;
}
set submenu(menu) {
this._submenu = menu;
}
get submenu() {
return this._submenu;
}
mouseover(event) {
this.focus();
this.stop(event);
}
mouseout(event) {
this.stop(event);
}
unfocus() {
if (!this.submenu.isPosted()) {
super.unfocus();
return;
}
if (this.menu.focused !== this) {
super.unfocus();
this.menu.unpostSubmenus();
return;
}
this.html.setAttribute('tabindex', '-1');
this.html.blur();
}
focus() {
super.focus();
if (!this.submenu.isPosted() && !this.disabled) {
this.submenu.post();
}
}
executeAction() {
this.submenu.isPosted() ? this.submenu.unpost() : this.submenu.post();
}
generateHtml() {
super.generateHtml();
const html = this.html;
this.span = document.createElement('span');
this.span.textContent = '\u25BA';
this.span.classList.add(HtmlClasses['MENUARROW']);
html.appendChild(this.span);
html.setAttribute('aria-haspopup', 'true');
}
left(event) {
if (this.submenu.isPosted()) {
this.submenu.unpost();
}
else {
super.left(event);
}
}
right(event) {
if (!this.submenu.isPosted()) {
this.submenu.post();
}
else {
this.submenu.down(event);
}
}
toJson() {
return { type: '' };
}
}
//# sourceMappingURL=item_submenu.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/abstract_menu.js
class AbstractMenu extends AbstractPostable {
constructor() {
super(...arguments);
this.className = HtmlClasses['CONTEXTMENU'];
this.role = 'menu';
this._items = [];
this._baseMenu = null;
}
set baseMenu(menu) {
this._baseMenu = menu;
}
get baseMenu() {
return this._baseMenu;
}
get items() {
return this._items;
}
set items(items) {
this._items = items;
}
get pool() {
return this.variablePool;
}
get focused() {
return this._focused;
}
set focused(item) {
if (this._focused === item) {
return;
}
if (!this._focused) {
this.unfocus();
}
const old = this._focused;
this._focused = item;
if (old) {
old.unfocus();
}
}
up(_event) {
const items = this.items.filter((x) => x instanceof AbstractItem && !x.isHidden());
if (items.length === 0) {
return;
}
if (!this.focused) {
items[items.length - 1].focus();
return;
}
let index = items.indexOf(this.focused);
if (index === -1) {
return;
}
index = index ? --index : items.length - 1;
items[index].focus();
}
down(_event) {
const items = this.items.filter((x) => x instanceof AbstractItem && !x.isHidden());
if (items.length === 0) {
return;
}
if (!this.focused) {
items[0].focus();
return;
}
let index = items.indexOf(this.focused);
if (index === -1) {
return;
}
index++;
index = index === items.length ? 0 : index;
items[index].focus();
}
generateHtml() {
super.generateHtml();
this.generateMenu();
}
generateMenu() {
const html = this.html;
html.classList.add(HtmlClasses['MENU']);
for (const item of this.items) {
if (!item.isHidden()) {
html.appendChild(item.html);
continue;
}
const itemHtml = item.html;
if (itemHtml.parentNode) {
itemHtml.parentNode.removeChild(itemHtml);
}
}
}
post(x, y) {
this.variablePool.update();
super.post(x, y);
}
unpostSubmenus() {
const submenus = this.items.filter((x) => x instanceof Submenu);
for (const submenu of submenus) {
submenu.submenu.unpost();
if (submenu !== this.focused) {
submenu.unfocus();
}
}
}
unpost() {
super.unpost();
this.unpostSubmenus();
this.focused = null;
}
find(id) {
for (const item of this.items) {
if (item.type === 'rule') {
continue;
}
if (item.id === id) {
return item;
}
if (item.type === 'submenu') {
const result = item.submenu.find(id);
if (result) {
return result;
}
}
}
return null;
}
}
//# sourceMappingURL=abstract_menu.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/menu_store.js
class MenuStore {
constructor(menu) {
this.menu = menu;
this.store = [];
this._active = null;
this.counter = 0;
this.attachedClass = HtmlClasses['ATTACHED'] + '_' + counter();
this.taborder = true;
this.attrMap = {};
}
set active(element) {
do {
if (this.store.indexOf(element) !== -1) {
this._active = element;
break;
}
element = element.parentNode;
} while (element);
}
get active() {
return this._active;
}
next() {
const length = this.store.length;
if (length === 0) {
this.active = null;
return null;
}
let index = this.store.indexOf(this.active);
index = index === -1 ? 0 : index < length - 1 ? index + 1 : 0;
this.active = this.store[index];
return this.active;
}
previous() {
const length = this.store.length;
if (length === 0) {
this.active = null;
return null;
}
const last = length - 1;
let index = this.store.indexOf(this.active);
index = index === -1 ? last : index === 0 ? last : index - 1;
this.active = this.store[index];
return this.active;
}
clear() {
this.remove(this.store);
}
insert(elementOrList) {
const elements = elementOrList instanceof HTMLElement ? [elementOrList] : elementOrList;
for (const element of elements) {
this.insertElement(element);
}
this.sort();
}
remove(elementOrList) {
const elements = elementOrList instanceof HTMLElement ? [elementOrList] : elementOrList;
for (const element of elements) {
this.removeElement(element);
}
this.sort();
}
inTaborder(flag) {
if (this.taborder && !flag) {
this.removeTaborder();
}
if (!this.taborder && flag) {
this.insertTaborder();
}
this.taborder = flag;
}
insertTaborder() {
if (this.taborder) {
this.insertTaborder_();
}
}
removeTaborder() {
if (this.taborder) {
this.removeTaborder_();
}
}
insertElement(element) {
if (element.classList.contains(this.attachedClass)) {
return;
}
element.classList.add(this.attachedClass);
if (this.taborder) {
this.addTabindex(element);
}
this.addEvents(element);
}
removeElement(element) {
if (!element.classList.contains(this.attachedClass)) {
return;
}
element.classList.remove(this.attachedClass);
if (this.taborder) {
this.removeTabindex(element);
}
this.removeEvents(element);
}
sort() {
const nodes = document.getElementsByClassName(this.attachedClass);
this.store = [].slice.call(nodes);
}
insertTaborder_() {
this.store.forEach((x) => x.setAttribute('tabindex', '0'));
}
removeTaborder_() {
this.store.forEach((x) => x.setAttribute('tabindex', '-1'));
}
addTabindex(element) {
if (element.hasAttribute('tabindex')) {
element.setAttribute(HtmlAttrs['OLDTAB'], element.getAttribute('tabindex'));
}
element.setAttribute('tabindex', '0');
}
removeTabindex(element) {
if (element.hasAttribute(HtmlAttrs['OLDTAB'])) {
element.setAttribute('tabindex', element.getAttribute(HtmlAttrs['OLDTAB']));
element.removeAttribute(HtmlAttrs['OLDTAB']);
}
else {
element.removeAttribute('tabindex');
}
}
addEvents(element) {
if (element.hasAttribute(HtmlAttrs['COUNTER'])) {
return;
}
this.addEvent(element, 'contextmenu', this.menu.post.bind(this.menu));
this.addEvent(element, 'keydown', this.keydown.bind(this));
element.setAttribute(HtmlAttrs['COUNTER'], this.counter.toString());
this.counter++;
}
addEvent(element, name, func) {
const attrName = HtmlAttrs[name.toUpperCase() + 'FUNC'];
this.attrMap[attrName + this.counter] = func;
element.addEventListener(name, func);
}
removeEvents(element) {
if (!element.hasAttribute(HtmlAttrs['COUNTER'])) {
return;
}
const counter = element.getAttribute(HtmlAttrs['COUNTER']);
this.removeEvent(element, 'contextmenu', counter);
this.removeEvent(element, 'keydown', counter);
element.removeAttribute(HtmlAttrs['COUNTER']);
}
removeEvent(element, name, counter) {
const attrName = HtmlAttrs[name.toUpperCase() + 'FUNC'];
const menuFunc = this.attrMap[attrName + counter];
element.removeEventListener(name, menuFunc);
}
keydown(event) {
if (event.keyCode === KEY.SPACE) {
this.menu.post(event);
event.preventDefault();
event.stopImmediatePropagation();
}
}
}
//# sourceMappingURL=menu_store.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/variable_pool.js
class VariablePool {
constructor() {
this.pool = {};
}
insert(variable) {
this.pool[variable.name] = variable;
}
lookup(name) {
return this.pool[name];
}
remove(name) {
delete this.pool[name];
}
update() {
for (const variable in this.pool) {
this.pool[variable].update();
}
}
}
//# sourceMappingURL=variable_pool.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/context_menu.js
class ContextMenu extends AbstractMenu {
static fromJson(factory, { pool: pool, items: items, id: id = '' }) {
const ctxtMenu = new this(factory);
ctxtMenu.id = id;
const varParser = factory.get('variable');
pool.forEach((x) => varParser(factory, x, ctxtMenu.pool));
const itemList = factory.get('items')(factory, items, ctxtMenu);
ctxtMenu.items = itemList;
return ctxtMenu;
}
constructor(factory) {
super();
this.factory = factory;
this.id = '';
this.moving = false;
this._store = new MenuStore(this);
this.widgets = [];
this.variablePool = new VariablePool();
}
generateHtml() {
if (this.isPosted()) {
this.unpost();
}
super.generateHtml();
this._frame = document.createElement('div');
this._frame.classList.add(HtmlClasses['MENUFRAME']);
const styleString = 'left: 0px; top: 0px; z-index: 200; width: 100%; ' +
'height: 100%; border: 0px; padding: 0px; margin: 0px;';
this._frame.setAttribute('style', 'position: absolute; ' + styleString);
const innerDiv = document.createElement('div');
innerDiv.setAttribute('style', 'position: fixed; ' + styleString);
this._frame.appendChild(innerDiv);
innerDiv.addEventListener('mousedown', function (event) {
this.unpost();
this.unpostWidgets();
this.stop(event);
}.bind(this));
}
display() {
document.body.appendChild(this.frame);
this.frame.appendChild(this.html);
this.focus();
}
escape(_event) {
this.unpost();
this.unpostWidgets();
}
unpost() {
super.unpost();
if (this.widgets.length > 0) {
return;
}
this.frame.parentNode.removeChild(this.frame);
const store = this.store;
if (!this.moving) {
store.insertTaborder();
}
store.active.focus();
}
left(_event) {
this.move_(this.store.previous());
}
right(_event) {
this.move_(this.store.next());
}
get frame() {
return this._frame;
}
get store() {
return this._store;
}
post(numberOrEvent, isY) {
if (typeof isY !== 'undefined') {
if (!this.moving) {
this.store.removeTaborder();
}
super.post(numberOrEvent, isY);
return;
}
const event = numberOrEvent;
let node;
if (event instanceof Event) {
node = event.target;
this.stop(event);
}
else {
node = event;
}
let x;
let y;
if (event instanceof MouseEvent) {
x = event.pageX;
y = event.pageY;
if (!x && !y && event.clientX) {
x =
event.clientX +
document.body.scrollLeft +
document.documentElement.scrollLeft;
y =
event.clientY +
document.body.scrollTop +
document.documentElement.scrollTop;
}
}
if (!x && !y && node) {
const offsetX = window.pageXOffset || document.documentElement.scrollLeft;
const offsetY = window.pageYOffset || document.documentElement.scrollTop;
const rect = node.getBoundingClientRect();
x = (rect.right + rect.left) / 2 + offsetX;
y = (rect.bottom + rect.top) / 2 + offsetY;
}
this.store.active = node;
this.anchor = this.store.active;
const menu = this.html;
const margin = 5;
if (x + menu.offsetWidth > document.body.offsetWidth - margin) {
x = document.body.offsetWidth - menu.offsetWidth - margin;
}
this.post(x, y);
}
registerWidget(widget) {
this.widgets.push(widget);
}
unregisterWidget(widget) {
const index = this.widgets.indexOf(widget);
if (index > -1) {
this.widgets.splice(index, 1);
}
if (this.widgets.length === 0) {
this.unpost();
}
}
unpostWidgets() {
this.widgets.forEach((x) => x.unpost());
}
toJson() {
return { type: '' };
}
move_(next) {
if (this.anchor && next !== this.anchor) {
this.moving = true;
this.unpost();
this.post(next);
this.moving = false;
}
}
}
//# sourceMappingURL=context_menu.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/sub_menu.js
class SubMenu extends AbstractMenu {
static fromJson(factory, { items: its }, anchor) {
const submenu = new this(anchor);
const itemList = factory.get('items')(factory, its, submenu);
submenu.items = itemList;
return submenu;
}
constructor(_anchor) {
super();
this._anchor = _anchor;
this.variablePool = this.anchor.menu.pool;
this.setBaseMenu();
}
get anchor() {
return this._anchor;
}
post() {
if (!this.anchor.menu.isPosted()) {
return;
}
const mobileFlag = false;
const rtlFlag = false;
const margin = 5;
let parent = this.anchor.html;
const menu = this.html;
const base = this.baseMenu.frame;
const mw = parent.offsetWidth;
let x = mobileFlag ? 30 : mw - 2;
let y = 0;
while (parent && parent !== base) {
x += parent.offsetLeft;
y += parent.offsetTop;
parent = parent.parentNode;
}
if (!mobileFlag) {
if ((rtlFlag && x - mw - menu.offsetWidth > margin) ||
(!rtlFlag && x + menu.offsetWidth > document.body.offsetWidth - margin)) {
x = Math.max(margin, x - mw - menu.offsetWidth + 6);
}
}
super.post(x, y);
}
display() {
this.baseMenu.frame.appendChild(this.html);
}
setBaseMenu() {
let menu = this;
do {
menu = menu.anchor.menu;
} while (menu instanceof SubMenu);
this.baseMenu = menu;
}
left(_event) {
this.focused = null;
this.anchor.focus();
}
toJson() {
return { type: '' };
}
}
//# sourceMappingURL=sub_menu.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/close_button.js
class CloseButton extends AbstractPostable {
constructor(element) {
super();
this.element = element;
this.className = HtmlClasses['MENUCLOSE'];
this.role = 'button';
}
generateHtml() {
const html = document.createElement('span');
html.classList.add(this.className);
html.setAttribute('role', this.role);
html.setAttribute('tabindex', '0');
const content = document.createElement('span');
content.textContent = '\u00D7';
html.appendChild(content);
this.html = html;
}
display() { }
unpost() {
super.unpost();
this.element.unpost();
}
keydown(event) {
this.bubbleKey();
super.keydown(event);
}
space(event) {
this.unpost();
this.stop(event);
}
mousedown(event) {
this.unpost();
this.stop(event);
}
}
//# sourceMappingURL=close_button.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/info.js
class Info extends AbstractPostable {
constructor(title, content, signature) {
super();
this.title = title;
this.signature = signature;
this.className = HtmlClasses['INFO'];
this.role = 'dialog';
this.contentDiv = this.generateContent();
this.close = this.generateClose();
this.content =
content ||
function () {
return '';
};
}
attachMenu(menu) {
this.menu = menu;
}
generateHtml() {
super.generateHtml();
const html = this.html;
html.appendChild(this.generateTitle());
html.appendChild(this.contentDiv);
html.appendChild(this.generateSignature());
html.appendChild(this.close.html);
html.setAttribute('tabindex', '0');
}
post() {
super.post();
const doc = document.documentElement;
const html = this.html;
const H = window.innerHeight || doc.clientHeight || doc.scrollHeight || 0;
const x = Math.floor(-html.offsetWidth / 2);
const y = Math.floor((H - html.offsetHeight) / 3);
html.setAttribute('style', 'margin-left: ' + x + 'px; top: ' + y + 'px;');
if (window.event instanceof MouseEvent) {
html.classList.add(HtmlClasses['MOUSEPOST']);
}
html.focus();
}
display() {
this.menu.registerWidget(this);
this.contentDiv.innerHTML = this.content();
const html = this.menu.html;
if (html.parentNode) {
html.parentNode.removeChild(html);
}
this.menu.frame.appendChild(this.html);
}
click(_event) { }
keydown(event) {
this.bubbleKey();
super.keydown(event);
}
escape(_event) {
this.unpost();
}
unpost() {
super.unpost();
this.html.classList.remove(HtmlClasses['MOUSEPOST']);
this.menu.unregisterWidget(this);
}
generateClose() {
const close = new CloseButton(this);
const html = close.html;
html.classList.add(HtmlClasses['INFOCLOSE']);
html.setAttribute('aria-label', 'Close Dialog Box');
return close;
}
generateTitle() {
const span = document.createElement('span');
span.innerHTML = this.title;
span.classList.add(HtmlClasses['INFOTITLE']);
return span;
}
generateContent() {
const div = document.createElement('div');
div.classList.add(HtmlClasses['INFOCONTENT']);
div.setAttribute('tabindex', '0');
return div;
}
generateSignature() {
const span = document.createElement('span');
span.innerHTML = this.signature;
span.classList.add(HtmlClasses['INFOSIGNATURE']);
return span;
}
toJson() {
return { type: '' };
}
}
//# sourceMappingURL=info.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/abstract_variable_item.js
class AbstractVariableItem extends AbstractItem {
generateHtml() {
super.generateHtml();
const html = this.html;
if (!this.span) {
this.generateSpan();
}
html.appendChild(this.span);
this.update();
}
register() {
this.variable.register(this);
}
unregister() {
this.variable.unregister(this);
}
update() {
this.updateAria();
if (this.span) {
this.updateSpan();
}
}
}
//# sourceMappingURL=abstract_variable_item.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/item_radio.js
class Radio extends AbstractVariableItem {
static fromJson(_factory, { content: content, variable: variable, id: id }, menu) {
return new this(menu, content, variable, id);
}
constructor(menu, content, variable, id) {
super(menu, 'radio', content, id);
this.role = 'menuitemradio';
this.variable = menu.pool.lookup(variable);
this.register();
}
executeAction() {
this.variable.setValue(this.id);
menu_util_close(this);
}
generateSpan() {
this.span = document.createElement('span');
this.span.textContent = '\u2713';
this.span.classList.add(HtmlClasses['MENURADIOCHECK']);
}
updateAria() {
this.html.setAttribute('aria-checked', this.variable.getValue() === this.id ? 'true' : 'false');
}
updateSpan() {
this.span.style.display =
this.variable.getValue() === this.id ? '' : 'none';
}
toJson() {
return { type: '' };
}
}
//# sourceMappingURL=item_radio.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/item_rule.js
class Rule extends AbstractEntry {
static fromJson(_factory, _json, menu) {
return new this(menu);
}
constructor(menu) {
super(menu, 'rule');
this.className = HtmlClasses['MENUITEM'];
this.role = 'separator';
}
generateHtml() {
super.generateHtml();
const html = this.html;
html.classList.add(HtmlClasses['MENURULE']);
html.setAttribute('aria-orientation', 'vertical');
}
addEvents(_element) { }
toJson() {
return { type: 'rule' };
}
}
//# sourceMappingURL=item_rule.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/item_command.js
class Command extends AbstractItem {
static fromJson(_factory, { content: content, action: action, id: id }, menu) {
return new this(menu, content, action, id);
}
constructor(menu, content, command, id) {
super(menu, 'command', content, id);
this.command = command;
}
executeAction() {
try {
this.command(getActiveElement(this));
}
catch (e) {
error(e, 'Illegal command callback.');
}
menu_util_close(this);
}
toJson() {
return { type: '' };
}
}
//# sourceMappingURL=item_command.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/variable.js
class Variable {
static fromJson(_factory, { name, getter, setter }, pool) {
const variable = new this(name, getter, setter);
pool.insert(variable);
}
constructor(_name, getter, setter) {
this._name = _name;
this.getter = getter;
this.setter = setter;
this.items = [];
}
get name() {
return this._name;
}
getValue(node) {
try {
return this.getter(node);
}
catch (e) {
error(e, 'Command of variable ' + this.name + ' failed.');
return null;
}
}
setValue(value, node) {
try {
this.setter(value, node);
}
catch (e) {
error(e, 'Command of variable ' + this.name + ' failed.');
}
this.update();
}
register(item) {
if (this.items.indexOf(item) === -1) {
this.items.push(item);
}
}
unregister(item) {
const index = this.items.indexOf(item);
if (index !== -1) {
this.items.splice(index, 1);
}
}
update() {
this.items.forEach((x) => x.update());
}
registerCallback(func) {
this.items.forEach((x) => x.registerCallback(func));
}
unregisterCallback(func) {
this.items.forEach((x) => x.unregisterCallback(func));
}
toJson() {
return {
type: 'variable',
name: this.name,
getter: this.getter.toString(),
setter: this.setter.toString()
};
}
}
//# sourceMappingURL=variable.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/item_checkbox.js
class Checkbox extends AbstractVariableItem {
static fromJson(_factory, { content: content, variable: variable, id: id }, menu) {
return new this(menu, content, variable, id);
}
constructor(menu, content, variable, id) {
super(menu, 'checkbox', content, id);
this.role = 'menuitemcheckbox';
this.variable = menu.pool.lookup(variable);
this.register();
}
executeAction() {
this.variable.setValue(!this.variable.getValue());
menu_util_close(this);
}
generateSpan() {
this.span = document.createElement('span');
this.span.textContent = '\u2713';
this.span.classList.add(HtmlClasses['MENUCHECK']);
}
updateAria() {
this.html.setAttribute('aria-checked', this.variable.getValue() ? 'true' : 'false');
}
updateSpan() {
this.span.style.display = this.variable.getValue() ? '' : 'none';
}
toJson() {
return { type: '' };
}
}
//# sourceMappingURL=item_checkbox.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/item_combo.js
class Combo extends AbstractVariableItem {
static fromJson(_factory, { content: content, variable: variable, id: id }, menu) {
return new this(menu, content, variable, id);
}
constructor(menu, content, variable, id) {
super(menu, 'combobox', content, id);
this.role = 'combobox';
this.inputEvent = false;
this.variable = menu.pool.lookup(variable);
this.register();
}
executeAction() {
this.variable.setValue(this.input.value, getActiveElement(this));
}
space(event) {
super.space(event);
menu_util_close(this);
}
focus() {
super.focus();
this.input.focus();
}
unfocus() {
super.unfocus();
this.updateSpan();
}
generateHtml() {
super.generateHtml();
const html = this.html;
html.classList.add(HtmlClasses['MENUCOMBOBOX']);
}
generateSpan() {
this.span = document.createElement('span');
this.span.classList.add(HtmlClasses['MENUINPUTBOX']);
this.input = document.createElement('input');
this.input.addEventListener('keydown', this.inputKey.bind(this));
this.input.setAttribute('size', '10em');
this.input.setAttribute('type', 'text');
this.input.setAttribute('tabindex', '-1');
this.span.appendChild(this.input);
}
inputKey(_event) {
this.bubbleKey();
this.inputEvent = true;
}
keydown(event) {
if (this.inputEvent &&
event.keyCode !== KEY.ESCAPE &&
event.keyCode !== KEY.RETURN) {
this.inputEvent = false;
event.stopPropagation();
return;
}
super.keydown(event);
event.stopPropagation();
}
updateAria() { }
updateSpan() {
let initValue;
try {
initValue = this.variable.getValue(getActiveElement(this));
}
catch (e) {
initValue = '';
}
this.input.value = initValue;
}
toJson() {
return { type: '' };
}
}
//# sourceMappingURL=item_combo.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/item_label.js
class item_label_Label extends AbstractItem {
static fromJson(_factory, { content: content, id: id }, menu) {
return new this(menu, content, id);
}
constructor(menu, content, id) {
super(menu, 'label', content, id);
}
generateHtml() {
super.generateHtml();
const html = this.html;
html.classList.add(HtmlClasses['MENULABEL']);
}
toJson() {
return { type: '' };
}
}
//# sourceMappingURL=item_label.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/item_slider.js
class Slider extends AbstractVariableItem {
static fromJson(_factory, { content: content, variable: variable, id: id }, menu) {
return new this(menu, content, variable, id);
}
constructor(menu, content, variable, id) {
super(menu, 'slider', content, id);
this.role = 'slider';
this.labelId = 'ctx_slideLabel' + counter();
this.valueId = 'ctx_slideValue' + counter();
this.inputEvent = false;
this.variable = menu.pool.lookup(variable);
this.register();
}
executeAction() {
this.variable.setValue(this.input.value, getActiveElement(this));
this.update();
}
space(event) {
super.space(event);
menu_util_close(this);
}
focus() {
super.focus();
this.input.focus();
}
unfocus() {
super.unfocus();
this.updateSpan();
}
generateHtml() {
super.generateHtml();
const html = this.html;
html.classList.add(HtmlClasses['MENUSLIDER']);
this.valueSpan = document.createElement('span');
this.valueSpan.setAttribute('id', this.valueId);
this.valueSpan.classList.add(HtmlClasses['SLIDERVALUE']);
this.html.appendChild(this.valueSpan);
}
generateSpan() {
this.span = document.createElement('span');
this.labelSpan = document.createElement('span');
this.labelSpan.setAttribute('id', this.labelId);
this.labelSpan.appendChild(this.html.childNodes[0]);
this.html.appendChild(this.labelSpan);
this.input = document.createElement('input');
this.input.setAttribute('type', 'range');
this.input.setAttribute('min', '0');
this.input.setAttribute('max', '100');
this.input.setAttribute('aria-valuemin', '0');
this.input.setAttribute('aria-valuemax', '100');
this.input.setAttribute('aria-labelledby', this.labelId);
this.input.addEventListener('keydown', this.inputKey.bind(this));
this.input.addEventListener('input', this.executeAction.bind(this));
this.input.classList.add(HtmlClasses['SLIDERBAR']);
this.span.appendChild(this.input);
}
inputKey(_event) {
this.inputEvent = true;
}
mousedown(event) {
event.stopPropagation();
}
mouseup(_event) {
event.stopPropagation();
}
keydown(event) {
const code = event.keyCode;
if (code === KEY.UP || code === KEY.DOWN) {
event.preventDefault();
super.keydown(event);
return;
}
if (this.inputEvent && code !== KEY.ESCAPE && code !== KEY.RETURN) {
this.inputEvent = false;
event.stopPropagation();
return;
}
super.keydown(event);
event.stopPropagation();
}
updateAria() {
const value = this.variable.getValue();
if (value && this.input) {
this.input.setAttribute('aria-valuenow', value);
this.input.setAttribute('aria-valuetext', value + '%');
}
}
updateSpan() {
let initValue;
try {
initValue = this.variable.getValue(getActiveElement(this));
this.valueSpan.innerHTML = initValue + '%';
}
catch (e) {
initValue = '';
}
this.input.value = initValue;
}
toJson() {
return { type: '' };
}
}
//# sourceMappingURL=item_slider.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/selection_box.js
class SelectionMenu extends AbstractMenu {
static fromJson(factory, { title: title, values: values, variable: variable }, sb) {
const selection = new this(sb);
const tit = factory.get('label')(factory, { content: title || '', id: title || 'id' }, selection);
const rul = factory.get('rule')(factory, {}, selection);
const radios = values.map((x) => factory.get('radio')(factory, { content: x, variable: variable, id: x }, selection));
const items = [tit, rul].concat(radios);
selection.items = items;
return selection;
}
constructor(anchor) {
super();
this.anchor = anchor;
this.className = HtmlClasses['SELECTIONMENU'];
this.variablePool = this.anchor.menu.pool;
this.baseMenu = this.anchor.menu;
}
generateHtml() {
super.generateHtml();
this.items.forEach((item) => item.html.classList.add(HtmlClasses['SELECTIONITEM']));
}
display() { }
right(event) {
this.anchor.right(event);
}
left(event) {
this.anchor.left(event);
}
}
class SelectionBox extends Info {
static fromJson(factory, { title: title, signature: signature, selections: selections, order: order, grid: grid }, ctxt) {
const sb = new this(title, signature, order, grid);
sb.attachMenu(ctxt);
const sels = selections.map((x) => factory.get('selectionMenu')(factory, x, sb));
sb.selections = sels;
return sb;
}
constructor(title, signature, style = "none", grid = "vertical") {
super(title, null, signature);
this.style = style;
this.grid = grid;
this._selections = [];
this.prefix = 'ctxt-selection';
this._balanced = true;
}
attachMenu(menu) {
this.menu = menu;
}
get selections() {
return this._selections;
}
set selections(selections) {
this._selections = [];
selections.forEach((x) => this.addSelection(x));
}
addSelection(selection) {
selection.anchor = this;
this._selections.push(selection);
}
rowDiv(sels) {
const div = document.createElement('div');
this.contentDiv.appendChild(div);
const rects = sels.map((sel) => {
div.appendChild(sel.html);
if (!sel.html.id) {
sel.html.id = this.prefix + counter();
}
return sel.html.getBoundingClientRect();
});
const column = rects.map((x) => x.width);
const width = column.reduce((x, y) => x + y, 0);
const height = rects.reduce((x, y) => Math.max(x, y.height), 0);
div.classList.add(HtmlClasses['SELECTIONDIVIDER']);
div.setAttribute('style', 'height: ' + height + 'px;');
return [div, width, height, column];
}
display() {
super.display();
this.order();
if (!this.selections.length) {
return;
}
const outerDivs = [];
let maxWidth = 0;
let balancedColumn = [];
const chunks = this.getChunkSize(this.selections.length);
for (let i = 0; i < this.selections.length; i += chunks) {
const sels = this.selections.slice(i, i + chunks);
const [div, width, height, column] = this.rowDiv(sels);
outerDivs.push(div);
maxWidth = Math.max(maxWidth, width);
sels.forEach((sel) => (sel.html.style.height = height + 'px'));
balancedColumn = this.combineColumn(balancedColumn, column);
}
if (this._balanced) {
this.balanceColumn(outerDivs, balancedColumn);
maxWidth = balancedColumn.reduce((x, y) => x + y, 20);
}
outerDivs.forEach((div) => (div.style.width = maxWidth + 'px'));
}
getChunkSize(size) {
switch (this.grid) {
case "square":
return Math.floor(Math.sqrt(size));
case "horizontal":
return Math.floor(size / SelectionBox.chunkSize);
case "vertical":
default:
return SelectionBox.chunkSize;
}
}
balanceColumn(divs, column) {
divs.forEach((div) => {
const children = Array.from(div.children);
for (let i = 0, child; (child = children[i]); i++) {
child.style.width = column[i] + 'px';
}
});
}
combineColumn(col1, col2) {
let result = [];
let i = 0;
while (col1[i] || col2[i]) {
if (!col1[i]) {
result = result.concat(col2.slice(i));
break;
}
if (!col2[i]) {
result = result.concat(col1.slice(i));
break;
}
result.push(Math.max(col1[i], col2[i]));
i++;
}
return result;
}
left(event) {
this.move(event, (index) => (index === 0 ? this.selections.length : index) - 1);
}
right(event) {
this.move(event, (index) => index === this.selections.length - 1 ? 0 : index + 1);
}
generateHtml() {
super.generateHtml();
this.html.classList.add(HtmlClasses['SELECTION']);
}
generateContent() {
const div = super.generateContent();
div.classList.add(HtmlClasses['SELECTIONBOX']);
div.removeAttribute('tabindex');
return div;
}
findSelection(event) {
const target = event.target;
let selection = null;
if (target.id) {
selection = this.selections.find((x) => x.html.id === target.id);
}
if (!selection) {
const id = target.parentElement.id;
selection = this.selections.find((x) => x.html.id === id);
}
return selection;
}
move(event, isNext) {
const selection = this.findSelection(event);
if (selection.focused) {
selection.focused.unfocus();
}
const index = this.selections.indexOf(selection);
const next = isNext(index);
this.selections[next].focus();
}
order() {
this.selections.sort(SelectionBox.orderMethod.get(this.style));
}
toJson() {
return { type: '' };
}
}
SelectionBox.chunkSize = 4;
SelectionBox.orderMethod = new Map([
[
"alphabetical",
(x, y) => x.items[0].content.localeCompare(y.items[0].content)
],
["none", (_x, _y) => 1],
[
"decreasing",
(x, y) => {
const xl = x.items.length;
const yl = y.items.length;
return xl < yl ? 1 : yl < xl ? -1 : 0;
}
],
[
"increasing",
(x, y) => {
const xl = x.items.length;
const yl = y.items.length;
return xl < yl ? -1 : yl < xl ? 1 : 0;
}
]
]);
//# sourceMappingURL=selection_box.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/parser_factory.js
class ParserFactory {
constructor(init) {
this._parser = new Map(init);
}
get(name) {
return this._parser.get(name);
}
add(name, method) {
this._parser.set(name, method);
}
}
//# sourceMappingURL=parser_factory.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/parse.js
var __rest = (undefined && undefined.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
class Parser {
constructor(init = []) {
this._initList = [
['command', Command.fromJson.bind(Command)],
['checkbox', Checkbox.fromJson.bind(Checkbox)],
['combo', Combo.fromJson.bind(Combo)],
['slider', Slider.fromJson.bind(Slider)],
['label', item_label_Label.fromJson.bind(item_label_Label)],
['radio', Radio.fromJson.bind(Radio)],
['rule', Rule.fromJson.bind(Rule)],
['submenu', Submenu.fromJson.bind(Submenu)],
['contextMenu', ContextMenu.fromJson.bind(ContextMenu)],
['subMenu', SubMenu.fromJson.bind(SubMenu)],
['variable', Variable.fromJson.bind(Variable)],
['items', this.items.bind(this)],
['selectionMenu', SelectionMenu.fromJson.bind(SelectionMenu)],
['selectionBox', SelectionBox.fromJson.bind(SelectionBox)]
];
this._factory = new ParserFactory(this._initList);
init.forEach(([x, y]) => this.factory.add(x, y));
}
get factory() {
return this._factory;
}
items(_factory, its, ctxt) {
const hidden = [];
for (const item of its) {
const entry = this.parse(item, ctxt);
if (!entry) {
continue;
}
ctxt.items.push(entry);
if (item.disabled) {
entry.disable();
}
if (item.hidden) {
hidden.push(entry);
}
}
hidden.forEach((x) => x.hide());
return ctxt.items;
}
parse(_a, ...rest) {
var { type: kind } = _a, json = __rest(_a, ["type"]);
const func = this.factory.get(kind);
return func ? func(this.factory, json, ...rest) : null;
}
}
//# sourceMappingURL=parse.js.map
;// ./node_modules/.pnpm/mj-context-menu@0.9.1/node_modules/mj-context-menu/js/css_util.js
function makeClass_(name) {
return '.' + (HtmlClasses[name] || name);
}
const INFO_STYLES = {};
INFO_STYLES[makeClass_('INFOCLOSE')] = '{' + ' top:.2em; right:.2em;' + '}';
INFO_STYLES[makeClass_('INFOCONTENT')] =
'{' +
' overflow:auto; text-align:left; font-size:80%;' +
' padding:.4em .6em; border:1px inset; margin:1em 0px;' +
' max-height:20em; max-width:30em; background-color:#EEEEEE;' +
' white-space:normal;' +
'}';
INFO_STYLES[makeClass_('INFO') + makeClass_('MOUSEPOST')] =
'{' + 'outline:none;' + '}';
INFO_STYLES[makeClass_('INFO')] =
'{' +
' position:fixed; left:50%; width:auto; text-align:center;' +
' border:3px outset; padding:1em 2em; background-color:#DDDDDD;' +
' color:black;' +
' cursor:default; font-family:message-box; font-size:120%;' +
' font-style:normal; text-indent:0; text-transform:none;' +
' line-height:normal; letter-spacing:normal; word-spacing:normal;' +
' word-wrap:normal; white-space:nowrap; float:none; z-index:201;' +
' border-radius: 15px; /* Opera 10.5 and IE9 */' +
' -webkit-border-radius:15px; /* Safari and Chrome */' +
' -moz-border-radius:15px; /* Firefox */' +
' -khtml-border-radius:15px; /* Konqueror */' +
' box-shadow:0px 10px 20px #808080; /* Opera 10.5 and IE9 */' +
' -webkit-box-shadow:0px 10px 20px #808080; /* Safari 3 & Chrome */' +
' -moz-box-shadow:0px 10px 20px #808080; /* Forefox 3.5 */' +
' -khtml-box-shadow:0px 10px 20px #808080; /* Konqueror */' +
' filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=2,' +
' OffY=2, Color="gray", Positive="true"); /* IE */' +
'}';
const MENU_STYLES = {};
MENU_STYLES[makeClass_('MENU')] =
'{' +
' position:absolute;' +
' background-color:white;' +
' color:black;' +
' width:auto; padding:5px 0px;' +
' border:1px solid #CCCCCC; margin:0; cursor:default;' +
' font: menu; text-align:left; text-indent:0; text-transform:none;' +
' line-height:normal; letter-spacing:normal; word-spacing:normal;' +
' word-wrap:normal; white-space:nowrap; float:none; z-index:201;' +
' border-radius: 5px; /* Opera 10.5 and IE9 */' +
' -webkit-border-radius: 5px; /* Safari and Chrome */' +
' -moz-border-radius: 5px; /* Firefox */' +
' -khtml-border-radius: 5px; /* Konqueror */' +
' box-shadow:0px 10px 20px #808080; /* Opera 10.5 and IE9 */' +
' -webkit-box-shadow:0px 10px 20px #808080; /* Safari 3 & Chrome */' +
' -moz-box-shadow:0px 10px 20px #808080; /* Forefox 3.5 */' +
' -khtml-box-shadow:0px 10px 20px #808080; /* Konqueror */' +
'}';
MENU_STYLES[makeClass_('MENUITEM')] =
'{' + ' padding: 1px 2em;' + ' background:transparent;' + '}';
MENU_STYLES[makeClass_('MENUARROW')] =
'{' +
' position:absolute; right:.5em; padding-top:.25em; color:#666666;' +
' font-family: null; font-size: .75em' +
'}';
MENU_STYLES[makeClass_('MENUACTIVE') + ' ' + makeClass_('MENUARROW')] =
'{color:white}';
MENU_STYLES[makeClass_('MENUARROW') + makeClass_('RTL')] =
'{left:.5em; right:auto}';
MENU_STYLES[makeClass_('MENUCHECK')] =
'{' + ' position:absolute; left:.7em;' + ' font-family: null' + '}';
MENU_STYLES[makeClass_('MENUCHECK') + makeClass_('RTL')] =
'{ right:.7em; left:auto }';
MENU_STYLES[makeClass_('MENURADIOCHECK')] =
'{' + ' position:absolute; left: .7em;' + '}';
MENU_STYLES[makeClass_('MENURADIOCHECK') + makeClass_('RTL')] =
'{' + ' right: .7em; left:auto' + '}';
MENU_STYLES[makeClass_('MENUINPUTBOX')] =
'{' +
' padding-left: 1em; right:.5em; color:#666666;' +
' font-family: null;' +
'}';
MENU_STYLES[makeClass_('MENUINPUTBOX') + makeClass_('RTL')] =
'{' + ' left: .1em;' + '}';
MENU_STYLES[makeClass_('MENUCOMBOBOX')] =
'{' + ' left:.1em; padding-bottom:.5em;' + '}';
MENU_STYLES[makeClass_('MENUSLIDER')] = '{' + ' left: .1em;' + '}';
MENU_STYLES[makeClass_('SLIDERVALUE')] =
'{' +
' position:absolute; right:.1em; padding-top:.25em; color:#333333;' +
' font-size: .75em' +
'}';
MENU_STYLES[makeClass_('SLIDERBAR')] =
'{' + ' outline: none; background: #d3d3d3' + '}';
MENU_STYLES[makeClass_('MENULABEL')] =
'{' + ' padding: 1px 2em 3px 1.33em;' + ' font-style:italic' + '}';
MENU_STYLES[makeClass_('MENURULE')] =
'{' + ' border-top: 1px solid #DDDDDD;' + ' margin: 4px 3px;' + '}';
MENU_STYLES[makeClass_('MENUDISABLED')] = '{' + ' color:GrayText' + '}';
MENU_STYLES[makeClass_('MENUACTIVE')] =
'{' + ' background-color: #606872;' + ' color: white;' + '}';
MENU_STYLES[makeClass_('MENUDISABLED') + ':focus'] =
'{' + ' background-color: #E8E8E8' + '}';
MENU_STYLES[makeClass_('MENULABEL') + ':focus'] =
'{' + ' background-color: #E8E8E8' + '}';
MENU_STYLES[makeClass_('CONTEXTMENU') + ':focus'] =
'{' + ' outline:none' + '}';
MENU_STYLES[makeClass_('CONTEXTMENU') + ' ' + makeClass_('MENUITEM') + ':focus'] = '{' + ' outline:none' + '}';
MENU_STYLES[makeClass_('SELECTIONMENU')] =
'{' +
' position:relative; float:left;' +
' border-bottom: none;' +
' -webkit-box-shadow:none;' +
' -webkit-border-radius:0px; ' +
'}';
MENU_STYLES[makeClass_('SELECTIONITEM')] = '{' + ' padding-right: 1em;' + '}';
MENU_STYLES[makeClass_('SELECTION')] = '{' + ' right: 40%; width:50%; ' + '}';
MENU_STYLES[makeClass_('SELECTIONBOX')] =
'{' +
' padding: 0em; max-height:20em; max-width: none;' +
' background-color:#FFFFFF;' +
'}';
MENU_STYLES[makeClass_('SELECTIONDIVIDER')] =
'{' + ' clear: both; border-top: 2px solid #000000;' + '}';
MENU_STYLES[makeClass_('MENU') + ' ' + makeClass_('MENUCLOSE')] =
'{' + ' top:-10px; left:-10px' + '}';
const CLOSE_ICON_STYLES = {};
CLOSE_ICON_STYLES[makeClass_('MENUCLOSE')] =
'{' +
' position:absolute;' +
' cursor:pointer;' +
' display:inline-block;' +
' border:2px solid #AAA;' +
' border-radius:18px;' +
' -webkit-border-radius: 18px; /* Safari and Chrome */' +
' -moz-border-radius: 18px; /* Firefox */' +
' -khtml-border-radius: 18px; /* Konqueror */' +
' font-family: "Courier New", Courier;' +
' font-size:24px;' +
' color:#F0F0F0' +
'}';
CLOSE_ICON_STYLES[makeClass_('MENUCLOSE') + ' span'] =
'{' +
' display:block; background-color:#AAA; border:1.5px solid;' +
' border-radius:18px;' +
' -webkit-border-radius: 18px; /* Safari and Chrome */' +
' -moz-border-radius: 18px; /* Firefox */' +
' -khtml-border-radius: 18px; /* Konqueror */' +
' line-height:0;' +
' padding:8px 0 6px /* may need to be browser-specific */' +
'}';
CLOSE_ICON_STYLES[makeClass_('MENUCLOSE') + ':hover'] =
'{' + ' color:white!important;' + ' border:2px solid #CCC!important' + '}';
CLOSE_ICON_STYLES[makeClass_('MENUCLOSE') + ':hover span'] =
'{' + ' background-color:#CCC!important' + '}';
CLOSE_ICON_STYLES[makeClass_('MENUCLOSE') + ':hover:focus'] =
'{' + ' outline:none' + '}';
let INFO_ADDED = false;
let MENU_ADDED = false;
let CLOSE_ICON_ADDED = false;
function addMenuStyles(opt_document) {
if (MENU_ADDED) {
return;
}
addStyles_(MENU_STYLES, opt_document);
MENU_ADDED = true;
addCloseIconStyles_(opt_document);
}
function addInfoStyles(opt_document) {
if (INFO_ADDED) {
return;
}
addStyles_(INFO_STYLES, opt_document);
INFO_ADDED = true;
addCloseIconStyles_(opt_document);
}
function addCloseIconStyles_(opt_document) {
if (CLOSE_ICON_ADDED) {
return;
}
addStyles_(CLOSE_ICON_STYLES, opt_document);
CLOSE_ICON_ADDED = true;
}
function addStyles_(styles, opt_document) {
const doc = opt_document || document;
const element = doc.createElement('style');
element.type = 'text/css';
let inner = '';
for (const style in styles) {
inner += style;
inner += ' ';
inner += styles[style];
inner += '\n';
}
element.innerHTML = inner;
doc.head.appendChild(element);
}
//# sourceMappingURL=css_util.js.map
;// ./mjs/ui/menu/mj-context-menu.js
//# sourceMappingURL=mj-context-menu.js.map
;// ./mjs/ui/menu/MJContextMenu.js
class MJContextMenu extends ContextMenu {
constructor() {
super(...arguments);
this.mathItem = null;
this.nofocus = false;
this.errorMsg = '';
}
post(x, y) {
var _a, _b;
if (this.mathItem) {
const speech = (_b = (_a = this.mathItem) === null || _a === void 0 ? void 0 : _a.explorers) === null || _b === void 0 ? void 0 : _b.speech;
if (speech === null || speech === void 0 ? void 0 : speech.active) {
speech.restarted = speech.semanticFocus();
}
if (y !== undefined) {
this.getOriginalMenu();
this.getSemanticsMenu();
this.getSpeechMenu();
this.getBrailleMenu();
this.getSvgMenu();
this.getErrorMessage();
this.dynamicSubmenus();
}
super.post(x, y);
}
}
unpost() {
super.unpost();
if (this.mathItem) {
this.mathItem.outputData.nofocus = this.nofocus;
}
this.mathItem = null;
this.nofocus = false;
}
findID(...names) {
let menu = this;
let item = null;
for (const name of names) {
if (!menu)
return null;
for (item of menu.items) {
if (item.id === name) {
menu = item instanceof Submenu ? item.submenu : null;
break;
}
menu = item = null;
}
}
return item;
}
setJax(jax) {
this.jax = jax;
}
getOriginalMenu() {
const input = this.mathItem.inputJax.name;
const original = this.findID('Show', 'Original');
original.content =
input === 'MathML' ? 'Original MathML' : input + ' Commands';
const clipboard = this.findID('Copy', 'Original');
clipboard.content = original.content;
}
getSemanticsMenu() {
const semantics = this.findID('Settings', 'MathmlIncludes', 'semantics');
this.mathItem.inputJax.name === 'MathML'
? semantics.disable()
: semantics.enable();
}
getSpeechMenu() {
const speech = this.mathItem.outputData.speech;
this.findID('Show', 'Speech')[speech ? 'enable' : 'disable']();
this.findID('Copy', 'Speech')[speech ? 'enable' : 'disable']();
}
getBrailleMenu() {
const braille = this.mathItem.outputData.braille;
this.findID('Show', 'Braille')[braille ? 'enable' : 'disable']();
this.findID('Copy', 'Braille')[braille ? 'enable' : 'disable']();
}
getSvgMenu() {
const svg = this.jax.SVG;
this.findID('Show', 'SVG')[svg ? 'enable' : 'disable']();
this.findID('Copy', 'SVG')[svg ? 'enable' : 'disable']();
}
getErrorMessage() {
const children = this.mathItem.root.childNodes[0].childNodes;
let disable = true;
this.errorMsg = '';
if (children.length === 1 && children[0].isKind('merror')) {
const attributes = children[0].attributes;
this.errorMsg = (attributes.get('data-mjx-error') ||
attributes.get('data-mjx-message') ||
'');
disable = !this.errorMsg;
}
this.findID('Show', 'Error')[disable ? 'disable' : 'enable']();
this.findID('Copy', 'Error')[disable ? 'disable' : 'enable']();
}
dynamicSubmenus() {
for (const [id, [method, option]] of MJContextMenu.DynamicSubmenus) {
const menu = this.find(id);
if (!menu)
continue;
method(this, menu, (sub) => {
var _a;
menu.submenu = sub;
if (((_a = sub === null || sub === void 0 ? void 0 : sub.items) === null || _a === void 0 ? void 0 : _a.length) && (!option || this.settings[option])) {
menu.enable();
}
else {
menu.disable();
}
});
}
}
}
MJContextMenu.DynamicSubmenus = new Map();
//# sourceMappingURL=MJContextMenu.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/rule_engine/dynamic_cstr.js
var Axis;
(function (Axis) {
Axis["DOMAIN"] = "domain";
Axis["STYLE"] = "style";
Axis["LOCALE"] = "locale";
Axis["TOPIC"] = "topic";
Axis["MODALITY"] = "modality";
})(Axis || (Axis = {}));
class DynamicProperties {
static createProp(...cstrList) {
const axes = DynamicCstr.DEFAULT_ORDER;
const dynamicCstr = {};
for (let i = 0, l = cstrList.length, k = axes.length; i < l && i < k; i++) {
dynamicCstr[axes[i]] = cstrList[i];
}
return new DynamicProperties(dynamicCstr);
}
constructor(properties, order = Object.keys(properties)) {
this.properties = properties;
this.order = order;
}
getProperties() {
return this.properties;
}
getOrder() {
return this.order;
}
getAxes() {
return this.order;
}
getProperty(key) {
return this.properties[key];
}
updateProperties(props) {
this.properties = props;
}
allProperties() {
const propLists = [];
this.order.forEach((key) => propLists.push(this.getProperty(key).slice()));
return propLists;
}
toString() {
const cstrStrings = [];
this.order.forEach((key) => cstrStrings.push(key + ': ' + this.getProperty(key).toString()));
return cstrStrings.join('\n');
}
}
class DynamicCstr extends DynamicProperties {
static createCstr(...cstrList) {
const axes = DynamicCstr.DEFAULT_ORDER;
const dynamicCstr = {};
for (let i = 0, l = cstrList.length, k = axes.length; i < l && i < k; i++) {
dynamicCstr[axes[i]] = cstrList[i];
}
return new DynamicCstr(dynamicCstr);
}
static defaultCstr() {
return DynamicCstr.createCstr.apply(null, DynamicCstr.DEFAULT_ORDER.map(function (x) {
return DynamicCstr.DEFAULT_VALUES[x];
}));
}
static validOrder(order) {
const axes = DynamicCstr.DEFAULT_ORDER.slice();
return order.every((x) => {
const index = axes.indexOf(x);
return index !== -1 && axes.splice(index, 1);
});
}
constructor(components_, order) {
const properties = {};
for (const [key, value] of Object.entries(components_)) {
properties[key] = [value];
}
super(properties, order);
this.components = components_;
}
getComponents() {
return this.components;
}
getValue(key) {
return this.components[key];
}
getValues() {
return this.order.map((key) => this.getValue(key));
}
allProperties() {
const propLists = super.allProperties();
for (let i = 0, props, key; (props = propLists[i]), (key = this.order[i]); i++) {
const value = this.getValue(key);
if (props.indexOf(value) === -1) {
props.unshift(value);
}
}
return propLists;
}
toString() {
return this.getValues().join('.');
}
equal(cstr) {
const keys1 = cstr.getAxes();
if (this.order.length !== keys1.length) {
return false;
}
for (let j = 0, key; (key = keys1[j]); j++) {
const comp2 = this.getValue(key);
if (!comp2 || cstr.getValue(key) !== comp2) {
return false;
}
}
return true;
}
}
DynamicCstr.DEFAULT_ORDER = [
Axis.LOCALE,
Axis.MODALITY,
Axis.DOMAIN,
Axis.STYLE,
Axis.TOPIC
];
DynamicCstr.BASE_LOCALE = 'base';
DynamicCstr.DEFAULT_VALUE = 'default';
DynamicCstr.DEFAULT_VALUES = {
[Axis.LOCALE]: 'en',
[Axis.DOMAIN]: DynamicCstr.DEFAULT_VALUE,
[Axis.STYLE]: DynamicCstr.DEFAULT_VALUE,
[Axis.TOPIC]: DynamicCstr.DEFAULT_VALUE,
[Axis.MODALITY]: 'speech'
};
class DynamicCstrParser {
constructor(order) {
this.order = order;
}
parse(str) {
const order = str.split('.');
const cstr = {};
if (order.length > this.order.length) {
throw new Error('Invalid dynamic constraint: ' + cstr);
}
let j = 0;
for (let i = 0, key; (key = this.order[i]), order.length; i++, j++) {
const value = order.shift();
cstr[key] = value;
}
return new DynamicCstr(cstr, this.order.slice(0, j));
}
}
class DefaultComparator {
constructor(reference, fallback = new DynamicProperties(reference.getProperties(), reference.getOrder())) {
this.reference = reference;
this.fallback = fallback;
this.order = this.reference.getOrder();
}
getReference() {
return this.reference;
}
setReference(cstr, props) {
this.reference = cstr;
this.fallback =
props || new DynamicProperties(cstr.getProperties(), cstr.getOrder());
this.order = this.reference.getOrder();
}
match(cstr) {
const keys1 = cstr.getAxes();
return (keys1.length === this.reference.getAxes().length &&
keys1.every((key) => {
const value = cstr.getValue(key);
return (value === this.reference.getValue(key) ||
this.fallback.getProperty(key).indexOf(value) !== -1);
}));
}
compare(cstr1, cstr2) {
let ignore = false;
for (let i = 0, key; (key = this.order[i]); i++) {
const value1 = cstr1.getValue(key);
const value2 = cstr2.getValue(key);
if (!ignore) {
const ref = this.reference.getValue(key);
if (ref === value1 && ref !== value2) {
return -1;
}
if (ref === value2 && ref !== value1) {
return 1;
}
if (ref === value1 && ref === value2) {
continue;
}
if (ref !== value1 && ref !== value2) {
ignore = true;
}
}
const prop = this.fallback.getProperty(key);
const index1 = prop.indexOf(value1);
const index2 = prop.indexOf(value2);
if (index1 < index2) {
return -1;
}
if (index2 < index1) {
return 1;
}
}
return 0;
}
toString() {
return this.reference.toString() + '\n' + this.fallback.toString();
}
}
//# sourceMappingURL=dynamic_cstr.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/engine_const.js
var Mode;
(function (Mode) {
Mode["SYNC"] = "sync";
Mode["ASYNC"] = "async";
Mode["HTTP"] = "http";
})(Mode || (Mode = {}));
var personalityProps;
(function (personalityProps) {
personalityProps["PITCH"] = "pitch";
personalityProps["RATE"] = "rate";
personalityProps["VOLUME"] = "volume";
personalityProps["PAUSE"] = "pause";
personalityProps["JOIN"] = "join";
personalityProps["LAYOUT"] = "layout";
})(personalityProps || (personalityProps = {}));
const personalityPropList = [
personalityProps.PITCH,
personalityProps.RATE,
personalityProps.VOLUME,
personalityProps.PAUSE,
personalityProps.JOIN
];
var Speech;
(function (Speech) {
Speech["NONE"] = "none";
Speech["SHALLOW"] = "shallow";
Speech["DEEP"] = "deep";
})(Speech || (Speech = {}));
var Markup;
(function (Markup) {
Markup["NONE"] = "none";
Markup["LAYOUT"] = "layout";
Markup["COUNTING"] = "counting";
Markup["PUNCTUATION"] = "punctuation";
Markup["SSML"] = "ssml";
Markup["ACSS"] = "acss";
Markup["SABLE"] = "sable";
Markup["VOICEXML"] = "voicexml";
})(Markup || (Markup = {}));
const DOMAIN_TO_STYLES = {
mathspeak: 'default',
clearspeak: 'default'
};
//# sourceMappingURL=engine_const.js.map
// EXTERNAL MODULE: ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/system_external.js
var system_external = __webpack_require__(74);
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/file_util.js
function makePath(path) {
return path.match('/$') ? path : path + '/';
}
function localePath(locale, ext = 'json') {
return (makePath(SystemExternal.jsonPath) +
locale +
(ext.match(/^\./) ? ext : '.' + ext));
}
//# sourceMappingURL=file_util.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/debugger.js
class Debugger {
static getInstance() {
Debugger.instance = Debugger.instance || new Debugger();
return Debugger.instance;
}
init(opt_file) {
if (opt_file) {
this.startDebugFile_(opt_file);
}
this.isActive_ = true;
return this.fileHandle;
}
output(...args) {
if (this.isActive_) {
this.output_(args);
}
}
generate(func) {
if (this.isActive_) {
this.output_(func.apply(func, []));
}
}
exit(callback = () => { }) {
this.fileHandle.then(() => {
if (this.isActive_ && this.stream_) {
this.stream_.end('', '', callback);
}
});
}
constructor() {
this.isActive_ = false;
this.fileHandle = Promise.resolve();
this.stream_ = null;
}
startDebugFile_(filename) {
this.fileHandle = system_external/* SystemExternal */.f.fs.promises.open(filename, 'w');
this.fileHandle = this.fileHandle.then((handle) => {
this.stream_ = handle.createWriteStream(filename);
this.outputFunction = function (...args) {
this.stream_.write(args.join(' '));
this.stream_.write('\n');
}.bind(this);
this.stream_.on('error', function (_error) {
console.info('Invalid log file. Debug information sent to console.');
this.outputFunction = console.info;
}.bind(this));
this.stream_.on('finish', function () {
console.info('Finalizing debug file.');
});
});
}
output_(outputList) {
if (this.stream_) {
this.fileHandle.then(() => this.outputFunction.apply(this.outputFunction, ['Speech Rule Engine Debugger:'].concat(outputList)));
return;
}
console.info.apply(console, ['Speech Rule Engine Debugger:'].concat(outputList));
}
}
//# sourceMappingURL=debugger.js.map
// EXTERNAL MODULE: ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/variables.js
var variables = __webpack_require__(714);
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/options.js
class Options {
constructor(options = {}) {
this.delay = false;
this.domain = 'clearspeak';
this.style = DynamicCstr.DEFAULT_VALUES[Axis.STYLE];
this.locale = DynamicCstr.DEFAULT_VALUES[Axis.LOCALE];
this.subiso = '';
this.modality = DynamicCstr.DEFAULT_VALUES[Axis.MODALITY];
this.speech = Speech.NONE;
this.markup = Markup.NONE;
this.mark = true;
this.automark = false;
this.character = true;
this.cleanpause = true;
this.cayleyshort = true;
this.linebreaks = false;
this.rate = '100';
this.walker = 'Table';
this.structure = false;
this.aria = false;
this.tree = false;
this.strict = false;
this.pprint = false;
this.rules = '';
this.prune = '';
this.set(options);
}
set(options) {
this.ensureDomain(options);
for (const [option, value] of Object.entries(options)) {
if (Options.BINARY_FEATURES.includes(option) ||
Options.STRING_FEATURES.includes(option)) {
this[option] = value;
continue;
}
}
}
json() {
const features = {};
const engineFeatures = [].concat(Options.STRING_FEATURES, Options.BINARY_FEATURES);
engineFeatures.forEach((x) => (features[x] = this[x]));
return features;
}
ensureDomain(feature) {
if ((feature.modality && feature.modality !== 'speech') ||
(!feature.modality && this.modality !== 'speech')) {
return;
}
if (!feature.domain && !feature.locale) {
return;
}
if (feature.domain === 'default') {
feature.domain = 'mathspeak';
return;
}
const locale = (feature.locale || this.locale);
const domain = (feature.domain || this.domain);
if (MATHSPEAK_ONLY.indexOf(locale) !== -1 && domain !== 'mathspeak') {
feature.domain = 'mathspeak';
return;
}
if (locale === 'en') {
if (EN_RULES.indexOf(domain) === -1) {
feature.domain = 'mathspeak';
}
return;
}
if (domain !== 'mathspeak' && domain !== 'clearspeak') {
feature.domain = 'mathspeak';
}
}
}
Options.BINARY_FEATURES = [
'automark',
'mark',
'character',
'cleanpause',
'strict',
'structure',
'aria',
'pprint',
'cayleyshort',
'linebreaks',
'tree'
];
Options.STRING_FEATURES = [
'markup',
'style',
'domain',
'speech',
'walker',
'locale',
'delay',
'modality',
'rate',
'rules',
'subiso',
'prune'
];
const MATHSPEAK_ONLY = ['ca', 'da', 'es'];
const EN_RULES = [
'chromevox',
'clearspeak',
'mathspeak',
'emacspeak',
'html'
];
//# sourceMappingURL=options.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/engine.js
class SREError extends Error {
constructor(message = '') {
super();
this.message = message;
this.name = 'SRE Error';
}
}
class Engine {
set defaultLocale(loc) {
this._defaultLocale = variables/* Variables */.u.ensureLocale(loc, this._defaultLocale);
}
get defaultLocale() {
return this._defaultLocale;
}
static getInstance() {
Engine.instance = Engine.instance || new Engine();
return Engine.instance;
}
static defaultEvaluator(str, _cstr) {
return str;
}
static evaluateNode(node) {
return Engine.nodeEvaluator(node);
}
getRate() {
const numeric = parseInt(this.options.rate, 10);
return isNaN(numeric) ? 100 : numeric;
}
setDynamicCstr(opt_dynamic) {
if (this.defaultLocale) {
DynamicCstr.DEFAULT_VALUES[Axis.LOCALE] = this.defaultLocale;
}
if (opt_dynamic) {
const keys = Object.keys(opt_dynamic);
for (let i = 0; i < keys.length; i++) {
const feature = keys[i];
if (DynamicCstr.DEFAULT_ORDER.indexOf(feature) !== -1) {
const value = opt_dynamic[feature];
this.options[feature] = value;
}
}
}
const dynamic = [
this.options.locale,
this.options.modality,
this.options.domain,
this.options.style
].join('.');
const fallback = DynamicProperties.createProp([DynamicCstr.DEFAULT_VALUES[Axis.LOCALE]], [DynamicCstr.DEFAULT_VALUES[Axis.MODALITY]], [DynamicCstr.DEFAULT_VALUES[Axis.DOMAIN]], [DynamicCstr.DEFAULT_VALUES[Axis.STYLE]]);
const comparator = this.comparators[this.options.domain];
const parser = this.parsers[this.options.domain];
this.parser = parser ? parser : this.defaultParser;
this.dynamicCstr = this.parser.parse(dynamic);
this.dynamicCstr.updateProperties(fallback.getProperties());
this.comparator = comparator
? comparator()
: new DefaultComparator(this.dynamicCstr);
}
constructor() {
this.options = new Options();
this.config = false;
this.customLoader = null;
this.parsers = {};
this.comparator = null;
this.mode = Mode.SYNC;
this.init = true;
this.comparators = {};
this._defaultLocale = DynamicCstr.DEFAULT_VALUES[Axis.LOCALE];
this.options.locale = this.defaultLocale;
this.evaluator = Engine.defaultEvaluator;
this.defaultParser = new DynamicCstrParser(DynamicCstr.DEFAULT_ORDER);
this.parser = this.defaultParser;
this.dynamicCstr = DynamicCstr.defaultCstr();
}
configurate(feature) {
if (this.mode === Mode.HTTP &&
!system_external/* SystemExternal */.f.webworker &&
!this.config) {
configBlocks(feature);
this.config = true;
}
configFeature(feature);
}
setCustomLoader(fn) {
if (fn) {
this.customLoader = fn;
}
}
setup(feature) {
if (typeof feature['mode'] !== 'undefined') {
this.mode = feature['mode'];
}
this.configurate(feature);
this.options.set(feature);
if (feature.json) {
system_external/* SystemExternal */.f.jsonPath = makePath(feature.json);
}
this.setCustomLoader(feature.custom);
}
json() {
return Object.assign({ mode: this.mode }, this.options.json());
}
reset() {
this.options = new Options();
}
}
Engine.nodeEvaluator = function (_node) {
return [];
};
function configFeature(feature) {
if (typeof SREfeature !== 'undefined') {
for (const [name, feat] of Object.entries(SREfeature)) {
feature[name] = feat;
}
}
}
function configBlocks(feature) {
const scripts = document.documentElement.querySelectorAll('script[type="text/x-sre-config"]');
for (let i = 0, m = scripts.length; i < m; i++) {
let inner;
try {
inner = scripts[i].innerHTML;
const config = JSON.parse(inner);
for (const [key, val] of Object.entries(config)) {
feature[key] = val;
}
}
catch (_err) {
Debugger.getInstance().output('Illegal configuration ', inner);
}
}
}
class engine_EnginePromise {
static get(locale = Engine.getInstance().options.locale) {
return engine_EnginePromise.promises[locale] || Promise.resolve('');
}
static getall() {
return Promise.all(Object.values(engine_EnginePromise.promises));
}
}
engine_EnginePromise.loaded = {};
engine_EnginePromise.promises = {};
//# sourceMappingURL=engine.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/xpath_util.js
const xpath = system_external/* SystemExternal */.f.xpath;
const nameSpaces = {
xhtml: 'http://www.w3.org/1999/xhtml',
mathml: 'http://www.w3.org/1998/Math/MathML',
mml: 'http://www.w3.org/1998/Math/MathML',
svg: 'http://www.w3.org/2000/svg'
};
function resolveNameSpace(prefix) {
return nameSpaces[prefix] || null;
}
class Resolver {
constructor() {
this.lookupNamespaceURI = resolveNameSpace;
}
}
function evaluateXpath(expression, rootNode, type) {
return xpath.evaluate(expression, rootNode, new Resolver(), type, null);
}
function evalXPath(expression, rootNode) {
let iterator;
try {
iterator = evaluateXpath(expression, rootNode, xpath.result.ORDERED_NODE_ITERATOR_TYPE);
}
catch (_err) {
return [];
}
const results = [];
for (let xpathNode = iterator.iterateNext(); xpathNode; xpathNode = iterator.iterateNext()) {
results.push(xpathNode);
}
return results;
}
function evaluateBoolean(expression, rootNode) {
let result;
try {
result = evaluateXpath(expression, rootNode, xpath.result.BOOLEAN_TYPE);
}
catch (_err) {
return false;
}
return result.booleanValue;
}
function evaluateString(expression, rootNode) {
let result;
try {
result = evaluateXpath(expression, rootNode, xpath.result.STRING_TYPE);
}
catch (_err) {
return '';
}
return result.stringValue;
}
function updateEvaluator(node) {
if (Engine.getInstance().mode !== Mode.HTTP)
return;
let parent = node;
while (parent && !parent.evaluate) {
parent = parent.parentNode;
}
if (parent && parent.evaluate) {
xpath.currentDocument = parent;
}
else if (node.ownerDocument) {
xpath.currentDocument = node.ownerDocument;
}
}
//# sourceMappingURL=xpath_util.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/dom_util.js
function toArray(nodeList) {
const nodeArray = [];
for (let i = 0, m = nodeList.length; i < m; i++) {
nodeArray.push(nodeList[i]);
}
return nodeArray;
}
function trimInput(input) {
input = input.replace(/ /g, ' ');
return input.replace(/>[ \f\n\r\t\v\u200b]+<').trim();
}
function parseInput(input) {
const dp = new system_external/* SystemExternal */.f.xmldom.DOMParser();
const clean_input = trimInput(input);
const allValues = clean_input.match(/&(?!lt|gt|amp|quot|apos)\w+;/g);
const html = !!allValues;
if (!clean_input) {
throw new Error('Empty input!');
}
try {
const doc = dp.parseFromString(clean_input, html ? 'text/html' : 'text/xml');
if (Engine.getInstance().mode === Mode.HTTP) {
xpath.currentDocument = doc;
return (html ? doc.body.childNodes[0] : doc.documentElement);
}
return doc.documentElement;
}
catch (err) {
throw new SREError('Illegal input: ' + err.message);
}
}
var NodeType;
(function (NodeType) {
NodeType[NodeType["ELEMENT_NODE"] = 1] = "ELEMENT_NODE";
NodeType[NodeType["ATTRIBUTE_NODE"] = 2] = "ATTRIBUTE_NODE";
NodeType[NodeType["TEXT_NODE"] = 3] = "TEXT_NODE";
NodeType[NodeType["CDATA_SECTION_NODE"] = 4] = "CDATA_SECTION_NODE";
NodeType[NodeType["ENTITY_REFERENCE_NODE"] = 5] = "ENTITY_REFERENCE_NODE";
NodeType[NodeType["ENTITY_NODE"] = 6] = "ENTITY_NODE";
NodeType[NodeType["PROCESSING_INSTRUCTION_NODE"] = 7] = "PROCESSING_INSTRUCTION_NODE";
NodeType[NodeType["COMMENT_NODE"] = 8] = "COMMENT_NODE";
NodeType[NodeType["DOCUMENT_NODE"] = 9] = "DOCUMENT_NODE";
NodeType[NodeType["DOCUMENT_TYPE_NODE"] = 10] = "DOCUMENT_TYPE_NODE";
NodeType[NodeType["DOCUMENT_FRAGMENT_NODE"] = 11] = "DOCUMENT_FRAGMENT_NODE";
NodeType[NodeType["NOTATION_NODE"] = 12] = "NOTATION_NODE";
})(NodeType || (NodeType = {}));
function replaceNode(oldNode, newNode) {
if (!oldNode.parentNode) {
return;
}
oldNode.parentNode.insertBefore(newNode, oldNode);
oldNode.parentNode.removeChild(oldNode);
}
function createElement(tag) {
return system_external/* SystemExternal */.f.document.createElement(tag);
}
function createElementNS(url, tag) {
return SystemExternal.document.createElementNS(url, tag);
}
function createTextNode(content) {
return system_external/* SystemExternal */.f.document.createTextNode(content);
}
function formatXml(xml) {
let formatted = '';
let reg = /(>)(<)(\/*)/g;
xml = xml.replace(reg, '$1\r\n$2$3');
let pad = 0;
let split = xml.split('\r\n');
reg = /(\.)*(<)(\/*)/g;
split = split
.map((x) => x.replace(reg, '$1\r\n$2$3').split('\r\n'))
.reduce((x, y) => x.concat(y), []);
while (split.length) {
let node = split.shift();
if (!node) {
continue;
}
let indent = 0;
if (node.match(/^<\w[^>/]*>[^>]+$/)) {
const match = matchingStartEnd(node, split[0]);
if (match[0]) {
if (match[1]) {
node = node + split.shift().slice(0, -match[1].length);
if (match[1].trim()) {
split.unshift(match[1]);
}
}
else {
node = node + split.shift();
}
}
else {
indent = 1;
}
}
else if (node.match(/^<\/\w/)) {
if (pad !== 0) {
pad -= 1;
}
}
else if (node.match(/^<\w[^>]*[^/]>.*$/)) {
indent = 1;
}
else if (node.match(/^<\w[^>]*\/>.+$/)) {
const position = node.indexOf('>') + 1;
const rest = node.slice(position);
if (rest.trim()) {
split.unshift();
}
node = node.slice(0, position) + rest;
}
else {
indent = 0;
}
formatted += new Array(pad + 1).join(' ') + node + '\r\n';
pad += indent;
}
return formatted;
}
function matchingStartEnd(start, end) {
if (!end) {
return [false, ''];
}
const tag1 = start.match(/^<([^> ]+).*>/);
const tag2 = end.match(/^<\/([^>]+)>(.*)/);
return tag1 && tag2 && tag1[1] === tag2[1] ? [true, tag2[2]] : [false, ''];
}
function querySelectorAllByAttr(node, attr) {
return node.querySelectorAll
? toArray(node.querySelectorAll(`[${attr}]`))
: XpathUtil.evalXPath(`.//*[@${attr}]`, node);
}
function querySelectorAllByAttrValue(node, attr, value) {
return node.querySelectorAll
? toArray(node.querySelectorAll(`[${attr}="${value}"]`))
: XpathUtil.evalXPath(`.//*[@${attr}="${value}"]`, node);
}
function querySelectorAll(node, tag) {
return node.querySelectorAll
? toArray(node.querySelectorAll(tag))
: XpathUtil.evalXPath(`.//${tag}`, node);
}
function dom_util_tagName(node) {
return node.tagName.toUpperCase();
}
function cloneNode(node) {
return node.cloneNode(true);
}
function serializeXml(node) {
const xmls = new system_external/* SystemExternal */.f.xmldom.XMLSerializer();
return xmls.serializeToString(node);
}
//# sourceMappingURL=dom_util.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_annotator.js
class SemanticAnnotator {
constructor(domain, name, func) {
this.domain = domain;
this.name = name;
this.func = func;
this.active = false;
}
annotate(node) {
node.childNodes.forEach(this.annotate.bind(this));
node.contentNodes.forEach(this.annotate.bind(this));
node.addAnnotation(this.domain, this.func(node));
}
}
class SemanticVisitor {
constructor(domain, name, func, def = {}) {
this.domain = domain;
this.name = name;
this.func = func;
this.def = def;
this.active = false;
}
visit(node, info) {
let result = this.func(node, info);
node.addAnnotation(this.domain, result[0]);
for (let i = 0, child; (child = node.childNodes[i]); i++) {
result = this.visit(child, result[1]);
}
for (let i = 0, content; (content = node.contentNodes[i]); i++) {
result = this.visit(content, result[1]);
}
return result;
}
}
//# sourceMappingURL=semantic_annotator.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_annotations.js
const annotators = new Map();
const visitors = new Map();
function register(annotator) {
const name = annotator.domain + ':' + annotator.name;
annotator instanceof SemanticAnnotator
? annotators.set(name, annotator)
: visitors.set(name, annotator);
}
function activate(domain, name) {
const key = domain + ':' + name;
const annotator = annotators.get(key) || visitors.get(key);
if (annotator) {
annotator.active = true;
}
}
function deactivate(domain, name) {
const key = domain + ':' + name;
const annotator = annotators.get(key) || visitors.get(key);
if (annotator) {
annotator.active = false;
}
}
function annotate(node) {
for (const annotator of annotators.values()) {
if (annotator.active) {
annotator.annotate(node);
}
}
for (const visitor of visitors.values()) {
if (visitor.active) {
visitor.visit(node, Object.assign({}, visitor.def));
}
}
}
//# sourceMappingURL=semantic_annotations.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/speech_rules/alphabet.js
var alphabet_Font;
(function (Font) {
Font["BOLD"] = "bold";
Font["BOLDFRAKTUR"] = "bold-fraktur";
Font["BOLDITALIC"] = "bold-italic";
Font["BOLDSCRIPT"] = "bold-script";
Font["DOUBLESTRUCK"] = "double-struck";
Font["DOUBLESTRUCKITALIC"] = "double-struck-italic";
Font["FULLWIDTH"] = "fullwidth";
Font["FRAKTUR"] = "fraktur";
Font["ITALIC"] = "italic";
Font["MONOSPACE"] = "monospace";
Font["NORMAL"] = "normal";
Font["SCRIPT"] = "script";
Font["SANSSERIF"] = "sans-serif";
Font["SANSSERIFITALIC"] = "sans-serif-italic";
Font["SANSSERIFBOLD"] = "sans-serif-bold";
Font["SANSSERIFBOLDITALIC"] = "sans-serif-bold-italic";
})(alphabet_Font || (alphabet_Font = {}));
var Embellish;
(function (Embellish) {
Embellish["SUPER"] = "super";
Embellish["SUB"] = "sub";
Embellish["CIRCLED"] = "circled";
Embellish["PARENTHESIZED"] = "parenthesized";
Embellish["PERIOD"] = "period";
Embellish["NEGATIVECIRCLED"] = "negative-circled";
Embellish["DOUBLECIRCLED"] = "double-circled";
Embellish["CIRCLEDSANSSERIF"] = "circled-sans-serif";
Embellish["NEGATIVECIRCLEDSANSSERIF"] = "negative-circled-sans-serif";
Embellish["COMMA"] = "comma";
Embellish["SQUARED"] = "squared";
Embellish["NEGATIVESQUARED"] = "negative-squared";
})(Embellish || (Embellish = {}));
var alphabet_Base;
(function (Base) {
Base["LATINCAP"] = "latinCap";
Base["LATINSMALL"] = "latinSmall";
Base["GREEKCAP"] = "greekCap";
Base["GREEKSMALL"] = "greekSmall";
Base["DIGIT"] = "digit";
})(alphabet_Base || (alphabet_Base = {}));
function num2str(num) {
const str = num.toString(16).toUpperCase();
return str.length > 3 ? str : ('000' + str).slice(-4);
}
function makeInterval([a, b], subst) {
const start = parseInt(a, 16);
const end = parseInt(b, 16);
const result = [];
for (let i = start; i <= end; i++) {
let key = num2str(i);
const sub = subst[key];
if (sub === false) {
continue;
}
key = subst[key] || key;
result.push(key);
}
return result;
}
function makeCharInterval(int, subst = {}) {
return makeInterval(int, subst).map((x) => String.fromCodePoint(parseInt(x, 16)));
}
function makeMultiInterval(ints) {
let result = [];
for (const int of ints) {
if (Array.isArray(int)) {
result = result.concat(makeCharInterval(int));
continue;
}
result.push(String.fromCodePoint(parseInt(int, 16)));
}
return result;
}
function makeCodeInterval(ints) {
let result = [];
for (const int of ints) {
if (Array.isArray(int)) {
result = result.concat(makeInterval(int, {}).map((x) => parseInt(x, 16)));
continue;
}
result.push(parseInt(int, 16));
}
return result;
}
const PROTO_INTERVALS = [
{
interval: ['1D400', '1D419'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.BOLD
},
{
interval: ['1D41A', '1D433'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.BOLD
},
{
interval: ['1D56C', '1D585'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.BOLDFRAKTUR
},
{
interval: ['1D586', '1D59F'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.BOLDFRAKTUR
},
{
interval: ['1D468', '1D481'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.BOLDITALIC
},
{
interval: ['1D482', '1D49B'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.BOLDITALIC
},
{
interval: ['1D4D0', '1D4E9'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.BOLDSCRIPT
},
{
interval: ['1D4EA', '1D503'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.BOLDSCRIPT
},
{
interval: ['1D538', '1D551'],
base: alphabet_Base.LATINCAP,
subst: {
'1D53A': '2102',
'1D53F': '210D',
'1D545': '2115',
'1D547': '2119',
'1D548': '211A',
'1D549': '211D',
'1D551': '2124'
},
capital: true,
category: 'Lu',
font: alphabet_Font.DOUBLESTRUCK
},
{
interval: ['1D552', '1D56B'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.DOUBLESTRUCK
},
{
interval: ['1D504', '1D51D'],
base: alphabet_Base.LATINCAP,
subst: {
'1D506': '212D',
'1D50B': '210C',
'1D50C': '2111',
'1D515': '211C',
'1D51D': '2128'
},
capital: true,
category: 'Lu',
font: alphabet_Font.FRAKTUR
},
{
interval: ['1D51E', '1D537'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.FRAKTUR
},
{
interval: ['FF21', 'FF3A'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.FULLWIDTH
},
{
interval: ['FF41', 'FF5A'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.FULLWIDTH
},
{
interval: ['1D434', '1D44D'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.ITALIC
},
{
interval: ['1D44E', '1D467'],
base: alphabet_Base.LATINSMALL,
subst: { '1D455': '210E' },
capital: false,
category: 'Ll',
font: alphabet_Font.ITALIC
},
{
interval: ['1D670', '1D689'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.MONOSPACE
},
{
interval: ['1D68A', '1D6A3'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.MONOSPACE
},
{
interval: ['0041', '005A'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.NORMAL
},
{
interval: ['0061', '007A'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.NORMAL
},
{
interval: ['1D49C', '1D4B5'],
base: alphabet_Base.LATINCAP,
subst: {
'1D49D': '212C',
'1D4A0': '2130',
'1D4A1': '2131',
'1D4A3': '210B',
'1D4A4': '2110',
'1D4A7': '2112',
'1D4A8': '2133',
'1D4AD': '211B'
},
capital: true,
category: 'Lu',
font: alphabet_Font.SCRIPT
},
{
interval: ['1D4B6', '1D4CF'],
base: alphabet_Base.LATINSMALL,
subst: { '1D4BA': '212F', '1D4BC': '210A', '1D4C4': '2134' },
capital: false,
category: 'Ll',
font: alphabet_Font.SCRIPT
},
{
interval: ['1D5A0', '1D5B9'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.SANSSERIF
},
{
interval: ['1D5BA', '1D5D3'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.SANSSERIF
},
{
interval: ['1D608', '1D621'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.SANSSERIFITALIC
},
{
interval: ['1D622', '1D63B'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.SANSSERIFITALIC
},
{
interval: ['1D5D4', '1D5ED'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.SANSSERIFBOLD
},
{
interval: ['1D5EE', '1D607'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.SANSSERIFBOLD
},
{
interval: ['1D63C', '1D655'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.SANSSERIFBOLDITALIC
},
{
interval: ['1D656', '1D66F'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.SANSSERIFBOLDITALIC
},
{
interval: ['0391', '03A9'],
base: alphabet_Base.GREEKCAP,
subst: { '03A2': '03F4' },
capital: true,
category: 'Lu',
font: alphabet_Font.NORMAL
},
{
interval: ['03B0', '03D0'],
base: alphabet_Base.GREEKSMALL,
subst: {
'03B0': '2207',
'03CA': '2202',
'03CB': '03F5',
'03CC': '03D1',
'03CD': '03F0',
'03CE': '03D5',
'03CF': '03F1',
'03D0': '03D6'
},
capital: false,
category: 'Ll',
font: alphabet_Font.NORMAL
},
{
interval: ['1D6A8', '1D6C0'],
base: alphabet_Base.GREEKCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.BOLD
},
{
interval: ['1D6C1', '1D6E1'],
base: alphabet_Base.GREEKSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.BOLD
},
{
interval: ['1D6E2', '1D6FA'],
base: alphabet_Base.GREEKCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.ITALIC
},
{
interval: ['1D6FB', '1D71B'],
base: alphabet_Base.GREEKSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.ITALIC
},
{
interval: ['1D71C', '1D734'],
base: alphabet_Base.GREEKCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.BOLDITALIC
},
{
interval: ['1D735', '1D755'],
base: alphabet_Base.GREEKSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.BOLDITALIC
},
{
interval: ['1D756', '1D76E'],
base: alphabet_Base.GREEKCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.SANSSERIFBOLD
},
{
interval: ['1D76F', '1D78F'],
base: alphabet_Base.GREEKSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.SANSSERIFBOLD
},
{
interval: ['1D790', '1D7A8'],
base: alphabet_Base.GREEKCAP,
subst: {},
capital: true,
category: 'Lu',
font: alphabet_Font.SANSSERIFBOLDITALIC
},
{
interval: ['1D7A9', '1D7C9'],
base: alphabet_Base.GREEKSMALL,
subst: {},
capital: false,
category: 'Ll',
font: alphabet_Font.SANSSERIFBOLDITALIC
},
{
interval: ['0030', '0039'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: alphabet_Font.NORMAL
},
{
interval: ['2070', '2079'],
base: alphabet_Base.DIGIT,
subst: { 2071: '00B9', 2072: '00B2', 2073: '00B3' },
offset: 0,
category: 'No',
font: Embellish.SUPER
},
{
interval: ['2080', '2089'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 0,
category: 'No',
font: Embellish.SUB
},
{
interval: ['245F', '2473'],
base: alphabet_Base.DIGIT,
subst: { '245F': '24EA' },
offset: 0,
category: 'No',
font: Embellish.CIRCLED
},
{
interval: ['3251', '325F'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 21,
category: 'No',
font: Embellish.CIRCLED
},
{
interval: ['32B1', '32BF'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 36,
category: 'No',
font: Embellish.CIRCLED
},
{
interval: ['2474', '2487'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 1,
category: 'No',
font: Embellish.PARENTHESIZED
},
{
interval: ['2487', '249B'],
base: alphabet_Base.DIGIT,
subst: { 2487: '1F100' },
offset: 0,
category: 'No',
font: Embellish.PERIOD
},
{
interval: ['2775', '277F'],
base: alphabet_Base.DIGIT,
subst: { 2775: '24FF' },
offset: 0,
category: 'No',
font: Embellish.NEGATIVECIRCLED
},
{
interval: ['24EB', '24F4'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 11,
category: 'No',
font: Embellish.NEGATIVECIRCLED
},
{
interval: ['24F5', '24FE'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 1,
category: 'No',
font: Embellish.DOUBLECIRCLED
},
{
interval: ['277F', '2789'],
base: alphabet_Base.DIGIT,
subst: { '277F': '1F10B' },
offset: 0,
category: 'No',
font: Embellish.CIRCLEDSANSSERIF
},
{
interval: ['2789', '2793'],
base: alphabet_Base.DIGIT,
subst: { 2789: '1F10C' },
offset: 0,
category: 'No',
font: Embellish.NEGATIVECIRCLEDSANSSERIF
},
{
interval: ['FF10', 'FF19'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: alphabet_Font.FULLWIDTH
},
{
interval: ['1D7CE', '1D7D7'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: alphabet_Font.BOLD
},
{
interval: ['1D7D8', '1D7E1'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: alphabet_Font.DOUBLESTRUCK
},
{
interval: ['1D7E2', '1D7EB'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: alphabet_Font.SANSSERIF
},
{
interval: ['1D7EC', '1D7F5'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: alphabet_Font.SANSSERIFBOLD
},
{
interval: ['1D7F6', '1D7FF'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 0,
category: 'Nd',
font: alphabet_Font.MONOSPACE
},
{
interval: ['1F101', '1F10A'],
base: alphabet_Base.DIGIT,
subst: {},
offset: 0,
category: 'No',
font: Embellish.COMMA
},
{
interval: ['24B6', '24CF'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'So',
font: Embellish.CIRCLED
},
{
interval: ['24D0', '24E9'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'So',
font: Embellish.CIRCLED
},
{
interval: ['1F110', '1F129'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'So',
font: Embellish.PARENTHESIZED
},
{
interval: ['249C', '24B5'],
base: alphabet_Base.LATINSMALL,
subst: {},
capital: false,
category: 'So',
font: Embellish.PARENTHESIZED
},
{
interval: ['1F130', '1F149'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'So',
font: Embellish.SQUARED
},
{
interval: ['1F170', '1F189'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'So',
font: Embellish.NEGATIVESQUARED
},
{
interval: ['1F150', '1F169'],
base: alphabet_Base.LATINCAP,
subst: {},
capital: true,
category: 'So',
font: Embellish.NEGATIVECIRCLED
}
];
const INTERVALS = new Map();
function alphabetName(base, font) {
const capFont = font
.split('-')
.map((x) => x[0].toUpperCase() + x.slice(1))
.join('');
return base + capFont;
}
for (const proto of PROTO_INTERVALS) {
const key = alphabetName(proto.base, proto.font);
const interval = makeCharInterval(proto.interval, proto.subst);
let alphabet = INTERVALS.get(key);
if (alphabet) {
alphabet.unicode = alphabet.unicode.concat(interval);
continue;
}
alphabet = proto;
alphabet.unicode = interval;
INTERVALS.set(key, alphabet);
}
//# sourceMappingURL=alphabet.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_meaning.js
var Types;
(function (Types) {
Types["PUNCTUATION"] = "punctuation";
Types["FENCE"] = "fence";
Types["NUMBER"] = "number";
Types["IDENTIFIER"] = "identifier";
Types["TEXT"] = "text";
Types["OPERATOR"] = "operator";
Types["RELATION"] = "relation";
Types["LARGEOP"] = "largeop";
Types["FUNCTION"] = "function";
Types["ACCENT"] = "accent";
Types["FENCED"] = "fenced";
Types["FRACTION"] = "fraction";
Types["PUNCTUATED"] = "punctuated";
Types["RELSEQ"] = "relseq";
Types["MULTIREL"] = "multirel";
Types["INFIXOP"] = "infixop";
Types["PREFIXOP"] = "prefixop";
Types["POSTFIXOP"] = "postfixop";
Types["APPL"] = "appl";
Types["INTEGRAL"] = "integral";
Types["BIGOP"] = "bigop";
Types["SQRT"] = "sqrt";
Types["ROOT"] = "root";
Types["LIMUPPER"] = "limupper";
Types["LIMLOWER"] = "limlower";
Types["LIMBOTH"] = "limboth";
Types["SUBSCRIPT"] = "subscript";
Types["SUPERSCRIPT"] = "superscript";
Types["UNDERSCORE"] = "underscore";
Types["OVERSCORE"] = "overscore";
Types["TENSOR"] = "tensor";
Types["TABLE"] = "table";
Types["MULTILINE"] = "multiline";
Types["MATRIX"] = "matrix";
Types["VECTOR"] = "vector";
Types["CASES"] = "cases";
Types["ROW"] = "row";
Types["LINE"] = "line";
Types["CELL"] = "cell";
Types["ENCLOSE"] = "enclose";
Types["INFERENCE"] = "inference";
Types["RULELABEL"] = "rulelabel";
Types["CONCLUSION"] = "conclusion";
Types["PREMISES"] = "premises";
Types["UNKNOWN"] = "unknown";
Types["EMPTY"] = "empty";
})(Types || (Types = {}));
const semantic_meaning_SemanticType = Object.assign({}, Types);
var Roles;
(function (Roles) {
Roles["COMMA"] = "comma";
Roles["SEMICOLON"] = "semicolon";
Roles["ELLIPSIS"] = "ellipsis";
Roles["FULLSTOP"] = "fullstop";
Roles["QUESTION"] = "question";
Roles["EXCLAMATION"] = "exclamation";
Roles["QUOTES"] = "quotes";
Roles["DASH"] = "dash";
Roles["TILDE"] = "tilde";
Roles["PRIME"] = "prime";
Roles["DEGREE"] = "degree";
Roles["VBAR"] = "vbar";
Roles["COLON"] = "colon";
Roles["OPENFENCE"] = "openfence";
Roles["CLOSEFENCE"] = "closefence";
Roles["APPLICATION"] = "application";
Roles["DUMMY"] = "dummy";
Roles["UNIT"] = "unit";
Roles["LABEL"] = "label";
Roles["OPEN"] = "open";
Roles["CLOSE"] = "close";
Roles["TOP"] = "top";
Roles["BOTTOM"] = "bottom";
Roles["NEUTRAL"] = "neutral";
Roles["METRIC"] = "metric";
Roles["LATINLETTER"] = "latinletter";
Roles["GREEKLETTER"] = "greekletter";
Roles["OTHERLETTER"] = "otherletter";
Roles["NUMBERSET"] = "numbersetletter";
Roles["INTEGER"] = "integer";
Roles["FLOAT"] = "float";
Roles["OTHERNUMBER"] = "othernumber";
Roles["INFTY"] = "infty";
Roles["MIXED"] = "mixed";
Roles["MULTIACCENT"] = "multiaccent";
Roles["OVERACCENT"] = "overaccent";
Roles["UNDERACCENT"] = "underaccent";
Roles["UNDEROVER"] = "underover";
Roles["SUBSUP"] = "subsup";
Roles["LEFTSUB"] = "leftsub";
Roles["LEFTSUPER"] = "leftsuper";
Roles["RIGHTSUB"] = "rightsub";
Roles["RIGHTSUPER"] = "rightsuper";
Roles["LEFTRIGHT"] = "leftright";
Roles["ABOVEBELOW"] = "abovebelow";
Roles["INTERVAL"] = "interval";
Roles["SETEMPTY"] = "set empty";
Roles["SETEXT"] = "set extended";
Roles["SETSINGLE"] = "set singleton";
Roles["SETCOLLECT"] = "set collection";
Roles["STRING"] = "string";
Roles["SPACE"] = "space";
Roles["ANNOTATION"] = "annotation";
Roles["TEXT"] = "text";
Roles["SEQUENCE"] = "sequence";
Roles["ENDPUNCT"] = "endpunct";
Roles["STARTPUNCT"] = "startpunct";
Roles["NEGATIVE"] = "negative";
Roles["POSITIVE"] = "positive";
Roles["NEGATION"] = "negation";
Roles["MULTIOP"] = "multiop";
Roles["PREFIXOP"] = "prefix operator";
Roles["POSTFIXOP"] = "postfix operator";
Roles["LIMFUNC"] = "limit function";
Roles["INFIXFUNC"] = "infix function";
Roles["PREFIXFUNC"] = "prefix function";
Roles["POSTFIXFUNC"] = "postfix function";
Roles["SIMPLEFUNC"] = "simple function";
Roles["COMPFUNC"] = "composed function";
Roles["SUM"] = "sum";
Roles["INTEGRAL"] = "integral";
Roles["GEOMETRY"] = "geometry";
Roles["BOX"] = "box";
Roles["BLOCK"] = "block";
Roles["ADDITION"] = "addition";
Roles["MULTIPLICATION"] = "multiplication";
Roles["SUBTRACTION"] = "subtraction";
Roles["IMPLICIT"] = "implicit";
Roles["DIVISION"] = "division";
Roles["VULGAR"] = "vulgar";
Roles["EQUALITY"] = "equality";
Roles["INEQUALITY"] = "inequality";
Roles["ARROW"] = "arrow";
Roles["ELEMENT"] = "element";
Roles["NONELEMENT"] = "nonelement";
Roles["REELEMENT"] = "reelement";
Roles["RENONELEMENT"] = "renonelement";
Roles["SET"] = "set";
Roles["DETERMINANT"] = "determinant";
Roles["ROWVECTOR"] = "rowvector";
Roles["BINOMIAL"] = "binomial";
Roles["SQUAREMATRIX"] = "squarematrix";
Roles["CYCLE"] = "cycle";
Roles["MULTILINE"] = "multiline";
Roles["MATRIX"] = "matrix";
Roles["VECTOR"] = "vector";
Roles["CASES"] = "cases";
Roles["TABLE"] = "table";
Roles["CAYLEY"] = "cayley";
Roles["PROOF"] = "proof";
Roles["LEFT"] = "left";
Roles["RIGHT"] = "right";
Roles["UP"] = "up";
Roles["DOWN"] = "down";
Roles["FINAL"] = "final";
Roles["SINGLE"] = "single";
Roles["HYP"] = "hyp";
Roles["AXIOM"] = "axiom";
Roles["LOGIC"] = "logic";
Roles["UNKNOWN"] = "unknown";
Roles["MGLYPH"] = "mglyph";
})(Roles || (Roles = {}));
const semantic_meaning_SemanticRole = Object.assign({}, Roles);
var ExtraFont;
(function (ExtraFont) {
ExtraFont["CALIGRAPHIC"] = "caligraphic";
ExtraFont["CALIGRAPHICBOLD"] = "caligraphic-bold";
ExtraFont["OLDSTYLE"] = "oldstyle";
ExtraFont["OLDSTYLEBOLD"] = "oldstyle-bold";
ExtraFont["UNKNOWN"] = "unknown";
})(ExtraFont || (ExtraFont = {}));
const SemanticFont = Object.assign(Object.assign(Object.assign({}, alphabet_Font), ExtraFont), Embellish);
var SecondaryEnum;
(function (SecondaryEnum) {
SecondaryEnum["ALLLETTERS"] = "allLetters";
SecondaryEnum["D"] = "d";
SecondaryEnum["BAR"] = "bar";
SecondaryEnum["TILDE"] = "tilde";
})(SecondaryEnum || (SecondaryEnum = {}));
const SemanticSecondary = Object.assign(Object.assign({}, alphabet_Base), SecondaryEnum);
//# sourceMappingURL=semantic_meaning.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_attr.js
var semantic_attr_rest = (undefined && undefined.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
const NamedSymbol = {
functionApplication: String.fromCodePoint(0x2061),
invisibleTimes: String.fromCodePoint(0x2062),
invisibleComma: String.fromCodePoint(0x2063),
invisiblePlus: String.fromCodePoint(0x2064)
};
class meaningMap extends Map {
get(symbol) {
return (super.get(symbol) || {
role: semantic_meaning_SemanticRole.UNKNOWN,
type: semantic_meaning_SemanticType.UNKNOWN,
font: SemanticFont.UNKNOWN
});
}
}
class secondaryMap extends Map {
set(char, kind, annotation = '') {
super.set(this.secKey(kind, char), annotation || kind);
return this;
}
has(char, kind) {
return super.has(this.secKey(kind, char));
}
get(char, kind) {
return super.get(this.secKey(kind, char));
}
secKey(kind, char) {
return char ? `${kind} ${char}` : `${kind}`;
}
}
const SemanticMap = {
Meaning: new meaningMap(),
Secondary: new secondaryMap(),
FencesHoriz: new Map(),
FencesVert: new Map(),
LatexCommands: new Map()
};
function addMeaning(symbols, meaning) {
for (const symbol of symbols) {
SemanticMap.Meaning.set(symbol, {
role: meaning.role || semantic_meaning_SemanticRole.UNKNOWN,
type: meaning.type || semantic_meaning_SemanticType.UNKNOWN,
font: meaning.font || SemanticFont.UNKNOWN
});
if (meaning.secondary) {
SemanticMap.Secondary.set(symbol, meaning.secondary);
}
}
}
function initMeaning() {
const sets = [
{
set: [
'23',
'26',
'40',
'5c',
'a1',
'a7',
'b6',
'bf',
'2017',
['2022', '2025'],
'2027',
'203b',
'203c',
['2041', '2043'],
['2047', '2049'],
['204b', '204d'],
'2050',
'2055',
'2056',
['2058', '205e'],
'2234',
'2235',
'fe45',
'fe46',
'fe5f',
'fe60',
'fe68',
'fe6b',
'ff03',
'ff06',
'ff0f',
'ff20',
'ff3c'
],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: [
'22',
'ab',
'bb',
'2dd',
['2018', '201f'],
'2039',
'203a',
['301d', '301f'],
'fe10',
'ff02',
'ff07'
],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.QUOTES
},
{
set: ['3b', '204f', '2a1f', '2a3e', 'fe14', 'fe54', 'ff1b'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.SEMICOLON
},
{
set: ['3f', '203d', 'fe16', 'fe56', 'ff1f'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.QUESTION
},
{
set: ['21', 'fe15', 'fe57', 'ff01'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.EXCLAMATION
},
{
set: [
'5e',
'60',
'a8',
'aa',
'b4',
'ba',
'2c7',
['2d8', '2da'],
'2040',
'207a',
'207d',
'207e',
'ff3e',
'ff40'
],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.OVERACCENT
},
{
set: ['b8', '2db', '2038', '203f', '2054', '208a', '208d', '208e'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.UNDERACCENT
},
{
set: ['3a', '2982', 'fe13', 'fe30', 'fe55', 'ff1a'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.COLON
},
{
set: ['2c', '2063', 'fe50', 'ff0c'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.COMMA
},
{
set: ['2026', ['22ee', '22f1'], 'fe19'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.ELLIPSIS
},
{
set: ['2e', 'fe52', 'ff0e'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.FULLSTOP
},
{
set: ['2d', '207b', '208b', '2212', '2796', 'fe63', 'ff0d'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.DASH,
secondary: SemanticSecondary.BAR
},
{
set: [
'5f',
'af',
['2010', '2015'],
'203e',
'208b',
['fe49', 'fe4f'],
'fe58',
'ff3f',
'ffe3'
],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.DASH,
secondary: SemanticSecondary.BAR
},
{
set: [
'7e',
'2dc',
'2f7',
'303',
'330',
'334',
'2053',
'223c',
'223d',
'301c',
'ff5e'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.TILDE,
secondary: SemanticSecondary.TILDE
},
{
set: ['27', '2b9', '2ba', ['2032', '2037'], '2057'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.PRIME
},
{
set: ['b0'],
type: semantic_meaning_SemanticType.PUNCTUATION,
role: semantic_meaning_SemanticRole.DEGREE
},
{
set: [
'2b',
'b1',
'2064',
'2213',
'2214',
'2228',
'222a',
['228c', '228e'],
'2294',
'2295',
'229d',
'229e',
'22bb',
'22bd',
'22c4',
'22ce',
'22d3',
'2304',
'271b',
'271c',
'2795',
'27cf',
'29fa',
'29fb',
'29fe',
['2a22', '2a28'],
'2a2d',
'2a2e',
'2a39',
'2a42',
'2a45',
'2a46',
'2a48',
'2a4a',
'2a4c',
'2a4f',
'2a50',
'2a52',
'2a54',
'2a56',
'2a57',
'2a59',
'2a5b',
'2a5d',
['2a61', '2a63'],
'2adc',
'2add',
'fe62',
'ff0b'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.ADDITION
},
{
set: [
'2a',
'b7',
'd7',
'2020',
'2021',
'204e',
'2051',
'2062',
['2217', '2219'],
'2227',
'2229',
'2240',
'2293',
'2297',
['2299', '229b'],
'22a0',
'22a1',
'22b9',
'22bc',
['22c5', '22cc'],
'22cf',
'22d2',
'22d4',
'2303',
'2305',
'2306',
'25cb',
'2715',
'2716',
'27ce',
'27d1',
['29d1', '29d7'],
'29e2',
'2a1d',
['2a2f', '2a37'],
['2a3b', '2a3d'],
'2a40',
'2a43',
'2a44',
'2a47',
'2a49',
'2a4b',
'2a4d',
'2a4e',
'2a51',
'2a53',
'2a55',
'2a58',
'2a5a',
'2a5c',
['2a5e', '2a60'],
'2ada',
'2adb',
'fe61',
'ff0a'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.MULTIPLICATION
},
{
set: [
'2d',
'af',
'2010',
'2011',
'2052',
'207b',
'208b',
'2212',
'2216',
'2238',
'2242',
'2296',
'229f',
'2796',
'29ff',
['2a29', '2a2c'],
'2a3a',
'2a41',
'fe63',
'ff0d'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.SUBTRACTION
},
{
set: [
'2f',
'f7',
'2044',
'2215',
'2298',
'2797',
'27cc',
'29bc',
['29f5', '29f9'],
'2a38'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.DIVISION
},
{
set: ['25', '2030', '2031', 'ff05', 'fe6a'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.POSTFIXOP
},
{
set: [
'ac',
'2200',
'2201',
'2203',
'2204',
'2206',
['221a', '221c'],
'2310',
'ffe2'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXOP
},
{
set: [
'2320',
'2321',
'23aa',
'23ae',
'23af',
'23b2',
'23b3',
'23b6',
'23b7'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXOP
},
{
set: ['1d7ca', '1d7cb'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXOP,
font: SemanticFont.BOLD
},
{
set: [
'3d',
'7e',
'207c',
'208c',
'221d',
'2237',
['223a', '223f'],
'2243',
'2245',
'2248',
['224a', '224e'],
['2251', '225f'],
'2261',
'2263',
'229c',
'22cd',
'22d5',
'29e4',
'29e6',
'2a66',
'2a67',
['2a6a', '2a6c'],
['2a6c', '2a78'],
'fe66',
'ff1d'
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.EQUALITY
},
{
set: [
'3c',
'3e',
'2241',
'2242',
'2244',
'2246',
'2247',
'2249',
'224f',
'2250',
'2260',
'2262',
['2264', '2281'],
'22b0',
'22b1',
['22d6', '22e1'],
['22e6', '22e9'],
['2976', '2978'],
'29c0',
'29c1',
'29e1',
'29e3',
'29e5',
['2a79', '2abc'],
['2af7', '2afa'],
'fe64',
'fe65',
'ff1c',
'ff1e'
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.INEQUALITY
},
{
set: [
['2282', '228b'],
['228f', '2292'],
['22b2', '22b8'],
'22d0',
'22d1',
['22e2', '22e5'],
['22ea', '22ed'],
'27c3',
'27c4',
['27c7', '27c9'],
['27d5', '27d7'],
'27dc',
['2979', '297b'],
'29df',
['2abd', '2ad8']
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.SET
},
{
set: [
'2236',
['27e0', '27e5'],
'292b',
'292c',
['29b5', '29bb'],
'29be',
'29bf',
['29c2', '29d0']
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: ['2205', ['29b0', '29b4']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.SETEMPTY
},
{
set: ['1ab2', '221e', ['29dc', '29de']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.INFTY
},
{
set: [
'22a2',
'22a3',
['22a6', '22af'],
'27da',
'27db',
'27dd',
'27de',
'2ade',
['2ae2', '2ae6'],
'2aec',
'2aed'
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.LOGIC
},
{
set: [
'22a4',
'22a5',
'22ba',
'27d8',
'27d9',
'27df',
'2adf',
'2ae0',
['2ae7', '2aeb'],
'2af1'
],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LOGIC
},
{
set: [
['2190', '21ff'],
'2301',
'2324',
'238b',
'2794',
['2798', '27af'],
['27b1', '27be'],
['27f0', '27ff'],
['2900', '292a'],
['292d', '2975'],
['297c', '297f'],
['2b00', '2b11'],
['2b30', '2b4c'],
['ffe9', 'ffec']
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.ARROW
},
{
set: ['2208', '220a', ['22f2', '22f9'], '22ff', '27d2', '2ad9'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.ELEMENT
},
{
set: ['2209'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.NONELEMENT
},
{
set: ['220b', '220d', ['22fa', '22fe']],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.REELEMENT
},
{
set: ['220c'],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.RENONELEMENT
},
{
set: [
['220f', '2211'],
['22c0', '22c3'],
['2a00', '2a0b'],
'2a3f',
'2afc',
'2aff'
],
type: semantic_meaning_SemanticType.LARGEOP,
role: semantic_meaning_SemanticRole.SUM
},
{
set: ['2140'],
type: semantic_meaning_SemanticType.LARGEOP,
role: semantic_meaning_SemanticRole.SUM,
font: SemanticFont.DOUBLESTRUCK
},
{
set: [
['222b', '2233'],
['2a0c', '2a17'],
['2a17', '2a1c']
],
type: semantic_meaning_SemanticType.LARGEOP,
role: semantic_meaning_SemanticRole.INTEGRAL
},
{
set: [['2500', '257F']],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.BOX
},
{
set: [['2580', '259F']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.BLOCK
},
{
set: [
['25A0', '25FF'],
['2B12', '2B2F'],
['2B50', '2B59']
],
type: semantic_meaning_SemanticType.RELATION,
role: semantic_meaning_SemanticRole.GEOMETRY
},
{
set: [
'220e',
'2300',
'2302',
'2311',
'29bd',
'29e0',
['29e8', '29f3'],
'2a1e',
'2afe',
'ffed',
'ffee'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.GEOMETRY
},
{
set: [
['221f', '2222'],
'22be',
'22bf',
['2312', '2314'],
'237c',
'27c0',
['299b', '29af']
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.GEOMETRY
},
{
set: [
'24',
['a2', 'a5'],
'b5',
'2123',
['2125', '2127'],
'212a',
'212b',
'fe69',
'ff04',
'ffe0',
'ffe1',
'ffe5',
'ffe6'
],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: [
'a9',
'ae',
'210f',
'2114',
'2116',
'2117',
['211e', '2122'],
'212e',
'2132',
['2139', '213b'],
['2141', '2144'],
'214d',
'214e',
['1f12a', '1f12c'],
'1f18a'
],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.OTHERLETTER
},
{
set: [
'2224',
'2226',
'2239',
'2307',
'27b0',
'27bf',
'27c1',
'27c2',
'27ca',
'27cb',
'27cd',
'27d0',
'27d3',
'27d4',
'2981',
'2999',
'299a',
'29e7',
'29f4',
'2a20',
'2a21',
'2a64',
'2a65',
'2a68',
'2a69',
'2ae1',
['2aee', '2af0'],
'2af2',
'2af3',
'2af5',
'2af6',
'2afb',
'2afd'
],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: ['2605', '2606', '26aa', '26ab', ['2720', '274d']],
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: [['2145', '2149']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LATINLETTER,
font: SemanticFont.DOUBLESTRUCKITALIC,
secondary: SemanticSecondary.ALLLETTERS
},
{
set: [['213c', '213f']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.GREEKLETTER,
font: SemanticFont.DOUBLESTRUCK,
secondary: SemanticSecondary.ALLLETTERS
},
{
set: [
'3d0',
'3d7',
'3f6',
['1d26', '1d2a'],
'1d5e',
'1d60',
['1d66', '1d6a']
],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.GREEKLETTER,
font: SemanticFont.NORMAL,
secondary: SemanticSecondary.ALLLETTERS
},
{
set: [['2135', '2138']],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.OTHERLETTER,
font: SemanticFont.NORMAL,
secondary: SemanticSecondary.ALLLETTERS
},
{
set: ['131', '237'],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LATINLETTER,
font: SemanticFont.NORMAL
},
{
set: ['1d6a4', '1d6a5'],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LATINLETTER,
font: SemanticFont.ITALIC
},
{
set: ['2113', '2118'],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LATINLETTER,
font: SemanticFont.SCRIPT
},
{
set: [
['c0', 'd6'],
['d8', 'f6'],
['f8', '1bf'],
['1c4', '2af'],
['1d00', '1d25'],
['1d6b', '1d9a'],
['1e00', '1ef9'],
['363', '36f'],
['1dd3', '1de6'],
['1d62', '1d65'],
'1dca',
'2071',
'207f',
['2090', '209c'],
'2c7c'
],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.LATINLETTER,
font: SemanticFont.NORMAL
},
{
set: [['00bc', '00be'], ['2150', '215f'], '2189'],
type: semantic_meaning_SemanticType.NUMBER,
role: semantic_meaning_SemanticRole.FLOAT
},
{
set: ['23E8', ['3248', '324f']],
type: semantic_meaning_SemanticType.NUMBER,
role: semantic_meaning_SemanticRole.INTEGER
},
{
set: [['214A', '214C'], '2705', '2713', '2714', '2717', '2718'],
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.UNKNOWN
},
{
set: [
'20',
'a0',
'ad',
['2000', '200f'],
['2028', '202f'],
['205f', '2060'],
'206a',
'206b',
'206e',
'206f',
'feff',
['fff9', 'fffb']
],
type: semantic_meaning_SemanticType.TEXT,
role: semantic_meaning_SemanticRole.SPACE
},
{
set: [
'7c',
'a6',
'2223',
'23b8',
'23b9',
'23d0',
'2758',
['fe31', 'fe34'],
'ff5c',
'ffe4',
'ffe8'
],
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.NEUTRAL
},
{
set: ['2016', '2225', '2980', '2af4'],
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.METRIC
}
];
sets.forEach((_a) => {
var { set: s } = _a, m = semantic_attr_rest(_a, ["set"]);
return addMeaning(makeMultiInterval(s), m);
});
}
function addFences(map, ints, sep = 1) {
const used = {};
const codes = makeCodeInterval(ints);
for (const code of codes) {
if (used[code])
continue;
map.set(String.fromCodePoint(code), String.fromCodePoint(code + sep));
used[code] = true;
used[code + sep] = true;
}
}
function initFences() {
addFences(SemanticMap.FencesVert, [
'23b4',
['23dc', '23e1'],
['fe35', 'fe44'],
'fe47'
]);
addFences(SemanticMap.FencesHoriz, [
'28',
'2045',
'207D',
'208D',
['2308', '230f'],
['231c', '231f'],
'2329',
'23b0',
['2768', '2775'],
'27c5',
['27e6', '27ef'],
['2983', '2998'],
['29d8', '29db'],
'29fc',
['2e22', '2e29'],
['3008', '3011'],
['3014', '301b'],
'fd3e',
'fe17',
['fe59', 'fe5e'],
'ff08',
'ff5f',
'ff62'
]);
addFences(SemanticMap.FencesHoriz, ['5b', '7b', 'ff3b', 'ff5b'], 2);
addFences(SemanticMap.FencesHoriz, [['239b', '23a6']], 3);
addFences(SemanticMap.FencesHoriz, [['23a7', '23a9']], 4);
addMeaning([...SemanticMap.FencesHoriz.keys()], {
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.OPEN
});
addMeaning([...SemanticMap.FencesHoriz.values()], {
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.CLOSE
});
addMeaning([...SemanticMap.FencesVert.keys()], {
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.TOP
});
addMeaning([...SemanticMap.FencesVert.values()], {
type: semantic_meaning_SemanticType.FENCE,
role: semantic_meaning_SemanticRole.BOTTOM
});
}
const trigonometricFunctions = [
'cos',
'cot',
'csc',
'sec',
'sin',
'tan',
'arccos',
'arccot',
'arccsc',
'arcsec',
'arcsin',
'arctan'
];
const hyperbolicFunctions = [
'cosh',
'coth',
'csch',
'sech',
'sinh',
'tanh',
'arcosh',
'arcoth',
'arcsch',
'arsech',
'arsinh',
'artanh'
];
const algebraicFunctions = ['deg', 'det', 'dim', 'hom', 'ker', 'Tr'];
const elementaryFunctions = [
'log',
'ln',
'lg',
'exp',
'gcd',
'lcm',
'arg',
'im',
're',
'Pr'
];
const prefixFunctions = trigonometricFunctions.concat(hyperbolicFunctions, algebraicFunctions, elementaryFunctions);
function initFunctions() {
addMeaning([
'inf',
'lim',
'liminf',
'limsup',
'max',
'min',
'sup',
'injlim',
'projlim'
], {
type: semantic_meaning_SemanticType.FUNCTION,
role: semantic_meaning_SemanticRole.LIMFUNC
});
addMeaning(prefixFunctions, {
type: semantic_meaning_SemanticType.FUNCTION,
role: semantic_meaning_SemanticRole.PREFIXFUNC
});
addMeaning(['mod', 'rem'], {
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXFUNC
});
}
function addFunctionSemantic(base, names) {
const meaning = SemanticMap.Meaning.get(base) || {
type: SemanticType.FUNCTION,
role: SemanticRole.PREFIXFUNC
};
addMeaning(names, meaning);
}
function equal(meaning1, meaning2) {
return (meaning1.type === meaning2.type &&
meaning1.role === meaning2.role &&
meaning1.font === meaning2.font);
}
function isMatchingFence(open, close) {
const meaning = SemanticMap.Meaning.get(open);
if (meaning.type !== SemanticType.FENCE) {
return false;
}
if (meaning.role === SemanticRole.NEUTRAL ||
meaning.role === SemanticRole.METRIC) {
return open === close;
}
return (SemanticMap.FencesHoriz.get(open) === close ||
SemanticMap.FencesVert.get(open) === close);
}
function changeSemantics(alphabet, change) {
for (const [pos, meaning] of Object.entries(change)) {
const character = alphabet[pos];
if (character !== undefined) {
SemanticMap.Meaning.set(character, meaning);
}
}
}
function addSecondaries(alphabet, change) {
for (const [pos, meaning] of Object.entries(change)) {
const character = alphabet[pos];
if (character !== undefined) {
SemanticMap.Secondary.set(character, meaning);
}
}
}
function singleAlphabet(alphabet, type, role, font, semfont, secondaries = [], change = {}, secondary = {}) {
const interval = INTERVALS.get(alphabetName(alphabet, font));
if (interval) {
interval.unicode.forEach((x) => {
SemanticMap.Meaning.set(x, {
type: type,
role: role,
font: semfont
});
secondaries.forEach((sec) => SemanticMap.Secondary.set(x, sec));
});
changeSemantics(interval.unicode, change);
addSecondaries(interval.unicode, secondary);
}
}
function initAlphabets() {
for (const [name, font] of Object.entries(SemanticFont)) {
const emb = !!Embellish[name];
const semfont = emb
? SemanticFont.UNKNOWN
: font === SemanticFont.FULLWIDTH
? SemanticFont.NORMAL
: font;
singleAlphabet(alphabet_Base.LATINCAP, semantic_meaning_SemanticType.IDENTIFIER, semantic_meaning_SemanticRole.LATINLETTER, font, semfont, [SemanticSecondary.ALLLETTERS]);
singleAlphabet(alphabet_Base.LATINSMALL, semantic_meaning_SemanticType.IDENTIFIER, semantic_meaning_SemanticRole.LATINLETTER, font, semfont, [SemanticSecondary.ALLLETTERS], {}, { 3: SemanticSecondary.D });
singleAlphabet(alphabet_Base.GREEKCAP, semantic_meaning_SemanticType.IDENTIFIER, semantic_meaning_SemanticRole.GREEKLETTER, font, semfont, [SemanticSecondary.ALLLETTERS]);
singleAlphabet(alphabet_Base.GREEKSMALL, semantic_meaning_SemanticType.IDENTIFIER, semantic_meaning_SemanticRole.GREEKLETTER, font, semfont, [SemanticSecondary.ALLLETTERS], {
0: {
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXOP,
font: semfont
},
26: {
type: semantic_meaning_SemanticType.OPERATOR,
role: semantic_meaning_SemanticRole.PREFIXOP,
font: semfont
}
});
singleAlphabet(alphabet_Base.DIGIT, semantic_meaning_SemanticType.NUMBER, semantic_meaning_SemanticRole.INTEGER, font, semfont);
}
}
initMeaning();
initFences();
initAlphabets();
initFunctions();
//# sourceMappingURL=semantic_attr.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_ordering.js
const comparators = [];
function semantic_ordering_add(comparator) {
comparators.push(comparator);
}
function apply(meaning1, meaning2) {
for (let i = 0, comparator; (comparator = comparators[i]); i++) {
const result = comparator.compare(meaning1, meaning2);
if (result !== 0) {
return result;
}
}
return 0;
}
function sort(meanings) {
meanings.sort(apply);
}
function reduce(meanings) {
if (meanings.length <= 1) {
return meanings;
}
const copy = meanings.slice();
sort(copy);
const result = [];
let last;
do {
last = copy.pop();
result.push(last);
} while (last && copy.length && apply(copy[copy.length - 1], last) === 0);
return result;
}
class SemanticComparator {
constructor(comparator, type = null) {
this.comparator = comparator;
this.type = type;
semantic_ordering_add(this);
}
compare(meaning1, meaning2) {
return this.type &&
this.type === meaning1.type &&
this.type === meaning2.type
? this.comparator(meaning1, meaning2)
: 0;
}
}
function simpleFunction(meaning1, meaning2) {
if (meaning1.role === semantic_meaning_SemanticRole.SIMPLEFUNC) {
return 1;
}
if (meaning2.role === semantic_meaning_SemanticRole.SIMPLEFUNC) {
return -1;
}
return 0;
}
new SemanticComparator(simpleFunction, semantic_meaning_SemanticType.IDENTIFIER);
//# sourceMappingURL=semantic_ordering.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_default.js
function key(symbol, font) {
return symbol.match(/^.+:.+$/) || !font ? symbol : symbol + ':' + font;
}
class SemanticDefault extends Map {
set(symbol, meaning) {
super.set(key(symbol, meaning.font), meaning);
return this;
}
setNode(node) {
this.set(node.textContent, node.meaning());
}
get(symbol, font = null) {
return super.get(key(symbol, font));
}
getNode(node) {
return this.get(node.textContent, node.font);
}
}
class SemanticCollator extends Map {
add(symbol, entry) {
const list = this.get(symbol);
if (list) {
list.push(entry);
}
else {
super.set(symbol, [entry]);
}
}
get(symbol, font = null) {
return super.get(key(symbol, font));
}
getNode(node) {
return this.get(node.textContent, node.font);
}
minimize() {
for (const [key, entry] of this) {
if (entry.length === 1) {
this.delete(key);
}
}
}
isMultiValued() {
for (const value of this.values()) {
if (value.length > 1) {
return true;
}
}
return false;
}
}
class SemanticNodeCollator extends SemanticCollator {
add(symbol, entry) {
super.add(key(symbol, entry.font), entry);
}
addNode(node) {
this.add(node.textContent, node);
}
toString() {
const outer = [];
for (const [key, nodes] of this) {
const length = Array(key.length + 3).join(' ');
const inner = nodes.map((node) => node.toString()).join('\n' + length);
outer.push(key + ': ' + inner);
}
return outer.join('\n');
}
collateMeaning() {
const collator = new SemanticMeaningCollator();
for (const [key, val] of this) {
collator.set(key, val.map((node) => node.meaning()));
}
return collator;
}
}
class SemanticMeaningCollator extends SemanticCollator {
add(symbol, entry) {
const list = this.get(symbol, entry.font);
if (!list ||
!list.find(function (x) {
return equal(x, entry);
})) {
super.add(key(symbol, entry.font), entry);
}
}
addNode(node) {
this.add(node.textContent, node.meaning());
}
toString() {
const outer = [];
for (const [key, nodes] of this) {
const length = Array(key.length + 3).join(' ');
const inner = nodes
.map((node) => `{type: ${node.type}, role: ${node.role}, font: ${node.font}}`)
.join('\n' + length);
outer.push(key + ': ' + inner);
}
return outer.join('\n');
}
reduce() {
for (const [key, val] of this) {
if (val.length !== 1) {
this.set(key, reduce(val));
}
}
}
default() {
const def = new SemanticDefault();
for (const [key, val] of this) {
if (val.length === 1) {
def.set(key, val[0]);
}
}
return def;
}
newDefault() {
const oldDefault = this.default();
this.reduce();
const newDefault = this.default();
return oldDefault.size !== newDefault.size ? newDefault : null;
}
}
//# sourceMappingURL=semantic_default.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_util.js
var MMLTAGS;
(function (MMLTAGS) {
MMLTAGS["ANNOTATION"] = "ANNOTATION";
MMLTAGS["ANNOTATIONXML"] = "ANNOTATION-XML";
MMLTAGS["MACTION"] = "MACTION";
MMLTAGS["MALIGNGROUP"] = "MALIGNGROUP";
MMLTAGS["MALIGNMARK"] = "MALIGNMARK";
MMLTAGS["MATH"] = "MATH";
MMLTAGS["MENCLOSE"] = "MENCLOSE";
MMLTAGS["MERROR"] = "MERROR";
MMLTAGS["MFENCED"] = "MFENCED";
MMLTAGS["MFRAC"] = "MFRAC";
MMLTAGS["MGLYPH"] = "MGLYPH";
MMLTAGS["MI"] = "MI";
MMLTAGS["MLABELEDTR"] = "MLABELEDTR";
MMLTAGS["MMULTISCRIPTS"] = "MMULTISCRIPTS";
MMLTAGS["MN"] = "MN";
MMLTAGS["MO"] = "MO";
MMLTAGS["MOVER"] = "MOVER";
MMLTAGS["MPADDED"] = "MPADDED";
MMLTAGS["MPHANTOM"] = "MPHANTOM";
MMLTAGS["MPRESCRIPTS"] = "MPRESCRIPTS";
MMLTAGS["MROOT"] = "MROOT";
MMLTAGS["MROW"] = "MROW";
MMLTAGS["MS"] = "MS";
MMLTAGS["MSPACE"] = "MSPACE";
MMLTAGS["MSQRT"] = "MSQRT";
MMLTAGS["MSTYLE"] = "MSTYLE";
MMLTAGS["MSUB"] = "MSUB";
MMLTAGS["MSUBSUP"] = "MSUBSUP";
MMLTAGS["MSUP"] = "MSUP";
MMLTAGS["MTABLE"] = "MTABLE";
MMLTAGS["MTD"] = "MTD";
MMLTAGS["MTEXT"] = "MTEXT";
MMLTAGS["MTR"] = "MTR";
MMLTAGS["MUNDER"] = "MUNDER";
MMLTAGS["MUNDEROVER"] = "MUNDEROVER";
MMLTAGS["NONE"] = "NONE";
MMLTAGS["SEMANTICS"] = "SEMANTICS";
})(MMLTAGS || (MMLTAGS = {}));
const ALLTAGS = Object.values(MMLTAGS);
const LEAFTAGS = [
MMLTAGS.MO,
MMLTAGS.MI,
MMLTAGS.MN,
MMLTAGS.MTEXT,
MMLTAGS.MS,
MMLTAGS.MSPACE
];
const IGNORETAGS = [
MMLTAGS.MERROR,
MMLTAGS.MPHANTOM,
MMLTAGS.MALIGNGROUP,
MMLTAGS.MALIGNMARK,
MMLTAGS.MPRESCRIPTS,
MMLTAGS.ANNOTATION,
MMLTAGS.ANNOTATIONXML
];
const EMPTYTAGS = [
MMLTAGS.MATH,
MMLTAGS.MROW,
MMLTAGS.MPADDED,
MMLTAGS.MACTION,
MMLTAGS.NONE,
MMLTAGS.MSTYLE,
MMLTAGS.SEMANTICS
];
const DISPLAYTAGS = [MMLTAGS.MROOT, MMLTAGS.MSQRT];
const directSpeechKeys = ['aria-label', 'exact-speech', 'alt'];
function hasMathTag(node) {
return !!node && dom_util_tagName(node) === MMLTAGS.MATH;
}
function hasLeafTag(node) {
return !!node && LEAFTAGS.includes(dom_util_tagName(node));
}
function hasIgnoreTag(node) {
return (!!node &&
(IGNORETAGS.includes(dom_util_tagName(node)) ||
!ALLTAGS.includes(dom_util_tagName(node))));
}
function hasEmptyTag(node) {
return !!node && EMPTYTAGS.includes(dom_util_tagName(node));
}
function hasDisplayTag(node) {
return !!node && DISPLAYTAGS.includes(dom_util_tagName(node));
}
function isOrphanedGlyph(node) {
return (!!node &&
dom_util_tagName(node) === MMLTAGS.MGLYPH &&
!hasLeafTag(node.parentNode));
}
function purgeNodes(nodes) {
const nodeArray = [];
for (let i = 0, node; (node = nodes[i]); i++) {
if (node.nodeType !== NodeType.ELEMENT_NODE) {
continue;
}
const tagName = dom_util_tagName(node);
if (IGNORETAGS.includes(tagName)) {
continue;
}
if (EMPTYTAGS.includes(tagName) && node.childNodes.length === 0) {
continue;
}
nodeArray.push(node);
}
return nodeArray;
}
function isZeroLength(length) {
if (!length) {
return false;
}
const negativeNamedSpaces = [
'negativeveryverythinmathspace',
'negativeverythinmathspace',
'negativethinmathspace',
'negativemediummathspace',
'negativethickmathspace',
'negativeverythickmathspace',
'negativeveryverythickmathspace'
];
if (negativeNamedSpaces.includes(length)) {
return true;
}
const value = length.match(/[0-9.]+/);
if (!value) {
return false;
}
return parseFloat(value[0]) === 0;
}
function addAttributes(to, from) {
var _a;
if ((_a = from.attributes) === null || _a === void 0 ? void 0 : _a.length) {
const attrs = from.attributes;
for (let i = attrs.length - 1; i >= 0; i--) {
const key = attrs[i].name;
if (key.match(/^ext/)) {
to.attributes[key] = attrs[i].value;
to.nobreaking = true;
}
if (directSpeechKeys.includes(key)) {
to.attributes['ext-speech'] = attrs[i].value;
to.nobreaking = true;
}
if (key.match(/texclass$/)) {
to.attributes['texclass'] = attrs[i].value;
}
if (key.toLowerCase() === 'data-latex') {
to.attributes['latex'] = attrs[i].value;
}
if (key === 'href') {
to.attributes['href'] = attrs[i].value;
to.nobreaking = true;
}
}
}
}
function getEmbellishedInner(node) {
if (node && node.embellished && node.childNodes.length > 0) {
return getEmbellishedInner(node.childNodes[0]);
}
return node;
}
function sliceNodes(nodes, pred, opt_reverse) {
if (opt_reverse) {
nodes.reverse();
}
const head = [];
for (let i = 0, node; (node = nodes[i]); i++) {
if (pred(node)) {
if (opt_reverse) {
return {
head: nodes.slice(i + 1).reverse(),
div: node,
tail: head.reverse()
};
}
return { head: head, div: node, tail: nodes.slice(i + 1) };
}
head.push(node);
}
if (opt_reverse) {
return { head: [], div: null, tail: head.reverse() };
}
return { head: head, div: null, tail: [] };
}
function partitionNodes(nodes, pred) {
let restNodes = nodes;
const rel = [];
const comp = [];
let result = null;
do {
result = sliceNodes(restNodes, pred);
comp.push(result.head);
rel.push(result.div);
restNodes = result.tail;
} while (result.div);
rel.pop();
return { rel: rel, comp: comp };
}
//# sourceMappingURL=semantic_util.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_node.js
var Attribute;
(function (Attribute) {
Attribute["EMBELLISHED"] = "embellished";
Attribute["FENCEPOINTER"] = "fencepointer";
Attribute["FONT"] = "font";
Attribute["ID"] = "id";
Attribute["ANNOTATION"] = "annotation";
Attribute["ROLE"] = "role";
Attribute["TYPE"] = "type";
Attribute["CHILDREN"] = "children";
Attribute["CONTENT"] = "content";
Attribute["TEXT"] = "$t";
})(Attribute || (Attribute = {}));
class SemanticNode {
static fromXml(xml) {
const id = parseInt(xml.getAttribute('id'), 10);
const node = new SemanticNode(id);
node.type = xml.tagName;
SemanticNode.setAttribute(node, xml, 'role');
SemanticNode.setAttribute(node, xml, 'font');
SemanticNode.setAttribute(node, xml, 'embellished');
SemanticNode.setAttribute(node, xml, 'fencepointer', 'fencePointer');
if (xml.getAttribute('annotation')) {
node.parseAnnotation(xml.getAttribute('annotation'));
}
addAttributes(node, xml);
SemanticNode.processChildren(node, xml);
return node;
}
static setAttribute(node, xml, attribute, opt_name) {
opt_name = opt_name || attribute;
const value = xml.getAttribute(attribute);
if (value) {
node[opt_name] = value;
}
}
static processChildren(node, xml) {
for (const child of toArray(xml.childNodes)) {
if (child.nodeType === NodeType.TEXT_NODE) {
node.textContent = child.textContent;
continue;
}
const children = toArray(child.childNodes).map(SemanticNode.fromXml);
children.forEach((x) => (x.parent = node));
if (dom_util_tagName(child) === 'CONTENT') {
node.contentNodes = children;
}
else {
node.childNodes = children;
}
}
}
constructor(id) {
this.id = id;
this.mathml = [];
this.parent = null;
this.type = semantic_meaning_SemanticType.UNKNOWN;
this.role = semantic_meaning_SemanticRole.UNKNOWN;
this.font = SemanticFont.UNKNOWN;
this.embellished = null;
this.fencePointer = '';
this.childNodes = [];
this.textContent = '';
this.mathmlTree = null;
this.contentNodes = [];
this.annotation = {};
this.attributes = {};
this.nobreaking = false;
}
querySelectorAll(pred) {
let result = [];
for (let i = 0, child; (child = this.childNodes[i]); i++) {
result = result.concat(child.querySelectorAll(pred));
}
for (let i = 0, content; (content = this.contentNodes[i]); i++) {
result = result.concat(content.querySelectorAll(pred));
}
if (pred(this)) {
result.unshift(this);
}
return result;
}
xml(xml, brief) {
const xmlNodeList = function (tag, nodes) {
const xmlNodes = nodes.map(function (x) {
return x.xml(xml, brief);
});
const tagNode = xml.createElementNS('', tag);
for (let i = 0, child; (child = xmlNodes[i]); i++) {
tagNode.appendChild(child);
}
return tagNode;
};
const node = xml.createElementNS('', this.type);
if (!brief) {
this.xmlAttributes(node);
}
node.textContent = this.textContent;
if (this.contentNodes.length > 0) {
node.appendChild(xmlNodeList(Attribute.CONTENT, this.contentNodes));
}
if (this.childNodes.length > 0) {
node.appendChild(xmlNodeList(Attribute.CHILDREN, this.childNodes));
}
return node;
}
toString(brief = false) {
const xml = parseInput(' ');
return serializeXml(this.xml(xml.ownerDocument, brief));
}
allAttributes() {
const attributes = [];
attributes.push([Attribute.ROLE, this.role]);
if (this.font !== SemanticFont.UNKNOWN) {
attributes.push([Attribute.FONT, this.font]);
}
if (Object.keys(this.annotation).length) {
attributes.push([Attribute.ANNOTATION, this.annotationXml()]);
}
if (this.embellished) {
attributes.push([Attribute.EMBELLISHED, this.embellished]);
}
if (this.fencePointer) {
attributes.push([Attribute.FENCEPOINTER, this.fencePointer]);
}
attributes.push([Attribute.ID, this.id.toString()]);
return attributes;
}
annotationXml() {
const result = [];
for (const [key, val] of Object.entries(this.annotation)) {
val.forEach((mean) => result.push(key + ':' + mean));
}
return result.join(';');
}
attributesXml() {
const result = [];
for (const [key, value] of Object.entries(this.attributes)) {
result.push(key + ':' + SemanticNode.escapeValue(value));
}
return result.join(';');
}
toJson() {
const json = {};
json[Attribute.TYPE] = this.type;
const attributes = this.allAttributes();
for (let i = 0, attr; (attr = attributes[i]); i++) {
json[attr[0]] = attr[1].toString();
}
if (this.textContent) {
json[Attribute.TEXT] = this.textContent;
}
if (this.childNodes.length) {
json[Attribute.CHILDREN] = this.childNodes.map(function (child) {
return child.toJson();
});
}
if (this.contentNodes.length) {
json[Attribute.CONTENT] = this.contentNodes.map(function (child) {
return child.toJson();
});
}
return json;
}
updateContent(content, text) {
const newContent = text
? content
.replace(/^[ \f\n\r\t\v\u200b]*/, '')
.replace(/[ \f\n\r\t\v\u200b]*$/, '')
: content.trim();
content = content && !newContent ? content : newContent;
if (this.textContent === content) {
return;
}
const meaning = SemanticMap.Meaning.get(content.replace(/\s/g, ' '));
this.textContent = content;
this.role = meaning.role;
this.type = meaning.type;
this.font = meaning.font;
}
addMathmlNodes(mmlNodes) {
for (let i = 0, mml; (mml = mmlNodes[i]); i++) {
if (this.mathml.indexOf(mml) === -1) {
this.mathml.push(mml);
}
}
}
appendChild(child) {
this.childNodes.push(child);
this.addMathmlNodes(child.mathml);
child.parent = this;
}
replaceChild(oldNode, newNode) {
const index = this.childNodes.indexOf(oldNode);
if (index === -1) {
return;
}
oldNode.parent = null;
newNode.parent = this;
this.childNodes[index] = newNode;
const removeMathml = oldNode.mathml.filter(function (x) {
return newNode.mathml.indexOf(x) === -1;
});
const addMathml = newNode.mathml.filter(function (x) {
return oldNode.mathml.indexOf(x) === -1;
});
this.removeMathmlNodes(removeMathml);
this.addMathmlNodes(addMathml);
}
appendContentNode(node) {
if (node) {
this.contentNodes.push(node);
this.addMathmlNodes(node.mathml);
node.parent = this;
}
}
removeContentNode(node) {
if (node) {
const index = this.contentNodes.indexOf(node);
if (index !== -1) {
this.contentNodes.slice(index, 1);
}
}
}
equals(node) {
if (!node) {
return false;
}
if (this.type !== node.type ||
this.role !== node.role ||
this.textContent !== node.textContent ||
this.childNodes.length !== node.childNodes.length ||
this.contentNodes.length !== node.contentNodes.length) {
return false;
}
for (let i = 0, node1, node2; (node1 = this.childNodes[i]), (node2 = node.childNodes[i]); i++) {
if (!node1.equals(node2)) {
return false;
}
}
for (let i = 0, node1, node2; (node1 = this.contentNodes[i]), (node2 = node.contentNodes[i]); i++) {
if (!node1.equals(node2)) {
return false;
}
}
return true;
}
displayTree() {
console.info(this.displayTree_(0));
}
addAnnotation(domain, annotation) {
if (annotation) {
this.addAnnotation_(domain, annotation);
}
}
getAnnotation(domain) {
const content = this.annotation[domain];
return content ? content : [];
}
hasAnnotation(domain, annotation) {
const content = this.annotation[domain];
if (!content) {
return false;
}
return content.indexOf(annotation) !== -1;
}
parseAnnotation(stateStr) {
const annotations = stateStr.split(';');
for (let i = 0, l = annotations.length; i < l; i++) {
const annotation = annotations[i].split(':');
this.addAnnotation(annotation[0], annotation[1]);
}
}
meaning() {
return { type: this.type, role: this.role, font: this.font };
}
xmlAttributes(node) {
const attributes = this.allAttributes();
for (let i = 0, attr; (attr = attributes[i]); i++) {
node.setAttribute(attr[0], attr[1]);
}
this.addExternalAttributes(node);
}
addExternalAttributes(node) {
for (const [attr, val] of Object.entries(this.attributes)) {
node.setAttribute(attr, val);
}
}
static escapeValue(value) {
return value.replace(/;/g, '\\0003B');
}
parseAttributes(stateStr) {
if (!stateStr)
return;
const attributes = stateStr.split(';');
for (let i = 0, l = attributes.length; i < l; i++) {
const [key, ...values] = attributes[i].split(':');
if (key) {
this.attributes[key] = values.join('').replace(/\\0003B/g, ';');
}
}
}
removeMathmlNodes(mmlNodes) {
const mmlList = this.mathml;
for (let i = 0, mml; (mml = mmlNodes[i]); i++) {
const index = mmlList.indexOf(mml);
if (index !== -1) {
mmlList.splice(index, 1);
}
}
this.mathml = mmlList;
}
displayTree_(depth) {
depth++;
const depthString = Array(depth).join(' ');
let result = '';
result += '\n' + depthString + this.toString();
result += '\n' + depthString + 'MathmlTree:';
result += '\n' + depthString + this.mathmlTreeString();
result += '\n' + depthString + 'MathML:';
for (let i = 0, mml; (mml = this.mathml[i]); i++) {
result += '\n' + depthString + mml.toString();
}
result += '\n' + depthString + 'Begin Content';
this.contentNodes.forEach(function (x) {
result += x.displayTree_(depth);
});
result += '\n' + depthString + 'End Content';
result += '\n' + depthString + 'Begin Children';
this.childNodes.forEach(function (x) {
result += x.displayTree_(depth);
});
result += '\n' + depthString + 'End Children';
return result;
}
mathmlTreeString() {
return this.mathmlTree ? this.mathmlTree.toString() : 'EMPTY';
}
addAnnotation_(domain, annotation) {
const content = this.annotation[domain];
if (content && !content.includes(annotation)) {
content.push(annotation);
}
else {
this.annotation[domain] = [annotation];
}
}
}
//# sourceMappingURL=semantic_node.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_node_factory.js
class SemanticNodeFactory {
constructor() {
this.leafMap = new SemanticNodeCollator();
this.defaultMap = new SemanticDefault();
this.idCounter_ = -1;
}
makeNode(id) {
return this.createNode_(id);
}
makeUnprocessed(mml) {
const node = this.createNode_();
node.mathml = [mml];
node.mathmlTree = mml;
return node;
}
makeEmptyNode() {
const node = this.createNode_();
node.type = semantic_meaning_SemanticType.EMPTY;
return node;
}
makeContentNode(content) {
const node = this.createNode_();
node.updateContent(content);
return node;
}
makeMultipleContentNodes(num, content) {
const nodes = [];
for (let i = 0; i < num; i++) {
nodes.push(this.makeContentNode(content));
}
return nodes;
}
makeLeafNode(content, font) {
if (!content) {
return this.makeEmptyNode();
}
const node = this.makeContentNode(content);
node.font = font || node.font;
const meaning = this.defaultMap.getNode(node);
if (meaning) {
node.type = meaning.type;
node.role = meaning.role;
node.font = meaning.font;
}
this.leafMap.addNode(node);
return node;
}
makeBranchNode(type, children, contentNodes, opt_content) {
const node = this.createNode_();
if (opt_content) {
node.updateContent(opt_content);
}
node.type = type;
node.childNodes = children;
node.contentNodes = contentNodes;
children.concat(contentNodes).forEach(function (x) {
x.parent = node;
node.addMathmlNodes(x.mathml);
});
return node;
}
createNode_(id) {
if (typeof id !== 'undefined') {
this.idCounter_ = Math.max(this.idCounter_, id);
}
else {
id = ++this.idCounter_;
}
return new SemanticNode(id);
}
}
//# sourceMappingURL=semantic_node_factory.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_parser.js
class SemanticAbstractParser {
constructor(type) {
this.type = type;
this.factory_ = new SemanticNodeFactory();
}
getFactory() {
return this.factory_;
}
setFactory(factory) {
this.factory_ = factory;
}
getType() {
return this.type;
}
parseList(list) {
const result = [];
for (let i = 0, element; (element = list[i]); i++) {
result.push(this.parse(element));
}
return result;
}
}
//# sourceMappingURL=semantic_parser.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_pred.js
function isType(node, attr) {
return node.type === attr;
}
function embellishedType(node, attr) {
return node.embellished === attr;
}
function isRole(node, attr) {
return node.role === attr;
}
function isAccent(node) {
return (isType(node, semantic_meaning_SemanticType.FENCE) ||
isType(node, semantic_meaning_SemanticType.PUNCTUATION) ||
isType(node, semantic_meaning_SemanticType.OPERATOR) ||
isType(node, semantic_meaning_SemanticType.RELATION));
}
function isSimpleFunctionScope(node) {
const children = node.childNodes;
if (children.length === 0) {
return true;
}
if (children.length > 1) {
return false;
}
const child = children[0];
if (child.type === semantic_meaning_SemanticType.INFIXOP) {
if (child.role !== semantic_meaning_SemanticRole.IMPLICIT) {
return false;
}
if (child.childNodes.some((x) => isType(x, semantic_meaning_SemanticType.INFIXOP))) {
return false;
}
}
return true;
}
function isPrefixFunctionBoundary(node) {
return ((isOperator(node) && !isRole(node, semantic_meaning_SemanticRole.DIVISION)) ||
isType(node, semantic_meaning_SemanticType.APPL) ||
isGeneralFunctionBoundary(node));
}
function isBigOpBoundary(node) {
return isOperator(node) || isGeneralFunctionBoundary(node);
}
function isIntegralDxBoundary(firstNode, secondNode) {
return (!!secondNode &&
isType(secondNode, semantic_meaning_SemanticType.IDENTIFIER) &&
SemanticMap.Secondary.has(firstNode.textContent, SemanticSecondary.D));
}
function isIntegralDxBoundarySingle(node) {
if (isType(node, semantic_meaning_SemanticType.IDENTIFIER)) {
const firstChar = node.textContent[0];
return (firstChar &&
node.textContent[1] &&
SemanticMap.Secondary.has(firstChar, SemanticSecondary.D));
}
return false;
}
function isGeneralFunctionBoundary(node) {
return isRelation(node) || isPunctuation(node);
}
function isEmbellished(node) {
if (node.embellished) {
return node.embellished;
}
if (isEmbellishedType(node.type)) {
return node.type;
}
return null;
}
function isEmbellishedType(type) {
return (type === semantic_meaning_SemanticType.OPERATOR ||
type === semantic_meaning_SemanticType.RELATION ||
type === semantic_meaning_SemanticType.FENCE ||
type === semantic_meaning_SemanticType.PUNCTUATION);
}
function isOperator(node) {
return (isType(node, semantic_meaning_SemanticType.OPERATOR) ||
embellishedType(node, semantic_meaning_SemanticType.OPERATOR));
}
function isRelation(node) {
return (isType(node, semantic_meaning_SemanticType.RELATION) ||
embellishedType(node, semantic_meaning_SemanticType.RELATION));
}
function isPunctuation(node) {
return (isType(node, semantic_meaning_SemanticType.PUNCTUATION) ||
embellishedType(node, semantic_meaning_SemanticType.PUNCTUATION));
}
function isFence(node) {
return (isType(node, semantic_meaning_SemanticType.FENCE) ||
embellishedType(node, semantic_meaning_SemanticType.FENCE));
}
function isElligibleEmbellishedFence(node) {
if (!node || !isFence(node)) {
return false;
}
if (!node.embellished) {
return true;
}
return recurseBaseNode(node);
}
function bothSide(node) {
return (isType(node, semantic_meaning_SemanticType.TENSOR) &&
(!isType(node.childNodes[1], semantic_meaning_SemanticType.EMPTY) ||
!isType(node.childNodes[2], semantic_meaning_SemanticType.EMPTY)) &&
(!isType(node.childNodes[3], semantic_meaning_SemanticType.EMPTY) ||
!isType(node.childNodes[4], semantic_meaning_SemanticType.EMPTY)));
}
function recurseBaseNode(node) {
if (!node.embellished) {
return true;
}
if (bothSide(node)) {
return false;
}
if (isRole(node, semantic_meaning_SemanticRole.CLOSE) && isType(node, semantic_meaning_SemanticType.TENSOR)) {
return false;
}
if (isRole(node, semantic_meaning_SemanticRole.OPEN) &&
(isType(node, semantic_meaning_SemanticType.SUBSCRIPT) ||
isType(node, semantic_meaning_SemanticType.SUPERSCRIPT))) {
return false;
}
return recurseBaseNode(node.childNodes[0]);
}
function isTableOrMultiline(node) {
return (!!node &&
(isType(node, semantic_meaning_SemanticType.TABLE) || isType(node, semantic_meaning_SemanticType.MULTILINE)));
}
function tableIsMatrixOrVector(node) {
return (!!node && isFencedElement(node) && isTableOrMultiline(node.childNodes[0]));
}
function isFencedElement(node) {
return (!!node &&
isType(node, semantic_meaning_SemanticType.FENCED) &&
(isRole(node, semantic_meaning_SemanticRole.LEFTRIGHT) || isNeutralFence(node)) &&
node.childNodes.length === 1);
}
function tableIsCases(_table, prevNodes) {
return (prevNodes.length > 0 &&
isRole(prevNodes[prevNodes.length - 1], semantic_meaning_SemanticRole.OPENFENCE));
}
function tableIsMultiline(table) {
return table.childNodes.every(function (row) {
const length = row.childNodes.length;
return length <= 1;
});
}
function lineIsLabelled(line) {
return (isType(line, semantic_meaning_SemanticType.LINE) &&
line.contentNodes.length &&
isRole(line.contentNodes[0], semantic_meaning_SemanticRole.LABEL));
}
function isBinomial(table) {
return table.childNodes.length === 2;
}
function isLimitBase(node) {
return (isType(node, semantic_meaning_SemanticType.LARGEOP) ||
isType(node, semantic_meaning_SemanticType.LIMBOTH) ||
isType(node, semantic_meaning_SemanticType.LIMLOWER) ||
isType(node, semantic_meaning_SemanticType.LIMUPPER) ||
(isType(node, semantic_meaning_SemanticType.FUNCTION) &&
isRole(node, semantic_meaning_SemanticRole.LIMFUNC)) ||
((isType(node, semantic_meaning_SemanticType.OVERSCORE) ||
isType(node, semantic_meaning_SemanticType.UNDERSCORE)) &&
isLimitBase(node.childNodes[0])));
}
function isSimpleFunctionHead(node) {
return (node.type === semantic_meaning_SemanticType.IDENTIFIER ||
node.role === semantic_meaning_SemanticRole.LATINLETTER ||
node.role === semantic_meaning_SemanticRole.GREEKLETTER ||
node.role === semantic_meaning_SemanticRole.OTHERLETTER);
}
function singlePunctAtPosition(nodes, puncts, position) {
return (puncts.length === 1 &&
(nodes[position].type === semantic_meaning_SemanticType.PUNCTUATION ||
nodes[position].embellished === semantic_meaning_SemanticType.PUNCTUATION) &&
nodes[position] === puncts[0]);
}
function isSimpleFunction(node) {
return (isType(node, semantic_meaning_SemanticType.IDENTIFIER) &&
isRole(node, semantic_meaning_SemanticRole.SIMPLEFUNC));
}
function isLeftBrace(node) {
const leftBrace = ['{', '﹛', '{'];
return !!node && leftBrace.indexOf(node.textContent) !== -1;
}
function isRightBrace(node) {
const rightBrace = ['}', '﹜', '}'];
return !!node && rightBrace.indexOf(node.textContent) !== -1;
}
function isSetNode(node) {
return (isLeftBrace(node.contentNodes[0]) && isRightBrace(node.contentNodes[1]));
}
const illegalSingleton = [
semantic_meaning_SemanticType.PUNCTUATION,
semantic_meaning_SemanticType.PUNCTUATED,
semantic_meaning_SemanticType.RELSEQ,
semantic_meaning_SemanticType.MULTIREL,
semantic_meaning_SemanticType.TABLE,
semantic_meaning_SemanticType.MULTILINE,
semantic_meaning_SemanticType.CASES,
semantic_meaning_SemanticType.INFERENCE
];
const scriptedElement = [
semantic_meaning_SemanticType.LIMUPPER,
semantic_meaning_SemanticType.LIMLOWER,
semantic_meaning_SemanticType.LIMBOTH,
semantic_meaning_SemanticType.SUBSCRIPT,
semantic_meaning_SemanticType.SUPERSCRIPT,
semantic_meaning_SemanticType.UNDERSCORE,
semantic_meaning_SemanticType.OVERSCORE,
semantic_meaning_SemanticType.TENSOR
];
function isSingletonSetContent(node) {
const type = node.type;
if (illegalSingleton.indexOf(type) !== -1 ||
(type === semantic_meaning_SemanticType.INFIXOP && node.role !== semantic_meaning_SemanticRole.IMPLICIT)) {
return false;
}
if (type === semantic_meaning_SemanticType.FENCED) {
return node.role === semantic_meaning_SemanticRole.LEFTRIGHT
? isSingletonSetContent(node.childNodes[0])
: true;
}
if (scriptedElement.indexOf(type) !== -1) {
return isSingletonSetContent(node.childNodes[0]);
}
return true;
}
function isNumber(node) {
return (node.type === semantic_meaning_SemanticType.NUMBER &&
(node.role === semantic_meaning_SemanticRole.INTEGER || node.role === semantic_meaning_SemanticRole.FLOAT));
}
function isUnitCounter(node) {
return (isNumber(node) ||
node.role === semantic_meaning_SemanticRole.VULGAR ||
node.role === semantic_meaning_SemanticRole.MIXED);
}
function isPureUnit(node) {
const children = node.childNodes;
return (node.role === semantic_meaning_SemanticRole.UNIT &&
(!children.length || children[0].role === semantic_meaning_SemanticRole.UNIT));
}
function isUnitProduct(node) {
const children = node.childNodes;
return (node.type === semantic_meaning_SemanticType.INFIXOP &&
(node.role === semantic_meaning_SemanticRole.MULTIPLICATION ||
node.role === semantic_meaning_SemanticRole.IMPLICIT) &&
children.length &&
(isPureUnit(children[0]) || isUnitCounter(children[0])) &&
node.childNodes.slice(1).every(isPureUnit));
}
function isImplicit(node) {
return (node.type === semantic_meaning_SemanticType.INFIXOP &&
(node.role === semantic_meaning_SemanticRole.IMPLICIT ||
(node.role === semantic_meaning_SemanticRole.UNIT &&
!!node.contentNodes.length &&
node.contentNodes[0].textContent === NamedSymbol.invisibleTimes)));
}
function isImplicitOp(node) {
return (node.type === semantic_meaning_SemanticType.INFIXOP && node.role === semantic_meaning_SemanticRole.IMPLICIT);
}
function isNeutralFence(fence) {
return (fence.role === semantic_meaning_SemanticRole.NEUTRAL || fence.role === semantic_meaning_SemanticRole.METRIC);
}
function compareNeutralFences(fence1, fence2) {
return (isNeutralFence(fence1) &&
isNeutralFence(fence2) &&
getEmbellishedInner(fence1).textContent ===
getEmbellishedInner(fence2).textContent);
}
function elligibleLeftNeutral(fence) {
if (!isNeutralFence(fence)) {
return false;
}
if (!fence.embellished) {
return true;
}
if (fence.type === semantic_meaning_SemanticType.SUPERSCRIPT ||
fence.type === semantic_meaning_SemanticType.SUBSCRIPT) {
return false;
}
if (fence.type === semantic_meaning_SemanticType.TENSOR &&
(fence.childNodes[3].type !== semantic_meaning_SemanticType.EMPTY ||
fence.childNodes[4].type !== semantic_meaning_SemanticType.EMPTY)) {
return false;
}
return true;
}
function elligibleRightNeutral(fence) {
if (!isNeutralFence(fence)) {
return false;
}
if (!fence.embellished) {
return true;
}
if (fence.type === semantic_meaning_SemanticType.TENSOR &&
(fence.childNodes[1].type !== semantic_meaning_SemanticType.EMPTY ||
fence.childNodes[2].type !== semantic_meaning_SemanticType.EMPTY)) {
return false;
}
return true;
}
function isMembership(element) {
return [
semantic_meaning_SemanticRole.ELEMENT,
semantic_meaning_SemanticRole.NONELEMENT,
semantic_meaning_SemanticRole.REELEMENT,
semantic_meaning_SemanticRole.RENONELEMENT
].includes(element.role);
}
//# sourceMappingURL=semantic_pred.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_heuristic_factory.js
const SemanticHeuristics = {
factory: null,
options: new Options(),
updateFactory: function (nodeFactory) {
SemanticHeuristics.factory = nodeFactory;
},
heuristics: new Map(),
flags: {
combine_juxtaposition: true,
convert_juxtaposition: true,
multioperator: true
},
blacklist: {},
add: function (heuristic) {
const name = heuristic.name;
SemanticHeuristics.heuristics.set(name, heuristic);
if (!SemanticHeuristics.flags[name]) {
SemanticHeuristics.flags[name] = false;
}
},
run: function (name, root, opt_alternative) {
const heuristic = SemanticHeuristics.heuristics.get(name);
return heuristic &&
!SemanticHeuristics.blacklist[name] &&
(SemanticHeuristics.flags[name] || heuristic.applicable(root))
? heuristic.apply(root)
: opt_alternative
? opt_alternative(root)
: root;
}
};
//# sourceMappingURL=semantic_heuristic_factory.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_processor.js
class SemanticProcessor {
static getInstance() {
SemanticProcessor.instance =
SemanticProcessor.instance || new SemanticProcessor();
return SemanticProcessor.instance;
}
static tableToMultiline(table) {
if (!tableIsMultiline(table)) {
return SemanticHeuristics.run('rewrite_subcases', table, SemanticProcessor.classifyTable);
}
table.type = semantic_meaning_SemanticType.MULTILINE;
for (let i = 0, row; (row = table.childNodes[i]); i++) {
SemanticProcessor.rowToLine_(row, semantic_meaning_SemanticRole.MULTILINE);
}
if (table.childNodes.length === 1 &&
!lineIsLabelled(table.childNodes[0]) &&
isFencedElement(table.childNodes[0].childNodes[0])) {
SemanticProcessor.tableToMatrixOrVector_(SemanticProcessor.rewriteFencedLine_(table));
}
SemanticProcessor.binomialForm_(table);
SemanticProcessor.classifyMultiline(table);
return table;
}
static number(node) {
if (node.type === semantic_meaning_SemanticType.UNKNOWN ||
node.type === semantic_meaning_SemanticType.IDENTIFIER) {
node.type = semantic_meaning_SemanticType.NUMBER;
}
SemanticProcessor.meaningFromContent(node, SemanticProcessor.numberRole_);
SemanticProcessor.exprFont_(node);
}
static classifyMultiline(multiline) {
let index = 0;
const length = multiline.childNodes.length;
let line;
while (index < length &&
(!(line = multiline.childNodes[index]) || !line.childNodes.length)) {
index++;
}
if (index >= length) {
return;
}
const firstRole = line.childNodes[0].role;
if (firstRole !== semantic_meaning_SemanticRole.UNKNOWN &&
multiline.childNodes.every(function (x) {
const cell = x.childNodes[0];
return (!cell ||
(cell.role === firstRole &&
(isType(cell, semantic_meaning_SemanticType.RELATION) ||
isType(cell, semantic_meaning_SemanticType.RELSEQ))));
})) {
multiline.role = firstRole;
}
}
static classifyTable(table) {
const columns = SemanticProcessor.computeColumns_(table);
SemanticProcessor.classifyByColumns_(table, columns, semantic_meaning_SemanticRole.EQUALITY) ||
SemanticProcessor.classifyByColumns_(table, columns, semantic_meaning_SemanticRole.INEQUALITY, [semantic_meaning_SemanticRole.EQUALITY]) ||
SemanticProcessor.classifyByColumns_(table, columns, semantic_meaning_SemanticRole.ARROW) ||
SemanticProcessor.detectCaleyTable(table);
return table;
}
static detectCaleyTable(table) {
if (!table.mathmlTree) {
return false;
}
const tree = table.mathmlTree;
const cl = tree.getAttribute('columnlines');
const rl = tree.getAttribute('rowlines');
if (!cl || !rl) {
return false;
}
if (SemanticProcessor.cayleySpacing(cl) &&
SemanticProcessor.cayleySpacing(rl)) {
table.role = semantic_meaning_SemanticRole.CAYLEY;
return true;
}
return false;
}
static cayleySpacing(lines) {
const list = lines.split(' ');
return ((list[0] === 'solid' || list[0] === 'dashed') &&
list.slice(1).every((x) => x === 'none'));
}
static proof(node, semantics, parse) {
const attrs = SemanticProcessor.separateSemantics(semantics);
return SemanticProcessor.getInstance().proof(node, attrs, parse);
}
static findSemantics(node, attr, opt_value) {
const value = opt_value == null ? null : opt_value;
const semantics = SemanticProcessor.getSemantics(node);
if (!semantics) {
return false;
}
if (!semantics[attr]) {
return false;
}
return value == null ? true : semantics[attr] === value;
}
static getSemantics(node) {
const semantics = node.getAttribute('semantics');
if (!semantics) {
return null;
}
return SemanticProcessor.separateSemantics(semantics);
}
static removePrefix(name) {
const [, ...rest] = name.split('_');
return rest.join('_');
}
static separateSemantics(attr) {
const result = {};
attr.split(';').forEach(function (x) {
const [name, value] = x.split(':');
result[SemanticProcessor.removePrefix(name)] = value;
});
return result;
}
static matchSpaces_(nodes, ops) {
for (let i = 0, op; (op = ops[i]); i++) {
const node = nodes[i];
const mt1 = node.mathmlTree;
const mt2 = nodes[i + 1].mathmlTree;
if (!mt1 || !mt2) {
continue;
}
const sibling = mt1.nextSibling;
if (!sibling || sibling === mt2) {
continue;
}
const spacer = SemanticProcessor.getSpacer_(sibling);
if (spacer) {
op.mathml.push(spacer);
op.mathmlTree = spacer;
op.role = semantic_meaning_SemanticRole.SPACE;
}
}
}
static getSpacer_(node) {
if (dom_util_tagName(node) === MMLTAGS.MSPACE) {
return node;
}
while (hasEmptyTag(node) && node.childNodes.length === 1) {
node = node.childNodes[0];
if (dom_util_tagName(node) === MMLTAGS.MSPACE) {
return node;
}
}
return null;
}
static fenceToPunct_(fence) {
const newRole = SemanticProcessor.FENCE_TO_PUNCT_[fence.role];
if (!newRole) {
return;
}
while (fence.embellished) {
fence.embellished = semantic_meaning_SemanticType.PUNCTUATION;
if (!(isRole(fence, semantic_meaning_SemanticRole.SUBSUP) ||
isRole(fence, semantic_meaning_SemanticRole.UNDEROVER))) {
fence.role = newRole;
}
fence = fence.childNodes[0];
}
fence.type = semantic_meaning_SemanticType.PUNCTUATION;
fence.role = newRole;
}
static classifyFunction_(funcNode, restNodes) {
if (funcNode.type === semantic_meaning_SemanticType.APPL ||
funcNode.type === semantic_meaning_SemanticType.BIGOP ||
funcNode.type === semantic_meaning_SemanticType.INTEGRAL) {
return '';
}
if (restNodes[0] &&
restNodes[0].textContent === NamedSymbol.functionApplication) {
SemanticProcessor.getInstance().funcAppls[funcNode.id] =
restNodes.shift();
let role = semantic_meaning_SemanticRole.SIMPLEFUNC;
SemanticHeuristics.run('simple2prefix', funcNode);
if (funcNode.role === semantic_meaning_SemanticRole.PREFIXFUNC ||
funcNode.role === semantic_meaning_SemanticRole.LIMFUNC) {
role = funcNode.role;
}
SemanticProcessor.propagateFunctionRole_(funcNode, role);
return 'prefix';
}
const kind = SemanticProcessor.CLASSIFY_FUNCTION_[funcNode.role];
return kind
? kind
: isSimpleFunctionHead(funcNode)
? 'simple'
: '';
}
static propagateFunctionRole_(funcNode, tag) {
if (funcNode) {
if (funcNode.type === semantic_meaning_SemanticType.INFIXOP) {
return;
}
if (!(isRole(funcNode, semantic_meaning_SemanticRole.SUBSUP) ||
isRole(funcNode, semantic_meaning_SemanticRole.UNDEROVER))) {
funcNode.role = tag;
}
SemanticProcessor.propagateFunctionRole_(funcNode.childNodes[0], tag);
}
}
static getFunctionOp_(tree, pred) {
if (pred(tree)) {
return tree;
}
for (let i = 0, child; (child = tree.childNodes[i]); i++) {
const op = SemanticProcessor.getFunctionOp_(child, pred);
if (op) {
return op;
}
}
return null;
}
static tableToMatrixOrVector_(node) {
const matrix = node.childNodes[0];
isType(matrix, semantic_meaning_SemanticType.MULTILINE)
? SemanticProcessor.tableToVector_(node)
: SemanticProcessor.tableToMatrix_(node);
node.contentNodes.forEach(matrix.appendContentNode.bind(matrix));
for (let i = 0, row; (row = matrix.childNodes[i]); i++) {
SemanticProcessor.assignRoleToRow_(row, SemanticProcessor.getComponentRoles_(matrix));
}
matrix.parent = null;
return matrix;
}
static tableToVector_(node) {
const vector = node.childNodes[0];
vector.type = semantic_meaning_SemanticType.VECTOR;
if (vector.childNodes.length === 1) {
SemanticProcessor.tableToSquare_(node);
return;
}
SemanticProcessor.binomialForm_(vector);
}
static binomialForm_(node) {
if (!isRole(node, semantic_meaning_SemanticRole.UNKNOWN)) {
return;
}
if (isBinomial(node)) {
node.role = semantic_meaning_SemanticRole.BINOMIAL;
node.childNodes[0].role = semantic_meaning_SemanticRole.BINOMIAL;
node.childNodes[1].role = semantic_meaning_SemanticRole.BINOMIAL;
}
}
static tableToMatrix_(node) {
const matrix = node.childNodes[0];
matrix.type = semantic_meaning_SemanticType.MATRIX;
if (matrix.childNodes &&
matrix.childNodes.length > 0 &&
matrix.childNodes[0].childNodes &&
matrix.childNodes.length === matrix.childNodes[0].childNodes.length) {
SemanticProcessor.tableToSquare_(node);
return;
}
if (matrix.childNodes && matrix.childNodes.length === 1) {
matrix.role = semantic_meaning_SemanticRole.ROWVECTOR;
}
}
static tableToSquare_(node) {
const matrix = node.childNodes[0];
if (!isRole(matrix, semantic_meaning_SemanticRole.UNKNOWN)) {
return;
}
if (isNeutralFence(node)) {
matrix.role = semantic_meaning_SemanticRole.DETERMINANT;
return;
}
matrix.role = semantic_meaning_SemanticRole.SQUAREMATRIX;
}
static getComponentRoles_(node) {
const role = node.role;
if (role && role !== semantic_meaning_SemanticRole.UNKNOWN) {
return role;
}
return node.type.toLowerCase() || semantic_meaning_SemanticRole.UNKNOWN;
}
static tableToCases_(table, openFence) {
for (let i = 0, row; (row = table.childNodes[i]); i++) {
SemanticProcessor.assignRoleToRow_(row, semantic_meaning_SemanticRole.CASES);
}
table.type = semantic_meaning_SemanticType.CASES;
table.appendContentNode(openFence);
if (tableIsMultiline(table)) {
SemanticProcessor.binomialForm_(table);
}
return table;
}
static rewriteFencedLine_(table) {
const line = table.childNodes[0];
const fenced = table.childNodes[0].childNodes[0];
const element = table.childNodes[0].childNodes[0].childNodes[0];
fenced.parent = table.parent;
table.parent = fenced;
element.parent = line;
fenced.childNodes = [table];
line.childNodes = [element];
return fenced;
}
static rowToLine_(row, opt_role) {
const role = opt_role || semantic_meaning_SemanticRole.UNKNOWN;
if (isType(row, semantic_meaning_SemanticType.ROW)) {
row.type = semantic_meaning_SemanticType.LINE;
row.role = role;
if (row.childNodes.length === 1 &&
isType(row.childNodes[0], semantic_meaning_SemanticType.CELL)) {
row.childNodes = row.childNodes[0].childNodes;
row.childNodes.forEach(function (x) {
x.parent = row;
});
}
}
}
static assignRoleToRow_(row, role) {
if (isType(row, semantic_meaning_SemanticType.LINE)) {
row.role = role;
return;
}
if (isType(row, semantic_meaning_SemanticType.ROW)) {
row.role = role;
row.childNodes.forEach(function (cell) {
if (isType(cell, semantic_meaning_SemanticType.CELL)) {
cell.role = role;
}
});
}
}
static nextSeparatorFunction_(separators) {
let sepList;
if (separators) {
if (separators.match(/^\s+$/)) {
return null;
}
else {
sepList = separators
.replace(/\s/g, '')
.split('')
.filter(function (x) {
return x;
});
}
}
else {
sepList = [','];
}
return function () {
if (sepList.length > 1) {
return sepList.shift();
}
return sepList[0];
};
}
static meaningFromContent(node, func) {
const content = [...node.textContent].filter((x) => x.match(/[^\s]/));
const meaning = content.map((x) => SemanticMap.Meaning.get(x));
func(node, content, meaning);
}
static numberRole_(node, content, meaning) {
if (node.role !== semantic_meaning_SemanticRole.UNKNOWN) {
return;
}
if (meaning.every(function (x) {
return ((x.type === semantic_meaning_SemanticType.NUMBER && x.role === semantic_meaning_SemanticRole.INTEGER) ||
(x.type === semantic_meaning_SemanticType.PUNCTUATION && x.role === semantic_meaning_SemanticRole.COMMA));
})) {
node.role = semantic_meaning_SemanticRole.INTEGER;
if (content[0] === '0') {
node.addAnnotation('general', 'basenumber');
}
return;
}
if (meaning.every(function (x) {
return ((x.type === semantic_meaning_SemanticType.NUMBER && x.role === semantic_meaning_SemanticRole.INTEGER) ||
x.type === semantic_meaning_SemanticType.PUNCTUATION);
})) {
node.role = semantic_meaning_SemanticRole.FLOAT;
return;
}
node.role = semantic_meaning_SemanticRole.OTHERNUMBER;
}
static exprFont_(node) {
if (node.font !== SemanticFont.UNKNOWN) {
return;
}
SemanticProcessor.compSemantics(node, 'font', SemanticFont);
}
static compSemantics(node, field, sem) {
const content = [...node.textContent];
const meaning = content.map((x) => SemanticMap.Meaning.get(x));
const single = meaning.reduce(function (prev, curr) {
if (!prev ||
!curr[field] ||
curr[field] === sem.UNKNOWN ||
curr[field] === prev) {
return prev;
}
if (prev === sem.UNKNOWN) {
return curr[field];
}
return null;
}, sem.UNKNOWN);
if (single) {
node[field] = single;
}
}
static purgeFences_(partition) {
const rel = partition.rel;
const comp = partition.comp;
const newRel = [];
const newComp = [];
while (rel.length > 0) {
const currentRel = rel.shift();
let currentComp = comp.shift();
if (isElligibleEmbellishedFence(currentRel)) {
newRel.push(currentRel);
newComp.push(currentComp);
continue;
}
SemanticProcessor.fenceToPunct_(currentRel);
currentComp.push(currentRel);
currentComp = currentComp.concat(comp.shift());
comp.unshift(currentComp);
}
newComp.push(comp.shift());
return { rel: newRel, comp: newComp };
}
static rewriteFencedNode_(fenced) {
const ofence = fenced.contentNodes[0];
const cfence = fenced.contentNodes[1];
let rewritten = SemanticProcessor.rewriteFence_(fenced, ofence);
fenced.contentNodes[0] = rewritten.fence;
rewritten = SemanticProcessor.rewriteFence_(rewritten.node, cfence);
fenced.contentNodes[1] = rewritten.fence;
fenced.contentNodes[0].parent = fenced;
fenced.contentNodes[1].parent = fenced;
rewritten.node.parent = null;
return rewritten.node;
}
static rewriteFence_(node, fence) {
if (!fence.embellished) {
return { node: node, fence: fence };
}
const newFence = fence.childNodes[0];
const rewritten = SemanticProcessor.rewriteFence_(node, newFence);
if (isType(fence, semantic_meaning_SemanticType.SUPERSCRIPT) ||
isType(fence, semantic_meaning_SemanticType.SUBSCRIPT) ||
isType(fence, semantic_meaning_SemanticType.TENSOR)) {
if (!isRole(fence, semantic_meaning_SemanticRole.SUBSUP)) {
fence.role = node.role;
}
if (newFence !== rewritten.node) {
fence.replaceChild(newFence, rewritten.node);
newFence.parent = node;
}
SemanticProcessor.propagateFencePointer_(fence, newFence);
return { node: fence, fence: rewritten.fence };
}
fence.replaceChild(newFence, rewritten.fence);
if (fence.mathmlTree && fence.mathml.indexOf(fence.mathmlTree) === -1) {
fence.mathml.push(fence.mathmlTree);
}
return { node: rewritten.node, fence: fence };
}
static propagateFencePointer_(oldNode, newNode) {
oldNode.fencePointer = newNode.fencePointer || newNode.id.toString();
oldNode.embellished = null;
}
static classifyByColumns_(table, columns, relation, alternatives = []) {
const relations = [relation].concat(alternatives);
const test1 = (x) => SemanticProcessor.isPureRelation_(x, relations);
const test2 = (x) => SemanticProcessor.isEndRelation_(x, relations) ||
SemanticProcessor.isPureRelation_(x, relations);
const test3 = (x) => SemanticProcessor.isEndRelation_(x, relations, true) ||
SemanticProcessor.isPureRelation_(x, relations);
if ((columns.length === 3 &&
SemanticProcessor.testColumns_(columns, 1, test1)) ||
(columns.length === 2 &&
(SemanticProcessor.testColumns_(columns, 1, test2) ||
SemanticProcessor.testColumns_(columns, 0, test3)))) {
table.role = relation;
return true;
}
return false;
}
static isEndRelation_(node, relations, opt_right) {
const position = opt_right ? node.childNodes.length - 1 : 0;
return (isType(node, semantic_meaning_SemanticType.RELSEQ) &&
relations.some((relation) => isRole(node, relation)) &&
isType(node.childNodes[position], semantic_meaning_SemanticType.EMPTY));
}
static isPureRelation_(node, relations) {
return (isType(node, semantic_meaning_SemanticType.RELATION) &&
relations.some((relation) => isRole(node, relation)));
}
static computeColumns_(table) {
const columns = [];
for (let i = 0, row; (row = table.childNodes[i]); i++) {
for (let j = 0, cell; (cell = row.childNodes[j]); j++) {
const column = columns[j];
column ? columns[j].push(cell) : (columns[j] = [cell]);
}
}
return columns;
}
static testColumns_(columns, index, pred) {
const column = columns[index];
return column
? column.some(function (cell) {
return (cell.childNodes.length && pred(cell.childNodes[0]));
}) &&
column.every(function (cell) {
return (!cell.childNodes.length ||
pred(cell.childNodes[0]));
})
: false;
}
setNodeFactory(factory) {
SemanticProcessor.getInstance().factory_ = factory;
SemanticHeuristics.updateFactory(SemanticProcessor.getInstance().factory_);
}
getNodeFactory() {
return SemanticProcessor.getInstance().factory_;
}
identifierNode(leaf, font, unit) {
if (unit === 'MathML-Unit') {
leaf.type = semantic_meaning_SemanticType.IDENTIFIER;
leaf.role = semantic_meaning_SemanticRole.UNIT;
}
else if (!font &&
leaf.textContent.length === 1 &&
(leaf.role === semantic_meaning_SemanticRole.INTEGER ||
leaf.role === semantic_meaning_SemanticRole.LATINLETTER ||
leaf.role === semantic_meaning_SemanticRole.GREEKLETTER) &&
leaf.font === SemanticFont.NORMAL) {
leaf.font = SemanticFont.ITALIC;
return SemanticHeuristics.run('simpleNamedFunction', leaf);
}
if (leaf.type === semantic_meaning_SemanticType.UNKNOWN) {
leaf.type = semantic_meaning_SemanticType.IDENTIFIER;
}
SemanticProcessor.exprFont_(leaf);
return SemanticHeuristics.run('simpleNamedFunction', leaf);
}
implicitNode(nodes) {
nodes = SemanticProcessor.getInstance().getMixedNumbers_(nodes);
nodes = SemanticProcessor.getInstance().combineUnits_(nodes);
if (nodes.length === 1) {
return nodes[0];
}
const node = SemanticProcessor.getInstance().implicitNode_(nodes);
return SemanticHeuristics.run('combine_juxtaposition', node);
}
text(leaf, type) {
SemanticProcessor.exprFont_(leaf);
leaf.type = semantic_meaning_SemanticType.TEXT;
if (type === MMLTAGS.ANNOTATIONXML) {
leaf.role = semantic_meaning_SemanticRole.ANNOTATION;
return leaf;
}
if (type === MMLTAGS.MS) {
leaf.role = semantic_meaning_SemanticRole.STRING;
return leaf;
}
if (type === MMLTAGS.MSPACE || leaf.textContent.match(/^\s*$/)) {
leaf.role = semantic_meaning_SemanticRole.SPACE;
return leaf;
}
if (/\s/.exec(leaf.textContent)) {
leaf.role = semantic_meaning_SemanticRole.TEXT;
return leaf;
}
leaf.role = semantic_meaning_SemanticRole.UNKNOWN;
return leaf;
}
row(nodes) {
nodes = nodes.filter(function (x) {
return !isType(x, semantic_meaning_SemanticType.EMPTY);
});
if (nodes.length === 0) {
return SemanticProcessor.getInstance().factory_.makeEmptyNode();
}
nodes = SemanticProcessor.getInstance().getFencesInRow_(nodes);
nodes = SemanticProcessor.getInstance().tablesInRow(nodes);
nodes = SemanticProcessor.getInstance().getPunctuationInRow_(nodes);
nodes = SemanticProcessor.getInstance().getTextInRow_(nodes);
nodes = SemanticProcessor.getInstance().getFunctionsInRow_(nodes);
return SemanticProcessor.getInstance().relationsInRow_(nodes);
}
limitNode(mmlTag, children) {
if (!children.length) {
return SemanticProcessor.getInstance().factory_.makeEmptyNode();
}
let center = children[0];
let type = semantic_meaning_SemanticType.UNKNOWN;
if (!children[1]) {
return center;
}
let result;
SemanticHeuristics.run('op_with_limits', children);
if (isLimitBase(center)) {
result = SemanticProcessor.MML_TO_LIMIT_[mmlTag];
const length = result.length;
type = result.type;
children = children.slice(0, result.length + 1);
if ((length === 1 && isAccent(children[1])) ||
(length === 2 &&
isAccent(children[1]) &&
isAccent(children[2]))) {
result = SemanticProcessor.MML_TO_BOUNDS_[mmlTag];
return SemanticProcessor.getInstance().accentNode_(center, children, result.type, result.length, result.accent);
}
if (length === 2) {
if (isAccent(children[1])) {
center = SemanticProcessor.getInstance().accentNode_(center, [center, children[1]], {
MSUBSUP: semantic_meaning_SemanticType.SUBSCRIPT,
MUNDEROVER: semantic_meaning_SemanticType.UNDERSCORE
}[mmlTag], 1, true);
return !children[2]
? center
: SemanticProcessor.getInstance().makeLimitNode_(center, [center, children[2]], null, semantic_meaning_SemanticType.LIMUPPER);
}
if (children[2] && isAccent(children[2])) {
center = SemanticProcessor.getInstance().accentNode_(center, [center, children[2]], {
MSUBSUP: semantic_meaning_SemanticType.SUPERSCRIPT,
MUNDEROVER: semantic_meaning_SemanticType.OVERSCORE
}[mmlTag], 1, true);
return SemanticProcessor.getInstance().makeLimitNode_(center, [center, children[1]], null, semantic_meaning_SemanticType.LIMLOWER);
}
if (!children[length]) {
type = semantic_meaning_SemanticType.LIMLOWER;
}
}
return SemanticProcessor.getInstance().makeLimitNode_(center, children, null, type);
}
result = SemanticProcessor.MML_TO_BOUNDS_[mmlTag];
return SemanticProcessor.getInstance().accentNode_(center, children, result.type, result.length, result.accent);
}
tablesInRow(nodes) {
let partition = partitionNodes(nodes, tableIsMatrixOrVector);
let result = [];
for (let i = 0, matrix; (matrix = partition.rel[i]); i++) {
result = result.concat(partition.comp.shift());
result.push(SemanticProcessor.tableToMatrixOrVector_(matrix));
}
result = result.concat(partition.comp.shift());
partition = partitionNodes(result, isTableOrMultiline);
result = [];
for (let i = 0, table; (table = partition.rel[i]); i++) {
const prevNodes = partition.comp.shift();
if (tableIsCases(table, prevNodes)) {
SemanticProcessor.tableToCases_(table, prevNodes.pop());
}
result = result.concat(prevNodes);
result.push(table);
}
return result.concat(partition.comp.shift());
}
mfenced(open, close, sepValue, children) {
if (sepValue && children.length > 0) {
const separators = SemanticProcessor.nextSeparatorFunction_(sepValue);
const newChildren = [children.shift()];
children.forEach((child) => {
newChildren.push(SemanticProcessor.getInstance().factory_.makeContentNode(separators()));
newChildren.push(child);
});
children = newChildren;
}
if (open && close) {
return SemanticProcessor.getInstance().horizontalFencedNode_(SemanticProcessor.getInstance().factory_.makeContentNode(open), SemanticProcessor.getInstance().factory_.makeContentNode(close), children);
}
if (open) {
children.unshift(SemanticProcessor.getInstance().factory_.makeContentNode(open));
}
if (close) {
children.push(SemanticProcessor.getInstance().factory_.makeContentNode(close));
}
return SemanticProcessor.getInstance().row(children);
}
fractionLikeNode(denom, enume, linethickness, bevelled) {
let node;
if (!bevelled && isZeroLength(linethickness)) {
const child0 = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.LINE, [denom], []);
const child1 = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.LINE, [enume], []);
node = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.MULTILINE, [child0, child1], []);
SemanticProcessor.binomialForm_(node);
SemanticProcessor.classifyMultiline(node);
return node;
}
else {
node = SemanticProcessor.getInstance().fractionNode_(denom, enume);
if (bevelled) {
node.addAnnotation('general', 'bevelled');
}
return node;
}
}
tensor(base, lsub, lsup, rsub, rsup) {
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.TENSOR, [
base,
SemanticProcessor.getInstance().scriptNode_(lsub, semantic_meaning_SemanticRole.LEFTSUB),
SemanticProcessor.getInstance().scriptNode_(lsup, semantic_meaning_SemanticRole.LEFTSUPER),
SemanticProcessor.getInstance().scriptNode_(rsub, semantic_meaning_SemanticRole.RIGHTSUB),
SemanticProcessor.getInstance().scriptNode_(rsup, semantic_meaning_SemanticRole.RIGHTSUPER)
], []);
newNode.role = base.role;
newNode.embellished = isEmbellished(base);
return newNode;
}
pseudoTensor(base, sub, sup) {
const isEmpty = (x) => !isType(x, semantic_meaning_SemanticType.EMPTY);
const nonEmptySub = sub.filter(isEmpty).length;
const nonEmptySup = sup.filter(isEmpty).length;
if (!nonEmptySub && !nonEmptySup) {
return base;
}
const mmlTag = nonEmptySub
? nonEmptySup
? MMLTAGS.MSUBSUP
: MMLTAGS.MSUB
: MMLTAGS.MSUP;
const mmlchild = [base];
if (nonEmptySub) {
mmlchild.push(SemanticProcessor.getInstance().scriptNode_(sub, semantic_meaning_SemanticRole.RIGHTSUB, true));
}
if (nonEmptySup) {
mmlchild.push(SemanticProcessor.getInstance().scriptNode_(sup, semantic_meaning_SemanticRole.RIGHTSUPER, true));
}
return SemanticProcessor.getInstance().limitNode(mmlTag, mmlchild);
}
font(font) {
const mathjaxFont = SemanticProcessor.MATHJAX_FONTS[font];
return mathjaxFont ? mathjaxFont : font;
}
proof(node, semantics, parse) {
if (!semantics['inference'] && !semantics['axiom']) {
console.log('Noise');
}
if (semantics['axiom']) {
const cleaned = SemanticProcessor.getInstance().cleanInference(node.childNodes);
const axiom = cleaned.length
? SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.INFERENCE, parse(cleaned), [])
: SemanticProcessor.getInstance().factory_.makeEmptyNode();
axiom.role = semantic_meaning_SemanticRole.AXIOM;
axiom.mathmlTree = node;
return axiom;
}
const inference = SemanticProcessor.getInstance().inference(node, semantics, parse);
if (semantics['proof']) {
inference.role = semantic_meaning_SemanticRole.PROOF;
inference.childNodes[0].role = semantic_meaning_SemanticRole.FINAL;
}
return inference;
}
inference(node, semantics, parse) {
if (semantics['inferenceRule']) {
const formulas = SemanticProcessor.getInstance().getFormulas(node, [], parse);
const inference = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.INFERENCE, [formulas.conclusion, formulas.premises], []);
return inference;
}
const label = semantics['labelledRule'];
const children = toArray(node.childNodes);
const content = [];
if (label === 'left' || label === 'both') {
content.push(SemanticProcessor.getInstance().getLabel(node, children, parse, semantic_meaning_SemanticRole.LEFT));
}
if (label === 'right' || label === 'both') {
content.push(SemanticProcessor.getInstance().getLabel(node, children, parse, semantic_meaning_SemanticRole.RIGHT));
}
const formulas = SemanticProcessor.getInstance().getFormulas(node, children, parse);
const inference = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.INFERENCE, [formulas.conclusion, formulas.premises], content);
inference.mathmlTree = node;
return inference;
}
getLabel(_node, children, parse, side) {
const label = SemanticProcessor.getInstance().findNestedRow(children, 'prooflabel', side);
const sem = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.RULELABEL, parse(toArray(label.childNodes)), []);
sem.role = side;
sem.mathmlTree = label;
return sem;
}
getFormulas(node, children, parse) {
const inf = children.length
? SemanticProcessor.getInstance().findNestedRow(children, 'inferenceRule')
: node;
const up = SemanticProcessor.getSemantics(inf)['inferenceRule'] === 'up';
const premRow = up ? inf.childNodes[1] : inf.childNodes[0];
const concRow = up ? inf.childNodes[0] : inf.childNodes[1];
const premTable = premRow.childNodes[0].childNodes[0];
const topRow = toArray(premTable.childNodes[0].childNodes);
const premNodes = [];
let i = 1;
for (const cell of topRow) {
if (i % 2) {
premNodes.push(cell.childNodes[0]);
}
i++;
}
const premises = parse(premNodes);
const conclusion = parse(toArray(concRow.childNodes[0].childNodes))[0];
const prem = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.PREMISES, premises, []);
prem.mathmlTree = premTable;
const conc = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.CONCLUSION, [conclusion], []);
conc.mathmlTree = concRow.childNodes[0].childNodes[0];
return { conclusion: conc, premises: prem };
}
findNestedRow(nodes, semantic, opt_value) {
return SemanticProcessor.getInstance().findNestedRow_(nodes, semantic, 0, opt_value);
}
cleanInference(nodes) {
return toArray(nodes).filter(function (x) {
return dom_util_tagName(x) !== 'MSPACE';
});
}
operatorNode(node) {
if (node.type === semantic_meaning_SemanticType.UNKNOWN) {
node.type = semantic_meaning_SemanticType.OPERATOR;
}
return SemanticHeuristics.run('multioperator', node);
}
constructor() {
this.funcAppls = {};
this.splitRoles = new Map([
[semantic_meaning_SemanticRole.SUBTRACTION, semantic_meaning_SemanticRole.NEGATIVE],
[semantic_meaning_SemanticRole.ADDITION, semantic_meaning_SemanticRole.POSITIVE]
]);
this.splitOps = ['−', '-', '‐', '‑', '+'];
this.factory_ = new SemanticNodeFactory();
SemanticHeuristics.updateFactory(this.factory_);
}
implicitNode_(nodes) {
const operators = SemanticProcessor.getInstance().factory_.makeMultipleContentNodes(nodes.length - 1, NamedSymbol.invisibleTimes);
SemanticProcessor.matchSpaces_(nodes, operators);
const newNode = SemanticProcessor.getInstance().infixNode_(nodes, operators[0]);
newNode.role = semantic_meaning_SemanticRole.IMPLICIT;
operators.forEach(function (op) {
op.parent = newNode;
});
newNode.contentNodes = operators;
return newNode;
}
infixNode_(children, opNode) {
let node = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.INFIXOP, children, [opNode], getEmbellishedInner(opNode).textContent);
node.role = opNode.role;
node = SemanticHeuristics.run('propagateInterval', node);
return SemanticHeuristics.run('propagateSimpleFunction', node);
}
explicitMixed_(nodes) {
const partition = partitionNodes(nodes, function (x) {
return x.textContent === NamedSymbol.invisiblePlus;
});
if (!partition.rel.length) {
return nodes;
}
let result = [];
for (let i = 0, rel; (rel = partition.rel[i]); i++) {
const prev = partition.comp[i];
const next = partition.comp[i + 1];
const last = prev.length - 1;
if (prev[last] &&
next[0] &&
isType(prev[last], semantic_meaning_SemanticType.NUMBER) &&
!isRole(prev[last], semantic_meaning_SemanticRole.MIXED) &&
isType(next[0], semantic_meaning_SemanticType.FRACTION)) {
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.NUMBER, [prev[last], next[0]], []);
newNode.role = semantic_meaning_SemanticRole.MIXED;
result = result.concat(prev.slice(0, last));
result.push(newNode);
next.shift();
}
else {
result = result.concat(prev);
result.push(rel);
}
}
return result.concat(partition.comp[partition.comp.length - 1]);
}
concatNode_(inner, nodeList, type) {
if (nodeList.length === 0) {
return inner;
}
const content = nodeList
.map(function (x) {
return getEmbellishedInner(x).textContent;
})
.join(' ');
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(type, [inner], nodeList, content);
if (nodeList.length > 1) {
newNode.role = semantic_meaning_SemanticRole.MULTIOP;
}
return newNode;
}
prefixNode_(node, prefixes) {
const newPrefixes = this.splitSingles(prefixes);
let newNode = node;
while (newPrefixes.length > 0) {
const op = newPrefixes.pop();
newNode = SemanticProcessor.getInstance().concatNode_(newNode, op, semantic_meaning_SemanticType.PREFIXOP);
if (op.length === 1 && this.splitOps.indexOf(op[0].textContent) !== -1) {
newNode.role = this.splitRoles.get(op[0].role);
}
}
return newNode;
}
splitSingles(prefixes) {
let lastOp = 0;
const result = [];
let i = 0;
while (i < prefixes.length) {
const op = prefixes[i];
if (this.splitRoles.has(op.role) &&
(!prefixes[i - 1] || prefixes[i - 1].role !== op.role) &&
(!prefixes[i + 1] || prefixes[i + 1].role !== op.role) &&
this.splitOps.indexOf(op.textContent) !== -1) {
result.push(prefixes.slice(lastOp, i));
result.push(prefixes.slice(i, i + 1));
lastOp = i + 1;
}
i++;
}
if (lastOp < i) {
result.push(prefixes.slice(lastOp, i));
}
return result;
}
postfixNode_(node, postfixes) {
if (!postfixes.length) {
return node;
}
return SemanticProcessor.getInstance().concatNode_(node, postfixes, semantic_meaning_SemanticType.POSTFIXOP);
}
combineUnits_(nodes) {
const partition = partitionNodes(nodes, function (x) {
return !isRole(x, semantic_meaning_SemanticRole.UNIT);
});
if (nodes.length === partition.rel.length) {
return partition.rel;
}
const result = [];
let rel;
let last;
do {
const comp = partition.comp.shift();
rel = partition.rel.shift();
let unitNode = null;
last = result.pop();
if (last) {
if (!comp.length || !isUnitCounter(last)) {
result.push(last);
}
else {
comp.unshift(last);
}
}
if (comp.length === 1) {
unitNode = comp.pop();
}
if (comp.length > 1) {
unitNode = SemanticProcessor.getInstance().implicitNode_(comp);
unitNode.role = semantic_meaning_SemanticRole.UNIT;
}
if (unitNode) {
result.push(unitNode);
}
if (rel) {
result.push(rel);
}
} while (rel);
return result;
}
getMixedNumbers_(nodes) {
const partition = partitionNodes(nodes, function (x) {
return (isType(x, semantic_meaning_SemanticType.FRACTION) &&
isRole(x, semantic_meaning_SemanticRole.VULGAR));
});
if (!partition.rel.length) {
return nodes;
}
let result = [];
for (let i = 0, rel; (rel = partition.rel[i]); i++) {
const comp = partition.comp[i];
const last = comp.length - 1;
if (comp[last] &&
isType(comp[last], semantic_meaning_SemanticType.NUMBER) &&
(isRole(comp[last], semantic_meaning_SemanticRole.INTEGER) ||
isRole(comp[last], semantic_meaning_SemanticRole.FLOAT))) {
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.NUMBER, [comp[last], rel], []);
newNode.role = semantic_meaning_SemanticRole.MIXED;
result = result.concat(comp.slice(0, last));
result.push(newNode);
}
else {
result = result.concat(comp);
result.push(rel);
}
}
return result.concat(partition.comp[partition.comp.length - 1]);
}
getTextInRow_(nodes) {
if (nodes.length === 0) {
return nodes;
}
if (nodes.length === 1) {
if (nodes[0].type === semantic_meaning_SemanticType.TEXT &&
nodes[0].role === semantic_meaning_SemanticRole.UNKNOWN) {
nodes[0].role = semantic_meaning_SemanticRole.ANNOTATION;
}
return nodes;
}
const { rel: rel, comp: comp } = partitionNodes(nodes, (x) => isType(x, semantic_meaning_SemanticType.TEXT));
if (rel.length === 0) {
return nodes;
}
const result = [];
let prevComp = comp.shift();
while (rel.length > 0) {
let currentRel = rel.shift();
let nextComp = comp.shift();
const text = [];
while (!nextComp.length &&
rel.length &&
currentRel.role !== semantic_meaning_SemanticRole.SPACE &&
rel[0].role !== semantic_meaning_SemanticRole.SPACE) {
text.push(currentRel);
currentRel = rel.shift();
nextComp = comp.shift();
}
if (text.length) {
if (prevComp.length) {
result.push(SemanticProcessor.getInstance().row(prevComp));
}
text.push(currentRel);
const dummy = SemanticProcessor.getInstance().dummyNode_(text);
result.push(dummy);
prevComp = nextComp;
continue;
}
if (currentRel.role !== semantic_meaning_SemanticRole.UNKNOWN) {
if (prevComp.length) {
result.push(SemanticProcessor.getInstance().row(prevComp));
}
result.push(currentRel);
prevComp = nextComp;
continue;
}
const meaning = SemanticMap.Meaning.get(currentRel.textContent);
if (meaning.type === semantic_meaning_SemanticType.PUNCTUATION) {
currentRel.role = meaning.role;
currentRel.font = meaning.font;
if (prevComp.length) {
result.push(SemanticProcessor.getInstance().row(prevComp));
}
result.push(currentRel);
prevComp = nextComp;
continue;
}
if (meaning.type !== semantic_meaning_SemanticType.UNKNOWN) {
currentRel.type = meaning.type;
currentRel.role = meaning.role;
currentRel.font = meaning.font;
currentRel.addAnnotation('general', 'text');
prevComp.push(currentRel);
prevComp = prevComp.concat(nextComp);
continue;
}
SemanticProcessor.meaningFromContent(currentRel, (n, c, m) => {
if (n.role !== semantic_meaning_SemanticRole.UNKNOWN) {
return;
}
SemanticProcessor.numberRole_(n, c, m);
if (n.role !== semantic_meaning_SemanticRole.OTHERNUMBER) {
n.type = semantic_meaning_SemanticType.NUMBER;
return;
}
if (m.some((x) => x.type !== semantic_meaning_SemanticType.NUMBER &&
x.type !== semantic_meaning_SemanticType.IDENTIFIER)) {
n.type = semantic_meaning_SemanticType.TEXT;
n.role = semantic_meaning_SemanticRole.ANNOTATION;
return;
}
n.role = semantic_meaning_SemanticRole.UNKNOWN;
});
if (currentRel.type === semantic_meaning_SemanticType.TEXT &&
currentRel.role !== semantic_meaning_SemanticRole.UNKNOWN) {
if (prevComp.length) {
result.push(SemanticProcessor.getInstance().row(prevComp));
}
result.push(currentRel);
prevComp = nextComp;
continue;
}
if (currentRel.role === semantic_meaning_SemanticRole.UNKNOWN) {
if (rel.length || nextComp.length) {
if (nextComp.length && nextComp[0].type === semantic_meaning_SemanticType.FENCED) {
currentRel.type = semantic_meaning_SemanticType.FUNCTION;
currentRel.role = semantic_meaning_SemanticRole.PREFIXFUNC;
}
else {
currentRel.role = semantic_meaning_SemanticRole.TEXT;
}
}
else {
currentRel.type = semantic_meaning_SemanticType.IDENTIFIER;
currentRel.role = semantic_meaning_SemanticRole.UNIT;
}
}
prevComp.push(currentRel);
prevComp = prevComp.concat(nextComp);
}
if (prevComp.length > 0) {
result.push(SemanticProcessor.getInstance().row(prevComp));
}
return result.length > 1
? [SemanticProcessor.getInstance().dummyNode_(result)]
: result;
}
relationsInRow_(nodes) {
const partition = partitionNodes(nodes, isRelation);
const firstRel = partition.rel[0];
if (!firstRel) {
return SemanticProcessor.getInstance().operationsInRow_(nodes);
}
if (nodes.length === 1) {
return nodes[0];
}
const children = partition.comp.map(SemanticProcessor.getInstance().operationsInRow_);
let node;
if (partition.rel.some(function (x) {
return !x.equals(firstRel);
})) {
node = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.MULTIREL, children, partition.rel);
if (partition.rel.every(function (x) {
return x.role === firstRel.role;
})) {
node.role = firstRel.role;
}
return node;
}
node = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.RELSEQ, children, partition.rel, getEmbellishedInner(firstRel).textContent);
node.role = firstRel.role;
return node;
}
operationsInRow_(nodes) {
if (nodes.length === 0) {
return SemanticProcessor.getInstance().factory_.makeEmptyNode();
}
nodes = SemanticProcessor.getInstance().explicitMixed_(nodes);
if (nodes.length === 1) {
return nodes[0];
}
const prefix = [];
while (nodes.length > 0 && isOperator(nodes[0])) {
prefix.push(nodes.shift());
}
if (nodes.length === 0) {
return SemanticProcessor.getInstance().prefixNode_(prefix.pop(), prefix);
}
if (nodes.length === 1) {
return SemanticProcessor.getInstance().prefixNode_(nodes[0], prefix);
}
nodes = SemanticHeuristics.run('convert_juxtaposition', nodes);
const split = sliceNodes(nodes, isOperator);
const node = SemanticProcessor.getInstance().wrapFactor(prefix, split);
return SemanticProcessor.getInstance().addFactor(node, split);
}
wrapPostfix(split) {
var _a;
if (((_a = split.div) === null || _a === void 0 ? void 0 : _a.role) === semantic_meaning_SemanticRole.POSTFIXOP) {
if (!split.tail.length || split.tail[0].type === semantic_meaning_SemanticType.OPERATOR) {
split.head = [
SemanticProcessor.getInstance().postfixNode_(SemanticProcessor.getInstance().implicitNode(split.head), [split.div])
];
split.div = split.tail.shift();
SemanticProcessor.getInstance().wrapPostfix(split);
}
else {
split.div.role = semantic_meaning_SemanticRole.DIVISION;
}
}
}
wrapFactor(prefix, split) {
SemanticProcessor.getInstance().wrapPostfix(split);
return SemanticProcessor.getInstance().prefixNode_(SemanticProcessor.getInstance().implicitNode(split.head), prefix);
}
addFactor(node, split) {
if (!split.div) {
if (isUnitProduct(node)) {
node.role = semantic_meaning_SemanticRole.UNIT;
}
return node;
}
return SemanticProcessor.getInstance().operationsTree_(split.tail, node, split.div);
}
operationsTree_(nodes, root, lastop, prefix = []) {
if (nodes.length === 0) {
prefix.unshift(lastop);
if (root.type === semantic_meaning_SemanticType.INFIXOP) {
const node = SemanticProcessor.getInstance().postfixNode_(root.childNodes.pop(), prefix);
root.appendChild(node);
return root;
}
return SemanticProcessor.getInstance().postfixNode_(root, prefix);
}
const split = sliceNodes(nodes, isOperator);
if (split.head.length === 0) {
prefix.push(split.div);
return SemanticProcessor.getInstance().operationsTree_(split.tail, root, lastop, prefix);
}
const node = SemanticProcessor.getInstance().wrapFactor(prefix, split);
const newNode = SemanticProcessor.getInstance().appendOperand_(root, lastop, node);
return SemanticProcessor.getInstance().addFactor(newNode, split);
}
appendOperand_(root, op, node) {
if (root.type !== semantic_meaning_SemanticType.INFIXOP) {
return SemanticProcessor.getInstance().infixNode_([root, node], op);
}
const division = SemanticProcessor.getInstance().appendDivisionOp_(root, op, node);
if (division) {
return division;
}
if (SemanticProcessor.getInstance().appendExistingOperator_(root, op, node)) {
return root;
}
return op.role === semantic_meaning_SemanticRole.MULTIPLICATION
? SemanticProcessor.getInstance().appendMultiplicativeOp_(root, op, node)
: SemanticProcessor.getInstance().appendAdditiveOp_(root, op, node);
}
appendDivisionOp_(root, op, node) {
if (op.role === semantic_meaning_SemanticRole.DIVISION) {
if (isImplicit(root)) {
return SemanticProcessor.getInstance().infixNode_([root, node], op);
}
return SemanticProcessor.getInstance().appendLastOperand_(root, op, node);
}
return root.role === semantic_meaning_SemanticRole.DIVISION
? SemanticProcessor.getInstance().infixNode_([root, node], op)
: null;
}
appendLastOperand_(root, op, node) {
let lastRoot = root;
let lastChild = root.childNodes[root.childNodes.length - 1];
while (lastChild &&
lastChild.type === semantic_meaning_SemanticType.INFIXOP &&
!isImplicit(lastChild)) {
lastRoot = lastChild;
lastChild = lastRoot.childNodes[root.childNodes.length - 1];
}
const newNode = SemanticProcessor.getInstance().infixNode_([lastRoot.childNodes.pop(), node], op);
lastRoot.appendChild(newNode);
return root;
}
appendMultiplicativeOp_(root, op, node) {
if (isImplicit(root)) {
return SemanticProcessor.getInstance().infixNode_([root, node], op);
}
let lastRoot = root;
let lastChild = root.childNodes[root.childNodes.length - 1];
while (lastChild &&
lastChild.type === semantic_meaning_SemanticType.INFIXOP &&
!isImplicit(lastChild)) {
lastRoot = lastChild;
lastChild = lastRoot.childNodes[root.childNodes.length - 1];
}
const newNode = SemanticProcessor.getInstance().infixNode_([lastRoot.childNodes.pop(), node], op);
lastRoot.appendChild(newNode);
return root;
}
appendAdditiveOp_(root, op, node) {
return SemanticProcessor.getInstance().infixNode_([root, node], op);
}
appendExistingOperator_(root, op, node) {
if (!root ||
root.type !== semantic_meaning_SemanticType.INFIXOP ||
isImplicit(root)) {
return false;
}
if (root.contentNodes[0].equals(op)) {
root.appendContentNode(op);
root.appendChild(node);
return true;
}
return SemanticProcessor.getInstance().appendExistingOperator_(root.childNodes[root.childNodes.length - 1], op, node);
}
getFencesInRow_(nodes) {
let partition = partitionNodes(nodes, isFence);
partition = SemanticProcessor.purgeFences_(partition);
const felem = partition.comp.shift();
return SemanticProcessor.getInstance().fences_(partition.rel, partition.comp, [], [felem]);
}
fences_(fences, content, openStack, contentStack) {
if (fences.length === 0 && openStack.length === 0) {
return contentStack[0];
}
const interval = SemanticHeuristics.run('bracketed_interval', [fences[0], fences[1], ...(content[0] || [])], () => null);
if (interval) {
fences.shift();
fences.shift();
content.shift();
const stack = contentStack.pop() || [];
contentStack.push([...stack, interval, ...content.shift()]);
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
const openPred = (x) => isRole(x, semantic_meaning_SemanticRole.OPEN);
if (fences.length === 0) {
const result = contentStack.shift();
while (openStack.length > 0) {
if (openPred(openStack[0])) {
const firstOpen = openStack.shift();
SemanticProcessor.fenceToPunct_(firstOpen);
result.push(firstOpen);
}
else {
const split = sliceNodes(openStack, openPred);
const cutLength = split.head.length - 1;
const innerNodes = SemanticProcessor.getInstance().neutralFences_(split.head, contentStack.slice(0, cutLength));
contentStack = contentStack.slice(cutLength);
result.push(...innerNodes);
if (split.div) {
split.tail.unshift(split.div);
}
openStack = split.tail;
}
result.push(...contentStack.shift());
}
return result;
}
const lastOpen = openStack[openStack.length - 1];
const firstRole = fences[0].role;
if (firstRole === semantic_meaning_SemanticRole.OPEN ||
(isNeutralFence(fences[0]) &&
!(lastOpen && compareNeutralFences(fences[0], lastOpen)))) {
openStack.push(fences.shift());
const cont = content.shift();
if (cont) {
contentStack.push(cont);
}
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
if (lastOpen &&
firstRole === semantic_meaning_SemanticRole.CLOSE &&
lastOpen.role === semantic_meaning_SemanticRole.OPEN) {
const fenced = SemanticProcessor.getInstance().horizontalFencedNode_(openStack.pop(), fences.shift(), contentStack.pop());
contentStack.push(contentStack.pop().concat([fenced], content.shift()));
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
if (lastOpen &&
compareNeutralFences(fences[0], lastOpen)) {
if (!elligibleLeftNeutral(lastOpen) ||
!elligibleRightNeutral(fences[0])) {
openStack.push(fences.shift());
const cont = content.shift();
if (cont) {
contentStack.push(cont);
}
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
const fenced = SemanticProcessor.getInstance().horizontalFencedNode_(openStack.pop(), fences.shift(), contentStack.pop());
contentStack.push(contentStack.pop().concat([fenced], content.shift()));
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
if (lastOpen &&
firstRole === semantic_meaning_SemanticRole.CLOSE &&
isNeutralFence(lastOpen) &&
openStack.some(openPred)) {
const split = sliceNodes(openStack, openPred, true);
const rightContent = contentStack.pop();
const cutLength = contentStack.length - split.tail.length + 1;
const innerNodes = SemanticProcessor.getInstance().neutralFences_(split.tail, contentStack.slice(cutLength));
contentStack = contentStack.slice(0, cutLength);
const fenced = SemanticProcessor.getInstance().horizontalFencedNode_(split.div, fences.shift(), contentStack.pop().concat(innerNodes, rightContent));
contentStack.push(contentStack.pop().concat([fenced], content.shift()));
return SemanticProcessor.getInstance().fences_(fences, content, split.head, contentStack);
}
const fenced = fences.shift();
SemanticProcessor.fenceToPunct_(fenced);
contentStack.push(contentStack.pop().concat([fenced], content.shift()));
return SemanticProcessor.getInstance().fences_(fences, content, openStack, contentStack);
}
neutralFences_(fences, content) {
if (fences.length === 0) {
return fences;
}
if (fences.length === 1) {
SemanticProcessor.fenceToPunct_(fences[0]);
return fences;
}
const firstFence = fences.shift();
if (!elligibleLeftNeutral(firstFence)) {
SemanticProcessor.fenceToPunct_(firstFence);
const restContent = content.shift();
restContent.unshift(firstFence);
return restContent.concat(SemanticProcessor.getInstance().neutralFences_(fences, content));
}
const split = sliceNodes(fences, function (x) {
return compareNeutralFences(x, firstFence);
});
if (!split.div) {
SemanticProcessor.fenceToPunct_(firstFence);
const restContent = content.shift();
restContent.unshift(firstFence);
return restContent.concat(SemanticProcessor.getInstance().neutralFences_(fences, content));
}
if (!elligibleRightNeutral(split.div)) {
SemanticProcessor.fenceToPunct_(split.div);
fences.unshift(firstFence);
return SemanticProcessor.getInstance().neutralFences_(fences, content);
}
const newContent = SemanticProcessor.getInstance().combineFencedContent_(firstFence, split.div, split.head, content);
if (split.tail.length > 0) {
const leftContent = newContent.shift();
const result = SemanticProcessor.getInstance().neutralFences_(split.tail, newContent);
return leftContent.concat(result);
}
return newContent[0];
}
combineFencedContent_(leftFence, rightFence, midFences, content) {
if (midFences.length === 0) {
const fenced = SemanticProcessor.getInstance().horizontalFencedNode_(leftFence, rightFence, content.shift());
if (content.length > 0) {
content[0].unshift(fenced);
}
else {
content = [[fenced]];
}
return content;
}
const leftContent = content.shift();
const cutLength = midFences.length - 1;
const midContent = content.slice(0, cutLength);
content = content.slice(cutLength);
const rightContent = content.shift();
const innerNodes = SemanticProcessor.getInstance().neutralFences_(midFences, midContent);
leftContent.push(...innerNodes);
leftContent.push(...rightContent);
const fenced = SemanticProcessor.getInstance().horizontalFencedNode_(leftFence, rightFence, leftContent);
if (content.length > 0) {
content[0].unshift(fenced);
}
else {
content = [[fenced]];
}
return content;
}
horizontalFencedNode_(ofence, cfence, content) {
const childNode = SemanticProcessor.getInstance().row(content);
let newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.FENCED, [childNode], [ofence, cfence]);
if (ofence.role === semantic_meaning_SemanticRole.OPEN) {
SemanticProcessor.getInstance().classifyHorizontalFence_(newNode);
newNode = SemanticHeuristics.run('propagateComposedFunction', newNode);
}
else {
newNode.role = ofence.role;
}
newNode = SemanticHeuristics.run('detect_cycle', newNode);
return SemanticProcessor.rewriteFencedNode_(newNode);
}
classifyHorizontalFence_(node) {
SemanticHeuristics.run('interval_heuristic', node);
if (node.role === semantic_meaning_SemanticRole.INTERVAL) {
return;
}
;
node.role = semantic_meaning_SemanticRole.LEFTRIGHT;
const children = node.childNodes;
if (!isSetNode(node) || children.length > 1) {
return;
}
if (children.length === 0 || children[0].type === semantic_meaning_SemanticType.EMPTY) {
node.role = semantic_meaning_SemanticRole.SETEMPTY;
return;
}
const type = children[0].type;
if (children.length === 1 &&
isSingletonSetContent(children[0])) {
node.role = semantic_meaning_SemanticRole.SETSINGLE;
return;
}
const role = children[0].role;
if (type !== semantic_meaning_SemanticType.PUNCTUATED || role !== semantic_meaning_SemanticRole.SEQUENCE) {
return;
}
if (children[0].contentNodes[0].role === semantic_meaning_SemanticRole.COMMA) {
node.role = semantic_meaning_SemanticRole.SETCOLLECT;
return;
}
if (children[0].contentNodes.length === 1 &&
(children[0].contentNodes[0].role === semantic_meaning_SemanticRole.VBAR ||
children[0].contentNodes[0].role === semantic_meaning_SemanticRole.COLON)) {
node.role = semantic_meaning_SemanticRole.SETEXT;
SemanticProcessor.getInstance().setExtension_(node);
return;
}
}
setExtension_(set) {
const extender = set.childNodes[0].childNodes[0];
if (extender &&
extender.type === semantic_meaning_SemanticType.INFIXOP &&
extender.contentNodes.length === 1 &&
isMembership(extender.contentNodes[0])) {
extender.addAnnotation('set', 'intensional');
extender.contentNodes[0].addAnnotation('set', 'intensional');
}
}
getPunctuationInRow_(nodes) {
if (nodes.length <= 1) {
return nodes;
}
const allowedType = (x) => {
const type = x.type;
return (type === 'punctuation' ||
type === 'text' ||
type === 'operator' ||
type === 'relation');
};
const partition = partitionNodes(nodes, function (x) {
if (!isPunctuation(x)) {
return false;
}
if (isPunctuation(x) &&
!isRole(x, semantic_meaning_SemanticRole.ELLIPSIS)) {
return true;
}
const index = nodes.indexOf(x);
if (index === 0) {
if (nodes[1] && allowedType(nodes[1])) {
return false;
}
return true;
}
const prev = nodes[index - 1];
if (index === nodes.length - 1) {
if (allowedType(prev)) {
return false;
}
return true;
}
const next = nodes[index + 1];
if (allowedType(prev) && allowedType(next)) {
return false;
}
return true;
});
if (partition.rel.length === 0) {
return nodes;
}
let newNodes = [];
let firstComp = partition.comp.shift();
if (firstComp.length > 0) {
newNodes.push(SemanticProcessor.getInstance().row(firstComp));
}
let relCounter = 0;
while (partition.comp.length > 0) {
let puncts = [];
const saveCount = relCounter;
do {
puncts.push(partition.rel[relCounter++]);
firstComp = partition.comp.shift();
} while (partition.rel[relCounter] &&
firstComp &&
firstComp.length === 0);
puncts = SemanticHeuristics.run('ellipses', puncts);
partition.rel.splice(saveCount, relCounter - saveCount, ...puncts);
relCounter = saveCount + puncts.length;
newNodes = newNodes.concat(puncts);
if (firstComp && firstComp.length > 0) {
newNodes.push(SemanticProcessor.getInstance().row(firstComp));
}
}
return newNodes.length === 1 && partition.rel.length === 1
? newNodes
: [
SemanticProcessor.getInstance().punctuatedNode_(newNodes, partition.rel)
];
}
punctuatedNode_(nodes, punctuations) {
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.PUNCTUATED, nodes, punctuations);
if (punctuations.length === nodes.length) {
const firstRole = punctuations[0].role;
if (firstRole !== semantic_meaning_SemanticRole.UNKNOWN &&
punctuations.every(function (punct) {
return punct.role === firstRole;
})) {
newNode.role = firstRole;
return newNode;
}
}
const fpunct = punctuations[0];
if (singlePunctAtPosition(nodes, punctuations, 0)) {
newNode.role =
fpunct.childNodes.length && !fpunct.embellished
? fpunct.role
: semantic_meaning_SemanticRole.STARTPUNCT;
}
else if (singlePunctAtPosition(nodes, punctuations, nodes.length - 1)) {
newNode.role =
fpunct.childNodes.length && !fpunct.embellished
? fpunct.role
: semantic_meaning_SemanticRole.ENDPUNCT;
}
else if (punctuations.every((x) => isRole(x, semantic_meaning_SemanticRole.DUMMY))) {
newNode.role = semantic_meaning_SemanticRole.TEXT;
}
else if (punctuations.every((x) => isRole(x, semantic_meaning_SemanticRole.SPACE))) {
newNode.role = semantic_meaning_SemanticRole.SPACE;
}
else {
newNode.role = semantic_meaning_SemanticRole.SEQUENCE;
}
return newNode;
}
dummyNode_(children) {
const commata = SemanticProcessor.getInstance().factory_.makeMultipleContentNodes(children.length - 1, NamedSymbol.invisibleComma);
commata.forEach(function (comma) {
comma.role = semantic_meaning_SemanticRole.DUMMY;
});
return SemanticProcessor.getInstance().punctuatedNode_(children, commata);
}
accentRole_(node, type) {
if (!isAccent(node)) {
return false;
}
const content = node.textContent;
const role = SemanticMap.Secondary.get(content, SemanticSecondary.BAR) ||
SemanticMap.Secondary.get(content, SemanticSecondary.TILDE) ||
node.role;
node.role =
type === semantic_meaning_SemanticType.UNDERSCORE
? semantic_meaning_SemanticRole.UNDERACCENT
: semantic_meaning_SemanticRole.OVERACCENT;
node.addAnnotation('accent', role);
return true;
}
accentNode_(center, children, type, length, accent) {
children = children.slice(0, length + 1);
const child1 = children[1];
const child2 = children[2];
let innerNode;
if (!accent && child2) {
innerNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.SUBSCRIPT, [center, child1], []);
innerNode.role = semantic_meaning_SemanticRole.SUBSUP;
children = [innerNode, child2];
type = semantic_meaning_SemanticType.SUPERSCRIPT;
}
if (accent) {
const underAccent = SemanticProcessor.getInstance().accentRole_(child1, type);
if (child2) {
const overAccent = SemanticProcessor.getInstance().accentRole_(child2, semantic_meaning_SemanticType.OVERSCORE);
if (overAccent && !underAccent) {
innerNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.OVERSCORE, [center, child2], []);
children = [innerNode, child1];
type = semantic_meaning_SemanticType.UNDERSCORE;
}
else {
innerNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.UNDERSCORE, [center, child1], []);
children = [innerNode, child2];
type = semantic_meaning_SemanticType.OVERSCORE;
}
innerNode.role = semantic_meaning_SemanticRole.UNDEROVER;
}
}
return SemanticProcessor.getInstance().makeLimitNode_(center, children, innerNode, type);
}
makeLimitNode_(center, children, innerNode, type) {
if (type === semantic_meaning_SemanticType.LIMUPPER &&
center.type === semantic_meaning_SemanticType.LIMLOWER) {
center.childNodes.push(children[1]);
children[1].parent = center;
center.type = semantic_meaning_SemanticType.LIMBOTH;
return center;
}
if (type === semantic_meaning_SemanticType.LIMLOWER &&
center.type === semantic_meaning_SemanticType.LIMUPPER) {
center.childNodes.splice(1, -1, children[1]);
children[1].parent = center;
center.type = semantic_meaning_SemanticType.LIMBOTH;
return center;
}
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(type, children, []);
const embellished = isEmbellished(center);
if (innerNode) {
innerNode.embellished = embellished;
}
newNode.embellished = embellished;
newNode.role = center.role;
return newNode;
}
getFunctionsInRow_(restNodes, opt_result) {
const result = opt_result || [];
if (restNodes.length === 0) {
return result;
}
const firstNode = restNodes.shift();
const heuristic = SemanticProcessor.classifyFunction_(firstNode, restNodes);
if (!heuristic) {
result.push(firstNode);
return SemanticProcessor.getInstance().getFunctionsInRow_(restNodes, result);
}
const processedRest = SemanticProcessor.getInstance().getFunctionsInRow_(restNodes, []);
const newRest = SemanticProcessor.getInstance().getFunctionArgs_(firstNode, processedRest, heuristic);
return result.concat(newRest);
}
getFunctionArgs_(func, rest, heuristic) {
let partition, arg, funcNode;
switch (heuristic) {
case 'integral': {
const components = SemanticProcessor.getInstance().getIntegralArgs_(rest);
if (!components.intvar && !components.integrand.length) {
components.rest.unshift(func);
return components.rest;
}
const integrand = SemanticProcessor.getInstance().row(components.integrand);
funcNode = SemanticProcessor.getInstance().integralNode_(func, integrand, components.intvar);
SemanticHeuristics.run('intvar_from_fraction', funcNode);
components.rest.unshift(funcNode);
return components.rest;
}
case 'prefix': {
if (rest[0] && rest[0].type === semantic_meaning_SemanticType.FENCED) {
const arg = rest.shift();
if (!isNeutralFence(arg)) {
arg.role = semantic_meaning_SemanticRole.LEFTRIGHT;
}
funcNode = SemanticProcessor.getInstance().functionNode_(func, arg);
rest.unshift(funcNode);
return rest;
}
partition = sliceNodes(rest, isPrefixFunctionBoundary);
if (!partition.head.length) {
if (!partition.div ||
!isType(partition.div, semantic_meaning_SemanticType.APPL)) {
rest.unshift(func);
return rest;
}
arg = partition.div;
}
else {
arg = SemanticProcessor.getInstance().row(partition.head);
if (partition.div) {
partition.tail.unshift(partition.div);
}
}
funcNode = SemanticProcessor.getInstance().functionNode_(func, arg);
partition.tail.unshift(funcNode);
return partition.tail;
}
case 'bigop': {
partition = sliceNodes(rest, isBigOpBoundary);
if (!partition.head.length) {
rest.unshift(func);
return rest;
}
arg = SemanticProcessor.getInstance().row(partition.head);
funcNode = SemanticProcessor.getInstance().bigOpNode_(func, arg);
if (partition.div) {
partition.tail.unshift(partition.div);
}
partition.tail.unshift(funcNode);
return partition.tail;
}
case 'simple':
default: {
if (rest.length === 0) {
return [func];
}
const firstArg = rest[0];
if (firstArg.type === semantic_meaning_SemanticType.FENCED &&
!isNeutralFence(firstArg) &&
isSimpleFunctionScope(firstArg)) {
firstArg.role = semantic_meaning_SemanticRole.LEFTRIGHT;
SemanticProcessor.propagateFunctionRole_(func, semantic_meaning_SemanticRole.SIMPLEFUNC);
funcNode = SemanticProcessor.getInstance().functionNode_(func, rest.shift());
rest.unshift(funcNode);
return rest;
}
rest.unshift(func);
return rest;
}
}
}
getIntegralArgs_(nodes, args = []) {
if (nodes.length === 0) {
const partition = sliceNodes(args, isBigOpBoundary);
if (partition.div) {
partition.tail.unshift(partition.div);
}
return { integrand: partition.head, intvar: null, rest: partition.tail };
}
SemanticHeuristics.run('intvar_from_implicit', nodes);
const firstNode = nodes[0];
if (isGeneralFunctionBoundary(firstNode)) {
const { integrand: args2, rest: rest2 } = SemanticProcessor.getInstance().getIntegralArgs_(args);
return { integrand: args2, intvar: null, rest: rest2.concat(nodes) };
}
if (isIntegralDxBoundarySingle(firstNode)) {
firstNode.role = semantic_meaning_SemanticRole.INTEGRAL;
return { integrand: args, intvar: firstNode, rest: nodes.slice(1) };
}
if (nodes[1] && isIntegralDxBoundary(firstNode, nodes[1])) {
const intvar = SemanticProcessor.getInstance().prefixNode_(nodes[1], [firstNode]);
intvar.role = semantic_meaning_SemanticRole.INTEGRAL;
return { integrand: args, intvar: intvar, rest: nodes.slice(2) };
}
args.push(nodes.shift());
return SemanticProcessor.getInstance().getIntegralArgs_(nodes, args);
}
functionNode_(func, arg) {
const applNode = SemanticProcessor.getInstance().factory_.makeContentNode(NamedSymbol.functionApplication);
const appl = SemanticProcessor.getInstance().funcAppls[func.id];
if (appl) {
applNode.mathmlTree = appl.mathmlTree;
applNode.mathml = appl.mathml;
applNode.annotation = appl.annotation;
applNode.attributes = appl.attributes;
delete SemanticProcessor.getInstance().funcAppls[func.id];
}
applNode.type = semantic_meaning_SemanticType.PUNCTUATION;
applNode.role = semantic_meaning_SemanticRole.APPLICATION;
const funcop = SemanticProcessor.getFunctionOp_(func, function (node) {
return (isType(node, semantic_meaning_SemanticType.FUNCTION) ||
(isType(node, semantic_meaning_SemanticType.IDENTIFIER) &&
isRole(node, semantic_meaning_SemanticRole.SIMPLEFUNC)));
});
return SemanticProcessor.getInstance().functionalNode_(semantic_meaning_SemanticType.APPL, [func, arg], funcop, [applNode]);
}
bigOpNode_(bigOp, arg) {
const largeop = SemanticProcessor.getFunctionOp_(bigOp, (x) => isType(x, semantic_meaning_SemanticType.LARGEOP));
return SemanticProcessor.getInstance().functionalNode_(semantic_meaning_SemanticType.BIGOP, [bigOp, arg], largeop, []);
}
integralNode_(integral, integrand, intvar) {
integrand =
integrand || SemanticProcessor.getInstance().factory_.makeEmptyNode();
intvar = intvar || SemanticProcessor.getInstance().factory_.makeEmptyNode();
const largeop = SemanticProcessor.getFunctionOp_(integral, (x) => isType(x, semantic_meaning_SemanticType.LARGEOP));
return SemanticProcessor.getInstance().functionalNode_(semantic_meaning_SemanticType.INTEGRAL, [integral, integrand, intvar], largeop, []);
}
functionalNode_(type, children, operator, content) {
const funcop = children[0];
let oldParent;
if (operator) {
oldParent = operator.parent;
content.push(operator);
}
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(type, children, content);
newNode.role = funcop.role;
if (oldParent) {
operator.parent = oldParent;
}
return newNode;
}
fractionNode_(denom, enume) {
const newNode = SemanticProcessor.getInstance().factory_.makeBranchNode(semantic_meaning_SemanticType.FRACTION, [denom, enume], []);
newNode.role = newNode.childNodes.every(function (x) {
return (isType(x, semantic_meaning_SemanticType.NUMBER) &&
isRole(x, semantic_meaning_SemanticRole.INTEGER));
})
? semantic_meaning_SemanticRole.VULGAR
: newNode.childNodes.every(isPureUnit)
? semantic_meaning_SemanticRole.UNIT
: semantic_meaning_SemanticRole.DIVISION;
return SemanticHeuristics.run('propagateSimpleFunction', newNode);
}
scriptNode_(nodes, role, opt_noSingle) {
let newNode;
switch (nodes.length) {
case 0:
newNode = SemanticProcessor.getInstance().factory_.makeEmptyNode();
break;
case 1:
newNode = nodes[0];
if (opt_noSingle) {
return newNode;
}
break;
default:
newNode = SemanticProcessor.getInstance().dummyNode_(nodes);
}
newNode.role = role;
return newNode;
}
findNestedRow_(nodes, semantic, level, value) {
if (level > 3) {
return null;
}
for (let i = 0, node; (node = nodes[i]); i++) {
const tag = dom_util_tagName(node);
if (tag !== MMLTAGS.MSPACE) {
if (tag === MMLTAGS.MROW) {
return SemanticProcessor.getInstance().findNestedRow_(toArray(node.childNodes), semantic, level + 1, value);
}
if (SemanticProcessor.findSemantics(node, semantic, value)) {
return node;
}
}
}
return null;
}
}
SemanticProcessor.FENCE_TO_PUNCT_ = {
[semantic_meaning_SemanticRole.METRIC]: semantic_meaning_SemanticRole.METRIC,
[semantic_meaning_SemanticRole.NEUTRAL]: semantic_meaning_SemanticRole.VBAR,
[semantic_meaning_SemanticRole.OPEN]: semantic_meaning_SemanticRole.OPENFENCE,
[semantic_meaning_SemanticRole.CLOSE]: semantic_meaning_SemanticRole.CLOSEFENCE
};
SemanticProcessor.MML_TO_LIMIT_ = {
[MMLTAGS.MSUB]: { type: semantic_meaning_SemanticType.LIMLOWER, length: 1 },
[MMLTAGS.MUNDER]: { type: semantic_meaning_SemanticType.LIMLOWER, length: 1 },
[MMLTAGS.MSUP]: { type: semantic_meaning_SemanticType.LIMUPPER, length: 1 },
[MMLTAGS.MOVER]: { type: semantic_meaning_SemanticType.LIMUPPER, length: 1 },
[MMLTAGS.MSUBSUP]: { type: semantic_meaning_SemanticType.LIMBOTH, length: 2 },
[MMLTAGS.MUNDEROVER]: { type: semantic_meaning_SemanticType.LIMBOTH, length: 2 }
};
SemanticProcessor.MML_TO_BOUNDS_ = {
[MMLTAGS.MSUB]: { type: semantic_meaning_SemanticType.SUBSCRIPT, length: 1, accent: false },
[MMLTAGS.MSUP]: {
type: semantic_meaning_SemanticType.SUPERSCRIPT,
length: 1,
accent: false
},
[MMLTAGS.MSUBSUP]: {
type: semantic_meaning_SemanticType.SUBSCRIPT,
length: 2,
accent: false
},
[MMLTAGS.MUNDER]: {
type: semantic_meaning_SemanticType.UNDERSCORE,
length: 1,
accent: true
},
[MMLTAGS.MOVER]: { type: semantic_meaning_SemanticType.OVERSCORE, length: 1, accent: true },
[MMLTAGS.MUNDEROVER]: {
type: semantic_meaning_SemanticType.UNDERSCORE,
length: 2,
accent: true
}
};
SemanticProcessor.CLASSIFY_FUNCTION_ = {
[semantic_meaning_SemanticRole.INTEGRAL]: 'integral',
[semantic_meaning_SemanticRole.SUM]: 'bigop',
[semantic_meaning_SemanticRole.PREFIXFUNC]: 'prefix',
[semantic_meaning_SemanticRole.LIMFUNC]: 'prefix',
[semantic_meaning_SemanticRole.SIMPLEFUNC]: 'prefix',
[semantic_meaning_SemanticRole.COMPFUNC]: 'prefix'
};
SemanticProcessor.MATHJAX_FONTS = {
'-tex-caligraphic': SemanticFont.CALIGRAPHIC,
'-tex-caligraphic-bold': SemanticFont.CALIGRAPHICBOLD,
'-tex-calligraphic': SemanticFont.CALIGRAPHIC,
'-tex-calligraphic-bold': SemanticFont.CALIGRAPHICBOLD,
'-tex-oldstyle': SemanticFont.OLDSTYLE,
'-tex-oldstyle-bold': SemanticFont.OLDSTYLEBOLD,
'-tex-mathit': SemanticFont.ITALIC
};
//# sourceMappingURL=semantic_processor.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_mathml.js
class SemanticMathml extends SemanticAbstractParser {
static getAttribute_(node, attr, def) {
if (!node.hasAttribute(attr)) {
return def;
}
const value = node.getAttribute(attr);
if (value.match(/^\s*$/)) {
return null;
}
return value;
}
constructor(options) {
super('MathML');
this.options = options;
SemanticHeuristics.options = options;
this.parseMap_ = new Map([
[MMLTAGS.SEMANTICS, this.semantics_.bind(this)],
[MMLTAGS.MATH, this.rows_.bind(this)],
[MMLTAGS.MROW, this.rows_.bind(this)],
[MMLTAGS.MPADDED, this.rows_.bind(this)],
[MMLTAGS.MSTYLE, this.rows_.bind(this)],
[MMLTAGS.MFRAC, this.fraction_.bind(this)],
[MMLTAGS.MSUB, this.limits_.bind(this)],
[MMLTAGS.MSUP, this.limits_.bind(this)],
[MMLTAGS.MSUBSUP, this.limits_.bind(this)],
[MMLTAGS.MOVER, this.limits_.bind(this)],
[MMLTAGS.MUNDER, this.limits_.bind(this)],
[MMLTAGS.MUNDEROVER, this.limits_.bind(this)],
[MMLTAGS.MROOT, this.root_.bind(this)],
[MMLTAGS.MSQRT, this.sqrt_.bind(this)],
[MMLTAGS.MTABLE, this.table_.bind(this)],
[MMLTAGS.MLABELEDTR, this.tableLabeledRow_.bind(this)],
[MMLTAGS.MTR, this.tableRow_.bind(this)],
[MMLTAGS.MTD, this.tableCell_.bind(this)],
[MMLTAGS.MS, this.text_.bind(this)],
[MMLTAGS.MTEXT, this.text_.bind(this)],
[MMLTAGS.MSPACE, this.space_.bind(this)],
[MMLTAGS.ANNOTATIONXML, this.text_.bind(this)],
[MMLTAGS.MI, this.identifier_.bind(this)],
[MMLTAGS.MN, this.number_.bind(this)],
[MMLTAGS.MO, this.operator_.bind(this)],
[MMLTAGS.MFENCED, this.fenced_.bind(this)],
[MMLTAGS.MENCLOSE, this.enclosed_.bind(this)],
[MMLTAGS.MMULTISCRIPTS, this.multiscripts_.bind(this)],
[MMLTAGS.ANNOTATION, this.empty_.bind(this)],
[MMLTAGS.NONE, this.empty_.bind(this)],
[MMLTAGS.MACTION, this.action_.bind(this)]
]);
const meaning = {
type: semantic_meaning_SemanticType.IDENTIFIER,
role: semantic_meaning_SemanticRole.NUMBERSET,
font: SemanticFont.DOUBLESTRUCK
};
[
'C',
'H',
'N',
'P',
'Q',
'R',
'Z',
'ℂ',
'ℍ',
'ℕ',
'ℙ',
'ℚ',
'ℝ',
'ℤ'
].forEach(((x) => this.getFactory().defaultMap.set(x, meaning)).bind(this));
}
parse(mml) {
SemanticProcessor.getInstance().setNodeFactory(this.getFactory());
const children = toArray(mml.childNodes);
const tag = dom_util_tagName(mml);
const func = this.parseMap_.get(tag);
const newNode = (func ? func : this.dummy_.bind(this))(mml, children);
addAttributes(newNode, mml);
if ([
MMLTAGS.MATH,
MMLTAGS.MROW,
MMLTAGS.MPADDED,
MMLTAGS.MSTYLE,
MMLTAGS.SEMANTICS,
MMLTAGS.MACTION
].indexOf(tag) !== -1) {
return newNode;
}
newNode.mathml.unshift(mml);
newNode.mathmlTree = mml;
return newNode;
}
semantics_(_node, children) {
return children.length
? this.parse(children[0])
: this.getFactory().makeEmptyNode();
}
rows_(node, children) {
const semantics = node.getAttribute('semantics');
if (semantics && semantics.match('bspr_')) {
return SemanticProcessor.proof(node, semantics, this.parseList.bind(this));
}
children = purgeNodes(children);
let newNode;
if (children.length === 1) {
newNode = this.parse(children[0]);
if (newNode.type === semantic_meaning_SemanticType.EMPTY && !newNode.mathmlTree) {
newNode.mathmlTree = node;
}
}
else {
const snode = SemanticHeuristics.run('function_from_identifiers', node);
newNode =
snode && snode !== node
? snode
: SemanticProcessor.getInstance().row(this.parseList(children));
}
newNode.mathml.unshift(node);
return newNode;
}
fraction_(node, children) {
if (!children.length) {
return this.getFactory().makeEmptyNode();
}
const upper = this.parse(children[0]);
const lower = children[1]
? this.parse(children[1])
: this.getFactory().makeEmptyNode();
const sem = SemanticProcessor.getInstance().fractionLikeNode(upper, lower, node.getAttribute('linethickness'), node.getAttribute('bevelled') === 'true');
return sem;
}
limits_(node, children) {
return SemanticProcessor.getInstance().limitNode(dom_util_tagName(node), this.parseList(children));
}
root_(node, children) {
if (!children[1]) {
return this.sqrt_(node, children);
}
return this.getFactory().makeBranchNode(semantic_meaning_SemanticType.ROOT, [this.parse(children[1]), this.parse(children[0])], []);
}
sqrt_(_node, children) {
const semNodes = this.parseList(purgeNodes(children));
return this.getFactory().makeBranchNode(semantic_meaning_SemanticType.SQRT, [SemanticProcessor.getInstance().row(semNodes)], []);
}
table_(node, children) {
const semantics = node.getAttribute('semantics');
if (semantics && semantics.match('bspr_')) {
return SemanticProcessor.proof(node, semantics, this.parseList.bind(this));
}
const newNode = this.getFactory().makeBranchNode(semantic_meaning_SemanticType.TABLE, this.parseList(children), []);
newNode.mathmlTree = node;
return SemanticProcessor.tableToMultiline(newNode);
}
tableRow_(_node, children) {
const newNode = this.getFactory().makeBranchNode(semantic_meaning_SemanticType.ROW, this.parseList(children), []);
newNode.role = semantic_meaning_SemanticRole.TABLE;
return newNode;
}
tableLabeledRow_(node, children) {
var _a;
if (!children.length) {
return this.tableRow_(node, children);
}
const label = this.parse(children[0]);
label.role = semantic_meaning_SemanticRole.LABEL;
if (((_a = label.childNodes[0]) === null || _a === void 0 ? void 0 : _a.type) === semantic_meaning_SemanticType.TEXT) {
label.childNodes[0].role = semantic_meaning_SemanticRole.LABEL;
}
const newNode = this.getFactory().makeBranchNode(semantic_meaning_SemanticType.ROW, this.parseList(children.slice(1)), [label]);
newNode.role = semantic_meaning_SemanticRole.TABLE;
return newNode;
}
tableCell_(_node, children) {
const semNodes = this.parseList(purgeNodes(children));
let childNodes;
if (!semNodes.length) {
childNodes = [];
}
else if (semNodes.length === 1 &&
isType(semNodes[0], semantic_meaning_SemanticType.EMPTY)) {
childNodes = semNodes;
}
else {
childNodes = [SemanticProcessor.getInstance().row(semNodes)];
}
const newNode = this.getFactory().makeBranchNode(semantic_meaning_SemanticType.CELL, childNodes, []);
newNode.role = semantic_meaning_SemanticRole.TABLE;
return newNode;
}
space_(node, children) {
const width = node.getAttribute('width');
const match = width && width.match(/[a-z]*$/);
if (!match) {
return this.empty_(node, children);
}
const sizes = {
cm: 0.4,
pc: 0.5,
em: 0.5,
ex: 1,
in: 0.15,
pt: 5,
mm: 5
};
const unit = match[0];
const measure = parseFloat(width.slice(0, match.index));
const size = sizes[unit];
if (!size || isNaN(measure) || measure < size) {
return this.empty_(node, children);
}
const newNode = this.getFactory().makeUnprocessed(node);
return SemanticProcessor.getInstance().text(newNode, dom_util_tagName(node));
}
text_(node, children) {
const newNode = this.leaf_(node, children);
if (!node.textContent) {
return newNode;
}
newNode.updateContent(node.textContent, true);
return SemanticProcessor.getInstance().text(newNode, dom_util_tagName(node));
}
identifier_(node, children) {
const newNode = this.leaf_(node, children);
return SemanticProcessor.getInstance().identifierNode(newNode, SemanticProcessor.getInstance().font(node.getAttribute('mathvariant')), node.getAttribute('class'));
}
number_(node, children) {
const newNode = this.leaf_(node, children);
SemanticProcessor.number(newNode);
return newNode;
}
operator_(node, children) {
const newNode = this.leaf_(node, children);
SemanticProcessor.getInstance().operatorNode(newNode);
return newNode;
}
fenced_(node, children) {
const semNodes = this.parseList(purgeNodes(children));
const sepValue = SemanticMathml.getAttribute_(node, 'separators', ',');
const open = SemanticMathml.getAttribute_(node, 'open', '(');
const close = SemanticMathml.getAttribute_(node, 'close', ')');
const newNode = SemanticProcessor.getInstance().mfenced(open, close, sepValue, semNodes);
const nodes = SemanticProcessor.getInstance().tablesInRow([newNode]);
return nodes[0];
}
enclosed_(node, children) {
const semNodes = this.parseList(purgeNodes(children));
const newNode = this.getFactory().makeBranchNode(semantic_meaning_SemanticType.ENCLOSE, [SemanticProcessor.getInstance().row(semNodes)], []);
newNode.role =
node.getAttribute('notation') || semantic_meaning_SemanticRole.UNKNOWN;
return newNode;
}
multiscripts_(_node, children) {
if (!children.length) {
return this.getFactory().makeEmptyNode();
}
const base = this.parse(children.shift());
if (!children.length) {
return base;
}
const lsup = [];
const lsub = [];
const rsup = [];
const rsub = [];
let prescripts = false;
let scriptcount = 0;
for (let i = 0, child; (child = children[i]); i++) {
if (dom_util_tagName(child) === MMLTAGS.MPRESCRIPTS) {
prescripts = true;
scriptcount = 0;
continue;
}
prescripts
? scriptcount & 1
? lsup.push(child)
: lsub.push(child)
: scriptcount & 1
? rsup.push(child)
: rsub.push(child);
scriptcount++;
}
if (!purgeNodes(lsup).length &&
!purgeNodes(lsub).length) {
return SemanticProcessor.getInstance().pseudoTensor(base, this.parseList(rsub), this.parseList(rsup));
}
return SemanticProcessor.getInstance().tensor(base, this.parseList(lsub), this.parseList(lsup), this.parseList(rsub), this.parseList(rsup));
}
empty_(_node, _children) {
return this.getFactory().makeEmptyNode();
}
action_(node, children) {
const selection = children[node.hasAttribute('selection')
? parseInt(node.getAttribute('selection'), 10) - 1
: 0];
const stree = this.parse(selection);
stree.mathmlTree = selection;
return stree;
}
dummy_(node, _children) {
const unknown = this.getFactory().makeUnprocessed(node);
unknown.role = node.tagName;
unknown.textContent = node.textContent;
return unknown;
}
leaf_(mml, children) {
if (children.length === 1 &&
children[0].nodeType !== NodeType.TEXT_NODE) {
const node = this.getFactory().makeUnprocessed(mml);
node.role = children[0].tagName;
addAttributes(node, children[0]);
return node;
}
const node = this.getFactory().makeLeafNode(mml.textContent, SemanticProcessor.getInstance().font(mml.getAttribute('mathvariant')));
if (mml.hasAttribute('data-latex')) {
SemanticMap.LatexCommands.set(mml.getAttribute('data-latex'), mml.textContent);
}
return node;
}
}
//# sourceMappingURL=semantic_mathml.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_heuristic.js
class SemanticAbstractHeuristic {
constructor(name, method, predicate = (_x) => false) {
this.name = name;
this.apply = method;
this.applicable = predicate;
}
}
class SemanticTreeHeuristic extends SemanticAbstractHeuristic {
}
class SemanticMultiHeuristic extends SemanticAbstractHeuristic {
}
class SemanticMmlHeuristic extends SemanticAbstractHeuristic {
}
//# sourceMappingURL=semantic_heuristic.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/common/base_util.js
function removeEmpty(strs) {
return strs.filter((str) => str);
}
function interleaveLists(list1, list2) {
const result = [];
while (list1.length || list2.length) {
if (list1.length) {
result.push(list1.shift());
}
if (list2.length) {
result.push(list2.shift());
}
}
return result;
}
function setdifference(a, b) {
if (!a) {
return [];
}
if (!b) {
return a;
}
return a.filter((x) => b.indexOf(x) < 0);
}
//# sourceMappingURL=base_util.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/enrich_attr.js
const Prefix = 'data-semantic-';
var enrich_attr_Attribute;
(function (Attribute) {
Attribute["ADDED"] = "data-semantic-added";
Attribute["ALTERNATIVE"] = "data-semantic-alternative";
Attribute["CHILDREN"] = "data-semantic-children";
Attribute["COLLAPSED"] = "data-semantic-collapsed";
Attribute["CONTENT"] = "data-semantic-content";
Attribute["EMBELLISHED"] = "data-semantic-embellished";
Attribute["FENCEPOINTER"] = "data-semantic-fencepointer";
Attribute["FONT"] = "data-semantic-font";
Attribute["ID"] = "data-semantic-id";
Attribute["ANNOTATION"] = "data-semantic-annotation";
Attribute["ATTRIBUTES"] = "data-semantic-attributes";
Attribute["OPERATOR"] = "data-semantic-operator";
Attribute["OWNS"] = "data-semantic-owns";
Attribute["PARENT"] = "data-semantic-parent";
Attribute["POSTFIX"] = "data-semantic-postfix";
Attribute["PREFIX"] = "data-semantic-prefix";
Attribute["ROLE"] = "data-semantic-role";
Attribute["SPEECH"] = "data-semantic-speech";
Attribute["STRUCTURE"] = "data-semantic-structure";
Attribute["SUMMARY"] = "data-semantic-summary";
Attribute["TYPE"] = "data-semantic-type";
})(enrich_attr_Attribute || (enrich_attr_Attribute = {}));
const EnrichAttributes = [
enrich_attr_Attribute.ADDED,
enrich_attr_Attribute.ALTERNATIVE,
enrich_attr_Attribute.CHILDREN,
enrich_attr_Attribute.COLLAPSED,
enrich_attr_Attribute.CONTENT,
enrich_attr_Attribute.EMBELLISHED,
enrich_attr_Attribute.FENCEPOINTER,
enrich_attr_Attribute.FONT,
enrich_attr_Attribute.ID,
enrich_attr_Attribute.ANNOTATION,
enrich_attr_Attribute.ATTRIBUTES,
enrich_attr_Attribute.OPERATOR,
enrich_attr_Attribute.OWNS,
enrich_attr_Attribute.PARENT,
enrich_attr_Attribute.POSTFIX,
enrich_attr_Attribute.PREFIX,
enrich_attr_Attribute.ROLE,
enrich_attr_Attribute.SPEECH,
enrich_attr_Attribute.STRUCTURE,
enrich_attr_Attribute.SUMMARY,
enrich_attr_Attribute.TYPE
];
function makeIdList(nodes) {
return nodes
.map(function (node) {
return node.id;
})
.join(',');
}
function setAttributes(mml, semantic) {
mml.setAttribute(enrich_attr_Attribute.TYPE, semantic.type);
const attributes = semantic.allAttributes();
for (let i = 0, attr; (attr = attributes[i]); i++) {
mml.setAttribute(Prefix + attr[0].toLowerCase(), attr[1]);
}
if (semantic.childNodes.length) {
mml.setAttribute(enrich_attr_Attribute.CHILDREN, makeIdList(semantic.childNodes));
}
if (semantic.contentNodes.length) {
mml.setAttribute(enrich_attr_Attribute.CONTENT, makeIdList(semantic.contentNodes));
}
if (semantic.parent) {
mml.setAttribute(enrich_attr_Attribute.PARENT, semantic.parent.id.toString());
}
const external = semantic.attributesXml();
if (external) {
mml.setAttribute(enrich_attr_Attribute.ATTRIBUTES, external);
}
setPostfix(mml, semantic);
}
function setPostfix(mml, semantic) {
const postfix = [];
if (semantic.role === semantic_meaning_SemanticRole.MGLYPH) {
postfix.push('image');
}
if (semantic.attributes['href']) {
postfix.push('link');
}
if (postfix.length) {
mml.setAttribute(enrich_attr_Attribute.POSTFIX, postfix.join(' '));
}
}
function removeAttributePrefix(mml) {
return mml.toString().replace(new RegExp(Prefix, 'g'), '');
}
function addPrefix(attr) {
return (Prefix + attr);
}
function addMrow() {
const mrow = createElement('mrow');
mrow.setAttribute(enrich_attr_Attribute.ADDED, 'true');
return mrow;
}
//# sourceMappingURL=enrich_attr.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_skeleton.js
class SemanticSkeleton {
static fromTree(tree) {
return SemanticSkeleton.fromNode(tree.root);
}
static fromNode(node) {
return new SemanticSkeleton(SemanticSkeleton.fromNode_(node));
}
static fromString(skel) {
return new SemanticSkeleton(SemanticSkeleton.fromString_(skel));
}
static simpleCollapseStructure(strct) {
return typeof strct === 'number';
}
static contentCollapseStructure(strct) {
return (!!strct &&
!SemanticSkeleton.simpleCollapseStructure(strct) &&
strct[0] === 'c');
}
static interleaveIds(first, second) {
return interleaveLists(SemanticSkeleton.collapsedLeafs(first), SemanticSkeleton.collapsedLeafs(second));
}
static collapsedLeafs(...args) {
const collapseStructure = (coll) => {
if (SemanticSkeleton.simpleCollapseStructure(coll)) {
return [coll];
}
coll = coll;
return SemanticSkeleton.contentCollapseStructure(coll[1])
? coll.slice(2)
: coll.slice(1);
};
return args.reduce((x, y) => x.concat(collapseStructure(y)), []);
}
static fromStructure(mml, tree, options) {
return new SemanticSkeleton(SemanticSkeleton.tree_(mml, tree.root, options));
}
static combineContentChildren(type, _role, content, children) {
switch (type) {
case semantic_meaning_SemanticType.RELSEQ:
case semantic_meaning_SemanticType.INFIXOP:
case semantic_meaning_SemanticType.MULTIREL:
return interleaveLists(children, content);
case semantic_meaning_SemanticType.PREFIXOP:
return content.concat(children);
case semantic_meaning_SemanticType.POSTFIXOP:
return children.concat(content);
case semantic_meaning_SemanticType.MATRIX:
case semantic_meaning_SemanticType.VECTOR:
case semantic_meaning_SemanticType.FENCED:
children.unshift(content[0]);
children.push(content[1]);
return children;
case semantic_meaning_SemanticType.CASES:
children.unshift(content[0]);
return children;
case semantic_meaning_SemanticType.APPL:
return [children[0], content[0], children[1]];
case semantic_meaning_SemanticType.ROOT:
return [children[0], children[1]];
case semantic_meaning_SemanticType.ROW:
case semantic_meaning_SemanticType.LINE:
if (content.length) {
children.unshift(content[0]);
}
return children;
default:
return children;
}
}
static makeSexp_(struct) {
if (SemanticSkeleton.simpleCollapseStructure(struct)) {
return struct.toString();
}
if (SemanticSkeleton.contentCollapseStructure(struct)) {
return ('(' +
'c ' +
struct.slice(1).map(SemanticSkeleton.makeSexp_).join(' ') +
')');
}
return ('(' + struct.map(SemanticSkeleton.makeSexp_).join(' ') + ')');
}
static fromString_(skeleton) {
let str = skeleton.replace(/\(/g, '[');
str = str.replace(/\)/g, ']');
str = str.replace(/ /g, ',');
str = str.replace(/c/g, '"c"');
return JSON.parse(str);
}
static fromNode_(node) {
if (!node) {
return [];
}
const content = node.contentNodes;
let contentStructure;
if (content.length) {
contentStructure = content.map(SemanticSkeleton.fromNode_);
contentStructure.unshift('c');
}
const children = node.childNodes;
if (!children.length) {
return content.length ? [node.id, contentStructure] : node.id;
}
const structure = children.map(SemanticSkeleton.fromNode_);
if (content.length) {
structure.unshift(contentStructure);
}
structure.unshift(node.id);
return structure;
}
static tree_(mml, node, options, level = 0, posinset = 1, setsize = 1) {
if (!node) {
return [];
}
const id = node.id;
const skeleton = [id];
updateEvaluator(mml);
const mmlChild = evalXPath(`.//self::*[@${enrich_attr_Attribute.ID}=${id}]`, mml)[0];
if (!node.childNodes.length) {
SemanticSkeleton.addAria(mmlChild, level, posinset, setsize, options);
return node.id;
}
const children = SemanticSkeleton.combineContentChildren(node.type, node.role, node.contentNodes.map(function (x) {
return x;
}), node.childNodes.map(function (x) {
return x;
}));
if (mmlChild) {
SemanticSkeleton.addOwns_(mmlChild, children);
}
for (let i = 0, l = children.length, child; (child = children[i]); i++) {
skeleton.push(SemanticSkeleton.tree_(mml, child, options, level + 1, i + 1, l));
}
SemanticSkeleton.addAria(mmlChild, level, posinset, setsize, options);
return skeleton;
}
static addAria(node, level, posinset, setsize, options) {
const role = !options.tree ? 'treeitem' : level ? 'treeitem' : 'tree';
if (!options.aria || !node) {
return;
}
node.setAttribute('aria-level', level.toString());
node.setAttribute('aria-posinset', posinset.toString());
node.setAttribute('aria-setsize', setsize.toString());
node.setAttribute('role', role);
if (node.hasAttribute(enrich_attr_Attribute.OWNS)) {
node.setAttribute('aria-owns', node.getAttribute(enrich_attr_Attribute.OWNS));
}
}
static addOwns_(node, children) {
const collapsed = node.getAttribute(enrich_attr_Attribute.COLLAPSED);
const leafs = collapsed
? SemanticSkeleton.realLeafs_(SemanticSkeleton.fromString(collapsed).array)
: children.map((x) => x.id);
node.setAttribute(enrich_attr_Attribute.OWNS, leafs.join(' '));
}
static realLeafs_(sexp) {
if (SemanticSkeleton.simpleCollapseStructure(sexp)) {
return [sexp];
}
if (SemanticSkeleton.contentCollapseStructure(sexp)) {
return [];
}
sexp = sexp;
let result = [];
for (let i = 1; i < sexp.length; i++) {
result = result.concat(SemanticSkeleton.realLeafs_(sexp[i]));
}
return result;
}
constructor(skeleton) {
this.parents = null;
this.levelsMap = null;
skeleton = skeleton === 0 ? skeleton : skeleton || [];
this.array = skeleton;
}
populate() {
if (this.parents && this.levelsMap) {
return;
}
this.parents = {};
this.levelsMap = {};
this.populate_(this.array, this.array, []);
}
toString() {
return SemanticSkeleton.makeSexp_(this.array);
}
populate_(element, layer, parents) {
if (SemanticSkeleton.simpleCollapseStructure(element)) {
element = element;
this.levelsMap[element] = layer;
this.parents[element] =
element === parents[0] ? parents.slice(1) : parents;
return;
}
const newElement = SemanticSkeleton.contentCollapseStructure(element)
? element.slice(1)
: element;
const newParents = [newElement[0]].concat(parents);
for (let i = 0, l = newElement.length; i < l; i++) {
const current = newElement[i];
this.populate_(current, element, newParents);
}
}
isRoot(id) {
const level = this.levelsMap[id];
return id === level[0];
}
directChildren(id) {
if (!this.isRoot(id)) {
return [];
}
const level = this.levelsMap[id];
return level.slice(1).map((child) => {
if (SemanticSkeleton.simpleCollapseStructure(child)) {
return child;
}
if (SemanticSkeleton.contentCollapseStructure(child)) {
return child[1];
}
return child[0];
});
}
subtreeNodes(id) {
if (!this.isRoot(id)) {
return [];
}
const subtreeNodes_ = (tree, nodes) => {
if (SemanticSkeleton.simpleCollapseStructure(tree)) {
nodes.push(tree);
return;
}
tree = tree;
if (SemanticSkeleton.contentCollapseStructure(tree)) {
tree = tree.slice(1);
}
tree.forEach((x) => subtreeNodes_(x, nodes));
};
const level = this.levelsMap[id];
const subtree = [];
subtreeNodes_(level.slice(1), subtree);
return subtree;
}
}
//# sourceMappingURL=semantic_skeleton.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_heuristics.js
SemanticHeuristics.add(new SemanticTreeHeuristic('combine_juxtaposition', combineJuxtaposition));
function combineJuxtaposition(root) {
for (let i = root.childNodes.length - 1, child; (child = root.childNodes[i]); i--) {
if (!isImplicitOp(child) || child.nobreaking) {
continue;
}
root.childNodes.splice(i, 1, ...child.childNodes);
root.contentNodes.splice(i, 0, ...child.contentNodes);
child.childNodes.concat(child.contentNodes).forEach(function (x) {
x.parent = root;
});
root.addMathmlNodes(child.mathml);
}
return root;
}
SemanticHeuristics.add(new SemanticTreeHeuristic('propagateSimpleFunction', (node) => {
if ((node.type === semantic_meaning_SemanticType.INFIXOP ||
node.type === semantic_meaning_SemanticType.FRACTION) &&
node.childNodes.every(isSimpleFunction)) {
node.role = semantic_meaning_SemanticRole.COMPFUNC;
}
return node;
}, (_node) => SemanticHeuristics.options.domain === 'clearspeak'));
SemanticHeuristics.add(new SemanticTreeHeuristic('simpleNamedFunction', (node) => {
const specialFunctions = ['f', 'g', 'h', 'F', 'G', 'H'];
if (node.role !== semantic_meaning_SemanticRole.UNIT &&
specialFunctions.indexOf(node.textContent) !== -1) {
node.role = semantic_meaning_SemanticRole.SIMPLEFUNC;
}
return node;
}, (_node) => SemanticHeuristics.options.domain === 'clearspeak'));
SemanticHeuristics.add(new SemanticTreeHeuristic('propagateComposedFunction', (node) => {
if (node.type === semantic_meaning_SemanticType.FENCED &&
node.childNodes[0].role === semantic_meaning_SemanticRole.COMPFUNC) {
node.role = semantic_meaning_SemanticRole.COMPFUNC;
}
return node;
}, (_node) => SemanticHeuristics.options.domain === 'clearspeak'));
SemanticHeuristics.add(new SemanticTreeHeuristic('multioperator', (node) => {
if (node.role !== semantic_meaning_SemanticRole.UNKNOWN || node.textContent.length <= 1) {
return;
}
SemanticProcessor.compSemantics(node, 'role', semantic_meaning_SemanticRole);
SemanticProcessor.compSemantics(node, 'type', semantic_meaning_SemanticType);
}));
SemanticHeuristics.add(new SemanticMultiHeuristic('convert_juxtaposition', (nodes) => {
let partition = partitionNodes(nodes, function (x) {
return (x.textContent === NamedSymbol.invisibleTimes &&
x.type === semantic_meaning_SemanticType.OPERATOR);
});
partition = partition.rel.length
? juxtapositionPrePost(partition)
: partition;
nodes = partition.comp[0];
for (let i = 1, c, r; (c = partition.comp[i]), (r = partition.rel[i - 1]); i++) {
nodes.push(r);
nodes = nodes.concat(c);
}
partition = partitionNodes(nodes, function (x) {
return (x.textContent === NamedSymbol.invisibleTimes &&
(x.type === semantic_meaning_SemanticType.OPERATOR || x.type === semantic_meaning_SemanticType.INFIXOP));
});
if (!partition.rel.length) {
return nodes;
}
return recurseJuxtaposition(partition.comp.shift(), partition.rel, partition.comp);
}));
SemanticHeuristics.add(new SemanticTreeHeuristic('simple2prefix', (node) => {
if (node.textContent.length > 1 &&
!node.textContent[0].match(/[A-Z]/)) {
node.role = semantic_meaning_SemanticRole.PREFIXFUNC;
}
return node;
}, (node) => SemanticHeuristics.options.modality === 'braille' &&
node.type === semantic_meaning_SemanticType.IDENTIFIER));
SemanticHeuristics.add(new SemanticTreeHeuristic('detect_cycle', (node) => {
node.type = semantic_meaning_SemanticType.MATRIX;
node.role = semantic_meaning_SemanticRole.CYCLE;
const row = node.childNodes[0];
row.type = semantic_meaning_SemanticType.ROW;
row.role = semantic_meaning_SemanticRole.CYCLE;
row.textContent = '';
row.contentNodes = [];
return node;
}, (node) => node.type === semantic_meaning_SemanticType.FENCED &&
node.childNodes[0].type === semantic_meaning_SemanticType.INFIXOP &&
node.childNodes[0].role === semantic_meaning_SemanticRole.IMPLICIT &&
node.childNodes[0].childNodes.every(function (x) {
return x.type === semantic_meaning_SemanticType.NUMBER;
}) &&
node.childNodes[0].contentNodes.every(function (x) {
return x.role === semantic_meaning_SemanticRole.SPACE;
})));
function juxtapositionPrePost(partition) {
const rels = [];
const comps = [];
let next = partition.comp.shift();
let rel = null;
let collect = [];
while (partition.comp.length) {
collect = [];
if (next.length) {
if (rel) {
rels.push(rel);
}
comps.push(next);
rel = partition.rel.shift();
next = partition.comp.shift();
continue;
}
if (rel) {
collect.push(rel);
}
while (!next.length && partition.comp.length) {
next = partition.comp.shift();
collect.push(partition.rel.shift());
}
rel = convertPrePost(collect, next, comps);
}
if (!collect.length && !next.length) {
collect.push(rel);
convertPrePost(collect, next, comps);
}
else {
rels.push(rel);
comps.push(next);
}
return { rel: rels, comp: comps };
}
function convertPrePost(collect, next, comps) {
let rel = null;
if (!collect.length) {
return rel;
}
const prev = comps[comps.length - 1];
const prevExists = prev && prev.length;
const nextExists = next && next.length;
const processor = SemanticProcessor.getInstance();
if (prevExists && nextExists) {
if (next[0].type === semantic_meaning_SemanticType.INFIXOP &&
next[0].role === semantic_meaning_SemanticRole.IMPLICIT) {
rel = collect.pop();
prev.push(processor['postfixNode_'](prev.pop(), collect));
return rel;
}
rel = collect.shift();
const result = processor['prefixNode_'](next.shift(), collect);
next.unshift(result);
return rel;
}
if (prevExists) {
prev.push(processor['postfixNode_'](prev.pop(), collect));
return rel;
}
if (nextExists) {
next.unshift(processor['prefixNode_'](next.shift(), collect));
}
return rel;
}
function recurseJuxtaposition(acc, ops, elements) {
if (!ops.length) {
return acc;
}
const left = acc.pop();
const op = ops.shift();
const first = elements.shift();
if (op.type === semantic_meaning_SemanticType.INFIXOP &&
(op.role === semantic_meaning_SemanticRole.IMPLICIT || op.role === semantic_meaning_SemanticRole.UNIT)) {
Debugger.getInstance().output('Juxta Heuristic Case 2');
const right = (left ? [left, op] : [op]).concat(first);
return recurseJuxtaposition(acc.concat(right), ops, elements);
}
if (!left) {
Debugger.getInstance().output('Juxta Heuristic Case 3');
return recurseJuxtaposition([op].concat(first), ops, elements);
}
const right = first.shift();
if (!right) {
Debugger.getInstance().output('Juxta Heuristic Case 9');
const newOp = SemanticHeuristics.factory.makeBranchNode(semantic_meaning_SemanticType.INFIXOP, [left, ops.shift()], [op], op.textContent);
newOp.role = semantic_meaning_SemanticRole.IMPLICIT;
SemanticHeuristics.run('combine_juxtaposition', newOp);
ops.unshift(newOp);
return recurseJuxtaposition(acc, ops, elements);
}
if (isOperator(left) || isOperator(right)) {
Debugger.getInstance().output('Juxta Heuristic Case 4');
return recurseJuxtaposition(acc.concat([left, op, right]).concat(first), ops, elements);
}
let result = null;
if (isImplicitOp(left) && isImplicitOp(right)) {
Debugger.getInstance().output('Juxta Heuristic Case 5');
left.contentNodes.push(op);
left.contentNodes = left.contentNodes.concat(right.contentNodes);
left.childNodes.push(right);
left.childNodes = left.childNodes.concat(right.childNodes);
right.childNodes.forEach((x) => (x.parent = left));
op.parent = left;
left.addMathmlNodes(op.mathml);
left.addMathmlNodes(right.mathml);
result = left;
}
else if (isImplicitOp(left)) {
Debugger.getInstance().output('Juxta Heuristic Case 6');
left.contentNodes.push(op);
left.childNodes.push(right);
right.parent = left;
op.parent = left;
left.addMathmlNodes(op.mathml);
left.addMathmlNodes(right.mathml);
result = left;
}
else if (isImplicitOp(right)) {
Debugger.getInstance().output('Juxta Heuristic Case 7');
right.contentNodes.unshift(op);
right.childNodes.unshift(left);
left.parent = right;
op.parent = right;
right.addMathmlNodes(op.mathml);
right.addMathmlNodes(left.mathml);
result = right;
}
else {
Debugger.getInstance().output('Juxta Heuristic Case 8');
result = SemanticHeuristics.factory.makeBranchNode(semantic_meaning_SemanticType.INFIXOP, [left, right], [op], op.textContent);
result.role = semantic_meaning_SemanticRole.IMPLICIT;
}
acc.push(result);
return recurseJuxtaposition(acc.concat(first), ops, elements);
}
SemanticHeuristics.add(new SemanticMultiHeuristic('intvar_from_implicit', implicitUnpack, (nodes) => nodes[0] && isImplicit(nodes[0])));
function implicitUnpack(nodes) {
const children = nodes[0].childNodes;
nodes.splice(0, 1, ...children);
}
SemanticHeuristics.add(new SemanticTreeHeuristic('intvar_from_fraction', integralFractionArg, (node) => {
if (node.type !== semantic_meaning_SemanticType.INTEGRAL)
return false;
const [, integrand, intvar] = node.childNodes;
return (intvar.type === semantic_meaning_SemanticType.EMPTY &&
integrand.type === semantic_meaning_SemanticType.FRACTION);
}));
function integralFractionArg(node) {
const integrand = node.childNodes[1];
const enumerator = integrand.childNodes[0];
if (isIntegralDxBoundarySingle(enumerator)) {
enumerator.role = semantic_meaning_SemanticRole.INTEGRAL;
return;
}
if (!isImplicit(enumerator))
return;
const length = enumerator.childNodes.length;
const first = enumerator.childNodes[length - 2];
const second = enumerator.childNodes[length - 1];
if (isIntegralDxBoundarySingle(second)) {
second.role = semantic_meaning_SemanticRole.INTEGRAL;
return;
}
if (isIntegralDxBoundary(first, second)) {
const prefix = SemanticProcessor.getInstance()['prefixNode_'](second, [
first
]);
prefix.role = semantic_meaning_SemanticRole.INTEGRAL;
if (length === 2) {
integrand.childNodes[0] = prefix;
}
else {
enumerator.childNodes.pop();
enumerator.contentNodes.pop();
enumerator.childNodes[length - 2] = prefix;
prefix.parent = enumerator;
}
}
}
SemanticHeuristics.add(new SemanticTreeHeuristic('rewrite_subcases', rewriteSubcasesTable, (table) => {
let left = true;
let right = true;
const topLeft = table.childNodes[0].childNodes[0];
if (!eligibleNode(topLeft.mathmlTree)) {
left = false;
}
else {
for (let i = 1, row; (row = table.childNodes[i]); i++) {
if (row.childNodes[0].childNodes.length) {
left = false;
break;
}
}
}
if (left) {
table.addAnnotation('Emph', 'left');
}
const topRight = table.childNodes[0].childNodes[table.childNodes[0].childNodes.length - 1];
if (!eligibleNode(topRight.mathmlTree)) {
right = false;
}
else {
const firstRow = table.childNodes[0].childNodes.length;
for (let i = 1, row; (row = table.childNodes[i]); i++) {
if (row.childNodes.length >= firstRow) {
right = false;
break;
}
}
}
if (right) {
table.addAnnotation('Emph', 'right');
}
return left || right;
}));
function eligibleNode(node) {
return (node.childNodes[0] &&
node.childNodes[0].childNodes[0] &&
dom_util_tagName(node.childNodes[0]) === MMLTAGS.MPADDED &&
dom_util_tagName(node.childNodes[0].childNodes[0]) ===
MMLTAGS.MPADDED &&
dom_util_tagName(node.childNodes[0].childNodes[node.childNodes[0].childNodes.length - 1]) === MMLTAGS.MPHANTOM);
}
const rewritable = [
semantic_meaning_SemanticType.PUNCTUATED,
semantic_meaning_SemanticType.RELSEQ,
semantic_meaning_SemanticType.MULTIREL,
semantic_meaning_SemanticType.INFIXOP,
semantic_meaning_SemanticType.PREFIXOP,
semantic_meaning_SemanticType.POSTFIXOP
];
function rewriteSubcasesTable(table) {
table.addAnnotation('Emph', 'top');
let row = [];
if (table.hasAnnotation('Emph', 'left')) {
const topLeft = table.childNodes[0].childNodes[0].childNodes[0];
const cells = rewriteCell(topLeft, true);
cells.forEach((x) => x.addAnnotation('Emph', 'left'));
row = row.concat(cells);
for (let i = 0, line; (line = table.childNodes[i]); i++) {
line.childNodes.shift();
}
}
row.push(table);
if (table.hasAnnotation('Emph', 'right')) {
const topRight = table.childNodes[0].childNodes[table.childNodes[0].childNodes.length - 1]
.childNodes[0];
const cells = rewriteCell(topRight);
cells.forEach((x) => x.addAnnotation('Emph', 'left'));
row = row.concat(cells);
table.childNodes[0].childNodes.pop();
}
SemanticProcessor.tableToMultiline(table);
const newNode = SemanticProcessor.getInstance().row(row);
const annotation = table.annotation['Emph'];
table.annotation['Emph'] = ['table'];
annotation.forEach((x) => newNode.addAnnotation('Emph', x));
return newNode;
}
function rewriteCell(cell, left) {
if (!cell.childNodes.length) {
rewriteFence(cell);
return [cell];
}
let fence = null;
if (cell.type === semantic_meaning_SemanticType.PUNCTUATED &&
(left
? cell.role === semantic_meaning_SemanticRole.ENDPUNCT
: cell.role === semantic_meaning_SemanticRole.STARTPUNCT)) {
const children = cell.childNodes;
if (rewriteFence(children[left ? children.length - 1 : 0])) {
cell = children[left ? 0 : children.length - 1];
fence = children[left ? children.length - 1 : 0];
}
}
if (rewritable.indexOf(cell.type) !== -1) {
const children = cell.childNodes;
rewriteFence(children[left ? children.length - 1 : 0]);
const newNodes = SemanticSkeleton.combineContentChildren(cell.type, cell.role, cell.contentNodes, cell.childNodes);
if (fence) {
if (left) {
newNodes.push(fence);
}
else {
newNodes.unshift(fence);
}
}
return newNodes;
}
return fence ? (left ? [cell, fence] : [fence, cell]) : [cell];
}
const PUNCT_TO_FENCE_ = {
[semantic_meaning_SemanticRole.METRIC]: semantic_meaning_SemanticRole.METRIC,
[semantic_meaning_SemanticRole.VBAR]: semantic_meaning_SemanticRole.NEUTRAL,
[semantic_meaning_SemanticRole.OPENFENCE]: semantic_meaning_SemanticRole.OPEN,
[semantic_meaning_SemanticRole.CLOSEFENCE]: semantic_meaning_SemanticRole.CLOSE
};
function rewriteFence(fence) {
if (fence.type !== semantic_meaning_SemanticType.PUNCTUATION) {
return false;
}
const role = PUNCT_TO_FENCE_[fence.role];
if (!role) {
return false;
}
fence.role = role;
fence.type = semantic_meaning_SemanticType.FENCE;
fence.addAnnotation('Emph', 'fence');
return true;
}
SemanticHeuristics.add(new SemanticMultiHeuristic('ellipses', (nodes) => {
const newNodes = [];
let current = nodes.shift();
while (current) {
[current, nodes] = combineNodes(current, nodes, semantic_meaning_SemanticRole.FULLSTOP, semantic_meaning_SemanticRole.ELLIPSIS);
[current, nodes] = combineNodes(current, nodes, semantic_meaning_SemanticRole.DASH);
newNodes.push(current);
current = nodes.shift();
}
return newNodes;
}, (nodes) => nodes.length > 1));
function combineNodes(current, nodes, src, target = src) {
const collect = [];
while (current && current.role === src) {
collect.push(current);
current = nodes.shift();
}
if (!collect.length) {
return [current, nodes];
}
if (current) {
nodes.unshift(current);
}
return [
collect.length === 1 ? collect[0] : combinedNodes(collect, target),
nodes
];
}
function combinedNodes(nodes, role) {
const node = SemanticHeuristics.factory.makeBranchNode(semantic_meaning_SemanticType.PUNCTUATION, nodes, []);
node.role = role;
return node;
}
SemanticHeuristics.add(new SemanticMultiHeuristic('op_with_limits', (nodes) => {
const center = nodes[0];
center.type = semantic_meaning_SemanticType.LARGEOP;
center.role = semantic_meaning_SemanticRole.SUM;
return nodes;
}, (nodes) => {
return (nodes[0].type === semantic_meaning_SemanticType.OPERATOR &&
nodes
.slice(1)
.some((node) => node.type === semantic_meaning_SemanticType.RELSEQ ||
node.type === semantic_meaning_SemanticType.MULTIREL ||
(node.type === semantic_meaning_SemanticType.INFIXOP &&
node.role === semantic_meaning_SemanticRole.ELEMENT) ||
(node.type === semantic_meaning_SemanticType.PUNCTUATED &&
node.role === semantic_meaning_SemanticRole.SEQUENCE)));
}));
SemanticHeuristics.add(new SemanticMmlHeuristic('function_from_identifiers', (node) => {
const expr = toArray(node.childNodes)
.map((x) => x.textContent.trim())
.join('');
const meaning = SemanticMap.Meaning.get(expr);
if (meaning.type === semantic_meaning_SemanticType.UNKNOWN) {
return node;
}
const snode = SemanticHeuristics.factory.makeLeafNode(expr, SemanticProcessor.getInstance().font(node.getAttribute('mathvariant')));
snode.mathmlTree = node;
return snode;
}, (node) => {
const children = toArray(node.childNodes);
if (children.length < 2) {
return false;
}
return children.every((child) => dom_util_tagName(child) === MMLTAGS.MI &&
SemanticMap.Meaning.get(child.textContent.trim()).role ===
semantic_meaning_SemanticRole.LATINLETTER);
}));
SemanticHeuristics.add(new SemanticMultiHeuristic('bracketed_interval', (nodes) => {
const leftFence = nodes[0];
const rightFence = nodes[1];
const content = nodes.slice(2);
const childNode = SemanticProcessor.getInstance().row(content);
const fenced = SemanticHeuristics.factory.makeBranchNode(semantic_meaning_SemanticType.FENCED, [childNode], [leftFence, rightFence]);
fenced.role = semantic_meaning_SemanticRole.INTERVAL;
return fenced;
}, (nodes) => {
const leftFence = nodes[0];
const rightFence = nodes[1];
const content = nodes.slice(2);
if (!(leftFence &&
rightFence &&
((isCloseBrack(leftFence.textContent) &&
(isOpenBrack(rightFence.textContent) || isCloseBrack((rightFence.textContent))) ||
(isOpenBrack(rightFence.textContent) &&
(isOpenBrack(leftFence.textContent) || isCloseBrack(leftFence.textContent))))))) {
return false;
}
if (content.length === 1 &&
content[0].type === semantic_meaning_SemanticType.PUNCTUATED &&
content[0].contentNodes.length === 1) {
return true;
}
const partition = partitionNodes(content, isPunctuation);
return !!(partition.rel.length === 1 &&
partition.comp[0].length &&
partition.comp[1].length);
}));
function isOpenBrack(str) {
return ['[', '['].includes(str);
}
function isCloseBrack(str) {
return [']', ']'].includes(str);
}
function isOpenParen(str) {
return ['(', '⁽', '₍'].includes(str);
}
function isCloseParen(str) {
return [')', '⁾', '₎'].includes(str);
}
function isInfty(node) {
return node.role === semantic_meaning_SemanticRole.INFTY ||
(node.type === semantic_meaning_SemanticType.PREFIXOP &&
node.childNodes[0].role === semantic_meaning_SemanticRole.INFTY);
}
SemanticHeuristics.add(new SemanticTreeHeuristic('interval_heuristic', (node) => {
node.role = semantic_meaning_SemanticRole.INTERVAL;
return node;
}, (node) => {
return isPotentialInterval(node);
}));
function isPotentialInterval(node) {
const child = node.childNodes[0];
if (node.type !== semantic_meaning_SemanticType.FENCED ||
(child === null || child === void 0 ? void 0 : child.type) !== semantic_meaning_SemanticType.PUNCTUATED ||
(child === null || child === void 0 ? void 0 : child.childNodes.length) !== 3 ||
(child === null || child === void 0 ? void 0 : child.contentNodes.length) !== 1 ||
(child === null || child === void 0 ? void 0 : child.childNodes[1].role) !== semantic_meaning_SemanticRole.COMMA) {
return false;
}
const first = node.childNodes[0].childNodes[0];
const second = node.childNodes[0].childNodes[2];
const left = node.contentNodes[0].textContent;
const right = node.contentNodes[1].textContent;
if ((isOpenBrack(left) && isCloseParen(right)) ||
(isOpenParen(left) && isCloseBrack(right))) {
return true;
}
if (isOpenParen(left) && isCloseParen(right) &&
(isInfty(first) || isInfty(second))) {
return true;
}
return false;
}
SemanticHeuristics.add(new SemanticTreeHeuristic('propagateInterval', (node) => {
node.childNodes.forEach(child => {
if (isPotentialInterval(child)) {
child.role = semantic_meaning_SemanticRole.INTERVAL;
}
});
return node;
}, (node) => {
return isMembership(node);
}));
//# sourceMappingURL=semantic_heuristics.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/special_annotators.js
function isSimpleExpression(node) {
return (isSimpleNumber_(node) ||
isSimpleLetters_(node) ||
isSimpleDegree_(node) ||
isSimpleNegative_(node) ||
isSimpleFunction_(node));
}
function isSimpleFunction_(node) {
return (node.type === semantic_meaning_SemanticType.APPL &&
(node.childNodes[0].role === semantic_meaning_SemanticRole.PREFIXFUNC ||
node.childNodes[0].role === semantic_meaning_SemanticRole.SIMPLEFUNC) &&
(isSimple_(node.childNodes[1]) ||
(node.childNodes[1].type === semantic_meaning_SemanticType.FENCED &&
isSimple_(node.childNodes[1].childNodes[0]))));
}
function isSimpleNegative_(node) {
return (node.type === semantic_meaning_SemanticType.PREFIXOP &&
node.role === semantic_meaning_SemanticRole.NEGATIVE &&
isSimple_(node.childNodes[0]) &&
node.childNodes[0].type !== semantic_meaning_SemanticType.PREFIXOP &&
node.childNodes[0].type !== semantic_meaning_SemanticType.APPL &&
node.childNodes[0].type !== semantic_meaning_SemanticType.PUNCTUATED);
}
function isSimpleDegree_(node) {
return (node.type === semantic_meaning_SemanticType.PUNCTUATED &&
node.role === semantic_meaning_SemanticRole.ENDPUNCT &&
node.childNodes.length === 2 &&
node.childNodes[1].role === semantic_meaning_SemanticRole.DEGREE &&
(isLetter_(node.childNodes[0]) ||
isNumber_(node.childNodes[0]) ||
(node.childNodes[0].type === semantic_meaning_SemanticType.PREFIXOP &&
node.childNodes[0].role === semantic_meaning_SemanticRole.NEGATIVE &&
(isLetter_(node.childNodes[0].childNodes[0]) ||
isNumber_(node.childNodes[0].childNodes[0])))));
}
function isSimpleLetters_(node) {
return (isLetter_(node) ||
(node.type === semantic_meaning_SemanticType.INFIXOP &&
node.role === semantic_meaning_SemanticRole.IMPLICIT &&
((node.childNodes.length === 2 &&
(isLetter_(node.childNodes[0]) ||
isSimpleNumber_(node.childNodes[0])) &&
isLetter_(node.childNodes[1])) ||
(node.childNodes.length === 3 &&
isSimpleNumber_(node.childNodes[0]) &&
isLetter_(node.childNodes[1]) &&
isLetter_(node.childNodes[2])))));
}
function isSimple_(node) {
return node.hasAnnotation('clearspeak', 'simple');
}
function isLetter_(node) {
return (node.type === semantic_meaning_SemanticType.IDENTIFIER &&
(node.role === semantic_meaning_SemanticRole.LATINLETTER ||
node.role === semantic_meaning_SemanticRole.GREEKLETTER ||
node.role === semantic_meaning_SemanticRole.OTHERLETTER ||
node.role === semantic_meaning_SemanticRole.SIMPLEFUNC));
}
function isNumber_(node) {
return (node.type === semantic_meaning_SemanticType.NUMBER &&
(node.role === semantic_meaning_SemanticRole.INTEGER || node.role === semantic_meaning_SemanticRole.FLOAT));
}
function isSimpleNumber_(node) {
return isNumber_(node) || isSimpleFraction_(node);
}
function isSimpleFraction_(node) {
if (hasPreference('Fraction_Over') || hasPreference('Fraction_FracOver')) {
return false;
}
if (node.type !== semantic_meaning_SemanticType.FRACTION ||
node.role !== semantic_meaning_SemanticRole.VULGAR) {
return false;
}
if (hasPreference('Fraction_Ordinal')) {
return true;
}
const enumerator = parseInt(node.childNodes[0].textContent, 10);
const denominator = parseInt(node.childNodes[1].textContent, 10);
return (enumerator > 0 && enumerator < 20 && denominator > 0 && denominator < 11);
}
function hasPreference(pref) {
return Engine.getInstance().options.style === pref;
}
register(new SemanticAnnotator('clearspeak', 'simple', function (node) {
return isSimpleExpression(node) ? 'simple' : '';
}));
activate('clearspeak', 'simple');
function isUnitExpression(node) {
return ((node.type === semantic_meaning_SemanticType.TEXT && node.role !== semantic_meaning_SemanticRole.LABEL) ||
(node.type === semantic_meaning_SemanticType.PUNCTUATED &&
node.role === semantic_meaning_SemanticRole.TEXT &&
isNumber_(node.childNodes[0]) &&
allTextLastContent_(node.childNodes.slice(1))) ||
(node.type === semantic_meaning_SemanticType.IDENTIFIER &&
node.role === semantic_meaning_SemanticRole.UNIT) ||
(node.type === semantic_meaning_SemanticType.INFIXOP &&
(node.role === semantic_meaning_SemanticRole.IMPLICIT || node.role === semantic_meaning_SemanticRole.UNIT)));
}
function allTextLastContent_(nodes) {
for (let i = 0; i < nodes.length - 1; i++) {
if (!(nodes[i].type === semantic_meaning_SemanticType.TEXT && nodes[i].textContent === '')) {
return false;
}
}
return nodes[nodes.length - 1].type === semantic_meaning_SemanticType.TEXT;
}
register(new SemanticAnnotator('clearspeak', 'unit', function (node) {
return isUnitExpression(node) ? 'unit' : '';
}));
activate('clearspeak', 'unit');
const NUMBER_PROPAGATORS = [
semantic_meaning_SemanticType.MULTIREL,
semantic_meaning_SemanticType.RELSEQ,
semantic_meaning_SemanticType.APPL,
semantic_meaning_SemanticType.ROW,
semantic_meaning_SemanticType.LINE
];
const NUMBER_INHIBITORS = [
semantic_meaning_SemanticType.SUBSCRIPT,
semantic_meaning_SemanticType.SUPERSCRIPT,
semantic_meaning_SemanticType.OVERSCORE,
semantic_meaning_SemanticType.UNDERSCORE
];
function checkParent(node, info) {
const parent = node.parent;
if (!parent) {
return false;
}
const type = parent.type;
if (NUMBER_PROPAGATORS.indexOf(type) !== -1 ||
(type === semantic_meaning_SemanticType.PREFIXOP &&
parent.role === semantic_meaning_SemanticRole.NEGATIVE &&
!info.script &&
!info.enclosed) ||
(type === semantic_meaning_SemanticType.PREFIXOP &&
parent.role === semantic_meaning_SemanticRole.GEOMETRY)) {
return true;
}
if (type === semantic_meaning_SemanticType.PUNCTUATED) {
if (!info.enclosed || parent.role === semantic_meaning_SemanticRole.TEXT) {
return true;
}
}
return false;
}
function propagateNumber(node, info) {
if (!node.childNodes.length) {
if (checkParent(node, info)) {
info.number = true;
info.script = false;
info.enclosed = false;
}
return [
info['number'] ? 'number' : '',
{ number: false, enclosed: info.enclosed, script: info.script }
];
}
if (NUMBER_INHIBITORS.indexOf(node.type) !== -1) {
info.script = true;
}
if (node.type === semantic_meaning_SemanticType.FENCED) {
info.number = false;
info.enclosed = true;
return ['', info];
}
if (node.type === semantic_meaning_SemanticType.PREFIXOP &&
node.role !== semantic_meaning_SemanticRole.GEOMETRY &&
node.role !== semantic_meaning_SemanticRole.NEGATIVE) {
info.number = false;
return ['', info];
}
if (checkParent(node, info)) {
info.number = true;
info.enclosed = false;
}
return ['', info];
}
register(new SemanticVisitor('nemeth', 'number', propagateNumber, { number: true }));
activate('nemeth', 'number');
function annotateDepth(node) {
if (!node.parent) {
return [1];
}
const depth = parseInt(node.parent.annotation['depth'][0]);
return [depth + 1];
}
register(new SemanticVisitor('depth', 'depth', annotateDepth));
activate('depth', 'depth');
//# sourceMappingURL=special_annotators.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic_tree.js
class SemanticTree {
static empty() {
const empty = parseInput(' ');
const stree = new SemanticTree(empty, new Options());
stree.mathml = empty;
return stree;
}
static fromNode(semantic, opt_mathml) {
const stree = SemanticTree.empty();
stree.root = semantic;
if (opt_mathml) {
stree.mathml = opt_mathml;
}
return stree;
}
static fromRoot(semantic, opt_mathml) {
let root = semantic;
while (root.parent) {
root = root.parent;
}
const stree = SemanticTree.fromNode(root);
if (opt_mathml) {
stree.mathml = opt_mathml;
}
return stree;
}
static fromXml(xml) {
const stree = SemanticTree.empty();
if (xml.childNodes[0]) {
stree.root = SemanticNode.fromXml(xml.childNodes[0]);
}
return stree;
}
constructor(mathml, options) {
this.mathml = mathml;
this.options = options;
this.parser = new SemanticMathml(options);
this.root = this.parser.parse(mathml);
this.collator = this.parser.getFactory().leafMap.collateMeaning();
const newDefault = this.collator.newDefault();
if (newDefault) {
this.parser = new SemanticMathml(options);
this.parser.getFactory().defaultMap = newDefault;
this.root = this.parser.parse(mathml);
}
unitVisitor.visit(this.root, {});
annotate(this.root);
}
xml(opt_brief) {
const xml = parseInput(' ');
const xmlRoot = this.root.xml(xml.ownerDocument, opt_brief);
xml.appendChild(xmlRoot);
return xml;
}
toString(opt_brief) {
return serializeXml(this.xml(opt_brief));
}
formatXml(opt_brief) {
const xml = this.toString(opt_brief);
return formatXml(xml);
}
displayTree() {
this.root.displayTree();
}
replaceNode(oldNode, newNode) {
const parent = oldNode.parent;
if (!parent) {
this.root = newNode;
return;
}
parent.replaceChild(oldNode, newNode);
}
toJson() {
const json = {};
json['stree'] = this.root.toJson();
return json;
}
}
const unitVisitor = new SemanticVisitor('general', 'unit', (node, _info) => {
if (isUnitProduct(node)) {
node.role = semantic_meaning_SemanticRole.UNIT;
}
return false;
});
//# sourceMappingURL=semantic_tree.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/semantic_tree/semantic.js
function xmlTree(mml, options) {
return getTree(mml, options).xml();
}
function getTree(mml, options) {
return new SemanticTree(mml, options);
}
function getTreeFromString(expr, options) {
const mml = DomUtil.parseInput(expr);
return getTree(mml, options);
}
//# sourceMappingURL=semantic.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/enrich_case.js
function getCase(node) {
for (let i = 0, enrich; (enrich = factory[i]); i++) {
if (enrich.test(node)) {
return enrich.constr(node);
}
}
return null;
}
const factory = [];
//# sourceMappingURL=enrich_case.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/enrich_mathml.js
const SETTINGS = {
collapsed: true,
implicit: true
};
const IDS = new Map();
function enrich(mml, semantic, options) {
Debugger.getInstance().generate(() => [
'Original MathML',
formattedOutput(mml)
]);
IDS.clear();
walkTree(semantic.root);
if (options.structure) {
mml.setAttribute(enrich_attr_Attribute.STRUCTURE, SemanticSkeleton.fromStructure(mml, semantic, options).toString());
}
Debugger.getInstance().generate(() => [
'Semantic Tree\n',
formattedOutput(semantic),
'Semantically enriched MathML\n',
formattedOutput(mml)
]);
return mml;
}
function walkTree(semantic) {
Debugger.getInstance().generate(() => [
'WALKING START: ',
semantic.toString()
]);
const specialCase = getCase(semantic);
let newNode;
if (specialCase) {
newNode = specialCase.getMathml();
Debugger.getInstance().generate(() => [
'WALKING END: ',
semantic.toString()
]);
return ascendNewNode(newNode);
}
if (semantic.mathml.length === 1) {
Debugger.getInstance().output('Walktree Case 0');
if (!semantic.childNodes.length) {
Debugger.getInstance().output('Walktree Case 0.1');
newNode = semantic.mathml[0];
setAttributes(newNode, semantic);
Debugger.getInstance().generate(() => [
'WALKING END: ',
semantic.toString()
]);
return ascendNewNode(newNode);
}
const fchild = semantic.childNodes[0];
if (semantic.childNodes.length === 1 &&
fchild.type === semantic_meaning_SemanticType.EMPTY) {
Debugger.getInstance().output('Walktree Case 0.2');
newNode = semantic.mathml[0];
setAttributes(newNode, semantic);
newNode.appendChild(walkTree(fchild));
Debugger.getInstance().generate(() => [
'WALKING END: ',
semantic.toString()
]);
return ascendNewNode(newNode);
}
semantic.childNodes.forEach((child) => {
if (!child.mathml.length) {
child.mathml = [createInvisibleOperator(child)];
}
});
}
const newContent = semantic.contentNodes.map(cloneContentNode);
setOperatorAttribute(semantic, newContent);
const newChildren = semantic.childNodes.map(walkTree);
const childrenList = SemanticSkeleton.combineContentChildren(semantic.type, semantic.role, newContent, newChildren);
newNode = semantic.mathmlTree;
if (newNode === null) {
Debugger.getInstance().output('Walktree Case 1');
newNode = introduceNewLayer(childrenList, semantic);
}
else {
const attached = attachedElement(childrenList);
Debugger.getInstance().output('Walktree Case 2');
if (attached) {
Debugger.getInstance().output('Walktree Case 2.1');
newNode = parentNode(attached);
}
else {
Debugger.getInstance().output('Walktree Case 2.2');
newNode = getInnerNode(newNode);
}
}
newNode = rewriteMfenced(newNode);
mergeChildren(newNode, childrenList, semantic);
if (!IDS.has(semantic.id)) {
IDS.set(semantic.id, true);
setAttributes(newNode, semantic);
}
Debugger.getInstance().generate(() => ['WALKING END: ', semantic.toString()]);
return ascendNewNode(newNode);
}
function introduceNewLayer(children, semantic) {
const lca = mathmlLca(children);
let newNode = lca.node;
const info = lca.type;
if (info !== lcaType.VALID ||
!hasEmptyTag(newNode) ||
(!newNode.parentNode && semantic.parent)) {
Debugger.getInstance().output('Walktree Case 1.1');
newNode = addMrow();
if (info === lcaType.PRUNED) {
Debugger.getInstance().output('Walktree Case 1.1.0');
newNode = introduceLayerAboveLca(newNode, lca.node, children);
}
else if (children[0]) {
Debugger.getInstance().output('Walktree Case 1.1.1');
const node = attachedElement(children);
if (node) {
const oldChildren = childrenSubset(parentNode(node), children);
replaceNode(node, newNode);
oldChildren.forEach(function (x) {
newNode.appendChild(x);
});
}
else {
moveSemanticAttributes(newNode, children[0]);
newNode = children[0];
}
}
}
if (!semantic.mathmlTree) {
semantic.mathmlTree = newNode;
}
return newNode;
}
function introduceLayerAboveLca(mrow, lca, children) {
let innerNode = descendNode(lca);
if (hasMathTag(innerNode)) {
Debugger.getInstance().output('Walktree Case 1.1.0.0');
moveSemanticAttributes(innerNode, mrow);
toArray(innerNode.childNodes).forEach(function (x) {
mrow.appendChild(x);
});
const auxNode = mrow;
mrow = innerNode;
innerNode = auxNode;
}
const index = children.indexOf(lca);
children[index] = innerNode;
replaceNode(innerNode, mrow);
mrow.appendChild(innerNode);
children.forEach(function (x) {
mrow.appendChild(x);
});
return mrow;
}
function moveSemanticAttributes(oldNode, newNode) {
for (const attr of EnrichAttributes) {
if (oldNode.hasAttribute(attr)) {
newNode.setAttribute(attr, oldNode.getAttribute(attr));
oldNode.removeAttribute(attr);
}
}
}
function childrenSubset(node, newChildren) {
const oldChildren = toArray(node.childNodes);
let leftIndex = +Infinity;
let rightIndex = -Infinity;
newChildren.forEach(function (child) {
const index = oldChildren.indexOf(child);
if (index !== -1) {
leftIndex = Math.min(leftIndex, index);
rightIndex = Math.max(rightIndex, index);
}
});
return oldChildren.slice(leftIndex, rightIndex + 1);
}
function collateChildNodes(node, children, semantic) {
const oldChildren = [];
let newChildren = toArray(node.childNodes);
let notFirst = false;
while (newChildren.length) {
const child = newChildren.shift();
if (child.hasAttribute(enrich_attr_Attribute.TYPE)) {
oldChildren.push(child);
continue;
}
const collect = collectChildNodes(child, children);
if (collect.length === 0) {
continue;
}
if (collect.length === 1) {
oldChildren.push(child);
continue;
}
if (notFirst) {
child.setAttribute('AuxiliaryImplicit', true);
}
else {
notFirst = true;
}
newChildren = collect.concat(newChildren);
}
const rear = [];
const semChildren = semantic.childNodes.map(function (x) {
return x.mathmlTree;
});
while (semChildren.length) {
const schild = semChildren.pop();
if (!schild) {
continue;
}
if (oldChildren.indexOf(schild) !== -1) {
break;
}
if (children.indexOf(schild) !== -1) {
rear.unshift(schild);
}
}
return oldChildren.concat(rear);
}
function collectChildNodes(node, children) {
const collect = [];
let newChildren = toArray(node.childNodes);
while (newChildren.length) {
const child = newChildren.shift();
if (child.nodeType !== NodeType.ELEMENT_NODE) {
continue;
}
if (child.hasAttribute(enrich_attr_Attribute.TYPE) ||
children.indexOf(child) !== -1) {
collect.push(child);
continue;
}
newChildren = toArray(child.childNodes).concat(newChildren);
}
return collect;
}
function mergeChildren(node, newChildren, semantic) {
if (!newChildren.length)
return;
if (newChildren.length === 1 && node === newChildren[0])
return;
const oldChildren = semantic.role === semantic_meaning_SemanticRole.IMPLICIT &&
SemanticHeuristics.flags.combine_juxtaposition
? collateChildNodes(node, newChildren, semantic)
: toArray(node.childNodes);
if (!oldChildren.length) {
newChildren.forEach(function (x) {
node.appendChild(x);
});
return;
}
let oldCounter = 0;
while (newChildren.length) {
const newChild = newChildren[0];
if (oldChildren[oldCounter] === newChild ||
functionApplication(oldChildren[oldCounter], newChild)) {
newChildren.shift();
oldCounter++;
continue;
}
if (oldChildren[oldCounter] &&
newChildren.indexOf(oldChildren[oldCounter]) === -1) {
oldCounter++;
continue;
}
if (isDescendant(newChild, node)) {
newChildren.shift();
continue;
}
const oldChild = oldChildren[oldCounter];
if (!oldChild) {
if (newChild.parentNode) {
node = parentNode(newChild);
newChildren.shift();
continue;
}
const nextChild = newChildren[1];
if (nextChild && nextChild.parentNode) {
node = parentNode(nextChild);
node.insertBefore(newChild, nextChild);
newChildren.shift();
newChildren.shift();
continue;
}
node.insertBefore(newChild, null);
newChildren.shift();
continue;
}
insertNewChild(node, oldChild, newChild);
newChildren.shift();
}
}
function insertNewChild(node, oldChild, newChild) {
let parent = oldChild;
let next = parentNode(parent);
while (next &&
next.firstChild === parent &&
!parent.hasAttribute('AuxiliaryImplicit') &&
next !== node) {
parent = next;
next = parentNode(parent);
}
if (next) {
next.insertBefore(newChild, parent);
parent.removeAttribute('AuxiliaryImplicit');
}
}
function isDescendant(child, node) {
if (!child) {
return false;
}
do {
child = parentNode(child);
if (child === node) {
return true;
}
} while (child);
return false;
}
function functionApplication(oldNode, newNode) {
const appl = NamedSymbol.functionApplication;
if (oldNode &&
newNode &&
oldNode.textContent &&
newNode.textContent &&
oldNode.textContent === appl &&
newNode.textContent === appl &&
newNode.getAttribute(enrich_attr_Attribute.ADDED) === 'true') {
for (let i = 0, attr; (attr = oldNode.attributes[i]); i++) {
if (!newNode.hasAttribute(attr.nodeName)) {
newNode.setAttribute(attr.nodeName, attr.nodeValue);
}
}
replaceNode(oldNode, newNode);
return true;
}
return false;
}
var lcaType;
(function (lcaType) {
lcaType["VALID"] = "valid";
lcaType["INVALID"] = "invalid";
lcaType["PRUNED"] = "pruned";
})(lcaType || (lcaType = {}));
function mathmlLca(children) {
const leftMost = attachedElement(children);
if (!leftMost) {
return { type: lcaType.INVALID, node: null };
}
const rightMost = attachedElement(children.slice().reverse());
if (leftMost === rightMost) {
return { type: lcaType.VALID, node: leftMost };
}
const leftPath = pathToRoot(leftMost);
const newLeftPath = prunePath(leftPath, children);
const rightPath = pathToRoot(rightMost, function (x) {
return newLeftPath.indexOf(x) !== -1;
});
const lca = rightPath[0];
const lIndex = newLeftPath.indexOf(lca);
if (lIndex === -1) {
return { type: lcaType.INVALID, node: null };
}
return {
type: newLeftPath.length !== leftPath.length
? lcaType.PRUNED
: validLca(newLeftPath[lIndex + 1], rightPath[1])
? lcaType.VALID
: lcaType.INVALID,
node: lca
};
}
function prunePath(path, children) {
let i = 0;
while (path[i] && children.indexOf(path[i]) === -1) {
i++;
}
return path.slice(0, i + 1);
}
function attachedElement(nodes) {
let count = 0;
let attached = null;
while (!attached && count < nodes.length) {
if (nodes[count].parentNode) {
attached = nodes[count];
}
count++;
}
return attached;
}
function pathToRoot(node, opt_test) {
const test = opt_test || ((_x) => false);
const path = [node];
while (!test(node) && !hasMathTag(node) && node.parentNode) {
node = parentNode(node);
path.unshift(node);
}
return path;
}
function validLca(left, right) {
return !!(left && right && !left.previousSibling && !right.nextSibling);
}
function ascendNewNode(newNode) {
while (!hasMathTag(newNode) && unitChild(newNode)) {
newNode = parentNode(newNode);
}
return newNode;
}
function descendNode(node) {
const children = toArray(node.childNodes);
if (!children) {
return node;
}
const remainder = children.filter(function (child) {
return (child.nodeType === NodeType.ELEMENT_NODE &&
!hasIgnoreTag(child));
});
if (remainder.length === 1 &&
hasEmptyTag(remainder[0]) &&
!remainder[0].hasAttribute(enrich_attr_Attribute.TYPE)) {
return descendNode(remainder[0]);
}
return node;
}
function unitChild(node) {
const parent = parentNode(node);
if (!parent || !hasEmptyTag(parent)) {
return false;
}
return toArray(parent.childNodes).every(function (child) {
return child === node || isIgnorable(child);
});
}
function isIgnorable(node) {
if (node.nodeType !== NodeType.ELEMENT_NODE) {
return true;
}
if (!node || hasIgnoreTag(node)) {
return true;
}
const children = toArray(node.childNodes);
if ((!hasEmptyTag(node) && children.length) ||
hasDisplayTag(node) ||
node.hasAttribute(enrich_attr_Attribute.TYPE) ||
isOrphanedGlyph(node)) {
return false;
}
return toArray(node.childNodes).every(isIgnorable);
}
function parentNode(element) {
return element.parentNode;
}
function addCollapsedAttribute(node, collapsed) {
const skeleton = new SemanticSkeleton(collapsed);
node.setAttribute(enrich_attr_Attribute.COLLAPSED, skeleton.toString());
}
function cloneContentNode(content) {
if (content.mathml.length) {
return walkTree(content);
}
const clone = SETTINGS.implicit
? createInvisibleOperator(content)
: addMrow();
content.mathml = [clone];
return clone;
}
function rewriteMfenced(mml) {
if (dom_util_tagName(mml) !== MMLTAGS.MFENCED) {
return mml;
}
const newNode = addMrow();
for (let i = 0, attr; (attr = mml.attributes[i]); i++) {
if (['open', 'close', 'separators'].indexOf(attr.name) === -1) {
newNode.setAttribute(attr.name, attr.value);
}
}
toArray(mml.childNodes).forEach(function (x) {
newNode.appendChild(x);
});
replaceNode(mml, newNode);
return newNode;
}
function createInvisibleOperator(operator) {
const moNode = createElement('mo');
const text = createTextNode(operator.textContent);
moNode.appendChild(text);
setAttributes(moNode, operator);
moNode.setAttribute(enrich_attr_Attribute.ADDED, 'true');
return moNode;
}
function setOperatorAttribute(semantic, content) {
const operator = semantic.type + (semantic.textContent ? ',' + semantic.textContent : '');
content.forEach(function (c) {
getInnerNode(c).setAttribute(enrich_attr_Attribute.OPERATOR, operator);
});
}
function getInnerNode(node) {
const children = toArray(node.childNodes);
if (!children) {
return node;
}
const remainder = children.filter(function (child) {
return !isIgnorable(child);
});
const result = [];
for (let i = 0, remain; (remain = remainder[i]); i++) {
if (hasEmptyTag(remain) &&
remain.getAttribute(enrich_attr_Attribute.TYPE) !==
semantic_meaning_SemanticType.PUNCTUATION) {
const nextInner = getInnerNode(remain);
if (nextInner && nextInner !== remain) {
result.push(nextInner);
}
}
else {
result.push(remain);
}
}
if (result.length === 1) {
return result[0];
}
return node;
}
function formattedOutput(element) {
return removeAttributePrefix(formatXml(element.toString()));
}
function collapsePunctuated(semantic, opt_children) {
const optional = !!opt_children;
const children = opt_children || [];
const parent = semantic.parent;
const contentIds = semantic.contentNodes.map(function (x) {
return x.id;
});
contentIds.unshift('c');
const childIds = [semantic.id, contentIds];
for (let i = 0, child; (child = semantic.childNodes[i]); i++) {
const mmlChild = walkTree(child);
children.push(mmlChild);
const innerNode = getInnerNode(mmlChild);
if (parent && !optional) {
innerNode.setAttribute(enrich_attr_Attribute.PARENT, parent.id.toString());
}
childIds.push(child.id);
}
return childIds;
}
//# sourceMappingURL=enrich_mathml.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/abstract_enrich_case.js
class AbstractEnrichCase {
constructor(semantic) {
this.semantic = semantic;
}
}
//# sourceMappingURL=abstract_enrich_case.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_binomial.js
class CaseBinomial extends AbstractEnrichCase {
static test(semantic) {
return (!semantic.mathmlTree &&
semantic.type === semantic_meaning_SemanticType.LINE &&
semantic.role === semantic_meaning_SemanticRole.BINOMIAL);
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
if (!this.semantic.childNodes.length) {
return this.mml;
}
const child = this.semantic.childNodes[0];
this.mml = walkTree(child);
if (this.mml.hasAttribute(enrich_attr_Attribute.TYPE)) {
const mrow = addMrow();
replaceNode(this.mml, mrow);
mrow.appendChild(this.mml);
this.mml = mrow;
}
setAttributes(this.mml, this.semantic);
return this.mml;
}
}
//# sourceMappingURL=case_binomial.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_double_script.js
class CaseDoubleScript extends AbstractEnrichCase {
static test(semantic) {
if (!semantic.mathmlTree || !semantic.childNodes.length) {
return false;
}
const mmlTag = dom_util_tagName(semantic.mathmlTree);
const role = semantic.childNodes[0].role;
return ((mmlTag === MMLTAGS.MSUBSUP && role === semantic_meaning_SemanticRole.SUBSUP) ||
(mmlTag === MMLTAGS.MUNDEROVER && role === semantic_meaning_SemanticRole.UNDEROVER));
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
const ignore = this.semantic.childNodes[0];
const baseSem = ignore.childNodes[0];
const supSem = this.semantic.childNodes[1];
const subSem = ignore.childNodes[1];
const supMml = walkTree(supSem);
const baseMml = walkTree(baseSem);
const subMml = walkTree(subSem);
setAttributes(this.mml, this.semantic);
this.mml.setAttribute(enrich_attr_Attribute.CHILDREN, makeIdList([baseSem, subSem, supSem]));
[baseMml, subMml, supMml].forEach((child) => getInnerNode(child).setAttribute(enrich_attr_Attribute.PARENT, this.mml.getAttribute(enrich_attr_Attribute.ID)));
this.mml.setAttribute(enrich_attr_Attribute.TYPE, ignore.role);
addCollapsedAttribute(this.mml, [
this.semantic.id,
[ignore.id, baseSem.id, subSem.id],
supSem.id
]);
return this.mml;
}
}
//# sourceMappingURL=case_double_script.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_multiindex.js
class CaseMultiindex extends AbstractEnrichCase {
static multiscriptIndex(index) {
if (index.type === semantic_meaning_SemanticType.PUNCTUATED &&
index.contentNodes[0].role === semantic_meaning_SemanticRole.DUMMY) {
return collapsePunctuated(index);
}
walkTree(index);
return index.id;
}
static createNone_(semantic) {
const newNode = createElement('none');
if (semantic) {
setAttributes(newNode, semantic);
}
newNode.setAttribute(enrich_attr_Attribute.ADDED, 'true');
return newNode;
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
completeMultiscript(rightIndices, leftIndices) {
const children = toArray(this.mml.childNodes).slice(1);
let childCounter = 0;
const completeIndices = (indices) => {
for (const index of indices) {
const child = children[childCounter];
if (child && index === parseInt(child.getAttribute(enrich_attr_Attribute.ID))) {
child.setAttribute(enrich_attr_Attribute.PARENT, this.semantic.id.toString());
childCounter++;
}
else if (!child ||
index !==
parseInt(getInnerNode(child).getAttribute(enrich_attr_Attribute.ID))) {
const query = this.semantic.querySelectorAll((x) => x.id === index);
this.mml.insertBefore(CaseMultiindex.createNone_(query[0]), child || null);
}
else {
getInnerNode(child).setAttribute(enrich_attr_Attribute.PARENT, this.semantic.id.toString());
childCounter++;
}
}
};
completeIndices(rightIndices);
if (children[childCounter] &&
dom_util_tagName(children[childCounter]) !== MMLTAGS.MPRESCRIPTS) {
this.mml.insertBefore(children[childCounter], createElement('mprescripts'));
}
else {
childCounter++;
}
completeIndices(leftIndices);
}
}
//# sourceMappingURL=case_multiindex.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_multiscripts.js
class CaseMultiscripts extends CaseMultiindex {
static test(semantic) {
if (!semantic.mathmlTree) {
return false;
}
const mmlTag = dom_util_tagName(semantic.mathmlTree);
return (mmlTag === MMLTAGS.MMULTISCRIPTS &&
(semantic.type === semantic_meaning_SemanticType.SUPERSCRIPT ||
semantic.type === semantic_meaning_SemanticType.SUBSCRIPT));
}
constructor(semantic) {
super(semantic);
}
getMathml() {
setAttributes(this.mml, this.semantic);
let baseSem, rsup, rsub;
if (this.semantic.childNodes[0] &&
this.semantic.childNodes[0].role === semantic_meaning_SemanticRole.SUBSUP) {
const ignore = this.semantic.childNodes[0];
baseSem = ignore.childNodes[0];
rsup = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]);
rsub = CaseMultiindex.multiscriptIndex(ignore.childNodes[1]);
const collapsed = [this.semantic.id, [ignore.id, baseSem.id, rsub], rsup];
addCollapsedAttribute(this.mml, collapsed);
this.mml.setAttribute(enrich_attr_Attribute.TYPE, ignore.role);
this.completeMultiscript(SemanticSkeleton.interleaveIds(rsub, rsup), []);
}
else {
baseSem = this.semantic.childNodes[0];
rsup = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]);
const collapsed = [this.semantic.id, baseSem.id, rsup];
addCollapsedAttribute(this.mml, collapsed);
}
const childIds = SemanticSkeleton.collapsedLeafs(rsub || [], rsup);
const base = walkTree(baseSem);
getInnerNode(base).setAttribute(enrich_attr_Attribute.PARENT, this.semantic.id.toString());
childIds.unshift(baseSem.id);
this.mml.setAttribute(enrich_attr_Attribute.CHILDREN, childIds.join(','));
return this.mml;
}
}
//# sourceMappingURL=case_multiscripts.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_tensor.js
class CaseTensor extends CaseMultiindex {
static test(semantic) {
return !!semantic.mathmlTree && semantic.type === semantic_meaning_SemanticType.TENSOR;
}
constructor(semantic) {
super(semantic);
}
getMathml() {
walkTree(this.semantic.childNodes[0]);
const lsub = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]);
const lsup = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[2]);
const rsub = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[3]);
const rsup = CaseMultiindex.multiscriptIndex(this.semantic.childNodes[4]);
setAttributes(this.mml, this.semantic);
const collapsed = [
this.semantic.id,
this.semantic.childNodes[0].id,
lsub,
lsup,
rsub,
rsup
];
addCollapsedAttribute(this.mml, collapsed);
const childIds = SemanticSkeleton.collapsedLeafs(lsub, lsup, rsub, rsup);
childIds.unshift(this.semantic.childNodes[0].id);
this.mml.setAttribute(enrich_attr_Attribute.CHILDREN, childIds.join(','));
this.completeMultiscript(SemanticSkeleton.interleaveIds(rsub, rsup), SemanticSkeleton.interleaveIds(lsub, lsup));
return this.mml;
}
}
//# sourceMappingURL=case_tensor.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_embellished.js
class CaseEmbellished extends AbstractEnrichCase {
static test(semantic) {
return !!(semantic.mathmlTree &&
semantic.fencePointer &&
!semantic.mathmlTree.getAttribute('data-semantic-type'));
}
static makeEmptyNode_(id) {
const mrow = addMrow();
const empty = new SemanticNode(id);
empty.type = semantic_meaning_SemanticType.EMPTY;
empty.mathmlTree = mrow;
return empty;
}
static fencedMap_(fence, ids) {
ids[fence.id] = fence.mathmlTree;
if (!fence.embellished) {
return;
}
CaseEmbellished.fencedMap_(fence.childNodes[0], ids);
}
constructor(semantic) {
super(semantic);
this.fenced = null;
this.fencedMml = null;
this.fencedMmlNodes = [];
this.ofence = null;
this.ofenceMml = null;
this.ofenceMap = {};
this.cfence = null;
this.cfenceMml = null;
this.cfenceMap = {};
this.parentCleanup = [];
}
getMathml() {
this.getFenced_();
this.fencedMml = walkTree(this.fenced);
this.getFencesMml_();
if (this.fenced.type === semantic_meaning_SemanticType.EMPTY && !this.fencedMml.parentNode) {
this.fencedMml.setAttribute(enrich_attr_Attribute.ADDED, 'true');
this.cfenceMml.parentNode.insertBefore(this.fencedMml, this.cfenceMml);
}
this.getFencedMml_();
const rewrite = this.rewrite_();
return rewrite;
}
fencedElement(node) {
return (node.type === semantic_meaning_SemanticType.FENCED ||
node.type === semantic_meaning_SemanticType.MATRIX ||
node.type === semantic_meaning_SemanticType.VECTOR);
}
getFenced_() {
let currentNode = this.semantic;
while (!this.fencedElement(currentNode)) {
currentNode = currentNode.childNodes[0];
}
this.fenced = currentNode.childNodes[0];
this.ofence = currentNode.contentNodes[0];
this.cfence = currentNode.contentNodes[1];
CaseEmbellished.fencedMap_(this.ofence, this.ofenceMap);
CaseEmbellished.fencedMap_(this.cfence, this.cfenceMap);
}
getFencedMml_() {
let sibling = this.ofenceMml.nextSibling;
sibling = sibling === this.fencedMml ? sibling : this.fencedMml;
while (sibling && sibling !== this.cfenceMml) {
this.fencedMmlNodes.push(sibling);
sibling = sibling.nextSibling;
}
}
getFencesMml_() {
let currentNode = this.semantic;
const ofenceIds = Object.keys(this.ofenceMap);
const cfenceIds = Object.keys(this.cfenceMap);
while ((!this.ofenceMml || !this.cfenceMml) &&
currentNode !== this.fenced) {
if (ofenceIds.indexOf(currentNode.fencePointer) !== -1 &&
!this.ofenceMml) {
this.ofenceMml = currentNode.mathmlTree;
}
if (cfenceIds.indexOf(currentNode.fencePointer) !== -1 &&
!this.cfenceMml) {
this.cfenceMml = currentNode.mathmlTree;
}
currentNode = currentNode.childNodes[0];
}
if (!this.ofenceMml) {
this.ofenceMml = this.ofence.mathmlTree;
}
if (!this.cfenceMml) {
this.cfenceMml = this.cfence.mathmlTree;
}
if (this.ofenceMml) {
this.ofenceMml = ascendNewNode(this.ofenceMml);
}
if (this.cfenceMml) {
this.cfenceMml = ascendNewNode(this.cfenceMml);
}
}
rewrite_() {
let currentNode = this.semantic;
let result = null;
const newNode = this.introduceNewLayer_();
setAttributes(newNode, this.fenced.parent);
while (!this.fencedElement(currentNode)) {
const mml = currentNode.mathmlTree;
const specialCase = this.specialCase_(currentNode, mml);
if (specialCase) {
currentNode = specialCase;
}
else {
setAttributes(mml, currentNode);
const mmlChildren = [];
for (let i = 1, child; (child = currentNode.childNodes[i]); i++) {
mmlChildren.push(walkTree(child));
}
currentNode = currentNode.childNodes[0];
}
const dummy = createElement('dummy');
const saveChild = mml.childNodes[0];
replaceNode(mml, dummy);
replaceNode(newNode, mml);
replaceNode(mml.childNodes[0], newNode);
replaceNode(dummy, saveChild);
if (!result) {
result = mml;
}
}
walkTree(this.ofence);
walkTree(this.cfence);
this.cleanupParents_();
return result || newNode;
}
specialCase_(semantic, mml) {
const mmlTag = dom_util_tagName(mml);
let parent = null;
let caller;
if (mmlTag === MMLTAGS.MSUBSUP) {
parent = semantic.childNodes[0];
caller = CaseDoubleScript;
}
else if (mmlTag === MMLTAGS.MMULTISCRIPTS) {
if (semantic.type === semantic_meaning_SemanticType.SUPERSCRIPT ||
semantic.type === semantic_meaning_SemanticType.SUBSCRIPT) {
caller = CaseMultiscripts;
}
else if (semantic.type === semantic_meaning_SemanticType.TENSOR) {
caller = CaseTensor;
}
if (caller &&
semantic.childNodes[0] &&
semantic.childNodes[0].role === semantic_meaning_SemanticRole.SUBSUP) {
parent = semantic.childNodes[0];
}
else {
parent = semantic;
}
}
if (!parent) {
return null;
}
const base = parent.childNodes[0];
const empty = CaseEmbellished.makeEmptyNode_(base.id);
parent.childNodes[0] = empty;
mml = new caller(semantic).getMathml();
parent.childNodes[0] = base;
this.parentCleanup.push(mml);
return parent.childNodes[0];
}
introduceNewLayer_() {
const fullOfence = this.fullFence(this.ofenceMml);
const fullCfence = this.fullFence(this.cfenceMml);
let newNode = addMrow();
replaceNode(this.fencedMml, newNode);
this.fencedMmlNodes.forEach((node) => newNode.appendChild(node));
newNode.insertBefore(fullOfence, this.fencedMml);
newNode.appendChild(fullCfence);
if (!newNode.parentNode) {
const mrow = addMrow();
while (newNode.childNodes.length > 0) {
mrow.appendChild(newNode.childNodes[0]);
}
newNode.appendChild(mrow);
newNode = mrow;
}
return newNode;
}
fullFence(fence) {
const parent = this.fencedMml.parentNode;
let currentFence = fence;
while (currentFence.parentNode && currentFence.parentNode !== parent) {
currentFence = currentFence.parentNode;
}
return currentFence;
}
cleanupParents_() {
this.parentCleanup.forEach(function (x) {
const parent = x.childNodes[1].getAttribute(enrich_attr_Attribute.PARENT);
x.childNodes[0].setAttribute(enrich_attr_Attribute.PARENT, parent);
});
}
}
//# sourceMappingURL=case_embellished.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_empheq.js
class CaseEmpheq extends AbstractEnrichCase {
static test(semantic) {
return !!semantic.mathmlTree && semantic.hasAnnotation('Emph', 'top');
}
constructor(semantic) {
super(semantic);
this.mrows = [];
this.mml = semantic.mathmlTree;
}
getMathml() {
this.recurseToTable(this.semantic);
if (this.mrows.length) {
const newRow = addMrow();
const parent = this.mml.parentNode;
parent.insertBefore(newRow, this.mml);
for (const mrow of this.mrows) {
newRow.appendChild(mrow);
}
newRow.appendChild(this.mml);
}
return this.mml;
}
recurseToTable(node) {
var _a, _b;
if (!(node.hasAnnotation('Emph', 'top') || node.hasAnnotation('Emph', 'fence')) &&
(node.hasAnnotation('Emph', 'left') ||
node.hasAnnotation('Emph', 'right'))) {
walkTree(node);
return;
}
if (!node.mathmlTree ||
(dom_util_tagName(node.mathmlTree) === MMLTAGS.MTABLE &&
((_a = node.annotation['Emph']) === null || _a === void 0 ? void 0 : _a.length) &&
node.annotation['Emph'][0] !== 'table')) {
const newNode = addMrow();
setAttributes(newNode, node);
this.mrows.unshift(newNode);
}
else {
if (dom_util_tagName(node.mathmlTree) === MMLTAGS.MTABLE &&
((_b = node.annotation['Emph']) === null || _b === void 0 ? void 0 : _b.length) &&
node.annotation['Emph'][0] === 'table') {
this.finalizeTable(node);
return;
}
setAttributes(node.mathmlTree, node);
}
node.childNodes.forEach(this.recurseToTable.bind(this));
if (node.textContent || node.type === 'punctuated') {
const newContent = node.contentNodes.map((x) => {
const newNode = cloneContentNode(x);
if (newNode.hasAttribute('data-semantic-added')) {
this.mrows.unshift(newNode);
}
else {
this.recurseToTable(x);
}
return newNode;
});
setOperatorAttribute(node, newContent);
return;
}
node.contentNodes.forEach(this.recurseToTable.bind(this));
}
finalizeTable(node) {
setAttributes(node.mathmlTree, node);
node.contentNodes.forEach((x) => {
walkTree(x);
});
node.childNodes.forEach((x) => {
walkTree(x);
});
}
}
//# sourceMappingURL=case_empheq.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_limit.js
class CaseLimit extends AbstractEnrichCase {
static test(semantic) {
if (!semantic.mathmlTree || !semantic.childNodes.length) {
return false;
}
const mmlTag = dom_util_tagName(semantic.mathmlTree);
const type = semantic.type;
return (((type === semantic_meaning_SemanticType.LIMUPPER || type === semantic_meaning_SemanticType.LIMLOWER) &&
(mmlTag === MMLTAGS.MSUBSUP || mmlTag === MMLTAGS.MUNDEROVER)) ||
(type === semantic_meaning_SemanticType.LIMBOTH &&
(mmlTag === MMLTAGS.MSUB ||
mmlTag === MMLTAGS.MUNDER ||
mmlTag === MMLTAGS.MSUP ||
mmlTag === MMLTAGS.MOVER)));
}
static walkTree_(node) {
if (node) {
walkTree(node);
}
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
const children = this.semantic.childNodes;
if (this.semantic.type !== semantic_meaning_SemanticType.LIMBOTH &&
this.mml.childNodes.length >= 3) {
this.mml = introduceNewLayer([this.mml], this.semantic);
}
setAttributes(this.mml, this.semantic);
if (!children[0].mathmlTree) {
children[0].mathmlTree = this.semantic.mathmlTree;
}
children.forEach(CaseLimit.walkTree_);
return this.mml;
}
}
//# sourceMappingURL=case_limit.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_line.js
class CaseLine extends AbstractEnrichCase {
static test(semantic) {
return !!semantic.mathmlTree && semantic.type === semantic_meaning_SemanticType.LINE;
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
if (this.semantic.contentNodes.length) {
walkTree(this.semantic.contentNodes[0]);
}
if (this.semantic.childNodes.length) {
walkTree(this.semantic.childNodes[0]);
}
setAttributes(this.mml, this.semantic);
return this.mml;
}
}
//# sourceMappingURL=case_line.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_proof.js
class CaseProof extends AbstractEnrichCase {
static test(semantic) {
return (!!semantic.mathmlTree &&
(semantic.type === semantic_meaning_SemanticType.INFERENCE ||
semantic.type === semantic_meaning_SemanticType.PREMISES));
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
if (!this.semantic.childNodes.length) {
return this.mml;
}
this.semantic.contentNodes.forEach(function (x) {
walkTree(x);
setAttributes(x.mathmlTree, x);
});
this.semantic.childNodes.forEach(function (x) {
walkTree(x);
});
setAttributes(this.mml, this.semantic);
if (this.mml.getAttribute('data-semantic-id') ===
this.mml.getAttribute('data-semantic-parent')) {
this.mml.removeAttribute('data-semantic-parent');
}
return this.mml;
}
}
//# sourceMappingURL=case_proof.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_table.js
class CaseTable extends AbstractEnrichCase {
static test(semantic) {
return (semantic.type === semantic_meaning_SemanticType.MATRIX ||
semantic.type === semantic_meaning_SemanticType.VECTOR ||
semantic.type === semantic_meaning_SemanticType.CASES);
}
constructor(semantic) {
super(semantic);
this.inner = [];
this.mml = semantic.mathmlTree;
}
getMathml() {
const lfence = cloneContentNode(this.semantic.contentNodes[0]);
const rfence = this.semantic.contentNodes[1]
? cloneContentNode(this.semantic.contentNodes[1])
: null;
this.inner = this.semantic.childNodes.map(walkTree);
if (!this.mml) {
this.mml = introduceNewLayer([lfence].concat(this.inner, [rfence]), this.semantic);
}
else if (dom_util_tagName(this.mml) === MMLTAGS.MFENCED) {
const children = this.mml.childNodes;
this.mml.insertBefore(lfence, children[0] || null);
if (rfence) {
this.mml.appendChild(rfence);
}
this.mml = rewriteMfenced(this.mml);
}
else {
const newChildren = [lfence, this.mml];
if (rfence) {
newChildren.push(rfence);
}
this.mml = introduceNewLayer(newChildren, this.semantic);
}
setAttributes(this.mml, this.semantic);
return this.mml;
}
}
//# sourceMappingURL=case_table.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/case_text.js
class CaseText extends AbstractEnrichCase {
static test(semantic) {
return (semantic.type === semantic_meaning_SemanticType.PUNCTUATED &&
(semantic.role === semantic_meaning_SemanticRole.TEXT ||
semantic.contentNodes.every((x) => x.role === semantic_meaning_SemanticRole.DUMMY)));
}
constructor(semantic) {
super(semantic);
this.mml = semantic.mathmlTree;
}
getMathml() {
const children = [];
const collapsed = collapsePunctuated(this.semantic, children);
this.mml = introduceNewLayer(children, this.semantic);
setAttributes(this.mml, this.semantic);
this.mml.removeAttribute(enrich_attr_Attribute.CONTENT);
addCollapsedAttribute(this.mml, collapsed);
return this.mml;
}
}
//# sourceMappingURL=case_text.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/enrich_case_factory.js
factory.push(...[
{
test: CaseLimit.test,
constr: (node) => new CaseLimit(node)
},
{
test: CaseEmbellished.test,
constr: (node) => new CaseEmbellished(node)
},
{
test: CaseDoubleScript.test,
constr: (node) => new CaseDoubleScript(node)
},
{
test: CaseTensor.test,
constr: (node) => new CaseTensor(node)
},
{
test: CaseMultiscripts.test,
constr: (node) => new CaseMultiscripts(node)
},
{ test: CaseLine.test, constr: (node) => new CaseLine(node) },
{
test: CaseBinomial.test,
constr: (node) => new CaseBinomial(node)
},
{
test: CaseProof.test,
constr: (node) => new CaseProof(node)
},
{
test: CaseEmpheq.test,
constr: (node) => new CaseEmpheq(node)
},
{
test: CaseTable.test,
constr: (node) => new CaseTable(node)
},
{ test: CaseText.test, constr: (node) => new CaseText(node) }
]);
//# sourceMappingURL=enrich_case_factory.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/enrich_mathml/enrich.js
function semanticMathmlNode(mml, options) {
const clone = cloneNode(mml);
const tree = getTree(clone, options);
return enrich(clone, tree, options);
}
function semanticMathmlSync(expr, options) {
const mml = parseInput(expr);
try {
return semanticMathmlNode(mml, options);
}
catch (err) {
console.error(err);
return mml;
}
}
function semanticMathml(expr, options, callback) {
EnginePromise.getall().then(() => {
const mml = DomUtil.parseInput(expr);
callback(semanticMathmlNode(mml, options));
});
}
function prepareMmlString(expr) {
if (!expr.match(/^$/)) {
expr += ' ';
}
return expr;
}
//# sourceMappingURL=enrich.js.map
;// ./node_modules/.pnpm/speech-rule-engine@5.0.0-beta.1/node_modules/speech-rule-engine/js/speech_rules/clearspeak_preference_string.js
const PREFERENCES = new DynamicProperties({
AbsoluteValue: ['Auto', 'AbsEnd', 'Cardinality', 'Determinant'],
Bar: ['Auto', 'Conjugate'],
Caps: ['Auto', 'SayCaps'],
CombinationPermutation: ['Auto', 'ChoosePermute'],
Currency: ['Auto', 'Position', 'Prefix'],
Ellipses: ['Auto', 'AndSoOn'],
Enclosed: ['Auto', 'EndEnclose'],
Exponent: [
'Auto',
'AfterPower',
'Ordinal',
'OrdinalPower',
'Exponent'
],
Fraction: [
'Auto',
'EndFrac',
'FracOver',
'General',
'GeneralEndFrac',
'Ordinal',
'Over',
'OverEndFrac',
'Per'
],
Functions: [
'Auto',
'None',
'Reciprocal'
],
Inference: ['Auto', 'Long'],
ImpliedTimes: ['Auto', 'MoreImpliedTimes', 'None'],
Log: ['Auto', 'LnAsNaturalLog'],
Matrix: [
'Auto',
'Combinatoric',
'EndMatrix',
'EndVector',
'SilentColNum',
'SpeakColNum',
'Vector'
],
MultiLineLabel: [
'Auto',
'Case',
'Constraint',
'Equation',
'Line',
'None',
'Row',
'Step'
],
MultiLineOverview: ['Auto', 'None'],
MultiLinePausesBetweenColumns: ['Auto', 'Long', 'Short'],
MultsymbolDot: ['Auto', 'Dot'],
MultsymbolX: ['Auto', 'By', 'Cross'],
Paren: [
'Auto',
'CoordPoint',
'Interval',
'Silent',
'Speak',
'SpeakNestingLevel'
],
Prime: ['Auto', 'Angle', 'Length'],
Roots: ['Auto', 'PosNegSqRoot', 'PosNegSqRootEnd', 'RootEnd'],
SetMemberSymbol: ['Auto', 'Belongs', 'Element', 'Member', 'In'],
Sets: ['Auto', 'SilentBracket', 'woAll'],
TriangleSymbol: ['Auto', 'Delta'],
Trig: [
'Auto',
'ArcTrig',
'TrigInverse',
'Reciprocal'
],
VerticalLine: ['Auto', 'Divides', 'Given', 'SuchThat']
});
const AUTO = 'Auto';
function fromPreference(pref) {
const pairs = pref.split(':');
const preferences = {};
const properties = PREFERENCES.getProperties();
const validKeys = Object.keys(properties);
for (let i = 0, key; (key = pairs[i]); i++) {
const pair = key.split('_');
if (validKeys.indexOf(pair[0]) === -1) {
continue;
}
const value = pair[1];
if (value &&
value !== AUTO &&
properties[pair[0]].indexOf(value) !== -1) {
preferences[pair[0]] = pair[1];
}
}
return preferences;
}
function toPreference(pref) {
const keys = Object.keys(pref);
const str = [];
for (let i = 0; i < keys.length; i++) {
str.push(keys[i] + '_' + pref[keys[i]]);
}
return str.length ? str.join(':') : DynamicCstr.DEFAULT_VALUE;
}
function findPreference(prefs, kind) {
if (prefs === 'default') {
return AUTO;
}
const parsed = fromPreference(prefs);
return parsed[kind] || AUTO;
}
function addPreference(prefs, kind, value) {
if (prefs === 'default') {
return kind + '_' + value;
}
const parsed = fromPreference(prefs);
parsed[kind] = value;
return toPreference(parsed);
}
//# sourceMappingURL=clearspeak_preference_string.js.map
;// ./mjs/a11y/sre.js
const locales = variables/* Variables */.u.LOCALES;
const setupEngine = (x) => {
return Engine.getInstance().setup(x);
};
const engineSetup = () => {
return Engine.getInstance().json();
};
const toEnriched = (mml) => {
return semanticMathmlSync(mml, Engine.getInstance().options);
};
const parseDOM = parseInput;
const sre_addPreference = addPreference;
const sre_fromPreference = fromPreference;
const sre_toPreference = toPreference;
//# sourceMappingURL=sre.js.map
;// ./mjs/a11y/speech/SpeechMenu.js
var SpeechMenu_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
let csPrefsSetting = {};
let previousPrefs = null;
function currentPreference(settings) {
var _a, _b;
const matcher = settings === null || settings === void 0 ? void 0 : settings.match(/^clearspeak-(.*)/);
previousPrefs = (_b = (_a = (matcher && matcher[1])) !== null && _a !== void 0 ? _a : previousPrefs) !== null && _b !== void 0 ? _b : 'default';
return previousPrefs;
}
function csPrefsVariables(menu, prefs) {
const srVariable = menu.pool.lookup('speechRules');
const previous = currentPreference(menu.settings.speechRules);
csPrefsSetting = sre_fromPreference(previous);
for (const pref of prefs) {
menu.factory.get('variable')(menu.factory, {
name: 'csprf_' + pref,
setter: (value) => {
csPrefsSetting[pref] = value;
srVariable.setValue('clearspeak-' + sre_toPreference(csPrefsSetting));
},
getter: () => {
return csPrefsSetting[pref] || 'Auto';
},
}, menu.pool);
}
}
const localePreferences = new Map();
function getLocalePreferences(menu, locale) {
return SpeechMenu_awaiter(this, void 0, void 0, function* () {
if (!localePreferences.has(locale)) {
yield menu.mathItem.generatorPool.getLocalePreferences(localePreferences);
}
});
}
const relevantPreferences = new Map();
let SpeechMenu_counter = 0;
function csSelectionBox(menu, locale) {
const props = localePreferences.get(locale);
csPrefsVariables(menu, Object.keys(props));
const items = [];
for (const prop of Object.getOwnPropertyNames(props)) {
items.push({
title: prop,
values: props[prop].map((x) => x.replace(RegExp('^' + prop + '_'), '')),
variable: 'csprf_' + prop,
});
}
const sb = menu.factory.get('selectionBox')(menu.factory, {
title: 'Clearspeak Preferences',
signature: '',
order: 'alphabetic',
grid: 'square',
selections: items,
}, menu);
return {
type: 'command',
id: 'ClearspeakPreferences',
content: 'Select Preferences',
action: () => sb.post(0, 0),
};
}
function basePreferences(previous) {
const items = [
{
type: 'radio',
content: 'No Preferences',
id: 'clearspeak-default',
variable: 'speechRules',
},
{
type: 'radio',
content: 'Current Preferences',
id: 'clearspeak-' + previous,
variable: 'speechRules',
},
{
type: 'rule',
},
];
return items;
}
function smartPreferences(previous, smart, locale) {
const loc = localePreferences.get(locale);
const items = [
{ type: 'label', content: 'Preferences for ' + smart },
{ type: 'rule' },
];
return items.concat(loc[smart].map(function (x) {
const [key, value] = x.split('_');
return {
type: 'radioCompare',
content: value,
id: 'clearspeak-' + sre_addPreference(previous, key, value),
variable: 'speechRules',
comparator: (x, y) => {
if (x === y) {
return true;
}
if (value !== 'Auto') {
return false;
}
const [dom1, pref] = x.split('-');
const [dom2] = y.split('-');
return (dom1 === dom2 && !sre_fromPreference(pref)[key]);
},
};
}));
}
function clearspeakMenu(menu, sub, callback) {
return SpeechMenu_awaiter(this, void 0, void 0, function* () {
var _a, _b;
const exit = (items) => {
callback(menu.factory.get('subMenu')(menu.factory, {
items: items,
id: 'Clearspeak',
}, sub));
};
if (!menu.settings.speech || !menu.settings.enrich) {
exit([]);
return;
}
const locale = menu.pool.lookup('locale').getValue();
yield getLocalePreferences(menu, locale);
if (!localePreferences.get(locale)) {
exit([]);
return;
}
const box = csSelectionBox(menu, locale);
let items = [];
if (menu.settings.speech) {
const item = menu.mathItem;
const explorer = (_a = item === null || item === void 0 ? void 0 : item.explorers) === null || _a === void 0 ? void 0 : _a.speech;
const previous = currentPreference(menu.settings.speechRules);
items = items.concat(basePreferences(previous));
const focus = explorer === null || explorer === void 0 ? void 0 : explorer.refocus;
const semantic = (_b = focus === null || focus === void 0 ? void 0 : focus.getAttribute('data-semantic-id')) !== null && _b !== void 0 ? _b : null;
const count = SpeechMenu_counter++;
yield item.generatorPool.getRelevantPreferences(item, semantic, relevantPreferences, count);
const smart = relevantPreferences.get(count);
relevantPreferences.delete(count);
if (smart) {
const smartItems = smartPreferences(previous, smart, locale);
items = items.concat(smartItems);
}
}
items.splice(2, 0, box);
exit(items);
});
}
MJContextMenu.DynamicSubmenus.set('Clearspeak', [clearspeakMenu, 'speech']);
let LOCALE_MENU = null;
function localeMenu(menu, sub, callback) {
if (LOCALE_MENU) {
callback(LOCALE_MENU);
return;
}
const radios = [];
for (const lang of locales.keys()) {
if (lang === 'nemeth' || lang === 'euro')
continue;
radios.push({
type: 'radio',
id: lang,
content: locales.get(lang) || lang,
variable: 'locale',
});
}
radios.sort((x, y) => x.content.localeCompare(y.content, 'en'));
LOCALE_MENU = menu.factory.get('subMenu')(menu.factory, {
items: radios,
id: 'Language',
}, sub);
callback(LOCALE_MENU);
}
MJContextMenu.DynamicSubmenus.set('A11yLanguage', [localeMenu, 'speech']);
//# sourceMappingURL=SpeechMenu.js.map
;// ./mjs/ui/menu/MenuUtil.js
const isMac = context.os === 'MacOS';
function copyToClipboard(text) {
const document = context.document;
const input = document.createElement('textarea');
input.value = text;
input.setAttribute('readonly', '');
input.style.cssText =
'height: 1px; width: 1px; padding: 1px; position: absolute; left: -10px';
document.body.appendChild(input);
input.select();
try {
document.execCommand('copy');
}
catch (error) {
alert(`Can't copy to clipboard: ${error.message}`);
}
document.body.removeChild(input);
}
//# sourceMappingURL=MenuUtil.js.map
;// ./mjs/ui/menu/AnnotationMenu.js
function showAnnotations(box, types, cache) {
return (menu, sub) => {
getAnnotation(getSemanticNode(menu), types, cache);
box.attachMenu(menu);
return createAnnotationMenu(menu, sub, cache, () => box.post());
};
}
function copyAnnotations(cache) {
return (menu, sub) => {
const annotations = cache.slice();
cache.length = 0;
return createAnnotationMenu(menu, sub, annotations, () => copyToClipboard(annotation.trim()));
};
}
function getSemanticNode(menu) {
var _a;
let node = (_a = menu.mathItem) === null || _a === void 0 ? void 0 : _a.root;
while (node && !node.isKind('semantics')) {
if (node.isToken || node.childNodes.length !== 1)
return null;
node = node.childNodes[0];
}
return node;
}
function getAnnotation(node, types, annotations) {
if (!node)
return;
for (const child of node.childNodes) {
if (child.isKind('annotation')) {
const match = annotationMatch(child, types);
if (match) {
const value = child.childNodes.reduce((text, chars) => text + chars.toString(), '');
annotations.push([match, value]);
}
}
}
}
function annotationMatch(child, types) {
const encoding = child.attributes.get('encoding');
for (const type of Object.keys(types)) {
if (types[type].includes(encoding)) {
return type;
}
}
return null;
}
let annotation = '';
function createAnnotationMenu(menu, submenu, annotations, action) {
return menu.factory.get('subMenu')(menu.factory, {
items: annotations.map(([type, value]) => {
return {
type: 'command',
id: type,
content: type,
action: () => {
annotation = value;
action();
},
};
}),
id: 'annotations',
}, submenu);
}
//# sourceMappingURL=AnnotationMenu.js.map
;// ./mjs/ui/menu/RadioCompare.js
class RadioCompare extends Radio {
static fromJson(_factory, { content: content, variable: variable, id: id, comparator: comparator, }, menu) {
return new this(menu, content, variable, id, comparator);
}
constructor(menu, content, variable, id, comparator) {
super(menu, content, variable, id);
this.comparator = comparator;
this.role = 'menuitemradiocompare';
}
updateAria() {
this.html.setAttribute('aria-checked', this.comparator(this.variable.getValue(), this.id) ? 'true' : 'false');
}
updateSpan() {
this.span.style.display = this.comparator(this.variable.getValue(), this.id)
? ''
: 'none';
}
}
//# sourceMappingURL=RadioCompare.js.map
;// ./mjs/ui/menu/MmlVisitor.js
class MmlVisitor_MmlVisitor extends SerializedMmlVisitor {
constructor() {
super(...arguments);
this.options = {
filterSRE: true,
filterTex: true,
texHints: true,
semantics: false,
};
this.mathItem = null;
}
visitTree(node, math = null, options = {}) {
this.mathItem = math;
userOptions(this.options, options);
return this.visitNode(node, '');
}
visitTeXAtomNode(node, space) {
if (this.options.texHints) {
return super.visitDefault(node, space);
}
if (node.childNodes[0] && node.childNodes[0].childNodes.length === 1) {
return this.visitNode(node.childNodes[0], space);
}
return (`${space}\n` +
this.childNodeMml(node, space + ' ', '\n') +
`${space} `);
}
visitMathNode(node, space) {
if (!this.options.semantics || this.mathItem.inputJax.name !== 'TeX') {
return super.visitDefault(node, space);
}
const addRow = node.childNodes.length && node.childNodes[0].childNodes.length > 1;
return (`${space}\n${space} \n` +
(addRow ? space + ' \n' : '') +
this.childNodeMml(node, space + (addRow ? ' ' : ' '), '\n') +
(addRow ? space + ' \n' : '') +
`${space} ` +
this.mathItem.math +
` \n${space} \n${space} `);
}
getAttributeList(node) {
const list = super.getAttributeList(node);
if (this.options.filterTex) {
delete list['data-latex'];
delete list['data-latex-item'];
}
if (this.options.filterSRE) {
const keys = Object.keys(list).filter((id) => id.match(/^(?:data-semantic-.*?|data-speech-node|role|aria-(?:level|posinset|setsize|owns))$/));
for (const key of keys) {
delete list[key];
}
}
return list;
}
}
//# sourceMappingURL=MmlVisitor.js.map
;// ./mjs/ui/menu/SelectableInfo.js
class SelectableInfo extends Info {
keydown(event) {
if (event.key === 'a' && (event.ctrlKey || event.metaKey)) {
this.selectAll();
this.stop(event);
return;
}
super.keydown(event);
}
selectAll() {
const selection = document.getSelection();
selection.selectAllChildren(this.html.querySelector('.CtxtMenu_InfoContent').firstChild);
}
copyToClipboard() {
this.selectAll();
try {
document.execCommand('copy');
}
catch (err) {
alert(`Can't copy to clipboard: ${err.message}`);
}
document.getSelection().removeAllRanges();
}
generateHtml() {
super.generateHtml();
const footer = this.html.querySelector('span.' + HtmlClasses['INFOSIGNATURE']);
const button = footer.appendChild(document.createElement('input'));
button.type = 'button';
button.value = 'Copy to Clipboard';
button.addEventListener('click', (_event) => this.copyToClipboard());
}
}
//# sourceMappingURL=SelectableInfo.js.map
;// ./mjs/ui/menu/Menu.js
var Menu_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const Menu_MathJax = global_MathJax;
const XMLDECLARATION = '';
class Menu {
get isLoading() {
return Menu.loading > 0;
}
get loadingPromise() {
if (!this.isLoading) {
return Promise.resolve();
}
if (!Menu._loadingPromise) {
Menu._loadingPromise = new Promise((ok, failed) => {
Menu._loadingOK = ok;
Menu._loadingFailed = failed;
});
}
return Menu._loadingPromise;
}
postInfo(dialog) {
if (this.menu.mathItem) {
this.menu.nofocus = !!this.menu.mathItem.outputData.nofocus;
}
dialog.post();
}
constructor(document, options = {}) {
this.settings = null;
this.defaultSettings = null;
this.menu = null;
this.current = null;
this.MmlVisitor = new MmlVisitor_MmlVisitor();
this.jax = {
CHTML: null,
SVG: null,
};
this.rerenderStart = STATE.LAST;
this.requiredExtensions = [];
this.about = new Info('MathJax v' + mathjax.version, () => {
const lines = [];
lines.push('Input Jax: ' + this.document.inputJax.map((jax) => jax.name).join(', '));
lines.push('Output Jax: ' + this.document.outputJax.name);
lines.push('Document Type: ' + this.document.kind);
return lines.join(' ');
}, 'www.mathjax.org ');
this.help = new Info('MathJax Help ', () => {
return [
'MathJax is a JavaScript library that allows page',
' authors to include mathematics within their web pages.',
" As a reader, you don't need to do anything to make that happen.
",
'Browsers : MathJax works with all modern browsers including',
' Edge, Firefox, Chrome, Safari, Opera, and most mobile browsers.
',
'Math Menu : MathJax adds a contextual menu to equations.',
' Right-click or CTRL-click on any mathematics to access the menu.
',
'',
"
Show Math As: These options allow you to view the formula's",
' source markup (as MathML or in its original format).
',
"
Copy to Clipboard: These options copy the formula's source markup,",
' as MathML or in its original format, to the clipboard',
' (in browsers that support that).
',
'
Math Settings: These give you control over features of MathJax,',
' such the size of the mathematics, the mechanism used to display equations,',
' how to handle equations that are too wide, and the language to use for',
" MathJax's menus and error messages (not yet implemented in v4).",
'
',
'
Accessibility : MathJax can work with screen',
' readers to make mathematics accessible to the visually impaired.',
' Turn on speech or braille generation to enable creation of speech strings',
' and the ability to investigate expressions interactively. You can control',
' the style of the explorer in its menu.
',
'
',
'Math Zoom : If you are having difficulty reading an',
' equation, MathJax can enlarge it to help you see it better, or',
' you can scale all the math on the page to make it larger.',
' Turn these features on in the Math Settings menu.
',
"Preferences : MathJax uses your browser's localStorage database",
' to save the preferences set via this menu locally in your browser. These',
' are not used to track you, and are not transferred or used remotely by',
' MathJax in any way.
',
].join('\n');
}, 'www.mathjax.org ');
this.mathmlCode = new SelectableInfo('MathJax MathML Expression', () => {
if (!this.menu.mathItem)
return '';
const text = this.toMML(this.menu.mathItem);
return '' + this.formatSource(text) + ' ';
}, '');
this.originalText = new SelectableInfo('MathJax Original Source', () => {
if (!this.menu.mathItem)
return '';
const text = this.menu.mathItem.math;
return ('' +
this.formatSource(text) +
' ');
}, '');
this.annotationBox = new SelectableInfo('MathJax Annotation Text', () => {
const text = annotation;
return ('' +
this.formatSource(text) +
' ');
}, '');
this.svgImage = new SelectableInfo('MathJax SVG Image', () => {
return ('' +
'Generative SVG Image...
');
}, '');
this.speechText = new SelectableInfo('MathJax Speech Text', () => {
if (!this.menu.mathItem)
return '';
return ('' +
this.formatSource(this.menu.mathItem.outputData.speech) +
'
');
}, '');
this.brailleText = new SelectableInfo('MathJax Braille Code', () => {
if (!this.menu.mathItem)
return '';
return ('' +
this.formatSource(this.menu.mathItem.outputData.braille) +
'
');
}, '');
this.errorMessage = new SelectableInfo('MathJax Error Message', () => {
if (!this.menu.mathItem)
return '';
return ('' +
this.formatSource(this.menu.errorMsg) +
' ');
}, '');
this.zoomBox = new Info('MathJax Zoomed Expression', () => {
if (!this.menu.mathItem)
return '';
const element = this.menu.mathItem.typesetRoot.cloneNode(true);
element.style.margin = '0';
const scale = 1.25 * parseFloat(this.settings.zscale);
return ('' + element.outerHTML + '
');
}, '');
this.document = document;
this.options = userOptions(defaultOptions({}, this.constructor.OPTIONS), options);
this.initSettings();
this.mergeUserSettings();
this.initMenu();
this.applySettings();
}
initSettings() {
var _a;
this.settings = this.options.settings;
this.jax = this.options.jax;
const jax = this.document.outputJax;
this.jax[jax.name] = jax;
this.settings.renderer = jax.name;
this.settings.scale = jax.options.scale;
if (jax.options.displayOverflow) {
this.settings.overflow =
jax.options.displayOverflow.substring(0, 1).toUpperCase() +
jax.options.displayOverflow.substring(1).toLowerCase();
}
this.settings.breakInline = (_a = jax.options.linebreaks) === null || _a === void 0 ? void 0 : _a.inline;
this.defaultSettings = Object.assign({}, this.document.options.a11y, this.settings);
this.setA11y({ roleDescription: this.settings.roleDescription });
}
initMenu() {
const parser = new Parser([
['contextMenu', MJContextMenu.fromJson.bind(MJContextMenu)],
['radioCompare', RadioCompare.fromJson.bind(RadioCompare)],
]);
this.menu = parser.parse({
type: 'contextMenu',
id: 'MathJax_Menu',
pool: [
this.variable('showSRE'),
this.variable('showTex'),
this.variable('texHints'),
this.variable('semantics'),
this.variable('zoom'),
this.variable('zscale'),
this.variable('renderer', (jax) => this.setRenderer(jax)),
this.variable('overflow', (overflow) => this.setOverflow(overflow)),
this.variable('breakInline', (breaks) => this.setInlineBreaks(breaks)),
this.variable('alt'),
this.variable('cmd'),
this.variable('ctrl'),
this.variable('shift'),
this.variable('scale', (scale) => this.setScale(scale)),
this.a11yVar('speech', (speech) => this.setSpeech(speech)),
this.a11yVar('braille', (braille) => this.setBraille(braille)),
this.variable('brailleCode', (code) => this.setBrailleCode(code)),
this.a11yVar('highlight', (value) => this.setHighlight(value)),
this.a11yVar('backgroundColor'),
this.a11yVar('backgroundOpacity'),
this.a11yVar('foregroundColor'),
this.a11yVar('foregroundOpacity'),
this.a11yVar('subtitles'),
this.a11yVar('viewBraille'),
this.a11yVar('voicing'),
this.a11yVar('roleDescription', () => this.setRoleDescription()),
this.a11yVar('help'),
this.a11yVar('locale', (locale) => this.setLocale(locale)),
this.variable('speechRules', (value) => {
const [domain, style] = value.split('-');
this.document.options.sre.domain = domain;
this.document.options.sre.style = style;
this.rerender(STATE.COMPILED);
}),
this.a11yVar('magnification'),
this.a11yVar('magnify'),
this.a11yVar('treeColoring'),
this.a11yVar('infoType'),
this.a11yVar('infoRole'),
this.a11yVar('infoPrefix'),
this.variable('autocollapse'),
this.variable('collapsible', (collapse) => this.setCollapsible(collapse)),
this.variable('enrich', (enrich) => this.setEnrichment(enrich)),
this.variable('inTabOrder', (tab) => this.setTabOrder(tab)),
this.a11yVar('tabSelects'),
this.variable('assistiveMml', (mml) => this.setAssistiveMml(mml)),
],
items: [
this.submenu('Show', 'Show Math As', [
this.command('MathMLcode', 'MathML Code', () => this.postInfo(this.mathmlCode)),
this.command('Original', 'Original Form', () => this.postInfo(this.originalText)),
this.rule(),
this.command('Speech', 'Speech Text', () => this.postInfo(this.speechText), {
disabled: true,
}),
this.command('Braille', 'Braille Code', () => this.postInfo(this.brailleText), { disabled: true }),
this.command('SVG', 'SVG Image', () => this.postSvgImage(), {
disabled: true,
}),
this.submenu('ShowAnnotation', 'Annotation'),
this.rule(),
this.command('Error', 'Error Message', () => this.postInfo(this.errorMessage), { disabled: true }),
]),
this.submenu('Copy', 'Copy to Clipboard', [
this.command('MathMLcode', 'MathML Code', () => this.copyMathML()),
this.command('Original', 'Original Form', () => this.copyOriginal()),
this.rule(),
this.command('Speech', 'Speech Text', () => this.copySpeechText(), {
disabled: true,
}),
this.command('Braille', 'Braille Code', () => this.copyBrailleText(), { disabled: true }),
this.command('SVG', 'SVG Image', () => this.copySvgImage(), {
disabled: true,
}),
this.submenu('CopyAnnotation', 'Annotation'),
this.rule(),
this.command('Error', 'Error Message', () => this.copyErrorMessage(), { disabled: true }),
]),
this.rule(),
this.submenu('Settings', 'Math Settings', [
this.submenu('Renderer', 'Math Renderer', this.radioGroup('renderer', [['CHTML'], ['SVG']])),
this.submenu('Overflow', 'Wide Expressions', [
this.radioGroup('overflow', [
['Overflow'],
['Scroll'],
['Linebreak'],
['Scale'],
['Truncate'],
['Elide'],
]),
this.rule(),
this.checkbox('BreakInline', 'Allow In-line Breaks', 'breakInline'),
]),
this.rule(),
this.submenu('MathmlIncludes', 'MathML/SVG has', [
this.checkbox('showSRE', 'Semantic attributes', 'showSRE'),
this.checkbox('showTex', 'LaTeX attributes', 'showTex'),
this.checkbox('texHints', 'TeX hints', 'texHints'),
this.checkbox('semantics', 'Original as annotation', 'semantics'),
]),
this.submenu('Language', 'Language'),
this.rule(),
this.submenu('ZoomTrigger', 'Zoom Trigger', [
this.command('ZoomNow', 'Zoom Once Now', () => this.zoom(null, '', this.menu.mathItem)),
this.rule(),
this.radioGroup('zoom', [
['Click'],
['DoubleClick', 'Double-Click'],
['NoZoom', 'No Zoom'],
]),
this.rule(),
this.label('TriggerRequires', 'Trigger Requires:'),
this.checkbox(isMac ? 'Option' : 'Alt', isMac ? 'Option' : 'Alt', 'alt'),
this.checkbox('Command', 'Command', 'cmd', {
hidden: !isMac,
}),
this.checkbox('Control', 'Control', 'ctrl', {
hiddne: isMac,
}),
this.checkbox('Shift', 'Shift', 'shift'),
]),
this.submenu('ZoomFactor', 'Zoom Factor', this.radioGroup('zscale', [
['150%'],
['175%'],
['200%'],
['250%'],
['300%'],
['400%'],
])),
this.rule(),
this.command('Scale', 'Scale All Math...', () => this.scaleAllMath()),
this.rule(),
this.command('Reset', 'Reset to defaults', () => this.resetDefaults()),
]),
this.rule(),
this.label('Accessibility', '\xA0\xA0 Accessibility:'),
this.submenu('Speech', '\xA0 \xA0 Speech', [
this.checkbox('Generate', 'Generate', 'speech'),
this.checkbox('Subtitles', 'Show Subtitles', 'subtitles'),
this.checkbox('Auto Voicing', 'Auto Voicing', 'voicing'),
this.rule(),
this.label('Rules', 'Rules:'),
this.submenu('Mathspeak', 'Mathspeak', this.radioGroup('speechRules', [
['mathspeak-default', 'Verbose'],
['mathspeak-brief', 'Brief'],
['mathspeak-sbrief', 'Superbrief'],
])),
this.submenu('Clearspeak', 'Clearspeak', this.radioGroup('speechRules', [['clearspeak-default', 'Auto']])),
this.rule(),
this.submenu('A11yLanguage', 'Language'),
]),
this.submenu('Braille', '\xA0 \xA0 Braille', [
this.checkbox('Generate', 'Generate', 'braille'),
this.checkbox('Subtitles', 'Show Subtitles', 'viewBraille'),
this.rule(),
this.label('Code', 'Code Format:'),
this.radioGroup('brailleCode', [
['nemeth', 'Nemeth'],
['ueb', 'UEB'],
['euro', 'Euro'],
]),
]),
this.submenu('Explorer', '\xA0 \xA0 Explorer', [
this.submenu('Highlight', 'Highlight', [
this.submenu('Background', 'Background', this.radioGroup('backgroundColor', [
['Blue'],
['Red'],
['Green'],
['Yellow'],
['Cyan'],
['Magenta'],
['White'],
['Black'],
])),
{ type: 'slider', variable: 'backgroundOpacity', content: ' ' },
this.submenu('Foreground', 'Foreground', this.radioGroup('foregroundColor', [
['Black'],
['White'],
['Magenta'],
['Cyan'],
['Yellow'],
['Green'],
['Red'],
['Blue'],
])),
{ type: 'slider', variable: 'foregroundOpacity', content: ' ' },
this.rule(),
this.radioGroup('highlight', [['None'], ['Hover'], ['Flame']]),
this.rule(),
this.checkbox('TreeColoring', 'Tree Coloring', 'treeColoring'),
]),
this.submenu('Magnification', 'Magnification', [
this.radioGroup('magnification', [
['None'],
['Keyboard'],
['Mouse'],
]),
this.rule(),
this.radioGroup('magnify', [
['200%'],
['300%'],
['400%'],
['500%'],
]),
]),
this.submenu('Semantic Info', 'Semantic Info', [
this.checkbox('Type', 'Type', 'infoType'),
this.checkbox('Role', 'Role', 'infoRole'),
this.checkbox('Prefix', 'Prefix', 'infoPrefix'),
]),
this.rule(),
this.submenu('Role Description', 'Describe math as', [
this.radioGroup('roleDescription', [
['MathJax expression'],
['MathJax'],
['math'],
['clickable math'],
['explorable math'],
['none'],
]),
]),
this.checkbox('Math Help', 'Help message on focus', 'help'),
]),
this.submenu('Options', '\xA0 \xA0 Options', [
this.checkbox('Enrich', 'Semantic Enrichment', 'enrich'),
this.checkbox('Collapsible', 'Collapsible Math', 'collapsible'),
this.checkbox('AutoCollapse', 'Auto Collapse', 'autocollapse', {
disabled: true,
}),
this.rule(),
this.checkbox('InTabOrder', 'Include in Tab Order', 'inTabOrder'),
this.submenu('TabSelects', 'Tabbing Focuses on', [
this.radioGroup('tabSelects', [
['all', 'Whole Expression'],
['last', 'Last Explored Node'],
]),
]),
this.rule(),
this.checkbox('AssistiveMml', 'Include Hidden MathML', 'assistiveMml'),
]),
this.rule(),
this.command('About', 'About MathJax', () => this.postInfo(this.about)),
this.command('Help', 'MathJax Help', () => this.postInfo(this.help)),
],
});
const menu = this.menu;
menu.settings = this.settings;
menu.findID('Settings', 'Overflow', 'Elide').disable();
menu.findID('Braille', 'ueb').hide();
menu.setJax(this.jax);
this.attachDialogMenus(menu);
this.checkLoadableItems();
const cache = [];
MJContextMenu.DynamicSubmenus.set('ShowAnnotation', [
showAnnotations(this.annotationBox, this.options.annotationTypes, cache),
'',
]);
MJContextMenu.DynamicSubmenus.set('CopyAnnotation', [
copyAnnotations(cache),
'',
]);
addInfoStyles(this.document.document);
addMenuStyles(this.document.document);
}
attachDialogMenus(menu) {
this.about.attachMenu(menu);
this.help.attachMenu(menu);
this.originalText.attachMenu(menu);
this.mathmlCode.attachMenu(menu);
this.originalText.attachMenu(menu);
this.svgImage.attachMenu(menu);
this.speechText.attachMenu(menu);
this.brailleText.attachMenu(menu);
this.errorMessage.attachMenu(menu);
this.zoomBox.attachMenu(menu);
}
checkLoadableItems() {
var _a, _b, _c, _d, _e, _f;
if (Menu_MathJax && Menu_MathJax._ && Menu_MathJax.loader && Menu_MathJax.startup) {
const settings = this.settings;
const options = this.document.options;
if ((settings.enrich ||
(settings.speech && options.enableSpeech) ||
(settings.braille && options.enableBraille)) &&
!((_b = (_a = Menu_MathJax._) === null || _a === void 0 ? void 0 : _a.a11y) === null || _b === void 0 ? void 0 : _b.explorer)) {
this.loadA11y('explorer');
}
if (settings.collapsible && !((_d = (_c = Menu_MathJax._) === null || _c === void 0 ? void 0 : _c.a11y) === null || _d === void 0 ? void 0 : _d.complexity)) {
this.loadA11y('complexity');
}
if (settings.assistiveMml && !((_f = (_e = Menu_MathJax._) === null || _e === void 0 ? void 0 : _e.a11y) === null || _f === void 0 ? void 0 : _f['assistive-mml'])) {
this.loadA11y('assistive-mml');
}
}
else {
const menu = this.menu;
for (const name of Object.keys(this.jax)) {
if (!this.jax[name]) {
menu.findID('Settings', 'Renderer', name).disable();
}
}
menu.findID('Speech').disable();
menu.findID('Braille').disable();
menu.findID('Explorer').disable();
menu.findID('Options', 'AutoCollapse').disable();
menu.findID('Options', 'Collapsible').disable();
menu.findID('Options', 'Enrich').disable();
menu.findID('Options', 'AssistiveMml').disable();
}
}
enableAccessibilityItems(name, enable) {
const menu = this.menu.findID(name).submenu;
for (const item of menu.items.slice(1)) {
if (item instanceof Rule)
continue;
enable && (!(item instanceof Submenu) || item.submenu.items.length)
? item.enable()
: item.disable();
}
}
mergeUserSettings() {
try {
const settings = localStorage.getItem(Menu.MENU_STORAGE);
if (!settings)
return;
Object.assign(this.settings, JSON.parse(settings));
this.setA11y(this.settings);
}
catch (err) {
console.log('MathJax localStorage error: ' + err.message);
}
}
saveUserSettings() {
const settings = {};
for (const name of Object.keys(this.settings)) {
if (this.settings[name] !== this.defaultSettings[name]) {
settings[name] = this.settings[name];
}
}
try {
if (Object.keys(settings).length) {
localStorage.setItem(Menu.MENU_STORAGE, JSON.stringify(settings));
}
else {
localStorage.removeItem(Menu.MENU_STORAGE);
}
}
catch (err) {
console.log('MathJax localStorage error: ' + err.message);
}
}
setA11y(options) {
var _a, _b;
if ((_b = (_a = Menu_MathJax._) === null || _a === void 0 ? void 0 : _a.a11y) === null || _b === void 0 ? void 0 : _b.explorer) {
Menu_MathJax._.a11y.explorer_ts.setA11yOptions(this.document, options);
}
}
getA11y(option) {
var _a, _b;
if ((_b = (_a = Menu_MathJax._) === null || _a === void 0 ? void 0 : _a.a11y) === null || _b === void 0 ? void 0 : _b.explorer) {
if (this.document.options.a11y[option] !== undefined) {
return this.document.options.a11y[option];
}
return this.document.options.sre[option];
}
}
applySettings() {
this.setTabOrder(this.settings.inTabOrder);
const options = this.document.options;
options.enableAssistiveMml = this.settings.assistiveMml;
this.enableAccessibilityItems('Speech', this.settings.speech);
this.enableAccessibilityItems('Braille', this.settings.braille);
this.setAccessibilityMenus();
const renderer = this.settings.renderer.replace(/[^a-zA-Z0-9]/g, '') || 'CHTML';
(Menu._loadingPromise || Promise.resolve()).then(() => {
const settings = this.settings;
const options = this.document.outputJax.options;
options.scale = parseFloat(settings.scale);
options.displayOverflow = settings.overflow.toLowerCase();
if (options.linebreaks) {
options.linebreaks.inline = settings.breakInline;
}
if (!settings.speechRules) {
const sre = this.document.options.sre;
settings.speechRules = `${sre.domain || 'clearspeak'}-${sre.style || 'default'}`;
}
if (renderer !== this.defaultSettings.renderer) {
this.document.whenReady(() => this.setRenderer(renderer, false));
}
});
}
setOverflow(overflow) {
this.document.outputJax.options.displayOverflow = overflow.toLowerCase();
if (!Menu.loading) {
this.document.rerenderPromise();
}
}
setInlineBreaks(breaks) {
this.document.outputJax.options.linebreaks.inline = breaks;
if (!Menu.loading) {
this.document.rerenderPromise();
}
}
setScale(scale) {
this.document.outputJax.options.scale = parseFloat(scale);
if (!Menu.loading) {
this.document.rerenderPromise();
}
}
setRenderer(jax, rerender = true) {
if (Object.hasOwn(this.jax, jax) && this.jax[jax]) {
return this.setOutputJax(jax, rerender);
}
const name = jax.toLowerCase();
return new Promise((ok, fail) => {
this.loadComponent('output/' + name, () => {
const startup = Menu_MathJax.startup;
if (!(name in startup.constructors)) {
return fail(new Error(`Component ${name} not loaded`));
}
startup.useOutput(name, true);
startup.output = startup.getOutputJax();
startup.output.setAdaptor(this.document.adaptor);
startup.output.initialize();
this.jax[jax] = startup.output;
this.setOutputJax(jax, rerender)
.then(() => ok())
.catch((err) => fail(err));
});
});
}
setOutputJax(jax, rerender = true) {
this.jax[jax].setAdaptor(this.document.adaptor);
this.document.outputJax = this.jax[jax];
const promise = this.loadRequiredExtensions();
return rerender
? promise.then(() => mathjax.handleRetriesFor(() => this.rerender()))
: promise.then(() => { });
}
loadRequiredExtensions() {
const jax = this.document.outputJax.name.toLowerCase();
const promises = [];
for (const path of this.requiredExtensions) {
promises.push(Menu_MathJax.loader.load(`[${path}]/${jax}`));
}
this.requiredExtensions = [];
return Promise.all(promises);
}
addRequiredExtensions(extensions) {
if (extensions) {
const set = new Set([...this.requiredExtensions, ...extensions]);
this.requiredExtensions = [...set];
}
}
setTabOrder(tab) {
const menu = this.menu.findID('Options', 'TabSelects');
tab ? menu.enable() : menu.disable();
this.menu.store.inTaborder(tab);
}
setAssistiveMml(mml) {
var _a, _b;
this.document.options.enableAssistiveMml = mml;
if (!mml || ((_b = (_a = Menu_MathJax._) === null || _a === void 0 ? void 0 : _a.a11y) === null || _b === void 0 ? void 0 : _b['assistive-mml'])) {
this.rerender();
}
else {
this.loadA11y('assistive-mml');
}
}
setAccessibilityMenus() {
const enable = this.settings.enrich;
const method = enable ? 'enable' : 'disable';
['Speech', 'Braille', 'Explorer'].forEach((id) => this.menu.findID(id)[method]());
const options = this.document.options;
options.enableSpeech =
options.enableBraille =
options.enableExplorer =
enable;
if (!enable) {
this.settings.collapsible = false;
this.document.options.enableCollapsible = false;
}
}
setSpeech(speech) {
var _a, _b;
this.enableAccessibilityItems('Speech', speech);
this.document.options.enableSpeech = speech;
if (!speech || ((_b = (_a = Menu_MathJax._) === null || _a === void 0 ? void 0 : _a.a11y) === null || _b === void 0 ? void 0 : _b.explorer)) {
this.rerender(STATE.COMPILED);
}
else {
this.loadA11y('explorer');
}
}
setBraille(braille) {
var _a, _b;
this.enableAccessibilityItems('Braille', braille);
this.document.options.enableBraille = braille;
if (!braille || ((_b = (_a = Menu_MathJax._) === null || _a === void 0 ? void 0 : _a.a11y) === null || _b === void 0 ? void 0 : _b.explorer)) {
this.rerender(STATE.COMPILED);
}
else {
this.loadA11y('explorer');
}
}
setBrailleCode(code) {
this.document.options.sre.braille = code;
this.rerender(STATE.COMPILED);
}
setLocale(locale) {
this.document.options.sre.locale = locale;
this.rerender(STATE.COMPILED);
}
setRoleDescription() {
this.rerender(STATE.COMPILED);
}
setEnrichment(enrich) {
var _a, _b;
this.document.options.enableEnrichment = enrich;
this.setAccessibilityMenus();
if (!enrich || ((_b = (_a = Menu_MathJax._) === null || _a === void 0 ? void 0 : _a.a11y) === null || _b === void 0 ? void 0 : _b.explorer)) {
this.rerender(STATE.COMPILED);
}
else {
this.loadA11y('explorer');
}
}
setCollapsible(collapse) {
var _a, _b, _c, _d;
this.document.options.enableComplexity = collapse;
if (collapse && !this.settings.enrich) {
this.settings.enrich = this.document.options.enableEnrichment = true;
this.setAccessibilityMenus();
}
if (!collapse) {
this.menu.pool.lookup('highlight').setValue('None');
}
if (!collapse || ((_b = (_a = Menu_MathJax._) === null || _a === void 0 ? void 0 : _a.a11y) === null || _b === void 0 ? void 0 : _b.complexity)) {
this.rerender(STATE.COMPILED);
}
else {
this.loadA11y('complexity');
if (!((_d = (_c = Menu_MathJax._) === null || _c === void 0 ? void 0 : _c.a11y) === null || _d === void 0 ? void 0 : _d.explorer)) {
this.loadA11y('explorer');
}
}
}
setHighlight(value) {
var _a, _b;
if (value === 'None')
return;
if (!this.settings.collapsible) {
const variable = this.menu.pool.lookup('collapsible');
variable.setValue(true);
(_b = (_a = variable.items[0]) === null || _a === void 0 ? void 0 : _a.executeCallbacks_) === null || _b === void 0 ? void 0 : _b.call(_a);
}
if (!Menu.loadingPromises.has('a11y/complexity')) {
this.rerender(STATE.COMPILED);
}
}
scaleAllMath() {
const scale = (parseFloat(this.settings.scale) * 100)
.toFixed(1)
.replace(/.0$/, '');
const percent = prompt('Scale all mathematics (compared to surrounding text) by', scale + '%');
if (this.current) {
const speech = this.menu.mathItem.explorers.speech;
speech.refocus = this.current;
speech.focus();
}
if (percent) {
if (percent.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)) {
const scale = parseFloat(percent) / 100;
if (scale) {
this.menu.pool.lookup('scale').setValue(String(scale));
}
else {
alert('The scale should not be zero');
}
}
else {
alert('The scale should be a percentage (e.g., 120%)');
}
}
}
resetDefaults() {
Menu.loading++;
const pool = this.menu.pool;
const settings = this.defaultSettings;
for (const name of Object.keys(settings)) {
const variable = pool.lookup(name);
if (variable) {
if (variable.getValue() !== settings[name]) {
variable.setValue(settings[name]);
const item = variable.items[0];
if (item) {
item.executeCallbacks_();
}
}
}
else if (Object.hasOwn(this.settings, name)) {
this.settings[name] = settings[name];
}
}
Menu.loading--;
this.rerender(STATE.COMPILED);
}
checkComponent(name) {
const promise = Menu.loadingPromises.get(name);
if (promise) {
mathjax.retryAfter(promise);
}
}
loadComponent(name, callback) {
if (Menu.loadingPromises.has(name))
return;
const loader = Menu_MathJax.loader;
if (!loader)
return;
Menu.loading++;
const promise = loader
.load(name)
.then(() => {
Menu.loading--;
Menu.loadingPromises.delete(name);
if (Menu.loading === 0 && Menu._loadingPromise) {
Menu._loadingPromise = null;
Menu._loadingOK();
}
callback();
})
.catch((err) => {
if (Menu._loadingPromise) {
Menu._loadingPromise = null;
Menu._loadingFailed(err);
}
else {
console.log(err);
}
});
Menu.loadingPromises.set(name, promise);
}
loadA11y(component) {
const noEnrich = !STATE.ENRICHED;
this.loadComponent('a11y/' + component, () => {
var _a, _b;
const startup = Menu_MathJax.startup;
mathjax.handlers.unregister(startup.handler);
startup.handler = startup.getHandler();
mathjax.handlers.register(startup.handler);
const document = this.document;
this.document = startup.document = startup.getDocument();
this.document.processed = document.processed;
this.document.menu = this;
if (document.webworker) {
this.document.webworker = document.webworker;
}
this.setA11y(this.settings);
this.defaultSettings = Object.assign({}, this.document.options.a11y, ((_b = (_a = Menu_MathJax.config) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.a11y) || {}, this.defaultSettings);
this.document.outputJax.reset();
this.transferMathList(document);
this.document.processed = document.processed;
if (!Menu._loadingPromise) {
this.document.outputJax.reset();
mathjax.handleRetriesFor(() => {
this.rerender(component === 'complexity' || noEnrich
? STATE.COMPILED
: STATE.TYPESET);
});
}
});
}
transferMathList(document) {
const MathItem = this.document.options.MathItem;
for (const item of document.math) {
const math = new MathItem();
Object.assign(math, item);
this.document.math.push(math);
}
}
formatSource(text) {
return text
.trim()
.replace(/&/g, '&')
.replace(//g, '>');
}
toMML(math) {
return this.MmlVisitor.visitTree(math.root, math, {
filterSRE: !this.settings.showSRE,
filterTex: !this.settings.showTex,
texHints: this.settings.texHints,
semantics: this.settings.semantics && math.inputJax.name !== 'MathML',
});
}
toSVG(math) {
const jax = this.jax.SVG;
if (!jax)
return Promise.resolve("SVG can't be produced. Try switching to SVG output first.");
const adaptor = jax.adaptor;
const cache = jax.options.fontCache;
const breaks = !!math.root.getProperty('process-breaks');
if (cache !== 'global' &&
(math.display || !breaks) &&
adaptor.getAttribute(math.typesetRoot, 'jax') === 'SVG') {
for (const child of adaptor.childNodes(math.typesetRoot)) {
if (adaptor.kind(child) === 'svg') {
return Promise.resolve(this.formatSvg(adaptor.serializeXML(child)));
}
}
}
return this.typesetSVG(math, cache, breaks);
}
typesetSVG(math, cache, breaks) {
return Menu_awaiter(this, void 0, void 0, function* () {
const jax = this.jax.SVG;
const div = jax.html('div');
if (cache === 'global') {
jax.options.fontCache = 'local';
}
const root = math.root;
math.root = root.copy(true);
math.root.setInheritedAttributes({}, math.display, 0, false);
if (breaks) {
jax.unmarkInlineBreaks(math.root);
math.root.setProperty('inlineMarked', false);
}
const promise = mathjax.handleRetriesFor(() => {
jax.toDOM(math, div, jax.document);
});
return promise.then(() => {
math.root = root;
jax.options.fontCache = cache;
return this.formatSvg(jax.adaptor.innerHTML(div));
});
});
}
formatSvg(svg) {
const css = this.constructor.SvgCss;
svg = svg.match(/^/)
? svg.replace(//, ``)
: svg.replace(/^()/, `$1 `);
svg = svg
.replace(/ (?:role|focusable)=".*?"/g, '')
.replace(/"currentColor"/g, '"black"');
if (!this.settings.showSRE) {
svg = svg.replace(/ (?:data-semantic-.*?|data-speech-node|role|aria-(?:level|posinset|setsize|owns))=".*?"/g, '');
}
if (!this.settings.showTex) {
svg = svg.replace(/ data-latex(?:-item)?=".*?"/g, '');
}
if (!this.settings.texHints) {
svg = svg
.replace(/ data-mjx-(?:texclass|alternate|variant|pseudoscript|smallmatrix|mathaccent|auto-op|script-align|vbox)=".*?"/g, '')
.replace(/ data-mml-node="TeXAtom"/g, '');
}
return `${XMLDECLARATION}\n${svg}`;
}
postSvgImage() {
this.postInfo(this.svgImage);
this.toSVG(this.menu.mathItem).then((svg) => {
const html = this.svgImage.html.querySelector('#svg-image');
html.innerHTML = this.formatSource(svg).replace(/\n/g, ' ');
});
}
zoom(event, type, math) {
if (!event || this.isZoomEvent(event, type)) {
this.menu.mathItem = math;
if (event) {
this.menu.post(event);
}
this.postInfo(this.zoomBox);
}
}
isZoomEvent(event, zoom) {
return (this.settings.zoom === zoom &&
(!this.settings.alt || event.altKey) &&
(!this.settings.ctrl || event.ctrlKey) &&
(!this.settings.cmd || event.metaKey) &&
(!this.settings.shift || event.shiftKey));
}
rerender(start = STATE.TYPESET) {
this.rerenderStart = Math.min(start, this.rerenderStart);
const startup = Menu_MathJax.startup;
if (!Menu.loading && startup.hasTypeset) {
startup.document.whenReady(() => Menu_awaiter(this, void 0, void 0, function* () {
if (this.rerenderStart <= STATE.COMPILED) {
this.document.reset({ inputJax: [] });
}
yield this.document.rerenderPromise(this.rerenderStart);
this.rerenderStart = STATE.LAST;
}));
}
}
copyMathML() {
copyToClipboard(this.toMML(this.menu.mathItem));
}
copyOriginal() {
copyToClipboard(this.menu.mathItem.math.trim());
}
copySvgImage() {
this.toSVG(this.menu.mathItem).then((svg) => {
copyToClipboard(svg);
});
}
copySpeechText() {
copyToClipboard(this.menu.mathItem.outputData.speech);
}
copyBrailleText() {
copyToClipboard(this.menu.mathItem.outputData.braille);
}
copyErrorMessage() {
copyToClipboard(this.menu.errorMsg.trim());
}
addMenu(math) {
this.addEvents(math);
this.menu.store.insert(math.typesetRoot);
math.typesetRoot.tabIndex = this.settings.inTabOrder ? 0 : -1;
}
addEvents(math) {
const node = math.typesetRoot;
node.addEventListener('mousedown', () => {
var _a, _b;
this.menu.mathItem = math;
this.current = (_b = (_a = math.explorers) === null || _a === void 0 ? void 0 : _a.speech) === null || _b === void 0 ? void 0 : _b.current;
}, true);
node.addEventListener('contextmenu', () => {
var _a;
this.menu.mathItem = math;
const speech = (_a = math.explorers) === null || _a === void 0 ? void 0 : _a.speech;
if (speech) {
math.outputData.nofocus = !this.current;
speech.refocus = this.current;
}
}, true);
node.addEventListener('keydown', () => (this.menu.mathItem = math), true);
node.addEventListener('click', (event) => this.zoom(event, 'Click', math), true);
node.addEventListener('dblclick', (event) => this.zoom(event, 'DoubleClick', math), true);
}
clear() {
this.menu.store.clear();
}
variable(name, action) {
return {
name: name,
getter: () => this.settings[name],
setter: (value) => {
this.settings[name] = value;
if (action) {
action(value);
}
this.saveUserSettings();
},
};
}
a11yVar(name, action) {
return {
name: name,
getter: () => this.getA11y(name),
setter: (value) => {
this.settings[name] = value;
this.setA11y({ [name]: value });
if (action) {
action(value);
}
this.saveUserSettings();
},
};
}
submenu(id, content, entries = [], disabled = false) {
let items = [];
for (const entry of entries) {
if (Array.isArray(entry)) {
items = items.concat(entry);
}
else {
items.push(entry);
}
}
return {
type: 'submenu',
id,
content,
menu: { items },
disabled: items.length === 0 || disabled,
};
}
command(id, content, action, other = {}) {
return Object.assign({ type: 'command', id, content, action }, other);
}
checkbox(id, content, variable, other = {}) {
return Object.assign({ type: 'checkbox', id, content, variable }, other);
}
radioGroup(variable, radios) {
return radios.map((def) => this.radio(def[0], def[1] || def[0], variable));
}
radio(id, content, variable, other = {}) {
return Object.assign({ type: 'radio', id, content, variable }, other);
}
label(id, content) {
return { type: 'label', id, content };
}
rule() {
return { type: 'rule' };
}
}
Menu.MENU_STORAGE = 'MathJax-Menu-Settings';
Menu.OPTIONS = {
settings: {
showSRE: false,
showTex: false,
texHints: true,
semantics: false,
zoom: 'NoZoom',
zscale: '200%',
renderer: 'CHTML',
alt: false,
cmd: false,
ctrl: false,
shift: false,
scale: 1,
overflow: 'Scroll',
breakInline: true,
autocollapse: false,
collapsible: false,
enrich: true,
inTabOrder: true,
assistiveMml: false,
speech: true,
braille: true,
brailleCode: 'nemeth',
speechRules: 'clearspeak-default',
roleDescription: 'math',
tabSelects: 'all',
},
jax: {
CHTML: null,
SVG: null,
},
annotationTypes: expandable({
TeX: ['TeX', 'LaTeX', 'application/x-tex'],
StarMath: ['StarMath 5.0'],
Maple: ['Maple'],
ContentMathML: ['MathML-Content', 'application/mathml-content+xml'],
OpenMath: ['OpenMath'],
}),
};
Menu.SvgCss = [
'svg a{fill:blue;stroke:blue}',
'[data-mml-node="merror"]>g{fill:red;stroke:red}',
'[data-mml-node="merror"]>rect[data-background]{fill:yellow;stroke:none}',
'[data-frame],[data-line]{stroke-width:70px;fill:none}',
'.mjx-dashed{stroke-dasharray:140}',
'.mjx-dotted{stroke-linecap:round;stroke-dasharray:0,140}',
'use[data-c]{stroke-width:3px}',
].join('');
Menu.loading = 0;
Menu.loadingPromises = new Map();
Menu._loadingPromise = null;
Menu._loadingOK = null;
Menu._loadingFailed = null;
//# sourceMappingURL=Menu.js.map
;// ./mjs/ui/menu/MenuHandler.js
newState('CONTEXT_MENU', 170);
function MenuMathItemMixin(BaseMathItem) {
return class extends BaseMathItem {
addMenu(document, force = false) {
if (this.state() >= STATE.CONTEXT_MENU)
return;
if (!this.isEscaped && (document.options.enableMenu || force)) {
document.menu.addMenu(this);
}
this.state(STATE.CONTEXT_MENU);
}
getMenus(document) {
document.menu.menu.store.sort();
}
checkLoading(document) {
document.checkLoading();
}
};
}
function MenuMathDocumentMixin(BaseDocument) {
var _a;
return _a = class extends BaseDocument {
constructor(...args) {
super(...args);
this.menu = new this.options.MenuClass(this, this.options.menuOptions);
const ProcessBits = this.constructor.ProcessBits;
if (!ProcessBits.has('context-menu')) {
ProcessBits.allocate('context-menu');
}
this.options.MathItem = MenuMathItemMixin(this.options.MathItem);
const settings = this.menu.settings;
const options = this.options;
const enrich = (options.enableEnrichment = settings.enrich);
options.enableSpeech = settings.speech && enrich;
options.enableBraille = settings.braille && enrich;
options.enableComplexity = settings.collapsible && enrich;
options.enableExplorer = enrich;
}
addMenu() {
if (!this.processed.isSet('context-menu')) {
for (const math of this.math) {
math.addMenu(this);
}
this.processed.set('context-menu');
}
return this;
}
getMenus() {
this.menu.menu.store.sort();
}
checkLoading() {
let result = true;
try {
this._checkLoading();
result = false;
}
catch (err) {
if (!err.retry) {
throw err;
}
}
return result;
}
_checkLoading() {
if (this.menu.isLoading) {
mathjax.retryAfter(this.menu.loadingPromise.catch((err) => console.log(err)));
}
if (this.options.enableComplexity) {
this.menu.checkComponent('a11y/complexity');
}
if (this.options.enableExplorer) {
this.menu.checkComponent('a11y/explorer');
}
return this;
}
state(state, restore = false) {
super.state(state, restore);
if (state < STATE.CONTEXT_MENU) {
this.processed.clear('context-menu');
}
return this;
}
},
_a.OPTIONS = Object.assign(Object.assign({ enableEnrichment: true, enableComplexity: true, enableSpeech: true, enableBraille: true, enableExplorer: true, enrichSpeech: 'none', enrichError: (_doc, _math, err) => console.warn('Enrichment Error:', err) }, BaseDocument.OPTIONS), { MenuClass: Menu, menuOptions: Menu.OPTIONS, enableMenu: true, sre: BaseDocument.OPTIONS.sre || expandable({}), a11y: BaseDocument.OPTIONS.a11y || expandable({}), renderActions: expandable(Object.assign(Object.assign({}, BaseDocument.OPTIONS.renderActions), { addMenu: [STATE.CONTEXT_MENU], getMenus: [STATE.INSERTED + 5, false], checkLoading: [
STATE.UNPROCESSED + 1,
(doc) => doc.checkLoading(),
'',
false,
] })) }),
_a;
}
function MenuHandler(handler) {
handler.documentClass = MenuMathDocumentMixin(handler.documentClass);
return handler;
}
//# sourceMappingURL=MenuHandler.js.map
;// ./components/mjs/ui/menu/lib/menu.js
if (MathJax.loader) {
MathJax.loader.checkVersion('ui/menu', VERSION, 'ui');
}
combineWithMathJax({_: {
a11y: {
speech: {
SpeechMenu: SpeechMenu_namespaceObject
}
},
ui: {
menu: {
AnnotationMenu: AnnotationMenu_namespaceObject,
MJContextMenu: MJContextMenu_namespaceObject,
Menu: Menu_namespaceObject,
MenuHandler: MenuHandler_namespaceObject,
MenuUtil: MenuUtil_namespaceObject,
MmlVisitor: menu_MmlVisitor_namespaceObject,
RadioCompare: RadioCompare_namespaceObject,
SelectableInfo: SelectableInfo_namespaceObject
}
}
}});
;// ./components/mjs/ui/menu/menu.js
if (MathJax.startup && hasWindow) {
MathJax.startup.extendHandler(handler => MenuHandler(handler), 20);
}
;// ./mjs/input/mathml/FindMathML.js
const NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
class FindMathML extends AbstractFindMath {
findMath(node) {
const set = new Set();
this.findMathNodes(node, set);
this.findMathPrefixed(node, set);
const html = this.adaptor.root(this.adaptor.document);
if (this.adaptor.kind(html) === 'html' && set.size === 0) {
this.findMathNS(node, set);
}
return this.processMath(set);
}
findMathNodes(node, set) {
for (const math of this.adaptor.tags(node, 'math')) {
set.add(math);
}
}
findMathPrefixed(node, set) {
const html = this.adaptor.root(this.adaptor.document);
for (const attr of this.adaptor.allAttributes(html)) {
if (attr.name.substring(0, 6) === 'xmlns:' && attr.value === NAMESPACE) {
const prefix = attr.name.substring(6);
for (const math of this.adaptor.tags(node, prefix + ':math')) {
set.add(math);
}
}
}
}
findMathNS(node, set) {
for (const math of this.adaptor.tags(node, 'math', NAMESPACE)) {
set.add(math);
}
}
processMath(set) {
const adaptor = this.adaptor;
const math = [];
for (const mml of set.values()) {
if (adaptor.kind(adaptor.parent(mml)) === 'mjx-assistive-mml')
continue;
const display = adaptor.getAttribute(mml, 'display') === 'block' ||
adaptor.getAttribute(mml, 'mode') === 'display';
const start = { node: mml, n: 0, delim: '' };
const end = { node: mml, n: 0, delim: '' };
math.push({ math: adaptor.outerHTML(mml), start, end, display });
}
return math;
}
}
FindMathML.OPTIONS = {};
//# sourceMappingURL=FindMathML.js.map
;// ./mjs/input/mathml/MathMLCompile.js
class MathMLCompile {
constructor(options = {}) {
const Class = this.constructor;
this.options = userOptions(defaultOptions({}, Class.OPTIONS), options);
}
setMmlFactory(mmlFactory) {
this.factory = mmlFactory;
}
compile(node) {
const mml = this.makeNode(node);
mml.verifyTree(this.options['verify']);
mml.setInheritedAttributes({}, false, 0, false);
mml.walkTree(this.markMrows);
return mml;
}
makeNode(node) {
const adaptor = this.adaptor;
let limits = false;
const kind = adaptor.kind(node).replace(/^.*:/, '');
let texClass = adaptor.getAttribute(node, 'data-mjx-texclass') || '';
if (texClass) {
texClass = this.filterAttribute('data-mjx-texclass', texClass) || '';
}
let type = texClass && kind === 'mrow' ? 'TeXAtom' : kind;
for (const name of this.filterClassList(adaptor.allClasses(node))) {
if (name.match(/^MJX-TeXAtom-/) && kind === 'mrow') {
texClass = name.substring(12);
type = 'TeXAtom';
}
else if (name === 'MJX-fixedlimits') {
limits = true;
}
}
if (!this.factory.getNodeClass(type)) {
return this.unknownNode(type, node);
}
return this.createMml(type, node, texClass, limits);
}
createMml(type, node, texClass, limits) {
const mml = this.factory.create(type);
if (type === 'TeXAtom' && texClass === 'OP' && !limits) {
mml.setProperty('movesupsub', true);
mml.attributes.setInherited('movablelimits', true);
}
if (texClass) {
mml.texClass = TEXCLASS[texClass];
mml.setProperty('texClass', mml.texClass);
}
this.addAttributes(mml, node);
this.checkClass(mml, node);
this.addChildren(mml, node);
return mml;
}
unknownNode(type, node) {
if (this.factory.getNodeClass('html') &&
this.options.allowHtmlInTokenNodes) {
return this.factory.create('html').setHTML(node, this.adaptor);
}
this.error('Unknown node type "' + type + '"');
return null;
}
addAttributes(mml, node) {
let ignoreVariant = false;
for (const attr of this.adaptor.allAttributes(node)) {
const name = attr.name;
const value = this.filterAttribute(name, attr.value);
if (value === null || name === 'xmlns') {
continue;
}
if (name.substring(0, 9) === 'data-mjx-') {
switch (name.substring(9)) {
case 'alternate':
mml.setProperty('variantForm', true);
break;
case 'variant':
mml.attributes.set('mathvariant', value);
mml.setProperty('ignore-variant', true);
ignoreVariant = true;
break;
case 'smallmatrix':
mml.setProperty('smallmatrix', true);
mml.setProperty('useHeight', false);
break;
case 'mathaccent':
mml.setProperty('mathaccent', value === 'true');
break;
case 'auto-op':
mml.setProperty('autoOP', value === 'true');
break;
case 'script-align':
mml.setProperty('scriptalign', value);
break;
case 'vbox':
mml.setProperty('vbox', value);
break;
default:
mml.attributes.set(name, value);
break;
}
}
else if (name !== 'class') {
const val = value.toLowerCase();
if (val === 'true' || val === 'false') {
mml.attributes.set(name, val === 'true');
}
else if (!ignoreVariant || name !== 'mathvariant') {
mml.attributes.set(name, value);
}
}
}
}
filterAttribute(_name, value) {
return value;
}
filterClassList(list) {
return list;
}
addChildren(mml, node) {
if (mml.arity === 0) {
return;
}
const adaptor = this.adaptor;
for (const child of adaptor.childNodes(node)) {
const name = adaptor.kind(child);
if (name === '#comment') {
continue;
}
if (name === '#text') {
this.addText(mml, child);
}
else if (mml.isKind('annotation-xml')) {
mml.appendChild(this.factory.create('XML').setXML(child, adaptor));
}
else {
const childMml = mml.appendChild(this.makeNode(child));
if (childMml.arity === 0 &&
adaptor.childNodes(child).length &&
!childMml.isKind('html')) {
if (this.options['fixMisplacedChildren']) {
this.addChildren(mml, child);
}
else {
childMml.mError('There should not be children for ' + childMml.kind + ' nodes', this.options['verify'], true);
}
}
}
}
if (mml.isToken) {
this.trimSpace(mml);
}
}
addText(mml, child) {
let text = this.adaptor.value(child);
if ((mml.isToken || mml.getProperty('isChars')) && mml.arity) {
if (mml.isToken) {
text = translate(text);
text = this.normalizeSpace(text);
}
mml.appendChild(this.factory.create('text').setText(text));
}
else if (text.match(/\S/)) {
this.error('Unexpected text node "' + text + '"');
}
}
checkClass(mml, node) {
const classList = [];
for (const name of this.filterClassList(this.adaptor.allClasses(node))) {
if (name.substring(0, 4) === 'MJX-') {
if (name === 'MJX-variant') {
mml.setProperty('variantForm', true);
}
else if (name.substring(0, 11) !== 'MJX-TeXAtom') {
mml.attributes.set('mathvariant', this.fixCalligraphic(name.substring(3)));
}
}
else {
classList.push(name);
}
}
if (classList.length) {
mml.attributes.set('class', classList.join(' '));
}
}
fixCalligraphic(variant) {
return variant.replace(/caligraphic/, 'calligraphic');
}
markMrows(mml) {
if (mml.isKind('mrow') && !mml.isInferred && mml.childNodes.length >= 2) {
const first = mml.childNodes[0];
const last = mml.childNodes[mml.childNodes.length - 1];
if (first.isKind('mo') &&
first.attributes.get('fence') &&
first.attributes.get('stretchy') &&
last.isKind('mo') &&
last.attributes.get('fence') &&
last.attributes.get('stretchy')) {
if (first.childNodes.length) {
mml.setProperty('open', first.getText());
}
if (last.childNodes.length) {
mml.setProperty('close', last.getText());
}
}
}
}
normalizeSpace(text) {
return text
.replace(/[\t\n\r]/g, ' ')
.replace(/ +/g, ' ');
}
trimSpace(mml) {
let child = mml.childNodes[0];
if (!child)
return;
if (child.isKind('text')) {
child.setText(child.getText().replace(/^ +/, ''));
}
child = mml.childNodes[mml.childNodes.length - 1];
if (child.isKind('text')) {
child.setText(child.getText().replace(/ +$/, ''));
}
}
error(message) {
throw new Error(message);
}
}
MathMLCompile.OPTIONS = {
MmlFactory: null,
allowHtmlInTokenNodes: false,
fixMisplacedChildren: true,
verify: Object.assign({}, AbstractMmlNode.verifyDefaults),
translateEntities: true
};
//# sourceMappingURL=MathMLCompile.js.map
;// ./mjs/input/mathml.js
class MathML extends AbstractInputJax {
constructor(options = {}) {
const [mml, find, compile] = separateOptions(options, FindMathML.OPTIONS, MathMLCompile.OPTIONS);
super(mml);
this.findMathML = this.options.FindMathML || new FindMathML(find);
this.mathml =
this.options.MathMLCompile || new MathMLCompile(compile);
this.mmlFilters = new FunctionList(this.options.mmlFilters);
}
setAdaptor(adaptor) {
super.setAdaptor(adaptor);
this.findMathML.adaptor = adaptor;
this.mathml.adaptor = adaptor;
}
setMmlFactory(mmlFactory) {
super.setMmlFactory(mmlFactory);
this.mathml.setMmlFactory(mmlFactory);
}
get processStrings() {
return false;
}
compile(math, document) {
let mml = math.start.node;
if (!mml ||
!math.end.node ||
this.options['forceReparse'] ||
this.adaptor.kind(mml) === '#text') {
let mathml = this.executeFilters(this.preFilters, math, document, (math.math || ' ').trim());
if (this.options['parseAs'] === 'html') {
mathml = `${mathml}`;
}
const doc = this.checkForErrors(this.adaptor.parse(mathml, 'text/' + this.options['parseAs']));
const body = this.adaptor.body(doc);
if (this.adaptor.childNodes(body).length !== 1) {
this.error('MathML must consist of a single element');
}
mml = this.adaptor.remove(this.adaptor.firstChild(body));
if (this.adaptor.kind(mml).replace(/^[a-z]+:/, '') !== 'math') {
this.error('MathML must be formed by a element, not <' +
this.adaptor.kind(mml) +
'>');
}
}
mml = this.executeFilters(this.mmlFilters, math, document, mml);
let root = this.mathml.compile(mml);
root = this.executeFilters(this.postFilters, math, document, root);
math.display = root.attributes.get('display') === 'block';
return root;
}
checkForErrors(doc) {
const err = this.adaptor.tags(this.adaptor.body(doc), 'parsererror')[0];
if (err) {
if (this.adaptor.textContent(err) === '') {
this.error('Error processing MathML');
}
this.options['parseError'].call(this, err);
}
return doc;
}
error(message) {
throw new Error(message);
}
findMath(node) {
return this.findMathML.findMath(node);
}
}
MathML.NAME = 'MathML';
MathML.OPTIONS = defaultOptions({
parseAs: 'html',
forceReparse: false,
mmlFilters: [],
FindMathML: null,
MathMLCompile: null,
parseError: function (node) {
this.error(this.adaptor.textContent(node).replace(/\n.*/g, ''));
}
}, AbstractInputJax.OPTIONS);
//# sourceMappingURL=mathml.js.map
;// ./components/mjs/input/mml/lib/mml.js
if (MathJax.loader) {
MathJax.loader.checkVersion('input/mml', VERSION, 'input');
}
combineWithMathJax({_: {
input: {
mathml_ts: mathml_namespaceObject,
mathml: {
FindMathML: FindMathML_namespaceObject,
MathMLCompile: MathMLCompile_namespaceObject
}
}
}});
;// ./components/mjs/input/mml/init.js
if (MathJax.loader) {
//
// Install a path-filter to cause loading of an entity file to load all entities,
// since the individual files don't have individual components.
//
MathJax.loader.pathFilters.add((data) => {
data.name = data.name.replace(/\/util\/entities\/.*?\.js/, '/input/mml/entities.js');
return true;
});
}
;// ./components/mjs/a11y/sre/lib/sre.js
if (MathJax.loader) {
MathJax.loader.checkVersion('a11y/sre', VERSION, 'a11y');
}
combineWithMathJax({_: {
a11y: {
sre_ts: sre_namespaceObject
}
}});
;// ./components/mjs/a11y/sre/sre.js
;// ./mjs/a11y/semantic-enrich.js
newState('ENRICHED', STATE.COMPILED + 10);
class enrichVisitor extends SerializedMmlVisitor {
visitTree(node, math) {
this.mactionId = 0;
const mml = super.visitTree(node);
if (this.mactionId) {
math.inputData.hasMaction = true;
}
return mml;
}
visitHtmlNode(node, _space) {
return node.getSerializedXML();
}
visitMactionNode(node, space) {
const [nl, endspace] = node.childNodes.length === 0 ? ['', ''] : ['\n', space];
const children = this.childNodeMml(node, space + ' ', nl);
let attributes = this.getAttributes(node);
if (node.attributes.get('actiontype') === 'toggle') {
const id = ++this.mactionId;
node.setProperty('mactionId', id);
attributes =
` data-maction-id="${id}" selection="${node.attributes.get('selection')}"` +
attributes
.replace(/ selection="\d+"/, '')
.replace(/ data-maction-id="\d+"/, '');
}
return (`${space}` +
(children.match(/\S/) ? nl + children + endspace : '') +
' ');
}
}
function EnrichedMathItemMixin(BaseMathItem, MmlJax, toMathML) {
return class extends BaseMathItem {
constructor() {
super(...arguments);
this.toMathML = toMathML;
}
serializeMml(node) {
if ('outerHTML' in node) {
return node.outerHTML;
}
if (typeof Element !== 'undefined' &&
typeof window !== 'undefined' &&
node instanceof Element) {
const div = window.document.createElement('div');
div.appendChild(node);
return div.innerHTML;
}
return node.toString();
}
enrich(document, force = false) {
if (this.state() >= STATE.ENRICHED)
return;
if (!this.isEscaped && (document.options.enableEnrichment || force)) {
const math = new document.options.MathItem('', MmlJax);
try {
let mml;
if (!this.inputData.originalMml) {
mml = this.inputData.originalMml = this.toMathML(this.root, this);
}
else {
mml = this.adjustSelections();
}
const enriched = toEnriched(mml);
this.inputData.enrichedMml = math.math = this.serializeMml(enriched);
math.math = math.math
.replace(/ role="treeitem"/g, ' data-speech-node="true"')
.replace(/ aria-(?:posinset|owns|setsize)=".*?"/g, '');
math.display = this.display;
math.compile(document);
this.root = math.root;
}
catch (err) {
document.options.enrichError(document, this, err);
}
}
this.state(STATE.ENRICHED);
}
toEnriched(mml) {
return this.serializeMml(toEnriched(mml));
}
unEnrich(document) {
const mml = this.inputData.originalMml;
if (!mml)
return;
const math = new document.options.MathItem('', MmlJax);
math.math = mml;
math.display = this.display;
math.compile(document);
this.root = math.root;
}
adjustSelections() {
const mml = this.inputData.originalMml;
if (!this.inputData.hasMaction)
return mml;
const maction = [];
this.root.walkTree((node) => {
if (node.isKind('maction')) {
maction[node.attributes.get('data-maction-id')] = node;
}
});
return mml.replace(/(data-maction-id="(\d+)" selection=)"\d+"/g, (_match, prefix, id) => `${prefix}"${maction[id].attributes.get('selection')}"`);
}
};
}
function EnrichedMathDocumentMixin(BaseDocument, MmlJax) {
var _a;
return _a = class extends BaseDocument {
constructor(...args) {
super(...args);
MmlJax.setMmlFactory(this.mmlFactory);
const ProcessBits = this.constructor
.ProcessBits;
if (!ProcessBits.has('enriched')) {
ProcessBits.allocate('enriched');
}
const visitor = new enrichVisitor(this.mmlFactory);
const toMathML = (node, math) => visitor.visitTree(node, math);
this.options.MathItem = EnrichedMathItemMixin(this.options.MathItem, MmlJax, toMathML);
}
enrich() {
if (!this.processed.isSet('enriched')) {
if (this.options.enableEnrichment) {
setupEngine(this.options.sre);
for (const math of this.math) {
math.enrich(this);
}
}
this.processed.set('enriched');
}
return this;
}
enrichError(_doc, _math, err) {
console.warn('Enrichment error:', err);
}
state(state, restore = false) {
super.state(state, restore);
if (state < STATE.ENRICHED) {
this.processed.clear('enriched');
if (state >= STATE.COMPILED) {
for (const item of this.math) {
item.unEnrich(this);
}
}
}
return this;
}
},
_a.OPTIONS = Object.assign(Object.assign({}, BaseDocument.OPTIONS), { enableEnrichment: true, enrichError: (doc, math, err) => doc.enrichError(doc, math, err), renderActions: expandable(Object.assign(Object.assign({}, BaseDocument.OPTIONS.renderActions), { enrich: [STATE.ENRICHED] })), sre: expandable({
speech: 'none',
locale: 'en',
domain: 'clearspeak',
style: 'default',
braille: 'nemeth',
structure: true,
aria: true,
}) }),
_a;
}
function EnrichHandler(handler, MmlJax) {
MmlJax.setAdaptor(handler.adaptor);
handler.documentClass = EnrichedMathDocumentMixin(handler.documentClass, MmlJax);
return handler;
}
//# sourceMappingURL=semantic-enrich.js.map
;// ./components/mjs/a11y/semantic-enrich/lib/semantic-enrich.js
if (MathJax.loader) {
MathJax.loader.checkVersion('a11y/semantic-enrich', VERSION, 'a11y');
}
combineWithMathJax({_: {
a11y: {
"semantic-enrich": semantic_enrich_namespaceObject
}
}});
;// ./components/mjs/a11y/semantic-enrich/semantic-enrich.js
if (MathJax.startup) {
MathJax.startup.extendHandler(
handler => EnrichHandler(handler, new MathML({allowHtmlInTokenNodes: true}))
);
}
;// ./mjs/a11y/speech/SpeechUtil.js
const ProsodyKeys = ['pitch', 'rate', 'volume'];
function ssmlParsing(speech) {
const xml = parseDOM(speech);
const instr = [];
const text = [];
recurseSsml(Array.from(xml.childNodes), instr, text);
return [text.join(' '), instr];
}
function recurseSsml(nodes, instr, text, prosody = {}) {
for (const node of nodes) {
if (node.nodeType === 3) {
const content = node.textContent.trim();
if (content) {
text.push(content);
instr.push(Object.assign({ text: content }, prosody));
}
continue;
}
if (node.nodeType === 1) {
const element = node;
const tag = element.tagName;
if (tag === 'speak') {
continue;
}
if (tag === 'prosody') {
recurseSsml(Array.from(node.childNodes), instr, text, getProsody(element, prosody));
continue;
}
switch (tag) {
case 'break':
instr.push({ pause: element.getAttribute('time') });
break;
case 'mark':
instr.push({ mark: element.getAttribute('name') });
break;
case 'say-as': {
const txt = element.textContent;
instr.push(Object.assign({ text: txt, character: true }, prosody));
text.push(txt);
break;
}
}
}
}
}
const combinePros = {
pitch: (x, _sign) => 1 * (x / 100),
volume: (x, _sign) => 0.5 * (x / 100),
rate: (x, _sign) => 1 * (x / 100),
};
function getProsody(element, prosody) {
const combine = {};
for (const pros of ProsodyKeys) {
if (element.hasAttribute(pros)) {
const [sign, value] = extractProsody(element.getAttribute(pros));
if (!sign) {
combine[pros] = pros === 'volume' ? 0.5 : 1;
continue;
}
let orig = prosody[pros];
orig = orig ? orig : pros === 'volume' ? 0.5 : 1;
const relative = combinePros[pros](parseInt(value, 10), sign);
combine[pros] = sign === '-' ? orig - relative : orig + relative;
}
}
return combine;
}
const prosodyRegexp = /([+-]?)([0-9]+)%/;
function extractProsody(attr) {
const match = attr.match(prosodyRegexp);
if (!match) {
console.warn('Something went wrong with the prosody matching.');
return ['', '100'];
}
return [match[1], match[2]];
}
function buildLabel(speech, prefix, postfix, sep = ' ') {
if (!speech) {
return '';
}
const label = [speech];
if (prefix) {
label.unshift(prefix);
}
if (postfix) {
label.push(postfix);
}
return label.join(sep);
}
function buildSpeech(speech, locale = 'en', rate = '100') {
return ssmlParsing('` +
`${speech}` +
' ');
}
function honk() {
const ac = new AudioContext();
const os = ac.createOscillator();
os.frequency.value = 300;
os.connect(ac.destination);
os.start(ac.currentTime);
os.stop(ac.currentTime + 0.05);
}
var InPlace;
(function (InPlace) {
InPlace[InPlace["NONE"] = 0] = "NONE";
InPlace[InPlace["DEPTH"] = 1] = "DEPTH";
InPlace[InPlace["SUMMARY"] = 2] = "SUMMARY";
})(InPlace || (InPlace = {}));
var SemAttr;
(function (SemAttr) {
SemAttr["SPEECH"] = "data-semantic-speech-none";
SemAttr["SPEECH_SSML"] = "data-semantic-speech";
SemAttr["SUMMARY"] = "data-semantic-summary-none";
SemAttr["SUMMARY_SSML"] = "data-semantic-summary";
SemAttr["PREFIX"] = "data-semantic-prefix-none";
SemAttr["PREFIX_SSML"] = "data-semantic-prefix";
SemAttr["POSTFIX"] = "data-semantic-postfix-none";
SemAttr["POSTFIX_SSML"] = "data-semantic-postfix";
SemAttr["BRAILLE"] = "data-semantic-braille";
})(SemAttr || (SemAttr = {}));
//# sourceMappingURL=SpeechUtil.js.map
;// ./mjs/a11y/speech/GeneratorPool.js
class GeneratorPool {
constructor() {
this.promise = Promise.resolve();
this.adaptor = null;
this._options = {};
this._init = false;
}
set element(element) {
this._element = element;
}
get element() {
return this._element;
}
set options(options) {
this._options = Object.assign({}, (options === null || options === void 0 ? void 0 : options.sre) || {}, {
enableSpeech: options.enableSpeech,
enableBraille: options.enableBraille,
});
delete this._options.custom;
}
get options() {
return this._options;
}
init(options, adaptor, webworker) {
this.options = options;
if (this._init)
return;
this.adaptor = adaptor;
this.webworker = webworker;
this._init = true;
}
update(options) {
Object.assign(this.options, options);
}
Speech(item) {
const mml = item.outputData.mml;
const options = Object.assign({}, this.options, { modality: 'speech' });
return (this.promise = this.webworker.Speech(mml, options, item));
}
SpeechFor(item, mml) {
const options = Object.assign({}, this.options, { modality: 'speech' });
return this.webworker.speechFor(mml, options, item);
}
cancel(item) {
var _a;
(_a = this.webworker) === null || _a === void 0 ? void 0 : _a.Cancel(item);
}
updateRegions(node, speechRegion, brailleRegion) {
speechRegion.Update(this.getLabel(node));
brailleRegion.Update(this.getBraille(node));
}
getOptions(node) {
var _a, _b, _c, _d;
return {
locale: (_a = this.adaptor.getAttribute(node, 'data-semantic-locale')) !== null && _a !== void 0 ? _a : '',
domain: (_b = this.adaptor.getAttribute(node, 'data-semantic-domain')) !== null && _b !== void 0 ? _b : '',
style: (_c = this.adaptor.getAttribute(node, 'data-semantic-style')) !== null && _c !== void 0 ? _c : '',
domain2style: (_d = this.adaptor.getAttribute(node, 'data-semantic-domain2style')) !== null && _d !== void 0 ? _d : '',
};
}
nextRules(item) {
const options = this.getOptions(item.typesetRoot);
this.update(options);
return (this.promise = this.webworker.nextRules(item.outputData.mml, Object.assign({}, this.options, { modality: 'speech' }), item));
}
nextStyle(node, item) {
const options = this.getOptions(item.typesetRoot);
this.update(options);
return (this.promise = this.webworker.nextStyle(item.outputData.mml, Object.assign({}, this.options, { modality: 'speech' }), this.adaptor.getAttribute(node, 'data-semantic-id'), item));
}
getLabel(node, _center = '', sep = ' ') {
const adaptor = this.adaptor;
return (buildLabel(adaptor.getAttribute(node, SemAttr.SPEECH_SSML), adaptor.getAttribute(node, SemAttr.PREFIX_SSML), adaptor.getAttribute(node, SemAttr.POSTFIX_SSML), sep) || adaptor.getAttribute(node, 'aria-label'));
}
getBraille(node) {
const adaptor = this.adaptor;
return (adaptor.getAttribute(node, 'aria-braillelabel') ||
adaptor.getAttribute(node, SemAttr.BRAILLE));
}
getLocalePreferences(prefs) {
return (this.promise = this.webworker.clearspeakLocalePreferences(this.options, prefs));
}
getRelevantPreferences(item, semantic, prefs, counter) {
const mml = item.outputData.mml;
return (this.promise = this.webworker.clearspeakRelevantPreferences(mml, semantic, prefs, counter));
}
}
//# sourceMappingURL=GeneratorPool.js.map
;// ./mjs/a11y/speech/WebWorker.js
var WebWorker_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
class Task {
constructor(cmd, item, resolve, reject) {
this.cmd = cmd;
this.item = item;
this.resolve = resolve;
this.reject = reject;
}
}
class WorkerHandler {
constructor(adaptor, options) {
this.adaptor = adaptor;
this.options = options;
this.ready = false;
this.tasks = [];
this.Commands = {
Ready(handler, _data) {
handler.ready = true;
handler.postNext();
},
Finished(handler, data) {
const task = handler.tasks.shift();
if (data.success) {
task.resolve(data.result);
}
else {
task.reject(data.error);
}
handler.postNext();
},
Log(handler, data) {
if (handler.options.debug) {
console.log('Log:', data);
}
},
};
}
Start() {
return WebWorker_awaiter(this, void 0, void 0, function* () {
if (this.ready)
throw Error('Worker already started');
this.worker = yield this.adaptor.createWorker(this.Listener.bind(this), this.options);
});
}
debug(msg, ...rest) {
if (this.options.debug) {
console.info(msg, ...rest);
}
}
Listener(event) {
this.debug('Worker >>> Client:', event.data);
if (Object.hasOwn(this.Commands, event.data.cmd)) {
this.Commands[event.data.cmd](this, event.data.data);
}
else {
this.debug('Invalid command from worker: ' + event.data.cmd);
}
}
Post(msg, item) {
const promise = new Promise((resolve, reject) => {
this.tasks.push(new Task(msg, item, resolve, reject));
});
if (this.ready && this.tasks.length === 1) {
this.postNext();
}
return promise;
}
postNext() {
if (this.tasks.length) {
const msg = Object.assign({}, this.tasks[0].cmd, {
debug: this.options.debug,
});
this.worker.postMessage(msg);
}
}
Cancel(item) {
const i = this.tasks.findIndex((task) => task.item === item);
if (i > 0) {
this.tasks[i].reject(`Task ${this.tasks[i].cmd.cmd} cancelled`);
this.tasks.splice(i, 1);
}
}
Setup(options) {
return this.Post({
cmd: 'setup',
data: {
domain: options.domain,
style: options.style,
locale: options.locale,
modality: options.modality,
},
});
}
Speech(math, options, item) {
return WebWorker_awaiter(this, void 0, void 0, function* () {
this.Attach(item, options.enableSpeech, options.enableBraille, yield this.Post({
cmd: 'speech',
data: { mml: math, options: options },
}, item));
});
}
nextRules(math, options, item) {
return WebWorker_awaiter(this, void 0, void 0, function* () {
this.Attach(item, options.enableSpeech, options.enableBraille, yield this.Post({
cmd: 'nextRules',
data: { mml: math, options: options },
}, item));
});
}
nextStyle(math, options, nodeId, item) {
return WebWorker_awaiter(this, void 0, void 0, function* () {
this.Attach(item, options.enableSpeech, options.enableBraille, yield this.Post({
cmd: 'nextStyle',
data: {
mml: math,
options: options,
nodeId: nodeId,
},
}, item));
});
}
speechFor(math, options, item) {
return WebWorker_awaiter(this, void 0, void 0, function* () {
const data = yield this.Post({
cmd: 'speech',
data: { mml: math, options: options },
}, item);
return JSON.parse(data);
});
}
Attach(item, speech, braille, structure) {
const data = JSON.parse(structure);
const container = item.typesetRoot;
if (!container)
return;
this.setSpecialAttributes(container, data.options, 'data-semantic-', [
'locale',
'domain',
'style',
'domain2style',
]);
const adaptor = this.adaptor;
this.setSpecialAttributes(container, data.translations, 'data-semantic-');
for (const [id, sid] of Object.entries(data.mactions)) {
let node = adaptor.getElement('#' + id, container);
if (!node || !adaptor.childNodes(node)[0]) {
continue;
}
node = adaptor.childNodes(node)[0];
adaptor.setAttribute(node, 'data-semantic-type', 'dummy');
this.setSpecialAttributes(node, sid, '');
}
this.setSpeechAttributes(adaptor.childNodes(container)[0], '', data, speech, braille);
if (speech) {
if (data.label) {
adaptor.setAttribute(container, SemAttr.SPEECH, data.label);
adaptor.setAttribute(container, SemAttr.SPEECH_SSML, data.ssml);
item.outputData.speech = data.label;
}
adaptor.setAttribute(container, 'data-speech-attached', 'true');
}
if (braille) {
if (data.braillelabel) {
adaptor.setAttribute(container, SemAttr.BRAILLE, data.braillelabel);
item.outputData.braille = data.braillelabel;
}
if (data.braille) {
adaptor.setAttribute(container, 'data-braille-attached', 'true');
}
}
}
setSpeechAttribute(node, data, speech, braille) {
var _a, _b;
const adaptor = this.adaptor;
const id = adaptor.getAttribute(node, 'data-semantic-id');
adaptor.removeAttribute(node, 'data-speech-node');
if (speech && data.speech[id]['speech-none']) {
adaptor.setAttribute(node, 'data-speech-node', 'true');
for (let [key, value] of Object.entries(data.speech[id])) {
key = key.replace(/-ssml$/, '');
if (value) {
adaptor.setAttribute(node, `data-semantic-${key}`, value);
}
}
}
if (braille && ((_b = (_a = data.braille) === null || _a === void 0 ? void 0 : _a[id]) === null || _b === void 0 ? void 0 : _b['braille-none'])) {
adaptor.setAttribute(node, 'data-speech-node', 'true');
const value = data.braille[id]['braille-none'];
adaptor.setAttribute(node, SemAttr.BRAILLE, value);
}
}
setSpeechAttributes(root, rootId, data, speech, braille) {
const adaptor = this.adaptor;
if (!root ||
adaptor.kind(root) === '#text' ||
adaptor.kind(root) === '#comment') {
return rootId;
}
root = root;
if (adaptor.hasAttribute(root, 'data-semantic-id')) {
this.setSpeechAttribute(root, data, speech, braille);
if (!rootId && !adaptor.hasAttribute(root, 'data-semantic-parent')) {
rootId = adaptor.getAttribute(root, 'data-semantic-id');
}
}
for (const child of Array.from(adaptor.childNodes(root))) {
rootId = this.setSpeechAttributes(child, rootId, data, speech, braille);
}
return rootId;
}
setSpecialAttributes(node, map, prefix, keys) {
if (!map)
return;
keys = keys || Object.keys(map);
for (const key of keys) {
const value = map[key];
if (value) {
this.adaptor.setAttribute(node, `${prefix}${key.toLowerCase()}`, value);
}
}
}
Detach(item) {
const container = item.typesetRoot;
this.adaptor.removeAttribute(container, 'data-speech-attached');
this.adaptor.removeAttribute(container, 'data-braille-attached');
this.detachSpeech(container);
}
detachSpeech(node) {
const adaptor = this.adaptor;
const children = adaptor.childNodes(node);
if (!children)
return;
if (adaptor.kind(node) !== '#text') {
for (const key of [
'none',
'summary-none',
'speech',
'speech-none',
'summary',
'braille',
]) {
adaptor.removeAttribute(node, `data-semantic-${key}`);
}
}
for (const child of children) {
this.detachSpeech(child);
}
}
Terminate() {
this.debug('Terminating pending tasks');
for (const task of this.tasks) {
task.reject(`${task.cmd.data.cmd} cancelled by WorkerHandler termination`);
}
this.tasks = [];
this.debug('Terminating worker');
return this.worker.terminate();
}
Stop() {
return WebWorker_awaiter(this, void 0, void 0, function* () {
if (!this.worker) {
throw Error('Worker has not been started');
}
yield this.Terminate();
this.worker = null;
this.ready = false;
});
}
clearspeakLocalePreferences(options, prefs) {
return WebWorker_awaiter(this, void 0, void 0, function* () {
yield this.Post({
cmd: 'localePreferences',
data: {
options: options,
},
}).then((data) => {
prefs.set(options.locale, JSON.parse(data));
});
});
}
clearspeakRelevantPreferences(math, nodeId, prefs, counter) {
return WebWorker_awaiter(this, void 0, void 0, function* () {
yield this.Post({
cmd: 'relevantPreferences',
data: {
mml: math,
id: nodeId,
},
}).then((e) => {
prefs.set(counter, e);
});
});
}
}
//# sourceMappingURL=WebWorker.js.map
;// ./components/root-pack.js
//
// Replacement for __dirname for root directory
//
const root_pack_config = global_MathJax.config || {};
const root_pack_mjxRoot = () => root_pack_config?.loader?.paths?.mathjax || root_pack_config?.__dirname || '/';
;// ./mjs/components/mjs/sre-root.js
//
// Replacement for __dirname for sre-root directory
//
const sreRoot = () => root_pack_mjxRoot() + '/sre';
;// ./mjs/a11y/speech.js
var speech_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
newState('ATTACHSPEECH', STATE.INSERTED + 10);
function SpeechMathItemMixin(EnrichedMathItem) {
return class extends EnrichedMathItem {
constructor() {
super(...arguments);
this.generatorPool = new GeneratorPool();
}
attachSpeech(document) {
this.outputData.speechPromise = null;
if (this.state() >= STATE.ATTACHSPEECH)
return;
this.state(STATE.ATTACHSPEECH);
if (this.isEscaped ||
!(document.options.enableSpeech || document.options.enableBraille) ||
!document.options.enableEnrichment) {
return;
}
document.getWebworker();
this.generatorPool.init(document.options, document.adaptor, document.webworker);
this.outputData.mml = this.toMathML(this.root, this);
const promise = this.generatorPool
.Speech(this)
.catch((err) => document.options.speechError(document, this, err));
document.savePromise(promise);
this.outputData.speechPromise = promise;
}
detachSpeech(document) {
document.webworker.Detach(this);
}
speechFor(mml) {
return speech_awaiter(this, void 0, void 0, function* () {
mml = this.toEnriched(mml);
const data = yield this.generatorPool.SpeechFor(this, mml);
return [data.label, data.braillelabel];
});
}
clear() {
this.generatorPool.cancel(this);
}
};
}
function SpeechMathDocumentMixin(EnrichedMathDocument) {
var _a;
return _a = class extends EnrichedMathDocument {
constructor(...args) {
super(...args);
this.webworker = null;
const ProcessBits = this.constructor
.ProcessBits;
if (!ProcessBits.has('attach-speech')) {
ProcessBits.allocate('attach-speech');
}
this.options.MathItem = SpeechMathItemMixin(this.options.MathItem);
}
getWebworker() {
if (this.webworker)
return;
this.webworker = new WorkerHandler(this.adaptor, this.options.worker);
this.webworker.Start();
}
attachSpeech() {
if (!this.processed.isSet('attach-speech')) {
const options = this.options;
if (options.enableEnrichment &&
(options.enableSpeech || options.enableBraille)) {
this.getWebworker();
for (const math of this.math) {
math.attachSpeech(this);
}
}
this.processed.set('attach-speech');
}
return this;
}
speechError(_doc, _math, err) {
console.warn('Speech generation error:', err);
}
state(state, restore = false) {
super.state(state, restore);
if (state < STATE.ATTACHSPEECH) {
this.processed.clear('attach-speech');
if (state >= STATE.TYPESET) {
for (const math of this.math) {
math.detachSpeech(this);
}
}
}
return this;
}
done() {
const _super = Object.create(null, {
done: { get: () => super.done }
});
return speech_awaiter(this, void 0, void 0, function* () {
var _b;
yield ((_b = this.webworker) === null || _b === void 0 ? void 0 : _b.Stop());
return _super.done.call(this);
});
}
},
_a.OPTIONS = Object.assign(Object.assign({}, EnrichedMathDocument.OPTIONS), { enableSpeech: true, enableBraille: true, speechError: (doc, math, err) => doc.speechError(doc, math, err), renderActions: expandable(Object.assign(Object.assign({}, EnrichedMathDocument.OPTIONS.renderActions), { attachSpeech: [STATE.ATTACHSPEECH] })), worker: {
path: sreRoot(),
maps: sreRoot().replace(/[cm]js\/a11y\/sre$/, 'bundle/sre/mathmaps'),
worker: 'speech-worker.js',
debug: false,
}, a11y: expandable({
speech: true,
braille: true,
}) }),
_a;
}
function SpeechHandler(handler, MmlJax) {
if (!handler.documentClass.prototype.enrich && MmlJax) {
handler = EnrichHandler(handler, MmlJax);
}
handler.documentClass = SpeechMathDocumentMixin(handler.documentClass);
return handler;
}
//# sourceMappingURL=speech.js.map
;// ./components/mjs/a11y/speech/lib/speech.js
if (MathJax.loader) {
MathJax.loader.checkVersion('a11y/speech', VERSION, 'a11y');
}
combineWithMathJax({_: {
a11y: {
speech_ts: speech_namespaceObject,
speech: {
GeneratorPool: GeneratorPool_namespaceObject,
SpeechUtil: SpeechUtil_namespaceObject,
WebWorker: WebWorker_namespaceObject
}
}
}});
;// ./components/mjs/a11y/speech/speech.js
if (MathJax.loader) {
let path = Package.resolvePath('[sre]', false);
let maps = Package.resolvePath('[mathmaps]', false);
if (hasWindow) {
path = new URL(path, location).href;
maps = new URL(maps, location).href;
} else {
const REQUIRE = typeof require !== 'undefined' ? require : MathJax.config.loader.require;
if (REQUIRE?.resolve) {
path = REQUIRE.resolve(`${path}/require.mjs`).replace(/\/[^\/]*$/, '');
maps = REQUIRE.resolve(`${maps}/base.json`).replace(/\/[^\/]*$/, '');
} else {
path = maps = '';
}
}
if (path) {
combineDefaults(MathJax.config, 'options', { worker: { path, maps } });
}
}
if (MathJax.startup) {
MathJax.startup.extendHandler(handler => SpeechHandler(handler));
}
;// ./mjs/a11y/explorer/Highlighter.js
const namedColors = {
red: { red: 255, green: 0, blue: 0 },
green: { red: 0, green: 255, blue: 0 },
blue: { red: 0, green: 0, blue: 255 },
yellow: { red: 255, green: 255, blue: 0 },
cyan: { red: 0, green: 255, blue: 255 },
magenta: { red: 255, green: 0, blue: 255 },
white: { red: 255, green: 255, blue: 255 },
black: { red: 0, green: 0, blue: 0 },
};
function getColorString(color, deflt) {
var _a;
const channel = namedColors[color.color] || namedColors[deflt.color];
channel.alpha = (_a = color.alpha) !== null && _a !== void 0 ? _a : deflt.alpha;
return rgba(channel);
}
function rgba(color) {
var _a;
return `rgba(${color.red},${color.green},${color.blue},${(_a = color.alpha) !== null && _a !== void 0 ? _a : 1})`;
}
const DEFAULT_BACKGROUND = { color: 'blue', alpha: 1 };
const DEFAULT_FOREGROUND = { color: 'black', alpha: 1 };
let Highlighter_counter = 0;
class AbstractHighlighter {
constructor() {
this.counter = Highlighter_counter++;
this.ATTR = 'sre-highlight-' + this.counter.toString();
this.mactionName = '';
this.currentHighlights = [];
}
highlight(nodes) {
this.currentHighlights.push(nodes.map((node) => {
const info = this.highlightNode(node);
this.setHighlighted(node);
return info;
}));
}
highlightAll(node) {
const mactions = this.getMactionNodes(node);
for (let i = 0, maction; (maction = mactions[i]); i++) {
this.highlight([maction]);
}
}
unhighlight() {
const nodes = this.currentHighlights.pop();
if (!nodes) {
return;
}
nodes.forEach((highlight) => {
if (this.isHighlighted(highlight.node)) {
this.unhighlightNode(highlight);
this.unsetHighlighted(highlight.node);
}
});
}
unhighlightAll() {
while (this.currentHighlights.length > 0) {
this.unhighlight();
}
}
setColor(background, foreground) {
this._foreground = getColorString(foreground, DEFAULT_FOREGROUND);
this._background = getColorString(background, DEFAULT_BACKGROUND);
}
get foreground() {
return this._foreground;
}
get background() {
return this._background;
}
getMactionNodes(node) {
return Array.from(node.getElementsByClassName(this.mactionName));
}
isMactionNode(node) {
const className = node.className || node.getAttribute('class');
return className ? !!className.match(new RegExp(this.mactionName)) : false;
}
isHighlighted(node) {
return node.hasAttribute(this.ATTR);
}
setHighlighted(node) {
node.setAttribute(this.ATTR, 'true');
}
unsetHighlighted(node) {
node.removeAttribute(this.ATTR);
}
}
class SvgHighlighter extends AbstractHighlighter {
constructor() {
super();
this.mactionName = 'maction';
}
highlightNode(node) {
let info;
if (this.isHighlighted(node)) {
info = {
node: node,
background: this.background,
foreground: this.foreground,
};
return info;
}
if (node.tagName === 'svg' || node.tagName === 'MJX-CONTAINER') {
info = {
node: node,
background: node.style.backgroundColor,
foreground: node.style.color,
};
node.style.backgroundColor = this.background;
node.style.color = this.foreground;
return info;
}
const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
rect.setAttribute('sre-highlighter-added', 'true');
const padding = 40;
const bbox = node.getBBox();
rect.setAttribute('x', (bbox.x - padding).toString());
rect.setAttribute('y', (bbox.y - padding).toString());
rect.setAttribute('width', (bbox.width + 2 * padding).toString());
rect.setAttribute('height', (bbox.height + 2 * padding).toString());
const transform = node.getAttribute('transform');
if (transform) {
rect.setAttribute('transform', transform);
}
rect.setAttribute('fill', this.background);
node.setAttribute(this.ATTR, 'true');
node.parentNode.insertBefore(rect, node);
info = { node: node, foreground: node.getAttribute('fill') };
if (node.nodeName !== 'rect') {
node.setAttribute('fill', this.foreground);
}
return info;
}
setHighlighted(node) {
if (node.tagName === 'svg') {
super.setHighlighted(node);
}
}
unhighlightNode(info) {
const previous = info.node.previousSibling;
if (previous && previous.hasAttribute('sre-highlighter-added')) {
info.foreground
? info.node.setAttribute('fill', info.foreground)
: info.node.removeAttribute('fill');
info.node.parentNode.removeChild(previous);
return;
}
info.node.style.backgroundColor = info.background;
info.node.style.color = info.foreground;
}
isMactionNode(node) {
return node.getAttribute('data-mml-node') === this.mactionName;
}
getMactionNodes(node) {
return Array.from(node.querySelectorAll(`[data-mml-node="${this.mactionName}"]`));
}
}
class ChtmlHighlighter extends AbstractHighlighter {
constructor() {
super();
this.mactionName = 'mjx-maction';
}
highlightNode(node) {
const info = {
node: node,
background: node.style.backgroundColor,
foreground: node.style.color,
};
if (!this.isHighlighted(node)) {
node.style.backgroundColor = this.background;
node.style.color = this.foreground;
}
return info;
}
unhighlightNode(info) {
info.node.style.backgroundColor = info.background;
info.node.style.color = info.foreground;
}
isMactionNode(node) {
var _a;
return ((_a = node.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === this.mactionName.toUpperCase();
}
getMactionNodes(node) {
return Array.from(node.getElementsByTagName(this.mactionName));
}
}
function getHighlighter(back, fore, renderer) {
const highlighter = new highlighterMapping[renderer]();
highlighter.setColor(back, fore);
return highlighter;
}
const highlighterMapping = {
SVG: SvgHighlighter,
CHTML: ChtmlHighlighter,
generic: ChtmlHighlighter,
};
//# sourceMappingURL=Highlighter.js.map
;// ./mjs/a11y/explorer/Region.js
class AbstractRegion {
constructor(document) {
this.document = document;
this.CLASS = this.constructor;
this.AddStyles();
}
AddStyles() {
if (this.CLASS.styleAdded) {
return;
}
const node = this.document.adaptor.node('style');
node.innerHTML = this.CLASS.style.cssText;
this.document.adaptor
.head(this.document.adaptor.document)
.appendChild(node);
this.CLASS.styleAdded = true;
}
AddElement() {
if (this.div)
return;
const element = this.document.adaptor.node('div');
element.classList.add(this.CLASS.className);
this.div = element;
this.inner = this.document.adaptor.node('div');
this.div.appendChild(this.inner);
this.document.adaptor
.body(this.document.adaptor.document)
.appendChild(this.div);
}
Show(node, highlighter) {
this.AddElement();
this.position(node);
this.highlight(highlighter);
this.div.classList.add(this.CLASS.className + '_Show');
}
Hide() {
if (!this.div)
return;
this.div.parentNode.removeChild(this.div);
this.div = null;
this.inner = null;
}
stackRegions(node) {
const rect = node.getBoundingClientRect();
let baseBottom = 0;
let baseLeft = Number.POSITIVE_INFINITY;
const regions = this.document.adaptor.document.getElementsByClassName(this.CLASS.className + '_Show');
for (let i = 0, region; (region = regions[i]); i++) {
if (region !== this.div) {
baseBottom = Math.max(region.getBoundingClientRect().bottom, baseBottom);
baseLeft = Math.min(region.getBoundingClientRect().left, baseLeft);
}
}
const bot = (baseBottom ? baseBottom : rect.bottom + 10) + window.scrollY;
const left = (baseLeft < Number.POSITIVE_INFINITY ? baseLeft : rect.left) +
window.scrollX;
this.div.style.top = bot + 'px';
this.div.style.left = left + 'px';
}
}
AbstractRegion.styleAdded = false;
class DummyRegion extends AbstractRegion {
Clear() { }
Update() { }
Hide() { }
Show() { }
AddElement() { }
AddStyles() { }
position() { }
highlight(_highlighter) { }
}
class StringRegion extends AbstractRegion {
Clear() {
if (!this.div)
return;
this.Update('');
this.inner.style.top = '';
this.inner.style.backgroundColor = '';
}
Update(speech) {
if (speech) {
this.AddElement();
}
if (this.inner) {
this.inner.textContent = '';
this.inner.textContent = speech || '\u00a0';
}
}
position(node) {
this.stackRegions(node);
}
highlight(highlighter) {
if (!this.div)
return;
this.inner.style.backgroundColor = highlighter.background;
this.inner.style.color = highlighter.foreground;
}
}
class ToolTip extends StringRegion {
}
ToolTip.className = 'MJX_ToolTip';
ToolTip.style = new StyleJsonSheet({
['.' + ToolTip.className]: {
width: 'auto',
height: 'auto',
opacity: 1,
'text-align': 'center',
'border-radius': '4px',
padding: 0,
'border-bottom': '1px dotted black',
position: 'absolute',
display: 'inline-block',
'background-color': 'white',
'z-index': 202,
},
['.' + ToolTip.className + ' > div']: {
'border-radius': 'inherit',
padding: '0 2px',
},
});
class LiveRegion extends StringRegion {
}
LiveRegion.className = 'MJX_LiveRegion';
LiveRegion.style = new StyleJsonSheet({
['.' + LiveRegion.className]: {
position: 'absolute',
top: 0,
display: 'none',
width: 'auto',
height: 'auto',
padding: 0,
opacity: 1,
'z-index': '202',
left: 0,
right: 0,
margin: '0 auto',
'background-color': 'white',
'box-shadow': '0px 5px 20px #888',
border: '2px solid #CCCCCC',
},
['.' + LiveRegion.className + '_Show']: {
display: 'block',
},
});
class SpeechRegion extends LiveRegion {
constructor() {
super(...arguments);
this.active = false;
this.node = null;
this.clear = false;
this.highlighter = getHighlighter({ color: 'red' }, { color: 'black' }, this.document.outputJax.name);
this.voiceRequest = false;
this.voiceCancelled = false;
}
Show(node, highlighter) {
super.Update('\u00a0');
this.node = node;
super.Show(node, highlighter);
}
Update(speech) {
if (this.voiceRequest) {
this.makeVoice(speech);
return;
}
speechSynthesis.onvoiceschanged = (() => (this.voiceRequest = true)).bind(this);
const promise = new Promise((resolve) => {
setTimeout(() => {
if (this.voiceRequest) {
resolve(true);
}
else {
setTimeout(() => {
this.voiceRequest = true;
resolve(true);
}, 100);
}
}, 100);
});
promise.then(() => this.makeVoice(speech));
}
makeVoice(speech) {
this.active =
this.document.options.a11y.voicing &&
!!speechSynthesis.getVoices().length;
speechSynthesis.cancel();
this.clear = true;
const [text, ssml] = buildSpeech(speech, this.document.options.sre.locale, this.document.options.sre.rate);
super.Update(text);
if (this.active && text) {
this.makeUtterances(ssml, this.document.options.sre.locale);
}
}
makeUtterances(ssml, locale) {
this.voiceCancelled = false;
let utterance = null;
for (const utter of ssml) {
if (utter.mark) {
if (!utterance) {
this.highlightNode(utter.mark, true);
continue;
}
utterance.addEventListener('end', (_event) => {
if (!this.voiceCancelled) {
this.highlightNode(utter.mark);
}
});
continue;
}
if (utter.pause) {
const time = parseInt(utter.pause.match(/^[0-9]+/)[0]);
if (isNaN(time) || !utterance) {
continue;
}
utterance.addEventListener('end', (_event) => {
speechSynthesis.pause();
setTimeout(() => {
speechSynthesis.resume();
}, time);
});
continue;
}
utterance = new SpeechSynthesisUtterance(utter.text);
if (utter.rate) {
utterance.rate = utter.rate;
}
if (utter.pitch) {
utterance.pitch = utter.pitch;
}
utterance.lang = locale;
speechSynthesis.speak(utterance);
}
if (utterance) {
utterance.addEventListener('end', (_event) => {
this.highlighter.unhighlight();
});
}
}
Hide() {
this.cancelVoice();
super.Hide();
}
cancelVoice() {
this.voiceCancelled = true;
speechSynthesis.cancel();
this.highlighter.unhighlight();
}
highlightNode(id, init = false) {
this.highlighter.unhighlight();
const nodes = Array.from(this.node.querySelectorAll(`[data-semantic-id="${id}"]`));
if (!this.clear || init) {
this.highlighter.highlight(nodes);
}
this.clear = false;
}
}
class HoverRegion extends AbstractRegion {
position(node) {
const nodeRect = node.getBoundingClientRect();
const divRect = this.div.getBoundingClientRect();
const xCenter = nodeRect.left + nodeRect.width / 2;
let left = xCenter - divRect.width / 2;
left = left < 0 ? 0 : left;
left = left + window.scrollX;
let top;
switch (this.document.options.a11y.align) {
case 'top':
top = nodeRect.top - divRect.height - 10;
break;
case 'bottom':
top = nodeRect.bottom + 10;
break;
case 'center':
default: {
const yCenter = nodeRect.top + nodeRect.height / 2;
top = yCenter - divRect.height / 2;
}
}
top = top + window.scrollY;
top = top < 0 ? 0 : top;
this.div.style.top = top + 'px';
this.div.style.left = left + 'px';
}
highlight(highlighter) {
if (!this.div)
return;
if (this.inner.firstChild &&
!this.inner.firstChild.hasAttribute('sre-highlight')) {
return;
}
this.inner.style.backgroundColor = highlighter.background;
this.inner.style.color = highlighter.foreground;
}
Show(node, highlighter) {
this.AddElement();
this.div.style.fontSize = this.document.options.a11y.magnify;
this.Update(node);
super.Show(node, highlighter);
}
Clear() {
if (!this.div)
return;
this.inner.textContent = '';
this.inner.style.top = '';
this.inner.style.backgroundColor = '';
}
Update(node) {
if (!this.div)
return;
this.Clear();
const mjx = this.cloneNode(node);
const selected = mjx.querySelector('[data-mjx-clone]');
this.inner.style.backgroundColor = node.style.backgroundColor;
selected.style.backgroundColor = '';
selected.classList.remove('mjx-selected');
this.inner.appendChild(mjx);
this.position(node);
}
cloneNode(node) {
let mjx = node.cloneNode(true);
mjx.setAttribute('data-mjx-clone', 'true');
if (mjx.nodeName !== 'MJX-CONTAINER') {
if (mjx.nodeName !== 'g') {
mjx.style.marginLeft = mjx.style.marginRight = '0';
}
let container = node;
while (container && container.nodeName !== 'MJX-CONTAINER') {
container = container.parentNode;
}
if (mjx.nodeName !== 'MJX-MATH' && mjx.nodeName !== 'svg') {
const child = container.firstChild;
mjx = child.cloneNode(false).appendChild(mjx).parentNode;
if (mjx.nodeName === 'svg') {
mjx.firstChild.setAttribute('transform', 'matrix(1 0 0 -1 0 0)');
const W = parseFloat(mjx.getAttribute('viewBox').split(/ /)[2]);
const w = parseFloat(mjx.getAttribute('width'));
const { x, y, width, height } = node.getBBox();
mjx.setAttribute('viewBox', [x, -(y + height), width, height].join(' '));
mjx.removeAttribute('style');
mjx.setAttribute('width', (w / W) * width + 'ex');
mjx.setAttribute('height', (w / W) * height + 'ex');
container.setAttribute('sre-highlight', 'false');
}
}
mjx = container.cloneNode(false).appendChild(mjx)
.parentNode;
mjx.style.margin = '0';
}
return mjx;
}
}
HoverRegion.className = 'MJX_HoverRegion';
HoverRegion.style = new StyleJsonSheet({
['.' + HoverRegion.className]: {
display: 'block',
position: 'absolute',
width: 'max-content',
height: 'auto',
padding: 0,
opacity: 1,
'z-index': '202',
margin: '0 auto',
'background-color': 'white',
'line-height': 0,
'box-shadow': '0px 10px 20px #888',
border: '2px solid #CCCCCC',
},
['.' + HoverRegion.className + ' > div']: {
overflow: 'hidden',
},
});
//# sourceMappingURL=Region.js.map
;// ./mjs/a11y/explorer/Explorer.js
class AbstractExplorer {
get highlighter() {
return this.pool.highlighter;
}
static stopEvent(event) {
if (event.preventDefault) {
event.preventDefault();
}
else {
event.returnValue = false;
}
if (event.stopImmediatePropagation) {
event.stopImmediatePropagation();
}
else if (event.stopPropagation) {
event.stopPropagation();
}
event.cancelBubble = true;
}
static create(document, pool, region, node, ...rest) {
const explorer = new this(document, pool, region, node, ...rest);
return explorer;
}
constructor(document, pool, region, node, ..._rest) {
this.document = document;
this.pool = pool;
this.region = region;
this.node = node;
this.stoppable = true;
this.events = [];
this._active = false;
}
Events() {
return this.events;
}
get active() {
return this._active;
}
set active(flag) {
this._active = flag;
}
Attach() {
this.AddEvents();
}
Detach() {
this.RemoveEvents();
}
Start() {
this.active = true;
}
Stop() {
if (this.active) {
this.region.Clear();
this.region.Hide();
this.active = false;
}
}
AddEvents() {
for (const [eventkind, eventfunc] of this.events) {
this.node.addEventListener(eventkind, eventfunc);
}
}
RemoveEvents() {
for (const [eventkind, eventfunc] of this.events) {
this.node.removeEventListener(eventkind, eventfunc);
}
}
Update(_force = false) { }
stopEvent(event) {
if (this.stoppable) {
AbstractExplorer.stopEvent(event);
}
}
}
//# sourceMappingURL=Explorer.js.map
;// ./mjs/a11y/explorer/KeyExplorer.js
var KeyExplorer_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const nav = '[data-speech-node]';
function isContainer(el) {
return el.matches('mjx-container');
}
function hasModifiers(event, shift = true) {
return ((event.shiftKey && shift) || event.metaKey || event.altKey || event.ctrlKey);
}
function helpMessage(title, select) {
return `
Exploring expressions ${title}
The mathematics on this page is being rendered by MathJax , which
generates both the text spoken by screen readers, as well as the
visual layout for sighted users.
Expressions typeset by MathJax can be explored interactively, and
are focusable. You can use the Tab key to move to a typeset
expression${select}. Initially, the expression will be read in full,
but you can use the following keys to explore the expression
further:
Down Arrow moves one level deeper into the expression to
allow you to explore the current subexpression term by term.
Up Arrow moves back up a level within the expression.
Right Arrow moves to the next term in the current
subexpression.
Left Arrow moves to the next term in the current
subexpression.
Shift +Arrow moves to a neighboring cell within a table.
0-9 +0-9 jumps to a cell by its index in the table, where 0 = 10.
Home takes you to the top of the expression.
Enter or Return clicks a link or activates an active
subexpression.
Space opens the MathJax contextual menu where you can view
or copy the source format of the expression, or modify MathJax's
settings.
Escape exits the expression explorer.
x gives a summary of the current subexpression.
z gives the full text of a collapsed expression.
d gives the current depth within the expression.
s starts or stops auto-voicing with synchronized highlighting.
v marks the current position in the expression.
p cycles through the marked positions in the expression.
u clears all marked positions and returns to the starting position.
> cycles through the available speech rule sets
(MathSpeak, ClearSpeak).
< cycles through the verbosity levels for the current
rule set.
h produces this help listing.
The MathJax contextual menu allows you to enable or disable speech
or Braille generation for mathematical expressions, the language to
use for the spoken mathematics, and other features of MathJax. In
particular, the Explorer submenu allows you to specify how the
mathematics should be identified in the page (e.g., by saying "math"
when the expression is spoken), and whether or not to include a
message about the letter "h" bringing up this dialog box.
The contextual menu also provides options for viewing or copying a
MathML version of the expression or its original source format,
creating an SVG version of the expression, and viewing various other
information.
For more help, see the MathJax accessibility documentation.
`;
}
const helpData = new Map([
[
'MacOS',
[
'on MacOS and iOS using VoiceOver',
', or the VoiceOver arrow keys to select an expression',
],
],
[
'Windows',
[
'in Windows using NVDA or JAWS',
`. The screen reader should enter focus or forms mode automatically
when the expression gets the browser focus, but if not, you can toggle
focus mode using NVDA+space in NVDA; for JAWS, Enter should start
forms mode while Numpad Plus leaves it. Also note that you can use
the NVDA or JAWS key plus the arrow keys to explore the expression
even in browse mode, and you can use NVDA+shift+arrow keys to
navigate out of an expression that has the focus in NVDA`,
],
],
[
'Unix',
[
'in Unix using Orca',
`, and Orca should enter focus mode automatically. If not, use the
Orca+a key to toggle focus mode on or off. Also note that you can use
Orca+arrow keys to explore expressions even in browse mode`,
],
],
['unknown', ['with a Screen Reader.', '']],
]);
class SpeechExplorer extends AbstractExplorer {
get generators() {
var _a;
return (_a = this.item) === null || _a === void 0 ? void 0 : _a.generatorPool;
}
get role() {
return this.item.ariaRole;
}
get description() {
return this.item.roleDescription;
}
get none() {
return this.item.none;
}
FocusIn(_event) {
if (this.item.outputData.nofocus) {
this.item.outputData.nofocus = false;
return;
}
if (!this.clicked) {
this.Start();
}
this.clicked = null;
}
FocusOut(_event) {
if (this.current && !this.focusSpeech) {
this.setCurrent(null);
this.Stop();
if (!document.hasFocus()) {
this.focusTop();
}
}
}
KeyDown(event) {
this.pendingIndex.shift();
this.region.cancelVoice();
if (hasModifiers(event, false))
return;
const CLASS = this.constructor;
const key = event.key.length === 1 ? event.key.toLowerCase() : event.key;
const [action, value] = CLASS.keyMap.get(key) || [];
const result = action
? value === undefined || this.active
? action(this, event)
: value
: this.undefinedKey(event);
if (result)
return;
this.stopEvent(event);
if (result === false && this.sound) {
this.NoMove();
}
}
MouseDown(event) {
var _a;
this.pendingIndex = [];
this.region.cancelVoice();
if (hasModifiers(event) || event.buttons === 2) {
this.item.outputData.nofocus = true;
return;
}
const clicked = this.findClicked(event.target, event.x, event.y);
if (clicked === this.document.infoIcon) {
this.stopEvent(event);
return;
}
(_a = document.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
if (event.target.getAttribute('sre-highlighter-added')) {
this.refocus = clicked;
}
else {
this.clicked = clicked;
}
}
Click(event) {
if (hasModifiers(event) ||
event.buttons === 2 ||
document.getSelection().type === 'Range') {
this.FocusOut(null);
return;
}
const clicked = this.findClicked(event.target, event.x, event.y);
if (clicked === this.document.infoIcon) {
this.stopEvent(event);
this.help();
return;
}
if (!clicked || this.node.contains(clicked)) {
this.stopEvent(event);
this.refocus = clicked;
if (!this.triggerLinkMouse()) {
this.Start();
}
}
}
DblClick(event) {
var _a;
const direction = (_a = document.getSelection().direction) !== null && _a !== void 0 ? _a : 'none';
if (hasModifiers(event) || event.buttons === 2 || direction !== 'none') {
this.FocusOut(null);
}
else {
this.stopEvent(event);
this.refocus = this.rootNode();
this.Start();
}
}
spaceKey() {
this.refocus = this.current;
return true;
}
hKey() {
this.refocus = this.current;
this.help();
}
escapeKey() {
this.Stop();
this.focusTop();
return true;
}
enterKey(event) {
if (this.active) {
if (this.triggerLinkKeyboard(event)) {
this.Stop();
}
else {
const expandable = this.actionable(this.current);
if (!expandable) {
return false;
}
this.refocus = expandable;
expandable.dispatchEvent(new Event('click'));
}
}
else {
this.Start();
}
}
homeKey() {
this.setCurrent(this.rootNode());
}
moveDown(shift) {
return shift
? this.moveToNeighborCell(1, 0)
: this.moveTo(this.firstNode(this.current));
}
moveUp(shift) {
return shift
? this.moveToNeighborCell(-1, 0)
: this.moveTo(this.getParent(this.current));
}
moveRight(shift) {
return shift
? this.moveToNeighborCell(0, 1)
: this.moveTo(this.nextSibling(this.current));
}
moveLeft(shift) {
return shift
? this.moveToNeighborCell(0, -1)
: this.moveTo(this.prevSibling(this.current));
}
moveTo(node) {
if (!node)
return false;
this.setCurrent(node);
}
moveToNeighborCell(di, dj) {
const cell = this.tableCell(this.current);
if (!cell)
return false;
const [i, j] = this.cellPosition(cell);
if (i == null)
return false;
const move = this.cellAt(this.cellTable(cell), i + di, j + dj);
if (!move)
return false;
this.setCurrent(move);
}
undefinedKey(event) {
return !this.active || hasModifiers(event);
}
addMark() {
if (this.current === this.marks[this.marks.length - 1]) {
this.setCurrent(this.current);
}
else {
this.currentMark = this.marks.length - 1;
this.marks.push(this.current);
this.speak('Position marked');
}
}
prevMark() {
if (this.currentMark < 0) {
if (this.marks.length === 0) {
this.setCurrent(this.lastMark || this.rootNode());
return;
}
this.currentMark = this.marks.length - 1;
}
const current = this.currentMark;
this.setCurrent(this.marks[current]);
this.currentMark = current - 1;
}
clearMarks() {
this.marks = [];
this.currentMark = -1;
this.prevMark();
}
autoVoice() {
const value = !this.document.options.a11y.voicing;
if (this.document.menu) {
this.document.menu.menu.pool.lookup('voicing').setValue(value);
}
else {
this.document.options.a11y.voicing = value;
}
this.Update();
}
numberKey(n) {
if (!this.tableCell(this.current))
return false;
if (n === 0) {
n = 10;
}
if (this.pendingIndex.length) {
const table = this.cellTable(this.tableCell(this.current));
const cell = this.cellAt(table, this.pendingIndex[0] - 1, n - 1);
this.pendingIndex = [];
this.speak(String(n));
if (!cell)
return false;
setTimeout(() => this.setCurrent(cell), 500);
}
else {
this.pendingIndex = [null, n];
this.speak(`Jump to row ${n} and column`);
}
}
depth() {
var _a, _b, _c;
if (this.speechType === 'd') {
this.setCurrent(this.current);
return;
}
this.speechType = 'd';
const parts = [
[
(_a = this.node.getAttribute('data-semantic-level')) !== null && _a !== void 0 ? _a : 'Level',
(_b = this.current.getAttribute('aria-level')) !== null && _b !== void 0 ? _b : '0',
]
.join(' ')
.trim(),
];
const action = this.actionable(this.current);
if (action) {
parts.unshift((_c = this.node.getAttribute(action.getAttribute('toggle') === '1'
? 'data-semantic-expandable'
: 'data-semantic-collapsible')) !== null && _c !== void 0 ? _c : '');
}
this.speak(parts.join(' '), this.current.getAttribute(SemAttr.BRAILLE));
}
summary() {
if (this.speechType === 'x') {
this.setCurrent(this.current);
return;
}
this.speechType = 'x';
const summary = this.current.getAttribute(SemAttr.SUMMARY);
this.speak(summary, this.current.getAttribute(SemAttr.BRAILLE), this.SsmlAttributes(this.current, SemAttr.SUMMARY_SSML));
}
nextRules() {
this.node.removeAttribute('data-speech-attached');
this.restartAfter(this.generators.nextRules(this.item));
}
nextStyle() {
this.node.removeAttribute('data-speech-attached');
this.restartAfter(this.generators.nextStyle(this.current, this.item));
}
details() {
const action = this.actionable(this.current);
if (!action ||
!action.getAttribute('data-collapsible') ||
action.getAttribute('toggle') !== '1' ||
this.speechType === 'z') {
this.setCurrent(this.current);
return;
}
this.speechType = 'z';
const id = this.nodeId(this.current);
let current;
this.item.root.walkTree((node) => {
if (node.attributes.get('data-semantic-id') === id) {
current = node;
}
});
let mml = this.item.toMathML(current, this.item);
if (!current.isKind('math')) {
mml = `${mml} `;
}
mml = mml.replace(/ (?:data-semantic-|aria-|data-speech-|data-latex).*?=".*?"/g, '');
this.item
.speechFor(mml)
.then(([speech, braille]) => this.speak(speech, braille));
}
help() {
const adaptor = this.document.adaptor;
const helpBackground = adaptor.node('mjx-help-background');
const close = (event) => {
helpBackground.remove();
this.node.focus();
this.stopEvent(event);
};
helpBackground.addEventListener('click', close);
const helpSizer = adaptor.node('mjx-help-sizer', {}, [
adaptor.node('mjx-help-dialog', { tabindex: 0, role: 'dialog', 'aria-labeledby': 'mjx-help-label' }, [
adaptor.node('h1', { id: 'mjx-help-label' }, [
adaptor.text('MathJax Expression Explorer Help'),
]),
adaptor.node('div'),
adaptor.node('input', { type: 'button', value: 'Close' }),
]),
]);
helpBackground.append(helpSizer);
const help = helpSizer.firstChild;
help.addEventListener('click', (event) => this.stopEvent(event));
help.lastChild.addEventListener('click', close);
help.addEventListener('keydown', (event) => {
if (event.code === 'Escape') {
close(event);
}
});
const [title, select] = helpData.get(context.os);
help.childNodes[1].innerHTML = helpMessage(title, select);
document.body.append(helpBackground);
help.focus();
}
setCurrent(node, addDescription = false) {
this.speechType = '';
if (!document.hasFocus()) {
this.refocus = this.current;
}
this.node.setAttribute('aria-busy', 'true');
if (this.current) {
for (const part of this.getSplitNodes(this.current)) {
part.classList.remove('mjx-selected');
}
this.pool.unhighlight();
if (this.document.options.a11y.tabSelects === 'last') {
this.refocus = this.current;
}
if (!node) {
this.lastMark = this.current;
this.removeSpeech();
}
this.current = null;
}
this.current = node;
this.currentMark = -1;
if (this.current) {
const parts = this.getSplitNodes(this.current);
for (const part of parts) {
part.classList.add('mjx-selected');
}
this.pool.highlight(parts);
this.addSpeech(node, addDescription);
}
this.node.removeAttribute('aria-busy');
}
getSplitNodes(node) {
const id = this.nodeId(node);
if (!id) {
return [node];
}
return Array.from(this.node.querySelectorAll(`[data-semantic-id="${id}"]`));
}
addSpeech(node, describe) {
var _a;
(_a = this.img) === null || _a === void 0 ? void 0 : _a.remove();
let speech = [
node.getAttribute(SemAttr.PREFIX),
node.getAttribute(SemAttr.SPEECH),
node.getAttribute(SemAttr.POSTFIX),
]
.join(' ')
.trim();
if (describe) {
let description = this.description === this.none ? '' : ', ' + this.description;
if (this.document.options.a11y.help) {
description += ', press h for help';
}
speech += description;
}
this.speak(speech, node.getAttribute(SemAttr.BRAILLE), this.SsmlAttributes(node, SemAttr.SPEECH_SSML));
this.node.setAttribute('tabindex', '-1');
}
removeSpeech() {
if (this.speech) {
this.speech.remove();
this.speech = null;
if (this.img) {
this.node.append(this.img);
}
this.node.setAttribute('tabindex', '0');
}
}
speak(speech, braille = '', ssml = null, description = this.none) {
const oldspeech = this.speech;
this.speech = document.createElement('mjx-speech');
this.speech.setAttribute('role', this.role);
this.speech.setAttribute('aria-label', speech);
this.speech.setAttribute(SemAttr.SPEECH, speech);
if (ssml) {
this.speech.setAttribute(SemAttr.PREFIX_SSML, ssml[0] || '');
this.speech.setAttribute(SemAttr.SPEECH_SSML, ssml[1] || '');
this.speech.setAttribute(SemAttr.POSTFIX_SSML, ssml[2] || '');
}
if (braille) {
this.speech.setAttribute('aria-braillelabel', braille);
}
this.speech.setAttribute('aria-roledescription', description);
this.speech.setAttribute('tabindex', '0');
this.node.append(this.speech);
this.focusSpeech = true;
this.speech.focus();
this.focusSpeech = false;
this.Update();
if (oldspeech) {
setTimeout(() => oldspeech.remove(), 100);
}
}
attachSpeech() {
var _a;
const item = this.item;
const container = this.node;
if (!container.hasAttribute('has-speech')) {
for (const child of Array.from(container.childNodes)) {
child.setAttribute('aria-hidden', 'true');
}
container.setAttribute('has-speech', 'true');
}
const description = item.roleDescription;
const speech = (container.getAttribute(SemAttr.SPEECH) || '') +
(description ? ', ' + description : '');
(_a = this.img) === null || _a === void 0 ? void 0 : _a.remove();
this.img = this.document.adaptor.node('mjx-speech', {
'aria-label': speech,
role: 'img',
'aria-roledescription': item.none,
});
container.appendChild(this.img);
}
detachSpeech() {
var _a;
const container = this.node;
(_a = this.img) === null || _a === void 0 ? void 0 : _a.remove();
container.removeAttribute('has-speech');
for (const child of Array.from(container.childNodes)) {
child.removeAttribute('aria-hidden');
}
}
focus() {
this.node.focus();
}
nodeId(node) {
return node.getAttribute('data-semantic-id');
}
parentId(node) {
return node.getAttribute('data-semantic-parent');
}
getNode(id) {
return id ? this.node.querySelector(`[data-semantic-id="${id}"]`) : null;
}
getParent(node) {
return this.getNode(this.parentId(node));
}
childArray(node) {
return node ? node.getAttribute('data-semantic-children').split(/,/) : [];
}
isCell(node) {
return (!!node && this.cellTypes.includes(node.getAttribute('data-semantic-type')));
}
isRow(node) {
return !!node && node.getAttribute('data-semantic-type') === 'row';
}
tableCell(node) {
while (node && node !== this.node) {
if (this.isCell(node)) {
return node;
}
node = node.parentNode;
}
return null;
}
cellTable(cell) {
const row = this.getParent(cell);
return this.isRow(row) ? this.getParent(row) : row;
}
cellPosition(cell) {
const row = this.getParent(cell);
const j = this.childArray(row).indexOf(this.nodeId(cell));
if (!this.isRow(row)) {
return [j, 1];
}
const table = this.getParent(row);
const i = this.childArray(table).indexOf(this.nodeId(row));
return [i, j];
}
cellAt(table, i, j) {
const row = this.getNode(this.childArray(table)[i]);
if (!this.isRow(row)) {
return j === 1 ? row : null;
}
const cell = this.getNode(this.childArray(row)[j]);
return cell;
}
firstNode(node) {
const owns = node.getAttribute('data-semantic-owns');
if (!owns) {
return node.querySelector(nav);
}
const ownsList = owns.split(/ /);
for (const id of ownsList) {
const node = this.getNode(id);
if (node === null || node === void 0 ? void 0 : node.hasAttribute('data-speech-node')) {
return node;
}
}
return node.querySelector(nav);
}
rootNode() {
const base = this.node.querySelector('[data-semantic-structure]');
if (!base) {
return this.node.querySelector(nav);
}
const id = base
.getAttribute('data-semantic-structure')
.split(/ /)[0]
.replace('(', '');
return this.getNode(id);
}
nextSibling(node) {
var _a;
const id = this.parentId(node);
if (!id)
return null;
const owns = (_a = this.getNode(id)
.getAttribute('data-semantic-owns')) === null || _a === void 0 ? void 0 : _a.split(/ /);
if (!owns)
return null;
let i = owns.indexOf(this.nodeId(node));
let next;
do {
next = this.getNode(owns[++i]);
} while (next && !next.hasAttribute('data-speech-node'));
return next;
}
prevSibling(node) {
var _a;
const id = this.parentId(node);
if (!id)
return null;
const owns = (_a = this.getNode(id)
.getAttribute('data-semantic-owns')) === null || _a === void 0 ? void 0 : _a.split(/ /);
if (!owns)
return null;
let i = owns.indexOf(this.nodeId(node));
let prev;
do {
prev = this.getNode(owns[--i]);
} while (prev && !prev.hasAttribute('data-speech-node'));
return prev;
}
findClicked(node, x, y) {
const icon = this.document.infoIcon;
if (icon === node || icon.contains(node)) {
return icon;
}
if (this.node.getAttribute('jax') !== 'SVG') {
return node.closest(nav);
}
let found = null;
let clicked = this.node;
while (clicked) {
if (clicked.matches(nav)) {
found = clicked;
}
const nodes = Array.from(clicked.childNodes);
clicked = null;
for (const child of nodes) {
if (child !== this.speech &&
child !== this.img &&
child.tagName.toLowerCase() !== 'rect') {
const { left, right, top, bottom } = child.getBoundingClientRect();
if (left <= x && x <= right && top <= y && y <= bottom) {
clicked = child;
break;
}
}
}
}
return found;
}
focusTop() {
this.focusSpeech = true;
this.node.focus();
this.focusSpeech = false;
}
SsmlAttributes(node, center) {
return [
node.getAttribute(SemAttr.PREFIX_SSML),
node.getAttribute(center),
node.getAttribute(SemAttr.POSTFIX_SSML),
];
}
restartAfter(promise) {
return KeyExplorer_awaiter(this, void 0, void 0, function* () {
yield promise;
this.attachSpeech();
const current = this.current;
this.current = null;
this.pool.unhighlight();
this.setCurrent(current);
});
}
constructor(document, pool, region, node, brailleRegion, magnifyRegion, _mml, item) {
super(document, pool, null, node);
this.document = document;
this.pool = pool;
this.region = region;
this.node = node;
this.brailleRegion = brailleRegion;
this.magnifyRegion = magnifyRegion;
this.item = item;
this.sound = false;
this.current = null;
this.clicked = null;
this.refocus = null;
this.focusSpeech = false;
this.restarted = null;
this.speech = null;
this.speechType = '';
this.img = null;
this.attached = false;
this.eventsAttached = false;
this.marks = [];
this.currentMark = -1;
this.lastMark = null;
this.pendingIndex = [];
this.cellTypes = ['cell', 'line'];
this.events = super.Events().concat([
['focusin', this.FocusIn.bind(this)],
['focusout', this.FocusOut.bind(this)],
['keydown', this.KeyDown.bind(this)],
['mousedown', this.MouseDown.bind(this)],
['click', this.Click.bind(this)],
['dblclick', this.DblClick.bind(this)],
]);
}
findStartNode() {
let node = this.refocus || this.current;
if (!node && this.restarted) {
node = this.node.querySelector(this.restarted);
}
this.refocus = this.restarted = null;
return node;
}
Start() {
const _super = Object.create(null, {
Start: { get: () => super.Start }
});
return KeyExplorer_awaiter(this, void 0, void 0, function* () {
if (!this.attached || this.active)
return;
this.document.activeItem = this.item;
if (this.item.state() < STATE.ATTACHSPEECH) {
this.item.attachSpeech(this.document);
yield this.generators.promise;
}
if (this.focusSpeech)
return;
this.node.classList.add('mjx-explorer-active');
this.node.append(this.document.infoIcon);
const node = this.findStartNode();
this.setCurrent(node || this.rootNode(), !node);
_super.Start.call(this);
const options = this.document.options;
const a11y = options.a11y;
if (a11y.subtitles && a11y.speech && options.enableSpeech) {
this.region.Show(this.node, this.highlighter);
}
if (a11y.viewBraille && a11y.braille && options.enableBraille) {
this.brailleRegion.Show(this.node, this.highlighter);
}
if (a11y.keyMagnifier) {
this.magnifyRegion.Show(this.current, this.highlighter);
}
this.Update();
});
}
Stop() {
if (this.active) {
const description = this.description;
if (this.node.getAttribute('aria-roledescription') !== description) {
this.node.setAttribute('aria-roledescription', description);
}
this.node.classList.remove('mjx-explorer-active');
this.document.infoIcon.remove();
this.pool.unhighlight();
this.magnifyRegion.Hide();
this.region.Hide();
this.brailleRegion.Hide();
}
super.Stop();
}
Update() {
if (!this.active)
return;
this.region.node = this.node;
this.generators.updateRegions(this.speech || this.node, this.region, this.brailleRegion);
this.magnifyRegion.Update(this.current);
}
Attach() {
if (this.attached)
return;
super.Attach();
this.node.setAttribute('tabindex', '0');
this.attached = true;
}
Detach() {
var _a;
super.RemoveEvents();
this.node.removeAttribute('role');
this.node.removeAttribute('aria-roledescription');
this.node.removeAttribute('aria-label');
(_a = this.img) === null || _a === void 0 ? void 0 : _a.remove();
if (this.active) {
this.node.setAttribute('tabindex', '0');
}
this.attached = false;
}
NoMove() {
honk();
}
AddEvents() {
if (!this.eventsAttached) {
super.AddEvents();
this.eventsAttached = true;
}
}
actionable(node) {
const parent = node === null || node === void 0 ? void 0 : node.parentNode;
return parent && this.highlighter.isMactionNode(parent) ? parent : null;
}
triggerLinkKeyboard(event) {
if (!this.current) {
if (event.target instanceof HTMLAnchorElement) {
event.target.dispatchEvent(new MouseEvent('click'));
return true;
}
return false;
}
return this.triggerLink(this.current);
}
triggerLink(node) {
var _a;
const focus = (_a = node === null || node === void 0 ? void 0 : node.getAttribute('data-semantic-postfix')) === null || _a === void 0 ? void 0 : _a.match(/(^| )link($| )/);
if (focus) {
while (node && node !== this.node) {
if (node instanceof HTMLAnchorElement) {
node.dispatchEvent(new MouseEvent('click'));
setTimeout(() => this.FocusOut(null), 50);
return true;
}
node = node.parentNode;
}
}
return false;
}
triggerLinkMouse() {
let node = this.refocus;
while (node && node !== this.node) {
if (this.triggerLink(node)) {
return true;
}
node = node.parentNode;
}
return false;
}
semanticFocus() {
const focus = [];
let name = 'data-semantic-id';
let node = this.current || this.refocus || this.node;
const action = this.actionable(node);
if (action) {
name = action.hasAttribute('data-maction-id') ? 'data-maction-id' : 'id';
node = action;
focus.push(nav);
}
const attr = node.getAttribute(name);
if (attr) {
focus.unshift(`[${name}="${attr}"]`);
}
return focus.join(' ');
}
}
SpeechExplorer.keyMap = new Map([
['Tab', [() => true]],
['Escape', [(explorer) => explorer.escapeKey()]],
['Enter', [(explorer, event) => explorer.enterKey(event)]],
['Home', [(explorer) => explorer.homeKey()]],
[
'ArrowDown',
[(explorer, event) => explorer.moveDown(event.shiftKey), true],
],
['ArrowUp', [(explorer, event) => explorer.moveUp(event.shiftKey), true]],
[
'ArrowLeft',
[(explorer, event) => explorer.moveLeft(event.shiftKey), true],
],
[
'ArrowRight',
[(explorer, event) => explorer.moveRight(event.shiftKey), true],
],
[' ', [(explorer) => explorer.spaceKey()]],
['h', [(explorer) => explorer.hKey()]],
['>', [(explorer) => explorer.nextRules(), false]],
['<', [(explorer) => explorer.nextStyle(), false]],
['x', [(explorer) => explorer.summary(), false]],
['z', [(explorer) => explorer.details(), false]],
['d', [(explorer) => explorer.depth(), false]],
['v', [(explorer) => explorer.addMark(), false]],
['p', [(explorer) => explorer.prevMark(), false]],
['u', [(explorer) => explorer.clearMarks(), false]],
['s', [(explorer) => explorer.autoVoice(), false]],
...[...'0123456789'].map((n) => [
n,
[(explorer) => explorer.numberKey(parseInt(n)), false],
]),
]);
//# sourceMappingURL=KeyExplorer.js.map
;// ./mjs/a11y/explorer/MouseExplorer.js
class AbstractMouseExplorer extends AbstractExplorer {
constructor() {
super(...arguments);
this.events = super.Events().concat([
['mouseover', this.MouseOver.bind(this)],
['mouseout', this.MouseOut.bind(this)],
]);
}
MouseOver(_event) {
this.Start();
}
MouseOut(_event) {
this.Stop();
}
}
class Hoverer extends AbstractMouseExplorer {
constructor(document, pool, region, node, nodeQuery, nodeAccess) {
super(document, pool, region, node);
this.document = document;
this.pool = pool;
this.region = region;
this.node = node;
this.nodeQuery = nodeQuery;
this.nodeAccess = nodeAccess;
}
MouseOut(event) {
this.highlighter.unhighlight();
this.region.Hide();
super.MouseOut(event);
}
MouseOver(event) {
super.MouseOver(event);
const target = event.target;
const [node, kind] = this.getNode(target);
if (!node) {
return;
}
this.highlighter.unhighlight();
this.highlighter.highlight([node]);
this.region.Update(kind);
this.region.Show(node, this.highlighter);
}
getNode(node) {
const original = node;
while (node && node !== this.node) {
if (this.nodeQuery(node)) {
return [node, this.nodeAccess(node)];
}
node = node.parentNode;
}
node = original;
while (node) {
if (this.nodeQuery(node)) {
return [node, this.nodeAccess(node)];
}
const child = node.childNodes[0];
node =
child && child.tagName === 'defs'
? node.childNodes[1]
: child;
}
return [null, null];
}
}
class ValueHoverer extends Hoverer {
}
class ContentHoverer extends Hoverer {
}
class FlameHoverer extends Hoverer {
constructor(document, pool, _ignore, node) {
super(document, pool, new DummyRegion(document), node, (x) => this.highlighter.isMactionNode(x), () => { });
this.document = document;
this.pool = pool;
this.node = node;
}
}
//# sourceMappingURL=MouseExplorer.js.map
;// ./mjs/a11y/explorer/TreeExplorer.js
class AbstractTreeExplorer extends AbstractExplorer {
constructor(document, pool, region, node, mml) {
super(document, pool, null, node);
this.document = document;
this.pool = pool;
this.region = region;
this.node = node;
this.mml = mml;
this.stoppable = false;
}
Attach() {
super.Attach();
this.Start();
}
Detach() {
this.Stop();
super.Detach();
}
}
class FlameColorer extends AbstractTreeExplorer {
Start() {
if (this.active)
return;
this.active = true;
this.highlighter.highlightAll(this.node);
}
Stop() {
if (this.active) {
this.highlighter.unhighlightAll();
}
this.active = false;
}
}
class TreeColorer extends AbstractTreeExplorer {
constructor() {
super(...arguments);
this.contrast = new ContrastPicker();
this.leaves = [];
this.modality = 'data-semantic-foreground';
}
Start() {
if (this.active)
return;
this.active = true;
if (!this.node.hasAttribute('hasforegroundcolor')) {
this.colorLeaves();
this.node.setAttribute('hasforegroundcolor', 'true');
}
this.leaves.forEach((leaf) => this.colorize(leaf));
}
Stop() {
if (this.active) {
this.leaves.forEach((leaf) => this.uncolorize(leaf));
}
this.active = false;
}
colorLeaves() {
this.leaves = Array.from(this.node.querySelectorAll('[data-semantic-id]:not([data-semantic-children])'));
for (const leaf of this.leaves) {
leaf.setAttribute(this.modality, this.contrast.generate());
this.contrast.increment();
}
}
colorize(node) {
if (node.hasAttribute(this.modality)) {
node.setAttribute(this.modality + '-old', node.style.color);
node.style.color = node.getAttribute(this.modality);
}
}
uncolorize(node) {
const fore = this.modality + '-old';
if (node.hasAttribute(fore)) {
node.style.color = node.getAttribute(fore);
}
}
}
class ContrastPicker {
constructor() {
this.hue = 10;
this.sat = 100;
this.light = 50;
this.incr = 53;
}
generate() {
return ContrastPicker.hsl2rgb(this.hue, this.sat, this.light);
}
increment() {
this.hue = (this.hue + this.incr) % 360;
}
static hsl2rgb(h, s, l) {
s = s > 1 ? s / 100 : s;
l = l > 1 ? l / 100 : l;
const c = (1 - Math.abs(2 * l - 1)) * s;
const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
const m = l - c / 2;
let r = 0, g = 0, b = 0;
if (0 <= h && h < 60) {
[r, g, b] = [c, x, 0];
}
else if (60 <= h && h < 120) {
[r, g, b] = [x, c, 0];
}
else if (120 <= h && h < 180) {
[r, g, b] = [0, c, x];
}
else if (180 <= h && h < 240) {
[r, g, b] = [0, x, c];
}
else if (240 <= h && h < 300) {
[r, g, b] = [x, 0, c];
}
else if (300 <= h && h < 360) {
[r, g, b] = [c, 0, x];
}
return `rgb(${(r + m) * 255}, ${(g + m) * 255}, ${(b + m) * 255})`;
}
}
//# sourceMappingURL=TreeExplorer.js.map
;// ./mjs/a11y/explorer/ExplorerPool.js
class RegionPool {
constructor(document) {
this.document = document;
this.speechRegion = new SpeechRegion(this.document);
this.brailleRegion = new LiveRegion(this.document);
this.magnifier = new HoverRegion(this.document);
this.tooltip1 = new ToolTip(this.document);
this.tooltip2 = new ToolTip(this.document);
this.tooltip3 = new ToolTip(this.document);
}
}
const allExplorers = {
speech: (doc, pool, node, ...rest) => {
const explorer = SpeechExplorer.create(doc, pool, doc.explorerRegions.speechRegion, node, doc.explorerRegions.brailleRegion, doc.explorerRegions.magnifier, rest[0], rest[1]);
explorer.sound = true;
return explorer;
},
mouseMagnifier: (doc, pool, node, ..._rest) => ContentHoverer.create(doc, pool, doc.explorerRegions.magnifier, node, (x) => x.hasAttribute('data-semantic-type'), (x) => x),
hover: (doc, pool, node, ..._rest) => FlameHoverer.create(doc, pool, null, node),
infoType: (doc, pool, node, ..._rest) => ValueHoverer.create(doc, pool, doc.explorerRegions.tooltip1, node, (x) => x.hasAttribute('data-semantic-type'), (x) => x.getAttribute('data-semantic-type')),
infoRole: (doc, pool, node, ..._rest) => ValueHoverer.create(doc, pool, doc.explorerRegions.tooltip2, node, (x) => x.hasAttribute('data-semantic-role'), (x) => x.getAttribute('data-semantic-role')),
infoPrefix: (doc, pool, node, ..._rest) => ValueHoverer.create(doc, pool, doc.explorerRegions.tooltip3, node, (x) => { var _a; return (_a = x.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(x, 'data-semantic-prefix-none'); }, (x) => { var _a; return (_a = x.getAttribute) === null || _a === void 0 ? void 0 : _a.call(x, 'data-semantic-prefix-none'); }),
flame: (doc, pool, node, ..._rest) => FlameColorer.create(doc, pool, null, node),
treeColoring: (doc, pool, node, ...rest) => TreeColorer.create(doc, pool, null, node, ...rest),
};
class ExplorerPool {
constructor() {
this.explorers = {};
this.attached = [];
this._restart = [];
this.speechExplorerKeys = ['speech', 'braille', 'keyMagnifier'];
}
get highlighter() {
if (this._renderer !== this.document.outputJax.name) {
this._renderer = this.document.outputJax.name;
this.setPrimaryHighlighter();
return this._highlighter;
}
const [foreground, background] = this.colorOptions();
this._highlighter.setColor(background, foreground);
return this._highlighter;
}
init(document, node, mml, item) {
this.document = document;
this.mml = mml;
this.node = node;
this.setPrimaryHighlighter();
for (const key of Object.keys(allExplorers)) {
this.explorers[key] = allExplorers[key](this.document, this, this.node, this.mml, item);
}
this.setSecondaryHighlighter();
this.attach();
}
attach() {
this.attached = [];
const keyExplorers = [];
const a11y = this.document.options.a11y;
for (const [key, explorer] of Object.entries(this.explorers)) {
if (explorer instanceof SpeechExplorer) {
explorer.stoppable = false;
keyExplorers.unshift(explorer);
if (this.speechExplorerKeys.some((exKey) => this.document.options.a11y[exKey])) {
explorer.Attach();
this.attached.push(key);
}
else {
explorer.Detach();
}
continue;
}
if (a11y[key] ||
(key === 'speech' && (a11y.braille || a11y.keyMagnifier))) {
explorer.Attach();
this.attached.push(key);
}
else {
explorer.Detach();
}
}
for (const explorer of keyExplorers) {
if (explorer.attached) {
explorer.stoppable = true;
break;
}
}
}
reattach() {
for (const key of this.attached) {
const explorer = this.explorers[key];
if (explorer.active) {
this._restart.push(key);
explorer.Stop();
}
}
}
restart() {
this._restart.forEach((x) => {
this.explorers[x].Start();
});
this._restart = [];
}
setPrimaryHighlighter() {
const [foreground, background] = this.colorOptions();
this._highlighter = getHighlighter(background, foreground, this.document.outputJax.name);
}
setSecondaryHighlighter() {
this.secondaryHighlighter = getHighlighter({ color: 'red' }, { color: 'black' }, this.document.outputJax.name);
this.speech.region.highlighter =
this.secondaryHighlighter;
}
highlight(nodes) {
this.highlighter.highlight(nodes);
}
unhighlight() {
this.secondaryHighlighter.unhighlight();
this.highlighter.unhighlight();
}
get speech() {
return this.explorers['speech'];
}
colorOptions() {
const opts = this.document.options.a11y;
const foreground = {
color: opts.foregroundColor.toLowerCase(),
alpha: opts.foregroundOpacity / 100,
};
const background = {
color: opts.backgroundColor.toLowerCase(),
alpha: opts.backgroundOpacity / 100,
};
return [foreground, background];
}
}
//# sourceMappingURL=ExplorerPool.js.map
;// ./mjs/a11y/explorer.js
const isUnix = context.os === 'Unix';
newState('EXPLORER', STATE.INSERTED + 30);
function ExplorerMathItemMixin(BaseMathItem, toMathML) {
var _a;
return _a = class BaseClass extends BaseMathItem {
constructor() {
super(...arguments);
this.refocus = null;
}
get ariaRole() {
return this.constructor.ariaRole;
}
get roleDescription() {
const CLASS = this.constructor;
return CLASS.roleDescription === 'none'
? CLASS.none
: CLASS.roleDescription;
}
get none() {
return this.constructor.none;
}
attachSpeech(document) {
var _b, _c;
super.attachSpeech(document);
(_c = (_b = this.outputData.speechPromise) === null || _b === void 0 ? void 0 : _b.then(() => this.explorers.speech.attachSpeech())) === null || _c === void 0 ? void 0 : _c.then(() => {
var _b;
if ((_b = this.explorers) === null || _b === void 0 ? void 0 : _b.speech) {
this.explorers.speech.restarted = this.refocus;
}
this.refocus = null;
if (this.explorers) {
this.explorers.restart();
}
});
}
detachSpeech(document) {
super.detachSpeech(document);
this.explorers.speech.detachSpeech();
}
explorable(document, force = false) {
if (this.state() >= STATE.EXPLORER)
return;
if (!this.isEscaped && (document.options.enableExplorer || force)) {
const node = this.typesetRoot;
const mml = toMathML(this.root);
if (!this.explorers) {
this.explorers = new ExplorerPool();
}
this.explorers.init(document, node, mml, this);
}
this.state(STATE.EXPLORER);
}
state(state = null, restore = false) {
if (state < STATE.EXPLORER && this.explorers) {
for (const explorer of Object.values(this.explorers.explorers)) {
if (explorer.active) {
explorer.Stop();
}
}
}
return super.state(state, restore);
}
rerender(document, start = STATE.RERENDER) {
const focus = this.setTemporaryFocus(document);
super.rerender(document, start);
this.clearTemporaryFocus(focus);
}
setTemporaryFocus(document) {
var _b;
let focus = null;
if (this.explorers) {
const speech = this.explorers.speech;
focus = (speech === null || speech === void 0 ? void 0 : speech.attached) ? document.tmpFocus : null;
if (focus) {
this.refocus = (_b = speech.semanticFocus()) !== null && _b !== void 0 ? _b : null;
const adaptor = document.adaptor;
adaptor.append(adaptor.body(), focus);
}
this.explorers.reattach();
focus === null || focus === void 0 ? void 0 : focus.focus();
}
return focus;
}
clearTemporaryFocus(focus) {
var _b;
if (focus) {
const promise = (_b = this.outputData.speechPromise) !== null && _b !== void 0 ? _b : Promise.resolve();
promise.then(() => setTimeout(() => focus.remove(), 100));
}
}
},
_a.ariaRole = isUnix ? 'tree' : 'application',
_a.roleDescription = 'math',
_a.none = '\u0091',
_a;
}
function ExplorerMathDocumentMixin(BaseDocument) {
var _a;
return _a = class BaseClass extends BaseDocument {
constructor(...args) {
super(...args);
this.explorerRegions = null;
this.activeItem = null;
const ProcessBits = this.constructor.ProcessBits;
if (!ProcessBits.has('explorer')) {
ProcessBits.allocate('explorer');
}
const visitor = new SerializedMmlVisitor(this.mmlFactory);
const toMathML = (node) => visitor.visitTree(node);
const options = this.options;
if (!options.a11y.speechRules) {
options.a11y.speechRules = `${options.sre.domain}-${options.sre.style}`;
}
const mathItem = (options.MathItem = ExplorerMathItemMixin(options.MathItem, toMathML));
mathItem.roleDescription = options.roleDescription;
this.explorerRegions = new RegionPool(this);
if ('addStyles' in this) {
this.addStyles(this.constructor.speechStyles);
}
const adaptor = this.adaptor;
const SVGNS = 'http://www.w3.org/2000/svg';
this.infoIcon = adaptor.node('mjx-help', {}, [
adaptor.node('svg', { viewBox: '0 0 18 18', xmlns: SVGNS, 'aria-hidden': 'true' }, [
adaptor.node('circle', { stroke: 'none' }, [], SVGNS),
adaptor.node('circle', {}, [], SVGNS),
adaptor.node('line', { x1: 9, y1: 9, x2: 9, y2: 13 }, [], SVGNS),
adaptor.node('line', { x1: 9, y1: 5.5, x2: 9, y2: 5.5 }, [], SVGNS),
], SVGNS),
]);
this.tmpFocus = this.adaptor.node('mjx-focus', {
tabIndex: 0,
style: {
outline: 'none',
display: 'block',
position: 'absolute',
top: 0,
left: '-10px',
width: '1px',
height: '1px',
overflow: 'hidden',
},
role: mathItem.ariaRole,
'aria-label': mathItem.none,
'aria-roledescription': mathItem.none,
});
}
explorable() {
if (!this.processed.isSet('explorer')) {
if (this.options.enableExplorer) {
for (const math of this.math) {
math.explorable(this);
}
}
this.processed.set('explorer');
}
return this;
}
rerender(start) {
const active = this.activeItem;
const focus = active === null || active === void 0 ? void 0 : active.setTemporaryFocus(this);
super.rerender(start);
active === null || active === void 0 ? void 0 : active.clearTemporaryFocus(focus);
return this;
}
state(state, restore = false) {
super.state(state, restore);
if (state < STATE.EXPLORER) {
this.processed.clear('explorer');
}
return this;
}
},
_a.OPTIONS = Object.assign(Object.assign({}, BaseDocument.OPTIONS), { enableExplorer: hasWindow, renderActions: expandable(Object.assign(Object.assign({}, BaseDocument.OPTIONS.renderActions), { explorable: [STATE.EXPLORER] })), sre: expandable(Object.assign(Object.assign({}, BaseDocument.OPTIONS.sre), { speech: 'none' })), a11y: Object.assign(Object.assign({}, BaseDocument.OPTIONS.a11y), { align: 'top', backgroundColor: 'Blue', backgroundOpacity: 20, flame: false, foregroundColor: 'Black', foregroundOpacity: 100, highlight: 'None', hover: false, infoPrefix: false, infoRole: false, infoType: false, keyMagnifier: false, magnification: 'None', magnify: '400%', mouseMagnifier: false, subtitles: false, treeColoring: false, viewBraille: false, voicing: false, help: true, roleDescription: 'math', tabSelects: 'all' }) }),
_a.speechStyles = {
'mjx-container[has-speech="true"]': {
position: 'relative',
cursor: 'default',
},
'mjx-speech': {
position: 'absolute',
'z-index': -1,
left: 0,
top: 0,
bottom: 0,
right: 0,
},
'mjx-speech:focus': {
outline: 'none',
},
'mjx-container .mjx-selected': {
outline: '2px solid black',
},
'mjx-container > mjx-help': {
display: 'none',
position: 'absolute',
top: '-.33em',
right: '-.5em',
width: '.6em',
height: '.6em',
cursor: 'pointer',
},
'mjx-container[display="true"] > mjx-help': {
right: 0,
},
'mjx-help > svg': {
stroke: 'black',
width: '100%',
height: '100%',
},
'mjx-help > svg > circle': {
'stroke-width': '1.5px',
cx: '9px',
cy: '9px',
r: '9px',
fill: 'white',
},
'mjx-help > svg > circle:nth-child(2)': {
fill: 'rgba(0, 0, 255, 0.2)',
r: '7px',
},
'mjx-help > svg > line': {
'stroke-width': '2.5px',
'stroke-linecap': 'round',
},
'mjx-help:hover > svg > circle:nth-child(2)': {
fill: 'white',
},
'mjx-container.mjx-explorer-active > mjx-help': {
display: 'inline-flex',
'align-items': 'center',
},
'mjx-help-sizer': {
position: 'fixed',
width: '40%',
'max-width': '30em',
top: '3em',
left: '50%',
},
'mjx-help-dialog': {
position: 'absolute',
width: '200%',
left: '-100%',
border: '3px outset',
'border-radius': '15px',
color: 'black',
'background-color': '#DDDDDD',
'z-index': '301',
'text-align': 'right',
'font-style': 'normal',
'text-indent': 0,
'text-transform': 'none',
'line-height': 'normal',
'letter-spacing': 'normal',
'word-spacing': 'normal',
'word-wrap': 'normal',
float: 'none',
'box-shadow': '0px 10px 20px #808080',
outline: 'none',
},
'mjx-help-dialog > h1': {
'font-size': '24px',
'text-align': 'center',
margin: '.5em 0',
},
'mjx-help-dialog > div': {
margin: '0 1em',
padding: '3px',
overflow: 'auto',
height: '20em',
border: '2px inset black',
'background-color': 'white',
'text-align': 'left',
},
'mjx-help-dialog > input': {
margin: '.5em 2em',
},
'mjx-help-dialog kbd': {
display: 'inline-block',
padding: '3px 5px',
'font-size': '11px',
'line-height': '10px',
color: '#444d56',
'vertical-align': 'middle',
'background-color': '#fafbfc',
border: 'solid 1.5px #c6cbd1',
'border-bottom-color': '#959da5',
'border-radius': '3px',
'box-shadow': 'inset -.5px -1px 0 #959da5',
},
'mjx-help-dialog ul': {
'list-style-type': 'none',
},
'mjx-help-dialog li': {
'margin-bottom': '.5em',
},
'mjx-help-background': {
position: 'fixed',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
},
_a;
}
function ExplorerHandler(handler, MmlJax = null) {
if (!handler.documentClass.prototype.attachSpeech) {
handler = SpeechHandler(handler, MmlJax);
}
handler.documentClass = ExplorerMathDocumentMixin(handler.documentClass);
return handler;
}
function setA11yOptions(document, options) {
var _a;
const sreOptions = engineSetup();
for (const key in options) {
if (document.options.a11y[key] !== undefined) {
setA11yOption(document, key, options[key]);
}
else if (sreOptions[key] !== undefined) {
document.options.sre[key] = options[key];
}
}
if (options.roleDescription) {
document.options.MathItem.roleDescription = options.roleDescription;
}
for (const item of document.math) {
(_a = item === null || item === void 0 ? void 0 : item.explorers) === null || _a === void 0 ? void 0 : _a.attach();
}
}
function setA11yOption(document, option, value) {
switch (option) {
case 'speechRules': {
const [domain, style] = value.split('-');
document.options.sre.domain = domain;
document.options.sre.style = style;
break;
}
case 'magnification':
switch (value) {
case 'None':
document.options.a11y.magnification = value;
document.options.a11y.keyMagnifier = false;
document.options.a11y.mouseMagnifier = false;
break;
case 'Keyboard':
document.options.a11y.magnification = value;
document.options.a11y.keyMagnifier = true;
document.options.a11y.mouseMagnifier = false;
break;
case 'Mouse':
document.options.a11y.magnification = value;
document.options.a11y.keyMagnifier = false;
document.options.a11y.mouseMagnifier = true;
break;
}
break;
case 'highlight':
switch (value) {
case 'None':
document.options.a11y.highlight = value;
document.options.a11y.hover = false;
document.options.a11y.flame = false;
break;
case 'Hover':
document.options.a11y.highlight = value;
document.options.a11y.hover = true;
document.options.a11y.flame = false;
break;
case 'Flame':
document.options.a11y.highlight = value;
document.options.a11y.hover = false;
document.options.a11y.flame = true;
break;
}
break;
case 'locale':
document.options.sre.locale = value;
break;
default:
document.options.a11y[option] = value;
}
}
//# sourceMappingURL=explorer.js.map
;// ./components/mjs/a11y/explorer/lib/explorer.js
if (MathJax.loader) {
MathJax.loader.checkVersion('a11y/explorer', VERSION, 'a11y');
}
combineWithMathJax({_: {
a11y: {
explorer_ts: explorer_namespaceObject,
explorer: {
Explorer: Explorer_namespaceObject,
ExplorerPool: ExplorerPool_namespaceObject,
Highlighter: Highlighter_namespaceObject,
KeyExplorer: KeyExplorer_namespaceObject,
MouseExplorer: MouseExplorer_namespaceObject,
Region: Region_namespaceObject,
TreeExplorer: TreeExplorer_namespaceObject
}
}
}});
;// ./components/mjs/a11y/explorer/explorer.js
if (MathJax.startup && hasWindow) {
MathJax.startup.extendHandler(handler => ExplorerHandler(handler));
}
;// ./components/mjs/a11y/util.js
Loader.preLoaded(
'a11y/sre',
'a11y/semantic-enrich',
'a11y/speech',
'a11y/explorer'
);
;// ./components/mjs/tex-chtml/tex-chtml.js
Loader.preLoaded(
'loader', 'startup',
'core',
'input/tex',
'output/chtml',
'ui/menu'
);
Loader.saveVersion('tex-chtml');
loadFont(startup, true);
})();
/******/ })()
; mathjaxr/inst/doc/mathjax/LICENSE 0000644 0001762 0000144 00000026136 15112352462 016264 0 ustar ligges users
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
mathjaxr/inst/doc/mathjax/font/ 0000755 0001762 0000144 00000000000 15112364776 016230 5 ustar ligges users mathjaxr/inst/doc/mathjax/font/chtml.js 0000644 0001762 0000144 00000326213 15112352537 017674 0 ustar ligges users (()=>{"use strict";var s={d:(i,t)=>{for(var c in t)s.o(t,c)&&!s.o(i,c)&&Object.defineProperty(i,c,{enumerable:!0,get:t[c]})}};s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(s){if("object"==typeof window)return window}}(),s.o=(s,i)=>Object.prototype.hasOwnProperty.call(s,i),s.r=s=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var i={};s.r(i),s.d(i,{MathJaxNewcmFont:()=>M});const t=("undefined"!=typeof window?window:s.g).MathJax._.components.global,c=(t.GLOBAL,t.isObject,t.combineConfig,t.combineDefaults),r=t.combineWithMathJax,e=(t.MathJax,MathJax._.output.chtml.FontData),a=e.ChtmlFontData,f=(e.AddCSS,MathJax._.output.common.FontData),d=(f.NOSTRETCH,f.mergeOptions,f.FontData);const o=MathJax._.output.common.Direction,n=(o.DIRECTION,o.V),k=o.H,h={40:{dir:n,sizes:[.997,1.095,1.195,1.445,1.793,2.093,2.393,2.991],stretch:[9115,9116,9117],HDW:[.748,.248,.875]},41:{dir:n,sizes:[.997,1.095,1.195,1.445,1.793,2.093,2.393,2.991],stretch:[9118,9119,9120],HDW:[.748,.248,.875]},45:{c:8722,dir:k,stretch:[0,8722],HDW:[.583,.083,.778],ext:.112,hd:[.583,.083]},47:{dir:n,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},61:{dir:k,stretch:[0,61],HDW:[.367,-.133,.778],ext:.112,hd:[.367,-.133]},91:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9121,9122,9123],HDW:[.75,.25,.667]},92:{dir:n,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},93:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9124,9125,9126],HDW:[.75,.25,.667]},94:{c:770,dir:k,sizes:[.5,.644,.768,.919,1.1,1.32,1.581,1.896]},95:{c:8211,dir:k,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},123:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9127,123,9129,9128],stretchv:[0,1,0,0],HDW:[.75,.25,.902]},124:{dir:n,sizes:[1.001,1.203,1.443,1.735,2.085,2.505,3.005,3.605],schar:[124,8739],stretch:[0,8739],stretchv:[0,2],HDW:[.75,.25,.333]},125:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9131,123,9133,9132],stretchv:[0,1,0,0],HDW:[.75,.25,.902]},126:{c:771,dir:k,sizes:[.5,.652,.778,.931,1.115,1.335,1.599,1.915]},175:{c:773,dir:k,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},710:{c:770,dir:k,sizes:[.5,.644,.768,.919,1.1,1.32,1.581,1.896]},711:{c:780,dir:k,sizes:[.366,.644,.768,.919,1.1,1.32,1.581,1.896]},713:{c:773,dir:k,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},728:{c:774,dir:k,sizes:[.376,.658,.784,.937,1.12,1.341,1.604,1.92]},732:{c:771,dir:k,sizes:[.5,.652,.778,.931,1.115,1.335,1.599,1.915]},770:{dir:k,sizes:[.5,.644,.768,.919,1.1,1.32,1.581,1.896]},771:{dir:k,sizes:[.5,.652,.778,.931,1.115,1.335,1.599,1.915]},773:{dir:k,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},774:{dir:k,sizes:[.376,.658,.784,.937,1.12,1.341,1.604,1.92]},780:{dir:k,sizes:[.366,.644,.768,.919,1.1,1.32,1.581,1.896]},8211:{dir:k,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},8212:{dir:k,stretch:[0,8212],HDW:[.277,-.255,1],ext:.001,hd:[.277,-.255]},8213:{dir:k,stretch:[0,8213],HDW:[.27,-.23,1.152],ext:.112,hd:[.27,-.23]},8214:{dir:n,sizes:[1.001,1.203,1.443,1.735,2.085,2.503,3.004,3.607],schar:[8214,8741],stretch:[0,8741],stretchv:[0,2],HDW:[.75,.25,.555]},8254:{c:175,dir:k,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},8260:{dir:n,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},8400:{dir:k,sizes:[.422,.667],stretch:[8400,8400],stretchv:[3,1],HDW:[.711,-.601,0],hd:[.631,-.601]},8401:{dir:k,sizes:[.422,.667],stretch:[0,8400,8401],stretchv:[0,1,4],HDW:[.711,-.601,0],hd:[.631,-.601]},8406:{dir:k,sizes:[.416,.659],stretch:[8406,8400],stretchv:[3,1],HDW:[.711,-.521,0],hd:[.631,-.601]},8407:{dir:k,sizes:[.416,.659],stretch:[0,8400,8407],stretchv:[0,1,4],HDW:[.711,-.521,0],hd:[.631,-.601]},8417:{dir:k,sizes:[.47,.715],stretch:[8406,8400,8407],stretchv:[3,1,4],HDW:[.711,-.521,0],hd:[.631,-.601]},8428:{dir:k,sizes:[.422,.667],stretch:[0,845,8428],stretchv:[0,1,4],HDW:[-.171,.281,0],hd:[-.171,.201]},8429:{dir:k,sizes:[.422,.667],stretch:[8429,845],stretchv:[3,1],HDW:[-.171,.281,0],hd:[-.171,.201]},8430:{dir:k,sizes:[.416,.659],stretch:[8430,845],stretchv:[3,1],HDW:[-.091,.281,0],hd:[-.171,.201]},8431:{dir:k,sizes:[.416,.659],stretch:[0,845,8431],stretchv:[0,1,4],HDW:[-.091,.281,0],hd:[-.171,.201]},8512:{dir:n,sizes:[.684,1.401],variants:[0,2]},8592:{dir:k,sizes:[1,1.463],variants:[0,0],schar:[8592,10229],stretch:[8592,8592],stretchv:[3,1],HDW:[.51,.01,1],hd:[.274,-.226]},8593:{dir:n,sizes:[.883,1.349],variants:[0,2],stretch:[8593,8593],stretchv:[3,1],HDW:[.679,.203,.5]},8594:{dir:k,sizes:[1,1.463],variants:[0,0],schar:[8594,10230],stretch:[0,8592,8594],stretchv:[0,1,4],HDW:[.51,.01,1],hd:[.274,-.226]},8595:{dir:n,sizes:[.883,1.349],variants:[0,2],stretch:[0,8593,8595],stretchv:[0,1,4],HDW:[.703,.179,.5]},8596:{dir:k,sizes:[1,1.442],variants:[0,0],schar:[8596,10231],stretch:[8592,8592,8594],stretchv:[3,1,4],HDW:[.51,.01,1],hd:[.274,-.226]},8597:{dir:n,sizes:[1.015,1.015],variants:[0,2],stretch:[8593,8593,8595],stretchv:[3,1,4],HDW:[.757,.257,.5]},8598:{dir:n,sizes:[.918,1.384],variants:[0,2]},8599:{dir:n,sizes:[.918,1.384],variants:[0,2]},8600:{dir:n,sizes:[.918,1.384],variants:[0,2]},8601:{dir:n,sizes:[.918,1.384],variants:[0,2]},8602:{dir:k,sizes:[.997,1.463],variants:[0,2],stretch:[8602,8592,0,8602],stretchv:[3,1,0,1],HDW:[.51,.01,.997],hd:[.274,-.226]},8603:{dir:k,sizes:[.997,1.463],variants:[0,2],stretch:[0,8592,8603,8602],stretchv:[0,1,4,1],HDW:[.51,.01,.997],hd:[.274,-.226]},8606:{dir:k,sizes:[1.017,1.463],variants:[0,2],stretch:[8606,8592],stretchv:[3,1],HDW:[.51,.01,1.017],hd:[.274,-.226]},8608:{dir:k,sizes:[1.017,1.463],variants:[0,2],stretch:[0,8592,8608],stretchv:[0,1,4],HDW:[.51,.01,1.017],hd:[.274,-.226]},8610:{dir:k,sizes:[1.192,1.658],variants:[0,2],stretch:[8592,8592,8610],stretchv:[3,1,4],HDW:[.51,.01,1.192],hd:[.274,-.226]},8611:{dir:k,sizes:[1.192,1.658],variants:[0,2],stretch:[8611,8592,8594],stretchv:[3,1,4],HDW:[.51,.01,1.192],hd:[.274,-.226]},8612:{dir:k,sizes:[.977,1.443],variants:[0,0],schar:[8612,10235],stretch:[8592,8592,8612],stretchv:[3,1,4],HDW:[.51,.011,.977],hd:[.274,-.226]},8614:{dir:k,sizes:[.977,1.443],variants:[0,0],schar:[8614,10236],stretch:[8614,8592,8594],stretchv:[3,1,4],HDW:[.51,.011,.977],hd:[.274,-.226]},8617:{dir:k,sizes:[.997,1.463],variants:[0,2],stretch:[8592,8617,8617],stretchv:[3,1,4],HDW:[.546,.01,.997],hd:[.274,-.226]},8618:{dir:k,sizes:[.997,1.463],variants:[0,2],stretch:[8618,8617,8594],stretchv:[3,1,4],HDW:[.546,.01,.997],hd:[.274,-.226]},8619:{dir:k,sizes:[.997,1.463],variants:[0,2],stretch:[8592,8617,8619],stretchv:[3,1,4],HDW:[.55,.05,.997],hd:[.274,-.226]},8620:{dir:k,sizes:[.997,1.463],variants:[0,2],stretch:[8620,8617,8594],stretchv:[3,1,4],HDW:[.55,.05,.997],hd:[.274,-.226]},8630:{dir:k,sizes:[.98,1.33],variants:[0,2]},8631:{dir:k,sizes:[.98,1.33],variants:[0,2]},8636:{dir:k,sizes:[1,1.478],variants:[0,2],stretch:[8636,8636],stretchv:[3,1],HDW:[.499,-.226,1],hd:[.273,-.226]},8637:{dir:k,sizes:[1.012,1.478],variants:[0,2],stretch:[8637,8636],stretchv:[3,1],HDW:[.273,0,1.012],hd:[.273,-.226]},8638:{dir:n,sizes:[.901,1.367],variants:[0,2],stretch:[8638,8638],stretchv:[3,1],HDW:[.697,.203,.441]},8639:{dir:n,sizes:[.901,1.367],variants:[0,2],stretch:[8639,8639],stretchv:[3,1],HDW:[.697,.203,.441]},8640:{dir:k,sizes:[1,1.478],variants:[0,2],stretch:[0,8636,8640],stretchv:[0,1,4],HDW:[.499,-.226,1],hd:[.273,-.226]},8641:{dir:k,sizes:[1.012,1.478],variants:[0,2],stretch:[0,8636,8641],stretchv:[0,1,4],HDW:[.273,0,1.012],hd:[.273,-.226]},8642:{dir:n,sizes:[.901,1.367],variants:[0,2],stretch:[0,8638,8642],stretchv:[0,1,4],HDW:[.703,.197,.441]},8643:{dir:n,sizes:[.901,1.367],variants:[0,2],stretch:[0,8639,8643],stretchv:[0,1,4],HDW:[.703,.197,.441]},8644:{dir:k,sizes:[1.018,1.484],variants:[0,2],stretch:[8644,8644,8644],stretchv:[3,1,4],HDW:[.669,.172,1.018],hd:[.432,-.065]},8645:{dir:n,sizes:[.907,1.373],variants:[0,2],stretch:[8645,8645,8645],stretchv:[3,1,4],HDW:[.703,.203,.896]},8646:{dir:k,sizes:[1.018,1.484],variants:[0,2],stretch:[8646,8644,8646],stretchv:[3,1,4],HDW:[.669,.172,1.018],hd:[.432,-.065]},8647:{dir:k,sizes:[.997,1.463],variants:[0,2],stretch:[8647,8647],stretchv:[3,1],HDW:[.75,.25,.997],hd:[.512,.012]},8648:{dir:n,sizes:[.883,1.349],variants:[0,2],stretch:[8648,8648],stretchv:[3,1],HDW:[.679,.203,.992]},8649:{dir:k,sizes:[.997,1.463],variants:[0,2],stretch:[0,8647,8649],stretchv:[0,1,4],HDW:[.75,.25,.997],hd:[.512,.012]},8650:{dir:n,sizes:[.883,1.349],variants:[0,2],stretch:[0,8648,8650],stretchv:[0,1,4],HDW:[.703,.179,.992]},8651:{dir:k,sizes:[1.018,1.484],variants:[0,2],stretch:[8651,8651,8651],stretchv:[3,1,4],HDW:[.598,.098,1.018],hd:[.369,-.131]},8652:{dir:k,sizes:[1.018,1.484],variants:[0,2],stretch:[8652,8651,8652],stretchv:[3,1,4],HDW:[.598,.098,1.018],hd:[.369,-.131]},8653:{dir:k,sizes:[.991,1.457],variants:[0,2],stretch:[8653,8654,0,8653],stretchv:[3,1,0,1],HDW:[.52,.02,.991],hd:[.369,-.131]},8654:{dir:k,sizes:[1.068,1.534],variants:[0,2],stretch:[8656,8654,8658,8653],stretchv:[3,1,4,1],HDW:[.52,.02,1.068],hd:[.369,-.131]},8655:{dir:k,sizes:[.991,1.457],variants:[0,2],stretch:[0,8654,8658,8653],stretchv:[0,1,4,1],HDW:[.52,.02,.991],hd:[.369,-.131]},8656:{dir:k,sizes:[1,1.457],variants:[0,0],schar:[8656,10232],stretch:[8656,8656],stretchv:[3,1],HDW:[.52,.02,1],hd:[.369,-.131]},8657:{dir:n,sizes:[.88,1.346],variants:[0,2],stretch:[8657,8657],stretchv:[3,1],HDW:[.676,.203,.652]},8658:{dir:k,sizes:[1,1.457],variants:[0,0],schar:[8658,10233],stretch:[0,8656,8658],stretchv:[0,1,4],HDW:[.52,.02,1],hd:[.369,-.131]},8659:{dir:n,sizes:[.88,1.346],variants:[0,2],stretch:[0,8657,8659],stretchv:[0,1,4],HDW:[.703,.176,.652]},8660:{dir:k,sizes:[1,1.534],variants:[0,0],schar:[8660,10234],stretch:[8656,8656,8658],stretchv:[3,1,4],HDW:[.52,.02,1],hd:[.369,-.131]},8661:{dir:n,sizes:[.957,1.423],variants:[0,2],stretch:[8657,8657,8659],stretchv:[3,1,4],HDW:[.728,.228,.652]},8666:{dir:k,sizes:[1.015,1.461],variants:[0,2],stretch:[8666,8666],stretchv:[3,1],HDW:[.617,.117,1.015],hd:[.466,-.034]},8667:{dir:k,sizes:[1.015,1.461],variants:[0,2],stretch:[0,8666,8667],stretchv:[0,1,4],HDW:[.617,.117,1.015],hd:[.466,-.034]},8693:{dir:n,sizes:[.907,1.373],variants:[0,2],stretch:[8693,8645,8693],stretchv:[3,1,4],HDW:[.703,.203,.896]},8694:{dir:k,sizes:[.997,1.463],variants:[0,2],stretch:[0,8694,8694],stretchv:[0,1,4],HDW:[.99,.49,.997],hd:[.751,.251]},8719:{dir:n,sizes:[1.001,1.401],variants:[0,2]},8720:{dir:n,sizes:[1.001,1.401],variants:[0,2]},8721:{dir:n,sizes:[1.001,1.401],variants:[0,2]},8722:{dir:k,stretch:[0,8722],HDW:[.583,.083,.778],ext:.112,hd:[.583,.083]},8725:{c:47,dir:n,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},8730:{dir:n,sizes:[1.001,1.201,1.801,2.401,3.001],stretch:[8730,8730,9143],stretchv:[3,1,0],HDW:[.04,.96,1.056],fullExt:[.64,2.44]},8739:{dir:n,sizes:[1.001,1.203,1.443,1.735,2.085,2.505,3.005,3.605],stretch:[0,8739],stretchv:[0,2],HDW:[.75,.25,.333]},8741:{dir:n,sizes:[1.001,1.203,1.443,1.735,2.085,2.503,3.004,3.607],stretch:[0,8741],stretchv:[0,2],HDW:[.75,.25,.555]},8747:{dir:n,sizes:[1.112,2.223],variants:[0,2],stretch:[8992,9134,8993],HDW:[.805,.306,1.185]},8748:{dir:n,sizes:[1.112,2.223],variants:[0,2]},8749:{dir:n,sizes:[1.112,2.223],variants:[0,2]},8750:{dir:n,sizes:[1.112,2.223],variants:[0,2]},8751:{dir:n,sizes:[1.112,2.223],variants:[0,2]},8752:{dir:n,sizes:[1.112,2.223],variants:[0,2]},8753:{dir:n,sizes:[1.112,2.223],variants:[0,2]},8754:{dir:n,sizes:[1.112,2.223],variants:[0,2]},8755:{dir:n,sizes:[1.112,2.223],variants:[0,2]},8801:{dir:k,stretch:[0,8801],HDW:[.464,-.036,.778],ext:.112,hd:[.464,-.036]},8803:{dir:k,stretch:[0,8803],HDW:[.561,.061,.778],ext:.112,hd:[.561,.061]},8866:{dir:n,sizes:[.685,.869],variants:[0,0],schar:[8866,10205]},8867:{dir:n,sizes:[.685,.869],variants:[0,0],schar:[8867,10206]},8868:{dir:n,sizes:[.685,.869],variants:[0,0],schar:[8868,10201]},8869:{dir:n,sizes:[.685,.869],variants:[0,0],schar:[8869,10200]},8896:{dir:n,sizes:[1.045,1.394],variants:[0,2]},8897:{dir:n,sizes:[1.045,1.394],variants:[0,2]},8898:{dir:n,sizes:[1.023,1.357],variants:[0,2]},8899:{dir:n,sizes:[1.023,1.357],variants:[0,2]},8968:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9121,9122],HDW:[.75,.25,.667]},8969:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9124,9125],HDW:[.75,.25,.667]},8970:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[0,9122,9123],HDW:[.75,.25,.667]},8971:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[0,9125,9126],HDW:[.75,.25,.667]},8978:{c:9180,dir:k,sizes:[.504,1.006,1.508,2.012,2.516,3.02,3.524,4.032],stretch:[9180,9180,9180],stretchv:[3,1,4],HDW:[.796,-.502,.504],hd:[.796,-.689]},8994:{c:9180,dir:k,sizes:[.504,1.006,1.508,2.012,2.516,3.02,3.524,4.032],stretch:[9180,9180,9180],stretchv:[3,1,4],HDW:[.796,-.502,.504],hd:[.796,-.689]},8995:{c:9181,dir:k,sizes:[.504,1.006,1.508,2.012,2.516,3.02,3.524,4.032],stretch:[9181,9181,9181],stretchv:[3,1,4],HDW:[-.072,.366,.504],hd:[-.259,.366]},9001:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],schar:[9001,10216]},9002:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],schar:[9002,10217]},9130:{dir:n,sizes:[.748],stretch:[0,9130],HDW:[.748,0,.902]},9135:{c:8211,dir:k,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},9136:{dir:n,sizes:[1.125],stretch:[9127,9130,9133],HDW:[.75,.375,.902]},9137:{dir:n,sizes:[1.125],stretch:[9131,9130,9129],HDW:[.75,.375,.902]},9140:{dir:k,sizes:[.36,.735,1.11,1.485,1.86,2.235,2.61,2.985],stretch:[9140,9140,9140],stretchv:[3,1,4],HDW:[.772,-.504,.36],hd:[.772,-.706]},9141:{dir:k,sizes:[.36,.735,1.11,1.485,1.86,2.235,2.61,2.985],stretch:[9141,9141,9141],stretchv:[3,1,4],HDW:[-.074,.342,.36],hd:[-.276,.342]},9168:{dir:n,sizes:[.642],stretch:[0,9168],HDW:[.642,0,.333]},9180:{dir:k,sizes:[.504,1.006,1.508,2.012,2.516,3.02,3.524,4.032],stretch:[9180,9180,9180],stretchv:[3,1,4],HDW:[.796,-.502,.504],hd:[.796,-.689]},9181:{dir:k,sizes:[.504,1.006,1.508,2.012,2.516,3.02,3.524,4.032],stretch:[9181,9181,9181],stretchv:[3,1,4],HDW:[-.072,.366,.504],hd:[-.259,.366]},9182:{dir:k,sizes:[.492,.993,1.494,1.996,2.498,3,3.502,4.006],stretch:[9182,175,9182,9182],stretchv:[3,1,4,1],HDW:[.85,-.493,.492],hd:[.724,-.618]},9183:{dir:k,sizes:[.492,.993,1.494,1.996,2.498,3,3.502,4.006],stretch:[9183,95,9183,9183],stretchv:[3,1,4,1],HDW:[-.062,.419,.492],hd:[-.188,.294]},9184:{dir:k,sizes:[.546,1.048,1.55,2.056,2.564,3.068,3.574,4.082],stretch:[9184,9184,9184],stretchv:[3,1,4],HDW:[.873,-.605,.546],hd:[.873,-.766]},9185:{dir:k,sizes:[.546,1.048,1.55,2.056,2.564,3.068,3.574,4.082],stretch:[9185,9185,9185],stretchv:[3,1,4],HDW:[-.175,.443,.546],hd:[-.336,.443]},9472:{c:8211,dir:k,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},10072:{c:8739,dir:n,sizes:[1.001,1.203,1.443,1.735,2.085,2.505,3.005,3.605],stretch:[0,8739],stretchv:[0,2],HDW:[.75,.25,.333]},10197:{dir:n,sizes:[.511,.628],variants:[0,2]},10198:{dir:n,sizes:[.511,.628],variants:[0,2]},10199:{dir:n,sizes:[.511,.628],variants:[0,2]},10214:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[10214,10214,10214],stretchv:[3,1,4],HDW:[.75,.25,1.007]},10215:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[10215,10215,10215],stretchv:[3,1,4],HDW:[.75,.25,1.007]},10216:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10217:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10218:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10219:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10222:{dir:n,sizes:[1.025,1.127,1.229,1.483,1.837,2.141,2.445,3.053],stretch:[10222,10222,10222],stretchv:[3,1,4],HDW:[.762,.262,.647]},10223:{dir:n,sizes:[1.025,1.127,1.229,1.483,1.837,2.141,2.445,3.053],stretch:[10223,10223,10223],stretchv:[3,1,4],HDW:[.762,.262,.647]},10229:{c:8592,dir:k,sizes:[1,1.463],variants:[0,0],schar:[8592,10229],stretch:[8592,8592],stretchv:[3,1],HDW:[.51,.01,1],hd:[.274,-.226]},10230:{c:8594,dir:k,sizes:[1,1.463],variants:[0,0],schar:[8594,10230],stretch:[0,8592,8594],stretchv:[0,1,4],HDW:[.51,.01,1],hd:[.274,-.226]},10231:{c:8596,dir:k,sizes:[1,1.442],variants:[0,0],schar:[8596,10231],stretch:[8592,8592,8594],stretchv:[3,1,4],HDW:[.51,.01,1],hd:[.274,-.226]},10232:{c:8656,dir:k,sizes:[1,1.457],variants:[0,0],schar:[8656,10232],stretch:[8656,8656],stretchv:[3,1],HDW:[.52,.02,1],hd:[.369,-.131]},10233:{c:8658,dir:k,sizes:[1,1.457],variants:[0,0],schar:[8658,10233],stretch:[0,8656,8658],stretchv:[0,1,4],HDW:[.52,.02,1],hd:[.369,-.131]},10234:{c:8660,dir:k,sizes:[1,1.534],variants:[0,0],schar:[8660,10234],stretch:[8656,8656,8658],stretchv:[3,1,4],HDW:[.52,.02,1],hd:[.369,-.131]},10235:{c:8612,dir:k,sizes:[.977,1.443],variants:[0,0],schar:[8612,10235],stretch:[8592,8592,8612],stretchv:[3,1,4],HDW:[.51,.011,.977],hd:[.274,-.226]},10236:{c:8614,dir:k,sizes:[.977,1.443],variants:[0,0],schar:[8614,10236],stretch:[8614,8592,8594],stretchv:[3,1,4],HDW:[.51,.011,.977],hd:[.274,-.226]},10570:{dir:k,sizes:[1.012],stretch:[8636,8636,8641],stretchv:[3,1,4],HDW:[.499,0,1.012],hd:[.273,-.226]},10571:{dir:k,sizes:[1.012],stretch:[8637,8636,8640],stretchv:[3,1,4],HDW:[.499,0,1.012],hd:[.273,-.226]},10574:{dir:k,sizes:[1],stretch:[8636,8636,8640],stretchv:[3,1,4],HDW:[.499,-.226,1],hd:[.273,-.226]},10576:{dir:k,sizes:[1],stretch:[8637,8636,8641],stretchv:[3,1,4],HDW:[.273,0,1],hd:[.273,-.226]},10586:{dir:k,sizes:[1],stretch:[8636,8636,8612],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10587:{dir:k,sizes:[1],stretch:[8614,8636,8640],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10590:{dir:k,sizes:[1],stretch:[8637,8636,8612],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10591:{dir:k,sizes:[1],stretch:[8614,8636,8641],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10627:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10628:{dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10629:{dir:n,sizes:[.997,1.095,1.195,1.445,1.793,2.093,2.393,2.991]},10630:{dir:n,sizes:[.997,1.095,1.195,1.445,1.793,2.093,2.393,2.991]},10744:{dir:n,sizes:[1.076,1.917],variants:[0,2]},10745:{dir:n,sizes:[1.076,1.917],variants:[0,2]},10748:{dir:n,sizes:[1.001,1.083,1.185,1.433,1.793,2.093,2.383,2.997]},10749:{dir:n,sizes:[1.001,1.083,1.185,1.433,1.793,2.093,2.383,2.997]},10752:{dir:n,sizes:[.987,1.305],variants:[0,2]},10753:{dir:n,sizes:[.987,1.305],variants:[0,2]},10754:{dir:n,sizes:[.987,1.305],variants:[0,2]},10755:{dir:n,sizes:[1.023,1.357],variants:[0,2]},10756:{dir:n,sizes:[1.023,1.357],variants:[0,2]},10757:{dir:n,sizes:[1.029,1.373],variants:[0,2]},10758:{dir:n,sizes:[1.029,1.373],variants:[0,2]},10759:{dir:n,sizes:[1.045,1.907],variants:[0,2]},10760:{dir:n,sizes:[1.045,1.907],variants:[0,2]},10761:{dir:n,sizes:[.981,1.261],variants:[0,2]},10762:{dir:n,sizes:[1.001,1.401],variants:[0,2]},10763:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10764:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10765:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10766:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10767:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10768:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10769:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10770:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10771:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10772:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10773:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10774:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10775:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10776:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10777:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10778:{dir:n,sizes:[1.112,2.223],variants:[0,2]},10779:{dir:n,sizes:[1.274,2.464],variants:[0,2]},10780:{dir:n,sizes:[1.274,2.486],variants:[0,2]},10781:{dir:n,sizes:[.767,1.073],variants:[0,2]},10782:{dir:n,sizes:[.767,1.074],variants:[0,2]},10784:{dir:n,sizes:[.595,.835],variants:[0,2]},10785:{dir:n,sizes:[.901,1.261],variants:[0,2]},11004:{dir:n,sizes:[1.001,1.915],variants:[0,2]},11007:{dir:n,sizes:[1.241,1.915],variants:[0,2]},12296:{c:10216,dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},12297:{c:10217,dir:n,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},65079:{c:9182,dir:k,sizes:[.492,.993,1.494,1.996,2.498,3,3.502,4.006],stretch:[9182,175,9182,9182],stretchv:[3,1,4,1],HDW:[.85,-.493,.492],hd:[.724,-.618]},65080:{c:9183,dir:k,sizes:[.492,.993,1.494,1.996,2.498,3,3.502,4.006],stretch:[9183,95,9183,9183],stretchv:[3,1,4,1],HDW:[-.062,.419,.492],hd:[-.188,.294]},126704:{dir:n,sizes:[.527,.738]},126705:{dir:n,sizes:[.531,.744]}},l=function(s){var i;return(i=class extends s{}).defaultVariants=[...d.defaultVariants,["-size3","normal"],["-size4","normal"],["-size5","normal"],["-size6","normal"],["-size7","normal"],["-lf-tp","normal"],["-rt-bt","normal"],["-ex-md","normal"],["-bbold","normal"],["-upsmall","normal"],["-uplarge","normal"]],i.VariantSmp=Object.assign(Object.assign({},d.VariantSmp),{"-bbold":[120120,120146,,,120792]}),i.defaultCssFonts=Object.assign(Object.assign({},d.defaultCssFonts),{"-size3":["serif",!1,!1],"-size4":["serif",!1,!1],"-size5":["serif",!1,!1],"-size6":["serif",!1,!1],"-size7":["serif",!1,!1],"-lf-tp":["serif",!1,!1],"-rt-bt":["serif",!1,!1],"-ex-md":["serif",!1,!1],"-bbold":["serif",!1,!1],"-upsmall":["serif",!1,!1],"-uplarge":["serif",!1,!1]}),i.defaultAccentMap={94:"\u02c6",126:"\u02dc",768:"\u02cb",769:"\u02ca",770:"\u02c6",771:"\u02dc",772:"\u02c9",774:"\u02d8",775:"\u02d9",776:"\xa8",778:"\u02da",780:"\u02c7",8594:"\u20d7"},i.defaultParams=Object.assign(Object.assign({},d.defaultParams),{x_height:.442}),i.defaultSizeVariants=["normal","-smallop","-largeop","-size3","-size4","-size5","-size6","-size7"],i.defaultStretchVariants=["normal","-ex-md","-size3","-lf-tp","-rt-bt"],i}(a);class M extends l{constructor(){super(...arguments),this.cssFontPrefix="NCM"}}M.NAME="MathJaxNewcm",M.OPTIONS=Object.assign(Object.assign({},l.OPTIONS),{fontURL:"@mathjax/mathjax-newcm-font/js/chtml/woff2",dynamicPrefix:"@mathjax/mathjax-newcm-font/js/chtml/dynamic"}),M.defaultCssFamilyPrefix="MJX-NCM-ZERO",M.defaultVariantLetters={normal:"",bold:"B",italic:"I","bold-italic":"BI","double-struck":"DS",fraktur:"F","bold-fraktur":"FB","sans-serif":"SS","bold-sans-serif":"SSB","sans-serif-italic":"SSI","sans-serif-bold-italic":"SSBI",monospace:"M","-smallop":"SO","-largeop":"LO","-size3":"S3","-size4":"S4","-size5":"S5","-size6":"S6","-size7":"S7","-tex-mathit":"MI","-tex-calligraphic":"C","-tex-bold-calligraphic":"CB","-tex-oldstyle":"OS","-tex-bold-oldstyle":"OB","-tex-variant":"V","-lf-tp":"LT","-rt-bt":"RB","-ex-md":"EM","-bbold":"Be","-upsmall":"U","-uplarge":"Ue",script:"S","bold-script":"SB"},M.defaultDelimiters=h,M.defaultChars={normal:{32:[0,0,.332],33:[.716,0,.278],34:[.705,-.423,.374],35:[.694,.194,.833],36:[.75,.056,.5],37:[.75,.056,.833],38:[.716,.022,.778],39:[.705,-.423,.278],40:[.748,.248,.389],41:[.748,.248,.389],42:[.75,-.32,.5],43:[.583,.083,.778],44:[.106,.193,.278],45:[.245,-.187,.333],46:[.106,0,.278],47:[.75,.25,.5],48:[.666,.022,.5],49:[.666,0,.5],50:[.666,0,.5,{sk:-.01}],51:[.666,.022,.5],52:[.677,0,.5,{sk:.103}],53:[.666,.022,.5],54:[.666,.022,.5,{sk:.068}],55:[.676,.022,.5,{sk:-.147}],56:[.666,.022,.5,{sk:.011}],57:[.666,.022,.5],58:[.431,0,.278],59:[.431,.193,.278],60:[.547,.052,.778],61:[.367,-.133,.778],62:[.547,.047,.778],63:[.705,0,.472],64:[.705,.011,.778],65:[.716,0,.75],66:[.683,0,.708,{sk:-.014}],67:[.705,.022,.722,{sk:.044}],68:[.683,0,.764],69:[.68,0,.681,{sk:.013}],70:[.68,0,.653],71:[.705,.022,.785,{sk:.013}],72:[.683,0,.75],73:[.683,0,.361],74:[.683,.022,.514,{sk:.06}],75:[.683,0,.778,{sk:-.011}],76:[.683,0,.625,{sk:-.119}],77:[.683,0,.917],78:[.683,0,.75],79:[.705,.022,.778],80:[.683,0,.681],81:[.705,.194,.778],82:[.683,.022,.736,{sk:-.026}],83:[.705,.022,.556],84:[.677,0,.722],85:[.683,.022,.75,{sk:.02}],86:[.683,.022,.75],87:[.683,.022,1.028],88:[.683,0,.75],89:[.683,0,.75],90:[.683,0,.611,{sk:.011}],91:[.75,.25,.278],92:[.75,.25,.5],93:[.75,.25,.278],94:[.745,-.561,.556,{ic:.006}],95:[-.1,.14,.333],96:[.698,-.509,.5,{sk:-.031}],97:[.448,.011,.5,{sk:-.036}],98:[.694,.011,.556,{sk:-.142}],99:[.448,.011,.444,{sk:.027}],100:[.694,.011,.556,{sk:.109}],101:[.448,.011,.444,{sk:.014}],102:[.705,0,.306,{ic:.051,sk:.043}],103:[.453,.206,.5,{sk:-.024}],104:[.694,0,.556,{sk:-.132}],105:[.657,0,.278],106:[.657,.205,.306],107:[.694,0,.528,{sk:-.128}],108:[.694,0,.278],109:[.442,0,.833],110:[.442,0,.556,{sk:.013}],111:[.448,.011,.5],112:[.442,.194,.556,{sk:.032}],113:[.442,.194,.528],114:[.442,0,.392,{sk:-.015}],115:[.448,.011,.394],116:[.615,.011,.389,{sk:-.034}],117:[.442,.011,.556,{sk:-.017}],118:[.431,.011,.528,{sk:.014}],119:[.431,.011,.722],120:[.431,0,.528],121:[.431,.205,.528],122:[.431,0,.444],123:[.75,.25,.5],124:[.75,.25,.278],125:[.75,.25,.5],126:[.309,-.191,.556,{ic:.001}],160:[0,0,.332],163:[.683,.035,.75],165:[.683,0,.75],167:[.705,.205,.444],168:[.652,-.557,.5],172:[.367,-.133,.667],175:[.62,-.589,.5],176:[.683,-.406,.375],177:[.583,.084,.778],180:[.698,-.509,.5,{sk:.031}],181:[.441,.194,.556],182:[.694,.194,.611],183:[.303,-.197,.278],215:[.491,-.009,.778],240:[.696,.011,.5],247:[.504,.004,.778],305:[.442,0,.278],567:[.442,.205,.306],710:[.694,-.515,.5],711:[.693,-.514,.5],713:[.62,-.589,.5],714:[.698,-.509,.5,{sk:.031}],715:[.698,-.509,.5,{sk:-.031}],717:[-.193,.233,.333,{ic:.018}],728:[.69,-.518,.5],729:[.657,-.551,.278],730:[.705,-.529,.75],732:[.653,-.556,.5],767:[-.025,.275,0,{dx:.274}],768:[.733,-.544,0,{dx:.294}],769:[.733,-.544,0,{dx:.234}],770:[.694,-.515,.5],771:[.653,-.556,.5,{sk:.016}],772:[.64,-.609,0,{dx:.264}],773:[.67,-.63,0,{dx:.264}],774:[.73,-.592,0,{dx:.264}],775:[.677,-.571,0,{dx:.265}],776:[.672,-.577,0,{dx:.264}],778:[.725,-.549,0,{dx:.264}],780:[.726,-.577,0,{dx:.264}],824:[.75,.25,0,{sk:-.263}],913:[.716,0,.75],914:[.683,0,.708,{sk:-.068}],915:[.68,0,.625,{sk:-.015}],916:[.716,0,.833],917:[.68,0,.681,{sk:-.022}],918:[.683,0,.611,{sk:.011}],919:[.683,0,.75],920:[.705,.022,.778],921:[.683,0,.361],922:[.683,0,.778,{sk:-.011}],923:[.716,0,.694],924:[.683,0,.917],925:[.683,0,.75],926:[.677,0,.667],927:[.705,.022,.778],928:[.68,0,.75],929:[.683,0,.681,{sk:-.058}],931:[.683,0,.722,{sk:-.011}],932:[.677,0,.722],933:[.705,0,.778],934:[.683,0,.722],935:[.683,0,.75,{sk:-.014}],936:[.683,0,.778],937:[.705,0,.722],945:[.442,.011,.641,{ic:.006,sk:.031}],946:[.706,.194,.558],947:[.442,.215,.586],948:[.712,.011,.474],949:[.453,.022,.535,{sk:-.024}],950:[.697,.205,.53,{sk:-.041}],951:[.442,.216,.53,{sk:-.047}],952:[.705,.011,.488],953:[.442,.011,.308,{sk:-.056}],954:[.442,.011,.53,{sk:-.018}],955:[.694,.013,.537,{ic:.029,sk:-.204}],956:[.442,.216,.53,{sk:-.028}],957:[.442,0,.502,{sk:-.042}],958:[.697,.205,.53,{sk:-.069}],959:[.448,.011,.5],960:[.431,.011,.586,{sk:-.014}],961:[.442,.216,.488],962:[.442,.108,.474],963:[.431,.011,.599],964:[.431,.012,.53,{sk:-.033}],965:[.442,.011,.53,{sk:-.014}],966:[.442,.218,.641,{sk:-.018}],967:[.442,.205,.641,{ic:.004,sk:-.057}],968:[.694,.205,.641,{sk:.028}],969:[.442,.011,.641],977:[.705,.011,.53,{sk:.026}],978:[.715,0,.778],981:[.694,.205,.641],982:[.431,.011,.836,{sk:-.014}],1008:[.442,.012,.624,{sk:-.015}],1009:[.442,.194,.488],1012:[.705,.022,.778],1013:[.431,.011,.414,{ic:.015,sk:.024}],1014:[.431,.011,.414,{ic:.058}],8192:[0,0,.5],8193:[0,0,1],8194:[0,0,.5],8195:[0,0,1],8196:[0,0,.333],8197:[0,0,.25],8198:[0,0,.167],8199:[0,0,.5],8200:[0,0,.25],8201:[0,0,.2],8202:[0,0,.1],8203:[0,0,0],8208:[.245,-.187,.333],8209:[.245,-.187,.333],8210:[.342,-.302,.68],8211:[.277,-.255,.5],8212:[.277,-.255,1],8213:[.27,-.23,1.152],8214:[.75,.25,.398],8216:[.693,-.394,.278],8217:[.694,-.395,.278],8220:[.693,-.394,.472],8221:[.694,-.395,.472],8224:[.705,.216,.444],8225:[.705,.205,.444],8230:[.106,0,.837],8231:[.266,-.16,.276],8239:[0,0,.2],8242:[.748,-.43,.311],8243:[.748,-.43,.511],8244:[.748,-.43,.711],8245:[.748,-.43,.311],8246:[.748,-.43,.511],8247:[.748,-.43,.711],8260:[.75,.25,.5],8279:[.748,-.43,.911],8287:[0,0,.222],8288:[0,0,0],8289:[0,0,0],8290:[0,0,0],8291:[0,0,0],8292:[0,0,0],8356:[.683,.035,.75],8364:[.705,.022,.627],8400:[.711,-.601,0,{dx:.264}],8401:[.711,-.601,0,{dx:.264}],8402:[.75,.25,0,{sk:-.264}],8406:[.711,-.521,0,{dx:.264}],8407:[.711,-.521,0,{dx:.264}],8411:[.696,-.604,0,{dx:.264}],8412:[.696,-.604,0,{dx:.264}],8417:[.711,-.521,0,{dx:.264}],8428:[-.171,.281,0,{dx:.264}],8429:[-.171,.281,0,{dx:.264}],8430:[-.091,.281,0,{dx:.264}],8431:[-.091,.281,0,{dx:.264}],8455:[.705,.022,.53],8462:[.694,.011,.576,{sk:-.033}],8463:[.694,.011,.576],8486:[.705,0,.722],8487:[.684,.021,.722],8490:[.683,0,.778,{sk:-.011}],8491:[.892,0,.75],8498:[.68,0,.653],8501:[.693,0,.611],8502:[.723,.04,.604],8503:[.721,.03,.528],8504:[.71,.035,.574],8592:[.51,.01,1],8593:[.679,.203,.5],8594:[.51,.01,1],8595:[.703,.179,.5],8596:[.51,.01,1],8597:[.757,.257,.5],8598:[.714,.203,1],8599:[.714,.203,1],8600:[.703,.214,1],8601:[.703,.214,1],8602:[.51,.01,.997],8603:[.51,.01,.997],8606:[.51,.01,1.017],8608:[.51,.01,1.017],8610:[.51,.01,1.192],8611:[.51,.01,1.192],8612:[.51,.011,.977],8614:[.51,.011,.977],8617:[.55,.01,.997],8618:[.55,.01,.997],8619:[.55,.05,.997],8620:[.55,.05,.997],8622:[.51,.01,.996],8630:[.562,-.229,.98],8631:[.562,-.229,.98],8634:[.68,.06,.771],8635:[.68,.06,.771],8636:[.503,-.23,1],8637:[.27,.003,1.012],8638:[.697,.203,.441],8639:[.697,.203,.441],8640:[.503,-.23,1],8641:[.27,.003,1.012],8642:[.703,.197,.441],8643:[.703,.197,.441],8644:[.672,.172,1.018],8645:[.703,.203,.896],8646:[.672,.172,1.018],8647:[.75,.25,.997],8648:[.679,.203,.992],8649:[.75,.25,.997],8650:[.703,.179,.992],8651:[.6,.1,1.018],8652:[.6,.1,1.018],8653:[.52,.02,.991],8654:[.52,.02,1.068],8655:[.52,.02,.991],8656:[.52,.02,1],8657:[.676,.203,.611],8658:[.52,.02,1],8659:[.703,.176,.611],8660:[.52,.02,1],8661:[.728,.228,.611],8666:[.617,.117,1.015],8667:[.617,.117,1.015],8672:[.51,.01,1],8673:[.692,.192,.684],8674:[.51,.01,1],8675:[.692,.192,.684],8676:[.51,.01,1.018],8677:[.51,.01,1.018],8693:[.703,.203,.896],8694:[.99,.49,.997],8704:[.688,-.002,.666],8705:[.684,0,.556],8706:[.716,.022,.586],8707:[.684,0,.556],8708:[.789,.105,.556],8709:[.772,.078,.5],8710:[.716,0,.833],8711:[.683,.033,.833],8712:[.543,.043,.667],8713:[.73,.23,.667],8715:[.543,.043,.667],8716:[.73,.23,.667],8718:[.554,0,.666],8719:[.75,.25,.944],8720:[.75,.25,.944],8721:[.75,.25,1.056],8722:[.583,.083,.778],8723:[.584,.083,.778],8724:[.785,.083,.778],8725:[.603,.103,.568],8726:[.603,.103,.568],8727:[.462,-.039,.5],8728:[.4,-.1,.412],8729:[.445,-.055,.5],8730:[.04,.96,.833,{ic:.02}],8733:[.442,.011,.778],8734:[.442,.011,1],8735:[.679,-.013,.778],8736:[.724,-.013,.778],8737:[.724,.109,.778],8738:[.562,.062,.778],8739:[.75,.25,.278],8740:[.75,.25,.388],8741:[.75,.25,.5],8742:[.75,.25,.556],8743:[.602,.02,.667],8744:[.601,.02,.667],8745:[.604,.02,.667],8746:[.604,.02,.667],8747:[.805,.306,.545,{ic:.12}],8748:[.805,.306,.915,{ic:.12}],8749:[.805,.306,1.285,{ic:.12}],8750:[.805,.306,.615,{ic:.05}],8751:[.805,.306,.985,{ic:.05}],8752:[.805,.306,1.355,{ic:.05}],8753:[.805,.306,.675,{ic:.02}],8754:[.805,.306,.662,{ic:.02}],8755:[.805,.306,.662,{ic:.02}],8756:[.416,-.084,.516],8757:[.416,-.084,.516],8758:[.422,-.078,.278],8759:[.422,-.078,.516],8760:[.504,-.23,.778],8761:[.422,-.078,.906],8764:[.366,-.134,.773],8765:[.366,-.134,.773],8766:[.466,-.034,.901],8767:[.492,-.008,.778],8768:[.583,.083,.28],8769:[.482,-.018,.773],8770:[.38,-.032,.778],8771:[.468,-.12,.778],8772:[.603,.103,.778],8773:[.552,-.036,.778],8774:[.614,.048,.778],8775:[.603,.103,.778],8776:[.457,-.043,.773],8777:[.603,.103,.773],8778:[.541,-.036,.778],8779:[.541,.041,.773],8780:[.541,-.036,.778],8781:[.498,-.002,.778],8784:[.601,-.133,.778],8788:[.422,-.078,.906],8789:[.422,-.078,.906],8797:[.793,-.133,.778],8799:[.803,-.133,.778],8800:[.73,.23,.778],8801:[.464,-.036,.778],8802:[.73,.23,.778],8803:[.561,.061,.778],8804:[.631,.119,.778],8805:[.631,.119,.778],8806:[.715,.203,.778],8807:[.715,.203,.778],8808:[.715,.287,.778],8809:[.715,.287,.778],8810:[.554,.047,1],8811:[.546,.054,1],8812:[.77,.27,.434],8813:[.73,.23,.778],8814:[.73,.23,.778],8815:[.73,.23,.778],8816:[.73,.23,.778],8817:[.73,.23,.778],8818:[.636,.125,.776],8819:[.636,.125,.776],8820:[.691,.191,.776],8821:[.691,.191,.776],8822:[.741,.241,.778],8823:[.741,.241,.778],8824:[.776,.276,.778],8825:[.776,.276,.778],8826:[.547,.047,.778],8827:[.547,.047,.778],8828:[.639,.139,.738],8829:[.639,.139,.738],8830:[.682,.17,.773],8831:[.682,.17,.773],8832:[.73,.23,.778],8833:[.73,.23,.778],8834:[.543,.043,.778],8835:[.543,.043,.778],8836:[.73,.23,.778],8837:[.73,.23,.778],8838:[.627,.127,.778],8839:[.627,.127,.778],8840:[.73,.23,.778],8841:[.73,.23,.778],8842:[.627,.211,.778],8843:[.627,.211,.778],8845:[.604,.02,.667],8846:[.604,.02,.667],8847:[.543,.043,.778],8848:[.543,.043,.778],8849:[.627,.127,.778],8850:[.627,.127,.778],8851:[.604,.02,.667],8852:[.604,.02,.667],8853:[.591,.093,.782],8854:[.591,.093,.782],8855:[.591,.093,.782],8856:[.591,.093,.782],8857:[.591,.093,.782],8858:[.591,.093,.782],8859:[.591,.093,.782],8860:[.591,.093,.782],8861:[.591,.093,.782],8862:[.583,.083,.778],8863:[.583,.083,.778],8864:[.583,.083,.778],8865:[.583,.083,.778],8866:[.684,0,.611],8867:[.684,0,.611],8868:[.664,.02,.778],8869:[.684,0,.778],8870:[.684,0,.445],8871:[.684,0,.445],8872:[.684,0,.612],8873:[.684,0,.673],8874:[.684,0,.841],8875:[.684,0,.653],8876:[.684,0,.565],8877:[.684,0,.732],8878:[.684,0,.793],8879:[.684,0,.773],8880:[.563,.063,.778],8881:[.563,.063,.778],8882:[.547,.047,.738],8883:[.547,.047,.738],8884:[.605,.105,.738],8885:[.605,.105,.738],8890:[.664,.02,.778],8896:[.78,.282,.833],8897:[.783,.28,.833],8898:[.772,.25,.833],8899:[.75,.272,.833],8900:[.48,-.02,.5],8901:[.303,-.197,.278],8902:[.486,-.008,.5],8904:[.505,.005,.623],8905:[.505,.005,.623],8906:[.505,.005,.623],8907:[.505,.005,.623],8908:[.505,.005,.623],8909:[.468,-.12,.778],8910:[.584,.02,.733],8911:[.584,.02,.733],8930:[.73,.23,.778],8931:[.73,.23,.778],8938:[.73,.23,.738],8939:[.73,.23,.738],8940:[.73,.23,.738],8941:[.73,.23,.738],8942:[.582,.082,.218],8943:[.303,-.197,.776],8944:[.5,0,.613],8945:[.5,0,.613],8967:[.783,.313,.28],8968:[.75,.25,.444],8969:[.75,.25,.444],8970:[.75,.25,.444],8971:[.75,.25,.444],8972:[.274,.103,.818],8973:[.274,.103,.818],8974:[.603,-.226,.818],8975:[.603,-.226,.818],8976:[.367,-.133,.667],8985:[.367,-.133,.667],8988:[.77,-.49,.392],8989:[.77,-.49,.392],8990:[.01,.27,.392],8991:[.01,.27,.392],8992:[1.344,0,1.185],8993:[.806,.538,1.185],8994:[.381,-.13,1],8995:[.371,-.133,1],9001:[.75,.25,.389],9002:[.75,.25,.389],9115:[1.495,0,.875],9116:[.498,0,.875],9117:[1.495,0,.875],9118:[1.495,0,.875],9119:[.498,0,.875],9120:[1.495,0,.875],9121:[1.5,0,.667],9122:[1,0,.667],9123:[1.5,0,.667],9124:[1.5,0,.667],9125:[1,0,.667],9126:[1.5,0,.667],9127:[.75,0,.902],9128:[1.5,0,.902],9129:[.75,0,.902],9130:[.748,0,.902],9131:[.75,0,.902],9132:[1.5,0,.902],9133:[.75,0,.902],9134:[.806,0,1.185],9135:[.27,-.23,.396],9136:[.75,.375,.752],9137:[.75,.375,.752],9138:[.846,0,1.576],9139:[.847,0,1.576],9140:[.726,-.552,.36],9141:[-.122,.296,.36],9143:[1.82,0,1.056],9144:[1.765,.235,.659],9145:[1.765,.235,.659],9168:[.642,0,.333],9180:[.727,-.572,.504],9181:[-.142,.297,.504],9182:[.783,-.539,.492],9183:[-.109,.353,.492],9184:[.829,-.657,.546,{ic:.006}],9185:[-.227,.399,.546,{ic:.006}],9204:[.422,-.082,.356],9205:[.422,-.078,.356],9206:[.38,-.12,.356],9207:[.38,-.12,.356],9632:[.583,.083,.778],9633:[.583,.083,.778],9642:[.358,-.142,.328],9643:[.358,-.142,.328],9650:[.741,.005,.968],9651:[.741,.005,.968],9652:[.592,-.144,.626],9653:[.592,-.144,.626],9654:[.678,.178,.858],9655:[.678,.178,.858],9656:[.625,-.111,.626],9657:[.625,-.111,.626],9658:[.625,-.111,.866],9659:[.625,-.111,.866],9660:[.505,.241,.968],9661:[.505,.241,.968],9662:[.592,-.144,.626],9663:[.592,-.144,.626],9664:[.678,.178,.858],9665:[.678,.178,.858],9666:[.625,-.111,.626],9667:[.625,-.111,.626],9668:[.625,-.111,.866],9669:[.625,-.111,.866],9670:[.713,.213,1.025],9671:[.713,.213,1.025],9674:[.61,.11,.572],9675:[.592,.092,.796],9679:[.592,.092,.796],9702:[.445,-.055,.5],9711:[.701,.201,1.013],9720:[.679,-.013,.778],9721:[.679,-.013,.778],9722:[.679,-.013,.778],9723:[.533,.033,.706],9724:[.533,.033,.706],9725:[.483,-.017,.566],9726:[.483,-.017,.566],9727:[.679,-.013,.778],10072:[.694,.083,.525],10200:[.684,.184,.946],10201:[.684,.184,.986],10205:[.684,.184,.946],10206:[.684,.184,.946],10214:[.75,.25,.41],10215:[.75,.25,.41],10216:[.75,.25,.389],10217:[.75,.25,.389],10218:[.75,.25,.57],10219:[.75,.25,.57],10220:[.748,.248,.389],10221:[.748,.248,.389],10222:[.762,.262,.287],10223:[.762,.262,.287],10229:[.51,.01,1.463],10230:[.51,.01,1.463],10231:[.51,.01,1.442],10232:[.52,.02,1.457],10233:[.52,.02,1.457],10234:[.52,.02,1.534],10235:[.51,.011,1.443],10236:[.51,.011,1.443],10237:[.52,.021,1.437],10238:[.52,.021,1.437],10506:[.702,.202,.846],10507:[.702,.202,.846],10570:[.503,.003,1.012],10571:[.503,.003,1.012],10574:[.503,-.23,1],10576:[.27,.003,1],10578:[.503,.019,1.088],10579:[.503,.019,1.088],10582:[.502,.019,1.088],10583:[.502,.019,1.088],10586:[.51,.011,1],10587:[.51,.011,1],10590:[.51,.011,1],10591:[.51,.011,1],10602:[.6,-.133,1.018],10603:[.368,.099,1.018],10604:[.6,-.133,1.018],10605:[.368,.099,1.018],10606:[.703,.203,.8],10607:[.703,.203,.8],10620:[.563,.063,.778],10621:[.563,.063,.778],10622:[.546,.046,.726],10623:[.546,.046,.726],10624:[.75,.25,.694],10647:[.748,.248,.278],10648:[.748,.248,.278],10741:[.603,.103,.556],10743:[.603,.103,.556],10744:[.75,.325,.5],10745:[.75,.325,.5],10752:[.743,.243,1.111],10753:[.743,.243,1.111],10754:[.743,.243,1.111],10755:[.75,.272,.833],10756:[.75,.272,.833],10757:[.764,.264,.833],10758:[.764,.264,.833],10759:[.78,.282,1.082],10760:[.799,.264,1.082],10761:[.74,.24,1.092],10764:[.805,.306,1.655,{ic:.12}],10765:[.805,.306,.615,{ic:.05}],10766:[.805,.306,.615,{ic:.05}],10767:[.805,.306,.615,{ic:.05}],10768:[.805,.306,.615,{ic:.05}],10769:[.805,.306,.675,{ic:.02}],10770:[.805,.306,.615,{ic:.05}],10771:[.805,.306,.615,{ic:.05}],10772:[.805,.306,.615,{ic:.05}],10773:[.805,.306,.545,{ic:.12}],10774:[.805,.306,.545,{ic:.12}],10775:[.805,.306,.794],10776:[.805,.306,.665],10777:[.805,.306,.665],10778:[.805,.306,.645,{ic:.02}],10779:[.967,.306,.545,{ic:.12}],10780:[.805,.468,.645,{ic:.02}],10799:[.496,-.004,.778],10815:[.683,0,.75],10877:[.634,.134,.778],10878:[.634,.134,.778],10885:[.721,.205,.776],10886:[.721,.205,.776],10887:[.667,.167,.778],10888:[.667,.167,.778],10889:[.753,.321,.776],10890:[.721,.289,.776],10891:[.977,.477,.778],10892:[.977,.477,.778],10901:[.629,.134,.778],10902:[.629,.129,.778],10927:[.631,.119,.778],10928:[.631,.119,.778],10929:[.631,.203,.778],10930:[.631,.203,.778],10931:[.716,.203,.778],10932:[.716,.203,.778],10933:[.716,.287,.778],10934:[.716,.287,.778],10935:[.816,.205,.776],10936:[.816,.205,.776],10937:[.816,.321,.776],10938:[.816,.321,.776],10949:[.543,.203,.698],10950:[.543,.203,.698],10955:[.543,.287,.698],10956:[.543,.287,.698],10974:[.684,0,.381],10975:[.342,.02,.778],10976:[.342,.02,.778],10977:[.684,0,.778],10978:[.684,0,.612],10979:[.684,0,.673],10980:[.684,0,.612],10981:[.684,0,.653],10982:[.684,0,.673],10983:[.622,-.062,.784],10984:[.622,-.062,.784],10985:[.812,.02,.778],10986:[.592,-.092,.784],10987:[.592,-.092,.784],10994:[.75,.25,.62],10995:[.75,.25,.773],10996:[.75,.25,.694],10997:[.75,.25,.694],11004:[.75,.25,.694],119808:[.698,0,.869],119809:[.686,0,.818,{sk:-.026}],119810:[.697,.011,.831,{sk:.051}],119811:[.686,0,.882,{sk:-.04}],119812:[.68,0,.756],119813:[.68,0,.724,{sk:-.02}],119814:[.697,.011,.904,{sk:.015}],119815:[.686,0,.9],119816:[.686,0,.436],119817:[.686,.011,.594,{sk:.051}],119818:[.686,0,.901,{sk:-.013}],119819:[.686,0,.692,{sk:-.114}],119820:[.686,0,1.092],119821:[.686,0,.9],119822:[.697,.011,.864],119823:[.686,0,.786,{sk:-.021}],119824:[.697,.194,.864],119825:[.686,.011,.863,{sk:-.044}],119826:[.697,.011,.639,{sk:-.025}],119827:[.675,0,.8],119828:[.686,.011,.885],119829:[.686,.008,.869],119830:[.686,.008,1.189],119831:[.686,0,.869,{sk:-.017}],119832:[.686,0,.869],119833:[.686,0,.703,{sk:.013}],119834:[.453,.006,.559,{sk:-.049}],119835:[.694,.006,.639,{sk:-.194}],119836:[.453,.006,.511,{sk:.043}],119837:[.694,.006,.639,{sk:.124}],119838:[.453,.006,.527,{sk:.018}],119839:[.7,0,.351,{ic:.086,sk:.033}],119840:[.455,.201,.575,{sk:-.032}],119841:[.694,0,.639,{sk:-.172}],119842:[.685,0,.319],119843:[.685,.2,.351,{sk:.013}],119844:[.694,0,.607,{sk:-.177}],119845:[.694,0,.319,{sk:-.024}],119846:[.45,0,.958,{sk:.012}],119847:[.45,0,.639],119848:[.453,.006,.575],119849:[.45,.194,.639,{sk:.043}],119850:[.45,.194,.607,{sk:-.013}],119851:[.45,0,.474,{sk:-.021}],119852:[.453,.006,.454],119853:[.635,.006,.447,{sk:-.029}],119854:[.45,.006,.639,{sk:-.024}],119855:[.444,.004,.607],119856:[.444,.004,.831],119857:[.444,0,.607],119858:[.444,.2,.607],119859:[.444,0,.511],119860:[.716,0,.75,{sk:.175}],119861:[.683,0,.759,{sk:.115}],119862:[.705,.022,.715,{ic:.045,sk:.105}],119863:[.683,0,.828,{sk:.088}],119864:[.68,0,.738,{ic:.028,sk:.115}],119865:[.68,0,.643,{ic:.108,sk:.102}],119866:[.705,.022,.786,{sk:.093}],119867:[.683,0,.831,{ic:.05,sk:.089}],119868:[.684,.001,.44,{ic:.057,sk:.084}],119869:[.683,.022,.555,{ic:.078,sk:.151}],119870:[.684,0,.849,{ic:.04,sk:.09}],119871:[.684,0,.681,{sk:.019}],119872:[.683,0,.97,{ic:.074,sk:.085}],119873:[.683,0,.803,{ic:.078,sk:.082}],119874:[.705,.022,.763,{sk:.114}],119875:[.683,0,.642,{ic:.112,sk:.072}],119876:[.705,.194,.791,{sk:.1}],119877:[.683,.022,.759,{sk:.084}],119878:[.705,.022,.613,{ic:.032,sk:.093}],119879:[.677,0,.584,{ic:.12,sk:.016}],119880:[.683,.022,.683,{ic:.077,sk:.022}],119881:[.683,.022,.583,{ic:.187,sk:-.019}],119882:[.683,.022,.944,{ic:.104}],119883:[.683,0,.828,{ic:.023,sk:.097}],119884:[.683,.001,.581,{ic:.181,sk:-.027}],119885:[.683,0,.683,{ic:.04,sk:.114}],119886:[.442,.011,.529,{sk:.022}],119887:[.694,.011,.429,{sk:-.011}],119888:[.442,.011,.433,{sk:.101}],119889:[.694,.011,.52,{sk:.182}],119890:[.442,.011,.466,{sk:.067}],119891:[.705,.205,.49,{ic:.062,sk:.172}],119892:[.442,.205,.477,{sk:.077}],119894:[.661,.011,.345,{sk:.074}],119895:[.661,.205,.412,{sk:.153}],119896:[.694,.011,.521,{sk:-.011}],119897:[.694,.011,.298,{sk:.055}],119898:[.442,.011,.878,{sk:.017}],119899:[.442,.011,.6,{sk:.025}],119900:[.442,.011,.485,{sk:.072}],119901:[.442,.194,.503,{sk:.092}],119902:[.442,.194,.446,{ic:.006,sk:.053}],119903:[.442,.011,.451,{sk:.021}],119904:[.442,.011,.469,{sk:.061}],119905:[.626,.011,.361,{sk:.044}],119906:[.442,.011,.572,{sk:.019}],119907:[.442,.011,.485,{sk:.051}],119908:[.442,.011,.716,{sk:.047}],119909:[.442,.011,.572,{sk:.043}],119910:[.442,.205,.49,{sk:.059}],119911:[.442,.011,.465,{ic:.002,sk:.102}],119912:[.711,0,.869,{sk:.173}],119913:[.686,0,.866,{sk:.11}],119914:[.703,.017,.817,{ic:.038,sk:.113}],119915:[.686,0,.938,{sk:.063}],119916:[.68,0,.81,{ic:.015,sk:.124}],119917:[.68,0,.689,{ic:.12,sk:.104}],119918:[.703,.017,.887,{sk:.102}],119919:[.686,0,.982,{ic:.045,sk:.091}],119920:[.686,0,.511,{ic:.055,sk:.086}],119921:[.686,.017,.631,{ic:.063,sk:.176}],119922:[.686,0,.971,{ic:.032,sk:.137}],119923:[.686,0,.756,{sk:.018}],119924:[.686,0,1.142,{ic:.074,sk:.086}],119925:[.686,0,.95,{ic:.077,sk:.083}],119926:[.703,.017,.837,{sk:.11}],119927:[.686,0,.723,{ic:.126,sk:.07}],119928:[.703,.194,.869,{sk:.093}],119929:[.686,.017,.872,{ic:.009,sk:.1}],119930:[.703,.017,.693,{ic:.021,sk:.097}],119931:[.675,0,.637,{ic:.135,sk:.014}],119932:[.686,.017,.8,{ic:.077,sk:.06}],119933:[.686,.017,.678,{ic:.207,sk:.016}],119934:[.686,.017,1.093,{ic:.114}],119935:[.686,0,.947,{ic:.006,sk:.132}],119936:[.686,0,.675,{ic:.2,sk:.022}],119937:[.686,0,.773,{ic:.032,sk:.122}],119938:[.452,.008,.633,{sk:.019}],119939:[.694,.008,.521,{sk:-.035}],119940:[.452,.008,.513,{sk:.101}],119941:[.694,.008,.61,{sk:.219}],119942:[.452,.008,.554,{sk:.063}],119943:[.702,.202,.568,{ic:.058,sk:.169}],119944:[.452,.202,.545,{sk:.067}],119945:[.694,.008,.668,{sk:-.078}],119946:[.694,.008,.405,{sk:.08}],119947:[.694,.202,.471,{sk:.163}],119948:[.694,.008,.604,{sk:-.026}],119949:[.694,.008,.348,{sk:.074}],119950:[.452,.008,1.032,{sk:.06}],119951:[.452,.008,.713,{sk:.032}],119952:[.452,.008,.585,{sk:.074}],119953:[.452,.194,.601,{sk:.112}],119954:[.452,.194,.542,{ic:.001,sk:.059}],119955:[.452,.008,.529,{sk:.018}],119956:[.452,.008,.531,{sk:.059}],119957:[.643,.008,.415,{sk:.063}],119958:[.452,.008,.681,{sk:.038}],119959:[.453,.008,.567,{sk:.069}],119960:[.453,.008,.831,{sk:.101}],119961:[.452,.008,.659,{sk:.029}],119962:[.452,.202,.59,{sk:.078}],119963:[.452,.008,.555,{sk:.076}],120484:[.442,.011,.322],120485:[.442,.205,.384,{sk:.083}],120488:[.698,0,.869],120489:[.686,0,.818,{sk:-.075}],120490:[.68,0,.692,{sk:-.019}],120491:[.698,0,.958],120492:[.68,0,.756,{sk:-.027}],120493:[.686,0,.703,{sk:.013}],120494:[.686,0,.9],120495:[.697,.011,.894],120496:[.686,0,.436],120497:[.686,0,.901,{sk:-.013}],120498:[.698,0,.806],120499:[.686,0,1.092],120500:[.686,0,.9],120501:[.675,0,.767],120502:[.697,.011,.864],120503:[.68,0,.9],120504:[.686,0,.786,{sk:-.063}],120505:[.697,.011,.894],120506:[.686,0,.831,{sk:-.015}],120507:[.675,0,.8],120508:[.697,0,.894],120509:[.686,0,.831],120510:[.686,0,.869,{sk:-.017}],120511:[.686,0,.894],120512:[.697,0,.831],120513:[.686,.025,.958],120514:[.452,.008,.743,{ic:.007,sk:.015}],120515:[.703,.194,.647],120516:[.452,.211,.679],120517:[.718,.008,.551,{sk:-.011}],120518:[.461,.017,.597,{sk:-.025}],120519:[.703,.202,.615,{sk:-.041}],120520:[.452,.211,.615,{sk:-.051}],120521:[.702,.008,.567],120522:[.452,.008,.359,{ic:.004,sk:-.068}],120523:[.452,.008,.615,{ic:.004,sk:-.034}],120524:[.694,.012,.618,{ic:.048,sk:-.227}],120525:[.452,.211,.615,{ic:.004,sk:-.036}],120526:[.453,0,.583,{sk:-.04}],120527:[.703,.202,.615,{sk:-.072}],120528:[.453,.006,.575],120529:[.444,.009,.679,{sk:-.011}],120530:[.452,.211,.567],120531:[.452,.105,.551],120532:[.444,.008,.695],120533:[.444,.012,.615,{sk:-.035}],120534:[.453,.008,.615,{sk:-.019}],120535:[.452,.216,.743,{sk:-.015}],120536:[.452,.202,.743,{ic:.003,sk:-.063}],120537:[.694,.202,.743,{sk:.032}],120538:[.453,.008,.743],120539:[.711,.017,.679],120540:[.444,.008,.506,{ic:.003,sk:.04}],120541:[.702,.008,.615,{sk:.033}],120542:[.452,.01,.724,{sk:-.018}],120543:[.694,.202,.743],120544:[.452,.194,.567],120545:[.444,.008,.966,{sk:-.01}],120546:[.716,0,.75,{sk:.177}],120547:[.683,0,.759,{sk:.077}],120548:[.68,0,.615,{ic:.108,sk:.072}],120549:[.716,0,.833,{sk:.17}],120550:[.68,0,.738,{ic:.028,sk:.092}],120551:[.683,0,.683,{ic:.04,sk:.11}],120552:[.683,0,.831,{ic:.05,sk:.089}],120553:[.705,.022,.763,{sk:.117}],120554:[.684,.001,.44,{ic:.057,sk:.084}],120555:[.684,0,.849,{ic:.04,sk:.09}],120556:[.716,0,.694,{sk:.17}],120557:[.683,0,.97,{ic:.074,sk:.085}],120558:[.683,0,.803,{ic:.078,sk:.082}],120559:[.677,0,.742,{ic:.035,sk:.097}],120560:[.705,.022,.763,{sk:.117}],120561:[.68,0,.831,{ic:.049,sk:.089}],120562:[.683,0,.642,{ic:.112,sk:.049}],120563:[.705,.022,.763,{sk:.117}],120564:[.683,0,.78,{ic:.026,sk:.104}],120565:[.677,0,.584,{ic:.12,sk:.012}],120566:[.705,0,.583,{ic:.118}],120567:[.683,0,.667,{sk:.082}],120568:[.683,0,.828,{ic:.023,sk:.097}],120569:[.683,0,.612,{ic:.081,sk:.025}],120570:[.705,0,.772,{ic:.014,sk:.137}],120571:[.683,.033,.833],120572:[.442,.011,.64,{sk:.072}],120573:[.706,.194,.566,{ic:.008,sk:.148}],120574:[.442,.215,.518,{ic:.025,sk:.111}],120575:[.712,.011,.444,{ic:.008,sk:.107}],120576:[.453,.022,.466,{sk:.051}],120577:[.697,.205,.438,{ic:.036,sk:.067}],120578:[.442,.216,.497,{sk:.1}],120579:[.705,.011,.469,{sk:.075}],120580:[.442,.011,.354],120581:[.442,.011,.576,{sk:.043}],120582:[.694,.013,.583,{sk:-.053}],120583:[.442,.216,.603,{sk:.048}],120584:[.442,0,.494,{ic:.03,sk:.028}],120585:[.697,.205,.438,{ic:.008,sk:.06}],120586:[.442,.011,.485],120587:[.431,.011,.57,{sk:.043}],120588:[.442,.216,.517,{sk:.096}],120589:[.442,.108,.363,{ic:.046,sk:.044}],120590:[.431,.011,.571],120591:[.431,.012,.437,{ic:.074}],120592:[.442,.011,.54,{sk:.036}],120593:[.442,.218,.654,{sk:.028}],120594:[.442,.205,.626,{sk:.018}],120595:[.694,.205,.651,{sk:.143}],120596:[.442,.011,.622,{sk:.034}],120597:[.716,.022,.531,{ic:.035,sk:.069}],120598:[.431,.011,.406,{sk:.066}],120599:[.705,.011,.591,{sk:.116}],120600:[.442,.012,.624,{sk:.053}],120601:[.694,.205,.596,{sk:.125}],120602:[.442,.194,.517,{sk:.102}],120603:[.431,.011,.828,{sk:.039}],120604:[.711,0,.869,{sk:.174}],120605:[.686,0,.866,{sk:.069}],120606:[.68,0,.657,{ic:.12,sk:.071}],120607:[.711,0,.958,{sk:.168}],120608:[.68,0,.81,{ic:.015,sk:.098}],120609:[.686,0,.773,{ic:.032,sk:.117}],120610:[.686,0,.982,{ic:.045,sk:.09}],120611:[.703,.017,.867,{sk:.108}],120612:[.686,0,.511,{ic:.055,sk:.085}],120613:[.686,0,.971,{ic:.032,sk:.093}],120614:[.711,0,.806,{sk:.167}],120615:[.686,0,1.142,{ic:.074,sk:.085}],120616:[.686,0,.95,{ic:.077,sk:.082}],120617:[.675,0,.841,{ic:.026,sk:.104}],120618:[.703,.017,.837,{sk:.111}],120619:[.68,0,.982,{ic:.044,sk:.09}],120620:[.686,0,.723,{ic:.126,sk:.039}],120621:[.703,.017,.867,{sk:.108}],120622:[.686,0,.885,{ic:.019,sk:.108}],120623:[.675,0,.637,{ic:.135,sk:.01}],120624:[.703,0,.671,{ic:.131}],120625:[.686,0,.767,{sk:.08}],120626:[.686,0,.947,{ic:.006,sk:.106}],120627:[.686,0,.714,{ic:.078,sk:.029}],120628:[.703,0,.879,{ic:.007,sk:.135}],120629:[.686,.025,.958],120630:[.452,.008,.761,{sk:.059}],120631:[.703,.194,.66,{sk:.153}],120632:[.452,.211,.59,{ic:.027,sk:-.02}],120633:[.718,.008,.522,{sk:.115}],120634:[.461,.017,.529,{sk:.058}],120635:[.703,.202,.508,{ic:.014,sk:.083}],120636:[.452,.211,.6,{sk:.019}],120637:[.702,.008,.562,{sk:.062}],120638:[.452,.008,.412],120639:[.452,.008,.668,{sk:.025}],120640:[.694,.012,.671,{sk:-.072}],120641:[.452,.211,.708,{sk:.042}],120642:[.453,0,.577,{ic:.026,sk:.028}],120643:[.703,.202,.508,{sk:.061}],120644:[.452,.008,.585],120645:[.444,.009,.682,{sk:.046}],120646:[.452,.211,.612,{sk:.1}],120647:[.452,.105,.424,{ic:.038,sk:-.029}],120648:[.444,.008,.686],120649:[.444,.012,.521,{ic:.083}],120650:[.453,.008,.631,{sk:.037}],120651:[.452,.216,.747,{sk:.033}],120652:[.452,.202,.718,{sk:.011}],120653:[.694,.202,.758,{sk:.151}],120654:[.453,.008,.718,{sk:.039}],120655:[.711,.017,.628,{ic:.029,sk:.079}],120656:[.444,.008,.483,{sk:.074}],120657:[.702,.008,.692,{sk:.119}],120658:[.452,.01,.724,{sk:.053}],120659:[.694,.202,.713,{sk:.126}],120660:[.452,.194,.612,{sk:.094}],120661:[.444,.008,.975,{sk:.043}],120778:[.68,0,.783],120779:[.445,.267,.628],120782:[.655,.011,.575],120783:[.655,0,.575],120784:[.655,0,.575,{sk:-.011}],120785:[.655,.011,.575],120786:[.656,0,.575,{sk:.127}],120787:[.655,.011,.575],120788:[.655,.011,.575,{sk:.048}],120789:[.676,.011,.575,{sk:-.164}],120790:[.655,.011,.575,{sk:.011}],120791:[.655,.011,.575]},bold:{32:[0,0,.383],33:[.705,0,.35],34:[.697,-.418,.481],35:[.694,.194,.958],36:[.75,.056,.575],37:[.75,.056,.958],38:[.705,.011,.894],39:[.697,-.418,.319],40:[.75,.249,.447],41:[.75,.249,.447],42:[.75,-.306,.575],43:[.633,.132,.894],44:[.156,.194,.319],45:[.271,-.174,.383],46:[.156,0,.319],47:[.75,.25,.575],58:[.444,0,.319],59:[.444,.194,.319],60:[.587,.086,.894],61:[.393,-.108,.894],62:[.587,.086,.894],63:[.7,0,.543],64:[.7,.006,.894],91:[.75,.25,.319],92:[.75,.25,.575],93:[.75,.25,.319],94:[.744,-.562,.556,{ic:.005}],95:[-.101,.189,.869],96:[.704,-.509,.575],123:[.75,.25,.575],124:[.76,.26,.319],125:[.75,.25,.575],126:[.311,-.189,.556,{ic:.001}],160:[0,0,.575],163:[.686,.031,.869],165:[.686,0,.869],167:[.712,.212,.695],168:[.677,-.537,.575],172:[.403,-.098,.894],175:[.633,-.581,.575],176:[.686,-.367,.431],177:[.693,0,.894],180:[.704,-.509,.575],181:[.45,.194,.639],182:[.694,.194,.703],183:[.396,-.24,.278],215:[.543,.042,.894],240:[.702,.006,.575],247:[.582,.08,.894],305:[.45,0,.319],567:[.45,.2,.351],710:[.71,-.503,.575],711:[.71,-.503,.575],713:[.633,-.581,.575],714:[.704,-.509,.575],715:[.704,-.509,.575],717:[-.247,.307,.383,{ic:.029}],728:[.7,-.513,.575],729:[.685,-.529,.319],730:[.714,-.492,.338],732:[.661,-.553,.575],767:[-.035,.286,0,{dx:.287}],768:[.704,-.509,0,{dx:.317}],769:[.704,-.509,0,{dx:.242}],770:[.71,-.503,0,{dx:.279}],771:[.661,-.553,0,{dx:.279}],772:[.633,-.581,0,{dx:.279}],773:[.697,-.636,.894],774:[.7,-.513,0,{dx:.279}],775:[.685,-.529,0,{dx:.279}],776:[.677,-.537,0,{dx:.28}],778:[.764,-.542,0,{dx:.28}],780:[.71,-.503,0,{dx:.279}],824:[.748,.249,0],978:[.697,0,.87],1014:[.442,.011,.43],8192:[0,0,.575],8193:[0,0,1.15],8194:[0,0,.575],8195:[0,0,1.15],8196:[0,0,.383],8197:[0,0,.288],8198:[0,0,.192],8199:[0,0,.575],8200:[0,0,.319],8201:[0,0,.23],8202:[0,0,.032],8203:[0,0,0],8208:[.271,-.174,.383],8209:[.271,-.174,.383],8210:[.312,-.236,.575],8211:[.312,-.236,.575],8212:[.312,-.236,1.15],8214:[.75,.25,.499],8216:[.694,-.344,.319],8217:[.694,-.344,.319],8220:[.694,-.344,.571],8221:[.694,-.344,.571],8224:[.702,.211,.511],8225:[.702,.202,.511],8230:[.156,0,.838],8260:[.696,.01,.648],8356:[.686,.031,.869],8364:[.697,.011,.72],8486:[.697,0,.831],8487:[.686,.011,.831],8592:[.5,0,1.15],8593:[.694,.204,.575],8594:[.5,0,1.15],8595:[.704,.194,.575],8599:[.725,0,.894],8600:[.694,.031,.894],8710:[.698,0,1.028],8722:[.281,-.22,.894],8730:[.757,.094,.543,{ic:.064}],8734:[.47,.026,1.15],8738:[.634,.132,.894],8902:[.501,-.001,.575],8994:[.365,-.15,.894],9001:[.751,.25,.447],9002:[.751,.25,.447],9675:[.761,.261,1.277],9702:[.381,-.077,.894],10214:[.751,.249,.463],10215:[.751,.249,.463]},italic:{32:[0,0,.358],33:[.716,0,.307,{ic:.068}],34:[.705,-.423,.401,{ic:.048}],35:[.694,.194,.818,{ic:.01}],36:[.75,.056,.5,{ic:.091}],37:[.75,.056,.818,{ic:.028}],38:[.716,.022,.767,{ic:.037}],39:[.705,-.423,.307,{ic:.048}],40:[.75,.25,.409,{ic:.107}],41:[.75,.25,.409],42:[.75,-.319,.511,{ic:.072}],43:[.557,.057,.767],44:[.106,.193,.307],45:[.243,-.187,.358],46:[.106,0,.307],47:[.75,.25,.511,{ic:.105}],48:[.666,.022,.511,{ic:.044}],49:[.666,0,.511],50:[.666,.022,.511,{ic:.04}],51:[.666,.022,.511,{ic:.051}],52:[.666,.194,.511],53:[.665,.022,.511,{ic:.056}],54:[.666,.022,.511,{ic:.057}],55:[.666,.022,.511,{ic:.114}],56:[.666,.022,.511,{ic:.043}],57:[.666,.022,.511,{ic:.042}],58:[.431,0,.307],59:[.431,.193,.307],60:[.54,.04,.778,{ic:.049}],61:[.367,-.133,.767,{ic:.01}],62:[.54,.04,.778],63:[.716,0,.511,{ic:.04}],64:[.705,.011,.767,{ic:.022}],91:[.75,.25,.307,{ic:.139}],92:[.75,.25,.5],93:[.75,.25,.307,{ic:.052}],94:[.745,-.561,.556,{ic:.153}],95:[-.11,.14,.743],96:[.696,-.505,.511],123:[.75,.25,.5,{ic:.113}],124:[.75,.25,.278,{ic:.066}],125:[.75,.25,.5],126:[.309,-.191,.556,{ic:.072}],160:[0,0,.511],168:[.649,-.553,.511,{ic:.032}],175:[.616,-.586,.511,{ic:.061}],176:[.683,-.428,.383,{ic:.079}],180:[.696,-.505,.511,{ic:.028}],305:[.442,.011,.322],567:[.442,.205,.384,{sk:.083}],710:[.686,-.509,.511,{ic:.024}],711:[.692,-.515,.511,{ic:.061}],713:[.616,-.586,.511,{ic:.061}],714:[.696,-.505,.511,{ic:.028}],715:[.696,-.505,.511],728:[.686,-.516,.511,{ic:.052}],729:[.654,-.548,.307,{ic:.051}],730:[.705,-.529,.831],732:[.651,-.55,.511,{ic:.057}],767:[-.025,.275,0,{dx:.275}],768:[.696,-.505,0,{dx:.136}],769:[.696,-.505,0,{dx:.077}],770:[.686,-.509,0,{dx:.123}],771:[.651,-.55,0,{dx:.105}],772:[.616,-.586,0,{dx:.105}],773:[.681,-.641,.766,{ic:.062}],774:[.686,-.516,0,{dx:.089}],775:[.654,-.548,0,{dx:.105}],776:[.649,-.553,0,{dx:.096}],778:[.705,-.529,0,{dx:.101}],780:[.692,-.515,0,{dx:.086}],824:[.748,.248,0],978:[.722,0,.778,{ic:.007}],1014:[.442,.011,.43],8192:[0,0,.511],8193:[0,0,1.022],8194:[0,0,.511],8195:[0,0,1.022],8196:[0,0,.341],8197:[0,0,.256],8198:[0,0,.17],8199:[0,0,.511],8200:[0,0,.307],8201:[0,0,.204],8202:[0,0,.026],8203:[0,0,0],8208:[.243,-.187,.358,{ic:.001}],8209:[.243,-.187,.358,{ic:.001}],8210:[.277,-.255,.511,{ic:.04}],8211:[.277,-.255,.511,{ic:.04}],8212:[.277,-.255,1.022,{ic:.014}],8214:[.75,.25,.398,{ic:.066}],8216:[.693,-.394,.307,{ic:.053}],8217:[.694,-.395,.307,{ic:.066}],8220:[.693,-.394,.49,{ic:.053}],8221:[.694,-.395,.49,{ic:.064}],8230:[.106,0,.684],8260:[.683,0,.603,{ic:.093}],8356:[.683,.032,.743,{ic:.003}],8364:[.705,.022,.576,{ic:.126}],8486:[.705,0,.716,{ic:.043}],8487:[.684,.021,.716,{ic:.071}],8592:[.512,.011,.971],8593:[.694,.195,.512,{ic:.07}],8594:[.513,.01,.971],8595:[.695,.194,.512],8710:[.716,0,.833],8722:[.27,-.23,.767],8730:[.735,.104,.46,{ic:.226}],8734:[.456,.025,.92,{ic:.022}],8738:[.557,.057,.767,{ic:.047}],8902:[.483,-.019,.511,{ic:.063}],9001:[.751,.249,.409,{ic:.105}],9002:[.751,.249,.409],9675:[.772,.272,1.073,{ic:.003}],9702:[.379,-.081,.767],10214:[.751,.249,.422,{ic:.138}],10215:[.751,.249,.422,{ic:.052}]},"bold-italic":{32:[0,0,.414],33:[.711,0,.386,{ic:.044}],34:[.703,-.422,.518,{ic:.048}],35:[.694,.194,.944],36:[.75,.056,.575,{ic:.079}],37:[.75,.056,.944,{ic:.002}],38:[.711,.017,.886,{ic:.011}],39:[.703,-.422,.356,{ic:.048}],40:[.75,.249,.473,{ic:.094}],41:[.75,.249,.473],42:[.75,-.306,.591,{ic:.057}],43:[.603,.102,.886],44:[.147,.194,.356],45:[.269,-.175,.414],46:[.147,0,.356],47:[.75,.25,.591,{ic:.09}],48:[.661,.017,.591,{ic:.045}],49:[.661,0,.591],50:[.661,.017,.591,{ic:.027}],51:[.661,.017,.591,{ic:.037}],52:[.661,.194,.591],53:[.661,.017,.591,{ic:.037}],54:[.661,.017,.591,{ic:.037}],55:[.661,.017,.591,{ic:.115}],56:[.661,.017,.591,{ic:.027}],57:[.661,.017,.591,{ic:.03}],58:[.444,0,.356],59:[.444,.194,.356],60:[.587,.086,.894,{ic:.046}],61:[.393,-.108,.886],62:[.587,.086,.894],63:[.711,0,.591,{ic:.023}],64:[.702,.008,.886,{ic:.01}],91:[.75,.25,.356,{ic:.129}],92:[.75,.25,.575],93:[.75,.25,.356,{ic:.036}],94:[.744,-.562,.556,{ic:.151}],95:[-.097,.153,.866],96:[.699,-.502,.591],123:[.75,.25,.575,{ic:.109}],124:[.75,.25,.319,{ic:.059}],125:[.75,.25,.575],126:[.307,-.193,.556,{ic:.071}],160:[0,0,.591],168:[.667,-.535,.591,{ic:.045}],175:[.626,-.576,.591,{ic:.047}],176:[.686,-.392,.443,{ic:.081}],180:[.699,-.502,.591,{ic:.005}],305:[.452,.008,.394,{sk:-.012}],567:[.452,.202,.439,{sk:.063}],710:[.704,-.497,.591,{ic:.012}],711:[.704,-.497,.591,{ic:.052}],713:[.626,-.576,.591,{ic:.047}],714:[.699,-.502,.591,{ic:.005}],715:[.699,-.502,.591],717:[-.247,.307,.383,{ic:.032}],728:[.69,-.511,.591,{ic:.037}],729:[.674,-.527,.356,{ic:.048}],730:[.702,-.534,.949],732:[.66,-.541,.591,{ic:.042}],767:[-.035,.286,0,{dx:.272}],768:[.699,-.502,0,{dx:.188}],769:[.699,-.502,0,{dx:.113}],770:[.704,-.497,0,{dx:.165}],771:[.66,-.541,0,{dx:.145}],772:[.626,-.576,0,{dx:.145}],773:[.708,-.647,.885,{ic:.049}],774:[.69,-.511,0,{dx:.13}],775:[.674,-.527,0,{dx:.144}],776:[.667,-.535,0,{dx:.145}],778:[.702,-.534,0,{dx:.141}],780:[.704,-.497,0,{dx:.124}],824:[.749,.249,0],978:[.697,0,.87,{ic:.103}],1014:[.442,.011,.43,{ic:.04}],8192:[0,0,.591],8193:[0,0,1.182],8194:[0,0,.591],8195:[0,0,1.182],8196:[0,0,.394],8197:[0,0,.296],8198:[0,0,.197],8199:[0,0,.591],8200:[0,0,.355],8201:[0,0,.236],8202:[0,0,.029],8203:[0,0,0],8208:[.269,-.175,.414],8209:[.269,-.175,.414],8210:[.293,-.257,.591,{ic:.036}],8211:[.292,-.256,.591,{ic:.037}],8212:[.292,-.256,1.182,{ic:.006}],8214:[.75,.25,.499,{ic:.059}],8216:[.694,-.353,.356,{ic:.037}],8217:[.694,-.353,.356,{ic:.059}],8220:[.694,-.353,.59,{ic:.038}],8221:[.694,-.353,.59,{ic:.059}],8230:[.147,0,.842],8260:[.696,.01,.713,{ic:.08}],8356:[.686,.031,.866,{ic:.008}],8364:[.703,.017,.664,{ic:.115}],8486:[.703,0,.827,{ic:.031}],8487:[.686,.017,.827,{ic:.056}],8592:[.518,.017,1.121],8593:[.694,.204,.592,{ic:.069}],8594:[.518,.017,1.121],8595:[.704,.194,.592],8710:[.699,0,1.028],8722:[.281,-.22,.886],8730:[.757,.094,.531,{ic:.243}],8734:[.473,.029,1.06,{ic:.044}],8738:[.604,.102,.886,{ic:.035}],8902:[.501,-.001,.591,{ic:.048}],9001:[.75,.25,.473,{ic:.09}],9002:[.751,.25,.473],9675:[.772,.272,1.239],9702:[.386,-.072,.886],10214:[.751,.249,.488,{ic:.129}],10215:[.751,.249,.488,{ic:.037}]},"double-struck":{},fraktur:{},"bold-fraktur":{},"sans-serif":{717:[-.208,.286,.333,{ic:.038}],767:[-.023,.277,0,{dx:.274}],824:[.749,.25,0],8192:[0,0,.5],8193:[0,0,1],8194:[0,0,.5],8195:[0,0,1],8196:[0,0,.333],8197:[0,0,.25],8198:[0,0,.167],8199:[0,0,.5],8200:[0,0,.278],8201:[0,0,.2],8202:[0,0,.028],8203:[0,0,0],8356:[.694,.022,.667],8599:[.718,-.001,.778],8600:[.694,.024,.778],8710:[.694,0,.833],8902:[.491,.006,.5,{ic:.023}],8994:[.363,-.133,.778],9675:[.772,.272,1.111]},"bold-sans-serif":{717:[-.253,.389,.367,{ic:.067}],767:[-.025,.319,0,{dx:.294}],824:[.759,.257,0],8192:[0,0,.55],8193:[0,0,1.1],8194:[0,0,.55],8195:[0,0,1.1],8196:[0,0,.367],8197:[0,0,.275],8198:[0,0,.183],8199:[0,0,.55],8200:[0,0,.305],8201:[0,0,.22],8202:[0,0,.031],8203:[0,0,0],8356:[.694,.047,.733],8599:[.734,.023,.856],8600:[.72,.037,.856],8710:[.694,0,.916],8902:[.519,.031,.55,{ic:.015}],8994:[.381,-.095,.856],9675:[.772,.272,1.222]},"sans-serif-italic":{717:[-.208,.286,.333],767:[-.023,.277,0,{dx:.272}],824:[.749,.25,0],8192:[0,0,.5],8193:[0,0,.5],8194:[0,0,.333],8195:[0,0,.25],8196:[0,0,.167],8197:[0,0,.5],8198:[0,0,.278],8199:[0,0,.2],8200:[0,0,.028],8201:[0,0,0],8202:[0,0,0],8203:[0,0,0],8356:[.694,.022,.667],8599:[.718,-.001,.778,{ic:.095}],8600:[.694,.025,.778,{ic:.029}],8710:[.694,0,.833],8902:[.515,.008,.5,{ic:.09}],8994:[.364,-.133,.778],9675:[.772,.272,1.111,{ic:.008}]},"sans-serif-bold-italic":{717:[-.253,.389,.367,{ic:.003}],767:[-.025,.319,0,{dx:.327}],824:[.759,.257,0],8192:[0,0,.55],8193:[0,0,1.1],8194:[0,0,.55],8195:[0,0,1.1],8196:[0,0,.367],8197:[0,0,.275],8198:[0,0,.183],8199:[0,0,.55],8200:[0,0,.305],8201:[0,0,.22],8202:[0,0,.031],8203:[0,0,0],8356:[.694,.047,.733],8599:[.734,.023,.856,{ic:.086}],8600:[.72,.037,.856,{ic:.049}],8710:[.694,0,.916],8902:[.519,.031,.55,{ic:.076}],8994:[.381,-.095,.856],9675:[.772,.272,1.222,{ic:.046}]},monospace:{717:[-.025,.095,.525,{ic:.035}],767:[-.008,.359,.525],824:[.694,.083,.525],8193:[0,0,.525],8195:[0,0,.525],8199:[0,0,.525],8200:[0,0,.525],8356:[.611,.011,.525],8599:[.619,0,.525,{ic:.035}],8600:[.611,.008,.525,{ic:.035}],8710:[.651,0,.525],8902:[.555,-.057,.525],8994:[.414,-.195,.525],9675:[.705,.233,.525,{ic:.075}],64263:[0,0,.525]},"-smallop":{40:[.797,.297,.422],41:[.797,.297,.422],47:[.905,.405,.617],91:[.8,.3,.34],92:[.905,.405,.617],93:[.8,.3,.34],123:[.801,.301,.54],125:[.801,.301,.54],770:[.746,-.571,.644,{ic:.001}],771:[.751,-.55,.652],773:[.67,-.63,.568],774:[.743,-.578,.658,{ic:.001}],780:[.741,-.566,.644,{ic:.001}],8260:[.905,.405,.617],8400:[.711,-.601,.667],8401:[.711,-.601,.667],8406:[.711,-.521,.659],8407:[.711,-.521,.659],8417:[.711,-.521,.715],8428:[-.171,.281,.667],8429:[-.171,.281,.667],8430:[-.091,.281,.659],8431:[-.091,.281,.659],8725:[.605,.105,.572],8726:[.605,.105,.572],8730:[.85,.35,1,{ic:.02}],8739:[.851,.351,.333],8741:[.851,.351,.555],8968:[.8,.3,.458],8969:[.8,.3,.458],8970:[.8,.3,.458],8971:[.8,.3,.458],9140:[.73,-.546,.735],9141:[-.116,.3,.735],9180:[.745,-.54,1.006],9181:[-.11,.315,1.006],9182:[.815,-.509,.993,{ic:.001}],9183:[-.079,.385,.993],9184:[.853,-.613,1.048,{ic:.006}],9185:[-.183,.423,1.048,{ic:.006}],10214:[.8,.3,.444],10215:[.8,.3,.444],10216:[.8,.3,.428],10217:[.8,.3,.428],10218:[.8,.3,.623],10219:[.8,.3,.623],10222:[.813,.313,.305],10223:[.813,.313,.305],10627:[.801,.301,.54],10628:[.801,.301,.54],10629:[.797,.297,.422],10630:[.797,.297,.422],10748:[.791,.291,.422],10749:[.791,.291,.422],126704:[.72,.017,1.953,{sk:-.102}],126705:[.708,.035,2.524]},"-largeop":{40:[.847,.347,.458],41:[.847,.347,.458],47:[1.108,.608,.768],91:[.85,.35,.417],92:[1.108,.608,.768],93:[.85,.35,.417],123:[.85,.35,.583],125:[.85,.35,.583],770:[.746,-.571,.768,{ic:.001}],771:[.753,-.548,.778],774:[.743,-.578,.784,{ic:.001}],780:[.741,-.566,.768,{ic:.001}],8260:[1.108,.608,.768],8512:[.95,.45,1.353,{sk:.067}],8719:[.95,.45,1.278],8720:[.95,.45,1.278],8721:[.95,.45,1.444],8725:[.608,.107,.577],8726:[.608,.107,.577],8730:[1.15,.651,1,{ic:.02}],8739:[.971,.471,.333],8741:[.971,.471,.555],8747:[1.361,.861,.669,{ic:.33}],8748:[1.361,.861,1.089,{ic:.33}],8749:[1.361,.861,1.509,{ic:.33}],8750:[1.361,.861,.669,{ic:.33}],8751:[1.361,.861,1.089,{ic:.33}],8752:[1.361,.861,1.509,{ic:.33}],8753:[1.361,.861,.669,{ic:.33}],8754:[1.361,.861,.669,{ic:.33}],8755:[1.361,.861,.669,{ic:.33}],8896:[.958,.456,1.111],8897:[.956,.458,1.111],8898:[.939,.417,1.111],8899:[.917,.439,1.111],8968:[.85,.35,.472],8969:[.85,.35,.472],8970:[.85,.35,.472],8971:[.85,.35,.472],9140:[.735,-.541,1.11],9141:[-.111,.305,1.11],9180:[.761,-.511,1.508],9181:[-.081,.331,1.508],9182:[.818,-.509,1.494],9183:[-.078,.387,1.494],9184:[.854,-.612,1.55,{ic:.006}],9185:[-.182,.424,1.55,{ic:.006}],10145:[.469,-.031,1.423],10197:[.621,.006,.888,{sk:.09}],10198:[.621,.006,.888,{sk:-.07}],10199:[.621,.006,1.03],10214:[.85,.35,.48],10215:[.85,.35,.48],10216:[.85,.35,.472],10217:[.85,.35,.472],10218:[.85,.35,.682],10219:[.85,.35,.682],10222:[.864,.364,.323],10223:[.864,.364,.323],10627:[.85,.35,.583],10628:[.85,.35,.583],10629:[.847,.347,.458],10630:[.847,.347,.458],10744:[1.239,.677,.597,{ic:.053}],10745:[1.239,.677,.5,{ic:.15}],10748:[.842,.342,.422],10749:[.842,.342,.422],10752:[.902,.402,1.511],10753:[.902,.402,1.511],10754:[.902,.402,1.511],10755:[.917,.439,1.111],10756:[.917,.439,1.111],10757:[.936,.436,1.111],10758:[.936,.436,1.111],10759:[1.225,.693,1.945,{sk:.015}],10760:[1.23,.681,1.945],10761:[.88,.38,1.371],10762:[.95,.45,1.474,{sk:-.011}],10763:[1.361,.861,1.056],10764:[1.361,.861,1.929,{ic:.33}],10765:[1.361,.861,.669,{ic:.33}],10766:[1.361,.861,.669,{ic:.33}],10767:[1.361,.861,.669,{ic:.33}],10768:[1.361,.861,.669,{ic:.33}],10769:[1.361,.861,.669,{ic:.33}],10770:[1.361,.861,.669,{ic:.33}],10771:[1.361,.861,.669,{ic:.33}],10772:[1.361,.861,.669,{ic:.33}],10773:[1.361,.861,.669,{ic:.33}],10774:[1.361,.861,.669,{ic:.33}],10775:[1.361,.861,.669,{ic:.33}],10776:[1.361,.861,.669,{ic:.33}],10777:[1.361,.861,.849,{ic:.15}],10778:[1.361,.861,.849,{ic:.15}],10779:[1.602,.861,.763,{ic:.44}],10780:[1.361,1.124,.789,{ic:.33}],10781:[.921,.151,1.291],10782:[.885,.188,1.046,{sk:.083}],10784:[.774,.081,1.52],10785:[.976,.284,.784],11004:[1.237,.677,.694],11007:[1.237,.677,.478]},"-size3":{40:[.972,.472,.523],41:[.972,.472,.523],47:[1.374,.874,.964],91:[.975,.475,.444],92:[1.374,.874,.964],93:[.975,.475,.444],123:[.975,.475,.624],125:[.975,.475,.624],770:[.747,-.571,.919,{ic:.001}],771:[.757,-.543,.931],774:[.743,-.577,.937,{ic:.001}],780:[.741,-.565,.919,{ic:.001}],8260:[1.374,.874,.964],8725:[.61,.109,.581],8726:[.61,.109,.581],8730:[1.45,.951,1,{ic:.02}],8739:[1.117,.617,.333],8741:[1.117,.617,.555],8968:[.975,.475,.499],8969:[.975,.475,.499],8970:[.975,.475,.499],8971:[.975,.475,.499],9140:[.742,-.535,1.485],9141:[-.105,.312,1.485],9180:[.767,-.509,2.012],9181:[-.079,.337,2.012],9182:[.825,-.506,1.996],9183:[-.075,.394,1.996],9184:[.858,-.61,2.056,{ic:.006}],9185:[-.18,.428,2.056,{ic:.006}],10214:[.975,.475,.555],10215:[.975,.475,.555],10216:[.975,.475,.537],10217:[.975,.475,.537],10218:[.975,.475,.781],10219:[.975,.475,.781],10222:[.991,.491,.37],10223:[.991,.491,.37],10627:[.975,.475,.624],10628:[.975,.475,.624],10629:[.972,.472,.523],10630:[.972,.472,.523],10748:[.966,.466,.467],10749:[.966,.466,.467]},"-size4":{40:[1.146,.646,.597],41:[1.146,.646,.597],47:[1.722,1.222,1.222],91:[1.15,.65,.472],92:[1.722,1.222,1.222],93:[1.15,.65,.472],123:[1.15,.65,.667],125:[1.15,.65,.667],770:[.747,-.57,1.1,{ic:.001}],771:[.762,-.539,1.115],774:[.743,-.576,1.12,{ic:.001}],780:[.742,-.565,1.1,{ic:.001}],8260:[1.722,1.222,1.222],8725:[.613,.113,.588],8726:[.613,.113,.588],8730:[1.75,1.25,1,{ic:.02}],8739:[1.292,.792,.333],8741:[1.292,.792,.555],8968:[1.15,.65,.528],8969:[1.15,.65,.528],8970:[1.15,.65,.528],8971:[1.15,.65,.528],9140:[.75,-.527,1.86],9141:[-.097,.32,1.86],9180:[.774,-.506,2.516],9181:[-.076,.344,2.516],9182:[.833,-.502,2.498],9183:[-.071,.402,2.498],9184:[.863,-.607,2.564,{ic:.006}],9185:[-.177,.433,2.564,{ic:.006}],10214:[1.15,.65,.66],10215:[1.15,.65,.66],10216:[1.15,.65,.611],10217:[1.15,.65,.611],10218:[1.15,.65,.905],10219:[1.15,.65,.905],10222:[1.168,.668,.432],10223:[1.168,.668,.432],10627:[1.15,.65,.667],10628:[1.15,.65,.667],10629:[1.146,.646,.597],10630:[1.146,.646,.597],10748:[1.146,.646,.467,{ic:.023}],10749:[1.146,.646,.467,{ic:.023}]},"-size5":{40:[1.296,.796,.663],41:[1.296,.796,.663],47:[2.179,1.679,1.557],91:[1.3,.8,.499],92:[2.179,1.679,1.557],93:[1.3,.8,.499],123:[1.3,.8,.707],125:[1.3,.8,.707],770:[.748,-.569,1.32,{ic:.001}],771:[.766,-.534,1.335],774:[.743,-.575,1.341,{ic:.001}],780:[.743,-.564,1.32,{ic:.001}],8260:[2.179,1.679,1.557],8725:[.616,.115,.593],8726:[.616,.115,.593],8739:[1.502,1.002,.333],8741:[1.501,1.001,.555],8968:[1.3,.8,.555],8969:[1.3,.8,.555],8970:[1.3,.8,.555],8971:[1.3,.8,.555],9140:[.757,-.521,2.235],9141:[-.091,.327,2.235],9180:[.78,-.506,3.02],9181:[-.076,.35,3.02],9182:[.838,-.5,3],9183:[-.07,.408,3],9184:[.866,-.607,3.068,{ic:.006}],9185:[-.177,.436,3.068,{ic:.006}],10214:[1.3,.8,.75],10215:[1.3,.8,.75],10216:[1.3,.8,.677],10217:[1.3,.8,.677],10218:[1.3,.8,1.011],10219:[1.3,.8,1.011],10222:[1.32,.82,.485],10223:[1.32,.82,.485],10627:[1.3,.8,.707],10628:[1.3,.8,.707],10629:[1.296,.796,.663],10630:[1.296,.796,.663],10748:[1.296,.796,.467,{ic:.077}],10749:[1.296,.796,.467,{ic:.077}]},"-size6":{40:[1.446,.946,.736],41:[1.446,.946,.736],47:[2.777,2.277,1.997],91:[1.45,.95,.528],92:[2.777,2.277,1.997],93:[1.45,.95,.528],123:[1.45,.95,.75],125:[1.45,.95,.75],770:[.748,-.57,1.581,{ic:.001}],771:[.769,-.532,1.599],774:[.744,-.574,1.604,{ic:.001}],780:[.742,-.564,1.581,{ic:.001}],8260:[2.777,2.277,1.997],8725:[.619,.119,.6],8726:[.619,.119,.6],8739:[1.752,1.252,.333],8741:[1.751,1.252,.555],8968:[1.45,.95,.583],8969:[1.45,.95,.583],8970:[1.45,.95,.583],8971:[1.45,.95,.583],9140:[.764,-.513,2.61],9141:[-.083,.334,2.61],9180:[.787,-.505,3.524],9181:[-.075,.357,3.524],9182:[.845,-.498,3.502],9183:[-.067,.414,3.502],9184:[.869,-.606,3.574,{ic:.006}],9185:[-.176,.439,3.574,{ic:.006}],10214:[1.45,.95,.838],10215:[1.45,.95,.838],10216:[1.45,.95,.75],10217:[1.45,.95,.75],10218:[1.45,.95,1.124],10219:[1.45,.95,1.124],10222:[1.472,.972,.541],10223:[1.472,.972,.541],10627:[1.45,.95,.75],10628:[1.45,.95,.75],10629:[1.446,.946,.736],10630:[1.446,.946,.736],10748:[1.447,.936,.467,{ic:.131}],10749:[1.447,.936,.467,{ic:.131}]},"-size7":{40:[1.745,1.245,.875],41:[1.745,1.245,.875],47:[3.56,3.06,2.572],91:[1.75,1.25,.667],92:[3.56,3.06,2.572],93:[1.75,1.25,.667],123:[1.75,1.25,.902],125:[1.75,1.25,.902],770:[.749,-.569,1.896],771:[.773,-.527,1.915],774:[.744,-.573,1.92,{ic:.001}],780:[.743,-.563,1.896],8260:[3.56,3.06,2.572],8725:[.623,.122,.607],8726:[.623,.122,.607],8739:[2.052,1.552,.333],8741:[2.053,1.553,.555],8968:[1.75,1.25,.623],8969:[1.75,1.25,.623],8970:[1.75,1.25,.623],8971:[1.75,1.25,.623],9140:[.772,-.504,2.985],9141:[-.074,.342,2.985],9180:[.796,-.502,4.032],9181:[-.072,.366,4.032],9182:[.854,-.493,4.006],9183:[-.062,.423,4.006],9184:[.873,-.605,4.082,{ic:.006}],9185:[-.175,.443,4.082,{ic:.006}],10214:[1.75,1.25,1.007],10215:[1.75,1.25,1.007],10216:[1.75,1.25,.908],10217:[1.75,1.25,.908],10218:[1.75,1.25,1.362],10219:[1.75,1.25,1.362],10222:[1.776,1.276,.647],10223:[1.776,1.276,.647],10627:[1.75,1.25,.902],10628:[1.75,1.25,.902],10629:[1.745,1.245,.875],10630:[1.745,1.245,.875],10748:[1.751,1.251,.467,{ic:.257}],10749:[1.751,1.251,.467,{ic:.592}]},"-tex-mathit":{65:[.716,0,.743],66:[.683,0,.704,{oc:.03}],67:[.705,.022,.716,{oc:.096}],68:[.683,0,.755,{oc:.02}],69:[.68,0,.678,{oc:.069}],70:[.68,0,.653,{oc:.082}],71:[.705,.022,.774,{oc:.038}],72:[.683,0,.743,{oc:.109}],73:[.683,0,.386,{oc:.115}],74:[.683,.022,.525,{oc:.097}],75:[.683,0,.769,{oc:.09}],76:[.683,0,.627],77:[.683,0,.897,{oc:.105}],78:[.683,0,.743,{oc:.109}],79:[.705,.022,.767,{oc:.021}],80:[.683,0,.678,{oc:.052}],81:[.705,.194,.767,{oc:.021}],82:[.683,.022,.729],83:[.705,.022,.562,{oc:.07}],84:[.677,0,.716,{oc:.09}],85:[.683,.022,.743,{oc:.109}],86:[.683,.022,.743,{oc:.125}],87:[.683,.022,.999,{oc:.125}],88:[.683,0,.743,{oc:.082}],89:[.683,0,.743,{oc:.131}],90:[.683,0,.613,{oc:.091}],97:[.442,.011,.511,{oc:.014}],98:[.694,.011,.46],99:[.442,.011,.46,{oc:.01}],100:[.694,.011,.511,{oc:.049}],101:[.442,.011,.46,{oc:.008}],102:[.705,.205,.307,{oc:.145}],103:[.442,.205,.46,{oc:.027}],104:[.694,.011,.511,{oc:.024}],105:[.654,.011,.307,{oc:.051}],106:[.654,.205,.307,{oc:.051}],107:[.694,.011,.46,{oc:.042}],108:[.694,.011,.256,{oc:.05}],109:[.442,.011,.818,{oc:.024}],110:[.442,.011,.562,{oc:.024}],111:[.442,.011,.511],112:[.442,.194,.511],113:[.442,.194,.46,{oc:.037}],114:[.442,.011,.422,{oc:.067}],115:[.442,.011,.409,{oc:.01}],116:[.626,.011,.332,{oc:.041}],117:[.442,.011,.537,{oc:.024}],118:[.442,.011,.46,{oc:.033}],119:[.442,.011,.664,{oc:.033}],120:[.442,.011,.464,{oc:.054}],121:[.442,.205,.486,{oc:.03}],122:[.442,.011,.409,{oc:.055}]},"-tex-calligraphic":{},"-tex-bold-calligraphic":{},"-tex-oldstyle":{48:[.472,.022,.57],49:[.472,0,.404],50:[.472,0,.554],51:[.472,.216,.563],52:[.485,.194,.517],53:[.472,.216,.547],54:[.666,.022,.563],55:[.485,.213,.503],56:[.666,.022,.563],57:[.472,.216,.563]},"-tex-bold-oldstyle":{48:[.461,.011,.654],49:[.461,0,.494],50:[.461,0,.636],51:[.461,.205,.648],52:[.488,.194,.595],53:[.461,.205,.63],54:[.655,.011,.648],55:[.488,.199,.579],56:[.655,.011,.648],57:[.461,.205,.648]},"-tex-variant":{8216:[.549,-.096,.407],8217:[.549,-.096,.407],8218:[.549,-.096,.407],8219:[.549,-.096,.407],8220:[.549,-.096,.647],8221:[.549,-.096,.647],8222:[.549,-.096,.647],8223:[.549,-.096,.647],8242:[.549,-.096,.407],8243:[.549,-.096,.647],8244:[.549,-.096,.887],8245:[.549,-.096,.407],8246:[.549,-.096,.647],8247:[.549,-.096,.887],8279:[.549,-.096,1.127],8463:[.694,.011,.511,{ic:.024}],8592:[.437,-.063,.5],8594:[.437,-.063,.5],8709:[.597,.097,.778],8722:[.27,-.23,.5],8726:[.431,.022,.777],8730:[.75,.25,.833,{ic:.02}],8733:[.472,-.028,.777],8739:[.431,.022,.222],8740:[.431,.022,.222,{ic:.019}],8741:[.431,.022,.388],8742:[.431,.022,.388,{ic:.02}],8764:[.367,-.133,.777],8776:[.483,-.056,.777],8808:[.753,.276,.777],8809:[.753,.276,.777],8816:[.92,.42,.777],8817:[.92,.42,.777],8840:[.828,.328,.777],8841:[.828,.328,.777],8842:[.636,.248,.777],8843:[.636,.248,.777],8902:[.485,-.019,.5],8994:[.378,-.122,.777],8995:[.378,-.142,.777],10887:[.803,.303,.777],10888:[.803,.303,.777],10955:[.753,.325,.777],10956:[.753,.325,.777]},"-lf-tp":{8400:[.711,-.601,.208],8406:[.711,-.521,.205],8429:[-.171,.281,.208],8430:[-.091,.281,.205],8592:[.51,.01,.507],8593:[.505,0,.5],8602:[.51,.01,.386],8606:[.51,.01,.507],8607:[.505,0,.572],8611:[.51,.01,.58],8614:[.51,.011,.499],8615:[.498,0,.632],8618:[.546,-.226,.507],8620:[.55,.05,.507],8636:[.499,-.226,.513],8637:[.273,0,.512],8638:[.513,0,.441],8639:[.513,0,.441],8644:[.432,.172,.515],8645:[.514,0,.896],8646:[.669,-.065,.514],8647:[.75,.25,.507],8648:[.505,0,.992],8651:[.598,-.131,.515],8652:[.369,.098,.514],8653:[.52,.02,.384],8656:[.52,.02,.504],8657:[.504,0,.652],8666:[.617,.117,.506],8693:[.515,0,.896],8730:[.62,0,1.056,{ic:.013}],9140:[.772,-.504,1.493],9141:[-.074,.342,1.493],9180:[.796,-.502,2.016],9181:[-.072,.366,2.016],9182:[.724,-.493,1.002],9183:[-.062,.294,1.002],9184:[.873,-.605,2.041],9185:[-.175,.443,2.041],10214:[1,0,1.007],10215:[1,0,1.007],10222:[1.526,0,.647],10223:[1.526,0,.647],10572:[.513,0,.616],10573:[.513,0,.616],11057:[.99,.49,.507]},"-rt-bt":{8401:[.711,-.601,.208],8407:[.711,-.521,.205],8428:[-.171,.281,.208],8431:[-.091,.281,.205],8594:[.51,.01,.507],8595:[.505,0,.5],8603:[.51,.01,.386],8608:[.51,.01,.507],8609:[.505,0,.572],8610:[.51,.01,.58],8612:[.51,.011,.499],8613:[.498,0,.632],8617:[.546,-.226,.507],8619:[.55,.05,.507],8640:[.499,-.226,.513],8641:[.273,0,.513],8642:[.513,0,.441],8643:[.513,0,.441],8644:[.669,-.065,.514],8645:[.515,0,.896],8646:[.432,.172,.515],8649:[.75,.25,.507],8650:[.505,0,.992],8651:[.369,.098,.514],8652:[.598,-.131,.515],8654:[.52,.02,.406],8658:[.52,.02,.504],8659:[.504,0,.652],8667:[.617,.117,.506],8693:[.514,0,.896],8694:[.99,.49,.507],9140:[.772,-.504,1.492],9141:[-.074,.342,1.492],9180:[.796,-.502,2.016],9181:[-.072,.366,2.016],9182:[.724,-.493,1.001],9183:[-.062,.294,1.001],9184:[.873,-.605,2.041,{ic:.006}],9185:[-.175,.443,2.041,{ic:.006}],10214:[1,0,1.007],10215:[1,0,1.007],10222:[1.526,0,.647],10223:[1.526,0,.647],10572:[.513,0,.616],10573:[.513,0,.616]},"-ex-md":{95:[-.188,.294,.994],123:[.748,0,.902],175:[.724,-.618,.994],773:[.67,-.63,.19],8400:[.631,-.601,.139],8592:[.274,-.226,.337],8593:[.337,0,.5],8602:[.51,.01,.386],8617:[.274,-.226,.337],8636:[.273,-.226,.341],8638:[.341,0,.441],8639:[.341,0,.441],8644:[.432,-.065,.343],8645:[.343,0,.896],8647:[.512,.012,.337],8648:[.337,0,.992],8651:[.369,-.131,.343],8653:[.52,.02,.384],8654:[.369,-.131,.102],8656:[.369,-.131,.336],8657:[.336,0,.652],8666:[.466,-.034,.337],8694:[.751,.251,.337],8730:[.64,0,1.056],9140:[.772,-.706,.995],9141:[-.276,.342,.995],9180:[.796,-.689,.994],9181:[-.259,.366,.994],9182:[.85,-.618,2.003],9183:[-.188,.419,2.003],9184:[.873,-.766,1.36],9185:[-.336,.443,1.36],10214:[1,0,1.007],10215:[1,0,1.007],10222:[.998,0,.647],10223:[.998,0,.647],10572:[.337,0,.616]},"-bbold":{8450:[.705,.022,.722,{sk:.042}],8461:[.683,0,.833,{sk:.052}],8469:[.683,0,.833],8473:[.683,0,.736],8474:[.705,.194,.778],8477:[.683,.022,.792],8484:[.683,0,.75,{sk:.021}],8508:[.431,.011,.687,{sk:.085}],8509:[.442,.215,.518,{ic:.025,sk:.098}],8510:[.68,0,.737,{sk:.026}],8511:[.68,0,.862,{sk:.056}],8512:[.683,0,.839,{sk:.048}],8517:[.683,0,.794,{ic:.023,sk:.115}],8518:[.694,.011,.673,{ic:.042,sk:.245}],8519:[.448,.011,.444,{ic:.03,sk:.082}],8520:[.691,0,.395,{ic:.028,sk:.119}],8521:[.691,.205,.423,{ic:.038,sk:.12}],120120:[.683,0,.863,{sk:-.025}],120121:[.683,0,.764],120123:[.683,0,.794,{sk:-.043}],120124:[.68,0,.736,{sk:.03}],120125:[.68,0,.709,{sk:.013}],120126:[.705,.022,.785],120128:[.683,0,.467,{sk:.015}],120129:[.683,.022,.597,{sk:.065}],120130:[.683,0,.833,{sk:.022}],120131:[.683,0,.68,{sk:-.08}],120132:[.684,0,1,{sk:.051}],120134:[.705,.022,.778],120138:[.705,.022,.556,{sk:-.018}],120139:[.677,0,.754,{sk:.023}],120140:[.683,.022,.806,{sk:.045}],120141:[.683,.008,.804,{sk:.059}],120142:[.683,.022,1.058,{sk:.015}],120143:[.683,0,.866,{sk:.043}],120144:[.683,0,.868,{sk:.057}],120146:[.448,.011,.614,{sk:-.013}],120147:[.694,.011,.673,{sk:-.126}],120148:[.448,.011,.444,{sk:.026}],120149:[.694,.011,.673,{sk:.152}],120150:[.448,.011,.444,{sk:.014}],120151:[.705,0,.423,{ic:.051,sk:-.028}],120152:[.453,.206,.5,{sk:-.026}],120153:[.694,0,.676,{sk:-.117}],120154:[.691,0,.395],120155:[.691,.205,.423,{sk:.015}],120156:[.694,0,.648,{sk:-.109}],120157:[.694,0,.394,{sk:.018}],120158:[.442,0,.95,{sk:-.037}],120159:[.442,0,.673],120160:[.448,.011,.5],120161:[.442,.194,.673],120162:[.442,.194,.645,{sk:.019}],120163:[.442,0,.509,{sk:-.051}],120164:[.448,.011,.394],120165:[.615,.011,.506,{sk:-.037}],120166:[.442,.011,.673,{sk:.024}],120167:[.431,.011,.635,{sk:.053}],120168:[.431,.011,.635,{ic:.155,sk:.012}],120169:[.431,0,.645,{sk:.049}],120170:[.431,.205,.635,{sk:.05}],120171:[.431,0,.561,{sk:.046}],120792:[.666,.022,.5],120793:[.666,0,.624,{sk:.025}],120794:[.666,0,.5],120795:[.666,.022,.5],120796:[.677,0,.627,{sk:.11}],120797:[.666,.022,.5,{sk:.011}],120798:[.666,.022,.5,{sk:.013}],120799:[.676,.022,.55,{sk:.038}],120800:[.666,.022,.5],120801:[.666,.022,.5]},"-upsmall":{8747:[.805,.306,.665],8748:[.805,.306,1.035],8749:[.805,.306,1.405],8750:[.81,.312,.665],8751:[.805,.306,1.035],8752:[.805,.306,1.405],8753:[.805,.306,.695],8754:[.805,.306,.665],8755:[.805,.306,.665],10764:[.805,.306,1.775],10765:[.805,.306,.665],10766:[.805,.306,.665],10776:[.805,.306,.665],10777:[.805,.306,.665],10778:[.805,.306,.665],10779:[.967,.306,.665,{ic:.002}],10780:[.805,.468,.665],58230:[.805,.306,.665],58231:[.805,.306,.665],58261:[.805,.306,.665],58263:[.805,.306,.665],58264:[.805,.306,.665],58265:[.805,.306,.665],58266:[.805,.306,.665,{ic:.085}],58267:[.798,.299,.695],58323:[.805,.306,.665],59991:[.805,.306,.707]},"-uplarge":{8747:[1.361,.861,.763],8748:[1.361,.861,1.175],8749:[1.361,.861,1.623],8750:[1.363,.861,.899],8751:[1.361,.861,1.295],8752:[1.361,.861,1.699],8753:[1.361,.861,.999],8754:[1.361,.861,.999],8755:[1.361,.861,.999],10763:[1.361,.861,1.056],10764:[1.361,.861,2.019],10765:[1.361,.861,.999],10766:[1.361,.861,.999],10767:[1.361,.861,.999],10768:[1.361,.861,.999],10769:[1.361,.861,.999],10770:[1.361,.861,.895],10771:[1.361,.861,.871],10772:[1.361,.861,.831,{ic:.077}],10773:[1.361,.861,.903],10774:[1.361,.861,.883],10775:[1.361,.861,.967],10776:[1.361,.861,.875],10777:[1.361,.861,.955],10778:[1.361,.861,.967],10779:[1.602,.861,.999],10780:[1.361,1.124,.807]},script:{},"bold-script":{}},M.defaultStyles=Object.assign(Object.assign({},a.defaultStyles),{'mjx-container[jax="CHTML"] > mjx-math.NCM-N[breakable] > *':{"font-family":"MJX-NCM-ZERO, MJX-NCM-N"},".NCM-N":{"font-family":"MJX-NCM-ZERO, MJX-NCM-N"},".NCM-B":{"font-family":"MJX-NCM-ZERO, MJX-NCM-B"},".NCM-I":{"font-family":"MJX-NCM-ZERO, MJX-NCM-I"},".NCM-BI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-BI"},".NCM-DS":{"font-family":"MJX-NCM-ZERO, MJX-NCM-DS"},".NCM-F":{"font-family":"MJX-NCM-ZERO, MJX-NCM-F"},".NCM-FB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-FB"},".NCM-SS":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SS"},".NCM-SSB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SSB"},".NCM-SSI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SSI"},".NCM-SSBI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SSBI"},".NCM-M":{"font-family":"MJX-NCM-ZERO, MJX-NCM-M"},".NCM-SO":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SO"},".NCM-LO":{"font-family":"MJX-NCM-ZERO, MJX-NCM-LO"},".NCM-S3":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S3"},".NCM-S4":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S4"},".NCM-S5":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S5"},".NCM-S6":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S6"},".NCM-S7":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S7"},".NCM-MI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-MI"},".NCM-C":{"font-family":"MJX-NCM-ZERO, MJX-NCM-C"},".NCM-CB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-CB"},".NCM-OS":{"font-family":"MJX-NCM-ZERO, MJX-NCM-OS"},".NCM-OB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-OB"},".NCM-V":{"font-family":"MJX-NCM-ZERO, MJX-NCM-V"},".NCM-LT":{"font-family":"MJX-NCM-ZERO, MJX-NCM-LT"},".NCM-RB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-RB"},".NCM-EM":{"font-family":"MJX-NCM-ZERO, MJX-NCM-EM"},".NCM-Be":{"font-family":"MJX-NCM-ZERO, MJX-NCM-Be"},".NCM-U":{"font-family":"MJX-NCM-ZERO, MJX-NCM-U"},".NCM-Ue":{"font-family":"MJX-NCM-ZERO, MJX-NCM-Ue"},".NCM-S":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S"},".NCM-SB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SB"}}),M.defaultFonts=Object.assign(Object.assign({},a.defaultFonts),{"@font-face /* MJX-NCM-ZERO */":{"font-family":"MJX-NCM-ZERO",src:'url("%%URL%%/mjx-ncm-zero.woff2") format("woff2")'},"@font-face /* MJX-BRK */":{"font-family":"MJX-BRK",src:'url("%%URL%%/mjx-ncm-brk.woff2") format("woff2")'},"@font-face /* MJX-NCM-N */":{"font-family":"MJX-NCM-N",src:'url("%%URL%%/mjx-ncm-n.woff2") format("woff2")'},"@font-face /* MJX-NCM-B */":{"font-family":"MJX-NCM-B",src:'url("%%URL%%/mjx-ncm-b.woff2") format("woff2")'},"@font-face /* MJX-NCM-I */":{"font-family":"MJX-NCM-I",src:'url("%%URL%%/mjx-ncm-i.woff2") format("woff2")'},"@font-face /* MJX-NCM-BI */":{"font-family":"MJX-NCM-BI",src:'url("%%URL%%/mjx-ncm-bi.woff2") format("woff2")'},"@font-face /* MJX-NCM-DS */":{"font-family":"MJX-NCM-DS",src:'url("%%URL%%/mjx-ncm-ds.woff2") format("woff2")'},"@font-face /* MJX-NCM-F */":{"font-family":"MJX-NCM-F",src:'url("%%URL%%/mjx-ncm-f.woff2") format("woff2")'},"@font-face /* MJX-NCM-FB */":{"font-family":"MJX-NCM-FB",src:'url("%%URL%%/mjx-ncm-fb.woff2") format("woff2")'},"@font-face /* MJX-NCM-SS */":{"font-family":"MJX-NCM-SS",src:'url("%%URL%%/mjx-ncm-ss.woff2") format("woff2")'},"@font-face /* MJX-NCM-SSB */":{"font-family":"MJX-NCM-SSB",src:'url("%%URL%%/mjx-ncm-ssb.woff2") format("woff2")'},"@font-face /* MJX-NCM-SSI */":{"font-family":"MJX-NCM-SSI",src:'url("%%URL%%/mjx-ncm-ssi.woff2") format("woff2")'},"@font-face /* MJX-NCM-SSBI */":{"font-family":"MJX-NCM-SSBI",src:'url("%%URL%%/mjx-ncm-ssbi.woff2") format("woff2")'},"@font-face /* MJX-NCM-M */":{"font-family":"MJX-NCM-M",src:'url("%%URL%%/mjx-ncm-m.woff2") format("woff2")'},"@font-face /* MJX-NCM-SO */":{"font-family":"MJX-NCM-SO",src:'url("%%URL%%/mjx-ncm-so.woff2") format("woff2")'},"@font-face /* MJX-NCM-LO */":{"font-family":"MJX-NCM-LO",src:'url("%%URL%%/mjx-ncm-lo.woff2") format("woff2")'},"@font-face /* MJX-NCM-S3 */":{"font-family":"MJX-NCM-S3",src:'url("%%URL%%/mjx-ncm-s3.woff2") format("woff2")'},"@font-face /* MJX-NCM-S4 */":{"font-family":"MJX-NCM-S4",src:'url("%%URL%%/mjx-ncm-s4.woff2") format("woff2")'},"@font-face /* MJX-NCM-S5 */":{"font-family":"MJX-NCM-S5",src:'url("%%URL%%/mjx-ncm-s5.woff2") format("woff2")'},"@font-face /* MJX-NCM-S6 */":{"font-family":"MJX-NCM-S6",src:'url("%%URL%%/mjx-ncm-s6.woff2") format("woff2")'},"@font-face /* MJX-NCM-S7 */":{"font-family":"MJX-NCM-S7",src:'url("%%URL%%/mjx-ncm-s7.woff2") format("woff2")'},"@font-face /* MJX-NCM-MI */":{"font-family":"MJX-NCM-MI",src:'url("%%URL%%/mjx-ncm-mi.woff2") format("woff2")'},"@font-face /* MJX-NCM-C */":{"font-family":"MJX-NCM-C",src:'url("%%URL%%/mjx-ncm-c.woff2") format("woff2")'},"@font-face /* MJX-NCM-CB */":{"font-family":"MJX-NCM-CB",src:'url("%%URL%%/mjx-ncm-cb.woff2") format("woff2")'},"@font-face /* MJX-NCM-OS */":{"font-family":"MJX-NCM-OS",src:'url("%%URL%%/mjx-ncm-os.woff2") format("woff2")'},"@font-face /* MJX-NCM-OB */":{"font-family":"MJX-NCM-OB",src:'url("%%URL%%/mjx-ncm-ob.woff2") format("woff2")'},"@font-face /* MJX-NCM-V */":{"font-family":"MJX-NCM-V",src:'url("%%URL%%/mjx-ncm-v.woff2") format("woff2")'},"@font-face /* MJX-NCM-LT */":{"font-family":"MJX-NCM-LT",src:'url("%%URL%%/mjx-ncm-lt.woff2") format("woff2")'},"@font-face /* MJX-NCM-RB */":{"font-family":"MJX-NCM-RB",src:'url("%%URL%%/mjx-ncm-rb.woff2") format("woff2")'},"@font-face /* MJX-NCM-EM */":{"font-family":"MJX-NCM-EM",src:'url("%%URL%%/mjx-ncm-em.woff2") format("woff2")'},"@font-face /* MJX-NCM-Be */":{"font-family":"MJX-NCM-Be",src:'url("%%URL%%/mjx-ncm-be.woff2") format("woff2")'},"@font-face /* MJX-NCM-U */":{"font-family":"MJX-NCM-U",src:'url("%%URL%%/mjx-ncm-u.woff2") format("woff2")'},"@font-face /* MJX-NCM-Ue */":{"font-family":"MJX-NCM-Ue",src:'url("%%URL%%/mjx-ncm-ue.woff2") format("woff2")'},"@font-face /* MJX-NCM-S */":{"font-family":"MJX-NCM-S",src:'url("%%URL%%/mjx-ncm-s.woff2") format("woff2")'},"@font-face /* MJX-NCM-SB */":{"font-family":"MJX-NCM-SB",src:'url("%%URL%%/mjx-ncm-sb.woff2") format("woff2")'}}),M.dynamicFiles=a.defineDynamicFiles([["latin",{normal:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7835],7838,[7840,7929],11377]}],["latin-b",{bold:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["latin-i",{italic:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929]]}],["latin-bi",{"bold-italic":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929]]}],["double-struck",{normal:[8450,8461,8469,8473,8474,8477,8484,[8508,8512],[8517,8521],120120,120121,[120123,120126],[120128,120132],120134,[120138,120144],[120146,120171],[120792,120801]],"double-struck":[305,567]}],["fraktur",{normal:[8460,8465,8476,8488,8493,120068,120069,[120071,120074],[120077,120084],[120086,120092],[120094,120119],[120172,120223]],fraktur:[305,567],"bold-fraktur":[305,567]}],["script",{normal:[8458,8459,8464,8466,8467,8472,8475,8492,[8495,8497],8499,8500,119964,119966,119967,119970,119973,119974,[119977,119980],[119982,119993],119995,[119997,120003],[120005,120067]],script:[],"bold-script":[]}],["sans-serif",{normal:[[8513,8516],[120224,120431],[120662,120777],[120802,120821]],"sans-serif":[[32,47],[58,64],[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,[913,929],[931,937],[945,969],977,978,981,982,1008,1009,[1012,1014],[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734],"bold-sans-serif":[32,33,[35,47],58,59,61,63,64,[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,978,1014,[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734],"sans-serif-italic":[[32,64],[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,[913,929],[931,937],[945,969],977,978,981,982,1008,1009,[1012,1014],[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734],"sans-serif-bold-italic":[32,33,[35,59],61,63,64,[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,978,1014,[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734]}],["sans-serif-r",{"sans-serif":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-b",{"bold-sans-serif":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-i",{"sans-serif-italic":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-bi",{"sans-serif-bold-italic":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-ex",{"sans-serif":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59959,59962,59966,59970,59973,60163,60164,60168,60175,60177,60178,60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126],"bold-sans-serif":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126],"sans-serif-italic":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126],"sans-serif-bold-italic":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126]}],["monospace",{normal:[[120432,120483],[120822,120831]],monospace:[[32,47],[58,64],[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[728,730],732,[768,776],778,780,[913,929],[931,937],[945,969],977,978,981,982,1008,1009,[1012,1014],[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734]}],["monospace-l",{monospace:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["monospace-ex",{monospace:[161,162,164,166,[169,171],173,174,184,[186,191],[592,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,995],1010,1011,[1015,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309],3647,7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575,7620,7621,7624,7625,[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,[9552,9579],9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64262],65126]}],["calligraphic",{"-tex-calligraphic":[[65,90]],"-tex-bold-calligraphic":[[65,90]]}],["math",{normal:[8714,8717,8731,8732,8762,8763,8782,8783,[8785,8787],[8790,8796],8798,8844,[8886,8889],[8891,8895],8903,[8912,8929],[8932,8937],[8946,8959],[10176,10199],[10202,10204],[10207,10213],[10625,10646],[10649,10740],10742,[10746,10751],10762,10763,[10781,10798],[10800,10814],[10816,10876],[10879,10884],[10893,10900],[10903,10926],[10939,10948],[10951,10954],[10957,10973],[10988,10993],[10998,11003],[11005,11007]]}],["symbols",{normal:[127,161,162,164,166,[169,171],173,174,178,179,[185,191],3647,8204,8205,8215,8218,8219,8222,8223,[8226,8229],8233,8240,8241,[8248,8259],[8261,8278],[8280,8286],8319,8320,8353,8358,[8361,8363],8369,8370,8448,8449,[8451,8454],8456,8457,8468,8470,8471,[8478,8483],8485,8489,8494,[8505,8507],[8522,8527],[8960,8966],[8977,8984],8986,8987,[8996,9e3],[9003,9114],9142,[9146,9165],9167,[9169,9179],[9186,9203],[9208,9215],9250,9251,11159,11193,11209,[11216,11241],[11248,11263],11800,12306,12310,12311,12336,[64256,64262],65126,65279]},[8215]],["symbols-b-i",{bold:[161,162,164,166,[169,171],173,174,[186,191],3647,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,[8361,8363],8369,8370,8451,8470,8471,8478,8480,8482,8494,8960,9250,9251,11800,[64256,64262],65126],italic:[[161,167],[169,174],177,[181,183],[186,191],215,240,247,3647,8204,8205,8218,8219,[8222,8226],8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,8960,9250,9251,11800,[64256,64262],65126],"bold-italic":[[161,167],[169,174],177,[181,183],[186,191],215,240,247,3647,8204,8205,8218,8219,[8222,8226],8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8320,8353,8358,[8361,8363],8369,8370,8451,8470,8471,8478,8480,8482,8494,8960,9250,9251,11800,[64256,64262],65126]}],["greek",{normal:[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]],bold:[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,987],[990,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]],italic:[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]],"bold-italic":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]]}],["greek-ss",{"sans-serif":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]],"bold-sans-serif":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8121],[8123,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]],"sans-serif-italic":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]],"sans-serif-bold-italic":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8121],[8123,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]]}],["cyrillic",{normal:[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],bold:[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],italic:[[1024,1143],[1146,1158],[1160,1225],[1227,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"bold-italic":[[1024,1143],[1146,1158],[1160,1225],[1227,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]]}],["cyrillic-ss",{"sans-serif":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"bold-sans-serif":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"sans-serif-italic":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"sans-serif-bold-italic":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]]}],["phonetics",{normal:[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],bold:[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],italic:[[592,685],687],"bold-italic":[[592,687]]}],["phonetics-ss",{"sans-serif":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],"bold-sans-serif":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],"sans-serif-italic":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],"sans-serif-bold-italic":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575]}],["hebrew",{normal:[[1425,1479],[1488,1514],[1519,1525],1527,[64285,64335]],bold:[[1425,1479],[1488,1515],[1519,1525],1527,[64285,64335]],italic:[[1425,1479],[1488,1514],[1519,1525],1527,[64285,64335]],"bold-italic":[[1425,1479],[1488,1515],[1519,1525],1527,[64285,64335]]}],["devanagari",{normal:[[2304,2431]],bold:[],italic:[],"bold-italic":[]}],["cherokee",{normal:[[5024,5109],[5112,5117]],bold:[[5024,5109],[5112,5117]],italic:[[5024,5115]],"bold-italic":[[5024,5115]]}],["arabic",{normal:[[126464,126498],126500,126503,[126505,126514],[126516,126519],126521,126523,126530,126535,126537,126539,[126541,126543],126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],126704,126705],bold:[],italic:[],"bold-italic":[]}],["braille-d",{normal:[[10240,10495]]}],["braille",{"sans-serif":[[10240,10495]]}],["arrows",{normal:[8604,8605,8607,8609,8613,8615,8616,8621,[8623,8629],8632,8633,[8662,8665],[8668,8671],[8678,8692],[8695,8703],9166,10145,[10224,10228],10239,[10496,10505],[10508,10569],10572,10573,10575,10577,10580,10581,10584,10585,10588,10589,[10592,10601],[10608,10619],[11008,11026],[11056,11087],[11098,11123],[11126,11157],[11160,11192],[11244,11247]],"-largeop":[8593,8595,[8597,8603],[8606,8611],8613,8615,[8617,8622],[8624,8627],8630,8631,[8636,8655],8657,8659,[8661,8667],[8678,8681],8691,8693,8694,[11012,11015],11020,11021,11057],"-lf-tp":[[8678,8681],10503,11013,11014],"-rt-bt":[[8678,8681],10502,11015,11020],"-ex-md":[8678,8679,11013,11014]},[8607,8609,8613,8615,8621,8622,[8624,8627],[8662,8665],8668,8669,[8678,8681],8691,10145,10237,10238,10502,10503,10572,10573,10575,10577,10588,10589,10592,10593,[11012,11015],11020,11021,11057]],["marrows",{normal:[[129024,129035],[129040,129095],[129104,129113],[129120,129159],[129168,129197],129200,129201]}],["accents",{normal:[184,[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,879],7620,7621,7624,7625,[8403,8405],8408,[8413,8415],[8420,8427],8432],"-smallop":[785,[812,816],818,819,831,845],"-largeop":[785,[812,816]],"-size3":[785,[812,816]],"-size4":[785,[812,816]],"-size5":[785,[812,816]],"-size6":[785,[812,816]],"-size7":[785,[812,816]],"-ex-md":[818,819,831,845]},[785,[812,816],818,819,831,845,8425]],["accents-b-i",{bold:[184,[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],7620,7621,7624,7625],italic:[184,[688,700],[702,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879]],"bold-italic":[184,[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879]]}],["shapes",{normal:[8962,[8998,9e3],9003,[9211,9214],[9472,9631],[9634,9641],[9644,9649],9672,9673,[9676,9678],[9680,9701],[9703,9710],[9712,9719],9728,9733,9734,9737,9761,9773,[9785,9790],9792,9794,[9824,9831],[9833,9835],[9837,9839],9854,[9856,9865],9893,[9898,9902],9906,10003,10013,10016,10026,10038,10045,10098,10099,10139,10145,[11026,11055],[11088,11097],[11194,11208],[11210,11215],11242,11243],bold:[9474,9553,9773,9792,9834,9901,9902,9906,10013],italic:[9773,9834,9901,9902,10013],"bold-italic":[9773,9834,9901,9902,10013]}],["mshapes",{normal:[[128896,128984],[128992,129003]]}],["variants",{"-tex-variant":[34,39,42,96,126,170,176,178,179,185,186,8212,8289,8304,8305,[8308,8334]]}],["PUA",{normal:[[57344,57395],[57409,57458],[59264,59274],59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198],bold:[59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198],italic:[59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,61867,61868,[61873,61877],62082,62083,62110,62113,62116,62119,62120,[62560,62568],[62570,62578],63166,63172,[63174,63176],[63187,63190],63198],"bold-italic":[59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,61867,61868,[61873,61877],62082,62083,62110,62113,62116,62119,62120,[62560,62568],[62570,62578],63166,63172,[63174,63176],[63187,63190],63198]}]]),MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml","4.0.0","font"),r({_:{output:{fonts:{"mathjax-newcm":{chtml_ts:i}}}}});const m=MathJax._.components.package,z=(m.PackageError,m.Package);MathJax.startup&&(c(MathJax,"config",{output:{font:"[mathjax-newcm]"},chtml:{fontData:M,dynamicPrefix:"[mathjax-newcm]/chtml/dynamic"},loader:{paths:{"mathjax-newcm":"[mathjax]/output/fonts/mathjax-newcm"}}}),c(MathJax.config,"chtml",{fontURL:z.resolvePath("[mathjax-newcm]/chtml/woff2",!1)}))})(); mathjaxr/inst/doc/mathjax/font/tsconfig/ 0000755 0001762 0000144 00000000000 15112352537 020034 5 ustar ligges users mathjaxr/inst/doc/mathjax/font/tsconfig/mjs.json 0000644 0001762 0000144 00000000236 15112352537 021521 0 ustar ligges users {
"extends": "./common.json",
"compilerOptions": {
"target": "ES6",
"outDir": "../mjs",
"module": "ES6",
"moduleResolution": "node"
}
}
mathjaxr/inst/doc/mathjax/font/tsconfig/def.json 0000644 0001762 0000144 00000000262 15112352537 021465 0 ustar ligges users {
"extends": "./mjs.json",
"compilerOptions": {
"sourceMap": false,
"declaration": false,
"outDir": "../def"
},
"include": ["../def/*.ts"],
"exclude": []
}
mathjaxr/inst/doc/mathjax/font/tsconfig/cjs.json 0000644 0001762 0000144 00000000203 15112352537 021501 0 ustar ligges users {
"extends": "./common.json",
"compilerOptions": {
"target": "ES5",
"outDir": "../cjs",
"module": "CommonJS"
}
}
mathjaxr/inst/doc/mathjax/font/tsconfig/common.json 0000644 0001762 0000144 00000000424 15112352537 022217 0 ustar ligges users {
"compileOnSave": true,
"compilerOptions": {
"downlevelIteration": true,
"declaration": true,
"noImplicitAny": true,
"removeComments": true,
"lib": ["es6", "es2022", "dom"],
"noLib": false,
"sourceMap": true
},
"include": ["../ts/**/*"]
}
mathjaxr/inst/doc/mathjax/font/tex-mml-chtml-mathjax-newcm.js 0000644 0001762 0000144 00003526610 15112352537 024024 0 ustar ligges users (()=>{var __webpack_modules__={124:(t,e)=>{"use strict";function s(t,e){return void 0===e&&(e=Object),e&&"function"==typeof e.getOwnPropertyDescriptors&&(t=e.create(null,e.getOwnPropertyDescriptors(t))),e&&"function"==typeof e.freeze?e.freeze(t):t}function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var r=s({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});var n=s({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});var o=s({script:!1,style:!1,textarea:!0,title:!0});function a(t){return t===c.HTML}var c=s({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),l=Object.keys(c).map((function(t){return c[t]}));var h=s({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});e.assign=function(t,e){if(null===t||"object"!=typeof t)throw new TypeError("target is not an object");for(var s in e)i(e,s)&&(t[s]=e[s]);return t},e.find=function(t,e,s){if(void 0===s&&(s=Array.prototype),t&&"function"==typeof s.find)return s.find.call(t,e);for(var r=0;r-1},e.MIME_TYPE=c,e.NAMESPACE=h},146:(t,e,s)=>{"use strict";var i=s(124),r=s(836),n=s(621),o=s(361),a=s(436),c=r.DOMImplementation,l=i.hasDefaultHTMLNamespace,h=i.isHTMLMimeType,d=i.isValidMimeType,u=i.MIME_TYPE,p=i.NAMESPACE,m=n.ParseError,f=a.XMLReader;function g(t){return t.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028\u2029]/g,"\n")}function b(t){if(void 0===(t=t||{}).locator&&(t.locator=!0),this.assign=t.assign||i.assign,this.domHandler=t.domHandler||E,this.onError=t.onError||t.errorHandler,t.errorHandler&&"function"!=typeof t.errorHandler)throw new TypeError("errorHandler object is no longer supported, switch to onError!");t.errorHandler&&t.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=t.normalizeLineEndings||g,this.locator=!!t.locator,this.xmlns=this.assign(Object.create(null),t.xmlns)}function E(t){var e=t||{};this.mimeType=e.mimeType||u.XML_APPLICATION,this.defaultNamespace=e.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=e.onError}function N(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function y(t,e,s){return"string"==typeof t?t.substr(e,s):t.length>=e+s||e?new java.lang.String(t,e,s)+"":t}function x(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}b.prototype.parseFromString=function(t,e){if(!d(e))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+e+'" is not valid.');var s=this.assign(Object.create(null),this.xmlns),r=o.XML_ENTITIES,n=s[""]||null;l(e)?(r=o.HTML_ENTITIES,n=p.HTML):e===u.XML_SVG_IMAGE&&(n=p.SVG),s[""]=n,s.xml=s.xml||p.XML;var a=new this.domHandler({mimeType:e,defaultNamespace:n,onError:this.onError}),c=this.locator?{}:void 0;this.locator&&a.setDocumentLocator(c);var h=new f;return h.errorHandler=a,h.domBuilder=a,!i.isHTMLMimeType(e)&&"string"!=typeof t&&h.errorHandler.fatalError("source is not a string"),h.parse(this.normalizeLineEndings(String(t)),s,r),a.doc.documentElement||h.errorHandler.fatalError("missing root element"),a.doc},E.prototype={startDocument:function(){var t=new c;this.doc=h(this.mimeType)?t.createHTMLDocument(!1):t.createDocument(this.defaultNamespace,"")},startElement:function(t,e,s,i){var r=this.doc,n=r.createElementNS(t,s||e),o=i.length;x(this,n),this.currentElement=n,this.locator&&N(this.locator,n);for(var a=0;a{"use strict";var i,r;s.d(e,{Al:()=>c,Gb:()=>a,Oe:()=>d});var n=s(484),o=s(869);const a=i||(i=s.t(n,2)),c=(new a.DOMImplementation).createDocument("",""),l=(null===(r||(r=s.t(o,2)))||void 0===(r||(r=s.t(o,2)))?void 0:o.install)||window.wgxpath.install,h=function(){const t={document:{},XPathResult:{}};return l(t),t.document.XPathResult=t.XPathResult,t.document}(),d={currentDocument:c,evaluate:h.evaluate,result:h.XPathResult,createNSResolver:h.createNSResolver}},361:(t,e,s)=>{"use strict";var i=s(124).freeze;e.XML_ENTITIES=i({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=i({Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\u{1d504}",afr:"\u{1d51e}",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",AMP:"&",amp:"&",And:"\u2a53",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1d538}",aopf:"\u{1d552}",ap:"\u2248",apacir:"\u2a6f",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\u{1d49c}",ascr:"\u{1d4b6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\u{1d505}",bfr:"\u{1d51f}",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\u{1d539}",bopf:"\u{1d553}",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250c",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252c",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxUL:"\u255d",boxUl:"\u255c",boxuL:"\u255b",boxul:"\u2518",boxUR:"\u255a",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256c",boxVh:"\u256b",boxvH:"\u256a",boxvh:"\u253c",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255f",boxvR:"\u255e",boxvr:"\u251c",bprime:"\u2035",Breve:"\u02d8",breve:"\u02d8",brvbar:"\xa6",Bscr:"\u212c",bscr:"\u{1d4b7}",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22d2",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",CenterDot:"\xb7",centerdot:"\xb7",Cfr:"\u212d",cfr:"\u{1d520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",cir:"\u25cb",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",Conint:"\u222f",conint:"\u222e",ContourIntegral:"\u222e",Copf:"\u2102",copf:"\u{1d554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xa9",copy:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",Cross:"\u2a2f",cross:"\u2717",Cscr:"\u{1d49e}",cscr:"\u{1d4b8}",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",Cup:"\u22d3",cup:"\u222a",cupbrcap:"\u2a48",CupCap:"\u224d",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21a1",dArr:"\u21d3",darr:"\u2193",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\u{1d507}",dfr:"\u{1d521}",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",Diamond:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\u{1d53b}",dopf:"\u{1d555}",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21d3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\u{1d49f}",dscr:"\u{1d4b9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",ecir:"\u2256",Ecirc:"\xca",ecirc:"\xea",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1d508}",efr:"\u{1d522}",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1d53c}",eopf:"\u{1d556}",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212f",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\u{1d509}",ffr:"\u{1d523}",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\u{1d53d}",fopf:"\u{1d557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1d4bb}",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\u{1d50a}",gfr:"\u{1d524}",Gg:"\u22d9",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2aa5",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gnE:"\u2269",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\u{1d53e}",gopf:"\u{1d558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\u{1d4a2}",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",Gt:"\u226b",GT:">",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",hArr:"\u21d4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",Hfr:"\u210c",hfr:"\u{1d525}",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",Hopf:"\u210d",hopf:"\u{1d559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210b",hscr:"\u{1d4bd}",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",Ifr:"\u2111",ifr:"\u{1d526}",Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",Int:"\u222c",int:"\u222b",intcal:"\u22ba",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\u{1d540}",iopf:"\u{1d55a}",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",Iscr:"\u2110",iscr:"\u{1d4be}",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1d50d}",jfr:"\u{1d527}",jmath:"\u0237",Jopf:"\u{1d541}",jopf:"\u{1d55b}",Jscr:"\u{1d4a5}",jscr:"\u{1d4bf}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\u{1d50e}",kfr:"\u{1d528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\u{1d542}",kopf:"\u{1d55c}",Kscr:"\u{1d4a6}",kscr:"\u{1d4c0}",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",Lang:"\u27ea",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",Larr:"\u219e",lArr:"\u21d0",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",lAtail:"\u291b",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lBarr:"\u290e",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",Leftarrow:"\u21d0",leftarrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\u{1d50f}",lfr:"\u{1d529}",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22d8",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lnE:"\u2268",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftarrow:"\u27f5",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\u{1d543}",lopf:"\u{1d55d}",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1d4c1}",Lsh:"\u21b0",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226a",LT:"<",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\u{1d510}",mfr:"\u{1d52a}",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\u{1d544}",mopf:"\u{1d55e}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1d4c2}",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21d7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1d511}",nfr:"\u{1d52b}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlArr:"\u21cd",nlarr:"\u219a",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21cd",nleftarrow:"\u219a",nLeftrightarrow:"\u21ce",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",nopf:"\u{1d55f}",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nRightarrow:"\u21cf",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\u{1d4a9}",nscr:"\u{1d4c3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nVDash:"\u22af",nVdash:"\u22ae",nvDash:"\u22ad",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwArr:"\u21d6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",Ocirc:"\xd4",ocirc:"\xf4",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\u{1d512}",ofr:"\u{1d52c}",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\u{1d546}",oopf:"\u{1d560}",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",Or:"\u2a54",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\u{1d4aa}",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",Otimes:"\u2a37",otimes:"\u2297",otimesas:"\u2a36",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\u{1d513}",pfr:"\u{1d52d}",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",Popf:"\u2119",popf:"\u{1d561}",pound:"\xa3",Pr:"\u2abb",pr:"\u227a",prap:"\u2ab7",prcue:"\u227c",prE:"\u2ab3",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportion:"\u2237",Proportional:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\u{1d4ab}",pscr:"\u{1d4c5}",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\u{1d514}",qfr:"\u{1d52e}",qint:"\u2a0c",Qopf:"\u211a",qopf:"\u{1d562}",qprime:"\u2057",Qscr:"\u{1d4ac}",qscr:"\u{1d4c6}",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",QUOT:'"',quot:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",Rang:"\u27eb",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",Rarr:"\u21a0",rArr:"\u21d2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",rAtail:"\u291c",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",RBarr:"\u2910",rBarr:"\u290f",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",Re:"\u211c",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",REG:"\xae",reg:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",Rfr:"\u211c",rfr:"\u{1d52f}",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",Rightarrow:"\u21d2",rightarrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",Ropf:"\u211d",ropf:"\u{1d563}",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",Rscr:"\u211b",rscr:"\u{1d4c7}",Rsh:"\u21b1",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",Sc:"\u2abc",sc:"\u227b",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227d",scE:"\u2ab4",sce:"\u2ab0",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",searhk:"\u2925",seArr:"\u21d8",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1d516}",sfr:"\u{1d530}",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",Sopf:"\u{1d54a}",sopf:"\u{1d564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",Square:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",Sscr:"\u{1d4ae}",sscr:"\u{1d4c8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",Sub:"\u22d0",sub:"\u2282",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",Subset:"\u22d0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",Sum:"\u2211",sum:"\u2211",sung:"\u266a",Sup:"\u22d1",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",Supset:"\u22d1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swArr:"\u21d9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:"\t",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\u{1d517}",tfr:"\u{1d531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",Tilde:"\u223c",tilde:"\u02dc",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",Topf:"\u{1d54b}",topf:"\u{1d565}",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\u{1d4af}",tscr:"\u{1d4c9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",Uarr:"\u219f",uArr:"\u21d1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\u{1d518}",ufr:"\u{1d532}",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1d54c}",uopf:"\u{1d566}",UpArrow:"\u2191",Uparrow:"\u21d1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",Updownarrow:"\u21d5",updownarrow:"\u2195",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",upsi:"\u03c5",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTee:"\u22a5",UpTeeArrow:"\u21a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\u{1d4b0}",uscr:"\u{1d4ca}",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",vArr:"\u21d5",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",Vbar:"\u2aeb",vBar:"\u2ae8",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22ab",Vdash:"\u22a9",vDash:"\u22a8",vdash:"\u22a2",Vdashl:"\u2ae6",Vee:"\u22c1",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\u{1d519}",vfr:"\u{1d533}",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\u{1d54d}",vopf:"\u{1d567}",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\u{1d4b1}",vscr:"\u{1d4cb}",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",Wedge:"\u22c0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1d51a}",wfr:"\u{1d534}",Wopf:"\u{1d54e}",wopf:"\u{1d568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1d4b2}",wscr:"\u{1d4cc}",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\u{1d51b}",xfr:"\u{1d535}",xhArr:"\u27fa",xharr:"\u27f7",Xi:"\u039e",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\u{1d54f}",xopf:"\u{1d569}",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",Xscr:"\u{1d4b3}",xscr:"\u{1d4cd}",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\u{1d51c}",yfr:"\u{1d536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1d550}",yopf:"\u{1d56a}",Yscr:"\u{1d4b4}",yscr:"\u{1d4ce}",YUcy:"\u042e",yucy:"\u044e",Yuml:"\u0178",yuml:"\xff",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",Zfr:"\u2128",zfr:"\u{1d537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",Zopf:"\u2124",zopf:"\u{1d56b}",Zscr:"\u{1d4b5}",zscr:"\u{1d4cf}",zwj:"\u200d",zwnj:"\u200c"}),e.entityMap=e.HTML_ENTITIES},436:(t,e,s)=>{"use strict";var i=s(124),r=s(669),n=s(621),o=i.isHTMLEscapableRawTextElement,a=i.isHTMLMimeType,c=i.isHTMLRawTextElement,l=i.hasOwn,h=i.NAMESPACE,d=n.ParseError,u=n.DOMException;function p(){}p.prototype={parse:function(t,e,s){var n=this.domBuilder;n.startDocument(),N(e,e=Object.create(null)),function(t,e,s,n,o){var c=a(n.mimeType);t.indexOf(r.UNICODE_REPLACEMENT_CHARACTER)>=0&&o.warning("Unicode replacement character detected, source encoding issues?");function h(t){if(t>65535){var e=55296+((t-=65536)>>10),s=56320+(1023&t);return String.fromCharCode(e,s)}return String.fromCharCode(t)}function p(t){var e=";"===t[t.length-1]?t:t+";";if(!c&&e!==t)return o.error("EntityRef: expecting ;"),t;var i=r.Reference.exec(e);if(!i||i[0].length!==e.length)return o.error("entity not matching Reference production: "+t),t;var n=e.slice(1,-1);return l(s,n)?s[n]:"#"===n.charAt(0)?h(parseInt(n.substring(1).replace("x","0x"))):(o.error("entity not found:"+t),t)}function N(e){if(e>L){var s=t.substring(L,e).replace(m,p);w&&k(L),n.characters(s,0,e-L),L=e}}var y=0,T=0,_=/\r\n?|\n|$/g,w=n.locator;function k(e,s){for(;e>=T&&(s=_.exec(t));)y=T,T=s.index+s[0].length,w.lineNumber++;w.columnNumber=e-y+1}var A=[{currentNSMap:e}],M=[],L=0;for(;;){try{var I=t.indexOf("<",L);if(I<0){if(!c&&M.length>0)return o.fatalError("unclosed xml tag(s): "+M.join(", "));if(!t.substring(L).match(/^\s*$/)){var S=n.doc,R=S.createTextNode(t.substring(L));if(S.documentElement)return o.error("Extra content at the end of the document");S.appendChild(R),n.currentElement=R}return}if(I>L){var O=t.substring(L,I);c||0!==M.length||(O=O.replace(new RegExp(r.S_OPT.source,"g"),""))&&o.error("Unexpected content outside root element: '"+O+"'"),N(I)}switch(t.charAt(I+1)){case"/":var D=t.indexOf(">",I+2),P=t.substring(I+2,D>0?D:void 0);if(!P)return o.fatalError("end tag name missing");var B=D>0&&r.reg("^",r.QName_group,r.S_OPT,"$").exec(P);if(!B)return o.fatalError('end tag name contains invalid characters: "'+P+'"');if(!n.currentElement&&!n.doc.documentElement)return;var F=M[M.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(F!==B[1]){var j=B[1].toLowerCase();if(!c||F.toLowerCase()!==j)return o.fatalError('Opening and ending tag mismatch: "'+F+'" != "'+P+'"')}var U=A.pop();M.pop();var q=U.localNSMap;if(n.endElement(U.uri,U.localName,F),q)for(var H in q)l(q,H)&&n.endPrefixMapping(H);D++;break;case"?":w&&k(I),D=v(t,I,n,o);break;case"!":w&&k(I),D=x(t,I,n,o,c);break;default:w&&k(I);var W=new C,z=A[A.length-1].currentNSMap,X=(D=g(t,I,W,z,p,o,c),W.length);if(W.closed||(c&&i.isHTMLVoidElement(W.tagName)?W.closed=!0:M.push(W.tagName)),w&&X){for(var V=f(w,{}),G=0;GL?L=D:N(Math.max(I,L)+1)}}(t,e,s,n,this.errorHandler),n.endDocument()}};var m=/?\w+;?/g;function f(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function g(t,e,s,i,r,n,o){function a(t,e,i){return l(s.attributeNames,t)?n.fatalError("Attribute "+t+" redefined"):!o&&e.indexOf("<")>=0?n.fatalError("Unescaped '<' not allowed in attributes values"):void s.addValue(t,e.replace(/[\t\n\r]/g," ").replace(m,r),i)}for(var c,h=++e,d=0;;){var u=t.charAt(h);switch(u){case"=":if(1===d)c=t.slice(e,h),d=3;else{if(2!==d)throw new Error("attribute equal must after attrName");d=3}break;case"'":case'"':if(3===d||1===d){if(1===d&&(n.warning('attribute value must after "="'),c=t.slice(e,h)),e=h+1,!((h=t.indexOf(u,e))>0))throw new Error("attribute value no end '"+u+"' match");a(c,p=t.slice(e,h),e-1),d=5}else{if(4!=d)throw new Error('attribute value must after "="');a(c,p=t.slice(e,h),e),n.warning('attribute "'+c+'" missed start quot('+u+")!!"),e=h+1,d=5}break;case"/":switch(d){case 0:s.setTagName(t.slice(e,h));case 5:case 6:case 7:d=7,s.closed=!0;case 4:case 1:break;case 2:s.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return n.error("unexpected end of input"),0==d&&s.setTagName(t.slice(e,h)),h;case">":switch(d){case 0:s.setTagName(t.slice(e,h));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=t.slice(e,h)).slice(-1)&&(s.closed=!0,p=p.slice(0,-1));case 2:2===d&&(p=c),4==d?(n.warning('attribute "'+p+'" missed quot(")!'),a(c,p,e)):(o||n.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),a(p,p,e));break;case 3:if(!o)return n.fatalError("AttValue: ' or \" expected")}return h;case"\x80":u=" ";default:if(u<=" ")switch(d){case 0:s.setTagName(t.slice(e,h)),d=6;break;case 1:c=t.slice(e,h),d=2;break;case 4:var p=t.slice(e,h);n.warning('attribute "'+p+'" missed quot(")!!'),a(c,p,e);case 5:d=6}else switch(d){case 2:o||n.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),a(c,c,e),e=h,d=1;break;case 5:n.warning('attribute space is required"'+c+'"!!');case 6:d=1,e=h;break;case 3:d=4,e=h;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}h++}}function b(t,e,s){for(var i=t.tagName,r=null,n=t.length;n--;){var o=t[n],a=o.qName,c=o.value;if((m=a.indexOf(":"))>0)var d=o.prefix=a.slice(0,m),u=a.slice(m+1),p="xmlns"===d&&u;else u=a,d=null,p="xmlns"===a&&"";o.localName=u,!1!==p&&(null==r&&(r=Object.create(null),N(s,s=Object.create(null))),s[p]=r[p]=c,o.uri=h.XMLNS,e.startPrefixMapping(p,c))}for(n=t.length;n--;)(o=t[n]).prefix&&("xml"===o.prefix&&(o.uri=h.XML),"xmlns"!==o.prefix&&(o.uri=s[o.prefix]));var m;(m=i.indexOf(":"))>0?(d=t.prefix=i.slice(0,m),u=t.localName=i.slice(m+1)):(d=null,u=t.localName=i);var f=t.uri=s[d||""];if(e.startElement(f,u,i,t),!t.closed)return t.currentNSMap=s,t.localNSMap=r,!0;if(e.endElement(f,u,i),r)for(d in r)l(r,d)&&e.endPrefixMapping(d)}function E(t,e,s,i,r){var n=o(s);if(n||c(s)){var a=t.indexOf(""+s+">",e),l=t.substring(e+1,a);return n&&(l=l.replace(m,i)),r.characters(l,0,l.length),a}return e+1}function N(t,e){for(var s in t)l(t,s)&&(e[s]=t[s])}function y(t,e){var s=e;function i(e){return e=e||0,t.charAt(s+e)}function n(t){s+=t=t||1}function o(){return t.substring(s)}return{char:i,getIndex:function(){return s},getMatch:function(t){var e=r.reg("^",t).exec(o());return e?(n(e[0].length),e[0]):null},getSource:function(){return t},skip:n,skipBlanks:function(){for(var e=0;s"!==o.char()?i.fatalError("doctype not terminated with > at position "+o.getIndex()):(o.skip(1),s.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),s.endDTD(),o.getIndex());default:return i.fatalError('Not well-formed XML starting with "0)return i.fatalError("processing instruction at position "+e+" is an xml declaration which is only at the start of the document");if(!r.XMLDecl.test(t.substring(e)))return i.fatalError("xml declaration is not well-formed")}return s.processingInstruction(n[1],n[2]),e+n[0].length}function C(){this.attributeNames=Object.create(null)}C.prototype={setTagName:function(t){if(!r.QName_exact.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,s){if(!r.QName_exact.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:s}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},e.XMLReader=p,e.parseUtils=y,e.parseDoctypeCommentOrCData=x},484:(t,e,s)=>{"use strict";var i=s(124);e.assign=i.assign,e.hasDefaultHTMLNamespace=i.hasDefaultHTMLNamespace,e.isHTMLMimeType=i.isHTMLMimeType,e.isValidMimeType=i.isValidMimeType,e.MIME_TYPE=i.MIME_TYPE,e.NAMESPACE=i.NAMESPACE;var r=s(621);e.DOMException=r.DOMException,e.DOMExceptionName=r.DOMExceptionName,e.ExceptionCode=r.ExceptionCode,e.ParseError=r.ParseError;var n=s(836);e.Attr=n.Attr,e.CDATASection=n.CDATASection,e.CharacterData=n.CharacterData,e.Comment=n.Comment,e.Document=n.Document,e.DocumentFragment=n.DocumentFragment,e.DocumentType=n.DocumentType,e.DOMImplementation=n.DOMImplementation,e.Element=n.Element,e.Entity=n.Entity,e.EntityReference=n.EntityReference,e.LiveNodeList=n.LiveNodeList,e.NamedNodeMap=n.NamedNodeMap,e.Node=n.Node,e.NodeList=n.NodeList,e.Notation=n.Notation,e.ProcessingInstruction=n.ProcessingInstruction,e.Text=n.Text,e.XMLSerializer=n.XMLSerializer;var o=s(146);e.DOMParser=o.DOMParser,e.normalizeLineEndings=o.normalizeLineEndings,e.onErrorStopParsing=o.onErrorStopParsing,e.onWarningStopParsing=o.onWarningStopParsing},621:(t,e,s)=>{"use strict";function i(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var r=s(124).freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),n=Object.keys(r);function o(t){return"number"==typeof t&&t>=1&&t<=25}function a(t,e){var s;o(t)?(this.name=n[t],this.message=e||""):(this.message=t,this.name="string"==typeof(s=e)&&s.substring(s.length-r.Error.length)===r.Error?e:r.Error),Error.captureStackTrace&&Error.captureStackTrace(this,a)}i(a,!0),Object.defineProperties(a.prototype,{code:{enumerable:!0,get:function(){var t=n.indexOf(this.name);return o(t)?t:0}}});for(var c={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},l=Object.entries(c),h=0;h{"use strict";function s(t){try{"function"!=typeof t&&(t=RegExp);var e=new t("\u{1d306}","u").exec("\u{1d306}");return!!e&&2===e[0].length}catch(t){}return!1}var i=s();function r(t){if("["!==t.source[0])throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function n(t,e){if("["!==t.source[0])throw new Error("/"+t.source+"/ can not be used with chars_without");if(!e||"string"!=typeof e)throw new Error(JSON.stringify(e)+" is not a valid search");if(-1===t.source.indexOf(e))throw new Error('"'+e+'" is not is /'+t.source+"/");if("-"===e&&1!==t.source.indexOf(e))throw new Error('"'+e+'" is not at the first postion of /'+t.source+"/");return new RegExp(t.source.replace(e,""),i?"u":"")}function o(t){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map((function(t){var s="string"==typeof t;if(s&&void 0===e&&"|"===t)throw new Error("use regg instead of reg to wrap expressions with `|`!");return s?t:t.source})).join(""),i?"mu":"m")}function a(t){if(0===arguments.length)throw new Error("no parameters provided");return o.apply(a,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var c=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;i&&(c=o("[",r(c),"\\u{10000}-\\u{10FFFF}","]"));var l=/[\x20\x09\x0D\x0A]/,h=r(l),d=o(l,"+"),u=o(l,"*"),p=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;i&&(p=o("[",r(p),"\\u{10000}-\\u{10FFFF}","]"));var m=o("[",r(p),r(/[-.0-9\xB7]/),r(/[\u0300-\u036F\u203F-\u2040]/),"]"),f=o(p,m,"*"),g=o(m,"+"),b=o("&",f,";"),E=a(/[0-9]+;|[0-9a-fA-F]+;/),N=a(b,"|",E),y=o("%",f,";"),x=a(o('"',a(/[^%&"]/,"|",y,"|",N),"*",'"'),"|",o("'",a(/[^%&']/,"|",y,"|",N),"*","'")),v=a('"',a(/[^<&"]/,"|",N),"*",'"',"|","'",a(/[^<&']/,"|",N),"*","'"),C=o(n(p,":"),n(m,":"),"*"),T=o(C,a(":",C),"?"),_=o("^",T,"$"),w=o("(",T,")"),k=a(/"[^"]*"|'[^']*'/),A=o(/^<\?/,"(",f,")",a(d,"(",c,"*?)"),"?",/\?>/),M=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,L=a('"',M,'*"',"|","'",n(M,"'"),"*'"),I="\x3c!--",S=o(I,a(n(c,"-"),"|",o("-",n(c,"-"))),"*","--\x3e"),R="#PCDATA",O=a(o(/\(/,u,R,a(u,/\|/,u,T),"*",u,/\)\*/),"|",o(/\(/,u,R,u,/\)/)),D=a("EMPTY","|","ANY","|",O,"|",o(/\([^>]+\)/,/[?*+]?/)),P=o(""),B=o("NOTATION",d,/\(/,u,f,a(u,/\|/,u,f),"*",u,/\)/),F=o(/\(/,u,g,a(u,/\|/,u,g),"*",u,/\)/),j=a(B,"|",F),U=a(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",j),q=a(/#REQUIRED|#IMPLIED/,"|",a(a("#FIXED",d),"?",v)),H=o(""),W="about:legacy-compat",z=a('"'+W+'"',"|","'"+W+"'"),X="SYSTEM",V="PUBLIC",G=a(a(X,d,k),"|",a(V,d,L,d,k)),J=o("^",a(a(X,d,"(?",k,")"),"|",a(V,d,"(?",L,")",d,"(?",k,")"))),K=a(d,"NDATA",d,f),$=""),Q=a(x,"|",G),Z=a(Y,"|",o($,d,"%",d,f,d,Q,u,">")),tt=o(V,d,L),et=o(""),st=o(u,"=",u),it=/1[.]\d+/,rt=o(d,"version",st,a("'",it,"'","|",'"',it,'"')),nt=/[A-Za-z][-A-Za-z0-9._]*/,ot=o(/^<\?xml/,rt,a(d,"encoding",st,a('"',nt,'"',"|","'",nt,"'")),"?",a(d,"standalone",st,a("'",a("yes","|","no"),"'","|",'"',a("yes","|","no"),'"')),"?",u,/\?>/),at=o(c,"*?",/\]\]>/),ct=o(/",e.CDSect=ct,e.Char=c,e.Comment=S,e.COMMENT_START=I,e.COMMENT_END="--\x3e",e.DOCTYPE_DECL_START="{"use strict";s.d(e,{u:()=>i});class i{static ensureLocale(t,e){return i.LOCALES.get(t)?t:(console.error(`Locale ${t} does not exist! Using ${i.LOCALES.get(e)} instead.`),e)}}i.VERSION="5.0.0-beta.1",i.LOCALES=new Map([["af","Africaans"],["ca","Catalan"],["da","Danish"],["de","German"],["en","English"],["es","Spanish"],["euro","Euro"],["fr","French"],["hi","Hindi"],["it","Italian"],["ko","Korean"],["nb","Bokm\xe5l"],["nn","Nynorsk"],["sv","Swedish"],["nemeth","Nemeth"]]),i.mathjaxVersion="4.0.0",i.url="https://cdn.jsdelivr.net/npm/speech-rule-engine@"+i.VERSION+"/lib/mathmaps"},836:(t,e,s)=>{"use strict";var i=s(124),r=i.find,n=i.hasDefaultHTMLNamespace,o=i.hasOwn,a=i.isHTMLMimeType,c=i.isHTMLRawTextElement,l=i.isHTMLVoidElement,h=i.MIME_TYPE,d=i.NAMESPACE,u=Symbol(),p=s(621),m=p.DOMException,f=p.DOMExceptionName,g=s(669);function b(t){if(t!==u)throw new TypeError("Illegal constructor")}function E(t){return""!==t}function N(t,e){return o(t,e)||(t[e]=!0),t}function y(t){if(!t)return[];var e=function(t){return t?t.split(/[\t\n\f\r ]+/).filter(E):[]}(t);return Object.keys(e.reduce(N,{}))}function x(t){if(!g.QName_exact.test(t))throw new m(m.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function v(t,e){x(e),t=t||null;var s=null,r=e;if(e.indexOf(":")>=0){var n=e.split(":");s=n[0],r=n[1]}if(null!==s&&null===t)throw new m(m.NAMESPACE_ERR,"prefix is non-null and namespace is null");if("xml"===s&&t!==i.NAMESPACE.XML)throw new m(m.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if(("xmlns"===s||"xmlns"===e)&&t!==i.NAMESPACE.XMLNS)throw new m(m.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===i.NAMESPACE.XMLNS&&"xmlns"!==s&&"xmlns"!==e)throw new m(m.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,s,r]}function C(t,e){for(var s in t)o(t,s)&&(e[s]=t[s])}function T(t,e){var s=t.prototype;if(!(s instanceof e)){function i(){}i.prototype=e.prototype,C(s,i=new i),t.prototype=s=i}s.constructor!=t&&("function"!=typeof t&&console.error("unknown Class:"+t),s.constructor=t)}var _={},w=_.ELEMENT_NODE=1,k=_.ATTRIBUTE_NODE=2,A=_.TEXT_NODE=3,M=_.CDATA_SECTION_NODE=4,L=_.ENTITY_REFERENCE_NODE=5,I=_.ENTITY_NODE=6,S=_.PROCESSING_INSTRUCTION_NODE=7,R=_.COMMENT_NODE=8,O=_.DOCUMENT_NODE=9,D=_.DOCUMENT_TYPE_NODE=10,P=_.DOCUMENT_FRAGMENT_NODE=11,B=_.NOTATION_NODE=12,F=i.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function j(t,e){if(e.length=0){for(var r=e.length-1;i<=r;)e[i]=e[++i];if(e.length=r,t){var n=t.ownerDocument;n&&Z(n,t,s),s.ownerElement=null}}}function J(){}function K(t){b(t)}function $(t){return("<"==t?"<":">"==t&&">")||"&"==t&&"&"||'"'==t&&"""||""+t.charCodeAt()+";"}function Y(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(Y(t,e))return!0}while(t=t.nextSibling)}function Q(t,e){b(t);var s=e||{};this.ownerDocument=this,this.contentType=s.contentType||h.XML_APPLICATION,this.type=a(this.contentType)?"html":"xml"}function Z(t,e,s,i){t&&t._inc++,s.namespaceURI===d.XMLNS&&delete e._nsMap[s.prefix?s.localName:""]}function tt(t,e,s){if(t&&t._inc){t._inc++;var i=e.childNodes;if(s&&!s.nextSibling)i[i.length++]=s;else{for(var r=e.firstChild,n=0;r;)i[n++]=r,r=r.nextSibling;i.length=n,delete i[i.length]}}}function et(t,e){if(t!==e.parentNode)throw new m(m.NOT_FOUND_ERR,"child's parent is not parent");var s=e.previousSibling,i=e.nextSibling;return s?s.nextSibling=i:t.firstChild=i,i?i.previousSibling=s:t.lastChild=s,tt(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function st(t){return t&&t.nodeType===K.DOCUMENT_TYPE_NODE}function it(t){return t&&t.nodeType===K.ELEMENT_NODE}function rt(t){return t&&t.nodeType===K.TEXT_NODE}function nt(t,e){var s=t.childNodes||[];if(r(s,it)||st(e))return!1;var i=r(s,st);return!(e&&i&&s.indexOf(i)>s.indexOf(e))}function ot(t,e){var s=t.childNodes||[];if(r(s,(function(t){return it(t)&&t!==e})))return!1;var i=r(s,st);return!(e&&i&&s.indexOf(i)>s.indexOf(e))}function at(t,e,s){if(!function(t){return t&&(t.nodeType===K.DOCUMENT_NODE||t.nodeType===K.DOCUMENT_FRAGMENT_NODE||t.nodeType===K.ELEMENT_NODE)}(t))throw new m(m.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(s&&s.parentNode!==t)throw new m(m.NOT_FOUND_ERR,"child not in parent");if(!function(t){return t&&(t.nodeType===K.CDATA_SECTION_NODE||t.nodeType===K.COMMENT_NODE||t.nodeType===K.DOCUMENT_FRAGMENT_NODE||t.nodeType===K.DOCUMENT_TYPE_NODE||t.nodeType===K.ELEMENT_NODE||t.nodeType===K.PROCESSING_INSTRUCTION_NODE||t.nodeType===K.TEXT_NODE)}(e)||st(e)&&t.nodeType!==K.DOCUMENT_NODE)throw new m(m.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function ct(t,e,s){var i=t.childNodes||[],n=e.childNodes||[];if(e.nodeType===K.DOCUMENT_FRAGMENT_NODE){var o=n.filter(it);if(o.length>1||r(n,rt))throw new m(m.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===o.length&&!nt(t,s))throw new m(m.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(it(e)&&!nt(t,s))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(st(e)){if(r(i,st))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=r(i,it);if(s&&i.indexOf(a)1||r(n,rt))throw new m(m.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===o.length&&!ot(t,s))throw new m(m.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(it(e)&&!ot(t,s))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(st(e)){function c(t){return st(t)&&t!==s}if(r(i,c))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=r(i,it);if(s&&i.indexOf(a)&"\t\n\r]/g,$),'"')}function kt(t,e,s,i){i||(i=[]);var r="html"===(t.nodeType===O?t:t.ownerDocument).type;if(s){if(!(t=s(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case w:var n=t.attributes,o=n.length,a=t.firstChild,h=t.tagName,u=h;if(!r&&!t.prefix&&t.namespaceURI){for(var p,m=0;m=0;f--){if(""===(b=i[f]).prefix&&b.namespace===t.namespaceURI){p=b.namespace;break}}if(p!==t.namespaceURI)for(f=i.length-1;f>=0;f--){var b;if((b=i[f]).namespace===t.namespaceURI){b.prefix&&(u=b.prefix+":"+h);break}}}e.push("<",u);for(var E=0;E");else{if(e.push(">"),r&&c(h))for(;a;)a.data?e.push(a.data):kt(a,e,s,i.slice()),a=a.nextSibling;else for(;a;)kt(a,e,s,i.slice()),a=a.nextSibling;e.push("",u,">")}return;case O:case P:for(a=t.firstChild;a;)kt(a,e,s,i.slice()),a=a.nextSibling;return;case k:return wt(e,t.name,t.value);case A:return e.push(t.data.replace(/[<&>]/g,$));case M:return e.push(g.CDATA_START,t.data,g.CDATA_END);case R:return e.push(g.COMMENT_START,t.data,g.COMMENT_END);case D:var C=t.publicId,T=t.systemId;return e.push(g.DOCTYPE_DECL_START," ",t.name),C?(e.push(" ",g.PUBLIC," ",C),T&&"."!==T&&e.push(" ",T)):T&&"."!==T&&e.push(" ",g.SYSTEM," ",T),t.internalSubset&&e.push(" [",t.internalSubset,"]"),void e.push(">");case S:return e.push("",t.target," ",t.data,"?>");case L:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function At(t,e,s){var i;switch(e.nodeType){case w:(i=e.cloneNode(!1)).ownerDocument=t;case P:break;case k:s=!0}if(i||(i=e.cloneNode(!1)),i.ownerDocument=t,i.parentNode=null,s)for(var r=e.firstChild;r;)i.appendChild(At(t,r,s)),r=r.nextSibling;return i}function Mt(t,e,s){var i=new e.constructor(u);for(var r in e)if(o(e,r)){var n=e[r];"object"!=typeof n&&n!=i[r]&&(i[r]=n)}switch(e.childNodes&&(i.childNodes=new q),i.ownerDocument=t,i.nodeType){case w:var a=e.attributes,c=i.attributes=new z,l=a.length;c._ownerElement=i;for(var h=0;h=0&&tU(e.ownerDocument)?F.DOCUMENT_POSITION_FOLLOWING:F.DOCUMENT_POSITION_PRECEDING);if(r&&e===s)return F.DOCUMENT_POSITION_CONTAINS+F.DOCUMENT_POSITION_PRECEDING;if(i&&e===s)return F.DOCUMENT_POSITION_CONTAINED_BY+F.DOCUMENT_POSITION_FOLLOWING;for(var a=[],c=e.parentNode;c;){if(!r&&c===s)return F.DOCUMENT_POSITION_CONTAINED_BY+F.DOCUMENT_POSITION_FOLLOWING;a.push(c),c=c.parentNode}a.reverse();for(var l=[],h=s.parentNode;h;){if(!i&&h===e)return F.DOCUMENT_POSITION_CONTAINS+F.DOCUMENT_POSITION_PRECEDING;l.push(h),h=h.parentNode}l.reverse();var d=j(a,l);for(var u in d.childNodes){var p=d.childNodes[u];if(p===s)return F.DOCUMENT_POSITION_FOLLOWING;if(p===e)return F.DOCUMENT_POSITION_PRECEDING;if(l.indexOf(p)>=0)return F.DOCUMENT_POSITION_FOLLOWING;if(a.indexOf(p)>=0)return F.DOCUMENT_POSITION_PRECEDING}return 0}},C(_,K),C(_,K.prototype),C(F,K),C(F,K.prototype),Q.prototype={implementation:null,nodeName:"#document",nodeType:O,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===P){for(var s=t.firstChild;s;){var i=s.nextSibling;this.insertBefore(s,e),s=i}return t}return ht(this,t,e),t.ownerDocument=this,null===this.documentElement&&t.nodeType===w&&(this.documentElement=t),t},removeChild:function(t){var e=et(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){ht(this,t,e,lt),t.ownerDocument=this,e&&this.removeChild(e),it(t)&&(this.documentElement=t)},importNode:function(t,e){return At(this,t,e)},getElementById:function(t){var e=null;return Y(this.documentElement,(function(s){if(s.nodeType==w&&s.getAttribute("id")==t)return e=s,!0})),e},createElement:function(t){var e=new dt(u);return e.ownerDocument=this,"html"===this.type&&(t=t.toLowerCase()),n(this.contentType)&&(e.namespaceURI=d.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new q,(e.attributes=new z)._ownerElement=e,e},createDocumentFragment:function(){var t=new xt(u);return t.ownerDocument=this,t.childNodes=new q,t},createTextNode:function(t){var e=new mt(u);return e.ownerDocument=this,e.childNodes=new q,e.appendData(t),e},createComment:function(t){var e=new ft(u);return e.ownerDocument=this,e.childNodes=new q,e.appendData(t),e},createCDATASection:function(t){var e=new gt(u);return e.ownerDocument=this,e.childNodes=new q,e.appendData(t),e},createProcessingInstruction:function(t,e){var s=new vt(u);return s.ownerDocument=this,s.childNodes=new q,s.nodeName=s.target=t,s.nodeValue=s.data=e,s},createAttribute:function(t){if(!g.QName_exact.test(t))throw new m(m.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return"html"===this.type&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new ut(u);return e.ownerDocument=this,e.childNodes=new q,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!g.Name.test(t))throw new m(m.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if("html"===this.type)throw new m("document is an html document",f.NotSupportedError);var e=new yt(u);return e.ownerDocument=this,e.childNodes=new q,e.nodeName=t,e},createElementNS:function(t,e){var s=v(t,e),i=new dt(u),r=i.attributes=new z;return i.childNodes=new q,i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=s[0],i.prefix=s[1],i.localName=s[2],r._ownerElement=i,i},createAttributeNS:function(t,e){var s=v(t,e),i=new ut(u);return i.ownerDocument=this,i.childNodes=new q,i.nodeName=e,i.name=e,i.specified=!0,i.namespaceURI=s[0],i.prefix=s[1],i.localName=s[2],i}},T(Q,K),dt.prototype={nodeType:w,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return"html"===this.ownerDocument.type&&this.namespaceURI===d.HTML},hasAttributes:function(){return!(!this.attributes||!this.attributes.length)},hasAttribute:function(t){return!!this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e?e.value:null},getAttributeNode:function(t){return this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase()),this.attributes.getNamedItem(t)},setAttribute:function(t,e){this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());var s=this.getAttributeNode(t);s?s.value=s.nodeValue=""+e:((s=this.ownerDocument._createAttribute(t)).value=s.nodeValue=""+e,this.setAttributeNode(s))},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var s=this.getAttributeNodeNS(t,e);s&&this.removeAttributeNode(s)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var s=this.getAttributeNodeNS(t,e);return s?s.value:null},setAttributeNS:function(t,e,s){var i=v(t,e)[2],r=this.getAttributeNodeNS(t,i);r?r.value=r.nodeValue=""+s:((r=this.ownerDocument.createAttributeNS(t,e)).value=r.nodeValue=""+s,this.setAttributeNode(r))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=y(t);return new H(this,(function(s){var i=[];return e.length>0&&Y(s,(function(r){if(r!==s&&r.nodeType===w){var n=r.getAttribute("class");if(n){var o=t===n;if(!o){var a=y(n);o=e.every((c=a,function(t){return c&&-1!==c.indexOf(t)}))}o&&i.push(r)}}var c})),i}))},getElementsByTagName:function(t){var e="html"===(this.nodeType===O?this:this.ownerDocument).type,s=t.toLowerCase();return new H(this,(function(i){var r=[];return Y(i,(function(n){n!==i&&n.nodeType===w&&(("*"===t||n.getQualifiedName()===(e&&n.namespaceURI===d.HTML?s:t))&&r.push(n))})),r}))},getElementsByTagNameNS:function(t,e){return new H(this,(function(s){var i=[];return Y(s,(function(r){r===s||r.nodeType!==w||"*"!==t&&r.namespaceURI!==t||"*"!==e&&r.localName!=e||i.push(r)})),i}))}},Q.prototype.getElementsByClassName=dt.prototype.getElementsByClassName,Q.prototype.getElementsByTagName=dt.prototype.getElementsByTagName,Q.prototype.getElementsByTagNameNS=dt.prototype.getElementsByTagNameNS,T(dt,K),ut.prototype.nodeType=k,T(ut,K),pt.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,s){s=this.data.substring(0,t)+s+this.data.substring(t+e),this.nodeValue=this.data=s,this.length=s.length}},T(pt,K),mt.prototype={nodeName:"#text",nodeType:A,splitText:function(t){var e=this.data,s=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var i=this.ownerDocument.createTextNode(s);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},T(mt,pt),ft.prototype={nodeName:"#comment",nodeType:R},T(ft,pt),gt.prototype={nodeName:"#cdata-section",nodeType:M},T(gt,mt),bt.prototype.nodeType=D,T(bt,K),Et.prototype.nodeType=B,T(Et,K),Nt.prototype.nodeType=I,T(Nt,K),yt.prototype.nodeType=L,T(yt,K),xt.prototype.nodeName="#document-fragment",xt.prototype.nodeType=P,T(xt,K),vt.prototype.nodeType=S,T(vt,pt),Ct.prototype.serializeToString=function(t,e){return Tt.call(t,e)},K.prototype.toString=Tt;try{if(Object.defineProperty){function It(t){switch(t.nodeType){case w:case P:var e=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&e.push(It(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}}Object.defineProperty(H.prototype,"length",{get:function(){return W(this),this.$$length}}),Object.defineProperty(K.prototype,"textContent",{get:function(){return It(this)},set:function(t){switch(this.nodeType){case w:case P:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),Lt=function(t,e,s){t["$$"+e]=s}}}catch(St){}e._updateLiveList=W,e.Attr=ut,e.CDATASection=gt,e.CharacterData=pt,e.Comment=ft,e.Document=Q,e.DocumentFragment=xt,e.DocumentType=bt,e.DOMImplementation=J,e.Element=dt,e.Entity=Nt,e.EntityReference=yt,e.LiveNodeList=H,e.NamedNodeMap=z,e.Node=K,e.NodeList=q,e.Notation=Et,e.Text=mt,e.ProcessingInstruction=vt,e.XMLSerializer=Ct},869:(t,e,s)=>{(function(){"use strict";var e=this;function s(t){return"string"==typeof t}function i(t,e,s){return t.call.apply(t.bind,arguments)}function r(t,e,s){if(!t)throw Error();if(2e?1:0}var h,d=Array.prototype.indexOf?function(t,e,s){return Array.prototype.indexOf.call(t,e,s)}:function(t,e,i){if(i=null==i?0:0>i?Math.max(0,t.length+i):i,s(t))return s(e)&&1==e.length?t.indexOf(e,i):-1;for(;iparseFloat(w)){E=String(A);break t}}E=w}var M={};function L(t){if(!M[t]){for(var e=0,s=a(String(E)).split("."),i=a(String(t)).split("."),r=Math.max(s.length,i.length),n=0;0==e&&n",4,2,(function(t,e,s){return mt((function(t,e){return t>e}),t,e,s)})),bt("<=",4,2,(function(t,e,s){return mt((function(t,e){return t<=e}),t,e,s)})),bt(">=",4,2,(function(t,e,s){return mt((function(t,e){return t>=e}),t,e,s)}));var Et=bt("=",3,2,(function(t,e,s){return mt((function(t,e){return t==e}),t,e,s,!0)}));function Nt(t,e,s){this.a=t,this.b=e||1,this.f=s||1}function yt(t,e){if(e.a.length&&4!=t.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");ot.call(this,t.i),this.c=t,this.h=e,this.g=t.g,this.b=t.b}function xt(t,e){if(e.lengtht.v)throw Error("Function "+t.j+" expects at most "+t.v+" arguments, "+e.length+" given");t.B&&u(e,(function(e,s){if(4!=e.i)throw Error("Argument "+s+" to function "+t.j+" is not of type Nodeset: "+e)})),ot.call(this,t.i),this.h=t,this.c=e,ct(this,t.g||f(e,(function(t){return t.g}))),lt(this,t.D&&!e.length||t.C&&!!e.length||f(e,(function(t){return t.b})))}function vt(t,e,s,i,r,n,o,a,c){this.j=t,this.i=e,this.g=s,this.D=i,this.C=r,this.m=n,this.A=o,this.v=void 0!==a?a:o,this.B=!!c}bt("!=",3,2,(function(t,e,s){return mt((function(t,e){return t!=e}),t,e,s,!0)})),bt("and",2,2,(function(t,e,s){return ut(t,s)&&ut(e,s)})),bt("or",1,2,(function(t,e,s){return ut(t,s)||ut(e,s)})),o(yt),yt.prototype.a=function(t){return t=this.c.a(t),qt(this.h,t)},yt.prototype.toString=function(){return"Filter:"+at(this.c)+at(this.h)},o(xt),xt.prototype.a=function(t){return this.h.m.apply(null,function(t){return Array.prototype.concat.apply(Array.prototype,arguments)}(t,this.c))},xt.prototype.toString=function(){var t="Function: "+this.h;if(this.c.length){var e=m(this.c,(function(t,e){return t+at(e)}),"Arguments:");t=t+at(e)}return t},vt.prototype.toString=function(){return this.j};var Ct={};function Tt(t,e,s,i,r,n,o,a){if(Ct.hasOwnProperty(t))throw Error("Function already created: "+t+".");Ct[t]=new vt(t,e,s,i,!1,r,n,o,a)}function _t(t,e){switch(this.h=t,this.c=void 0!==e?e:null,this.b=null,t){case"comment":this.b=8;break;case"text":this.b=3;break;case"processing-instruction":this.b=7;break;case"node":break;default:throw Error("Unexpected argument")}}function wt(t){return"comment"==t||"text"==t||"processing-instruction"==t||"node"==t}function kt(t){this.b=t,this.a=0}Tt("boolean",2,!1,!1,(function(t,e){return ut(e,t)}),1),Tt("ceiling",1,!1,!1,(function(t,e){return Math.ceil(ht(e,t))}),1),Tt("concat",3,!1,!1,(function(t,e){return m(function(t,e,s){return 2>=arguments.length?Array.prototype.slice.call(t,e):Array.prototype.slice.call(t,e,s)}(arguments,1),(function(e,s){return e+dt(s,t)}),"")}),2,null),Tt("contains",2,!1,!1,(function(t,e,s){return c(dt(e,t),dt(s,t))}),2),Tt("count",1,!1,!1,(function(t,e){return e.a(t).l}),1,1,!0),Tt("false",2,!1,!1,(function(){return!1}),0),Tt("floor",1,!1,!1,(function(t,e){return Math.floor(ht(e,t))}),1),Tt("id",4,!1,!1,(function(t,e){function i(t){if(R){var e=r.all[t];if(e){if(e.nodeType&&t==e.id)return e;if(e.length)return function(t,e){var i;t:{i=t.length;for(var r=s(t)?t.split(""):t,n=0;ni?null:s(t)?t.charAt(i):t[i]}(e,(function(e){return t==e.id}))}return null}return r.getElementById(t)}var r=9==(n=t.a).nodeType?n:n.ownerDocument,n=dt(e,t).split(/\s+/),o=[];u(n,(function(t){!(t=i(t))||0<=d(o,t)||o.push(t)})),o.sort(G);var a=new $;return u(o,(function(t){tt(a,t)})),a}),1),Tt("lang",2,!1,!1,(function(){return!1}),1),Tt("last",1,!0,!1,(function(t){if(1!=arguments.length)throw Error("Function last expects ()");return t.f}),0),Tt("local-name",3,!1,!0,(function(t,e){var s=e?et(e.a(t)):t.a;return s?s.localName||s.nodeName.toLowerCase():""}),0,1,!0),Tt("name",3,!1,!0,(function(t,e){var s=e?et(e.a(t)):t.a;return s?s.nodeName.toLowerCase():""}),0,1,!0),Tt("namespace-uri",3,!0,!1,(function(){return""}),0,1,!0),Tt("normalize-space",3,!1,!0,(function(t,e){return(e?dt(e,t):B(t.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")}),0,1),Tt("not",2,!1,!1,(function(t,e){return!ut(e,t)}),1),Tt("number",1,!1,!0,(function(t,e){return e?ht(e,t):+B(t.a)}),0,1),Tt("position",1,!0,!1,(function(t){return t.b}),0),Tt("round",1,!1,!1,(function(t,e){return Math.round(ht(e,t))}),1),Tt("starts-with",2,!1,!1,(function(t,e,s){return e=dt(e,t),t=dt(s,t),0==e.lastIndexOf(t,0)}),2),Tt("string",3,!1,!0,(function(t,e){return e?dt(e,t):B(t.a)}),0,1),Tt("string-length",1,!1,!0,(function(t,e){return(e?dt(e,t):B(t.a)).length}),0,1),Tt("substring",3,!1,!1,(function(t,e,s,i){if(s=ht(s,t),isNaN(s)||1/0==s||-1/0==s)return"";if(i=i?ht(i,t):1/0,isNaN(i)||-1/0===i)return"";s=Math.round(s)-1;var r=Math.max(s,0);return t=dt(e,t),1/0==i?t.substring(r):t.substring(r,s+Math.round(i))}),2,3),Tt("substring-after",3,!1,!1,(function(t,e,s){return e=dt(e,t),t=dt(s,t),-1==(s=e.indexOf(t))?"":e.substring(s+t.length)}),2),Tt("substring-before",3,!1,!1,(function(t,e,s){return e=dt(e,t),t=dt(s,t),-1==(t=e.indexOf(t))?"":e.substring(0,t)}),2),Tt("sum",1,!1,!1,(function(t,e){for(var s=it(e.a(t)),i=0,r=nt(s);r;r=nt(s))i+=+B(r);return i}),1,1,!0),Tt("translate",3,!1,!1,(function(t,e,s,i){e=dt(e,t),s=dt(s,t);var r=dt(i,t);for(t={},i=0;i]=|\s+|./g,Mt=/^\s/;function Lt(t,e){return t.b[t.a+(e||0)]}function It(t){return t.b[t.a++]}function St(t){return t.b.length<=t.a}function Rt(t){ot.call(this,3),this.c=t.substring(1,t.length-1)}function Ot(t,e){var s;this.j=t.toLowerCase(),s="*"==this.j?"*":"http://www.w3.org/1999/xhtml",this.c=e?e.toLowerCase():s}function Dt(t,e){if(ot.call(this,t.i),this.h=t,this.c=e,this.g=t.g,this.b=t.b,1==this.c.length){var s=this.c[0];s.u||s.c!=Vt||"*"!=(s=s.o).f()&&(this.f={name:s.f(),s:null})}}function Pt(){ot.call(this,4)}function Bt(){ot.call(this,4)}function Ft(t){return"/"==t||"//"==t}function jt(t){ot.call(this,4),this.c=t,ct(this,f(this.c,(function(t){return t.g}))),lt(this,f(this.c,(function(t){return t.b})))}function Ut(t,e){this.a=t,this.b=!!e}function qt(t,e,s){for(s=s||0;s(t=It(t.a)).length)throw Error("Unclosed literal string");return new Rt(t)}function ae(t){var e,s,i=[];if(Ft(Lt(t.a))){if(e=It(t.a),s=Lt(t.a),"/"==e&&(St(t.a)||"."!=s&&".."!=s&&"@"!=s&&"*"!=s&&!/(?![0-9])[\w]/.test(s)))return new Pt;s=new Pt,ie(t,"Missing next location step."),e=ce(t,e),i.push(e)}else{t:{switch(s=(e=Lt(t.a)).charAt(0)){case"$":throw Error("Variable reference not allowed in HTML XPath");case"(":It(t.a),e=se(t),ie(t,'unclosed "("'),re(t,")");break;case'"':case"'":e=oe(t);break;default:if(isNaN(+e)){if(wt(e)||!/(?![0-9])[\w]/.test(s)||"("!=Lt(t.a,1)){e=null;break t}for(e=It(t.a),e=Ct[e]||null,It(t.a),s=[];")"!=Lt(t.a)&&(ie(t,"Missing function argument list."),s.push(se(t)),","==Lt(t.a));)It(t.a);ie(t,"Unclosed function argument list."),ne(t),e=new xt(e,s)}else e=new te(+It(t.a))}"["==Lt(t.a)&&(e=new yt(e,s=new Ut(le(t))))}if(e){if(!Ft(Lt(t.a)))return e;s=e}else e=ce(t,"/"),s=new Bt,i.push(e)}for(;Ft(Lt(t.a));)e=It(t.a),ie(t,"Missing next location step."),e=ce(t,e),i.push(e);return new Dt(s,i)}function ce(t,e){var s,i,r,n;if("/"!=e&&"//"!=e)throw Error('Step op should be "/" or "//"');if("."==Lt(t.a))return i=new Ht(Qt,new _t("node")),It(t.a),i;if(".."==Lt(t.a))return i=new Ht($t,new _t("node")),It(t.a),i;if("@"==Lt(t.a))n=Vt,It(t.a),ie(t,"Missing attribute name");else if("::"==Lt(t.a,1)){if(!/(?![0-9])[\w]/.test(Lt(t.a).charAt(0)))throw Error("Bad token: "+It(t.a));if(s=It(t.a),!(n=zt[s]||null))throw Error("No axis with name: "+s);It(t.a),ie(t,"Missing node name")}else n=Gt;if(s=Lt(t.a),!/(?![0-9])[\w\*]/.test(s.charAt(0)))throw Error("Bad token: "+It(t.a));if("("==Lt(t.a,1)){if(!wt(s))throw Error("Invalid node type: "+s);if(!wt(s=It(t.a)))throw Error("Invalid type name: "+s);re(t,"("),ie(t,"Bad nodetype");var o=null;'"'!=(r=Lt(t.a).charAt(0))&&"'"!=r||(o=oe(t)),ie(t,"Bad nodetype"),ne(t),s=new _t(s,o)}else if(-1==(r=(s=It(t.a)).indexOf(":")))s=new Ot(s);else{var a;if("*"==(o=s.substring(0,r)))a="*";else if(!(a=t.b(o)))throw Error("Namespace prefix not declared: "+o);s=new Ot(s=s.substr(r+1),a)}return r=new Ut(le(t),n.a),i||new Ht(n,s,r,"//"==e)}function le(t){for(var e=[];"["==Lt(t.a);){It(t.a),ie(t,"Missing predicate expression.");var s=se(t);e.push(s),ie(t,"Unclosed predicate expression."),re(t,"]")}return e}function he(t){if("-"==Lt(t.a))return It(t.a),new Zt(he(t));var e=ae(t);if("|"!=Lt(t.a))t=e;else{for(e=[e];"|"==It(t.a);)ie(t,"Missing next union location path."),e.push(ae(t));t.a.a--,t=new jt(e)}return t}function de(t){switch(t.nodeType){case 1:return function(t,e){var s=Array.prototype.slice.call(arguments,1);return function(){var e=s.slice();return e.push.apply(e,arguments),t.apply(this,e)}}(pe,t);case 9:return de(t.documentElement);case 11:case 10:case 6:case 12:return ue;default:return t.parentNode?de(t.parentNode):ue}}function ue(){return null}function pe(t,e){if(t.prefix==e)return t.namespaceURI||"http://www.w3.org/1999/xhtml";var s=t.getAttributeNode("xmlns:"+e);return s&&s.specified?s.value||null:t.parentNode&&9!=t.parentNode.nodeType?pe(t.parentNode,e):null}function me(t,e){if(!t.length)throw Error("Empty XPath expression.");var s=function(t){t=t.match(At);for(var e=0;e=s.length?null:s[n++]},this.snapshotItem=function(t){if(6!=e&&7!=e)throw Error("snapshotItem called with wrong result type");return t>=s.length||0>t?null:s[t]}}function ge(t){this.lookupNamespaceURI=de(t)}function be(t,s){var i=t||e,r=i.Document&&i.Document.prototype||i.document;r.evaluate&&!s||(i.XPathResult=fe,r.evaluate=function(t,e,s,i){return new me(t,s).evaluate(e,i)},r.createExpression=function(t,e){return new me(t,e)},r.createNSResolver=function(t){return new ge(t)})}o(Zt),Zt.prototype.a=function(t){return-ht(this.c,t)},Zt.prototype.toString=function(){return"Unary Expression: -"+at(this.c)},o(te),te.prototype.a=function(){return this.c},te.prototype.toString=function(){return"Number: "+this.c},fe.ANY_TYPE=0,fe.NUMBER_TYPE=1,fe.STRING_TYPE=2,fe.BOOLEAN_TYPE=3,fe.UNORDERED_NODE_ITERATOR_TYPE=4,fe.ORDERED_NODE_ITERATOR_TYPE=5,fe.UNORDERED_NODE_SNAPSHOT_TYPE=6,fe.ORDERED_NODE_SNAPSHOT_TYPE=7,fe.ANY_UNORDERED_NODE_TYPE=8,fe.FIRST_ORDERED_NODE_TYPE=9;var Ee,Ne=["wgxpath","install"],ye=e;Ne[0]in ye||!ye.execScript||ye.execScript("var "+Ne[0]);for(;Ne.length&&(Ee=Ne.shift());)Ne.length||void 0===be?ye=ye[Ee]?ye[Ee]:ye[Ee]={}:ye[Ee]=be;t.exports.install=be,t.exports.XPathResultType={ANY_TYPE:0,NUMBER_TYPE:1,STRING_TYPE:2,BOOLEAN_TYPE:3,UNORDERED_NODE_ITERATOR_TYPE:4,ORDERED_NODE_ITERATOR_TYPE:5,UNORDERED_NODE_SNAPSHOT_TYPE:6,ORDERED_NODE_SNAPSHOT_TYPE:7,ANY_UNORDERED_NODE_TYPE:8,FIRST_ORDERED_NODE_TYPE:9}}).call(s.g)},988:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{f:()=>SystemExternal});var _variables_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(680),_lib_external_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(326);const windowSupported=!("undefined"==typeof window),documentSupported=windowSupported&&!(void 0===window.document),webworker=!("undefined"==typeof DedicatedWorkerGlobalScope),nodeRequire=()=>{try{return eval("require")}catch(t){return t=>null}},SystemExternal={extRequire:t=>"undefined"!=typeof process&&"undefined"!=typeof require?nodeRequire()(t):null,windowSupported,documentSupported,webworker,xmldom:_lib_external_js__WEBPACK_IMPORTED_MODULE_1__.Gb,document:_lib_external_js__WEBPACK_IMPORTED_MODULE_1__.Al,fs:documentSupported||webworker?null:nodeRequire()("fs"),url:_variables_js__WEBPACK_IMPORTED_MODULE_0__.u.url,jsonPath:function(){if(documentSupported||webworker)return _variables_js__WEBPACK_IMPORTED_MODULE_0__.u.url;if(process.env.SRE_JSON_PATH||global.SRE_JSON_PATH)return process.env.SRE_JSON_PATH||global.SRE_JSON_PATH;try{return nodeRequire().resolve("speech-rule-engine").replace(/sre\.js$/,"")+"mathmaps"}catch(t){}try{return nodeRequire().resolve(".").replace(/sre\.js$/,"")+"mathmaps"}catch(t){}return"undefined"!=typeof __dirname?__dirname+(__dirname.match(/lib?$/)?"/mathmaps":"/lib/mathmaps"):process.cwd()+"/lib/mathmaps"}(),xpath:_lib_external_js__WEBPACK_IMPORTED_MODULE_1__.Oe}}},__webpack_module_cache__={},leafPrototypes,getProto;function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var s=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](s,s.exports,__webpack_require__),s.exports}getProto=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,__webpack_require__.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var s=Object.create(null);__webpack_require__.r(s);var i={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var r=2&e&&t;"object"==typeof r&&!~leafPrototypes.indexOf(r);r=getProto(r))Object.getOwnPropertyNames(r).forEach((e=>i[e]=()=>t[e]));return i.default=()=>t,__webpack_require__.d(s,i),s},__webpack_require__.d=(t,e)=>{for(var s in e)__webpack_require__.o(e,s)&&!__webpack_require__.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";var t={};__webpack_require__.r(t),__webpack_require__.d(t,{GLOBAL:()=>ri,MathJax:()=>li,combineConfig:()=>oi,combineDefaults:()=>ai,combineWithMathJax:()=>ci,isObject:()=>ni});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{context:()=>di,hasWindow:()=>hi});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{Package:()=>pi,PackageError:()=>ui});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{PrioritizedList:()=>mi});var r={};__webpack_require__.r(r),__webpack_require__.d(r,{FunctionList:()=>fi});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{CONFIG:()=>vi,Loader:()=>yi,MathJax:()=>xi,PathFilters:()=>Ei});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{APPEND:()=>_i,Expandable:()=>Ai,OPTIONS:()=>ki,REMOVE:()=>wi,copy:()=>Si,defaultOptions:()=>Oi,expandable:()=>Mi,insert:()=>Ri,isObject:()=>Ti,keys:()=>Ii,lookup:()=>ji,makeArray:()=>Li,selectOptions:()=>Pi,selectOptionsFromKeys:()=>Bi,separateOptions:()=>Fi,userOptions:()=>Di});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{CONFIG:()=>Wi,MathJax:()=>Hi,Startup:()=>qi});var c={};__webpack_require__.r(c),__webpack_require__.d(c,{AbstractDOMAdaptor:()=>Xi});var l={};__webpack_require__.r(l),__webpack_require__.d(l,{HTMLAdaptor:()=>Gi});var h={};__webpack_require__.r(h),__webpack_require__.d(h,{browserAdaptor:()=>Ki});var d={};__webpack_require__.r(d),__webpack_require__.d(d,{AbstractFindMath:()=>$i});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{AbstractInputJax:()=>Yi});var p={};__webpack_require__.r(p),__webpack_require__.d(p,{AbstractOutputJax:()=>Qi});var m={};__webpack_require__.r(m),__webpack_require__.d(m,{END:()=>Zi,LinkedList:()=>er,ListItem:()=>tr});var f={};__webpack_require__.r(f),__webpack_require__.d(f,{AbstractMathList:()=>sr});var g={};__webpack_require__.r(g),__webpack_require__.d(g,{AbstractMathItem:()=>rr,STATE:()=>nr,newState:()=>or,protoItem:()=>ir});var b={};__webpack_require__.r(b),__webpack_require__.d(b,{AbstractFactory:()=>ar});var E={};__webpack_require__.r(E),__webpack_require__.d(E,{AbstractNodeFactory:()=>cr});var N={};__webpack_require__.r(N),__webpack_require__.d(N,{Attributes:()=>hr,INHERIT:()=>lr});var y={};__webpack_require__.r(y),__webpack_require__.d(y,{AbstractEmptyNode:()=>ur,AbstractNode:()=>dr});var x={};__webpack_require__.r(x),__webpack_require__.d(x,{AbstractMmlBaseNode:()=>vr,AbstractMmlEmptyNode:()=>Cr,AbstractMmlLayoutNode:()=>xr,AbstractMmlNode:()=>Nr,AbstractMmlTokenNode:()=>yr,MATHVARIANTS:()=>br,TEXCLASS:()=>pr,TEXCLASSNAMES:()=>mr,TextNode:()=>Tr,XMLNode:()=>_r,indentAttributes:()=>Er});var v={};__webpack_require__.r(v),__webpack_require__.d(v,{MmlMath:()=>wr});var C={};__webpack_require__.r(C),__webpack_require__.d(C,{MmlMi:()=>kr});var T={};__webpack_require__.r(T),__webpack_require__.d(T,{MmlMn:()=>Ar});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{MMLSPACING:()=>Rr,MO:()=>Lr,OPDEF:()=>Mr,OPTABLE:()=>Or,RANGES:()=>Ir,getRange:()=>Sr});var w={};__webpack_require__.r(w),__webpack_require__.d(w,{isPercent:()=>jr,quotePattern:()=>Pr,replaceUnicode:()=>qr,sortLength:()=>Dr,split:()=>Ur,toEntity:()=>Hr,unicodeChars:()=>Br,unicodeString:()=>Fr});var k={};__webpack_require__.r(k),__webpack_require__.d(k,{MmlMo:()=>Wr});var A={};__webpack_require__.r(A),__webpack_require__.d(A,{MmlMtext:()=>zr});var M={};__webpack_require__.r(M),__webpack_require__.d(M,{MmlMspace:()=>Xr});var L={};__webpack_require__.r(L),__webpack_require__.d(L,{MmlMs:()=>Vr});var I={};__webpack_require__.r(I),__webpack_require__.d(I,{MmlInferredMrow:()=>Jr,MmlMrow:()=>Gr});var S={};__webpack_require__.r(S),__webpack_require__.d(S,{MmlMfrac:()=>Kr});var R={};__webpack_require__.r(R),__webpack_require__.d(R,{MmlMsqrt:()=>$r});var O={};__webpack_require__.r(O),__webpack_require__.d(O,{MmlMroot:()=>Yr});var D={};__webpack_require__.r(D),__webpack_require__.d(D,{MmlMstyle:()=>Qr});var P={};__webpack_require__.r(P),__webpack_require__.d(P,{MmlMerror:()=>Zr});var B={};__webpack_require__.r(B),__webpack_require__.d(B,{MmlMpadded:()=>tn});var F={};__webpack_require__.r(F),__webpack_require__.d(F,{MmlMphantom:()=>en});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{MmlMfenced:()=>sn});var U={};__webpack_require__.r(U),__webpack_require__.d(U,{MmlMenclose:()=>rn});var q={};__webpack_require__.r(q),__webpack_require__.d(q,{MmlMaction:()=>nn});var H={};__webpack_require__.r(H),__webpack_require__.d(H,{MmlMsub:()=>an,MmlMsubsup:()=>on,MmlMsup:()=>cn});var W={};__webpack_require__.r(W),__webpack_require__.d(W,{MmlMover:()=>dn,MmlMunder:()=>hn,MmlMunderover:()=>ln});var z={};__webpack_require__.r(z),__webpack_require__.d(z,{MmlMmultiscripts:()=>un,MmlMprescripts:()=>pn,MmlNone:()=>mn});var X={};__webpack_require__.r(X),__webpack_require__.d(X,{MmlMtable:()=>fn});var V={};__webpack_require__.r(V),__webpack_require__.d(V,{MmlMlabeledtr:()=>bn,MmlMtr:()=>gn});var G={};__webpack_require__.r(G),__webpack_require__.d(G,{MmlMtd:()=>En});var J={};__webpack_require__.r(J),__webpack_require__.d(J,{MmlMaligngroup:()=>Nn});var K={};__webpack_require__.r(K),__webpack_require__.d(K,{MmlMalignmark:()=>yn});var $={};__webpack_require__.r($),__webpack_require__.d($,{MmlMglyph:()=>xn});var Y={};__webpack_require__.r(Y),__webpack_require__.d(Y,{MmlAnnotation:()=>Tn,MmlAnnotationXML:()=>Cn,MmlSemantics:()=>vn});var Q={};__webpack_require__.r(Q),__webpack_require__.d(Q,{TeXAtom:()=>_n});var Z={};__webpack_require__.r(Z),__webpack_require__.d(Z,{MathChoice:()=>wn});var tt={};__webpack_require__.r(tt),__webpack_require__.d(tt,{HtmlNode:()=>kn});var et={};__webpack_require__.r(et),__webpack_require__.d(et,{MML:()=>An});var st={};__webpack_require__.r(st),__webpack_require__.d(st,{MmlFactory:()=>Mn});var it={};__webpack_require__.r(it),__webpack_require__.d(it,{BitField:()=>Ln,BitFieldClass:()=>In});var rt={};__webpack_require__.r(rt),__webpack_require__.d(rt,{handleRetriesFor:()=>Sn,retryAfter:()=>Rn});var nt={};__webpack_require__.r(nt),__webpack_require__.d(nt,{AbstractMathDocument:()=>qn,RenderList:()=>Dn,resetAllOptions:()=>Bn,resetOptions:()=>Pn});var ot={};__webpack_require__.r(ot),__webpack_require__.d(ot,{AbstractHandler:()=>Wn});var at={};__webpack_require__.r(at),__webpack_require__.d(at,{HandlerList:()=>zn});var ct={};__webpack_require__.r(ct),__webpack_require__.d(ct,{AbstractVisitor:()=>Xn});var lt={};__webpack_require__.r(lt),__webpack_require__.d(lt,{DATAMJX:()=>Vn,MmlVisitor:()=>Gn});var ht={};__webpack_require__.r(ht),__webpack_require__.d(ht,{MathMLVisitor:()=>Jn});var dt={};__webpack_require__.r(dt),__webpack_require__.d(dt,{SerializedMmlVisitor:()=>Kn});var ut={};__webpack_require__.r(ut),__webpack_require__.d(ut,{AbstractWrapper:()=>$n});var pt={};__webpack_require__.r(pt),__webpack_require__.d(pt,{AbstractWrapperFactory:()=>Yn});var mt={};__webpack_require__.r(mt),__webpack_require__.d(mt,{mathjax:()=>Qn});var ft={};__webpack_require__.r(ft),__webpack_require__.d(ft,{HTMLMathItem:()=>Zn});var gt={};__webpack_require__.r(gt),__webpack_require__.d(gt,{HTMLMathList:()=>to});var bt={};__webpack_require__.r(bt),__webpack_require__.d(bt,{HTMLDomStrings:()=>eo});var Et={};__webpack_require__.r(Et),__webpack_require__.d(Et,{HTMLDocument:()=>so});var Nt={};__webpack_require__.r(Nt),__webpack_require__.d(Nt,{HTMLHandler:()=>io});var yt={};__webpack_require__.r(yt),__webpack_require__.d(yt,{RegisterHTMLHandler:()=>ro});var xt={};__webpack_require__.r(xt),__webpack_require__.d(xt,{asyncLoad:()=>no});var vt={};__webpack_require__.r(vt),__webpack_require__.d(vt,{BIGDIMEN:()=>oo,MATHSPACE:()=>lo,RELUNITS:()=>co,UNITS:()=>ao,em:()=>po,length2em:()=>ho,percent:()=>uo,px:()=>mo});var Ct={};__webpack_require__.r(Ct),__webpack_require__.d(Ct,{BBox:()=>fo});var Tt={};__webpack_require__.r(Tt),__webpack_require__.d(Tt,{add:()=>No,entities:()=>bo,numeric:()=>Co,options:()=>go,remove:()=>yo,translate:()=>xo});var _t={};__webpack_require__.r(_t),__webpack_require__.d(_t,{StyleJsonSheet:()=>To});var wt={};__webpack_require__.r(wt),__webpack_require__.d(wt,{Styles:()=>Do,TRBL:()=>_o,WSC:()=>wo});var kt={};__webpack_require__.r(kt),__webpack_require__.d(kt,{max:()=>Bo,sum:()=>Po});var At={};__webpack_require__.r(At),__webpack_require__.d(At,{FindTeX:()=>Fo});var Mt={};__webpack_require__.r(Mt),__webpack_require__.d(Mt,{default:()=>Uo});var Lt={};__webpack_require__.r(Lt),__webpack_require__.d(Lt,{default:()=>Vo});var It={};__webpack_require__.r(It),__webpack_require__.d(It,{ConfigurationType:()=>Go,HandlerType:()=>Jo});var St={};__webpack_require__.r(St),__webpack_require__.d(St,{UnitUtil:()=>$o});var Rt={};__webpack_require__.r(Rt),__webpack_require__.d(Rt,{default:()=>Yo});var Ot={};__webpack_require__.r(Ot),__webpack_require__.d(Ot,{default:()=>Zo});var Dt={};__webpack_require__.r(Dt),__webpack_require__.d(Dt,{BaseItem:()=>ea,MmlStack:()=>ta});var Pt={};__webpack_require__.r(Pt),__webpack_require__.d(Pt,{TexConstant:()=>sa});var Bt={};__webpack_require__.r(Bt),__webpack_require__.d(Bt,{default:()=>ia});var Ft={};__webpack_require__.r(Ft),__webpack_require__.d(Ft,{default:()=>oa});var jt={};__webpack_require__.r(jt),__webpack_require__.d(jt,{NodeFactory:()=>aa});var Ut={};__webpack_require__.r(Ut),__webpack_require__.d(Ut,{KeyValueDef:()=>ca,KeyValueTypes:()=>la,ParseUtil:()=>ua});var qt={};__webpack_require__.r(qt),__webpack_require__.d(qt,{ColumnParser:()=>pa});var Ht={};__webpack_require__.r(Ht),__webpack_require__.d(Ht,{default:()=>ga});var Wt={};__webpack_require__.r(Wt),__webpack_require__.d(Wt,{AbstractTags:()=>Na,AllTags:()=>xa,Label:()=>ba,NoTags:()=>ya,TagInfo:()=>Ea,TagsFactory:()=>Ta});var zt={};__webpack_require__.r(zt),__webpack_require__.d(zt,{Macro:()=>wa,Token:()=>_a});var Xt={};__webpack_require__.r(Xt),__webpack_require__.d(Xt,{AbstractParseMap:()=>La,AbstractTokenMap:()=>Aa,CharacterMap:()=>Ia,CommandMap:()=>Oa,DelimiterMap:()=>Sa,EnvironmentMap:()=>Da,MacroMap:()=>Ra,RegExpMap:()=>Ma,parseResult:()=>ka});var Vt={};__webpack_require__.r(Vt),__webpack_require__.d(Vt,{MapHandler:()=>Ba,SubHandler:()=>Fa,SubHandlers:()=>ja});var Gt={};__webpack_require__.r(Gt),__webpack_require__.d(Gt,{Configuration:()=>Ua,ConfigurationHandler:()=>Ha,ParserConfiguration:()=>Wa});var Jt={};__webpack_require__.r(Jt),__webpack_require__.d(Jt,{ArrayItem:()=>uc,BeginItem:()=>sc,BreakItem:()=>ec,CellItem:()=>oc,CloseItem:()=>Ga,DotsItem:()=>dc,EndItem:()=>ic,EqnArrayItem:()=>pc,EquationItem:()=>fc,FnItem:()=>cc,LeftItem:()=>Qa,Middle:()=>Za,MmlItem:()=>ac,MstyleItem:()=>mc,NonscriptItem:()=>hc,NotItem:()=>lc,NullItem:()=>Ja,OpenItem:()=>Va,OverItem:()=>Ya,PositionItem:()=>nc,PrimeItem:()=>Ka,RightItem:()=>tc,StartItem:()=>za,StopItem:()=>Xa,StyleItem:()=>rc,SubsupItem:()=>$a});var Kt={};__webpack_require__.r(Kt),__webpack_require__.d(Kt,{default:()=>vc,splitAlignArray:()=>Nc});var $t={};__webpack_require__.r($t),__webpack_require__.d($t,{default:()=>_c});var Yt={};__webpack_require__.r(Yt),__webpack_require__.d(Yt,{BaseConfiguration:()=>Ic,BaseTags:()=>Lc,Other:()=>Mc});var Qt={};__webpack_require__.r(Qt),__webpack_require__.d(Qt,{TeX:()=>Sc});var Zt={};__webpack_require__.r(Zt),__webpack_require__.d(Zt,{FlalignItem:()=>Oc,MultlineItem:()=>Rc});var te={};__webpack_require__.r(te),__webpack_require__.d(te,{NewcommandPriority:()=>Pc,NewcommandTables:()=>Dc,NewcommandUtil:()=>Bc});var ee={};__webpack_require__.r(ee),__webpack_require__.d(ee,{AmsMethods:()=>Uc});var se={};__webpack_require__.r(se),__webpack_require__.d(se,{BeginEnvItem:()=>qc});var ie={};__webpack_require__.r(ie),__webpack_require__.d(ie,{default:()=>Wc});var re={};__webpack_require__.r(re),__webpack_require__.d(re,{NewcommandConfig:()=>zc,NewcommandConfiguration:()=>Xc});var ne={};__webpack_require__.r(ne),__webpack_require__.d(ne,{AmsConfiguration:()=>Gc,AmsTags:()=>Vc});var oe={};__webpack_require__.r(oe),__webpack_require__.d(oe,{RequireConfiguration:()=>tl,RequireLoad:()=>Yc,RequireMethods:()=>Qc,options:()=>Zc});var ae={};__webpack_require__.r(ae),__webpack_require__.d(ae,{AutoloadConfiguration:()=>rl});var ce={};__webpack_require__.r(ce),__webpack_require__.d(ce,{ConfigMacrosConfiguration:()=>ll});var le={};__webpack_require__.r(le),__webpack_require__.d(le,{NoUndefinedConfiguration:()=>hl});var he={};__webpack_require__.r(he),__webpack_require__.d(he,{TextParser:()=>dl});var de={};__webpack_require__.r(de),__webpack_require__.d(de,{TextMacrosMethods:()=>ul});var ue={};__webpack_require__.r(ue),__webpack_require__.d(ue,{TextBaseConfiguration:()=>ml,TextMacrosConfiguration:()=>gl});var pe={};__webpack_require__.r(pe),__webpack_require__.d(pe,{FindMathML:()=>El});var me={};__webpack_require__.r(me),__webpack_require__.d(me,{MathMLCompile:()=>Nl});var fe={};__webpack_require__.r(fe),__webpack_require__.d(fe,{MathML:()=>yl});var ge={};__webpack_require__.r(ge),__webpack_require__.d(ge,{DIRECTION:()=>xl,H:()=>Cl,V:()=>vl});var be={};__webpack_require__.r(be),__webpack_require__.d(be,{DIRECTION:()=>xl,FontData:()=>kl,NOSTRETCH:()=>_l,mergeOptions:()=>wl});var Ee={};__webpack_require__.r(Ee),__webpack_require__.d(Ee,{LineBBox:()=>Al});var Ne={};__webpack_require__.r(Ne),__webpack_require__.d(Ne,{LinebreakVisitor:()=>Il,Linebreaks:()=>Ll,NOBREAK:()=>Ml});var ye={};__webpack_require__.r(ye),__webpack_require__.d(ye,{CommonOutputJax:()=>Rl,FONTPATH:()=>Sl});var xe={};__webpack_require__.r(xe),__webpack_require__.d(xe,{CommonWrapperFactory:()=>Ol});var ve={};__webpack_require__.r(ve),__webpack_require__.d(ve,{CommonWrapper:()=>jl,SPACE:()=>Fl});var Ce={};__webpack_require__.r(Ce),__webpack_require__.d(Ce,{ChtmlWrapper:()=>ql,FONTSIZE:()=>Ul});var Te={};__webpack_require__.r(Te),__webpack_require__.d(Te,{CommonMathMixin:()=>Hl});var _e={};__webpack_require__.r(_e),__webpack_require__.d(_e,{ChtmlMath:()=>Wl});var we={};__webpack_require__.r(we),__webpack_require__.d(we,{CommonMiMixin:()=>zl});var ke={};__webpack_require__.r(ke),__webpack_require__.d(ke,{ChtmlMi:()=>Xl});var Ae={};__webpack_require__.r(Ae),__webpack_require__.d(Ae,{CommonMoMixin:()=>Vl});var Me={};__webpack_require__.r(Me),__webpack_require__.d(Me,{Usage:()=>Gl});var Le={};__webpack_require__.r(Le),__webpack_require__.d(Le,{AddCSS:()=>Kl,ChtmlFontData:()=>Jl,DIRECTION:()=>xl,FontData:()=>kl,NOSTRETCH:()=>_l,mergeOptions:()=>wl});var Ie={};__webpack_require__.r(Ie),__webpack_require__.d(Ie,{ChtmlMo:()=>$l});var Se={};__webpack_require__.r(Se),__webpack_require__.d(Se,{CommonMnMixin:()=>Yl});var Re={};__webpack_require__.r(Re),__webpack_require__.d(Re,{ChtmlMn:()=>Ql});var Oe={};__webpack_require__.r(Oe),__webpack_require__.d(Oe,{CommonMsMixin:()=>Zl});var De={};__webpack_require__.r(De),__webpack_require__.d(De,{ChtmlMs:()=>th});var Pe={};__webpack_require__.r(Pe),__webpack_require__.d(Pe,{CommonMtextMixin:()=>eh});var Be={};__webpack_require__.r(Be),__webpack_require__.d(Be,{ChtmlMtext:()=>sh});var Fe={};__webpack_require__.r(Fe),__webpack_require__.d(Fe,{CommonMspaceMixin:()=>ih});var je={};__webpack_require__.r(je),__webpack_require__.d(je,{ChtmlMspace:()=>rh});var Ue={};__webpack_require__.r(Ue),__webpack_require__.d(Ue,{CommonMpaddedMixin:()=>nh});var qe={};__webpack_require__.r(qe),__webpack_require__.d(qe,{ChtmlMpadded:()=>oh});var He={};__webpack_require__.r(He),__webpack_require__.d(He,{ARROWDX:()=>ch,ARROWX:()=>ah,ARROWY:()=>lh,CommonArrow:()=>Ah,CommonBorder:()=>Th,CommonBorder2:()=>_h,CommonDiagonalArrow:()=>kh,CommonDiagonalStrike:()=>wh,PADDING:()=>dh,SOLID:()=>uh,THICKNESS:()=>hh,arrowBBox:()=>Ch,arrowBBoxHD:()=>Nh,arrowBBoxW:()=>yh,arrowDef:()=>xh,arrowHead:()=>Eh,diagonalArrowDef:()=>vh,fullBBox:()=>fh,fullBorder:()=>bh,fullPadding:()=>gh,sideIndex:()=>ph,sideNames:()=>mh});var We={};__webpack_require__.r(We),__webpack_require__.d(We,{CommonMencloseMixin:()=>Mh});var ze={};__webpack_require__.r(ze),__webpack_require__.d(ze,{ARROWDX:()=>ch,ARROWX:()=>ah,ARROWY:()=>lh,Arrow:()=>Dh,Border:()=>Ih,Border2:()=>Sh,CommonArrow:()=>Ah,CommonBorder:()=>Th,CommonBorder2:()=>_h,CommonDiagonalArrow:()=>kh,CommonDiagonalStrike:()=>wh,DiagonalArrow:()=>Oh,DiagonalStrike:()=>Rh,PADDING:()=>dh,RenderElement:()=>Lh,SOLID:()=>uh,THICKNESS:()=>hh,arrowBBox:()=>Ch,arrowBBoxHD:()=>Nh,arrowBBoxW:()=>yh,arrowDef:()=>xh,arrowHead:()=>Eh,diagonalArrowDef:()=>vh,fullBBox:()=>fh,fullBorder:()=>bh,fullPadding:()=>gh,sideIndex:()=>ph,sideNames:()=>mh});var Xe={};__webpack_require__.r(Xe),__webpack_require__.d(Xe,{ChtmlMenclose:()=>Fh});var Ve={};__webpack_require__.r(Ve),__webpack_require__.d(Ve,{CommonInferredMrowMixin:()=>Uh,CommonMrowMixin:()=>jh});var Ge={};__webpack_require__.r(Ge),__webpack_require__.d(Ge,{ChtmlInferredMrow:()=>Hh,ChtmlMrow:()=>qh});var Je={};__webpack_require__.r(Je),__webpack_require__.d(Je,{CommonMfencedMixin:()=>Wh});var Ke={};__webpack_require__.r(Ke),__webpack_require__.d(Ke,{ChtmlMfenced:()=>zh});var $e={};__webpack_require__.r($e),__webpack_require__.d($e,{CommonMfracMixin:()=>Xh});var Ye={};__webpack_require__.r(Ye),__webpack_require__.d(Ye,{ChtmlMfrac:()=>Vh});var Qe={};__webpack_require__.r(Qe),__webpack_require__.d(Qe,{CommonMsqrtMixin:()=>Gh});var Ze={};__webpack_require__.r(Ze),__webpack_require__.d(Ze,{ChtmlMsqrt:()=>Jh});var ts={};__webpack_require__.r(ts),__webpack_require__.d(ts,{CommonMrootMixin:()=>Kh});var es={};__webpack_require__.r(es),__webpack_require__.d(es,{ChtmlMroot:()=>$h});var ss={};__webpack_require__.r(ss),__webpack_require__.d(ss,{CommonMsubMixin:()=>Yh,CommonMsubsupMixin:()=>Zh,CommonMsupMixin:()=>Qh});var is={};__webpack_require__.r(is),__webpack_require__.d(is,{CommonScriptbaseMixin:()=>td});var rs={};__webpack_require__.r(rs),__webpack_require__.d(rs,{ChtmlScriptbase:()=>ed});var ns={};__webpack_require__.r(ns),__webpack_require__.d(ns,{ChtmlMsub:()=>sd,ChtmlMsubsup:()=>rd,ChtmlMsup:()=>id});var os={};__webpack_require__.r(os),__webpack_require__.d(os,{CommonMoverMixin:()=>od,CommonMunderMixin:()=>nd,CommonMunderoverMixin:()=>ad});var as={};__webpack_require__.r(as),__webpack_require__.d(as,{ChtmlMover:()=>ld,ChtmlMunder:()=>cd,ChtmlMunderover:()=>hd});var cs={};__webpack_require__.r(cs),__webpack_require__.d(cs,{CommonMmultiscriptsMixin:()=>pd,NextScript:()=>dd,ScriptNames:()=>ud});var ls={};__webpack_require__.r(ls),__webpack_require__.d(ls,{ChtmlMmultiscripts:()=>md});var hs={};__webpack_require__.r(hs),__webpack_require__.d(hs,{BREAK_BELOW:()=>fd,CommonMtableMixin:()=>gd});var ds={};__webpack_require__.r(ds),__webpack_require__.d(ds,{ChtmlMtable:()=>bd});var us={};__webpack_require__.r(us),__webpack_require__.d(us,{CommonMlabeledtrMixin:()=>Nd,CommonMtrMixin:()=>Ed});var ps={};__webpack_require__.r(ps),__webpack_require__.d(ps,{ChtmlMlabeledtr:()=>xd,ChtmlMtr:()=>yd});var ms={};__webpack_require__.r(ms),__webpack_require__.d(ms,{CommonMtdMixin:()=>vd});var fs={};__webpack_require__.r(fs),__webpack_require__.d(fs,{ChtmlMtd:()=>Cd});var gs={};__webpack_require__.r(gs),__webpack_require__.d(gs,{CommonMactionMixin:()=>_d,TooltipData:()=>Td});var bs={};__webpack_require__.r(bs),__webpack_require__.d(bs,{ChtmlMaction:()=>wd});var Es={};__webpack_require__.r(Es),__webpack_require__.d(Es,{CommonMglyphMixin:()=>kd});var Ns={};__webpack_require__.r(Ns),__webpack_require__.d(Ns,{ChtmlMglyph:()=>Ad});var ys={};__webpack_require__.r(ys),__webpack_require__.d(ys,{CommonSemanticsMixin:()=>Md});var xs={};__webpack_require__.r(xs),__webpack_require__.d(xs,{CommonXmlNodeMixin:()=>Ld});var vs={};__webpack_require__.r(vs),__webpack_require__.d(vs,{ChtmlAnnotation:()=>Sd,ChtmlAnnotationXML:()=>Od,ChtmlSemantics:()=>Id,ChtmlXmlNode:()=>Dd});var Cs={};__webpack_require__.r(Cs),__webpack_require__.d(Cs,{CommonTeXAtomMixin:()=>Pd});var Ts={};__webpack_require__.r(Ts),__webpack_require__.d(Ts,{ChtmlTeXAtom:()=>Bd});var _s={};__webpack_require__.r(_s),__webpack_require__.d(_s,{CommonTextNodeMixin:()=>Fd});var ws={};__webpack_require__.r(ws),__webpack_require__.d(ws,{ChtmlTextNode:()=>jd});var ks={};__webpack_require__.r(ks),__webpack_require__.d(ks,{ChtmlHtmlNode:()=>Ud});var As={};__webpack_require__.r(As),__webpack_require__.d(As,{ChtmlWrappers:()=>qd});var Ms={};__webpack_require__.r(Ms),__webpack_require__.d(Ms,{ChtmlWrapperFactory:()=>Hd});var Ls={};__webpack_require__.r(Ls),__webpack_require__.d(Ls,{MathJaxNewcmFont:()=>Xd});var Is={};__webpack_require__.r(Is),__webpack_require__.d(Is,{DefaultFont:()=>Jd,fontName:()=>Gd});var Ss={};__webpack_require__.r(Ss),__webpack_require__.d(Ss,{CHTML:()=>Kd});var Rs={};__webpack_require__.r(Rs),__webpack_require__.d(Rs,{AddFontIds:()=>$d});var Os={};__webpack_require__.r(Os),__webpack_require__.d(Os,{MJContextMenu:()=>Zu});var Ds={};__webpack_require__.r(Ds),__webpack_require__.d(Ds,{addPreference:()=>ab,engineSetup:()=>rb,fromPreference:()=>cb,locales:()=>sb,parseDOM:()=>ob,setupEngine:()=>ib,toEnriched:()=>nb,toPreference:()=>lb});var Ps={};__webpack_require__.r(Ps),__webpack_require__.d(Ps,{clearspeakMenu:()=>Eb,localeMenu:()=>yb});var Bs={};__webpack_require__.r(Bs),__webpack_require__.d(Bs,{copyToClipboard:()=>vb,isMac:()=>xb});var Fs={};__webpack_require__.r(Fs),__webpack_require__.d(Fs,{annotation:()=>wb,copyAnnotations:()=>Tb,showAnnotations:()=>Cb});var js={};__webpack_require__.r(js),__webpack_require__.d(js,{RadioCompare:()=>Ab});var Us={};__webpack_require__.r(Us),__webpack_require__.d(Us,{MmlVisitor:()=>Mb});var qs={};__webpack_require__.r(qs),__webpack_require__.d(qs,{SelectableInfo:()=>Lb});var Hs={};__webpack_require__.r(Hs),__webpack_require__.d(Hs,{Menu:()=>Rb});var Ws={};__webpack_require__.r(Ws),__webpack_require__.d(Ws,{MenuHandler:()=>Pb,MenuMathDocumentMixin:()=>Db,MenuMathItemMixin:()=>Ob});var zs={};__webpack_require__.r(zs),__webpack_require__.d(zs,{EnrichHandler:()=>Ub,EnrichedMathDocumentMixin:()=>jb,EnrichedMathItemMixin:()=>Fb,enrichVisitor:()=>Bb});var Xs={};__webpack_require__.r(Xs),__webpack_require__.d(Xs,{InPlace:()=>Yb,SemAttr:()=>Qb,buildLabel:()=>Jb,buildSpeech:()=>Kb,honk:()=>$b,ssmlParsing:()=>Hb});var Vs={};__webpack_require__.r(Vs),__webpack_require__.d(Vs,{GeneratorPool:()=>Zb});var Gs={};__webpack_require__.r(Gs),__webpack_require__.d(Gs,{WorkerHandler:()=>sE});var Js={};__webpack_require__.r(Js),__webpack_require__.d(Js,{SpeechHandler:()=>cE,SpeechMathDocumentMixin:()=>aE,SpeechMathItemMixin:()=>oE});var Ks={};__webpack_require__.r(Ks),__webpack_require__.d(Ks,{getHighlighter:()=>gE});var $s={};__webpack_require__.r($s),__webpack_require__.d($s,{AbstractRegion:()=>EE,DummyRegion:()=>NE,HoverRegion:()=>TE,LiveRegion:()=>vE,SpeechRegion:()=>CE,StringRegion:()=>yE,ToolTip:()=>xE});var Ys={};__webpack_require__.r(Ys),__webpack_require__.d(Ys,{AbstractExplorer:()=>_E});var Qs={};__webpack_require__.r(Qs),__webpack_require__.d(Qs,{SpeechExplorer:()=>IE,hasModifiers:()=>ME,isContainer:()=>AE});var Zs={};__webpack_require__.r(Zs),__webpack_require__.d(Zs,{AbstractMouseExplorer:()=>SE,ContentHoverer:()=>DE,FlameHoverer:()=>PE,Hoverer:()=>RE,ValueHoverer:()=>OE});var ti={};__webpack_require__.r(ti),__webpack_require__.d(ti,{AbstractTreeExplorer:()=>BE,ContrastPicker:()=>UE,FlameColorer:()=>FE,TreeColorer:()=>jE});var ei={};__webpack_require__.r(ei),__webpack_require__.d(ei,{ExplorerPool:()=>WE,RegionPool:()=>qE});var si={};__webpack_require__.r(si),__webpack_require__.d(si,{ExplorerHandler:()=>GE,ExplorerMathDocumentMixin:()=>VE,ExplorerMathItemMixin:()=>XE,setA11yOption:()=>KE,setA11yOptions:()=>JE});const ii="4.0.0",ri="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:{};function ni(t){return"object"==typeof t&&null!==t}function oi(t,e,s=!1){var i;for(const r of Object.keys(e))"__esModule"!==r&&t[r]!==e[r]&&null!==e[r]&&void 0!==e[r]&&(ni(t[r])&&ni(e[r])?oi(t[r],e[r],s||"_"===r):s&&(null===(i=Object.getOwnPropertyDescriptor(t,r))||void 0===i?void 0:i.get)||(t[r]=e[r]));return t}function ai(t,e,s){t[e]||(t[e]={}),t=t[e];for(const e of Object.keys(s))ni(t[e])&&ni(s[e])?ai(t,e,s[e]):null==t[e]&&null!=s[e]&&(t[e]=s[e]);return t}function ci(t){return oi(li,t)}void 0!==ri.MathJax&&ri.MathJax.constructor==={}.constructor||(ri.MathJax={}),ri.MathJax.version||(ri.MathJax={version:ii,_:{},config:ri.MathJax});const li=ri.MathJax,hi="undefined"!=typeof window,di={window:hi?window:null,document:hi?window.document:null,os:(()=>{if(hi&&window.navigator){const t=window.navigator.appVersion,e=[["Win","Windows"],["Mac","MacOS"],["X11","Unix"],["Linux","Unix"]];for(const[s,i]of e)if(t.includes(s))return i;if(window.navigator.userAgent.includes("Android"))return"Unix"}return"unknown"})()};class ui extends Error{constructor(t,e){super(t),this.package=e}}class pi{get canLoad(){return 0===this.dependencyCount&&!this.noLoad&&!this.isLoading&&!this.hasFailed}static loadPromise(t){const e=vi[t]||{},s=e.extraLoads?yi.load(...e.extraLoads):Promise.resolve(),i=e.checkReady||(()=>Promise.resolve());return s.then((()=>i()))}static resolvePath(t,e=!0){const s={name:t,original:t,addExtension:e};return yi.pathFilters.execute(s),s.name}static loadAll(){for(const t of this.packages.values())t.canLoad&&t.load()}constructor(t,e=!1){this.isLoaded=!1,this.result={},this.isLoading=!1,this.hasFailed=!1,this.dependents=[],this.dependencies=[],this.dependencyCount=0,this.provided=[],this.name=t,this.noLoad=e,pi.packages.set(t,this),this.promise=this.makePromise(this.makeDependencies())}makeDependencies(){const t=[],e=pi.packages,s=this.noLoad,i=this.name,r=[];Object.hasOwn(vi.dependencies,i)?r.push(...vi.dependencies[i]):"core"!==i&&r.push("core");for(const i of r){const r=e.get(i)||new pi(i,s);this.dependencies.includes(r)||(r.addDependent(this,s),this.dependencies.push(r),r.isLoaded||(this.dependencyCount++,t.push(r.promise)))}return t}makePromise(t){let e=new Promise(((t,e)=>{this.resolve=t,this.reject=e}));const s=vi[this.name]||{};return s.ready&&(e=e.then((t=>s.ready(this.name)))),t.length&&(t.push(e),e=Promise.all(t).then((t=>t.join(", ")))),s.failed&&e.catch((t=>s.failed(new ui(t,this.name)))),e}load(){if(!this.isLoaded&&!this.isLoading&&!this.noLoad){this.isLoading=!0;const t=pi.resolvePath(this.name);vi.require?this.loadCustom(t):this.loadScript(t)}}loadCustom(t){try{const e=vi.require(t);e instanceof Promise?e.then((t=>this.result=t)).then((()=>this.checkLoad())).catch((e=>this.failed("Can't load \""+t+'"\n'+e.message.trim()))):(this.result=e,this.checkLoad())}catch(t){this.failed(t.message)}}loadScript(t){const e=di.document.createElement("script");e.src=t,e.charset="UTF-8",e.onload=t=>this.checkLoad(),e.onerror=e=>this.failed("Can't load \""+t+'"'),di.document.head.appendChild(e)}loaded(){this.isLoaded=!0,this.isLoading=!1;for(const t of this.dependents)t.requirementSatisfied();for(const t of this.provided)t.loaded();this.resolve(this.name)}failed(t){this.hasFailed=!0,this.isLoading=!1,this.reject(new ui(t,this.name))}checkLoad(){pi.loadPromise(this.name).then((()=>this.loaded())).catch((t=>this.failed(t)))}requirementSatisfied(){this.dependencyCount&&(this.dependencyCount--,this.canLoad&&this.load())}provides(t=[]){for(const e of t){let t=pi.packages.get(e);t||(vi.dependencies[e]||(vi.dependencies[e]=[]),vi.dependencies[e].push(e),t=new pi(e,!0),t.isLoading=!0),this.provided.push(t)}}addDependent(t,e){this.dependents.push(t),e||this.checkNoLoad()}checkNoLoad(){if(this.noLoad){this.noLoad=!1;for(const t of this.dependencies)t.checkNoLoad()}}}pi.packages=new Map;class mi{constructor(){this.items=[],this.items=[]}[Symbol.iterator](){let t=0;const e=this.items;return{next:()=>({value:e[t++],done:t>e.length})}}add(t,e=mi.DEFAULTPRIORITY){let s=this.items.length;do{s--}while(s>=0&&e=0&&this.items[e].item!==t);return e>=0&&this.items.splice(e,1),this}}mi.DEFAULTPRIORITY=5;class fi extends mi{constructor(t=null){super(),t&&this.addList(t)}addList(t){for(const e of t)Array.isArray(e)?this.add(e[0],e[1]):this.add(e)}execute(...t){for(const e of this){if(!1===e.item(...t))return!1}return!0}asyncExecute(...t){let e=-1;const s=this.items;return new Promise(((i,r)=>{!function n(){for(;++er(t)));if(!1===o)return void i(!1)}i(!0)}()}))}}const gi=li.config||{};var bi=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};const Ei={source:t=>(Object.hasOwn(vi.source,t.name)&&(t.name=vi.source[t.name]),!0),normalize:t=>{const e=t.name;return e.match(/^(?:[a-z]+:\/)?\/|[a-z]:\\|\[/i)||(t.name="[mathjax]/"+e.replace(/^\.\//,"")),!0},prefix:t=>{let e;for(;(e=t.name.match(/^\[([^\]]*)\]/))&&Object.hasOwn(vi.paths,e[1]);)t.name=vi.paths[e[1]]+t.name.substring(e[0].length);return!0},addExtension:t=>(t.addExtension&&!t.name.match(/\.[^/]+$/)&&(t.name+=".js"),!0)},Ni=li.version,yi={versions:new Map,nestedLoads:[],ready(...t){0===t.length&&(t=Array.from(pi.packages.keys()));const e=[];for(const s of t){const t=pi.packages.get(s)||new pi(s,!0);e.push(t.promise)}return Promise.all(e)},load(...t){if(0===t.length)return Promise.resolve([]);let e=[];this.nestedLoads.unshift(e);const s=Promise.resolve().then((()=>bi(this,void 0,void 0,(function*(){const s=[];for(const e of t){let t=pi.packages.get(e);t||(t=new pi(e),t.provides(vi.provides[e])),t.checkNoLoad(),s.push(t.promise.then((()=>(vi.versionWarnings&&t.isLoaded&&!yi.versions.has(pi.resolvePath(e))&&console.warn(`No version information available for component ${e}`),t.result))))}pi.loadAll();const i=yield Promise.all(s);for(;e.length;){const t=Promise.all(e);e=this.nestedLoads[this.nestedLoads.indexOf(e)]=[],yield t}return this.nestedLoads.splice(this.nestedLoads.indexOf(e),1),i}))));return this.nestedLoads.slice(1).forEach((t=>t.push(s))),s},preLoaded(...t){for(const e of t){let t=pi.packages.get(e);t||(t=new pi(e,!0),t.provides(vi.provides[e])),t.loaded()}},addPackageData(t,e){let s=vi[t];s||(s=vi[t]={});for(const[t,i]of Object.entries(e))if(Array.isArray(i)){s[t]||(s[t]=[]);const e=new Set([...s[t],...i]);s[t]=[...e]}else s[t]=i},defaultReady(){void 0!==xi.startup&&xi.config.startup.ready()},getRoot(){if(di.document){const t=di.document.currentScript||di.document.getElementById("MathJax-script");if(t&&t instanceof HTMLScriptElement)return t.src.replace(/\/[^/]*$/,"")}return gi?.loader?.paths?.mathjax||gi?.__dirname||"/"},checkVersion(t,e,s){return this.saveVersion(t),!(!vi.versionWarnings||e===Ni)&&(console.warn(`Component ${t} uses ${e} of MathJax; version in use is ${Ni}`),!0)},saveVersion(t){yi.versions.set(pi.resolvePath(t),Ni)},pathFilters:new fi};yi.pathFilters.add(Ei.source,0),yi.pathFilters.add(Ei.normalize,10),yi.pathFilters.add(Ei.prefix,20),yi.pathFilters.add(Ei.addExtension,30);const xi=li;if(void 0===xi.loader){ai(xi.config,"loader",{paths:{mathjax:yi.getRoot()},source:{},dependencies:{},provides:{},load:[],ready:yi.defaultReady.bind(yi),failed:t=>console.log(`MathJax(${t.package||"?"}): ${t.message}`),require:null,pathFilters:[],versionWarnings:!0}),ci({loader:yi});for(const t of xi.config.loader.pathFilters)Array.isArray(t)?yi.pathFilters.add(t[0],t[1]):yi.pathFilters.add(t)}const vi=xi.config.loader,Ci={}.constructor;function Ti(t){return"object"==typeof t&&null!==t&&(t.constructor===Ci||t.constructor===Ai)}const _i="[+]",wi="[-]",ki={invalidOption:"warn",optionError:(t,e)=>{if("fatal"===ki.invalidOption)throw new Error(t);console.warn("MathJax: "+t)}};class Ai{}function Mi(t){return Object.assign(Object.create(Ai.prototype),t)}function Li(t){return Array.isArray(t)?t:[t]}function Ii(t){return t?Object.keys(t).concat(Object.getOwnPropertySymbols(t)):[]}function Si(t){const e={};for(const s of Ii(t)){const i=Object.getOwnPropertyDescriptor(t,s),r=i.value;Array.isArray(r)?i.value=Ri([],r,!1):Ti(r)&&(i.value=Si(r)),i.enumerable&&(e[s]=i)}return Object.defineProperties(t.constructor===Ai?Mi({}):{},e)}function Ri(t,e,s=!0){for(let i of Ii(e)){if(s&&void 0===t[i]&&t.constructor!==Ai){"symbol"==typeof i&&(i=i.toString()),ki.optionError(`Invalid option "${i}" (no default value).`,i);continue}const r=e[i];let n=t[i];if(!Ti(r)||null===n||"object"!=typeof n&&"function"!=typeof n)Array.isArray(r)?(t[i]=[],Ri(t[i],r,!1)):Ti(r)?t[i]=Si(r):t[i]=r;else{const e=Ii(r);Array.isArray(n)&&(1===e.length&&(e[0]===_i||e[0]===wi)&&Array.isArray(r[e[0]])||2===e.length&&e.sort().join(",")===_i+","+wi&&Array.isArray(r[_i])&&Array.isArray(r[wi]))?(r[wi]&&(n=t[i]=n.filter((t=>r[wi].indexOf(t)<0))),r[_i]&&(t[i]=[...n,...r[_i]])):Ri(n,r,s)}}return t}function Oi(t,...e){return e.forEach((e=>Ri(t,e,!1))),t}function Di(t,...e){return e.forEach((e=>Ri(t,e,!0))),t}function Pi(t,...e){const s={};for(const i of e)Object.hasOwn(t,i)&&(s[i]=t[i]);return s}function Bi(t,e){return Pi(t,...Object.keys(e))}function Fi(t,...e){const s=[];for(const i of e){const e={},r={};for(const s of Object.keys(t||{}))(void 0===i[s]?r:e)[s]=t[s];s.push(e),t=r}return s.unshift(t),s}function ji(t,e,s=null){return Object.hasOwn(e,t)?e[t]:s}var Ui=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};class qi{static toMML(t){return qi.visitor.visitTree(t,this.document)}static registerConstructor(t,e){qi.constructors[t]=e}static useHandler(t,e=!1){Wi.handler&&!e||(Wi.handler=t)}static useAdaptor(t,e=!1){Wi.adaptor&&!e||(Wi.adaptor=t)}static useInput(t,e=!1){zi&&!e||Wi.input.push(t)}static useOutput(t,e=!1){Wi.output&&!e||(Wi.output=t)}static extendHandler(t,e=10){qi.extensions.add(t,e)}static defaultReady(){qi.getComponents(),qi.makeMethods(),qi.pagePromise.then((()=>Wi.pageReady())).then((()=>qi.promiseResolve())).catch((t=>qi.promiseReject(t)))}static defaultPageReady(){return(Wi.loadAllFontFiles&&qi.output.font?qi.output.font.loadDynamicFiles():Promise.resolve()).then((()=>{var t;return null===(t=qi.document.menu)||void 0===t?void 0:t.loadingPromise})).then(Wi.typeset&&Hi.typesetPromise?()=>qi.typesetPromise(Wi.elements):Promise.resolve()).then((()=>qi.promiseResolve()))}static typesetPromise(t){return this.hasTypeset=!0,qi.document.whenReady((()=>Ui(this,void 0,void 0,(function*(){qi.document.options.elements=t,qi.document.reset(),yield qi.document.renderPromise()}))))}static getComponents(){qi.visitor=new Hi._.core.MmlTree.SerializedMmlVisitor.SerializedMmlVisitor,qi.mathjax=Hi._.mathjax.mathjax,qi.input=qi.getInputJax(),qi.output=qi.getOutputJax(),qi.adaptor=qi.getAdaptor(),qi.handler&&qi.mathjax.handlers.unregister(qi.handler),qi.handler=qi.getHandler(),qi.handler&&(qi.mathjax.handlers.register(qi.handler),qi.document=qi.getDocument())}static makeMethods(){qi.input&&qi.output&&qi.makeTypesetMethods();const t=qi.output?qi.output.name.toLowerCase():"";for(const e of qi.input){const s=e.name.toLowerCase();qi.makeMmlMethods(s,e),qi.makeResetMethod(s,e),qi.output&&qi.makeOutputMethods(s,t,e)}Hi.done=()=>qi.document.done(),Hi.whenReady=t=>qi.document.whenReady(t)}static makeTypesetMethods(){Hi.typeset=(t=null)=>{this.hasTypeset=!0,qi.document.options.elements=t,qi.document.reset(),qi.document.render()},Hi.typesetPromise=(t=null)=>qi.typesetPromise(t),Hi.typesetClear=(t=null)=>{t?qi.document.clearMathItemsWithin(t):qi.document.clear()}}static makeOutputMethods(t,e,s){const i=t+"2"+e;Hi[i]=(t,e={})=>(e=Object.assign(Object.assign({},e),{format:s.name}),qi.document.convert(t,e)),Hi[i+"Promise"]=(t,e={})=>(e=Object.assign(Object.assign({},e),{format:s.name}),qi.document.convertPromise(t,e)),Hi[e+"Stylesheet"]=()=>qi.output.styleSheet(qi.document),"getMetricsFor"in qi.output&&(Hi.getMetricsFor=(t,e)=>qi.output.getMetricsFor(t,e))}static makeMmlMethods(t,e){const s=Hi._.core.MathItem.STATE;Hi[t+"2mml"]=(t,i={})=>(i=Object.assign(Object.assign({},i),{end:s.CONVERT,format:e.name}),qi.toMML(qi.document.convert(t,i))),Hi[t+"2mmlPromise"]=(t,...i)=>Ui(this,[t,...i],void 0,(function*(t,i={}){i=Object.assign(Object.assign({},i),{end:s.CONVERT,format:e.name});const r=yield qi.document.convertPromise(t,i);return qi.toMML(r)}))}static makeResetMethod(t,e){Hi[t+"Reset"]=(...t)=>e.reset(...t)}static getInputJax(){const t=[];for(const e of Wi.input){const s=qi.constructors[e];if(!s)throw Error('Input Jax "'+e+'" is not defined (has it been loaded?)');t[e]=new s(Hi.config[e]),t.push(t[e])}return t}static getOutputJax(){const t=Wi.output;if(!t)return null;const e=qi.constructors[t];if(!e)throw Error('Output Jax "'+t+'" is not defined (has it been loaded?)');return new e(Hi.config[t])}static getAdaptor(){const t=Wi.adaptor;if(!t||"none"===t)return null;const e=qi.constructors[t];if(!e)throw Error('DOMAdaptor "'+t+'" is not defined (has it been loaded?)');return e(Hi.config[t])}static getHandler(){const t=Wi.handler;if(!t||"none"===t||!qi.adaptor)return null;const e=qi.constructors[t];if(!e)throw Error('Handler "'+t+'" is not defined (has it been loaded?)');let s=new e(qi.adaptor,5);for(const t of qi.extensions)s=t.item(s);return s}static getDocument(t=null){return qi.mathjax.document(t||Wi.document,Object.assign(Object.assign({},Hi.config.options),{InputJax:qi.input,OutputJax:qi.output}))}}qi.extensions=new mi,qi.constructors={},qi.input=[],qi.output=null,qi.handler=null,qi.adaptor=null,qi.elements=null,qi.document=null,qi.promise=new Promise(((t,e)=>{qi.promiseResolve=t,qi.promiseReject=e})),qi.pagePromise=new Promise(((t,e)=>{const s=ri.document;if(s&&s.readyState&&"complete"!==s.readyState&&"interactive"!==s.readyState){const e=()=>t();s.defaultView.addEventListener("load",e,!0),s.defaultView.addEventListener("DOMContentLoaded",e,!0)}else t()})),qi.hasTypeset=!1,qi.defaultOptionError=ki.optionError;const Hi=li;void 0===Hi._.startup&&(ai(Hi.config,"startup",{input:[],output:"",handler:null,adaptor:null,document:di.document||"",elements:null,typeset:!0,ready:qi.defaultReady.bind(qi),pageReady:qi.defaultPageReady.bind(qi)}),ci({startup:qi,options:{}}),Hi.config.startup.invalidOption&&(ki.invalidOption=Hi.config.startup.invalidOption),Hi.config.startup.optionError&&(ki.optionError=Hi.config.startup.optionError));const Wi=Hi.config.startup,zi=0!==Wi.input.length;MathJax.loader&&MathJax.loader.checkVersion("startup",ii,"startup"),ci({_:{components:{loader:n,package:s,startup:a}}});yi.preLoaded("loader","startup"),ai(MathJax.config.loader,"dependencies",{"a11y/semantic-enrich":["input/mml","a11y/sre"],"a11y/speech":["a11y/semantic-enrich"],"a11y/complexity":["a11y/semantic-enrich"],"a11y/explorer":["a11y/speech"],"[mml]/mml3":["input/mml"],"[tex]/action":["input/tex-base"],"[tex]/ams":["input/tex-base","[tex]/newcommand"],"[tex]/amscd":["input/tex-base"],"[tex]/autoload":["input/tex-base","[tex]/require"],"[tex]/bbm":["input/tex-base"],"[tex]/bboldx":["input/tex-base","[tex]/textmacros"],"[tex]/bbox":["input/tex-base"],"[tex]/begingroup":["input/tex-base","[tex]/newcommand"],"[tex]/boldsymbol":["input/tex-base"],"[tex]/braket":["input/tex-base"],"[tex]/bussproofs":["input/tex-base"],"[tex]/cancel":["input/tex-base","[tex]/enclose"],"[tex]/cases":["[tex]/empheq"],"[tex]/centernot":["input/tex-base"],"[tex]/color":["input/tex-base"],"[tex]/colortbl":["input/tex-base","[tex]/color"],"[tex]/colorv2":["input/tex-base"],"[tex]/configmacros":["input/tex-base","[tex]/newcommand"],"[tex]/dsfont":["input/tex-base"],"[tex]/empheq":["input/tex-base","[tex]/ams"],"[tex]/enclose":["input/tex-base"],"[tex]/extpfeil":["input/tex-base","[tex]/newcommand","[tex]/ams"],"[tex]/gensymb":["input/tex-base"],"[tex]/html":["input/tex-base"],"[tex]/mathtools":["input/tex-base","[tex]/newcommand","[tex]/ams","[tex]/boldsymbol"],"[tex]/mhchem":["input/tex-base","[tex]/ams"],"[tex]/newcommand":["input/tex-base"],"[tex]/noerrors":["input/tex-base"],"[tex]/noundefined":["input/tex-base"],"[tex]/physics":["input/tex-base"],"[tex]/require":["input/tex-base"],"[tex]/setoptions":["input/tex-base"],"[tex]/tagformat":["input/tex-base"],"[tex]/texhtml":["input/tex-base"],"[tex]/textcomp":["input/tex-base","[tex]/textmacros"],"[tex]/textmacros":["input/tex-base"],"[tex]/unicode":["input/tex-base"],"[tex]/units":["input/tex-base"],"[tex]/upgreek":["input/tex-base"],"[tex]/verb":["input/tex-base"],"ui/menu":["a11y/sre"]}),ai(MathJax.config.loader,"paths",{tex:"[mathjax]/input/tex/extensions",mml:"[mathjax]/input/mml/extensions",sre:"[mathjax]/sre",mathmaps:"[sre]/mathmaps"}),ai(MathJax.config.loader,"provides",{startup:["loader"],"input/tex":["input/tex-base","[tex]/ams","[tex]/newcommand","[tex]/textmacros","[tex]/noundefined","[tex]/require","[tex]/autoload","[tex]/configmacros"]}),ai(MathJax.config.loader,"source",{"[tex]/amsCd":"[tex]/amscd","[tex]/colorV2":"[tex]/colorv2","[tex]/configMacros":"[tex]/configmacros","[tex]/tagFormat":"[tex]/tagformat"});class Xi{constructor(t=null){this.canMeasureNodes=!0,this.document=t}node(t,e={},s=[],i){const r=this.create(t,i);this.setAttributes(r,e);for(const t of s)this.append(r,t);return r}setProperty(t,e,s){t[e]=s}getProperty(t,e){return t[e]}setAttributes(t,e){if(e.style&&"string"!=typeof e.style)for(const s of Object.keys(e.style))this.setStyle(t,s.replace(/-([a-z])/g,((t,e)=>e.toUpperCase())),e.style[s]);if(e.properties)for(const s of Object.keys(e.properties))t[s]=e.properties[s];for(const s of Object.keys(e))"style"===s&&"string"!=typeof e.style||"properties"===s||this.setAttribute(t,s,e[s])}replace(t,e){return this.insert(t,e),this.remove(e),e}childNode(t,e){return this.childNodes(t)[e]}allClasses(t){const e=this.getAttribute(t,"class");return e?e.replace(/ +/g," ").replace(/^ /,"").replace(/ $/,"").split(/ /):[]}cssText(t){return"style"===this.kind(t)?this.textContent(t):""}}var Vi=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};class Gi extends Xi{constructor(t){super(t.document),this.canMeasureNodes=!0,this.window=t,this.parser=new t.DOMParser}parse(t,e="text/html"){return this.parser.parseFromString(t,e)}create(t,e){return e?this.document.createElementNS(e,t):this.document.createElement(t)}text(t){return this.document.createTextNode(t)}head(t=this.document){return t.head||t}body(t=this.document){return t.body||t}root(t=this.document){return t.documentElement||t}doctype(t=this.document){return t.doctype?``:""}tags(t,e,s=null){const i=s?t.getElementsByTagNameNS(s,e):t.getElementsByTagName(e);return Array.from(i)}getElements(t,e){let s=[];for(const e of t)"string"==typeof e?s=s.concat(Array.from(this.document.querySelectorAll(e))):Array.isArray(e)||e instanceof this.window.NodeList||e instanceof this.window.HTMLCollection?s=s.concat(Array.from(e)):s.push(e);return s}getElement(t,e=this.document){return e.querySelector(t)}contains(t,e){return t.contains(e)}parent(t){return t.parentNode}append(t,e){return t.appendChild(e)}insert(t,e){return this.parent(e).insertBefore(t,e)}remove(t){return this.parent(t).removeChild(t)}replace(t,e){return this.parent(e).replaceChild(t,e)}clone(t,e=!0){return t.cloneNode(e)}split(t,e){return t.splitText(e)}next(t){return t.nextSibling}previous(t){return t.previousSibling}firstChild(t){return t.firstChild}lastChild(t){return t.lastChild}childNodes(t){return Array.from(t.childNodes)}childNode(t,e){return t.childNodes[e]}kind(t){const e=t.nodeType;return 1===e||3===e||8===e?t.nodeName.toLowerCase():""}value(t){return t.nodeValue||""}textContent(t){return t.textContent}innerHTML(t){return t.innerHTML}outerHTML(t){return t.outerHTML}serializeXML(t){return(new this.window.XMLSerializer).serializeToString(t)}setAttribute(t,e,s,i=null){return i?(e=i.replace(/.*\//,"")+":"+e.replace(/^.*:/,""),t.setAttributeNS(i,e,s)):t.setAttribute(e,s)}getAttribute(t,e){return t.getAttribute(e)}removeAttribute(t,e){return t.removeAttribute(e)}hasAttribute(t,e){return t.hasAttribute(e)}allAttributes(t){return Array.from(t.attributes).map((t=>({name:t.name,value:t.value})))}addClass(t,e){t.classList?t.classList.add(e):t.className=(t.className+" "+e).trim()}removeClass(t,e){t.classList?t.classList.remove(e):t.className=t.className.split(/ /).filter((t=>t!==e)).join(" ")}hasClass(t,e){return t.classList?t.classList.contains(e):t.className.split(/ /).includes(e)}setStyle(t,e,s){t.style[e]=s}getStyle(t,e){return t.style[e]}allStyles(t){return t.style.cssText}insertRules(t,e){for(const s of e)try{t.sheet.insertRule(s,t.sheet.cssRules.length)}catch(t){console.warn(`MathJax: can't insert css rule '${s}': ${t.message}`)}}cssText(t){return"style"!==this.kind(t)?"":Array.from(t.sheet.cssRules).map((t=>t.cssText)).join("\n")}fontSize(t){const e=this.window.getComputedStyle(t);return parseFloat(e.fontSize)}fontFamily(t){return this.window.getComputedStyle(t).fontFamily||""}nodeSize(t,e=1,s=!1){if(s&&t.getBBox){const{width:s,height:i}=t.getBBox();return[s/e,i/e]}return[t.offsetWidth/e,t.offsetHeight/e]}nodeBBox(t){const{left:e,right:s,top:i,bottom:r}=t.getBoundingClientRect();return{left:e,right:s,top:i,bottom:r}}createWorker(t,e){return Vi(this,void 0,void 0,(function*(){const{path:s,maps:i,worker:r}=e,n=`${s}/${r}`,o=`\n self.maps = '${Ji(i)}';\n importScripts('${Ji(n)}');\n `,a=URL.createObjectURL(new Blob([o],{type:"text/javascript"})),c=new Worker(a);return c.onmessage=t,URL.revokeObjectURL(a),c}))}}function Ji(t){return[...t].map((t=>("\\"===t||"'"===t?t="\\"+t:(t<" "||t>"~")&&(t=`\\u{${t.codePointAt(0).toString(16)}}`),t))).join("")}function Ki(){return new Gi(window)}class $i{constructor(t){const e=this.constructor;this.options=Di(Oi({},e.OPTIONS),t)}}$i.OPTIONS={};class Yi{constructor(t={}){this.adaptor=null,this.mmlFactory=null;const e=this.constructor;this.options=Di(Oi({},e.OPTIONS),t),this.preFilters=new fi(this.options.preFilters),this.postFilters=new fi(this.options.postFilters)}get name(){return this.constructor.NAME}setAdaptor(t){this.adaptor=t}setMmlFactory(t){this.mmlFactory=t}initialize(){}reset(...t){}get processStrings(){return!0}findMath(t,e){return[]}executeFilters(t,e,s,i){const r={math:e,document:s,data:i};return t.execute(r),r.data}}Yi.NAME="generic",Yi.OPTIONS={preFilters:[],postFilters:[]};class Qi{constructor(t={}){this.adaptor=null;const e=this.constructor;this.options=Di(Oi({},e.OPTIONS),t),this.preFilters=new fi(this.options.preFilters),this.postFilters=new fi(this.options.postFilters)}get name(){return this.constructor.NAME}setAdaptor(t){this.adaptor=t}initialize(){}reset(...t){}getMetrics(t){}styleSheet(t){return null}pageElements(t){return null}executeFilters(t,e,s,i){const r={math:e,document:s,data:i};return t.execute(r),r.data}}Qi.NAME="generic",Qi.OPTIONS={preFilters:[],postFilters:[]};const Zi=Symbol();class tr{constructor(t=null){this.next=null,this.prev=null,this.data=t}}class er{constructor(...t){this.list=new tr(Zi),this.list.next=this.list.prev=this.list,this.push(...t)}isBefore(t,e){return t1;){const s=e.shift(),i=e.shift();s.merge(i,t),e.push(s)}return e.length&&(this.list=e[0].list),this}merge(t,e=null){null===e&&(e=this.isBefore.bind(this));let s=this.list.next,i=t.list.next;for(;s.data!==Zi&&i.data!==Zi;)e(i.data,s.data)?([i.prev.next,s.prev.next]=[s,i],[i.prev,s.prev]=[s.prev,i.prev],[this.list.prev.next,t.list.prev.next]=[t.list,this.list],[this.list.prev,t.list.prev]=[t.list.prev,this.list.prev],[s,i]=[i.next,s]):s=s.next;return i.data!==Zi&&(this.list.prev.next=t.list.next,t.list.next.prev=this.list.prev,t.list.prev.next=this.list,this.list.prev=t.list.prev,t.list.next=t.list.prev=t.list),this}}class sr extends er{isBefore(t,e){return t.start.i=e&&this.state(e-1),t.renderActions.renderMath(this,t,e)}convert(t,e=nr.LAST){t.renderActions.renderConvert(this,t,e)}compile(t){this.state()=nr.INSERTED&&this.removeFromDocument(e),t=nr.TYPESET&&(this.outputData={}),t=nr.COMPILED&&(this.inputData={}),this._state=t),this._state}reset(t=!1){this.state(nr.UNPROCESSED,t)}clear(){}}const nr={UNPROCESSED:0,FINDMATH:10,COMPILED:20,CONVERT:100,METRICS:110,RERENDER:125,TYPESET:150,INSERTED:200,LAST:1e4};function or(t,e){if(t in nr)throw Error("State "+t+" already exists");nr[t]=e}class ar{constructor(t=null){this.defaultKind="unknown",this.nodeMap=new Map,this.node={},null===t&&(t=this.constructor.defaultNodes);for(const e of Object.keys(t))this.setNodeClass(e,t[e])}create(t,...e){return(this.node[t]||this.node[this.defaultKind])(...e)}setNodeClass(t,e){this.nodeMap.set(t,e);const s=this.nodeMap.get(t);this.node[t]=(...t)=>new s(this,...t)}getNodeClass(t){return this.nodeMap.get(t)}deleteNodeClass(t){this.nodeMap.delete(t),delete this.node[t]}nodeIsKind(t,e){return t instanceof this.getNodeClass(e)}getKinds(){return Array.from(this.nodeMap.keys())}}ar.defaultNodes={};class cr extends ar{create(t,e={},s=[]){return this.node[t](e,s)}}const lr="_inherit_";class hr{constructor(t,e){this.global=e,this.defaults=Object.create(e),this.inherited=Object.create(this.defaults),this.attributes=Object.create(this.inherited),Object.assign(this.defaults,t)}set(t,e){this.attributes[t]=e}setList(t){Object.assign(this.attributes,t)}unset(t){delete this.attributes[t]}get(t){let e=this.attributes[t];return e===lr&&(e=this.global[t]),e}getExplicit(t){return this.hasExplicit(t)?this.attributes[t]:void 0}hasExplicit(t){return Object.hasOwn(this.attributes,t)}hasOneOf(t){for(const e of t)if(this.hasExplicit(e))return!0;return!1}getList(...t){const e={};for(const s of t)e[s]=this.get(s);return e}setInherited(t,e){this.inherited[t]=e}getInherited(t){return this.inherited[t]}getDefault(t){return this.defaults[t]}isSet(t){return Object.hasOwn(this.attributes,t)||Object.hasOwn(this.inherited,t)}hasDefault(t){return t in this.defaults}getExplicitNames(){return Object.keys(this.attributes)}getInheritedNames(){return Object.keys(this.inherited)}getDefaultNames(){return Object.keys(this.defaults)}getGlobalNames(){return Object.keys(this.global)}getAllAttributes(){return this.attributes}getAllInherited(){return this.inherited}getAllDefaults(){return this.defaults}getAllGlobals(){return this.global}}class dr{constructor(t,e={},s=[]){this.factory=t,this.parent=null,this.properties={},this.childNodes=[];for(const t of Object.keys(e))this.setProperty(t,e[t]);s.length&&this.setChildren(s)}get kind(){return"unknown"}setProperty(t,e){this.properties[t]=e}getProperty(t){return this.properties[t]}getPropertyNames(){return Object.keys(this.properties)}getAllProperties(){return this.properties}removeProperty(...t){for(const e of t)delete this.properties[e]}isKind(t){return this.factory.nodeIsKind(this,t)}setChildren(t){this.childNodes=[];for(const e of t)this.appendChild(e)}appendChild(t){return this.childNodes.push(t),t.parent=this,t}replaceChild(t,e){const s=this.childIndex(e);return null!==s&&(this.childNodes[s]=t,t.parent=this,e.parent===this&&(e.parent=null)),t}removeChild(t){const e=this.childIndex(t);return null!==e&&(this.childNodes.splice(e,1),t.parent=null),t}childIndex(t){const e=this.childNodes.indexOf(t);return-1===e?null:e}copy(){const t=this.factory.create(this.kind);t.properties=Object.assign({},this.properties);for(const e of this.childNodes||[])e&&t.appendChild(e.copy());return t}findNodes(t){const e=[];return this.walkTree((s=>{s.isKind(t)&&e.push(s)})),e}walkTree(t,e){t(this,e);for(const s of this.childNodes)s&&s.walkTree(t,e);return e}toString(){return this.kind+"("+this.childNodes.join(",")+")"}}class ur extends dr{setChildren(t){}appendChild(t){return t}replaceChild(t,e){return e}childIndex(t){return null}walkTree(t,e){return t(this,e),e}toString(){return this.kind}}const pr={ORD:0,OP:1,BIN:2,REL:3,OPEN:4,CLOSE:5,PUNCT:6,INNER:7,NONE:-1},mr=["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER"],fr=["","thinmathspace","mediummathspace","thickmathspace"],gr=[[0,-1,2,3,0,0,0,1],[-1,-1,0,3,0,0,0,1],[2,2,0,0,2,0,0,2],[3,3,0,0,3,0,0,3],[0,0,0,0,0,0,0,0],[0,-1,2,3,0,0,0,1],[1,1,0,1,1,1,1,1],[1,-1,2,3,1,0,1,1]],br=new Set(["normal","bold","italic","bold-italic","double-struck","fraktur","bold-fraktur","script","bold-script","sans-serif","bold-sans-serif","sans-serif-italic","sans-serif-bold-italic","monospace","inital","tailed","looped","stretched"]),Er=["indentalign","indentalignfirst","indentshift","indentshiftfirst"];class Nr extends dr{constructor(t,e={},s=[]){super(t),this.prevClass=null,this.prevLevel=null,this.texclass=null,this.arity<0&&(this.childNodes=[t.create("inferredMrow")],this.childNodes[0].parent=this),this.setChildren(s),this.attributes=new hr(t.getNodeClass(this.kind).defaults,t.getNodeClass("math").defaults),this.attributes.setList(e)}copy(t=!1){const e=this.factory.create(this.kind);if(e.properties=Object.assign({},this.properties),this.attributes){const s=this.attributes.getAllAttributes();for(const i of Object.keys(s))("id"!==i||t)&&e.attributes.set(i,s[i])}if(this.childNodes&&this.childNodes.length){let t=this.childNodes;1===t.length&&t[0].isInferred&&(t=t[0].childNodes);for(const s of t)s?e.appendChild(s.copy()):e.childNodes.push(null)}return e}get texClass(){return this.texclass}set texClass(t){this.texclass=t}get isToken(){return!1}get isEmbellished(){return!1}get isSpacelike(){return!1}get linebreakContainer(){return!1}get linebreakAlign(){return"data-align"}get arity(){return 1/0}get isInferred(){return!1}get Parent(){let t=this.parent;for(;t&&t.notParent;)t=t.Parent;return t}get notParent(){return!1}setChildren(t){return this.arity<0?this.childNodes[0].setChildren(t):super.setChildren(t)}appendChild(t){if(this.arity<0)return this.childNodes[0].appendChild(t),t;if(t.isInferred){if(this.arity===1/0)return t.childNodes.forEach((t=>super.appendChild(t))),t;const e=t;(t=this.factory.create("mrow")).setChildren(e.childNodes),t.attributes=e.attributes;for(const s of e.getPropertyNames())t.setProperty(s,e.getProperty(s))}return super.appendChild(t)}replaceChild(t,e){return this.arity<0?(this.childNodes[0].replaceChild(t,e),t):super.replaceChild(t,e)}core(){return this}coreMO(){return this}coreIndex(){return 0}childPosition(){let t=null,e=this.parent;for(;e&&e.notParent;)t=e,e=e.parent;if(t=t||this,e){let s=0;for(const i of e.childNodes){if(i===t)return s;s++}}return null}setTeXclass(t){return this.getPrevClass(t),null!=this.texClass?this:t}updateTeXclass(t){t&&(this.prevClass=t.prevClass,this.prevLevel=t.prevLevel,t.prevClass=t.prevLevel=null,this.texClass=t.texClass)}getPrevClass(t){t&&(this.prevClass=t.texClass,this.prevLevel=t.attributes.get("scriptlevel"))}texSpacing(){const t=null!=this.prevClass?this.prevClass:pr.NONE,e=this.texClass||pr.ORD;if(t===pr.NONE||e===pr.NONE)return"";const s=gr[t][e];return(this.prevLevel>0||this.attributes.get("scriptlevel")>0)&&s>=0?"":fr[Math.abs(s)]}hasSpacingAttributes(){return this.isEmbellished&&this.coreMO().hasSpacingAttributes()}setInheritedAttributes(t={},e=!1,s=0,i=!1){var r,n,o;const a=this.attributes.getAllDefaults();for(const e of Object.keys(t)){if(Object.hasOwn(a,e)||Object.hasOwn(Nr.alwaysInherit,e)){const[s,i]=t[e];(null===(n=null===(r=Nr.noInherit[s])||void 0===r?void 0:r[this.kind])||void 0===n?void 0:n[e])||this.attributes.setInherited(e,i)}(null===(o=Nr.stopInherit[this.kind])||void 0===o?void 0:o[e])&&delete(t=Object.assign({},t))[e]}void 0===this.attributes.getExplicit("displaystyle")&&this.attributes.setInherited("displaystyle",e);void 0===this.attributes.getExplicit("scriptlevel")&&this.attributes.setInherited("scriptlevel",s),i&&this.setProperty("texprimestyle",i);const c=this.arity;if(c>=0&&c!==1/0&&(1===c&&0===this.childNodes.length||1!==c&&this.childNodes.length!==c))if(c=0&&e!==1/0&&(1===e&&0===this.childNodes.length||1!==e&&this.childNodes.length!==e)&&this.mError('Wrong number of children for "'+this.kind+'" node',t,!0),this.verifyChildren(t)}verifyAttributes(t){if(t.checkAttributes){const e=this.attributes,s=[];for(const t of e.getExplicitNames())"data-"===t.substring(0,5)||void 0!==e.getDefault(t)||t.match(/^(?:class|style|id|(?:xlink:)?href)$/)||s.push(t);s.length&&this.mError("Unknown attributes for "+this.kind+" node: "+s.join(", "),t)}if(t.checkMathvariants){const e=this.attributes.getExplicit("mathvariant");!e||br.has(e)||this.getProperty("ignore-variant")||this.mError(`Invalid mathvariant: ${e}`,t,!0)}}verifyChildren(t){for(const e of this.childNodes)e.verifyTree(t)}mError(t,e,s=!1){if(this.parent&&this.parent.isKind("merror"))return null;const i=this.factory.create("merror");if(i.attributes.set("data-mjx-message",t),e.fullErrors||s){const s=this.factory.create("mtext"),r=this.factory.create("text");r.setText(e.fullErrors?t:this.kind),s.appendChild(r),i.appendChild(s),this.parent.replaceChild(i,this),e.fullErrors||i.attributes.set("title",t)}else this.parent.replaceChild(i,this),i.appendChild(this);return i}}Nr.defaults={mathbackground:lr,mathcolor:lr,mathsize:lr,dir:lr},Nr.noInherit={mstyle:{mpadded:{width:!0,height:!0,depth:!0,lspace:!0,voffset:!0},mtable:{width:!0,height:!0,depth:!0,align:!0}},maligngroup:{mrow:{groupalign:!0},mtable:{groupalign:!0}},mtr:{msqrt:{"data-vertical-align":!0},mroot:{"data-vertical-align":!0}},mlabeledtr:{msqrt:{"data-vertical-align":!0},mroot:{"data-vertical-align":!0}}},Nr.stopInherit={mtd:{columnalign:!0,rowalign:!0,groupalign:!0}},Nr.alwaysInherit={scriptminsize:!0,scriptsizemultiplier:!0,infixlinebreakstyle:!0},Nr.verifyDefaults={checkArity:!0,checkAttributes:!1,checkMathvariants:!0,fullErrors:!1,fixMmultiscripts:!0,fixMtables:!0};class yr extends Nr{get isToken(){return!0}getText(){let t="";for(const e of this.childNodes)e instanceof Tr?t+=e.getText():"textContent"in e&&(t+=e.textContent());return t}setChildInheritedAttributes(t,e,s,i){for(const r of this.childNodes)r instanceof Nr&&r.setInheritedAttributes(t,e,s,i)}walkTree(t,e){t(this,e);for(const s of this.childNodes)s instanceof Nr&&s.walkTree(t,e);return e}}yr.defaults=Object.assign(Object.assign({},Nr.defaults),{mathvariant:"normal",mathsize:lr});class xr extends Nr{get isSpacelike(){return this.childNodes[0].isSpacelike}get isEmbellished(){return this.childNodes[0].isEmbellished}get arity(){return-1}core(){return this.childNodes[0]}coreMO(){return this.childNodes[0].coreMO()}setTeXclass(t){return t=this.childNodes[0].setTeXclass(t),this.updateTeXclass(this.childNodes[0]),t}}xr.defaults=Nr.defaults;class vr extends Nr{get isEmbellished(){return this.childNodes[0].isEmbellished}core(){return this.childNodes[0]}coreMO(){return this.childNodes[0].coreMO()}setTeXclass(t){this.getPrevClass(t),this.texClass=pr.ORD;const e=this.childNodes[0];let s=null;e&&(this.isEmbellished||e.isKind("mi")?(s=e.setTeXclass(t),this.updateTeXclass(this.core())):e.setTeXclass(null));for(const t of this.childNodes.slice(1))t&&t.setTeXclass(null);return s||this}}vr.defaults=Nr.defaults;class Cr extends ur{get isToken(){return!1}get isEmbellished(){return!1}get isSpacelike(){return!1}get linebreakContainer(){return!1}get linebreakAlign(){return""}get arity(){return 0}get isInferred(){return!1}get notParent(){return!1}get Parent(){return this.parent}get texClass(){return pr.NONE}get prevClass(){return pr.NONE}get prevLevel(){return 0}hasSpacingAttributes(){return!1}get attributes(){return null}core(){return this}coreMO(){return this}coreIndex(){return 0}childPosition(){return 0}setTeXclass(t){return t}texSpacing(){return""}setInheritedAttributes(t,e,s,i){}inheritAttributesFrom(t){}verifyTree(t){}mError(t,e,s=!1){return null}}class Tr extends Cr{constructor(){super(...arguments),this.text=""}get kind(){return"text"}getText(){return this.text}setText(t){return this.text=t,this}copy(){return this.factory.create(this.kind).setText(this.getText())}toString(){return this.text}}class _r extends Cr{constructor(){super(...arguments),this.xml=null,this.adaptor=null}get kind(){return"XML"}getXML(){return this.xml}setXML(t,e=null){return this.xml=t,this.adaptor=e,this}getSerializedXML(){return this.adaptor.serializeXML(this.xml)}copy(){return this.factory.create(this.kind).setXML(this.adaptor.clone(this.xml))}toString(){return"XML data"}}class wr extends xr{get kind(){return"math"}get linebreakContainer(){return!0}get linebreakAlign(){return""}setChildInheritedAttributes(t,e,s,i){"display"===this.attributes.get("mode")&&this.attributes.setInherited("display","block"),t=this.addInheritedAttributes(t,this.attributes.getAllAttributes()),e=!!this.attributes.get("displaystyle")||!this.attributes.get("displaystyle")&&"block"===this.attributes.get("display"),this.attributes.setInherited("displaystyle",e),s=this.attributes.get("scriptlevel")||this.constructor.defaults.scriptlevel,super.setChildInheritedAttributes(t,e,s,i)}verifyTree(t=null){super.verifyTree(t),this.parent&&this.mError("Improper nesting of math tags",t,!0)}}wr.defaults=Object.assign(Object.assign({},xr.defaults),{mathvariant:"normal",mathsize:"normal",mathcolor:"",mathbackground:"transparent",dir:"ltr",scriptlevel:0,displaystyle:!1,display:"inline",maxwidth:"",overflow:"linebreak",altimg:"","altimg-width":"","altimg-height":"","altimg-valign":"",alttext:"",cdgroup:"",scriptsizemultiplier:1/Math.sqrt(2),scriptminsize:".4em",infixlinebreakstyle:"before",lineleading:"100%",linebreakmultchar:"\u2062",indentshift:"auto",indentalign:"auto",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"});class kr extends yr{constructor(){super(...arguments),this.texclass=pr.ORD}get kind(){return"mi"}setInheritedAttributes(t={},e=!1,s=0,i=!1){super.setInheritedAttributes(t,e,s,i);this.getText().match(kr.singleCharacter)&&!t.mathvariant&&this.attributes.setInherited("mathvariant","italic")}setTeXclass(t){this.getPrevClass(t);const e=this.getText();return e.length>1&&e.match(kr.operatorName)&&"normal"===this.attributes.get("mathvariant")&&void 0===this.getProperty("autoOP")&&void 0===this.getProperty("texClass")&&(this.texClass=pr.OP,this.setProperty("autoOP",!0)),this}}kr.defaults=Object.assign({},yr.defaults),kr.operatorName=/^[a-z][a-z0-9]*$/i,kr.singleCharacter=/^[\uD800-\uDBFF]?.[\u0300-\u036F\u1AB0-\u1ABE\u1DC0-\u1DFF\u20D0-\u20EF]*$/;class Ar extends yr{constructor(){super(...arguments),this.texclass=pr.ORD}get kind(){return"mn"}}function Mr(t,e,s=pr.BIN,i=null){return[t,e,s,i]}Ar.defaults=Object.assign({},yr.defaults);const Lr={ORD:Mr(0,0,pr.ORD),ORD11:Mr(1,1,pr.ORD),ORD21:Mr(2,1,pr.ORD),ORD02:Mr(0,2,pr.ORD),ORD55:Mr(5,5,pr.ORD),NONE:Mr(0,0,pr.NONE),OP:Mr(1,2,pr.OP,{largeop:!0,movablelimits:!0,symmetric:!0}),OPFIXED:Mr(1,2,pr.OP,{largeop:!0,movablelimits:!0}),INTEGRAL:Mr(0,1,pr.OP,{largeop:!0,symmetric:!0}),INTEGRAL2:Mr(1,2,pr.OP,{largeop:!0,symmetric:!0}),BIN3:Mr(3,3,pr.BIN),BIN4:Mr(4,4,pr.BIN),BIN01:Mr(0,1,pr.BIN),BIN5:Mr(5,5,pr.BIN),TALLBIN:Mr(4,4,pr.BIN,{stretchy:!0}),BINOP:Mr(4,4,pr.BIN,{largeop:!0,movablelimits:!0}),REL:Mr(5,5,pr.REL),REL1:Mr(1,1,pr.REL,{stretchy:!0}),REL4:Mr(4,4,pr.REL),RELSTRETCH:Mr(5,5,pr.REL,{stretchy:!0}),RELACCENT:Mr(5,5,pr.REL,{accent:!0}),WIDEREL:Mr(5,5,pr.REL,{accent:!0,stretchy:!0}),OPEN:Mr(0,0,pr.OPEN,{fence:!0,stretchy:!0,symmetric:!0}),CLOSE:Mr(0,0,pr.CLOSE,{fence:!0,stretchy:!0,symmetric:!0}),INNER:Mr(0,0,pr.INNER),PUNCT:Mr(0,3,pr.PUNCT),ACCENT:Mr(0,0,pr.ORD,{accent:!0}),WIDEACCENT:Mr(0,0,pr.ORD,{accent:!0,stretchy:!0})},Ir=[[32,127,pr.REL,"mo"],[160,191,pr.ORD,"mo"],[192,591,pr.ORD,"mi"],[688,879,pr.ORD,"mo"],[880,6688,pr.ORD,"mi"],[6832,6911,pr.ORD,"mo"],[6912,7615,pr.ORD,"mi"],[7616,7679,pr.ORD,"mo"],[7680,8191,pr.ORD,"mi"],[8192,8303,pr.ORD,"mo"],[8304,8351,pr.ORD,"mo"],[8448,8527,pr.ORD,"mi"],[8528,8591,pr.ORD,"mn"],[8592,8703,pr.REL,"mo"],[8704,8959,pr.BIN,"mo"],[8960,9215,pr.ORD,"mo"],[9312,9471,pr.ORD,"mn"],[9472,10223,pr.ORD,"mo"],[10224,10239,pr.REL,"mo"],[10240,10495,pr.ORD,"mtext"],[10496,10623,pr.REL,"mo"],[10624,10751,pr.ORD,"mo"],[10752,11007,pr.BIN,"mo"],[11008,11055,pr.ORD,"mo"],[11056,11087,pr.REL,"mo"],[11088,11263,pr.ORD,"mo"],[11264,11744,pr.ORD,"mi"],[11776,11903,pr.ORD,"mo"],[11904,12255,pr.ORD,"mi","normal"],[12272,12351,pr.ORD,"mo"],[12352,42143,pr.ORD,"mi","normal"],[42192,43055,pr.ORD,"mi"],[43056,43071,pr.ORD,"mn"],[43072,55295,pr.ORD,"mi"],[63744,64255,pr.ORD,"mi","normal"],[64256,65023,pr.ORD,"mi"],[65024,65135,pr.ORD,"mo"],[65136,65791,pr.ORD,"mi"],[65792,65935,pr.ORD,"mn"],[65936,74751,pr.ORD,"mi","normal"],[74752,74879,pr.ORD,"mn"],[74880,113823,pr.ORD,"mi","normal"],[113824,119391,pr.ORD,"mo"],[119648,119679,pr.ORD,"mn"],[119808,120781,pr.ORD,"mi"],[120782,120831,pr.ORD,"mn"],[122624,129023,pr.ORD,"mo"],[129024,129279,pr.REL,"mo"],[129280,129535,pr.ORD,"mo"],[131072,195103,pr.ORD,"mi","normal"]];function Sr(t){const e=Or.infix[t]||Or.prefix[t]||Or.postfix[t];if(e)return[0,0,e[2],"mo"];const s=t.codePointAt(0);for(const t of Ir)if(s<=t[1]){if(s>=t[0])return t;break}return[0,0,pr.REL,"mo"]}const Rr=[[0,0],[1,2],[3,3],[4,4],[0,0],[0,0],[0,3]],Or={prefix:{"(":Lr.OPEN,"+":Lr.BIN01,"-":Lr.BIN01,"[":Lr.OPEN,"{":Lr.OPEN,"|":Lr.OPEN,"||":[0,0,pr.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[0,0,pr.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"\xac":Lr.ORD21,"\xb1":Lr.BIN01,"\u2016":[0,0,pr.ORD,{fence:!0,stretchy:!0}],"\u2018":[0,0,pr.OPEN,{fence:!0}],"\u201c":[0,0,pr.OPEN,{fence:!0}],\u2145:Lr.ORD21,\u2146:Mr(2,0,pr.ORD),"\u2200":Lr.ORD21,"\u2202":Lr.ORD21,"\u2203":Lr.ORD21,"\u2204":Lr.ORD21,"\u2207":Lr.ORD21,"\u220f":Lr.OP,"\u2210":Lr.OP,"\u2211":Lr.OP,"\u2212":Lr.BIN01,"\u2213":Lr.BIN01,"\u221a":[1,1,pr.ORD,{stretchy:!0}],"\u221b":Lr.ORD11,"\u221c":Lr.ORD11,"\u2220":Lr.ORD,"\u2221":Lr.ORD,"\u2222":Lr.ORD,"\u222b":Lr.INTEGRAL,"\u222c":Lr.INTEGRAL,"\u222d":Lr.INTEGRAL,"\u222e":Lr.INTEGRAL,"\u222f":Lr.INTEGRAL,"\u2230":Lr.INTEGRAL,"\u2231":Lr.INTEGRAL,"\u2232":Lr.INTEGRAL,"\u2233":Lr.INTEGRAL,"\u22c0":Lr.OP,"\u22c1":Lr.OP,"\u22c2":Lr.OP,"\u22c3":Lr.OP,"\u2308":Lr.OPEN,"\u230a":Lr.OPEN,"\u2329":Lr.OPEN,"\u2772":Lr.OPEN,"\u27e6":Lr.OPEN,"\u27e8":Lr.OPEN,"\u27ea":Lr.OPEN,"\u27ec":Lr.OPEN,"\u27ee":Lr.OPEN,"\u2980":[0,0,pr.ORD,{fence:!0,stretchy:!0}],"\u2983":Lr.OPEN,"\u2985":Lr.OPEN,"\u2987":Lr.OPEN,"\u2989":Lr.OPEN,"\u298b":Lr.OPEN,"\u298d":Lr.OPEN,"\u298f":Lr.OPEN,"\u2991":Lr.OPEN,"\u2993":Lr.OPEN,"\u2995":Lr.OPEN,"\u2997":Lr.OPEN,"\u29fc":Lr.OPEN,"\u2a00":Lr.OP,"\u2a01":Lr.OP,"\u2a02":Lr.OP,"\u2a03":Lr.OP,"\u2a04":Lr.OP,"\u2a05":Lr.OP,"\u2a06":Lr.OP,"\u2a07":Lr.OP,"\u2a08":Lr.OP,"\u2a09":Lr.OP,"\u2a0a":Lr.OP,"\u2a0b":Lr.INTEGRAL2,"\u2a0c":Lr.INTEGRAL,"\u2a0d":Lr.INTEGRAL2,"\u2a0e":Lr.INTEGRAL2,"\u2a0f":Lr.INTEGRAL2,"\u2a10":Lr.OP,"\u2a11":Lr.OP,"\u2a12":Lr.OP,"\u2a13":Lr.OP,"\u2a14":Lr.OP,"\u2a15":Lr.INTEGRAL2,"\u2a16":Lr.INTEGRAL2,"\u2a17":Lr.INTEGRAL2,"\u2a18":Lr.INTEGRAL2,"\u2a19":Lr.INTEGRAL2,"\u2a1a":Lr.INTEGRAL2,"\u2a1b":Lr.INTEGRAL2,"\u2a1c":Lr.INTEGRAL2,"\u2afc":Lr.OP,"\u2aff":Lr.OP},postfix:{"!!":Mr(1,0),"!":[1,0,pr.CLOSE,null],'"':Lr.ACCENT,"&":Lr.ORD,")":Lr.CLOSE,"++":Mr(0,0),"--":Mr(0,0),"..":Mr(0,0),"...":Lr.ORD,"'":Lr.ACCENT,"]":Lr.CLOSE,"^":Lr.WIDEACCENT,_:Lr.WIDEACCENT,"`":Lr.ACCENT,"|":Lr.CLOSE,"}":Lr.CLOSE,"~":Lr.WIDEACCENT,"||":[0,0,pr.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[0,0,pr.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"\xa8":Lr.ACCENT,\u00aa:Lr.ACCENT,"\xaf":Lr.WIDEACCENT,"\xb0":Lr.ORD,"\xb2":Lr.ACCENT,"\xb3":Lr.ACCENT,"\xb4":Lr.ACCENT,"\xb8":Lr.ACCENT,"\xb9":Lr.ACCENT,\u00ba:Lr.ACCENT,\u02c6:Lr.WIDEACCENT,\u02c7:Lr.WIDEACCENT,\u02c9:Lr.WIDEACCENT,\u02ca:Lr.ACCENT,\u02cb:Lr.ACCENT,\u02cd:Lr.WIDEACCENT,"\u02d8":Lr.ACCENT,"\u02d9":Lr.ACCENT,"\u02da":Lr.ACCENT,"\u02dc":Lr.WIDEACCENT,"\u02dd":Lr.ACCENT,"\u02f7":Lr.WIDEACCENT,"\u0302":Lr.WIDEACCENT,"\u0311":Lr.ACCENT,"\u03f6":Lr.REL,"\u2016":[0,0,pr.ORD,{fence:!0,stretchy:!0}],"\u2019":[0,0,pr.CLOSE,{fence:!0}],"\u201a":Lr.ACCENT,"\u201b":Lr.ACCENT,"\u201d":[0,0,pr.CLOSE,{fence:!0}],"\u201e":Lr.ACCENT,"\u201f":Lr.ACCENT,"\u2032":Lr.ORD,"\u2033":Lr.ORD,"\u2034":Lr.ORD,"\u2035":Lr.ORD,"\u2036":Lr.ORD,"\u2037":Lr.ORD,"\u203e":Lr.WIDEACCENT,"\u2057":Lr.ORD,"\u20db":Lr.ACCENT,"\u20dc":Lr.ACCENT,"\u2309":Lr.CLOSE,"\u230b":Lr.CLOSE,"\u232a":Lr.CLOSE,"\u23b4":Lr.WIDEACCENT,"\u23b5":Lr.WIDEACCENT,"\u23dc":Lr.WIDEACCENT,"\u23dd":Lr.WIDEACCENT,"\u23de":Lr.WIDEACCENT,"\u23df":Lr.WIDEACCENT,"\u23e0":Lr.WIDEACCENT,"\u23e1":Lr.WIDEACCENT,"\u25a0":Lr.BIN3,"\u25a1":Lr.BIN3,"\u25aa":Lr.BIN3,"\u25ab":Lr.BIN3,"\u25ad":Lr.BIN3,"\u25ae":Lr.BIN3,"\u25af":Lr.BIN3,"\u25b0":Lr.BIN3,"\u25b1":Lr.BIN3,"\u25b2":Lr.BIN4,"\u25b4":Lr.BIN4,"\u25b6":Lr.BIN4,"\u25b7":Lr.BIN4,"\u25b8":Lr.BIN4,"\u25bc":Lr.BIN4,"\u25be":Lr.BIN4,"\u25c0":Lr.BIN4,"\u25c1":Lr.BIN4,"\u25c2":Lr.BIN4,"\u25c4":Lr.BIN4,"\u25c5":Lr.BIN4,"\u25c6":Lr.BIN4,"\u25c7":Lr.BIN4,"\u25c8":Lr.BIN4,"\u25c9":Lr.BIN4,"\u25cc":Lr.BIN4,"\u25cd":Lr.BIN4,"\u25ce":Lr.BIN4,"\u25cf":Lr.BIN4,"\u25d6":Lr.BIN4,"\u25d7":Lr.BIN4,"\u25e6":Lr.BIN4,"\u266d":Lr.ORD02,"\u266e":Lr.ORD02,"\u266f":Lr.ORD02,"\u2773":Lr.CLOSE,"\u27e7":Lr.CLOSE,"\u27e9":Lr.CLOSE,"\u27eb":Lr.CLOSE,"\u27ed":Lr.CLOSE,"\u27ef":Lr.CLOSE,"\u2980":[0,0,pr.ORD,{fence:!0,stretchy:!0}],"\u2984":Lr.CLOSE,"\u2986":Lr.CLOSE,"\u2988":Lr.CLOSE,"\u298a":Lr.CLOSE,"\u298c":Lr.CLOSE,"\u298e":Lr.CLOSE,"\u2990":Lr.CLOSE,"\u2992":Lr.CLOSE,"\u2994":Lr.CLOSE,"\u2996":Lr.CLOSE,"\u2998":Lr.CLOSE,"\u29fd":Lr.CLOSE},infix:{"!=":Lr.BIN4,"#":Lr.ORD,$:Lr.ORD,"%":[3,3,pr.ORD,null],"&&":Lr.BIN4,"":Lr.ORD,"*":Lr.BIN3,"**":Mr(1,1),"*=":Lr.BIN4,"+":Lr.BIN4,"+=":Lr.BIN4,",":[0,3,pr.PUNCT,{linebreakstyle:"after",separator:!0}],"-":Lr.BIN4,"-=":Lr.BIN4,"->":Lr.BIN5,".":[0,3,pr.PUNCT,{linebreakstyle:"after",separator:!0}],"/":Lr.ORD11,"//":Mr(1,1),"/=":Lr.BIN4,":":[1,2,pr.REL,null],":=":Lr.BIN4,";":[0,3,pr.PUNCT,{linebreakstyle:"after",separator:!0}],"<":Lr.REL,"<=":Lr.BIN5,"<>":Mr(1,1),"=":Lr.REL,"==":Lr.BIN4,">":Lr.REL,">=":Lr.BIN5,"?":[1,1,pr.CLOSE,null],"@":Lr.ORD11,"\\":Lr.ORD,"^":Lr.ORD11,_:Lr.ORD11,"|":[2,2,pr.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"||":[2,2,pr.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[2,2,pr.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"\xb1":Lr.BIN4,"\xb7":Lr.BIN4,"\xd7":Lr.BIN4,"\xf7":Lr.BIN4,\u02b9:Lr.ORD,"\u0300":Lr.ACCENT,"\u0301":Lr.ACCENT,"\u0303":Lr.WIDEACCENT,"\u0304":Lr.ACCENT,"\u0306":Lr.ACCENT,"\u0307":Lr.ACCENT,"\u0308":Lr.ACCENT,"\u030c":Lr.ACCENT,"\u0332":Lr.WIDEACCENT,"\u0338":Lr.REL4,"\u2015":[0,0,pr.ORD,{stretchy:!0}],"\u2017":[0,0,pr.ORD,{stretchy:!0}],"\u2020":Lr.BIN3,"\u2021":Lr.BIN3,"\u2022":Lr.BIN4,"\u2026":Lr.INNER,"\u2043":Lr.BIN4,"\u2044":Lr.TALLBIN,"\u2061":Lr.NONE,"\u2062":Lr.NONE,"\u2063":[0,0,pr.NONE,{linebreakstyle:"after",separator:!0}],"\u2064":Lr.NONE,"\u20d7":Lr.ACCENT,\u2111:Lr.ORD,\u2113:Lr.ORD,\u2118:Lr.ORD,\u211c:Lr.ORD,"\u2190":Lr.WIDEREL,"\u2191":Lr.RELSTRETCH,"\u2192":Lr.WIDEREL,"\u2193":Lr.RELSTRETCH,"\u2194":Lr.WIDEREL,"\u2195":Lr.RELSTRETCH,"\u2196":Lr.RELSTRETCH,"\u2197":Lr.RELSTRETCH,"\u2198":Lr.RELSTRETCH,"\u2199":Lr.RELSTRETCH,"\u219a":Lr.RELACCENT,"\u219b":Lr.RELACCENT,"\u219c":Lr.WIDEREL,"\u219d":Lr.WIDEREL,"\u219e":Lr.WIDEREL,"\u219f":Lr.WIDEREL,"\u21a0":Lr.WIDEREL,"\u21a1":Lr.RELSTRETCH,"\u21a2":Lr.WIDEREL,"\u21a3":Lr.WIDEREL,"\u21a4":Lr.WIDEREL,"\u21a5":Lr.RELSTRETCH,"\u21a6":Lr.WIDEREL,"\u21a7":Lr.RELSTRETCH,"\u21a8":Lr.RELSTRETCH,"\u21a9":Lr.WIDEREL,"\u21aa":Lr.WIDEREL,"\u21ab":Lr.WIDEREL,"\u21ac":Lr.WIDEREL,"\u21ad":Lr.WIDEREL,"\u21ae":Lr.RELACCENT,"\u21af":Lr.RELSTRETCH,"\u21b0":Lr.RELSTRETCH,"\u21b1":Lr.RELSTRETCH,"\u21b2":Lr.RELSTRETCH,"\u21b3":Lr.RELSTRETCH,"\u21b4":Lr.RELSTRETCH,"\u21b5":Lr.RELSTRETCH,"\u21b6":Lr.RELACCENT,"\u21b7":Lr.RELACCENT,"\u21b8":Lr.REL,"\u21b9":Lr.WIDEREL,"\u21ba":Lr.REL,"\u21bb":Lr.REL,"\u21bc":Lr.WIDEREL,"\u21bd":Lr.WIDEREL,"\u21be":Lr.RELSTRETCH,"\u21bf":Lr.RELSTRETCH,"\u21c0":Lr.WIDEREL,"\u21c1":Lr.WIDEREL,"\u21c2":Lr.RELSTRETCH,"\u21c3":Lr.RELSTRETCH,"\u21c4":Lr.WIDEREL,"\u21c5":Lr.RELSTRETCH,"\u21c6":Lr.WIDEREL,"\u21c7":Lr.WIDEREL,"\u21c8":Lr.RELSTRETCH,"\u21c9":Lr.WIDEREL,"\u21ca":Lr.RELSTRETCH,"\u21cb":Lr.WIDEREL,"\u21cc":Lr.WIDEREL,"\u21cd":Lr.RELACCENT,"\u21ce":Lr.RELACCENT,"\u21cf":Lr.RELACCENT,"\u21d0":Lr.WIDEREL,"\u21d1":Lr.RELSTRETCH,"\u21d2":Lr.WIDEREL,"\u21d3":Lr.RELSTRETCH,"\u21d4":Lr.WIDEREL,"\u21d5":Lr.RELSTRETCH,"\u21d6":Lr.RELSTRETCH,"\u21d7":Lr.RELSTRETCH,"\u21d8":Lr.RELSTRETCH,"\u21d9":Lr.RELSTRETCH,"\u21da":Lr.WIDEREL,"\u21db":Lr.WIDEREL,"\u21dc":Lr.WIDEREL,"\u21dd":Lr.WIDEREL,"\u21de":Lr.REL,"\u21df":Lr.REL,"\u21e0":Lr.WIDEREL,"\u21e1":Lr.RELSTRETCH,"\u21e2":Lr.WIDEREL,"\u21e3":Lr.RELSTRETCH,"\u21e4":Lr.WIDEREL,"\u21e5":Lr.WIDEREL,"\u21e6":Lr.WIDEREL,"\u21e7":Lr.RELSTRETCH,"\u21e8":Lr.WIDEREL,"\u21e9":Lr.RELSTRETCH,"\u21ea":Lr.RELSTRETCH,"\u21eb":Lr.RELSTRETCH,"\u21ec":Lr.RELSTRETCH,"\u21ed":Lr.RELSTRETCH,"\u21ee":Lr.RELSTRETCH,"\u21ef":Lr.RELSTRETCH,"\u21f0":Lr.WIDEREL,"\u21f1":Lr.REL,"\u21f2":Lr.REL,"\u21f3":Lr.RELSTRETCH,"\u21f4":Lr.RELACCENT,"\u21f5":Lr.RELSTRETCH,"\u21f6":Lr.WIDEREL,"\u21f7":Lr.RELACCENT,"\u21f8":Lr.RELACCENT,"\u21f9":Lr.RELACCENT,"\u21fa":Lr.RELACCENT,"\u21fb":Lr.RELACCENT,"\u21fc":Lr.RELACCENT,"\u21fd":Lr.WIDEREL,"\u21fe":Lr.WIDEREL,"\u21ff":Lr.WIDEREL,"\u2201":Mr(1,2,pr.ORD),"\u2205":Lr.ORD,"\u2206":Lr.BIN3,"\u2208":Lr.REL,"\u2209":Lr.REL,"\u220a":Lr.REL,"\u220b":Lr.REL,"\u220c":Lr.REL,"\u220d":Lr.REL,"\u220e":Lr.BIN3,"\u2212":Lr.BIN4,"\u2213":Lr.BIN4,"\u2214":Lr.BIN4,"\u2215":Lr.TALLBIN,"\u2216":Lr.BIN4,"\u2217":Lr.BIN4,"\u2218":Lr.BIN4,"\u2219":Lr.BIN4,"\u221d":Lr.REL,"\u221e":Lr.ORD,"\u221f":Lr.REL,"\u2223":Lr.REL,"\u2224":Lr.REL,"\u2225":Lr.REL,"\u2226":Lr.REL,"\u2227":Lr.BIN4,"\u2228":Lr.BIN4,"\u2229":Lr.BIN4,"\u222a":Lr.BIN4,"\u2234":Lr.REL,"\u2235":Lr.REL,"\u2236":Lr.REL,"\u2237":Lr.REL,"\u2238":Lr.BIN4,"\u2239":Lr.REL,"\u223a":Lr.BIN4,"\u223b":Lr.REL,"\u223c":Lr.REL,"\u223d":Lr.REL,"\u223d\u0331":Lr.BIN3,"\u223e":Lr.REL,"\u223f":Lr.BIN3,"\u2240":Lr.BIN4,"\u2241":Lr.REL,"\u2242":Lr.REL,"\u2242\u0338":Lr.REL,"\u2243":Lr.REL,"\u2244":Lr.REL,"\u2245":Lr.REL,"\u2246":Lr.REL,"\u2247":Lr.REL,"\u2248":Lr.REL,"\u2249":Lr.REL,"\u224a":Lr.REL,"\u224b":Lr.REL,"\u224c":Lr.REL,"\u224d":Lr.REL,"\u224e":Lr.REL,"\u224e\u0338":Lr.REL,"\u224f":Lr.REL,"\u224f\u0338":Lr.REL,"\u2250":Lr.REL,"\u2251":Lr.REL,"\u2252":Lr.REL,"\u2253":Lr.REL,"\u2254":Lr.REL,"\u2255":Lr.REL,"\u2256":Lr.REL,"\u2257":Lr.REL,"\u2258":Lr.REL,"\u2259":Lr.REL,"\u225a":Lr.REL,"\u225b":Lr.REL,"\u225c":Lr.REL,"\u225d":Lr.REL,"\u225e":Lr.REL,"\u225f":Lr.REL,"\u2260":Lr.REL,"\u2261":Lr.REL,"\u2262":Lr.REL,"\u2263":Lr.REL,"\u2264":Lr.REL,"\u2265":Lr.REL,"\u2266":Lr.REL,"\u2266\u0338":Lr.REL,"\u2267":Lr.REL,"\u2268":Lr.REL,"\u2269":Lr.REL,"\u226a":Lr.REL,"\u226a\u0338":Lr.REL,"\u226b":Lr.REL,"\u226b\u0338":Lr.REL,"\u226c":Lr.REL,"\u226d":Lr.REL,"\u226e":Lr.REL,"\u226f":Lr.REL,"\u2270":Lr.REL,"\u2271":Lr.REL,"\u2272":Lr.REL,"\u2273":Lr.REL,"\u2274":Lr.REL,"\u2275":Lr.REL,"\u2276":Lr.REL,"\u2277":Lr.REL,"\u2278":Lr.REL,"\u2279":Lr.REL,"\u227a":Lr.REL,"\u227b":Lr.REL,"\u227c":Lr.REL,"\u227d":Lr.REL,"\u227e":Lr.REL,"\u227f":Lr.REL,"\u227f\u0338":Lr.REL,"\u2280":Lr.REL,"\u2281":Lr.REL,"\u2282":Lr.REL,"\u2282\u20d2":Lr.REL,"\u2283":Lr.REL,"\u2283\u20d2":Lr.REL,"\u2284":Lr.REL,"\u2285":Lr.REL,"\u2286":Lr.REL,"\u2287":Lr.REL,"\u2288":Lr.REL,"\u2289":Lr.REL,"\u228a":Lr.REL,"\u228b":Lr.REL,"\u228c":Lr.BIN4,"\u228d":Lr.BIN4,"\u228e":Lr.BIN4,"\u228f":Lr.REL,"\u228f\u0338":Lr.REL,"\u2290":Lr.REL,"\u2290\u0338":Lr.REL,"\u2291":Lr.REL,"\u2292":Lr.REL,"\u2293":Lr.BIN4,"\u2294":Lr.BIN4,"\u2295":Lr.BIN4,"\u2296":Lr.BIN4,"\u2297":Lr.BIN4,"\u2298":Lr.BIN4,"\u2299":Lr.BIN4,"\u229a":Lr.BIN4,"\u229b":Lr.BIN4,"\u229c":Lr.BIN4,"\u229d":Lr.BIN4,"\u229e":Lr.BIN4,"\u229f":Lr.BIN4,"\u22a0":Lr.BIN4,"\u22a1":Lr.BIN4,"\u22a2":Lr.REL,"\u22a3":Lr.REL,"\u22a4":Lr.ORD55,"\u22a5":Lr.REL,"\u22a6":Lr.REL,"\u22a7":Lr.REL,"\u22a8":Lr.REL,"\u22a9":Lr.REL,"\u22aa":Lr.REL,"\u22ab":Lr.REL,"\u22ac":Lr.REL,"\u22ad":Lr.REL,"\u22ae":Lr.REL,"\u22af":Lr.REL,"\u22b0":Lr.REL,"\u22b1":Lr.REL,"\u22b2":Lr.REL,"\u22b3":Lr.REL,"\u22b4":Lr.REL,"\u22b5":Lr.REL,"\u22b6":Lr.REL,"\u22b7":Lr.REL,"\u22b8":Lr.REL,"\u22b9":Lr.REL,"\u22ba":Lr.BIN4,"\u22bb":Lr.BIN4,"\u22bc":Lr.BIN4,"\u22bd":Lr.BIN4,"\u22be":Lr.BIN3,"\u22bf":Lr.BIN3,"\u22c4":Lr.BIN4,"\u22c5":Lr.BIN4,"\u22c6":Lr.BIN4,"\u22c7":Lr.BIN4,"\u22c8":Lr.REL,"\u22c9":Lr.BIN4,"\u22ca":Lr.BIN4,"\u22cb":Lr.BIN4,"\u22cc":Lr.BIN4,"\u22cd":Lr.REL,"\u22ce":Lr.BIN4,"\u22cf":Lr.BIN4,"\u22d0":Lr.REL,"\u22d1":Lr.REL,"\u22d2":Lr.BIN4,"\u22d3":Lr.BIN4,"\u22d4":Lr.REL,"\u22d5":Lr.REL,"\u22d6":Lr.REL,"\u22d7":Lr.REL,"\u22d8":Lr.REL,"\u22d9":Lr.REL,"\u22da":Lr.REL,"\u22db":Lr.REL,"\u22dc":Lr.REL,"\u22dd":Lr.REL,"\u22de":Lr.REL,"\u22df":Lr.REL,"\u22e0":Lr.REL,"\u22e1":Lr.REL,"\u22e2":Lr.REL,"\u22e3":Lr.REL,"\u22e4":Lr.REL,"\u22e5":Lr.REL,"\u22e6":Lr.REL,"\u22e7":Lr.REL,"\u22e8":Lr.REL,"\u22e9":Lr.REL,"\u22ea":Lr.REL,"\u22eb":Lr.REL,"\u22ec":Lr.REL,"\u22ed":Lr.REL,"\u22ee":Lr.ORD55,"\u22ef":Lr.INNER,"\u22f0":Lr.REL,"\u22f1":[5,5,pr.INNER,null],"\u22f2":Lr.REL,"\u22f3":Lr.REL,"\u22f4":Lr.REL,"\u22f5":Lr.REL,"\u22f6":Lr.REL,"\u22f7":Lr.REL,"\u22f8":Lr.REL,"\u22f9":Lr.REL,"\u22fa":Lr.REL,"\u22fb":Lr.REL,"\u22fc":Lr.REL,"\u22fd":Lr.REL,"\u22fe":Lr.REL,"\u22ff":Lr.REL,"\u2305":Lr.BIN3,"\u2306":Lr.BIN3,"\u2322":Lr.REL4,"\u2323":Lr.REL4,"\u2329":Lr.OPEN,"\u232a":Lr.CLOSE,"\u23aa":Lr.ORD,"\u23af":[0,0,pr.ORD,{stretchy:!0}],"\u23b0":Lr.OPEN,"\u23b1":Lr.CLOSE,"\u2500":Lr.ORD,"\u25b3":Lr.BIN4,"\u25b5":Lr.BIN4,"\u25b9":Lr.BIN4,"\u25bd":Lr.BIN4,"\u25bf":Lr.BIN4,"\u25c3":Lr.BIN4,"\u25ef":Lr.BIN3,"\u2660":Lr.ORD,"\u2661":Lr.ORD,"\u2662":Lr.ORD,"\u2663":Lr.ORD,"\u2758":Lr.REL,"\u27f0":Lr.RELSTRETCH,"\u27f1":Lr.RELSTRETCH,"\u27f5":Lr.WIDEREL,"\u27f6":Lr.WIDEREL,"\u27f7":Lr.WIDEREL,"\u27f8":Lr.WIDEREL,"\u27f9":Lr.WIDEREL,"\u27fa":Lr.WIDEREL,"\u27fb":Lr.WIDEREL,"\u27fc":Lr.WIDEREL,"\u27fd":Lr.WIDEREL,"\u27fe":Lr.WIDEREL,"\u27ff":Lr.WIDEREL,"\u2900":Lr.RELACCENT,"\u2901":Lr.RELACCENT,"\u2902":Lr.RELACCENT,"\u2903":Lr.RELACCENT,"\u2904":Lr.RELACCENT,"\u2905":Lr.RELACCENT,"\u2906":Lr.RELACCENT,"\u2907":Lr.RELACCENT,"\u2908":Lr.REL,"\u2909":Lr.REL,"\u290a":Lr.RELSTRETCH,"\u290b":Lr.RELSTRETCH,"\u290c":Lr.WIDEREL,"\u290d":Lr.WIDEREL,"\u290e":Lr.WIDEREL,"\u290f":Lr.WIDEREL,"\u2910":Lr.WIDEREL,"\u2911":Lr.RELACCENT,"\u2912":Lr.RELSTRETCH,"\u2913":Lr.RELSTRETCH,"\u2914":Lr.RELACCENT,"\u2915":Lr.RELACCENT,"\u2916":Lr.RELACCENT,"\u2917":Lr.RELACCENT,"\u2918":Lr.RELACCENT,"\u2919":Lr.RELACCENT,"\u291a":Lr.RELACCENT,"\u291b":Lr.RELACCENT,"\u291c":Lr.RELACCENT,"\u291d":Lr.RELACCENT,"\u291e":Lr.RELACCENT,"\u291f":Lr.RELACCENT,"\u2920":Lr.RELACCENT,"\u2921":Lr.RELSTRETCH,"\u2922":Lr.RELSTRETCH,"\u2923":Lr.REL,"\u2924":Lr.REL,"\u2925":Lr.REL,"\u2926":Lr.REL,"\u2927":Lr.REL,"\u2928":Lr.REL,"\u2929":Lr.REL,"\u292a":Lr.REL,"\u292b":Lr.REL,"\u292c":Lr.REL,"\u292d":Lr.REL,"\u292e":Lr.REL,"\u292f":Lr.REL,"\u2930":Lr.REL,"\u2931":Lr.REL,"\u2932":Lr.REL,"\u2933":Lr.RELACCENT,"\u2934":Lr.REL,"\u2935":Lr.REL,"\u2936":Lr.REL,"\u2937":Lr.REL,"\u2938":Lr.REL,"\u2939":Lr.REL,"\u293a":Lr.RELACCENT,"\u293b":Lr.RELACCENT,"\u293c":Lr.RELACCENT,"\u293d":Lr.RELACCENT,"\u293e":Lr.REL,"\u293f":Lr.REL,"\u2940":Lr.REL,"\u2941":Lr.REL,"\u2942":Lr.RELACCENT,"\u2943":Lr.RELACCENT,"\u2944":Lr.RELACCENT,"\u2945":Lr.RELACCENT,"\u2946":Lr.RELACCENT,"\u2947":Lr.RELACCENT,"\u2948":Lr.RELACCENT,"\u2949":Lr.REL,"\u294a":Lr.RELACCENT,"\u294b":Lr.RELACCENT,"\u294c":Lr.REL,"\u294d":Lr.REL,"\u294e":Lr.WIDEREL,"\u294f":Lr.RELSTRETCH,"\u2950":Lr.WIDEREL,"\u2951":Lr.RELSTRETCH,"\u2952":Lr.WIDEREL,"\u2953":Lr.WIDEREL,"\u2954":Lr.RELSTRETCH,"\u2955":Lr.RELSTRETCH,"\u2956":Lr.RELSTRETCH,"\u2957":Lr.RELSTRETCH,"\u2958":Lr.RELSTRETCH,"\u2959":Lr.RELSTRETCH,"\u295a":Lr.WIDEREL,"\u295b":Lr.WIDEREL,"\u295c":Lr.RELSTRETCH,"\u295d":Lr.RELSTRETCH,"\u295e":Lr.WIDEREL,"\u295f":Lr.WIDEREL,"\u2960":Lr.RELSTRETCH,"\u2961":Lr.RELSTRETCH,"\u2962":Lr.RELACCENT,"\u2963":Lr.REL,"\u2964":Lr.RELACCENT,"\u2965":Lr.REL,"\u2966":Lr.RELACCENT,"\u2967":Lr.RELACCENT,"\u2968":Lr.RELACCENT,"\u2969":Lr.RELACCENT,"\u296a":Lr.RELACCENT,"\u296b":Lr.RELACCENT,"\u296c":Lr.RELACCENT,"\u296d":Lr.RELACCENT,"\u296e":Lr.RELSTRETCH,"\u296f":Lr.RELSTRETCH,"\u2970":Lr.RELACCENT,"\u2971":Lr.RELACCENT,"\u2972":Lr.RELACCENT,"\u2973":Lr.RELACCENT,"\u2974":Lr.RELACCENT,"\u2975":Lr.RELACCENT,"\u2976":Lr.RELACCENT,"\u2977":Lr.RELACCENT,"\u2978":Lr.RELACCENT,"\u2979":Lr.RELACCENT,"\u297a":Lr.RELACCENT,"\u297b":Lr.RELACCENT,"\u297c":Lr.RELACCENT,"\u297d":Lr.RELACCENT,"\u297e":Lr.REL,"\u297f":Lr.REL,"\u2981":Lr.BIN3,"\u2982":Lr.BIN3,"\u2999":Lr.BIN3,"\u299a":Lr.BIN3,"\u299b":Lr.BIN3,"\u299c":Lr.BIN3,"\u299d":Lr.BIN3,"\u299e":Lr.BIN3,"\u299f":Lr.BIN3,"\u29a0":Lr.BIN3,"\u29a1":Lr.BIN3,"\u29a2":Lr.BIN3,"\u29a3":Lr.BIN3,"\u29a4":Lr.BIN3,"\u29a5":Lr.BIN3,"\u29a6":Lr.BIN3,"\u29a7":Lr.BIN3,"\u29a8":Lr.BIN3,"\u29a9":Lr.BIN3,"\u29aa":Lr.BIN3,"\u29ab":Lr.BIN3,"\u29ac":Lr.BIN3,"\u29ad":Lr.BIN3,"\u29ae":Lr.BIN3,"\u29af":Lr.BIN3,"\u29b0":Lr.BIN3,"\u29b1":Lr.BIN3,"\u29b2":Lr.BIN3,"\u29b3":Lr.BIN3,"\u29b4":Lr.BIN3,"\u29b5":Lr.BIN3,"\u29b6":Lr.BIN4,"\u29b7":Lr.BIN4,"\u29b8":Lr.BIN4,"\u29b9":Lr.BIN4,"\u29ba":Lr.BIN4,"\u29bb":Lr.BIN4,"\u29bc":Lr.BIN4,"\u29bd":Lr.BIN4,"\u29be":Lr.BIN4,"\u29bf":Lr.BIN4,"\u29c0":Lr.REL,"\u29c1":Lr.REL,"\u29c2":Lr.BIN3,"\u29c3":Lr.BIN3,"\u29c4":Lr.BIN4,"\u29c5":Lr.BIN4,"\u29c6":Lr.BIN4,"\u29c7":Lr.BIN4,"\u29c8":Lr.BIN4,"\u29c9":Lr.BIN3,"\u29ca":Lr.BIN3,"\u29cb":Lr.BIN3,"\u29cc":Lr.BIN3,"\u29cd":Lr.BIN3,"\u29ce":Lr.REL,"\u29cf":Lr.REL,"\u29cf\u0338":Lr.REL,"\u29d0":Lr.REL,"\u29d0\u0338":Lr.REL,"\u29d1":Lr.REL,"\u29d2":Lr.REL,"\u29d3":Lr.REL,"\u29d4":Lr.REL,"\u29d5":Lr.REL,"\u29d6":Lr.BIN4,"\u29d7":Lr.BIN4,"\u29d8":Lr.BIN3,"\u29d9":Lr.BIN3,"\u29db":Lr.BIN3,"\u29dc":Lr.BIN3,"\u29dd":Lr.BIN3,"\u29de":Lr.REL,"\u29df":Lr.BIN3,"\u29e0":Lr.BIN3,"\u29e1":Lr.REL,"\u29e2":Lr.BIN4,"\u29e3":Lr.REL,"\u29e4":Lr.REL,"\u29e5":Lr.REL,"\u29e6":Lr.REL,"\u29e7":Lr.BIN3,"\u29e8":Lr.BIN3,"\u29e9":Lr.BIN3,"\u29ea":Lr.BIN3,"\u29eb":Lr.BIN3,"\u29ec":Lr.BIN3,"\u29ed":Lr.BIN3,"\u29ee":Lr.BIN3,"\u29ef":Lr.BIN3,"\u29f0":Lr.BIN3,"\u29f1":Lr.BIN3,"\u29f2":Lr.BIN3,"\u29f3":Lr.BIN3,"\u29f4":Lr.REL,"\u29f5":Lr.BIN4,"\u29f6":Lr.BIN4,"\u29f7":Lr.BIN4,"\u29f8":Lr.BIN3,"\u29f9":Lr.BIN3,"\u29fa":Lr.BIN3,"\u29fb":Lr.BIN3,"\u29fe":Lr.BIN4,"\u29ff":Lr.BIN4,"\u2a1d":Lr.BIN3,"\u2a1e":Lr.BIN3,"\u2a1f":Lr.BIN3,"\u2a20":Lr.BIN3,"\u2a21":Lr.BIN3,"\u2a22":Lr.BIN4,"\u2a23":Lr.BIN4,"\u2a24":Lr.BIN4,"\u2a25":Lr.BIN4,"\u2a26":Lr.BIN4,"\u2a27":Lr.BIN4,"\u2a28":Lr.BIN4,"\u2a29":Lr.BIN4,"\u2a2a":Lr.BIN4,"\u2a2b":Lr.BIN4,"\u2a2c":Lr.BIN4,"\u2a2d":Lr.BIN4,"\u2a2e":Lr.BIN4,"\u2a2f":Lr.BIN4,"\u2a30":Lr.BIN4,"\u2a31":Lr.BIN4,"\u2a32":Lr.BIN4,"\u2a33":Lr.BIN4,"\u2a34":Lr.BIN4,"\u2a35":Lr.BIN4,"\u2a36":Lr.BIN4,"\u2a37":Lr.BIN4,"\u2a38":Lr.BIN4,"\u2a39":Lr.BIN4,"\u2a3a":Lr.BIN4,"\u2a3b":Lr.BIN4,"\u2a3c":Lr.BIN4,"\u2a3d":Lr.BIN4,"\u2a3e":Lr.BIN4,"\u2a3f":Lr.BIN4,"\u2a40":Lr.BIN4,"\u2a41":Lr.BIN4,"\u2a42":Lr.BIN4,"\u2a43":Lr.BIN4,"\u2a44":Lr.BIN4,"\u2a45":Lr.BIN4,"\u2a46":Lr.BIN4,"\u2a47":Lr.BIN4,"\u2a48":Lr.BIN4,"\u2a49":Lr.BIN4,"\u2a4a":Lr.BIN4,"\u2a4b":Lr.BIN4,"\u2a4c":Lr.BIN4,"\u2a4d":Lr.BIN4,"\u2a4e":Lr.BIN4,"\u2a4f":Lr.BIN4,"\u2a50":Lr.BIN4,"\u2a51":Lr.BIN4,"\u2a52":Lr.BIN4,"\u2a53":Lr.BIN4,"\u2a54":Lr.BIN4,"\u2a55":Lr.BIN4,"\u2a56":Lr.BIN4,"\u2a57":Lr.BIN4,"\u2a58":Lr.BIN4,"\u2a59":Lr.REL,"\u2a5a":Lr.BIN4,"\u2a5b":Lr.BIN4,"\u2a5c":Lr.BIN4,"\u2a5d":Lr.BIN4,"\u2a5e":Lr.BIN4,"\u2a5f":Lr.BIN4,"\u2a60":Lr.BIN4,"\u2a61":Lr.BIN4,"\u2a62":Lr.BIN4,"\u2a63":Lr.BIN4,"\u2a64":Lr.BIN4,"\u2a65":Lr.BIN4,"\u2a66":Lr.REL,"\u2a67":Lr.REL,"\u2a68":Lr.REL,"\u2a69":Lr.REL,"\u2a6a":Lr.REL,"\u2a6b":Lr.REL,"\u2a6c":Lr.REL,"\u2a6d":Lr.REL,"\u2a6e":Lr.REL,"\u2a6f":Lr.REL,"\u2a70":Lr.REL,"\u2a71":Lr.BIN4,"\u2a72":Lr.BIN4,"\u2a73":Lr.REL,"\u2a74":Lr.REL,"\u2a75":Lr.REL,"\u2a76":Lr.REL,"\u2a77":Lr.REL,"\u2a78":Lr.REL,"\u2a79":Lr.REL,"\u2a7a":Lr.REL,"\u2a7b":Lr.REL,"\u2a7c":Lr.REL,"\u2a7d":Lr.REL,"\u2a7d\u0338":Lr.REL,"\u2a7e":Lr.REL,"\u2a7e\u0338":Lr.REL,"\u2a7f":Lr.REL,"\u2a80":Lr.REL,"\u2a81":Lr.REL,"\u2a82":Lr.REL,"\u2a83":Lr.REL,"\u2a84":Lr.REL,"\u2a85":Lr.REL,"\u2a86":Lr.REL,"\u2a87":Lr.REL,"\u2a88":Lr.REL,"\u2a89":Lr.REL,"\u2a8a":Lr.REL,"\u2a8b":Lr.REL,"\u2a8c":Lr.REL,"\u2a8d":Lr.REL,"\u2a8e":Lr.REL,"\u2a8f":Lr.REL,"\u2a90":Lr.REL,"\u2a91":Lr.REL,"\u2a92":Lr.REL,"\u2a93":Lr.REL,"\u2a94":Lr.REL,"\u2a95":Lr.REL,"\u2a96":Lr.REL,"\u2a97":Lr.REL,"\u2a98":Lr.REL,"\u2a99":Lr.REL,"\u2a9a":Lr.REL,"\u2a9b":Lr.REL,"\u2a9c":Lr.REL,"\u2a9d":Lr.REL,"\u2a9e":Lr.REL,"\u2a9f":Lr.REL,"\u2aa0":Lr.REL,"\u2aa1":Lr.REL,"\u2aa1\u0338":Lr.REL,"\u2aa2":Lr.REL,"\u2aa2\u0338":Lr.REL,"\u2aa3":Lr.REL,"\u2aa4":Lr.REL,"\u2aa5":Lr.REL,"\u2aa6":Lr.REL,"\u2aa7":Lr.REL,"\u2aa8":Lr.REL,"\u2aa9":Lr.REL,"\u2aaa":Lr.REL,"\u2aab":Lr.REL,"\u2aac":Lr.REL,"\u2aad":Lr.REL,"\u2aae":Lr.REL,"\u2aaf":Lr.REL,"\u2aaf\u0338":Lr.REL,"\u2ab0":Lr.REL,"\u2ab0\u0338":Lr.REL,"\u2ab1":Lr.REL,"\u2ab2":Lr.REL,"\u2ab3":Lr.REL,"\u2ab4":Lr.REL,"\u2ab5":Lr.REL,"\u2ab6":Lr.REL,"\u2ab7":Lr.REL,"\u2ab8":Lr.REL,"\u2ab9":Lr.REL,"\u2aba":Lr.REL,"\u2abb":Lr.REL,"\u2abc":Lr.REL,"\u2abd":Lr.REL,"\u2abe":Lr.REL,"\u2abf":Lr.REL,"\u2ac0":Lr.REL,"\u2ac1":Lr.REL,"\u2ac2":Lr.REL,"\u2ac3":Lr.REL,"\u2ac4":Lr.REL,"\u2ac5":Lr.REL,"\u2ac6":Lr.REL,"\u2ac7":Lr.REL,"\u2ac8":Lr.REL,"\u2ac9":Lr.REL,"\u2aca":Lr.REL,"\u2acb":Lr.REL,"\u2acc":Lr.REL,"\u2acd":Lr.REL,"\u2ace":Lr.REL,"\u2acf":Lr.REL,"\u2ad0":Lr.REL,"\u2ad1":Lr.REL,"\u2ad2":Lr.REL,"\u2ad3":Lr.REL,"\u2ad4":Lr.REL,"\u2ad5":Lr.REL,"\u2ad6":Lr.REL,"\u2ad7":Lr.REL,"\u2ad8":Lr.REL,"\u2ad9":Lr.REL,"\u2ada":Lr.REL,"\u2adb":Lr.REL,"\u2add":Lr.REL,"\u2add\u0338":Lr.REL,"\u2ade":Lr.REL,"\u2adf":Lr.REL,"\u2ae0":Lr.REL,"\u2ae1":Lr.REL,"\u2ae2":Lr.REL,"\u2ae3":Lr.REL,"\u2ae4":Lr.REL,"\u2ae5":Lr.REL,"\u2ae6":Lr.REL,"\u2ae7":Lr.REL,"\u2ae8":Lr.REL,"\u2ae9":Lr.REL,"\u2aea":Lr.REL,"\u2aeb":Lr.REL,"\u2aec":Lr.REL,"\u2aed":Lr.REL,"\u2aee":Lr.REL,"\u2aef":Lr.REL,"\u2af0":Lr.REL,"\u2af1":Lr.REL,"\u2af2":Lr.REL,"\u2af3":Lr.REL,"\u2af4":Lr.BIN4,"\u2af5":Lr.BIN4,"\u2af6":Lr.BIN4,"\u2af7":Lr.REL,"\u2af8":Lr.REL,"\u2af9":Lr.REL,"\u2afa":Lr.REL,"\u2afb":Lr.BIN4,"\u2afd":Lr.BIN4,"\u2afe":Lr.BIN3,"\u2b45":Lr.RELSTRETCH,"\u2b46":Lr.RELSTRETCH,"\u3008":Lr.OPEN,"\u3009":Lr.CLOSE,"\ufe37":Lr.WIDEACCENT,"\ufe38":Lr.WIDEACCENT}};function Dr(t,e){return t.length!==e.length?e.length-t.length:t===e?0:tt.codePointAt(0)))}function Fr(t){return String.fromCodePoint(...t)}function jr(t){return!!t.match(/%\s*$/)}function Ur(t){return t.trim().split(/\s+/)}function qr(t){return t.replace(/\\U(?:([0-9A-Fa-f]{4})|\{\s*([0-9A-Fa-f]{1,6})\s*\})|\\./g,((t,e,s)=>"\\\\"===t?"\\":String.fromCodePoint(parseInt(e||s,16))))}function Hr(t){return`${t.codePointAt(0).toString(16).toUpperCase()};`}Or.infix["^"]=Lr.WIDEREL,Or.infix._=Lr.WIDEREL,Or.infix["\u2adc"]=Lr.REL;class Wr extends yr{constructor(){super(...arguments),this._texClass=null,this.lspace=5/18,this.rspace=5/18}get texClass(){return null===this._texClass?this.getOperatorDef(this.getText())[2]:this._texClass}set texClass(t){this._texClass=t}get kind(){return"mo"}get isEmbellished(){return!0}coreParent(){let t=null,e=this;const s=this.factory.getNodeClass("math");for(;e&&e.isEmbellished&&e.coreMO()===this&&!(e instanceof s);)t=e,e=e.parent;return t||this}coreText(t){if(!t)return"";if(t.isEmbellished)return t.coreMO().getText();for(;((t.isKind("mrow")||t.isKind("TeXAtom")||t.isKind("mstyle")||t.isKind("mphantom"))&&1===t.childNodes.length||t.isKind("munderover"))&&t.childNodes[0];)t=t.childNodes[0];return t.isToken?t.getText():""}hasSpacingAttributes(){return this.attributes.isSet("lspace")||this.attributes.isSet("rspace")}get isAccent(){let t=!1;const e=this.coreParent().parent;if(e){const s=e.isKind("mover")?e.childNodes[e.over].coreMO()?"accent":"":e.isKind("munder")?e.childNodes[e.under].coreMO()?"accentunder":"":e.isKind("munderover")?this===e.childNodes[e.over].coreMO()?"accent":this===e.childNodes[e.under].coreMO()?"accentunder":"":"";if(s){t=void 0!==e.attributes.getExplicit(s)?t:this.attributes.get("accent")}}return t}setTeXclass(t){const{form:e,fence:s}=this.attributes.getList("form","fence");return void 0===this.getProperty("texClass")&&this.hasSpacingAttributes()?null:(s&&this.texClass===pr.REL&&("prefix"===e&&(this.texClass=pr.OPEN),"postfix"===e&&(this.texClass=pr.CLOSE)),this.adjustTeXclass(t))}adjustTeXclass(t){const e=this.texClass;let s=this.prevClass;if(e===pr.NONE)return t;if(t?(!t.getProperty("autoOP")||e!==pr.BIN&&e!==pr.REL||(s=t.texClass=pr.ORD),s=this.prevClass=t.texClass||pr.ORD,this.prevLevel=this.attributes.getInherited("scriptlevel")):s=this.prevClass=pr.NONE,e!==pr.BIN||s!==pr.NONE&&s!==pr.BIN&&s!==pr.OP&&s!==pr.REL&&s!==pr.OPEN&&s!==pr.PUNCT)if(s!==pr.BIN||e!==pr.REL&&e!==pr.CLOSE&&e!==pr.PUNCT){if(e===pr.BIN){let t=null,e=this.parent;for(;e&&e.parent&&e.isEmbellished&&(1===e.childNodes.length||!e.isKind("mrow")&&e.core()===t);)t=e,e=e.parent;t=t||this,e.childNodes[e.childNodes.length-1]===t&&(this.texClass=pr.ORD)}}else t.texClass=this.prevClass=pr.ORD;else this.texClass=pr.ORD;return this}setInheritedAttributes(t={},e=!1,s=0,i=!1){super.setInheritedAttributes(t,e,s,i);const r=this.getText();this.checkOperatorTable(r),this.checkPseudoScripts(r),this.checkPrimes(r),this.checkMathAccent(r)}getOperatorDef(t){const[e,s,i]=this.handleExplicitForm(this.getForms());this.attributes.setInherited("form",e);const r=this.constructor,n=r.OPTABLE,o=n[e][t]||n[s][t]||n[i][t];if(o)return o;this.setProperty("noDictDef",!0);const a=this.attributes.get("movablelimits");if((!!t.match(r.opPattern)||a)&&void 0===this.getProperty("texClass"))return Mr(1,2,pr.OP);const c=Sr(t),[l,h]=r.MMLSPACING[c[2]];return Mr(l,h,c[2])}checkOperatorTable(t){const e=this.getOperatorDef(t);void 0===this.getProperty("texClass")&&(this.texClass=e[2]);for(const t of Object.keys(e[3]||{}))this.attributes.setInherited(t,e[3][t]);this.lspace=((e[0]||-1)+1)/18,this.rspace=((e[1]||-1)+1)/18}getForms(){let t=null,e=this.parent,s=this.Parent;for(;s&&s.isEmbellished;)t=e,e=s.parent,s=s.Parent;if(t=t||this,e&&e.isKind("mrow")&&1!==e.nonSpaceLength()){if(e.firstNonSpace()===t)return["prefix","infix","postfix"];if(e.lastNonSpace()===t)return["postfix","infix","prefix"]}return["infix","prefix","postfix"]}handleExplicitForm(t){if(this.attributes.isSet("form")){const e=this.attributes.get("form");t=[e].concat(t.filter((t=>t!==e)))}return t}checkPseudoScripts(t){const e=this.constructor.pseudoScripts;if(!t.match(e))return;const s=this.coreParent().Parent,i=!s||!(s.isKind("msubsup")&&!s.isKind("msub"));this.setProperty("pseudoscript",i),i&&(this.attributes.setInherited("lspace",0),this.attributes.setInherited("rspace",0))}checkPrimes(t){const e=this.constructor.primes;if(!t.match(e))return;const s=this.constructor.remapPrimes,i=Fr(Br(t).map((t=>s[t])));this.setProperty("primes",i)}checkMathAccent(t){const e=this.Parent;if(void 0!==this.getProperty("mathaccent")||!e||!e.isKind("munderover"))return;const[s,i,r]=e.childNodes;if(s.isEmbellished&&s.coreMO()===this)return;const n=!(!i||!i.isEmbellished||i.coreMO()!==this),o=!(!r||!r.isEmbellished||i.coreMO()!==this);(n||o)&&(this.isMathAccent(t)?this.setProperty("mathaccent",!0):this.isMathAccentWithWidth(t)&&this.setProperty("mathaccent",!1))}isMathAccent(t=this.getText()){const e=this.constructor.mathaccents;return!!t.match(e)}isMathAccentWithWidth(t=this.getText()){const e=this.constructor.mathaccentsWithWidth;return!!t.match(e)}}Wr.defaults=Object.assign(Object.assign({},yr.defaults),{form:"infix",fence:!1,separator:!1,lspace:"thickmathspace",rspace:"thickmathspace",stretchy:!1,symmetric:!1,maxsize:"infinity",minsize:"0em",largeop:!1,movablelimits:!1,accent:!1,linebreak:"auto",lineleading:"100%",linebreakstyle:"before",indentalign:"auto",indentshift:"0",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"}),Wr.MMLSPACING=Rr,Wr.OPTABLE=Or,Wr.pseudoScripts=new RegExp(["^[\"'*`","\xaa","\xb0","\xb2-\xb4","\xb9","\xba","\u2018-\u201f","\u2032-\u2037\u2057","\u2070\u2071","\u2074-\u207f","\u2080-\u208e","]+$"].join("")),Wr.primes=new RegExp(["^[\"'","\u2018-\u201f","]+$"].join("")),Wr.opPattern=/^[a-zA-Z]{2,}$/,Wr.remapPrimes={34:8243,39:8242,8216:8245,8217:8242,8218:8242,8219:8245,8220:8246,8221:8243,8222:8243,8223:8246},Wr.mathaccents=new RegExp(["^[","\xb4\u0301\u02ca","`\u0300\u02cb","\xa8\u0308","~\u0303\u02dc","\xaf\u0304\u02c9","\u02d8\u0306","\u02c7\u030c","^\u0302\u02c6","\u20d0\u20d1","\u20d6\u20d7\u20e1","\u02d9\u0307","\u02da\u030a","\u20db","\u20dc","]$"].join("")),Wr.mathaccentsWithWidth=new RegExp(["^[","\u2190\u2192\u2194","\u23dc\u23dd","\u23de\u23df","]$"].join(""));class zr extends yr{constructor(){super(...arguments),this.texclass=pr.ORD}get kind(){return"mtext"}get isSpacelike(){return!!this.getText().match(/^\s*$/)&&!this.attributes.hasOneOf(zr.NONSPACELIKE)}}zr.NONSPACELIKE=["style","mathbackground","background"],zr.defaults=Object.assign({},yr.defaults);class Xr extends yr{constructor(){super(...arguments),this.texclass=pr.NONE}setTeXclass(t){return t}get kind(){return"mspace"}get arity(){return 0}get isSpacelike(){return!this.attributes.hasExplicit("linebreak")&&this.canBreak}get hasNewline(){const t=this.attributes.get("linebreak");return this.canBreak&&("newline"===t||"indentingnewline"===t)}get canBreak(){return!this.attributes.hasOneOf(Xr.NONSPACELIKE)&&"-"!==String(this.attributes.get("width")).trim().charAt(0)}}Xr.NONSPACELIKE=["height","depth","style","mathbackground","background"],Xr.defaults=Object.assign(Object.assign({},yr.defaults),{width:"0em",height:"0ex",depth:"0ex",linebreak:"auto",indentshift:"auto",indentalign:"auto",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"});class Vr extends yr{constructor(){super(...arguments),this.texclass=pr.ORD}get kind(){return"ms"}}Vr.defaults=Object.assign(Object.assign({},yr.defaults),{lquote:'"',rquote:'"'});class Gr extends Nr{constructor(){super(...arguments),this._core=null}get kind(){return"mrow"}get isSpacelike(){for(const t of this.childNodes)if(!t.isSpacelike)return!1;return!0}get isEmbellished(){let t=!1,e=0;for(const s of this.childNodes){if(s)if(s.isEmbellished){if(t)return!1;t=!0,this._core=e}else if(!s.isSpacelike)return!1;e++}return t}core(){return this.isEmbellished&&null!=this._core?this.childNodes[this._core]:this}coreMO(){return this.isEmbellished&&null!=this._core?this.childNodes[this._core].coreMO():this}nonSpaceLength(){let t=0;for(const e of this.childNodes)e&&!e.isSpacelike&&t++;return t}firstNonSpace(){for(const t of this.childNodes)if(t&&!t.isSpacelike)return t;return null}lastNonSpace(){let t=this.childNodes.length;for(;--t>=0;){const e=this.childNodes[t];if(e&&!e.isSpacelike)return e}return null}setTeXclass(t){if(null!=this.getProperty("open")||null!=this.getProperty("close")){this.getPrevClass(t),t=null;for(const e of this.childNodes)t=e.setTeXclass(t);return null==this.texClass&&(this.texClass=pr.INNER),this}for(const e of this.childNodes)t=e.setTeXclass(t);return this.childNodes[0]&&this.updateTeXclass(this.childNodes[0]),t}}Gr.defaults=Object.assign({},Nr.defaults);class Jr extends Gr{get kind(){return"inferredMrow"}get isInferred(){return!0}get notParent(){return!0}toString(){return"["+this.childNodes.join(",")+"]"}}Jr.defaults=Gr.defaults;class Kr extends vr{get kind(){return"mfrac"}get arity(){return 2}get linebreakContainer(){return!0}get linebreakAlign(){return""}setTeXclass(t){this.getPrevClass(t);for(const t of this.childNodes)t.setTeXclass(null);return this}setChildInheritedAttributes(t,e,s,i){(!e||s>0)&&s++;const r=this.attributes.get("numalign"),n=this.attributes.get("denomalign"),o=this.addInheritedAttributes(Object.assign({},t),{numalign:r,indentshift:"0",indentalignfirst:r,indentshiftfirst:"0",indentalignlast:"indentalign",indentshiftlast:"indentshift"}),a=this.addInheritedAttributes(Object.assign({},t),{denalign:n,indentshift:"0",indentalignfirst:n,indentshiftfirst:"0",indentalignlast:"indentalign",indentshiftlast:"indentshift"});this.childNodes[0].setInheritedAttributes(o,!1,s,i),this.childNodes[1].setInheritedAttributes(a,!1,s,!0)}}Kr.defaults=Object.assign(Object.assign({},vr.defaults),{linethickness:"medium",numalign:"center",denomalign:"center",bevelled:!1});class $r extends Nr{constructor(){super(...arguments),this.texclass=pr.ORD}get kind(){return"msqrt"}get arity(){return-1}get linebreakContainer(){return!0}setTeXclass(t){return this.getPrevClass(t),this.childNodes[0].setTeXclass(null),this}setChildInheritedAttributes(t,e,s,i){this.childNodes[0].setInheritedAttributes(t,e,s,!0)}}$r.defaults=Object.assign(Object.assign({},Nr.defaults),{"data-vertical-align":"bottom"});class Yr extends Nr{constructor(){super(...arguments),this.texclass=pr.ORD}get kind(){return"mroot"}get arity(){return 2}get linebreakContainer(){return!0}setTeXclass(t){return this.getPrevClass(t),this.childNodes[0].setTeXclass(null),this.childNodes[1].setTeXclass(null),this}setChildInheritedAttributes(t,e,s,i){this.childNodes[0].setInheritedAttributes(t,e,s,!0),this.childNodes[1].setInheritedAttributes(t,!1,s+2,i)}}Yr.defaults=Object.assign(Object.assign({},Nr.defaults),{"data-vertical-align":"bottom"});class Qr extends xr{get kind(){return"mstyle"}get notParent(){return this.childNodes[0]&&1===this.childNodes[0].childNodes.length}setInheritedAttributes(t={},e=!1,s=0,i=!1){this.attributes.setInherited("displaystyle",e),this.attributes.setInherited("scriptlevel",s),super.setInheritedAttributes(t,e,s,i)}setChildInheritedAttributes(t,e,s,i){let r=this.attributes.getExplicit("scriptlevel");null!=r&&(r=r.toString(),r.match(/^\s*[-+]/)?s+=parseInt(r):s=parseInt(r),i=!1);const n=this.attributes.getExplicit("displaystyle");null!=n&&(e=!0===n,i=!1);const o=this.attributes.getExplicit("data-cramped");null!=o&&(i=o),t=this.addInheritedAttributes(t,this.attributes.getAllAttributes()),this.childNodes[0].setInheritedAttributes(t,e,s,i)}}Qr.defaults=Object.assign(Object.assign({},xr.defaults),{scriptlevel:lr,displaystyle:lr,scriptsizemultiplier:1/Math.sqrt(2),scriptminsize:".4em",mathbackground:lr,mathcolor:lr,dir:lr,infixlinebreakstyle:"before"});class Zr extends Nr{constructor(){super(...arguments),this.texclass=pr.ORD}get kind(){return"merror"}get arity(){return-1}get linebreakContainer(){return!0}}Zr.defaults=Object.assign({},Nr.defaults);class tn extends xr{get kind(){return"mpadded"}get linebreakContainer(){return!0}setTeXclass(t){return this.getProperty("vbox")?(this.getPrevClass(t),this.texClass=pr.ORD,this.childNodes[0].setTeXclass(null),this):super.setTeXclass(t)}}tn.defaults=Object.assign(Object.assign({},xr.defaults),{width:"",height:"",depth:"",lspace:0,voffset:0});class en extends xr{constructor(){super(...arguments),this.texclass=pr.ORD}get kind(){return"mphantom"}}en.defaults=Object.assign({},xr.defaults);class sn extends Nr{constructor(){super(...arguments),this.texclass=pr.INNER,this.separators=[],this.open=null,this.close=null}get kind(){return"mfenced"}setTeXclass(t){this.getPrevClass(t),this.open&&(t=this.open.setTeXclass(t)),this.childNodes[0]&&(t=this.childNodes[0].setTeXclass(t));for(let e=1,s=this.childNodes.length;ethis.childNodes.length&&(t=1),this.attributes.set("selection",t)}setChildInheritedAttributes(t,e,s,i){var r,n;"tooltip"===this.attributes.get("actiontype").toLowerCase()?(null===(r=this.childNodes[0])||void 0===r||r.setInheritedAttributes(t,e,s,i),null===(n=this.childNodes[1])||void 0===n||n.setInheritedAttributes(t,!1,1,!1)):super.setChildInheritedAttributes(t,e,s,i)}}nn.defaults=Object.assign(Object.assign({},Nr.defaults),{actiontype:"toggle",selection:1});class on extends vr{get kind(){return"msubsup"}get arity(){return 3}get base(){return 0}get sub(){return 1}get sup(){return 2}setChildInheritedAttributes(t,e,s,i){const r=this.childNodes;r[0].setInheritedAttributes(t,e,s,i),r[1].setInheritedAttributes(t,!1,s+1,i||1===this.sub),r[2]&&r[2].setInheritedAttributes(t,!1,s+1,i||2===this.sub)}}on.defaults=Object.assign(Object.assign({},vr.defaults),{subscriptshift:"",superscriptshift:""});class an extends on{get kind(){return"msub"}get arity(){return 2}}an.defaults=Object.assign({},on.defaults);class cn extends on{get kind(){return"msup"}get arity(){return 2}get sup(){return 1}get sub(){return 2}}cn.defaults=Object.assign({},on.defaults);class ln extends vr{get kind(){return"munderover"}get arity(){return 3}get base(){return 0}get under(){return 1}get over(){return 2}get linebreakContainer(){return!0}setChildInheritedAttributes(t,e,s,i){const r=this.childNodes;r[0].setInheritedAttributes(t,e,s,i||!!r[this.over]);const n=!(e||!r[0].coreMO().attributes.get("movablelimits")),o=this.constructor.ACCENTS;r[1].setInheritedAttributes(t,!1,this.getScriptlevel(o[1],n,s),i||1===this.under),this.setInheritedAccent(1,o[1],e,s,i,n),r[2]&&(r[2].setInheritedAttributes(t,!1,this.getScriptlevel(o[2],n,s),i||2===this.under),this.setInheritedAccent(2,o[2],e,s,i,n))}getScriptlevel(t,e,s){return!e&&this.attributes.get(t)||s++,s}setInheritedAccent(t,e,s,i,r,n){const o=this.childNodes[t];if(!this.attributes.hasExplicit(e)&&o.isEmbellished){const t=o.coreMO().attributes.get("accent");this.attributes.setInherited(e,t),t!==this.attributes.getDefault(e)&&o.setInheritedAttributes({},s,this.getScriptlevel(e,n,i),r)}}}ln.defaults=Object.assign(Object.assign({},vr.defaults),{accent:!1,accentunder:!1,align:"center"}),ln.ACCENTS=["","accentunder","accent"];class hn extends ln{get kind(){return"munder"}get arity(){return 2}}hn.defaults=Object.assign({},ln.defaults);class dn extends ln{get kind(){return"mover"}get arity(){return 2}get over(){return 1}get under(){return 2}}dn.defaults=Object.assign({},ln.defaults),dn.ACCENTS=["","accent","accentunder"];class un extends on{get kind(){return"mmultiscripts"}get arity(){return 1}setChildInheritedAttributes(t,e,s,i){this.childNodes[0].setInheritedAttributes(t,e,s,i);let r=!1;for(let e=1,n=0;e...${t}>`}verifyTree(t){!this.parent||this.parent.isToken||this.mError("HTML can only be a child of a token element",t,!0)}}const An={[wr.prototype.kind]:wr,[kr.prototype.kind]:kr,[Ar.prototype.kind]:Ar,[Wr.prototype.kind]:Wr,[zr.prototype.kind]:zr,[Xr.prototype.kind]:Xr,[Vr.prototype.kind]:Vr,[Gr.prototype.kind]:Gr,[Jr.prototype.kind]:Jr,[Kr.prototype.kind]:Kr,[$r.prototype.kind]:$r,[Yr.prototype.kind]:Yr,[Qr.prototype.kind]:Qr,[Zr.prototype.kind]:Zr,[tn.prototype.kind]:tn,[en.prototype.kind]:en,[sn.prototype.kind]:sn,[rn.prototype.kind]:rn,[nn.prototype.kind]:nn,[an.prototype.kind]:an,[cn.prototype.kind]:cn,[on.prototype.kind]:on,[hn.prototype.kind]:hn,[dn.prototype.kind]:dn,[ln.prototype.kind]:ln,[un.prototype.kind]:un,[pn.prototype.kind]:pn,[mn.prototype.kind]:mn,[fn.prototype.kind]:fn,[bn.prototype.kind]:bn,[gn.prototype.kind]:gn,[En.prototype.kind]:En,[Nn.prototype.kind]:Nn,[yn.prototype.kind]:yn,[xn.prototype.kind]:xn,[vn.prototype.kind]:vn,[Tn.prototype.kind]:Tn,[Cn.prototype.kind]:Cn,[_n.prototype.kind]:_n,[wn.prototype.kind]:wn,[Tr.prototype.kind]:Tr,[_r.prototype.kind]:_r,[kn.prototype.kind]:kn};class Mn extends cr{get MML(){return this.node}}Mn.defaultNodes=An;class Ln{constructor(){this.bits=0}static allocate(...t){for(const e of t){if(this.has(e))throw new Error("Bit already allocated for "+e);if(this.next===Ln.MAXBIT)throw new Error("Maximum number of bits already allocated");this.names.set(e,this.next),this.next<<=1}}static has(t){return this.names.has(t)}set(t){this.bits|=this.getBit(t)}clear(t){this.bits&=~this.getBit(t)}isSet(t){return!!(this.bits&this.getBit(t))}reset(){this.bits=0}getBit(t){const e=this.constructor.names.get(t);if(!e)throw new Error("Unknown bit-field name: "+t);return e}}function In(...t){const e=class extends Ln{};return e.allocate(...t),e}function Sn(t){return new Promise((function e(s,i){const r=t=>{var r;t.retry instanceof Promise?t.retry.then((()=>e(s,i))).catch((t=>i(t))):(null===(r=t.restart)||void 0===r?void 0:r.isCallback)?MathJax.Callback.After((()=>e(s,i)),t.restart):i(t)};try{const e=t();e instanceof Promise?e.then((t=>s(t))).catch((t=>r(t))):s(e)}catch(t){r(t)}}))}function Rn(t){const e=new Error("MathJax retry -- an asynchronous action is required; try using one of the promise-based functions and await its resolution.");throw e.retry=t,e}Ln.MAXBIT=1<<31,Ln.next=1,Ln.names=new Map;var On=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};class Dn extends mi{static create(t){const e=new this;for(const s of Object.keys(t)){const[i,r]=this.action(s,t[s]);r&&e.add(i,r)}return e}static action(t,e){let s,i,r=!0;const n=e[0];if(1===e.length||"boolean"==typeof e[1])2===e.length&&(r=e[1]),[s,i]=this.methodActions(t);else if("string"==typeof e[1])if("string"==typeof e[2]){4===e.length&&(r=e[3]);const[t,n]=e.slice(1);[s,i]=this.methodActions(t,n)}else 3===e.length&&(r=e[2]),[s,i]=this.methodActions(e[1]);else 4===e.length&&(r=e[3]),[s,i]=e.slice(1);return[{id:t,renderDoc:s,renderMath:i,convert:r},n]}static methodActions(t,e=t){return[e=>(t&&e[t](),!1),(t,s)=>(e&&t[e](s),!1)]}renderDoc(t,e=nr.UNPROCESSED){for(const s of this.items)if(s.priority>=e&&s.item.renderDoc(t))return}renderMath(t,e,s=nr.UNPROCESSED){for(const i of this.items)if(i.priority>=s&&i.item.renderMath(t,e))return}renderConvert(t,e,s=nr.LAST){for(const i of this.items){if(i.priority>s)return;if(i.item.convert&&i.item.renderMath(t,e))return}}findID(t){for(const e of this.items)if(e.item.id===t)return e.item;return null}}const Pn={all:!1,processed:!1,inputJax:null,outputJax:null},Bn={all:!0,processed:!0,inputJax:[],outputJax:[]};class Fn extends Yi{compile(t){return null}}class jn extends Qi{typeset(t,e=null){return null}escaped(t,e){return null}}class Un extends sr{}class qn{constructor(t,e,s){const i=this.constructor;this.document=t,this.options=Di(Oi({},i.OPTIONS),s),this.math=new(this.options.MathList||Un),this.renderActions=Dn.create(this.options.renderActions),this._actionPromises=[],this._readyPromise=Promise.resolve(),this.processed=new qn.ProcessBits,this.outputJax=this.options.OutputJax||new jn;let r=this.options.InputJax||[new Fn];Array.isArray(r)||(r=[r]),this.inputJax=r,this.adaptor=e,this.outputJax.setAdaptor(e),this.inputJax.map((t=>t.setAdaptor(e))),this.mmlFactory=this.options.MmlFactory||new Mn,this.inputJax.map((t=>t.setMmlFactory(this.mmlFactory))),this.outputJax.initialize(),this.inputJax.map((t=>t.initialize()))}get kind(){return this.constructor.KIND}addRenderAction(t,...e){const[s,i]=Dn.action(t,e);this.renderActions.add(s,i)}removeRenderAction(t){const e=this.renderActions.findID(t);e&&this.renderActions.remove(e)}render(){return this.clearPromises(),this.renderActions.renderDoc(this),this}renderPromise(){return this.whenReady((()=>Sn((()=>On(this,void 0,void 0,(function*(){return this.render(),yield this.actionPromises(),this.clearPromises(),this}))))))}rerender(t=nr.RERENDER){return this.state(t-1),this.render(),this}rerenderPromise(t=nr.RERENDER){return this.whenReady((()=>Sn((()=>On(this,void 0,void 0,(function*(){return this.rerender(t),yield this.actionPromises(),this.clearPromises(),this}))))))}convert(t,e={}){let{format:s,display:i,end:r,ex:n,em:o,containerWidth:a,scale:c,family:l}=Di({format:this.inputJax[0].name,display:!0,end:nr.LAST,em:16,ex:8,containerWidth:null,scale:1,family:""},e);null===a&&(a=80*n);const h=this.inputJax.reduce(((t,e)=>e.name===s?e:t),null),d=new this.options.MathItem(t,h,i);return d.start.node=this.adaptor.body(this.document),d.setMetrics(o,n,a,c),l&&this.outputJax.options.mtextInheritFont&&(d.outputData.mtextFamily=l),l&&this.outputJax.options.merrorInheritFont&&(d.outputData.merrorFamily=l),this.clearPromises(),d.convert(this,r),d.typesetRoot||d.root}convertPromise(t,e={}){return this.whenReady((()=>Sn((()=>On(this,void 0,void 0,(function*(){const s=this.convert(t,e);return yield this.actionPromises(),this.clearPromises(),s}))))))}whenReady(t){return this._readyPromise=this._readyPromise.catch((t=>{})).then((()=>{const e=this._readyPromise;this._readyPromise=Promise.resolve();const s=t(),i=this._readyPromise.then((()=>s));return this._readyPromise=e,i}))}actionPromises(){return Promise.all(this._actionPromises)}clearPromises(){this._actionPromises=[]}savePromise(t){this._actionPromises.push(t)}findMath(t=null){return this.processed.set("findMath"),this}compile(){if(!this.processed.isSet("compile")){const t=[];for(const e of this.math)this.compileMath(e),void 0!==e.inputData.recompile&&t.push(e);for(const e of t){const t=e.inputData.recompile;e.state(t.state),e.inputData.recompile=t,this.compileMath(e)}this.processed.set("compile")}return this}compileMath(t){try{t.compile(this)}catch(e){if(e.retry||e.restart)throw e;this.options.compileError(this,t,e),t.inputData.error=e}}compileError(t,e){t.root=this.mmlFactory.create("math",null,[this.mmlFactory.create("merror",{"data-mjx-error":e.message,title:e.message},[this.mmlFactory.create("mtext",null,[this.mmlFactory.create("text").setText("Math input error")])])]),t.display&&t.root.attributes.set("display","block"),t.inputData.error=e.message}typeset(){if(!this.processed.isSet("typeset")){for(const t of this.math)try{t.typeset(this)}catch(e){if(e.retry||e.restart)throw e;this.options.typesetError(this,t,e),t.outputData.error=e}this.processed.set("typeset")}return this}typesetError(t,e){t.typesetRoot=this.adaptor.node("mjx-container",{class:"MathJax mjx-output-error",jax:this.outputJax.name},[this.adaptor.node("span",{"data-mjx-error":e.message,title:e.message,style:{color:"red","background-color":"yellow","line-height":"normal"}},[this.adaptor.text("Math output error")])]),t.display&&this.adaptor.setAttributes(t.typesetRoot,{style:{display:"block",margin:"1em 0","text-align":"center"}}),t.outputData.error=e.message}getMetrics(){return this.processed.isSet("getMetrics")||(this.outputJax.getMetrics(this),this.processed.set("getMetrics")),this}updateDocument(){if(!this.processed.isSet("updateDocument")){for(const t of this.math.reversed())t.updateDocument(this);this.processed.set("updateDocument")}return this}removeFromDocument(t=!1){return this}state(t,e=!1){for(const s of this.math)s.state(t,e);return te.reset(...t.inputJax))),t.outputJax&&this.outputJax.reset(...t.outputJax),this}clear(){return this.reset(),this.math.clear(),this}done(){return Promise.resolve()}concat(t){return this.math.merge(t),this}clearMathItemsWithin(t){const e=this.getMathItemsWithin(t);for(const t of e.slice(0).reverse())t.clear();return this.math.remove(...e),e}getMathItemsWithin(t){Array.isArray(t)||(t=[t]);const e=this.adaptor,s=[],i=e.getElements(t,this.document);t:for(const t of this.math)for(const r of i)if(t.start.node&&e.contains(r,t.start.node)){s.push(t);continue t}return s}}qn.KIND="MathDocument",qn.OPTIONS={OutputJax:null,InputJax:null,MmlFactory:null,MathList:Un,MathItem:class extends rr{},compileError:(t,e,s)=>{t.compileError(e,s)},typesetError:(t,e,s)=>{t.typesetError(e,s)},renderActions:Mi({find:[nr.FINDMATH,"findMath","",!1],compile:[nr.COMPILED],metrics:[nr.METRICS,"getMetrics","",!1],typeset:[nr.TYPESET],update:[nr.INSERTED,"updateDocument",!1]})},qn.ProcessBits=In("findMath","compile","getMetrics","typeset","updateDocument");class Hn extends qn{}class Wn{constructor(t,e=5){this.documentClass=Hn,this.adaptor=t,this.priority=e}get name(){return this.constructor.NAME}handlesDocument(t){return!1}create(t,e){return new this.documentClass(t,this.adaptor,e)}}Wn.NAME="generic";class zn extends mi{register(t){return this.add(t,t.priority)}unregister(t){this.remove(t)}handlesDocument(t){for(const e of this){const s=e.item;if(s.handlesDocument(t))return s}throw new Error("Can't find handler for document")}document(t,e=null){return this.handlesDocument(t).create(t,e)}}class Xn{static methodName(t){return"visit"+(t.charAt(0).toUpperCase()+t.substring(1)).replace(/[^a-z0-9_]/gi,"_")+"Node"}constructor(t){this.nodeHandlers=new Map;for(const e of t.getKinds()){const t=this[Xn.methodName(e)];t&&this.nodeHandlers.set(e,t)}}visitTree(t,...e){return this.visitNode(t,...e)}visitNode(t,...e){return(this.nodeHandlers.get(t.kind)||this.visitDefault).call(this,t,...e)}visitDefault(t,...e){if("childNodes"in t)for(const s of t.childNodes)this.visitNode(s,...e)}setNodeHandler(t,e){this.nodeHandlers.set(t,e)}removeNodeHandler(t){this.nodeHandlers.delete(t)}}const Vn="data-mjx-";class Gn extends Xn{constructor(t=null){t||(t=new Mn),super(t)}visitTextNode(t,...e){}visitXMLNode(t,...e){}visitHtmlNode(t,...e){}getKind(t){const e=t.kind;return ji(e,this.constructor.rename,e)}getAttributeList(t){const e=this.constructor,s=ji(t.kind,e.defaultAttributes,{}),i=Object.assign({},s,this.getDataAttributes(t),t.attributes.getAllAttributes()),r=e.variants;return Object.hasOwn(i,"mathvariant")&&(Object.hasOwn(r,i.mathvariant)?i.mathvariant=r[i.mathvariant]:t.getProperty("ignore-variant")&&delete i.mathvariant),i}getDataAttributes(t){const e={},s=t.attributes.getExplicit("mathvariant"),i=this.constructor.variants;s&&(t.getProperty("ignore-variant")||Object.hasOwn(i,s))&&this.setDataAttribute(e,"variant",s),t.getProperty("variantForm")&&this.setDataAttribute(e,"alternate","1"),t.getProperty("pseudoscript")&&this.setDataAttribute(e,"pseudoscript","true"),!1===t.getProperty("autoOP")&&this.setDataAttribute(e,"auto-op","false");const r=t.getProperty("vbox");r&&this.setDataAttribute(e,"vbox",r);const n=t.getProperty("scriptalign");n&&this.setDataAttribute(e,"script-align",n);const o=t.getProperty("mathaccent");void 0!==o&&(o&&!t.isMathAccent()||!o&&!t.isMathAccentWithWidth())&&this.setDataAttribute(e,"mathaccent",o.toString());const a=t.getProperty("texClass");if(void 0!==a){let s=!0;if(a===pr.OP&&t.isKind("mi")){const e=t.getText();s=!(e.length>1&&e.match(kr.operatorName))}s&&this.setDataAttribute(e,"texclass",a<0?"NONE":mr[a])}return t.getProperty("smallmatrix")&&this.setDataAttribute(e,"smallmatrix","true"),e}setDataAttribute(t,e,s){t[Vn+e]=s}}Gn.rename={TeXAtom:"mrow"},Gn.variants={"-tex-calligraphic":"script","-tex-bold-calligraphic":"bold-script","-tex-oldstyle":"normal","-tex-bold-oldstyle":"bold","-tex-mathit":"italic"},Gn.defaultAttributes={math:{xmlns:"http://www.w3.org/1998/Math/MathML"}};class Jn extends Gn{constructor(){super(...arguments),this.document=null}visitTree(t,e){this.document=e;const s=e.createElement("top");return this.visitNode(t,s),this.document=null,s.firstChild}visitTextNode(t,e){e.appendChild(this.document.createTextNode(t.getText()))}visitXMLNode(t,e){e.appendChild(t.getXML().cloneNode(!0))}visitHtmlNode(t,e){e.appendChild(t.getHTML().cloneNode(!0))}visitInferredMrowNode(t,e){for(const s of t.childNodes)this.visitNode(s,e)}visitDefault(t,e){const s=this.document.createElement(this.getKind(t));this.addAttributes(t,s);for(const e of t.childNodes)this.visitNode(e,s);e.appendChild(s)}addAttributes(t,e){const s=this.getAttributeList(t);for(const t of Object.keys(s))e.setAttribute(t,s[t].toString())}}class Kn extends Gn{visitTree(t){return this.visitNode(t,"")}visitTextNode(t,e){return this.quoteHTML(t.getText())}visitXMLNode(t,e){return e+t.getSerializedXML()}visitHtmlNode(t,e){return t.getSerializedHTML()}visitInferredMrowNode(t,e){const s=[];for(const i of t.childNodes)s.push(this.visitNode(i,e));return s.join("\n")}visitAnnotationNode(t,e){const s=this.childNodeMml(t,"","");return`${e}${s} `}visitDefault(t,e){const s=this.getKind(t),[i,r]=t.isToken||0===t.childNodes.length?["",""]:["\n",e],n=this.childNodeMml(t,e+" ",i),o=n.match(/\S/)?i+n+r:"";return`${e}<${s}${this.getAttributes(t)}>${o}${s}>`}childNodeMml(t,e,s){let i="";for(const r of t.childNodes)i+=this.visitNode(r,e)+s;return i}getAttributes(t){const e=[],s=this.getAttributeList(t);for(const t of Object.keys(s)){const i=String(s[t]);void 0!==i&&e.push(t+'="'+this.quoteHTML(i)+'"')}return e.length?" "+e.join(" "):""}quoteHTML(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/[\uD800-\uDBFF]./g,this.toEntity).replace(/[\u0080-\uD7FF\uE000-\uFFFF]/g,this.toEntity)}toEntity(t){return Hr(t)}}class $n{get kind(){return this.node.kind}constructor(t,e){this.factory=t,this.node=e}wrap(t){return this.factory.wrap(t)}walkTree(t,e){if(t(this,e),"childNodes"in this)for(const s of this.childNodes)s&&s.walkTree(t,e);return e}}class Yn extends ar{wrap(t,...e){return this.create(t.kind,t,...e)}}const Qn={version:ii,context:di,handlers:new zn,document:function(t,e){return Qn.handlers.document(t,e)},handleRetriesFor:Sn,retryAfter:Rn,asyncLoad:null,asyncIsSynchronous:!1};class Zn extends rr{get adaptor(){return this.inputJax.adaptor}constructor(t,e,s=!0,i={node:null,n:0,delim:""},r={node:null,n:0,delim:""}){super(t,e,s,i,r)}updateDocument(t){if(this.state()=nr.TYPESET){const e=this.adaptor,s=this.start.node;let i=e.text("");if(t){const t=this.start.delim+this.math+this.end.delim;if(this.inputJax.processStrings)i=e.text(t);else{const s=e.parse(t,"text/html");i=e.firstChild(e.body(s))}}e.parent(s)&&e.replace(i,s),this.start.node=this.end.node=i,this.start.n=this.end.n=0}}}class to extends sr{}class eo{constructor(t=null){const e=this.constructor;this.options=Di(Oi({},e.OPTIONS),t),this.init(),this.getPatterns()}init(){this.strings=[],this.string="",this.snodes=[],this.nodes=[],this.stack=[]}getPatterns(){const t=Li(this.options.skipHtmlTags),e=Li(this.options.ignoreHtmlClass),s=Li(this.options.processHtmlClass);this.skipHtmlTags=new RegExp("^(?:"+t.join("|")+")$","i"),this.ignoreHtmlClass=new RegExp("(?:^| )(?:"+e.join("|")+")(?: |$)"),this.processHtmlClass=new RegExp("(?:^| )(?:"+s+")(?: |$)")}pushString(){this.string.match(/\S/)&&(this.strings.push(this.string),this.nodes.push(this.snodes)),this.string="",this.snodes=[]}extendString(t,e){this.snodes.push([t,e.length]),this.string+=e}handleText(t,e){return e||this.extendString(t,this.adaptor.value(t)),this.adaptor.next(t)}handleTag(t,e){if(!e){const e=this.options.includeHtmlTags[this.adaptor.kind(t)];e instanceof Function?this.extendString(t,e(t,this.adaptor)):this.extendString(t,e)}return this.adaptor.next(t)}handleContainer(t,e){this.pushString();const s=this.adaptor.getAttribute(t,"class")||"",i=this.adaptor.kind(t)||"",r=this.processHtmlClass.exec(s);let n=t;return!this.adaptor.firstChild(t)||this.adaptor.getAttribute(t,"data-MJX")||!r&&this.skipHtmlTags.exec(i)?n=this.adaptor.next(t):(this.adaptor.next(t)&&this.stack.push([this.adaptor.next(t),e]),n=this.adaptor.firstChild(t),e=(e||this.ignoreHtmlClass.exec(s))&&!r),[n,e]}handleOther(t,e){return this.pushString(),this.adaptor.next(t)}find(t){this.init();const e=this.adaptor.next(t);let s=!1;const i=this.options.includeHtmlTags;for(;t&&t!==e;){const e=this.adaptor.kind(t);"#text"===e?t=this.handleText(t,s):Object.hasOwn(i,e)?t=this.handleTag(t,s):e?[t,s]=this.handleContainer(t,s):t=this.handleOther(t,s),!t&&this.stack.length&&(this.pushString(),[t,s]=this.stack.pop())}this.pushString();const r=[this.strings,this.nodes];return this.init(),r}}eo.OPTIONS={skipHtmlTags:["script","noscript","style","textarea","pre","code","math","select","option","mjx-container"],includeHtmlTags:Mi({br:"\n",wbr:"","#comment":""}),ignoreHtmlClass:"mathjax_ignore",processHtmlClass:"mathjax_process"},or("STYLES",nr.INSERTED+1);class so extends qn{constructor(t,e,s){const[i,r]=Fi(s,eo.OPTIONS);super(t,e,i),this.domStrings=this.options.DomStrings||new eo(r),this.domStrings.adaptor=e,this.styles=[]}findPosition(t,e,s,i){const r=this.adaptor,n=1/(i[t].length||1);let o=t;for(const[a,c]of i[t]){if(e<=c&&"#text"===r.kind(a))return{i:o,node:a,n:Math.max(e,0),delim:s};e-=c,o+=n}return{node:null,n:0,delim:s}}mathItem(t,e,s){const i=t.math,r=this.findPosition(t.n,t.start.n,t.open,s),n=this.findPosition(t.n,t.end.n,t.close,s);return new this.options.MathItem(i,e,t.display,r,n)}findMath(t){if(!this.processed.isSet("findMath")){this.adaptor.document=this.document,t=Di({elements:this.options.elements||[this.adaptor.body(this.document)]},t);const e=this.adaptor.getElements(t.elements,this.document);for(const t of this.inputJax){const s=t.processStrings?this.findMathFromStrings(t,e):this.findMathFromDOM(t,e);this.math.merge(s)}this.processed.set("findMath")}return this}findMathFromStrings(t,e){const s=[],i=[];for(const t of e){const[e,r]=this.domStrings.find(t);s.push(...e),i.push(...r)}const r=new this.options.MathList;for(const e of t.findMath(s))r.push(this.mathItem(e,t,i));return r}findMathFromDOM(t,e){const s=[];for(const i of e)for(const e of t.findMath(i))s.push(new this.options.MathItem(e.math,t,e.display,e.start,e.end));return new this.options.MathList(...s)}updateDocument(){return this.processed.isSet("updateDocument")||(this.addPageElements(),this.addStyleSheet(),super.updateDocument(),this.processed.set("updateDocument")),this}addPageElements(){const t=this.adaptor,e=t.body(this.document),s=this.documentPageElements();if(s){const i=t.firstChild(e);i?t.insert(s,i):t.append(e,s)}}addStyleSheet(){const t=this.documentStyleSheet(),e=this.adaptor;if(t&&!e.parent(t)){const s=e.head(this.document),i=this.findSheet(s,e.getAttribute(t,"id"));i?e.replace(t,i):e.append(s,t)}}findSheet(t,e){if(e)for(const s of this.adaptor.tags(t,"style"))if(this.adaptor.getAttribute(s,"id")===e)return s;return null}removeFromDocument(t=!1){if(this.processed.isSet("updateDocument"))for(const e of this.math)e.state()>=nr.INSERTED&&e.state(nr.TYPESET,t);return this.processed.clear("updateDocument"),this}documentStyleSheet(){return this.outputJax.styleSheet(this)}documentPageElements(){return this.outputJax.pageElements(this)}addStyles(t){this.styles.push(t),"insertStyles"in this.outputJax&&this.outputJax.insertStyles(t)}getStyles(){return this.styles}}so.KIND="HTML",so.OPTIONS=Object.assign(Object.assign({},qn.OPTIONS),{renderActions:Mi(Object.assign(Object.assign({},qn.OPTIONS.renderActions),{styles:[nr.STYLES,"","updateStyleSheet",!1]})),MathList:to,MathItem:Zn,DomStrings:null});class io extends Wn{constructor(){super(...arguments),this.documentClass=so}handlesDocument(t){const e=this.adaptor;if("string"==typeof t)try{t=e.parse(t,"text/html")}catch(t){}return t instanceof e.window.Document||t instanceof e.window.HTMLElement||t instanceof e.window.DocumentFragment}create(t,e){const s=this.adaptor;if("string"==typeof t)t=s.parse(t,"text/html");else if(t instanceof s.window.HTMLElement||t instanceof s.window.DocumentFragment){const e=t;t=s.parse("","text/html"),s.append(s.body(t),e)}return super.create(t,e)}}function ro(t){const e=new io(t);return Qn.handlers.register(e),e}function no(t){return Qn.asyncLoad?new Promise(((e,s)=>{const i=Qn.asyncLoad(t);i instanceof Promise?i.then((t=>e(t))).catch((t=>s(t))):e(i)})):Promise.reject(`Can't load '${t}': No mathjax.asyncLoad method specified`)}const oo=1e6,ao={px:1,in:96,cm:96/2.54,mm:96/25.4},co={em:1,ex:.431,pt:.1,pc:1.2,mu:1/18},lo={veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18,thin:.04,medium:.06,thick:.1,normal:1,big:2,small:1/Math.sqrt(2),infinity:oo};function ho(t,e=0,s=1,i=16){if("string"!=typeof t&&(t=String(t)),""===t||null==t)return e;if(lo[t])return lo[t];const r=t.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);if(!r||""===r[0])return e;const n=parseFloat(r[1]||"1"),o=r[2];return Object.hasOwn(ao,o)?n*ao[o]/i/s:Object.hasOwn(co,o)?n*co[o]:"%"===o?n/100*e:n*e}function uo(t){return(100*t).toFixed(1).replace(/\.?0+$/,"")+"%"}function po(t){return Math.abs(t)<.001?"0":t.toFixed(3).replace(/\.?0+$/,"")+"em"}function mo(t,e=-oo,s=16){return t*=s,e&&tthis.w&&(this.w=r),n>this.h&&(this.h=n),o>this.d&&(this.d=o)}append(t){const e=t.rscale;this.w+=e*(t.w+t.L+t.R),e*t.h>this.h&&(this.h=e*t.h),e*t.d>this.d&&(this.d=e*t.d)}updateFrom(t){this.h=t.h,this.d=t.d,this.w=t.w,t.pwidth&&(this.pwidth=t.pwidth)}copy(){const t=new fo;return Object.assign(t,this),t}}fo.fullWidth="100%",fo.boxSides=[["Top",0,"h"],["Right",1,"w"],["Bottom",2,"d"],["Left",3,"w"]];const go={loadMissingEntities:!0},bo={ApplyFunction:"\u2061",Backslash:"\u2216",Because:"\u2235",Breve:"\u02d8",Cap:"\u22d2",CenterDot:"\xb7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",Congruent:"\u2261",ContourIntegral:"\u222e",Coproduct:"\u2210",Cross:"\u2a2f",Cup:"\u22d3",CupCap:"\u224d",Dagger:"\u2021",Del:"\u2207",Delta:"\u0394",Diamond:"\u22c4",DifferentialD:"\u2146",DotEqual:"\u2250",DoubleDot:"\xa8",DoubleRightTee:"\u22a8",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownLeftVector:"\u21bd",DownRightVector:"\u21c1",DownTee:"\u22a4",Downarrow:"\u21d3",Element:"\u2208",EqualTilde:"\u2242",Equilibrium:"\u21cc",Exists:"\u2203",ExponentialE:"\u2147",FilledVerySmallSquare:"\u25aa",ForAll:"\u2200",Gamma:"\u0393",Gg:"\u22d9",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Hacek:"\u02c7",Hat:"^",HumpDownHump:"\u224e",HumpEqual:"\u224f",Im:"\u2111",ImaginaryI:"\u2148",Integral:"\u222b",Intersection:"\u22c2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Lambda:"\u039b",Larr:"\u219e",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",LeftArrowRightArrow:"\u21c6",LeftCeiling:"\u2308",LeftDownVector:"\u21c3",LeftFloor:"\u230a",LeftRightArrow:"\u2194",LeftTee:"\u22a3",LeftTriangle:"\u22b2",LeftTriangleEqual:"\u22b4",LeftUpVector:"\u21bf",LeftVector:"\u21bc",Leftarrow:"\u21d0",Leftrightarrow:"\u21d4",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",Ll:"\u22d8",Lleftarrow:"\u21da",LongLeftArrow:"\u27f5",LongLeftRightArrow:"\u27f7",LongRightArrow:"\u27f6",Longleftarrow:"\u27f8",Longleftrightarrow:"\u27fa",Longrightarrow:"\u27f9",Lsh:"\u21b0",MinusPlus:"\u2213",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotLeftTriangle:"\u22ea",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotPrecedes:"\u2280",NotPrecedesSlantEqual:"\u22e0",NotRightTriangle:"\u22eb",NotRightTriangleEqual:"\u22ed",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsSlantEqual:"\u22e1",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotVerticalBar:"\u2224",Omega:"\u03a9",OverBar:"\u203e",OverBrace:"\u23de",PartialD:"\u2202",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",Product:"\u220f",Proportional:"\u221d",Psi:"\u03a8",Rarr:"\u21a0",Re:"\u211c",ReverseEquilibrium:"\u21cb",RightAngleBracket:"\u27e9",RightArrow:"\u2192",RightArrowLeftArrow:"\u21c4",RightCeiling:"\u2309",RightDownVector:"\u21c2",RightFloor:"\u230b",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTriangle:"\u22b3",RightTriangleEqual:"\u22b5",RightUpVector:"\u21be",RightVector:"\u21c0",Rightarrow:"\u21d2",Rrightarrow:"\u21db",Rsh:"\u21b1",Sigma:"\u03a3",SmallCircle:"\u2218",Sqrt:"\u221a",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Star:"\u22c6",Subset:"\u22d0",SubsetEqual:"\u2286",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",SuchThat:"\u220b",Sum:"\u2211",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22d1",Therefore:"\u2234",Theta:"\u0398",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",UnderBar:"_",UnderBrace:"\u23df",Union:"\u22c3",UnionPlus:"\u228e",UpArrow:"\u2191",UpDownArrow:"\u2195",UpTee:"\u22a5",Uparrow:"\u21d1",Updownarrow:"\u21d5",Upsilon:"\u03a5",Vdash:"\u22a9",Vee:"\u22c1",VerticalBar:"\u2223",VerticalTilde:"\u2240",Vvdash:"\u22aa",Wedge:"\u22c0",Xi:"\u039e",amp:"&",acute:"\xb4",aleph:"\u2135",alpha:"\u03b1",amalg:"\u2a3f",and:"\u2227",ang:"\u2220",angmsd:"\u2221",angsph:"\u2222",ape:"\u224a",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",beta:"\u03b2",beth:"\u2136",between:"\u226c",bigcirc:"\u25ef",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",blacklozenge:"\u29eb",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",bowtie:"\u22c8",boxdl:"\u2510",boxdr:"\u250c",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxul:"\u2518",boxur:"\u2514",bsol:"\\",bull:"\u2022",cap:"\u2229",check:"\u2713",chi:"\u03c7",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledR:"\xae",circledS:"\u24c8",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",clubs:"\u2663",colon:":",comp:"\u2201",ctdot:"\u22ef",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cup:"\u222a",curarr:"\u21b7",curlyvee:"\u22ce",curlywedge:"\u22cf",dagger:"\u2020",daleth:"\u2138",ddarr:"\u21ca",deg:"\xb0",delta:"\u03b4",digamma:"\u03dd",div:"\xf7",divideontimes:"\u22c7",dot:"\u02d9",doteqdot:"\u2251",dotplus:"\u2214",dotsquare:"\u22a1",dtdot:"\u22f1",ecir:"\u2256",efDot:"\u2252",egs:"\u2a96",ell:"\u2113",els:"\u2a95",empty:"\u2205",epsi:"\u03b5",epsiv:"\u03f5",erDot:"\u2253",eta:"\u03b7",eth:"\xf0",flat:"\u266d",fork:"\u22d4",frown:"\u2322",gEl:"\u2a8c",gamma:"\u03b3",gap:"\u2a86",gimel:"\u2137",gnE:"\u2269",gnap:"\u2a8a",gne:"\u2a88",gnsim:"\u22e7",gt:">",gtdot:"\u22d7",harrw:"\u21ad",hbar:"\u210f",hellip:"\u2026",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",imath:"\u0131",infin:"\u221e",intcal:"\u22ba",iota:"\u03b9",jmath:"\u0237",kappa:"\u03ba",kappav:"\u03f0",lEg:"\u2a8b",lambda:"\u03bb",lap:"\u2a85",larrlp:"\u21ab",larrtl:"\u21a2",lbrace:"{",lbrack:"[",le:"\u2264",leftleftarrows:"\u21c7",leftthreetimes:"\u22cb",lessdot:"\u22d6",lmoust:"\u23b0",lnE:"\u2268",lnap:"\u2a89",lne:"\u2a87",lnsim:"\u22e6",longmapsto:"\u27fc",looparrowright:"\u21ac",lowast:"\u2217",loz:"\u25ca",lt:"<",ltimes:"\u22c9",ltri:"\u25c3",macr:"\xaf",malt:"\u2720",mho:"\u2127",mu:"\u03bc",multimap:"\u22b8",nLeftarrow:"\u21cd",nLeftrightarrow:"\u21ce",nRightarrow:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",natur:"\u266e",nearr:"\u2197",nharr:"\u21ae",nlarr:"\u219a",not:"\xac",nrarr:"\u219b",nu:"\u03bd",nvDash:"\u22ad",nvdash:"\u22ac",nwarr:"\u2196",omega:"\u03c9",omicron:"\u03bf",or:"\u2228",osol:"\u2298",period:".",phi:"\u03c6",phiv:"\u03d5",pi:"\u03c0",piv:"\u03d6",prap:"\u2ab7",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",prime:"\u2032",psi:"\u03c8",quot:'"',rarrtl:"\u21a3",rbrace:"}",rbrack:"]",rho:"\u03c1",rhov:"\u03f1",rightrightarrows:"\u21c9",rightthreetimes:"\u22cc",ring:"\u02da",rmoust:"\u23b1",rtimes:"\u22ca",rtri:"\u25b9",scap:"\u2ab8",scnE:"\u2ab6",scnap:"\u2aba",scnsim:"\u22e9",sdot:"\u22c5",searr:"\u2198",sect:"\xa7",sharp:"\u266f",sigma:"\u03c3",sigmav:"\u03c2",simne:"\u2246",smile:"\u2323",spades:"\u2660",sub:"\u2282",subE:"\u2ac5",subnE:"\u2acb",subne:"\u228a",supE:"\u2ac6",supnE:"\u2acc",supne:"\u228b",swarr:"\u2199",tau:"\u03c4",theta:"\u03b8",thetav:"\u03d1",tilde:"\u02dc",times:"\xd7",triangle:"\u25b5",triangleq:"\u225c",upsi:"\u03c5",upuparrows:"\u21c8",veebar:"\u22bb",vellip:"\u22ee",weierp:"\u2118",xi:"\u03be",yen:"\xa5",zeta:"\u03b6",zigrarr:"\u21dd",nbsp:"\xa0",rsquo:"\u2019",lsquo:"\u2018"},Eo={};function No(t,e){Object.assign(bo,t),Eo[e]=!0}function yo(t){delete bo[t]}function xo(t){return t.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi,vo)}function vo(t,e){if("#"===e.charAt(0))return Co(e.slice(1));if(bo[e])return bo[e];if(go.loadMissingEntities){const t=e.match(/^[a-zA-Z](fr|scr|opf)$/)?RegExp.$1:e.charAt(0).toLowerCase();Eo[t]||(Eo[t]=!0,Rn(no("./util/entities/"+t+".js")))}return t}function Co(t){const e="x"===t.charAt(0)?parseInt(t.slice(1),16):parseInt(t);return String.fromCodePoint(e)}class To{get cssText(){return this.getStyleString()}constructor(t=null){this.styles={},this.addStyles(t)}addStyles(t){if(t)for(const e of Object.keys(t))this.styles[e]||(this.styles[e]={}),Object.assign(this.styles[e],t[e])}removeStyles(...t){for(const e of t)delete this.styles[e]}clear(){this.styles={}}getStyleString(){return this.getStyleRules().join("\n\n")}getStyleRules(){const t=Object.keys(this.styles),e=new Array(t.length);let s=0;for(const i of t)e[s++]=i+" {\n"+this.getStyleDefString(this.styles[i])+"\n}";return e}getStyleDefString(t){const e=Object.keys(t),s=new Array(e.length);let i=0;for(const r of e)s[i++]=" "+r+": "+t[r]+";";return s.join("\n")}}const _o=["top","right","bottom","left"],wo=["width","style","color"];function ko(t){const e=t.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g),s=[];for(;e.length>1;)e.shift(),s.push(e.shift());return s}function Ao(t){const e=ko(this.styles[t]);0===e.length&&e.push(""),1===e.length&&e.push(e[0]),2===e.length&&e.push(e[0]),3===e.length&&e.push(e[1]);for(const s of Do.connect[t].children)this.setStyle(this.childName(t,s),e.shift())}const Mo=/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,Lo=/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/;function Io(t){const e={width:"",style:"",color:""};for(const s of ko(this.styles[t]))s.match(Mo)&&""===e.width?e.width=s:s.match(Lo)&&""===e.style?e.style=s:e.color=s;for(const s of Do.connect[t].children)this.setStyle(this.childName(t,s),e[s])}function So(t){const e=[];for(const s of Do.connect[t].children){const i=this.styles[this.childName(t,s)];i&&e.push(i)}e.length?this.styles[t]=e.join(" "):delete this.styles[t]}const Ro={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant:new RegExp("^(?:"+["normal|none","inherit|initial|unset","common-ligatures|no-common-ligatures","discretionary-ligatures|no-discretionary-ligatures","historical-ligatures|no-historical-ligatures","contextual|no-contextual","(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)","small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","lining-nums|oldstyle-nums|proportional-nums|tabular-nums","diagonal-fractions|stacked-fractions","ordinal|slashed-zero","jis78|jis83|jis90|jis04|simplified|traditional","full-width|proportional-width","ruby"].join("|")+")$"),weight:/^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,stretch:new RegExp("^(?:"+["normal","(?:(?:ultra|extra|semi)-)?(?:condensed|expanded)","inherit|initial|unset"].join("|")+")$"),size:new RegExp("^(?:"+["xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller","[\\d.]+%|[\\d.]+[a-z]+","inherit|initial|unset"].join("|")+")(?:/(?:normal|[\\d.]+(?:%|[a-z]+)?))?$")};function Oo(t,e){for(const s of Do.connect[t].children){const i=this.childName(t,s);if(Array.isArray(e[s])){const t=e[s];t.length&&(this.styles[i]=t.join(" "))}else""!==e[s]&&(this.styles[i]=e[s])}}class Do{constructor(t=""){this.parse(t)}sanitizeValue(t){const e=this.constructor.pattern;if(!t.match(e.sanitize))return t;const s=(t=t.replace(e.value,"$1")).replace(/\\./g,"").replace(/(['"]).*?\1/g,"").replace(/[^'"]/g,"");return s.length&&(t+=s.charAt(0)),t}get cssText(){var t,e;const s=[];for(const i of Object.keys(this.styles)){const r=this.parentName(i),n=i.replace(/.*-/,"");this.styles[r]&&(null===(e=null===(t=Do.connect[r])||void 0===t?void 0:t.children)||void 0===e?void 0:e.includes(n))||s.push(`${i}: ${this.styles[i]};`)}return s.join(" ")}get styleList(){return Object.assign({},this.styles)}set(t,e){var s,i;for(t=this.normalizeName(t),this.setStyle(t,String(e)),Do.connect[t]&&!Do.connect[t].combine&&(this.combineChildren(t),delete this.styles[t]);t.match(/-/);){const e=t;if(t=this.parentName(t),!Do.connect[e]&&!(null===(i=null===(s=Do.connect[t])||void 0===s?void 0:s.children)||void 0===i?void 0:i.includes(e.substring(t.length+1))))break;Do.connect[t].combine.call(this,t)}}get(t){return t=this.normalizeName(t),Object.hasOwn(this.styles,t)?this.styles[t]:""}setStyle(t,e){this.styles[t]=this.sanitizeValue(e),Do.connect[t]&&Do.connect[t].children&&Do.connect[t].split.call(this,t),""===e&&delete this.styles[t]}combineChildren(t){const e=this.parentName(t);for(const s of Do.connect[t].children){const t=this.childName(e,s);Do.connect[t].combine.call(this,t)}}parentName(t){const e=t.replace(/-[^-]*$/,"");return t===e?"":e}childName(t,e){return e.match(/-/)?e:(Do.connect[t]&&!Do.connect[t].combine&&(e+=t.replace(/.*-/,"-"),t=this.parentName(t)),t+"-"+e)}normalizeName(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}parse(t=""){const e=this.constructor.pattern;this.styles={};const s=t.replace(/\n/g," ").replace(e.comment,"").split(e.style);for(;s.length>1;){const[t,e,i]=s.splice(0,3);if(t.match(/[^\s\n;]/))return;this.set(e,i)}}}function Po(t){return t.reduce(((t,e)=>t+e),0)}function Bo(t){return t.reduce(((t,e)=>Math.max(t,e)),0)}if(Do.pattern={sanitize:/['";]/,value:/^((:?'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$).*/,style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},Do.connect={padding:{children:_o,split:Ao,combine:function(t){const e=Do.connect[t].children,s=[];for(const i of e){const e=this.styles[t+"-"+i];if(!e)return void delete this.styles[t];s.push(e)}s[3]===s[1]&&(s.pop(),s[2]===s[0]&&(s.pop(),s[1]===s[0]&&s.pop())),this.styles[t]=s.join(" ")}},border:{children:_o,split:function(t){for(const e of Do.connect[t].children)this.setStyle(this.childName(t,e),this.styles[t])},combine:function(t){const e=[...Do.connect[t].children],s=this.styles[this.childName(t,e.shift())];for(const i of e)if(this.styles[this.childName(t,i)]!==s)return void delete this.styles[t];this.styles[t]=s}},"border-top":{children:wo,split:Io,combine:So},"border-right":{children:wo,split:Io,combine:So},"border-bottom":{children:wo,split:Io,combine:So},"border-left":{children:wo,split:Io,combine:So},"border-width":{children:_o,split:Ao,combine:null},"border-style":{children:_o,split:Ao,combine:null},"border-color":{children:_o,split:Ao,combine:null},font:{children:["style","variant","weight","stretch","line-height","size","family"],split:function(t){const e=ko(this.styles[t]),s={style:"",variant:[],weight:"",stretch:"",size:"",family:"","line-height":""};for(const t of e){s.family||(s.family=t);for(const e of Object.keys(Ro))if((Array.isArray(s[e])||""===s[e])&&t.match(Ro[e]))if(s.family===t&&(s.family=""),"size"===e){const[i,r]=t.split(/\//);s[e]=i,r&&(s["line-height"]=r)}else""===s.size&&(Array.isArray(s[e])?s[e].push(t):""===s[e]&&(s[e]=t))}Oo.call(this,t,s),delete this.styles[t]},combine:function(t){}}},MathJax.loader&&MathJax.loader.checkVersion("core",ii,"core"),ci({_:{adaptors:{HTMLAdaptor:l,browserAdaptor:h},components:{global:t},core:{DOMAdaptor:c,FindMath:d,Handler:ot,HandlerList:at,InputJax:u,MathDocument:nt,MathItem:g,MathList:f,MmlTree:{Attributes:N,MML:et,MathMLVisitor:ht,MmlFactory:st,MmlNode:x,MmlNodes:{HtmlNode:tt,TeXAtom:Q,maction:q,maligngroup:J,malignmark:K,math:v,mathchoice:Z,menclose:U,merror:P,mfenced:j,mfrac:S,mglyph:$,mi:C,mmultiscripts:z,mn:T,mo:k,mpadded:B,mphantom:F,mroot:O,mrow:I,ms:L,mspace:M,msqrt:R,mstyle:D,msubsup:H,mtable:X,mtd:G,mtext:A,mtr:V,munderover:W,semantics:Y},MmlVisitor:lt,OperatorDictionary:_,SerializedMmlVisitor:dt},OutputJax:p,Tree:{Factory:b,Node:y,NodeFactory:E,Visitor:ct,Wrapper:ut,WrapperFactory:pt}},handlers:{html_ts:yt,html:{HTMLDocument:Et,HTMLDomStrings:bt,HTMLHandler:Nt,HTMLMathItem:ft,HTMLMathList:gt}},mathjax:mt,util:{AsyncLoad:xt,BBox:Ct,BitField:it,Entities:Tt,FunctionList:r,LinkedList:m,Options:o,PrioritizedList:i,Retries:rt,StyleJson:_t,Styles:wt,context:e,lengths:vt,numeric:kt,string:w}}}),MathJax.startup&&(MathJax.startup.registerConstructor("HTMLHandler",io),MathJax.startup.registerConstructor("browserAdaptor",Ki),MathJax.startup.useHandler("HTMLHandler"),MathJax.startup.useAdaptor("browserAdaptor")),MathJax.loader){const t=MathJax.config.loader;MathJax._.mathjax.mathjax.asyncLoad=e=>"node:"===e.substring(0,5)?t.require(e):MathJax.loader.load(e).then((t=>t[0]))}class Fo extends $i{constructor(t){super(t),this.getPatterns()}getPatterns(){const t=this.options,e=[],s=[],i=[];this.end={},this.env=this.sub=0;let r=1;t.inlineMath.forEach((t=>this.addPattern(e,t,!1))),t.displayMath.forEach((t=>this.addPattern(e,t,!0))),e.length&&s.push(e.sort(Dr).join("|")),t.processEnvironments&&(s.push("\\\\begin\\s*\\{([^}]*)\\}"),this.env=r,r++),t.processEscapes&&i.push("\\\\([\\\\$])"),t.processRefs&&i.push("(\\\\(?:eq)?ref\\s*\\{[^}]*\\})"),i.length&&(s.push("("+i.join("|")+")"),this.sub=r),this.start=new RegExp(s.join("|"),"g"),this.hasPatterns=s.length>0}addPattern(t,e,s){const[i,r]=e;t.push(Pr(i)),this.end[i]=[r,s,this.endPattern(r)]}endPattern(t,e){return new RegExp((e||Pr(t))+"|\\\\(?:[a-zA-Z]|.)|[{}]","g")}findEnd(t,e,s,i){const[r,n,o]=i,a=o.lastIndex=s.index+s[0].length;let c,l=0;for(;c=o.exec(t);){if((c[1]||c[0])===r&&0===l)return ir(s[0],t.substring(a,c.index),c[0],e,s.index,c.index+c[0].length,n);"{"===c[0]?l++:"}"===c[0]&&l&&l--}return null}findMathInString(t,e,s){let i,r;for(this.start.lastIndex=0;i=this.start.exec(s);){if(void 0!==i[this.env]&&this.env){const t="\\\\end\\s*(\\{"+Pr(i[this.env])+"\\})";r=this.findEnd(s,e,i,["{"+i[this.env]+"}",!0,this.endPattern(null,t)]),r&&(r.math=r.open+r.math+r.close,r.open=r.close="")}else if(void 0!==i[this.sub]&&this.sub){const t=i[this.sub],s=i.index+i[this.sub].length;r=2===t.length?ir("\\",t.substring(1),"",e,i.index,s):ir("",t,"",e,i.index,s,!1)}else r=this.findEnd(s,e,i,this.end[i[0]]);r&&(t.push(r),this.start.lastIndex=r.end.n)}}findMath(t){const e=[];if(this.hasPatterns)for(let s=0,i=t.length;sString.fromCodePoint(parseInt(t,16)),getChildren:t=>t.childNodes,getText:t=>t.getText(),appendChildren(t,e){for(const s of e)t.appendChild(s)},setAttribute(t,e,s){t.attributes.set(e,s)},setProperty(t,e,s){t.setProperty(e,s)},setProperties(t,e){for(const s of Object.keys(e)){const i=e[s];"texClass"===s?(t.texClass=i,t.setProperty(s,i)):"movablelimits"===s?(t.setProperty("movablelimits",i),(t.isKind("mo")||t.isKind("mstyle"))&&t.attributes.set("movablelimits",i)):"inferred"===s||(jo.attrs.has(s)?t.setProperty(s,i):t.attributes.set(s,i))}},getProperty:(t,e)=>t.getProperty(e),getAttribute:(t,e)=>t.attributes.get(e),removeAttribute(t,e){t.attributes.unset(e)},removeProperties(t,...e){t.removeProperty(...e)},getChildAt:(t,e)=>t.childNodes[e],setChild(t,e,s){t.childNodes[e]=s,s&&(s.parent=t)},copyChildren(t,e){const s=t.childNodes;for(let t=0;tt.isKind(e),isEmbellished:t=>t.isEmbellished,getTexClass:t=>t.texClass,getCoreMO:t=>t.coreMO(),isNode:t=>t instanceof Nr||t instanceof Cr,isInferred:t=>t.isInferred,getForm(t){if(!t.isKind("mo"))return null;const e=t,s=e.getForms();for(const t of s){const s=this.getOp(e,t);if(s)return s}return null},getOp:(t,e="infix")=>Wr.OPTABLE[e][t.getText()]||null,getMoAttribute(t,e){var s,i;if(!t.attributes.isSet(e))for(const r of["infix","postfix","prefix"]){const n=null===(i=null===(s=this.getOp(t,r))||void 0===s?void 0:s[3])||void 0===i?void 0:i[e];if(void 0!==n)return n}return t.attributes.get(e)}},Uo=jo;function qo(t,e,s){const i=e.attributes,r=s.attributes;t.forEach((t=>{const e=r.getExplicit(t);null!=e&&i.set(t,e)}))}function Ho(t,e){const s=(t,e)=>t.getExplicitNames().filter((s=>s!==e&&("stretchy"!==s||t.getExplicit("stretchy"))&&"data-latex"!==s&&"data-latex-item"!==s)),i=t.attributes,r=e.attributes,n=s(i,"lspace"),o=s(r,"rspace");if(n.length!==o.length)return!1;for(const t of n)if(i.getExplicit(t)!==r.getExplicit(t))return!1;return!0}function Wo(t,e,s){const i=[];for(const r of t.getList("m"+e+s)){const n=r.childNodes;if(n[r[e]]&&n[r[s]])continue;const o=r.parent,a=n[r[e]]?t.nodeFactory.create("node","m"+e,[n[r.base],n[r[e]]]):t.nodeFactory.create("node","m"+s,[n[r.base],n[r[s]]]);Uo.copyAttributes(r,a),o.replaceChild(a,r),i.push(r)}t.removeFromList("m"+e+s,i)}function zo(t,e,s){const i=[];for(const r of t.getList(e)){if(r.attributes.get("displaystyle"))continue;const e=r.childNodes[r.base],n=e.coreMO();if(e.getProperty("movablelimits")&&!n.attributes.hasExplicit("movablelimits")){const e=t.nodeFactory.create("node",s,r.childNodes);Uo.copyAttributes(r,e),r.parent.replaceChild(e,r),i.push(r)}}t.removeFromList(e,i)}const Xo={cleanStretchy(t){const e=t.data;for(const t of e.getList("fixStretchy"))if(Uo.getProperty(t,"fixStretchy")){const s=Uo.getForm(t);s&&s[3]&&s[3].stretchy&&Uo.setAttribute(t,"stretchy",!1);const i=t.parent;if(!(Uo.getTexClass(t)||s&&s[2])){const s=e.nodeFactory.create("node","TeXAtom",[t]);i.replaceChild(s,t),s.inheritAttributesFrom(t)}Uo.removeProperties(t,"fixStretchy")}},cleanAttributes(t){t.data.root.walkTree(((t,e)=>{const s=t.attributes,i=new Set((s.get("mjx-keep-attrs")||"").split(/ /));s.unset("mjx-keep-attrs");for(const e of s.getExplicitNames())i.has(e)||s.get(e)!==t.attributes.getInherited(e)||s.unset(e)}),{})},combineRelations(t){const e=[];for(const s of t.data.getList("mo")){if(s.getProperty("relationsCombined")||!s.parent||s.parent&&!Uo.isType(s.parent,"mrow")||Uo.getTexClass(s)!==pr.REL)continue;let t;const i=s.parent.childNodes,r=i.indexOf(s)+1,n=Uo.getProperty(s,"variantForm");for(;r"data-latex"!==t.substring(0,10))).length){const r=t.childNodes[0].childNodes[0];i.forEach((t=>r.attributes.set(t,e.get(t)))),t.parent.replaceChild(r,t),s.push(t)}}e.removeFromList("mstyle",s)}},Vo=Xo;var Go,Jo;!function(t){t.HANDLER="handler",t.FALLBACK="fallback",t.ITEMS="items",t.TAGS="tags",t.OPTIONS="options",t.NODES="nodes",t.PREPROCESSORS="preprocessors",t.POSTPROCESSORS="postprocessors",t.INIT="init",t.CONFIG="config",t.PRIORITY="priority",t.PARSER="parser"}(Go||(Go={})),function(t){t.DELIMITER="delimiter",t.MACRO="macro",t.CHARACTER="character",t.ENVIRONMENT="environment"}(Jo||(Jo={}));const Ko=7.2;const $o={UNIT_CASES:new class{constructor(t){this.num="([-+]?([.,]\\d+|\\d+([.,]\\d*)?))",this.unit="",this.dimenEnd=/./,this.dimenRest=/./,this.map=new Map(t),this.updateDimen()}updateDimen(){this.unit=`(${Array.from(this.map.keys()).join("|")})`,this.dimenEnd=RegExp("^\\s*"+this.num+"\\s*"+this.unit+"\\s*$"),this.dimenRest=RegExp("^\\s*"+this.num+"\\s*"+this.unit+" ?")}set(t,e){return this.map.set(t,e),this.updateDimen(),this}get(t){return this.map.get(t)||this.map.get("pt")}delete(t){return!!this.map.delete(t)&&(this.updateDimen(),!0)}}([["em",1],["ex",.43],["pt",.1],["pc",1.2],["px",.1],["in",Ko],["cm",Ko/2.54],["mm",Ko/25.4],["mu",1/18]]),matchDimen(t,e=!1){const s=t.match(e?$o.UNIT_CASES.dimenRest:$o.UNIT_CASES.dimenEnd);return s?function([t,e,s]){return"mu"!==e?[t,e,s]:[$o.em($o.UNIT_CASES.get(e)*parseFloat(t)).slice(0,-2),"em",s]}([s[1].replace(/,/,"."),s[4],s[0].length]):[null,null,0]},dimen2em(t){const[e,s]=$o.matchDimen(t),i=parseFloat(e||"1");return $o.UNIT_CASES.get(s)*i},em:t=>Math.abs(t)<6e-4?"0em":t.toFixed(3).replace(/\.?0+$/,"")+"em",trimSpaces(t){if("string"!=typeof t)return t;let e=t.trim();return e.match(/\\$/)&&t.match(/ $/)&&(e+=" "),e}};class Yo{constructor(t,e,s){this._factory=t,this._env=e,this.global={},this.stack=[],this.global={isInner:s},this.stack=[this._factory.create("start",this.global)],e&&(this.stack[0].env=e),this.env=this.stack[0].env}set env(t){this._env=t}get env(){return this._env}Push(...t){for(const e of t){if(!e)continue;const t=Uo.isNode(e)?this._factory.create("mml",e):e;t.global=this.global;const[s,i]=this.stack.length?this.Top().checkItem(t):[null,!0];i&&(s?(this.Pop(),this.Push(...s)):(t.isKind("null")||this.stack.push(t),t.env?(t.copyEnv&&Object.assign(t.env,this.env),this.env=t.env):t.env=this.env))}}Pop(){const t=this.stack.pop();return t.isOpen||delete t.env,this.env=this.stack.length?this.Top().env:{},t}Top(t=1){return this.stack.length="0"&&i<="9")s[t]=e[parseInt(s[t],10)-1],"number"==typeof s[t]&&(s[t]=s[t].toString());else if("{"===i)if(i=s[t].substring(1),i>="0"&&i<="9")s[t]=e[parseInt(s[t].substring(1,s[t].length-1),10)-1],"number"==typeof s[t]&&(s[t]=s[t].toString());else{s[t].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/)&&(s[t]="%"+s[t])}}return s.join("")}constructor(t,e,...s){this.id=t,this.message=Qo.processString(e,s)}}Qo.pattern=/%(\d+|\{\d+\}|\{[a-z]+:%\d+(?:\|(?:%\{\d+\}|%.|[^}])*)+\}|.)/g;const Zo=Qo;class ta{constructor(t){this._nodes=t,this.startStr="",this.startI=0,this.stopI=0}get nodes(){return this._nodes}Push(...t){this._nodes.push(...t)}Pop(){return this._nodes.pop()}get First(){return this._nodes[this.Size()-1]}set First(t){this._nodes[this.Size()-1]=t}get Last(){return this._nodes[0]}set Last(t){this._nodes[0]=t}Peek(t){return null==t&&(t=1),this._nodes.slice(this.Size()-t)}Size(){return this._nodes.length}Clear(){this._nodes=[]}toMml(t=!0,e){return 1!==this._nodes.length||e?this.create("node",t?"inferredMrow":"mrow",this._nodes,{}):this.First}create(t,...e){return this.factory.configuration.nodeFactory.create(t,...e)}}class ea extends ta{constructor(t,...e){super(e),this.factory=t,this.global={},this._properties={},this.isOpen&&(this._env={})}get kind(){return"base"}get env(){return this._env}set env(t){this._env=t}get copyEnv(){return!0}getProperty(t){return this._properties[t]}setProperty(t,e){return this._properties[t]=e,this}get isOpen(){return!1}get isClose(){return!1}get isFinal(){return!1}isKind(t){return t===this.kind}checkItem(t){if(t.isKind("over")&&this.isOpen&&(t.setProperty("num",this.toMml(!1)),this.Clear()),t.isKind("cell")&&this.isOpen){if(t.getProperty("linebreak"))return ea.fail;throw new Zo("Misplaced","Misplaced %1",t.getName())}if(t.isClose&&this.getErrors(t.kind)){const[e,s]=this.getErrors(t.kind);throw new Zo(e,s,t.getName())}return t.isFinal?(this.Push(t.First),ea.fail):ea.success}clearEnv(){for(const t of Object.keys(this.env))delete this.env[t]}setProperties(t){return Object.assign(this._properties,t),this}getName(){return this.getProperty("name")}toString(){return this.kind+"["+this.nodes.join("; ")+"]"}getErrors(t){return this.constructor.errors[t]||ea.errors[t]}}ea.fail=[null,!1],ea.success=[null,!0],ea.errors={end:["MissingBeginExtraEnd","Missing \\begin{%1} or extra \\end{%1}"],close:["ExtraCloseMissingOpen","Extra close brace or missing open brace"],right:["MissingLeftExtraRight","Missing \\left or extra \\right"],middle:["ExtraMiddle","Extra \\middle"]};const sa={Variant:{NORMAL:"normal",BOLD:"bold",ITALIC:"italic",BOLDITALIC:"bold-italic",DOUBLESTRUCK:"double-struck",FRAKTUR:"fraktur",BOLDFRAKTUR:"bold-fraktur",SCRIPT:"script",BOLDSCRIPT:"bold-script",SANSSERIF:"sans-serif",BOLDSANSSERIF:"bold-sans-serif",SANSSERIFITALIC:"sans-serif-italic",SANSSERIFBOLDITALIC:"sans-serif-bold-italic",MONOSPACE:"monospace",INITIAL:"inital",TAILED:"tailed",LOOPED:"looped",STRETCHED:"stretched",CALLIGRAPHIC:"-tex-calligraphic",BOLDCALLIGRAPHIC:"-tex-bold-calligraphic",OLDSTYLE:"-tex-oldstyle",BOLDOLDSTYLE:"-tex-bold-oldstyle",MATHITALIC:"-tex-mathit"},Form:{PREFIX:"prefix",INFIX:"infix",POSTFIX:"postfix"},LineBreak:{AUTO:"auto",NEWLINE:"newline",NOBREAK:"nobreak",GOODBREAK:"goodbreak",BADBREAK:"badbreak"},LineBreakStyle:{BEFORE:"before",AFTER:"after",DUPLICATE:"duplicate",INFIXLINBREAKSTYLE:"infixlinebreakstyle"},IndentAlign:{LEFT:"left",CENTER:"center",RIGHT:"right",AUTO:"auto",ID:"id",INDENTALIGN:"indentalign"},IndentShift:{INDENTSHIFT:"indentshift"},LineThickness:{THIN:"thin",MEDIUM:"medium",THICK:"thick"},Notation:{LONGDIV:"longdiv",ACTUARIAL:"actuarial",PHASORANGLE:"phasorangle",RADICAL:"radical",BOX:"box",ROUNDEDBOX:"roundedbox",CIRCLE:"circle",LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom",UPDIAGONALSTRIKE:"updiagonalstrike",DOWNDIAGONALSTRIKE:"downdiagonalstrike",VERTICALSTRIKE:"verticalstrike",HORIZONTALSTRIKE:"horizontalstrike",NORTHEASTARROW:"northeastarrow",MADRUWB:"madruwb",UPDIAGONALARROW:"updiagonalarrow"},Align:{TOP:"top",BOTTOM:"bottom",CENTER:"center",BASELINE:"baseline",AXIS:"axis",LEFT:"left",RIGHT:"right"},Lines:{NONE:"none",SOLID:"solid",DASHED:"dashed"},Side:{LEFT:"left",RIGHT:"right",LEFTOVERLAP:"leftoverlap",RIGHTOVERLAP:"rightoverlap"},Width:{AUTO:"auto",FIT:"fit"},Actiontype:{TOGGLE:"toggle",STATUSLINE:"statusline",TOOLTIP:"tooltip",INPUT:"input"},Overflow:{LINBREAK:"linebreak",SCROLL:"scroll",ELIDE:"elide",TRUNCATE:"truncate",SCALE:"scale"},Unit:{EM:"em",EX:"ex",PX:"px",IN:"in",CM:"cm",MM:"mm",PT:"pt",PC:"pc"},Attr:{LATEX:"data-latex",LATEXITEM:"data-latex-item"}};class ia{constructor(t,e,s){this._string=t,this.configuration=s,this.macroCount=0,this.i=0,this.currentCS="",this.saveI=0;const i=Object.hasOwn(e,"isInner"),r=e.isInner;let n;if(delete e.isInner,e){n={};for(const t of Object.keys(e))n[t]=e[t]}this.configuration.pushParser(this),this.stack=new Yo(this.itemFactory,n,!i||r),this.Parse(),this.Push(this.itemFactory.create("stop")),this.updateResult(this.string,this.i),this.stack.env=n}get options(){return this.configuration.options}get itemFactory(){return this.configuration.itemFactory}get tags(){return this.configuration.tags}set string(t){this._string=t}get string(){return this._string}parse(t,e){const s=this.saveI;this.saveI=this.i;const i=this.configuration.handlers.get(t).parse(e);return this.updateResult(e[1],s),this.saveI=s,i}lookup(t,e){return this.configuration.handlers.get(t).lookup(e)}contains(t,e){return this.configuration.handlers.get(t).contains(e)}toString(){let t="";for(const e of Array.from(this.configuration.handlers.keys()))t+=e+": "+this.configuration.handlers.get(e)+"\n";return t}Parse(){let t;for(;this.it.includes(e)),(t=>t))}constructor(t,e,s){this.name=t,this.verify=e,this.convert=s}}const la={boolean:new ca("boolean",(t=>"true"===t||"false"===t),(t=>"true"===t)),number:new ca("number",(t=>!!t.match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/)),(t=>parseFloat(t))),integer:new ca("integer",(t=>!!t.match(/^[-+]?\d+$/)),(t=>parseInt(t))),string:new ca("string",(t=>!0),(t=>t)),dimen:new ca("dimen",(t=>null!==$o.matchDimen(t)[0]),(t=>t))};function ha(t,e){if(0===e)return t.replace(/^\s+/,"").replace(/([^\\\s]|^)((?:\\\\)*(?:\\\s)?)?\s+$/,"$1$2");for(;e>0;)t=t.trim().slice(1,-1),e--;return t}function da(t,e,s=!1,i=!1){const r=t.length;let n=0,o="",a=0,c=0,l=!0;for(;an&&(c=n),l=!1}o+=i}if(n)throw new Zo("ExtraOpenMissingClose","Extra open brace or missing close brace");return i&&c?["","",ha(o,1)]:[ha(o,s?Math.min(1,c):c),"",t.slice(a)]}const ua={cols:(...t)=>t.map((t=>$o.em(t))).join(" "),fenced(t,e,s,i,r="",n=""){const o=t.nodeFactory,a=o.create("node","mrow",[],{open:e,close:i,texClass:pr.INNER});let c;if(r)c=new ia("\\"+r+"l"+e,t.parser.stack.env,t).mml();else{const t=o.create("text",e);c=o.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:pr.OPEN},t)}if(Uo.appendChildren(a,[c,s]),r)c=new ia("\\"+r+"r"+i,t.parser.stack.env,t).mml();else{const t=o.create("text",i);c=o.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:pr.CLOSE},t)}return n&&c.attributes.set("mathcolor",n),Uo.appendChildren(a,[c]),a},fixedFence(t,e,s,i){const r=t.nodeFactory.create("node","mrow",[],{open:e,close:i,texClass:pr.ORD});return e&&Uo.appendChildren(r,[ua.mathPalette(t,e,"l")]),Uo.isType(s,"mrow")?Uo.appendChildren(r,Uo.getChildren(s)):Uo.appendChildren(r,[s]),i&&Uo.appendChildren(r,[ua.mathPalette(t,i,"r")]),r},mathPalette(t,e,s){"{"!==e&&"}"!==e||(e="\\"+e);const i="{\\big"+s+" "+e+"}";return new ia("\\mathchoice"+("{\\bigg"+s+" "+e+"}")+i+i+i,{},t).mml()},fixInitialMO(t,e){for(let s=0,i=e.length;s1&&(c=[t.create("node","mrow",c)]),c},internalText(t,e,s){e=e.replace(/\n+/g," ").replace(/^ +/,bo.nbsp).replace(/ +$/,bo.nbsp);const i=t.create("text",e);return t.create("node","mtext",[],s,i)},underOver(t,e,s,i,r){if(ua.checkMovableLimits(e),Uo.isType(e,"munderover")&&Uo.isEmbellished(e)){Uo.setProperties(Uo.getCoreMO(e),{lspace:0,rspace:0});const s=t.create("node","mo",[],{rspace:0});e=t.create("node","mrow",[s,e])}const n=t.create("node","munderover",[e]);Uo.setChild(n,"over"===i?n.over:n.under,s);let o=n;return r&&(o=t.create("node","TeXAtom",[t.create("node","mstyle",[n],{displaystyle:!0,scriptlevel:0})],{texClass:pr.OP,movesupsub:!0})),Uo.setProperty(o,"subsupOK",!0),o},checkMovableLimits(t){const e=Uo.isType(t,"mo")?Uo.getForm(t):null;(Uo.getProperty(t,"movablelimits")||e&&e[3]&&e[3].movablelimits)&&Uo.setProperties(t,{movablelimits:!1})},setArrayAlign:(t,e,s)=>(s||(e=$o.trimSpaces(e||"")),"t"===e?t.arraydef.align="baseline 1":"b"===e?t.arraydef.align="baseline -1":"c"===e?t.arraydef.align="axis":e&&(s?(s.string=`[${e}]`+s.string.slice(s.i),s.i=0):t.arraydef.align=e),t),substituteArgs(t,e,s){let i="",r="",n=0;for(;ne.length)throw new Zo("IllegalMacroParam","Illegal macro parameter reference");r=ua.addArgs(t,ua.addArgs(t,r,i),e[parseInt(o,10)-1]),i=""}else i+=o}return ua.addArgs(t,r,i)},addArgs(t,e,s){if(s.match(/^[a-z]/i)&&e.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)&&(e+=" "),e.length+s.length>t.configuration.options.maxBuffer)throw new Zo("MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?");return e+s},checkMaxMacros(t,e=!0){if(!(++t.macroCount<=t.configuration.options.maxMacros))throw e?new Zo("MaxMacroSub1","MathJax maximum macro substitution count exceeded; is here a recursive macro call?"):new Zo("MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?")},checkEqnEnv(t,e=!0){const s=t.stack.Top(),i=s.First;if(!(s.getProperty("nestable")&&e&&!i||s.getProperty("nestStart"))&&(!s.isKind("start")||i))throw new Zo("ErroneousNestingEq","Erroneous nesting of equation structures")},copyNode(t,e){const s=t.copy(),i=e.configuration;return s.walkTree((t=>{i.addNode(t.kind,t);const e=(t.getProperty("in-lists")||"").split(/,/);for(const s of e)s&&i.addNode(s,t)})),s},mmlFilterAttribute:(t,e,s)=>s,getFontDef(t){const e=t.stack.env.font;return e?{mathvariant:e}:{}},keyvalOptions(t,e=null,s=!1,i=!1){const r=function(t,e=!1){const s={};let i,r,n,o=t,a=!0;for(;o;)[r,i,o]=da(o,["=",","],e,a),a=!1,"="===i?([n,i,o]=da(o,[","],e),n="false"===n||"true"===n?JSON.parse(n):n,s[r]=n):r&&(s[r]=!0);return s}(t,i);if(e)for(const t of Object.keys(r))if(Object.hasOwn(e,t)){if(e[t]instanceof ca){const s=e[t],i=String(r[t]);if(!s.verify(i))throw new Zo("InvalidValue","Value for key '%1' is not of the expected type",t);r[t]=s.convert(i)}}else{if(s)throw new Zo("InvalidOption","Invalid option: %1",t);delete r[t]}return r},isLatinOrGreekChar:t=>!!t.normalize("NFD").match(/[a-zA-Z\u0370-\u03F0]/)};class pa{constructor(){this.columnHandler={l:t=>t.calign[t.j++]="left",c:t=>t.calign[t.j++]="center",r:t=>t.calign[t.j++]="right",p:t=>this.getColumn(t,"top"),m:t=>this.getColumn(t,"middle"),b:t=>this.getColumn(t,"bottom"),w:t=>this.getColumn(t,"top",""),W:t=>this.getColumn(t,"top",""),"|":t=>this.addRule(t,"solid"),":":t=>this.addRule(t,"dashed"),">":t=>t.cstart[t.j]=(t.cstart[t.j]||"")+this.getBraces(t),"<":t=>t.cend[t.j-1]=(t.cend[t.j-1]||"")+this.getBraces(t),"@":t=>this.addAt(t,this.getBraces(t)),"!":t=>this.addBang(t,this.getBraces(t)),"*":t=>this.repeat(t),P:t=>this.macroColumn(t,">{$}p{#1}<{$}",1),M:t=>this.macroColumn(t,">{$}m{#1}<{$}",1),B:t=>this.macroColumn(t,">{$}b{#1}<{$}",1)," ":t=>{}},this.MAXCOLUMNS=1e4}process(t,e,s){const i={parser:t,template:e,i:0,j:0,c:"",cwidth:[],calign:[],cspace:[],clines:[],cstart:s.cstart,cend:s.cend,ralign:s.ralign,cextra:s.cextra};let r=0;for(;i.ithis.MAXCOLUMNS)throw new Zo("MaxColumns","Too many column specifiers (perhaps looping column definitions?)");const t=i.template.codePointAt(i.i),e=i.c=String.fromCodePoint(t);if(i.i+=e.length,!Object.hasOwn(this.columnHandler,e))throw new Zo("BadPreamToken","Illegal pream-token (%1)",e);this.columnHandler[e](i)}this.setColumnAlign(i,s),this.setColumnWidths(i,s),this.setColumnSpacing(i,s),this.setColumnLines(i,s),this.setPadding(i,s)}setColumnAlign(t,e){e.arraydef.columnalign=t.calign.join(" ")}setColumnWidths(t,e){if(!t.cwidth.length)return;const s=[...t.cwidth];s.lengtht||"auto")).join(" ")}setColumnSpacing(t,e){if(!t.cspace.length)return;const s=[...t.cspace];s.lengtht||"1em")).join(" ")}setColumnLines(t,e){if(!t.clines.length)return;const s=[...t.clines];s[0]&&e.frame.push(["left",s[0]]),s.length>t.calign.length?e.frame.push(["right",s.pop()]):s.length1&&(e.arraydef.columnlines=s.slice(1).map((t=>t||"none")).join(" "))}setPadding(t,e){if(!t.cextra[0]&&!t.cextra[t.calign.length-1])return;const s=t.calign.length-1,i=t.cspace,r=t.cextra[s]?i[s]:null;e.arraydef["data-array-padding"]=`${i[0]||".5em"} ${r||".5em"}`}getColumn(t,e,s="left"){t.calign[t.j]=s||this.getAlign(t),t.cwidth[t.j]=this.getDimen(t),t.ralign[t.j]=[e,t.cwidth[t.j],t.calign[t.j]],t.j++}getDimen(t){const e=this.getBraces(t);if(!$o.matchDimen(e)[0])throw new Zo("MissingColumnDimOrUnits","Missing dimension or its units for %1 column declaration",t.c);return e}getAlign(t){return ji(this.getBraces(t).toLowerCase(),{l:"left",c:"center",r:"right"},"")}getBraces(t){for(;" "===t.template[t.i];)t.i++;if(t.i>=t.template.length)throw new Zo("MissingArgForColumn","Missing argument for %1 column declaration",t.c);if("{"!==t.template[t.i])return t.template[t.i++];const e=++t.i;let s=1;for(;t.i0&&s--;)i.push(this.getBraces(t));t.template=ua.substituteArgs(t.parser,i,e)+t.template.slice(t.i),t.i=0}addRule(t,e){t.clines[t.j]&&this.addAt(t,"\\,"),t.clines[t.j]=e,"0"===t.cspace[t.j]&&(t.cstart[t.j]="\\hspace{.5em}")}addAt(t,e){const{cstart:s,cspace:i,j:r}=t;t.cextra[r]=!0,t.calign[r]="center",t.clines[r]&&(".5em"===i[r]?s[r-1]+="\\hspace{.25em}":i[r]||(t.cend[r-1]=(t.cend[r-1]||"")+"\\hspace{.5em}")),s[r]=e,i[r]="0",i[++t.j]="0"}addBang(t,e){const{cstart:s,cspace:i,j:r}=t;t.cextra[r]=!0,t.calign[r]="center",s[r]=("0"===i[r]&&t.clines[r]?"\\hspace{.25em}":"")+e,i[r]||(i[r]=".5em"),i[++t.j]=".5em"}repeat(t){const e=this.getBraces(t),s=this.getBraces(t),i=parseInt(e);if(String(i)!==e)throw new Zo("ColArgNotNum","First argument to %1 column specifier must be a number","*");t.template=new Array(i).fill(s).join("")+t.template.substring(t.i),t.i=0}}const ma=sa.Variant;class fa{constructor(t,e=[]){this.options={},this.columnParser=new pa,this.packageData=new Map,this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.handlers=t.handlers,this.nodeFactory=new aa,this.nodeFactory.configuration=this,this.nodeFactory.setCreators(t.nodes),this.itemFactory=new oa(t.items),this.itemFactory.configuration=this,Oi(this.options,...e),Oi(this.options,t.options),this.mathStyle=fa.getVariant.get(this.options.mathStyle)||fa.getVariant.get("TeX")}pushParser(t){this.parsers.unshift(t)}popParser(){this.parsers.shift()}get parser(){return this.parsers[0]}clear(){this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.tags.resetTag()}addNode(t,e){let s=this.nodeLists[t];if(s||(s=this.nodeLists[t]=[]),s.push(e),e.kind!==t){const s=Uo.getProperty(e,"in-lists")||"",i=(s?s.split(/,/):[]).concat(t).join(",");Uo.setProperty(e,"in-lists",i)}}getList(t){const e=this.nodeLists[t]||[],s=[];for(const t of e)this.inTree(t)&&s.push(t);return this.nodeLists[t]=s,s}removeFromList(t,e){const s=this.nodeLists[t]||[];for(const t of e){const e=s.indexOf(t);e>=0&&s.splice(e,1)}}inTree(t){for(;t&&t!==this.root;)t=t.parent;return!!t}}fa.getVariant=new Map([["TeX",(t,e)=>e&&t.match(/^[\u0391-\u03A9\u03F4]/)?ma.NORMAL:""],["ISO",t=>ma.ITALIC],["French",t=>t.normalize("NFD").match(/^[a-z]/)?ma.ITALIC:ma.NORMAL],["upright",t=>ma.NORMAL]]);const ga=fa;class ba{constructor(t="???",e=""){this.tag=t,this.id=e}}class Ea{constructor(t="",e=!1,s=!1,i=null,r="",n="",o=!1,a=""){this.env=t,this.taggable=e,this.defaultTags=s,this.tag=i,this.tagId=r,this.tagFormat=n,this.noTag=o,this.labelId=a}}class Na{constructor(){this.counter=0,this.allCounter=0,this.configuration=null,this.ids={},this.allIds={},this.labels={},this.allLabels={},this.redo=!1,this.refUpdate=!1,this.currentTag=new Ea,this.history=[],this.stack=[],this.enTag=function(t,e){const s=this.configuration.nodeFactory,i=s.create("node","mtd",[t]),r=s.create("node","mlabeledtr",[e,i]);return s.create("node","mtable",[r],{side:this.configuration.options.tagSide,minlabelspacing:this.configuration.options.tagIndent,displaystyle:!0})}}start(t,e,s){this.currentTag&&this.stack.push(this.currentTag);const i=this.label;this.currentTag=new Ea(t,e,s),this.label=i}get env(){return this.currentTag.env}end(){this.history.push(this.currentTag);const t=this.label;this.currentTag=this.stack.pop(),t&&!this.label&&(this.label=t)}tag(t,e){this.currentTag.tag=t,this.currentTag.tagFormat=e?t:this.formatTag(t),this.currentTag.noTag=!1}notag(){this.tag("",!0),this.currentTag.noTag=!0}get noTag(){return this.currentTag.noTag}set label(t){this.currentTag.labelId=t}get label(){return this.currentTag.labelId}formatUrl(t,e){return e+"#"+encodeURIComponent(t)}formatTag(t){return"("+t+")"}formatRef(t){return this.formatTag(t)}formatId(t){return"mjx-eqn:"+t.replace(/\s/g,"_")}formatNumber(t){return t.toString()}autoTag(){null==this.currentTag.tag&&(this.counter++,this.tag(this.formatNumber(this.counter),!1))}clearTag(){this.tag(null,!0),this.currentTag.tagId=""}getTag(t=!1){if(t)return this.autoTag(),this.makeTag();const e=this.currentTag;return e.taggable&&!e.noTag&&(e.defaultTags&&this.autoTag(),e.tag)?this.makeTag():null}resetTag(){this.history=[],this.redo=!1,this.refUpdate=!1,this.clearTag()}reset(t=0){this.resetTag(),this.counter=this.allCounter=t,this.allLabels={},this.allIds={},this.label=""}startEquation(t){this.history=[],this.stack=[],this.clearTag(),this.currentTag=new Ea("",void 0,void 0),this.labels={},this.ids={},this.counter=this.allCounter,this.redo=!1;const e=t.inputData.recompile;e&&(this.refUpdate=!0,this.counter=e.counter)}finishEquation(t){this.redo&&(t.inputData.recompile={state:t.state(),counter:this.allCounter}),this.refUpdate||(this.allCounter=this.counter),Object.assign(this.allIds,this.ids),Object.assign(this.allLabels,this.labels)}finalize(t,e){if(!e.display||this.currentTag.env||null==this.currentTag.tag)return t;const s=this.makeTag();return this.enTag(t,s)}makeId(){this.currentTag.tagId=this.formatId(this.configuration.options.useLabelIds&&this.label||this.currentTag.tag)}makeTag(){this.makeId(),this.label&&(this.labels[this.label]=new ba(this.currentTag.tag,this.currentTag.tagId),this.label="");const t=new ia("\\text{"+this.currentTag.tagFormat+"}",{},this.configuration).mml();return this.configuration.nodeFactory.create("node","mtd",[t],{id:this.currentTag.tagId,rowalign:this.configuration.options.tagAlign})}}class ya extends Na{autoTag(){}getTag(){return this.currentTag.tag?super.getTag():null}}class xa extends Na{finalize(t,e){if(!e.display||this.history.find((function(t){return t.taggable})))return t;const s=this.getTag(!0);return this.enTag(t,s)}}const va=new Map([["none",ya],["all",xa]]);let Ca="none";const Ta={OPTIONS:{tags:Ca,tagSide:"right",tagIndent:"0.8em",useLabelIds:!0,ignoreDuplicateLabels:!1,tagAlign:"baseline"},add(t,e){va.set(t,e)},addTags(t){for(const e of Object.keys(t))Ta.add(e,t[e])},create(t){const e=va.get(t)||va.get(Ca);if(!e)throw Error("Unknown tags class");return new e},setDefault(t){Ca=t},getDefault:()=>Ta.create(Ca)};class _a{constructor(t,e,s){this._token=t,this._char=e,this._attributes=s}get token(){return this._token}get char(){return this._char}get attributes(){return this._attributes}}class wa{constructor(t,e,s=[]){this._token=t,this._func=e,this._args=s}get token(){return this._token}get func(){return this._func}get args(){return this._args}}function ka(t){return void 0===t||t}class Aa{constructor(t,e){this._name=t,this._parser=e,Ba.register(this)}get name(){return this._name}parserFor(t){return this.contains(t)?this.parser:null}parse([t,e]){const s=this.parserFor(e),i=this.lookup(e);return s&&i?ka(s(t,i)):null}set parser(t){this._parser=t}get parser(){return this._parser}}class Ma extends Aa{constructor(t,e,s){super(t,e),this._regExp=s}contains(t){return this._regExp.test(t)}lookup(t){return this.contains(t)?t:null}}class La extends Aa{constructor(){super(...arguments),this.map=new Map}lookup(t){return this.map.get(t)}contains(t){return this.map.has(t)}add(t,e){this.map.set(t,e)}remove(t){this.map.delete(t)}}class Ia extends La{constructor(t,e,s){super(t,e);for(const t of Object.keys(s)){const e=s[t],[i,r]="string"==typeof e?[e,null]:e,n=new _a(t,i,r);this.add(t,n)}}}class Sa extends Ia{parse([t,e]){return super.parse([t,"\\"+e])}}class Ra extends La{constructor(t,e,s={}){super(t,null);const i=t=>"string"==typeof t?s[t]:t;for(const[t,s]of Object.entries(e)){let e,r;Array.isArray(s)?(e=i(s[0]),r=s.slice(1)):(e=i(s),r=[]);const n=new wa(t,e,r);this.add(t,n)}}parserFor(t){const e=this.lookup(t);return e?e.func:null}parse([t,e]){const s=this.lookup(e),i=this.parserFor(e);return s&&i?ka(i(t,s.token,...s.args)):null}}class Oa extends Ra{parse([t,e]){const s=this.lookup(e),i=this.parserFor(e);if(!s||!i)return null;const r=t.currentCS;t.currentCS="\\"+e;const n=i(t,"\\"+s.token,...s.args);return t.currentCS=r,ka(n)}}class Da extends Ra{constructor(t,e,s,i={}){super(t,s,i),this.parser=e}parse([t,e]){const s=this.lookup(e),i=this.parserFor(e);return s&&i?ka(this.parser(t,s.token,i,s.args)):null}}const Pa=new Map,Ba={register(t){Pa.set(t.name,t)},getMap:t=>Pa.get(t)};class Fa{constructor(){this._configuration=new mi,this._fallback=new fi}add(t,e,s=mi.DEFAULTPRIORITY){for(const e of t.slice().reverse()){const t=Ba.getMap(e);if(!t)return void this.warn(`Configuration '${e}' not found! Omitted.`);this._configuration.add(t,s)}e&&this._fallback.add(e,s)}remove(t,e=null){for(const e of t){const t=this.retrieve(e);t&&this._configuration.remove(t)}e&&this._fallback.remove(e)}parse(t){for(const{item:e}of this._configuration){const s=e.parse(t);if(s===Fa.FALLBACK)break;if(s)return s}const[e,s]=t;Array.from(this._fallback)[0].item(e,s)}lookup(t){const e=this.applicable(t);return e?e.lookup(t):null}contains(t){const e=this.applicable(t);return!(!e||e instanceof Ia&&null===e.lookup(t).char)}toString(){const t=[];for(const{item:e}of this._configuration)t.push(e.name);return t.join(", ")}applicable(t){for(const{item:e}of this._configuration)if(e.contains(t))return e;return null}retrieve(t){for(const{item:e}of this._configuration)if(e.name===t)return e;return null}warn(t){console.log("TexParser Warning: "+t)}}Fa.FALLBACK=Symbol("fallback");class ja{constructor(){this.map=new Map}add(t,e,s=mi.DEFAULTPRIORITY){for(const i of Object.keys(t)){const r=i;let n=this.get(r);n||(n=new Fa,this.set(r,n)),n.add(t[r],e[r],s)}}remove(t,e){for(const s of Object.keys(t)){const i=this.get(s);i&&i.remove(t[s],e[s])}}set(t,e){this.map.set(t,e)}get(t){return this.map.get(t)}retrieve(t){for(const e of this.map.values()){const s=e.retrieve(t);if(s)return s}return null}keys(){return this.map.keys()}}class Ua{static makeProcessor(t,e){return Array.isArray(t)?t:[t,e]}static _create(t,e={}){var s;const i=null!==(s=e.priority)&&void 0!==s?s:mi.DEFAULTPRIORITY,r=e.init?this.makeProcessor(e.init,i):null,n=e.config?this.makeProcessor(e.config,i):null,o=(e.preprocessors||[]).map((t=>this.makeProcessor(t,i))),a=(e.postprocessors||[]).map((t=>this.makeProcessor(t,i))),c=e.parser||"tex";return new Ua(t,e[Go.HANDLER]||{},e[Go.FALLBACK]||{},e[Go.ITEMS]||{},e[Go.TAGS]||{},e[Go.OPTIONS]||{},e[Go.NODES]||{},o,a,r,n,i,c)}static create(t,e={}){const s=Ua._create(t,e);return Ha.set(t,s),s}static local(t={}){return Ua._create("",t)}constructor(t,e={},s={},i={},r={},n={},o={},a=[],c=[],l=null,h=null,d,u){this.name=t,this.handler=e,this.fallback=s,this.items=i,this.tags=r,this.options=n,this.nodes=o,this.preprocessors=a,this.postprocessors=c,this.initMethod=l,this.configMethod=h,this.priority=d,this.parser=u,this.handler=Object.assign({[Jo.CHARACTER]:[],[Jo.DELIMITER]:[],[Jo.MACRO]:[],[Jo.ENVIRONMENT]:[]},e)}get init(){return this.initMethod?this.initMethod[0]:null}get config(){return this.configMethod?this.configMethod[0]:null}}const qa=new Map,Ha={set(t,e){qa.set(t,e)},get:t=>qa.get(t),keys:()=>qa.keys()};class Wa{constructor(t,e=["tex"]){this.initMethod=new fi,this.configMethod=new fi,this.configurations=new mi,this.parsers=[],this.handlers=new ja,this.items={},this.tags={},this.options={},this.nodes={},this.parsers=e;for(const e of t.slice().reverse())this.addPackage(e);for(const{item:t,priority:e}of this.configurations)this.append(t,e)}init(){this.initMethod.execute(this)}config(t){this.configMethod.execute(this,t);for(const e of this.configurations)this.addFilters(t,e.item)}addPackage(t){const e="string"==typeof t?t:t[0],s=this.getPackage(e);s&&this.configurations.add(s,"string"==typeof t?s.priority:t[1])}add(t,e,s={}){const i=this.getPackage(t);this.append(i),this.configurations.add(i,i.priority),this.init();const r=e.parseOptions;r.nodeFactory.setCreators(i.nodes);for(const t of Object.keys(i.items))r.itemFactory.setNodeClass(t,i.items[t]);Ta.addTags(i.tags),Oi(r.options,i.options),Di(r.options,s),this.addFilters(e,i),i.config&&i.config(this,e)}getPackage(t){const e=Ha.get(t);if(e&&!this.parsers.includes(e.parser))throw Error(`Package '${t}' doesn't target the proper parser`);return e||this.warn(`Package '${t}' not found. Omitted.`),e}append(t,e){e=e||t.priority,t.initMethod&&this.initMethod.add(t.initMethod[0],t.initMethod[1]),t.configMethod&&this.configMethod.add(t.configMethod[0],t.configMethod[1]),this.handlers.add(t.handler,t.fallback,e),Object.assign(this.items,t.items),Object.assign(this.tags,t.tags),Oi(this.options,t.options),Object.assign(this.nodes,t.nodes)}addFilters(t,e){for(const[s,i]of e.preprocessors)t.preFilters.add(s,i);for(const[s,i]of e.postprocessors)t.postFilters.add(s,i)}warn(t){console.warn("MathJax Warning: "+t)}}class za extends ea{constructor(t,e){super(t),this.global=e}get kind(){return"start"}get isOpen(){return!0}checkItem(t){if(t.isKind("stop")){let t=this.toMml();return this.global.isInner||(t=this.factory.configuration.tags.finalize(t,this.env)),[[this.factory.create("mml",t)],!0]}return super.checkItem(t)}}class Xa extends ea{get kind(){return"stop"}get isClose(){return!0}}class Va extends ea{get kind(){return"open"}get isOpen(){return!0}checkItem(t){if(t.isKind("close")){const e=this.toMml(),s=this.create("node","TeXAtom",[e]);return gc(s,t),[[this.factory.create("mml",s)],!0]}return super.checkItem(t)}}Va.errors=Object.assign(Object.create(ea.errors),{stop:["ExtraOpenMissingClose","Extra open brace or missing close brace"]});class Ga extends ea{get kind(){return"close"}get isClose(){return!0}}class Ja extends ea{get kind(){return"null"}}class Ka extends ea{get kind(){return"prime"}checkItem(t){const[e,s]=this.Peek(2),i=(Uo.isType(e,"msubsup")||Uo.isType(e,"msup"))&&!Uo.getChildAt(e,e.sup),r=(Uo.isType(e,"munderover")||Uo.isType(e,"mover"))&&!Uo.getChildAt(e,e.over)&&!Uo.getProperty(e,"subsupOK");if(!i&&!r){return[[this.create("node",e.getProperty("movesupsub")?"mover":"msup",[e,s]),t],!0]}const n=i?e.sup:e.over;return Uo.setChild(e,n,s),[[e,t],!0]}}class $a extends ea{get kind(){return"subsup"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return ea.success;const e=this.First,s=this.getProperty("position");if(t.isKind("mml")){if(this.getProperty("primes"))if(2!==s)Uo.setChild(e,2,this.getProperty("primes"));else{Uo.setProperty(this.getProperty("primes"),"variantForm",!0);const e=this.create("node","mrow",[this.getProperty("primes"),t.First]);t.First=e}Uo.setChild(e,s,t.First),null!=this.getProperty("movesupsub")&&Uo.setProperty(e,"movesupsub",this.getProperty("movesupsub"));return[[this.factory.create("mml",e)],!0]}super.checkItem(t);const i=this.getErrors(["","sub","sup"][s]);throw new Zo(i[0],i[1],...i.splice(2))}}$a.errors=Object.assign(Object.create(ea.errors),{stop:["MissingScript","Missing superscript or subscript argument"],sup:["MissingOpenForSup","Missing open brace for superscript"],sub:["MissingOpenForSub","Missing open brace for subscript"]});class Ya extends ea{constructor(t){super(t),this.setProperty("name","\\over")}get kind(){return"over"}get isClose(){return!0}checkItem(t){if(t.isKind("over"))throw new Zo("AmbiguousUseOf","Ambiguous use of %1",t.getName());if(t.isClose){let e=this.create("node","mfrac",[this.getProperty("num"),this.toMml(!1)]);return null!=this.getProperty("thickness")&&Uo.setAttribute(e,"linethickness",this.getProperty("thickness")),(this.getProperty("ldelim")||this.getProperty("rdelim"))&&(Uo.setProperty(e,"withDelims",!0),e=ua.fixedFence(this.factory.configuration,this.getProperty("ldelim"),e,this.getProperty("rdelim"))),e.attributes.set(sa.Attr.LATEXITEM,this.getProperty("name")),[[this.factory.create("mml",e),t],!0]}return super.checkItem(t)}toString(){return"over["+this.getProperty("num")+" / "+this.nodes.join("; ")+"]"}}class Qa extends ea{constructor(t,e){super(t),this.setProperty("delim",e)}get kind(){return"left"}get isOpen(){return!0}checkItem(t){if(t.isKind("right")){const e=ua.fenced(this.factory.configuration,this.getProperty("delim"),this.toMml(),t.getProperty("delim"),"",t.getProperty("color")),s=e.childNodes[0],i=e.childNodes[e.childNodes.length-1],r=this.factory.create("mml",e);return gc(s,this,"\\left"),gc(i,t,"\\right"),r.Peek()[0].attributes.set(sa.Attr.LATEXITEM,"\\left"+t.startStr.slice(this.startI,t.stopI)),[[r],!0]}if(t.isKind("middle")){const e={stretchy:!0};t.getProperty("color")&&(e.mathcolor=t.getProperty("color"));const s=this.create("token","mo",e,t.getProperty("delim"));return gc(s,t,"\\middle"),this.Push(this.create("node","TeXAtom",[],{texClass:pr.CLOSE}),s,this.create("node","TeXAtom",[],{texClass:pr.OPEN})),this.env={},[[this],!0]}return super.checkItem(t)}}Qa.errors=Object.assign(Object.create(ea.errors),{stop:["ExtraLeftMissingRight","Extra \\left or missing \\right"]});class Za extends ea{constructor(t,e,s){super(t),this.setProperty("delim",e),s&&this.setProperty("color",s)}get kind(){return"middle"}get isClose(){return!0}}class tc extends ea{constructor(t,e,s){super(t),this.setProperty("delim",e),s&&this.setProperty("color",s)}get kind(){return"right"}get isClose(){return!0}}class ec extends ea{get kind(){return"break"}constructor(t,e,s){super(t),this.setProperty("linebreak",e),this.setProperty("insert",s)}checkItem(t){var e,s;const i=this.getProperty("linebreak");if(t.isKind("mml")){const r=t.First;if(r.isKind("mo")){if("after"!==((null===(s=null===(e=Uo.getOp(r))||void 0===e?void 0:e[3])||void 0===s?void 0:s.linebreakstyle)||Uo.getAttribute(r,"linebreakstyle")))return Uo.setAttribute(r,"linebreak",i),[[t],!0];if(!this.getProperty("insert"))return[[t],!0]}}const r=this.create("token","mspace",{linebreak:i});return[[this.factory.create("mml",r),t],!0]}}class sc extends ea{get kind(){return"begin"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new Zo("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),t.getName());const e=this.toMml();return gc(e,t),[[this.factory.create("mml",e)],!0]}if(t.isKind("stop"))throw new Zo("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}class ic extends ea{get kind(){return"end"}get isClose(){return!0}}class rc extends ea{get kind(){return"style"}checkItem(t){if(!t.isClose)return super.checkItem(t);const e=this.create("node","mstyle",this.nodes,this.getProperty("styles"));return[[this.factory.create("mml",e),t],!0]}}class nc extends ea{get kind(){return"position"}checkItem(t){if(t.isClose)throw new Zo("MissingBoxFor","Missing box for %1",this.getName());if(t.isFinal){let e=t.toMml();switch(this.getProperty("move")){case"vertical":return e=this.create("node","mpadded",[e],{height:this.getProperty("dh"),depth:this.getProperty("dd"),voffset:this.getProperty("dh")}),[[this.factory.create("mml",e)],!0];case"horizontal":return[[this.factory.create("mml",this.getProperty("left")),t,this.factory.create("mml",this.getProperty("right"))],!0]}}return super.checkItem(t)}}class oc extends ea{get kind(){return"cell"}get isClose(){return!0}}class ac extends ea{get isFinal(){return!0}get kind(){return"mml"}}class cc extends ea{get kind(){return"fn"}checkItem(t){const e=this.First;if(e){if(t.isOpen)return ea.success;if(!t.isKind("fn")){let s=t.First;if(!t.isKind("mml")||!s)return[[e,t],!0];if(Uo.isType(s,"mstyle")&&s.childNodes.length&&Uo.isType(s.childNodes[0].childNodes[0],"mspace")||Uo.isType(s,"mspace"))return[[e,t],!0];Uo.isEmbellished(s)&&(s=Uo.getCoreMO(s));const i=Uo.getForm(s);if(null!=i&&[0,0,1,1,0,1,1,0,0,0][i[2]])return[[e,t],!0]}return[[e,this.create("token","mo",{texClass:pr.NONE},bo.ApplyFunction),t],!0]}return super.checkItem(t)}}class lc extends ea{constructor(){super(...arguments),this.remap=Ba.getMap("not_remap")}get kind(){return"not"}checkItem(t){let e,s,i;if(t.isKind("open")||t.isKind("left"))return ea.success;if(t.isKind("mml")&&(Uo.isType(t.First,"mo")||Uo.isType(t.First,"mi")||Uo.isType(t.First,"mtext"))&&(e=t.First,s=Uo.getText(e),1===s.length&&!Uo.getProperty(e,"movesupsub")&&1===Uo.getChildren(e).length))return this.remap.contains(s)?(i=this.create("text",this.remap.lookup(s).char),Uo.setChild(e,0,i)):(i=this.create("text","\u0338"),Uo.appendChildren(e,[i])),[[t],!0];i=this.create("text","\u29f8");const r=this.create("node","mtext",[],{},i),n=this.create("node","mpadded",[r],{width:0});return e=this.create("node","TeXAtom",[n],{texClass:pr.REL}),[[e,t],!0]}}class hc extends ea{get kind(){return"nonscript"}checkItem(t){if(t.isKind("mml")&&1===t.Size()){let e=t.First;if(e.isKind("mstyle")&&e.notParent&&(e=Uo.getChildren(Uo.getChildren(e)[0])[0]),e.isKind("mspace")){if(e!==t.First){const e=this.create("node","mrow",[t.Pop()]);t.Push(e)}this.factory.configuration.addNode("nonscript",t.First)}}return[[t],!0]}}class dc extends ea{get kind(){return"dots"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return ea.success;let e=this.getProperty("ldots");const s=t.First;if(t.isKind("mml")&&Uo.isEmbellished(s)){const t=Uo.getTexClass(Uo.getCoreMO(s));t!==pr.BIN&&t!==pr.REL||(e=this.getProperty("cdots"))}return[[e,t],!0]}}class uc extends ea{constructor(){super(...arguments),this.table=[],this.row=[],this.frame=[],this.hfill=[],this.arraydef={},this.cstart=[],this.cend=[],this.cextra=[],this.atEnd=!1,this.ralign=[],this.breakAlign={cell:"",row:"",table:""},this.templateSubs=0}get kind(){return"array"}get isOpen(){return!0}get copyEnv(){return!1}checkItem(t){if(t.isClose&&!t.isKind("over")){if(t.getProperty("isEntry"))return this.EndEntry(),this.clearEnv(),this.StartEntry(),ea.fail;if(t.getProperty("isCR"))return this.EndEntry(),this.EndRow(),this.clearEnv(),this.StartEntry(),ea.fail;this.EndTable(),this.clearEnv();const e=this.factory.create("mml",this.createMml());if(this.getProperty("requireClose")){if(t.isKind("close"))return[[e],!0];throw new Zo("MissingCloseBrace","Missing close brace")}return[[e,t],!0]}return super.checkItem(t)}createMml(){const t=this.arraydef.scriptlevel;delete this.arraydef.scriptlevel;let e=this.create("node","mtable",this.table,this.arraydef);return t&&e.setProperty("smallmatrix",!0),this.breakAlign.table&&Uo.setAttribute(e,"data-break-align",this.breakAlign.table),this.getProperty("arrayPadding")&&(Uo.setAttribute(e,"data-frame-styles",""),Uo.setAttribute(e,"framespacing",this.getProperty("arrayPadding"))),e=this.handleFrame(e),void 0!==t&&(e=this.create("node","mstyle",[e],{scriptlevel:t})),(this.getProperty("open")||this.getProperty("close"))&&(e=ua.fenced(this.factory.configuration,this.getProperty("open"),e,this.getProperty("close"))),e}handleFrame(t){if(!this.frame.length)return t;const e=new Map(this.frame),s=this.frame.reduce(((t,[,e])=>e===t?e:""),this.frame[0][1]);if(s){if(4===this.frame.length)return Uo.setAttribute(t,"frame",s),Uo.removeAttribute(t,"data-frame-styles"),t;if("solid"===s)return Uo.setAttribute(t,"data-frame-styles",""),t=this.create("node","menclose",[t],{notation:Array.from(e.keys()).join(" "),"data-padding":0})}const i=_o.map((t=>e.get(t)||"none")).join(" ");return Uo.setAttribute(t,"data-frame-styles",i),t}StartEntry(){const t=this.row.length;let e=this.cstart[t],s=this.cend[t];const i=this.ralign[t],r=this.cextra;if(!(e||s||i||r[t]||r[t+1]))return;let[n,o,a,c]=this.getEntry();if(!r[t]||this.atEnd&&!r[t+1]||(e+="&"),"&"!==a&&(c=!!o.trim()||!!(t||a&&"\\end"!==a.substring(0,4)),r[t+1]&&!r[t]&&(s=(s||"")+"&",this.atEnd=!0)),!c&&!n)return;const l=this.parser;if(c&&(e&&(o=ua.addArgs(l,e,o)),s&&(o=ua.addArgs(l,o,s)),i&&(o="\\text{"+o.trim()+"}"),(e||s||i)&&++this.templateSubs>l.configuration.options.maxTemplateSubtitutions))throw new Zo("MaxTemplateSubs","Maximum template substitutions exceeded; is there an invalid use of \\\\ in the template?");n&&(o=ua.addArgs(l,n,o)),l.string=ua.addArgs(l,o,l.string),l.i=0}getEntry(){const t=this.parser,e=/^([^]*?)([&{}]|\\\\|\\(?:begin|end)\s*\{array\}|\\cr|\\)/;let s,i=0,r=0,n=t.i;const o=["","","",!1];for(;null!==(s=t.string.slice(n).match(e));)switch(n+=s[0].length,s[2]){case"\\":n++;break;case"{":i++;break;case"}":if(!i)return o;i--;break;case"\\begin{array}":i||r++;break;case"\\end{array}":if(!i&&r){r--;break}default:{if(i||r)continue;n-=s[2].length;let e=t.string.slice(t.i,n).trim();const o=e.match(/^(?:\s*\\(?:h(?:dash)?line|hfil{1,3}|rowcolor\s*\{.*?\}))+/);return o&&(e=e.slice(o[0].length)),t.string=t.string.slice(n),t.i=0,[(null==o?void 0:o[0])||"",e,s[2],!0]}}return o}EndEntry(){const t=this.create("node","mtd",this.nodes);this.hfill.length&&(0===this.hfill[0]&&Uo.setAttribute(t,"columnalign","right"),this.hfill[this.hfill.length-1]===this.Size()&&Uo.setAttribute(t,"columnalign",Uo.getAttribute(t,"columnalign")?"center":"left"));const e=this.ralign[this.row.length];if(e){const[s,i,r]=e,n=this.create("node","mpadded",t.childNodes[0].childNodes,{width:i,"data-overflow":"auto","data-align":r,"data-vertical-align":s});n.setProperty("vbox",s),t.childNodes[0].childNodes=[],t.appendChild(n)}else this.breakAlign.cell&&Uo.setAttribute(t,"data-vertical-align",this.breakAlign.cell);this.breakAlign.cell="",this.row.push(t),this.Clear(),this.hfill=[]}EndRow(){let t="mtr";this.getProperty("isNumbered")&&3===this.row.length?(this.row.unshift(this.row.pop()),t="mlabeledtr"):this.getProperty("isLabeled")&&(t="mlabeledtr",this.setProperty("isLabeled",!1));const e=this.create("node",t,this.row);this.breakAlign.row&&(Uo.setAttribute(e,"data-break-align",this.breakAlign.row),this.breakAlign.row=""),gc(e,this),this.table.push(e),this.row=[],this.atEnd=!1}EndTable(){(this.Size()||this.row.length)&&(this.EndEntry(),this.EndRow()),this.checkLines()}checkLines(){if(this.arraydef.rowlines){const t=this.arraydef.rowlines.split(/ /);t.length===this.table.length?(this.frame.push(["bottom",t.pop()]),t.length?this.arraydef.rowlines=t.join(" "):delete this.arraydef.rowlines):t.lengththis.maxrow&&(this.maxrow=this.row.length);const t=this.factory.configuration.tags.getTag();t&&(this.row=[t].concat(this.row),this.setProperty("isLabeled",!0)),this.factory.configuration.tags.clearTag(),super.EndRow()}EndTable(){super.EndTable(),this.factory.configuration.tags.end(),this.extendArray("columnalign",this.maxrow),this.extendArray("columnwidth",this.maxrow),this.extendArray("columnspacing",this.maxrow-1),this.extendArray("data-break-align",this.maxrow),this.addIndentshift()}extendArray(t,e){if(!this.arraydef[t])return;const s=this.arraydef[t].split(/ /),i=[...s];if(i.length>1){for(;i.length0){const t="center"===e?".7em":"2em";for(const e of this.table){const i=e.childNodes[e.isKind("mlabeledtr")?s+1:s];if(i){const e=this.create("node","mstyle",i.childNodes[0].childNodes,{indentshift:t});i.childNodes[0].childNodes=[],i.appendChild(e)}}}e=t[s]}}}class mc extends sc{get kind(){return"mstyle"}constructor(t,e,s){super(t),this.attrList=e,this.setProperty("name",s)}checkItem(t){if(t.isKind("end")&&t.getName()===this.getName()){return[[this.create("node","mstyle",[this.toMml()],this.attrList)],!0]}return super.checkItem(t)}}class fc extends ea{constructor(t,...e){super(t),this.factory.configuration.tags.start("equation",!0,e[0])}get kind(){return"equation"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){const e=this.toMml(),s=this.factory.configuration.tags.getTag();return this.factory.configuration.tags.end(),[[s?this.factory.configuration.tags.enTag(e,s):e,t],!0]}if(t.isKind("stop"))throw new Zo("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}function gc(t,e,s=""){const i=e.startStr.slice(e.startI,e.stopI);i&&(t.attributes.set(sa.Attr.LATEXITEM,s?s+i:i),t.attributes.set(sa.Attr.LATEX,s?s+i:i))}const bc=1.2/.85,Ec={fontfamily:1,fontsize:1,fontweight:1,fontstyle:1,color:1,background:1,id:1,class:1,href:1,style:1};function Nc(t,e=1/0){const s=t.replace(/\s+/g,"").split("").map((t=>{const e={t:"top",b:"bottom",m:"middle",c:"center"}[t];if(!e)throw new Zo("BadBreakAlign","Invalid alignment character: %1",t);return e}));if(s.length>e)throw new Zo("TooManyAligns","Too many alignment characters: %1",t);return 1===e?s[0]:s.join(" ")}function yc(t,e){const s=t.stack.env,i=s.inRoot;s.inRoot=!0;const r=new ia(e,s,t.configuration);let n=r.mml();const o=r.stack.global;if(o.leftRoot||o.upRoot){const e={};o.leftRoot&&(e.width=o.leftRoot),o.upRoot&&(e.voffset=o.upRoot,e.height=o.upRoot),n=t.create("node","mpadded",[n],e)}return s.inRoot=i,n}const xc={Open(t,e){t.Push(t.itemFactory.create("open"))},Close(t,e){t.Push(t.itemFactory.create("close"))},Bar(t,e){t.Push(t.create("token","mo",{stretchy:!1,texClass:pr.ORD},e))},Tilde(t,e){t.Push(t.create("token","mtext",{},bo.nbsp))},Space(t,e){},Superscript(t,e){let s,i;t.GetNext().match(/\d/)&&(t.string=t.string.substring(0,t.i+1)+" "+t.string.substring(t.i+1));const r=t.stack.Top();r.isKind("prime")?([i,s]=r.Peek(2),t.stack.Pop()):(i=t.stack.Prev(),i||(i=t.create("token","mi",{},"")));const n=Uo.getProperty(i,"movesupsub");let o=Uo.isType(i,"msubsup")?i.sup:i.over;if(Uo.isType(i,"msubsup")&&!Uo.isType(i,"msup")&&Uo.getChildAt(i,i.sup)||Uo.isType(i,"munderover")&&!Uo.isType(i,"mover")&&Uo.getChildAt(i,i.over)&&!Uo.getProperty(i,"subsupOK"))throw new Zo("DoubleExponent","Double exponent: use braces to clarify");Uo.isType(i,"msubsup")&&!Uo.isType(i,"msup")||(n?((!Uo.isType(i,"munderover")||Uo.isType(i,"mover")||Uo.getChildAt(i,i.over))&&(i=t.create("node","munderover",[i],{movesupsub:!0})),o=i.over):(i=t.create("node","msubsup",[i]),o=i.sup)),t.Push(t.itemFactory.create("subsup",i).setProperties({position:o,primes:s,movesupsub:n}))},Subscript(t,e){let s,i;t.GetNext().match(/\d/)&&(t.string=t.string.substring(0,t.i+1)+" "+t.string.substring(t.i+1));const r=t.stack.Top();r.isKind("prime")?([i,s]=r.Peek(2),t.stack.Pop()):(i=t.stack.Prev(),i||(i=t.create("token","mi",{},"")));const n=Uo.getProperty(i,"movesupsub");let o=Uo.isType(i,"msubsup")?i.sub:i.under;if(Uo.isType(i,"msubsup")&&!Uo.isType(i,"msup")&&Uo.getChildAt(i,i.sub)||Uo.isType(i,"munderover")&&!Uo.isType(i,"mover")&&Uo.getChildAt(i,i.under)&&!Uo.getProperty(i,"subsupOK"))throw new Zo("DoubleSubscripts","Double subscripts: use braces to clarify");Uo.isType(i,"msubsup")&&!Uo.isType(i,"msup")||(n?((!Uo.isType(i,"munderover")||Uo.isType(i,"mover")||Uo.getChildAt(i,i.under))&&(i=t.create("node","munderover",[i],{movesupsub:!0})),o=i.under):(i=t.create("node","msubsup",[i]),o=i.sub)),t.Push(t.itemFactory.create("subsup",i).setProperties({position:o,primes:s,movesupsub:n}))},Prime(t,e){let s=t.stack.Prev();if(s||(s=t.create("token","mi")),Uo.isType(s,"msubsup")&&!Uo.isType(s,"msup")&&Uo.getChildAt(s,s.sup)||Uo.isType(s,"munderover")&&!Uo.isType(s,"mover")&&Uo.getChildAt(s,s.over)&&!Uo.getProperty(s,"subsupOK"))throw new Zo("DoubleExponentPrime","Prime causes double exponent: use braces to clarify");let i="";t.i--;do{i+=bo.prime,t.i++,e=t.GetNext()}while("'"===e||e===bo.rsquo);i=["","\u2032","\u2033","\u2034","\u2057"][i.length]||i;const r=t.create("token","mo",{variantForm:!0},i);t.Push(t.itemFactory.create("prime",s,r))},Comment(t,e){for(;t.in.macroColumn(t,r,parseInt(i)),t.Push(t.itemFactory.create("null"))},BeginEnd(t,e){const s=t.GetArgument(e);if(s.match(/\\/))throw new Zo("InvalidEnv","Invalid environment name '%1'",s);const i=t.configuration.handlers.get(Jo.ENVIRONMENT).lookup(s);if(i&&"\\end"===e){if(!i.args[0]){const e=t.itemFactory.create("end").setProperty("name",s);return void t.Push(e)}t.stack.env.closing=s}ua.checkMaxMacros(t,!1),t.parse(Jo.ENVIRONMENT,[t,s])},Array(t,e,s,i,r,n,o,a,c){r||(r=t.GetArgument("\\begin{"+e.getName()+"}"));const l=t.itemFactory.create("array");return"array"===e.getName()&&l.setProperty("arrayPadding",".5em .125em"),l.parser=t,l.arraydef={columnspacing:n||"1em",rowspacing:o||"4pt"},t.configuration.columnParser.process(t,r,l),s&&l.setProperty("open",t.convertDelimiter(s)),i&&l.setProperty("close",t.convertDelimiter(i)),"'"===(a||"").charAt(1)&&(l.arraydef["data-cramped"]=!0,a=a.charAt(0)),"D"===a?l.arraydef.displaystyle=!0:a&&(l.arraydef.displaystyle=!1),l.arraydef.scriptlevel="S"===a?1:0,c&&(l.arraydef.useHeight=!1),t.Push(e),l.StartEntry(),l},AlignedArray(t,e,s=""){const i=t.GetBrackets("\\begin{"+e.getName()+"}"),r=xc.Array(t,e,null,null,null,null,null,s);return ua.setArrayAlign(r,i)},IndentAlign(t,e){const s=`\\begin{${e.getName()}}`,i=t.GetBrackets(s,""),r=t.GetBrackets(s,""),n=t.GetBrackets(s,"");if(i&&!$o.matchDimen(i)[0]||r&&!$o.matchDimen(r)[0]||n&&!$o.matchDimen(n)[0])throw new Zo("BracketMustBeDimension","Bracket argument to %1 must be a dimension",s);const o=t.GetArgument(s);if(o&&!o.match(/^([lcr]{1,3})?$/))throw new Zo("BadAlignment","Alignment must be one to three copies of l, c, or r");const a=[...o].map((t=>({l:"left",c:"center",r:"right"}[t])));1===a.length&&a.push(a[0]);const c={};for(const[t,e]of[["indentshiftfirst",i],["indentshift",r||i],["indentshiftlast",n],["indentalignfirst",a[0]],["indentalign",a[1]],["indentalignlast",a[2]]])e&&(c[t]=e);t.Push(t.itemFactory.create("mstyle",c,e.getName()))},Equation:(t,e,s,i=!0)=>(t.configuration.mathItem.display=i,t.stack.env.display=i,ua.checkEqnEnv(t),t.Push(e),t.itemFactory.create("equation",s).setProperty("name",e.getName())),EqnArray(t,e,s,i,r,n,o){const a=e.getName(),c="gather"===a||"gather*"===a;i&&ua.checkEqnEnv(t,!c),t.Push(e),r=(r=r.replace(/[^clr]/g,"").split("").join(" ")).replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center"),n=Nc(n);const l=t.itemFactory.create("eqnarray",a,s,i,t.stack.global);return l.arraydef={displaystyle:!0,columnalign:r,columnspacing:o||"1em",rowspacing:"3pt","data-break-align":n,side:t.options.tagSide,minlabelspacing:t.options.tagIndent},c&&l.setProperty("nestable",!0),l},HandleNoTag(t,e){t.tags.notag()},HandleLabel(t,e){const s=t.GetArgument(e);if(""!==s&&!t.tags.refUpdate){if(t.tags.label)throw new Zo("MultipleCommand","Multiple %1",t.currentCS);if(t.tags.label=s,(t.tags.allLabels[s]||t.tags.labels[s])&&!t.options.ignoreDuplicateLabels)throw new Zo("MultipleLabel","Label '%1' multiply defined",s);t.tags.labels[s]=new ba}},HandleRef(t,e,s){const i=t.GetArgument(e);let r=t.tags.allLabels[i]||t.tags.labels[i];r||(t.tags.refUpdate||(t.tags.redo=!0),r=new ba);let n=r.tag;s&&(n=t.tags.formatRef(n));const o=t.create("node","mrow",ua.internalMath(t,n),{href:t.tags.formatUrl(r.id,t.options.baseURL),class:"MathJax_ref"});t.Push(o)},Macro(t,e,s,i,r){if(i){const n=[];if(null!=r){const s=t.GetBrackets(e);n.push(null==s?r:s)}for(let s=n.length;s1&&(i.autoOP=!1)),!i.mathvariant&&ua.isLatinOrGreekChar(e)){const s=t.configuration.mathStyle(e);s&&(i.mathvariant=s)}const n=t.create("token","mi",i,e);t.Push(n)},digit(t,e){const s=t.configuration.options.numberPattern,i=t.string.slice(t.i-1).match(s),r=ua.getFontDef(t);if(!i)return!1;const n=t.create("token","mn",r,i[0].replace(/[{}]/g,""));return t.i+=i[0].length-1,t.Push(n),!0},controlSequence(t,e){const s=t.GetCS();t.parse(Jo.MACRO,[t,s])},lcGreek(t,e){const s={mathvariant:t.configuration.mathStyle(e.char)||Cc.ITALIC},i=t.create("token","mi",s,e.char);t.Push(i)},ucGreek(t,e){const s={mathvariant:t.stack.env.font||t.configuration.mathStyle(e.char,!0)||Cc.NORMAL},i=t.create("token","mi",s,e.char);t.Push(i)},mathchar0mi(t,e){const s=e.attributes||{mathvariant:Cc.ITALIC},i=t.create("token","mi",s,e.char);t.Push(i)},mathchar0mo(t,e){const s=e.attributes||{};s.stretchy=!1;const i=t.create("token","mo",s,e.char);Uo.setProperty(i,"fixStretchy",!0),t.configuration.addNode("fixStretchy",i),t.Push(i)},mathchar7(t,e){const s=e.attributes||{mathvariant:Cc.NORMAL};t.stack.env.font&&(s.mathvariant=t.stack.env.font);const i=t.create("token","mi",s,e.char);t.Push(i)},delimiter(t,e){let s=e.attributes||{};s=Object.assign({fence:!1,stretchy:!1},s);const i=t.create("token","mo",s,e.char);t.Push(i)},environment(t,e,s,i){const r=t.itemFactory.create("begin").setProperty("name",e);t.Push(s(t,r,...i.slice(1)))}},_c=Tc,wc=po(lo.thickmathspace),kc=sa.Variant;new Ma("letter",_c.variable,/[a-z]/i),new Ma("digit",_c.digit,/[0-9.,]/),new Ma("command",_c.controlSequence,/^\\/),new Ra("special",{"{":vc.Open,"}":vc.Close,"~":vc.Tilde,"^":vc.Superscript,_:vc.Subscript,"|":vc.Bar," ":vc.Space,"\t":vc.Space,"\r":vc.Space,"\n":vc.Space,"'":vc.Prime,"%":vc.Comment,"&":vc.Entry,"#":vc.Hash,"\xa0":vc.Space,"\u2019":vc.Prime}),new Ia("lcGreek",_c.lcGreek,{alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03f5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03d5",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",varepsilon:"\u03b5",vartheta:"\u03d1",varpi:"\u03d6",varrho:"\u03f1",varsigma:"\u03c2",varphi:"\u03c6"}),new Ia("ucGreek",_c.ucGreek,{Gamma:"\u0393",Delta:"\u0394",Theta:"\u0398",Lambda:"\u039b",Xi:"\u039e",Pi:"\u03a0",Sigma:"\u03a3",Upsilon:"\u03a5",Phi:"\u03a6",Psi:"\u03a8",Omega:"\u03a9"}),new Ia("mathchar0mi",_c.mathchar0mi,{AA:"\u212b",S:["\xa7",{mathvariant:kc.NORMAL}],aleph:["\u2135",{mathvariant:kc.NORMAL}],hbar:["\u210f",{variantForm:!0}],imath:"\u0131",jmath:"\u0237",ell:"\u2113",wp:["\u2118",{mathvariant:kc.NORMAL}],Re:["\u211c",{mathvariant:kc.NORMAL}],Im:["\u2111",{mathvariant:kc.NORMAL}],partial:["\u2202",{mathvariant:kc.ITALIC}],infty:["\u221e",{mathvariant:kc.NORMAL}],prime:["\u2032",{variantForm:!0}],emptyset:["\u2205",{mathvariant:kc.NORMAL}],nabla:["\u2207",{mathvariant:kc.NORMAL}],top:["\u22a4",{mathvariant:kc.NORMAL}],bot:["\u22a5",{mathvariant:kc.NORMAL}],angle:["\u2220",{mathvariant:kc.NORMAL}],triangle:["\u25b3",{mathvariant:kc.NORMAL}],backslash:["\\",{mathvariant:kc.NORMAL}],forall:["\u2200",{mathvariant:kc.NORMAL}],exists:["\u2203",{mathvariant:kc.NORMAL}],neg:["\xac",{mathvariant:kc.NORMAL}],lnot:["\xac",{mathvariant:kc.NORMAL}],flat:["\u266d",{mathvariant:kc.NORMAL}],natural:["\u266e",{mathvariant:kc.NORMAL}],sharp:["\u266f",{mathvariant:kc.NORMAL}],clubsuit:["\u2663",{mathvariant:kc.NORMAL}],diamondsuit:["\u2662",{mathvariant:kc.NORMAL}],heartsuit:["\u2661",{mathvariant:kc.NORMAL}],spadesuit:["\u2660",{mathvariant:kc.NORMAL}]}),new Ia("mathchar0mo",_c.mathchar0mo,{surd:"\u221a",coprod:["\u2210",{movesupsub:!0}],bigvee:["\u22c1",{movesupsub:!0}],bigwedge:["\u22c0",{movesupsub:!0}],biguplus:["\u2a04",{movesupsub:!0}],bigcap:["\u22c2",{movesupsub:!0}],bigcup:["\u22c3",{movesupsub:!0}],int:"\u222b",intop:["\u222b",{movesupsub:!0,movablelimits:!0}],iint:"\u222c",iiint:"\u222d",prod:["\u220f",{movesupsub:!0}],sum:["\u2211",{movesupsub:!0}],bigotimes:["\u2a02",{movesupsub:!0}],bigoplus:["\u2a01",{movesupsub:!0}],bigodot:["\u2a00",{movesupsub:!0}],oint:"\u222e",ointop:["\u222e",{movesupsub:!0,movablelimits:!0}],oiint:"\u222f",oiiint:"\u2230",bigsqcup:["\u2a06",{movesupsub:!0}],smallint:["\u222b",{largeop:!1}],triangleleft:"\u25c3",triangleright:"\u25b9",bigtriangleup:"\u25b3",bigtriangledown:"\u25bd",wedge:"\u2227",land:"\u2227",vee:"\u2228",lor:"\u2228",cap:"\u2229",cup:"\u222a",ddagger:"\u2021",dagger:"\u2020",sqcap:"\u2293",sqcup:"\u2294",uplus:"\u228e",amalg:"\u2a3f",diamond:"\u22c4",bullet:"\u2219",wr:"\u2240",div:"\xf7",odot:["\u2299",{largeop:!1}],oslash:["\u2298",{largeop:!1}],otimes:["\u2297",{largeop:!1}],ominus:["\u2296",{largeop:!1}],oplus:["\u2295",{largeop:!1}],mp:"\u2213",pm:"\xb1",circ:"\u2218",bigcirc:"\u25ef",setminus:"\u2216",cdot:"\u22c5",ast:"\u2217",times:"\xd7",star:"\u22c6",propto:"\u221d",sqsubseteq:"\u2291",sqsupseteq:"\u2292",parallel:"\u2225",mid:"\u2223",dashv:"\u22a3",vdash:"\u22a2",leq:"\u2264",le:"\u2264",geq:"\u2265",ge:"\u2265",lt:"<",gt:">",succ:"\u227b",prec:"\u227a",approx:"\u2248",succeq:"\u2ab0",preceq:"\u2aaf",supset:"\u2283",subset:"\u2282",supseteq:"\u2287",subseteq:"\u2286",in:"\u2208",ni:"\u220b",notin:"\u2209",owns:"\u220b",gg:"\u226b",ll:"\u226a",sim:"\u223c",simeq:"\u2243",perp:"\u27c2",equiv:"\u2261",asymp:"\u224d",smile:"\u2323",frown:"\u2322",ne:"\u2260",neq:"\u2260",cong:"\u2245",doteq:"\u2250",bowtie:"\u22c8",models:"\u22a7",notChar:"\u29f8",Leftrightarrow:"\u21d4",Leftarrow:"\u21d0",Rightarrow:"\u21d2",leftrightarrow:"\u2194",leftarrow:"\u2190",gets:"\u2190",rightarrow:"\u2192",to:["\u2192",{accent:!1}],mapsto:"\u21a6",leftharpoonup:"\u21bc",leftharpoondown:"\u21bd",rightharpoonup:"\u21c0",rightharpoondown:"\u21c1",nearrow:"\u2197",searrow:"\u2198",nwarrow:"\u2196",swarrow:"\u2199",rightleftharpoons:"\u21cc",hookrightarrow:"\u21aa",hookleftarrow:"\u21a9",longleftarrow:"\u27f5",Longleftarrow:"\u27f8",longrightarrow:"\u27f6",Longrightarrow:"\u27f9",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",ldots:"\u2026",cdots:"\u22ef",vdots:"\u22ee",ddots:"\u22f1",iddots:"\u22f0",dotsc:"\u2026",dotsb:"\u22ef",dotsm:"\u22ef",dotsi:"\u22ef",dotso:"\u2026",ldotp:[".",{texClass:pr.PUNCT}],cdotp:["\u22c5",{texClass:pr.PUNCT}],colon:[":",{texClass:pr.PUNCT}]}),new Ia("mathchar7",_c.mathchar7,{_:"_","#":"#",$:"$","%":"%","&":"&",And:"&"}),new Sa("delimiter",_c.delimiter,{"(":"(",")":")","[":"[","]":"]","<":"\u27e8",">":"\u27e9","\\lt":"\u27e8","\\gt":"\u27e9","/":"/","|":["|",{texClass:pr.ORD}],".":"","\\lmoustache":"\u23b0","\\rmoustache":"\u23b1","\\lgroup":"\u27ee","\\rgroup":"\u27ef","\\arrowvert":"\u23d0","\\Arrowvert":"\u2016","\\bracevert":"\u23aa","\\Vert":["\u2016",{texClass:pr.ORD}],"\\|":["\u2016",{texClass:pr.ORD}],"\\vert":["|",{texClass:pr.ORD}],"\\uparrow":"\u2191","\\downarrow":"\u2193","\\updownarrow":"\u2195","\\Uparrow":"\u21d1","\\Downarrow":"\u21d3","\\Updownarrow":"\u21d5","\\backslash":"\\","\\rangle":"\u27e9","\\langle":"\u27e8","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"\u2309","\\lceil":"\u2308","\\rfloor":"\u230b","\\lfloor":"\u230a","\\lbrack":"[","\\rbrack":"]"}),new Oa("macros",{displaystyle:[vc.SetStyle,"D",!0,0],textstyle:[vc.SetStyle,"T",!1,0],scriptstyle:[vc.SetStyle,"S",!1,1],scriptscriptstyle:[vc.SetStyle,"SS",!1,2],rm:[vc.SetFont,kc.NORMAL],mit:[vc.SetFont,kc.ITALIC],oldstyle:[vc.SetFont,kc.OLDSTYLE],cal:[vc.SetFont,kc.CALLIGRAPHIC],it:[vc.SetFont,kc.MATHITALIC],bf:[vc.SetFont,kc.BOLD],sf:[vc.SetFont,kc.SANSSERIF],tt:[vc.SetFont,kc.MONOSPACE],frak:[vc.MathFont,kc.FRAKTUR],Bbb:[vc.MathFont,kc.DOUBLESTRUCK],mathrm:[vc.MathFont,kc.NORMAL],mathup:[vc.MathFont,kc.NORMAL],mathnormal:[vc.MathFont,""],mathbf:[vc.MathFont,kc.BOLD],mathbfup:[vc.MathFont,kc.BOLD],mathit:[vc.MathFont,kc.MATHITALIC],mathbfit:[vc.MathFont,kc.BOLDITALIC],mathbb:[vc.MathFont,kc.DOUBLESTRUCK],mathfrak:[vc.MathFont,kc.FRAKTUR],mathbffrak:[vc.MathFont,kc.BOLDFRAKTUR],mathscr:[vc.MathFont,kc.SCRIPT],mathbfscr:[vc.MathFont,kc.BOLDSCRIPT],mathsf:[vc.MathFont,kc.SANSSERIF],mathsfup:[vc.MathFont,kc.SANSSERIF],mathbfsf:[vc.MathFont,kc.BOLDSANSSERIF],mathbfsfup:[vc.MathFont,kc.BOLDSANSSERIF],mathsfit:[vc.MathFont,kc.SANSSERIFITALIC],mathbfsfit:[vc.MathFont,kc.SANSSERIFBOLDITALIC],mathtt:[vc.MathFont,kc.MONOSPACE],mathcal:[vc.MathFont,kc.CALLIGRAPHIC],mathbfcal:[vc.MathFont,kc.BOLDCALLIGRAPHIC],symrm:[vc.MathFont,kc.NORMAL],symup:[vc.MathFont,kc.NORMAL],symnormal:[vc.MathFont,""],symbf:[vc.MathFont,kc.BOLD,kc.BOLDITALIC],symbfup:[vc.MathFont,kc.BOLD],symit:[vc.MathFont,kc.ITALIC],symbfit:[vc.MathFont,kc.BOLDITALIC],symbb:[vc.MathFont,kc.DOUBLESTRUCK],symfrak:[vc.MathFont,kc.FRAKTUR],symbffrak:[vc.MathFont,kc.BOLDFRAKTUR],symscr:[vc.MathFont,kc.SCRIPT],symbfscr:[vc.MathFont,kc.BOLDSCRIPT],symsf:[vc.MathFont,kc.SANSSERIF,kc.SANSSERIFITALIC],symsfup:[vc.MathFont,kc.SANSSERIF],symbfsf:[vc.MathFont,kc.BOLDSANSSERIF],symbfsfup:[vc.MathFont,kc.BOLDSANSSERIF],symsfit:[vc.MathFont,kc.SANSSERIFITALIC],symbfsfit:[vc.MathFont,kc.SANSSERIFBOLDITALIC],symtt:[vc.MathFont,kc.MONOSPACE],symcal:[vc.MathFont,kc.CALLIGRAPHIC],symbfcal:[vc.MathFont,kc.BOLDCALLIGRAPHIC],textrm:[vc.HBox,null,kc.NORMAL],textup:[vc.HBox,null,kc.NORMAL],textnormal:[vc.HBox],textit:[vc.HBox,null,kc.ITALIC],textbf:[vc.HBox,null,kc.BOLD],textsf:[vc.HBox,null,kc.SANSSERIF],texttt:[vc.HBox,null,kc.MONOSPACE],tiny:[vc.SetSize,.5],Tiny:[vc.SetSize,.6],scriptsize:[vc.SetSize,.7],small:[vc.SetSize,.85],normalsize:[vc.SetSize,1],large:[vc.SetSize,1.2],Large:[vc.SetSize,1.44],LARGE:[vc.SetSize,1.73],huge:[vc.SetSize,2.07],Huge:[vc.SetSize,2.49],arcsin:vc.NamedFn,arccos:vc.NamedFn,arctan:vc.NamedFn,arg:vc.NamedFn,cos:vc.NamedFn,cosh:vc.NamedFn,cot:vc.NamedFn,coth:vc.NamedFn,csc:vc.NamedFn,deg:vc.NamedFn,det:vc.NamedOp,dim:vc.NamedFn,exp:vc.NamedFn,gcd:vc.NamedOp,hom:vc.NamedFn,inf:vc.NamedOp,ker:vc.NamedFn,lg:vc.NamedFn,lim:vc.NamedOp,liminf:[vc.NamedOp,"lim inf"],limsup:[vc.NamedOp,"lim sup"],ln:vc.NamedFn,log:vc.NamedFn,max:vc.NamedOp,min:vc.NamedOp,Pr:vc.NamedOp,sec:vc.NamedFn,sin:vc.NamedFn,sinh:vc.NamedFn,sup:vc.NamedOp,tan:vc.NamedFn,tanh:vc.NamedFn,limits:[vc.Limits,!0],nolimits:[vc.Limits,!1],overline:[vc.UnderOver,"2015"],underline:[vc.UnderOver,"2015"],overbrace:[vc.UnderOver,"23DE",!0],underbrace:[vc.UnderOver,"23DF",!0],overparen:[vc.UnderOver,"23DC"],underparen:[vc.UnderOver,"23DD"],overrightarrow:[vc.UnderOver,"2192"],underrightarrow:[vc.UnderOver,"2192"],overleftarrow:[vc.UnderOver,"2190"],underleftarrow:[vc.UnderOver,"2190"],overleftrightarrow:[vc.UnderOver,"2194"],underleftrightarrow:[vc.UnderOver,"2194"],overset:vc.Overset,underset:vc.Underset,overunderset:vc.Overunderset,stackrel:[vc.Macro,"\\mathrel{\\mathop{#2}\\limits^{#1}}",2],stackbin:[vc.Macro,"\\mathbin{\\mathop{#2}\\limits^{#1}}",2],over:vc.Over,overwithdelims:vc.Over,atop:vc.Over,atopwithdelims:vc.Over,above:vc.Over,abovewithdelims:vc.Over,brace:[vc.Over,"{","}"],brack:[vc.Over,"[","]"],choose:[vc.Over,"(",")"],frac:vc.Frac,sqrt:vc.Sqrt,root:vc.Root,uproot:[vc.MoveRoot,"upRoot"],leftroot:[vc.MoveRoot,"leftRoot"],left:vc.LeftRight,right:vc.LeftRight,middle:vc.LeftRight,llap:vc.Lap,rlap:vc.Lap,raise:vc.RaiseLower,lower:vc.RaiseLower,moveleft:vc.MoveLeftRight,moveright:vc.MoveLeftRight,",":[vc.Spacer,lo.thinmathspace],":":[vc.Spacer,lo.mediummathspace],">":[vc.Spacer,lo.mediummathspace],";":[vc.Spacer,lo.thickmathspace],"!":[vc.Spacer,lo.negativethinmathspace],enspace:[vc.Spacer,.5],quad:[vc.Spacer,1],qquad:[vc.Spacer,2],thinspace:[vc.Spacer,lo.thinmathspace],negthinspace:[vc.Spacer,lo.negativethinmathspace],"*":vc.DiscretionaryTimes,allowbreak:vc.AllowBreak,goodbreak:[vc.Linebreak,sa.LineBreak.GOODBREAK],badbreak:[vc.Linebreak,sa.LineBreak.BADBREAK],nobreak:[vc.Linebreak,sa.LineBreak.NOBREAK],break:vc.Break,hskip:vc.Hskip,hspace:vc.Hskip,kern:[vc.Hskip,!0],mskip:vc.Hskip,mspace:vc.Hskip,mkern:[vc.Hskip,!0],rule:vc.rule,Rule:[vc.Rule],Space:[vc.Rule,"blank"],nonscript:vc.Nonscript,big:[vc.MakeBig,pr.ORD,.85],Big:[vc.MakeBig,pr.ORD,1.15],bigg:[vc.MakeBig,pr.ORD,1.45],Bigg:[vc.MakeBig,pr.ORD,1.75],bigl:[vc.MakeBig,pr.OPEN,.85],Bigl:[vc.MakeBig,pr.OPEN,1.15],biggl:[vc.MakeBig,pr.OPEN,1.45],Biggl:[vc.MakeBig,pr.OPEN,1.75],bigr:[vc.MakeBig,pr.CLOSE,.85],Bigr:[vc.MakeBig,pr.CLOSE,1.15],biggr:[vc.MakeBig,pr.CLOSE,1.45],Biggr:[vc.MakeBig,pr.CLOSE,1.75],bigm:[vc.MakeBig,pr.REL,.85],Bigm:[vc.MakeBig,pr.REL,1.15],biggm:[vc.MakeBig,pr.REL,1.45],Biggm:[vc.MakeBig,pr.REL,1.75],mathord:[vc.TeXAtom,pr.ORD],mathop:[vc.TeXAtom,pr.OP],mathopen:[vc.TeXAtom,pr.OPEN],mathclose:[vc.TeXAtom,pr.CLOSE],mathbin:[vc.TeXAtom,pr.BIN],mathrel:[vc.TeXAtom,pr.REL],mathpunct:[vc.TeXAtom,pr.PUNCT],mathinner:[vc.TeXAtom,pr.INNER],vtop:[vc.VBox,"top"],vcenter:[vc.VBox,"center"],vbox:[vc.VBox,"bottom"],hsize:vc.Hsize,parbox:vc.ParBox,breakAlign:vc.BreakAlign,buildrel:vc.BuildRel,hbox:[vc.HBox,0],text:vc.HBox,mbox:[vc.HBox,0],fbox:vc.FBox,boxed:[vc.Macro,"\\fbox{$\\displaystyle{#1}$}",1],framebox:vc.FrameBox,makebox:vc.MakeBox,strut:vc.Strut,mathstrut:[vc.Macro,"\\vphantom{(}"],phantom:vc.Phantom,vphantom:[vc.Phantom,1,0],hphantom:[vc.Phantom,0,1],smash:vc.Smash,acute:[vc.Accent,"00B4"],grave:[vc.Accent,"0060"],ddot:[vc.Accent,"00A8"],dddot:[vc.Accent,"20DB"],ddddot:[vc.Accent,"20DC"],tilde:[vc.Accent,"007E"],bar:[vc.Accent,"00AF"],breve:[vc.Accent,"02D8"],check:[vc.Accent,"02C7"],hat:[vc.Accent,"005E"],vec:[vc.Accent,"2192",!1],dot:[vc.Accent,"02D9"],widetilde:[vc.Accent,"007E",!0],widehat:[vc.Accent,"005E",!0],matrix:vc.Matrix,array:vc.Matrix,pmatrix:[vc.Matrix,"(",")"],cases:[vc.Matrix,"{","","left left",null,".2em",null,!0],eqalign:[vc.Matrix,null,null,"right left",wc,".5em","D"],displaylines:[vc.Matrix,null,null,"center",null,".5em","D"],cr:vc.Cr,"\\":vc.CrLaTeX,newline:[vc.CrLaTeX,!0],hline:vc.HLine,hdashline:[vc.HLine,"dashed"],eqalignno:[vc.Matrix,null,null,"right left",wc,".5em","D",null,"right"],leqalignno:[vc.Matrix,null,null,"right left",wc,".5em","D",null,"left"],hfill:vc.HFill,hfil:vc.HFill,hfilll:vc.HFill,bmod:[vc.Macro,'\\mmlToken{mo}[lspace="'+wc+'" rspace="'+wc+'"]{mod}'],pmod:[vc.Macro,"\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:[vc.Macro,"\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:[vc.Macro,"\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:[vc.Macro,"\\;\\Longleftrightarrow\\;"],skew:[vc.Macro,"{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],pmb:[vc.Macro,"\\rlap{#1}\\kern1px{#1}",1],TeX:[vc.Macro,"T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:[vc.Macro,"L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"],not:vc.Not,dots:vc.Dots,space:vc.Tilde,"\xa0":vc.Tilde," ":vc.Tilde,begin:vc.BeginEnd,end:vc.BeginEnd,label:vc.HandleLabel,ref:vc.HandleRef,nonumber:vc.HandleNoTag,newcolumntype:vc.NewColumnType,mathchoice:vc.MathChoice,mmlToken:vc.MmlToken}),new Da("environment",_c.environment,{displaymath:[vc.Equation,null,!1],math:[vc.Equation,null,!1,!1],array:[vc.AlignedArray],darray:[vc.AlignedArray,null,"D"],equation:[vc.Equation,null,!0],eqnarray:[vc.EqnArray,null,!0,!0,"rcl","bmt",ua.cols(0,lo.thickmathspace),".5em"],indentalign:[vc.IndentAlign]}),new Ia("not_remap",null,{"\u2190":"\u219a","\u2192":"\u219b","\u2194":"\u21ae","\u21d0":"\u21cd","\u21d2":"\u21cf","\u21d4":"\u21ce","\u2208":"\u2209","\u220b":"\u220c","\u2223":"\u2224","\u2225":"\u2226","\u223c":"\u2241","~":"\u2241","\u2243":"\u2244","\u2245":"\u2247","\u2248":"\u2249","\u224d":"\u226d","=":"\u2260","\u2261":"\u2262","<":"\u226e",">":"\u226f","\u2264":"\u2270","\u2265":"\u2271","\u2272":"\u2274","\u2273":"\u2275","\u2276":"\u2278","\u2277":"\u2279","\u227a":"\u2280","\u227b":"\u2281","\u2282":"\u2284","\u2283":"\u2285","\u2286":"\u2288","\u2287":"\u2289","\u22a2":"\u22ac","\u22a8":"\u22ad","\u22a9":"\u22ae","\u22ab":"\u22af","\u227c":"\u22e0","\u227d":"\u22e1","\u2291":"\u22e2","\u2292":"\u22e3","\u22b2":"\u22ea","\u22b3":"\u22eb","\u22b4":"\u22ec","\u22b5":"\u22ed","\u2203":"\u2204"});const Ac=sa.Variant;function Mc(t,e){const s=t.stack.env.font,i=t.stack.env.italicFont,r=s?{mathvariant:s}:{},n=Ba.getMap("remap").lookup(e),o=Sr(e),a=o[3],c=t.create("token",a,r,n?n.char:e),l=ua.isLatinOrGreekChar(e)?t.configuration.mathStyle(e,!0)||i:"",h=o[4]||(s&&l===Ac.NORMAL?"":l);h&&c.attributes.set("mathvariant",h),"mo"===a&&(Uo.setProperty(c,"fixStretchy",!0),t.configuration.addNode("fixStretchy",c)),t.Push(c)}new Ia("remap",null,{"-":"\u2212","*":"\u2217","`":"\u2018"});class Lc extends Na{}const Ic=Ua.create("base",{[Go.CONFIG]:function(t,e){const s=e.parseOptions.options;s.digits&&(s.numberPattern=s.digits),new Ma("digit",_c.digit,s.initialDigit),new Ma("letter",_c.variable,s.initialLetter);t.handlers.get(Jo.CHARACTER).add(["letter","digit"],null,4)},[Go.HANDLER]:{[Jo.CHARACTER]:["command","special"],[Jo.DELIMITER]:["delimiter"],[Jo.MACRO]:["delimiter","macros","lcGreek","ucGreek","mathchar0mi","mathchar0mo","mathchar7"],[Jo.ENVIRONMENT]:["environment"]},[Go.FALLBACK]:{[Jo.CHARACTER]:Mc,[Jo.MACRO]:function(t,e){throw new Zo("UndefinedControlSequence","Undefined control sequence %1","\\"+e)},[Jo.ENVIRONMENT]:function(t,e){throw new Zo("UnknownEnv","Unknown environment '%1'",e)}},[Go.ITEMS]:{[za.prototype.kind]:za,[Xa.prototype.kind]:Xa,[Va.prototype.kind]:Va,[Ga.prototype.kind]:Ga,[Ja.prototype.kind]:Ja,[Ka.prototype.kind]:Ka,[$a.prototype.kind]:$a,[Ya.prototype.kind]:Ya,[Qa.prototype.kind]:Qa,[Za.prototype.kind]:Za,[tc.prototype.kind]:tc,[ec.prototype.kind]:ec,[sc.prototype.kind]:sc,[ic.prototype.kind]:ic,[rc.prototype.kind]:rc,[nc.prototype.kind]:nc,[oc.prototype.kind]:oc,[ac.prototype.kind]:ac,[cc.prototype.kind]:cc,[lc.prototype.kind]:lc,[hc.prototype.kind]:hc,[dc.prototype.kind]:dc,[uc.prototype.kind]:uc,[pc.prototype.kind]:pc,[fc.prototype.kind]:fc,[mc.prototype.kind]:mc},[Go.OPTIONS]:{maxMacros:1e3,digits:"",numberPattern:/^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,initialDigit:/[0-9.,]/,identifierPattern:/^[a-zA-Z]+/,initialLetter:/[a-zA-Z]/,baseURL:di.document&&0!==di.document.getElementsByTagName("base").length?String(di.document.location).replace(/#.*$/,""):""},[Go.TAGS]:{base:Lc},[Go.POSTPROCESSORS]:[[function({data:t}){for(const e of t.getList("nonscript"))if(e.attributes.get("scriptlevel")>0){const s=e.parent;if(s.childNodes.splice(s.childIndex(e),1),t.removeFromList(e.kind,[e]),e.isKind("mrow")){const s=e.childNodes[0];t.removeFromList("mstyle",[s]),t.removeFromList("mspace",s.childNodes[0].childNodes)}}else e.isKind("mrow")&&(e.parent.replaceChild(e.childNodes[0],e),t.removeFromList("mrow",[e]))},-4]]});class Sc extends Yi{static configure(t){const e=new Wa(t,["tex"]);return e.init(),e}static tags(t,e){Ta.addTags(e.tags),Ta.setDefault(t.options.tags),t.tags=Ta.getDefault(),t.tags.configuration=t}constructor(t={}){const[e,s,i]=Fi(t,Sc.OPTIONS,Fo.OPTIONS);super(s),this.findTeX=this.options.FindTeX||new Fo(i);const r=this.options.packages,n=this.configuration=Sc.configure(r),o=this._parseOptions=new ga(n,[this.options,Ta.OPTIONS]);Di(o.options,e),n.config(this),Sc.tags(o,n),this.postFilters.addList([[Vo.cleanSubSup,-7],[Vo.setInherited,-6],[Vo.checkScriptlevel,-5],[Vo.moveLimits,-4],[Vo.cleanStretchy,-3],[Vo.cleanAttributes,-2],[Vo.combineRelations,-1]])}setMmlFactory(t){super.setMmlFactory(t),this._parseOptions.nodeFactory.setMmlFactory(t)}get parseOptions(){return this._parseOptions}reset(t=0){this.parseOptions.tags.reset(t)}compile(t,e){let s,i;this.parseOptions.clear(),this.parseOptions.mathItem=t,this.executeFilters(this.preFilters,t,e,this.parseOptions),this.latex=t.math,this.parseOptions.tags.startEquation(t);try{i=new ia(this.latex,{display:t.display,isInner:!1},this.parseOptions),s=i.mml()}catch(t){if(!(t instanceof Zo))throw t;this.parseOptions.error=!0,s=this.options.formatError(this,t)}return s=this.parseOptions.nodeFactory.create("node","math",[s]),s.attributes.set(sa.Attr.LATEX,this.latex),t.display&&Uo.setAttribute(s,"display","block"),this.parseOptions.tags.finishEquation(t),this.parseOptions.root=s,this.executeFilters(this.postFilters,t,e,this.parseOptions),i&&i.stack.env.hsize&&(Uo.setAttribute(s,"maxwidth",i.stack.env.hsize),Uo.setAttribute(s,"overflow","linebreak")),this.mathNode=this.parseOptions.root,this.mathNode}findMath(t){return this.findTeX.findMath(t)}formatError(t){const e=t.message.replace(/\n.*/,"");return this.parseOptions.nodeFactory.create("error",e,t.id,this.latex)}}Sc.NAME="TeX",Sc.OPTIONS=Object.assign(Object.assign({},Yi.OPTIONS),{FindTeX:null,packages:["base"],maxBuffer:5120,maxTemplateSubtitutions:1e4,mathStyle:"TeX",formatError:(t,e)=>t.formatError(e)});class Rc extends uc{constructor(t,...e){super(t),this.factory.configuration.tags.start("multline",!0,e[0])}get kind(){return"multline"}EndEntry(){this.table.length&&ua.fixInitialMO(this.factory.configuration,this.nodes);const t=this.getProperty("shove"),e=this.create("node","mtd",this.nodes,t?{columnalign:t}:{});this.setProperty("shove",null),this.row.push(e),this.Clear()}EndRow(){if(1!==this.row.length)throw new Zo("MultlineRowsOneCol","The rows within the %1 environment must have exactly one column","multline");const t=this.create("node","mtr",this.row);this.table.push(t),this.row=[]}EndTable(){if(super.EndTable(),this.table.length){const t=this.table.length-1;let e=-1;Uo.getAttribute(Uo.getChildren(this.table[0])[0],"columnalign")||Uo.setAttribute(Uo.getChildren(this.table[0])[0],"columnalign",sa.Align.LEFT),Uo.getAttribute(Uo.getChildren(this.table[t])[0],"columnalign")||Uo.setAttribute(Uo.getChildren(this.table[t])[0],"columnalign",sa.Align.RIGHT);const s=this.factory.configuration.tags.getTag();if(s){e=this.arraydef.side===sa.Align.LEFT?0:this.table.length-1;const t=this.table[e],i=this.create("node","mlabeledtr",[s].concat(Uo.getChildren(t)));Uo.copyAttributes(t,i),this.table[e]=i}}this.factory.configuration.tags.end()}}class Oc extends pc{get kind(){return"flalign"}constructor(t,e,s,i,r){super(t),this.name=e,this.numbered=s,this.padded=i,this.center=r,this.factory.configuration.tags.start(e,s,s)}EndEntry(){super.EndEntry();const t=this.getProperty("xalignat");if(t&&this.row.length>t)throw new Zo("XalignOverflow","Extra %1 in row of %2","&",this.name)}EndRow(){let t;const e=this.row,s=this.getProperty("xalignat");for(;e.lengththis.maxrow&&(this.maxrow=this.row.length),super.EndRow();const i=this.table[this.table.length-1];if(this.getProperty("zeroWidthLabel")&&i.isKind("mlabeledtr")){const t=Uo.getChildren(i)[0],e=this.factory.configuration.options.tagSide,s=Object.assign({width:0},"right"===e?{lspace:"-1width"}:{}),r=this.create("node","mpadded",Uo.getChildren(t),s);t.setChildren([r])}}EndTable(){if(super.EndTable(),this.center&&this.maxrow<=2){delete this.arraydef.width,delete this.global.indentalign}}}var Dc;!function(t){t.NEW_DELIMITER="new-Delimiter",t.NEW_COMMAND="new-Command",t.NEW_ENVIRONMENT="new-Environment"}(Dc||(Dc={}));const Pc=-100,Bc={GetCSname(t,e){if("\\"!==t.GetNext())throw new Zo("MissingCS","%1 must be followed by a control sequence",e);const s=$o.trimSpaces(t.GetArgument(e)).substring(1);return this.checkProtectedMacros(t,s),s},GetCsNameArgument(t,e){let s=$o.trimSpaces(t.GetArgument(e));if("\\"===s.charAt(0)&&(s=s.substring(1)),!s.match(/^(.|[a-z]+)$/i))throw new Zo("IllegalControlSequenceName","Illegal control sequence name for %1",e);return this.checkProtectedMacros(t,s),s},GetArgCount(t,e){let s=t.GetBrackets(e);if(s&&(s=$o.trimSpaces(s),!s.match(/^[0-9]+$/)))throw new Zo("IllegalParamNumber","Illegal number of parameters specified in %1",e);return s},GetTemplate(t,e,s){let i=t.GetNext();const r=[];let n=0,o=t.i;for(;t.i0?[n.toString()].concat(r):n;t.i++}throw new Zo("MissingReplacementString","Missing replacement string for definition of %1",e)},GetParameter(t,e,s){if(null==s)return t.GetArgument(e);let i=t.i,r=0,n=!1;for(;t.it.string.substring(t.i,t.i+e.length)!==e||e.match(/\\[a-z]+$/i)&&t.string.charAt(t.i+e.length).match(/[a-z]/i)?0:(t.i+=e.length,1),checkGlobal:(t,e,s)=>t.stack.env.isGlobal?t.configuration.packageData.get("begingroup").stack.checkGlobal(e,s):s.map((e=>t.configuration.handlers.retrieve(e))),checkProtectedMacros(t,e){var s;if(null===(s=t.options.protectedMacros)||void 0===s?void 0:s.includes(e))throw new Zo("ProtectedMacro","The control sequence %1 can't be redefined",`\\${e}`)},addDelimiter(t,e,s,i){const r=e.substring(1);this.checkProtectedMacros(t,r);const[n,o]=Bc.checkGlobal(t,[r,e],[Dc.NEW_COMMAND,Dc.NEW_DELIMITER]);r!==e&&n.remove(r),o.add(e,new _a(e,s,i)),delete t.stack.env.isGlobal},addMacro(t,e,s,i,r=""){this.checkProtectedMacros(t,e);const n=Bc.checkGlobal(t,[e],[Dc.NEW_COMMAND])[0];this.undefineDelimiter(t,"\\"+e),n.add(e,new wa(r||e,s,i)),delete t.stack.env.isGlobal},addEnvironment(t,e,s,i){Bc.checkGlobal(t,[e],[Dc.NEW_ENVIRONMENT])[0].add(e,new wa(e,s,i)),delete t.stack.env.isGlobal},undefineMacro(t,e){const s=Bc.checkGlobal(t,[e],[Dc.NEW_COMMAND])[0];s.remove(e),t.configuration.handlers.get(Jo.MACRO).applicable(e)&&(s.add(e,new wa(e,(()=>Fa.FALLBACK),[])),this.undefineDelimiter(t,"\\"+e)),delete t.stack.env.isGlobal},undefineDelimiter(t,e){const s=Bc.checkGlobal(t,[e],[Dc.NEW_DELIMITER])[0];s.remove(e),t.configuration.handlers.get(Jo.DELIMITER).applicable(e)&&s.add(e,new _a(e,null,{})),delete t.stack.env.isGlobal}};function Fc(t){if(!t||t.isInferred&&0===t.childNodes.length)return[null,null];if(t.isKind("msubsup")&&jc(t))return[t,null];const e=Uo.getChildAt(t,0);return t.isInferred&&e&&jc(e)?(t.childNodes.splice(0,1),[e,t]):[null,t]}function jc(t){const e=t.childNodes[0];return e&&e.isKind("mi")&&""===e.getText()}const Uc={AmsEqnArray(t,e,s,i,r,n,o,a){const c=t.GetBrackets("\\begin{"+e.getName()+"}"),l=vc.EqnArray(t,e,s,i,r,n,o,a);return ua.setArrayAlign(l,c,t)},AlignAt(t,e,s,i){const r=e.getName();let n,o="",a="";const c=[];i||(n=t.GetBrackets("\\begin{"+r+"}"));const l=t.GetArgument("\\begin{"+r+"}");if(l.match(/[^0-9]/))throw new Zo("PositiveIntegerArg","Argument to %1 must be a positive integer","\\begin{"+r+"}");let h=parseInt(l,10);for(;h>0;)o+="rl",a+="bt",c.push("0em 0em"),h--;const d=c.join(" ");if(i)return Uc.EqnArray(t,e,s,i,o,a,d);const u=Uc.EqnArray(t,e,s,i,o,a,d);return ua.setArrayAlign(u,n,t)},Multline(t,e,s){ua.checkEqnEnv(t),t.Push(e);const i=t.options.ams.multlineIndent,r=t.itemFactory.create("multline",s,t.stack);return r.arraydef={displaystyle:!0,rowspacing:".5em",columnspacing:"100%",width:t.options.ams.multlineWidth,side:t.options.tagSide,minlabelspacing:t.options.tagIndent,"data-array-padding":`${i} ${i}`,"data-width-includes-label":!0},r},XalignAt(t,e,s,i){const r=t.GetArgument("\\begin{"+e.getName()+"}");if(r.match(/[^0-9]/))throw new Zo("PositiveIntegerArg","Argument to %1 must be a positive integer","\\begin{"+e.getName()+"}");const n=i?"crl":"rlc",o=i?"mbt":"btm",a=i?"fit auto auto":"auto auto fit",c=Uc.FlalignArray(t,e,s,i,!1,n,o,a,!0);return c.setProperty("xalignat",2*parseInt(r)),c},FlalignArray(t,e,s,i,r,n,o,a,c=!1){ua.checkEqnEnv(t),t.Push(e),n=n.split("").join(" ").replace(/r/g,"right").replace(/l/g,"left").replace(/c/g,"center"),o=Nc(o);const l=t.itemFactory.create("flalign",e.getName(),s,i,r,t.stack);return l.arraydef={width:"100%",displaystyle:!0,columnalign:n,columnspacing:"0em",columnwidth:a,rowspacing:"3pt","data-break-align":o,side:t.options.tagSide,minlabelspacing:c?"0":t.options.tagIndent,"data-width-includes-label":!0},l.setProperty("zeroWidthLabel",c),l},HandleDeclareOp(t,e){const s=t.GetStar()?"*":"",i=Bc.GetCsNameArgument(t,e),r=t.GetArgument(e);Bc.addMacro(t,i,Uc.Macro,[`\\operatorname${s}{${r}}`]),t.Push(t.itemFactory.create("null"))},HandleOperatorName(t,e){const s=t.GetStar(),i=$o.trimSpaces(t.GetArgument(e));let r=new ia(i,Object.assign(Object.assign({},t.stack.env),{font:sa.Variant.NORMAL,multiLetterIdentifiers:t.options.ams.operatornamePattern,operatorLetters:!0}),t.configuration).mml();if(r.isKind("mi")||(r=t.create("node","TeXAtom",[r])),Uo.setProperties(r,{movesupsub:s,movablelimits:!0,texClass:pr.OP}),!s){const e=t.GetNext(),s=t.i;"\\"===e&&++t.i&&"limits"!==t.GetCS()&&(t.i=s)}t.Push(t.itemFactory.create("fn",r))},SideSet(t,e){const[s,i]=Fc(t.ParseArg(e)),[r,n]=Fc(t.ParseArg(e)),o=t.ParseArg(e);let a=o;s&&(i?s.replaceChild(t.create("node","mphantom",[t.create("node","mpadded",[ua.copyNode(o,t)],{width:0})]),Uo.getChildAt(s,0)):(a=t.create("node","mmultiscripts",[o]),r&&Uo.appendChildren(a,[Uo.getChildAt(r,1)||t.create("node","none"),Uo.getChildAt(r,2)||t.create("node","none")]),Uo.setProperty(a,"scriptalign","left"),Uo.appendChildren(a,[t.create("node","mprescripts"),Uo.getChildAt(s,1)||t.create("node","none"),Uo.getChildAt(s,2)||t.create("node","none")]))),r&&a===o&&(r.replaceChild(o,Uo.getChildAt(r,0)),a=r);const c=t.create("node","TeXAtom",[],{texClass:pr.OP,movesupsub:!0,movablelimits:!0});i&&(s&&c.appendChild(s),c.appendChild(i)),c.appendChild(a),n&&c.appendChild(n),t.Push(c)},operatorLetter:(t,e)=>!!t.stack.env.operatorLetters&&_c.variable(t,e),MultiIntegral(t,e,s){let i=t.GetNext();if("\\"===i){const r=t.i;i=t.GetArgument(e),t.i=r,"\\limits"===i&&(s="\\!\\!\\mathop{\\,\\,"+s+"}")}t.string=s+" "+t.string.slice(t.i),t.i=0},xArrow(t,e,s,i,r,n=0){const o={width:"+"+$o.em((i+r)/18),lspace:$o.em(i/18)},a=t.GetBrackets(e),c=t.ParseArg(e),l=t.create("node","mspace",[],{depth:".2em"});let h=t.create("token","mo",{stretchy:!0,texClass:pr.REL},String.fromCodePoint(s));n&&h.attributes.set("minsize",$o.em(n)),h=t.create("node","mstyle",[h],{scriptlevel:0});const d=t.create("node","munderover",[h]);let u=t.create("node","mpadded",[c,l],o);if(Uo.setAttribute(u,"voffset","-.2em"),Uo.setAttribute(u,"height","-.2em"),Uo.setChild(d,d.over,u),a){const e=new ia(a,t.stack.env,t.configuration).mml(),s=t.create("node","mspace",[],{height:".75em"});u=t.create("node","mpadded",[e,s],o),Uo.setAttribute(u,"voffset",".15em"),Uo.setAttribute(u,"depth","-.15em"),Uo.setChild(d,d.under,u)}Uo.setProperty(d,"subsupOK",!0),t.Push(d)},HandleShove(t,e,s){const i=t.stack.Top();if("multline"!==i.kind)throw new Zo("CommandOnlyAllowedInEnv","%1 only allowed in %2 environment",t.currentCS,"multline");if(i.Size())throw new Zo("CommandAtTheBeginingOfLine","%1 must come at the beginning of the line",t.currentCS);i.setProperty("shove",s)},CFrac(t,e){let s=$o.trimSpaces(t.GetBrackets(e,""));const i=t.GetArgument(e),r=t.GetArgument(e),n={l:sa.Align.LEFT,r:sa.Align.RIGHT,"":""},o=new ia("\\strut\\textstyle{"+i+"}",t.stack.env,t.configuration).mml(),a=new ia("\\strut\\textstyle{"+r+"}",t.stack.env,t.configuration).mml(),c=t.create("node","mfrac",[o,a]);if(s=n[s],null==s)throw new Zo("IllegalAlign","Illegal alignment specified in %1",t.currentCS);s&&Uo.setProperties(c,{numalign:s,denomalign:s}),t.Push(c)},Genfrac(t,e,s,i,r,n){null==s&&(s=t.GetDelimiterArg(e)),null==i&&(i=t.GetDelimiterArg(e)),null==r&&(r=t.GetArgument(e)),null==n&&(n=$o.trimSpaces(t.GetArgument(e)));const o=t.ParseArg(e),a=t.ParseArg(e);let c=t.create("node","mfrac",[o,a]);if(""!==r&&Uo.setAttribute(c,"linethickness",r),(s||i)&&(Uo.setProperty(c,"withDelims",!0),c=ua.fixedFence(t.configuration,s,c,i)),""!==n){const e=parseInt(n,10),s=["D","T","S","SS"][e];if(null==s)throw new Zo("BadMathStyleFor","Bad math style for %1",t.currentCS);c=t.create("node","mstyle",[c]),"D"===s?Uo.setProperties(c,{displaystyle:!0,scriptlevel:0}):Uo.setProperties(c,{displaystyle:!1,scriptlevel:e-1})}t.Push(c)},HandleTag(t,e){if(!t.tags.currentTag.taggable&&t.tags.env)throw new Zo("CommandNotAllowedInEnv","%1 not allowed in %2 environment",t.currentCS,t.tags.env);if(t.tags.currentTag.tag)throw new Zo("MultipleCommand","Multiple %1",t.currentCS);const s=t.GetStar(),i=$o.trimSpaces(t.GetArgument(e));t.tags.tag(i,s),t.Push(t.itemFactory.create("null"))},HandleNoTag:vc.HandleNoTag,HandleRef:vc.HandleRef,Macro:vc.Macro,Accent:vc.Accent,Tilde:vc.Tilde,Array:vc.Array,Spacer:vc.Spacer,NamedOp:vc.NamedOp,EqnArray:vc.EqnArray,Equation:vc.Equation};new Ia("AMSmath-mathchar0mo",_c.mathchar0mo,{iiiint:["\u2a0c",{texClass:pr.OP}]}),new Ma("AMSmath-operatorLetter",Uc.operatorLetter,/[-*]/i),new Oa("AMSmath-macros",{mathring:[Uc.Accent,"02DA"],nobreakspace:Uc.Tilde,negmedspace:[Uc.Spacer,lo.negativemediummathspace],negthickspace:[Uc.Spacer,lo.negativethickmathspace],idotsint:[Uc.MultiIntegral,"\\int\\cdots\\int"],dddot:[Uc.Accent,"20DB"],ddddot:[Uc.Accent,"20DC"],sideset:Uc.SideSet,boxed:[Uc.Macro,"\\fbox{$\\displaystyle{#1}$}",1],tag:Uc.HandleTag,notag:Uc.HandleNoTag,eqref:[Uc.HandleRef,!0],substack:[Uc.Macro,"\\begin{subarray}{c}#1\\end{subarray}",1],injlim:[Uc.NamedOp,"inj lim"],projlim:[Uc.NamedOp,"proj lim"],varliminf:[Uc.Macro,"\\mathop{\\underline{\\mmlToken{mi}{lim}}}"],varlimsup:[Uc.Macro,"\\mathop{\\overline{\\mmlToken{mi}{lim}}}"],varinjlim:[Uc.Macro,"\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}}}"],varprojlim:[Uc.Macro,"\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}}}"],DeclareMathOperator:Uc.HandleDeclareOp,operatorname:Uc.HandleOperatorName,genfrac:Uc.Genfrac,frac:[Uc.Genfrac,"","","",""],tfrac:[Uc.Genfrac,"","","","1"],dfrac:[Uc.Genfrac,"","","","0"],binom:[Uc.Genfrac,"(",")","0",""],tbinom:[Uc.Genfrac,"(",")","0","1"],dbinom:[Uc.Genfrac,"(",")","0","0"],cfrac:Uc.CFrac,shoveleft:[Uc.HandleShove,sa.Align.LEFT],shoveright:[Uc.HandleShove,sa.Align.RIGHT],xrightarrow:[Uc.xArrow,8594,5,10],xleftarrow:[Uc.xArrow,8592,10,5]}),new Da("AMSmath-environment",_c.environment,{"equation*":[Uc.Equation,null,!1],"eqnarray*":[Uc.EqnArray,null,!1,!0,"rcl","bmt",ua.cols(0,lo.thickmathspace),".5em"],align:[Uc.EqnArray,null,!0,!0,"rl","bt",ua.cols(0,2)],"align*":[Uc.EqnArray,null,!1,!0,"rl","bt",ua.cols(0,2)],multline:[Uc.Multline,null,!0],"multline*":[Uc.Multline,null,!1],split:[Uc.EqnArray,null,!1,!1,"rl","bt",ua.cols(0)],gather:[Uc.EqnArray,null,!0,!0,"c","m"],"gather*":[Uc.EqnArray,null,!1,!0,"c","m"],alignat:[Uc.AlignAt,null,!0,!0],"alignat*":[Uc.AlignAt,null,!1,!0],alignedat:[Uc.AlignAt,null,!1,!1],aligned:[Uc.AmsEqnArray,null,null,null,"rl","bt",ua.cols(0,2),".5em","D"],gathered:[Uc.AmsEqnArray,null,null,null,"c","m",null,".5em","D"],xalignat:[Uc.XalignAt,null,!0,!0],"xalignat*":[Uc.XalignAt,null,!1,!0],xxalignat:[Uc.XalignAt,null,!1,!1],flalign:[Uc.FlalignArray,null,!0,!1,!0,"rlc","btm","auto auto fit"],"flalign*":[Uc.FlalignArray,null,!1,!1,!0,"rlc","btm","auto auto fit"],subarray:[Uc.Array,null,null,null,null,ua.cols(0),"0.1em","S",!0],smallmatrix:[Uc.Array,null,null,null,"c",ua.cols(1/3),".2em","S",!0],matrix:[Uc.Array,null,null,null,"c"],pmatrix:[Uc.Array,null,"(",")","c"],bmatrix:[Uc.Array,null,"[","]","c"],Bmatrix:[Uc.Array,null,"\\{","\\}","c"],vmatrix:[Uc.Array,null,"\\vert","\\vert","c"],Vmatrix:[Uc.Array,null,"\\Vert","\\Vert","c"],cases:[Uc.Array,null,"\\{",".","ll",null,".2em","T"]}),new Sa("AMSmath-delimiter",_c.delimiter,{"\\lvert":["|",{texClass:pr.OPEN}],"\\rvert":["|",{texClass:pr.CLOSE}],"\\lVert":["\u2016",{texClass:pr.OPEN}],"\\rVert":["\u2016",{texClass:pr.CLOSE}]}),new Ia("AMSsymbols-mathchar0mi",_c.mathchar0mi,{digamma:"\u03dd",varkappa:"\u03f0",varGamma:["\u0393",{mathvariant:sa.Variant.ITALIC}],varDelta:["\u0394",{mathvariant:sa.Variant.ITALIC}],varTheta:["\u0398",{mathvariant:sa.Variant.ITALIC}],varLambda:["\u039b",{mathvariant:sa.Variant.ITALIC}],varXi:["\u039e",{mathvariant:sa.Variant.ITALIC}],varPi:["\u03a0",{mathvariant:sa.Variant.ITALIC}],varSigma:["\u03a3",{mathvariant:sa.Variant.ITALIC}],varUpsilon:["\u03a5",{mathvariant:sa.Variant.ITALIC}],varPhi:["\u03a6",{mathvariant:sa.Variant.ITALIC}],varPsi:["\u03a8",{mathvariant:sa.Variant.ITALIC}],varOmega:["\u03a9",{mathvariant:sa.Variant.ITALIC}],beth:"\u2136",gimel:"\u2137",daleth:"\u2138",backprime:["\u2035",{variantForm:!0}],hslash:"\u210f",varnothing:["\u2205",{variantForm:!0}],blacktriangle:"\u25b4",triangledown:["\u25bd",{variantForm:!0}],blacktriangledown:"\u25be",square:"\u25fb",Box:"\u25fb",blacksquare:"\u25fc",lozenge:"\u25ca",Diamond:"\u25ca",blacklozenge:"\u29eb",circledS:["\u24c8",{mathvariant:sa.Variant.NORMAL}],bigstar:"\u2605",sphericalangle:"\u2222",measuredangle:"\u2221",nexists:"\u2204",complement:"\u2201",mho:"\u2127",eth:["\xf0",{mathvariant:sa.Variant.NORMAL}],Finv:"\u2132",diagup:"\u2571",Game:"\u2141",diagdown:"\u2572",Bbbk:["k",{mathvariant:sa.Variant.DOUBLESTRUCK}],yen:"\xa5",circledR:"\xae",checkmark:"\u2713",maltese:"\u2720"}),new Ia("AMSsymbols-mathchar0mo",_c.mathchar0mo,{dotplus:"\u2214",ltimes:"\u22c9",smallsetminus:["\u2216",{variantForm:!0}],rtimes:"\u22ca",Cap:"\u22d2",doublecap:"\u22d2",leftthreetimes:"\u22cb",Cup:"\u22d3",doublecup:"\u22d3",rightthreetimes:"\u22cc",barwedge:"\u22bc",curlywedge:"\u22cf",veebar:"\u22bb",curlyvee:"\u22ce",doublebarwedge:"\u2a5e",boxminus:"\u229f",circleddash:"\u229d",boxtimes:"\u22a0",circledast:"\u229b",boxdot:"\u22a1",circledcirc:"\u229a",boxplus:"\u229e",centerdot:["\u22c5",{variantForm:!0}],divideontimes:"\u22c7",intercal:"\u22ba",leqq:"\u2266",geqq:"\u2267",leqslant:"\u2a7d",geqslant:"\u2a7e",eqslantless:"\u2a95",eqslantgtr:"\u2a96",lesssim:"\u2272",gtrsim:"\u2273",lessapprox:"\u2a85",gtrapprox:"\u2a86",approxeq:"\u224a",lessdot:"\u22d6",gtrdot:"\u22d7",lll:"\u22d8",llless:"\u22d8",ggg:"\u22d9",gggtr:"\u22d9",lessgtr:"\u2276",gtrless:"\u2277",lesseqgtr:"\u22da",gtreqless:"\u22db",lesseqqgtr:"\u2a8b",gtreqqless:"\u2a8c",doteqdot:"\u2251",Doteq:"\u2251",eqcirc:"\u2256",risingdotseq:"\u2253",circeq:"\u2257",fallingdotseq:"\u2252",triangleq:"\u225c",backsim:"\u223d",thicksim:["\u223c",{variantForm:!0}],backsimeq:"\u22cd",thickapprox:["\u2248",{variantForm:!0}],subseteqq:"\u2ac5",supseteqq:"\u2ac6",Subset:"\u22d0",Supset:"\u22d1",sqsubset:"\u228f",sqsupset:"\u2290",preccurlyeq:"\u227c",succcurlyeq:"\u227d",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",precsim:"\u227e",succsim:"\u227f",precapprox:"\u2ab7",succapprox:"\u2ab8",vartriangleleft:"\u22b2",lhd:"\u22b2",vartriangleright:"\u22b3",rhd:"\u22b3",trianglelefteq:"\u22b4",unlhd:"\u22b4",trianglerighteq:"\u22b5",unrhd:"\u22b5",vDash:"\u22a8",Vdash:"\u22a9",Vvdash:"\u22aa",smallsmile:["\u2323",{variantForm:!0}],shortmid:["\u2223",{variantForm:!0}],smallfrown:["\u2322",{variantForm:!0}],shortparallel:["\u2225",{variantForm:!0}],bumpeq:"\u224f",between:"\u226c",Bumpeq:"\u224e",pitchfork:"\u22d4",varpropto:["\u221d",{variantForm:!0}],backepsilon:"\u220d",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",therefore:"\u2234",because:"\u2235",eqsim:"\u2242",vartriangle:["\u25b3",{variantForm:!0}],Join:"\u22c8",nless:"\u226e",ngtr:"\u226f",nleq:"\u2270",ngeq:"\u2271",nleqslant:["\u2a87",{variantForm:!0}],ngeqslant:["\u2a88",{variantForm:!0}],nleqq:["\u2270",{variantForm:!0}],ngeqq:["\u2271",{variantForm:!0}],lneq:"\u2a87",gneq:"\u2a88",lneqq:"\u2268",gneqq:"\u2269",lvertneqq:["\u2268",{variantForm:!0}],gvertneqq:["\u2269",{variantForm:!0}],lnsim:"\u22e6",gnsim:"\u22e7",lnapprox:"\u2a89",gnapprox:"\u2a8a",nprec:"\u2280",nsucc:"\u2281",npreceq:["\u22e0",{variantForm:!0}],nsucceq:["\u22e1",{variantForm:!0}],precneqq:"\u2ab5",succneqq:"\u2ab6",precnsim:"\u22e8",succnsim:"\u22e9",precnapprox:"\u2ab9",succnapprox:"\u2aba",nsim:"\u2241",ncong:"\u2247",nshortmid:["\u2224",{variantForm:!0}],nshortparallel:["\u2226",{variantForm:!0}],nmid:"\u2224",nparallel:"\u2226",nvdash:"\u22ac",nvDash:"\u22ad",nVdash:"\u22ae",nVDash:"\u22af",ntriangleleft:"\u22ea",ntriangleright:"\u22eb",ntrianglelefteq:"\u22ec",ntrianglerighteq:"\u22ed",nsubseteq:"\u2288",nsupseteq:"\u2289",nsubseteqq:["\u2288",{variantForm:!0}],nsupseteqq:["\u2289",{variantForm:!0}],subsetneq:"\u228a",supsetneq:"\u228b",varsubsetneq:["\u228a",{variantForm:!0}],varsupsetneq:["\u228b",{variantForm:!0}],subsetneqq:"\u2acb",supsetneqq:"\u2acc",varsubsetneqq:["\u2acb",{variantForm:!0}],varsupsetneqq:["\u2acc",{variantForm:!0}],leftleftarrows:"\u21c7",rightrightarrows:"\u21c9",leftrightarrows:"\u21c6",rightleftarrows:"\u21c4",Lleftarrow:"\u21da",Rrightarrow:"\u21db",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",leftarrowtail:"\u21a2",rightarrowtail:"\u21a3",looparrowleft:"\u21ab",looparrowright:"\u21ac",leftrightharpoons:"\u21cb",rightleftharpoons:["\u21cc",{variantForm:!0}],curvearrowleft:"\u21b6",curvearrowright:"\u21b7",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",Lsh:"\u21b0",Rsh:"\u21b1",upuparrows:"\u21c8",downdownarrows:"\u21ca",upharpoonleft:"\u21bf",upharpoonright:"\u21be",downharpoonleft:"\u21c3",restriction:"\u21be",multimap:"\u22b8",downharpoonright:"\u21c2",leftrightsquigarrow:"\u21ad",rightsquigarrow:"\u21dd",leadsto:"\u21dd",dashrightarrow:"\u21e2",dashleftarrow:"\u21e0",nleftarrow:"\u219a",nrightarrow:"\u219b",nLeftarrow:"\u21cd",nRightarrow:"\u21cf",nleftrightarrow:"\u21ae",nLeftrightarrow:"\u21ce"}),new Sa("AMSsymbols-delimiter",_c.delimiter,{"\\ulcorner":"\u231c","\\urcorner":"\u231d","\\llcorner":"\u231e","\\lrcorner":"\u231f"}),new Oa("AMSsymbols-macros",{implies:[Uc.Macro,"\\;\\Longrightarrow\\;"],impliedby:[Uc.Macro,"\\;\\Longleftarrow\\;"]});class qc extends ea{get kind(){return"beginEnv"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new Zo("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),t.getName());return[[this.factory.create("mml",this.toMml())],!0]}if(t.isKind("stop"))throw new Zo("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}const Hc={NewCommand(t,e){const s=Bc.GetCsNameArgument(t,e),i=Bc.GetArgCount(t,e),r=t.GetBrackets(e),n=t.GetArgument(e);Bc.addMacro(t,s,Hc.Macro,[n,i,r]),t.Push(t.itemFactory.create("null"))},NewEnvironment(t,e){const s=$o.trimSpaces(t.GetArgument(e)),i=Bc.GetArgCount(t,e),r=t.GetBrackets(e),n=t.GetArgument(e),o=t.GetArgument(e);Bc.addEnvironment(t,s,Hc.BeginEnv,[!0,n,o,i,r]),t.Push(t.itemFactory.create("null"))},MacroDef(t,e){const s=Bc.GetCSname(t,e),i=Bc.GetTemplate(t,e,"\\"+s),r=t.GetArgument(e);i instanceof Array?Bc.addMacro(t,s,Hc.MacroWithTemplate,[r].concat(i)):Bc.addMacro(t,s,Hc.Macro,[r,i]),t.Push(t.itemFactory.create("null"))},Let(t,e){const s=Bc.GetCSname(t,e);let i=t.GetNext();"="===i&&(t.i++,i=t.GetNext());const r=t.configuration.handlers;if(t.Push(t.itemFactory.create("null")),"\\"===i){if(s===(e=Bc.GetCSname(t,e)))return;const i=r.get(Jo.MACRO).applicable(e);if(i instanceof Ra){const r=i.lookup(e);return void Bc.addMacro(t,s,r.func,r.args,r.token)}if(i instanceof Ia&&!(i instanceof Sa)){const r=i.lookup(e),n=t=>i.parser(t,r);return void Bc.addMacro(t,s,n,[s,r.char])}const n=r.get(Jo.DELIMITER).lookup("\\"+e);return n?void Bc.addDelimiter(t,"\\"+s,n.char,n.attributes):(Bc.checkProtectedMacros(t,s),Bc.undefineMacro(t,s),void Bc.undefineDelimiter(t,"\\"+s))}t.i++;const n=r.get(Jo.DELIMITER).lookup(i);n?Bc.addDelimiter(t,"\\"+s,n.char,n.attributes):Bc.addMacro(t,s,Hc.Macro,[i])},MacroWithTemplate(t,e,s,i,...r){const n=parseInt(i,10);if(r.length){const i=[];if(t.GetNext(),r[0]&&!Bc.MatchParam(t,r[0]))throw new Zo("MismatchUseDef","Use of %1 doesn't match its definition",e);if(n){for(let s=0;s$c(t,e,r)))):$c(t,e,r)}}function $c(t,e,s){const i=Ha.get(s);if(i){let r=Jc[e]||{};i.options&&1===Object.keys(i.options).length&&i.options[s]&&(r={[s]:r}),t.configuration.add(s,t,r);const n=t.parseOptions.packageData.get("require").configured;i.preprocessors.length&&!n.has(s)&&(n.set(s,!0),Qn.retryAfter(Promise.resolve()))}}function Yc(t,e){var s,i;const r=t.options.require,n=r.allow,o=("["===e.substring(0,1)?"":r.prefix)+e;if(!(Object.hasOwn(n,o)?n[o]:Object.hasOwn(n,e)?n[e]:r.defaultAllow))throw new Zo("BadRequire",'Extension "%1" is not allowed to be loaded',o);const a=pi.packages.get(o);if(a||Qn.retryAfter(yi.load(o).catch((t=>{}))),a.hasFailed)throw new Zo("RequireFail",'Extension "%1" failed to load',e);const c=null===(s=vi[o])||void 0===s?void 0:s.rendererExtensions,l=null===(i=Hi.startup.document)||void 0===i?void 0:i.menu;c&&l&&l.addRequiredExtensions(c),Kc(t.configuration.packageData.get("require").jax,o)}const Qc={Require(t,e){const s=t.GetArgument(e);if(s.match(/[^_a-zA-Z0-9]/)||""===s)throw new Zo("BadPackageName","Argument for %1 is not a valid package name",e);Yc(t,s),t.Push(t.itemFactory.create("null"))}},Zc={require:{allow:Mi({base:!1,autoload:!1,configmacros:!1,tagformat:!1,setoptions:!1,texhtml:!1}),defaultAllow:!0,prefix:"tex"}};new Oa("require",{require:Qc.Require});const tl=Ua.create("require",{[Go.HANDLER]:{[Jo.MACRO]:["require"]},[Go.CONFIG]:function(t,e){e.parseOptions.packageData.set("require",{jax:e,required:[...e.options.packages],configured:new Map});const s=e.parseOptions.options.require,i=s.prefix;if(i.match(/[^_a-zA-Z0-9]/))throw Error("Illegal characters used in \\require prefix");vi.paths[i]||(vi.paths[i]="[mathjax]/input/tex/extensions"),s.prefix="["+i+"]/"},[Go.OPTIONS]:Zc});function el(t,e,s,i){if(pi.packages.has(t.options.require.prefix+s)){const r=t.options.autoload[s],[n,o]=2===r.length&&Array.isArray(r[0])?r:[r,[]];for(const t of n)sl.remove(t);for(const t of o)il.remove(t);t.string=(i?e+" ":"\\begin{"+e.slice(1)+"}")+t.string.slice(t.i),t.i=0}Yc(t,s)}const sl=new Oa("autoload-macros",{}),il=new Oa("autoload-environments",{}),rl=Ua.create("autoload",{[Go.HANDLER]:{[Jo.MACRO]:["autoload-macros"],[Jo.ENVIRONMENT]:["autoload-environments"]},[Go.OPTIONS]:{autoload:Mi({action:["toggle","mathtip","texttip"],amscd:[[],["CD"]],bbox:["bbox"],boldsymbol:["boldsymbol"],braket:["bra","ket","braket","set","Bra","Ket","Braket","Set","ketbra","Ketbra"],bussproofs:[[],["prooftree"]],cancel:["cancel","bcancel","xcancel","cancelto"],color:["color","definecolor","textcolor","colorbox","fcolorbox"],enclose:["enclose"],extpfeil:["xtwoheadrightarrow","xtwoheadleftarrow","xmapsto","xlongequal","xtofrom","Newextarrow"],html:["data","href","class","style","cssId"],mhchem:["ce","pu"],newcommand:["newcommand","renewcommand","newenvironment","renewenvironment","def","let"],unicode:["unicode","U","char"],verb:["verb"]})},[Go.CONFIG]:function(t,e){const s=e.parseOptions,i=s.handlers.get(Jo.MACRO),r=s.handlers.get(Jo.ENVIRONMENT),n=s.options.autoload;s.packageData.set("autoload",{Autoload:el});for(const t of Object.keys(n)){const e=n[t],[s,o]=2===e.length&&Array.isArray(e[0])?e:[e,[]];for(const e of s)i.lookup(e)&&"color"!==e||sl.add(e,new wa(e,el,[t,!0]));for(const e of o)r.lookup(e)||il.add(e,new wa(e,el,[t,!1]))}s.packageData.get("require")||tl.config(t,e)},[Go.INIT]:function(t){t.options.require||Oi(t.options,tl.options)},[Go.PRIORITY]:10}),nl="configmacros-map",ol="configmacros-active-map",al="configmacros-env-map";function cl(t,e,s){const i=s.parseOptions.handlers.retrieve(e),r=s.parseOptions.options[t];for(const t of Object.keys(r)){const e="string"==typeof r[t]?[r[t]]:r[t],s=Array.isArray(e[2])?new wa(t,Wc.MacroWithTemplate,e.slice(0,2).concat(e[2])):new wa(t,Wc.Macro,e);i.add(t,s)}}const ll=Ua.create("configmacros",{[Go.INIT]:function(t){new Ra(ol,{}),new Oa(nl,{}),new Da(al,_c.environment,{}),t.append(Ua.local({handler:{[Jo.CHARACTER]:[ol],[Jo.MACRO]:[nl],[Jo.ENVIRONMENT]:[al]},priority:3}))},[Go.CONFIG]:function(t,e){!function(t){cl("active",ol,t)}(e),function(t){cl("macros",nl,t)}(e),function(t){const e=t.parseOptions.handlers.retrieve(al),s=t.parseOptions.options.environments;for(const t of Object.keys(s))e.add(t,new wa(t,Wc.BeginEnv,[!0].concat(s[t])))}(e)},[Go.ITEMS]:{[qc.prototype.kind]:qc},[Go.OPTIONS]:{active:Mi({}),macros:Mi({}),environments:Mi({})}});const hl=Ua.create("noundefined",{[Go.FALLBACK]:{[Jo.MACRO]:function(t,e){const s=t.create("text","\\"+e),i=t.options.noundefined,r={};for(const t of["color","background","size"])i[t]&&(r["math"+t]=i[t]);t.Push(t.create("node","mtext",[],r,s))}},[Go.OPTIONS]:{noundefined:{color:"red",background:"",size:""}},[Go.PRIORITY]:3});class dl extends ia{get texParser(){return this.configuration.packageData.get("textmacros").texParser}get tags(){return this.texParser.tags}constructor(t,e,s,i){super(t,e,s),this.level=i}mml(){return this.copyLists(),this.configuration.popParser(),null!=this.level?this.create("node","mstyle",this.nodes,{displaystyle:!1,scriptlevel:this.level}):1===this.nodes.length?this.nodes[0]:this.create("node","mrow",this.nodes)}copyLists(){const t=this.texParser.configuration;for(const[e,s]of Object.entries(this.configuration.nodeLists))for(const i of s)t.addNode(e,i);this.configuration.nodeLists={}}Parse(){this.text="",this.nodes=[],this.envStack=[],super.Parse()}saveText(){if(this.text){const t=this.stack.env.mathvariant,e=ua.internalText(this,this.text,t?{mathvariant:t}:{});this.text="",this.Push(e)}}Push(t){if(this.text&&this.saveText(),t instanceof Xa)return super.Push(t);t instanceof rc?this.stack.env.mathcolor=this.stack.env.color:t instanceof Nr&&(this.addAttributes(t),this.nodes.push(t))}PushMath(t){const e=this.stack.env;for(const s of["mathsize","mathcolor"])e[s]&&!t.attributes.hasExplicit(s)&&(t.isToken||t.isKind("mstyle")||(t=this.create("node","mstyle",[t])),Uo.setAttribute(t,s,e[s]));t.isInferred&&(t=this.create("node","mrow",t.childNodes)),t.isKind("TeXAtom")||(t=this.create("node","TeXAtom",[t])),this.nodes.push(t)}addAttributes(t){const e=this.stack.env;if(t.isToken)for(const s of["mathsize","mathcolor","mathvariant"])e[s]&&!t.attributes.hasExplicit(s)&&Uo.setAttribute(t,s,e[s])}ParseTextArg(t,e){const s=this.GetArgument(t);return e=Object.assign(Object.assign({},this.stack.env),e),new dl(s,e,this.configuration).mml()}ParseArg(t){return new dl(this.GetArgument(t),this.stack.env,this.configuration).mml()}Error(t,e,...s){throw new Zo(t,e,...s)}}const ul={Comment(t,e){for(;t.i":[ul.Spacer,lo.mediummathspace],";":[ul.Spacer,lo.thickmathspace],"!":[ul.Spacer,lo.negativethinmathspace],enspace:[ul.Spacer,.5],quad:[ul.Spacer,1],qquad:[ul.Spacer,2],thinspace:[ul.Spacer,lo.thinmathspace],negthinspace:[ul.Spacer,lo.negativethinmathspace],hskip:ul.Hskip,hspace:ul.Hskip,kern:ul.Hskip,mskip:ul.Hskip,mspace:ul.Hskip,mkern:ul.Hskip,rule:ul.rule,Rule:[ul.Rule],Space:[ul.Rule,"blank"],color:ul.CheckAutoload,textcolor:ul.CheckAutoload,colorbox:ul.CheckAutoload,fcolorbox:ul.CheckAutoload,href:ul.CheckAutoload,style:ul.CheckAutoload,class:ul.CheckAutoload,data:ul.CheckAutoload,cssId:ul.CheckAutoload,unicode:ul.CheckAutoload,U:ul.CheckAutoload,char:ul.CheckAutoload,ref:[ul.HandleRef,!1],eqref:[ul.HandleRef,!0],underline:[ul.UnderOver,"2015"],llap:ul.Lap,rlap:ul.Lap,phantom:ul.Phantom,vphantom:[ul.Phantom,1,0],hphantom:[ul.Phantom,0,1],smash:ul.Smash,mmlToken:ul.MmlToken});const ml=Ua.create("text-base",{[Go.PARSER]:"text",[Go.PRIORITY]:1,[Go.HANDLER]:{[Jo.CHARACTER]:["command","text-special"],[Jo.MACRO]:["text-macros"]},[Go.FALLBACK]:{[Jo.CHARACTER]:(t,e)=>{t.text+=e},[Jo.MACRO]:(t,e)=>{const s=t.texParser,i=s.lookup(Jo.MACRO,e);i&&i._func!==ul.Macro&&t.Error("MathMacro","%1 is only supported in math mode","\\"+e),s.parse(Jo.MACRO,[t,e])}},[Go.ITEMS]:{[za.prototype.kind]:za,[Xa.prototype.kind]:Xa,[ac.prototype.kind]:ac,[rc.prototype.kind]:rc}});function fl(t,e,s,i){const r=t.configuration.packageData.get("textmacros");return t instanceof dl||(r.texParser=t),r.parseOptions.clear(),[new dl(e,i?{mathvariant:i}:{},r.parseOptions,s).mml()]}const gl=Ua.create("textmacros",{[Go.PRIORITY]:1,[Go.CONFIG]:(t,e)=>{const s=new Wa(e.parseOptions.options.textmacros.packages,["tex","text"]);s.init();const i=new ga(s,[]);i.options=e.parseOptions.options,s.config(e),Ta.addTags(s.tags),i.tags=Ta.getDefault(),i.tags.configuration=i,i.packageData=e.parseOptions.packageData,i.packageData.set("textmacros",{textConf:s,parseOptions:i,jax:e,texParser:null}),i.options.internalMath=fl},[Go.PREPROCESSORS]:[t=>{const e=t.data.packageData.get("textmacros");e.parseOptions.nodeFactory.setMmlFactory(e.jax.mmlFactory)}],[Go.OPTIONS]:{textmacros:{packages:["text-base"]}}});MathJax.loader&&MathJax.loader.checkVersion("input/tex",ii,"input"),ci({_:{input:{tex_ts:Qt,tex:{ColumnParser:qt,Configuration:Gt,FilterUtil:Lt,FindTeX:At,HandlerTypes:It,MapHandler:Vt,NodeFactory:jt,NodeUtil:Mt,ParseMethods:$t,ParseOptions:Ht,ParseUtil:Ut,Stack:Rt,StackItem:Dt,StackItemFactory:Ft,Tags:Wt,TexConstants:Pt,TexError:Ot,TexParser:Bt,Token:zt,TokenMap:Xt,UnitUtil:St,ams:{AmsConfiguration:ne,AmsItems:Zt,AmsMethods:ee},autoload:{AutoloadConfiguration:ae},base:{BaseConfiguration:Yt,BaseItems:Jt,BaseMethods:Kt},configmacros:{ConfigMacrosConfiguration:ce},newcommand:{NewcommandConfiguration:re,NewcommandItems:se,NewcommandMethods:ie,NewcommandUtil:te},noundefined:{NoUndefinedConfiguration:le},require:{RequireConfiguration:oe},textmacros:{TextMacrosConfiguration:ue,TextMacrosMethods:de,TextParser:he}}}}}),yi.preLoaded("input/tex-base","[tex]/ams","[tex]/newcommand","[tex]/textmacros","[tex]/noundefined","[tex]/require","[tex]/autoload","[tex]/configmacros"),function(t=[],e=!0){if(MathJax.startup){e&&(MathJax.startup.registerConstructor("tex",MathJax._.input.tex_ts.TeX),MathJax.startup.useInput("tex")),MathJax.config.tex||(MathJax.config.tex={});let s=MathJax.config.tex.packages;MathJax.config.tex.packages=t,s&&(Array.isArray(s)&&(s={"[+]":s.filter((e=>!t.includes(e)))}),Ri(MathJax.config.tex,{packages:s}))}}(["base","ams","newcommand","textmacros","noundefined","require","autoload","configmacros"]);const bl="http://www.w3.org/1998/Math/MathML";class El extends $i{findMath(t){const e=new Set;this.findMathNodes(t,e),this.findMathPrefixed(t,e);const s=this.adaptor.root(this.adaptor.document);return"html"===this.adaptor.kind(s)&&0===e.size&&this.findMathNS(t,e),this.processMath(e)}findMathNodes(t,e){for(const s of this.adaptor.tags(t,"math"))e.add(s)}findMathPrefixed(t,e){const s=this.adaptor.root(this.adaptor.document);for(const i of this.adaptor.allAttributes(s))if("xmlns:"===i.name.substring(0,6)&&i.value===bl){const s=i.name.substring(6);for(const i of this.adaptor.tags(t,s+":math"))e.add(i)}}findMathNS(t,e){for(const s of this.adaptor.tags(t,"math",bl))e.add(s)}processMath(t){const e=this.adaptor,s=[];for(const i of t.values()){if("mjx-assistive-mml"===e.kind(e.parent(i)))continue;const t="block"===e.getAttribute(i,"display")||"display"===e.getAttribute(i,"mode"),r={node:i,n:0,delim:""},n={node:i,n:0,delim:""};s.push({math:e.outerHTML(i),start:r,end:n,display:t})}return s}}El.OPTIONS={};class Nl{constructor(t={}){const e=this.constructor;this.options=Di(Oi({},e.OPTIONS),t)}setMmlFactory(t){this.factory=t}compile(t){const e=this.makeNode(t);return e.verifyTree(this.options.verify),e.setInheritedAttributes({},!1,0,!1),e.walkTree(this.markMrows),e}makeNode(t){const e=this.adaptor;let s=!1;const i=e.kind(t).replace(/^.*:/,"");let r=e.getAttribute(t,"data-mjx-texclass")||"";r&&(r=this.filterAttribute("data-mjx-texclass",r)||"");let n=r&&"mrow"===i?"TeXAtom":i;for(const o of this.filterClassList(e.allClasses(t)))o.match(/^MJX-TeXAtom-/)&&"mrow"===i?(r=o.substring(12),n="TeXAtom"):"MJX-fixedlimits"===o&&(s=!0);return this.factory.getNodeClass(n)?this.createMml(n,t,r,s):this.unknownNode(n,t)}createMml(t,e,s,i){const r=this.factory.create(t);return"TeXAtom"!==t||"OP"!==s||i||(r.setProperty("movesupsub",!0),r.attributes.setInherited("movablelimits",!0)),s&&(r.texClass=pr[s],r.setProperty("texClass",r.texClass)),this.addAttributes(r,e),this.checkClass(r,e),this.addChildren(r,e),r}unknownNode(t,e){return this.factory.getNodeClass("html")&&this.options.allowHtmlInTokenNodes?this.factory.create("html").setHTML(e,this.adaptor):(this.error('Unknown node type "'+t+'"'),null)}addAttributes(t,e){let s=!1;for(const i of this.adaptor.allAttributes(e)){const e=i.name,r=this.filterAttribute(e,i.value);if(null!==r&&"xmlns"!==e)if("data-mjx-"===e.substring(0,9))switch(e.substring(9)){case"alternate":t.setProperty("variantForm",!0);break;case"variant":t.attributes.set("mathvariant",r),t.setProperty("ignore-variant",!0),s=!0;break;case"smallmatrix":t.setProperty("smallmatrix",!0),t.setProperty("useHeight",!1);break;case"mathaccent":t.setProperty("mathaccent","true"===r);break;case"auto-op":t.setProperty("autoOP","true"===r);break;case"script-align":t.setProperty("scriptalign",r);break;case"vbox":t.setProperty("vbox",r);break;default:t.attributes.set(e,r)}else if("class"!==e){const i=r.toLowerCase();"true"===i||"false"===i?t.attributes.set(e,"true"===i):s&&"mathvariant"===e||t.attributes.set(e,r)}}}filterAttribute(t,e){return e}filterClassList(t){return t}addChildren(t,e){if(0===t.arity)return;const s=this.adaptor;for(const i of s.childNodes(e)){const e=s.kind(i);if("#comment"!==e)if("#text"===e)this.addText(t,i);else if(t.isKind("annotation-xml"))t.appendChild(this.factory.create("XML").setXML(i,s));else{const e=t.appendChild(this.makeNode(i));0===e.arity&&s.childNodes(i).length&&!e.isKind("html")&&(this.options.fixMisplacedChildren?this.addChildren(t,i):e.mError("There should not be children for "+e.kind+" nodes",this.options.verify,!0))}}t.isToken&&this.trimSpace(t)}addText(t,e){let s=this.adaptor.value(e);(t.isToken||t.getProperty("isChars"))&&t.arity?(t.isToken&&(s=xo(s),s=this.normalizeSpace(s)),t.appendChild(this.factory.create("text").setText(s))):s.match(/\S/)&&this.error('Unexpected text node "'+s+'"')}checkClass(t,e){const s=[];for(const i of this.filterClassList(this.adaptor.allClasses(e)))"MJX-"===i.substring(0,4)?"MJX-variant"===i?t.setProperty("variantForm",!0):"MJX-TeXAtom"!==i.substring(0,11)&&t.attributes.set("mathvariant",this.fixCalligraphic(i.substring(3))):s.push(i);s.length&&t.attributes.set("class",s.join(" "))}fixCalligraphic(t){return t.replace(/caligraphic/,"calligraphic")}markMrows(t){if(t.isKind("mrow")&&!t.isInferred&&t.childNodes.length>=2){const e=t.childNodes[0],s=t.childNodes[t.childNodes.length-1];e.isKind("mo")&&e.attributes.get("fence")&&e.attributes.get("stretchy")&&s.isKind("mo")&&s.attributes.get("fence")&&s.attributes.get("stretchy")&&(e.childNodes.length&&t.setProperty("open",e.getText()),s.childNodes.length&&t.setProperty("close",s.getText()))}}normalizeSpace(t){return t.replace(/[\t\n\r]/g," ").replace(/ +/g," ")}trimSpace(t){let e=t.childNodes[0];e&&(e.isKind("text")&&e.setText(e.getText().replace(/^ +/,"")),e=t.childNodes[t.childNodes.length-1],e.isKind("text")&&e.setText(e.getText().replace(/ +$/,"")))}error(t){throw new Error(t)}}Nl.OPTIONS={MmlFactory:null,allowHtmlInTokenNodes:!1,fixMisplacedChildren:!0,verify:Object.assign({},Nr.verifyDefaults),translateEntities:!0};class yl extends Yi{constructor(t={}){const[e,s,i]=Fi(t,El.OPTIONS,Nl.OPTIONS);super(e),this.findMathML=this.options.FindMathML||new El(s),this.mathml=this.options.MathMLCompile||new Nl(i),this.mmlFilters=new fi(this.options.mmlFilters)}setAdaptor(t){super.setAdaptor(t),this.findMathML.adaptor=t,this.mathml.adaptor=t}setMmlFactory(t){super.setMmlFactory(t),this.mathml.setMmlFactory(t)}get processStrings(){return!1}compile(t,e){let s=t.start.node;if(!s||!t.end.node||this.options.forceReparse||"#text"===this.adaptor.kind(s)){let i=this.executeFilters(this.preFilters,t,e,(t.math||" ").trim());"html"===this.options.parseAs&&(i=`${i}`);const r=this.checkForErrors(this.adaptor.parse(i,"text/"+this.options.parseAs)),n=this.adaptor.body(r);1!==this.adaptor.childNodes(n).length&&this.error("MathML must consist of a single element"),s=this.adaptor.remove(this.adaptor.firstChild(n)),"math"!==this.adaptor.kind(s).replace(/^[a-z]+:/,"")&&this.error("MathML must be formed by a element, not <"+this.adaptor.kind(s)+">")}s=this.executeFilters(this.mmlFilters,t,e,s);let i=this.mathml.compile(s);return i=this.executeFilters(this.postFilters,t,e,i),t.display="block"===i.attributes.get("display"),i}checkForErrors(t){const e=this.adaptor.tags(this.adaptor.body(t),"parsererror")[0];return e&&(""===this.adaptor.textContent(e)&&this.error("Error processing MathML"),this.options.parseError.call(this,e)),t}error(t){throw new Error(t)}findMath(t){return this.findMathML.findMath(t)}}yl.NAME="MathML",yl.OPTIONS=Oi({parseAs:"html",forceReparse:!1,mmlFilters:[],FindMathML:null,MathMLCompile:null,parseError:function(t){this.error(this.adaptor.textContent(t).replace(/\n.*/g,""))}},Yi.OPTIONS),MathJax.loader&&MathJax.loader.checkVersion("input/mml",ii,"input"),ci({_:{input:{mathml_ts:fe,mathml:{FindMathML:pe,MathMLCompile:me}}}}),MathJax.loader&&MathJax.loader.pathFilters.add((t=>(t.name=t.name.replace(/\/util\/entities\/.*?\.js/,"/input/mml/entities.js"),!0))),MathJax.startup&&(MathJax.startup.registerConstructor("mml",yl),MathJax.startup.useInput("mml"));const xl={None:"",Vertical:"v",Horizontal:"h"},vl=xl.Vertical,Cl=xl.Horizontal;var Tl=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};const _l={dir:xl.None};function wl(t,e,s){return s?Oi(t,{[e]:s})[e]:t[e]}class kl{get CLASS(){return this.constructor}static charOptions(t,e){const s=t[e];if(!Array.isArray(s))throw Error(`Character data hasn't been loaded for 0x${e.toString(16).toUpperCase()}`);return 3===s.length&&(s[3]={}),s[3]}static defineDynamicFiles(t,e=""){const s={};return(t||[]).forEach((([t,i,r])=>{s[t]={extension:e,file:t,variants:i,delimiters:r||[],promise:null,failed:!1,setup:e=>{s[t].failed=!0}}})),s}static dynamicSetup(t,e,s,i={},r=null){const n=t?this.dynamicExtensions.get(t):null;(t?n.files:this.dynamicFiles)[e].setup=e=>{Object.keys(s).forEach((t=>e.defineChars(t,s[t]))),e.defineDelimiters(i),t&&this.adjustDelimiters(e.delimiters,Object.keys(i),n.sizeN,n.stretchN),r&&e.addDynamicFontCss(r)}}static adjustDelimiters(t,e,s,i){e.forEach((e=>{const r=t[parseInt(e)];"dir"in r&&(r.variants&&(r.variants=this.adjustArrayIndices(r.variants,s)),r.stretchv&&(r.stretchv=this.adjustArrayIndices(r.stretchv,i)))}))}static adjustArrayIndices(t,e){return t.map((t=>t<0?e-1-t:t))}static addExtension(t,e=""){const s={name:t.name,prefix:e||`[${t.name}-extension]/${this.JAX.toLowerCase()}/dynamic`,files:this.defineDynamicFiles(t.ranges,t.name),sizeN:this.defaultSizeVariants.length,stretchN:this.defaultStretchVariants.length};this.dynamicExtensions.set(t.name,s);for(const[e,s]of[["options","OPTIONS"],["variants","defaultVariants"],["variantSmp","VariantSmp"],["cssFonts","defaultCssFonts"],["accentMap","defaultAccentMap"],["moMap","defaultMoMap"],["mnMap","defaultMnMap"],["parameters","defaultParams"],["chars","defaultChars"],["sizeVariants","defaultSizeVariants"],["stretchVariants","defaultStretchVariants"]])wl(this,s,t[e]);t.delimiters&&(Object.assign(this.defaultDelimiters,t.delimiters),this.adjustDelimiters(this.defaultDelimiters,Object.keys(t.delimiters),s.sizeN,s.stretchN))}constructor(t=null){this.variant={},this.delimiters={},this.cssFontMap={},this.cssFontPrefix="",this.remapChars={},this.skewIcFactor=.75;const e=this.CLASS;this.options=Di(Oi({},e.OPTIONS),t),this.params=Object.assign({},e.defaultParams),this.sizeVariants=[...e.defaultSizeVariants],this.stretchVariants=[...e.defaultStretchVariants],this.defineCssFonts(e.defaultCssFonts),this.cssFamilyPrefix=e.defaultCssFamilyPrefix,this.createVariants(e.defaultVariants),this.defineDelimiters(e.defaultDelimiters),Object.keys(e.defaultChars).forEach((t=>this.defineChars(t,e.defaultChars[t]))),this.defineRemap("accent",e.defaultAccentMap),this.defineRemap("mo",e.defaultMoMap),this.defineRemap("mn",e.defaultMnMap),this.defineDynamicCharacters(e.dynamicFiles),e.dynamicExtensions.forEach((t=>this.defineDynamicCharacters(t.files)))}setOptions(t){Oi(this.options,t)}addExtension(t,e=""){const s=this.constructor.JAX.toLowerCase(),i={name:t.name,prefix:e||`[${t.name}-extension]/${s}/dynamic`,files:this.CLASS.defineDynamicFiles(t.ranges,e),sizeN:this.sizeVariants.length,stretchN:this.stretchVariants.length};this.CLASS.dynamicExtensions.set(t.name,i),Oi(this.options,t.options||{}),Oi(this.params,t.parameters||{}),wl(this,"sizeVariants",t.sizeVariants),wl(this,"stretchVariants",t.stretchVariants),wl(this.constructor,"VariantSmp",t.variantSmp),this.defineCssFonts(wl({cssFonts:{}},"cssFonts",t.cssFonts)),this.createVariants(wl({variants:[]},"variants",t.variants)),t.delimiters&&(this.defineDelimiters(wl({delimiters:{}},"delimiters",t.delimiters)),this.CLASS.adjustDelimiters(this.delimiters,Object.keys(t.delimiters),i.sizeN,i.stretchN));for(const e of Object.keys(t.chars||{}))this.defineChars(e,t.chars[e]);return this.defineRemap("accent",t.accentMap),this.defineRemap("mo",t.moMap),this.defineRemap("mn",t.mnMap),t.ranges&&this.defineDynamicCharacters(i.files),[]}get styles(){return this._styles}set styles(t){this._styles=t}createVariant(t,e=null,s=null){const i={linked:[],chars:Object.create(e?this.variant[e].chars:{})};this.variant[s]&&(Object.assign(i.chars,this.variant[s].chars),this.variant[s].linked.push(i.chars),i.chars=Object.create(i.chars)),this.remapSmpChars(i.chars,t),this.variant[t]=i}remapSmpChars(t,e){const s=this.CLASS;let i=s.VariantSmp[e];if("string"==typeof i&&(i=s.VariantSmp[i]),!i)return;const r=s.SmpRemap,n=[null,null,s.SmpRemapGreekU,s.SmpRemapGreekL];for(const[e,o,a]of s.SmpRanges){const s=i[e];if(s){for(let e=o;e<=a;e++){if(930===e)continue;const i=s+e-o;t[e]=this.smpChar(r[i]||i)}if(n[e])for(const i of Object.keys(n[e]).map((t=>parseInt(t))))t[i]=this.smpChar(s+n[e][i])}}const o=i[5]||{};for(const e of Object.keys(o))t[e]=this.smpChar(i[5][e])}smpChar(t){return[,,,{smp:t}]}createVariants(t){for(const e of t)this.createVariant(e[0],e[1],e[2])}defineChars(t,e){const s=this.variant[t];Object.assign(s.chars,e);for(const t of s.linked)Object.assign(t,e)}defineCssFonts(t){Object.assign(this.cssFontMap,t);for(const e of Object.keys(t))"unknown"===this.cssFontMap[e][0]&&(this.cssFontMap[e][0]=this.options.unknownFamily)}defineDelimiters(t){Object.assign(this.delimiters,t)}defineRemap(t,e){e&&(Object.hasOwn(this.remapChars,t)||(this.remapChars[t]={}),Object.assign(this.remapChars[t],e))}defineDynamicCharacters(t){for(const e of Object.keys(t)){const s=t[e];for(const t of Object.keys(s.variants))this.defineChars(t,this.flattenRanges(s.variants[t],s));this.defineDelimiters(this.flattenRanges(s.delimiters,s))}}flattenRanges(t,e){const s={};for(const i of t)if(Array.isArray(i))for(let t=i[0];t<=i[1];t++)s[t]=e;else s[i]=e;return s}dynamicFileName(t){const e=t.extension?this.CLASS.dynamicExtensions.get(t.extension).prefix:this.options.dynamicPrefix;return t.file.match(/^(?:[/[]|[a-z]+:\/\/|[a-z]:)/i)?t.file:e+"/"+t.file.replace(/(\.js)?$/,".js")}loadDynamicFile(t){return Tl(this,void 0,void 0,(function*(){return t.failed?Promise.reject(new Error(`dynamic file '${t.file}' failed to load`)):(t.promise||(t.promise=no(this.dynamicFileName(t)).catch((e=>{t.failed=!0,console.warn(e)}))),t.promise.then((()=>t.setup(this))))}))}loadDynamicFiles(){const t=this.CLASS.dynamicFiles,e=Object.keys(t).map((e=>this.loadDynamicFile(t[e])));for(const t of this.CLASS.dynamicExtensions.values())e.push(...Object.keys(t.files).map((e=>this.loadDynamicFile(t.files[e]))));return Promise.all(e)}loadDynamicFilesSync(){if(!Qn.asyncIsSynchronous)throw Error("MathJax(loadDynamicFilesSync): mathjax.asyncLoad must be specified and synchronous\n Try importing #js/../components/require.mjs and #js/util/asyncLoad/node.js");const t=this.CLASS.dynamicFiles;Object.keys(t).forEach((e=>this.loadDynamicFileSync(t[e])));for(const t of this.CLASS.dynamicExtensions.values())Object.keys(t.files).forEach((e=>this.loadDynamicFileSync(t.files[e])))}loadDynamicFileSync(t){if(!t.promise){t.promise=Promise.resolve();try{Qn.asyncLoad(this.dynamicFileName(t))}catch(e){t.failed=!0,console.warn(e)}t.setup(this)}}addDynamicFontCss(t,e){}getDelimiter(t){const e=this.delimiters[t];return e&&!("dir"in e)?(this.delimiters[t]=null,Rn(this.loadDynamicFile(e)),null):e}getSizeVariant(t,e){const s=this.getDelimiter(t);return s&&s.variants&&(e=s.variants[e]),this.sizeVariants[e]}getStretchVariant(t,e){const s=this.getDelimiter(t);return this.stretchVariants[s.stretchv?s.stretchv[e]:0]}getStretchVariants(t){return[0,1,2,3].map((e=>this.getStretchVariant(t,e)))}getChar(t,e){const s=this.variant[t].chars[e];if(s&&!Array.isArray(s)){const i=this.variant[t];return delete i.chars[e],i.linked.forEach((t=>delete t[e])),Rn(this.loadDynamicFile(s)),null}return s}getVariant(t){return this.variant[t]}getCssFont(t){return this.cssFontMap[t]||["serif",!1,!1]}getFamily(t){return this.cssFamilyPrefix?this.cssFamilyPrefix+", "+t:t}getRemappedChar(t,e){return(this.remapChars[t]||{})[e]}}kl.OPTIONS={unknownFamily:"serif",dynamicPrefix:"."},kl.JAX="common",kl.NAME="",kl.defaultVariants=[["normal"],["bold","normal"],["italic","normal"],["bold-italic","italic","bold"],["double-struck","bold"],["fraktur","normal"],["bold-fraktur","bold","fraktur"],["script","italic"],["bold-script","bold-italic","script"],["sans-serif","normal"],["bold-sans-serif","bold","sans-serif"],["sans-serif-italic","italic","sans-serif"],["sans-serif-bold-italic","bold-italic","bold-sans-serif"],["monospace","normal"],["-smallop","normal"],["-largeop","normal"],["-tex-calligraphic","italic"],["-tex-bold-calligraphic","bold-italic"],["-tex-oldstyle","normal"],["-tex-bold-oldstyle","bold"],["-tex-mathit","italic"],["-tex-variant","normal"]],kl.defaultCssFonts={normal:["unknown",!1,!1],bold:["unknown",!1,!0],italic:["unknown",!0,!1],"bold-italic":["unknown",!0,!0],"double-struck":["unknown",!1,!0],fraktur:["unknown",!1,!1],"bold-fraktur":["unknown",!1,!0],script:["cursive",!1,!1],"bold-script":["cursive",!1,!0],"sans-serif":["sans-serif",!1,!1],"bold-sans-serif":["sans-serif",!1,!0],"sans-serif-italic":["sans-serif",!0,!1],"sans-serif-bold-italic":["sans-serif",!0,!0],monospace:["monospace",!1,!1],"-smallop":["unknown",!1,!1],"-largeop":["unknown",!1,!1],"-tex-calligraphic":["cursive",!0,!1],"-tex-bold-calligraphic":["cursive",!0,!0],"-tex-oldstyle":["unknown",!1,!1],"-tex-bold-oldstyle":["unknown",!1,!0],"-tex-mathit":["unknown",!0,!1],"-tex-variant":["unknown",!1,!1]},kl.defaultCssFamilyPrefix="",kl.VariantSmp={bold:[119808,119834,120488,120514,120782,{988:120778,989:120779}],italic:[119860,119886,120546,120572],"bold-italic":[119912,119938,120604,120630],script:[119964,119990],"bold-script":[120016,120042],fraktur:[120068,120094],"double-struck":[120120,120146,,,120792],"bold-fraktur":[120172,120198],"sans-serif":[120224,120250,,,120802],"bold-sans-serif":[120276,120302,120662,120688,120812],"sans-serif-italic":[120328,120354],"sans-serif-bold-italic":[120380,120406,120720,120746],monospace:[120432,120458,,,120822]},kl.SmpRanges=[[0,65,90],[1,97,122],[2,913,937],[3,945,969],[4,48,57]],kl.SmpRemap={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},kl.SmpRemapGreekU={8711:25,1012:17},kl.SmpRemapGreekL={977:27,981:29,982:31,1008:28,1009:30,1013:26,8706:25},kl.defaultAccentMap={94:"\u02c6",126:"\u02dc",768:"\u02cb",769:"\u02ca",770:"\u02c6",771:"\u02dc",772:"\u02c9",774:"\u02d8",775:"\u02d9",776:"\xa8",778:"\u02da",780:"\u02c7",8594:"\u20d7"},kl.defaultMoMap={45:"\u2212"},kl.defaultMnMap={45:"\u2212"},kl.defaultParams={x_height:.442,quad:1,num1:.676,num2:.394,num3:.444,denom1:.686,denom2:.345,sup1:.413,sup2:.363,sup3:.289,sub1:.15,sub2:.247,sup_drop:.386,sub_drop:.05,delim1:2.39,delim2:1,axis_height:.25,rule_thickness:.06,big_op_spacing1:.111,big_op_spacing2:.167,big_op_spacing3:.2,big_op_spacing4:.6,big_op_spacing5:.1,surd_height:.06,scriptspace:.05,nulldelimiterspace:.12,delimiterfactor:901,delimitershortfall:.3,rule_factor:1.25,min_rule_thickness:1.25,separation_factor:1.75,extra_ic:.033,extender_factor:.333},kl.defaultDelimiters={},kl.defaultChars={},kl.defaultSizeVariants=[],kl.defaultStretchVariants=[],kl.dynamicFiles={},kl.dynamicExtensions=new Map;class Al extends fo{static from(t,e,s=null){const i=new this;return Object.assign(i,t),i.lineLeading=e,s&&(i.indentData=s),i}constructor(t,e=null){super(t),this.indentData=null,this.isFirst=!1,this.originalL=this.L,e&&(this.start=e)}append(t){this.isFirst&&(t.originalL+=t.L,t.L=0),t.indentData&&(this.indentData=t.indentData),this.lineLeading=t.lineLeading,super.append(t),this.isFirst=t.isFirst}copy(){const t=Al.from(this,this.lineLeading);return t.indentData=this.indentData,t.lineLeading=this.lineLeading,t}getIndentData(t){let{indentalign:e,indentshift:s,indentalignfirst:i,indentshiftfirst:r,indentalignlast:n,indentshiftlast:o}=t.attributes.getAllAttributes();"indentalign"===i&&(i=t.attributes.getInherited("indentalign")),"indentshift"===r&&(r=t.attributes.getInherited("indentshift")),"indentalign"===n&&(n=e),"indentshift"===o&&(o=s),this.indentData=[[i,r],[e,s],[n,o]]}copyIndentData(t){return t.indentData.map((([t,e])=>[t,e]))}}const Ml=1e6;class Ll extends Xn{breakToWidth(t,e){}}class Il extends Ll{constructor(){super(...arguments),this.PENALTY={newline:t=>0,nobreak:t=>Ml,goodbreak:t=>t-200*this.state.depth,badbreak:t=>t+200*this.state.depth,auto:t=>t},this.FACTORS={depth:t=>t+800*this.state.depth,width:t=>t+Math.floor((this.state.width-this.state.w)/this.state.width*2500),tail:t=>t+Math.floor(this.state.width/Math.max(1e-4,this.state.mathLeft-this.state.w)*500),open:(t,e)=>{const s=e.node.prevClass;if(s===pr.BIN||s===pr.REL||s===pr.OP)return t+5e3;const i=this.getPrevious(e);if(i&&("postfix"!==i.attributes.get("form")||"nobreak"===i.attributes.get("linebreak")))return t+5e3;const r=e.node.Parent;if((null==r?void 0:r.isKind("mmultiscripts"))&&e.node===this.getFirstToken(r)){if(!!r.childNodes.filter((t=>t.isKind("mprescripts"))).length)return Ml}return t-500},close:(t,e)=>{var s;const i=e.node.Parent;return!(null==i?void 0:i.isKind("msubsup"))||i.isKind("mmultiscripts")&&(null===(s=i.childNodes[1])||void 0===s?void 0:s.isKind("mprescripts"))||e.node!==this.getLastToken(i.childNodes[0])?t+500:Ml},space:(t,e)=>{const s=e;if(!s.canBreak)return Ml;const i=s.getBBox().w;return i<0?Ml:i<1?t:t-100*(i+4)},separator:t=>t+500,fuzz:t=>.99*t},this.TEXCLASS={[pr.BIN]:t=>t-250,[pr.REL]:t=>t-500}}breakToWidth(t,e){const s=this.state;this.state=this.createState(t),this.state.width=e;const i=t.breakCount;for(let s=0;s<=i;s++){(t.lineBBox[s]||t.getLineBBox(s)).w>e&&this.breakLineToWidth(t,s)}for(const[t,e]of this.state.breaks){if(null===e){const e=t.coreMO();e.setBreakStyle(e.node.attributes.get("linebreakstyle")||"before")}else t.setBreakAt(e);t.invalidateBBox()}this.state=s}createState(t){const e=t.getBBox().w;return{breaks:new Set,potential:[],width:0,w:0,prevWidth:0,prevBreak:null,depth:0,mathWidth:e,mathLeft:e}}breakLineToWidth(t,e){const s=this.state;s.potential=[],s.w=0,s.prevWidth=0,s.prevBreak=null,s.depth=0,this.visitNode(t,e)}addWidth(t,e=null){null===e&&(e=t.L+t.w+t.R),e&&(e*=t.rscale,this.state.w+=e,this.state.potential.length&&(this.state.potential[0][4]+=e),this.processBreak())}processBreak(){const t=this.state;for(;t.potential.length&&t.w>this.state.width;){const e=t.potential.pop(),[s,,i,r,n]=e;t.breaks.add(s),t.w=t.potential.reduce(((t,e)=>t+e[4]),r+n),t.prevBreak&&t.prevWidth+i<=t.width?(t.breaks.delete(t.prevBreak[0]),t.prevWidth+=i):t.prevWidth=i+r,t.potential.forEach((t=>t[2]-=i)),t.prevBreak=e,t.mathLeft-=i}}pushBreak(t,e,s,i){var r;const n=this.state;if(!(e>=Ml||0===n.w&&0===n.prevWidth)){for(;n.potential.length&&n.potential[0][1]>this.FACTORS.fuzz(e);){const t=n.potential.shift();n.potential.length&&(n.potential[0][4]+=t[4])}n.potential.unshift([[t,i],e,n.w-((null===(r=n.prevBreak)||void 0===r?void 0:r[3])||0),s,0])}}getBorderLR(t){var e;const s=t.styleData;if(!s)return[0,0];const i=(null===(e=null==s?void 0:s.border)||void 0===e?void 0:e.width)||[0,0,0,0],r=(null==s?void 0:s.padding)||[0,0,0,0];return[i[3]+r[3],i[1]+r[1]]}getFirstToken(t){return t.isToken?t:this.getFirstToken(t.childNodes[0])}getLastToken(t){return t.isToken?t:this.getLastToken(t.childNodes[t.childNodes.length-1])}visitNode(t,e){t&&(this.state.depth++,t.node.isEmbellished&&!t.node.isKind("mo")?this.visitEmbellishedOperator(t,e):super.visitNode(t,e),this.state.depth--)}visitDefault(t,e){var s;const i=t.getLineBBox(e);if(t.node.isToken||t.node.linebreakContainer||!(null===(s=t.childNodes)||void 0===s?void 0:s[0]))this.addWidth(i);else{const[s,r]=this.getBorderLR(t);0===e&&this.addWidth(i,i.L+s),this.visitNode(t.childNodes[0],e),e===t.breakCount&&this.addWidth(i,i.R+r)}}visitEmbellishedOperator(t,e){const s=t.coreMO(),i=Al.from(t.getOuterBBox(),t.linebreakOptions.lineleading);i.getIndentData(s.node);const r=s.getBreakStyle(s.node.attributes.get("linebreakstyle")),n=s.processIndent("",i.indentData[1][1],"",i.indentData[0][1],this.state.width)[1],o=this.moPenalty(s);if("before"===r)this.pushBreak(t,o,n-i.L,null),this.addWidth(i);else{this.addWidth(i);const e=("after"===r?0:s.multChar?s.multChar.getBBox().w:i.w)+n;this.pushBreak(t,o,e,null)}}visitMoNode(t,e){const s=t,i=Al.from(s.getOuterBBox(),s.linebreakOptions.lineleading);i.getIndentData(s.node);const r=s.getBreakStyle(s.node.attributes.get("linebreakstyle")),n=s.processIndent("",i.indentData[1][1],"",i.indentData[0][1],this.state.width)[1],o=this.moPenalty(s);if("before"===r)this.pushBreak(t,o,n-i.L,null),this.addWidth(i);else{this.addWidth(i);const e=("after"===r?0:s.multChar?s.multChar.getBBox().w:i.w)+n;this.pushBreak(t,o,e,null)}}moPenalty(t){const{linebreak:e,fence:s,form:i}=t.node.attributes.getList("linebreak","fence","form"),r=this.FACTORS;let n=r.tail(r.width(0));const o=s&&"prefix"===i||t.node.texClass===pr.OPEN,a=s&&"postfix"===i||t.node.texClass===pr.CLOSE;return o&&(n=r.open(n,t),this.state.depth++),a&&(n=r.close(n,t),this.state.depth--),n=(this.TEXCLASS[t.node.texClass]||(t=>t))(n),(this.PENALTY[e]||(t=>t))(r.depth(n))}getPrevious(t){let e=t.node,s=e.parent,i=s.childIndex(e);for(;s&&(s.notParent||s.isKind("mrow"))&&0===i;)e=s,s=e.parent,i=s.childIndex(e);if(!s||!i)return null;const r=s.childNodes[i-1];return r.isEmbellished?r.coreMO():null}visitMspaceNode(t,e){const s=t.getLineBBox(e),i=t;if(i.canBreak){const e=this.mspacePenalty(i);s.getIndentData(t.node);const r=t.processIndent("",s.indentData[1][1],"",s.indentData[0][1],this.state.width)[1];this.pushBreak(t,e,r-s.w,null)}this.addWidth(s)}mspacePenalty(t){const e=t.node.attributes.get("linebreak"),s=this.FACTORS,i=s.space(s.tail(s.width(0)),t);return(this.PENALTY[e]||(t=>t))(s.depth(i))}visitMtextNode(t,e){if(!t.getText().match(/ /))return void this.visitDefault(t,e);const s=t;s.clearBreakPoints();const i=s.textWidth(" "),r=t.getBBox(),[n,o]=this.getBorderLR(t);this.addWidth(r,r.L+n);const a=s.childNodes;for(const e of a.keys()){const n=a[e];if(n.node.isKind("text")){const o=n.node.getText().split(/ /),a=o.pop();for(const n of o.keys())this.addWidth(r,s.textWidth(o[n])),this.pushBreak(t,this.mtextPenalty(),-i,[e,n+1]),this.addWidth(r,i);this.addWidth(r,s.textWidth(a))}else this.addWidth(n.getBBox())}this.addWidth(r,r.R+o)}mtextPenalty(){const t=this.FACTORS;return t.depth(t.tail(t.width(0)))}visitMrowNode(t,e){const s=t.lineBBox[e]||t.getLineBBox(e),[i,r]=s.start||[0,0],[n,o]=s.end||[t.childNodes.length-1,0],[a,c]=this.getBorderLR(t);this.addWidth(s,s.L+a);for(let e=i;e<=n;e++)this.visitNode(t.childNodes[e],e===i?r:e===n?o:0);this.addWidth(s,s.R+c)}visitInferredMrowNode(t,e){this.state.depth--,this.visitMrowNode(t,e),this.state.depth++}visitMfracNode(t,e){const s=t;!s.node.attributes.get("bevelled")&&s.getOuterBBox().w>this.state.width&&(this.breakToWidth(s.childNodes[0],this.state.width),this.breakToWidth(s.childNodes[1],this.state.width)),this.visitDefault(t,e)}visitMsqrtNode(t,e){if(t.getOuterBBox().w>this.state.width){const e=t,s=e.childNodes[e.base];this.breakToWidth(s,this.state.width-e.rootWidth()),e.getStretchedSurd()}this.visitDefault(t,e)}visitMrootNode(t,e){this.visitMsqrtNode(t,e)}visitMsubNode(t,e){this.visitDefault(t,e);const s=t,i=s.getOffset()[0],r=s.scriptChild.getOuterBBox(),[n,o]=this.getBorderLR(t);this.addWidth(s.getLineBBox(e),i+n+r.rscale*r.w+s.font.params.scriptspace+o)}visitMsupNode(t,e){this.visitDefault(t,e);const s=t,i=s.getOffset()[0],r=s.scriptChild.getOuterBBox(),[n,o]=this.getBorderLR(t);this.addWidth(s.getLineBBox(e),i+n+r.rscale*r.w+s.font.params.scriptspace+o)}visitMsubsupNode(t,e){this.visitDefault(t,e);const s=t,i=s.subChild.getOuterBBox(),r=s.supChild.getOuterBBox(),n=s.getAdjustedIc(),o=Math.max(i.rscale*i.w,n+r.rscale*r.w)+s.font.params.scriptspace,[a,c]=this.getBorderLR(t);this.addWidth(t.getLineBBox(e),a+o+c)}visitMmultiscriptsNode(t,e){const s=t,i=s.scriptData;if(i.numPrescripts){const r=Math.max(i.psup.rscale*i.psup.w,i.psub.rscale*i.psub.w);this.addWidth(t.getLineBBox(e),r+s.font.params.scriptspace)}if(this.visitDefault(t,e),i.numScripts){const r=Math.max(i.sup.rscale*i.sup.w,i.sub.rscale*i.sub.w);this.addWidth(t.getLineBBox(e),r+s.font.params.scriptspace)}}visitMfencedNode(t,e){const s=t,i=t.getLineBBox(e),[r,n]=this.getBorderLR(t);0===e&&this.addWidth(i,i.L+r),this.visitNode(s.mrow,e),e===t.breakCount&&this.addWidth(i,i.R+n)}visitMactionNode(t,e){const s=t,i=t.getLineBBox(e),[r,n]=this.getBorderLR(t);0===e&&this.addWidth(i,i.L+r),this.visitNode(s.selected,e),e===t.breakCount&&this.addWidth(i,i.R+n)}}!function(){for(const t of Object.keys(Or.postfix)){const e=Or.postfix[t][3];e&&e.fence&&(e.linebreakstyle="after")}Or.infix["\u2061"]=[...Or.infix["\u2061"]],Or.infix["\u2061"][3]={linebreak:"nobreak"}}();const Sl="@mathjax/%%FONT%%-font";class Rl extends Qi{get forceInlineBreaks(){return!1}constructor(t={},e=null,s=null){const[i,r]=t.fontData instanceof kl?[t.fontData.constructor,t.fontData]:[t.fontData||s,null],[n,o]=Fi(t,i.OPTIONS);super(n),this.factory=this.options.wrapperFactory||new e,this.factory.jax=this,this.styleJson=this.options.styleJson||new To,this.font=r||new i(o),this.font.setOptions({mathmlSpacing:this.options.mathmlSpacing}),this.unknownCache=new Map;const a=this.options.linebreaks.LinebreakVisitor||Il;this.linebreaks=new a(this.factory)}setAdaptor(t){super.setAdaptor(t),"auto"===this.options.htmlHDW&&(this.options.htmlHDW=t.canMeasureNodes?"ignore":"force")}addExtension(t,e=""){return this.font.addExtension(t,e)}typeset(t,e){this.setDocument(e);const s=this.createNode();return this.toDOM(t,s,e),s}createNode(){const t=this.constructor.NAME;return this.html("mjx-container",{class:"MathJax",jax:t})}setScale(t,e){let s=this.getInitialScale()*this.options.scale;if("scale"===e.node.attributes.get("overflow")&&this.math.display){const t=e.getOuterBBox().w,i=this.math.metrics.containerWidth/this.pxPerEm;t>i&&t&&(s*=i/t)}1!==s&&this.adaptor.setStyle(t,"fontSize",uo(s))}getInitialScale(){return this.math.metrics.scale}toDOM(t,e,s=null){var i;this.setDocument(s),this.math=t,this.container=e,this.pxPerEm=t.metrics.ex/this.font.params.x_height,this.executeFilters(this.preFilters,t,s,e),this.nodeMap=new Map,t.root.attributes.getAllInherited().overflow=this.options.displayOverflow;const r=t.root.attributes.get("overflow");this.adaptor.setAttribute(e,"overflow",r);"linebreak"===r&&this.getLinebreakWidth();const n=this.options.linebreaks.inline&&!t.display;let o=!!t.root.getProperty("inlineMarked");!o||n&&this.forceInlineBreaks===t.root.getProperty("inlineForced")||(this.unmarkInlineBreaks(t.root),t.root.removeProperty("inlineMarked"),t.root.removeProperty("inlineForced"),o=!1),n&&!o&&(this.markInlineBreaks(null===(i=t.root.childNodes)||void 0===i?void 0:i[0]),t.root.setProperty("inlineMarked",!0),t.root.setProperty("inlineForced",this.forceInlineBreaks)),t.root.setTeXclass(null);const a=this.factory.wrap(t.root);this.setScale(e,a),this.processMath(a,e),this.nodeMap=null,this.executeFilters(this.postFilters,t,s,e)}getBBox(t,e){this.setDocument(e),this.math=t,t.root.setTeXclass(null),this.nodeMap=new Map;const s=this.factory.wrap(t.root).getOuterBBox();return this.nodeMap=null,s}getLinebreakWidth(){const t=this.math.metrics.containerWidth/this.pxPerEm,e=this.math.root.attributes.get("maxwidth")||this.options.linebreaks.width;this.containerWidth=ho(e,t,1,this.pxPerEm)}markInlineBreaks(t){if(!t)return;const e=this.forceInlineBreaks;let s=!1,i=!1,r="";for(const n of t.childNodes)if(r)i=this.markInlineBreak(i,e,r,t,n),r="",s=!1;else if(n.isEmbellished){if(n===t.childNodes[0])continue;const o=n.coreMO(),a=o.texClass,c=o.attributes.get("linebreak"),l=o.attributes.get("linebreakstyle");(a===pr.BIN||a===pr.REL||a===pr.ORD&&o.hasSpacingAttributes()||"auto"!==c)&&"nobreak"!==c&&("before"===l?s&&"auto"===c||(i=this.markInlineBreak(i,e,c,t,n,o)):r=c),s="newline"===c&&"after"===l}else if(n.isKind("mspace")){const r=n.attributes.get("linebreak");"nobreak"!==r&&n.canBreak&&(i=this.markInlineBreak(i,e,r,t,n)),s="newline"===r}else s=!1,n.isKind("mstyle")&&!n.attributes.get("style")&&!n.attributes.hasExplicit("mathbackground")||n.isKind("semantics")?(this.markInlineBreaks(n.childNodes[0]),n.getProperty("process-breaks")&&(n.setProperty("inline-breaks",!0),n.childNodes[0].setProperty("inline-breaks",!0),t.parent.setProperty("process-breaks","true"))):n.isKind("mrow")&&n.attributes.get("data-semantic-added")&&(this.markInlineBreaks(n),n.getProperty("process-breaks")&&(n.setProperty("inline-breaks",!0),t.parent.setProperty("process-breaks","true")))}markInlineBreak(t,e,s,i,r,n=null){return r.setProperty("breakable",!0),e&&"newline"!==s?(r.setProperty("forcebreak",!0),null==n||n.setProperty("forcebreak",!0)):(r.removeProperty("forcebreak"),null==n||n.removeProperty("forcebreak"),"newline"===s&&r.setProperty("newline",!0)),t||(i.setProperty("process-breaks",!0),i.parent.setProperty("process-breaks",!0),t=!0),t}unmarkInlineBreaks(t){if(t&&(t.removeProperty("forcebreak"),t.removeProperty("breakable"),t.getProperty("process-breaks"))){t.removeProperty("process-breaks");for(const e of t.childNodes)this.unmarkInlineBreaks(e)}}getMetrics(t){this.setDocument(t);const e=this.adaptor,s=this.getMetricMaps(t);for(const i of t.math){const t=e.parent(i.start.node);if(i.state(){const s=this.wrap(t);return s.bbox.pwidth&&(e.notParent||e.isKind("math"))&&(this.bbox.pwidth=fo.fullWidth),s}))}wrap(t,e=null){const s=this.factory.wrap(t,e||this);return e&&e.childNodes.push(s),this.jax.nodeMap.set(t,s),s}getBBox(t=!0){if(this.bboxComputed)return this.bbox;const e=t?this.bbox:fo.zero();return this.computeBBox(e),this.bboxComputed=t,e}getOuterBBox(t=!0){var e;const s=this.getBBox(t);if(!this.styleData)return s;const i=this.styleData.padding,r=(null===(e=this.styleData.border)||void 0===e?void 0:e.width)||[0,0,0,0],n=s.copy();for(const[,t,e]of fo.boxSides)n[e]+=i[t]+r[t];return n}getUnbrokenHD(){const t=this.breakCount+1;let e=0,s=0;for(let i=0;ie&&(e=t),r>s&&(s=r)}return[e,s]}computeBBox(t,e=!1){t.empty();for(const e of this.childNodes)t.append(e.getOuterBBox());t.clean(),this.fixesPWidth&&this.setChildPWidths(e)&&this.computeBBox(t,!0)}getLineBBox(t){if(!this.lineBBox[t]){const e=this.breakCount;if(e){const s=this.embellishedBBox(t)||this.computeLineBBox(t);this.lineBBox[t]=s,0===t&&(!this.node.isKind("mo")&&this.node.isEmbellished?s.originalL=this.getBBox().L:s.L=this.getBBox().L),t===e&&(s.R=this.getBBox().R)}else{const e=this.getOuterBBox();this.lineBBox[t]=Al.from(e,this.linebreakOptions.lineleading)}}return this.lineBBox[t]}embellishedBBox(t){if(!this.node.isEmbellished||this.node.isKind("mo"))return null;const e=this.coreMO();return e.moLineBBox(t,e.embellishedBreakStyle,this.getOuterBBox())}computeLineBBox(t){return this.getChildLineBBox(this.childNodes[0],t)}getBreakNode(t){var e,s;if(!t.start)return[this,null];const[i,r]=t.start;if(this.node.isEmbellished)return[this,this.coreMO()];const n=(null===(s=null===(e=this.childNodes[0])||void 0===e?void 0:e.node)||void 0===s?void 0:s.isInferred)?this.childNodes[0].childNodes:this.childNodes;return this.node.isToken||!n[i]?[this,null]:n[i].getBreakNode(n[i].getLineBBox(r))}getChildLineBBox(t,e){const s=this.breakCount;let i=t.getLineBBox(e);return(this.styleData||this.bbox.L||this.bbox.R)&&(i=i.copy()),this.addMiddleBorders(i),0===e?(i.L+=this.bbox.L,this.addLeftBorders(i)):e===s&&(i.R+=this.bbox.R,this.addRightBorders(i)),i}addLeftBorders(t){var e;if(!this.styleData)return;const s=this.styleData.border,i=this.styleData.padding;t.w+=((null===(e=null==s?void 0:s.width)||void 0===e?void 0:e[3])||0)+((null==i?void 0:i[3])||0)}addMiddleBorders(t){var e,s;if(!this.styleData)return;const i=this.styleData.border,r=this.styleData.padding;t.h+=((null===(e=null==i?void 0:i.width)||void 0===e?void 0:e[0])||0)+((null==r?void 0:r[0])||0),t.d+=((null===(s=null==i?void 0:i.width)||void 0===s?void 0:s[2])||0)+((null==r?void 0:r[2])||0)}addRightBorders(t){var e;if(!this.styleData)return;const s=this.styleData.border,i=this.styleData.padding;t.w+=((null===(e=null==s?void 0:s.width)||void 0===e?void 0:e[1])||0)+((null==i?void 0:i[1])||0)}setChildPWidths(t,e=null,s=!0){if(t)return!1;s&&(this.bbox.pwidth="");let i=!1;for(const r of this.childNodes){const n=r.getBBox();n.pwidth&&r.setChildPWidths(t,null===e?n.w:e,s)&&(i=!0)}return i}breakToWidth(t){}invalidateBBox(t=!0){(this.bboxComputed||this._breakCount>=0)&&(this.bboxComputed=!1,this.lineBBox=[],this._breakCount=-1,this.parent&&t&&this.parent.invalidateBBox())}copySkewIC(t){var e,s,i;const r=this.childNodes[0];(null===(e=null==r?void 0:r.bbox)||void 0===e?void 0:e.sk)&&(t.sk=r.bbox.sk),(null===(s=null==r?void 0:r.bbox)||void 0===s?void 0:s.dx)&&(t.dx=r.bbox.dx);const n=this.childNodes[this.childNodes.length-1];(null===(i=null==n?void 0:n.bbox)||void 0===i?void 0:i.ic)&&(t.ic=n.bbox.ic,t.w+=t.ic)}getStyles(){const t=this.node.attributes.getExplicit("style");if(!t)return;const e=this.styles=new Do(t);for(let t=0,s=jl.removeStyles.length;t600?"bold":"normal"),s.family?e=this.explicitVariant(s.family,s.weight,s.style):(this.node.getProperty("variantForm")&&(e="-tex-variant"),e=(jl.BOLDVARIANTS[s.weight]||{})[e]||e,e=(jl.ITALICVARIANTS[s.style]||{})[e]||e)}this.variant=e}explicitVariant(t,e,s){let i=this.styles;return i||(i=this.styles=new Do),i.set("fontFamily",t),e&&i.set("fontWeight",e),s&&i.set("fontStyle",s),"-explicitFont"}getScale(){let t=1;const e=this.parent,s=e?e.bbox.scale:1,i=this.node.attributes,r=Math.min(i.get("scriptlevel"),2);let n=i.get("fontsize"),o=this.node.isToken||this.node.isKind("mstyle")?i.get("mathsize"):i.getInherited("mathsize");if(0!==r&&(t=Math.pow(i.get("scriptsizemultiplier"),r)),this.removedStyles&&this.removedStyles.fontSize&&!n&&(n=this.removedStyles.fontSize),n&&!i.hasExplicit("mathsize")&&(o=n),"1"!==o&&(t*=this.length2em(o,1,1)),0!==r){const e=this.length2em(i.get("scriptminsize"),.4,1);t0;if(this.bbox.L=n.isSet("lspace")?Math.max(0,this.length2em(n.get("lspace"))):Bl(o,r,t.lspace),this.bbox.R=n.isSet("rspace")?Math.max(0,this.length2em(n.get("rspace"))):Bl(o,r,t.rspace),!i)return;const a=s.childNodes[i-1];if(!a.isEmbellished)return;const c=this.jax.nodeMap.get(a).getBBox();c.R&&(this.bbox.L=Math.max(0,this.bbox.L-c.R))}getTeXSpacing(t,e){if(!e){const t=this.node.texSpacing();t&&(this.bbox.L=this.length2em(t))}if(t||e){const t=this.node.coreMO().attributes;t.isSet("lspace")&&(this.bbox.L=Math.max(0,this.length2em(t.get("lspace")))),t.isSet("rspace")&&(this.bbox.R=Math.max(0,this.length2em(t.get("rspace"))))}}isTopEmbellished(){return this.node.isEmbellished&&!(this.node.parent&&this.node.parent.isEmbellished)}core(){return this.jax.nodeMap.get(this.node.core())}coreMO(){return this.jax.nodeMap.get(this.node.coreMO())}coreRScale(){let t=this.bbox.rscale,e=this.coreMO();for(;e!==this&&e;)t*=e.bbox.rscale,e=e.parent;return t}getRScale(){let t=1,e=this;for(;e;)t*=e.bbox.rscale,e=e.parent;return t}getText(){let t="";if(this.node.isToken)for(const e of this.node.childNodes)e instanceof Tr&&(t+=e.getText());return t}canStretch(t){if(this.stretch=_l,this.node.isEmbellished){const e=this.core();e&&e.node!==this.node&&e.canStretch(t)&&(this.stretch=e.stretch)}return this.stretch.dir!==xl.None}getAlignShift(){let{indentalign:t,indentshift:e,indentalignfirst:s,indentshiftfirst:i}=this.node.attributes.getAllAttributes();return"indentalign"!==s&&(t=s),"indentshift"!==i&&(e=i),this.processIndent(t,e)}processIndent(t,e,s="",i="",r=this.metrics.containerWidth){if(!this.jax.math.display)return["left",0];s&&"auto"!==s||(s=this.jax.math.root.getProperty("inlineMarked")?"left":this.jax.options.displayAlign),i&&"auto"!==i||(i=this.jax.math.root.getProperty("inlineMarked")?"0":this.jax.options.displayIndent),"auto"===t&&(t=s),"auto"===e&&(e=i,"right"!==t||e.match(/^\s*0[a-z]*\s*$/)||(e=("-"+e.trim()).replace(/^--/,"")));return[t,this.length2em(e,r)]}getAlignX(t,e,s){return"right"===s?t-(e.w+e.R)*e.rscale:"left"===s?e.L*e.rscale:(t-e.w*e.rscale)/2}getAlignY(t,e,s,i,r){return"top"===r?t-s:"bottom"===r?i-e:"center"===r?(t-s-(e-i))/2:0}getWrapWidth(t){return this.childNodes[t].getBBox().w}getChildAlign(t){return"left"}percent(t){return uo(t)}em(t){return po(t)}px(t,e=-oo){return mo(t,e,this.metrics.em)}length2em(t,e=1,s=null){null===s&&(s=this.bbox.scale);const i=this.font.params.rule_thickness,r=ji(t,{medium:1,thin:2/3,thick:5/3},0);return r?r*i:ho(t,e,s,this.jax.pxPerEm)}unicodeChars(t,e=this.variant){let s=Br(t);const i=this.font.getVariant(e);if(i&&i.chars){const t=i.chars;s=s.map((e=>{var s,i;return(null===(i=null===(s=t[e])||void 0===s?void 0:s[3])||void 0===i?void 0:i.smp)||e}))}return s}remapChars(t){return t}mmlText(t){return this.node.factory.create("text").setText(t)}mmlNode(t,e={},s=[]){return this.node.factory.create(t,e,s)}createMo(t){const e=this.node.factory,s=e.create("text").setText(t),i=e.create("mo",{stretchy:!0},[s]);i.inheritAttributesFrom(this.node),i.parent=this.node.parent;const r=this.wrap(i);return r.parent=this,r}getVariantChar(t,e){const s=this.font.getChar(t,e)||[0,0,0,{unknown:!0}];return 3===s.length&&(s[3]={}),s}html(t,e={},s=[]){return this.jax.html(t,e,s)}}jl.kind="unknown",jl.styles={},jl.removeStyles=["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","font"],jl.skipAttributes={fontfamily:!0,fontsize:!0,fontweight:!0,fontstyle:!0,color:!0,background:!0,class:!0,href:!0,style:!0,xmlns:!0},jl.BOLDVARIANTS={bold:{normal:"bold",italic:"bold-italic",fraktur:"bold-fraktur",script:"bold-script","sans-serif":"bold-sans-serif","sans-serif-italic":"sans-serif-bold-italic"},normal:{bold:"normal","bold-italic":"italic","bold-fraktur":"fraktur","bold-script":"script","bold-sans-serif":"sans-serif","sans-serif-bold-italic":"sans-serif-italic"}},jl.ITALICVARIANTS={italic:{normal:"italic",bold:"bold-italic","sans-serif":"sans-serif-italic","bold-sans-serif":"sans-serif-bold-italic"},normal:{italic:"normal","bold-italic":"bold","sans-serif-italic":"sans-serif","sans-serif-bold-italic":"bold-sans-serif"}};const Ul={"70.7%":"s","70%":"s","50%":"ss","60%":"Tn","85%":"sm","120%":"lg","144%":"Lg","173%":"LG","207%":"hg","249%":"HG"};class ql extends jl{toCHTML(t){this.toEmbellishedCHTML(t)||this.addChildren(this.standardChtmlNodes(t))}toEmbellishedCHTML(t){if(t.length<=1||!this.node.isEmbellished)return!1;const e=this.adaptor;t.forEach((t=>e.append(t,this.html("mjx-linestrut"))));const s=this.coreMO().embellishedBreakStyle,i=[];for(const[r,n]of[[t[0],"before"],[t[1],"after"]])s!==n?(this.toCHTML([r]),i.push(this.dom[0]),"after"===n&&e.removeAttribute(this.dom[0],"space")):i.push(this.createChtmlNodes([r])[0]);return this.dom=i,!0}addChildren(t){for(const e of this.childNodes)e.toCHTML(t)}standardChtmlNodes(t){this.markUsed();const e=this.createChtmlNodes(t);return this.handleStyles(),this.handleScale(),this.handleBorders(),this.handleColor(),this.handleSpace(),this.handleAttributes(),this.handlePWidth(),e}markUsed(){this.jax.wrapperUsage.add(this.kind)}createChtmlNodes(t){this.dom=t.map((t=>this.html("mjx-"+this.node.kind))),t=this.handleHref(t);for(const e of t.keys())this.adaptor.append(t[e],this.dom[e]);return this.dom}handleHref(t){const e=this.node.attributes.get("href");return e?t.map((t=>this.adaptor.append(t,this.html("a",{href:e})))):t}handleStyles(){if(!this.styles)return;const t=this.styles.cssText;if(t){const e=this.adaptor;this.dom.forEach((s=>e.setAttribute(s,"style",t)));const s=this.styles.get("font-family");s&&this.dom.forEach((t=>e.setStyle(t,"font-family",this.font.cssFamilyPrefix+", "+s)))}}handleScale(){this.dom.forEach((t=>this.setScale(t,this.bbox.rscale)))}setScale(t,e){const s=Math.abs(e-1)<.001?1:e;if(t&&1!==s){const e=this.percent(s);Ul[e]?this.adaptor.setAttribute(t,"size",Ul[e]):this.adaptor.setStyle(t,"fontSize",e)}return t}handleSpace(){const t=this.adaptor,e=!!this.node.getProperty("breakable")&&!this.node.getProperty("newline"),s=this.dom.length-1;for(const i of[[this.getLineBBox(0).L,"space","marginLeft",0],[this.getLineBBox(s).R,"rspace","marginRight",s]]){const[s,r,n,o]=i,a=this.em(s);if(e&&"space"===r){const e=t.node("mjx-break",Fl[a]?{size:Fl[a]}:{style:`letter-spacing: ${this.em(s-1)}`},[t.text(" ")]);t.insert(e,this.dom[o])}else s&&(Fl[a]?t.setAttribute(this.dom[o],r,Fl[a]):t.setStyle(this.dom[o],n,a))}}handleBorders(){var t,e;const s=null===(t=this.styleData)||void 0===t?void 0:t.border,i=null===(e=this.styleData)||void 0===e?void 0:e.padding,r=this.dom.length-1;if(!s||!r)return;const n=this.adaptor;for(const t of this.dom.keys()){const e=this.dom[t];t&&(s.width[3]&&n.setStyle(e,"border-left"," none"),i[3]&&n.setStyle(e,"padding-left","0")),t!==r&&(s.width[1]&&n.setStyle(e,"border-right","none"),i[1]&&n.setStyle(e,"padding-right","0"))}}handleColor(){var t;const e=this.adaptor,s=this.node.attributes,i=s.getExplicit("mathcolor")||s.getExplicit("color"),r=s.getExplicit("mathbackground")||s.getExplicit("background")||(null===(t=this.styles)||void 0===t?void 0:t.get("background-color"));i&&this.dom.forEach((t=>e.setStyle(t,"color",i))),r&&this.dom.forEach((t=>e.setStyle(t,"backgroundColor",r)))}handleAttributes(){const t=this.adaptor,e=this.node.attributes,s=e.getAllDefaults(),i=ql.skipAttributes;for(const r of e.getExplicitNames())if(!1===i[r]||!(r in s)&&!i[r]&&!t.hasAttribute(this.dom[0],r)){const s=e.getExplicit(r);this.dom.forEach((e=>t.setAttribute(e,r,s)))}if(e.get("class")){const s=e.get("class").trim().split(/ +/);for(const e of s)this.dom.forEach((s=>t.addClass(s,e)))}this.node.getProperty("inline-breaks")&&this.dom.forEach((e=>t.setAttribute(e,"inline-breaks","true")))}handlePWidth(){if(this.bbox.pwidth){const t=this.adaptor;this.bbox.pwidth===fo.fullWidth?this.dom.forEach((e=>t.setAttribute(e,"width","full"))):this.dom.forEach((e=>t.setStyle(e,"width",this.bbox.pwidth)))}}setIndent(t,e,s){const i=this.adaptor;if("center"===e||"left"===e){const e=this.getBBox().L;i.setStyle(t,"margin-left",this.em(s+e))}if("center"===e||"right"===e){const e=this.getBBox().R;i.setStyle(t,"margin-right",this.em(-s+e))}}drawBBox(){const{w:t,h:e,d:s,R:i}=this.getOuterBBox(),r=this.html("mjx-box",{style:{opacity:.25,"margin-left":this.em(-t-i)}},[this.html("mjx-box",{style:{height:this.em(e),width:this.em(t),"background-color":"red"}}),this.html("mjx-box",{style:{height:this.em(s),width:this.em(t),"margin-left":this.em(-t),"vertical-align":this.em(-s),"background-color":"green"}})]),n=this.dom[0]||this.parent.dom[0],o=this.adaptor.getAttribute(n,"size");o&&this.adaptor.setAttribute(r,"size",o);const a=this.adaptor.getStyle(n,"fontSize");a&&this.adaptor.setStyle(r,"fontSize",a),this.adaptor.append(this.adaptor.parent(n),r),this.adaptor.setStyle(n,"backgroundColor","#FFEE00")}html(t,e={},s=[]){return this.jax.html(t,e,s)}text(t){return this.jax.text(t)}char(t){return this.font.charSelector(t).substring(1)}}function Hl(t){return class extends t{getWrapWidth(t){return this.parent?this.getBBox().w:this.metrics.containerWidth/this.jax.pxPerEm}computeBBox(t,e=!1){super.computeBBox(t,e);const s=this.node.attributes;if(!this.parent&&this.jax.math.display&&"linebreak"===s.get("overflow")){const e=this.containerWidth;t.w>e&&this.childNodes[0].breakToWidth(e),t.updateFrom(this.childNodes[0].getBBox())}}}}ql.kind="unknown",ql.autoStyle=!0;const Wl=function(){var t;const e=Hl(ql);return(t=class extends e{handleDisplay(t){const e=this.adaptor,[s,i]=this.getAlignShift();if("center"!==s&&e.setAttribute(t,"justify",s),this.bbox.pwidth===fo.fullWidth){if(e.setAttribute(t,"width","full"),this.jax.table){let{L:r,w:n,R:o}=this.jax.table.getOuterBBox();"right"===s?o=Math.max(o||-i,-i):"left"===s?r=Math.max(r||i,i):"center"===s&&(n+=2*Math.abs(i));const a=this.em(Math.max(0,r+n+o));e.setStyle(t,"min-width",a),e.setStyle(this.jax.table.dom[0],"min-width",a)}}else this.setIndent(this.dom[0],s,i)}handleInline(t){const e=this.adaptor,s=e.getStyle(this.dom[0],"margin-right");s&&(e.setStyle(this.dom[0],"margin-right",""),e.setStyle(t,"margin-right",s),e.setStyle(t,"width","0"))}toCHTML(t){super.toCHTML(t);const e=this.adaptor;"block"===this.node.attributes.get("display")?(e.setAttribute(this.dom[0],"display","true"),e.setAttribute(t[0],"display","true"),this.handleDisplay(t[0])):this.handleInline(t[0]),e.addClass(this.dom[0],`${this.font.cssFontPrefix}-N`)}setChildPWidths(t,e=null,s=!0){return!!this.parent&&super.setChildPWidths(t,e,s)}handleAttributes(){super.handleAttributes();const t=this.adaptor;this.node.getProperty("process-breaks")&&this.dom.forEach((e=>t.setAttribute(e,"breakable","true")))}}).kind=wr.prototype.kind,t.styles={"mjx-math":{"line-height":0,"text-align":"left","text-indent":0,"font-style":"normal","font-weight":"normal","font-size":"100%","font-size-adjust":"none","letter-spacing":"normal","word-wrap":"normal","word-spacing":"normal",direction:"ltr",padding:"1px 0"},'mjx-container[jax="CHTML"][display="true"] mjx-math':{padding:0},"mjx-math[breakable]":{display:"inline"},'mjx-container[jax="CHTML"] mjx-break':{"white-space":"normal","line-height":"0","clip-path":"rect(0 0 0 0)","font-family":"MJX-BRK !important"},'mjx-break[size="0"]':{"letter-spacing":"-0.999em"},'mjx-break[size="1"]':{"letter-spacing":"-0.889em"},'mjx-break[size="2"]':{"letter-spacing":"-0.833em"},'mjx-break[size="3"]':{"letter-spacing":"-0.778em"},'mjx-break[size="4"]':{"letter-spacing":"-0.722em"},'mjx-break[size="5"]':{"letter-spacing":"-0.667em"}},t}();function zl(t){return class extends t{computeBBox(t,e=!1){super.computeBBox(t),this.copySkewIC(t)}}}const Xl=function(){var t;const e=zl(ql);return(t=class extends e{}).kind=kr.prototype.kind,t}();function Vl(t){return class extends t{get breakCount(){return this.breakStyle?1:0}get embellishedBreakCount(){return this.embellishedBreakStyle?1:0}get embellishedBreakStyle(){return this.breakStyle||this.getBreakStyle()}protoBBox(t){const e=this.stretch.dir!==xl.None;e&&null===this.size&&this.getStretchedVariant([0]),e&&this.size<0||(super.computeBBox(t),0!==t.w||!this.node.attributes.hasExplicit("fence")||""!==this.node.getText()||this.node.texClass!==pr.OPEN&&this.node.texClass!==pr.CLOSE||this.jax.options.mathmlSpacing||(t.R=this.font.params.nulldelimiterspace),this.copySkewIC(t))}getAccentOffset(){const t=fo.empty();return this.protoBBox(t),-t.w/2}getCenterOffset(t=null){return t||(t=fo.empty(),super.computeBBox(t)),(t.h+t.d)/2+this.font.params.axis_height-t.h}getStretchedVariant(t,e=!1){if(this.stretch.dir!==xl.None){let s=this.getWH(t);const i=this.getSize("minsize",0),r=this.getSize("maxsize",1/0),n=this.node.getProperty("mathaccent");s=Math.max(i,Math.min(r,s));const o=this.font.params.delimiterfactor/1e3,a=this.font.params.delimitershortfall,c=i||e?s:n?Math.min(s/o,s+a):Math.max(s*o,s-a),l=this.stretch,h=l.c||this.getText().codePointAt(0);let d=0;if(l.sizes)for(const t of l.sizes){if(t>=c)return n&&d&&d--,void this.setDelimSize(h,d);d++}l.stretch?(this.size=-1,this.invalidateBBox(),this.getStretchBBox(t,this.checkExtendedHeight(s,l),l)):this.setDelimSize(h,d-1)}}setDelimSize(t,e){const s=this.stretch;this.variant=this.font.getSizeVariant(t,e),this.size=e;const i=s.schar&&s.schar[Math.min(e,s.schar.length-1)]||t;this.stretch=Object.assign(Object.assign({},s),{c:i}),this.childNodes[0].invalidateBBox()}getSize(t,e){const s=this.node.attributes;return s.isSet(t)&&(e=this.length2em(s.get(t),1,1)),e}getWH(t){if(0===t.length)return 0;if(1===t.length)return t[0];const[e,s]=t,i=this.font.params.axis_height;return this.node.attributes.get("symmetric")?2*Math.max(e-i,s+i):e+s}getStretchBBox(t,e,s){Object.hasOwn(s,"min")&&s.min>e&&(e=s.min);let[i,r,n]=s.HDW;if(this.stretch.dir===xl.Vertical)[i,r]=this.getBaseline(t,e,s);else if(n=e,this.stretch.hd&&!this.jax.options.mathmlSpacing){const t=this.font.params.extender_factor;i=i*(1-t)+this.stretch.hd[0]*t,r=r*(1-t)+this.stretch.hd[1]*t}this.bbox.h=i,this.bbox.d=r,this.bbox.w=n}getBaseline(t,e,s){const i=2===t.length&&t[0]+t[1]===e,r=this.node.attributes.get("symmetric"),[n,o]=i?t:[e,0];let[a,c]=[n+o,0];if(r){const t=this.font.params.axis_height;i&&(a=2*Math.max(n-t,o+t)),c=a/2-t}else if(i)c=o;else{const[t,e]=s.HDW||[.75,.25];c=e*(a/(t+e))}return[a-c,c]}checkExtendedHeight(t,e){if(e.fullExt){const[s,i]=e.fullExt;t=i+Math.ceil(Math.max(0,t-i)/s)*s}return t}setBreakStyle(t=""){if(this.breakStyle=this.node.parent.isEmbellished&&!t?"":this.getBreakStyle(t),this.breakCount&&this.multChar){const t=this.parent.node.childIndex(this.node),e=this.parent.node.childNodes[t+1];e&&e.setTeXclass(this.multChar.node)}}getBreakStyle(t=""){const e=this.node.attributes;let s=t||("newline"===e.get("linebreak")||this.node.getProperty("forcebreak")?e.get("linebreakstyle"):"");return"infixlinebreakstyle"===s&&(s=e.get(s)),s}getMultChar(){const t=this.node.attributes.get("linebreakmultchar");t&&"\u2062"===this.getText()&&"\u2062"!==t&&(this.multChar=this.createMo(t))}constructor(t,e,s=null){super(t,e,s),this.size=null,this.isAccent=this.node.isAccent,this.getMultChar(),this.setBreakStyle()}computeBBox(t,e=!1){if(this.protoBBox(t),this.node.attributes.get("symmetric")&&this.stretch.dir!==xl.Horizontal){const e=this.getCenterOffset(t);t.h+=e,t.d-=e}this.node.getProperty("mathaccent")&&(this.stretch.dir===xl.None||this.size>=0)&&(t.w=0)}computeLineBBox(t){return this.moLineBBox(t,this.breakStyle)}moLineBBox(t,e,s=null){const i=this.node.attributes.get("lineleading"),r=this.length2em(i,this.linebreakOptions.lineleading);if(0===t&&"before"===e){const t=Al.from(fo.zero(),r);return t.originalL=this.bbox.L,this.bbox.L=0,t}let n=Al.from(s||this.getOuterBBox(),r);return 1===t&&("after"===e?(n.w=n.h=n.d=0,n.isFirst=!0,this.bbox.R=0):"duplicate"===e?n.L=0:this.multChar&&(n=Al.from(this.multChar.getOuterBBox(),r)),n.getIndentData(this.node)),n}canStretch(t){if(this.stretch.dir!==xl.None)return this.stretch.dir===t;if(!this.node.attributes.get("stretchy"))return!1;const e=this.getText();if(1!==Array.from(e).length)return!1;const s=this.font.getDelimiter(e.codePointAt(0));return this.stretch=s&&s.dir===t?s:_l,this.stretch.dir!==xl.None}getVariant(){this.node.attributes.get("largeop")?this.variant=this.node.attributes.get("displaystyle")?"-largeop":"-smallop":this.node.attributes.hasExplicit("mathvariant")||!1!==this.node.getProperty("pseudoscript")?super.getVariant():this.variant="-tex-variant"}remapChars(t){const e=this.node.getProperty("primes");if(e)return Br(e);if(1===t.length){const e=this.node.coreParent().parent,s=this.isAccent&&!e.isKind("mrow")?"accent":"mo",i=this.font.getRemappedChar(s,t[0]);i&&(t=this.unicodeChars(i,this.variant))}return t}}}class Gl{constructor(){this.used=new Set,this.needsUpdate=[]}add(t){const e=JSON.stringify(t);this.used.has(e)||this.needsUpdate.push(t),this.used.add(e)}has(t){return this.used.has(JSON.stringify(t))}clear(){this.used.clear(),this.needsUpdate=[]}update(){const t=this.needsUpdate;return this.needsUpdate=[],t}}class Jl extends kl{constructor(){super(...arguments),this.charUsage=new Gl,this.delimUsage=new Gl,this.fontUsage={},this.newFonts=0}static charOptions(t,e){return super.charOptions(t,e)}static addFontURLs(t,e,s){for(const i of Object.keys(e)){const r=Object.assign({},e[i]);r.src=r.src.replace(/%%URL%%/,s),t[i]=r}}static addDynamicFontCss(t,e,s){const i={};for(const s of e){const e=s.slice(4);i[`@font-face /* ${e} */`]={"font-family":s,src:`url("%%URL%%/${s.toLowerCase()}.woff2") format("woff2")`},t[`.${e}`]={"font-family":`${this.defaultCssFamilyPrefix}, ${s}`}}this.addFontURLs(t,i,s)}static addExtension(t,e=""){super.addExtension(t,e),t.fonts&&this.addDynamicFontCss(this.defaultStyles,t.fonts,t.fontURL)}addExtension(t,e=""){if(super.addExtension(t,e),!t.fonts||!this.options.adaptiveCSS)return[];const s={},i=new To;return this.constructor.addDynamicFontCss(s,t.fonts,t.fontURL),i.addStyles(s),i.getStyleRules()}adaptiveCSS(t){this.options.adaptiveCSS=t}clearCache(){this.options.adaptiveCSS&&(this.charUsage.clear(),this.delimUsage.clear())}createVariant(t,e=null,s=null){super.createVariant(t,e,s),this.variant[t].letter=this.constructor.defaultVariantLetters[t]}defineChars(t,e){super.defineChars(t,e);const s=this.variant[t].letter,i=this.constructor;for(const t of Object.keys(e)){const r=parseInt(t);if(!Array.isArray(e[r]))continue;const n=i.charOptions(e,r);void 0===n.f&&(n.f=s);for(const[t,e]of i.combiningChars)if(r>=t&&r<=e){n.cmb=!0;break}}}addDynamicFontCss(t,e=this.options.fontURL){this.constructor.addDynamicFontCss(this.fontUsage,t,e)}updateDynamicStyles(){const t=this.fontUsage;return this.fontUsage={},this.options.adaptiveCSS||this.updateStyles(t),t}get styles(){const t=this.constructor,e=Object.assign(Object.assign({},t.defaultStyles),this.fontUsage);return this.fontUsage={},t.addFontURLs(e,t.defaultFonts,this.options.fontURL),this.options.adaptiveCSS?this.updateStyles(e):this.allStyles(e),e}updateStyles(t){for(const e of this.delimUsage.update())this.addDelimiterStyles(t,e,this.getDelimiter(e));for(const[e,s]of this.charUsage.update()){const i=this.variant[e];this.addCharStyles(t,i.letter,s,i.chars[s])}return t}allStyles(t){var e;for(const e of Object.keys(this.delimiters)){const s=parseInt(e);this.addDelimiterStyles(t,s,this.delimiters[s])}for(const s of Object.keys(this.variant)){const i=this.variant[s],r=i.letter;for(const s of Object.keys(i.chars)){const n=parseInt(s),o=i.chars[n];!(null===(e=null==o?void 0:o[3])||void 0===e?void 0:e.smp)&&Array.isArray(o)&&(o.length<4&&(o[3]={}),this.addCharStyles(t,r,n,o))}}}addDelimiterStyles(t,e,s){if(!s.stretch)return;const i=s.c&&s.c!==e?this.charSelector(s.c):this.charSelector(e);s.dir===xl.Vertical?this.addDelimiterVStyles(t,e,i,s):this.addDelimiterHStyles(t,e,i,s)}addDelimiterVStyles(t,e,s,i){const r=i.HDW,[n,o,a,c]=i.stretch,[l,h,d,u]=this.getStretchVariants(e),p=this.addDelimiterVPart(t,s,"beg",n,l,r);this.addDelimiterVPart(t,s,"ext",o,h,r);const m=this.addDelimiterVPart(t,s,"end",a,d,r);if(c){const e=this.addDelimiterVPart(t,s,"mid",c,u,r),i=this.em(e/2-.03);t[`mjx-stretchy-v${s} > mjx-ext:first-of-type`]={height:"50%","border-width":`${this.em1(p-.03)} 0 ${i}`},t[`mjx-stretchy-v${s} > mjx-ext:last-of-type`]={height:"50%","border-width":`${i} 0 ${this.em1(m-.03)}`}}else(m||p)&&(t[`mjx-stretchy-v${s} > mjx-ext`]["border-width"]=`${this.em1(p-.03)} 0 ${this.em1(m-.03)}`)}addDelimiterVPart(t,e,s,i,r,n){if(!i)return 0;const[o,a,c]=this.getChar(r,i),l={width:this.em0(c)};if("ext"!==s){const t=c>n[2]?this.em((n[2]-c)/2):"auto",e="beg"===s?o:"end"===s?-a:(o-a)/2;l.margin=`${this.em(e)} ${t} ${this.em(-e)}`}else l["line-height"]=this.em0(o+a+.005),t[`mjx-stretchy-v${e} > mjx-${s} > mjx-spacer`]={"margin-top":this.em(-a)};return t[`mjx-stretchy-v${e} > mjx-${s}`]=l,o+a}addDelimiterHStyles(t,e,s,i){const r=[...i.HDW],[n,o,a,c]=i.stretch,[l,h,d,u]=this.getStretchVariants(e);if(i.hd&&!this.options.mathmlSpacing){const t=this.params.extender_factor;r[0]=r[0]*(1-t)+i.hd[0]*t,r[1]=r[1]*(1-t)+i.hd[1]*t}const p=this.addDelimiterHPart(t,s,"beg",n,l,r);this.addDelimiterHPart(t,s,"ext",o,h,r);const m=this.addDelimiterHPart(t,s,"end",a,d,r);if(c){const e=this.addDelimiterHPart(t,s,"mid",c,u,r),i=this.em0(e/2-.03);t[`mjx-stretchy-h${s} > mjx-ext:first-of-type`]={width:"50%","border-width":`0 ${i} 0 ${this.em0(p-.03)}`},t[`mjx-stretchy-h${s} > mjx-ext:last-of-type`]={width:"50%","border-width":`0 ${this.em0(m-.03)} 0 ${i}`}}else(p||m)&&(t[`mjx-stretchy-h${s} > mjx-ext`]["border-width"]=`0 ${this.em0(m-.06)} 0 ${this.em0(p-.06)}`);i.ext&&(t[`mjx-stretchy-h${s} > mjx-ext > mjx-spacer`]["letter-spacing"]=this.em(-i.ext))}addDelimiterHPart(t,e,s,i,r,n){if(!i)return 0;let[,,o,a]=this.getChar(r,i);const c={padding:this.padding(n,o-n[2])};return"ext"===s?(!o&&a.dx&&(o=2*a.dx-.06),t[`mjx-stretchy-h${e} > mjx-${s} > mjx-spacer`]={"margin-left":this.em(-o/2)},a.cmb&&(t[`mjx-stretchy-h${e} > mjx-${s} > mjx-c`]={width:this.em(o),"text-align":"right"})):("mid"===s?c.margin=`0 ${this.em(-o/2)}`:c["end"==s?"margin-left":"margin-right"]=this.em(-o),this.checkCombiningChar(a,c)),t[`mjx-stretchy-h${e} > mjx-${s}`]=c,o}addCharStyles(t,e,s,i){const r=i[3],n=void 0!==r.f?r.f:e,o=r.ff||(n?`${this.cssFontPrefix}-${n}`:""),a="mjx-c"+this.charSelector(s)+(o?"."+o:""),c=r.oc||r.ic||0;t[a]={padding:this.padding(i,c)},r.oc&&(t[a+"[noic]"]={"padding-right":this.em(i[2])}),this.checkCombiningChar(r,t[a])}checkCombiningChar(t,e){if(!t.cmb)return;const s=e.padding.split(/ /);e.width=s[1],s[1]="0",s[3]||s.pop(),e.padding=s.join(" ")}em(t){return po(t)}em0(t){return po(Math.max(0,t))}em1(t){const e=po(Math.max(0,t));return"0"===e?".1px":e}padding([t,e,s],i=0){return[t,s+i,e,0].map(this.em0).join(" ")}charSelector(t){return".mjx-c"+t.toString(16).toUpperCase()}}function Kl(t,e){for(const s of Object.keys(e)){const i=parseInt(s),r=e[i];r.c&&(r.c=r.c.replace(/\\[0-9A-F]+/gi,(t=>String.fromCodePoint(parseInt(t.substring(1),16))))),Object.assign(kl.charOptions(t,i),r)}return t}Jl.OPTIONS=Object.assign(Object.assign({},kl.OPTIONS),{dynamicPrefix:"./chtml/dynamic",fontURL:"./chtml/woff2"}),Jl.JAX="CHTML",Jl.defaultVariantLetters={},Jl.defaultStyles={},Jl.defaultFonts={},Jl.combiningChars=[[768,879],[8400,8447]];const $l=function(){var t;const e=Vl(ql);return t=class extends e{toCHTML(t){const e=this.adaptor,s=this.node.attributes,i=s.get("symmetric")&&this.stretch.dir!==xl.Horizontal,r=this.stretch.dir!==xl.None;r&&null===this.size&&this.getStretchedVariant([]),t.length>1&&t.forEach((t=>e.append(t,this.html("mjx-linestrut"))));const n=this.standardChtmlNodes(t);if(n.length>1&&"duplicate"!==this.breakStyle){const t="after"===this.breakStyle?1:0;e.remove(n[t]),n[t]=null}if(r&&this.size<0)this.stretchHTML(n);else{if(i||s.get("largeop")){const t=this.em(this.getCenterOffset());"0"!==t&&n.forEach((s=>s&&e.setStyle(s,"verticalAlign",t)))}this.node.getProperty("mathaccent")&&n.forEach((t=>{e.setStyle(t,"width","0"),e.setStyle(t,"margin-left",this.em(this.getAccentOffset()))})),n[0]&&this.addChildren([n[0]]),n[1]&&(this.multChar||this).addChildren([n[1]])}}stretchHTML(t){const e=this.getText().codePointAt(0);this.font.delimUsage.add(e),this.childNodes[0].markUsed();const s=this.stretch,i=s.stretch,r=this.font.getStretchVariants(e),n=[],o=[];for(let t=0;tt?o?t[0]+t[1]:t[2]:0));c=Math.max(0,c-n);const[d,u]=t[3]?[(r-h)/2-a,(r-h)/2-l]:[r-a-l,0];this.createPart("mjx-beg",t[0],e[0],s[0],i),this.createPart("mjx-ext",t[1],e[1],s[1],i,d,c,o),t[3]&&(this.createPart("mjx-mid",t[3],e[3],s[3],i),this.createPart("mjx-ext",t[1],e[1],s[1],i,u,c,o)),this.createPart("mjx-end",t[2],e[2],s[2],i)}createPart(t,e,s,i,r,n=0,o=0,a=""){if(s){const c=e[3],l=c.f||("normal"===i?"":this.font.getVariant(i).letter),h=c.ff||(l?`${this.font.cssFontPrefix}-${l}`:""),d=c.c||String.fromCodePoint(s);let u=[];if("mjx-ext"===t&&(o||c.dx)){o||(o=Math.max(.06,2*c.dx-.06));const t=Math.min(Math.ceil(n/o)+1,500);if(c.cmb){u.push(this.html("mjx-spacer"));for(let e=0;e *":{display:"inline-block",width:0,"text-align":"right"},"mjx-stretchy-h > mjx-ext":{"clip-path":"padding-box xywh(0 -1em 100% calc(100% + 2em))",width:"100%",border:"0px solid transparent","box-sizing":"border-box","text-align":"left"},"mjx-stretchy-v":{display:"inline-block","text-align":"center"},"mjx-stretchy-v > *":{display:"block",height:0,margin:"0 auto"},"mjx-stretchy-v > mjx-ext > mjx-spacer":{display:"block"},"mjx-stretchy-v > mjx-ext":{"clip-path":"padding-box xywh(-1em 0 calc(100% + 2em) 100%)",height:"100%",border:"0.1px solid transparent","box-sizing":"border-box","white-space":"wrap"},"mjx-mark":{display:"inline-block",height:0}},t}();function Yl(t){return class extends t{remapChars(t){if(t.length){const e=this.font.getRemappedChar("mn",t[0]);if(e){const s=this.unicodeChars(e,this.variant);1===s.length?t[0]=s[0]:t=s.concat(t.slice(1))}}return t}}}const Ql=function(){var t;const e=Yl(ql);return(t=class extends e{}).kind=Ar.prototype.kind,t}();function Zl(t){return class extends t{createText(t){const e=this.wrap(this.mmlText(t));return e.parent=this,e}constructor(t,e,s=null){super(t,e,s);const i=this.node.attributes,r=i.getList("lquote","rquote");"monospace"!==this.variant&&(i.isSet("lquote")||'"'!==r.lquote||(r.lquote="\u201c"),i.isSet("rquote")||'"'!==r.rquote||(r.rquote="\u201d")),this.childNodes.unshift(this.createText(r.lquote)),this.childNodes.push(this.createText(r.rquote))}}}const th=function(){var t;const e=Zl(ql);return(t=class extends e{}).kind=Vr.prototype.kind,t}();function eh(t){var e;return e=class extends t{constructor(){super(...arguments),this.breakPoints=[]}textWidth(t){let e=this.textNode;if(!e){const t=this.node.factory.create("text");t.parent=this.node,e=this.textNode=this.factory.wrap(t),e.parent=this}return e.node.setText(t),e.invalidateBBox(!1),e.getBBox().w}get breakCount(){return this.breakPoints.length}getVariant(){const t=this.jax.options,e=this.jax.math.outputData,s=(!!e.merrorFamily||!!t.merrorFont)&&this.node.Parent.isKind("merror");if(e.mtextFamily||t.mtextFont||s){const i=this.node.attributes.get("mathvariant"),r=this.constructor.INHERITFONTS[i]||this.jax.font.getCssFont(i),n=r[0]||(s?e.merrorFamily||t.merrorFont:e.mtextFamily||t.mtextFont);this.variant=this.explicitVariant(n,r[2]?"bold":"",r[1]?"italic":"")}else super.getVariant()}setBreakAt(t){this.breakPoints.push(t)}clearBreakPoints(){this.breakPoints=[]}computeLineBBox(t){const e=Al.from(this.getOuterBBox(),this.linebreakOptions.lineleading);return this.breakCount?(e.w=this.getBreakWidth(t),0===t?(e.R=0,this.addLeftBorders(e)):(e.L=0,e.indentData=[["left","0"],["left","0"],["left","0"]],t===this.breakCount&&this.addRightBorders(e)),e):e}getBreakWidth(t){const e=this.childNodes;let[s,i]=this.breakPoints[t-1]||[0,0];const[r,n]=this.breakPoints[t]||[e.length,0];let o=e[s].node.getText().split(/ /);if(s===r)return this.textWidth(o.slice(i,n).join(" "));let a=this.textWidth(o.slice(i).join(" "));for(;++s1&&t.forEach((t=>this.adaptor.append(t,this.html("mjx-linestrut"))));const e=this.standardChtmlNodes(t);let{w:s,h:i,d:r}=this.getBBox();s<0&&(this.adaptor.setStyle(e[0],"marginRight",this.em(s)),s=0),s&&!this.breakCount&&this.adaptor.setStyle(e[0],"width",this.em(s)),i=Math.max(0,i+r),i&&this.adaptor.setStyle(e[0],"height",this.em(Math.max(0,i))),r&&this.adaptor.setStyle(e[0],"verticalAlign",this.em(-r))}}).kind=Xr.prototype.kind,t}();function nh(t){return class extends t{getDimens(){const t=this.node.attributes.getList("width","height","depth","lspace","voffset"),e=this.childNodes[0].getOuterBBox();let{w:s,h:i,d:r}=e;const n=s,o=i,a=r;let c=0,l=0,h=0;""!==t.width&&(s=this.dimen(t.width,e,"w",0)),""!==t.height&&(i=this.dimen(t.height,e,"h",0)),""!==t.depth&&(r=this.dimen(t.depth,e,"d",0)),""!==t.voffset&&(l=this.dimen(t.voffset,e)),""!==t.lspace&&(c=this.dimen(t.lspace,e));const d=this.node.attributes.get("data-align");return d&&(h=this.getAlignX(s,e,d)),[o,a,n,i-o,r-a,s-n,c,l,h]}dimen(t,e,s="",i=null){const r=(t=String(t)).match(/width|height|depth/),n=r?e[r[0].charAt(0)]:s?e[s]:0;let o=this.length2em(t,n)||0;return t.match(/^[-+]/)&&s&&(o+=n),null!=i&&(o=Math.max(i,o)),o}setBBoxDimens(t){const[e,s,i,r,n,o]=this.getDimens();t.w=i+o,t.h=e+r,t.d=s+n}computeBBox(t,e=!1){this.setBBoxDimens(t);if(this.childNodes[0].getOuterBBox().w>t.w){const e=this.node.attributes.get("data-overflow");("linebreak"===e||"auto"===e&&"linebreak"===this.jax.math.root.attributes.get("overflow"))&&(this.childNodes[0].breakToWidth(t.w),this.setBBoxDimens(t))}this.setChildPWidths(e,t.w)}getWrapWidth(t){return this.getBBox().w}getChildAlign(t){return this.node.attributes.get("data-align")||"left"}}}const oh=function(){var t;const e=nh(ql);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;let e=this.standardChtmlNodes(t);const s=[],i={},[,,r,n,o,a,c,l,h]=this.getDimens();if((a||this.childNodes[0].getBBox().pwidth)&&(i.width=this.em(r+a)),(n||o)&&(i.margin=this.em(n)+" 0 "+this.em(o)),c+h||l){i.position="relative";const t=this.html("mjx-rbox",{style:{left:this.em(c+h),top:this.em(-l),"max-width":i.width}});c+h&&this.childNodes[0].getBBox().pwidth&&(this.adaptor.setAttribute(t,"width","full"),this.adaptor.setStyle(t,"left",this.em(c))),s.push(t)}e=[this.adaptor.append(e[0],this.html("mjx-block",{style:i},s))],this.childNodes[0].childNodes.length?this.childNodes[0].toCHTML([s[0]||e[0]]):(n||o)&&this.adaptor.append(s[0]||e[0],this.html("mjx-box"))}}).kind=tn.prototype.kind,t.styles={"mjx-mpadded":{display:"inline-block"},"mjx-rbox":{display:"inline-block",position:"relative"}},t}(),ah=4,ch=1,lh=2,hh=.067,dh=.2,uh=hh+"em solid",ph={top:0,right:1,bottom:2,left:3},mh=Object.keys(ph),fh=t=>new Array(4).fill(t.thickness+t.padding),gh=t=>new Array(4).fill(t.padding),bh=t=>new Array(4).fill(t.thickness),Eh=t=>Math.max(t.padding,t.thickness*(t.arrowhead.x+t.arrowhead.dx+1)),Nh=(t,e)=>{if(t.childNodes[0]){const{h:s,d:i}=t.childNodes[0].getBBox();e[0]=e[2]=Math.max(0,t.thickness*t.arrowhead.y-(s+i)/2)}return e},yh=(t,e)=>{if(t.childNodes[0]){const{w:s}=t.childNodes[0].getBBox();e[1]=e[3]=Math.max(0,t.thickness*t.arrowhead.y-s/2)}return e},xh={up:[-Math.PI/2,!1,!0,"verticalstrike"],down:[Math.PI/2,!1,!0,"verticakstrike"],right:[0,!1,!1,"horizontalstrike"],left:[Math.PI,!1,!1,"horizontalstrike"],updown:[Math.PI/2,!0,!0,"verticalstrike uparrow downarrow"],leftright:[0,!0,!1,"horizontalstrike leftarrow rightarrow"]},vh={updiagonal:[-1,0,!1,"updiagonalstrike northeastarrow"],northeast:[-1,0,!1,"updiagonalstrike updiagonalarrow"],southeast:[1,0,!1,"downdiagonalstrike"],northwest:[1,Math.PI,!1,"downdiagonalstrike"],southwest:[-1,Math.PI,!1,"updiagonalstrike"],northeastsouthwest:[-1,0,!0,"updiagonalstrike northeastarrow updiagonalarrow southwestarrow"],northwestsoutheast:[1,0,!0,"downdiagonalstrike northwestarrow southeastarrow"]},Ch={up:t=>yh(t,[Eh(t),0,t.padding,0]),down:t=>yh(t,[t.padding,0,Eh(t),0]),right:t=>Nh(t,[0,Eh(t),0,t.padding]),left:t=>Nh(t,[0,t.padding,0,Eh(t)]),updown:t=>yh(t,[Eh(t),0,Eh(t),0]),leftright:t=>Nh(t,[0,Eh(t),0,Eh(t)])},Th=function(t){return e=>{const s=ph[e];return[e,{renderer:t,bbox:t=>{const e=[0,0,0,0];return e[s]=t.thickness+t.padding,e},border:t=>{const e=[0,0,0,0];return e[s]=t.thickness,e}}]}},_h=function(t){return(e,s,i)=>{const r=ph[s],n=ph[i];return[e,{renderer:t,bbox:t=>{const e=t.thickness+t.padding,s=[0,0,0,0];return s[r]=s[n]=e,s},border:t=>{const e=[0,0,0,0];return e[r]=e[n]=t.thickness,e},remove:s+" "+i}]}},wh=function(t){return e=>{const s="mjx-"+e.charAt(0)+"strike";return[e+"diagonalstrike",{renderer:t(s),bbox:fh}]}},kh=function(t){return e=>{const[s,i,r,n]=vh[e];return[e+"arrow",{renderer:(e,n)=>{const[o,a]=e.arrowAW(),c=e.arrow(a,s*(o-i),r);t(e,c)},bbox:t=>{const{a:e,x:s,y:i}=t.arrowData(),[r,n,o]=[t.arrowhead.x,t.arrowhead.y,t.arrowhead.dx],[a,c]=t.getArgMod(r+o,n),l=i+(a>e?t.thickness*c*Math.sin(a-e):0),h=s+(a>Math.PI/2-e?t.thickness*c*Math.sin(a+e-Math.PI/2):0);return[l,h,l,h]},remove:n}]}},Ah=function(t){return e=>{const[s,i,r,n]=xh[e];return[e+"arrow",{renderer:(e,n)=>{const{w:o,h:a,d:c}=e.getBBox(),[l,h]=r?[a+c,"X"]:[o,"Y"],d=e.getOffset(h),u=e.arrow(l,s,i,h,d);t(e,u)},bbox:Ch[e],remove:n}]}};function Mh(t){return class extends t{getParameters(){const t=this.node.attributes,e=t.get("data-padding");void 0!==e&&(this.padding=this.length2em(e,dh));const s=t.get("data-thickness");void 0!==s&&(this.thickness=this.length2em(s,hh));const i=t.get("data-arrowhead");if(void 0!==i){const[t,e,s]=Ur(i);this.arrowhead={x:t?parseFloat(t):ah,y:e?parseFloat(e):lh,dx:s?parseFloat(s):ch}}}getNotations(){const t=this.constructor.notations;for(const e of Ur(this.node.attributes.get("notation"))){const s=t.get(e);s&&(this.notations[e]=s,s.renderChild&&(this.renderChild=s.renderer))}}removeRedundantNotations(){for(const t of Object.keys(this.notations))if(this.notations[t]){const e=this.notations[t].remove||"";for(const t of e.split(/ /))delete this.notations[t]}}initializeNotations(){for(const t of Object.keys(this.notations)){const e=this.notations[t].init;e&&e(this)}}getBBoxExtenders(){const t=[0,0,0,0];for(const e of Object.keys(this.notations))this.maximizeEntries(t,this.notations[e].bbox(this));return t}getPadding(){const t=[0,0,0,0];for(const e of Object.keys(this.notations)){const s=this.notations[e].border;s&&this.maximizeEntries(t,s(this))}return[0,1,2,3].map((e=>this.TRBL[e]-t[e]))}maximizeEntries(t,e){for(let s=0;s.001?n:0}getArgMod(t,e){return[Math.atan2(e,t),Math.sqrt(t*t+e*e)]}arrow(t,e,s,i="",r=0){return null}arrowData(){const[t,e]=[this.padding,this.thickness],s=e*(this.arrowhead.x+Math.max(1,this.arrowhead.dx)),{h:i,d:r,w:n}=this.childNodes[0].getBBox(),o=i+r,a=Math.sqrt(o*o+n*n),c=Math.max(t,s*n/a),l=Math.max(t,s*o/a),[h,d]=this.getArgMod(n+2*c,o+2*l);return{a:h,W:d,x:c,y:l}}arrowAW(){const{h:t,d:e,w:s}=this.childNodes[0].getBBox(),[i,r,n,o]=this.TRBL;return this.getArgMod(o+s+r,i+t+e+n)}createMsqrt(t){const e=this.node.factory.create("msqrt");e.inheritAttributesFrom(this.node),e.childNodes[0]=t.node;const s=this.wrap(e);return s.parent=this,s}sqrtTRBL(){const t=this.msqrt.getBBox(),e=this.msqrt.childNodes[0].getBBox();return[t.h-e.h,0,t.d-e.d,t.w-e.w]}constructor(t,e,s=null){super(t,e,s),this.notations={},this.renderChild=null,this.msqrt=null,this.padding=dh,this.thickness=hh,this.arrowhead={x:ah,y:lh,dx:ch},this.TRBL=[0,0,0,0],this.getParameters(),this.getNotations(),this.removeRedundantNotations(),this.initializeNotations(),this.TRBL=this.getBBoxExtenders()}computeBBox(t,e=!1){const[s,i,r,n]=this.TRBL,o=this.childNodes[0].getBBox();t.combine(o,n,0),t.h+=s,t.d+=r,t.w+=i,this.setChildPWidths(e)}}}const Lh=function(t,e=""){return(s,i)=>{const r=s.adjustBorder(s.html("mjx-"+t));if(e){const t=s.getOffset(e);if(s.thickness!==hh||t){const i=`translate${e}(${s.Em(s.thickness/2-t)})`;s.adaptor.setStyle(r,"transform",i)}}s.adaptor.append(s.dom[0],r)}},Ih=function(t){return Th(((e,s)=>{e.adaptor.setStyle(s,"border-"+t,e.Em(e.thickness)+" solid")}))(t)},Sh=function(t,e,s){return _h(((t,i)=>{const r=t.Em(t.thickness)+" solid";t.adaptor.setStyle(i,"border-"+e,r),t.adaptor.setStyle(i,"border-"+s,r)}))(t,e,s)},Rh=function(t,e){return wh((t=>(s,i)=>{const{w:r,h:n,d:o}=s.getBBox(),[a,c]=s.getArgMod(r,n+o),l=e*s.thickness/2,h=s.adjustBorder(s.html(t,{style:{width:s.Em(c),transform:"rotate("+s.fixed(-e*a)+"rad) translateY("+l+"em)"}}));s.adaptor.append(s.dom[0],h)}))(t)},Oh=function(t){return kh(((t,e)=>{t.adaptor.append(t.dom[0],e)}))(t)},Dh=function(t){return Ah(((t,e)=>{t.adaptor.append(t.dom[0],e)}))(t)};function Ph(t,e){return Math.atan2(t,e).toFixed(3).replace(/\.?0+$/,"")}const Bh=Ph(ch,lh),Fh=function(){var t;const e=Mh(ql);return(t=class extends e{adjustArrow(t,e){const s=this.thickness,i=this.arrowhead;if(i.x===ah&&i.y===lh&&i.dx===ch&&s===hh)return;const[r,n]=[s*i.x,s*i.y].map((t=>this.em(t))),o=Ph(i.dx,i.y),[a,c,l,h,d]=this.adaptor.childNodes(t);this.adjustHead(c,[n,"0","1px",r],o),this.adjustHead(l,["1px","0",n,r],"-"+o),this.adjustHead(h,[n,r,"1px","0"],"-"+o),this.adjustHead(d,["1px",r,n,"0"],o),this.adjustLine(a,s,i.x,e)}adjustHead(t,e,s){t&&(this.adaptor.setStyle(t,"border-width",e.join(" ")),this.adaptor.setStyle(t,"transform","skewX("+s+"rad)"))}adjustLine(t,e,s,i){this.adaptor.setStyle(t,"borderTop",this.em(e)+" solid"),this.adaptor.setStyle(t,"top",this.em(-e/2)),this.adaptor.setStyle(t,"right",this.em(e*(s-1))),i&&this.adaptor.setStyle(t,"left",this.em(e*(s-1)))}moveArrow(t,e,s){if(!s)return;const i=this.adaptor.getStyle(t,"transform");this.adaptor.setStyle(t,"transform",`translate${e}(${this.em(-s)})${i?" "+i:""}`)}adjustBorder(t){return this.thickness!==hh&&this.adaptor.setStyle(t,"borderWidth",this.em(this.thickness)),t}adjustThickness(t){return this.thickness!==hh&&this.adaptor.setStyle(t,"strokeWidth",this.fixed(this.thickness)),t}fixed(t,e=3){return Math.abs(t)<6e-4?"0":t.toFixed(e).replace(/\.?0+$/,"")}Em(t){return super.em(t)}toCHTML(t){const e=this.adaptor,s=this.standardChtmlNodes(t),i=e.append(s[0],this.html("mjx-box"));this.renderChild?this.renderChild(this,i):this.childNodes[0].toCHTML([i]);for(const t of Object.keys(this.notations)){const e=this.notations[t];e.renderChild||e.renderer(this,i)}const r=this.getPadding();for(const t of mh){const s=ph[t];r[s]>0&&e.setStyle(i,"padding-"+t,this.em(r[s]))}}arrow(t,e,s,i="",r=0){const n=this.getBBox().w,o={width:this.em(t)};n!==t&&(o.left=this.em((n-t)/2)),e&&(o.transform="rotate("+this.fixed(e)+"rad)");const a=this.html("mjx-arrow",{style:o},[this.html("mjx-aline"),this.html("mjx-rthead"),this.html("mjx-rbhead")]);return s&&(this.adaptor.append(a,this.html("mjx-lthead")),this.adaptor.append(a,this.html("mjx-lbhead")),this.adaptor.setAttribute(a,"double","true")),this.adjustArrow(a,s),this.moveArrow(a,i,r),a}}).kind=rn.prototype.kind,t.styles={"mjx-menclose":{position:"relative"},"mjx-menclose > mjx-dstrike":{display:"inline-block",left:0,top:0,position:"absolute","border-top":uh,"transform-origin":"top left"},"mjx-menclose > mjx-ustrike":{display:"inline-block",left:0,bottom:0,position:"absolute","border-top":uh,"transform-origin":"bottom left"},"mjx-menclose > mjx-hstrike":{"border-top":uh,position:"absolute",left:0,right:0,bottom:"50%",transform:"translateY("+po(hh/2)+")"},"mjx-menclose > mjx-vstrike":{"border-left":uh,position:"absolute",top:0,bottom:0,right:"50%",transform:"translateX("+po(hh/2)+")"},"mjx-menclose > mjx-rbox":{position:"absolute",top:0,bottom:0,right:0,left:0,border:uh,"border-radius":po(hh+dh)},"mjx-menclose > mjx-cbox":{position:"absolute",top:0,bottom:0,right:0,left:0,border:uh,"border-radius":"50%"},"mjx-menclose > mjx-arrow":{position:"absolute",left:0,bottom:"50%",height:0,width:0},"mjx-menclose > mjx-arrow > *":{display:"block",position:"absolute","transform-origin":"bottom","border-left":po(hh*ah)+" solid","border-right":0,"box-sizing":"border-box"},"mjx-menclose > mjx-arrow > mjx-aline":{left:0,top:po(-hh/2),right:po(hh*(ah-1)),height:0,"border-top":po(hh)+" solid","border-left":0},"mjx-menclose > mjx-arrow[double] > mjx-aline":{left:po(hh*(ah-1)),height:0},"mjx-menclose > mjx-arrow > mjx-rthead":{transform:"skewX("+Bh+"rad)",right:0,bottom:"-1px","border-bottom":"1px solid transparent","border-top":po(hh*lh)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-rbhead":{transform:"skewX(-"+Bh+"rad)","transform-origin":"top",right:0,top:"-1px","border-top":"1px solid transparent","border-bottom":po(hh*lh)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-lthead":{transform:"skewX(-"+Bh+"rad)",left:0,bottom:"-1px","border-left":0,"border-right":po(hh*ah)+" solid","border-bottom":"1px solid transparent","border-top":po(hh*lh)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-lbhead":{transform:"skewX("+Bh+"rad)","transform-origin":"top",left:0,top:"-1px","border-left":0,"border-right":po(hh*ah)+" solid","border-top":"1px solid transparent","border-bottom":po(hh*lh)+" solid transparent"},"mjx-menclose > mjx-dbox-top":{position:"absolute",top:0,bottom:"50%",left:0,width:po(1.5*dh),border:po(hh)+" solid","border-style":"solid solid none none","border-radius":"0 100% 0 0","box-sizing":"border-box"},"mjx-menclose > mjx-dbox-bot":{position:"absolute",top:"50%",bottom:0,left:0,width:po(1.5*dh),"border-width":po(hh),"border-style":"none solid solid none","border-radius":"0 0 100% 0","box-sizing":"border-box"}},t.notations=new Map([Ih("top"),Ih("right"),Ih("bottom"),Ih("left"),Sh("actuarial","top","right"),Sh("madruwb","bottom","right"),Rh("up",1),Rh("down",-1),["horizontalstrike",{renderer:Lh("hstrike","Y"),bbox:t=>[0,t.padding,0,t.padding]}],["verticalstrike",{renderer:Lh("vstrike","X"),bbox:t=>[t.padding,0,t.padding,0]}],["box",{renderer:(t,e)=>{t.adaptor.setStyle(e,"border",t.Em(t.thickness)+" solid")},bbox:fh,border:bh,remove:"left right top bottom"}],["roundedbox",{renderer:Lh("rbox"),bbox:fh}],["circle",{renderer:Lh("cbox"),bbox:fh}],["phasorangle",{renderer:(t,e)=>{const{h:s,d:i}=t.getBBox(),[r,n]=t.getArgMod(1.75*t.padding,s+i),o=t.thickness*Math.sin(r)*.9;t.adaptor.setStyle(e,"border-bottom",t.Em(t.thickness)+" solid");const a=t.adjustBorder(t.html("mjx-ustrike",{style:{width:t.Em(n),transform:`translateX(${t.Em(o)}) rotate(${t.fixed(-r)}rad)`}}));t.adaptor.append(t.dom[0],a)},bbox:t=>{const e=t.padding/2,s=t.thickness;return[2*e,e,e+s,3*e+s]},border:t=>[0,0,t.thickness,0],remove:"bottom"}],Dh("up"),Dh("down"),Dh("left"),Dh("right"),Dh("updown"),Dh("leftright"),Oh("updiagonal"),Oh("northeast"),Oh("southeast"),Oh("northwest"),Oh("southwest"),Oh("northeastsouthwest"),Oh("northwestsoutheast"),["longdiv",{renderer:(t,e)=>{const s=t.adaptor;s.setStyle(e,"border-top",t.Em(t.thickness)+" solid");const i=s.append(t.dom[0],t.html("mjx-dbox-top")),r=s.append(t.dom[0],t.html("mjx-dbox-bot")),n=t.thickness,o=t.padding;n!==hh&&(s.setStyle(i,"border-width",t.Em(n)),s.setStyle(r,"border-width",t.Em(n))),o!==dh&&(s.setStyle(i,"width",t.Em(1.5*o)),s.setStyle(r,"width",t.Em(1.5*o)))},bbox:t=>{const e=t.padding,s=t.thickness;return[e+s,e,e,2*e+s/2]}}],["radical",{renderer:(t,e)=>{t.msqrt.toCHTML([e]);const s=t.sqrtTRBL();t.adaptor.setStyle(t.msqrt.dom[0],"margin",s.map((e=>t.Em(-e))).join(" "))},init:t=>{t.msqrt=t.createMsqrt(t.childNodes[0])},bbox:t=>t.sqrtTRBL(),renderChild:!0}]]),t}();function jh(t){return class extends t{stretchChildren(){const t=[];for(const e of this.childNodes)e.canStretch(xl.Vertical)&&t.push(e);const e=t.length,s=this.childNodes.length;if(e&&s>1){let i=0,r=0;const n=e>1&&e===s;for(const t of this.childNodes){const e=t.stretch.dir===xl.None;if(n||e){const e=t.getBBox().rscale;let[s,n]=t.getUnbrokenHD();s*=e,n*=e,s>i&&(i=s),n>r&&(r=n)}}for(const e of t){const t=e.coreRScale();e.coreMO().getStretchedVariant([i/t,r/t])}}}get fixesPWidth(){return!1}get breakCount(){return this._breakCount<0&&(this._breakCount=this.childNodes.length?this.childNodes.reduce(((t,e)=>t+e.breakCount),0):0),this._breakCount}breakTop(t,e){const s=this;return this.isStack?this.parent.breakTop(s,s):s}constructor(t,e,s=null){super(t,e,s),this.dh=0;const i=this;this.isStack=!this.parent||this.parent.node.isInferred||this.parent.breakTop(i,i)!==i,this.stretchChildren();for(const t of this.childNodes)if(t.bbox.pwidth){this.bbox.pwidth=fo.fullWidth;break}}computeBBox(t,e=!1){const s=this.breakCount;this.lineBBox=s?[new Al({h:.75,d:.25,w:0},[0,0])]:[],t.empty();for(const e of this.childNodes.keys()){const i=this.childNodes[e];t.append(i.getOuterBBox()),s&&this.computeChildLineBBox(i,e)}t.clean(),s&&!this.coreMO().node.isEmbellished&&this.computeLinebreakBBox(t),this.fixesPWidth&&this.setChildPWidths(e)&&this.computeBBox(t,!0),this.vboxAdjust(t)}computeLinebreakBBox(t){var e;t.empty();const s=this.isStack,i=this.lineBBox,r=i.length-1;if(s)for(const t of i.keys()){const e=i[t];this.addMiddleBorders(e),0===t&&this.addLeftBorders(e),t===r&&this.addRightBorders(e)}let n=0;for(const s of i.keys()){const r=i[s];t.combine(r,0,n),n-=Math.max(.25,r.d)+r.lineLeading+Math.max(.75,(null===(e=i[s+1])||void 0===e?void 0:e.h)||0)}s?(i[0].L=this.bbox.L,i[r].R=this.bbox.R):(t.w=Math.max(...this.lineBBox.map((t=>t.w))),this.shiftLines(t.w),this.jax.math.display||this.linebreakOptions.inline||(t.pwidth=fo.fullWidth,this.node.isInferred&&(this.parent.bbox.pwidth=fo.fullWidth))),t.clean()}vboxAdjust(t){if(!this.parent)return;const e=this.breakCount,s=this.parent.node.attributes.get("data-vertical-align");if(e&&"bottom"===s)this.dh=e?t.d-this.lineBBox[e-1].d:0;else{if(!("center"===s||e&&"middle"===s))return void(this.dh=0);{const{h:e,d:s}=t,i=this.font.params.axis_height;this.dh=(e+s)/2+i-e}}t.h+=this.dh,t.d-=this.dh}computeChildLineBBox(t,e){const s=this.lineBBox[this.lineBBox.length-1];s.end=[e,0],s.append(t.getLineBBox(0));const i=t.breakCount+1;if(1!==i)for(let s=1;s mjx-linebox":{display:"inline"},"mjx-linestack[breakable] > mjx-linebox::before":{"white-space":"pre",content:'"\\A"'},"mjx-linestack[breakable] > mjx-linebox::after":{"white-space":"normal",content:'" "',"letter-spacing":"-.999em","font-family":"MJX-BRK"},"mjx-linestack[breakable] > mjx-linebox:first-of-type::before":{display:"none"},"mjx-linestack[breakable] > mjx-linebox:last-of-type::after":{display:"none"},"mjx-linebox":{display:"block"},'mjx-linebox[align="left"]':{"text-align":"left"},'mjx-linebox[align="center"]':{"text-align":"center"},'mjx-linebox[align="right"]':{"text-align":"right"},"mjx-linestrut":{display:"inline-block",height:"1em","vertical-align":"-.25em"}},t}(),Hh=function(){var t;const e=Uh(qh);return(t=class extends e{}).kind=Jr.prototype.kind,t}();function Wh(t){return class extends t{createMrow(){const t=this.node.factory.create("inferredMrow");t.inheritAttributesFrom(this.node),this.mrow=this.wrap(t),this.mrow.parent=this}addMrowChildren(){const t=this.node,e=this.mrow;this.addMo(t.open),this.childNodes.length&&e.childNodes.push(this.childNodes[0]);let s=0;for(const i of this.childNodes.slice(1))this.addMo(t.separators[s++]),e.childNodes.push(i);this.addMo(t.close),e.stretchChildren()}addMo(t){if(!t)return;const e=this.wrap(t);this.mrow.childNodes.push(e),e.parent=this.mrow}constructor(t,e,s=null){super(t,e,s),this.mrow=null,this.createMrow(),this.addMrowChildren()}computeBBox(t,e=!1){t.updateFrom(this.mrow.getOuterBBox()),this.setChildPWidths(e)}get breakCount(){return this.mrow.breakCount}computeLineBBox(t){return this.mrow.getLineBBox(t)}}}const zh=function(){var t;const e=Wh(ql);return(t=class extends e{toCHTML(t){const e=this.standardChtmlNodes(t);this.mrow.toCHTML(e)}}).kind=sn.prototype.kind,t}();function Xh(t){return class extends t{getFractionBBox(t,e,s){const i=this.childNodes[0].getOuterBBox(),r=this.childNodes[1].getOuterBBox(),n=this.font.params.axis_height,{T:o,u:a,v:c}=this.getTUV(e,s);t.combine(i,0,n+o+Math.max(i.d*i.rscale,a)),t.combine(r,0,n-o-Math.max(r.h*r.rscale,c)),t.w+=2*this.pad+.2}getTUV(t,e){const s=this.font.params,i=s.axis_height,r=(t?3.5:1.5)*e;return{T:(t?3.5:1.5)*e,u:(t?s.num1:s.num2)-i-r,v:(t?s.denom1:s.denom2)+i-r}}getAtopBBox(t,e){const{u:s,v:i,nbox:r,dbox:n}=this.getUVQ(e);t.combine(r,0,s),t.combine(n,0,-i),t.w+=2*this.pad}getUVQ(t){const e=this.childNodes[0].getOuterBBox(),s=this.childNodes[1].getOuterBBox(),i=this.font.params;let[r,n]=t?[i.num1,i.denom1]:[i.num3,i.denom2];const o=(t?7:3)*i.rule_thickness;let a=r-e.d*e.scale-(s.h*s.scale-n);return a *":{"font-size":"2000%"},"mjx-dbox":{display:"block","font-size":"5%"},"mjx-num":{display:"block","text-align":"center"},"mjx-den":{display:"block","text-align":"center"},"mjx-mfrac[bevelled] > mjx-num":{display:"inline-block"},"mjx-mfrac[bevelled] > mjx-den":{display:"inline-block"},'mjx-den[align="right"], mjx-num[align="right"]':{"text-align":"right"},'mjx-den[align="left"], mjx-num[align="left"]':{"text-align":"left"},"mjx-nstrut":{display:"inline-block",height:".054em",width:0,"vertical-align":"-.054em"},'mjx-nstrut[type="d"]':{height:".217em","vertical-align":"-.217em"},"mjx-dstrut":{display:"inline-block",height:".505em",width:0},'mjx-dstrut[type="d"]':{height:".726em"},"mjx-line":{display:"block","box-sizing":"border-box","min-height":"1px",height:".06em","border-top":".075em solid",margin:".06em -.1em",overflow:"hidden"},'mjx-line[type="d"]':{margin:".18em -.1em"}},t}();function Gh(t){return class extends t{get base(){return 0}get root(){return null}combineRootBBox(t,e,s){}getPQ(t){const e=this.font.params.rule_thickness,s=this.font.params.surd_height,i=this.node.attributes.get("displaystyle")?this.font.params.x_height:e;return[i,t.h+t.d>this.surdH?(t.h+t.d-(this.surdH-e-s-i/2))/2:s+i/4]}getRootDimens(t,e){return[0,0,0,0]}rootWidth(){return 1.25}getStretchedSurd(){const t=this.font.params.rule_thickness,e=this.font.params.surd_height,s=this.node.attributes.get("displaystyle")?this.font.params.x_height:t,{h:i,d:r}=this.childNodes[this.base].getOuterBBox();this.surdH=i+r+t+e+s/4,this.surd.getStretchedVariant([this.surdH-r,r],!0)}constructor(t,e,s=null){super(t,e,s),this.surd=this.createMo("\u221a"),this.surd.canStretch(xl.Vertical),this.getStretchedSurd()}computeBBox(t,e=!1){t.empty();const s=this.surd.getBBox(),i=new fo(this.childNodes[this.base].getOuterBBox()),r=this.getPQ(s)[1],n=this.font.params.rule_thickness,o=this.font.params.surd_height,a=i.h+r+n,[c]=this.getRootDimens(s,a);t.h=a+o,this.combineRootBBox(t,s,a),t.combine(s,c,a-s.h),t.combine(i,c+s.w,0),t.clean(),this.setChildPWidths(e)}invalidateBBox(){super.invalidateBBox(),this.surd.childNodes[0].invalidateBBox()}}}const Jh=function(){var t;const e=Gh(ql);return t=class extends e{toCHTML(t){const e=this.surd,s=this.childNodes[this.base],i=e.getBBox(),r=s.getOuterBBox(),[,n]=this.getPQ(i),o=this.font.params.surd_height,a=r.h+n+o,c=this.adaptor,l=this.standardChtmlNodes(t);let h,d,u,p;null!=this.root&&(u=c.append(l[0],this.html("mjx-root")),p=this.childNodes[this.root]);const m=c.append(l[0],this.html("mjx-sqrt",{},[h=this.html("mjx-surd"),d=this.html("mjx-box",{style:{paddingTop:this.em(n)}})]));.06!==o&&c.setStyle(d,"border-top-width",this.em(o*this.font.params.rule_factor)),this.addRoot(u,p,i,a),e.toCHTML([h]),s.toCHTML([d]),e.size<0&&c.addClass(m,"mjx-tall")}addRoot(t,e,s,i){}},t.kind=$r.prototype.kind,t.styles={"mjx-root":{display:"inline-block","white-space":"nowrap"},"mjx-surd":{display:"inline-block","vertical-align":"top"},"mjx-sqrt":{display:"inline-block","padding-top":".075em"},"mjx-sqrt > mjx-box":{"border-top":".075em solid","padding-left":".03em","margin-left":"-.03em"},"mjx-sqrt.mjx-tall > mjx-box":{"padding-left":".3em","margin-left":"-.3em"}},t}();function Kh(t){return class extends t{get root(){return 1}combineRootBBox(t,e,s){const i=this.childNodes[this.root].getOuterBBox(),r=this.getRootDimens(e,s)[1];t.combine(i,0,r)}getRootDimens(t,e){const s=this.surd,i=this.childNodes[this.root].getOuterBBox(),r=(s.size<0?.5:.6)*t.w,{w:n,rscale:o}=i,a=Math.max(n,r/o),c=Math.max(0,a-n);return[a*o-r,this.rootHeight(i,t,s.size,e),c]}rootHeight(t,e,s,i){const r=e.h+e.d;return(s<0?1.9:.55*r)-(r-i)+Math.max(0,t.d*t.rscale)}rootWidth(){const t=this.childNodes[this.root].getOuterBBox();return.4+t.w*t.rscale}}}const $h=function(){var t;const e=Kh(Jh);return t=class extends e{addRoot(t,e,s,i){e.toCHTML([t]);const r=this.adaptor,[n,o,a]=this.getRootDimens(s,i);r.setStyle(t,"verticalAlign",this.em(o)),r.setStyle(t,"width",this.em(n)),a&&r.setStyle(r.firstChild(t),"paddingLeft",this.em(a))}},t.kind=Yr.prototype.kind,t}();function Yh(t){var e;return(e=class extends t{get scriptChild(){return this.childNodes[this.node.sub]}getOffset(){return[this.baseIsChar?0:this.getAdjustedIc(),-this.getV()]}}).useIC=!1,e}function Qh(t){return class extends t{get scriptChild(){return this.childNodes[this.node.sup]}getOffset(){return[this.getAdjustedIc()-(this.baseRemoveIc?0:this.baseIc),this.getU()]}}}function Zh(t){var e;return e=class extends t{constructor(){super(...arguments),this.UVQ=null}get subChild(){return this.childNodes[this.node.sub]}get supChild(){return this.childNodes[this.node.sup]}get scriptChild(){return this.supChild}getUVQ(t=this.subChild.getOuterBBox(),e=this.supChild.getOuterBBox()){const s=this.baseCore,i=s.getLineBBox(s.breakCount);if(this.UVQ)return this.UVQ;const r=this.font.params,n=3*r.rule_thickness,o=this.length2em(this.node.attributes.get("subscriptshift"),r.sub2),a=this.baseCharZero(i.d*this.baseScale+r.sub_drop*t.rscale),c=e.d*e.rscale,l=t.h*t.rscale;let[h,d]=[this.getU(),Math.max(a,o)],u=h-c-(l-d);if(u0&&(h+=t,d-=t)}return h=Math.max(this.length2em(this.node.attributes.get("superscriptshift"),h),h),d=Math.max(this.length2em(this.node.attributes.get("subscriptshift"),d),d),u=h-c-(l-d),this.UVQ=[h,-d,u],this.UVQ}appendScripts(t){const[e,s]=[this.subChild.getOuterBBox(),this.supChild.getOuterBBox()],i=this.getBaseWidth(),r=this.getAdjustedIc(),[n,o]=this.getUVQ(),a=t.d-this.baseChild.getLineBBox(this.baseChild.breakCount).d;return t.combine(e,i+(this.baseIsChar?0:r),o-a),t.combine(s,i+r,n-a),t.w+=this.font.params.scriptspace,t}},e.useIC=!1,e}function td(t){var e;return e=class extends t{get baseChild(){return this.childNodes[this.node.base]}get scriptChild(){return this.childNodes[1]}getBaseCore(){let t=this.getSemanticBase()||this.childNodes[0],e=null==t?void 0:t.node;for(;t&&(1===t.childNodes.length&&(e.isKind("mrow")||e.isKind("TeXAtom")||e.isKind("mstyle")||e.isKind("mpadded")&&!e.getProperty("vbox")||e.isKind("mphantom")||e.isKind("semantics"))||e.isKind("munderover")&&t.isMathAccent);)this.setBaseAccentsFor(t),t=t.childNodes[0],e=null==t?void 0:t.node;return t||(this.baseHasAccentOver=this.baseHasAccentUnder=!1),t||this.childNodes[0]}setBaseAccentsFor(t){t.node.isKind("munderover")&&(null===this.baseHasAccentOver&&(this.baseHasAccentOver=!!t.node.attributes.get("accent")),null===this.baseHasAccentUnder&&(this.baseHasAccentUnder=!!t.node.attributes.get("accentunder")))}getSemanticBase(){const t=this.node.attributes.getExplicit("data-semantic-fencepointer");return this.getBaseFence(this.baseChild,t)}getBaseFence(t,e){if(!t||!t.node.attributes||!e)return null;if(t.node.attributes.getExplicit("data-semantic-id")===e)return t;for(const s of t.childNodes){const t=this.getBaseFence(s,e);if(t)return t}return null}getBaseScale(){let t=this.baseCore,e=1;for(;t&&t!==this;){e*=t.getOuterBBox().rscale,t=t.parent}return e}getBaseIc(){return this.baseCore.getOuterBBox().ic*this.baseScale}getAdjustedIc(){return this.baseIc?1.05*this.baseIc+.05:0}isCharBase(){const t=this.baseCore;return(t.node.isKind("mo")&&null===t.size||t.node.isKind("mi")||t.node.isKind("mn"))&&1===t.bbox.rscale&&1===Array.from(t.getText()).length}checkLineAccents(){if(this.node.isKind("munderover"))if(this.node.isKind("mover"))this.isLineAbove=this.isLineAccent(this.scriptChild);else if(this.node.isKind("munder"))this.isLineBelow=this.isLineAccent(this.scriptChild);else{const t=this;this.isLineAbove=this.isLineAccent(t.overChild),this.isLineBelow=this.isLineAccent(t.underChild)}}isLineAccent(t){const e=t.coreMO().node;return e.isToken&&"\u2015"===e.getText()}getBaseWidth(){const t=this.baseChild.getLineBBox(this.baseChild.breakCount);return t.w*t.rscale-(this.baseRemoveIc?this.baseIc:0)+this.font.params.extra_ic}getOffset(){return[0,0]}baseCharZero(t){const e=!!this.baseCore.node.attributes.get("largeop"),s=!(!this.baseCore.node.isKind("mo")||!this.baseCore.size),i=this.baseScale;return!this.baseIsChar||e||s||1!==i?t:0}getV(){const t=this.baseCore,e=t.getLineBBox(t.breakCount),s=this.scriptChild.getOuterBBox(),i=this.font.params,r=this.length2em(this.node.attributes.get("subscriptshift"),i.sub1);return Math.max(this.baseCharZero(e.d*this.baseScale+i.sub_drop*s.rscale),r,s.h*s.rscale-.8*i.x_height)}getU(){const t=this.baseCore,e=t.getLineBBox(t.breakCount),s=this.scriptChild.getOuterBBox(),i=this.font.params,r=this.node.attributes.getList("displaystyle","superscriptshift"),n=this.node.getProperty("texprimestyle")?i.sup3:r.displaystyle?i.sup1:i.sup2,o=this.length2em(r.superscriptshift,n);return Math.max(this.baseCharZero(e.h*this.baseScale-i.sup_drop*s.rscale),o,s.d*s.rscale+1/4*i.x_height)}hasMovableLimits(){const t=this.node.attributes.get("displaystyle"),e=this.baseChild.coreMO().node;return!t&&!!e.attributes.get("movablelimits")}getOverKU(t,e){const s=this.node.attributes.get("accent"),i=this.font.params,r=e.d*e.rscale,n=i.rule_thickness*i.separation_factor,o=this.baseHasAccentOver?n:0,a=this.isLineAbove?3*i.rule_thickness:n,c=(s?a:Math.max(i.big_op_spacing1,i.big_op_spacing3-Math.max(0,r)))-o;return[c,t.h*t.rscale+c+r]}getUnderKV(t,e){const s=this.node.attributes.get("accentunder"),i=this.font.params,r=e.h*e.rscale,n=i.rule_thickness*i.separation_factor,o=this.baseHasAccentUnder?n:0,a=this.isLineBelow?3*i.rule_thickness:n,c=(s?a:Math.max(i.big_op_spacing2,i.big_op_spacing4-r))-o;return[c,-(t.d*t.rscale+c+r)]}getDeltaW(t,e=[0,0,0]){const s=this.node.attributes.get("align"),i=t.map((t=>t.w*t.rscale));i[0]-=this.baseRemoveIc&&!this.baseCore.node.attributes.get("largeop")?this.baseIc:0;const r=Math.max(...i),n=[];let o=0;for(const t of i.keys())n[t]=("center"===s?(r-i[t])/2:"right"===s?r-i[t]:0)+e[t],n[t]n[e]+=t[e]?t[e].dx*t[0].rscale:0)),n}getDelta(t,e=!1){const s=this.node.attributes.get("accent");let{sk:i,ic:r}=this.baseCore.getOuterBBox();return s&&(i-=t.getOuterBBox().sk),((s&&!e?i:0)+this.font.skewIcFactor*r)*this.baseScale}stretchChildren(){const t=[];for(const e of this.childNodes)e.canStretch(xl.Horizontal)&&t.push(e);const e=t.length,s=this.childNodes.length;if(e&&s>1){let i=0;const r=e>1&&e===s;for(const t of this.childNodes){const e=t.stretch.dir===xl.None;if(r||e){const{w:s,rscale:r}=t.getOuterBBox(e);s*r>i&&(i=s*r)}}for(const e of t){const t=e.coreMO();null===t.size&&t.getStretchedVariant([i/e.coreRScale()])}}}constructor(t,e,s=null){super(t,e,s),this.baseScale=1,this.baseIc=0,this.baseRemoveIc=!1,this.baseIsChar=!1,this.baseHasAccentOver=null,this.baseHasAccentUnder=null,this.isLineAbove=!1,this.isLineBelow=!1,this.isMathAccent=!1;const i=this.baseCore=this.getBaseCore();i&&(this.setBaseAccentsFor(i),this.baseScale=this.getBaseScale(),this.baseIc=this.getBaseIc(),this.baseIsChar=this.isCharBase(),this.isMathAccent=this.baseIsChar&&this.scriptChild&&void 0!==this.scriptChild.coreMO().node.getProperty("mathaccent"),this.checkLineAccents(),this.baseRemoveIc=!this.isLineAbove&&!this.isLineBelow&&(!this.constructor.useIC||this.isMathAccent))}computeBBox(t,e=!1){t.empty(),t.append(this.baseChild.getOuterBBox()),this.appendScripts(t),t.clean(),this.setChildPWidths(e)}appendScripts(t){const e=this.getBaseWidth(),[s,i]=this.getOffset();return t.combine(this.scriptChild.getOuterBBox(),e+s,i),t.w+=this.font.params.scriptspace,t}get breakCount(){return this._breakCount<0&&(this._breakCount=this.node.isEmbellished?this.coreMO().embellishedBreakCount:this.node.linebreakContainer?0:this.childNodes[0].breakCount),this._breakCount}breakTop(t,e){return this.node.linebreakContainer||!this.parent||this.node.childIndex(e.node)?t:this.parent.breakTop(t,this)}computeLineBBox(t){const e=this.breakCount;if(!e)return Al.from(this.getOuterBBox(),this.linebreakOptions.lineleading);const s=this.baseChild.getLineBBox(t).copy();return t=0||this.adaptor.setStyle(t,"marginBottom",this.em(e.d*e.rscale))}adjustUnderDepth(t,e){if(e.d>=0)return;const s=this.adaptor,i=this.em(e.d),r=this.html("mjx-box",{style:{"margin-bottom":i,"vertical-align":i}});for(const e of s.childNodes(s.firstChild(t)))s.append(r,e);s.append(s.firstChild(t),r)}adjustBaseHeight(t,e){if(this.node.attributes.get("accent")){const s=this.font.params.x_height*this.baseScale;e.h mjx-spacer":{display:"block"}},t}();function nd(t){return class extends t{get scriptChild(){return this.childNodes[this.node.under]}constructor(...t){super(...t),this.stretchChildren()}computeBBox(t,e=!1){if(this.hasMovableLimits())return void super.computeBBox(t,e);t.empty();const s=this.baseChild.getOuterBBox(),i=this.scriptChild.getOuterBBox(),r=this.getUnderKV(s,i)[1],n=this.isLineBelow?0:this.getDelta(this.scriptChild,!0),[o,a]=this.getDeltaW([s,i],[0,-n]);t.combine(s,o,0),t.combine(i,a,r),t.d+=this.font.params.big_op_spacing5,t.clean(),this.setChildPWidths(e)}}}function od(t){return class extends t{get scriptChild(){return this.childNodes[this.node.over]}constructor(...t){super(...t),this.stretchChildren()}computeBBox(t){if(this.hasMovableLimits())return void super.computeBBox(t);t.empty();const e=this.baseChild.getOuterBBox(),s=this.scriptChild.getOuterBBox();this.node.attributes.get("accent")&&(e.h=Math.max(e.h,this.font.params.x_height*this.baseScale));const i=this.getOverKU(e,s)[1],r=this.isLineAbove?0:this.getDelta(this.scriptChild),[n,o]=this.getDeltaW([e,s],[0,r]);t.combine(e,n,0),t.combine(s,o,i),t.h+=this.font.params.big_op_spacing5,t.clean()}}}function ad(t){return class extends t{get underChild(){return this.childNodes[this.node.under]}get overChild(){return this.childNodes[this.node.over]}get subChild(){return this.underChild}get supChild(){return this.overChild}constructor(...t){super(...t),this.stretchChildren()}computeBBox(t){if(this.hasMovableLimits())return void super.computeBBox(t);t.empty();const e=this.overChild.getOuterBBox(),s=this.baseChild.getOuterBBox(),i=this.underChild.getOuterBBox();this.node.attributes.get("accent")&&(s.h=Math.max(s.h,this.font.params.x_height*this.baseScale));const r=this.getOverKU(s,e)[1],n=this.getUnderKV(s,i)[1],o=this.getDelta(this.overChild),a=this.getDelta(this.underChild,!0),[c,l,h]=this.getDeltaW([s,i,e],[0,this.isLineBelow?0:-a,this.isLineAbove?0:o]);t.combine(s,c,0),t.combine(e,h,r),t.combine(i,l,n);const d=this.font.params.big_op_spacing5;t.h+=d,t.d+=d,t.clean()}}}const cd=function(){var t;const e=nd(sd);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;if(this.hasMovableLimits())return super.toCHTML(t),void this.adaptor.setAttribute(this.dom[0],"limits","false");this.dom=this.standardChtmlNodes(t);const e=this.adaptor.append(this.adaptor.append(this.dom[0],this.html("mjx-row")),this.html("mjx-base")),s=this.adaptor.append(this.adaptor.append(this.dom[0],this.html("mjx-row")),this.html("mjx-under"));this.baseChild.toCHTML([e]),this.scriptChild.toCHTML([s]);const i=this.baseChild.getOuterBBox(),r=this.scriptChild.getOuterBBox(),n=this.getUnderKV(i,r)[0],o=this.isLineBelow?0:this.getDelta(this.scriptChild,!0);this.adaptor.setStyle(s,"paddingTop",this.em(n)),this.setDeltaW([e,s],this.getDeltaW([i,r],[0,-o])),this.adjustUnderDepth(s,r)}}).kind=hn.prototype.kind,t.styles={"mjx-over":{"text-align":"left"},'mjx-munder:not([limits="false"])':{display:"inline-table"},"mjx-munder > mjx-row":{"text-align":"left"},"mjx-under":{"padding-bottom":".1em"}},t}(),ld=function(){var t;const e=od(id);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;if(this.hasMovableLimits())return super.toCHTML(t),void this.adaptor.setAttribute(this.dom[0],"limits","false");this.dom=this.standardChtmlNodes(t);const e=this.adaptor.append(this.dom[0],this.html("mjx-over")),s=this.adaptor.append(this.dom[0],this.html("mjx-base"));this.scriptChild.toCHTML([e]),this.baseChild.toCHTML([s]);const i=this.scriptChild.getOuterBBox(),r=this.baseChild.getOuterBBox();this.adjustBaseHeight(s,r);const n=this.getOverKU(r,i)[0],o=this.isLineAbove?0:this.getDelta(this.scriptChild);this.adaptor.setStyle(e,"paddingBottom",this.em(n)),this.setDeltaW([s,e],this.getDeltaW([r,i],[0,o])),this.adjustOverDepth(e,i)}}).kind=dn.prototype.kind,t.styles={'mjx-mover:not([limits="false"])':{"padding-top":".1em"},'mjx-mover:not([limits="false"]) > *':{display:"block","text-align":"left"}},t}(),hd=function(){var t;const e=ad(rd);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;if(this.hasMovableLimits())return super.toCHTML(t),void this.adaptor.setAttribute(this.dom[0],"limits","false");this.dom=this.standardChtmlNodes(t);const e=this.adaptor.append(this.dom[0],this.html("mjx-over")),s=this.adaptor.append(this.adaptor.append(this.dom[0],this.html("mjx-box")),this.html("mjx-munder")),i=this.adaptor.append(this.adaptor.append(s,this.html("mjx-row")),this.html("mjx-base")),r=this.adaptor.append(this.adaptor.append(s,this.html("mjx-row")),this.html("mjx-under"));this.overChild.toCHTML([e]),this.baseChild.toCHTML([i]),this.underChild.toCHTML([r]);const n=this.overChild.getOuterBBox(),o=this.baseChild.getOuterBBox(),a=this.underChild.getOuterBBox();this.adjustBaseHeight(i,o);const c=this.getOverKU(o,n)[0],l=this.getUnderKV(o,a)[0],h=this.getDelta(this.overChild),d=this.getDelta(this.underChild,!0);this.adaptor.setStyle(e,"paddingBottom",this.em(c)),this.adaptor.setStyle(r,"paddingTop",this.em(l)),this.setDeltaW([i,r,e],this.getDeltaW([o,a,n],[0,this.isLineBelow?0:-d,this.isLineAbove?0:h])),this.adjustOverDepth(e,n),this.adjustUnderDepth(r,a)}}).kind=ln.prototype.kind,t.styles={'mjx-munderover:not([limits="false"])':{"padding-top":".1em"},'mjx-munderover:not([limits="false"]) > *':{display:"block"}},t}(),dd={base:"subList",subList:"supList",supList:"subList",psubList:"psupList",psupList:"psubList"},ud=["sup","sup","psup","psub"];function pd(t){return class extends t{combinePrePost(t,e){const s=new fo(t);return s.combine(e,0,0),s}getScriptData(){const t=this.scriptData={base:null,sub:fo.empty(),sup:fo.empty(),psub:fo.empty(),psup:fo.empty(),numPrescripts:0,numScripts:0},e=this.getScriptBBoxLists();this.combineBBoxLists(t.sub,t.sup,e.subList,e.supList),this.combineBBoxLists(t.psub,t.psup,e.psubList,e.psupList),t.base=e.base[0],t.numPrescripts=e.psubList.length,t.numScripts=e.subList.length}getScriptBBoxLists(){const t={base:[],subList:[],supList:[],psubList:[],psupList:[]};let e="base";for(const s of this.childNodes)s.node.isKind("mprescripts")?e="psubList":(t[e].push(s.getOuterBBox()),e=dd[e]);return this.firstPrescript=t.subList.length+t.supList.length+2,this.padLists(t.subList,t.supList),this.padLists(t.psubList,t.psupList),t}padLists(t,e){t.length>e.length&&e.push(fo.empty())}combineBBoxLists(t,e,s,i){for(let r=0;rt.h&&(t.h=o),a>t.d&&(t.d=a),l>e.h&&(e.h=l),h>e.d&&(e.d=h)}}getScaledWHD(t){const{w:e,h:s,d:i,rscale:r}=t;return[e*r,s*r,i*r]}getCombinedUV(){const t=this.scriptData,e=this.combinePrePost(t.sub,t.psub),s=this.combinePrePost(t.sup,t.psup);return this.getUVQ(e,s)}addPrescripts(t,e,s){const i=this.scriptData;if(i.numPrescripts){const r=this.font.params.scriptspace;t.combine(i.psup,r,e),t.combine(i.psub,r,s)}return t}addPostscripts(t,e,s){const i=this.scriptData;if(i.numScripts){const r=t.w;t.combine(i.sup,r,e),t.combine(i.sub,r,s),t.w+=this.font.params.scriptspace}return t}constructor(...t){super(...t),this.scriptData=null,this.firstPrescript=0,this.getScriptData()}appendScripts(t){t.empty();const[e,s]=this.getCombinedUV();return this.addPrescripts(t,e,s),t.append(this.scriptData.base),this.addPostscripts(t,e,s),t.clean(),t}computeLineBBox(t){const e=this.baseChild.breakCount,s=this.baseChild.getLineBBox(t).copy();let i=s;const[r,n]=this.getCombinedUV();return 0===t?(i=Al.from(this.addPrescripts(fo.zero(),r,n),this.linebreakOptions.lineleading),i.append(s),this.addLeftBorders(i),i.L=this.bbox.L):t===e&&(i=this.addPostscripts(i,r,n),this.addRightBorders(i),i.R=this.bbox.R),this.addMiddleBorders(i),i}getUVQ(t,e){if(!this.UVQ){let[s,i,r]=[0,0,0];0===t.w?s=this.getU():0===e.w?s=-this.getV():[s,i,r]=super.getUVQ(t,e),this.UVQ=[s,i,r]}return this.UVQ}}}const md=function(){var t;const e=pd(rd);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;const e=this.standardChtmlNodes(t),s=this.scriptData,i=this.node.getProperty("scriptalign")||"right left",[r,n]=Ur(i+" "+i),[o,a]=this.getCombinedUV();if(s.numPrescripts){const t=this.addScripts(this.dom[0],o,-a,!0,s.psub,s.psup,this.firstPrescript,s.numPrescripts);"right"!==r&&this.adaptor.setAttribute(t,"script-align",r)}if(this.childNodes[0].toCHTML(e),s.numScripts){const t=this.addScripts(this.dom[this.dom.length-1],o,-a,!1,s.sub,s.sup,1,s.numScripts);"left"!==n&&this.adaptor.setAttribute(t,"script-align",n)}}addScripts(t,e,s,i,r,n,o,a){const c=this.adaptor,l=e-n.d+(s-r.h),h=e<0&&0===s?r.h+e:e,d=l>0?{style:{height:this.em(l)}}:{},u=h?{style:{"vertical-align":this.em(h)}}:{},p=this.html("mjx-row"),m=this.html("mjx-row",d),f=this.html("mjx-row"),g="mjx-"+(i?"pre":"")+"scripts",b=o+2*a;for(;o mjx-row > mjx-cell":{"text-align":"right"},'[script-align="left"] > mjx-row > mjx-cell':{"text-align":"left"},'[script-align="center"] > mjx-row > mjx-cell':{"text-align":"center"},'[script-align="right"] > mjx-row > mjx-cell':{"text-align":"right"},"mjx-none":{display:"inline-block",height:"1px"}},t}(),fd=.333;function gd(t){return class extends t{get tableRows(){return this.childNodes}findContainer(){let t=this,e=t.parent;for(;e&&(e.node.notParent||e.node.isKind("mrow"));)t=e,e=e.parent;this.container=e,this.containerI=t.node.childPosition()}getPercentageWidth(){if(this.hasLabels)this.bbox.pwidth=fo.fullWidth;else{const t=this.node.attributes.get("width");jr(t)&&(this.bbox.pwidth=t)}}stretchRows(){const t=this.node.attributes.get("equalrows"),e=t?this.getEqualRowHeight():0,{H:s,D:i}=t?this.getTableData():{H:[0],D:[0]},r=this.tableRows;for(let n=0;n1&&null===e){e=0;const s=i>1&&i===r;for(const i of this.tableRows){const r=i.getChild(t);if(r){const t=r.childNodes[0],i=t.stretch.dir===xl.None;if(s||i){const{w:s}=t.getBBox(i);s>e&&(e=s)}}}}if(null!==e)for(const t of s)t.coreMO().getStretchedVariant([Math.max(e,t.getBBox().w)/t.coreRScale()])}breakColumn(t,e,s){if("linebreak"!==this.jax.math.root.attributes.get("overflow")||!this.jax.math.display)return;const{D:i}=this.getTableData();let r=0,n=0;for(const s of this.tableRows){const o=s.getChild(t);if(o&&o.getBBox().w>e){o.childNodes[0].breakToWidth(e);const t=o.getBBox();i[r]=Math.max(i[r],t.d),t.w>n&&(n=t.w)}r++}("fit"===s||"auto"===s||jr(s)||n>this.cWidths[t])&&(this.cWidths[t]=n)}getTableData(){if(this.data)return this.data;const t=new Array(this.numRows).fill(0),e=new Array(this.numRows).fill(0),s=new Array(this.numCols).fill(0),i=new Array(this.numRows),r=new Array(this.numRows),n=[0],o=this.tableRows;for(let a=0;ar[s]&&(r[s]=c),l>n[s]&&(n[s]=l),u>a&&(a=u),o&&h>o[e]&&(o[e]=h),a}extendHD(t,e,s,i){const r=(i-(e[t]+s[t]))/2;r<1e-5||(e[t]+=r,s[t]+=r)}recordPWidthCell(t,e){t.childNodes[0]&&t.childNodes[0].getBBox().pwidth&&this.pwidthCells.push([t,e])}setColumnPWidths(){const t=this.cWidths;for(const[e,s]of this.pwidthCells)e.setChildPWidths(!1,t[s])&&(e.invalidateBBox(),e.getBBox())}getBBoxHD(t){const[e,s]=this.getAlignmentRow();if(null===s){const s=this.font.params.axis_height,i=t/2;return{top:[0,t],center:[i,i],bottom:[t,0],baseline:[i,i],axis:[i+s,i-s]}[e]||[i,i]}{const i=this.getVerticalPosition(s,e);return[i,t-i]}}getBBoxLR(){var t;if(this.hasLabels){const t=this.node.attributes,e=t.get("side");let[s,i]=this.getPadAlignShift(e);const r=this.hasLabels&&!!t.get("data-width-includes-label");return r&&this.frame&&this.fSpace[0]&&(s-=this.fSpace[0]),"center"!==i||r?"left"===e?[s,0]:[0,s]:[s,s]}return[(null===(t=this.bbox)||void 0===t?void 0:t.L)||0,0]}getPadAlignShift(t){const{L:e}=this.getTableData();let s=e+this.length2em(this.node.attributes.get("minlabelspacing"));const[i,r]=null==this.styles?["",""]:[this.styles.get("padding-left"),this.styles.get("padding-right")];(i||r)&&(s=Math.max(s,this.length2em(i||"0"),this.length2em(r||"0")));let[n,o]=this.getAlignShift();return n===t&&(o="left"===t?Math.max(s,o)-s:Math.min(-s,o)+s),[s,n,o]}getWidth(){return this.pWidth||this.getBBox().w}adjustWideTable(){const t=this.node.attributes;if("auto"!==t.get("width"))return;const[e,s]=this.getPadAlignShift(t.get("side")),i=Math.max(this.containerWidth/10,this.containerWidth-e-("center"===s?e:0));this.naturalWidth()>i&&this.adjustColumnWidths(i)}naturalWidth(){return Po(this.getComputedWidths().concat(this.cLines,this.cSpace))+2*this.fLine+this.fSpace[0]+this.fSpace[2]}getEqualRowHeight(){const{H:t,D:e}=this.getTableData(),s=Array.from(t.keys()).map((s=>t[s]+e[s]));return Math.max(...s)}getComputedWidths(){const t=this.getTableData().W;let e=Array.from(t.keys()).map((e=>"number"==typeof this.cWidths[e]?this.cWidths[e]:t[e]));return this.node.attributes.get("equalcolumns")&&(e=Array(e.length).fill(Bo(e))),e}getColumnWidths(){const t=this.node.attributes.get("width");if(this.node.attributes.get("equalcolumns"))return this.getEqualColumns(t);const e=this.getColumnAttributes("columnwidth",0);return"auto"===t?this.getColumnWidthsAuto(e):jr(t)?this.getColumnWidthsPercent(e):this.getColumnWidthsFixed(e,this.length2em(t))}getEqualColumns(t){const e=Math.max(1,this.numCols);let s;if("auto"===t){const{W:t}=this.getTableData();s=Bo(t)}else if(jr(t))s=this.percent(1/e);else{const i=Po([].concat(this.cLines,this.cSpace))+this.fSpace[0]+this.fSpace[2];s=Math.max(0,this.length2em(t)-i)/e}return Array(this.numCols).fill(s)}getColumnWidthsAuto(t){return t.map((t=>"auto"===t||"fit"===t?null:jr(t)?t:this.length2em(t)))}getColumnWidthsPercent(t){const e=t.includes("fit"),{W:s}=e?this.getTableData():{W:null};return Array.from(t.keys()).map((i=>{const r=t[i];return"fit"===r?null:"auto"===r?e?s[i]:null:jr(r)?r:this.length2em(r)}))}getColumnWidthsFixed(t,e){const s=Array.from(t.keys()),i=s.filter((e=>"fit"===t[e])),r=s.filter((e=>"auto"===t[e])),n=i.length||r.length,{W:o}=n?this.getTableData():{W:null},a=e-Po([].concat(this.cLines,this.cSpace))-this.fSpace[0]-this.fSpace[2];let c=a;s.forEach((e=>{const s=t[e];c-="fit"===s||"auto"===s?o[e]:this.length2em(s,a)}));const l=n&&c>0?c/n:0;return s.map((e=>{const s=t[e];return"fit"===s?o[e]+l:"auto"===s?o[e]+(0===i.length?l:0):this.length2em(s,a)}))}adjustColumnWidths(t){const{W:e}=this.getTableData(),s=this.getColumnAttributes("columnwidth",0),i=Array.from(s.keys()),r=[...i.filter((t=>"fit"===s[t])).sort(((t,s)=>e[s]-e[t])),...i.filter((t=>"auto"===s[t])).sort(((t,s)=>e[s]-e[t])),...i.filter((t=>jr(s[t]))).sort(((t,s)=>e[s]-e[t])),...i.filter((t=>"fit"!==s[t]&&"auto"!==s[t]&&!jr(s[t]))).sort(((t,s)=>e[s]-e[t]))];if(!r.length)return;this.cWidths=i.map((t=>"number"==typeof this.cWidths[t]?this.cWidths[t]:e[t]));const n=t-Po([].concat(this.cLines,this.cSpace))-this.fSpace[0]-this.fSpace[2];let o=Po(this.cWidths)-n,a=0,c=0;for(;cthis.cWidths[t]*=o))}getVerticalPosition(t,e){const s=this.node.attributes.get("equalrows"),{H:i,D:r}=this.getTableData(),n=s?this.getEqualRowHeight():0,o=this.getRowHalfSpacing();let a=this.fLine;for(let e=0;et/2));return t.unshift(this.fSpace[1]),t.push(this.fSpace[1]),t}getColumnHalfSpacing(){const t=this.cSpace.map((t=>t/2));return t.unshift(this.fSpace[0]),t.push(this.fSpace[2]),t}getAlignmentRow(){const[t,e]=Ur(this.node.attributes.get("align"));if(null==e)return[t,null];let s=parseInt(e);return s<0&&(s+=this.numRows+1),[t,s<1||s>this.numRows?null:s-1]}getColumnAttributes(t,e=1){const s=this.numCols-e,i=this.getAttributeArray(t);if(0===i.length)return null;for(;i.lengths&&i.splice(s),i}getRowAttributes(t,e=1){const s=this.numRows-e,i=this.getAttributeArray(t);if(0===i.length)return null;for(;i.lengths&&i.splice(s),i}getAttributeArray(t){const e=this.node.attributes.get(t);return e?Ur(e):[this.node.attributes.getDefault(t)]}addEm(t,e=1){return t?t.map((t=>this.em(t/e))):null}convertLengths(t){return t?t.map((t=>this.length2em(t))):null}constructor(t,e,s=null){super(t,e,s),this.numCols=0,this.numRows=0,this.data=null,this.pwidthCells=[],this.pWidth=0,this.numCols=Bo(this.tableRows.map((t=>t.numCells))),this.numRows=this.childNodes.length,this.hasLabels=this.childNodes.reduce(((t,e)=>t||e.node.isKind("mlabeledtr")),!1),this.findContainer(),this.isTop=!this.container||this.container.node.isKind("math")&&!this.container.parent,this.isTop&&(this.jax.table=this),this.getPercentageWidth();const i=this.node.attributes,r=i.get("frame");this.frame="none"!==r,this.fframe=this.frame||void 0!==i.get("data-frame-styles"),this.fLine=this.frame?.07:0,this.fSpace=this.getFrameSpacing(),this.cSpace=this.convertLengths(this.getColumnAttributes("columnspacing")),this.rSpace=this.convertLengths(this.getRowAttributes("rowspacing")),this.cLines=this.getColumnAttributes("columnlines").map((t=>"none"===t?0:.07)),this.rLines=this.getRowAttributes("rowlines").map((t=>"none"===t?0:.07)),this.cWidths=this.getColumnWidths(),this.adjustWideTable(),this.stretchColumns(),this.stretchRows()}getStyles(){super.getStyles();const t=this.node.attributes.get("data-frame-styles");if(!t)return;this.styles||(this.styles=new Do(""));const e=t.split(/ /);for(const t of _o.keys()){const s=e[t];"none"!==s&&this.styles.set(`border-${_o[t]}`,`.07em ${s}`)}}computeBBox(t,e=!1){const{H:s,D:i}=this.getTableData();let r,n;if(this.node.attributes.get("equalrows")){const t=this.getEqualRowHeight();r=Po([].concat(this.rLines,this.rSpace))+t*this.numRows}else r=Po(s.concat(i,this.rLines,this.rSpace));r+=2*(this.fLine+this.fSpace[1]),n=this.naturalWidth();const o=this.node.attributes.get("width");"auto"!==o&&(n=Math.max(this.length2em(o,0)+2*this.fLine,n));const[a,c]=this.getBBoxHD(r);t.h=a,t.d=c,t.w=n;const[l,h]=this.getBBoxLR();t.L=l,t.R=h,jr(o)||this.setColumnPWidths()}setChildPWidths(t,e,s){const i=this.node.attributes.get("width");if(!jr(i))return!1;this.hasLabels||(this.bbox.pwidth="",this.container.bbox.pwidth="");const{w:r,L:n,R:o}=this.bbox,a=this.node.attributes.get("data-width-includes-label"),c=Math.max(r,this.length2em(i,Math.max(e,n+r+o)))-(a?n+o:0),l=this.node.attributes.get("equalcolumns")?Array(this.numCols).fill(this.percent(1/Math.max(1,this.numCols))):this.getColumnAttributes("columnwidth",0);return this.cWidths=this.getColumnWidthsFixed(l,c),this.pWidth=this.naturalWidth(),this.isTop&&(this.bbox.w=this.pWidth),this.setColumnPWidths(),this.pWidth!==r&&this.parent.invalidateBBox(),this.pWidth!==r}getAlignShift(){return this.isTop?super.getAlignShift():[this.container.getChildAlign(this.containerI),0]}}}const bd=function(){var t;const e=gd(ql);return t=class extends e{constructor(t,e,s=null){super(t,e,s),this.itable=this.html("mjx-itable"),this.labels=this.html("mjx-itable")}getAlignShift(){const t=super.getAlignShift();return this.isTop||(t[1]=0),t}toCHTML(t){const e=this.standardChtmlNodes(t);this.adaptor.append(e[0],this.html("mjx-table",{},[this.itable]));for(const t of this.childNodes)t.toCHTML([this.itable]);this.padRows(),this.handleColumnSpacing(),this.handleColumnLines(),this.handleColumnWidths(),this.handleRowSpacing(),this.handleRowLines(),this.handleRowHeights(),this.handleFrame(),this.handleWidth(),this.handleLabels(),this.handleAlign(),this.handleJustify(),this.shiftColor()}shiftColor(){const t=this.adaptor,e=t.getStyle(this.dom[0],"backgroundColor");e&&(t.setStyle(this.dom[0],"backgroundColor",""),t.setStyle(this.itable,"backgroundColor",e))}padRows(){const t=this.adaptor;for(const e of t.childNodes(this.itable))for(;t.childNodes(e).length1&&"0.4em"!==r||"0"!==r&&1===s)&&this.adaptor.setStyle(o,"paddingLeft",r),(s1&&"0.215em"!==r||s&&1===i)&&this.adaptor.setStyle(e.dom[0],"paddingTop",r),(i mjx-itable":{"vertical-align":"middle","text-align":"left","box-sizing":"border-box"},"mjx-labels > mjx-itable":{position:"absolute",top:0},'mjx-mtable[justify="left"]':{"text-align":"left"},'mjx-mtable[justify="right"]':{"text-align":"right"},'mjx-mtable[justify="left"][side="left"]':{"padding-right":"0 ! important"},'mjx-mtable[justify="left"][side="right"]':{"padding-left":"0 ! important"},'mjx-mtable[justify="right"][side="left"]':{"padding-right":"0 ! important"},'mjx-mtable[justify="right"][side="right"]':{"padding-left":"0 ! important"},"mjx-mtable[align]":{"vertical-align":"baseline"},'mjx-mtable[align="top"] > mjx-table':{"vertical-align":"top"},'mjx-mtable[align="bottom"] > mjx-table':{"vertical-align":"bottom"},'mjx-mtable[side="right"] mjx-labels':{"min-width":"100%"}},t}();function Ed(t){return class extends t{get numCells(){return this.childNodes.length}get labeled(){return!1}get tableCells(){return this.childNodes}getChild(t){return this.childNodes[t]}getChildBBoxes(){return this.childNodes.map((t=>t.getBBox()))}stretchChildren(t=null){const e=[],s=this.labeled?this.childNodes.slice(1):this.childNodes;for(const t of s){const s=t.childNodes[0];s.canStretch(xl.Vertical)&&e.push(s)}const i=e.length,r=this.childNodes.length;if(i&&r>1&&!t){let e=0,n=0;const o=i>1&&i===r;for(const t of s){const s=t.childNodes[0],i=s.stretch.dir===xl.None;if(o||i){const{h:t,d:r}=s.getBBox(i);t>e&&(e=t),r>n&&(n=r)}}t=[e,n]}if(t)for(const s of e){const e=s.coreRScale();s.coreMO().getStretchedVariant(t.map((t=>t*e)))}}get fixesPWidth(){return!1}}}function Nd(t){return class extends t{get numCells(){return Math.max(0,this.childNodes.length-1)}get labeled(){return!0}get tableCells(){return this.childNodes.slice(1)}getChild(t){return this.childNodes[t+1]}getChildBBoxes(){return this.childNodes.slice(1).map((t=>t.getBBox()))}}}const yd=function(){var t;const e=Ed(ql);return(t=class extends e{toCHTML(t){super.toCHTML(t);const e=this.node.attributes.get("rowalign");"baseline"!==e&&this.adaptor.setAttribute(this.dom[0],"rowalign",e)}}).kind=gn.prototype.kind,t.styles={"mjx-mtr":{display:"table-row"},'mjx-mtr[rowalign="top"] > mjx-mtd':{"vertical-align":"top"},'mjx-mtr[rowalign="center"] > mjx-mtd':{"vertical-align":"middle"},'mjx-mtr[rowalign="bottom"] > mjx-mtd':{"vertical-align":"bottom"},'mjx-mtr[rowalign="baseline"] > mjx-mtd':{"vertical-align":"baseline"},'mjx-mtr[rowalign="axis"] > mjx-mtd':{"vertical-align":".25em"}},t}(),xd=function(){var t;const e=Nd(yd);return(t=class extends e{toCHTML(t){super.toCHTML(t);const e=this.adaptor.firstChild(this.dom[0]);if(e){this.adaptor.remove(e);const t=this.node.attributes.get("rowalign"),s="baseline"!==t&&"axis"!==t?{rowalign:t}:{},i=this.html("mjx-mtr",s,[e]);this.adaptor.append(this.parent.labels,i)}}markUsed(){super.markUsed(),this.jax.wrapperUsage.add(yd.kind)}}).kind=bn.prototype.kind,t.styles={"mjx-mlabeledtr":{display:"table-row"},'mjx-mlabeledtr[rowalign="top"] > mjx-mtd':{"vertical-align":"top"},'mjx-mlabeledtr[rowalign="center"] > mjx-mtd':{"vertical-align":"middle"},'mjx-mlabeledtr[rowalign="bottom"] > mjx-mtd':{"vertical-align":"bottom"},'mjx-mlabeledtr[rowalign="baseline"] > mjx-mtd':{"vertical-align":"baseline"},'mjx-mlabeledtr[rowalign="axis"] > mjx-mtd':{"vertical-align":".25em"}},t}();function vd(t){return class extends t{get fixesPWidth(){return!1}invalidateBBox(){this.bboxComputed=!1,this.lineBBox=[]}getWrapWidth(t){const e=this.parent.parent,s=this.parent,i=this.node.childPosition()-(s.labeled?1:0);return"number"==typeof e.cWidths[i]?e.cWidths[i]:e.getTableData().W[i]}getChildAlign(t){return this.node.attributes.get("columnalign")}}}const Cd=function(){var t;const e=vd(ql);return(t=class extends e{toCHTML(t){super.toCHTML(t);const e=this.node.attributes.get("rowalign"),s=this.node.attributes.get("columnalign");e!==this.parent.node.attributes.get("rowalign")&&this.adaptor.setAttribute(this.dom[0],"rowalign",e),"center"===s||"mlabeledtr"===this.parent.kind&&this===this.parent.childNodes[0]&&s===this.parent.parent.node.attributes.get("side")||this.adaptor.setStyle(this.dom[0],"textAlign",s),this.parent.parent.node.getProperty("useHeight")&&this.adaptor.append(this.dom[0],this.html("mjx-tstrut"))}}).kind=En.prototype.kind,t.styles={"mjx-mtd":{display:"table-cell","text-align":"center",padding:".215em .4em"},"mjx-mtd:first-child":{"padding-left":0},"mjx-mtd:last-child":{"padding-right":0},"mjx-mtable > * > mjx-itable > *:first-child > mjx-mtd":{"padding-top":0},"mjx-mtable > * > mjx-itable > *:last-child > mjx-mtd":{"padding-bottom":0},"mjx-tstrut":{display:"inline-block",height:"1em","vertical-align":"-.25em"},'mjx-labels[align="left"] > mjx-mtr > mjx-mtd':{"text-align":"left"},'mjx-labels[align="right"] > mjx-mtr > mjx-mtd':{"text-align":"right"},"mjx-mtd[extra]":{padding:0},'mjx-mtd[rowalign="top"]':{"vertical-align":"top"},'mjx-mtd[rowalign="center"]':{"vertical-align":"middle"},'mjx-mtd[rowalign="bottom"]':{"vertical-align":"bottom"},'mjx-mtd[rowalign="baseline"]':{"vertical-align":"baseline"},'mjx-mtd[rowalign="axis"]':{"vertical-align":".25em"}},t}(),Td={dx:".2em",dy:".1em",postDelay:600,clearDelay:100,hoverTimer:new Map,clearTimer:new Map,stopTimers:(t,e)=>{e.clearTimer.has(t)&&(clearTimeout(e.clearTimer.get(t)),e.clearTimer.delete(t)),e.hoverTimer.has(t)&&(clearTimeout(e.hoverTimer.get(t)),e.hoverTimer.delete(t))}};function _d(t){return class extends t{get selected(){const t=this.node.attributes.get("selection"),e=Math.max(1,Math.min(this.childNodes.length,t))-1;return this.childNodes[e]||this.wrap(this.node.selected)}getParameters(){const t=this.node.attributes.get("data-offsets"),[e,s]=Ur(t||"");this.tipDx=this.length2em(e||Td.dx),this.tipDy=this.length2em(s||Td.dy)}constructor(t,e,s=null){super(t,e,s);const i=this.constructor.actions,r=this.node.attributes.get("actiontype"),[n,o]=i.get(r)||[(t,e)=>{},{}];this.action=n,this.data=o,this.getParameters()}computeBBox(t,e=!1){t.updateFrom(this.selected.getOuterBBox()),this.selected.setChildPWidths(e)}get breakCount(){return this.node.isEmbellished?this.selected.coreMO().embellishedBreakCount:this.selected.breakCount}computeLineBBox(t){return this.getChildLineBBox(this.selected,t)}}}const wd=function(){var t;const e=_d(ql);return(t=class extends e{setEventHandler(t,e,s=null){(s?[s]:this.dom).forEach((s=>s.addEventListener(t,e)))}Em(t){return this.em(t)}toCHTML(t){if(this.toEmbellishedCHTML(t))return;const e=this.standardChtmlNodes(t);this.selected.toCHTML(e),this.action(this,this.data)}}).kind=nn.prototype.kind,t.styles={"mjx-maction":{position:"relative"},"mjx-maction > mjx-tool":{display:"none",position:"absolute",bottom:0,right:0,width:0,height:0,"z-index":500},"mjx-tool > mjx-tip":{display:"inline-block","line-height":0,padding:".2em",border:"1px solid #888","background-color":"#F8F8F8",color:"black","box-shadow":"2px 2px 5px #AAAAAA"},"mjx-maction[toggle]":{cursor:"pointer"},"mjx-status":{display:"block",position:"fixed",left:"1em",bottom:"1em","min-width":"25%",padding:".2em .4em",border:"1px solid #888","font-size":"90%","background-color":"#F8F8F8",color:"black"}},t.actions=new Map([["toggle",[(t,e)=>{t.dom.forEach((e=>{t.adaptor.setAttribute(e,"toggle",t.node.attributes.get("selection"))}));const s=t.factory.jax.math,i=t.factory.jax.document,r=t.node;t.setEventHandler("click",(t=>{s.end.node||(s.start.node=s.end.node=s.typesetRoot,s.start.n=s.end.n=0),r.nextToggleSelection(),s.rerender(i,r.attributes.get("data-maction-id")?nr.ENRICHED:nr.RERENDER),t.stopPropagation()}))},{}]],["tooltip",[(t,e)=>{const s=t.childNodes[1];if(s)if(s.node.isKind("mtext")){const e=s.node.getText();t.dom.forEach((s=>t.adaptor.setAttribute(s,"title",e)))}else{const i=t.adaptor;for(const r of t.dom){const n=i.append(r,t.html("mjx-tool",{style:{bottom:t.Em(-t.tipDy),right:t.Em(-t.tipDx)}},[t.html("mjx-tip")]));s.toCHTML([i.firstChild(n)]),t.setEventHandler("mouseover",(t=>{e.stopTimers(r,e);const s=setTimeout((()=>i.setStyle(n,"display","block")),e.postDelay);e.hoverTimer.set(r,s),t.stopPropagation()}),r),t.setEventHandler("mouseout",(t=>{e.stopTimers(r,e);const s=setTimeout((()=>i.setStyle(n,"display","")),e.clearDelay);e.clearTimer.set(r,s),t.stopPropagation()}),r)}}},Td]],["statusline",[(t,e)=>{const s=t.childNodes[1];if(s&&s.node.isKind("mtext")){const i=t.adaptor,r=s.node.getText();t.dom.forEach((t=>i.setAttribute(t,"statusline",r))),t.setEventHandler("mouseover",(s=>{if(null===e.status){const s=i.body(i.document);e.status=i.append(s,t.html("mjx-status",{},[t.text(r)]))}s.stopPropagation()})),t.setEventHandler("mouseout",(t=>{e.status&&(i.remove(e.status),e.status=null),t.stopPropagation()}))}},{status:null}]]]),t}();function kd(t){return class extends t{constructor(t,e,s=null){super(t,e,s),this.getParameters()}getParameters(){const{width:t,height:e,valign:s,src:i,index:r}=this.node.attributes.getList("width","height","valign","src","index");if(i)this.width="auto"===t?1:this.length2em(t),this.height="auto"===e?1:this.length2em(e),this.valign=this.length2em(s||"0");else{const t=String.fromCodePoint(parseInt(r)),e=this.node.factory;this.charWrapper=this.wrap(e.create("text").setText(t)),this.charWrapper.parent=this}}computeBBox(t,e=!1){this.charWrapper?t.updateFrom(this.charWrapper.getBBox()):(t.w=this.width,t.h=this.height+this.valign,t.d=-this.valign)}}}const Ad=function(){var t;const e=kd(ql);return(t=class extends e{toCHTML(t){const e=this.standardChtmlNodes(t);if(this.charWrapper)return void this.charWrapper.toCHTML(e);const{src:s,alt:i}=this.node.attributes.getList("src","alt"),r={width:this.em(this.width),height:this.em(this.height)};this.valign&&(r.verticalAlign=this.em(this.valign));const n=this.html("img",{src:s,style:r,alt:i,title:i});this.adaptor.append(e[0],n)}}).kind=xn.prototype.kind,t.styles={"mjx-mglyph > img":{display:"inline-block",border:0,padding:0}},t}();function Md(t){return class extends t{computeBBox(t,e=!1){if(this.childNodes.length){const{w:e,h:s,d:i}=this.childNodes[0].getBBox();t.w=e,t.h=s,t.d=i}}get breakCount(){return this.node.isEmbellished?this.coreMO().embellishedBreakCount:this.childNodes[0].breakCount}}}function Ld(t){class e extends t{constructor(t,e,s=null){super(t,e,s),this.rscale=this.getRScale()}computeBBox(t,e=!1){const s=this.node.getXML(),i=this.getHDW(s,"use","force"),{h:r,d:n,w:o}=i?this.splitHDW(i):this.measureXmlNode(s);t.w=o,t.h=r,t.d=n}getHTML(){let t=this.adaptor.clone(this.node.getXML());const e=this.getFontStyles();return(this.getHDW(t,"force")||1!==this.jax.options.scale)&&(t=this.addHDW(t,e)),this.html("mjx-html",{variant:this.parent.variant,style:e},[t])}getHDW(t,e,s=e){const i=this.jax.options.htmlHDW,r=this.adaptor.getAttribute(t,"data-mjx-hdw");return!r||i!==e&&i!==s?null:r}splitHDW(t){const e=1/this.metrics.scale,[s,i,r]=Ur(t).map((t=>this.length2em(t||"0")*e));return{h:s,d:i,w:r}}getFontStyles(){var t;const e=this.adaptor,s=this.metrics;return{"font-family":(null===(t=this.parent.styles)||void 0===t?void 0:t.get("font-family"))||s.family||e.fontFamily(e.parent(this.jax.math.start.node))||"initial","font-size":this.jax.fixed(s.em*this.rscale)+"px"}}measureXmlNode(t){const e=this.adaptor,s=this.html("mjx-xml-block",{style:{display:"inline-block"}},[e.clone(t)]),i=this.html("mjx-baseline",{style:{display:"inline-block",width:0,height:0}}),r=this.getFontStyles(),n=this.html("mjx-measure-xml",{style:r},[i,s]),o=this.jax.container;e.append(e.parent(this.jax.math.start.node),o),e.append(o,n);const a=this.metrics,c=a.em*a.scale*this.rscale,{left:l,right:h,bottom:d,top:u}=e.nodeBBox(s),p=(h-l)/c,m=(e.nodeBBox(i).top-u)/c,f=(d-u)/c-m;return e.remove(o),e.remove(n),{w:p,h:m,d:f}}getStyles(){}getScale(){}getVariant(){}}return e.autoStyle=!1,e.styles={"mjx-measure-xml":{position:"absolute",left:0,top:0,display:"inline-block","line-height":"normal","white-space":"normal"},"mjx-html":{display:"inline-block","line-height":"normal","text-align":"initial","white-space":"initial"},"mjx-html-holder":{display:"block",position:"absolute",top:0,left:0,bottom:0,right:0}},e}const Id=function(){var t;const e=Md(ql);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;const e=this.standardChtmlNodes(t);this.childNodes.length&&this.childNodes[0].toCHTML(e)}}).kind=vn.prototype.kind,t}(),Sd=((Rd=class extends ql{toCHTML(t){super.toCHTML(t)}computeBBox(){return this.bbox}}).kind=Tn.prototype.kind,Rd);var Rd;const Od=function(){var t;return(t=class extends ql{}).kind=Cn.prototype.kind,t.styles={"mjx-annotation-xml":{"font-family":"initial","line-height":"normal"}},t}(),Dd=function(){var t;const e=Ld(ql);return(t=class extends e{toCHTML(t){this.markUsed(),this.dom=[this.adaptor.append(t[0],this.getHTML())]}addHDW(t,e){const s=this.jax.options.scale,{h:i,d:r,w:n}=this.bbox,o=s*this.metrics.scale;return e.width=this.em(n*o),e.height=this.em((i+r)*o),e["vertical-align"]=this.em(-r*o),e.position="relative",this.html("mjx-html-holder",{style:{transform:`scale(${this.jax.fixed(s)})`,"transform-origin":"top left"}},[t])}}).kind=_r.prototype.kind,t}();function Pd(t){return class extends t{computeBBox(t,e=!1){super.computeBBox(t,e),this.childNodes[0]&&this.childNodes[0].bbox.ic&&(t.ic=this.childNodes[0].bbox.ic)}}}const Bd=function(){var t;const e=Pd(ql);return(t=class extends e{toCHTML(t){super.toCHTML(t),this.dom.forEach((t=>this.adaptor.setAttribute(t,"texclass",mr[this.node.texClass])))}}).kind=_n.prototype.kind,t}();function Fd(t){return class extends t{remappedText(t,e){const s=this.parent.stretch.c;return s?[s]:this.parent.remapChars(this.unicodeChars(t,e))}computeBBox(t,e=!1){const s=this.parent.variant,i=this.node.getText();if("-explicitFont"===s){const e=this.jax.getFontData(this.parent.styles),{w:r,h:n,d:o}=this.jax.measureText(i,s,e);t.h=n,t.d=o,t.w=r}else{const e=this.remappedText(i,s);let r="";t.empty();for(let i=0;i1&&(t.sk=0),t.clean()}}addUtextBBox(t,e,s){if(e){const{h:i,d:r,w:n}=this.jax.measureText(e,s);this.updateBBox(t,i,r,n)}return""}updateBBox(t,e,s,i){t.w+=i,e>t.h&&(t.h=e),s>t.d&&(t.d=s)}getStyles(){}getVariant(){}getScale(){}getSpace(){}}}const jd=function(){var t;const e=Fd(ql);return t=class extends e{toCHTML(t){this.markUsed();const e=t[0],s=this.adaptor,i=this.parent.variant,r=this.node.getText();if(0===r.length)return;const n=this.getBBox();if("-explicitFont"===i)s.append(e,this.jax.unknownText(r,i,n.w));else{let t="";const o=this.remappedText(r,i),a=o.length>1?this.em(this.parent.getBBox().h):"",c=o.length;for(let r=0;r mjx-math.NCM-N[breakable] > *':{"font-family":"MJX-NCM-ZERO, MJX-NCM-N"},".NCM-N":{"font-family":"MJX-NCM-ZERO, MJX-NCM-N"},".NCM-B":{"font-family":"MJX-NCM-ZERO, MJX-NCM-B"},".NCM-I":{"font-family":"MJX-NCM-ZERO, MJX-NCM-I"},".NCM-BI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-BI"},".NCM-DS":{"font-family":"MJX-NCM-ZERO, MJX-NCM-DS"},".NCM-F":{"font-family":"MJX-NCM-ZERO, MJX-NCM-F"},".NCM-FB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-FB"},".NCM-SS":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SS"},".NCM-SSB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SSB"},".NCM-SSI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SSI"},".NCM-SSBI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SSBI"},".NCM-M":{"font-family":"MJX-NCM-ZERO, MJX-NCM-M"},".NCM-SO":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SO"},".NCM-LO":{"font-family":"MJX-NCM-ZERO, MJX-NCM-LO"},".NCM-S3":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S3"},".NCM-S4":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S4"},".NCM-S5":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S5"},".NCM-S6":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S6"},".NCM-S7":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S7"},".NCM-MI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-MI"},".NCM-C":{"font-family":"MJX-NCM-ZERO, MJX-NCM-C"},".NCM-CB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-CB"},".NCM-OS":{"font-family":"MJX-NCM-ZERO, MJX-NCM-OS"},".NCM-OB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-OB"},".NCM-V":{"font-family":"MJX-NCM-ZERO, MJX-NCM-V"},".NCM-LT":{"font-family":"MJX-NCM-ZERO, MJX-NCM-LT"},".NCM-RB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-RB"},".NCM-EM":{"font-family":"MJX-NCM-ZERO, MJX-NCM-EM"},".NCM-Be":{"font-family":"MJX-NCM-ZERO, MJX-NCM-Be"},".NCM-U":{"font-family":"MJX-NCM-ZERO, MJX-NCM-U"},".NCM-Ue":{"font-family":"MJX-NCM-ZERO, MJX-NCM-Ue"},".NCM-S":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S"},".NCM-SB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SB"}}),Xd.defaultFonts=Object.assign(Object.assign({},Jl.defaultFonts),{"@font-face /* MJX-NCM-ZERO */":{"font-family":"MJX-NCM-ZERO",src:'url("%%URL%%/mjx-ncm-zero.woff2") format("woff2")'},"@font-face /* MJX-BRK */":{"font-family":"MJX-BRK",src:'url("%%URL%%/mjx-ncm-brk.woff2") format("woff2")'},"@font-face /* MJX-NCM-N */":{"font-family":"MJX-NCM-N",src:'url("%%URL%%/mjx-ncm-n.woff2") format("woff2")'},"@font-face /* MJX-NCM-B */":{"font-family":"MJX-NCM-B",src:'url("%%URL%%/mjx-ncm-b.woff2") format("woff2")'},"@font-face /* MJX-NCM-I */":{"font-family":"MJX-NCM-I",src:'url("%%URL%%/mjx-ncm-i.woff2") format("woff2")'},"@font-face /* MJX-NCM-BI */":{"font-family":"MJX-NCM-BI",src:'url("%%URL%%/mjx-ncm-bi.woff2") format("woff2")'},"@font-face /* MJX-NCM-DS */":{"font-family":"MJX-NCM-DS",src:'url("%%URL%%/mjx-ncm-ds.woff2") format("woff2")'},"@font-face /* MJX-NCM-F */":{"font-family":"MJX-NCM-F",src:'url("%%URL%%/mjx-ncm-f.woff2") format("woff2")'},"@font-face /* MJX-NCM-FB */":{"font-family":"MJX-NCM-FB",src:'url("%%URL%%/mjx-ncm-fb.woff2") format("woff2")'},"@font-face /* MJX-NCM-SS */":{"font-family":"MJX-NCM-SS",src:'url("%%URL%%/mjx-ncm-ss.woff2") format("woff2")'},"@font-face /* MJX-NCM-SSB */":{"font-family":"MJX-NCM-SSB",src:'url("%%URL%%/mjx-ncm-ssb.woff2") format("woff2")'},"@font-face /* MJX-NCM-SSI */":{"font-family":"MJX-NCM-SSI",src:'url("%%URL%%/mjx-ncm-ssi.woff2") format("woff2")'},"@font-face /* MJX-NCM-SSBI */":{"font-family":"MJX-NCM-SSBI",src:'url("%%URL%%/mjx-ncm-ssbi.woff2") format("woff2")'},"@font-face /* MJX-NCM-M */":{"font-family":"MJX-NCM-M",src:'url("%%URL%%/mjx-ncm-m.woff2") format("woff2")'},"@font-face /* MJX-NCM-SO */":{"font-family":"MJX-NCM-SO",src:'url("%%URL%%/mjx-ncm-so.woff2") format("woff2")'},"@font-face /* MJX-NCM-LO */":{"font-family":"MJX-NCM-LO",src:'url("%%URL%%/mjx-ncm-lo.woff2") format("woff2")'},"@font-face /* MJX-NCM-S3 */":{"font-family":"MJX-NCM-S3",src:'url("%%URL%%/mjx-ncm-s3.woff2") format("woff2")'},"@font-face /* MJX-NCM-S4 */":{"font-family":"MJX-NCM-S4",src:'url("%%URL%%/mjx-ncm-s4.woff2") format("woff2")'},"@font-face /* MJX-NCM-S5 */":{"font-family":"MJX-NCM-S5",src:'url("%%URL%%/mjx-ncm-s5.woff2") format("woff2")'},"@font-face /* MJX-NCM-S6 */":{"font-family":"MJX-NCM-S6",src:'url("%%URL%%/mjx-ncm-s6.woff2") format("woff2")'},"@font-face /* MJX-NCM-S7 */":{"font-family":"MJX-NCM-S7",src:'url("%%URL%%/mjx-ncm-s7.woff2") format("woff2")'},"@font-face /* MJX-NCM-MI */":{"font-family":"MJX-NCM-MI",src:'url("%%URL%%/mjx-ncm-mi.woff2") format("woff2")'},"@font-face /* MJX-NCM-C */":{"font-family":"MJX-NCM-C",src:'url("%%URL%%/mjx-ncm-c.woff2") format("woff2")'},"@font-face /* MJX-NCM-CB */":{"font-family":"MJX-NCM-CB",src:'url("%%URL%%/mjx-ncm-cb.woff2") format("woff2")'},"@font-face /* MJX-NCM-OS */":{"font-family":"MJX-NCM-OS",src:'url("%%URL%%/mjx-ncm-os.woff2") format("woff2")'},"@font-face /* MJX-NCM-OB */":{"font-family":"MJX-NCM-OB",src:'url("%%URL%%/mjx-ncm-ob.woff2") format("woff2")'},"@font-face /* MJX-NCM-V */":{"font-family":"MJX-NCM-V",src:'url("%%URL%%/mjx-ncm-v.woff2") format("woff2")'},"@font-face /* MJX-NCM-LT */":{"font-family":"MJX-NCM-LT",src:'url("%%URL%%/mjx-ncm-lt.woff2") format("woff2")'},"@font-face /* MJX-NCM-RB */":{"font-family":"MJX-NCM-RB",src:'url("%%URL%%/mjx-ncm-rb.woff2") format("woff2")'},"@font-face /* MJX-NCM-EM */":{"font-family":"MJX-NCM-EM",src:'url("%%URL%%/mjx-ncm-em.woff2") format("woff2")'},"@font-face /* MJX-NCM-Be */":{"font-family":"MJX-NCM-Be",src:'url("%%URL%%/mjx-ncm-be.woff2") format("woff2")'},"@font-face /* MJX-NCM-U */":{"font-family":"MJX-NCM-U",src:'url("%%URL%%/mjx-ncm-u.woff2") format("woff2")'},"@font-face /* MJX-NCM-Ue */":{"font-family":"MJX-NCM-Ue",src:'url("%%URL%%/mjx-ncm-ue.woff2") format("woff2")'},"@font-face /* MJX-NCM-S */":{"font-family":"MJX-NCM-S",src:'url("%%URL%%/mjx-ncm-s.woff2") format("woff2")'},"@font-face /* MJX-NCM-SB */":{"font-family":"MJX-NCM-SB",src:'url("%%URL%%/mjx-ncm-sb.woff2") format("woff2")'}}),Xd.dynamicFiles=Jl.defineDynamicFiles([["latin",{normal:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7835],7838,[7840,7929],11377]}],["latin-b",{bold:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["latin-i",{italic:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929]]}],["latin-bi",{"bold-italic":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929]]}],["double-struck",{normal:[8450,8461,8469,8473,8474,8477,8484,[8508,8512],[8517,8521],120120,120121,[120123,120126],[120128,120132],120134,[120138,120144],[120146,120171],[120792,120801]],"double-struck":[305,567]}],["fraktur",{normal:[8460,8465,8476,8488,8493,120068,120069,[120071,120074],[120077,120084],[120086,120092],[120094,120119],[120172,120223]],fraktur:[305,567],"bold-fraktur":[305,567]}],["script",{normal:[8458,8459,8464,8466,8467,8472,8475,8492,[8495,8497],8499,8500,119964,119966,119967,119970,119973,119974,[119977,119980],[119982,119993],119995,[119997,120003],[120005,120067]],script:[],"bold-script":[]}],["sans-serif",{normal:[[8513,8516],[120224,120431],[120662,120777],[120802,120821]],"sans-serif":[[32,47],[58,64],[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,[913,929],[931,937],[945,969],977,978,981,982,1008,1009,[1012,1014],[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734],"bold-sans-serif":[32,33,[35,47],58,59,61,63,64,[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,978,1014,[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734],"sans-serif-italic":[[32,64],[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,[913,929],[931,937],[945,969],977,978,981,982,1008,1009,[1012,1014],[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734],"sans-serif-bold-italic":[32,33,[35,59],61,63,64,[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,978,1014,[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734]}],["sans-serif-r",{"sans-serif":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-b",{"bold-sans-serif":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-i",{"sans-serif-italic":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-bi",{"sans-serif-bold-italic":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-ex",{"sans-serif":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59959,59962,59966,59970,59973,60163,60164,60168,60175,60177,60178,60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126],"bold-sans-serif":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126],"sans-serif-italic":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126],"sans-serif-bold-italic":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126]}],["monospace",{normal:[[120432,120483],[120822,120831]],monospace:[[32,47],[58,64],[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[728,730],732,[768,776],778,780,[913,929],[931,937],[945,969],977,978,981,982,1008,1009,[1012,1014],[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734]}],["monospace-l",{monospace:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["monospace-ex",{monospace:[161,162,164,166,[169,171],173,174,184,[186,191],[592,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,995],1010,1011,[1015,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309],3647,7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575,7620,7621,7624,7625,[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,[9552,9579],9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64262],65126]}],["calligraphic",{"-tex-calligraphic":[[65,90]],"-tex-bold-calligraphic":[[65,90]]}],["math",{normal:[8714,8717,8731,8732,8762,8763,8782,8783,[8785,8787],[8790,8796],8798,8844,[8886,8889],[8891,8895],8903,[8912,8929],[8932,8937],[8946,8959],[10176,10199],[10202,10204],[10207,10213],[10625,10646],[10649,10740],10742,[10746,10751],10762,10763,[10781,10798],[10800,10814],[10816,10876],[10879,10884],[10893,10900],[10903,10926],[10939,10948],[10951,10954],[10957,10973],[10988,10993],[10998,11003],[11005,11007]]}],["symbols",{normal:[127,161,162,164,166,[169,171],173,174,178,179,[185,191],3647,8204,8205,8215,8218,8219,8222,8223,[8226,8229],8233,8240,8241,[8248,8259],[8261,8278],[8280,8286],8319,8320,8353,8358,[8361,8363],8369,8370,8448,8449,[8451,8454],8456,8457,8468,8470,8471,[8478,8483],8485,8489,8494,[8505,8507],[8522,8527],[8960,8966],[8977,8984],8986,8987,[8996,9e3],[9003,9114],9142,[9146,9165],9167,[9169,9179],[9186,9203],[9208,9215],9250,9251,11159,11193,11209,[11216,11241],[11248,11263],11800,12306,12310,12311,12336,[64256,64262],65126,65279]},[8215]],["symbols-b-i",{bold:[161,162,164,166,[169,171],173,174,[186,191],3647,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,[8361,8363],8369,8370,8451,8470,8471,8478,8480,8482,8494,8960,9250,9251,11800,[64256,64262],65126],italic:[[161,167],[169,174],177,[181,183],[186,191],215,240,247,3647,8204,8205,8218,8219,[8222,8226],8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,8960,9250,9251,11800,[64256,64262],65126],"bold-italic":[[161,167],[169,174],177,[181,183],[186,191],215,240,247,3647,8204,8205,8218,8219,[8222,8226],8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8320,8353,8358,[8361,8363],8369,8370,8451,8470,8471,8478,8480,8482,8494,8960,9250,9251,11800,[64256,64262],65126]}],["greek",{normal:[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]],bold:[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,987],[990,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]],italic:[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]],"bold-italic":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]]}],["greek-ss",{"sans-serif":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]],"bold-sans-serif":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8121],[8123,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]],"sans-serif-italic":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]],"sans-serif-bold-italic":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8121],[8123,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]]}],["cyrillic",{normal:[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],bold:[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],italic:[[1024,1143],[1146,1158],[1160,1225],[1227,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"bold-italic":[[1024,1143],[1146,1158],[1160,1225],[1227,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]]}],["cyrillic-ss",{"sans-serif":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"bold-sans-serif":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"sans-serif-italic":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"sans-serif-bold-italic":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]]}],["phonetics",{normal:[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],bold:[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],italic:[[592,685],687],"bold-italic":[[592,687]]}],["phonetics-ss",{"sans-serif":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],"bold-sans-serif":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],"sans-serif-italic":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],"sans-serif-bold-italic":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575]}],["hebrew",{normal:[[1425,1479],[1488,1514],[1519,1525],1527,[64285,64335]],bold:[[1425,1479],[1488,1515],[1519,1525],1527,[64285,64335]],italic:[[1425,1479],[1488,1514],[1519,1525],1527,[64285,64335]],"bold-italic":[[1425,1479],[1488,1515],[1519,1525],1527,[64285,64335]]}],["devanagari",{normal:[[2304,2431]],bold:[],italic:[],"bold-italic":[]}],["cherokee",{normal:[[5024,5109],[5112,5117]],bold:[[5024,5109],[5112,5117]],italic:[[5024,5115]],"bold-italic":[[5024,5115]]}],["arabic",{normal:[[126464,126498],126500,126503,[126505,126514],[126516,126519],126521,126523,126530,126535,126537,126539,[126541,126543],126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],126704,126705],bold:[],italic:[],"bold-italic":[]}],["braille-d",{normal:[[10240,10495]]}],["braille",{"sans-serif":[[10240,10495]]}],["arrows",{normal:[8604,8605,8607,8609,8613,8615,8616,8621,[8623,8629],8632,8633,[8662,8665],[8668,8671],[8678,8692],[8695,8703],9166,10145,[10224,10228],10239,[10496,10505],[10508,10569],10572,10573,10575,10577,10580,10581,10584,10585,10588,10589,[10592,10601],[10608,10619],[11008,11026],[11056,11087],[11098,11123],[11126,11157],[11160,11192],[11244,11247]],"-largeop":[8593,8595,[8597,8603],[8606,8611],8613,8615,[8617,8622],[8624,8627],8630,8631,[8636,8655],8657,8659,[8661,8667],[8678,8681],8691,8693,8694,[11012,11015],11020,11021,11057],"-lf-tp":[[8678,8681],10503,11013,11014],"-rt-bt":[[8678,8681],10502,11015,11020],"-ex-md":[8678,8679,11013,11014]},[8607,8609,8613,8615,8621,8622,[8624,8627],[8662,8665],8668,8669,[8678,8681],8691,10145,10237,10238,10502,10503,10572,10573,10575,10577,10588,10589,10592,10593,[11012,11015],11020,11021,11057]],["marrows",{normal:[[129024,129035],[129040,129095],[129104,129113],[129120,129159],[129168,129197],129200,129201]}],["accents",{normal:[184,[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,879],7620,7621,7624,7625,[8403,8405],8408,[8413,8415],[8420,8427],8432],"-smallop":[785,[812,816],818,819,831,845],"-largeop":[785,[812,816]],"-size3":[785,[812,816]],"-size4":[785,[812,816]],"-size5":[785,[812,816]],"-size6":[785,[812,816]],"-size7":[785,[812,816]],"-ex-md":[818,819,831,845]},[785,[812,816],818,819,831,845,8425]],["accents-b-i",{bold:[184,[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],7620,7621,7624,7625],italic:[184,[688,700],[702,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879]],"bold-italic":[184,[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879]]}],["shapes",{normal:[8962,[8998,9e3],9003,[9211,9214],[9472,9631],[9634,9641],[9644,9649],9672,9673,[9676,9678],[9680,9701],[9703,9710],[9712,9719],9728,9733,9734,9737,9761,9773,[9785,9790],9792,9794,[9824,9831],[9833,9835],[9837,9839],9854,[9856,9865],9893,[9898,9902],9906,10003,10013,10016,10026,10038,10045,10098,10099,10139,10145,[11026,11055],[11088,11097],[11194,11208],[11210,11215],11242,11243],bold:[9474,9553,9773,9792,9834,9901,9902,9906,10013],italic:[9773,9834,9901,9902,10013],"bold-italic":[9773,9834,9901,9902,10013]}],["mshapes",{normal:[[128896,128984],[128992,129003]]}],["variants",{"-tex-variant":[34,39,42,96,126,170,176,178,179,185,186,8212,8289,8304,8305,[8308,8334]]}],["PUA",{normal:[[57344,57395],[57409,57458],[59264,59274],59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198],bold:[59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198],italic:[59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,61867,61868,[61873,61877],62082,62083,62110,62113,62116,62119,62120,[62560,62568],[62570,62578],63166,63172,[63174,63176],[63187,63190],63198],"bold-italic":[59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,61867,61868,[61873,61877],62082,62083,62110,62113,62116,62119,62120,[62560,62568],[62570,62578],63166,63172,[63174,63176],[63187,63190],63198]}]]);const Vd={fontName:"mathjax-newcm",DefaultFont:Xd},Gd=Vd.fontName,Jd=Vd.DefaultFont;class Kd extends Rl{constructor(t={}){super(t,Hd,Jd),this.chtmlStyles=null,this.font.adaptiveCSS(this.options.adaptiveCSS),this.wrapperUsage=new Gl}addExtension(t,e=""){const s=super.addExtension(t,e);return s.length&&this.options.adaptiveCSS&&this.chtmlStyles&&this.adaptor.insertRules(this.chtmlStyles,s),[]}escaped(t,e){return this.setDocument(e),this.html("span",{},[this.text(t.math)])}styleSheet(t){if(this.chtmlStyles){const t=new To;return this.options.adaptiveCSS&&(this.addWrapperStyles(t),this.updateFontStyles(t)),t.addStyles(this.font.updateDynamicStyles()),this.adaptor.insertRules(this.chtmlStyles,t.getStyleRules()),this.chtmlStyles}const e=this.chtmlStyles=super.styleSheet(t);return this.adaptor.setAttribute(e,"id",Kd.STYLESHEETID),this.wrapperUsage.update(),e}updateFontStyles(t){t.addStyles(this.font.updateStyles({}))}addWrapperStyles(t){if(this.options.adaptiveCSS)for(const e of this.wrapperUsage.update()){const s=this.factory.getNodeClass(e);s&&this.addClassStyles(s,t)}else super.addWrapperStyles(t)}addClassStyles(t,e){const s=t;s.autoStyle&&"unknown"!==s.kind&&e.addStyles({["mjx-"+s.kind]:{display:"inline-block","text-align":"left"}}),this.wrapperUsage.add(s.kind),super.addClassStyles(t,e)}insertStyles(t){this.chtmlStyles&&this.adaptor.insertRules(this.chtmlStyles,new To(t).getStyleRules())}processMath(t,e){t.toCHTML([e])}clearCache(){this.styleJson.clear(),this.font.clearCache(),this.wrapperUsage.clear(),this.chtmlStyles=null}reset(){this.clearCache()}unknownText(t,e,s=null){const i={},r=100/this.math.metrics.scale;if(100!==r&&(i["font-size"]=this.fixed(r,1)+"%",i.padding=po(75/r)+" 0 "+po(20/r)+" 0"),"-explicitFont"!==e){const s=Br(t);(1!==s.length||s[0]<119808||s[0]>120831)&&this.cssFontStyles(this.font.getCssFont(e),i)}return null!==s&&(i.width=this.fixed(s*this.math.metrics.scale)+"em"),this.html("mjx-utext",{variant:e,style:i},[this.text(t)])}measureTextNode(t){const e=this.adaptor,s=e.clone(t);e.setStyle(s,"font-family",e.getStyle(s,"font-family").replace(/MJXZERO, /g,""));const i=this.math.metrics.em,r={position:"absolute",top:0,left:0,"white-space":"nowrap","font-size":this.fixed(i,3)+"px"},n=this.html("mjx-measure-text",{style:r},[s]);e.append(e.parent(this.math.start.node),this.container),e.append(this.container,n);const o=e.nodeSize(s,i)[0];return e.remove(this.container),e.remove(n),{w:o,h:.75,d:.2}}}function $d(t,e){const s={};for(const i of Object.keys(t)){const r=t[i];for(const t of Object.keys(r)){s[t]||(s[t]={});const n=r[t];if(i)for(const t of Object.keys(n)){const s=n[parseInt(t)];s[3]||(s[3]={}),e?s[3].ff=e+"-"+i:s[3].f=i}Object.assign(s[t],n)}}return s}Kd.NAME="CHTML",Kd.OPTIONS=Object.assign(Object.assign({},Rl.OPTIONS),{adaptiveCSS:!0,matchFontHeight:!0}),Kd.commonStyles=Object.assign(Object.assign({},Rl.commonStyles),{'mjx-container[jax="CHTML"]':{"white-space":"nowrap"},[["mjx-mo > mjx-c","mjx-mi > mjx-c","mjx-mn > mjx-c","mjx-ms > mjx-c","mjx-mtext > mjx-c"].join(", ")]:{"clip-path":"padding-box xywh(-1em -2px calc(100% + 2em) calc(100% + 4px))"},"mjx-stretchy-h":{"clip-path":"padding-box xywh(0 -2px 100% calc(100% + 4px))"},"mjx-stretchy-v":{"clip-path":"padding-box xywh(-2px 0 calc(100% + 4px) 100%)"},'mjx-container [space="1"]':{"margin-left":".111em"},'mjx-container [space="2"]':{"margin-left":".167em"},'mjx-container [space="3"]':{"margin-left":".222em"},'mjx-container [space="4"]':{"margin-left":".278em"},'mjx-container [space="5"]':{"margin-left":".333em"},'mjx-container [rspace="1"]':{"margin-right":".111em"},'mjx-container [rspace="2"]':{"margin-right":".167em"},'mjx-container [rspace="3"]':{"margin-right":".222em"},'mjx-container [rspace="4"]':{"margin-right":".278em"},'mjx-container [rspace="5"]':{"margin-right":".333em"},'mjx-container [size="s"]':{"font-size":"70.7%"},'mjx-container [size="ss"]':{"font-size":"50%"},'mjx-container [size="Tn"]':{"font-size":"60%"},'mjx-container [size="sm"]':{"font-size":"85%"},'mjx-container [size="lg"]':{"font-size":"120%"},'mjx-container [size="Lg"]':{"font-size":"144%"},'mjx-container [size="LG"]':{"font-size":"173%"},'mjx-container [size="hg"]':{"font-size":"207%"},'mjx-container [size="HG"]':{"font-size":"249%"},'mjx-container [width="full"]':{width:"100%"},"mjx-box":{display:"inline-block"},"mjx-block":{display:"block"},"mjx-itable":{display:"inline-table"},"mjx-row":{display:"table-row"},"mjx-row > *":{display:"table-cell"},"mjx-container [inline-breaks]":{display:"inline"},"mjx-mtext":{display:"inline-block"},"mjx-mstyle":{display:"inline-block"},"mjx-merror":{display:"inline-block",color:"red","background-color":"yellow"},"mjx-mphantom":{visibility:"hidden"}}),Kd.STYLESHEETID="MJX-CHTML-styles",MathJax.loader&&MathJax.loader.checkVersion("output/chtml",ii,"output"),ci({_:{output:{chtml_ts:Ss,chtml:{DefaultFont:Is,DynamicFonts:Rs,FontData:Le,Notation:ze,Usage:Me,Wrapper:Ce,WrapperFactory:Ms,Wrappers_ts:As,Wrappers:{HtmlNode:ks,TeXAtom:Ts,TextNode:ws,maction:bs,math:_e,menclose:Xe,mfenced:Ke,mfrac:Ye,mglyph:Ns,mi:ke,mmultiscripts:ls,mn:Re,mo:Ie,mpadded:qe,mroot:es,mrow:Ge,ms:De,mspace:je,msqrt:Ze,msubsup:ns,mtable:ds,mtd:fs,mtext:Be,mtr:ps,munderover:as,scriptbase:rs,semantics:vs}},common_ts:ye,common:{Direction:ge,FontData:be,LineBBox:Ee,LinebreakVisitor:Ne,Notation:He,Wrapper:ve,WrapperFactory:xe,Wrappers:{TeXAtom:Cs,TextNode:_s,XmlNode:xs,maction:gs,math:Te,menclose:We,mfenced:Je,mfrac:$e,mglyph:Es,mi:we,mmultiscripts:cs,mn:Se,mo:Ae,mpadded:Ue,mroot:ts,mrow:Ve,ms:Oe,mspace:Fe,msqrt:Qe,msubsup:ss,mtable:hs,mtd:ms,mtext:Pe,mtr:us,munderover:os,scriptbase:is,semantics:ys}}}}});const Yd=hi?"https://cdn.jsdelivr.net/npm/@mathjax/%%FONT%%-font":"@mathjax/%%FONT%%-font",Qd={config(t,e,s,i){if(MathJax.loader){ai(MathJax.config,t,MathJax.config.output||{});let e=MathJax.config[t],r=e.font||e.fontData||s;if("string"!=typeof r&&(e.fontData=r,e.font=r=r.NAME),"["!==r.charAt(0)){const s=e.fontPath||Yd,i=r.match(/^[a-z]+:/)?(r.match(/[^/:\\]*$/)||[t])[0]:r;ai(MathJax.config.loader,"paths",{[i]:i===r?s.replace(/%%FONT%%/g,r):r}),r=`[${i}]`}const n=r.substring(1,r.length-1);if(n===s&&i){const e=MathJax.config.loader[`${r}/${t}`]?.extraLoads;e&&MathJax.loader.addPackageData(`output/${t}`,{extraLoads:e}),ci({_:{output:{fonts:{[n]:{[t+"_ts"]:{[i.NAME+"Font"]:i}}}}}}),ai(MathJax,"config",{output:{font:r},[t]:{fontData:i,dynamicPrefix:`${r}/${t}/dynamic`}}),"chtml"===t&&ai(MathJax.config,t,{fontURL:pi.resolvePath(`${r}/${t}/woff2`,!1)})}else MathJax.loader.addPackageData(`output/${t}`,{extraLoads:[`${r}/${t}`]})}MathJax.startup&&(MathJax.startup.registerConstructor(t,e),MathJax.startup.useOutput(t))},loadFont:(t,e,s,i)=>MathJax.loader?(i&&MathJax.loader.preLoaded(`[${s}]/${e}`),pi.loadPromise(`output/${e}`).then(t)):t};var Zd;Qd.config("chtml",Kd,Gd,Jd),function(t){t[t.RETURN=13]="RETURN",t[t.ESCAPE=27]="ESCAPE",t[t.SPACE=32]="SPACE",t[t.LEFT=37]="LEFT",t[t.UP=38]="UP",t[t.RIGHT=39]="RIGHT",t[t.DOWN=40]="DOWN"}(Zd||(Zd={}));const tu="click",eu="dblclick",su="mousedown",iu="mouseup",ru="mouseover",nu="mouseout",ou="selectstart";class au{constructor(){this.bubble=!1}bubbleKey(){this.bubble=!0}keydown(t){switch(t.keyCode){case Zd.ESCAPE:this.escape(t);break;case Zd.RIGHT:this.right(t);break;case Zd.LEFT:this.left(t);break;case Zd.UP:this.up(t);break;case Zd.DOWN:this.down(t);break;case Zd.RETURN:case Zd.SPACE:this.space(t);break;default:return}this.bubble?this.bubble=!1:this.stop(t)}escape(t){}space(t){}left(t){}right(t){}up(t){}down(t){}stop(t){t&&(t.stopPropagation(),t.preventDefault(),t.cancelBubble=!0)}mousedown(t){return this.stop(t)}mouseup(t){return this.stop(t)}mouseover(t){return this.stop(t)}mouseout(t){return this.stop(t)}click(t){return this.stop(t)}addEvents(t){t.addEventListener(su,this.mousedown.bind(this)),t.addEventListener(iu,this.mouseup.bind(this)),t.addEventListener(ru,this.mouseover.bind(this)),t.addEventListener(nu,this.mouseout.bind(this)),t.addEventListener(tu,this.click.bind(this)),t.addEventListener("keydown",this.keydown.bind(this)),t.addEventListener("dragstart",this.stop.bind(this)),t.addEventListener(ou,this.stop.bind(this)),t.addEventListener("contextmenu",this.stop.bind(this)),t.addEventListener(eu,this.stop.bind(this))}}class cu extends au{addAttributes(t){for(const e in t)this.html.setAttribute(e,t[e])}get html(){return this._html||this.generateHtml(),this._html}set html(t){this._html=t,this.addEvents(t)}generateHtml(){const t=document.createElement("div");t.classList.add(this.className),t.setAttribute("role",this.role),this.html=t}focus(){const t=this.html;t.setAttribute("tabindex","0"),t.focus()}unfocus(){const t=this.html;t.hasAttribute("tabindex")&&t.setAttribute("tabindex","-1");try{t.blur()}catch(t){}t.blur()}}class lu extends cu{constructor(){super(...arguments),this.posted=!1}isPosted(){return this.posted}post(t,e){this.posted||(void 0!==t&&void 0!==e&&this.html.setAttribute("style","left: "+t+"px; top: "+e+"px;"),this.display(),this.posted=!0)}unpost(){if(!this.posted)return;const t=this.html;t.parentNode&&t.parentNode.removeChild(t),this.posted=!1}}function hu(t){return"CtxtMenu_"+t}function du(t){return hu(t)}function uu(t){return hu(t)}const pu={ATTACHED:du("Attached"),CONTEXTMENU:du("ContextMenu"),MENU:du("Menu"),MENUARROW:du("MenuArrow"),MENUACTIVE:du("MenuActive"),MENUCHECK:du("MenuCheck"),MENUCLOSE:du("MenuClose"),MENUCOMBOBOX:du("MenuComboBox"),MENUDISABLED:du("MenuDisabled"),MENUFRAME:du("MenuFrame"),MENUITEM:du("MenuItem"),MENULABEL:du("MenuLabel"),MENURADIOCHECK:du("MenuRadioCheck"),MENUINPUTBOX:du("MenuInputBox"),MENURULE:du("MenuRule"),MENUSLIDER:du("MenuSlider"),MOUSEPOST:du("MousePost"),RTL:du("RTL"),INFO:du("Info"),INFOCLOSE:du("InfoClose"),INFOCONTENT:du("InfoContent"),INFOSIGNATURE:du("InfoSignature"),INFOTITLE:du("InfoTitle"),SLIDERVALUE:du("SliderValue"),SLIDERBAR:du("SliderBar"),SELECTION:du("Selection"),SELECTIONBOX:du("SelectionBox"),SELECTIONMENU:du("SelectionMenu"),SELECTIONDIVIDER:du("SelectionDivider"),SELECTIONITEM:du("SelectionItem")},mu={COUNTER:uu("Counter"),KEYDOWNFUNC:uu("keydownFunc"),CONTEXTMENUFUNC:uu("contextmenuFunc"),OLDTAB:uu("Oldtabindex"),TOUCHFUNC:uu("TouchFunc")};class fu extends cu{constructor(t,e){super(),this._menu=t,this._type=e,this.className=pu.MENUITEM,this.role="menuitem",this.hidden=!1}get menu(){return this._menu}set menu(t){this._menu=t}get type(){return this._type}hide(){this.hidden=!0,this.menu.generateMenu()}show(){this.hidden=!1,this.menu.generateMenu()}isHidden(){return this.hidden}}function gu(t){const e=t.menu;e.baseMenu?e.baseMenu.unpost():e.unpost()}function bu(t){const e=t.menu;return(e.baseMenu?e.baseMenu:e).store.active}function Eu(t,e){console.error("ContextMenu Error: "+e)}function Nu(){return yu++}let yu=0;class xu extends fu{constructor(t,e,s,i){super(t,e),this._content=s,this.disabled=!1,this.callbacks=[],this._id=i||s}get content(){return this._content}set content(t){this._content=t,this.generateHtml(),this.menu&&this.menu.generateHtml()}get id(){return this._id}press(){this.disabled||(this.executeAction(),this.executeCallbacks_())}executeAction(){}registerCallback(t){-1===this.callbacks.indexOf(t)&&this.callbacks.push(t)}unregisterCallback(t){const e=this.callbacks.indexOf(t);-1!==e&&this.callbacks.splice(e,1)}mousedown(t){this.press(),this.stop(t)}mouseover(t){this.focus(),this.stop(t)}mouseout(t){this.deactivate(),this.stop(t)}generateHtml(){super.generateHtml();const t=this.html;t.setAttribute("aria-disabled","false"),t.textContent=this.content}activate(){this.disabled||this.html.classList.add(pu.MENUACTIVE)}deactivate(){this.html.classList.remove(pu.MENUACTIVE)}focus(){this.menu.focused=this,super.focus(),this.activate()}unfocus(){this.deactivate(),super.unfocus()}escape(t){gu(this)}up(t){this.menu.up(t)}down(t){this.menu.down(t)}left(t){this.menu.left(t)}right(t){this.menu.right(t)}space(t){this.press()}disable(){this.disabled=!0;const t=this.html;t.classList.add(pu.MENUDISABLED),t.setAttribute("aria-disabled","true")}enable(){this.disabled=!1;const t=this.html;t.classList.remove(pu.MENUDISABLED),t.removeAttribute("aria-disabled")}executeCallbacks_(){for(const t of this.callbacks)try{t(this)}catch(t){Eu(0,"Callback for menu entry "+this.id+" failed.")}}}class vu extends xu{static fromJson(t,{content:e,menu:s,id:i},r){const n=new this(r,e,i),o=t.get("subMenu")(t,s,n);return n.submenu=o,n}constructor(t,e,s){super(t,"submenu",e,s),this._submenu=null}set submenu(t){this._submenu=t}get submenu(){return this._submenu}mouseover(t){this.focus(),this.stop(t)}mouseout(t){this.stop(t)}unfocus(){if(this.submenu.isPosted()){if(this.menu.focused!==this)return super.unfocus(),void this.menu.unpostSubmenus();this.html.setAttribute("tabindex","-1"),this.html.blur()}else super.unfocus()}focus(){super.focus(),this.submenu.isPosted()||this.disabled||this.submenu.post()}executeAction(){this.submenu.isPosted()?this.submenu.unpost():this.submenu.post()}generateHtml(){super.generateHtml();const t=this.html;this.span=document.createElement("span"),this.span.textContent="\u25ba",this.span.classList.add(pu.MENUARROW),t.appendChild(this.span),t.setAttribute("aria-haspopup","true")}left(t){this.submenu.isPosted()?this.submenu.unpost():super.left(t)}right(t){this.submenu.isPosted()?this.submenu.down(t):this.submenu.post()}toJson(){return{type:""}}}class Cu extends lu{constructor(){super(...arguments),this.className=pu.CONTEXTMENU,this.role="menu",this._items=[],this._baseMenu=null}set baseMenu(t){this._baseMenu=t}get baseMenu(){return this._baseMenu}get items(){return this._items}set items(t){this._items=t}get pool(){return this.variablePool}get focused(){return this._focused}set focused(t){if(this._focused===t)return;this._focused||this.unfocus();const e=this._focused;this._focused=t,e&&e.unfocus()}up(t){const e=this.items.filter((t=>t instanceof xu&&!t.isHidden()));if(0===e.length)return;if(!this.focused)return void e[e.length-1].focus();let s=e.indexOf(this.focused);-1!==s&&(s=s?--s:e.length-1,e[s].focus())}down(t){const e=this.items.filter((t=>t instanceof xu&&!t.isHidden()));if(0===e.length)return;if(!this.focused)return void e[0].focus();let s=e.indexOf(this.focused);-1!==s&&(s++,s=s===e.length?0:s,e[s].focus())}generateHtml(){super.generateHtml(),this.generateMenu()}generateMenu(){const t=this.html;t.classList.add(pu.MENU);for(const e of this.items){if(!e.isHidden()){t.appendChild(e.html);continue}const s=e.html;s.parentNode&&s.parentNode.removeChild(s)}}post(t,e){this.variablePool.update(),super.post(t,e)}unpostSubmenus(){const t=this.items.filter((t=>t instanceof vu));for(const e of t)e.submenu.unpost(),e!==this.focused&&e.unfocus()}unpost(){super.unpost(),this.unpostSubmenus(),this.focused=null}find(t){for(const e of this.items)if("rule"!==e.type){if(e.id===t)return e;if("submenu"===e.type){const s=e.submenu.find(t);if(s)return s}}return null}}class Tu{constructor(t){this.menu=t,this.store=[],this._active=null,this.counter=0,this.attachedClass=pu.ATTACHED+"_"+Nu(),this.taborder=!0,this.attrMap={}}set active(t){do{if(-1!==this.store.indexOf(t)){this._active=t;break}t=t.parentNode}while(t)}get active(){return this._active}next(){const t=this.store.length;if(0===t)return this.active=null,null;let e=this.store.indexOf(this.active);return e=-1===e?0:et.setAttribute("tabindex","0")))}removeTaborder_(){this.store.forEach((t=>t.setAttribute("tabindex","-1")))}addTabindex(t){t.hasAttribute("tabindex")&&t.setAttribute(mu.OLDTAB,t.getAttribute("tabindex")),t.setAttribute("tabindex","0")}removeTabindex(t){t.hasAttribute(mu.OLDTAB)?(t.setAttribute("tabindex",t.getAttribute(mu.OLDTAB)),t.removeAttribute(mu.OLDTAB)):t.removeAttribute("tabindex")}addEvents(t){t.hasAttribute(mu.COUNTER)||(this.addEvent(t,"contextmenu",this.menu.post.bind(this.menu)),this.addEvent(t,"keydown",this.keydown.bind(this)),t.setAttribute(mu.COUNTER,this.counter.toString()),this.counter++)}addEvent(t,e,s){const i=mu[e.toUpperCase()+"FUNC"];this.attrMap[i+this.counter]=s,t.addEventListener(e,s)}removeEvents(t){if(!t.hasAttribute(mu.COUNTER))return;const e=t.getAttribute(mu.COUNTER);this.removeEvent(t,"contextmenu",e),this.removeEvent(t,"keydown",e),t.removeAttribute(mu.COUNTER)}removeEvent(t,e,s){const i=mu[e.toUpperCase()+"FUNC"],r=this.attrMap[i+s];t.removeEventListener(e,r)}keydown(t){t.keyCode===Zd.SPACE&&(this.menu.post(t),t.preventDefault(),t.stopImmediatePropagation())}}class _u{constructor(){this.pool={}}insert(t){this.pool[t.name]=t}lookup(t){return this.pool[t]}remove(t){delete this.pool[t]}update(){for(const t in this.pool)this.pool[t].update()}}class wu extends Cu{static fromJson(t,{pool:e,items:s,id:i=""}){const r=new this(t);r.id=i;const n=t.get("variable");e.forEach((e=>n(t,e,r.pool)));const o=t.get("items")(t,s,r);return r.items=o,r}constructor(t){super(),this.factory=t,this.id="",this.moving=!1,this._store=new Tu(this),this.widgets=[],this.variablePool=new _u}generateHtml(){this.isPosted()&&this.unpost(),super.generateHtml(),this._frame=document.createElement("div"),this._frame.classList.add(pu.MENUFRAME);const t="left: 0px; top: 0px; z-index: 200; width: 100%; height: 100%; border: 0px; padding: 0px; margin: 0px;";this._frame.setAttribute("style","position: absolute; "+t);const e=document.createElement("div");e.setAttribute("style","position: fixed; "+t),this._frame.appendChild(e),e.addEventListener("mousedown",function(t){this.unpost(),this.unpostWidgets(),this.stop(t)}.bind(this))}display(){document.body.appendChild(this.frame),this.frame.appendChild(this.html),this.focus()}escape(t){this.unpost(),this.unpostWidgets()}unpost(){if(super.unpost(),this.widgets.length>0)return;this.frame.parentNode.removeChild(this.frame);const t=this.store;this.moving||t.insertTaborder(),t.active.focus()}left(t){this.move_(this.store.previous())}right(t){this.move_(this.store.next())}get frame(){return this._frame}get store(){return this._store}post(t,e){if(void 0!==e)return this.moving||this.store.removeTaborder(),void super.post(t,e);const s=t;let i,r,n;if(s instanceof Event?(i=s.target,this.stop(s)):i=s,s instanceof MouseEvent&&(r=s.pageX,n=s.pageY,r||n||!s.clientX||(r=s.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=s.clientY+document.body.scrollTop+document.documentElement.scrollTop)),!r&&!n&&i){const t=window.pageXOffset||document.documentElement.scrollLeft,e=window.pageYOffset||document.documentElement.scrollTop,s=i.getBoundingClientRect();r=(s.right+s.left)/2+t,n=(s.bottom+s.top)/2+e}this.store.active=i,this.anchor=this.store.active;const o=this.html;r+o.offsetWidth>document.body.offsetWidth-5&&(r=document.body.offsetWidth-o.offsetWidth-5),this.post(r,n)}registerWidget(t){this.widgets.push(t)}unregisterWidget(t){const e=this.widgets.indexOf(t);e>-1&&this.widgets.splice(e,1),0===this.widgets.length&&this.unpost()}unpostWidgets(){this.widgets.forEach((t=>t.unpost()))}toJson(){return{type:""}}move_(t){this.anchor&&t!==this.anchor&&(this.moving=!0,this.unpost(),this.post(t),this.moving=!1)}}class ku extends Cu{static fromJson(t,{items:e},s){const i=new this(s),r=t.get("items")(t,e,i);return i.items=r,i}constructor(t){super(),this._anchor=t,this.variablePool=this.anchor.menu.pool,this.setBaseMenu()}get anchor(){return this._anchor}post(){if(!this.anchor.menu.isPosted())return;let t=this.anchor.html;const e=this.html,s=this.baseMenu.frame,i=t.offsetWidth;let r=i-2,n=0;for(;t&&t!==s;)r+=t.offsetLeft,n+=t.offsetTop,t=t.parentNode;r+e.offsetWidth>document.body.offsetWidth-5&&(r=Math.max(5,r-i-e.offsetWidth+6)),super.post(r,n)}display(){this.baseMenu.frame.appendChild(this.html)}setBaseMenu(){let t=this;do{t=t.anchor.menu}while(t instanceof ku);this.baseMenu=t}left(t){this.focused=null,this.anchor.focus()}toJson(){return{type:""}}}class Au extends lu{constructor(t){super(),this.element=t,this.className=pu.MENUCLOSE,this.role="button"}generateHtml(){const t=document.createElement("span");t.classList.add(this.className),t.setAttribute("role",this.role),t.setAttribute("tabindex","0");const e=document.createElement("span");e.textContent="\xd7",t.appendChild(e),this.html=t}display(){}unpost(){super.unpost(),this.element.unpost()}keydown(t){this.bubbleKey(),super.keydown(t)}space(t){this.unpost(),this.stop(t)}mousedown(t){this.unpost(),this.stop(t)}}class Mu extends lu{constructor(t,e,s){super(),this.title=t,this.signature=s,this.className=pu.INFO,this.role="dialog",this.contentDiv=this.generateContent(),this.close=this.generateClose(),this.content=e||function(){return""}}attachMenu(t){this.menu=t}generateHtml(){super.generateHtml();const t=this.html;t.appendChild(this.generateTitle()),t.appendChild(this.contentDiv),t.appendChild(this.generateSignature()),t.appendChild(this.close.html),t.setAttribute("tabindex","0")}post(){super.post();const t=document.documentElement,e=this.html,s=window.innerHeight||t.clientHeight||t.scrollHeight||0,i=Math.floor(-e.offsetWidth/2),r=Math.floor((s-e.offsetHeight)/3);e.setAttribute("style","margin-left: "+i+"px; top: "+r+"px;"),window.event instanceof MouseEvent&&e.classList.add(pu.MOUSEPOST),e.focus()}display(){this.menu.registerWidget(this),this.contentDiv.innerHTML=this.content();const t=this.menu.html;t.parentNode&&t.parentNode.removeChild(t),this.menu.frame.appendChild(this.html)}click(t){}keydown(t){this.bubbleKey(),super.keydown(t)}escape(t){this.unpost()}unpost(){super.unpost(),this.html.classList.remove(pu.MOUSEPOST),this.menu.unregisterWidget(this)}generateClose(){const t=new Au(this),e=t.html;return e.classList.add(pu.INFOCLOSE),e.setAttribute("aria-label","Close Dialog Box"),t}generateTitle(){const t=document.createElement("span");return t.innerHTML=this.title,t.classList.add(pu.INFOTITLE),t}generateContent(){const t=document.createElement("div");return t.classList.add(pu.INFOCONTENT),t.setAttribute("tabindex","0"),t}generateSignature(){const t=document.createElement("span");return t.innerHTML=this.signature,t.classList.add(pu.INFOSIGNATURE),t}toJson(){return{type:""}}}class Lu extends xu{generateHtml(){super.generateHtml();const t=this.html;this.span||this.generateSpan(),t.appendChild(this.span),this.update()}register(){this.variable.register(this)}unregister(){this.variable.unregister(this)}update(){this.updateAria(),this.span&&this.updateSpan()}}class Iu extends Lu{static fromJson(t,{content:e,variable:s,id:i},r){return new this(r,e,s,i)}constructor(t,e,s,i){super(t,"radio",e,i),this.role="menuitemradio",this.variable=t.pool.lookup(s),this.register()}executeAction(){this.variable.setValue(this.id),gu(this)}generateSpan(){this.span=document.createElement("span"),this.span.textContent="\u2713",this.span.classList.add(pu.MENURADIOCHECK)}updateAria(){this.html.setAttribute("aria-checked",this.variable.getValue()===this.id?"true":"false")}updateSpan(){this.span.style.display=this.variable.getValue()===this.id?"":"none"}toJson(){return{type:""}}}class Su extends fu{static fromJson(t,e,s){return new this(s)}constructor(t){super(t,"rule"),this.className=pu.MENUITEM,this.role="separator"}generateHtml(){super.generateHtml();const t=this.html;t.classList.add(pu.MENURULE),t.setAttribute("aria-orientation","vertical")}addEvents(t){}toJson(){return{type:"rule"}}}class Ru extends xu{static fromJson(t,{content:e,action:s,id:i},r){return new this(r,e,s,i)}constructor(t,e,s,i){super(t,"command",e,i),this.command=s}executeAction(){try{this.command(bu(this))}catch(t){Eu(0,"Illegal command callback.")}gu(this)}toJson(){return{type:""}}}class Ou{static fromJson(t,{name:e,getter:s,setter:i},r){const n=new this(e,s,i);r.insert(n)}constructor(t,e,s){this._name=t,this.getter=e,this.setter=s,this.items=[]}get name(){return this._name}getValue(t){try{return this.getter(t)}catch(t){return Eu(0,"Command of variable "+this.name+" failed."),null}}setValue(t,e){try{this.setter(t,e)}catch(t){Eu(0,"Command of variable "+this.name+" failed.")}this.update()}register(t){-1===this.items.indexOf(t)&&this.items.push(t)}unregister(t){const e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1)}update(){this.items.forEach((t=>t.update()))}registerCallback(t){this.items.forEach((e=>e.registerCallback(t)))}unregisterCallback(t){this.items.forEach((e=>e.unregisterCallback(t)))}toJson(){return{type:"variable",name:this.name,getter:this.getter.toString(),setter:this.setter.toString()}}}class Du extends Lu{static fromJson(t,{content:e,variable:s,id:i},r){return new this(r,e,s,i)}constructor(t,e,s,i){super(t,"checkbox",e,i),this.role="menuitemcheckbox",this.variable=t.pool.lookup(s),this.register()}executeAction(){this.variable.setValue(!this.variable.getValue()),gu(this)}generateSpan(){this.span=document.createElement("span"),this.span.textContent="\u2713",this.span.classList.add(pu.MENUCHECK)}updateAria(){this.html.setAttribute("aria-checked",this.variable.getValue()?"true":"false")}updateSpan(){this.span.style.display=this.variable.getValue()?"":"none"}toJson(){return{type:""}}}class Pu extends Lu{static fromJson(t,{content:e,variable:s,id:i},r){return new this(r,e,s,i)}constructor(t,e,s,i){super(t,"combobox",e,i),this.role="combobox",this.inputEvent=!1,this.variable=t.pool.lookup(s),this.register()}executeAction(){this.variable.setValue(this.input.value,bu(this))}space(t){super.space(t),gu(this)}focus(){super.focus(),this.input.focus()}unfocus(){super.unfocus(),this.updateSpan()}generateHtml(){super.generateHtml();this.html.classList.add(pu.MENUCOMBOBOX)}generateSpan(){this.span=document.createElement("span"),this.span.classList.add(pu.MENUINPUTBOX),this.input=document.createElement("input"),this.input.addEventListener("keydown",this.inputKey.bind(this)),this.input.setAttribute("size","10em"),this.input.setAttribute("type","text"),this.input.setAttribute("tabindex","-1"),this.span.appendChild(this.input)}inputKey(t){this.bubbleKey(),this.inputEvent=!0}keydown(t){if(this.inputEvent&&t.keyCode!==Zd.ESCAPE&&t.keyCode!==Zd.RETURN)return this.inputEvent=!1,void t.stopPropagation();super.keydown(t),t.stopPropagation()}updateAria(){}updateSpan(){let t;try{t=this.variable.getValue(bu(this))}catch(e){t=""}this.input.value=t}toJson(){return{type:""}}}class Bu extends xu{static fromJson(t,{content:e,id:s},i){return new this(i,e,s)}constructor(t,e,s){super(t,"label",e,s)}generateHtml(){super.generateHtml();this.html.classList.add(pu.MENULABEL)}toJson(){return{type:""}}}class Fu extends Lu{static fromJson(t,{content:e,variable:s,id:i},r){return new this(r,e,s,i)}constructor(t,e,s,i){super(t,"slider",e,i),this.role="slider",this.labelId="ctx_slideLabel"+Nu(),this.valueId="ctx_slideValue"+Nu(),this.inputEvent=!1,this.variable=t.pool.lookup(s),this.register()}executeAction(){this.variable.setValue(this.input.value,bu(this)),this.update()}space(t){super.space(t),gu(this)}focus(){super.focus(),this.input.focus()}unfocus(){super.unfocus(),this.updateSpan()}generateHtml(){super.generateHtml();this.html.classList.add(pu.MENUSLIDER),this.valueSpan=document.createElement("span"),this.valueSpan.setAttribute("id",this.valueId),this.valueSpan.classList.add(pu.SLIDERVALUE),this.html.appendChild(this.valueSpan)}generateSpan(){this.span=document.createElement("span"),this.labelSpan=document.createElement("span"),this.labelSpan.setAttribute("id",this.labelId),this.labelSpan.appendChild(this.html.childNodes[0]),this.html.appendChild(this.labelSpan),this.input=document.createElement("input"),this.input.setAttribute("type","range"),this.input.setAttribute("min","0"),this.input.setAttribute("max","100"),this.input.setAttribute("aria-valuemin","0"),this.input.setAttribute("aria-valuemax","100"),this.input.setAttribute("aria-labelledby",this.labelId),this.input.addEventListener("keydown",this.inputKey.bind(this)),this.input.addEventListener("input",this.executeAction.bind(this)),this.input.classList.add(pu.SLIDERBAR),this.span.appendChild(this.input)}inputKey(t){this.inputEvent=!0}mousedown(t){t.stopPropagation()}mouseup(t){event.stopPropagation()}keydown(t){const e=t.keyCode;return e===Zd.UP||e===Zd.DOWN?(t.preventDefault(),void super.keydown(t)):this.inputEvent&&e!==Zd.ESCAPE&&e!==Zd.RETURN?(this.inputEvent=!1,void t.stopPropagation()):(super.keydown(t),void t.stopPropagation())}updateAria(){const t=this.variable.getValue();t&&this.input&&(this.input.setAttribute("aria-valuenow",t),this.input.setAttribute("aria-valuetext",t+"%"))}updateSpan(){let t;try{t=this.variable.getValue(bu(this)),this.valueSpan.innerHTML=t+"%"}catch(e){t=""}this.input.value=t}toJson(){return{type:""}}}class ju extends Cu{static fromJson(t,{title:e,values:s,variable:i},r){const n=new this(r),o=t.get("label")(t,{content:e||"",id:e||"id"},n),a=t.get("rule")(t,{},n),c=s.map((e=>t.get("radio")(t,{content:e,variable:i,id:e},n))),l=[o,a].concat(c);return n.items=l,n}constructor(t){super(),this.anchor=t,this.className=pu.SELECTIONMENU,this.variablePool=this.anchor.menu.pool,this.baseMenu=this.anchor.menu}generateHtml(){super.generateHtml(),this.items.forEach((t=>t.html.classList.add(pu.SELECTIONITEM)))}display(){}right(t){this.anchor.right(t)}left(t){this.anchor.left(t)}}class Uu extends Mu{static fromJson(t,{title:e,signature:s,selections:i,order:r,grid:n},o){const a=new this(e,s,r,n);a.attachMenu(o);const c=i.map((e=>t.get("selectionMenu")(t,e,a)));return a.selections=c,a}constructor(t,e,s="none",i="vertical"){super(t,null,e),this.style=s,this.grid=i,this._selections=[],this.prefix="ctxt-selection",this._balanced=!0}attachMenu(t){this.menu=t}get selections(){return this._selections}set selections(t){this._selections=[],t.forEach((t=>this.addSelection(t)))}addSelection(t){t.anchor=this,this._selections.push(t)}rowDiv(t){const e=document.createElement("div");this.contentDiv.appendChild(e);const s=t.map((t=>(e.appendChild(t.html),t.html.id||(t.html.id=this.prefix+Nu()),t.html.getBoundingClientRect()))),i=s.map((t=>t.width)),r=i.reduce(((t,e)=>t+e),0),n=s.reduce(((t,e)=>Math.max(t,e.height)),0);return e.classList.add(pu.SELECTIONDIVIDER),e.setAttribute("style","height: "+n+"px;"),[e,r,n,i]}display(){if(super.display(),this.order(),!this.selections.length)return;const t=[];let e=0,s=[];const i=this.getChunkSize(this.selections.length);for(let r=0;rt.html.style.height=c+"px")),s=this.combineColumn(s,l)}this._balanced&&(this.balanceColumn(t,s),e=s.reduce(((t,e)=>t+e),20)),t.forEach((t=>t.style.width=e+"px"))}getChunkSize(t){switch(this.grid){case"square":return Math.floor(Math.sqrt(t));case"horizontal":return Math.floor(t/Uu.chunkSize);default:return Uu.chunkSize}}balanceColumn(t,e){t.forEach((t=>{const s=Array.from(t.children);for(let t,i=0;t=s[i];i++)t.style.width=e[i]+"px"}))}combineColumn(t,e){let s=[],i=0;for(;t[i]||e[i];){if(!t[i]){s=s.concat(e.slice(i));break}if(!e[i]){s=s.concat(t.slice(i));break}s.push(Math.max(t[i],e[i])),i++}return s}left(t){this.move(t,(t=>(0===t?this.selections.length:t)-1))}right(t){this.move(t,(t=>t===this.selections.length-1?0:t+1))}generateHtml(){super.generateHtml(),this.html.classList.add(pu.SELECTION)}generateContent(){const t=super.generateContent();return t.classList.add(pu.SELECTIONBOX),t.removeAttribute("tabindex"),t}findSelection(t){const e=t.target;let s=null;if(e.id&&(s=this.selections.find((t=>t.html.id===e.id))),!s){const t=e.parentElement.id;s=this.selections.find((e=>e.html.id===t))}return s}move(t,e){const s=this.findSelection(t);s.focused&&s.focused.unfocus();const i=e(this.selections.indexOf(s));this.selections[i].focus()}order(){this.selections.sort(Uu.orderMethod.get(this.style))}toJson(){return{type:""}}}Uu.chunkSize=4,Uu.orderMethod=new Map([["alphabetical",(t,e)=>t.items[0].content.localeCompare(e.items[0].content)],["none",(t,e)=>1],["decreasing",(t,e)=>{const s=t.items.length,i=e.items.length;return s{const s=t.items.length,i=e.items.length;return sthis.factory.add(t,e)))}get factory(){return this._factory}items(t,e,s){const i=[];for(const t of e){const e=this.parse(t,s);e&&(s.items.push(e),t.disabled&&e.disable(),t.hidden&&i.push(e))}return i.forEach((t=>t.hide())),s.items}parse(t,...e){var{type:s}=t,i=Hu(t,["type"]);const r=this.factory.get(s);return r?r(this.factory,i,...e):null}}function zu(t){return"."+(pu[t]||t)}const Xu={};Xu[zu("INFOCLOSE")]="{ top:.2em; right:.2em;}",Xu[zu("INFOCONTENT")]="{ overflow:auto; text-align:left; font-size:80%; padding:.4em .6em; border:1px inset; margin:1em 0px; max-height:20em; max-width:30em; background-color:#EEEEEE; white-space:normal;}",Xu[zu("INFO")+zu("MOUSEPOST")]="{outline:none;}",Xu[zu("INFO")]='{ position:fixed; left:50%; width:auto; text-align:center; border:3px outset; padding:1em 2em; background-color:#DDDDDD; color:black; cursor:default; font-family:message-box; font-size:120%; font-style:normal; text-indent:0; text-transform:none; line-height:normal; letter-spacing:normal; word-spacing:normal; word-wrap:normal; white-space:nowrap; float:none; z-index:201; border-radius: 15px; /* Opera 10.5 and IE9 */ -webkit-border-radius:15px; /* Safari and Chrome */ -moz-border-radius:15px; /* Firefox */ -khtml-border-radius:15px; /* Konqueror */ box-shadow:0px 10px 20px #808080; /* Opera 10.5 and IE9 */ -webkit-box-shadow:0px 10px 20px #808080; /* Safari 3 & Chrome */ -moz-box-shadow:0px 10px 20px #808080; /* Forefox 3.5 */ -khtml-box-shadow:0px 10px 20px #808080; /* Konqueror */ filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color="gray", Positive="true"); /* IE */}';const Vu={};Vu[zu("MENU")]="{ position:absolute; background-color:white; color:black; width:auto; padding:5px 0px; border:1px solid #CCCCCC; margin:0; cursor:default; font: menu; text-align:left; text-indent:0; text-transform:none; line-height:normal; letter-spacing:normal; word-spacing:normal; word-wrap:normal; white-space:nowrap; float:none; z-index:201; border-radius: 5px; /* Opera 10.5 and IE9 */ -webkit-border-radius: 5px; /* Safari and Chrome */ -moz-border-radius: 5px; /* Firefox */ -khtml-border-radius: 5px; /* Konqueror */ box-shadow:0px 10px 20px #808080; /* Opera 10.5 and IE9 */ -webkit-box-shadow:0px 10px 20px #808080; /* Safari 3 & Chrome */ -moz-box-shadow:0px 10px 20px #808080; /* Forefox 3.5 */ -khtml-box-shadow:0px 10px 20px #808080; /* Konqueror */}",Vu[zu("MENUITEM")]="{ padding: 1px 2em; background:transparent;}",Vu[zu("MENUARROW")]="{ position:absolute; right:.5em; padding-top:.25em; color:#666666; font-family: null; font-size: .75em}",Vu[zu("MENUACTIVE")+" "+zu("MENUARROW")]="{color:white}",Vu[zu("MENUARROW")+zu("RTL")]="{left:.5em; right:auto}",Vu[zu("MENUCHECK")]="{ position:absolute; left:.7em; font-family: null}",Vu[zu("MENUCHECK")+zu("RTL")]="{ right:.7em; left:auto }",Vu[zu("MENURADIOCHECK")]="{ position:absolute; left: .7em;}",Vu[zu("MENURADIOCHECK")+zu("RTL")]="{ right: .7em; left:auto}",Vu[zu("MENUINPUTBOX")]="{ padding-left: 1em; right:.5em; color:#666666; font-family: null;}",Vu[zu("MENUINPUTBOX")+zu("RTL")]="{ left: .1em;}",Vu[zu("MENUCOMBOBOX")]="{ left:.1em; padding-bottom:.5em;}",Vu[zu("MENUSLIDER")]="{ left: .1em;}",Vu[zu("SLIDERVALUE")]="{ position:absolute; right:.1em; padding-top:.25em; color:#333333; font-size: .75em}",Vu[zu("SLIDERBAR")]="{ outline: none; background: #d3d3d3}",Vu[zu("MENULABEL")]="{ padding: 1px 2em 3px 1.33em; font-style:italic}",Vu[zu("MENURULE")]="{ border-top: 1px solid #DDDDDD; margin: 4px 3px;}",Vu[zu("MENUDISABLED")]="{ color:GrayText}",Vu[zu("MENUACTIVE")]="{ background-color: #606872; color: white;}",Vu[zu("MENUDISABLED")+":focus"]="{ background-color: #E8E8E8}",Vu[zu("MENULABEL")+":focus"]="{ background-color: #E8E8E8}",Vu[zu("CONTEXTMENU")+":focus"]="{ outline:none}",Vu[zu("CONTEXTMENU")+" "+zu("MENUITEM")+":focus"]="{ outline:none}",Vu[zu("SELECTIONMENU")]="{ position:relative; float:left; border-bottom: none; -webkit-box-shadow:none; -webkit-border-radius:0px; }",Vu[zu("SELECTIONITEM")]="{ padding-right: 1em;}",Vu[zu("SELECTION")]="{ right: 40%; width:50%; }",Vu[zu("SELECTIONBOX")]="{ padding: 0em; max-height:20em; max-width: none; background-color:#FFFFFF;}",Vu[zu("SELECTIONDIVIDER")]="{ clear: both; border-top: 2px solid #000000;}",Vu[zu("MENU")+" "+zu("MENUCLOSE")]="{ top:-10px; left:-10px}";const Gu={};Gu[zu("MENUCLOSE")]='{ position:absolute; cursor:pointer; display:inline-block; border:2px solid #AAA; border-radius:18px; -webkit-border-radius: 18px; /* Safari and Chrome */ -moz-border-radius: 18px; /* Firefox */ -khtml-border-radius: 18px; /* Konqueror */ font-family: "Courier New", Courier; font-size:24px; color:#F0F0F0}',Gu[zu("MENUCLOSE")+" span"]="{ display:block; background-color:#AAA; border:1.5px solid; border-radius:18px; -webkit-border-radius: 18px; /* Safari and Chrome */ -moz-border-radius: 18px; /* Firefox */ -khtml-border-radius: 18px; /* Konqueror */ line-height:0; padding:8px 0 6px /* may need to be browser-specific */}",Gu[zu("MENUCLOSE")+":hover"]="{ color:white!important; border:2px solid #CCC!important}",Gu[zu("MENUCLOSE")+":hover span"]="{ background-color:#CCC!important}",Gu[zu("MENUCLOSE")+":hover:focus"]="{ outline:none}";let Ju=!1,Ku=!1,$u=!1;function Yu(t){$u||(Qu(Gu,t),$u=!0)}function Qu(t,e){const s=e||document,i=s.createElement("style");i.type="text/css";let r="";for(const e in t)r+=e,r+=" ",r+=t[e],r+="\n";i.innerHTML=r,s.head.appendChild(i)}class Zu extends wu{constructor(){super(...arguments),this.mathItem=null,this.nofocus=!1,this.errorMsg=""}post(t,e){var s,i;if(this.mathItem){const r=null===(i=null===(s=this.mathItem)||void 0===s?void 0:s.explorers)||void 0===i?void 0:i.speech;(null==r?void 0:r.active)&&(r.restarted=r.semanticFocus()),void 0!==e&&(this.getOriginalMenu(),this.getSemanticsMenu(),this.getSpeechMenu(),this.getBrailleMenu(),this.getSvgMenu(),this.getErrorMessage(),this.dynamicSubmenus()),super.post(t,e)}}unpost(){super.unpost(),this.mathItem&&(this.mathItem.outputData.nofocus=this.nofocus),this.mathItem=null,this.nofocus=!1}findID(...t){let e=this,s=null;for(const i of t){if(!e)return null;for(s of e.items){if(s.id===i){e=s instanceof vu?s.submenu:null;break}e=s=null}}return s}setJax(t){this.jax=t}getOriginalMenu(){const t=this.mathItem.inputJax.name,e=this.findID("Show","Original");e.content="MathML"===t?"Original MathML":t+" Commands";this.findID("Copy","Original").content=e.content}getSemanticsMenu(){const t=this.findID("Settings","MathmlIncludes","semantics");"MathML"===this.mathItem.inputJax.name?t.disable():t.enable()}getSpeechMenu(){const t=this.mathItem.outputData.speech;this.findID("Show","Speech")[t?"enable":"disable"](),this.findID("Copy","Speech")[t?"enable":"disable"]()}getBrailleMenu(){const t=this.mathItem.outputData.braille;this.findID("Show","Braille")[t?"enable":"disable"](),this.findID("Copy","Braille")[t?"enable":"disable"]()}getSvgMenu(){const t=this.jax.SVG;this.findID("Show","SVG")[t?"enable":"disable"](),this.findID("Copy","SVG")[t?"enable":"disable"]()}getErrorMessage(){const t=this.mathItem.root.childNodes[0].childNodes;let e=!0;if(this.errorMsg="",1===t.length&&t[0].isKind("merror")){const s=t[0].attributes;this.errorMsg=s.get("data-mjx-error")||s.get("data-mjx-message")||"",e=!this.errorMsg}this.findID("Show","Error")[e?"disable":"enable"](),this.findID("Copy","Error")[e?"disable":"enable"]()}dynamicSubmenus(){for(const[t,[e,s]]of Zu.DynamicSubmenus){const i=this.find(t);i&&e(this,i,(t=>{var e;i.submenu=t,!(null===(e=null==t?void 0:t.items)||void 0===e?void 0:e.length)||s&&!this.settings[s]?i.disable():i.enable()}))}}}var tp,ep,sp;Zu.DynamicSubmenus=new Map,function(t){t.DOMAIN="domain",t.STYLE="style",t.LOCALE="locale",t.TOPIC="topic",t.MODALITY="modality"}(tp||(tp={}));class ip{static createProp(...t){const e=rp.DEFAULT_ORDER,s={};for(let i=0,r=t.length,n=e.length;it.push(this.getProperty(e).slice()))),t}toString(){const t=[];return this.order.forEach((e=>t.push(e+": "+this.getProperty(e).toString()))),t.join("\n")}}class rp extends ip{static createCstr(...t){const e=rp.DEFAULT_ORDER,s={};for(let i=0,r=t.length,n=e.length;i{const s=e.indexOf(t);return-1!==s&&e.splice(s,1)}))}constructor(t,e){const s={};for(const[e,i]of Object.entries(t))s[e]=[i];super(s,e),this.components=t}getComponents(){return this.components}getValue(t){return this.components[t]}getValues(){return this.order.map((t=>this.getValue(t)))}allProperties(){const t=super.allProperties();for(let e,s,i=0;e=t[i],s=this.order[i];i++){const t=this.getValue(s);-1===e.indexOf(t)&&e.unshift(t)}return t}toString(){return this.getValues().join(".")}equal(t){const e=t.getAxes();if(this.order.length!==e.length)return!1;for(let s,i=0;s=e[i];i++){const e=this.getValue(s);if(!e||t.getValue(s)!==e)return!1}return!0}}rp.DEFAULT_ORDER=[tp.LOCALE,tp.MODALITY,tp.DOMAIN,tp.STYLE,tp.TOPIC],rp.BASE_LOCALE="base",rp.DEFAULT_VALUE="default",rp.DEFAULT_VALUES={[tp.LOCALE]:"en",[tp.DOMAIN]:rp.DEFAULT_VALUE,[tp.STYLE]:rp.DEFAULT_VALUE,[tp.TOPIC]:rp.DEFAULT_VALUE,[tp.MODALITY]:"speech"};class np{constructor(t){this.order=t}parse(t){const e=t.split("."),s={};if(e.length>this.order.length)throw new Error("Invalid dynamic constraint: "+s);let i=0;for(let t,r=0;t=this.order[r],e.length;r++,i++){const i=e.shift();s[t]=i}return new rp(s,this.order.slice(0,i))}}class op{constructor(t,e=new ip(t.getProperties(),t.getOrder())){this.reference=t,this.fallback=e,this.order=this.reference.getOrder()}getReference(){return this.reference}setReference(t,e){this.reference=t,this.fallback=e||new ip(t.getProperties(),t.getOrder()),this.order=this.reference.getOrder()}match(t){const e=t.getAxes();return e.length===this.reference.getAxes().length&&e.every((e=>{const s=t.getValue(e);return s===this.reference.getValue(e)||-1!==this.fallback.getProperty(e).indexOf(s)}))}compare(t,e){let s=!1;for(let i,r=0;i=this.order[r];r++){const r=t.getValue(i),n=e.getValue(i);if(!s){const t=this.reference.getValue(i);if(t===r&&t!==n)return-1;if(t===n&&t!==r)return 1;if(t===r&&t===n)continue;t!==r&&t!==n&&(s=!0)}const o=this.fallback.getProperty(i),a=o.indexOf(r),c=o.indexOf(n);if(a{}){this.fileHandle.then((()=>{this.isActive_&&this.stream_&&this.stream_.end("","",t)}))}constructor(){this.isActive_=!1,this.fileHandle=Promise.resolve(),this.stream_=null}startDebugFile_(t){this.fileHandle=lp.f.fs.promises.open(t,"w"),this.fileHandle=this.fileHandle.then((e=>{this.stream_=e.createWriteStream(t),this.outputFunction=function(...t){this.stream_.write(t.join(" ")),this.stream_.write("\n")}.bind(this),this.stream_.on("error",function(t){console.info("Invalid log file. Debug information sent to console."),this.outputFunction=console.info}.bind(this)),this.stream_.on("finish",(function(){console.info("Finalizing debug file.")}))}))}output_(t){this.stream_?this.fileHandle.then((()=>this.outputFunction.apply(this.outputFunction,["Speech Rule Engine Debugger:"].concat(t)))):console.info.apply(console,["Speech Rule Engine Debugger:"].concat(t))}}var up=__webpack_require__(680);class pp{constructor(t={}){this.delay=!1,this.domain="clearspeak",this.style=rp.DEFAULT_VALUES[tp.STYLE],this.locale=rp.DEFAULT_VALUES[tp.LOCALE],this.subiso="",this.modality=rp.DEFAULT_VALUES[tp.MODALITY],this.speech=ap.NONE,this.markup=cp.NONE,this.mark=!0,this.automark=!1,this.character=!0,this.cleanpause=!0,this.cayleyshort=!0,this.linebreaks=!1,this.rate="100",this.walker="Table",this.structure=!1,this.aria=!1,this.tree=!1,this.strict=!1,this.pprint=!1,this.rules="",this.prune="",this.set(t)}set(t){this.ensureDomain(t);for(const[e,s]of Object.entries(t))(pp.BINARY_FEATURES.includes(e)||pp.STRING_FEATURES.includes(e))&&(this[e]=s)}json(){const t={};return[].concat(pp.STRING_FEATURES,pp.BINARY_FEATURES).forEach((e=>t[e]=this[e])),t}ensureDomain(t){if(t.modality&&"speech"!==t.modality||!t.modality&&"speech"!==this.modality)return;if(!t.domain&&!t.locale)return;if("default"===t.domain)return void(t.domain="mathspeak");const e=t.locale||this.locale,s=t.domain||this.domain;-1===mp.indexOf(e)||"mathspeak"===s?"en"!==e?"mathspeak"!==s&&"clearspeak"!==s&&(t.domain="mathspeak"):-1===fp.indexOf(s)&&(t.domain="mathspeak"):t.domain="mathspeak"}}pp.BINARY_FEATURES=["automark","mark","character","cleanpause","strict","structure","aria","pprint","cayleyshort","linebreaks","tree"],pp.STRING_FEATURES=["markup","style","domain","speech","walker","locale","delay","modality","rate","rules","subiso","prune"];const mp=["ca","da","es"],fp=["chromevox","clearspeak","mathspeak","emacspeak","html"];class gp extends Error{constructor(t=""){super(),this.message=t,this.name="SRE Error"}}class bp{set defaultLocale(t){this._defaultLocale=up.u.ensureLocale(t,this._defaultLocale)}get defaultLocale(){return this._defaultLocale}static getInstance(){return bp.instance=bp.instance||new bp,bp.instance}static defaultEvaluator(t,e){return t}static evaluateNode(t){return bp.nodeEvaluator(t)}getRate(){const t=parseInt(this.options.rate,10);return isNaN(t)?100:t}setDynamicCstr(t){if(this.defaultLocale&&(rp.DEFAULT_VALUES[tp.LOCALE]=this.defaultLocale),t){const e=Object.keys(t);for(let s=0;s [ \f\n\r\t\v\u200b]+<").trim()}(t),i=!!s.match(/&(?!lt|gt|amp|quot|apos)\w+;/g);if(!s)throw new Error("Empty input!");try{const t=e.parseFromString(s,i?"text/html":"text/xml");return bp.getInstance().mode===ep.HTTP?(Np.currentDocument=t,i?t.body.childNodes[0]:t.documentElement):t.documentElement}catch(t){throw new gp("Illegal input: "+t.message)}}var wp;function kp(t,e){t.parentNode&&(t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t))}function Ap(t){return lp.f.document.createElement(t)}function Mp(t){let e="",s=/(>)(<)(\/*)/g,i=0,r=(t=t.replace(s,"$1\r\n$2$3")).split("\r\n");for(s=/(\.)*(<)(\/*)/g,r=r.map((t=>t.replace(s,"$1\r\n$2$3").split("\r\n"))).reduce(((t,e)=>t.concat(e)),[]);r.length;){let t=r.shift();if(!t)continue;let s=0;if(t.match(/^<\w[^>/]*>[^>]+$/)){const e=Lp(t,r[0]);e[0]?e[1]?(t+=r.shift().slice(0,-e[1].length),e[1].trim()&&r.unshift(e[1])):t+=r.shift():s=1}else if(t.match(/^<\/\w/))0!==i&&(i-=1);else if(t.match(/^<\w[^>]*[^/]>.*$/))s=1;else if(t.match(/^<\w[^>]*\/>.+$/)){const e=t.indexOf(">")+1,s=t.slice(e);s.trim()&&r.unshift(),t=t.slice(0,e)+s}else s=0;e+=new Array(i+1).join(" ")+t+"\r\n",i+=s}return e}function Lp(t,e){if(!e)return[!1,""];const s=t.match(/^<([^> ]+).*>/),i=e.match(/^<\/([^>]+)>(.*)/);return s&&i&&s[1]===i[1]?[!0,i[2]]:[!1,""]}function Ip(t){return t.tagName.toUpperCase()}function Sp(t){return(new lp.f.xmldom.XMLSerializer).serializeToString(t)}!function(t){t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t[t.NOTATION_NODE=12]="NOTATION_NODE"}(wp||(wp={}));class Rp{constructor(t,e,s){this.domain=t,this.name=e,this.func=s,this.active=!1}annotate(t){t.childNodes.forEach(this.annotate.bind(this)),t.contentNodes.forEach(this.annotate.bind(this)),t.addAnnotation(this.domain,this.func(t))}}class Op{constructor(t,e,s,i={}){this.domain=t,this.name=e,this.func=s,this.def=i,this.active=!1}visit(t,e){let s=this.func(t,e);t.addAnnotation(this.domain,s[0]);for(let e,i=0;e=t.childNodes[i];i++)s=this.visit(e,s[1]);for(let e,i=0;e=t.contentNodes[i];i++)s=this.visit(e,s[1]);return s}}const Dp=new Map,Pp=new Map;function Bp(t){const e=t.domain+":"+t.name;t instanceof Rp?Dp.set(e,t):Pp.set(e,t)}function Fp(t,e){const s=t+":"+e,i=Dp.get(s)||Pp.get(s);i&&(i.active=!0)}var jp,Up,qp;function Hp(t){const e=t.toString(16).toUpperCase();return e.length>3?e:("000"+e).slice(-4)}function Wp([t,e],s){const i=parseInt(t,16),r=parseInt(e,16),n=[];for(let t=i;t<=r;t++){let e=Hp(t);!1!==s[e]&&(e=s[e]||e,n.push(e))}return n}function zp(t,e={}){return Wp(t,e).map((t=>String.fromCodePoint(parseInt(t,16))))}!function(t){t.BOLD="bold",t.BOLDFRAKTUR="bold-fraktur",t.BOLDITALIC="bold-italic",t.BOLDSCRIPT="bold-script",t.DOUBLESTRUCK="double-struck",t.DOUBLESTRUCKITALIC="double-struck-italic",t.FULLWIDTH="fullwidth",t.FRAKTUR="fraktur",t.ITALIC="italic",t.MONOSPACE="monospace",t.NORMAL="normal",t.SCRIPT="script",t.SANSSERIF="sans-serif",t.SANSSERIFITALIC="sans-serif-italic",t.SANSSERIFBOLD="sans-serif-bold",t.SANSSERIFBOLDITALIC="sans-serif-bold-italic"}(jp||(jp={})),function(t){t.SUPER="super",t.SUB="sub",t.CIRCLED="circled",t.PARENTHESIZED="parenthesized",t.PERIOD="period",t.NEGATIVECIRCLED="negative-circled",t.DOUBLECIRCLED="double-circled",t.CIRCLEDSANSSERIF="circled-sans-serif",t.NEGATIVECIRCLEDSANSSERIF="negative-circled-sans-serif",t.COMMA="comma",t.SQUARED="squared",t.NEGATIVESQUARED="negative-squared"}(Up||(Up={})),function(t){t.LATINCAP="latinCap",t.LATINSMALL="latinSmall",t.GREEKCAP="greekCap",t.GREEKSMALL="greekSmall",t.DIGIT="digit"}(qp||(qp={}));const Xp=[{interval:["1D400","1D419"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.BOLD},{interval:["1D41A","1D433"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.BOLD},{interval:["1D56C","1D585"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.BOLDFRAKTUR},{interval:["1D586","1D59F"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.BOLDFRAKTUR},{interval:["1D468","1D481"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.BOLDITALIC},{interval:["1D482","1D49B"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.BOLDITALIC},{interval:["1D4D0","1D4E9"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.BOLDSCRIPT},{interval:["1D4EA","1D503"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.BOLDSCRIPT},{interval:["1D538","1D551"],base:qp.LATINCAP,subst:{"1D53A":"2102","1D53F":"210D","1D545":"2115","1D547":"2119","1D548":"211A","1D549":"211D","1D551":"2124"},capital:!0,category:"Lu",font:jp.DOUBLESTRUCK},{interval:["1D552","1D56B"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.DOUBLESTRUCK},{interval:["1D504","1D51D"],base:qp.LATINCAP,subst:{"1D506":"212D","1D50B":"210C","1D50C":"2111","1D515":"211C","1D51D":"2128"},capital:!0,category:"Lu",font:jp.FRAKTUR},{interval:["1D51E","1D537"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.FRAKTUR},{interval:["FF21","FF3A"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.FULLWIDTH},{interval:["FF41","FF5A"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.FULLWIDTH},{interval:["1D434","1D44D"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.ITALIC},{interval:["1D44E","1D467"],base:qp.LATINSMALL,subst:{"1D455":"210E"},capital:!1,category:"Ll",font:jp.ITALIC},{interval:["1D670","1D689"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.MONOSPACE},{interval:["1D68A","1D6A3"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.MONOSPACE},{interval:["0041","005A"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.NORMAL},{interval:["0061","007A"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.NORMAL},{interval:["1D49C","1D4B5"],base:qp.LATINCAP,subst:{"1D49D":"212C","1D4A0":"2130","1D4A1":"2131","1D4A3":"210B","1D4A4":"2110","1D4A7":"2112","1D4A8":"2133","1D4AD":"211B"},capital:!0,category:"Lu",font:jp.SCRIPT},{interval:["1D4B6","1D4CF"],base:qp.LATINSMALL,subst:{"1D4BA":"212F","1D4BC":"210A","1D4C4":"2134"},capital:!1,category:"Ll",font:jp.SCRIPT},{interval:["1D5A0","1D5B9"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.SANSSERIF},{interval:["1D5BA","1D5D3"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.SANSSERIF},{interval:["1D608","1D621"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.SANSSERIFITALIC},{interval:["1D622","1D63B"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.SANSSERIFITALIC},{interval:["1D5D4","1D5ED"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.SANSSERIFBOLD},{interval:["1D5EE","1D607"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.SANSSERIFBOLD},{interval:["1D63C","1D655"],base:qp.LATINCAP,subst:{},capital:!0,category:"Lu",font:jp.SANSSERIFBOLDITALIC},{interval:["1D656","1D66F"],base:qp.LATINSMALL,subst:{},capital:!1,category:"Ll",font:jp.SANSSERIFBOLDITALIC},{interval:["0391","03A9"],base:qp.GREEKCAP,subst:{"03A2":"03F4"},capital:!0,category:"Lu",font:jp.NORMAL},{interval:["03B0","03D0"],base:qp.GREEKSMALL,subst:{"03B0":"2207","03CA":"2202","03CB":"03F5","03CC":"03D1","03CD":"03F0","03CE":"03D5","03CF":"03F1","03D0":"03D6"},capital:!1,category:"Ll",font:jp.NORMAL},{interval:["1D6A8","1D6C0"],base:qp.GREEKCAP,subst:{},capital:!0,category:"Lu",font:jp.BOLD},{interval:["1D6C1","1D6E1"],base:qp.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:jp.BOLD},{interval:["1D6E2","1D6FA"],base:qp.GREEKCAP,subst:{},capital:!0,category:"Lu",font:jp.ITALIC},{interval:["1D6FB","1D71B"],base:qp.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:jp.ITALIC},{interval:["1D71C","1D734"],base:qp.GREEKCAP,subst:{},capital:!0,category:"Lu",font:jp.BOLDITALIC},{interval:["1D735","1D755"],base:qp.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:jp.BOLDITALIC},{interval:["1D756","1D76E"],base:qp.GREEKCAP,subst:{},capital:!0,category:"Lu",font:jp.SANSSERIFBOLD},{interval:["1D76F","1D78F"],base:qp.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:jp.SANSSERIFBOLD},{interval:["1D790","1D7A8"],base:qp.GREEKCAP,subst:{},capital:!0,category:"Lu",font:jp.SANSSERIFBOLDITALIC},{interval:["1D7A9","1D7C9"],base:qp.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:jp.SANSSERIFBOLDITALIC},{interval:["0030","0039"],base:qp.DIGIT,subst:{},offset:0,category:"Nd",font:jp.NORMAL},{interval:["2070","2079"],base:qp.DIGIT,subst:{2071:"00B9",2072:"00B2",2073:"00B3"},offset:0,category:"No",font:Up.SUPER},{interval:["2080","2089"],base:qp.DIGIT,subst:{},offset:0,category:"No",font:Up.SUB},{interval:["245F","2473"],base:qp.DIGIT,subst:{"245F":"24EA"},offset:0,category:"No",font:Up.CIRCLED},{interval:["3251","325F"],base:qp.DIGIT,subst:{},offset:21,category:"No",font:Up.CIRCLED},{interval:["32B1","32BF"],base:qp.DIGIT,subst:{},offset:36,category:"No",font:Up.CIRCLED},{interval:["2474","2487"],base:qp.DIGIT,subst:{},offset:1,category:"No",font:Up.PARENTHESIZED},{interval:["2487","249B"],base:qp.DIGIT,subst:{2487:"1F100"},offset:0,category:"No",font:Up.PERIOD},{interval:["2775","277F"],base:qp.DIGIT,subst:{2775:"24FF"},offset:0,category:"No",font:Up.NEGATIVECIRCLED},{interval:["24EB","24F4"],base:qp.DIGIT,subst:{},offset:11,category:"No",font:Up.NEGATIVECIRCLED},{interval:["24F5","24FE"],base:qp.DIGIT,subst:{},offset:1,category:"No",font:Up.DOUBLECIRCLED},{interval:["277F","2789"],base:qp.DIGIT,subst:{"277F":"1F10B"},offset:0,category:"No",font:Up.CIRCLEDSANSSERIF},{interval:["2789","2793"],base:qp.DIGIT,subst:{2789:"1F10C"},offset:0,category:"No",font:Up.NEGATIVECIRCLEDSANSSERIF},{interval:["FF10","FF19"],base:qp.DIGIT,subst:{},offset:0,category:"Nd",font:jp.FULLWIDTH},{interval:["1D7CE","1D7D7"],base:qp.DIGIT,subst:{},offset:0,category:"Nd",font:jp.BOLD},{interval:["1D7D8","1D7E1"],base:qp.DIGIT,subst:{},offset:0,category:"Nd",font:jp.DOUBLESTRUCK},{interval:["1D7E2","1D7EB"],base:qp.DIGIT,subst:{},offset:0,category:"Nd",font:jp.SANSSERIF},{interval:["1D7EC","1D7F5"],base:qp.DIGIT,subst:{},offset:0,category:"Nd",font:jp.SANSSERIFBOLD},{interval:["1D7F6","1D7FF"],base:qp.DIGIT,subst:{},offset:0,category:"Nd",font:jp.MONOSPACE},{interval:["1F101","1F10A"],base:qp.DIGIT,subst:{},offset:0,category:"No",font:Up.COMMA},{interval:["24B6","24CF"],base:qp.LATINCAP,subst:{},capital:!0,category:"So",font:Up.CIRCLED},{interval:["24D0","24E9"],base:qp.LATINSMALL,subst:{},capital:!1,category:"So",font:Up.CIRCLED},{interval:["1F110","1F129"],base:qp.LATINCAP,subst:{},capital:!0,category:"So",font:Up.PARENTHESIZED},{interval:["249C","24B5"],base:qp.LATINSMALL,subst:{},capital:!1,category:"So",font:Up.PARENTHESIZED},{interval:["1F130","1F149"],base:qp.LATINCAP,subst:{},capital:!0,category:"So",font:Up.SQUARED},{interval:["1F170","1F189"],base:qp.LATINCAP,subst:{},capital:!0,category:"So",font:Up.NEGATIVESQUARED},{interval:["1F150","1F169"],base:qp.LATINCAP,subst:{},capital:!0,category:"So",font:Up.NEGATIVECIRCLED}],Vp=new Map;function Gp(t,e){return t+e.split("-").map((t=>t[0].toUpperCase()+t.slice(1))).join("")}for(const t of Xp){const e=Gp(t.base,t.font),s=zp(t.interval,t.subst);let i=Vp.get(e);i?i.unicode=i.unicode.concat(s):(i=t,i.unicode=s,Vp.set(e,i))}var Jp;!function(t){t.PUNCTUATION="punctuation",t.FENCE="fence",t.NUMBER="number",t.IDENTIFIER="identifier",t.TEXT="text",t.OPERATOR="operator",t.RELATION="relation",t.LARGEOP="largeop",t.FUNCTION="function",t.ACCENT="accent",t.FENCED="fenced",t.FRACTION="fraction",t.PUNCTUATED="punctuated",t.RELSEQ="relseq",t.MULTIREL="multirel",t.INFIXOP="infixop",t.PREFIXOP="prefixop",t.POSTFIXOP="postfixop",t.APPL="appl",t.INTEGRAL="integral",t.BIGOP="bigop",t.SQRT="sqrt",t.ROOT="root",t.LIMUPPER="limupper",t.LIMLOWER="limlower",t.LIMBOTH="limboth",t.SUBSCRIPT="subscript",t.SUPERSCRIPT="superscript",t.UNDERSCORE="underscore",t.OVERSCORE="overscore",t.TENSOR="tensor",t.TABLE="table",t.MULTILINE="multiline",t.MATRIX="matrix",t.VECTOR="vector",t.CASES="cases",t.ROW="row",t.LINE="line",t.CELL="cell",t.ENCLOSE="enclose",t.INFERENCE="inference",t.RULELABEL="rulelabel",t.CONCLUSION="conclusion",t.PREMISES="premises",t.UNKNOWN="unknown",t.EMPTY="empty"}(Jp||(Jp={}));const Kp=Object.assign({},Jp);var $p;!function(t){t.COMMA="comma",t.SEMICOLON="semicolon",t.ELLIPSIS="ellipsis",t.FULLSTOP="fullstop",t.QUESTION="question",t.EXCLAMATION="exclamation",t.QUOTES="quotes",t.DASH="dash",t.TILDE="tilde",t.PRIME="prime",t.DEGREE="degree",t.VBAR="vbar",t.COLON="colon",t.OPENFENCE="openfence",t.CLOSEFENCE="closefence",t.APPLICATION="application",t.DUMMY="dummy",t.UNIT="unit",t.LABEL="label",t.OPEN="open",t.CLOSE="close",t.TOP="top",t.BOTTOM="bottom",t.NEUTRAL="neutral",t.METRIC="metric",t.LATINLETTER="latinletter",t.GREEKLETTER="greekletter",t.OTHERLETTER="otherletter",t.NUMBERSET="numbersetletter",t.INTEGER="integer",t.FLOAT="float",t.OTHERNUMBER="othernumber",t.INFTY="infty",t.MIXED="mixed",t.MULTIACCENT="multiaccent",t.OVERACCENT="overaccent",t.UNDERACCENT="underaccent",t.UNDEROVER="underover",t.SUBSUP="subsup",t.LEFTSUB="leftsub",t.LEFTSUPER="leftsuper",t.RIGHTSUB="rightsub",t.RIGHTSUPER="rightsuper",t.LEFTRIGHT="leftright",t.ABOVEBELOW="abovebelow",t.INTERVAL="interval",t.SETEMPTY="set empty",t.SETEXT="set extended",t.SETSINGLE="set singleton",t.SETCOLLECT="set collection",t.STRING="string",t.SPACE="space",t.ANNOTATION="annotation",t.TEXT="text",t.SEQUENCE="sequence",t.ENDPUNCT="endpunct",t.STARTPUNCT="startpunct",t.NEGATIVE="negative",t.POSITIVE="positive",t.NEGATION="negation",t.MULTIOP="multiop",t.PREFIXOP="prefix operator",t.POSTFIXOP="postfix operator",t.LIMFUNC="limit function",t.INFIXFUNC="infix function",t.PREFIXFUNC="prefix function",t.POSTFIXFUNC="postfix function",t.SIMPLEFUNC="simple function",t.COMPFUNC="composed function",t.SUM="sum",t.INTEGRAL="integral",t.GEOMETRY="geometry",t.BOX="box",t.BLOCK="block",t.ADDITION="addition",t.MULTIPLICATION="multiplication",t.SUBTRACTION="subtraction",t.IMPLICIT="implicit",t.DIVISION="division",t.VULGAR="vulgar",t.EQUALITY="equality",t.INEQUALITY="inequality",t.ARROW="arrow",t.ELEMENT="element",t.NONELEMENT="nonelement",t.REELEMENT="reelement",t.RENONELEMENT="renonelement",t.SET="set",t.DETERMINANT="determinant",t.ROWVECTOR="rowvector",t.BINOMIAL="binomial",t.SQUAREMATRIX="squarematrix",t.CYCLE="cycle",t.MULTILINE="multiline",t.MATRIX="matrix",t.VECTOR="vector",t.CASES="cases",t.TABLE="table",t.CAYLEY="cayley",t.PROOF="proof",t.LEFT="left",t.RIGHT="right",t.UP="up",t.DOWN="down",t.FINAL="final",t.SINGLE="single",t.HYP="hyp",t.AXIOM="axiom",t.LOGIC="logic",t.UNKNOWN="unknown",t.MGLYPH="mglyph"}($p||($p={}));const Yp=Object.assign({},$p);var Qp;!function(t){t.CALIGRAPHIC="caligraphic",t.CALIGRAPHICBOLD="caligraphic-bold",t.OLDSTYLE="oldstyle",t.OLDSTYLEBOLD="oldstyle-bold",t.UNKNOWN="unknown"}(Qp||(Qp={}));const Zp=Object.assign(Object.assign(Object.assign({},jp),Qp),Up);var tm;!function(t){t.ALLLETTERS="allLetters",t.D="d",t.BAR="bar",t.TILDE="tilde"}(tm||(tm={}));const em=Object.assign(Object.assign({},qp),tm);var sm=function(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);rparseInt(t,16)))):e.push(parseInt(s,16));return e}(e);for(const e of r)i[e]||(t.set(String.fromCodePoint(e),String.fromCodePoint(e+s)),i[e]=!0,i[e+s]=!0)}const lm=["cos","cot","csc","sec","sin","tan","arccos","arccot","arccsc","arcsec","arcsin","arctan"].concat(["cosh","coth","csch","sech","sinh","tanh","arcosh","arcoth","arcsch","arsech","arsinh","artanh"],["deg","det","dim","hom","ker","Tr"],["log","ln","lg","exp","gcd","lcm","arg","im","re","Pr"]);function hm(t,e,s,i,r,n=[],o={},a={}){const c=Vp.get(Gp(t,i));c&&(c.unicode.forEach((t=>{om.Meaning.set(t,{type:e,role:s,font:r}),n.forEach((e=>om.Secondary.set(t,e)))})),function(t,e){for(const[s,i]of Object.entries(e)){const e=t[s];void 0!==e&&om.Meaning.set(e,i)}}(c.unicode,o),function(t,e){for(const[s,i]of Object.entries(e)){const e=t[s];void 0!==e&&om.Secondary.set(e,i)}}(c.unicode,a))}[{set:["23","26","40","5c","a1","a7","b6","bf","2017",["2022","2025"],"2027","203b","203c",["2041","2043"],["2047","2049"],["204b","204d"],"2050","2055","2056",["2058","205e"],"2234","2235","fe45","fe46","fe5f","fe60","fe68","fe6b","ff03","ff06","ff0f","ff20","ff3c"],type:Kp.PUNCTUATION,role:Yp.UNKNOWN},{set:["22","ab","bb","2dd",["2018","201f"],"2039","203a",["301d","301f"],"fe10","ff02","ff07"],type:Kp.PUNCTUATION,role:Yp.QUOTES},{set:["3b","204f","2a1f","2a3e","fe14","fe54","ff1b"],type:Kp.PUNCTUATION,role:Yp.SEMICOLON},{set:["3f","203d","fe16","fe56","ff1f"],type:Kp.PUNCTUATION,role:Yp.QUESTION},{set:["21","fe15","fe57","ff01"],type:Kp.PUNCTUATION,role:Yp.EXCLAMATION},{set:["5e","60","a8","aa","b4","ba","2c7",["2d8","2da"],"2040","207a","207d","207e","ff3e","ff40"],type:Kp.PUNCTUATION,role:Yp.OVERACCENT},{set:["b8","2db","2038","203f","2054","208a","208d","208e"],type:Kp.PUNCTUATION,role:Yp.UNDERACCENT},{set:["3a","2982","fe13","fe30","fe55","ff1a"],type:Kp.PUNCTUATION,role:Yp.COLON},{set:["2c","2063","fe50","ff0c"],type:Kp.PUNCTUATION,role:Yp.COMMA},{set:["2026",["22ee","22f1"],"fe19"],type:Kp.PUNCTUATION,role:Yp.ELLIPSIS},{set:["2e","fe52","ff0e"],type:Kp.PUNCTUATION,role:Yp.FULLSTOP},{set:["2d","207b","208b","2212","2796","fe63","ff0d"],type:Kp.OPERATOR,role:Yp.DASH,secondary:em.BAR},{set:["5f","af",["2010","2015"],"203e","208b",["fe49","fe4f"],"fe58","ff3f","ffe3"],type:Kp.PUNCTUATION,role:Yp.DASH,secondary:em.BAR},{set:["7e","2dc","2f7","303","330","334","2053","223c","223d","301c","ff5e"],type:Kp.OPERATOR,role:Yp.TILDE,secondary:em.TILDE},{set:["27","2b9","2ba",["2032","2037"],"2057"],type:Kp.PUNCTUATION,role:Yp.PRIME},{set:["b0"],type:Kp.PUNCTUATION,role:Yp.DEGREE},{set:["2b","b1","2064","2213","2214","2228","222a",["228c","228e"],"2294","2295","229d","229e","22bb","22bd","22c4","22ce","22d3","2304","271b","271c","2795","27cf","29fa","29fb","29fe",["2a22","2a28"],"2a2d","2a2e","2a39","2a42","2a45","2a46","2a48","2a4a","2a4c","2a4f","2a50","2a52","2a54","2a56","2a57","2a59","2a5b","2a5d",["2a61","2a63"],"2adc","2add","fe62","ff0b"],type:Kp.OPERATOR,role:Yp.ADDITION},{set:["2a","b7","d7","2020","2021","204e","2051","2062",["2217","2219"],"2227","2229","2240","2293","2297",["2299","229b"],"22a0","22a1","22b9","22bc",["22c5","22cc"],"22cf","22d2","22d4","2303","2305","2306","25cb","2715","2716","27ce","27d1",["29d1","29d7"],"29e2","2a1d",["2a2f","2a37"],["2a3b","2a3d"],"2a40","2a43","2a44","2a47","2a49","2a4b","2a4d","2a4e","2a51","2a53","2a55","2a58","2a5a","2a5c",["2a5e","2a60"],"2ada","2adb","fe61","ff0a"],type:Kp.OPERATOR,role:Yp.MULTIPLICATION},{set:["2d","af","2010","2011","2052","207b","208b","2212","2216","2238","2242","2296","229f","2796","29ff",["2a29","2a2c"],"2a3a","2a41","fe63","ff0d"],type:Kp.OPERATOR,role:Yp.SUBTRACTION},{set:["2f","f7","2044","2215","2298","2797","27cc","29bc",["29f5","29f9"],"2a38"],type:Kp.OPERATOR,role:Yp.DIVISION},{set:["25","2030","2031","ff05","fe6a"],type:Kp.OPERATOR,role:Yp.POSTFIXOP},{set:["ac","2200","2201","2203","2204","2206",["221a","221c"],"2310","ffe2"],type:Kp.OPERATOR,role:Yp.PREFIXOP},{set:["2320","2321","23aa","23ae","23af","23b2","23b3","23b6","23b7"],type:Kp.OPERATOR,role:Yp.PREFIXOP},{set:["1d7ca","1d7cb"],type:Kp.OPERATOR,role:Yp.PREFIXOP,font:Zp.BOLD},{set:["3d","7e","207c","208c","221d","2237",["223a","223f"],"2243","2245","2248",["224a","224e"],["2251","225f"],"2261","2263","229c","22cd","22d5","29e4","29e6","2a66","2a67",["2a6a","2a6c"],["2a6c","2a78"],"fe66","ff1d"],type:Kp.RELATION,role:Yp.EQUALITY},{set:["3c","3e","2241","2242","2244","2246","2247","2249","224f","2250","2260","2262",["2264","2281"],"22b0","22b1",["22d6","22e1"],["22e6","22e9"],["2976","2978"],"29c0","29c1","29e1","29e3","29e5",["2a79","2abc"],["2af7","2afa"],"fe64","fe65","ff1c","ff1e"],type:Kp.RELATION,role:Yp.INEQUALITY},{set:[["2282","228b"],["228f","2292"],["22b2","22b8"],"22d0","22d1",["22e2","22e5"],["22ea","22ed"],"27c3","27c4",["27c7","27c9"],["27d5","27d7"],"27dc",["2979","297b"],"29df",["2abd","2ad8"]],type:Kp.RELATION,role:Yp.SET},{set:["2236",["27e0","27e5"],"292b","292c",["29b5","29bb"],"29be","29bf",["29c2","29d0"]],type:Kp.RELATION,role:Yp.UNKNOWN},{set:["2205",["29b0","29b4"]],type:Kp.IDENTIFIER,role:Yp.SETEMPTY},{set:["1ab2","221e",["29dc","29de"]],type:Kp.IDENTIFIER,role:Yp.INFTY},{set:["22a2","22a3",["22a6","22af"],"27da","27db","27dd","27de","2ade",["2ae2","2ae6"],"2aec","2aed"],type:Kp.RELATION,role:Yp.LOGIC},{set:["22a4","22a5","22ba","27d8","27d9","27df","2adf","2ae0",["2ae7","2aeb"],"2af1"],type:Kp.IDENTIFIER,role:Yp.LOGIC},{set:[["2190","21ff"],"2301","2324","238b","2794",["2798","27af"],["27b1","27be"],["27f0","27ff"],["2900","292a"],["292d","2975"],["297c","297f"],["2b00","2b11"],["2b30","2b4c"],["ffe9","ffec"]],type:Kp.RELATION,role:Yp.ARROW},{set:["2208","220a",["22f2","22f9"],"22ff","27d2","2ad9"],type:Kp.OPERATOR,role:Yp.ELEMENT},{set:["2209"],type:Kp.OPERATOR,role:Yp.NONELEMENT},{set:["220b","220d",["22fa","22fe"]],type:Kp.OPERATOR,role:Yp.REELEMENT},{set:["220c"],type:Kp.OPERATOR,role:Yp.RENONELEMENT},{set:[["220f","2211"],["22c0","22c3"],["2a00","2a0b"],"2a3f","2afc","2aff"],type:Kp.LARGEOP,role:Yp.SUM},{set:["2140"],type:Kp.LARGEOP,role:Yp.SUM,font:Zp.DOUBLESTRUCK},{set:[["222b","2233"],["2a0c","2a17"],["2a17","2a1c"]],type:Kp.LARGEOP,role:Yp.INTEGRAL},{set:[["2500","257F"]],type:Kp.RELATION,role:Yp.BOX},{set:[["2580","259F"]],type:Kp.IDENTIFIER,role:Yp.BLOCK},{set:[["25A0","25FF"],["2B12","2B2F"],["2B50","2B59"]],type:Kp.RELATION,role:Yp.GEOMETRY},{set:["220e","2300","2302","2311","29bd","29e0",["29e8","29f3"],"2a1e","2afe","ffed","ffee"],type:Kp.OPERATOR,role:Yp.GEOMETRY},{set:[["221f","2222"],"22be","22bf",["2312","2314"],"237c","27c0",["299b","29af"]],type:Kp.OPERATOR,role:Yp.GEOMETRY},{set:["24",["a2","a5"],"b5","2123",["2125","2127"],"212a","212b","fe69","ff04","ffe0","ffe1","ffe5","ffe6"],type:Kp.IDENTIFIER,role:Yp.UNKNOWN},{set:["a9","ae","210f","2114","2116","2117",["211e","2122"],"212e","2132",["2139","213b"],["2141","2144"],"214d","214e",["1f12a","1f12c"],"1f18a"],type:Kp.IDENTIFIER,role:Yp.OTHERLETTER},{set:["2224","2226","2239","2307","27b0","27bf","27c1","27c2","27ca","27cb","27cd","27d0","27d3","27d4","2981","2999","299a","29e7","29f4","2a20","2a21","2a64","2a65","2a68","2a69","2ae1",["2aee","2af0"],"2af2","2af3","2af5","2af6","2afb","2afd"],type:Kp.OPERATOR,role:Yp.UNKNOWN},{set:["2605","2606","26aa","26ab",["2720","274d"]],type:Kp.OPERATOR,role:Yp.UNKNOWN},{set:[["2145","2149"]],type:Kp.IDENTIFIER,role:Yp.LATINLETTER,font:Zp.DOUBLESTRUCKITALIC,secondary:em.ALLLETTERS},{set:[["213c","213f"]],type:Kp.IDENTIFIER,role:Yp.GREEKLETTER,font:Zp.DOUBLESTRUCK,secondary:em.ALLLETTERS},{set:["3d0","3d7","3f6",["1d26","1d2a"],"1d5e","1d60",["1d66","1d6a"]],type:Kp.IDENTIFIER,role:Yp.GREEKLETTER,font:Zp.NORMAL,secondary:em.ALLLETTERS},{set:[["2135","2138"]],type:Kp.IDENTIFIER,role:Yp.OTHERLETTER,font:Zp.NORMAL,secondary:em.ALLLETTERS},{set:["131","237"],type:Kp.IDENTIFIER,role:Yp.LATINLETTER,font:Zp.NORMAL},{set:["1d6a4","1d6a5"],type:Kp.IDENTIFIER,role:Yp.LATINLETTER,font:Zp.ITALIC},{set:["2113","2118"],type:Kp.IDENTIFIER,role:Yp.LATINLETTER,font:Zp.SCRIPT},{set:[["c0","d6"],["d8","f6"],["f8","1bf"],["1c4","2af"],["1d00","1d25"],["1d6b","1d9a"],["1e00","1ef9"],["363","36f"],["1dd3","1de6"],["1d62","1d65"],"1dca","2071","207f",["2090","209c"],"2c7c"],type:Kp.IDENTIFIER,role:Yp.LATINLETTER,font:Zp.NORMAL},{set:[["00bc","00be"],["2150","215f"],"2189"],type:Kp.NUMBER,role:Yp.FLOAT},{set:["23E8",["3248","324f"]],type:Kp.NUMBER,role:Yp.INTEGER},{set:[["214A","214C"],"2705","2713","2714","2717","2718"],type:Kp.IDENTIFIER,role:Yp.UNKNOWN},{set:["20","a0","ad",["2000","200f"],["2028","202f"],["205f","2060"],"206a","206b","206e","206f","feff",["fff9","fffb"]],type:Kp.TEXT,role:Yp.SPACE},{set:["7c","a6","2223","23b8","23b9","23d0","2758",["fe31","fe34"],"ff5c","ffe4","ffe8"],type:Kp.FENCE,role:Yp.NEUTRAL},{set:["2016","2225","2980","2af4"],type:Kp.FENCE,role:Yp.METRIC}].forEach((t=>{var{set:e}=t,s=sm(t,["set"]);return am(function(t){let e=[];for(const s of t)Array.isArray(s)?e=e.concat(zp(s)):e.push(String.fromCodePoint(parseInt(s,16)));return e}(e),s)})),cm(om.FencesVert,["23b4",["23dc","23e1"],["fe35","fe44"],"fe47"]),cm(om.FencesHoriz,["28","2045","207D","208D",["2308","230f"],["231c","231f"],"2329","23b0",["2768","2775"],"27c5",["27e6","27ef"],["2983","2998"],["29d8","29db"],"29fc",["2e22","2e29"],["3008","3011"],["3014","301b"],"fd3e","fe17",["fe59","fe5e"],"ff08","ff5f","ff62"]),cm(om.FencesHoriz,["5b","7b","ff3b","ff5b"],2),cm(om.FencesHoriz,[["239b","23a6"]],3),cm(om.FencesHoriz,[["23a7","23a9"]],4),am([...om.FencesHoriz.keys()],{type:Kp.FENCE,role:Yp.OPEN}),am([...om.FencesHoriz.values()],{type:Kp.FENCE,role:Yp.CLOSE}),am([...om.FencesVert.keys()],{type:Kp.FENCE,role:Yp.TOP}),am([...om.FencesVert.values()],{type:Kp.FENCE,role:Yp.BOTTOM}),function(){for(const[t,e]of Object.entries(Zp)){const s=!!Up[t]?Zp.UNKNOWN:e===Zp.FULLWIDTH?Zp.NORMAL:e;hm(qp.LATINCAP,Kp.IDENTIFIER,Yp.LATINLETTER,e,s,[em.ALLLETTERS]),hm(qp.LATINSMALL,Kp.IDENTIFIER,Yp.LATINLETTER,e,s,[em.ALLLETTERS],{},{3:em.D}),hm(qp.GREEKCAP,Kp.IDENTIFIER,Yp.GREEKLETTER,e,s,[em.ALLLETTERS]),hm(qp.GREEKSMALL,Kp.IDENTIFIER,Yp.GREEKLETTER,e,s,[em.ALLLETTERS],{0:{type:Kp.OPERATOR,role:Yp.PREFIXOP,font:s},26:{type:Kp.OPERATOR,role:Yp.PREFIXOP,font:s}}),hm(qp.DIGIT,Kp.NUMBER,Yp.INTEGER,e,s)}}(),am(["inf","lim","liminf","limsup","max","min","sup","injlim","projlim"],{type:Kp.FUNCTION,role:Yp.LIMFUNC}),am(lm,{type:Kp.FUNCTION,role:Yp.PREFIXFUNC}),am(["mod","rem"],{type:Kp.OPERATOR,role:Yp.PREFIXFUNC});const dm=[];function um(t,e){for(let s,i=0;s=dm[i];i++){const i=s.compare(t,e);if(0!==i)return i}return 0}function pm(t){if(t.length<=1)return t;const e=t.slice();!function(t){t.sort(um)}(e);const s=[];let i;do{i=e.pop(),s.push(i)}while(i&&e.length&&0===um(e[e.length-1],i));return s}function mm(t,e){return t.match(/^.+:.+$/)||!e?t:t+":"+e}new class{constructor(t,e=null){this.comparator=t,this.type=e,function(t){dm.push(t)}(this)}compare(t,e){return this.type&&this.type===t.type&&this.type===e.type?this.comparator(t,e):0}}((function(t,e){return t.role===Yp.SIMPLEFUNC?1:e.role===Yp.SIMPLEFUNC?-1:0}),Kp.IDENTIFIER);class fm extends Map{set(t,e){return super.set(mm(t,e.font),e),this}setNode(t){this.set(t.textContent,t.meaning())}get(t,e=null){return super.get(mm(t,e))}getNode(t){return this.get(t.textContent,t.font)}}class gm extends Map{add(t,e){const s=this.get(t);s?s.push(e):super.set(t,[e])}get(t,e=null){return super.get(mm(t,e))}getNode(t){return this.get(t.textContent,t.font)}minimize(){for(const[t,e]of this)1===e.length&&this.delete(t)}isMultiValued(){for(const t of this.values())if(t.length>1)return!0;return!1}}class bm extends gm{add(t,e){super.add(mm(t,e.font),e)}addNode(t){this.add(t.textContent,t)}toString(){const t=[];for(const[e,s]of this){const i=Array(e.length+3).join(" "),r=s.map((t=>t.toString())).join("\n"+i);t.push(e+": "+r)}return t.join("\n")}collateMeaning(){const t=new Em;for(const[e,s]of this)t.set(e,s.map((t=>t.meaning())));return t}}class Em extends gm{add(t,e){const s=this.get(t,e.font);s&&s.find((function(t){return i=e,(s=t).type===i.type&&s.role===i.role&&s.font===i.font;var s,i}))||super.add(mm(t,e.font),e)}addNode(t){this.add(t.textContent,t.meaning())}toString(){const t=[];for(const[e,s]of this){const i=Array(e.length+3).join(" "),r=s.map((t=>`{type: ${t.type}, role: ${t.role}, font: ${t.font}}`)).join("\n"+i);t.push(e+": "+r)}return t.join("\n")}reduce(){for(const[t,e]of this)1!==e.length&&this.set(t,pm(e))}default(){const t=new fm;for(const[e,s]of this)1===s.length&&t.set(e,s[0]);return t}newDefault(){const t=this.default();this.reduce();const e=this.default();return t.size!==e.size?e:null}}var Nm;!function(t){t.ANNOTATION="ANNOTATION",t.ANNOTATIONXML="ANNOTATION-XML",t.MACTION="MACTION",t.MALIGNGROUP="MALIGNGROUP",t.MALIGNMARK="MALIGNMARK",t.MATH="MATH",t.MENCLOSE="MENCLOSE",t.MERROR="MERROR",t.MFENCED="MFENCED",t.MFRAC="MFRAC",t.MGLYPH="MGLYPH",t.MI="MI",t.MLABELEDTR="MLABELEDTR",t.MMULTISCRIPTS="MMULTISCRIPTS",t.MN="MN",t.MO="MO",t.MOVER="MOVER",t.MPADDED="MPADDED",t.MPHANTOM="MPHANTOM",t.MPRESCRIPTS="MPRESCRIPTS",t.MROOT="MROOT",t.MROW="MROW",t.MS="MS",t.MSPACE="MSPACE",t.MSQRT="MSQRT",t.MSTYLE="MSTYLE",t.MSUB="MSUB",t.MSUBSUP="MSUBSUP",t.MSUP="MSUP",t.MTABLE="MTABLE",t.MTD="MTD",t.MTEXT="MTEXT",t.MTR="MTR",t.MUNDER="MUNDER",t.MUNDEROVER="MUNDEROVER",t.NONE="NONE",t.SEMANTICS="SEMANTICS"}(Nm||(Nm={}));const ym=Object.values(Nm),xm=[Nm.MO,Nm.MI,Nm.MN,Nm.MTEXT,Nm.MS,Nm.MSPACE],vm=[Nm.MERROR,Nm.MPHANTOM,Nm.MALIGNGROUP,Nm.MALIGNMARK,Nm.MPRESCRIPTS,Nm.ANNOTATION,Nm.ANNOTATIONXML],Cm=[Nm.MATH,Nm.MROW,Nm.MPADDED,Nm.MACTION,Nm.NONE,Nm.MSTYLE,Nm.SEMANTICS],Tm=[Nm.MROOT,Nm.MSQRT],_m=["aria-label","exact-speech","alt"];function wm(t){return!!t&&Ip(t)===Nm.MATH}function km(t){return!!t&&(vm.includes(Ip(t))||!ym.includes(Ip(t)))}function Am(t){return!!t&&Cm.includes(Ip(t))}function Mm(t){return!!t&&Ip(t)===Nm.MGLYPH&&!function(t){return!!t&&xm.includes(Ip(t))}(t.parentNode)}function Lm(t){const e=[];for(let s,i=0;s=t[i];i++){if(s.nodeType!==wp.ELEMENT_NODE)continue;const t=Ip(s);vm.includes(t)||(Cm.includes(t)&&0===s.childNodes.length||e.push(s))}return e}function Im(t,e){var s;if(null===(s=e.attributes)||void 0===s?void 0:s.length){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const i=s[e].name;i.match(/^ext/)&&(t.attributes[i]=s[e].value,t.nobreaking=!0),_m.includes(i)&&(t.attributes["ext-speech"]=s[e].value,t.nobreaking=!0),i.match(/texclass$/)&&(t.attributes.texclass=s[e].value),"data-latex"===i.toLowerCase()&&(t.attributes.latex=s[e].value),"href"===i&&(t.attributes.href=s[e].value,t.nobreaking=!0)}}}function Sm(t){return t&&t.embellished&&t.childNodes.length>0?Sm(t.childNodes[0]):t}function Rm(t,e,s){s&&t.reverse();const i=[];for(let r,n=0;r=t[n];n++){if(e(r))return s?{head:t.slice(n+1).reverse(),div:r,tail:i.reverse()}:{head:i,div:r,tail:t.slice(n+1)};i.push(r)}return s?{head:[],div:null,tail:i.reverse()}:{head:i,div:null,tail:[]}}function Om(t,e){let s=t;const i=[],r=[];let n=null;do{n=Rm(s,e),r.push(n.head),i.push(n.div),s=n.tail}while(n.div);return i.pop(),{rel:i,comp:r}}var Dm;!function(t){t.EMBELLISHED="embellished",t.FENCEPOINTER="fencepointer",t.FONT="font",t.ID="id",t.ANNOTATION="annotation",t.ROLE="role",t.TYPE="type",t.CHILDREN="children",t.CONTENT="content",t.TEXT="$t"}(Dm||(Dm={}));class Pm{static fromXml(t){const e=parseInt(t.getAttribute("id"),10),s=new Pm(e);return s.type=t.tagName,Pm.setAttribute(s,t,"role"),Pm.setAttribute(s,t,"font"),Pm.setAttribute(s,t,"embellished"),Pm.setAttribute(s,t,"fencepointer","fencePointer"),t.getAttribute("annotation")&&s.parseAnnotation(t.getAttribute("annotation")),Im(s,t),Pm.processChildren(s,t),s}static setAttribute(t,e,s,i){i=i||s;const r=e.getAttribute(s);r&&(t[i]=r)}static processChildren(t,e){for(const s of Tp(e.childNodes)){if(s.nodeType===wp.TEXT_NODE){t.textContent=s.textContent;continue}const e=Tp(s.childNodes).map(Pm.fromXml);e.forEach((e=>e.parent=t)),"CONTENT"===Ip(s)?t.contentNodes=e:t.childNodes=e}}constructor(t){this.id=t,this.mathml=[],this.parent=null,this.type=Kp.UNKNOWN,this.role=Yp.UNKNOWN,this.font=Zp.UNKNOWN,this.embellished=null,this.fencePointer="",this.childNodes=[],this.textContent="",this.mathmlTree=null,this.contentNodes=[],this.annotation={},this.attributes={},this.nobreaking=!1}querySelectorAll(t){let e=[];for(let s,i=0;s=this.childNodes[i];i++)e=e.concat(s.querySelectorAll(t));for(let s,i=0;s=this.contentNodes[i];i++)e=e.concat(s.querySelectorAll(t));return t(this)&&e.unshift(this),e}xml(t,e){const s=function(s,i){const r=i.map((function(s){return s.xml(t,e)})),n=t.createElementNS("",s);for(let t,e=0;t=r[e];e++)n.appendChild(t);return n},i=t.createElementNS("",this.type);return e||this.xmlAttributes(i),i.textContent=this.textContent,this.contentNodes.length>0&&i.appendChild(s(Dm.CONTENT,this.contentNodes)),this.childNodes.length>0&&i.appendChild(s(Dm.CHILDREN,this.childNodes)),i}toString(t=!1){const e=_p(" ");return Sp(this.xml(e.ownerDocument,t))}allAttributes(){const t=[];return t.push([Dm.ROLE,this.role]),this.font!==Zp.UNKNOWN&&t.push([Dm.FONT,this.font]),Object.keys(this.annotation).length&&t.push([Dm.ANNOTATION,this.annotationXml()]),this.embellished&&t.push([Dm.EMBELLISHED,this.embellished]),this.fencePointer&&t.push([Dm.FENCEPOINTER,this.fencePointer]),t.push([Dm.ID,this.id.toString()]),t}annotationXml(){const t=[];for(const[e,s]of Object.entries(this.annotation))s.forEach((s=>t.push(e+":"+s)));return t.join(";")}attributesXml(){const t=[];for(const[e,s]of Object.entries(this.attributes))t.push(e+":"+Pm.escapeValue(s));return t.join(";")}toJson(){const t={};t[Dm.TYPE]=this.type;const e=this.allAttributes();for(let s,i=0;s=e[i];i++)t[s[0]]=s[1].toString();return this.textContent&&(t[Dm.TEXT]=this.textContent),this.childNodes.length&&(t[Dm.CHILDREN]=this.childNodes.map((function(t){return t.toJson()}))),this.contentNodes.length&&(t[Dm.CONTENT]=this.contentNodes.map((function(t){return t.toJson()}))),t}updateContent(t,e){const s=e?t.replace(/^[ \f\n\r\t\v\u200b]*/,"").replace(/[ \f\n\r\t\v\u200b]*$/,""):t.trim();if(t=t&&!s?t:s,this.textContent===t)return;const i=om.Meaning.get(t.replace(/\s/g," "));this.textContent=t,this.role=i.role,this.type=i.type,this.font=i.font}addMathmlNodes(t){for(let e,s=0;e=t[s];s++)-1===this.mathml.indexOf(e)&&this.mathml.push(e)}appendChild(t){this.childNodes.push(t),this.addMathmlNodes(t.mathml),t.parent=this}replaceChild(t,e){const s=this.childNodes.indexOf(t);if(-1===s)return;t.parent=null,e.parent=this,this.childNodes[s]=e;const i=t.mathml.filter((function(t){return-1===e.mathml.indexOf(t)})),r=e.mathml.filter((function(e){return-1===t.mathml.indexOf(e)}));this.removeMathmlNodes(i),this.addMathmlNodes(r)}appendContentNode(t){t&&(this.contentNodes.push(t),this.addMathmlNodes(t.mathml),t.parent=this)}removeContentNode(t){if(t){const e=this.contentNodes.indexOf(t);-1!==e&&this.contentNodes.slice(e,1)}}equals(t){if(!t)return!1;if(this.type!==t.type||this.role!==t.role||this.textContent!==t.textContent||this.childNodes.length!==t.childNodes.length||this.contentNodes.length!==t.contentNodes.length)return!1;for(let e,s,i=0;e=this.childNodes[i],s=t.childNodes[i];i++)if(!e.equals(s))return!1;for(let e,s,i=0;e=this.contentNodes[i],s=t.contentNodes[i];i++)if(!e.equals(s))return!1;return!0}displayTree(){console.info(this.displayTree_(0))}addAnnotation(t,e){e&&this.addAnnotation_(t,e)}getAnnotation(t){const e=this.annotation[t];return e||[]}hasAnnotation(t,e){const s=this.annotation[t];return!!s&&-1!==s.indexOf(e)}parseAnnotation(t){const e=t.split(";");for(let t=0,s=e.length;t0&&qm(e[e.length-1],Yp.OPENFENCE)}function of(t){return t.childNodes.every((function(t){return t.childNodes.length<=1}))}function af(t){return jm(t,Kp.LARGEOP)||jm(t,Kp.LIMBOTH)||jm(t,Kp.LIMLOWER)||jm(t,Kp.LIMUPPER)||jm(t,Kp.FUNCTION)&&qm(t,Yp.LIMFUNC)||(jm(t,Kp.OVERSCORE)||jm(t,Kp.UNDERSCORE))&&af(t.childNodes[0])}function cf(t,e,s){return 1===e.length&&(t[s].type===Kp.PUNCTUATION||t[s].embellished===Kp.PUNCTUATION)&&t[s]===e[0]}function lf(t){return jm(t,Kp.IDENTIFIER)&&qm(t,Yp.SIMPLEFUNC)}const hf=[Kp.PUNCTUATION,Kp.PUNCTUATED,Kp.RELSEQ,Kp.MULTIREL,Kp.TABLE,Kp.MULTILINE,Kp.CASES,Kp.INFERENCE],df=[Kp.LIMUPPER,Kp.LIMLOWER,Kp.LIMBOTH,Kp.SUBSCRIPT,Kp.SUPERSCRIPT,Kp.UNDERSCORE,Kp.OVERSCORE,Kp.TENSOR];function uf(t){const e=t.type;return-1===hf.indexOf(e)&&(e!==Kp.INFIXOP||t.role===Yp.IMPLICIT)&&(e===Kp.FENCED?t.role!==Yp.LEFTRIGHT||uf(t.childNodes[0]):-1===df.indexOf(e)||uf(t.childNodes[0]))}function pf(t){return function(t){return t.type===Kp.NUMBER&&(t.role===Yp.INTEGER||t.role===Yp.FLOAT)}(t)||t.role===Yp.VULGAR||t.role===Yp.MIXED}function mf(t){const e=t.childNodes;return t.role===Yp.UNIT&&(!e.length||e[0].role===Yp.UNIT)}function ff(t){const e=t.childNodes;return t.type===Kp.INFIXOP&&(t.role===Yp.MULTIPLICATION||t.role===Yp.IMPLICIT)&&e.length&&(mf(e[0])||pf(e[0]))&&t.childNodes.slice(1).every(mf)}function gf(t){return t.type===Kp.INFIXOP&&(t.role===Yp.IMPLICIT||t.role===Yp.UNIT&&!!t.contentNodes.length&&t.contentNodes[0].textContent===im.invisibleTimes)}function bf(t){return t.type===Kp.INFIXOP&&t.role===Yp.IMPLICIT}function Ef(t){return t.role===Yp.NEUTRAL||t.role===Yp.METRIC}function Nf(t,e){return Ef(t)&&Ef(e)&&Sm(t).textContent===Sm(e).textContent}function yf(t){return!!Ef(t)&&(!t.embellished||t.type!==Kp.SUPERSCRIPT&&t.type!==Kp.SUBSCRIPT&&(t.type!==Kp.TENSOR||t.childNodes[3].type===Kp.EMPTY&&t.childNodes[4].type===Kp.EMPTY))}function xf(t){return!!Ef(t)&&(!t.embellished||(t.type!==Kp.TENSOR||t.childNodes[1].type===Kp.EMPTY&&t.childNodes[2].type===Kp.EMPTY))}function vf(t){return[Yp.ELEMENT,Yp.NONELEMENT,Yp.REELEMENT,Yp.RENONELEMENT].includes(t.role)}const Cf={factory:null,options:new pp,updateFactory:function(t){Cf.factory=t},heuristics:new Map,flags:{combine_juxtaposition:!0,convert_juxtaposition:!0,multioperator:!0},blacklist:{},add:function(t){const e=t.name;Cf.heuristics.set(e,t),Cf.flags[e]||(Cf.flags[e]=!1)},run:function(t,e,s){const i=Cf.heuristics.get(t);return i&&!Cf.blacklist[t]&&(Cf.flags[t]||i.applicable(e))?i.apply(e):s?s(e):e}};class Tf{static getInstance(){return Tf.instance=Tf.instance||new Tf,Tf.instance}static tableToMultiline(t){if(!of(t))return Cf.run("rewrite_subcases",t,Tf.classifyTable);t.type=Kp.MULTILINE;for(let e,s=0;e=t.childNodes[s];s++)Tf.rowToLine_(e,Yp.MULTILINE);var e;return 1!==t.childNodes.length||jm(e=t.childNodes[0],Kp.LINE)&&e.contentNodes.length&&qm(e.contentNodes[0],Yp.LABEL)||!rf(t.childNodes[0].childNodes[0])||Tf.tableToMatrixOrVector_(Tf.rewriteFencedLine_(t)),Tf.binomialForm_(t),Tf.classifyMultiline(t),t}static number(t){t.type!==Kp.UNKNOWN&&t.type!==Kp.IDENTIFIER||(t.type=Kp.NUMBER),Tf.meaningFromContent(t,Tf.numberRole_),Tf.exprFont_(t)}static classifyMultiline(t){let e=0;const s=t.childNodes.length;let i;for(;e=s)return;const r=i.childNodes[0].role;r!==Yp.UNKNOWN&&t.childNodes.every((function(t){const e=t.childNodes[0];return!e||e.role===r&&(jm(e,Kp.RELATION)||jm(e,Kp.RELSEQ))}))&&(t.role=r)}static classifyTable(t){const e=Tf.computeColumns_(t);return Tf.classifyByColumns_(t,e,Yp.EQUALITY)||Tf.classifyByColumns_(t,e,Yp.INEQUALITY,[Yp.EQUALITY])||Tf.classifyByColumns_(t,e,Yp.ARROW)||Tf.detectCaleyTable(t),t}static detectCaleyTable(t){if(!t.mathmlTree)return!1;const e=t.mathmlTree,s=e.getAttribute("columnlines"),i=e.getAttribute("rowlines");return!(!s||!i)&&(!(!Tf.cayleySpacing(s)||!Tf.cayleySpacing(i))&&(t.role=Yp.CAYLEY,!0))}static cayleySpacing(t){const e=t.split(" ");return("solid"===e[0]||"dashed"===e[0])&&e.slice(1).every((t=>"none"===t))}static proof(t,e,s){const i=Tf.separateSemantics(e);return Tf.getInstance().proof(t,i,s)}static findSemantics(t,e,s){const i=null==s?null:s,r=Tf.getSemantics(t);return!!r&&(!!r[e]&&(null==i||r[e]===i))}static getSemantics(t){const e=t.getAttribute("semantics");return e?Tf.separateSemantics(e):null}static removePrefix(t){const[,...e]=t.split("_");return e.join("_")}static separateSemantics(t){const e={};return t.split(";").forEach((function(t){const[s,i]=t.split(":");e[Tf.removePrefix(s)]=i})),e}static matchSpaces_(t,e){for(let s,i=0;s=e[i];i++){const e=t[i].mathmlTree,r=t[i+1].mathmlTree;if(!e||!r)continue;const n=e.nextSibling;if(!n||n===r)continue;const o=Tf.getSpacer_(n);o&&(s.mathml.push(o),s.mathmlTree=o,s.role=Yp.SPACE)}}static getSpacer_(t){if(Ip(t)===Nm.MSPACE)return t;for(;Am(t)&&1===t.childNodes.length;)if(Ip(t=t.childNodes[0])===Nm.MSPACE)return t;return null}static fenceToPunct_(t){const e=Tf.FENCE_TO_PUNCT_[t.role];if(e){for(;t.embellished;)t.embellished=Kp.PUNCTUATION,qm(t,Yp.SUBSUP)||qm(t,Yp.UNDEROVER)||(t.role=e),t=t.childNodes[0];t.type=Kp.PUNCTUATION,t.role=e}}static classifyFunction_(t,e){if(t.type===Kp.APPL||t.type===Kp.BIGOP||t.type===Kp.INTEGRAL)return"";if(e[0]&&e[0].textContent===im.functionApplication){Tf.getInstance().funcAppls[t.id]=e.shift();let s=Yp.SIMPLEFUNC;return Cf.run("simple2prefix",t),t.role!==Yp.PREFIXFUNC&&t.role!==Yp.LIMFUNC||(s=t.role),Tf.propagateFunctionRole_(t,s),"prefix"}const s=Tf.CLASSIFY_FUNCTION_[t.role];return s||((i=t).type===Kp.IDENTIFIER||i.role===Yp.LATINLETTER||i.role===Yp.GREEKLETTER||i.role===Yp.OTHERLETTER?"simple":"");var i}static propagateFunctionRole_(t,e){if(t){if(t.type===Kp.INFIXOP)return;qm(t,Yp.SUBSUP)||qm(t,Yp.UNDEROVER)||(t.role=e),Tf.propagateFunctionRole_(t.childNodes[0],e)}}static getFunctionOp_(t,e){if(e(t))return t;for(let s,i=0;s=t.childNodes[i];i++){const t=Tf.getFunctionOp_(s,e);if(t)return t}return null}static tableToMatrixOrVector_(t){const e=t.childNodes[0];jm(e,Kp.MULTILINE)?Tf.tableToVector_(t):Tf.tableToMatrix_(t),t.contentNodes.forEach(e.appendContentNode.bind(e));for(let t,s=0;t=e.childNodes[s];s++)Tf.assignRoleToRow_(t,Tf.getComponentRoles_(e));return e.parent=null,e}static tableToVector_(t){const e=t.childNodes[0];e.type=Kp.VECTOR,1!==e.childNodes.length?Tf.binomialForm_(e):Tf.tableToSquare_(t)}static binomialForm_(t){qm(t,Yp.UNKNOWN)&&(2===t.childNodes.length&&(t.role=Yp.BINOMIAL,t.childNodes[0].role=Yp.BINOMIAL,t.childNodes[1].role=Yp.BINOMIAL))}static tableToMatrix_(t){const e=t.childNodes[0];e.type=Kp.MATRIX,e.childNodes&&e.childNodes.length>0&&e.childNodes[0].childNodes&&e.childNodes.length===e.childNodes[0].childNodes.length?Tf.tableToSquare_(t):e.childNodes&&1===e.childNodes.length&&(e.role=Yp.ROWVECTOR)}static tableToSquare_(t){const e=t.childNodes[0];qm(e,Yp.UNKNOWN)&&(Ef(t)?e.role=Yp.DETERMINANT:e.role=Yp.SQUAREMATRIX)}static getComponentRoles_(t){const e=t.role;return e&&e!==Yp.UNKNOWN?e:t.type.toLowerCase()||Yp.UNKNOWN}static tableToCases_(t,e){for(let e,s=0;e=t.childNodes[s];s++)Tf.assignRoleToRow_(e,Yp.CASES);return t.type=Kp.CASES,t.appendContentNode(e),of(t)&&Tf.binomialForm_(t),t}static rewriteFencedLine_(t){const e=t.childNodes[0],s=t.childNodes[0].childNodes[0],i=t.childNodes[0].childNodes[0].childNodes[0];return s.parent=t.parent,t.parent=s,i.parent=e,s.childNodes=[t],e.childNodes=[i],s}static rowToLine_(t,e){const s=e||Yp.UNKNOWN;jm(t,Kp.ROW)&&(t.type=Kp.LINE,t.role=s,1===t.childNodes.length&&jm(t.childNodes[0],Kp.CELL)&&(t.childNodes=t.childNodes[0].childNodes,t.childNodes.forEach((function(e){e.parent=t}))))}static assignRoleToRow_(t,e){jm(t,Kp.LINE)?t.role=e:jm(t,Kp.ROW)&&(t.role=e,t.childNodes.forEach((function(t){jm(t,Kp.CELL)&&(t.role=e)})))}static nextSeparatorFunction_(t){let e;if(t){if(t.match(/^\s+$/))return null;e=t.replace(/\s/g,"").split("").filter((function(t){return t}))}else e=[","];return function(){return e.length>1?e.shift():e[0]}}static meaningFromContent(t,e){const s=[...t.textContent].filter((t=>t.match(/[^\s]/))),i=s.map((t=>om.Meaning.get(t)));e(t,s,i)}static numberRole_(t,e,s){if(t.role===Yp.UNKNOWN)return s.every((function(t){return t.type===Kp.NUMBER&&t.role===Yp.INTEGER||t.type===Kp.PUNCTUATION&&t.role===Yp.COMMA}))?(t.role=Yp.INTEGER,void("0"===e[0]&&t.addAnnotation("general","basenumber"))):void(s.every((function(t){return t.type===Kp.NUMBER&&t.role===Yp.INTEGER||t.type===Kp.PUNCTUATION}))?t.role=Yp.FLOAT:t.role=Yp.OTHERNUMBER)}static exprFont_(t){t.font===Zp.UNKNOWN&&Tf.compSemantics(t,"font",Zp)}static compSemantics(t,e,s){const i=[...t.textContent].map((t=>om.Meaning.get(t))).reduce((function(t,i){return t&&i[e]&&i[e]!==s.UNKNOWN&&i[e]!==t?t===s.UNKNOWN?i[e]:null:t}),s.UNKNOWN);i&&(t[e]=i)}static purgeFences_(t){const e=t.rel,s=t.comp,i=[],r=[];for(;e.length>0;){const t=e.shift();let n=s.shift();Zm(t)?(i.push(t),r.push(n)):(Tf.fenceToPunct_(t),n.push(t),n=n.concat(s.shift()),s.unshift(n))}return r.push(s.shift()),{rel:i,comp:r}}static rewriteFencedNode_(t){const e=t.contentNodes[0],s=t.contentNodes[1];let i=Tf.rewriteFence_(t,e);return t.contentNodes[0]=i.fence,i=Tf.rewriteFence_(i.node,s),t.contentNodes[1]=i.fence,t.contentNodes[0].parent=t,t.contentNodes[1].parent=t,i.node.parent=null,i.node}static rewriteFence_(t,e){if(!e.embellished)return{node:t,fence:e};const s=e.childNodes[0],i=Tf.rewriteFence_(t,s);return jm(e,Kp.SUPERSCRIPT)||jm(e,Kp.SUBSCRIPT)||jm(e,Kp.TENSOR)?(qm(e,Yp.SUBSUP)||(e.role=t.role),s!==i.node&&(e.replaceChild(s,i.node),s.parent=t),Tf.propagateFencePointer_(e,s),{node:e,fence:i.fence}):(e.replaceChild(s,i.fence),e.mathmlTree&&-1===e.mathml.indexOf(e.mathmlTree)&&e.mathml.push(e.mathmlTree),{node:i.node,fence:e})}static propagateFencePointer_(t,e){t.fencePointer=e.fencePointer||e.id.toString(),t.embellished=null}static classifyByColumns_(t,e,s,i=[]){const r=[s].concat(i);return!!(3===e.length&&Tf.testColumns_(e,1,(t=>Tf.isPureRelation_(t,r)))||2===e.length&&(Tf.testColumns_(e,1,(t=>Tf.isEndRelation_(t,r)||Tf.isPureRelation_(t,r)))||Tf.testColumns_(e,0,(t=>Tf.isEndRelation_(t,r,!0)||Tf.isPureRelation_(t,r)))))&&(t.role=s,!0)}static isEndRelation_(t,e,s){const i=s?t.childNodes.length-1:0;return jm(t,Kp.RELSEQ)&&e.some((e=>qm(t,e)))&&jm(t.childNodes[i],Kp.EMPTY)}static isPureRelation_(t,e){return jm(t,Kp.RELATION)&&e.some((e=>qm(t,e)))}static computeColumns_(t){const e=[];for(let s,i=0;s=t.childNodes[i];i++)for(let t,i=0;t=s.childNodes[i];i++){e[i]?e[i].push(t):e[i]=[t]}return e}static testColumns_(t,e,s){const i=t[e];return!!i&&(i.some((function(t){return t.childNodes.length&&s(t.childNodes[0])}))&&i.every((function(t){return!t.childNodes.length||s(t.childNodes[0])})))}setNodeFactory(t){Tf.getInstance().factory_=t,Cf.updateFactory(Tf.getInstance().factory_)}getNodeFactory(){return Tf.getInstance().factory_}identifierNode(t,e,s){if("MathML-Unit"===s)t.type=Kp.IDENTIFIER,t.role=Yp.UNIT;else if(!e&&1===t.textContent.length&&(t.role===Yp.INTEGER||t.role===Yp.LATINLETTER||t.role===Yp.GREEKLETTER)&&t.font===Zp.NORMAL)return t.font=Zp.ITALIC,Cf.run("simpleNamedFunction",t);return t.type===Kp.UNKNOWN&&(t.type=Kp.IDENTIFIER),Tf.exprFont_(t),Cf.run("simpleNamedFunction",t)}implicitNode(t){if(t=Tf.getInstance().getMixedNumbers_(t),1===(t=Tf.getInstance().combineUnits_(t)).length)return t[0];const e=Tf.getInstance().implicitNode_(t);return Cf.run("combine_juxtaposition",e)}text(t,e){return Tf.exprFont_(t),t.type=Kp.TEXT,e===Nm.ANNOTATIONXML?(t.role=Yp.ANNOTATION,t):e===Nm.MS?(t.role=Yp.STRING,t):e===Nm.MSPACE||t.textContent.match(/^\s*$/)?(t.role=Yp.SPACE,t):/\s/.exec(t.textContent)?(t.role=Yp.TEXT,t):(t.role=Yp.UNKNOWN,t)}row(t){return 0===(t=t.filter((function(t){return!jm(t,Kp.EMPTY)}))).length?Tf.getInstance().factory_.makeEmptyNode():(t=Tf.getInstance().getFencesInRow_(t),t=Tf.getInstance().tablesInRow(t),t=Tf.getInstance().getPunctuationInRow_(t),t=Tf.getInstance().getTextInRow_(t),t=Tf.getInstance().getFunctionsInRow_(t),Tf.getInstance().relationsInRow_(t))}limitNode(t,e){if(!e.length)return Tf.getInstance().factory_.makeEmptyNode();let s,i=e[0],r=Kp.UNKNOWN;if(!e[1])return i;if(Cf.run("op_with_limits",e),af(i)){s=Tf.MML_TO_LIMIT_[t];const n=s.length;if(r=s.type,e=e.slice(0,s.length+1),1===n&&Hm(e[1])||2===n&&Hm(e[1])&&Hm(e[2]))return s=Tf.MML_TO_BOUNDS_[t],Tf.getInstance().accentNode_(i,e,s.type,s.length,s.accent);if(2===n){if(Hm(e[1]))return i=Tf.getInstance().accentNode_(i,[i,e[1]],{MSUBSUP:Kp.SUBSCRIPT,MUNDEROVER:Kp.UNDERSCORE}[t],1,!0),e[2]?Tf.getInstance().makeLimitNode_(i,[i,e[2]],null,Kp.LIMUPPER):i;if(e[2]&&Hm(e[2]))return i=Tf.getInstance().accentNode_(i,[i,e[2]],{MSUBSUP:Kp.SUPERSCRIPT,MUNDEROVER:Kp.OVERSCORE}[t],1,!0),Tf.getInstance().makeLimitNode_(i,[i,e[1]],null,Kp.LIMLOWER);e[n]||(r=Kp.LIMLOWER)}return Tf.getInstance().makeLimitNode_(i,e,null,r)}return s=Tf.MML_TO_BOUNDS_[t],Tf.getInstance().accentNode_(i,e,s.type,s.length,s.accent)}tablesInRow(t){let e=Om(t,sf),s=[];for(let t,i=0;t=e.rel[i];i++)s=s.concat(e.comp.shift()),s.push(Tf.tableToMatrixOrVector_(t));s=s.concat(e.comp.shift()),e=Om(s,ef),s=[];for(let t,i=0;t=e.rel[i];i++){const i=e.comp.shift();nf(0,i)&&Tf.tableToCases_(t,i.pop()),s=s.concat(i),s.push(t)}return s.concat(e.comp.shift())}mfenced(t,e,s,i){if(s&&i.length>0){const t=Tf.nextSeparatorFunction_(s),e=[i.shift()];i.forEach((s=>{e.push(Tf.getInstance().factory_.makeContentNode(t())),e.push(s)})),i=e}return t&&e?Tf.getInstance().horizontalFencedNode_(Tf.getInstance().factory_.makeContentNode(t),Tf.getInstance().factory_.makeContentNode(e),i):(t&&i.unshift(Tf.getInstance().factory_.makeContentNode(t)),e&&i.push(Tf.getInstance().factory_.makeContentNode(e)),Tf.getInstance().row(i))}fractionLikeNode(t,e,s,i){let r;if(!i&&function(t){if(!t)return!1;if(["negativeveryverythinmathspace","negativeverythinmathspace","negativethinmathspace","negativemediummathspace","negativethickmathspace","negativeverythickmathspace","negativeveryverythickmathspace"].includes(t))return!0;const e=t.match(/[0-9.]+/);return!!e&&0===parseFloat(e[0])}(s)){const s=Tf.getInstance().factory_.makeBranchNode(Kp.LINE,[t],[]),i=Tf.getInstance().factory_.makeBranchNode(Kp.LINE,[e],[]);return r=Tf.getInstance().factory_.makeBranchNode(Kp.MULTILINE,[s,i],[]),Tf.binomialForm_(r),Tf.classifyMultiline(r),r}return r=Tf.getInstance().fractionNode_(t,e),i&&r.addAnnotation("general","bevelled"),r}tensor(t,e,s,i,r){const n=Tf.getInstance().factory_.makeBranchNode(Kp.TENSOR,[t,Tf.getInstance().scriptNode_(e,Yp.LEFTSUB),Tf.getInstance().scriptNode_(s,Yp.LEFTSUPER),Tf.getInstance().scriptNode_(i,Yp.RIGHTSUB),Tf.getInstance().scriptNode_(r,Yp.RIGHTSUPER)],[]);return n.role=t.role,n.embellished=Jm(t),n}pseudoTensor(t,e,s){const i=t=>!jm(t,Kp.EMPTY),r=e.filter(i).length,n=s.filter(i).length;if(!r&&!n)return t;const o=r?n?Nm.MSUBSUP:Nm.MSUB:Nm.MSUP,a=[t];return r&&a.push(Tf.getInstance().scriptNode_(e,Yp.RIGHTSUB,!0)),n&&a.push(Tf.getInstance().scriptNode_(s,Yp.RIGHTSUPER,!0)),Tf.getInstance().limitNode(o,a)}font(t){const e=Tf.MATHJAX_FONTS[t];return e||t}proof(t,e,s){if(e.inference||e.axiom||console.log("Noise"),e.axiom){const e=Tf.getInstance().cleanInference(t.childNodes),i=e.length?Tf.getInstance().factory_.makeBranchNode(Kp.INFERENCE,s(e),[]):Tf.getInstance().factory_.makeEmptyNode();return i.role=Yp.AXIOM,i.mathmlTree=t,i}const i=Tf.getInstance().inference(t,e,s);return e.proof&&(i.role=Yp.PROOF,i.childNodes[0].role=Yp.FINAL),i}inference(t,e,s){if(e.inferenceRule){const e=Tf.getInstance().getFormulas(t,[],s);return Tf.getInstance().factory_.makeBranchNode(Kp.INFERENCE,[e.conclusion,e.premises],[])}const i=e.labelledRule,r=Tp(t.childNodes),n=[];"left"!==i&&"both"!==i||n.push(Tf.getInstance().getLabel(t,r,s,Yp.LEFT)),"right"!==i&&"both"!==i||n.push(Tf.getInstance().getLabel(t,r,s,Yp.RIGHT));const o=Tf.getInstance().getFormulas(t,r,s),a=Tf.getInstance().factory_.makeBranchNode(Kp.INFERENCE,[o.conclusion,o.premises],n);return a.mathmlTree=t,a}getLabel(t,e,s,i){const r=Tf.getInstance().findNestedRow(e,"prooflabel",i),n=Tf.getInstance().factory_.makeBranchNode(Kp.RULELABEL,s(Tp(r.childNodes)),[]);return n.role=i,n.mathmlTree=r,n}getFormulas(t,e,s){const i=e.length?Tf.getInstance().findNestedRow(e,"inferenceRule"):t,r="up"===Tf.getSemantics(i).inferenceRule,n=r?i.childNodes[1]:i.childNodes[0],o=r?i.childNodes[0]:i.childNodes[1],a=n.childNodes[0].childNodes[0],c=Tp(a.childNodes[0].childNodes),l=[];let h=1;for(const t of c)h%2&&l.push(t.childNodes[0]),h++;const d=s(l),u=s(Tp(o.childNodes[0].childNodes))[0],p=Tf.getInstance().factory_.makeBranchNode(Kp.PREMISES,d,[]);p.mathmlTree=a;const m=Tf.getInstance().factory_.makeBranchNode(Kp.CONCLUSION,[u],[]);return m.mathmlTree=o.childNodes[0].childNodes[0],{conclusion:m,premises:p}}findNestedRow(t,e,s){return Tf.getInstance().findNestedRow_(t,e,0,s)}cleanInference(t){return Tp(t).filter((function(t){return"MSPACE"!==Ip(t)}))}operatorNode(t){return t.type===Kp.UNKNOWN&&(t.type=Kp.OPERATOR),Cf.run("multioperator",t)}constructor(){this.funcAppls={},this.splitRoles=new Map([[Yp.SUBTRACTION,Yp.NEGATIVE],[Yp.ADDITION,Yp.POSITIVE]]),this.splitOps=["\u2212","-","\u2010","\u2011","+"],this.factory_=new Bm,Cf.updateFactory(this.factory_)}implicitNode_(t){const e=Tf.getInstance().factory_.makeMultipleContentNodes(t.length-1,im.invisibleTimes);Tf.matchSpaces_(t,e);const s=Tf.getInstance().infixNode_(t,e[0]);return s.role=Yp.IMPLICIT,e.forEach((function(t){t.parent=s})),s.contentNodes=e,s}infixNode_(t,e){let s=Tf.getInstance().factory_.makeBranchNode(Kp.INFIXOP,t,[e],Sm(e).textContent);return s.role=e.role,s=Cf.run("propagateInterval",s),Cf.run("propagateSimpleFunction",s)}explicitMixed_(t){const e=Om(t,(function(t){return t.textContent===im.invisiblePlus}));if(!e.rel.length)return t;let s=[];for(let t,i=0;t=e.rel[i];i++){const r=e.comp[i],n=e.comp[i+1],o=r.length-1;if(r[o]&&n[0]&&jm(r[o],Kp.NUMBER)&&!qm(r[o],Yp.MIXED)&&jm(n[0],Kp.FRACTION)){const t=Tf.getInstance().factory_.makeBranchNode(Kp.NUMBER,[r[o],n[0]],[]);t.role=Yp.MIXED,s=s.concat(r.slice(0,o)),s.push(t),n.shift()}else s=s.concat(r),s.push(t)}return s.concat(e.comp[e.comp.length-1])}concatNode_(t,e,s){if(0===e.length)return t;const i=e.map((function(t){return Sm(t).textContent})).join(" "),r=Tf.getInstance().factory_.makeBranchNode(s,[t],e,i);return e.length>1&&(r.role=Yp.MULTIOP),r}prefixNode_(t,e){const s=this.splitSingles(e);let i=t;for(;s.length>0;){const t=s.pop();i=Tf.getInstance().concatNode_(i,t,Kp.PREFIXOP),1===t.length&&-1!==this.splitOps.indexOf(t[0].textContent)&&(i.role=this.splitRoles.get(t[0].role))}return i}splitSingles(t){let e=0;const s=[];let i=0;for(;i1&&(n=Tf.getInstance().implicitNode_(t),n.role=Yp.UNIT),n&&s.push(n),i&&s.push(i)}while(i);return s}getMixedNumbers_(t){const e=Om(t,(function(t){return jm(t,Kp.FRACTION)&&qm(t,Yp.VULGAR)}));if(!e.rel.length)return t;let s=[];for(let t,i=0;t=e.rel[i];i++){const r=e.comp[i],n=r.length-1;if(r[n]&&jm(r[n],Kp.NUMBER)&&(qm(r[n],Yp.INTEGER)||qm(r[n],Yp.FLOAT))){const e=Tf.getInstance().factory_.makeBranchNode(Kp.NUMBER,[r[n],t],[]);e.role=Yp.MIXED,s=s.concat(r.slice(0,n)),s.push(e)}else s=s.concat(r),s.push(t)}return s.concat(e.comp[e.comp.length-1])}getTextInRow_(t){if(0===t.length)return t;if(1===t.length)return t[0].type===Kp.TEXT&&t[0].role===Yp.UNKNOWN&&(t[0].role=Yp.ANNOTATION),t;const{rel:e,comp:s}=Om(t,(t=>jm(t,Kp.TEXT)));if(0===e.length)return t;const i=[];let r=s.shift();for(;e.length>0;){let t=e.shift(),n=s.shift();const o=[];for(;!n.length&&e.length&&t.role!==Yp.SPACE&&e[0].role!==Yp.SPACE;)o.push(t),t=e.shift(),n=s.shift();if(o.length){r.length&&i.push(Tf.getInstance().row(r)),o.push(t);const e=Tf.getInstance().dummyNode_(o);i.push(e),r=n;continue}if(t.role!==Yp.UNKNOWN){r.length&&i.push(Tf.getInstance().row(r)),i.push(t),r=n;continue}const a=om.Meaning.get(t.textContent);a.type!==Kp.PUNCTUATION?a.type===Kp.UNKNOWN?(Tf.meaningFromContent(t,((t,e,s)=>{if(t.role===Yp.UNKNOWN){if(Tf.numberRole_(t,e,s),t.role===Yp.OTHERNUMBER)return s.some((t=>t.type!==Kp.NUMBER&&t.type!==Kp.IDENTIFIER))?(t.type=Kp.TEXT,void(t.role=Yp.ANNOTATION)):void(t.role=Yp.UNKNOWN);t.type=Kp.NUMBER}})),t.type!==Kp.TEXT||t.role===Yp.UNKNOWN?(t.role===Yp.UNKNOWN&&(e.length||n.length?n.length&&n[0].type===Kp.FENCED?(t.type=Kp.FUNCTION,t.role=Yp.PREFIXFUNC):t.role=Yp.TEXT:(t.type=Kp.IDENTIFIER,t.role=Yp.UNIT)),r.push(t),r=r.concat(n)):(r.length&&i.push(Tf.getInstance().row(r)),i.push(t),r=n)):(t.type=a.type,t.role=a.role,t.font=a.font,t.addAnnotation("general","text"),r.push(t),r=r.concat(n)):(t.role=a.role,t.font=a.font,r.length&&i.push(Tf.getInstance().row(r)),i.push(t),r=n)}return r.length>0&&i.push(Tf.getInstance().row(r)),i.length>1?[Tf.getInstance().dummyNode_(i)]:i}relationsInRow_(t){const e=Om(t,$m),s=e.rel[0];if(!s)return Tf.getInstance().operationsInRow_(t);if(1===t.length)return t[0];const i=e.comp.map(Tf.getInstance().operationsInRow_);let r;return e.rel.some((function(t){return!t.equals(s)}))?(r=Tf.getInstance().factory_.makeBranchNode(Kp.MULTIREL,i,e.rel),e.rel.every((function(t){return t.role===s.role}))&&(r.role=s.role),r):(r=Tf.getInstance().factory_.makeBranchNode(Kp.RELSEQ,i,e.rel,Sm(s).textContent),r.role=s.role,r)}operationsInRow_(t){if(0===t.length)return Tf.getInstance().factory_.makeEmptyNode();if(1===(t=Tf.getInstance().explicitMixed_(t)).length)return t[0];const e=[];for(;t.length>0&&Km(t[0]);)e.push(t.shift());if(0===t.length)return Tf.getInstance().prefixNode_(e.pop(),e);if(1===t.length)return Tf.getInstance().prefixNode_(t[0],e);const s=Rm(t=Cf.run("convert_juxtaposition",t),Km),i=Tf.getInstance().wrapFactor(e,s);return Tf.getInstance().addFactor(i,s)}wrapPostfix(t){var e;(null===(e=t.div)||void 0===e?void 0:e.role)===Yp.POSTFIXOP&&(t.tail.length&&t.tail[0].type!==Kp.OPERATOR?t.div.role=Yp.DIVISION:(t.head=[Tf.getInstance().postfixNode_(Tf.getInstance().implicitNode(t.head),[t.div])],t.div=t.tail.shift(),Tf.getInstance().wrapPostfix(t)))}wrapFactor(t,e){return Tf.getInstance().wrapPostfix(e),Tf.getInstance().prefixNode_(Tf.getInstance().implicitNode(e.head),t)}addFactor(t,e){return e.div?Tf.getInstance().operationsTree_(e.tail,t,e.div):(ff(t)&&(t.role=Yp.UNIT),t)}operationsTree_(t,e,s,i=[]){if(0===t.length){if(i.unshift(s),e.type===Kp.INFIXOP){const t=Tf.getInstance().postfixNode_(e.childNodes.pop(),i);return e.appendChild(t),e}return Tf.getInstance().postfixNode_(e,i)}const r=Rm(t,Km);if(0===r.head.length)return i.push(r.div),Tf.getInstance().operationsTree_(r.tail,e,s,i);const n=Tf.getInstance().wrapFactor(i,r),o=Tf.getInstance().appendOperand_(e,s,n);return Tf.getInstance().addFactor(o,r)}appendOperand_(t,e,s){if(t.type!==Kp.INFIXOP)return Tf.getInstance().infixNode_([t,s],e);const i=Tf.getInstance().appendDivisionOp_(t,e,s);return i||(Tf.getInstance().appendExistingOperator_(t,e,s)?t:e.role===Yp.MULTIPLICATION?Tf.getInstance().appendMultiplicativeOp_(t,e,s):Tf.getInstance().appendAdditiveOp_(t,e,s))}appendDivisionOp_(t,e,s){return e.role===Yp.DIVISION?gf(t)?Tf.getInstance().infixNode_([t,s],e):Tf.getInstance().appendLastOperand_(t,e,s):t.role===Yp.DIVISION?Tf.getInstance().infixNode_([t,s],e):null}appendLastOperand_(t,e,s){let i=t,r=t.childNodes[t.childNodes.length-1];for(;r&&r.type===Kp.INFIXOP&&!gf(r);)i=r,r=i.childNodes[t.childNodes.length-1];const n=Tf.getInstance().infixNode_([i.childNodes.pop(),s],e);return i.appendChild(n),t}appendMultiplicativeOp_(t,e,s){if(gf(t))return Tf.getInstance().infixNode_([t,s],e);let i=t,r=t.childNodes[t.childNodes.length-1];for(;r&&r.type===Kp.INFIXOP&&!gf(r);)i=r,r=i.childNodes[t.childNodes.length-1];const n=Tf.getInstance().infixNode_([i.childNodes.pop(),s],e);return i.appendChild(n),t}appendAdditiveOp_(t,e,s){return Tf.getInstance().infixNode_([t,s],e)}appendExistingOperator_(t,e,s){return!(!t||t.type!==Kp.INFIXOP||gf(t))&&(t.contentNodes[0].equals(e)?(t.appendContentNode(e),t.appendChild(s),!0):Tf.getInstance().appendExistingOperator_(t.childNodes[t.childNodes.length-1],e,s))}getFencesInRow_(t){let e=Om(t,Qm);e=Tf.purgeFences_(e);const s=e.comp.shift();return Tf.getInstance().fences_(e.rel,e.comp,[],[s])}fences_(t,e,s,i){if(0===t.length&&0===s.length)return i[0];const r=Cf.run("bracketed_interval",[t[0],t[1],...e[0]||[]],(()=>null));if(r){t.shift(),t.shift(),e.shift();const n=i.pop()||[];return i.push([...n,r,...e.shift()]),Tf.getInstance().fences_(t,e,s,i)}const n=t=>qm(t,Yp.OPEN);if(0===t.length){const t=i.shift();for(;s.length>0;){if(n(s[0])){const e=s.shift();Tf.fenceToPunct_(e),t.push(e)}else{const e=Rm(s,n),r=e.head.length-1,o=Tf.getInstance().neutralFences_(e.head,i.slice(0,r));i=i.slice(r),t.push(...o),e.div&&e.tail.unshift(e.div),s=e.tail}t.push(...i.shift())}return t}const o=s[s.length-1],a=t[0].role;if(a===Yp.OPEN||Ef(t[0])&&(!o||!Nf(t[0],o))){s.push(t.shift());const r=e.shift();return r&&i.push(r),Tf.getInstance().fences_(t,e,s,i)}if(o&&a===Yp.CLOSE&&o.role===Yp.OPEN){const r=Tf.getInstance().horizontalFencedNode_(s.pop(),t.shift(),i.pop());return i.push(i.pop().concat([r],e.shift())),Tf.getInstance().fences_(t,e,s,i)}if(o&&Nf(t[0],o)){if(!yf(o)||!xf(t[0])){s.push(t.shift());const r=e.shift();return r&&i.push(r),Tf.getInstance().fences_(t,e,s,i)}const r=Tf.getInstance().horizontalFencedNode_(s.pop(),t.shift(),i.pop());return i.push(i.pop().concat([r],e.shift())),Tf.getInstance().fences_(t,e,s,i)}if(o&&a===Yp.CLOSE&&Ef(o)&&s.some(n)){const r=Rm(s,n,!0),o=i.pop(),a=i.length-r.tail.length+1,c=Tf.getInstance().neutralFences_(r.tail,i.slice(a));i=i.slice(0,a);const l=Tf.getInstance().horizontalFencedNode_(r.div,t.shift(),i.pop().concat(c,o));return i.push(i.pop().concat([l],e.shift())),Tf.getInstance().fences_(t,e,r.head,i)}const c=t.shift();return Tf.fenceToPunct_(c),i.push(i.pop().concat([c],e.shift())),Tf.getInstance().fences_(t,e,s,i)}neutralFences_(t,e){if(0===t.length)return t;if(1===t.length)return Tf.fenceToPunct_(t[0]),t;const s=t.shift();if(!yf(s)){Tf.fenceToPunct_(s);const i=e.shift();return i.unshift(s),i.concat(Tf.getInstance().neutralFences_(t,e))}const i=Rm(t,(function(t){return Nf(t,s)}));if(!i.div){Tf.fenceToPunct_(s);const i=e.shift();return i.unshift(s),i.concat(Tf.getInstance().neutralFences_(t,e))}if(!xf(i.div))return Tf.fenceToPunct_(i.div),t.unshift(s),Tf.getInstance().neutralFences_(t,e);const r=Tf.getInstance().combineFencedContent_(s,i.div,i.head,e);if(i.tail.length>0){const t=r.shift(),e=Tf.getInstance().neutralFences_(i.tail,r);return t.concat(e)}return r[0]}combineFencedContent_(t,e,s,i){if(0===s.length){const s=Tf.getInstance().horizontalFencedNode_(t,e,i.shift());return i.length>0?i[0].unshift(s):i=[[s]],i}const r=i.shift(),n=s.length-1,o=i.slice(0,n),a=(i=i.slice(n)).shift(),c=Tf.getInstance().neutralFences_(s,o);r.push(...c),r.push(...a);const l=Tf.getInstance().horizontalFencedNode_(t,e,r);return i.length>0?i[0].unshift(l):i=[[l]],i}horizontalFencedNode_(t,e,s){const i=Tf.getInstance().row(s);let r=Tf.getInstance().factory_.makeBranchNode(Kp.FENCED,[i],[t,e]);return t.role===Yp.OPEN?(Tf.getInstance().classifyHorizontalFence_(r),r=Cf.run("propagateComposedFunction",r)):r.role=t.role,r=Cf.run("detect_cycle",r),Tf.rewriteFencedNode_(r)}classifyHorizontalFence_(t){if(Cf.run("interval_heuristic",t),t.role===Yp.INTERVAL)return;t.role=Yp.LEFTRIGHT;const e=t.childNodes;if(!function(t){return function(t){return!!t&&-1!==["{","\ufe5b","\uff5b"].indexOf(t.textContent)}(t.contentNodes[0])&&function(t){return!!t&&-1!==["}","\ufe5c","\uff5d"].indexOf(t.textContent)}(t.contentNodes[1])}(t)||e.length>1)return;if(0===e.length||e[0].type===Kp.EMPTY)return void(t.role=Yp.SETEMPTY);const s=e[0].type;if(1===e.length&&uf(e[0]))return void(t.role=Yp.SETSINGLE);const i=e[0].role;if(s===Kp.PUNCTUATED&&i===Yp.SEQUENCE){if(e[0].contentNodes[0].role!==Yp.COMMA)return 1!==e[0].contentNodes.length||e[0].contentNodes[0].role!==Yp.VBAR&&e[0].contentNodes[0].role!==Yp.COLON?void 0:(t.role=Yp.SETEXT,void Tf.getInstance().setExtension_(t));t.role=Yp.SETCOLLECT}}setExtension_(t){const e=t.childNodes[0].childNodes[0];e&&e.type===Kp.INFIXOP&&1===e.contentNodes.length&&vf(e.contentNodes[0])&&(e.addAnnotation("set","intensional"),e.contentNodes[0].addAnnotation("set","intensional"))}getPunctuationInRow_(t){if(t.length<=1)return t;const e=t=>{const e=t.type;return"punctuation"===e||"text"===e||"operator"===e||"relation"===e},s=Om(t,(function(s){if(!Ym(s))return!1;if(Ym(s)&&!qm(s,Yp.ELLIPSIS))return!0;const i=t.indexOf(s);if(0===i)return!t[1]||!e(t[1]);const r=t[i-1];if(i===t.length-1)return!e(r);const n=t[i+1];return!e(r)||!e(n)}));if(0===s.rel.length)return t;let i=[],r=s.comp.shift();r.length>0&&i.push(Tf.getInstance().row(r));let n=0;for(;s.comp.length>0;){let t=[];const e=n;do{t.push(s.rel[n++]),r=s.comp.shift()}while(s.rel[n]&&r&&0===r.length);t=Cf.run("ellipses",t),s.rel.splice(e,n-e,...t),n=e+t.length,i=i.concat(t),r&&r.length>0&&i.push(Tf.getInstance().row(r))}return 1===i.length&&1===s.rel.length?i:[Tf.getInstance().punctuatedNode_(i,s.rel)]}punctuatedNode_(t,e){const s=Tf.getInstance().factory_.makeBranchNode(Kp.PUNCTUATED,t,e);if(e.length===t.length){const t=e[0].role;if(t!==Yp.UNKNOWN&&e.every((function(e){return e.role===t})))return s.role=t,s}const i=e[0];return cf(t,e,0)?s.role=i.childNodes.length&&!i.embellished?i.role:Yp.STARTPUNCT:cf(t,e,t.length-1)?s.role=i.childNodes.length&&!i.embellished?i.role:Yp.ENDPUNCT:e.every((t=>qm(t,Yp.DUMMY)))?s.role=Yp.TEXT:e.every((t=>qm(t,Yp.SPACE)))?s.role=Yp.SPACE:s.role=Yp.SEQUENCE,s}dummyNode_(t){const e=Tf.getInstance().factory_.makeMultipleContentNodes(t.length-1,im.invisibleComma);return e.forEach((function(t){t.role=Yp.DUMMY})),Tf.getInstance().punctuatedNode_(t,e)}accentRole_(t,e){if(!Hm(t))return!1;const s=t.textContent,i=om.Secondary.get(s,em.BAR)||om.Secondary.get(s,em.TILDE)||t.role;return t.role=e===Kp.UNDERSCORE?Yp.UNDERACCENT:Yp.OVERACCENT,t.addAnnotation("accent",i),!0}accentNode_(t,e,s,i,r){const n=(e=e.slice(0,i+1))[1],o=e[2];let a;if(!r&&o&&(a=Tf.getInstance().factory_.makeBranchNode(Kp.SUBSCRIPT,[t,n],[]),a.role=Yp.SUBSUP,e=[a,o],s=Kp.SUPERSCRIPT),r){const i=Tf.getInstance().accentRole_(n,s);if(o){Tf.getInstance().accentRole_(o,Kp.OVERSCORE)&&!i?(a=Tf.getInstance().factory_.makeBranchNode(Kp.OVERSCORE,[t,o],[]),e=[a,n],s=Kp.UNDERSCORE):(a=Tf.getInstance().factory_.makeBranchNode(Kp.UNDERSCORE,[t,n],[]),e=[a,o],s=Kp.OVERSCORE),a.role=Yp.UNDEROVER}}return Tf.getInstance().makeLimitNode_(t,e,a,s)}makeLimitNode_(t,e,s,i){if(i===Kp.LIMUPPER&&t.type===Kp.LIMLOWER)return t.childNodes.push(e[1]),e[1].parent=t,t.type=Kp.LIMBOTH,t;if(i===Kp.LIMLOWER&&t.type===Kp.LIMUPPER)return t.childNodes.splice(1,-1,e[1]),e[1].parent=t,t.type=Kp.LIMBOTH,t;const r=Tf.getInstance().factory_.makeBranchNode(i,e,[]),n=Jm(t);return s&&(s.embellished=n),r.embellished=n,r.role=t.role,r}getFunctionsInRow_(t,e){const s=e||[];if(0===t.length)return s;const i=t.shift(),r=Tf.classifyFunction_(i,t);if(!r)return s.push(i),Tf.getInstance().getFunctionsInRow_(t,s);const n=Tf.getInstance().getFunctionsInRow_(t,[]),o=Tf.getInstance().getFunctionArgs_(i,n,r);return s.concat(o)}getFunctionArgs_(t,e,s){let i,r,n;switch(s){case"integral":{const s=Tf.getInstance().getIntegralArgs_(e);if(!s.intvar&&!s.integrand.length)return s.rest.unshift(t),s.rest;const i=Tf.getInstance().row(s.integrand);return n=Tf.getInstance().integralNode_(t,i,s.intvar),Cf.run("intvar_from_fraction",n),s.rest.unshift(n),s.rest}case"prefix":if(e[0]&&e[0].type===Kp.FENCED){const s=e.shift();return Ef(s)||(s.role=Yp.LEFTRIGHT),n=Tf.getInstance().functionNode_(t,s),e.unshift(n),e}if(i=Rm(e,Wm),i.head.length)r=Tf.getInstance().row(i.head),i.div&&i.tail.unshift(i.div);else{if(!i.div||!jm(i.div,Kp.APPL))return e.unshift(t),e;r=i.div}return n=Tf.getInstance().functionNode_(t,r),i.tail.unshift(n),i.tail;case"bigop":return i=Rm(e,zm),i.head.length?(r=Tf.getInstance().row(i.head),n=Tf.getInstance().bigOpNode_(t,r),i.div&&i.tail.unshift(i.div),i.tail.unshift(n),i.tail):(e.unshift(t),e);default:{if(0===e.length)return[t];const s=e[0];return s.type===Kp.FENCED&&!Ef(s)&&function(t){const e=t.childNodes;if(0===e.length)return!0;if(e.length>1)return!1;const s=e[0];if(s.type===Kp.INFIXOP){if(s.role!==Yp.IMPLICIT)return!1;if(s.childNodes.some((t=>jm(t,Kp.INFIXOP))))return!1}return!0}(s)?(s.role=Yp.LEFTRIGHT,Tf.propagateFunctionRole_(t,Yp.SIMPLEFUNC),n=Tf.getInstance().functionNode_(t,e.shift()),e.unshift(n),e):(e.unshift(t),e)}}}getIntegralArgs_(t,e=[]){if(0===t.length){const t=Rm(e,zm);return t.div&&t.tail.unshift(t.div),{integrand:t.head,intvar:null,rest:t.tail}}Cf.run("intvar_from_implicit",t);const s=t[0];if(Gm(s)){const{integrand:s,rest:i}=Tf.getInstance().getIntegralArgs_(e);return{integrand:s,intvar:null,rest:i.concat(t)}}if(Vm(s))return s.role=Yp.INTEGRAL,{integrand:e,intvar:s,rest:t.slice(1)};if(t[1]&&Xm(s,t[1])){const i=Tf.getInstance().prefixNode_(t[1],[s]);return i.role=Yp.INTEGRAL,{integrand:e,intvar:i,rest:t.slice(2)}}return e.push(t.shift()),Tf.getInstance().getIntegralArgs_(t,e)}functionNode_(t,e){const s=Tf.getInstance().factory_.makeContentNode(im.functionApplication),i=Tf.getInstance().funcAppls[t.id];i&&(s.mathmlTree=i.mathmlTree,s.mathml=i.mathml,s.annotation=i.annotation,s.attributes=i.attributes,delete Tf.getInstance().funcAppls[t.id]),s.type=Kp.PUNCTUATION,s.role=Yp.APPLICATION;const r=Tf.getFunctionOp_(t,(function(t){return jm(t,Kp.FUNCTION)||jm(t,Kp.IDENTIFIER)&&qm(t,Yp.SIMPLEFUNC)}));return Tf.getInstance().functionalNode_(Kp.APPL,[t,e],r,[s])}bigOpNode_(t,e){const s=Tf.getFunctionOp_(t,(t=>jm(t,Kp.LARGEOP)));return Tf.getInstance().functionalNode_(Kp.BIGOP,[t,e],s,[])}integralNode_(t,e,s){e=e||Tf.getInstance().factory_.makeEmptyNode(),s=s||Tf.getInstance().factory_.makeEmptyNode();const i=Tf.getFunctionOp_(t,(t=>jm(t,Kp.LARGEOP)));return Tf.getInstance().functionalNode_(Kp.INTEGRAL,[t,e,s],i,[])}functionalNode_(t,e,s,i){const r=e[0];let n;s&&(n=s.parent,i.push(s));const o=Tf.getInstance().factory_.makeBranchNode(t,e,i);return o.role=r.role,n&&(s.parent=n),o}fractionNode_(t,e){const s=Tf.getInstance().factory_.makeBranchNode(Kp.FRACTION,[t,e],[]);return s.role=s.childNodes.every((function(t){return jm(t,Kp.NUMBER)&&qm(t,Yp.INTEGER)}))?Yp.VULGAR:s.childNodes.every(mf)?Yp.UNIT:Yp.DIVISION,Cf.run("propagateSimpleFunction",s)}scriptNode_(t,e,s){let i;switch(t.length){case 0:i=Tf.getInstance().factory_.makeEmptyNode();break;case 1:if(i=t[0],s)return i;break;default:i=Tf.getInstance().dummyNode_(t)}return i.role=e,i}findNestedRow_(t,e,s,i){if(s>3)return null;for(let r,n=0;r=t[n];n++){const t=Ip(r);if(t!==Nm.MSPACE){if(t===Nm.MROW)return Tf.getInstance().findNestedRow_(Tp(r.childNodes),e,s+1,i);if(Tf.findSemantics(r,e,i))return r}}return null}}Tf.FENCE_TO_PUNCT_={[Yp.METRIC]:Yp.METRIC,[Yp.NEUTRAL]:Yp.VBAR,[Yp.OPEN]:Yp.OPENFENCE,[Yp.CLOSE]:Yp.CLOSEFENCE},Tf.MML_TO_LIMIT_={[Nm.MSUB]:{type:Kp.LIMLOWER,length:1},[Nm.MUNDER]:{type:Kp.LIMLOWER,length:1},[Nm.MSUP]:{type:Kp.LIMUPPER,length:1},[Nm.MOVER]:{type:Kp.LIMUPPER,length:1},[Nm.MSUBSUP]:{type:Kp.LIMBOTH,length:2},[Nm.MUNDEROVER]:{type:Kp.LIMBOTH,length:2}},Tf.MML_TO_BOUNDS_={[Nm.MSUB]:{type:Kp.SUBSCRIPT,length:1,accent:!1},[Nm.MSUP]:{type:Kp.SUPERSCRIPT,length:1,accent:!1},[Nm.MSUBSUP]:{type:Kp.SUBSCRIPT,length:2,accent:!1},[Nm.MUNDER]:{type:Kp.UNDERSCORE,length:1,accent:!0},[Nm.MOVER]:{type:Kp.OVERSCORE,length:1,accent:!0},[Nm.MUNDEROVER]:{type:Kp.UNDERSCORE,length:2,accent:!0}},Tf.CLASSIFY_FUNCTION_={[Yp.INTEGRAL]:"integral",[Yp.SUM]:"bigop",[Yp.PREFIXFUNC]:"prefix",[Yp.LIMFUNC]:"prefix",[Yp.SIMPLEFUNC]:"prefix",[Yp.COMPFUNC]:"prefix"},Tf.MATHJAX_FONTS={"-tex-caligraphic":Zp.CALIGRAPHIC,"-tex-caligraphic-bold":Zp.CALIGRAPHICBOLD,"-tex-calligraphic":Zp.CALIGRAPHIC,"-tex-calligraphic-bold":Zp.CALIGRAPHICBOLD,"-tex-oldstyle":Zp.OLDSTYLE,"-tex-oldstyle-bold":Zp.OLDSTYLEBOLD,"-tex-mathit":Zp.ITALIC};class _f extends Fm{static getAttribute_(t,e,s){if(!t.hasAttribute(e))return s;const i=t.getAttribute(e);return i.match(/^\s*$/)?null:i}constructor(t){super("MathML"),this.options=t,Cf.options=t,this.parseMap_=new Map([[Nm.SEMANTICS,this.semantics_.bind(this)],[Nm.MATH,this.rows_.bind(this)],[Nm.MROW,this.rows_.bind(this)],[Nm.MPADDED,this.rows_.bind(this)],[Nm.MSTYLE,this.rows_.bind(this)],[Nm.MFRAC,this.fraction_.bind(this)],[Nm.MSUB,this.limits_.bind(this)],[Nm.MSUP,this.limits_.bind(this)],[Nm.MSUBSUP,this.limits_.bind(this)],[Nm.MOVER,this.limits_.bind(this)],[Nm.MUNDER,this.limits_.bind(this)],[Nm.MUNDEROVER,this.limits_.bind(this)],[Nm.MROOT,this.root_.bind(this)],[Nm.MSQRT,this.sqrt_.bind(this)],[Nm.MTABLE,this.table_.bind(this)],[Nm.MLABELEDTR,this.tableLabeledRow_.bind(this)],[Nm.MTR,this.tableRow_.bind(this)],[Nm.MTD,this.tableCell_.bind(this)],[Nm.MS,this.text_.bind(this)],[Nm.MTEXT,this.text_.bind(this)],[Nm.MSPACE,this.space_.bind(this)],[Nm.ANNOTATIONXML,this.text_.bind(this)],[Nm.MI,this.identifier_.bind(this)],[Nm.MN,this.number_.bind(this)],[Nm.MO,this.operator_.bind(this)],[Nm.MFENCED,this.fenced_.bind(this)],[Nm.MENCLOSE,this.enclosed_.bind(this)],[Nm.MMULTISCRIPTS,this.multiscripts_.bind(this)],[Nm.ANNOTATION,this.empty_.bind(this)],[Nm.NONE,this.empty_.bind(this)],[Nm.MACTION,this.action_.bind(this)]]);const e={type:Kp.IDENTIFIER,role:Yp.NUMBERSET,font:Zp.DOUBLESTRUCK};["C","H","N","P","Q","R","Z","\u2102","\u210d","\u2115","\u2119","\u211a","\u211d","\u2124"].forEach((t=>this.getFactory().defaultMap.set(t,e)).bind(this))}parse(t){Tf.getInstance().setNodeFactory(this.getFactory());const e=Tp(t.childNodes),s=Ip(t),i=this.parseMap_.get(s),r=(i||this.dummy_.bind(this))(t,e);return Im(r,t),-1!==[Nm.MATH,Nm.MROW,Nm.MPADDED,Nm.MSTYLE,Nm.SEMANTICS,Nm.MACTION].indexOf(s)||(r.mathml.unshift(t),r.mathmlTree=t),r}semantics_(t,e){return e.length?this.parse(e[0]):this.getFactory().makeEmptyNode()}rows_(t,e){const s=t.getAttribute("semantics");if(s&&s.match("bspr_"))return Tf.proof(t,s,this.parseList.bind(this));let i;if(1===(e=Lm(e)).length)i=this.parse(e[0]),i.type!==Kp.EMPTY||i.mathmlTree||(i.mathmlTree=t);else{const s=Cf.run("function_from_identifiers",t);i=s&&s!==t?s:Tf.getInstance().row(this.parseList(e))}return i.mathml.unshift(t),i}fraction_(t,e){if(!e.length)return this.getFactory().makeEmptyNode();const s=this.parse(e[0]),i=e[1]?this.parse(e[1]):this.getFactory().makeEmptyNode();return Tf.getInstance().fractionLikeNode(s,i,t.getAttribute("linethickness"),"true"===t.getAttribute("bevelled"))}limits_(t,e){return Tf.getInstance().limitNode(Ip(t),this.parseList(e))}root_(t,e){return e[1]?this.getFactory().makeBranchNode(Kp.ROOT,[this.parse(e[1]),this.parse(e[0])],[]):this.sqrt_(t,e)}sqrt_(t,e){const s=this.parseList(Lm(e));return this.getFactory().makeBranchNode(Kp.SQRT,[Tf.getInstance().row(s)],[])}table_(t,e){const s=t.getAttribute("semantics");if(s&&s.match("bspr_"))return Tf.proof(t,s,this.parseList.bind(this));const i=this.getFactory().makeBranchNode(Kp.TABLE,this.parseList(e),[]);return i.mathmlTree=t,Tf.tableToMultiline(i)}tableRow_(t,e){const s=this.getFactory().makeBranchNode(Kp.ROW,this.parseList(e),[]);return s.role=Yp.TABLE,s}tableLabeledRow_(t,e){var s;if(!e.length)return this.tableRow_(t,e);const i=this.parse(e[0]);i.role=Yp.LABEL,(null===(s=i.childNodes[0])||void 0===s?void 0:s.type)===Kp.TEXT&&(i.childNodes[0].role=Yp.LABEL);const r=this.getFactory().makeBranchNode(Kp.ROW,this.parseList(e.slice(1)),[i]);return r.role=Yp.TABLE,r}tableCell_(t,e){const s=this.parseList(Lm(e));let i;i=s.length?1===s.length&&jm(s[0],Kp.EMPTY)?s:[Tf.getInstance().row(s)]:[];const r=this.getFactory().makeBranchNode(Kp.CELL,i,[]);return r.role=Yp.TABLE,r}space_(t,e){const s=t.getAttribute("width"),i=s&&s.match(/[a-z]*$/);if(!i)return this.empty_(t,e);const r=i[0],n=parseFloat(s.slice(0,i.index)),o={cm:.4,pc:.5,em:.5,ex:1,in:.15,pt:5,mm:5}[r];if(!o||isNaN(n)||n!1){this.name=t,this.apply=e,this.applicable=s}}class kf extends wf{}class Af extends wf{}function Mf(t,e){const s=[];for(;t.length||e.length;)t.length&&s.push(t.shift()),e.length&&s.push(e.shift());return s}const Lf="data-semantic-";var If;!function(t){t.ADDED="data-semantic-added",t.ALTERNATIVE="data-semantic-alternative",t.CHILDREN="data-semantic-children",t.COLLAPSED="data-semantic-collapsed",t.CONTENT="data-semantic-content",t.EMBELLISHED="data-semantic-embellished",t.FENCEPOINTER="data-semantic-fencepointer",t.FONT="data-semantic-font",t.ID="data-semantic-id",t.ANNOTATION="data-semantic-annotation",t.ATTRIBUTES="data-semantic-attributes",t.OPERATOR="data-semantic-operator",t.OWNS="data-semantic-owns",t.PARENT="data-semantic-parent",t.POSTFIX="data-semantic-postfix",t.PREFIX="data-semantic-prefix",t.ROLE="data-semantic-role",t.SPEECH="data-semantic-speech",t.STRUCTURE="data-semantic-structure",t.SUMMARY="data-semantic-summary",t.TYPE="data-semantic-type"}(If||(If={}));const Sf=[If.ADDED,If.ALTERNATIVE,If.CHILDREN,If.COLLAPSED,If.CONTENT,If.EMBELLISHED,If.FENCEPOINTER,If.FONT,If.ID,If.ANNOTATION,If.ATTRIBUTES,If.OPERATOR,If.OWNS,If.PARENT,If.POSTFIX,If.PREFIX,If.ROLE,If.SPEECH,If.STRUCTURE,If.SUMMARY,If.TYPE];function Rf(t){return t.map((function(t){return t.id})).join(",")}function Of(t,e){t.setAttribute(If.TYPE,e.type);const s=e.allAttributes();for(let e,i=0;e=s[i];i++)t.setAttribute(Lf+e[0].toLowerCase(),e[1]);e.childNodes.length&&t.setAttribute(If.CHILDREN,Rf(e.childNodes)),e.contentNodes.length&&t.setAttribute(If.CONTENT,Rf(e.contentNodes)),e.parent&&t.setAttribute(If.PARENT,e.parent.id.toString());const i=e.attributesXml();i&&t.setAttribute(If.ATTRIBUTES,i),function(t,e){const s=[];e.role===Yp.MGLYPH&&s.push("image");e.attributes.href&&s.push("link");s.length&&t.setAttribute(If.POSTFIX,s.join(" "))}(t,e)}function Df(){const t=Ap("mrow");return t.setAttribute(If.ADDED,"true"),t}class Pf{static fromTree(t){return Pf.fromNode(t.root)}static fromNode(t){return new Pf(Pf.fromNode_(t))}static fromString(t){return new Pf(Pf.fromString_(t))}static simpleCollapseStructure(t){return"number"==typeof t}static contentCollapseStructure(t){return!!t&&!Pf.simpleCollapseStructure(t)&&"c"===t[0]}static interleaveIds(t,e){return Mf(Pf.collapsedLeafs(t),Pf.collapsedLeafs(e))}static collapsedLeafs(...t){return t.reduce(((t,e)=>{return t.concat((s=e,Pf.simpleCollapseStructure(s)?[s]:Pf.contentCollapseStructure(s[1])?s.slice(2):s.slice(1)));var s}),[])}static fromStructure(t,e,s){return new Pf(Pf.tree_(t,e.root,s))}static combineContentChildren(t,e,s,i){switch(t){case Kp.RELSEQ:case Kp.INFIXOP:case Kp.MULTIREL:return Mf(i,s);case Kp.PREFIXOP:return s.concat(i);case Kp.POSTFIXOP:return i.concat(s);case Kp.MATRIX:case Kp.VECTOR:case Kp.FENCED:return i.unshift(s[0]),i.push(s[1]),i;case Kp.CASES:return i.unshift(s[0]),i;case Kp.APPL:return[i[0],s[0],i[1]];case Kp.ROOT:return[i[0],i[1]];case Kp.ROW:case Kp.LINE:return s.length&&i.unshift(s[0]),i;default:return i}}static makeSexp_(t){return Pf.simpleCollapseStructure(t)?t.toString():Pf.contentCollapseStructure(t)?"(c "+t.slice(1).map(Pf.makeSexp_).join(" ")+")":"("+t.map(Pf.makeSexp_).join(" ")+")"}static fromString_(t){let e=t.replace(/\(/g,"[");return e=e.replace(/\)/g,"]"),e=e.replace(/ /g,","),e=e.replace(/c/g,'"c"'),JSON.parse(e)}static fromNode_(t){if(!t)return[];const e=t.contentNodes;let s;e.length&&(s=e.map(Pf.fromNode_),s.unshift("c"));const i=t.childNodes;if(!i.length)return e.length?[t.id,s]:t.id;const r=i.map(Pf.fromNode_);return e.length&&r.unshift(s),r.unshift(t.id),r}static tree_(t,e,s,i=0,r=1,n=1){if(!e)return[];const o=e.id,a=[o];!function(t){if(bp.getInstance().mode!==ep.HTTP)return;let e=t;for(;e&&!e.evaluate;)e=e.parentNode;e&&e.evaluate?Np.currentDocument=e:t.ownerDocument&&(Np.currentDocument=t.ownerDocument)}(t);const c=function(t,e){let s;try{s=Cp(t,e,Np.result.ORDERED_NODE_ITERATOR_TYPE)}catch(t){return[]}const i=[];for(let t=s.iterateNext();t;t=s.iterateNext())i.push(t);return i}(`.//self::*[@${If.ID}=${o}]`,t)[0];if(!e.childNodes.length)return Pf.addAria(c,i,r,n,s),e.id;const l=Pf.combineContentChildren(e.type,e.role,e.contentNodes.map((function(t){return t})),e.childNodes.map((function(t){return t})));c&&Pf.addOwns_(c,l);for(let e,r=0,n=l.length;e=l[r];r++)a.push(Pf.tree_(t,e,s,i+1,r+1,n));return Pf.addAria(c,i,r,n,s),a}static addAria(t,e,s,i,r){const n=r.tree?e?"treeitem":"tree":"treeitem";r.aria&&t&&(t.setAttribute("aria-level",e.toString()),t.setAttribute("aria-posinset",s.toString()),t.setAttribute("aria-setsize",i.toString()),t.setAttribute("role",n),t.hasAttribute(If.OWNS)&&t.setAttribute("aria-owns",t.getAttribute(If.OWNS)))}static addOwns_(t,e){const s=t.getAttribute(If.COLLAPSED),i=s?Pf.realLeafs_(Pf.fromString(s).array):e.map((t=>t.id));t.setAttribute(If.OWNS,i.join(" "))}static realLeafs_(t){if(Pf.simpleCollapseStructure(t))return[t];if(Pf.contentCollapseStructure(t))return[];let e=[];for(let s=1;sPf.simpleCollapseStructure(t)?t:Pf.contentCollapseStructure(t)?t[1]:t[0]))}subtreeNodes(t){if(!this.isRoot(t))return[];const e=(t,s)=>{Pf.simpleCollapseStructure(t)?s.push(t):(Pf.contentCollapseStructure(t)&&(t=t.slice(1)),t.forEach((t=>e(t,s))))},s=this.levelsMap[t],i=[];return e(s.slice(1),i),i}}function Bf(t,e,s){let i=null;if(!t.length)return i;const r=s[s.length-1],n=r&&r.length,o=e&&e.length,a=Tf.getInstance();if(n&&o){if(e[0].type===Kp.INFIXOP&&e[0].role===Yp.IMPLICIT)return i=t.pop(),r.push(a.postfixNode_(r.pop(),t)),i;i=t.shift();const s=a.prefixNode_(e.shift(),t);return e.unshift(s),i}return n?(r.push(a.postfixNode_(r.pop(),t)),i):(o&&e.unshift(a.prefixNode_(e.shift(),t)),i)}function Ff(t,e,s){if(!e.length)return t;const i=t.pop(),r=e.shift(),n=s.shift();if(r.type===Kp.INFIXOP&&(r.role===Yp.IMPLICIT||r.role===Yp.UNIT)){dp.getInstance().output("Juxta Heuristic Case 2");const o=(i?[i,r]:[r]).concat(n);return Ff(t.concat(o),e,s)}if(!i)return dp.getInstance().output("Juxta Heuristic Case 3"),Ff([r].concat(n),e,s);const o=n.shift();if(!o){dp.getInstance().output("Juxta Heuristic Case 9");const n=Cf.factory.makeBranchNode(Kp.INFIXOP,[i,e.shift()],[r],r.textContent);return n.role=Yp.IMPLICIT,Cf.run("combine_juxtaposition",n),e.unshift(n),Ff(t,e,s)}if(Km(i)||Km(o))return dp.getInstance().output("Juxta Heuristic Case 4"),Ff(t.concat([i,r,o]).concat(n),e,s);let a=null;return bf(i)&&bf(o)?(dp.getInstance().output("Juxta Heuristic Case 5"),i.contentNodes.push(r),i.contentNodes=i.contentNodes.concat(o.contentNodes),i.childNodes.push(o),i.childNodes=i.childNodes.concat(o.childNodes),o.childNodes.forEach((t=>t.parent=i)),r.parent=i,i.addMathmlNodes(r.mathml),i.addMathmlNodes(o.mathml),a=i):bf(i)?(dp.getInstance().output("Juxta Heuristic Case 6"),i.contentNodes.push(r),i.childNodes.push(o),o.parent=i,r.parent=i,i.addMathmlNodes(r.mathml),i.addMathmlNodes(o.mathml),a=i):bf(o)?(dp.getInstance().output("Juxta Heuristic Case 7"),o.contentNodes.unshift(r),o.childNodes.unshift(i),i.parent=o,r.parent=o,o.addMathmlNodes(r.mathml),o.addMathmlNodes(i.mathml),a=o):(dp.getInstance().output("Juxta Heuristic Case 8"),a=Cf.factory.makeBranchNode(Kp.INFIXOP,[i,o],[r],r.textContent),a.role=Yp.IMPLICIT),t.push(a),Ff(t.concat(n),e,s)}function jf(t){return t.childNodes[0]&&t.childNodes[0].childNodes[0]&&Ip(t.childNodes[0])===Nm.MPADDED&&Ip(t.childNodes[0].childNodes[0])===Nm.MPADDED&&Ip(t.childNodes[0].childNodes[t.childNodes[0].childNodes.length-1])===Nm.MPHANTOM}Cf.add(new kf("combine_juxtaposition",(function(t){for(let e,s=t.childNodes.length-1;e=t.childNodes[s];s--)bf(e)&&!e.nobreaking&&(t.childNodes.splice(s,1,...e.childNodes),t.contentNodes.splice(s,0,...e.contentNodes),e.childNodes.concat(e.contentNodes).forEach((function(e){e.parent=t})),t.addMathmlNodes(e.mathml));return t}))),Cf.add(new kf("propagateSimpleFunction",(t=>(t.type!==Kp.INFIXOP&&t.type!==Kp.FRACTION||!t.childNodes.every(lf)||(t.role=Yp.COMPFUNC),t)),(t=>"clearspeak"===Cf.options.domain))),Cf.add(new kf("simpleNamedFunction",(t=>(t.role!==Yp.UNIT&&-1!==["f","g","h","F","G","H"].indexOf(t.textContent)&&(t.role=Yp.SIMPLEFUNC),t)),(t=>"clearspeak"===Cf.options.domain))),Cf.add(new kf("propagateComposedFunction",(t=>(t.type===Kp.FENCED&&t.childNodes[0].role===Yp.COMPFUNC&&(t.role=Yp.COMPFUNC),t)),(t=>"clearspeak"===Cf.options.domain))),Cf.add(new kf("multioperator",(t=>{t.role!==Yp.UNKNOWN||t.textContent.length<=1||(Tf.compSemantics(t,"role",Yp),Tf.compSemantics(t,"type",Kp))}))),Cf.add(new Af("convert_juxtaposition",(t=>{let e=Om(t,(function(t){return t.textContent===im.invisibleTimes&&t.type===Kp.OPERATOR}));e=e.rel.length?function(t){const e=[],s=[];let i=t.comp.shift(),r=null,n=[];for(;t.comp.length;)if(n=[],i.length)r&&e.push(r),s.push(i),r=t.rel.shift(),i=t.comp.shift();else{for(r&&n.push(r);!i.length&&t.comp.length;)i=t.comp.shift(),n.push(t.rel.shift());r=Bf(n,i,s)}n.length||i.length?(e.push(r),s.push(i)):(n.push(r),Bf(n,i,s));return{rel:e,comp:s}}(e):e,t=e.comp[0];for(let s,i,r=1;s=e.comp[r],i=e.rel[r-1];r++)t.push(i),t=t.concat(s);return e=Om(t,(function(t){return t.textContent===im.invisibleTimes&&(t.type===Kp.OPERATOR||t.type===Kp.INFIXOP)})),e.rel.length?Ff(e.comp.shift(),e.rel,e.comp):t}))),Cf.add(new kf("simple2prefix",(t=>(t.textContent.length>1&&!t.textContent[0].match(/[A-Z]/)&&(t.role=Yp.PREFIXFUNC),t)),(t=>"braille"===Cf.options.modality&&t.type===Kp.IDENTIFIER))),Cf.add(new kf("detect_cycle",(t=>{t.type=Kp.MATRIX,t.role=Yp.CYCLE;const e=t.childNodes[0];return e.type=Kp.ROW,e.role=Yp.CYCLE,e.textContent="",e.contentNodes=[],t}),(t=>t.type===Kp.FENCED&&t.childNodes[0].type===Kp.INFIXOP&&t.childNodes[0].role===Yp.IMPLICIT&&t.childNodes[0].childNodes.every((function(t){return t.type===Kp.NUMBER}))&&t.childNodes[0].contentNodes.every((function(t){return t.role===Yp.SPACE}))))),Cf.add(new Af("intvar_from_implicit",(function(t){const e=t[0].childNodes;t.splice(0,1,...e)}),(t=>t[0]&&gf(t[0])))),Cf.add(new kf("intvar_from_fraction",(function(t){const e=t.childNodes[1],s=e.childNodes[0];if(Vm(s))return void(s.role=Yp.INTEGRAL);if(!gf(s))return;const i=s.childNodes.length,r=s.childNodes[i-2],n=s.childNodes[i-1];if(Vm(n))return void(n.role=Yp.INTEGRAL);if(Xm(r,n)){const t=Tf.getInstance().prefixNode_(n,[r]);t.role=Yp.INTEGRAL,2===i?e.childNodes[0]=t:(s.childNodes.pop(),s.contentNodes.pop(),s.childNodes[i-2]=t,t.parent=s)}}),(t=>{if(t.type!==Kp.INTEGRAL)return!1;const[,e,s]=t.childNodes;return s.type===Kp.EMPTY&&e.type===Kp.FRACTION}))),Cf.add(new kf("rewrite_subcases",(function(t){t.addAnnotation("Emph","top");let e=[];if(t.hasAnnotation("Emph","left")){const s=qf(t.childNodes[0].childNodes[0].childNodes[0],!0);s.forEach((t=>t.addAnnotation("Emph","left"))),e=e.concat(s);for(let e,s=0;e=t.childNodes[s];s++)e.childNodes.shift()}if(e.push(t),t.hasAnnotation("Emph","right")){const s=qf(t.childNodes[0].childNodes[t.childNodes[0].childNodes.length-1].childNodes[0]);s.forEach((t=>t.addAnnotation("Emph","left"))),e=e.concat(s),t.childNodes[0].childNodes.pop()}Tf.tableToMultiline(t);const s=Tf.getInstance().row(e),i=t.annotation.Emph;return t.annotation.Emph=["table"],i.forEach((t=>s.addAnnotation("Emph",t))),s}),(t=>{let e=!0,s=!0;if(jf(t.childNodes[0].childNodes[0].mathmlTree)){for(let s,i=1;s=t.childNodes[i];i++)if(s.childNodes[0].childNodes.length){e=!1;break}}else e=!1;e&&t.addAnnotation("Emph","left");if(jf(t.childNodes[0].childNodes[t.childNodes[0].childNodes.length-1].mathmlTree)){const e=t.childNodes[0].childNodes.length;for(let i,r=1;i=t.childNodes[r];r++)if(i.childNodes.length>=e){s=!1;break}}else s=!1;return s&&t.addAnnotation("Emph","right"),e||s})));const Uf=[Kp.PUNCTUATED,Kp.RELSEQ,Kp.MULTIREL,Kp.INFIXOP,Kp.PREFIXOP,Kp.POSTFIXOP];function qf(t,e){if(!t.childNodes.length)return Wf(t),[t];let s=null;if(t.type===Kp.PUNCTUATED&&(e?t.role===Yp.ENDPUNCT:t.role===Yp.STARTPUNCT)){const i=t.childNodes;Wf(i[e?i.length-1:0])&&(t=i[e?0:i.length-1],s=i[e?i.length-1:0])}if(-1!==Uf.indexOf(t.type)){const i=t.childNodes;Wf(i[e?i.length-1:0]);const r=Pf.combineContentChildren(t.type,t.role,t.contentNodes,t.childNodes);return s&&(e?r.push(s):r.unshift(s)),r}return s?e?[t,s]:[s,t]:[t]}const Hf={[Yp.METRIC]:Yp.METRIC,[Yp.VBAR]:Yp.NEUTRAL,[Yp.OPENFENCE]:Yp.OPEN,[Yp.CLOSEFENCE]:Yp.CLOSE};function Wf(t){if(t.type!==Kp.PUNCTUATION)return!1;const e=Hf[t.role];return!!e&&(t.role=e,t.type=Kp.FENCE,t.addAnnotation("Emph","fence"),!0)}function zf(t,e,s,i=s){const r=[];for(;t&&t.role===s;)r.push(t),t=e.shift();return r.length?(t&&e.unshift(t),[1===r.length?r[0]:Xf(r,i),e]):[t,e]}function Xf(t,e){const s=Cf.factory.makeBranchNode(Kp.PUNCTUATION,t,[]);return s.role=e,s}function Vf(t){return["[","\uff3b"].includes(t)}function Gf(t){return["]","\uff3d"].includes(t)}function Jf(t){return["(","\u207d","\u208d"].includes(t)}function Kf(t){return[")","\u207e","\u208e"].includes(t)}function $f(t){return t.role===Yp.INFTY||t.type===Kp.PREFIXOP&&t.childNodes[0].role===Yp.INFTY}function Yf(t){const e=t.childNodes[0];if(t.type!==Kp.FENCED||(null==e?void 0:e.type)!==Kp.PUNCTUATED||3!==(null==e?void 0:e.childNodes.length)||1!==(null==e?void 0:e.contentNodes.length)||(null==e?void 0:e.childNodes[1].role)!==Yp.COMMA)return!1;const s=t.childNodes[0].childNodes[0],i=t.childNodes[0].childNodes[2],r=t.contentNodes[0].textContent,n=t.contentNodes[1].textContent;return!!(Vf(r)&&Kf(n)||Jf(r)&&Gf(n))||!(!Jf(r)||!Kf(n)||!$f(s)&&!$f(i))}function Qf(t){return sg(t)||function(t){return tg(t)||t.type===Kp.INFIXOP&&t.role===Yp.IMPLICIT&&(2===t.childNodes.length&&(tg(t.childNodes[0])||sg(t.childNodes[0]))&&tg(t.childNodes[1])||3===t.childNodes.length&&sg(t.childNodes[0])&&tg(t.childNodes[1])&&tg(t.childNodes[2]))}(t)||function(t){return t.type===Kp.PUNCTUATED&&t.role===Yp.ENDPUNCT&&2===t.childNodes.length&&t.childNodes[1].role===Yp.DEGREE&&(tg(t.childNodes[0])||eg(t.childNodes[0])||t.childNodes[0].type===Kp.PREFIXOP&&t.childNodes[0].role===Yp.NEGATIVE&&(tg(t.childNodes[0].childNodes[0])||eg(t.childNodes[0].childNodes[0])))}(t)||function(t){return t.type===Kp.PREFIXOP&&t.role===Yp.NEGATIVE&&Zf(t.childNodes[0])&&t.childNodes[0].type!==Kp.PREFIXOP&&t.childNodes[0].type!==Kp.APPL&&t.childNodes[0].type!==Kp.PUNCTUATED}(t)||function(t){return t.type===Kp.APPL&&(t.childNodes[0].role===Yp.PREFIXFUNC||t.childNodes[0].role===Yp.SIMPLEFUNC)&&(Zf(t.childNodes[1])||t.childNodes[1].type===Kp.FENCED&&Zf(t.childNodes[1].childNodes[0]))}(t)}function Zf(t){return t.hasAnnotation("clearspeak","simple")}function tg(t){return t.type===Kp.IDENTIFIER&&(t.role===Yp.LATINLETTER||t.role===Yp.GREEKLETTER||t.role===Yp.OTHERLETTER||t.role===Yp.SIMPLEFUNC)}function eg(t){return t.type===Kp.NUMBER&&(t.role===Yp.INTEGER||t.role===Yp.FLOAT)}function sg(t){return eg(t)||function(t){if(ig("Fraction_Over")||ig("Fraction_FracOver"))return!1;if(t.type!==Kp.FRACTION||t.role!==Yp.VULGAR)return!1;if(ig("Fraction_Ordinal"))return!0;const e=parseInt(t.childNodes[0].textContent,10),s=parseInt(t.childNodes[1].textContent,10);return e>0&&e<20&&s>0&&s<11}(t)}function ig(t){return bp.getInstance().options.style===t}function rg(t){return t.type===Kp.TEXT&&t.role!==Yp.LABEL||t.type===Kp.PUNCTUATED&&t.role===Yp.TEXT&&eg(t.childNodes[0])&&function(t){for(let e=0;e{const e=[];let s=t.shift();for(;s;)[s,t]=zf(s,t,Yp.FULLSTOP,Yp.ELLIPSIS),[s,t]=zf(s,t,Yp.DASH),e.push(s),s=t.shift();return e}),(t=>t.length>1))),Cf.add(new Af("op_with_limits",(t=>{const e=t[0];return e.type=Kp.LARGEOP,e.role=Yp.SUM,t}),(t=>t[0].type===Kp.OPERATOR&&t.slice(1).some((t=>t.type===Kp.RELSEQ||t.type===Kp.MULTIREL||t.type===Kp.INFIXOP&&t.role===Yp.ELEMENT||t.type===Kp.PUNCTUATED&&t.role===Yp.SEQUENCE))))),Cf.add(new class extends wf{}("function_from_identifiers",(t=>{const e=Tp(t.childNodes).map((t=>t.textContent.trim())).join("");if(om.Meaning.get(e).type===Kp.UNKNOWN)return t;const s=Cf.factory.makeLeafNode(e,Tf.getInstance().font(t.getAttribute("mathvariant")));return s.mathmlTree=t,s}),(t=>{const e=Tp(t.childNodes);return!(e.length<2)&&e.every((t=>Ip(t)===Nm.MI&&om.Meaning.get(t.textContent.trim()).role===Yp.LATINLETTER))}))),Cf.add(new Af("bracketed_interval",(t=>{const e=t[0],s=t[1],i=t.slice(2),r=Tf.getInstance().row(i),n=Cf.factory.makeBranchNode(Kp.FENCED,[r],[e,s]);return n.role=Yp.INTERVAL,n}),(t=>{const e=t[0],s=t[1],i=t.slice(2);if(!(e&&s&&(Gf(e.textContent)&&(Vf(s.textContent)||Gf(s.textContent))||Vf(s.textContent)&&(Vf(e.textContent)||Gf(e.textContent)))))return!1;if(1===i.length&&i[0].type===Kp.PUNCTUATED&&1===i[0].contentNodes.length)return!0;const r=Om(i,Ym);return!(1!==r.rel.length||!r.comp[0].length||!r.comp[1].length)}))),Cf.add(new kf("interval_heuristic",(t=>(t.role=Yp.INTERVAL,t)),(t=>Yf(t)))),Cf.add(new kf("propagateInterval",(t=>(t.childNodes.forEach((t=>{Yf(t)&&(t.role=Yp.INTERVAL)})),t)),(t=>vf(t)))),Bp(new Rp("clearspeak","simple",(function(t){return Qf(t)?"simple":""}))),Fp("clearspeak","simple"),Bp(new Rp("clearspeak","unit",(function(t){return rg(t)?"unit":""}))),Fp("clearspeak","unit");const ng=[Kp.MULTIREL,Kp.RELSEQ,Kp.APPL,Kp.ROW,Kp.LINE],og=[Kp.SUBSCRIPT,Kp.SUPERSCRIPT,Kp.OVERSCORE,Kp.UNDERSCORE];function ag(t,e){const s=t.parent;if(!s)return!1;const i=s.type;return-1!==ng.indexOf(i)||i===Kp.PREFIXOP&&s.role===Yp.NEGATIVE&&!e.script&&!e.enclosed||i===Kp.PREFIXOP&&s.role===Yp.GEOMETRY||!(i!==Kp.PUNCTUATED||e.enclosed&&s.role!==Yp.TEXT)}Bp(new Op("nemeth","number",(function(t,e){return t.childNodes.length?(-1!==og.indexOf(t.type)&&(e.script=!0),t.type===Kp.FENCED?(e.number=!1,e.enclosed=!0,["",e]):t.type===Kp.PREFIXOP&&t.role!==Yp.GEOMETRY&&t.role!==Yp.NEGATIVE?(e.number=!1,["",e]):(ag(t,e)&&(e.number=!0,e.enclosed=!1),["",e])):(ag(t,e)&&(e.number=!0,e.script=!1,e.enclosed=!1),[e.number?"number":"",{number:!1,enclosed:e.enclosed,script:e.script}])}),{number:!0})),Fp("nemeth","number"),Bp(new Op("depth","depth",(function(t){return t.parent?[parseInt(t.parent.annotation.depth[0])+1]:[1]}))),Fp("depth","depth");class cg{static empty(){const t=_p(" "),e=new cg(t,new pp);return e.mathml=t,e}static fromNode(t,e){const s=cg.empty();return s.root=t,e&&(s.mathml=e),s}static fromRoot(t,e){let s=t;for(;s.parent;)s=s.parent;const i=cg.fromNode(s);return e&&(i.mathml=e),i}static fromXml(t){const e=cg.empty();return t.childNodes[0]&&(e.root=Pm.fromXml(t.childNodes[0])),e}constructor(t,e){this.mathml=t,this.options=e,this.parser=new _f(e),this.root=this.parser.parse(t),this.collator=this.parser.getFactory().leafMap.collateMeaning();const s=this.collator.newDefault();s&&(this.parser=new _f(e),this.parser.getFactory().defaultMap=s,this.root=this.parser.parse(t)),lg.visit(this.root,{}),function(t){for(const e of Dp.values())e.active&&e.annotate(t);for(const e of Pp.values())e.active&&e.visit(t,Object.assign({},e.def))}(this.root)}xml(t){const e=_p(" "),s=this.root.xml(e.ownerDocument,t);return e.appendChild(s),e}toString(t){return Sp(this.xml(t))}formatXml(t){return Mp(this.toString(t))}displayTree(){this.root.displayTree()}replaceNode(t,e){const s=t.parent;s?s.replaceChild(t,e):this.root=e}toJson(){const t={};return t.stree=this.root.toJson(),t}}const lg=new Op("general","unit",((t,e)=>(ff(t)&&(t.role=Yp.UNIT),!1)));function hg(t,e){return new cg(t,e)}const dg=[],ug=!0,pg=new Map;function mg(t){dp.getInstance().generate((()=>["WALKING START: ",t.toString()]));const e=function(t){for(let e,s=0;e=dg[s];s++)if(e.test(t))return e.constr(t);return null}(t);let s;if(e)return s=e.getMathml(),dp.getInstance().generate((()=>["WALKING END: ",t.toString()])),_g(s);if(1===t.mathml.length){if(dp.getInstance().output("Walktree Case 0"),!t.childNodes.length)return dp.getInstance().output("Walktree Case 0.1"),s=t.mathml[0],Of(s,t),dp.getInstance().generate((()=>["WALKING END: ",t.toString()])),_g(s);const e=t.childNodes[0];if(1===t.childNodes.length&&e.type===Kp.EMPTY)return dp.getInstance().output("Walktree Case 0.2"),s=t.mathml[0],Of(s,t),s.appendChild(mg(e)),dp.getInstance().generate((()=>["WALKING END: ",t.toString()])),_g(s);t.childNodes.forEach((t=>{t.mathml.length||(t.mathml=[Rg(t)])}))}const i=t.contentNodes.map(Ig);Og(t,i);const r=t.childNodes.map(mg),n=Pf.combineContentChildren(t.type,t.role,i,r);if(s=t.mathmlTree,null===s)dp.getInstance().output("Walktree Case 1"),s=fg(n,t);else{const t=vg(n);dp.getInstance().output("Walktree Case 2"),t?(dp.getInstance().output("Walktree Case 2.1"),s=Mg(t)):(dp.getInstance().output("Walktree Case 2.2"),s=Dg(s))}return s=Sg(s),function(t,e,s){if(!e.length)return;if(1===e.length&&t===e[0])return;const i=s.role===Yp.IMPLICIT&&Cf.flags.combine_juxtaposition?function(t,e,s){const i=[];let r=Tp(t.childNodes),n=!1;for(;r.length;){const t=r.shift();if(t.hasAttribute(If.TYPE)){i.push(t);continue}const s=bg(t,e);0!==s.length&&(1!==s.length?(n?t.setAttribute("AuxiliaryImplicit",!0):n=!0,r=s.concat(r)):i.push(t))}const o=[],a=s.childNodes.map((function(t){return t.mathmlTree}));for(;a.length;){const t=a.pop();if(t){if(-1!==i.indexOf(t))break;-1!==e.indexOf(t)&&o.unshift(t)}}return i.concat(o)}(t,e,s):Tp(t.childNodes);if(!i.length)return void e.forEach((function(e){t.appendChild(e)}));let r=0;for(;e.length;){const s=e[0];if(i[r]===s||yg(i[r],s)){e.shift(),r++;continue}if(i[r]&&-1===e.indexOf(i[r])){r++;continue}if(Ng(s,t)){e.shift();continue}const n=i[r];if(n)Eg(t,n,s),e.shift();else{if(s.parentNode){t=Mg(s),e.shift();continue}const i=e[1];if(i&&i.parentNode){(t=Mg(i)).insertBefore(s,i),e.shift(),e.shift();continue}t.insertBefore(s,null),e.shift()}}}(s,n,t),pg.has(t.id)||(pg.set(t.id,!0),Of(s,t)),dp.getInstance().generate((()=>["WALKING END: ",t.toString()])),_g(s)}function fg(t,e){const s=function(t){const e=vg(t);if(!e)return{type:xg.INVALID,node:null};const s=vg(t.slice().reverse());if(e===s)return{type:xg.VALID,node:e};const i=Cg(e),r=function(t,e){let s=0;for(;t[s]&&-1===e.indexOf(t[s]);)s++;return t.slice(0,s+1)}(i,t),n=Cg(s,(function(t){return-1!==r.indexOf(t)})),o=n[0],a=r.indexOf(o);if(-1===a)return{type:xg.INVALID,node:null};return{type:r.length!==i.length?xg.PRUNED:Tg(r[a+1],n[1])?xg.VALID:xg.INVALID,node:o}}(t);let i=s.node;const r=s.type;if(r!==xg.VALID||!Am(i)||!i.parentNode&&e.parent)if(dp.getInstance().output("Walktree Case 1.1"),i=Df(),r===xg.PRUNED)dp.getInstance().output("Walktree Case 1.1.0"),i=function(t,e,s){let i=wg(e);if(wm(i)){dp.getInstance().output("Walktree Case 1.1.0.0"),gg(i,t),Tp(i.childNodes).forEach((function(e){t.appendChild(e)}));const e=t;t=i,i=e}const r=s.indexOf(e);return s[r]=i,kp(i,t),t.appendChild(i),s.forEach((function(e){t.appendChild(e)})),t}(i,s.node,t);else if(t[0]){dp.getInstance().output("Walktree Case 1.1.1");const e=vg(t);if(e){const s=function(t,e){const s=Tp(t.childNodes);let i=1/0,r=-1/0;return e.forEach((function(t){const e=s.indexOf(t);-1!==e&&(i=Math.min(i,e),r=Math.max(r,e))})),s.slice(i,r+1)}(Mg(e),t);kp(e,i),s.forEach((function(t){i.appendChild(t)}))}else gg(i,t[0]),i=t[0]}return e.mathmlTree||(e.mathmlTree=i),i}function gg(t,e){for(const s of Sf)t.hasAttribute(s)&&(e.setAttribute(s,t.getAttribute(s)),t.removeAttribute(s))}function bg(t,e){const s=[];let i=Tp(t.childNodes);for(;i.length;){const t=i.shift();t.nodeType===wp.ELEMENT_NODE&&(t.hasAttribute(If.TYPE)||-1!==e.indexOf(t)?s.push(t):i=Tp(t.childNodes).concat(i))}return s}function Eg(t,e,s){let i=e,r=Mg(i);for(;r&&r.firstChild===i&&!i.hasAttribute("AuxiliaryImplicit")&&r!==t;)i=r,r=Mg(i);r&&(r.insertBefore(s,i),i.removeAttribute("AuxiliaryImplicit"))}function Ng(t,e){if(!t)return!1;do{if((t=Mg(t))===e)return!0}while(t);return!1}function yg(t,e){const s=im.functionApplication;if(t&&e&&t.textContent&&e.textContent&&t.textContent===s&&e.textContent===s&&"true"===e.getAttribute(If.ADDED)){for(let s,i=0;s=t.attributes[i];i++)e.hasAttribute(s.nodeName)||e.setAttribute(s.nodeName,s.nodeValue);return kp(t,e),!0}return!1}var xg;function vg(t){let e=0,s=null;for(;!s&&e!1),i=[t];for(;!s(t)&&!wm(t)&&t.parentNode;)t=Mg(t),i.unshift(t);return i}function Tg(t,e){return!(!t||!e||t.previousSibling||e.nextSibling)}function _g(t){for(;!wm(t)&&kg(t);)t=Mg(t);return t}function wg(t){const e=Tp(t.childNodes);if(!e)return t;const s=e.filter((function(t){return t.nodeType===wp.ELEMENT_NODE&&!km(t)}));return 1===s.length&&Am(s[0])&&!s[0].hasAttribute(If.TYPE)?wg(s[0]):t}function kg(t){const e=Mg(t);return!(!e||!Am(e))&&Tp(e.childNodes).every((function(e){return e===t||Ag(e)}))}function Ag(t){if(t.nodeType!==wp.ELEMENT_NODE)return!0;if(!t||km(t))return!0;const e=Tp(t.childNodes);return!(!Am(t)&&e.length||function(t){return!!t&&Tm.includes(Ip(t))}(t)||t.hasAttribute(If.TYPE)||Mm(t))&&Tp(t.childNodes).every(Ag)}function Mg(t){return t.parentNode}function Lg(t,e){const s=new Pf(e);t.setAttribute(If.COLLAPSED,s.toString())}function Ig(t){if(t.mathml.length)return mg(t);const e=ug?Rg(t):Df();return t.mathml=[e],e}function Sg(t){if(Ip(t)!==Nm.MFENCED)return t;const e=Df();for(let s,i=0;s=t.attributes[i];i++)-1===["open","close","separators"].indexOf(s.name)&&e.setAttribute(s.name,s.value);return Tp(t.childNodes).forEach((function(t){e.appendChild(t)})),kp(t,e),e}function Rg(t){const e=Ap("mo"),s=(i=t.textContent,lp.f.document.createTextNode(i));var i;return e.appendChild(s),Of(e,t),e.setAttribute(If.ADDED,"true"),e}function Og(t,e){const s=t.type+(t.textContent?","+t.textContent:"");e.forEach((function(t){Dg(t).setAttribute(If.OPERATOR,s)}))}function Dg(t){const e=Tp(t.childNodes);if(!e)return t;const s=e.filter((function(t){return!Ag(t)})),i=[];for(let t,e=0;t=s[e];e++)if(Am(t)&&t.getAttribute(If.TYPE)!==Kp.PUNCTUATION){const e=Dg(t);e&&e!==t&&i.push(e)}else i.push(t);return 1===i.length?i[0]:t}function Pg(t){return Mp(t.toString()).toString().replace(new RegExp(Lf,"g"),"")}function Bg(t,e){const s=!!e,i=e||[],r=t.parent,n=t.contentNodes.map((function(t){return t.id}));n.unshift("c");const o=[t.id,n];for(let e,n=0;e=t.childNodes[n];n++){const t=mg(e);i.push(t);const n=Dg(t);r&&!s&&n.setAttribute(If.PARENT,r.id.toString()),o.push(e.id)}return o}!function(t){t.VALID="valid",t.INVALID="invalid",t.PRUNED="pruned"}(xg||(xg={}));class Fg{constructor(t){this.semantic=t}}class jg extends Fg{static test(t){return!t.mathmlTree&&t.type===Kp.LINE&&t.role===Yp.BINOMIAL}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){if(!this.semantic.childNodes.length)return this.mml;const t=this.semantic.childNodes[0];if(this.mml=mg(t),this.mml.hasAttribute(If.TYPE)){const t=Df();kp(this.mml,t),t.appendChild(this.mml),this.mml=t}return Of(this.mml,this.semantic),this.mml}}class Ug extends Fg{static test(t){if(!t.mathmlTree||!t.childNodes.length)return!1;const e=Ip(t.mathmlTree),s=t.childNodes[0].role;return e===Nm.MSUBSUP&&s===Yp.SUBSUP||e===Nm.MUNDEROVER&&s===Yp.UNDEROVER}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){const t=this.semantic.childNodes[0],e=t.childNodes[0],s=this.semantic.childNodes[1],i=t.childNodes[1],r=mg(s),n=mg(e),o=mg(i);return Of(this.mml,this.semantic),this.mml.setAttribute(If.CHILDREN,Rf([e,i,s])),[n,o,r].forEach((t=>Dg(t).setAttribute(If.PARENT,this.mml.getAttribute(If.ID)))),this.mml.setAttribute(If.TYPE,t.role),Lg(this.mml,[this.semantic.id,[t.id,e.id,i.id],s.id]),this.mml}}class qg extends Fg{static multiscriptIndex(t){return t.type===Kp.PUNCTUATED&&t.contentNodes[0].role===Yp.DUMMY?Bg(t):(mg(t),t.id)}static createNone_(t){const e=Ap("none");return t&&Of(e,t),e.setAttribute(If.ADDED,"true"),e}constructor(t){super(t),this.mml=t.mathmlTree}completeMultiscript(t,e){const s=Tp(this.mml.childNodes).slice(1);let i=0;const r=t=>{for(const e of t){const t=s[i];if(t&&e===parseInt(t.getAttribute(If.ID)))t.setAttribute(If.PARENT,this.semantic.id.toString()),i++;else if(t&&e===parseInt(Dg(t).getAttribute(If.ID)))Dg(t).setAttribute(If.PARENT,this.semantic.id.toString()),i++;else{const s=this.semantic.querySelectorAll((t=>t.id===e));this.mml.insertBefore(qg.createNone_(s[0]),t||null)}}};r(t),s[i]&&Ip(s[i])!==Nm.MPRESCRIPTS?this.mml.insertBefore(s[i],Ap("mprescripts")):i++,r(e)}}class Hg extends qg{static test(t){if(!t.mathmlTree)return!1;return Ip(t.mathmlTree)===Nm.MMULTISCRIPTS&&(t.type===Kp.SUPERSCRIPT||t.type===Kp.SUBSCRIPT)}constructor(t){super(t)}getMathml(){let t,e,s;if(Of(this.mml,this.semantic),this.semantic.childNodes[0]&&this.semantic.childNodes[0].role===Yp.SUBSUP){const i=this.semantic.childNodes[0];t=i.childNodes[0],e=qg.multiscriptIndex(this.semantic.childNodes[1]),s=qg.multiscriptIndex(i.childNodes[1]);const r=[this.semantic.id,[i.id,t.id,s],e];Lg(this.mml,r),this.mml.setAttribute(If.TYPE,i.role),this.completeMultiscript(Pf.interleaveIds(s,e),[])}else{t=this.semantic.childNodes[0],e=qg.multiscriptIndex(this.semantic.childNodes[1]);const s=[this.semantic.id,t.id,e];Lg(this.mml,s)}const i=Pf.collapsedLeafs(s||[],e);return Dg(mg(t)).setAttribute(If.PARENT,this.semantic.id.toString()),i.unshift(t.id),this.mml.setAttribute(If.CHILDREN,i.join(",")),this.mml}}class Wg extends qg{static test(t){return!!t.mathmlTree&&t.type===Kp.TENSOR}constructor(t){super(t)}getMathml(){mg(this.semantic.childNodes[0]);const t=qg.multiscriptIndex(this.semantic.childNodes[1]),e=qg.multiscriptIndex(this.semantic.childNodes[2]),s=qg.multiscriptIndex(this.semantic.childNodes[3]),i=qg.multiscriptIndex(this.semantic.childNodes[4]);Of(this.mml,this.semantic);const r=[this.semantic.id,this.semantic.childNodes[0].id,t,e,s,i];Lg(this.mml,r);const n=Pf.collapsedLeafs(t,e,s,i);return n.unshift(this.semantic.childNodes[0].id),this.mml.setAttribute(If.CHILDREN,n.join(",")),this.completeMultiscript(Pf.interleaveIds(s,i),Pf.interleaveIds(t,e)),this.mml}}class zg extends Fg{static test(t){return!(!t.mathmlTree||!t.fencePointer||t.mathmlTree.getAttribute("data-semantic-type"))}static makeEmptyNode_(t){const e=Df(),s=new Pm(t);return s.type=Kp.EMPTY,s.mathmlTree=e,s}static fencedMap_(t,e){e[t.id]=t.mathmlTree,t.embellished&&zg.fencedMap_(t.childNodes[0],e)}constructor(t){super(t),this.fenced=null,this.fencedMml=null,this.fencedMmlNodes=[],this.ofence=null,this.ofenceMml=null,this.ofenceMap={},this.cfence=null,this.cfenceMml=null,this.cfenceMap={},this.parentCleanup=[]}getMathml(){this.getFenced_(),this.fencedMml=mg(this.fenced),this.getFencesMml_(),this.fenced.type!==Kp.EMPTY||this.fencedMml.parentNode||(this.fencedMml.setAttribute(If.ADDED,"true"),this.cfenceMml.parentNode.insertBefore(this.fencedMml,this.cfenceMml)),this.getFencedMml_();return this.rewrite_()}fencedElement(t){return t.type===Kp.FENCED||t.type===Kp.MATRIX||t.type===Kp.VECTOR}getFenced_(){let t=this.semantic;for(;!this.fencedElement(t);)t=t.childNodes[0];this.fenced=t.childNodes[0],this.ofence=t.contentNodes[0],this.cfence=t.contentNodes[1],zg.fencedMap_(this.ofence,this.ofenceMap),zg.fencedMap_(this.cfence,this.cfenceMap)}getFencedMml_(){let t=this.ofenceMml.nextSibling;for(t=t===this.fencedMml?t:this.fencedMml;t&&t!==this.cfenceMml;)this.fencedMmlNodes.push(t),t=t.nextSibling}getFencesMml_(){let t=this.semantic;const e=Object.keys(this.ofenceMap),s=Object.keys(this.cfenceMap);for(;!(this.ofenceMml&&this.cfenceMml||t===this.fenced);)-1===e.indexOf(t.fencePointer)||this.ofenceMml||(this.ofenceMml=t.mathmlTree),-1===s.indexOf(t.fencePointer)||this.cfenceMml||(this.cfenceMml=t.mathmlTree),t=t.childNodes[0];this.ofenceMml||(this.ofenceMml=this.ofence.mathmlTree),this.cfenceMml||(this.cfenceMml=this.cfence.mathmlTree),this.ofenceMml&&(this.ofenceMml=_g(this.ofenceMml)),this.cfenceMml&&(this.cfenceMml=_g(this.cfenceMml))}rewrite_(){let t=this.semantic,e=null;const s=this.introduceNewLayer_();for(Of(s,this.fenced.parent);!this.fencedElement(t);){const i=t.mathmlTree,r=this.specialCase_(t,i);if(r)t=r;else{Of(i,t);const e=[];for(let s,i=1;s=t.childNodes[i];i++)e.push(mg(s));t=t.childNodes[0]}const n=Ap("dummy"),o=i.childNodes[0];kp(i,n),kp(s,i),kp(i.childNodes[0],s),kp(n,o),e||(e=i)}return mg(this.ofence),mg(this.cfence),this.cleanupParents_(),e||s}specialCase_(t,e){const s=Ip(e);let i,r=null;if(s===Nm.MSUBSUP?(r=t.childNodes[0],i=Ug):s===Nm.MMULTISCRIPTS&&(t.type===Kp.SUPERSCRIPT||t.type===Kp.SUBSCRIPT?i=Hg:t.type===Kp.TENSOR&&(i=Wg),r=i&&t.childNodes[0]&&t.childNodes[0].role===Yp.SUBSUP?t.childNodes[0]:t),!r)return null;const n=r.childNodes[0],o=zg.makeEmptyNode_(n.id);return r.childNodes[0]=o,e=new i(t).getMathml(),r.childNodes[0]=n,this.parentCleanup.push(e),r.childNodes[0]}introduceNewLayer_(){const t=this.fullFence(this.ofenceMml),e=this.fullFence(this.cfenceMml);let s=Df();if(kp(this.fencedMml,s),this.fencedMmlNodes.forEach((t=>s.appendChild(t))),s.insertBefore(t,this.fencedMml),s.appendChild(e),!s.parentNode){const t=Df();for(;s.childNodes.length>0;)t.appendChild(s.childNodes[0]);s.appendChild(t),s=t}return s}fullFence(t){const e=this.fencedMml.parentNode;let s=t;for(;s.parentNode&&s.parentNode!==e;)s=s.parentNode;return s}cleanupParents_(){this.parentCleanup.forEach((function(t){const e=t.childNodes[1].getAttribute(If.PARENT);t.childNodes[0].setAttribute(If.PARENT,e)}))}}class Xg extends Fg{static test(t){return!!t.mathmlTree&&t.hasAnnotation("Emph","top")}constructor(t){super(t),this.mrows=[],this.mml=t.mathmlTree}getMathml(){if(this.recurseToTable(this.semantic),this.mrows.length){const t=Df();this.mml.parentNode.insertBefore(t,this.mml);for(const e of this.mrows)t.appendChild(e);t.appendChild(this.mml)}return this.mml}recurseToTable(t){var e,s;if(t.hasAnnotation("Emph","top")||t.hasAnnotation("Emph","fence")||!t.hasAnnotation("Emph","left")&&!t.hasAnnotation("Emph","right")){if(!t.mathmlTree||Ip(t.mathmlTree)===Nm.MTABLE&&(null===(e=t.annotation.Emph)||void 0===e?void 0:e.length)&&"table"!==t.annotation.Emph[0]){const e=Df();Of(e,t),this.mrows.unshift(e)}else{if(Ip(t.mathmlTree)===Nm.MTABLE&&(null===(s=t.annotation.Emph)||void 0===s?void 0:s.length)&&"table"===t.annotation.Emph[0])return void this.finalizeTable(t);Of(t.mathmlTree,t)}if(t.childNodes.forEach(this.recurseToTable.bind(this)),t.textContent||"punctuated"===t.type){const e=t.contentNodes.map((t=>{const e=Ig(t);return e.hasAttribute("data-semantic-added")?this.mrows.unshift(e):this.recurseToTable(t),e}));Og(t,e)}else t.contentNodes.forEach(this.recurseToTable.bind(this))}else mg(t)}finalizeTable(t){Of(t.mathmlTree,t),t.contentNodes.forEach((t=>{mg(t)})),t.childNodes.forEach((t=>{mg(t)}))}}class Vg extends Fg{static test(t){if(!t.mathmlTree||!t.childNodes.length)return!1;const e=Ip(t.mathmlTree),s=t.type;return(s===Kp.LIMUPPER||s===Kp.LIMLOWER)&&(e===Nm.MSUBSUP||e===Nm.MUNDEROVER)||s===Kp.LIMBOTH&&(e===Nm.MSUB||e===Nm.MUNDER||e===Nm.MSUP||e===Nm.MOVER)}static walkTree_(t){t&&mg(t)}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){const t=this.semantic.childNodes;return this.semantic.type!==Kp.LIMBOTH&&this.mml.childNodes.length>=3&&(this.mml=fg([this.mml],this.semantic)),Of(this.mml,this.semantic),t[0].mathmlTree||(t[0].mathmlTree=this.semantic.mathmlTree),t.forEach(Vg.walkTree_),this.mml}}class Gg extends Fg{static test(t){return!!t.mathmlTree&&t.type===Kp.LINE}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){return this.semantic.contentNodes.length&&mg(this.semantic.contentNodes[0]),this.semantic.childNodes.length&&mg(this.semantic.childNodes[0]),Of(this.mml,this.semantic),this.mml}}class Jg extends Fg{static test(t){return!!t.mathmlTree&&(t.type===Kp.INFERENCE||t.type===Kp.PREMISES)}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){return this.semantic.childNodes.length?(this.semantic.contentNodes.forEach((function(t){mg(t),Of(t.mathmlTree,t)})),this.semantic.childNodes.forEach((function(t){mg(t)})),Of(this.mml,this.semantic),this.mml.getAttribute("data-semantic-id")===this.mml.getAttribute("data-semantic-parent")&&this.mml.removeAttribute("data-semantic-parent"),this.mml):this.mml}}class Kg extends Fg{static test(t){return t.type===Kp.MATRIX||t.type===Kp.VECTOR||t.type===Kp.CASES}constructor(t){super(t),this.inner=[],this.mml=t.mathmlTree}getMathml(){const t=Ig(this.semantic.contentNodes[0]),e=this.semantic.contentNodes[1]?Ig(this.semantic.contentNodes[1]):null;if(this.inner=this.semantic.childNodes.map(mg),this.mml)if(Ip(this.mml)===Nm.MFENCED){const s=this.mml.childNodes;this.mml.insertBefore(t,s[0]||null),e&&this.mml.appendChild(e),this.mml=Sg(this.mml)}else{const s=[t,this.mml];e&&s.push(e),this.mml=fg(s,this.semantic)}else this.mml=fg([t].concat(this.inner,[e]),this.semantic);return Of(this.mml,this.semantic),this.mml}}class $g extends Fg{static test(t){return t.type===Kp.PUNCTUATED&&(t.role===Yp.TEXT||t.contentNodes.every((t=>t.role===Yp.DUMMY)))}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){const t=[],e=Bg(this.semantic,t);return this.mml=fg(t,this.semantic),Of(this.mml,this.semantic),this.mml.removeAttribute(If.CONTENT),Lg(this.mml,e),this.mml}}function Yg(t,e){const s=t.cloneNode(!0);return function(t,e,s){return dp.getInstance().generate((()=>["Original MathML",Pg(t)])),pg.clear(),mg(e.root),s.structure&&t.setAttribute(If.STRUCTURE,Pf.fromStructure(t,e,s).toString()),dp.getInstance().generate((()=>["Semantic Tree\n",Pg(e),"Semantically enriched MathML\n",Pg(t)])),t}(s,hg(s,e),e)}dg.push({test:Vg.test,constr:t=>new Vg(t)},{test:zg.test,constr:t=>new zg(t)},{test:Ug.test,constr:t=>new Ug(t)},{test:Wg.test,constr:t=>new Wg(t)},{test:Hg.test,constr:t=>new Hg(t)},{test:Gg.test,constr:t=>new Gg(t)},{test:jg.test,constr:t=>new jg(t)},{test:Jg.test,constr:t=>new Jg(t)},{test:Xg.test,constr:t=>new Xg(t)},{test:Kg.test,constr:t=>new Kg(t)},{test:$g.test,constr:t=>new $g(t)});const Qg=new ip({AbsoluteValue:["Auto","AbsEnd","Cardinality","Determinant"],Bar:["Auto","Conjugate"],Caps:["Auto","SayCaps"],CombinationPermutation:["Auto","ChoosePermute"],Currency:["Auto","Position","Prefix"],Ellipses:["Auto","AndSoOn"],Enclosed:["Auto","EndEnclose"],Exponent:["Auto","AfterPower","Ordinal","OrdinalPower","Exponent"],Fraction:["Auto","EndFrac","FracOver","General","GeneralEndFrac","Ordinal","Over","OverEndFrac","Per"],Functions:["Auto","None","Reciprocal"],Inference:["Auto","Long"],ImpliedTimes:["Auto","MoreImpliedTimes","None"],Log:["Auto","LnAsNaturalLog"],Matrix:["Auto","Combinatoric","EndMatrix","EndVector","SilentColNum","SpeakColNum","Vector"],MultiLineLabel:["Auto","Case","Constraint","Equation","Line","None","Row","Step"],MultiLineOverview:["Auto","None"],MultiLinePausesBetweenColumns:["Auto","Long","Short"],MultsymbolDot:["Auto","Dot"],MultsymbolX:["Auto","By","Cross"],Paren:["Auto","CoordPoint","Interval","Silent","Speak","SpeakNestingLevel"],Prime:["Auto","Angle","Length"],Roots:["Auto","PosNegSqRoot","PosNegSqRootEnd","RootEnd"],SetMemberSymbol:["Auto","Belongs","Element","Member","In"],Sets:["Auto","SilentBracket","woAll"],TriangleSymbol:["Auto","Delta"],Trig:["Auto","ArcTrig","TrigInverse","Reciprocal"],VerticalLine:["Auto","Divides","Given","SuchThat"]}),Zg="Auto";function tb(t){const e=t.split(":"),s={},i=Qg.getProperties(),r=Object.keys(i);for(let t,n=0;t=e[n];n++){const e=t.split("_");if(-1===r.indexOf(e[0]))continue;const n=e[1];n&&n!==Zg&&-1!==i[e[0]].indexOf(n)&&(s[e[0]]=e[1])}return s}function eb(t){const e=Object.keys(t),s=[];for(let i=0;ibp.getInstance().setup(t),rb=()=>bp.getInstance().json(),nb=t=>function(t,e){const s=_p(t);try{return Yg(s,e)}catch(t){return console.error(t),s}}(t,bp.getInstance().options),ob=_p,ab=function(t,e,s){if("default"===t)return e+"_"+s;const i=tb(t);return i[e]=s,eb(i)},cb=tb,lb=eb;var hb=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};let db={},ub=null;function pb(t){var e,s;const i=null==t?void 0:t.match(/^clearspeak-(.*)/);return ub=null!==(s=null!==(e=i&&i[1])&&void 0!==e?e:ub)&&void 0!==s?s:"default",ub}const mb=new Map;const fb=new Map;let gb=0;function bb(t,e){const s=mb.get(e);!function(t,e){const s=t.pool.lookup("speechRules"),i=pb(t.settings.speechRules);db=cb(i);for(const i of e)t.factory.get("variable")(t.factory,{name:"csprf_"+i,setter:t=>{db[i]=t,s.setValue("clearspeak-"+lb(db))},getter:()=>db[i]||"Auto"},t.pool)}(t,Object.keys(s));const i=[];for(const t of Object.getOwnPropertyNames(s))i.push({title:t,values:s[t].map((e=>e.replace(RegExp("^"+t+"_"),""))),variable:"csprf_"+t});const r=t.factory.get("selectionBox")(t.factory,{title:"Clearspeak Preferences",signature:"",order:"alphabetic",grid:"square",selections:i},t);return{type:"command",id:"ClearspeakPreferences",content:"Select Preferences",action:()=>r.post(0,0)}}function Eb(t,e,s){return hb(this,void 0,void 0,(function*(){var i,r;const n=i=>{s(t.factory.get("subMenu")(t.factory,{items:i,id:"Clearspeak"},e))};if(!t.settings.speech||!t.settings.enrich)return void n([]);const o=t.pool.lookup("locale").getValue();if(yield function(t,e){return hb(this,void 0,void 0,(function*(){mb.has(e)||(yield t.mathItem.generatorPool.getLocalePreferences(mb))}))}(t,o),!mb.get(o))return void n([]);const a=bb(t,o);let c=[];if(t.settings.speech){const e=t.mathItem,s=null===(i=null==e?void 0:e.explorers)||void 0===i?void 0:i.speech,n=pb(t.settings.speechRules);c=c.concat(function(t){return[{type:"radio",content:"No Preferences",id:"clearspeak-default",variable:"speechRules"},{type:"radio",content:"Current Preferences",id:"clearspeak-"+t,variable:"speechRules"},{type:"rule"}]}(n));const a=null==s?void 0:s.refocus,l=null!==(r=null==a?void 0:a.getAttribute("data-semantic-id"))&&void 0!==r?r:null,h=gb++;yield e.generatorPool.getRelevantPreferences(e,l,fb,h);const d=fb.get(h);if(fb.delete(h),d){const t=function(t,e,s){const i=mb.get(s);return[{type:"label",content:"Preferences for "+e},{type:"rule"}].concat(i[e].map((function(e){const[s,i]=e.split("_");return{type:"radioCompare",content:i,id:"clearspeak-"+ab(t,s,i),variable:"speechRules",comparator:(t,e)=>{if(t===e)return!0;if("Auto"!==i)return!1;const[r,n]=t.split("-"),[o]=e.split("-");return r===o&&!cb(n)[s]}}})))}(n,d,o);c=c.concat(t)}}c.splice(2,0,a),n(c)}))}Zu.DynamicSubmenus.set("Clearspeak",[Eb,"speech"]);let Nb=null;function yb(t,e,s){if(Nb)return void s(Nb);const i=[];for(const t of sb.keys())"nemeth"!==t&&"euro"!==t&&i.push({type:"radio",id:t,content:sb.get(t)||t,variable:"locale"});i.sort(((t,e)=>t.content.localeCompare(e.content,"en"))),Nb=t.factory.get("subMenu")(t.factory,{items:i,id:"Language"},e),s(Nb)}Zu.DynamicSubmenus.set("A11yLanguage",[yb,"speech"]);const xb="MacOS"===di.os;function vb(t){const e=di.document,s=e.createElement("textarea");s.value=t,s.setAttribute("readonly",""),s.style.cssText="height: 1px; width: 1px; padding: 1px; position: absolute; left: -10px",e.body.appendChild(s),s.select();try{e.execCommand("copy")}catch(t){alert(`Can't copy to clipboard: ${t.message}`)}e.body.removeChild(s)}function Cb(t,e,s){return(i,r)=>(function(t,e,s){if(!t)return;for(const i of t.childNodes)if(i.isKind("annotation")){const t=_b(i,e);if(t){const e=i.childNodes.reduce(((t,e)=>t+e.toString()),"");s.push([t,e])}}}(function(t){var e;let s=null===(e=t.mathItem)||void 0===e?void 0:e.root;for(;s&&!s.isKind("semantics");){if(s.isToken||1!==s.childNodes.length)return null;s=s.childNodes[0]}return s}(i),e,s),t.attachMenu(i),kb(i,r,s,(()=>t.post())))}function Tb(t){return(e,s)=>{const i=t.slice();return t.length=0,kb(e,s,i,(()=>vb(wb.trim())))}}function _b(t,e){const s=t.attributes.get("encoding");for(const t of Object.keys(e))if(e[t].includes(s))return t;return null}let wb="";function kb(t,e,s,i){return t.factory.get("subMenu")(t.factory,{items:s.map((([t,e])=>({type:"command",id:t,content:t,action:()=>{wb=e,i()}}))),id:"annotations"},e)}class Ab extends Iu{static fromJson(t,{content:e,variable:s,id:i,comparator:r},n){return new this(n,e,s,i,r)}constructor(t,e,s,i,r){super(t,e,s,i),this.comparator=r,this.role="menuitemradiocompare"}updateAria(){this.html.setAttribute("aria-checked",this.comparator(this.variable.getValue(),this.id)?"true":"false")}updateSpan(){this.span.style.display=this.comparator(this.variable.getValue(),this.id)?"":"none"}}class Mb extends Kn{constructor(){super(...arguments),this.options={filterSRE:!0,filterTex:!0,texHints:!0,semantics:!1},this.mathItem=null}visitTree(t,e=null,s={}){return this.mathItem=e,Di(this.options,s),this.visitNode(t,"")}visitTeXAtomNode(t,e){return this.options.texHints?super.visitDefault(t,e):t.childNodes[0]&&1===t.childNodes[0].childNodes.length?this.visitNode(t.childNodes[0],e):`${e}\n`+this.childNodeMml(t,e+" ","\n")+`${e} `}visitMathNode(t,e){if(!this.options.semantics||"TeX"!==this.mathItem.inputJax.name)return super.visitDefault(t,e);const s=t.childNodes.length&&t.childNodes[0].childNodes.length>1;return`${e}\n${e} \n`+(s?e+" \n":"")+this.childNodeMml(t,e+(s?" ":" "),"\n")+(s?e+" \n":"")+`${e} `+this.mathItem.math+` \n${e} \n${e} `}getAttributeList(t){const e=super.getAttributeList(t);if(this.options.filterTex&&(delete e["data-latex"],delete e["data-latex-item"]),this.options.filterSRE){const t=Object.keys(e).filter((t=>t.match(/^(?:data-semantic-.*?|data-speech-node|role|aria-(?:level|posinset|setsize|owns))$/)));for(const s of t)delete e[s]}return e}}class Lb extends Mu{keydown(t){if("a"===t.key&&(t.ctrlKey||t.metaKey))return this.selectAll(),void this.stop(t);super.keydown(t)}selectAll(){document.getSelection().selectAllChildren(this.html.querySelector(".CtxtMenu_InfoContent").firstChild)}copyToClipboard(){this.selectAll();try{document.execCommand("copy")}catch(t){alert(`Can't copy to clipboard: ${t.message}`)}document.getSelection().removeAllRanges()}generateHtml(){super.generateHtml();const t=this.html.querySelector("span."+pu.INFOSIGNATURE).appendChild(document.createElement("input"));t.type="button",t.value="Copy to Clipboard",t.addEventListener("click",(t=>this.copyToClipboard()))}}var Ib=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};const Sb=li;class Rb{get isLoading(){return Rb.loading>0}get loadingPromise(){return this.isLoading?(Rb._loadingPromise||(Rb._loadingPromise=new Promise(((t,e)=>{Rb._loadingOK=t,Rb._loadingFailed=e}))),Rb._loadingPromise):Promise.resolve()}postInfo(t){this.menu.mathItem&&(this.menu.nofocus=!!this.menu.mathItem.outputData.nofocus),t.post()}constructor(t,e={}){this.settings=null,this.defaultSettings=null,this.menu=null,this.current=null,this.MmlVisitor=new Mb,this.jax={CHTML:null,SVG:null},this.rerenderStart=nr.LAST,this.requiredExtensions=[],this.about=new Mu('MathJax v'+Qn.version,(()=>{const t=[];return t.push("Input Jax: "+this.document.inputJax.map((t=>t.name)).join(", ")),t.push("Output Jax: "+this.document.outputJax.name),t.push("Document Type: "+this.document.kind),t.join(" ")}),'www.mathjax.org '),this.help=new Mu("MathJax Help ",(()=>["MathJax is a JavaScript library that allows page"," authors to include mathematics within their web pages."," As a reader, you don't need to do anything to make that happen.
","Browsers : MathJax works with all modern browsers including"," Edge, Firefox, Chrome, Safari, Opera, and most mobile browsers.
","Math Menu : MathJax adds a contextual menu to equations."," Right-click or CTRL-click on any mathematics to access the menu.
",'',"
Show Math As: These options allow you to view the formula's"," source markup (as MathML or in its original format).
","
Copy to Clipboard: These options copy the formula's source markup,"," as MathML or in its original format, to the clipboard"," (in browsers that support that).
","
Math Settings: These give you control over features of MathJax,"," such the size of the mathematics, the mechanism used to display equations,"," how to handle equations that are too wide, and the language to use for"," MathJax's menus and error messages (not yet implemented in v4).","
","
Accessibility : MathJax can work with screen"," readers to make mathematics accessible to the visually impaired."," Turn on speech or braille generation to enable creation of speech strings"," and the ability to investigate expressions interactively. You can control"," the style of the explorer in its menu.
","
","Math Zoom : If you are having difficulty reading an"," equation, MathJax can enlarge it to help you see it better, or"," you can scale all the math on the page to make it larger."," Turn these features on in the Math Settings menu.
","Preferences : MathJax uses your browser's localStorage database"," to save the preferences set via this menu locally in your browser. These"," are not used to track you, and are not transferred or used remotely by"," MathJax in any way.
"].join("\n")),'www.mathjax.org '),this.mathmlCode=new Lb("MathJax MathML Expression",(()=>{if(!this.menu.mathItem)return"";const t=this.toMML(this.menu.mathItem);return""+this.formatSource(t)+" "}),""),this.originalText=new Lb("MathJax Original Source",(()=>{if(!this.menu.mathItem)return"";const t=this.menu.mathItem.math;return''+this.formatSource(t)+" "}),""),this.annotationBox=new Lb("MathJax Annotation Text",(()=>{const t=wb;return''+this.formatSource(t)+" "}),""),this.svgImage=new Lb("MathJax SVG Image",(()=>'Generative SVG Image...
'),""),this.speechText=new Lb("MathJax Speech Text",(()=>this.menu.mathItem?''+this.formatSource(this.menu.mathItem.outputData.speech)+"
":""),""),this.brailleText=new Lb("MathJax Braille Code",(()=>this.menu.mathItem?''+this.formatSource(this.menu.mathItem.outputData.braille)+"
":""),""),this.errorMessage=new Lb("MathJax Error Message",(()=>this.menu.mathItem?''+this.formatSource(this.menu.errorMsg)+" ":""),""),this.zoomBox=new Mu("MathJax Zoomed Expression",(()=>{if(!this.menu.mathItem)return"";const t=this.menu.mathItem.typesetRoot.cloneNode(!0);t.style.margin="0";return''+t.outerHTML+"
"}),""),this.document=t,this.options=Di(Oi({},this.constructor.OPTIONS),e),this.initSettings(),this.mergeUserSettings(),this.initMenu(),this.applySettings()}initSettings(){var t;this.settings=this.options.settings,this.jax=this.options.jax;const e=this.document.outputJax;this.jax[e.name]=e,this.settings.renderer=e.name,this.settings.scale=e.options.scale,e.options.displayOverflow&&(this.settings.overflow=e.options.displayOverflow.substring(0,1).toUpperCase()+e.options.displayOverflow.substring(1).toLowerCase()),this.settings.breakInline=null===(t=e.options.linebreaks)||void 0===t?void 0:t.inline,this.defaultSettings=Object.assign({},this.document.options.a11y,this.settings),this.setA11y({roleDescription:this.settings.roleDescription})}initMenu(){const t=new Wu([["contextMenu",Zu.fromJson.bind(Zu)],["radioCompare",Ab.fromJson.bind(Ab)]]);this.menu=t.parse({type:"contextMenu",id:"MathJax_Menu",pool:[this.variable("showSRE"),this.variable("showTex"),this.variable("texHints"),this.variable("semantics"),this.variable("zoom"),this.variable("zscale"),this.variable("renderer",(t=>this.setRenderer(t))),this.variable("overflow",(t=>this.setOverflow(t))),this.variable("breakInline",(t=>this.setInlineBreaks(t))),this.variable("alt"),this.variable("cmd"),this.variable("ctrl"),this.variable("shift"),this.variable("scale",(t=>this.setScale(t))),this.a11yVar("speech",(t=>this.setSpeech(t))),this.a11yVar("braille",(t=>this.setBraille(t))),this.variable("brailleCode",(t=>this.setBrailleCode(t))),this.a11yVar("highlight",(t=>this.setHighlight(t))),this.a11yVar("backgroundColor"),this.a11yVar("backgroundOpacity"),this.a11yVar("foregroundColor"),this.a11yVar("foregroundOpacity"),this.a11yVar("subtitles"),this.a11yVar("viewBraille"),this.a11yVar("voicing"),this.a11yVar("roleDescription",(()=>this.setRoleDescription())),this.a11yVar("help"),this.a11yVar("locale",(t=>this.setLocale(t))),this.variable("speechRules",(t=>{const[e,s]=t.split("-");this.document.options.sre.domain=e,this.document.options.sre.style=s,this.rerender(nr.COMPILED)})),this.a11yVar("magnification"),this.a11yVar("magnify"),this.a11yVar("treeColoring"),this.a11yVar("infoType"),this.a11yVar("infoRole"),this.a11yVar("infoPrefix"),this.variable("autocollapse"),this.variable("collapsible",(t=>this.setCollapsible(t))),this.variable("enrich",(t=>this.setEnrichment(t))),this.variable("inTabOrder",(t=>this.setTabOrder(t))),this.a11yVar("tabSelects"),this.variable("assistiveMml",(t=>this.setAssistiveMml(t)))],items:[this.submenu("Show","Show Math As",[this.command("MathMLcode","MathML Code",(()=>this.postInfo(this.mathmlCode))),this.command("Original","Original Form",(()=>this.postInfo(this.originalText))),this.rule(),this.command("Speech","Speech Text",(()=>this.postInfo(this.speechText)),{disabled:!0}),this.command("Braille","Braille Code",(()=>this.postInfo(this.brailleText)),{disabled:!0}),this.command("SVG","SVG Image",(()=>this.postSvgImage()),{disabled:!0}),this.submenu("ShowAnnotation","Annotation"),this.rule(),this.command("Error","Error Message",(()=>this.postInfo(this.errorMessage)),{disabled:!0})]),this.submenu("Copy","Copy to Clipboard",[this.command("MathMLcode","MathML Code",(()=>this.copyMathML())),this.command("Original","Original Form",(()=>this.copyOriginal())),this.rule(),this.command("Speech","Speech Text",(()=>this.copySpeechText()),{disabled:!0}),this.command("Braille","Braille Code",(()=>this.copyBrailleText()),{disabled:!0}),this.command("SVG","SVG Image",(()=>this.copySvgImage()),{disabled:!0}),this.submenu("CopyAnnotation","Annotation"),this.rule(),this.command("Error","Error Message",(()=>this.copyErrorMessage()),{disabled:!0})]),this.rule(),this.submenu("Settings","Math Settings",[this.submenu("Renderer","Math Renderer",this.radioGroup("renderer",[["CHTML"],["SVG"]])),this.submenu("Overflow","Wide Expressions",[this.radioGroup("overflow",[["Overflow"],["Scroll"],["Linebreak"],["Scale"],["Truncate"],["Elide"]]),this.rule(),this.checkbox("BreakInline","Allow In-line Breaks","breakInline")]),this.rule(),this.submenu("MathmlIncludes","MathML/SVG has",[this.checkbox("showSRE","Semantic attributes","showSRE"),this.checkbox("showTex","LaTeX attributes","showTex"),this.checkbox("texHints","TeX hints","texHints"),this.checkbox("semantics","Original as annotation","semantics")]),this.submenu("Language","Language"),this.rule(),this.submenu("ZoomTrigger","Zoom Trigger",[this.command("ZoomNow","Zoom Once Now",(()=>this.zoom(null,"",this.menu.mathItem))),this.rule(),this.radioGroup("zoom",[["Click"],["DoubleClick","Double-Click"],["NoZoom","No Zoom"]]),this.rule(),this.label("TriggerRequires","Trigger Requires:"),this.checkbox(xb?"Option":"Alt",xb?"Option":"Alt","alt"),this.checkbox("Command","Command","cmd",{hidden:!xb}),this.checkbox("Control","Control","ctrl",{hiddne:xb}),this.checkbox("Shift","Shift","shift")]),this.submenu("ZoomFactor","Zoom Factor",this.radioGroup("zscale",[["150%"],["175%"],["200%"],["250%"],["300%"],["400%"]])),this.rule(),this.command("Scale","Scale All Math...",(()=>this.scaleAllMath())),this.rule(),this.command("Reset","Reset to defaults",(()=>this.resetDefaults()))]),this.rule(),this.label("Accessibility","\xa0\xa0 Accessibility:"),this.submenu("Speech","\xa0 \xa0 Speech",[this.checkbox("Generate","Generate","speech"),this.checkbox("Subtitles","Show Subtitles","subtitles"),this.checkbox("Auto Voicing","Auto Voicing","voicing"),this.rule(),this.label("Rules","Rules:"),this.submenu("Mathspeak","Mathspeak",this.radioGroup("speechRules",[["mathspeak-default","Verbose"],["mathspeak-brief","Brief"],["mathspeak-sbrief","Superbrief"]])),this.submenu("Clearspeak","Clearspeak",this.radioGroup("speechRules",[["clearspeak-default","Auto"]])),this.rule(),this.submenu("A11yLanguage","Language")]),this.submenu("Braille","\xa0 \xa0 Braille",[this.checkbox("Generate","Generate","braille"),this.checkbox("Subtitles","Show Subtitles","viewBraille"),this.rule(),this.label("Code","Code Format:"),this.radioGroup("brailleCode",[["nemeth","Nemeth"],["ueb","UEB"],["euro","Euro"]])]),this.submenu("Explorer","\xa0 \xa0 Explorer",[this.submenu("Highlight","Highlight",[this.submenu("Background","Background",this.radioGroup("backgroundColor",[["Blue"],["Red"],["Green"],["Yellow"],["Cyan"],["Magenta"],["White"],["Black"]])),{type:"slider",variable:"backgroundOpacity",content:" "},this.submenu("Foreground","Foreground",this.radioGroup("foregroundColor",[["Black"],["White"],["Magenta"],["Cyan"],["Yellow"],["Green"],["Red"],["Blue"]])),{type:"slider",variable:"foregroundOpacity",content:" "},this.rule(),this.radioGroup("highlight",[["None"],["Hover"],["Flame"]]),this.rule(),this.checkbox("TreeColoring","Tree Coloring","treeColoring")]),this.submenu("Magnification","Magnification",[this.radioGroup("magnification",[["None"],["Keyboard"],["Mouse"]]),this.rule(),this.radioGroup("magnify",[["200%"],["300%"],["400%"],["500%"]])]),this.submenu("Semantic Info","Semantic Info",[this.checkbox("Type","Type","infoType"),this.checkbox("Role","Role","infoRole"),this.checkbox("Prefix","Prefix","infoPrefix")]),this.rule(),this.submenu("Role Description","Describe math as",[this.radioGroup("roleDescription",[["MathJax expression"],["MathJax"],["math"],["clickable math"],["explorable math"],["none"]])]),this.checkbox("Math Help","Help message on focus","help")]),this.submenu("Options","\xa0 \xa0 Options",[this.checkbox("Enrich","Semantic Enrichment","enrich"),this.checkbox("Collapsible","Collapsible Math","collapsible"),this.checkbox("AutoCollapse","Auto Collapse","autocollapse",{disabled:!0}),this.rule(),this.checkbox("InTabOrder","Include in Tab Order","inTabOrder"),this.submenu("TabSelects","Tabbing Focuses on",[this.radioGroup("tabSelects",[["all","Whole Expression"],["last","Last Explored Node"]])]),this.rule(),this.checkbox("AssistiveMml","Include Hidden MathML","assistiveMml")]),this.rule(),this.command("About","About MathJax",(()=>this.postInfo(this.about))),this.command("Help","MathJax Help",(()=>this.postInfo(this.help)))]});const e=this.menu;e.settings=this.settings,e.findID("Settings","Overflow","Elide").disable(),e.findID("Braille","ueb").hide(),e.setJax(this.jax),this.attachDialogMenus(e),this.checkLoadableItems();const s=[];var i;Zu.DynamicSubmenus.set("ShowAnnotation",[Cb(this.annotationBox,this.options.annotationTypes,s),""]),Zu.DynamicSubmenus.set("CopyAnnotation",[Tb(s),""]),i=this.document.document,Ju||(Qu(Xu,i),Ju=!0,Yu(i)),function(t){Ku||(Qu(Vu,t),Ku=!0,Yu(t))}(this.document.document)}attachDialogMenus(t){this.about.attachMenu(t),this.help.attachMenu(t),this.originalText.attachMenu(t),this.mathmlCode.attachMenu(t),this.originalText.attachMenu(t),this.svgImage.attachMenu(t),this.speechText.attachMenu(t),this.brailleText.attachMenu(t),this.errorMessage.attachMenu(t),this.zoomBox.attachMenu(t)}checkLoadableItems(){var t,e,s,i,r,n;if(Sb&&Sb._&&Sb.loader&&Sb.startup){const o=this.settings,a=this.document.options;(o.enrich||o.speech&&a.enableSpeech||o.braille&&a.enableBraille)&&!(null===(e=null===(t=Sb._)||void 0===t?void 0:t.a11y)||void 0===e?void 0:e.explorer)&&this.loadA11y("explorer"),o.collapsible&&!(null===(i=null===(s=Sb._)||void 0===s?void 0:s.a11y)||void 0===i?void 0:i.complexity)&&this.loadA11y("complexity"),o.assistiveMml&&!(null===(n=null===(r=Sb._)||void 0===r?void 0:r.a11y)||void 0===n?void 0:n["assistive-mml"])&&this.loadA11y("assistive-mml")}else{const t=this.menu;for(const e of Object.keys(this.jax))this.jax[e]||t.findID("Settings","Renderer",e).disable();t.findID("Speech").disable(),t.findID("Braille").disable(),t.findID("Explorer").disable(),t.findID("Options","AutoCollapse").disable(),t.findID("Options","Collapsible").disable(),t.findID("Options","Enrich").disable(),t.findID("Options","AssistiveMml").disable()}}enableAccessibilityItems(t,e){const s=this.menu.findID(t).submenu;for(const t of s.items.slice(1))t instanceof Su||(!e||t instanceof vu&&!t.submenu.items.length?t.disable():t.enable())}mergeUserSettings(){try{const t=localStorage.getItem(Rb.MENU_STORAGE);if(!t)return;Object.assign(this.settings,JSON.parse(t)),this.setA11y(this.settings)}catch(t){console.log("MathJax localStorage error: "+t.message)}}saveUserSettings(){const t={};for(const e of Object.keys(this.settings))this.settings[e]!==this.defaultSettings[e]&&(t[e]=this.settings[e]);try{Object.keys(t).length?localStorage.setItem(Rb.MENU_STORAGE,JSON.stringify(t)):localStorage.removeItem(Rb.MENU_STORAGE)}catch(t){console.log("MathJax localStorage error: "+t.message)}}setA11y(t){var e,s;(null===(s=null===(e=Sb._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.explorer)&&Sb._.a11y.explorer_ts.setA11yOptions(this.document,t)}getA11y(t){var e,s;if(null===(s=null===(e=Sb._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.explorer)return void 0!==this.document.options.a11y[t]?this.document.options.a11y[t]:this.document.options.sre[t]}applySettings(){this.setTabOrder(this.settings.inTabOrder);this.document.options.enableAssistiveMml=this.settings.assistiveMml,this.enableAccessibilityItems("Speech",this.settings.speech),this.enableAccessibilityItems("Braille",this.settings.braille),this.setAccessibilityMenus();const t=this.settings.renderer.replace(/[^a-zA-Z0-9]/g,"")||"CHTML";(Rb._loadingPromise||Promise.resolve()).then((()=>{const e=this.settings,s=this.document.outputJax.options;if(s.scale=parseFloat(e.scale),s.displayOverflow=e.overflow.toLowerCase(),s.linebreaks&&(s.linebreaks.inline=e.breakInline),!e.speechRules){const t=this.document.options.sre;e.speechRules=`${t.domain||"clearspeak"}-${t.style||"default"}`}t!==this.defaultSettings.renderer&&this.document.whenReady((()=>this.setRenderer(t,!1)))}))}setOverflow(t){this.document.outputJax.options.displayOverflow=t.toLowerCase(),Rb.loading||this.document.rerenderPromise()}setInlineBreaks(t){this.document.outputJax.options.linebreaks.inline=t,Rb.loading||this.document.rerenderPromise()}setScale(t){this.document.outputJax.options.scale=parseFloat(t),Rb.loading||this.document.rerenderPromise()}setRenderer(t,e=!0){if(Object.hasOwn(this.jax,t)&&this.jax[t])return this.setOutputJax(t,e);const s=t.toLowerCase();return new Promise(((i,r)=>{this.loadComponent("output/"+s,(()=>{const n=Sb.startup;if(!(s in n.constructors))return r(new Error(`Component ${s} not loaded`));n.useOutput(s,!0),n.output=n.getOutputJax(),n.output.setAdaptor(this.document.adaptor),n.output.initialize(),this.jax[t]=n.output,this.setOutputJax(t,e).then((()=>i())).catch((t=>r(t)))}))}))}setOutputJax(t,e=!0){this.jax[t].setAdaptor(this.document.adaptor),this.document.outputJax=this.jax[t];const s=this.loadRequiredExtensions();return e?s.then((()=>Qn.handleRetriesFor((()=>this.rerender())))):s.then((()=>{}))}loadRequiredExtensions(){const t=this.document.outputJax.name.toLowerCase(),e=[];for(const s of this.requiredExtensions)e.push(Sb.loader.load(`[${s}]/${t}`));return this.requiredExtensions=[],Promise.all(e)}addRequiredExtensions(t){if(t){const e=new Set([...this.requiredExtensions,...t]);this.requiredExtensions=[...e]}}setTabOrder(t){const e=this.menu.findID("Options","TabSelects");t?e.enable():e.disable(),this.menu.store.inTaborder(t)}setAssistiveMml(t){var e,s;this.document.options.enableAssistiveMml=t,!t||(null===(s=null===(e=Sb._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s["assistive-mml"])?this.rerender():this.loadA11y("assistive-mml")}setAccessibilityMenus(){const t=this.settings.enrich,e=t?"enable":"disable";["Speech","Braille","Explorer"].forEach((t=>this.menu.findID(t)[e]()));const s=this.document.options;s.enableSpeech=s.enableBraille=s.enableExplorer=t,t||(this.settings.collapsible=!1,this.document.options.enableCollapsible=!1)}setSpeech(t){var e,s;this.enableAccessibilityItems("Speech",t),this.document.options.enableSpeech=t,!t||(null===(s=null===(e=Sb._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.explorer)?this.rerender(nr.COMPILED):this.loadA11y("explorer")}setBraille(t){var e,s;this.enableAccessibilityItems("Braille",t),this.document.options.enableBraille=t,!t||(null===(s=null===(e=Sb._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.explorer)?this.rerender(nr.COMPILED):this.loadA11y("explorer")}setBrailleCode(t){this.document.options.sre.braille=t,this.rerender(nr.COMPILED)}setLocale(t){this.document.options.sre.locale=t,this.rerender(nr.COMPILED)}setRoleDescription(){this.rerender(nr.COMPILED)}setEnrichment(t){var e,s;this.document.options.enableEnrichment=t,this.setAccessibilityMenus(),!t||(null===(s=null===(e=Sb._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.explorer)?this.rerender(nr.COMPILED):this.loadA11y("explorer")}setCollapsible(t){var e,s,i,r;this.document.options.enableComplexity=t,t&&!this.settings.enrich&&(this.settings.enrich=this.document.options.enableEnrichment=!0,this.setAccessibilityMenus()),t||this.menu.pool.lookup("highlight").setValue("None"),!t||(null===(s=null===(e=Sb._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.complexity)?this.rerender(nr.COMPILED):(this.loadA11y("complexity"),(null===(r=null===(i=Sb._)||void 0===i?void 0:i.a11y)||void 0===r?void 0:r.explorer)||this.loadA11y("explorer"))}setHighlight(t){var e,s;if("None"!==t){if(!this.settings.collapsible){const t=this.menu.pool.lookup("collapsible");t.setValue(!0),null===(s=null===(e=t.items[0])||void 0===e?void 0:e.executeCallbacks_)||void 0===s||s.call(e)}Rb.loadingPromises.has("a11y/complexity")||this.rerender(nr.COMPILED)}}scaleAllMath(){const t=(100*parseFloat(this.settings.scale)).toFixed(1).replace(/.0$/,""),e=prompt("Scale all mathematics (compared to surrounding text) by",t+"%");if(this.current){const t=this.menu.mathItem.explorers.speech;t.refocus=this.current,t.focus()}if(e)if(e.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)){const t=parseFloat(e)/100;t?this.menu.pool.lookup("scale").setValue(String(t)):alert("The scale should not be zero")}else alert("The scale should be a percentage (e.g., 120%)")}resetDefaults(){Rb.loading++;const t=this.menu.pool,e=this.defaultSettings;for(const s of Object.keys(e)){const i=t.lookup(s);if(i){if(i.getValue()!==e[s]){i.setValue(e[s]);const t=i.items[0];t&&t.executeCallbacks_()}}else Object.hasOwn(this.settings,s)&&(this.settings[s]=e[s])}Rb.loading--,this.rerender(nr.COMPILED)}checkComponent(t){const e=Rb.loadingPromises.get(t);e&&Qn.retryAfter(e)}loadComponent(t,e){if(Rb.loadingPromises.has(t))return;const s=Sb.loader;if(!s)return;Rb.loading++;const i=s.load(t).then((()=>{Rb.loading--,Rb.loadingPromises.delete(t),0===Rb.loading&&Rb._loadingPromise&&(Rb._loadingPromise=null,Rb._loadingOK()),e()})).catch((t=>{Rb._loadingPromise?(Rb._loadingPromise=null,Rb._loadingFailed(t)):console.log(t)}));Rb.loadingPromises.set(t,i)}loadA11y(t){const e=!nr.ENRICHED;this.loadComponent("a11y/"+t,(()=>{var s,i;const r=Sb.startup;Qn.handlers.unregister(r.handler),r.handler=r.getHandler(),Qn.handlers.register(r.handler);const n=this.document;this.document=r.document=r.getDocument(),this.document.processed=n.processed,this.document.menu=this,n.webworker&&(this.document.webworker=n.webworker),this.setA11y(this.settings),this.defaultSettings=Object.assign({},this.document.options.a11y,(null===(i=null===(s=Sb.config)||void 0===s?void 0:s.options)||void 0===i?void 0:i.a11y)||{},this.defaultSettings),this.document.outputJax.reset(),this.transferMathList(n),this.document.processed=n.processed,Rb._loadingPromise||(this.document.outputJax.reset(),Qn.handleRetriesFor((()=>{this.rerender("complexity"===t||e?nr.COMPILED:nr.TYPESET)})))}))}transferMathList(t){const e=this.document.options.MathItem;for(const s of t.math){const t=new e;Object.assign(t,s),this.document.math.push(t)}}formatSource(t){return t.trim().replace(/&/g,"&").replace(//g,">")}toMML(t){return this.MmlVisitor.visitTree(t.root,t,{filterSRE:!this.settings.showSRE,filterTex:!this.settings.showTex,texHints:this.settings.texHints,semantics:this.settings.semantics&&"MathML"!==t.inputJax.name})}toSVG(t){const e=this.jax.SVG;if(!e)return Promise.resolve("SVG can't be produced. Try switching to SVG output first.");const s=e.adaptor,i=e.options.fontCache,r=!!t.root.getProperty("process-breaks");if("global"!==i&&(t.display||!r)&&"SVG"===s.getAttribute(t.typesetRoot,"jax"))for(const e of s.childNodes(t.typesetRoot))if("svg"===s.kind(e))return Promise.resolve(this.formatSvg(s.serializeXML(e)));return this.typesetSVG(t,i,r)}typesetSVG(t,e,s){return Ib(this,void 0,void 0,(function*(){const i=this.jax.SVG,r=i.html("div");"global"===e&&(i.options.fontCache="local");const n=t.root;t.root=n.copy(!0),t.root.setInheritedAttributes({},t.display,0,!1),s&&(i.unmarkInlineBreaks(t.root),t.root.setProperty("inlineMarked",!1));return Qn.handleRetriesFor((()=>{i.toDOM(t,r,i.document)})).then((()=>(t.root=n,i.options.fontCache=e,this.formatSvg(i.adaptor.innerHTML(r)))))}))}formatSvg(t){const e=this.constructor.SvgCss;return t=(t=t.match(/^/)?t.replace(//,``):t.replace(/^()/,`$1 `)).replace(/ (?:role|focusable)=".*?"/g,"").replace(/"currentColor"/g,'"black"'),this.settings.showSRE||(t=t.replace(/ (?:data-semantic-.*?|data-speech-node|role|aria-(?:level|posinset|setsize|owns))=".*?"/g,"")),this.settings.showTex||(t=t.replace(/ data-latex(?:-item)?=".*?"/g,"")),this.settings.texHints||(t=t.replace(/ data-mjx-(?:texclass|alternate|variant|pseudoscript|smallmatrix|mathaccent|auto-op|script-align|vbox)=".*?"/g,"").replace(/ data-mml-node="TeXAtom"/g,"")),`\n${t}`}postSvgImage(){this.postInfo(this.svgImage),this.toSVG(this.menu.mathItem).then((t=>{this.svgImage.html.querySelector("#svg-image").innerHTML=this.formatSource(t).replace(/\n/g," ")}))}zoom(t,e,s){t&&!this.isZoomEvent(t,e)||(this.menu.mathItem=s,t&&this.menu.post(t),this.postInfo(this.zoomBox))}isZoomEvent(t,e){return this.settings.zoom===e&&(!this.settings.alt||t.altKey)&&(!this.settings.ctrl||t.ctrlKey)&&(!this.settings.cmd||t.metaKey)&&(!this.settings.shift||t.shiftKey)}rerender(t=nr.TYPESET){this.rerenderStart=Math.min(t,this.rerenderStart);const e=Sb.startup;!Rb.loading&&e.hasTypeset&&e.document.whenReady((()=>Ib(this,void 0,void 0,(function*(){this.rerenderStart<=nr.COMPILED&&this.document.reset({inputJax:[]}),yield this.document.rerenderPromise(this.rerenderStart),this.rerenderStart=nr.LAST}))))}copyMathML(){vb(this.toMML(this.menu.mathItem))}copyOriginal(){vb(this.menu.mathItem.math.trim())}copySvgImage(){this.toSVG(this.menu.mathItem).then((t=>{vb(t)}))}copySpeechText(){vb(this.menu.mathItem.outputData.speech)}copyBrailleText(){vb(this.menu.mathItem.outputData.braille)}copyErrorMessage(){vb(this.menu.errorMsg.trim())}addMenu(t){this.addEvents(t),this.menu.store.insert(t.typesetRoot),t.typesetRoot.tabIndex=this.settings.inTabOrder?0:-1}addEvents(t){const e=t.typesetRoot;e.addEventListener("mousedown",(()=>{var e,s;this.menu.mathItem=t,this.current=null===(s=null===(e=t.explorers)||void 0===e?void 0:e.speech)||void 0===s?void 0:s.current}),!0),e.addEventListener("contextmenu",(()=>{var e;this.menu.mathItem=t;const s=null===(e=t.explorers)||void 0===e?void 0:e.speech;s&&(t.outputData.nofocus=!this.current,s.refocus=this.current)}),!0),e.addEventListener("keydown",(()=>this.menu.mathItem=t),!0),e.addEventListener("click",(e=>this.zoom(e,"Click",t)),!0),e.addEventListener("dblclick",(e=>this.zoom(e,"DoubleClick",t)),!0)}clear(){this.menu.store.clear()}variable(t,e){return{name:t,getter:()=>this.settings[t],setter:s=>{this.settings[t]=s,e&&e(s),this.saveUserSettings()}}}a11yVar(t,e){return{name:t,getter:()=>this.getA11y(t),setter:s=>{this.settings[t]=s,this.setA11y({[t]:s}),e&&e(s),this.saveUserSettings()}}}submenu(t,e,s=[],i=!1){let r=[];for(const t of s)Array.isArray(t)?r=r.concat(t):r.push(t);return{type:"submenu",id:t,content:e,menu:{items:r},disabled:0===r.length||i}}command(t,e,s,i={}){return Object.assign({type:"command",id:t,content:e,action:s},i)}checkbox(t,e,s,i={}){return Object.assign({type:"checkbox",id:t,content:e,variable:s},i)}radioGroup(t,e){return e.map((e=>this.radio(e[0],e[1]||e[0],t)))}radio(t,e,s,i={}){return Object.assign({type:"radio",id:t,content:e,variable:s},i)}label(t,e){return{type:"label",id:t,content:e}}rule(){return{type:"rule"}}}function Ob(t){return class extends t{addMenu(t,e=!1){this.state()>=nr.CONTEXT_MENU||(this.isEscaped||!t.options.enableMenu&&!e||t.menu.addMenu(this),this.state(nr.CONTEXT_MENU))}getMenus(t){t.menu.menu.store.sort()}checkLoading(t){t.checkLoading()}}}function Db(t){var e;return e=class extends t{constructor(...t){super(...t),this.menu=new this.options.MenuClass(this,this.options.menuOptions);const e=this.constructor.ProcessBits;e.has("context-menu")||e.allocate("context-menu"),this.options.MathItem=Ob(this.options.MathItem);const s=this.menu.settings,i=this.options,r=i.enableEnrichment=s.enrich;i.enableSpeech=s.speech&&r,i.enableBraille=s.braille&&r,i.enableComplexity=s.collapsible&&r,i.enableExplorer=r}addMenu(){if(!this.processed.isSet("context-menu")){for(const t of this.math)t.addMenu(this);this.processed.set("context-menu")}return this}getMenus(){this.menu.menu.store.sort()}checkLoading(){let t=!0;try{this._checkLoading(),t=!1}catch(t){if(!t.retry)throw t}return t}_checkLoading(){return this.menu.isLoading&&Qn.retryAfter(this.menu.loadingPromise.catch((t=>console.log(t)))),this.options.enableComplexity&&this.menu.checkComponent("a11y/complexity"),this.options.enableExplorer&&this.menu.checkComponent("a11y/explorer"),this}state(t,e=!1){return super.state(t,e),tconsole.warn("Enrichment Error:",s)},t.OPTIONS),{MenuClass:Rb,menuOptions:Rb.OPTIONS,enableMenu:!0,sre:t.OPTIONS.sre||Mi({}),a11y:t.OPTIONS.a11y||Mi({}),renderActions:Mi(Object.assign(Object.assign({},t.OPTIONS.renderActions),{addMenu:[nr.CONTEXT_MENU],getMenus:[nr.INSERTED+5,!1],checkLoading:[nr.UNPROCESSED+1,t=>t.checkLoading(),"",!1]}))}),e}function Pb(t){return t.documentClass=Db(t.documentClass),t}Rb.MENU_STORAGE="MathJax-Menu-Settings",Rb.OPTIONS={settings:{showSRE:!1,showTex:!1,texHints:!0,semantics:!1,zoom:"NoZoom",zscale:"200%",renderer:"CHTML",alt:!1,cmd:!1,ctrl:!1,shift:!1,scale:1,overflow:"Scroll",breakInline:!0,autocollapse:!1,collapsible:!1,enrich:!0,inTabOrder:!0,assistiveMml:!1,speech:!0,braille:!0,brailleCode:"nemeth",speechRules:"clearspeak-default",roleDescription:"math",tabSelects:"all"},jax:{CHTML:null,SVG:null},annotationTypes:Mi({TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]})},Rb.SvgCss=["svg a{fill:blue;stroke:blue}",'[data-mml-node="merror"]>g{fill:red;stroke:red}','[data-mml-node="merror"]>rect[data-background]{fill:yellow;stroke:none}',"[data-frame],[data-line]{stroke-width:70px;fill:none}",".mjx-dashed{stroke-dasharray:140}",".mjx-dotted{stroke-linecap:round;stroke-dasharray:0,140}","use[data-c]{stroke-width:3px}"].join(""),Rb.loading=0,Rb.loadingPromises=new Map,Rb._loadingPromise=null,Rb._loadingOK=null,Rb._loadingFailed=null,or("CONTEXT_MENU",170),MathJax.loader&&MathJax.loader.checkVersion("ui/menu",ii,"ui"),ci({_:{a11y:{speech:{SpeechMenu:Ps}},ui:{menu:{AnnotationMenu:Fs,MJContextMenu:Os,Menu:Hs,MenuHandler:Ws,MenuUtil:Bs,MmlVisitor:Us,RadioCompare:js,SelectableInfo:qs}}}}),MathJax.startup&&hi&&MathJax.startup.extendHandler((t=>Pb(t)),20),MathJax.loader&&MathJax.loader.checkVersion("a11y/sre",ii,"a11y"),ci({_:{a11y:{sre_ts:Ds}}}),or("ENRICHED",nr.COMPILED+10);class Bb extends Kn{visitTree(t,e){this.mactionId=0;const s=super.visitTree(t);return this.mactionId&&(e.inputData.hasMaction=!0),s}visitHtmlNode(t,e){return t.getSerializedXML()}visitMactionNode(t,e){const[s,i]=0===t.childNodes.length?["",""]:["\n",e],r=this.childNodeMml(t,e+" ",s);let n=this.getAttributes(t);if("toggle"===t.attributes.get("actiontype")){const e=++this.mactionId;t.setProperty("mactionId",e),n=` data-maction-id="${e}" selection="${t.attributes.get("selection")}"`+n.replace(/ selection="\d+"/,"").replace(/ data-maction-id="\d+"/,"")}return`${e}`+(r.match(/\S/)?s+r+i:"")+" "}}function Fb(t,e,s){return class extends t{constructor(){super(...arguments),this.toMathML=s}serializeMml(t){if("outerHTML"in t)return t.outerHTML;if("undefined"!=typeof Element&&"undefined"!=typeof window&&t instanceof Element){const e=window.document.createElement("div");return e.appendChild(t),e.innerHTML}return t.toString()}enrich(t,s=!1){if(!(this.state()>=nr.ENRICHED)){if(!this.isEscaped&&(t.options.enableEnrichment||s)){const s=new t.options.MathItem("",e);try{let e;e=this.inputData.originalMml?this.adjustSelections():this.inputData.originalMml=this.toMathML(this.root,this);const i=nb(e);this.inputData.enrichedMml=s.math=this.serializeMml(i),s.math=s.math.replace(/ role="treeitem"/g,' data-speech-node="true"').replace(/ aria-(?:posinset|owns|setsize)=".*?"/g,""),s.display=this.display,s.compile(t),this.root=s.root}catch(e){t.options.enrichError(t,this,e)}}this.state(nr.ENRICHED)}}toEnriched(t){return this.serializeMml(nb(t))}unEnrich(t){const s=this.inputData.originalMml;if(!s)return;const i=new t.options.MathItem("",e);i.math=s,i.display=this.display,i.compile(t),this.root=i.root}adjustSelections(){const t=this.inputData.originalMml;if(!this.inputData.hasMaction)return t;const e=[];return this.root.walkTree((t=>{t.isKind("maction")&&(e[t.attributes.get("data-maction-id")]=t)})),t.replace(/(data-maction-id="(\d+)" selection=)"\d+"/g,((t,s,i)=>`${s}"${e[i].attributes.get("selection")}"`))}}}function jb(t,e){var s;return(s=class extends t{constructor(...t){super(...t),e.setMmlFactory(this.mmlFactory);const s=this.constructor.ProcessBits;s.has("enriched")||s.allocate("enriched");const i=new Bb(this.mmlFactory);this.options.MathItem=Fb(this.options.MathItem,e,((t,e)=>i.visitTree(t,e)))}enrich(){if(!this.processed.isSet("enriched")){if(this.options.enableEnrichment){ib(this.options.sre);for(const t of this.math)t.enrich(this)}this.processed.set("enriched")}return this}enrichError(t,e,s){console.warn("Enrichment error:",s)}state(t,e=!1){if(super.state(t,e),t=nr.COMPILED))for(const t of this.math)t.unEnrich(this);return this}}).OPTIONS=Object.assign(Object.assign({},t.OPTIONS),{enableEnrichment:!0,enrichError:(t,e,s)=>t.enrichError(t,e,s),renderActions:Mi(Object.assign(Object.assign({},t.OPTIONS.renderActions),{enrich:[nr.ENRICHED]})),sre:Mi({speech:"none",locale:"en",domain:"clearspeak",style:"default",braille:"nemeth",structure:!0,aria:!0})}),s}function Ub(t,e){return e.setAdaptor(t.adaptor),t.documentClass=jb(t.documentClass,e),t}MathJax.loader&&MathJax.loader.checkVersion("a11y/semantic-enrich",ii,"a11y"),ci({_:{a11y:{"semantic-enrich":zs}}}),MathJax.startup&&MathJax.startup.extendHandler((t=>Ub(t,new yl({allowHtmlInTokenNodes:!0}))));const qb=["pitch","rate","volume"];function Hb(t){const e=ob(t),s=[],i=[];return Wb(Array.from(e.childNodes),s,i),[i.join(" "),s]}function Wb(t,e,s,i={}){for(const r of t)if(3!==r.nodeType){if(1===r.nodeType){const t=r,n=t.tagName;if("speak"===n)continue;if("prosody"===n){Wb(Array.from(r.childNodes),e,s,Xb(t,i));continue}switch(n){case"break":e.push({pause:t.getAttribute("time")});break;case"mark":e.push({mark:t.getAttribute("name")});break;case"say-as":{const r=t.textContent;e.push(Object.assign({text:r,character:!0},i)),s.push(r);break}}}}else{const t=r.textContent.trim();t&&(s.push(t),e.push(Object.assign({text:t},i)))}}const zb={pitch:(t,e)=>t/100*1,volume:(t,e)=>t/100*.5,rate:(t,e)=>t/100*1};function Xb(t,e){const s={};for(const i of qb)if(t.hasAttribute(i)){const[r,n]=Gb(t.getAttribute(i));if(!r){s[i]="volume"===i?.5:1;continue}let o=e[i];o=o||("volume"===i?.5:1);const a=zb[i](parseInt(n,10),r);s[i]="-"===r?o-a:o+a}return s}const Vb=/([+-]?)([0-9]+)%/;function Gb(t){const e=t.match(Vb);return e?[e[1],e[2]]:(console.warn("Something went wrong with the prosody matching."),["","100"])}function Jb(t,e,s,i=" "){if(!t)return"";const r=[t];return e&&r.unshift(e),s&&r.push(s),r.join(i)}function Kb(t,e="en",s="100"){return Hb(`${t} `)}function $b(){const t=new AudioContext,e=t.createOscillator();e.frequency.value=300,e.connect(t.destination),e.start(t.currentTime),e.stop(t.currentTime+.05)}var Yb,Qb;!function(t){t[t.NONE=0]="NONE",t[t.DEPTH=1]="DEPTH",t[t.SUMMARY=2]="SUMMARY"}(Yb||(Yb={})),function(t){t.SPEECH="data-semantic-speech-none",t.SPEECH_SSML="data-semantic-speech",t.SUMMARY="data-semantic-summary-none",t.SUMMARY_SSML="data-semantic-summary",t.PREFIX="data-semantic-prefix-none",t.PREFIX_SSML="data-semantic-prefix",t.POSTFIX="data-semantic-postfix-none",t.POSTFIX_SSML="data-semantic-postfix",t.BRAILLE="data-semantic-braille"}(Qb||(Qb={}));class Zb{constructor(){this.promise=Promise.resolve(),this.adaptor=null,this._options={},this._init=!1}set element(t){this._element=t}get element(){return this._element}set options(t){this._options=Object.assign({},(null==t?void 0:t.sre)||{},{enableSpeech:t.enableSpeech,enableBraille:t.enableBraille}),delete this._options.custom}get options(){return this._options}init(t,e,s){this.options=t,this._init||(this.adaptor=e,this.webworker=s,this._init=!0)}update(t){Object.assign(this.options,t)}Speech(t){const e=t.outputData.mml,s=Object.assign({},this.options,{modality:"speech"});return this.promise=this.webworker.Speech(e,s,t)}SpeechFor(t,e){const s=Object.assign({},this.options,{modality:"speech"});return this.webworker.speechFor(e,s,t)}cancel(t){var e;null===(e=this.webworker)||void 0===e||e.Cancel(t)}updateRegions(t,e,s){e.Update(this.getLabel(t)),s.Update(this.getBraille(t))}getOptions(t){var e,s,i,r;return{locale:null!==(e=this.adaptor.getAttribute(t,"data-semantic-locale"))&&void 0!==e?e:"",domain:null!==(s=this.adaptor.getAttribute(t,"data-semantic-domain"))&&void 0!==s?s:"",style:null!==(i=this.adaptor.getAttribute(t,"data-semantic-style"))&&void 0!==i?i:"",domain2style:null!==(r=this.adaptor.getAttribute(t,"data-semantic-domain2style"))&&void 0!==r?r:""}}nextRules(t){const e=this.getOptions(t.typesetRoot);return this.update(e),this.promise=this.webworker.nextRules(t.outputData.mml,Object.assign({},this.options,{modality:"speech"}),t)}nextStyle(t,e){const s=this.getOptions(e.typesetRoot);return this.update(s),this.promise=this.webworker.nextStyle(e.outputData.mml,Object.assign({},this.options,{modality:"speech"}),this.adaptor.getAttribute(t,"data-semantic-id"),e)}getLabel(t,e="",s=" "){const i=this.adaptor;return Jb(i.getAttribute(t,Qb.SPEECH_SSML),i.getAttribute(t,Qb.PREFIX_SSML),i.getAttribute(t,Qb.POSTFIX_SSML),s)||i.getAttribute(t,"aria-label")}getBraille(t){const e=this.adaptor;return e.getAttribute(t,"aria-braillelabel")||e.getAttribute(t,Qb.BRAILLE)}getLocalePreferences(t){return this.promise=this.webworker.clearspeakLocalePreferences(this.options,t)}getRelevantPreferences(t,e,s,i){const r=t.outputData.mml;return this.promise=this.webworker.clearspeakRelevantPreferences(r,e,s,i)}}var tE=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};class eE{constructor(t,e,s,i){this.cmd=t,this.item=e,this.resolve=s,this.reject=i}}class sE{constructor(t,e){this.adaptor=t,this.options=e,this.ready=!1,this.tasks=[],this.Commands={Ready(t,e){t.ready=!0,t.postNext()},Finished(t,e){const s=t.tasks.shift();e.success?s.resolve(e.result):s.reject(e.error),t.postNext()},Log(t,e){t.options.debug&&console.log("Log:",e)}}}Start(){return tE(this,void 0,void 0,(function*(){if(this.ready)throw Error("Worker already started");this.worker=yield this.adaptor.createWorker(this.Listener.bind(this),this.options)}))}debug(t,...e){this.options.debug&&console.info(t,...e)}Listener(t){this.debug("Worker >>> Client:",t.data),Object.hasOwn(this.Commands,t.data.cmd)?this.Commands[t.data.cmd](this,t.data.data):this.debug("Invalid command from worker: "+t.data.cmd)}Post(t,e){const s=new Promise(((s,i)=>{this.tasks.push(new eE(t,e,s,i))}));return this.ready&&1===this.tasks.length&&this.postNext(),s}postNext(){if(this.tasks.length){const t=Object.assign({},this.tasks[0].cmd,{debug:this.options.debug});this.worker.postMessage(t)}}Cancel(t){const e=this.tasks.findIndex((e=>e.item===t));e>0&&(this.tasks[e].reject(`Task ${this.tasks[e].cmd.cmd} cancelled`),this.tasks.splice(e,1))}Setup(t){return this.Post({cmd:"setup",data:{domain:t.domain,style:t.style,locale:t.locale,modality:t.modality}})}Speech(t,e,s){return tE(this,void 0,void 0,(function*(){this.Attach(s,e.enableSpeech,e.enableBraille,yield this.Post({cmd:"speech",data:{mml:t,options:e}},s))}))}nextRules(t,e,s){return tE(this,void 0,void 0,(function*(){this.Attach(s,e.enableSpeech,e.enableBraille,yield this.Post({cmd:"nextRules",data:{mml:t,options:e}},s))}))}nextStyle(t,e,s,i){return tE(this,void 0,void 0,(function*(){this.Attach(i,e.enableSpeech,e.enableBraille,yield this.Post({cmd:"nextStyle",data:{mml:t,options:e,nodeId:s}},i))}))}speechFor(t,e,s){return tE(this,void 0,void 0,(function*(){const i=yield this.Post({cmd:"speech",data:{mml:t,options:e}},s);return JSON.parse(i)}))}Attach(t,e,s,i){const r=JSON.parse(i),n=t.typesetRoot;if(!n)return;this.setSpecialAttributes(n,r.options,"data-semantic-",["locale","domain","style","domain2style"]);const o=this.adaptor;this.setSpecialAttributes(n,r.translations,"data-semantic-");for(const[t,e]of Object.entries(r.mactions)){let s=o.getElement("#"+t,n);s&&o.childNodes(s)[0]&&(s=o.childNodes(s)[0],o.setAttribute(s,"data-semantic-type","dummy"),this.setSpecialAttributes(s,e,""))}this.setSpeechAttributes(o.childNodes(n)[0],"",r,e,s),e&&(r.label&&(o.setAttribute(n,Qb.SPEECH,r.label),o.setAttribute(n,Qb.SPEECH_SSML,r.ssml),t.outputData.speech=r.label),o.setAttribute(n,"data-speech-attached","true")),s&&(r.braillelabel&&(o.setAttribute(n,Qb.BRAILLE,r.braillelabel),t.outputData.braille=r.braillelabel),r.braille&&o.setAttribute(n,"data-braille-attached","true"))}setSpeechAttribute(t,e,s,i){var r,n;const o=this.adaptor,a=o.getAttribute(t,"data-semantic-id");if(o.removeAttribute(t,"data-speech-node"),s&&e.speech[a]["speech-none"]){o.setAttribute(t,"data-speech-node","true");for(let[s,i]of Object.entries(e.speech[a]))s=s.replace(/-ssml$/,""),i&&o.setAttribute(t,`data-semantic-${s}`,i)}if(i&&(null===(n=null===(r=e.braille)||void 0===r?void 0:r[a])||void 0===n?void 0:n["braille-none"])){o.setAttribute(t,"data-speech-node","true");const s=e.braille[a]["braille-none"];o.setAttribute(t,Qb.BRAILLE,s)}}setSpeechAttributes(t,e,s,i,r){const n=this.adaptor;if(!t||"#text"===n.kind(t)||"#comment"===n.kind(t))return e;n.hasAttribute(t,"data-semantic-id")&&(this.setSpeechAttribute(t,s,i,r),e||n.hasAttribute(t,"data-semantic-parent")||(e=n.getAttribute(t,"data-semantic-id")));for(const o of Array.from(n.childNodes(t)))e=this.setSpeechAttributes(o,e,s,i,r);return e}setSpecialAttributes(t,e,s,i){if(e){i=i||Object.keys(e);for(const r of i){const i=e[r];i&&this.adaptor.setAttribute(t,`${s}${r.toLowerCase()}`,i)}}}Detach(t){const e=t.typesetRoot;this.adaptor.removeAttribute(e,"data-speech-attached"),this.adaptor.removeAttribute(e,"data-braille-attached"),this.detachSpeech(e)}detachSpeech(t){const e=this.adaptor,s=e.childNodes(t);if(s){if("#text"!==e.kind(t))for(const s of["none","summary-none","speech","speech-none","summary","braille"])e.removeAttribute(t,`data-semantic-${s}`);for(const t of s)this.detachSpeech(t)}}Terminate(){this.debug("Terminating pending tasks");for(const t of this.tasks)t.reject(`${t.cmd.data.cmd} cancelled by WorkerHandler termination`);return this.tasks=[],this.debug("Terminating worker"),this.worker.terminate()}Stop(){return tE(this,void 0,void 0,(function*(){if(!this.worker)throw Error("Worker has not been started");yield this.Terminate(),this.worker=null,this.ready=!1}))}clearspeakLocalePreferences(t,e){return tE(this,void 0,void 0,(function*(){yield this.Post({cmd:"localePreferences",data:{options:t}}).then((s=>{e.set(t.locale,JSON.parse(s))}))}))}clearspeakRelevantPreferences(t,e,s,i){return tE(this,void 0,void 0,(function*(){yield this.Post({cmd:"relevantPreferences",data:{mml:t,id:e}}).then((t=>{s.set(i,t)}))}))}}const iE=li.config||{},rE=()=>(iE?.loader?.paths?.mathjax||iE?.__dirname||"/")+"/sre";var nE=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};function oE(t){return class extends t{constructor(){super(...arguments),this.generatorPool=new Zb}attachSpeech(t){if(this.outputData.speechPromise=null,this.state()>=nr.ATTACHSPEECH)return;if(this.state(nr.ATTACHSPEECH),this.isEscaped||!t.options.enableSpeech&&!t.options.enableBraille||!t.options.enableEnrichment)return;t.getWebworker(),this.generatorPool.init(t.options,t.adaptor,t.webworker),this.outputData.mml=this.toMathML(this.root,this);const e=this.generatorPool.Speech(this).catch((e=>t.options.speechError(t,this,e)));t.savePromise(e),this.outputData.speechPromise=e}detachSpeech(t){t.webworker.Detach(this)}speechFor(t){return nE(this,void 0,void 0,(function*(){t=this.toEnriched(t);const e=yield this.generatorPool.SpeechFor(this,t);return[e.label,e.braillelabel]}))}clear(){this.generatorPool.cancel(this)}}}function aE(t){var e;return e=class extends t{constructor(...t){super(...t),this.webworker=null;const e=this.constructor.ProcessBits;e.has("attach-speech")||e.allocate("attach-speech"),this.options.MathItem=oE(this.options.MathItem)}getWebworker(){this.webworker||(this.webworker=new sE(this.adaptor,this.options.worker),this.webworker.Start())}attachSpeech(){if(!this.processed.isSet("attach-speech")){const t=this.options;if(t.enableEnrichment&&(t.enableSpeech||t.enableBraille)){this.getWebworker();for(const t of this.math)t.attachSpeech(this)}this.processed.set("attach-speech")}return this}speechError(t,e,s){console.warn("Speech generation error:",s)}state(t,e=!1){if(super.state(t,e),t=nr.TYPESET))for(const t of this.math)t.detachSpeech(this);return this}done(){const t=Object.create(null,{done:{get:()=>super.done}});return nE(this,void 0,void 0,(function*(){var e;return yield null===(e=this.webworker)||void 0===e?void 0:e.Stop(),t.done.call(this)}))}},e.OPTIONS=Object.assign(Object.assign({},t.OPTIONS),{enableSpeech:!0,enableBraille:!0,speechError:(t,e,s)=>t.speechError(t,e,s),renderActions:Mi(Object.assign(Object.assign({},t.OPTIONS.renderActions),{attachSpeech:[nr.ATTACHSPEECH]})),worker:{path:rE(),maps:rE().replace(/[cm]js\/a11y\/sre$/,"bundle/sre/mathmaps"),worker:"speech-worker.js",debug:!1},a11y:Mi({speech:!0,braille:!0})}),e}function cE(t,e){return!t.documentClass.prototype.enrich&&e&&(t=Ub(t,e)),t.documentClass=aE(t.documentClass),t}if(or("ATTACHSPEECH",nr.INSERTED+10),MathJax.loader&&MathJax.loader.checkVersion("a11y/speech",ii,"a11y"),ci({_:{a11y:{speech_ts:Js,speech:{GeneratorPool:Vs,SpeechUtil:Xs,WebWorker:Gs}}}}),MathJax.loader){let t=pi.resolvePath("[sre]",!1),e=pi.resolvePath("[mathmaps]",!1);if(hi)t=new URL(t,location).href,e=new URL(e,location).href;else{const s="undefined"!=typeof require?require:MathJax.config.loader.require;s?.resolve?(t=s.resolve(`${t}/require.mjs`).replace(/\/[^\/]*$/,""),e=s.resolve(`${e}/base.json`).replace(/\/[^\/]*$/,"")):t=e=""}t&&ai(MathJax.config,"options",{worker:{path:t,maps:e}})}MathJax.startup&&MathJax.startup.extendHandler((t=>cE(t)));const lE={red:{red:255,green:0,blue:0},green:{red:0,green:255,blue:0},blue:{red:0,green:0,blue:255},yellow:{red:255,green:255,blue:0},cyan:{red:0,green:255,blue:255},magenta:{red:255,green:0,blue:255},white:{red:255,green:255,blue:255},black:{red:0,green:0,blue:0}};function hE(t,e){var s;const i=lE[t.color]||lE[e.color];return i.alpha=null!==(s=t.alpha)&&void 0!==s?s:e.alpha,function(t){var e;return`rgba(${t.red},${t.green},${t.blue},${null!==(e=t.alpha)&&void 0!==e?e:1})`}(i)}const dE={color:"blue",alpha:1},uE={color:"black",alpha:1};let pE=0;class mE{constructor(){this.counter=pE++,this.ATTR="sre-highlight-"+this.counter.toString(),this.mactionName="",this.currentHighlights=[]}highlight(t){this.currentHighlights.push(t.map((t=>{const e=this.highlightNode(t);return this.setHighlighted(t),e})))}highlightAll(t){const e=this.getMactionNodes(t);for(let t,s=0;t=e[s];s++)this.highlight([t])}unhighlight(){const t=this.currentHighlights.pop();t&&t.forEach((t=>{this.isHighlighted(t.node)&&(this.unhighlightNode(t),this.unsetHighlighted(t.node))}))}unhighlightAll(){for(;this.currentHighlights.length>0;)this.unhighlight()}setColor(t,e){this._foreground=hE(e,uE),this._background=hE(t,dE)}get foreground(){return this._foreground}get background(){return this._background}getMactionNodes(t){return Array.from(t.getElementsByClassName(this.mactionName))}isMactionNode(t){const e=t.className||t.getAttribute("class");return!!e&&!!e.match(new RegExp(this.mactionName))}isHighlighted(t){return t.hasAttribute(this.ATTR)}setHighlighted(t){t.setAttribute(this.ATTR,"true")}unsetHighlighted(t){t.removeAttribute(this.ATTR)}}class fE extends mE{constructor(){super(),this.mactionName="mjx-maction"}highlightNode(t){const e={node:t,background:t.style.backgroundColor,foreground:t.style.color};return this.isHighlighted(t)||(t.style.backgroundColor=this.background,t.style.color=this.foreground),e}unhighlightNode(t){t.node.style.backgroundColor=t.background,t.node.style.color=t.foreground}isMactionNode(t){var e;return(null===(e=t.tagName)||void 0===e?void 0:e.toUpperCase())===this.mactionName.toUpperCase()}getMactionNodes(t){return Array.from(t.getElementsByTagName(this.mactionName))}}function gE(t,e,s){const i=new bE[s];return i.setColor(t,e),i}const bE={SVG:class extends mE{constructor(){super(),this.mactionName="maction"}highlightNode(t){let e;if(this.isHighlighted(t))return e={node:t,background:this.background,foreground:this.foreground},e;if("svg"===t.tagName||"MJX-CONTAINER"===t.tagName)return e={node:t,background:t.style.backgroundColor,foreground:t.style.color},t.style.backgroundColor=this.background,t.style.color=this.foreground,e;const s=document.createElementNS("http://www.w3.org/2000/svg","rect");s.setAttribute("sre-highlighter-added","true");const i=t.getBBox();s.setAttribute("x",(i.x-40).toString()),s.setAttribute("y",(i.y-40).toString()),s.setAttribute("width",(i.width+80).toString()),s.setAttribute("height",(i.height+80).toString());const r=t.getAttribute("transform");return r&&s.setAttribute("transform",r),s.setAttribute("fill",this.background),t.setAttribute(this.ATTR,"true"),t.parentNode.insertBefore(s,t),e={node:t,foreground:t.getAttribute("fill")},"rect"!==t.nodeName&&t.setAttribute("fill",this.foreground),e}setHighlighted(t){"svg"===t.tagName&&super.setHighlighted(t)}unhighlightNode(t){const e=t.node.previousSibling;if(e&&e.hasAttribute("sre-highlighter-added"))return t.foreground?t.node.setAttribute("fill",t.foreground):t.node.removeAttribute("fill"),void t.node.parentNode.removeChild(e);t.node.style.backgroundColor=t.background,t.node.style.color=t.foreground}isMactionNode(t){return t.getAttribute("data-mml-node")===this.mactionName}getMactionNodes(t){return Array.from(t.querySelectorAll(`[data-mml-node="${this.mactionName}"]`))}},CHTML:fE,generic:fE};class EE{constructor(t){this.document=t,this.CLASS=this.constructor,this.AddStyles()}AddStyles(){if(this.CLASS.styleAdded)return;const t=this.document.adaptor.node("style");t.innerHTML=this.CLASS.style.cssText,this.document.adaptor.head(this.document.adaptor.document).appendChild(t),this.CLASS.styleAdded=!0}AddElement(){if(this.div)return;const t=this.document.adaptor.node("div");t.classList.add(this.CLASS.className),this.div=t,this.inner=this.document.adaptor.node("div"),this.div.appendChild(this.inner),this.document.adaptor.body(this.document.adaptor.document).appendChild(this.div)}Show(t,e){this.AddElement(),this.position(t),this.highlight(e),this.div.classList.add(this.CLASS.className+"_Show")}Hide(){this.div&&(this.div.parentNode.removeChild(this.div),this.div=null,this.inner=null)}stackRegions(t){const e=t.getBoundingClientRect();let s=0,i=Number.POSITIVE_INFINITY;const r=this.document.adaptor.document.getElementsByClassName(this.CLASS.className+"_Show");for(let t,e=0;t=r[e];e++)t!==this.div&&(s=Math.max(t.getBoundingClientRect().bottom,s),i=Math.min(t.getBoundingClientRect().left,i));const n=(s||e.bottom+10)+window.scrollY,o=(i div"]:{"border-radius":"inherit",padding:"0 2px"}});class vE extends yE{}vE.className="MJX_LiveRegion",vE.style=new To({["."+vE.className]:{position:"absolute",top:0,display:"none",width:"auto",height:"auto",padding:0,opacity:1,"z-index":"202",left:0,right:0,margin:"0 auto","background-color":"white","box-shadow":"0px 5px 20px #888",border:"2px solid #CCCCCC"},["."+vE.className+"_Show"]:{display:"block"}});class CE extends vE{constructor(){super(...arguments),this.active=!1,this.node=null,this.clear=!1,this.highlighter=gE({color:"red"},{color:"black"},this.document.outputJax.name),this.voiceRequest=!1,this.voiceCancelled=!1}Show(t,e){super.Update("\xa0"),this.node=t,super.Show(t,e)}Update(t){if(this.voiceRequest)return void this.makeVoice(t);speechSynthesis.onvoiceschanged=(()=>this.voiceRequest=!0).bind(this);new Promise((t=>{setTimeout((()=>{this.voiceRequest?t(!0):setTimeout((()=>{this.voiceRequest=!0,t(!0)}),100)}),100)})).then((()=>this.makeVoice(t)))}makeVoice(t){this.active=this.document.options.a11y.voicing&&!!speechSynthesis.getVoices().length,speechSynthesis.cancel(),this.clear=!0;const[e,s]=Kb(t,this.document.options.sre.locale,this.document.options.sre.rate);super.Update(e),this.active&&e&&this.makeUtterances(s,this.document.options.sre.locale)}makeUtterances(t,e){this.voiceCancelled=!1;let s=null;for(const i of t)if(i.mark){if(!s){this.highlightNode(i.mark,!0);continue}s.addEventListener("end",(t=>{this.voiceCancelled||this.highlightNode(i.mark)}))}else if(i.pause){const t=parseInt(i.pause.match(/^[0-9]+/)[0]);if(isNaN(t)||!s)continue;s.addEventListener("end",(e=>{speechSynthesis.pause(),setTimeout((()=>{speechSynthesis.resume()}),t)}))}else s=new SpeechSynthesisUtterance(i.text),i.rate&&(s.rate=i.rate),i.pitch&&(s.pitch=i.pitch),s.lang=e,speechSynthesis.speak(s);s&&s.addEventListener("end",(t=>{this.highlighter.unhighlight()}))}Hide(){this.cancelVoice(),super.Hide()}cancelVoice(){this.voiceCancelled=!0,speechSynthesis.cancel(),this.highlighter.unhighlight()}highlightNode(t,e=!1){this.highlighter.unhighlight();const s=Array.from(this.node.querySelectorAll(`[data-semantic-id="${t}"]`));this.clear&&!e||this.highlighter.highlight(s),this.clear=!1}}class TE extends EE{position(t){const e=t.getBoundingClientRect(),s=this.div.getBoundingClientRect();let i,r=e.left+e.width/2-s.width/2;switch(r=r<0?0:r,r+=window.scrollX,this.document.options.a11y.align){case"top":i=e.top-s.height-10;break;case"bottom":i=e.bottom+10;break;default:i=e.top+e.height/2-s.height/2}i+=window.scrollY,i=i<0?0:i,this.div.style.top=i+"px",this.div.style.left=r+"px"}highlight(t){this.div&&(this.inner.firstChild&&!this.inner.firstChild.hasAttribute("sre-highlight")||(this.inner.style.backgroundColor=t.background,this.inner.style.color=t.foreground))}Show(t,e){this.AddElement(),this.div.style.fontSize=this.document.options.a11y.magnify,this.Update(t),super.Show(t,e)}Clear(){this.div&&(this.inner.textContent="",this.inner.style.top="",this.inner.style.backgroundColor="")}Update(t){if(!this.div)return;this.Clear();const e=this.cloneNode(t),s=e.querySelector("[data-mjx-clone]");this.inner.style.backgroundColor=t.style.backgroundColor,s.style.backgroundColor="",s.classList.remove("mjx-selected"),this.inner.appendChild(e),this.position(t)}cloneNode(t){let e=t.cloneNode(!0);if(e.setAttribute("data-mjx-clone","true"),"MJX-CONTAINER"!==e.nodeName){"g"!==e.nodeName&&(e.style.marginLeft=e.style.marginRight="0");let s=t;for(;s&&"MJX-CONTAINER"!==s.nodeName;)s=s.parentNode;if("MJX-MATH"!==e.nodeName&&"svg"!==e.nodeName){if(e=s.firstChild.cloneNode(!1).appendChild(e).parentNode,"svg"===e.nodeName){e.firstChild.setAttribute("transform","matrix(1 0 0 -1 0 0)");const i=parseFloat(e.getAttribute("viewBox").split(/ /)[2]),r=parseFloat(e.getAttribute("width")),{x:n,y:o,width:a,height:c}=t.getBBox();e.setAttribute("viewBox",[n,-(o+c),a,c].join(" ")),e.removeAttribute("style"),e.setAttribute("width",r/i*a+"ex"),e.setAttribute("height",r/i*c+"ex"),s.setAttribute("sre-highlight","false")}}e=s.cloneNode(!1).appendChild(e).parentNode,e.style.margin="0"}return e}}TE.className="MJX_HoverRegion",TE.style=new To({["."+TE.className]:{display:"block",position:"absolute",width:"max-content",height:"auto",padding:0,opacity:1,"z-index":"202",margin:"0 auto","background-color":"white","line-height":0,"box-shadow":"0px 10px 20px #888",border:"2px solid #CCCCCC"},["."+TE.className+" > div"]:{overflow:"hidden"}});class _E{get highlighter(){return this.pool.highlighter}static stopEvent(t){t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopImmediatePropagation?t.stopImmediatePropagation():t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0}static create(t,e,s,i,...r){return new this(t,e,s,i,...r)}constructor(t,e,s,i,...r){this.document=t,this.pool=e,this.region=s,this.node=i,this.stoppable=!0,this.events=[],this._active=!1}Events(){return this.events}get active(){return this._active}set active(t){this._active=t}Attach(){this.AddEvents()}Detach(){this.RemoveEvents()}Start(){this.active=!0}Stop(){this.active&&(this.region.Clear(),this.region.Hide(),this.active=!1)}AddEvents(){for(const[t,e]of this.events)this.node.addEventListener(t,e)}RemoveEvents(){for(const[t,e]of this.events)this.node.removeEventListener(t,e)}Update(t=!1){}stopEvent(t){this.stoppable&&_E.stopEvent(t)}}var wE=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};const kE="[data-speech-node]";function AE(t){return t.matches("mjx-container")}function ME(t,e=!0){return t.shiftKey&&e||t.metaKey||t.altKey||t.ctrlKey}const LE=new Map([["MacOS",["on MacOS and iOS using VoiceOver",", or the VoiceOver arrow keys to select an expression"]],["Windows",["in Windows using NVDA or JAWS",". The screen reader should enter focus or forms mode automatically\nwhen the expression gets the browser focus, but if not, you can toggle\nfocus mode using NVDA+space in NVDA; for JAWS, Enter should start\nforms mode while Numpad Plus leaves it. Also note that you can use\nthe NVDA or JAWS key plus the arrow keys to explore the expression\neven in browse mode, and you can use NVDA+shift+arrow keys to\nnavigate out of an expression that has the focus in NVDA"]],["Unix",["in Unix using Orca",", and Orca should enter focus mode automatically. If not, use the\nOrca+a key to toggle focus mode on or off. Also note that you can use\nOrca+arrow keys to explore expressions even in browse mode"]],["unknown",["with a Screen Reader.",""]]]);class IE extends _E{get generators(){var t;return null===(t=this.item)||void 0===t?void 0:t.generatorPool}get role(){return this.item.ariaRole}get description(){return this.item.roleDescription}get none(){return this.item.none}FocusIn(t){this.item.outputData.nofocus?this.item.outputData.nofocus=!1:(this.clicked||this.Start(),this.clicked=null)}FocusOut(t){this.current&&!this.focusSpeech&&(this.setCurrent(null),this.Stop(),document.hasFocus()||this.focusTop())}KeyDown(t){if(this.pendingIndex.shift(),this.region.cancelVoice(),ME(t,!1))return;const e=this.constructor,s=1===t.key.length?t.key.toLowerCase():t.key,[i,r]=e.keyMap.get(s)||[],n=i?void 0===r||this.active?i(this,t):r:this.undefinedKey(t);n||(this.stopEvent(t),!1===n&&this.sound&&this.NoMove())}MouseDown(t){var e;if(this.pendingIndex=[],this.region.cancelVoice(),ME(t)||2===t.buttons)return void(this.item.outputData.nofocus=!0);const s=this.findClicked(t.target,t.x,t.y);s!==this.document.infoIcon?(null===(e=document.getSelection())||void 0===e||e.removeAllRanges(),t.target.getAttribute("sre-highlighter-added")?this.refocus=s:this.clicked=s):this.stopEvent(t)}Click(t){if(ME(t)||2===t.buttons||"Range"===document.getSelection().type)return void this.FocusOut(null);const e=this.findClicked(t.target,t.x,t.y);if(e===this.document.infoIcon)return this.stopEvent(t),void this.help();e&&!this.node.contains(e)||(this.stopEvent(t),this.refocus=e,this.triggerLinkMouse()||this.Start())}DblClick(t){var e;const s=null!==(e=document.getSelection().direction)&&void 0!==e?e:"none";ME(t)||2===t.buttons||"none"!==s?this.FocusOut(null):(this.stopEvent(t),this.refocus=this.rootNode(),this.Start())}spaceKey(){return this.refocus=this.current,!0}hKey(){this.refocus=this.current,this.help()}escapeKey(){return this.Stop(),this.focusTop(),!0}enterKey(t){if(this.active)if(this.triggerLinkKeyboard(t))this.Stop();else{const t=this.actionable(this.current);if(!t)return!1;this.refocus=t,t.dispatchEvent(new Event("click"))}else this.Start()}homeKey(){this.setCurrent(this.rootNode())}moveDown(t){return t?this.moveToNeighborCell(1,0):this.moveTo(this.firstNode(this.current))}moveUp(t){return t?this.moveToNeighborCell(-1,0):this.moveTo(this.getParent(this.current))}moveRight(t){return t?this.moveToNeighborCell(0,1):this.moveTo(this.nextSibling(this.current))}moveLeft(t){return t?this.moveToNeighborCell(0,-1):this.moveTo(this.prevSibling(this.current))}moveTo(t){if(!t)return!1;this.setCurrent(t)}moveToNeighborCell(t,e){const s=this.tableCell(this.current);if(!s)return!1;const[i,r]=this.cellPosition(s);if(null==i)return!1;const n=this.cellAt(this.cellTable(s),i+t,r+e);if(!n)return!1;this.setCurrent(n)}undefinedKey(t){return!this.active||ME(t)}addMark(){this.current===this.marks[this.marks.length-1]?this.setCurrent(this.current):(this.currentMark=this.marks.length-1,this.marks.push(this.current),this.speak("Position marked"))}prevMark(){if(this.currentMark<0){if(0===this.marks.length)return void this.setCurrent(this.lastMark||this.rootNode());this.currentMark=this.marks.length-1}const t=this.currentMark;this.setCurrent(this.marks[t]),this.currentMark=t-1}clearMarks(){this.marks=[],this.currentMark=-1,this.prevMark()}autoVoice(){const t=!this.document.options.a11y.voicing;this.document.menu?this.document.menu.menu.pool.lookup("voicing").setValue(t):this.document.options.a11y.voicing=t,this.Update()}numberKey(t){if(!this.tableCell(this.current))return!1;if(0===t&&(t=10),this.pendingIndex.length){const e=this.cellTable(this.tableCell(this.current)),s=this.cellAt(e,this.pendingIndex[0]-1,t-1);if(this.pendingIndex=[],this.speak(String(t)),!s)return!1;setTimeout((()=>this.setCurrent(s)),500)}else this.pendingIndex=[null,t],this.speak(`Jump to row ${t} and column`)}depth(){var t,e,s;if("d"===this.speechType)return void this.setCurrent(this.current);this.speechType="d";const i=[[null!==(t=this.node.getAttribute("data-semantic-level"))&&void 0!==t?t:"Level",null!==(e=this.current.getAttribute("aria-level"))&&void 0!==e?e:"0"].join(" ").trim()],r=this.actionable(this.current);r&&i.unshift(null!==(s=this.node.getAttribute("1"===r.getAttribute("toggle")?"data-semantic-expandable":"data-semantic-collapsible"))&&void 0!==s?s:""),this.speak(i.join(" "),this.current.getAttribute(Qb.BRAILLE))}summary(){if("x"===this.speechType)return void this.setCurrent(this.current);this.speechType="x";const t=this.current.getAttribute(Qb.SUMMARY);this.speak(t,this.current.getAttribute(Qb.BRAILLE),this.SsmlAttributes(this.current,Qb.SUMMARY_SSML))}nextRules(){this.node.removeAttribute("data-speech-attached"),this.restartAfter(this.generators.nextRules(this.item))}nextStyle(){this.node.removeAttribute("data-speech-attached"),this.restartAfter(this.generators.nextStyle(this.current,this.item))}details(){const t=this.actionable(this.current);if(!t||!t.getAttribute("data-collapsible")||"1"!==t.getAttribute("toggle")||"z"===this.speechType)return void this.setCurrent(this.current);this.speechType="z";const e=this.nodeId(this.current);let s;this.item.root.walkTree((t=>{t.attributes.get("data-semantic-id")===e&&(s=t)}));let i=this.item.toMathML(s,this.item);s.isKind("math")||(i=`${i} `),i=i.replace(/ (?:data-semantic-|aria-|data-speech-|data-latex).*?=".*?"/g,""),this.item.speechFor(i).then((([t,e])=>this.speak(t,e)))}help(){const t=this.document.adaptor,e=t.node("mjx-help-background"),s=t=>{e.remove(),this.node.focus(),this.stopEvent(t)};e.addEventListener("click",s);const i=t.node("mjx-help-sizer",{},[t.node("mjx-help-dialog",{tabindex:0,role:"dialog","aria-labeledby":"mjx-help-label"},[t.node("h1",{id:"mjx-help-label"},[t.text("MathJax Expression Explorer Help")]),t.node("div"),t.node("input",{type:"button",value:"Close"})])]);e.append(i);const r=i.firstChild;r.addEventListener("click",(t=>this.stopEvent(t))),r.lastChild.addEventListener("click",s),r.addEventListener("keydown",(t=>{"Escape"===t.code&&s(t)}));const[n,o]=LE.get(di.os);r.childNodes[1].innerHTML=function(t,e){return`\nExploring expressions ${t} \n\nThe mathematics on this page is being rendered by MathJax , which\ngenerates both the text spoken by screen readers, as well as the\nvisual layout for sighted users.
\n\nExpressions typeset by MathJax can be explored interactively, and\nare focusable. You can use the Tab key to move to a typeset\nexpression${e}. Initially, the expression will be read in full,\nbut you can use the following keys to explore the expression\nfurther:
\n\n
\n\nDown Arrow moves one level deeper into the expression to\nallow you to explore the current subexpression term by term. \n\nUp Arrow moves back up a level within the expression. \n\nRight Arrow moves to the next term in the current\nsubexpression. \n\nLeft Arrow moves to the next term in the current\nsubexpression. \n\nShift +Arrow moves to a neighboring cell within a table.\n\n0-9 +0-9 jumps to a cell by its index in the table, where 0 = 10.\n\nHome takes you to the top of the expression. \n\nEnter or Return clicks a link or activates an active\nsubexpression. \n\nSpace opens the MathJax contextual menu where you can view\nor copy the source format of the expression, or modify MathJax's\nsettings. \n\nEscape exits the expression explorer. \n\nx gives a summary of the current subexpression. \n\nz gives the full text of a collapsed expression. \n\nd gives the current depth within the expression. \n\ns starts or stops auto-voicing with synchronized highlighting. \n\nv marks the current position in the expression. \n\np cycles through the marked positions in the expression. \n\nu clears all marked positions and returns to the starting position. \n\n> cycles through the available speech rule sets\n(MathSpeak, ClearSpeak). \n\n< cycles through the verbosity levels for the current\nrule set. \n\nh produces this help listing. \n \n\nThe MathJax contextual menu allows you to enable or disable speech\nor Braille generation for mathematical expressions, the language to\nuse for the spoken mathematics, and other features of MathJax. In\nparticular, the Explorer submenu allows you to specify how the\nmathematics should be identified in the page (e.g., by saying "math"\nwhen the expression is spoken), and whether or not to include a\nmessage about the letter "h" bringing up this dialog box.
\n\nThe contextual menu also provides options for viewing or copying a\nMathML version of the expression or its original source format,\ncreating an SVG version of the expression, and viewing various other\ninformation.
\n\nFor more help, see the MathJax accessibility documentation.
\n`}(n,o),document.body.append(e),r.focus()}setCurrent(t,e=!1){if(this.speechType="",document.hasFocus()||(this.refocus=this.current),this.node.setAttribute("aria-busy","true"),this.current){for(const t of this.getSplitNodes(this.current))t.classList.remove("mjx-selected");this.pool.unhighlight(),"last"===this.document.options.a11y.tabSelects&&(this.refocus=this.current),t||(this.lastMark=this.current,this.removeSpeech()),this.current=null}if(this.current=t,this.currentMark=-1,this.current){const s=this.getSplitNodes(this.current);for(const t of s)t.classList.add("mjx-selected");this.pool.highlight(s),this.addSpeech(t,e)}this.node.removeAttribute("aria-busy")}getSplitNodes(t){const e=this.nodeId(t);return e?Array.from(this.node.querySelectorAll(`[data-semantic-id="${e}"]`)):[t]}addSpeech(t,e){var s;null===(s=this.img)||void 0===s||s.remove();let i=[t.getAttribute(Qb.PREFIX),t.getAttribute(Qb.SPEECH),t.getAttribute(Qb.POSTFIX)].join(" ").trim();if(e){let t=this.description===this.none?"":", "+this.description;this.document.options.a11y.help&&(t+=", press h for help"),i+=t}this.speak(i,t.getAttribute(Qb.BRAILLE),this.SsmlAttributes(t,Qb.SPEECH_SSML)),this.node.setAttribute("tabindex","-1")}removeSpeech(){this.speech&&(this.speech.remove(),this.speech=null,this.img&&this.node.append(this.img),this.node.setAttribute("tabindex","0"))}speak(t,e="",s=null,i=this.none){const r=this.speech;this.speech=document.createElement("mjx-speech"),this.speech.setAttribute("role",this.role),this.speech.setAttribute("aria-label",t),this.speech.setAttribute(Qb.SPEECH,t),s&&(this.speech.setAttribute(Qb.PREFIX_SSML,s[0]||""),this.speech.setAttribute(Qb.SPEECH_SSML,s[1]||""),this.speech.setAttribute(Qb.POSTFIX_SSML,s[2]||"")),e&&this.speech.setAttribute("aria-braillelabel",e),this.speech.setAttribute("aria-roledescription",i),this.speech.setAttribute("tabindex","0"),this.node.append(this.speech),this.focusSpeech=!0,this.speech.focus(),this.focusSpeech=!1,this.Update(),r&&setTimeout((()=>r.remove()),100)}attachSpeech(){var t;const e=this.item,s=this.node;if(!s.hasAttribute("has-speech")){for(const t of Array.from(s.childNodes))t.setAttribute("aria-hidden","true");s.setAttribute("has-speech","true")}const i=e.roleDescription,r=(s.getAttribute(Qb.SPEECH)||"")+(i?", "+i:"");null===(t=this.img)||void 0===t||t.remove(),this.img=this.document.adaptor.node("mjx-speech",{"aria-label":r,role:"img","aria-roledescription":e.none}),s.appendChild(this.img)}detachSpeech(){var t;const e=this.node;null===(t=this.img)||void 0===t||t.remove(),e.removeAttribute("has-speech");for(const t of Array.from(e.childNodes))t.removeAttribute("aria-hidden")}focus(){this.node.focus()}nodeId(t){return t.getAttribute("data-semantic-id")}parentId(t){return t.getAttribute("data-semantic-parent")}getNode(t){return t?this.node.querySelector(`[data-semantic-id="${t}"]`):null}getParent(t){return this.getNode(this.parentId(t))}childArray(t){return t?t.getAttribute("data-semantic-children").split(/,/):[]}isCell(t){return!!t&&this.cellTypes.includes(t.getAttribute("data-semantic-type"))}isRow(t){return!!t&&"row"===t.getAttribute("data-semantic-type")}tableCell(t){for(;t&&t!==this.node;){if(this.isCell(t))return t;t=t.parentNode}return null}cellTable(t){const e=this.getParent(t);return this.isRow(e)?this.getParent(e):e}cellPosition(t){const e=this.getParent(t),s=this.childArray(e).indexOf(this.nodeId(t));if(!this.isRow(e))return[s,1];const i=this.getParent(e);return[this.childArray(i).indexOf(this.nodeId(e)),s]}cellAt(t,e,s){const i=this.getNode(this.childArray(t)[e]);if(!this.isRow(i))return 1===s?i:null;return this.getNode(this.childArray(i)[s])}firstNode(t){const e=t.getAttribute("data-semantic-owns");if(!e)return t.querySelector(kE);const s=e.split(/ /);for(const t of s){const e=this.getNode(t);if(null==e?void 0:e.hasAttribute("data-speech-node"))return e}return t.querySelector(kE)}rootNode(){const t=this.node.querySelector("[data-semantic-structure]");if(!t)return this.node.querySelector(kE);const e=t.getAttribute("data-semantic-structure").split(/ /)[0].replace("(","");return this.getNode(e)}nextSibling(t){var e;const s=this.parentId(t);if(!s)return null;const i=null===(e=this.getNode(s).getAttribute("data-semantic-owns"))||void 0===e?void 0:e.split(/ /);if(!i)return null;let r,n=i.indexOf(this.nodeId(t));do{r=this.getNode(i[++n])}while(r&&!r.hasAttribute("data-speech-node"));return r}prevSibling(t){var e;const s=this.parentId(t);if(!s)return null;const i=null===(e=this.getNode(s).getAttribute("data-semantic-owns"))||void 0===e?void 0:e.split(/ /);if(!i)return null;let r,n=i.indexOf(this.nodeId(t));do{r=this.getNode(i[--n])}while(r&&!r.hasAttribute("data-speech-node"));return r}findClicked(t,e,s){const i=this.document.infoIcon;if(i===t||i.contains(t))return i;if("SVG"!==this.node.getAttribute("jax"))return t.closest(kE);let r=null,n=this.node;for(;n;){n.matches(kE)&&(r=n);const t=Array.from(n.childNodes);n=null;for(const i of t)if(i!==this.speech&&i!==this.img&&"rect"!==i.tagName.toLowerCase()){const{left:t,right:r,top:o,bottom:a}=i.getBoundingClientRect();if(t<=e&&e<=r&&o<=s&&s<=a){n=i;break}}}return r}focusTop(){this.focusSpeech=!0,this.node.focus(),this.focusSpeech=!1}SsmlAttributes(t,e){return[t.getAttribute(Qb.PREFIX_SSML),t.getAttribute(e),t.getAttribute(Qb.POSTFIX_SSML)]}restartAfter(t){return wE(this,void 0,void 0,(function*(){yield t,this.attachSpeech();const e=this.current;this.current=null,this.pool.unhighlight(),this.setCurrent(e)}))}constructor(t,e,s,i,r,n,o,a){super(t,e,null,i),this.document=t,this.pool=e,this.region=s,this.node=i,this.brailleRegion=r,this.magnifyRegion=n,this.item=a,this.sound=!1,this.current=null,this.clicked=null,this.refocus=null,this.focusSpeech=!1,this.restarted=null,this.speech=null,this.speechType="",this.img=null,this.attached=!1,this.eventsAttached=!1,this.marks=[],this.currentMark=-1,this.lastMark=null,this.pendingIndex=[],this.cellTypes=["cell","line"],this.events=super.Events().concat([["focusin",this.FocusIn.bind(this)],["focusout",this.FocusOut.bind(this)],["keydown",this.KeyDown.bind(this)],["mousedown",this.MouseDown.bind(this)],["click",this.Click.bind(this)],["dblclick",this.DblClick.bind(this)]])}findStartNode(){let t=this.refocus||this.current;return!t&&this.restarted&&(t=this.node.querySelector(this.restarted)),this.refocus=this.restarted=null,t}Start(){const t=Object.create(null,{Start:{get:()=>super.Start}});return wE(this,void 0,void 0,(function*(){if(!this.attached||this.active)return;if(this.document.activeItem=this.item,this.item.state()this.FocusOut(null)),50),!0;t=t.parentNode}return!1}triggerLinkMouse(){let t=this.refocus;for(;t&&t!==this.node;){if(this.triggerLink(t))return!0;t=t.parentNode}return!1}semanticFocus(){const t=[];let e="data-semantic-id",s=this.current||this.refocus||this.node;const i=this.actionable(s);i&&(e=i.hasAttribute("data-maction-id")?"data-maction-id":"id",s=i,t.push(kE));const r=s.getAttribute(e);return r&&t.unshift(`[${e}="${r}"]`),t.join(" ")}}IE.keyMap=new Map([["Tab",[()=>!0]],["Escape",[t=>t.escapeKey()]],["Enter",[(t,e)=>t.enterKey(e)]],["Home",[t=>t.homeKey()]],["ArrowDown",[(t,e)=>t.moveDown(e.shiftKey),!0]],["ArrowUp",[(t,e)=>t.moveUp(e.shiftKey),!0]],["ArrowLeft",[(t,e)=>t.moveLeft(e.shiftKey),!0]],["ArrowRight",[(t,e)=>t.moveRight(e.shiftKey),!0]],[" ",[t=>t.spaceKey()]],["h",[t=>t.hKey()]],[">",[t=>t.nextRules(),!1]],["<",[t=>t.nextStyle(),!1]],["x",[t=>t.summary(),!1]],["z",[t=>t.details(),!1]],["d",[t=>t.depth(),!1]],["v",[t=>t.addMark(),!1]],["p",[t=>t.prevMark(),!1]],["u",[t=>t.clearMarks(),!1]],["s",[t=>t.autoVoice(),!1]],...[..."0123456789"].map((t=>[t,[e=>e.numberKey(parseInt(t)),!1]]))]);class SE extends _E{constructor(){super(...arguments),this.events=super.Events().concat([["mouseover",this.MouseOver.bind(this)],["mouseout",this.MouseOut.bind(this)]])}MouseOver(t){this.Start()}MouseOut(t){this.Stop()}}class RE extends SE{constructor(t,e,s,i,r,n){super(t,e,s,i),this.document=t,this.pool=e,this.region=s,this.node=i,this.nodeQuery=r,this.nodeAccess=n}MouseOut(t){this.highlighter.unhighlight(),this.region.Hide(),super.MouseOut(t)}MouseOver(t){super.MouseOver(t);const e=t.target,[s,i]=this.getNode(e);s&&(this.highlighter.unhighlight(),this.highlighter.highlight([s]),this.region.Update(i),this.region.Show(s,this.highlighter))}getNode(t){const e=t;for(;t&&t!==this.node;){if(this.nodeQuery(t))return[t,this.nodeAccess(t)];t=t.parentNode}for(t=e;t;){if(this.nodeQuery(t))return[t,this.nodeAccess(t)];const e=t.childNodes[0];t=e&&"defs"===e.tagName?t.childNodes[1]:e}return[null,null]}}class OE extends RE{}class DE extends RE{}class PE extends RE{constructor(t,e,s,i){super(t,e,new NE(t),i,(t=>this.highlighter.isMactionNode(t)),(()=>{})),this.document=t,this.pool=e,this.node=i}}class BE extends _E{constructor(t,e,s,i,r){super(t,e,null,i),this.document=t,this.pool=e,this.region=s,this.node=i,this.mml=r,this.stoppable=!1}Attach(){super.Attach(),this.Start()}Detach(){this.Stop(),super.Detach()}}class FE extends BE{Start(){this.active||(this.active=!0,this.highlighter.highlightAll(this.node))}Stop(){this.active&&this.highlighter.unhighlightAll(),this.active=!1}}class jE extends BE{constructor(){super(...arguments),this.contrast=new UE,this.leaves=[],this.modality="data-semantic-foreground"}Start(){this.active||(this.active=!0,this.node.hasAttribute("hasforegroundcolor")||(this.colorLeaves(),this.node.setAttribute("hasforegroundcolor","true")),this.leaves.forEach((t=>this.colorize(t))))}Stop(){this.active&&this.leaves.forEach((t=>this.uncolorize(t))),this.active=!1}colorLeaves(){this.leaves=Array.from(this.node.querySelectorAll("[data-semantic-id]:not([data-semantic-children])"));for(const t of this.leaves)t.setAttribute(this.modality,this.contrast.generate()),this.contrast.increment()}colorize(t){t.hasAttribute(this.modality)&&(t.setAttribute(this.modality+"-old",t.style.color),t.style.color=t.getAttribute(this.modality))}uncolorize(t){const e=this.modality+"-old";t.hasAttribute(e)&&(t.style.color=t.getAttribute(e))}}class UE{constructor(){this.hue=10,this.sat=100,this.light=50,this.incr=53}generate(){return UE.hsl2rgb(this.hue,this.sat,this.light)}increment(){this.hue=(this.hue+this.incr)%360}static hsl2rgb(t,e,s){e=e>1?e/100:e,s=s>1?s/100:s;const i=(1-Math.abs(2*s-1))*e,r=i*(1-Math.abs(t/60%2-1)),n=s-i/2;let o=0,a=0,c=0;return 0<=t&&t<60?[o,a,c]=[i,r,0]:60<=t&&t<120?[o,a,c]=[r,i,0]:120<=t&&t<180?[o,a,c]=[0,i,r]:180<=t&&t<240?[o,a,c]=[0,r,i]:240<=t&&t<300?[o,a,c]=[r,0,i]:300<=t&&t<360&&([o,a,c]=[i,0,r]),`rgb(${255*(o+n)}, ${255*(a+n)}, ${255*(c+n)})`}}class qE{constructor(t){this.document=t,this.speechRegion=new CE(this.document),this.brailleRegion=new vE(this.document),this.magnifier=new TE(this.document),this.tooltip1=new xE(this.document),this.tooltip2=new xE(this.document),this.tooltip3=new xE(this.document)}}const HE={speech:(t,e,s,...i)=>{const r=IE.create(t,e,t.explorerRegions.speechRegion,s,t.explorerRegions.brailleRegion,t.explorerRegions.magnifier,i[0],i[1]);return r.sound=!0,r},mouseMagnifier:(t,e,s,...i)=>DE.create(t,e,t.explorerRegions.magnifier,s,(t=>t.hasAttribute("data-semantic-type")),(t=>t)),hover:(t,e,s,...i)=>PE.create(t,e,null,s),infoType:(t,e,s,...i)=>OE.create(t,e,t.explorerRegions.tooltip1,s,(t=>t.hasAttribute("data-semantic-type")),(t=>t.getAttribute("data-semantic-type"))),infoRole:(t,e,s,...i)=>OE.create(t,e,t.explorerRegions.tooltip2,s,(t=>t.hasAttribute("data-semantic-role")),(t=>t.getAttribute("data-semantic-role"))),infoPrefix:(t,e,s,...i)=>OE.create(t,e,t.explorerRegions.tooltip3,s,(t=>{var e;return null===(e=t.hasAttribute)||void 0===e?void 0:e.call(t,"data-semantic-prefix-none")}),(t=>{var e;return null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-semantic-prefix-none")})),flame:(t,e,s,...i)=>FE.create(t,e,null,s),treeColoring:(t,e,s,...i)=>jE.create(t,e,null,s,...i)};class WE{constructor(){this.explorers={},this.attached=[],this._restart=[],this.speechExplorerKeys=["speech","braille","keyMagnifier"]}get highlighter(){if(this._renderer!==this.document.outputJax.name)return this._renderer=this.document.outputJax.name,this.setPrimaryHighlighter(),this._highlighter;const[t,e]=this.colorOptions();return this._highlighter.setColor(e,t),this._highlighter}init(t,e,s,i){this.document=t,this.mml=s,this.node=e,this.setPrimaryHighlighter();for(const t of Object.keys(HE))this.explorers[t]=HE[t](this.document,this,this.node,this.mml,i);this.setSecondaryHighlighter(),this.attach()}attach(){this.attached=[];const t=[],e=this.document.options.a11y;for(const[s,i]of Object.entries(this.explorers))i instanceof IE?(i.stoppable=!1,t.unshift(i),this.speechExplorerKeys.some((t=>this.document.options.a11y[t]))?(i.Attach(),this.attached.push(s)):i.Detach()):e[s]||"speech"===s&&(e.braille||e.keyMagnifier)?(i.Attach(),this.attached.push(s)):i.Detach();for(const e of t)if(e.attached){e.stoppable=!0;break}}reattach(){for(const t of this.attached){const e=this.explorers[t];e.active&&(this._restart.push(t),e.Stop())}}restart(){this._restart.forEach((t=>{this.explorers[t].Start()})),this._restart=[]}setPrimaryHighlighter(){const[t,e]=this.colorOptions();this._highlighter=gE(e,t,this.document.outputJax.name)}setSecondaryHighlighter(){this.secondaryHighlighter=gE({color:"red"},{color:"black"},this.document.outputJax.name),this.speech.region.highlighter=this.secondaryHighlighter}highlight(t){this.highlighter.highlight(t)}unhighlight(){this.secondaryHighlighter.unhighlight(),this.highlighter.unhighlight()}get speech(){return this.explorers.speech}colorOptions(){const t=this.document.options.a11y;return[{color:t.foregroundColor.toLowerCase(),alpha:t.foregroundOpacity/100},{color:t.backgroundColor.toLowerCase(),alpha:t.backgroundOpacity/100}]}}const zE="Unix"===di.os;function XE(t,e){var s;return s=class extends t{constructor(){super(...arguments),this.refocus=null}get ariaRole(){return this.constructor.ariaRole}get roleDescription(){const t=this.constructor;return"none"===t.roleDescription?t.none:t.roleDescription}get none(){return this.constructor.none}attachSpeech(t){var e,s;super.attachSpeech(t),null===(s=null===(e=this.outputData.speechPromise)||void 0===e?void 0:e.then((()=>this.explorers.speech.attachSpeech())))||void 0===s||s.then((()=>{var t;(null===(t=this.explorers)||void 0===t?void 0:t.speech)&&(this.explorers.speech.restarted=this.refocus),this.refocus=null,this.explorers&&this.explorers.restart()}))}detachSpeech(t){super.detachSpeech(t),this.explorers.speech.detachSpeech()}explorable(t,s=!1){if(!(this.state()>=nr.EXPLORER)){if(!this.isEscaped&&(t.options.enableExplorer||s)){const s=this.typesetRoot,i=e(this.root);this.explorers||(this.explorers=new WE),this.explorers.init(t,s,i,this)}this.state(nr.EXPLORER)}}state(t=null,e=!1){if(tsetTimeout((()=>t.remove()),100)))}}},s.ariaRole=zE?"tree":"application",s.roleDescription="math",s.none="\x91",s}function VE(t){var e;return e=class extends t{constructor(...t){super(...t),this.explorerRegions=null,this.activeItem=null;const e=this.constructor.ProcessBits;e.has("explorer")||e.allocate("explorer");const s=new Kn(this.mmlFactory),i=this.options;i.a11y.speechRules||(i.a11y.speechRules=`${i.sre.domain}-${i.sre.style}`);const r=i.MathItem=XE(i.MathItem,(t=>s.visitTree(t)));r.roleDescription=i.roleDescription,this.explorerRegions=new qE(this),"addStyles"in this&&this.addStyles(this.constructor.speechStyles);const n=this.adaptor,o="http://www.w3.org/2000/svg";this.infoIcon=n.node("mjx-help",{},[n.node("svg",{viewBox:"0 0 18 18",xmlns:o,"aria-hidden":"true"},[n.node("circle",{stroke:"none"},[],o),n.node("circle",{},[],o),n.node("line",{x1:9,y1:9,x2:9,y2:13},[],o),n.node("line",{x1:9,y1:5.5,x2:9,y2:5.5},[],o)],o)]),this.tmpFocus=this.adaptor.node("mjx-focus",{tabIndex:0,style:{outline:"none",display:"block",position:"absolute",top:0,left:"-10px",width:"1px",height:"1px",overflow:"hidden"},role:r.ariaRole,"aria-label":r.none,"aria-roledescription":r.none})}explorable(){if(!this.processed.isSet("explorer")){if(this.options.enableExplorer)for(const t of this.math)t.explorable(this);this.processed.set("explorer")}return this}rerender(t){const e=this.activeItem,s=null==e?void 0:e.setTemporaryFocus(this);return super.rerender(t),null==e||e.clearTemporaryFocus(s),this}state(t,e=!1){return super.state(t,e),t mjx-help":{display:"none",position:"absolute",top:"-.33em",right:"-.5em",width:".6em",height:".6em",cursor:"pointer"},'mjx-container[display="true"] > mjx-help':{right:0},"mjx-help > svg":{stroke:"black",width:"100%",height:"100%"},"mjx-help > svg > circle":{"stroke-width":"1.5px",cx:"9px",cy:"9px",r:"9px",fill:"white"},"mjx-help > svg > circle:nth-child(2)":{fill:"rgba(0, 0, 255, 0.2)",r:"7px"},"mjx-help > svg > line":{"stroke-width":"2.5px","stroke-linecap":"round"},"mjx-help:hover > svg > circle:nth-child(2)":{fill:"white"},"mjx-container.mjx-explorer-active > mjx-help":{display:"inline-flex","align-items":"center"},"mjx-help-sizer":{position:"fixed",width:"40%","max-width":"30em",top:"3em",left:"50%"},"mjx-help-dialog":{position:"absolute",width:"200%",left:"-100%",border:"3px outset","border-radius":"15px",color:"black","background-color":"#DDDDDD","z-index":"301","text-align":"right","font-style":"normal","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal",float:"none","box-shadow":"0px 10px 20px #808080",outline:"none"},"mjx-help-dialog > h1":{"font-size":"24px","text-align":"center",margin:".5em 0"},"mjx-help-dialog > div":{margin:"0 1em",padding:"3px",overflow:"auto",height:"20em",border:"2px inset black","background-color":"white","text-align":"left"},"mjx-help-dialog > input":{margin:".5em 2em"},"mjx-help-dialog kbd":{display:"inline-block",padding:"3px 5px","font-size":"11px","line-height":"10px",color:"#444d56","vertical-align":"middle","background-color":"#fafbfc",border:"solid 1.5px #c6cbd1","border-bottom-color":"#959da5","border-radius":"3px","box-shadow":"inset -.5px -1px 0 #959da5"},"mjx-help-dialog ul":{"list-style-type":"none"},"mjx-help-dialog li":{"margin-bottom":".5em"},"mjx-help-background":{position:"fixed",top:0,left:0,right:0,bottom:0}},e}function GE(t,e=null){return t.documentClass.prototype.attachSpeech||(t=cE(t,e)),t.documentClass=VE(t.documentClass),t}function JE(t,e){var s;const i=rb();for(const s in e)void 0!==t.options.a11y[s]?KE(t,s,e[s]):void 0!==i[s]&&(t.options.sre[s]=e[s]);e.roleDescription&&(t.options.MathItem.roleDescription=e.roleDescription);for(const e of t.math)null===(s=null==e?void 0:e.explorers)||void 0===s||s.attach()}function KE(t,e,s){switch(e){case"speechRules":{const[e,i]=s.split("-");t.options.sre.domain=e,t.options.sre.style=i;break}case"magnification":switch(s){case"None":t.options.a11y.magnification=s,t.options.a11y.keyMagnifier=!1,t.options.a11y.mouseMagnifier=!1;break;case"Keyboard":t.options.a11y.magnification=s,t.options.a11y.keyMagnifier=!0,t.options.a11y.mouseMagnifier=!1;break;case"Mouse":t.options.a11y.magnification=s,t.options.a11y.keyMagnifier=!1,t.options.a11y.mouseMagnifier=!0}break;case"highlight":switch(s){case"None":t.options.a11y.highlight=s,t.options.a11y.hover=!1,t.options.a11y.flame=!1;break;case"Hover":t.options.a11y.highlight=s,t.options.a11y.hover=!0,t.options.a11y.flame=!1;break;case"Flame":t.options.a11y.highlight=s,t.options.a11y.hover=!1,t.options.a11y.flame=!0}break;case"locale":t.options.sre.locale=s;break;default:t.options.a11y[e]=s}}or("EXPLORER",nr.INSERTED+30),MathJax.loader&&MathJax.loader.checkVersion("a11y/explorer",ii,"a11y"),ci({_:{a11y:{explorer_ts:si,explorer:{Explorer:Ys,ExplorerPool:ei,Highlighter:Ks,KeyExplorer:Qs,MouseExplorer:Zs,Region:$s,TreeExplorer:ti}}}}),MathJax.startup&&hi&&MathJax.startup.extendHandler((t=>GE(t))),yi.preLoaded("a11y/sre","a11y/semantic-enrich","a11y/speech","a11y/explorer"),yi.preLoaded("loader","startup","core","input/tex","input/mml","output/chtml","ui/menu"),yi.saveVersion("tex-mml-chtml"),function(t,e){Qd.loadFont(t,"chtml",Gd,e)}((function(t){return yi.load(...vi.load).then((()=>(t||function(){})())).then((()=>vi.ready())).catch((t=>vi.failed(t)))}),!0),MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml",ii,"font"),ci({_:{output:{fonts:{"mathjax-newcm":{chtml_ts:Ls}}}}})})()})(); mathjaxr/inst/doc/mathjax/font/chtml/ 0000755 0001762 0000144 00000000000 15113345752 017331 5 ustar ligges users mathjaxr/inst/doc/mathjax/font/chtml/dynamic/ 0000755 0001762 0000144 00000000000 15112352537 020753 5 ustar ligges users mathjaxr/inst/doc/mathjax/font/chtml/dynamic/double-struck.js 0000644 0001762 0000144 00000004606 15112352537 024102 0 ustar ligges users (()=>{"use strict";const s=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","double-struck",s({DS:{normal:{8450:[.704,.019,.722,{sk:.036}],8461:[.685,0,.777,{sk:.011}],8469:[.685,.019,.722,{sk:.022}],8473:[.685,0,.611,{sk:.028}],8474:[.704,.179,.777],8477:[.685,0,.722],8484:[.685,0,.666,{sk:.057}],8508:[.431,0,.517],8509:[.431,.216,.472],8510:[.683,0,.611,{sk:.061}],8511:[.683,0,.667,{sk:.028}],8512:[.683,0,.667,{sk:.021}],8517:[.683,0,.694,{sk:.074}],8518:[.694,.022,.5,{ic:.048,sk:.051}],8519:[.453,.022,.472,{sk:.056}],8520:[.691,0,.279,{ic:.053,sk:.071}],8521:[.691,.216,.379,{ic:.063,sk:.117}],120120:[.704,0,.722,{sk:-.014}],120121:[.685,0,.666],120123:[.685,0,.722,{sk:-.02}],120124:[.685,0,.666],120125:[.685,0,.611,{sk:.03}],120126:[.704,.019,.777],120128:[.685,0,.388],120129:[.685,.075,.5,{sk:.055}],120130:[.685,0,.777,{sk:.015}],120131:[.685,0,.666,{sk:-.148}],120132:[.685,0,.944,{sk:.073}],120134:[.704,.019,.777],120138:[.704,.012,.555,{sk:-.013}],120139:[.685,0,.666],120140:[.685,.019,.722,{sk:.053}],120141:[.685,.019,.722,{sk:.072}],120142:[.685,.019,1,{sk:.048}],120143:[.685,0,.722,{sk:.026}],120144:[.685,0,.722,{sk:.038}],120146:[.453,.022,.5],120147:[.694,.022,.628,{sk:-.169}],120148:[.453,.022,.472],120149:[.694,.022,.5,{sk:.17}],120150:[.453,.022,.472],120151:[.716,0,.389,{sk:.028}],120152:[.453,.216,.5,{sk:-.013}],120153:[.694,0,.572,{sk:-.147}],120154:[.691,0,.279],120155:[.691,.216,.389,{sk:.057}],120156:[.694,0,.544,{sk:-.054}],120157:[.694,0,.279],120158:[.453,0,.722,{sk:.061}],120159:[.453,0,.572,{sk:.06}],120160:[.453,.022,.472],120161:[.453,.194,.628,{sk:.076}],120162:[.453,.194,.5,{sk:-.012}],120163:[.453,0,.544],120164:[.453,.022,.389],120165:[.694,.022,.417,{sk:-.059}],120166:[.431,.022,.528,{sk:.051}],120167:[.431,0,.472,{sk:.051}],120168:[.431,0,.667,{sk:.033}],120169:[.431,0,.472,{sk:.015}],120170:[.431,.216,.472,{sk:.062}],120171:[.431,0,.472,{sk:.038}],120792:[.666,.022,.556],120793:[.644,0,.556],120794:[.666,0,.556],120795:[.666,.022,.556],120796:[.644,0,.556,{sk:.117}],120797:[.644,.022,.556],120798:[.666,.022,.556],120799:[.644,0,.556,{sk:.031}],120800:[.666,.022,.556],120801:[.666,.022,.556]},"double-struck":{305:[.431,0,.279],567:[.431,.216,.389,{sk:.054}]}}},"NCM"));MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/double-struck","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/phonetics-ss.js 0000644 0001762 0000144 00000033610 15112352537 023733 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","phonetics-ss",c({PHSS:{"sans-serif":{592:[.456,.016,.481],593:[.455,.011,.517],594:[.455,.011,.517],595:[.717,.011,.556],596:[.456,.017,.444],597:[.461,.146,.444],598:[.695,.217,.536,{ic:.074}],599:[.717,.011,.517,{ic:.099}],600:[.461,.011,.444],601:[.461,.011,.444],602:[.455,.016,.639],603:[.461,.011,.417],604:[.467,.022,.472],605:[.467,.022,.639,{ic:.022}],606:[.467,.022,.5],607:[.445,.205,.306],608:[.647,.218,.536,{ic:.082}],609:[.455,.217,.517],610:[.459,.015,.48],611:[.445,.217,.461],612:[.467,.022,.528],613:[.445,.2,.517],614:[.717,0,.517],615:[.717,.217,.508],616:[.68,0,.328],617:[.445,.011,.333,{ic:.002}],618:[.445,0,.191],619:[.695,0,.383],620:[.695,0,.35],621:[.695,.217,.258,{ic:.055}],622:[.695,.205,.526],623:[.445,.011,.794],624:[.445,.2,.794],625:[.455,.217,.814],626:[.455,.217,.517],627:[.455,.217,.536,{ic:.055}],628:[.445,0,.505],629:[.461,.011,.5],630:[.46,.015,.686],631:[.456,.011,.611],632:[.695,.195,.611],633:[.445,.011,.342],634:[.639,.011,.342],635:[.445,.217,.342,{ic:.074}],636:[.455,.195,.342],637:[.455,.217,.342],638:[.455,0,.342],639:[.455,0,.314],640:[.445,0,.451],641:[.445,0,.451],642:[.461,.217,.383],643:[.717,.217,.333,{ic:.029}],644:[.647,.217,.333,{ic:.043}],645:[.455,.205,.367,{ic:.024}],646:[.717,.217,.333,{ic:.029}],647:[.455,.127,.361],648:[.571,.217,.361],649:[.445,.011,.572],650:[.445,.022,.556],651:[.456,.011,.481],652:[.445,0,.461],653:[.445,0,.683],654:[.65,0,.461],655:[.445,0,.463],656:[.445,.217,.435,{ic:.089}],657:[.445,.146,.49],658:[.445,.205,.435],659:[.445,.205,.435,{ic:.01}],660:[.705,0,.5],661:[.705,0,.5],662:[.695,.011,.5],663:[.711,.205,.5],664:[.717,.022,.736],665:[.445,0,.472],666:[.467,.022,.5],667:[.671,.015,.499,{ic:.072}],668:[.445,0,.505],669:[.68,.205,.331],670:[.445,.2,.489],671:[.445,0,.372],672:[.647,.195,.536,{ic:.082}],673:[.705,0,.5],674:[.705,0,.5],675:[.722,.011,.827],676:[.695,.205,.713],677:[.722,.146,.882],678:[.635,.011,.639],679:[.717,.217,.528,{ic:.036}],680:[.571,.146,.685],681:[.733,.205,.721],682:[.722,.011,.521],683:[.722,0,.558],684:[.499,0,.341],685:[.428,0,.5],686:[.455,.195,.556],687:[.455,.205,.556,{ic:.052}],7424:[.445,0,.463],7431:[.445,0,.411],7434:[.445,.015,.336],7435:[.445,0,.483],7437:[.445,0,.622],7448:[.445,0,.452],7449:[.445,0,.451],7452:[.445,.015,.484],7491:[.574,-.291,.288],7492:[.57,-.286,.288],7493:[.57,-.29,.31],7494:[.574,-.29,.433],7495:[.73,-.29,.31],7496:[.73,-.29,.31],7497:[.573,-.29,.266],7498:[.57,-.287,.266],7499:[.573,-.29,.25],7501:[.57,-.174,.3],7503:[.73,-.297,.293],7504:[.571,-.297,.476],7505:[.571,-.174,.31],7506:[.574,-.291,.3],7507:[.571,-.287,.266],7510:[.571,-.18,.31],7511:[.64,-.291,.216],7512:[.564,-.291,.31],7514:[.564,-.29,.476],7515:[.564,-.297,.276],7517:[.737,-.214,.3],7518:[.57,-.194,.333],7520:[.57,-.18,.349],7521:[.571,-.173,.333],7544:[.564,-.297,.31],7568:[.461,.217,.536],7569:[.717,.217,.614,{ic:.002}],7570:[.461,.217,.5,{ic:.06}],7571:[.467,.217,.528,{ic:.051}],7575:[.455,.217,.444]}},PHSSB:{"bold-sans-serif":{592:[.46,.01,.493],593:[.456,.011,.539],594:[.456,.011,.539],595:[.717,.01,.527],596:[.46,.01,.459],597:[.475,.146,.489],598:[.653,.207,.527,{ic:.154}],599:[.717,.01,.527,{ic:.156}],600:[.46,.01,.48],601:[.46,.01,.48],602:[.441,.016,.703],603:[.475,.011,.458],604:[.475,.011,.458],605:[.475,.011,.655,{ic:.048}],606:[.481,.022,.55],607:[.444,.167,.336],608:[.662,.18,.527,{ic:.156}],609:[.455,.18,.527],610:[.436,.014,.547],611:[.458,.217,.5],612:[.481,.022,.581,{ic:.003}],613:[.443,.21,.527],614:[.717,0,.527],615:[.717,.207,.527],616:[.653,0,.417],617:[.445,.011,.278],618:[.444,0,.274],619:[.693,0,.414],620:[.693,0,.378],621:[.695,.217,.281,{ic:.065}],622:[.653,.205,.611],623:[.455,0,.815],624:[.455,.195,.815],625:[.455,.207,.815],626:[.455,.207,.527],627:[.455,.217,.527,{ic:.094}],628:[.444,0,.588],629:[.474,.019,.475],630:[.474,.019,.696],631:[.482,.011,.672],632:[.695,.195,.672],633:[.442,.012,.349],634:[.653,.012,.349],635:[.442,.207,.349,{ic:.113}],636:[.469,.196,.349],637:[.469,.217,.349,{ic:.001}],638:[.468,0,.371],639:[.468,0,.371],640:[.458,0,.55],641:[.458,0,.55],642:[.46,.217,.396],643:[.717,.217,.367,{ic:.029}],644:[.644,.217,.367,{ic:.029}],645:[.467,.217,.497],646:[.717,.217,.367,{ic:.029}],647:[.468,.113,.38],648:[.571,.217,.38],649:[.444,.01,.634],650:[.444,.024,.555],651:[.444,.011,.525],652:[.444,0,.5],653:[.444,0,.744],654:[.611,0,.47],655:[.445,0,.623],656:[.444,.207,.447,{ic:.137}],657:[.444,.14,.585],658:[.458,.205,.476],659:[.458,.232,.476,{ic:.009}],660:[.706,-.001,.519],661:[.706,-.001,.519],662:[.696,.009,.519],663:[.711,.206,.55],664:[.717,.022,.794],665:[.458,0,.547],666:[.481,.022,.55],667:[.677,.014,.547,{ic:.153}],668:[.458,0,.588],669:[.653,.206,.269,{ic:.042}],670:[.444,.209,.499],671:[.458,0,.48],672:[.647,.157,.527,{ic:.156}],673:[.706,0,.519],674:[.706,0,.519],675:[.653,.01,.883],676:[.653,.205,.931],677:[.653,.14,1.025],678:[.571,.01,.718],679:[.717,.217,.639],680:[.571,.146,.757],681:[.733,.206,.786],682:[.653,.016,.581],683:[.653,0,.601],684:[.508,0,.371],685:[.44,0,.55],686:[.469,.21,.677],687:[.469,.207,.863],7424:[.459,0,.564],7431:[.458,0,.495],7434:[.459,.015,.413],7435:[.458,0,.598],7437:[.458,0,.778],7448:[.458,0,.556],7449:[.458,0,.55],7452:[.458,.015,.604],7491:[.591,-.292,.364],7492:[.591,-.292,.364],7493:[.586,-.298,.336],7494:[.591,-.292,.529],7495:[.738,-.298,.336],7496:[.738,-.298,.336],7497:[.59,-.298,.306],7498:[.59,-.298,.306],7499:[.59,-.299,.274],7501:[.587,-.181,.33],7503:[.738,-.305,.318],7504:[.588,-.304,.519],7505:[.587,-.182,.336],7506:[.591,-.299,.33],7507:[.586,-.295,.293],7510:[.587,-.188,.336],7511:[.659,-.297,.242],7512:[.58,-.298,.336],7514:[.582,-.298,.519],7515:[.58,-.305,.3],7517:[.745,-.249,.33],7518:[.586,-.185,.366],7520:[.586,-.188,.385],7521:[.59,-.18,.366],7544:[.58,-.305,.336],7568:[.46,.217,.493,{ic:.081}],7569:[.717,.207,.527,{ic:.156}],7570:[.46,.221,.48,{ic:.139}],7571:[.475,.221,.48,{ic:.139}],7575:[.46,.223,.48]}},PHSSI:{"sans-serif-italic":{592:[.455,.016,.481,{ic:.028}],593:[.455,.011,.517,{ic:.015}],594:[.455,.011,.517,{ic:.018}],595:[.717,.011,.556,{ic:.082}],596:[.456,.016,.444,{ic:.017}],597:[.461,.146,.444,{ic:.057}],598:[.695,.217,.536,{ic:.066}],599:[.717,.011,.517,{ic:.241}],600:[.461,.011,.444,{ic:.024}],601:[.461,.011,.444,{ic:.024}],602:[.455,.016,.639,{ic:.066}],603:[.461,.011,.417,{ic:.055}],604:[.467,.022,.472,{ic:.018}],605:[.467,.022,.639,{ic:.09}],606:[.467,.022,.5,{ic:.018}],607:[.445,.205,.306,{ic:.037}],608:[.647,.217,.536,{ic:.21}],609:[.455,.217,.517,{ic:.016}],610:[.459,.015,.48,{ic:.032}],611:[.445,.217,.461,{ic:.083}],612:[.467,.022,.528,{ic:.071}],613:[.445,.2,.517,{ic:.015}],614:[.717,0,.517,{ic:.075}],615:[.717,.217,.508,{ic:.067}],616:[.68,0,.328,{ic:.029}],617:[.445,.011,.333,{ic:.035}],618:[.445,0,.191,{ic:.049}],619:[.695,0,.383,{ic:.047}],620:[.695,0,.35,{ic:.051}],621:[.695,.217,.258,{ic:.047}],622:[.695,.205,.526,{ic:.06}],623:[.445,.011,.794,{ic:.015}],624:[.445,.2,.794,{ic:.015}],625:[.455,.217,.814],626:[.455,.217,.517],627:[.455,.217,.536,{ic:.019}],628:[.445,0,.505,{ic:.037}],629:[.461,.011,.5,{ic:.021}],630:[.46,.015,.686,{ic:.049}],631:[.456,.011,.611,{ic:.019}],632:[.695,.195,.611,{ic:.008}],633:[.445,.011,.342,{ic:.013}],634:[.639,.011,.342,{ic:.054}],635:[.445,.217,.342,{ic:.038}],636:[.455,.195,.342,{ic:.083}],637:[.455,.217,.342,{ic:.083}],638:[.455,0,.342,{ic:.083}],639:[.455,0,.314],640:[.445,0,.451,{ic:.024}],641:[.445,0,.451,{ic:.071}],642:[.461,.217,.383,{ic:.053}],643:[.717,.217,.333,{ic:.172}],644:[.647,.217,.333,{ic:.17}],645:[.455,.205,.367,{ic:.014}],646:[.717,.217,.333,{ic:.173}],647:[.455,.127,.361],648:[.571,.217,.361,{ic:.023}],649:[.445,.011,.572,{ic:.03}],650:[.445,.022,.556,{ic:.038}],651:[.456,.011,.481,{ic:.024}],652:[.445,0,.461],653:[.445,0,.683],654:[.65,0,.461,{ic:.094}],655:[.445,0,.463,{ic:.09}],656:[.445,.217,.435,{ic:.059}],657:[.445,.146,.49,{ic:.017}],658:[.445,.205,.435,{ic:.059}],659:[.445,.205,.435,{ic:.06}],660:[.705,0,.5,{ic:.06}],661:[.705,0,.5,{ic:.082}],662:[.695,.011,.5],663:[.711,.205,.5,{ic:.055}],664:[.717,.022,.736,{ic:.027}],665:[.445,0,.472,{ic:.006}],666:[.467,.022,.5,{ic:.025}],667:[.671,.015,.499,{ic:.205}],668:[.445,0,.505,{ic:.038}],669:[.679,.205,.331,{ic:.026}],670:[.445,.2,.489],671:[.445,0,.372],672:[.647,.195,.536,{ic:.206}],673:[.705,0,.5,{ic:.06}],674:[.705,0,.5,{ic:.081}],675:[.722,.011,.828,{ic:.059}],676:[.695,.205,.713,{ic:.059}],677:[.722,.146,.883,{ic:.017}],678:[.635,.011,.639,{ic:.07}],679:[.717,.217,.528,{ic:.18}],680:[.571,.146,.686,{ic:.057}],681:[.733,.205,.721],682:[.722,.011,.522,{ic:.053}],683:[.722,0,.574,{ic:.059}],684:[.499,0,.341,{ic:.102}],685:[.428,0,.5],686:[.455,.195,.556],687:[.455,.205,.556,{ic:.042}],7424:[.445,0,.463],7431:[.445,0,.411,{ic:.049}],7434:[.445,.015,.336,{ic:.038}],7435:[.445,0,.483,{ic:.055}],7437:[.445,0,.622,{ic:.038}],7448:[.445,0,.452,{ic:.022}],7449:[.445,0,.451,{ic:.037}],7452:[.445,.015,.484,{ic:.039}],7491:[.573,-.291,.351],7492:[.57,-.287,.351,{ic:.018}],7493:[.571,-.29,.373,{ic:.01}],7494:[.574,-.291,.496,{ic:.018}],7495:[.73,-.291,.373,{ic:.011}],7496:[.73,-.29,.373,{ic:.043}],7497:[.574,-.29,.329,{ic:.017}],7498:[.57,-.287,.329,{ic:.015}],7499:[.573,-.29,.313,{ic:.034}],7501:[.57,-.173,.363,{ic:.043}],7503:[.73,-.297,.356,{ic:.04}],7504:[.57,-.297,.539],7505:[.571,-.174,.373],7506:[.573,-.291,.363,{ic:.013}],7507:[.57,-.287,.329,{ic:.011}],7510:[.571,-.18,.373,{ic:.012}],7511:[.64,-.29,.279,{ic:.031}],7512:[.564,-.29,.373,{ic:.009}],7514:[.564,-.29,.539,{ic:.01}],7515:[.564,-.297,.339,{ic:.052}],7517:[.737,-.214,.363,{ic:.019}],7518:[.57,-.194,.396,{ic:.034}],7520:[.571,-.18,.412,{ic:.01}],7521:[.571,-.173,.396,{ic:.038}],7544:[.564,-.297,.373,{ic:.008}],7568:[.461,.217,.536],7569:[.717,.217,.614,{ic:.144}],7570:[.461,.217,.5,{ic:.025}],7571:[.467,.217,.528,{ic:.016}],7575:[.455,.217,.444,{ic:.017}]}},PHSSBI:{"sans-serif-bold-italic":{592:[.46,.01,.493,{ic:.058}],593:[.456,.011,.539,{ic:.043}],594:[.456,.011,.539,{ic:.031}],595:[.717,.01,.527,{ic:.056}],596:[.46,.01,.459,{ic:.049}],597:[.475,.146,.489,{ic:.052}],598:[.653,.207,.527,{ic:.122}],599:[.717,.01,.527,{ic:.297}],600:[.46,.01,.48,{ic:.056}],601:[.46,.01,.48,{ic:.059}],602:[.441,.016,.703,{ic:.023}],603:[.475,.011,.458,{ic:.056}],604:[.475,.011,.458,{ic:.059}],605:[.475,.011,.655,{ic:.119}],606:[.481,.022,.55,{ic:.022}],607:[.444,.167,.336,{ic:.04}],608:[.662,.18,.527,{ic:.285}],609:[.455,.18,.527,{ic:.04}],610:[.436,.014,.547,{ic:.028}],611:[.458,.217,.5,{ic:.081}],612:[.481,.022,.581,{ic:.091}],613:[.443,.21,.527,{ic:.037}],614:[.717,0,.527,{ic:.13}],615:[.717,.207,.527,{ic:.13}],616:[.653,0,.417,{ic:.025}],617:[.445,.011,.278],618:[.444,0,.274,{ic:.006}],619:[.693,0,.414,{ic:.049}],620:[.693,0,.378,{ic:.062}],621:[.695,.217,.281,{ic:.061}],622:[.653,.205,.611,{ic:.06}],623:[.455,0,.815,{ic:.039}],624:[.455,.195,.815,{ic:.039}],625:[.455,.207,.815,{ic:.03}],626:[.455,.207,.527,{ic:.031}],627:[.455,.217,.527,{ic:.06}],628:[.444,0,.588,{ic:.011}],629:[.474,.019,.475,{ic:.054}],630:[.474,.019,.696,{ic:.064}],631:[.482,.011,.672,{ic:.045}],632:[.695,.195,.672,{ic:.057}],633:[.442,.012,.349,{ic:.038}],634:[.653,.012,.349,{ic:.083}],635:[.442,.207,.349,{ic:.081}],636:[.469,.196,.349,{ic:.089}],637:[.469,.217,.349,{ic:.089}],638:[.468,0,.371,{ic:.083}],639:[.468,0,.371,{ic:.022}],640:[.458,0,.55,{ic:.025}],641:[.458,0,.55,{ic:.042}],642:[.46,.217,.396,{ic:.052}],643:[.717,.217,.367,{ic:.172}],644:[.644,.217,.367,{ic:.157}],645:[.467,.217,.497],646:[.717,.217,.367,{ic:.172}],647:[.468,.113,.38,{ic:.013}],648:[.571,.217,.38,{ic:.047}],649:[.444,.01,.634,{ic:.019}],650:[.444,.024,.555,{ic:.063}],651:[.444,.011,.525,{ic:.017}],652:[.444,0,.5],653:[.444,0,.744],654:[.611,0,.47,{ic:.09}],655:[.445,0,.623,{ic:.029}],656:[.444,.207,.447,{ic:.105}],657:[.444,.14,.585,{ic:.009}],658:[.458,.205,.476,{ic:.06}],659:[.458,.232,.476,{ic:.06}],660:[.706,-.001,.519,{ic:.08}],661:[.706,-.001,.519,{ic:.071}],662:[.696,.009,.519],663:[.711,.206,.55,{ic:.059}],664:[.717,.022,.794,{ic:.077}],665:[.458,0,.547,{ic:.013}],666:[.481,.022,.55,{ic:.044}],667:[.677,.014,.547,{ic:.288}],668:[.458,0,.588,{ic:.015}],669:[.653,.206,.269,{ic:.081}],670:[.444,.209,.499,{ic:.029}],671:[.458,0,.48],672:[.647,.157,.527,{ic:.282}],673:[.706,0,.519,{ic:.08}],674:[.706,0,.519,{ic:.069}],675:[.653,.01,.883,{ic:.049}],676:[.653,.205,.931,{ic:.029}],677:[.653,.14,1.025],678:[.571,.01,.718,{ic:.051}],679:[.717,.217,.639,{ic:.113}],680:[.571,.146,.757,{ic:.044}],681:[.733,.206,.786,{ic:.03}],682:[.653,.016,.581,{ic:.038}],683:[.653,0,.601,{ic:.043}],684:[.508,0,.371,{ic:.085}],685:[.44,0,.55,{ic:.007}],686:[.469,.21,.677,{ic:.047}],687:[.469,.207,.863],7424:[.459,0,.564],7431:[.458,0,.495,{ic:.042}],7434:[.459,.015,.413,{ic:.026}],7435:[.458,0,.598,{ic:.075}],7437:[.458,0,.778,{ic:.025}],7448:[.458,0,.556,{ic:.037}],7449:[.458,0,.55,{ic:.025}],7452:[.458,.015,.604,{ic:.024}],7491:[.591,-.292,.364,{ic:.092}],7492:[.591,-.292,.364,{ic:.09}],7493:[.586,-.298,.336,{ic:.088}],7494:[.591,-.292,.529,{ic:.089}],7495:[.738,-.298,.336,{ic:.084}],7496:[.738,-.298,.336,{ic:.12}],7497:[.59,-.298,.306,{ic:.092}],7498:[.59,-.298,.306,{ic:.101}],7499:[.59,-.299,.274,{ic:.101}],7501:[.587,-.181,.33,{ic:.113}],7503:[.738,-.305,.318,{ic:.112}],7504:[.588,-.304,.519,{ic:.09}],7505:[.587,-.182,.336,{ic:.089}],7506:[.591,-.299,.33,{ic:.095}],7507:[.586,-.295,.293,{ic:.09}],7510:[.587,-.188,.336,{ic:.085}],7511:[.659,-.297,.242,{ic:.093}],7512:[.58,-.298,.336,{ic:.087}],7514:[.582,-.298,.519,{ic:.088}],7515:[.58,-.305,.3,{ic:.113}],7517:[.745,-.249,.33,{ic:.092}],7518:[.586,-.185,.366,{ic:.103}],7520:[.586,-.188,.385,{ic:.082}],7521:[.59,-.18,.366,{ic:.096}],7544:[.58,-.305,.336,{ic:.082}],7568:[.46,.217,.493,{ic:.043}],7569:[.717,.207,.527,{ic:.297}],7570:[.46,.221,.48,{ic:.102}],7571:[.475,.221,.48,{ic:.102}],7575:[.46,.223,.48,{ic:.028}]}}},"NCM"),{},["MJX-NCM-PHSS","MJX-NCM-PHSSB","MJX-NCM-PHSSI","MJX-NCM-PHSSBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/phonetics-ss","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/calligraphic.js 0000644 0001762 0000144 00000003557 15112352537 023745 0 ustar ligges users (()=>{"use strict";const s=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","calligraphic",s({C:{"-tex-calligraphic":{65:[.694,.015,.857,{sk:.274}],66:[.713,.001,.778,{sk:.174}],67:[.697,.015,.654,{sk:.135}],68:[.717,-.004,.871,{sk:.06}],69:[.702,.012,.613,{sk:.143}],70:[.699,.015,.904,{sk:.212}],71:[.697,.13,.685,{sk:.164}],72:[.69,.008,1.065,{sk:.163}],73:[.685,.014,.62,{sk:.159}],74:[.692,.129,.698,{sk:.219}],75:[.69,.012,.989,{sk:.173}],76:[.685,.009,.77,{sk:.208}],77:[.699,.013,1.149,{sk:.128}],78:[.706,.009,1.007,{sk:.121}],79:[.686,.018,.699,{sk:.114}],80:[.71,.011,.763,{sk:.163}],81:[.694,.025,.716,{sk:.124}],82:[.712,.006,.818,{sk:.191}],83:[.702,.012,.625,{sk:.139}],84:[.694,.006,.776,{sk:.112}],85:[.7,.016,.744,{sk:.06}],86:[.709,.01,.71,{sk:.042}],87:[.703,.006,1.028,{sk:.087}],88:[.706,.009,.87,{sk:.121}],89:[.703,.136,.628,{sk:.083}],90:[.696,.011,.726,{sk:.089}]}},CB:{"-tex-bold-calligraphic":{65:[.711,.017,.969,{sk:.283}],66:[.727,.001,.916,{sk:.101}],67:[.709,.015,.745,{sk:.15}],68:[.727,.001,1.007,{sk:.045}],69:[.708,.012,.705,{sk:.151}],70:[.731,.014,1.005,{sk:.151}],71:[.705,.138,.79,{sk:.177}],72:[.699,.012,1.191,{sk:.178}],73:[.703,.018,.715,{sk:.199}],74:[.701,.137,.771,{sk:.26}],75:[.709,.009,1.099,{sk:.196}],76:[.71,.012,.861,{sk:.259}],77:[.71,.017,1.284,{sk:.115}],78:[.712,.013,1.095,{sk:.139}],79:[.707,.02,.822,{sk:.183}],80:[.726,.013,.88,{sk:.126}],81:[.705,.042,.839,{sk:.138}],82:[.732,.012,.923,{sk:.133}],83:[.715,.018,.722,{sk:.141}],84:[.697,.011,.91,{sk:.144}],85:[.709,.013,.853,{sk:.07}],86:[.702,.016,.784,{sk:.035}],87:[.71,.008,1.15,{sk:.057}],88:[.712,.011,.97,{sk:.125}],89:[.709,.135,.738,{sk:.079}],90:[.705,.014,.8,{sk:.133}]}}},"NCM"));MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/calligraphic","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/sans-serif-ex.js 0000644 0001762 0000144 00000136147 15112352537 024011 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","sans-serif-ex",c({SSX:{"sans-serif":{161:[.5,.194,.319],162:[.508,.064,.444],164:[.491,-.01,.778],166:[.75,.25,.278],169:[.694,0,.694],170:[.716,-.311,.372],171:[.439,0,.5],173:[.251,-.193,.333],174:[.694,0,.694],186:[.716,-.311,.419],187:[.439,0,.5],188:[.716,0,.788],189:[.716,0,.788],190:[.716,0,.788],191:[.5,.205,.472],3647:[.758,.064,.667],8204:[0,0,0],8205:[0,0,0],8218:[.084,.124,.278],8219:[.722,-.513,.278],8222:[.084,.124,.472],8223:[.722,-.513,.333],8226:[.407,-.121,.778],8233:[.722,.194,.472],8240:[.75,.056,1.154],8241:[.75,.056,1.471],8249:[.439,0,.333],8250:[.439,0,.333],8251:[.492,-.009,.778],8253:[.726,0,.472],8255:[.345,-.086,.333],8256:[.692,-.568,.597],8261:[.751,.309,.361],8262:[.751,.249,.361],8274:[.751,-.001,.5],8276:[-.07,.194,.597],8319:[.571,-.297,.31],8320:[.361,.028,.444],8353:[.79,.096,.639],8358:[.694,0,.708],8361:[.694,0,.944],8363:[.694,.064,.517],8369:[.694,0,.639],8370:[.75,.028,.778],8451:[.717,.021,.861],8470:[.695,0,.819],8471:[.694,0,.694],8478:[.694,0,.646],8480:[.694,-.252,.858],8482:[.698,-.282,.933],8494:[.712,.01,.669],8960:[.583,.083,.778],9250:[.694,.011,.517],9251:[.24,.118,.5],11800:[.528,.195,.472],64256:[.705,0,.583,{ic:.041}],64257:[.705,0,.536],64258:[.705,0,.536],64259:[.705,0,.814],64260:[.705,0,.814],65126:[.344,-.085,.333],184:[-.024,.192,.444],688:[.73,-.297,.31],689:[.727,-.297,.31],690:[.705,-.173,.16],691:[.57,-.297,.205],692:[.564,-.29,.205],693:[.564,-.167,.205,{ic:.045}],694:[.564,-.297,.27],695:[.564,-.297,.409],696:[.564,-.174,.276],697:[.694,-.495,.167],698:[.695,-.528,.5],699:[.695,-.486,.278],700:[.723,-.514,.278],701:[.695,-.486,.278],702:[.638,-.287,.396],703:[.638,-.287,.396],704:[.761,-.355,.444],705:[.761,-.355,.444],706:[.727,-.488,.333],707:[.727,-.488,.333],708:[.697,-.525,.5],709:[.697,-.525,.5],712:[.695,-.473,.222],716:[.027,.195,.222],718:[-.128,.258,.5],719:[-.128,.258,.5],720:[.445,0,.278],721:[.445,-.273,.278],722:[.425,-.142,.333],723:[.425,-.142,.333],724:[.283,-.086,.444],725:[.283,-.086,.444],726:[.283,0,.444],727:[.255,-.189,.444],731:[0,.212,.5],733:[.694,-.527,.5],734:[.483,-.22,.333],735:[.674,-.456,.5],736:[.564,-.167,.276],737:[.73,-.297,.143],738:[.575,-.29,.229],739:[.564,-.297,.276,{ic:.005}],740:[.72,-.297,.3],741:[.717,.022,.333,{ic:.038}],742:[.717,.022,.333,{ic:.038}],743:[.717,.022,.333,{ic:.038}],744:[.717,.022,.333,{ic:.038}],745:[.717,.023,.333,{ic:.038}],746:[.717,-.253,.333,{ic:.034}],747:[.717,.022,.343,{ic:.061}],748:[-.043,.215,.5],749:[.659,-.485,.5],750:[.723,-.514,.428],751:[.006,.212,.556,{ic:.015}],752:[.006,.212,.556,{ic:.015}],753:[-.043,.282,.333],754:[-.043,.282,.333],755:[-.04,.236,.296],756:[.325,-.158,.376],757:[.325,-.158,.546],758:[.325,-.158,.546],759:[-.041,.16,.433],760:[.544,-.292,.278],761:[.672,-.45,.289],762:[.672,-.45,.289],763:[.127,.095,.289],764:[.127,.095,.289],765:[.132,.096,.55],766:[.132,.096,.55],777:[.718,-.503,0,{dx:.24}],779:[.694,-.527,0,{dx:.228}],781:[.717,-.528,0,{dx:.251}],782:[.717,-.528,0,{dx:.252}],783:[.694,-.527,0,{dx:.252}],784:[.751,-.522,0,{dx:.239}],785:[.7,-.522,0,{dx:.239}],786:[.695,-.486,.278],787:[.694,-.511,0,{dx:.086}],788:[.694,-.511,0,{dx:.137}],789:[.868,-.659,0,{dx:.002}],790:[-.128,.258,0,{dx:.297}],791:[-.128,.258,0,{dx:.204}],792:[-.057,.309,.444],793:[-.057,.309,.444],794:[.806,-.584,.158,{ic:.034}],795:[.694,-.511,0,{dx:.086}],796:[-.041,.324,0,{dx:.176}],797:[-.057,.254,0,{dx:.223}],798:[-.057,.254,0,{dx:.223}],799:[-.057,.34,0,{dx:.223}],800:[-.051,.117,0,{dx:.223}],801:[.011,.217,0,{dx:.185}],802:[.011,.217,0,{dx:.036}],803:[-.111,.2,0,{dx:.24}],804:[-.066,.155,0,{dx:.251}],805:[-.052,.24,0,{dx:.335}],806:[-.079,.266,0,{dx:.24}],807:[-.023,.192,0,{dx:.26}],808:[.05,.214,0,{dx:.189}],809:[-.057,.279,0,{dx:.112}],810:[-.111,.295,0,{dx:.251}],811:[-.094,.303,0,{dx:.251}],812:[-.065,.206,0,{dx:.251}],813:[-.065,.206,0,{dx:.251}],814:[-.066,.244,0,{dx:.239}],815:[-.066,.244,0,{dx:.239}],816:[-.095,.214,0,{dx:.239}],817:[-.123,.187,0,{dx:.239}],818:[-.123,.187,0,{dx:.239}],819:[-.043,.227,0,{dx:.239}],820:[.319,-.209,0],821:[.272,-.216,0],822:[.272,-.216,0],823:[.353,-.098,0],825:[-.041,.324,0,{dx:.159}],826:[-.111,.295,0,{dx:.251}],827:[-.111,.325,0,{dx:.251}],828:[-.101,.266,0,{dx:.25}],829:[.674,-.456,0,{dx:.251}],830:[.827,-.494,0,{dx:.239}],831:[.682,-.542,.778],832:[.694,-.527,0,{dx:.276}],833:[.694,-.527,0,{dx:.204}],834:[.66,-.563,0,{dx:.236}],835:[.694,-.511,.222],836:[.694,-.489,.264],837:[-.067,.238,.111],838:[.676,-.492,0,{dx:.251}],839:[-.069,.328,0,{dx:.19}],840:[-.143,.332,0,{dx:.252}],841:[-.067,.289,0,{dx:.168}],842:[.74,-.466,0,{dx:.239}],843:[.741,-.489,0,{dx:.239}],844:[.685,-.485,.449],845:[-.025,.275,0,{dx:.279}],846:[-.041,.34,0,{dx:.279}],848:[.733,-.483,.273],849:[.7,-.504,.296],850:[.751,-.522,0,{dx:.239}],851:[-.042,.289,0,{dx:.223}],852:[-.025,.275,0,{dx:.211}],853:[-.025,.275,0,{dx:.211}],854:[-.025,.275,0,{dx:.092}],855:[.7,-.504,.296],856:[.655,-.566,0,{dx:.051}],857:[-.043,.269,.25],858:[-.052,.24,0,{dx:.265}],859:[.757,-.451,.5],860:[-.173,.354,0,{dx:.29}],861:[.668,-.488,0,{dx:0}],862:[.587,-.518,0,{dx:-.001}],863:[-.118,.187,0,{dx:-.001}],864:[.723,-.568,0,{dx:0}],865:[.668,-.488,0,{dx:0}],866:[-.025,.275,0,{dx:-.004}],867:[.711,-.46,.25],868:[.71,-.459,.252],869:[.802,-.46,.135],870:[.71,-.459,.275],871:[.701,-.46,.275],872:[.711,-.459,.27],873:[.827,-.459,.267],874:[.822,-.462,.253],875:[.701,-.459,.411],876:[.702,-.46,.203],877:[.766,-.46,.214],878:[.694,-.457,.289],879:[.698,-.46,.307],7620:[.695,-.488,0,{dx:.23}],7621:[.695,-.488,0,{dx:.271}],7624:[.695,-.528,0,{dx:.251}],7625:[.695,-.528,0,{dx:.251}],9474:[.75,.25,.278],9553:[.75,.25,.5],9773:[.593,.001,.7],9792:[.467,.217,.5],9834:[.723,.03,.611],9901:[.473,-.029,.5,{ic:.089}],9902:[.615,.113,.5,{ic:.2}],9906:[.467,.217,.5],10013:[.625,.028,.5],59395:[.705,0,.792],59908:[.857,-.522,.5],59909:[-.066,.244,.5],59910:[-.066,.244,.5],59913:[.857,-.522,.5],59915:[.93,-.522,.5],59917:[.7,-.522,.5],59920:[.874,-.522,.5],59927:[.816,-.525,.5],59930:[.816,-.525,.5],59932:[.889,-.525,.5],59934:[.833,-.525,.5],59935:[-.079,.266,.5],59942:[.694,-.527,.5],59946:[.829,-.571,.5],59948:[.831,-.571,.5],59951:[.829,-.571,.5],59957:[.718,-.503,.5],59959:[.968,-.753,0,{dx:.24}],59962:[-.123,.187,.5],59966:[-.123,.187,.5],59970:[.842,-.517,.667],59973:[-.095,.214,.5],60163:[.868,.212,.667],60164:[.694,.212,.481],60168:[.694,0,.694],60175:[.694,0,.694],60177:[0,0,0],60178:[0,0,0],60182:[.626,.027,.5],60185:[-.111,.2,.278],60190:[.868,.212,.597],60191:[.694,.212,.444],60200:[.716,.022,1.111],60201:[.5,.226,.472],60203:[.79,.096,.667],60209:[.345,-.086,.341],60213:[.868,.212,.278,{ic:.112}],60214:[.694,.212,.239,{ic:.058}],60218:[.868,.022,.472,{ic:.126}],60219:[.694,.205,.267,{ic:.058}],60224:[.77,.047,1,{ic:.012}],60232:[.868,.212,.736],60233:[.694,.212,.5],60237:[.347,.056,.392],60257:[.399,-.265,.239,{ic:.007}],60259:[.639,-.477,.294,{ic:.305}],60261:[.692,-.568,.239,{ic:.278}],60270:[.694,.244,.688],60271:[.444,.244,.517],60424:[.855,0,.708],60425:[.855,0,.517],60426:[.855,0,.542],60427:[.855,0,.239,{ic:.047}],60428:[.855,0,.681],60429:[.732,.011,.361],60430:[.816,0,.681],60432:[.881,.186,.736],60433:[.631,.186,.5],61699:[.716,.022,1.111],61700:[.305,-.244,.667],61705:[.127,0,.611],61719:[.353,-.098,.239,{ic:.016}],61720:[.759,.055,.528],61721:[.753,.041,.444],61722:[.694,.217,.694],61723:[.445,.205,.537],61724:[.694,.195,.728],61725:[.694,.195,.891],61726:[.694,.195,.639],61729:[.445,.162,.539],61730:[.445,.162,.68],61731:[.455,.311,.517],61734:[.694,.195,.542],61735:[.716,.022,.639],61736:[.445,.162,.39],61737:[.461,.011,.444],61738:[.694,.217,.875],61739:[.694,.217,.639],61740:[.445,.205,.669],61741:[.455,.322,.517],61743:[.662,.179,.555],61747:[.694,0,.667],61748:[.822,0,.639],61749:[.455,.011,.633],61750:[.625,.011,.417],61751:[.005,.209,.139],61752:[.004,.205,.194,{ic:.013}],61757:[.722,-.526,.667,{ic:.003}],61761:[.695,-.528,.5],61762:[.695,-.528,.5],61763:[.283,-.031,.444],61764:[.283,-.031,.444],61765:[.695,-.4,.333],61766:[.678,-.41,.222,{ic:.067}],61771:[.039,.039,.333,{ic:.038}],61772:[.212,.039,.333,{ic:.038}],61773:[.386,.039,.333,{ic:.038}],61774:[.56,.039,.333,{ic:.038}],61775:[.733,.039,.333,{ic:.038}],61776:[.212,.039,.333,{ic:.038}],61777:[.386,.039,.333,{ic:.038}],61778:[.56,.039,.333,{ic:.039}],61779:[.733,.039,.333,{ic:.039}],61780:[.039,.039,.222,{ic:.039}],61781:[.212,.039,.222,{ic:.039}],61782:[.386,.039,.222,{ic:.038}],61783:[.56,.039,.222,{ic:.039}],61784:[.733,.039,.222,{ic:.039}],61785:[.212,.039,.222,{ic:.039}],61786:[.386,.039,.222,{ic:.039}],61787:[.56,.039,.222,{ic:.039}],61788:[.733,.039,.222,{ic:.039}],61791:[.695,-.488,.5],61792:[.695,-.488,.5],61793:[.695,-.528,.5],61794:[.695,-.528,.5],61795:[.695,-.528,.5],61796:[.695,-.528,.5],61797:[.455,.195,.314],61800:[.461,.016,.722],61804:[.445,.205,.267,{ic:.002}],61805:[.028,.206,.333],61806:[.1,.217,.222,{ic:.069}],61807:[.1,.217,.222],61808:[.1,.217,.278],61809:[.684,-.445,.339],61810:[.732,-.482,.444],61813:[.455,.011,.517],61817:[.711,.22,.5],61818:[.461,.22,.444],61819:[.695,.011,.697],61822:[.455,.217,.556],61823:[.455,.217,.556],61824:[.717,.217,.536,{ic:.055}],61826:[.68,.205,.331],61828:[.695,0,.794],61829:[.455,0,.628],61832:[.455,.002,.611],61833:[.455,.217,.544],61834:[.571,.011,.528],61835:[.455,.254,.361],61836:[.445,.233,.5],61837:[.467,.233,.5],61838:[.695,.067,.5],61839:[.695,.011,.5],61842:[.695,0,.342],61850:[.445,0,.463],61854:[.445,0,.483],61855:[.445,0,.372],61857:[.459,0,.484],61859:[.717,-.528,.5],61860:[.717,-.528,.5],61863:[.011,.217,.222],61864:[.011,.217,.222,{ic:.069}],61865:[-.111,.295,.5],61866:[-.094,.303,.5],61867:[.272,-.216,.278],61868:[.353,-.098,.239],61869:[-.111,.295,.5],61870:[-.111,.325,.5],61871:[-.101,.266,.5],61872:[-.025,.275,.556],61873:[.661,-.467,.555],61874:[.738,-.508,.5],61875:[.738,-.508,.5],61876:[.802,.302,1.111],61877:[.854,.354,1.111],62082:[.07,0,.278],62083:[.728,-.511,.5],62110:[.733,-.508,.5],62113:[.694,.022,.639],62116:[.694,0,.694],62119:[.694,0,.694],62120:[.694,.195,1.091],62121:[.445,.011,.48],62124:[.445,0,.537],62126:[.445,0,.537],62127:[.445,.162,.76],62560:[.85,0,.667],62561:[.857,0,.597],62562:[.857,0,.694],62563:[.85,.022,.736],62564:[.857,0,.667],62565:[.857,0,.889],62566:[.857,.022,.639],62567:[.857,.022,1.041],62568:[.857,0,.646],62570:[.64,.011,.48],62571:[.64,.011,.444],62572:[.641,0,.537],62573:[.64,.011,.5],62574:[.641,.205,.461],62575:[.641,0,.683],62576:[.641,.011,.444],62577:[.641,.011,.73],62578:[.641,0,.515],63166:[.444,.205,.267],63187:[.851,-.76,.5,{ic:.027}],63188:[.639,-.5,.5],63189:[.65,-.51,.5],63190:[.64,-.51,.5],63198:[.305,-.244,.75],8592:[.511,.009,1],8593:[.711,.195,.5],8594:[.511,.009,1],8595:[.694,.211,.5],8730:[.763,.104,.472,{ic:.05}],8738:[.583,.083,.778],9001:[.751,.249,.389],9002:[.751,.249,.389],9702:[.407,-.121,.778],10214:[.751,.249,.403],10215:[.751,.249,.403]}},SSBX:{"bold-sans-serif":{161:[.5,.194,.367],162:[.548,.089,.459],164:[.541,.041,.856],166:[.75,.25,.319],169:[.694,0,.694],170:[.715,-.276,.416],171:[.5,0,.55],173:[.265,-.193,.367],174:[.694,0,.694],186:[.684,-.278,.461],187:[.5,0,.55],188:[.739,.037,.88],189:[.739,.037,.978],190:[.739,.037,.88],191:[.528,.178,.519],3647:[.794,.1,.733],8204:[0,0,0],8205:[0,0,0],8218:[.129,.113,.306],8219:[.695,-.453,.306],8222:[.129,.113,.529],8223:[.722,-.48,.61],8226:[.418,-.114,.856],8233:[.722,.194,.519],8240:[.773,.079,1.4],8241:[.773,.079,1.845],8249:[.5,0,.319],8250:[.5,0,.319],8251:[.541,.04,.856],8253:[.743,0,.487],8255:[-.063,.194,.649],8256:[.696,-.565,.649],8261:[.751,.252,.397],8262:[.751,.252,.397],8274:[.768,.016,.55],8276:[-.063,.194,.649],8319:[.587,-.305,.336],8320:[.361,.03,.489],8353:[.885,.193,.703],8358:[.694,0,.794],8361:[.694,0,1.039],8363:[.654,.168,.561],8369:[.694,0,.703],8370:[.887,.191,.733],8451:[.706,.011,1.053],8470:[.694,0,.959],8471:[.694,0,.694],8478:[.694,0,.703],8480:[.711,-.27,.869],8482:[.698,-.28,.952],8494:[.712,.01,.758],8960:[.636,.135,.856],9250:[.653,.01,.627],9251:[.276,.122,.55],11800:[.529,.214,.487],64256:[.706,0,.642,{ic:.042}],64257:[.706,0,.586],64258:[.706,0,.586],64259:[.706,0,.892],64260:[.706,0,.892],65126:[.354,-.053,.367],184:[-.023,.194,.489],688:[.73,-.306,.336],689:[.772,-.306,.336],690:[.717,-.183,.173],691:[.601,-.305,.223],692:[.601,-.305,.223],693:[.58,-.159,.223,{ic:.071}],694:[.597,-.299,.33],695:[.593,-.305,.446],696:[.581,-.184,.3],697:[.695,-.507,.183,{ic:.01}],698:[.695,-.507,.423],699:[.722,-.48,.305],700:[.722,-.48,.305],701:[.695,-.453,.306],702:[.63,-.268,.436],703:[.63,-.268,.436],704:[.761,-.496,.489],705:[.761,-.496,.489],706:[.737,-.487,.367],707:[.737,-.487,.367],708:[.694,-.546,.55],709:[.661,-.513,.55],712:[.694,-.451,.244],716:[.049,.194,.244],718:[-.132,.287,.55],719:[-.136,.288,.55],720:[.458,.003,.306],721:[.458,-.281,.306],722:[.454,-.15,.367],723:[.454,-.15,.367],724:[.317,-.065,.489],725:[.317,-.065,.489],726:[.313,-.004,.489],727:[.275,-.183,.489],731:[.018,.213,.55],733:[.694,-.546,.55],734:[.463,-.214,.367,{ic:.022}],735:[.672,-.462,.55],736:[.58,-.174,.3],737:[.738,-.305,.153],738:[.59,-.298,.253],739:[.58,-.305,.3],740:[.729,-.305,.33],741:[.716,.022,.367,{ic:.067}],742:[.717,.022,.367,{ic:.067}],743:[.717,.022,.367,{ic:.067}],744:[.717,.022,.367,{ic:.067}],745:[.716,.022,.367,{ic:.067}],746:[.716,-.228,.367,{ic:.067}],747:[.717,.022,.367,{ic:.067}],748:[-.042,.19,.55],749:[.767,-.532,.55],750:[.722,-.48,.505],751:[0,.228,.556,{ic:.005}],752:[0,.228,.556,{ic:.005}],753:[-.041,.291,.367],754:[-.041,.291,.367],755:[-.041,.224,.223],756:[.314,-.167,.436],757:[.314,-.167,.554],758:[.314,-.167,.554],759:[-.042,.169,.55],760:[.544,-.203,.306],761:[.672,-.431,.318],762:[.672,-.431,.318],763:[.129,.112,.318],764:[.129,.112,.318],765:[.129,.112,.558],766:[.129,.112,.558],777:[.72,-.513,0,{dx:.263}],779:[.695,-.507,0,{dx:.229}],781:[.717,-.529,0,{dx:.273}],782:[.717,-.529,0,{dx:.276}],783:[.695,-.507,0,{dx:.291}],784:[.817,-.533,.256],785:[.685,-.513,.256],786:[.722,-.48,.305],787:[.692,-.45,0,{dx:.111}],788:[.692,-.45,0,{dx:.111}],789:[.866,-.624,0,{dx:.006}],790:[-.136,.283,0,{dx:.323}],791:[-.136,.284,0,{dx:.222}],792:[-.066,.38,.489],793:[-.066,.38,.489],794:[.806,-.565,.18,{ic:.034}],795:[.692,-.45,0,{dx:.111}],796:[-.042,.346,0,{dx:.197}],797:[-.095,.317,0,{dx:.245}],798:[-.063,.285,0,{dx:.245}],799:[-.066,.375,0,{dx:.245}],800:[-.059,.144,0,{dx:.247}],801:[.024,.217,0,{dx:.204}],802:[.024,.217,0,{dx:.204}],803:[-.09,.195,0,{dx:.262}],804:[-.09,.195,0,{dx:.276}],805:[-.058,.241,.223],806:[-.066,.308,0,{dx:.265}],807:[-.023,.194,0,{dx:.293}],808:[.008,.223,0,{dx:.192}],809:[-.063,.306,0,{dx:.122}],810:[-.111,.297,0,{dx:.276}],811:[-.112,.308,0,{dx:.276}],812:[-.062,.21,0,{dx:.256}],813:[-.062,.21,0,{dx:.256}],814:[-.041,.213,0,{dx:.262}],815:[-.041,.213,0,{dx:.262}],816:[-.08,.207,0,{dx:.262}],817:[-.099,.184,0,{dx:.262}],818:[-.099,.184,0,{dx:.262}],819:[-.042,.267,0,{dx:.262}],820:[.333,-.206,0],821:[.284,-.219,0],822:[.284,-.219,0],823:[.448,-.12,0],825:[-.042,.346,0,{dx:.172}],826:[-.115,.301,0,{dx:.276}],827:[-.111,.337,0,{dx:.276}],828:[-.1,.233,0,{dx:.276}],829:[.672,-.462,0,{dx:.276}],830:[.864,-.498,.209],831:[.772,-.537,.855],832:[.684,-.537,.55],833:[.685,-.537,.55],834:[.65,-.52,.633],835:[.694,-.511,.222],836:[.694,-.508,.278,{ic:.04}],837:[-.068,.257,.11],838:[.698,-.512,0,{dx:.276}],839:[-.071,.373,0,{dx:.209}],840:[-.143,.323,0,{dx:.276}],841:[-.067,.308,0,{dx:.182}],842:[.771,-.474,.55],843:[.797,-.465,.55],844:[.837,-.503,.556],845:[-.025,.319,0,{dx:.309}],846:[-.031,.313,0,{dx:.299}],848:[.789,-.495,.278],849:[.689,-.506,.223],850:[.817,-.533,.256],851:[-.085,.356,0,{dx:.245}],852:[-.017,.311,0,{dx:.311}],853:[-.017,.311,0,{dx:.311}],854:[-.017,.311,0,{dx:.162}],855:[.689,-.506,.223],856:[.672,-.567,0,{dx:.052}],857:[-.041,.287,.317],858:[-.041,.224,.369],859:[.757,-.451,.5],860:[-.152,.431,0,{dx:.341}],861:[.765,-.486,0,{dx:-.035}],862:[.633,-.548,0,{dx:.011}],863:[-.099,.184,0,{dx:.001}],864:[.722,-.562,0,{dx:0}],865:[.666,-.387,0],866:[-.011,.334,0,{dx:.001}],867:[.712,-.474,.294],868:[.715,-.477,.289],869:[.803,-.476,.13],870:[.714,-.476,.296],871:[.705,-.475,.267],872:[.712,-.474,.255],873:[.807,-.472,.273],874:[.809,-.478,.258],875:[.709,-.478,.442],876:[.708,-.478,.23],877:[.768,-.472,.222],878:[.703,-.476,.294],879:[.705,-.478,.32],7620:[.695,-.486,0,{dx:.242}],7621:[.695,-.486,0,{dx:.308}],7624:[.695,-.537,0,{dx:.276}],7625:[.695,-.537,0,{dx:.276}],9474:[.752,.253,.306],9553:[.752,.253,.531],9773:[.593,.001,.7],9792:[.48,.217,.55],9834:[.724,.052,.672],9901:[.484,-.022,.67],9902:[.629,.127,1.249],9906:[.48,.217,.55],10013:[.632,.028,.55],59395:[.706,0,.867],59908:[.866,-.519,.55],59909:[-.071,.213,.55],59910:[-.071,.213,.55],59913:[.866,-.545,.55],59915:[.923,-.545,.55],59917:[.687,-.545,.55],59920:[.888,-.545,.55],59927:[.841,-.535,.55],59930:[.841,-.535,.55],59932:[.898,-.535,.55],59934:[.863,-.535,.55],59935:[-.079,.292,.55],59942:[.694,-.537,.55],59946:[.858,-.564,.55],59948:[.846,-.564,.55],59951:[.858,-.564,.55],59957:[.719,-.513,.55],59962:[-.099,.184,.55],59966:[-.099,.184,.55],59970:[.863,-.526,.733],59973:[-.076,.207,.55],60163:[.885,.213,.733,{ic:.003}],60164:[.694,.213,.525],60168:[.694,0,.694],60175:[.694,0,.694],60176:[0,0,0],60177:[0,0,0],60178:[0,0,0],60182:[.631,.025,.55],60185:[-.085,.2,.306],60190:[.885,.213,.642],60191:[.694,.213,.511],60200:[.716,.022,1.222],60201:[.5,.244,.519],60203:[.844,.15,.733],60209:[.356,-.053,.367],60213:[.885,.213,.331,{ic:.078}],60214:[.694,.213,.256,{ic:.039}],60218:[.885,.022,.519,{ic:.081}],60219:[.694,.205,.286,{ic:.039}],60224:[.797,.073,1.1,{ic:.024}],60232:[.885,.213,.794],60233:[.694,.213,.55],60237:[.347,.056,.485],60257:[.416,-.292,.256,{ic:.061}],60259:[.667,-.486,.336,{ic:.367}],60261:[.694,-.563,.256,{ic:.334}],60270:[.694,.213,.764],60271:[.458,.213,.561],60424:[.877,0,.794],60425:[.877,0,.561],60426:[.877,0,.581],60427:[.877,0,.256,{ic:.055}],60428:[.877,0,.733],60429:[.772,.011,.404],60430:[.849,0,.733],60432:[.889,.194,.794],60433:[.653,.194,.55],61699:[.717,.022,1.222],61700:[.32,-.247,.733],61705:[.131,0,.672],61719:[.419,-.119,.255,{ic:.043}],61720:[.779,.05,.55],61721:[.761,.035,.489],61722:[.694,.217,.764],61723:[.458,.206,.592],61724:[.694,.195,.844],61725:[.694,.195,1.018],61726:[.694,.195,.703],61729:[.458,.162,.636],61730:[.458,.162,.782],61731:[.469,.311,.561],61734:[.694,.195,.58],61735:[.717,.022,.703],61736:[.458,.162,.418],61737:[.475,.013,.489],61738:[.694,.217,.978],61739:[.694,.217,.703],61740:[.458,.206,.744],61741:[.469,.322,.561],61743:[.811,.285,.611],61747:[.694,.002,.733],61748:[.871,0,.703],61749:[.471,.011,.696,{ic:.023}],61750:[.638,.011,.458],61751:[-.001,.226,.153],61752:[0,.216,.214,{ic:.025}],61757:[.722,-.521,.733],61761:[.695,-.537,.55],61762:[.695,-.537,.55],61763:[.316,-.001,.489],61764:[.316,-.001,.489],61765:[.695,-.412,.367],61766:[.684,-.389,.244,{ic:.074}],61771:[.068,.068,.367,{ic:.067}],61772:[.242,.068,.367,{ic:.067}],61773:[.415,.068,.367,{ic:.067}],61774:[.589,.068,.367,{ic:.067}],61775:[.762,.068,.367,{ic:.067}],61776:[.242,.068,.367,{ic:.067}],61777:[.415,.068,.367,{ic:.067}],61778:[.589,.068,.367,{ic:.067}],61779:[.762,.068,.367,{ic:.067}],61780:[.068,.068,.244,{ic:.068}],61781:[.242,.068,.244,{ic:.068}],61782:[.415,.068,.244,{ic:.068}],61783:[.589,.068,.244,{ic:.068}],61784:[.762,.068,.244,{ic:.068}],61785:[.242,.068,.244,{ic:.068}],61786:[.415,.068,.244,{ic:.068}],61787:[.589,.068,.244,{ic:.068}],61788:[.763,.068,.244,{ic:.068}],61791:[.695,-.478,.55],61792:[.695,-.486,.55],61793:[.695,-.536,.55],61794:[.695,-.536,.55],61795:[.695,-.531,.55],61796:[.695,-.531,.55],61797:[.469,.195,.342],61800:[.475,.016,.794],61804:[.458,.205,.286,{ic:.009}],61805:[.032,.206,.367],61806:[.116,.217,.244,{ic:.074}],61807:[.116,.217,.244],61808:[.115,.217,.306],61809:[.684,-.458,.378],61810:[.816,-.494,.489],61813:[.469,.011,.561],61817:[.711,.223,.55],61818:[.475,.223,.489],61819:[.695,.011,.76],61822:[.469,.217,.611],61823:[.469,.217,.611],61824:[.717,.217,.586,{ic:.059}],61826:[.696,.206,.36],61828:[.695,0,.867],61829:[.469,0,.683],61832:[.469,.011,.672],61833:[.469,.217,.592],61834:[.59,.011,.588],61835:[.469,.249,.404],61836:[.458,.258,.55],61837:[.48,.258,.55],61838:[.695,.069,.55],61839:[.695,.011,.55],61842:[.695,0,.372],61850:[.458,.002,.574],61854:[.459,0,.598],61855:[.458,0,.448],61857:[.474,.003,.604],61859:[.717,-.537,.55],61860:[.717,-.537,.55],61863:[.024,.217,.244],61864:[.024,.217,.244,{ic:.074}],61865:[-.111,.3,.55],61866:[-.112,.308,.55],61867:[.284,-.22,.305],61868:[.419,-.119,.255],61869:[-.112,.301,.55],61870:[-.111,.337,.55],61871:[-.1,.233,.55],61872:[-.011,.334,.611],61873:[.689,-.481,.611],61874:[.752,-.53,.55],61875:[.752,-.53,.55],61876:[.835,.335,1.222],61877:[.94,.44,1.222],62082:[.112,.001,.305],62083:[.735,-.528,.55],62110:[.747,-.53,.55],62113:[.694,.022,.703],62116:[.694,0,.764],62119:[.694,0,.764],62120:[.694,.194,1.223],62121:[.458,.011,.525],62124:[.458,0,.592],62126:[.458,0,.592],62127:[.458,.162,.836],62560:[.912,0,.733],62561:[.912,0,.642],62562:[.912,0,.764],62563:[.912,.022,.794],62564:[.912,0,.733],62565:[.912,0,.978],62566:[.912,.022,.703],62567:[.912,.022,1.14],62568:[.912,0,.703],62570:[.668,.01,.493],62571:[.668,.01,.48],62572:[.668,0,.592],62573:[.668,.01,.517],62574:[.661,.167,.47],62575:[.661,0,.744],62576:[.668,.011,.489],62577:[.668,.011,.8],62578:[.661,0,.555],63166:[.522,.033,.391],63187:[.878,-.763,.55,{ic:.026}],63188:[.666,-.52,.55],63189:[.678,-.529,.55],63190:[.68,-.528,.55],63198:[.319,-.247,.825],8592:[.548,.046,1.1],8593:[.668,.194,.622],8594:[.548,.046,1.1],8595:[.668,.194,.622],8730:[.807,.082,.519,{ic:.078}],8738:[.634,.134,.856],9001:[.761,.262,.428],9002:[.761,.262,.428],9702:[.418,-.114,.856],10214:[.75,.222,.545],10215:[.75,.222,.545]}},SSIX:{"sans-serif-italic":{161:[.5,.194,.319],162:[.508,.064,.444,{ic:.056}],164:[.492,-.01,.778],166:[.75,.25,.278,{ic:.038}],169:[.694,0,.694,{ic:.089}],170:[.716,-.311,.372,{ic:.093}],171:[.439,0,.5,{ic:.04}],173:[.251,-.193,.333],174:[.694,0,.694,{ic:.089}],186:[.716,-.311,.419,{ic:.095}],187:[.439,0,.5],188:[.716,0,.788,{ic:.016}],189:[.716,0,.788],190:[.716,0,.788,{ic:.016}],191:[.5,.205,.472],3647:[.758,.064,.667,{ic:.03}],8204:[0,0,0],8205:[0,0,0],8218:[.084,.124,.278],8219:[.722,-.514,.278,{ic:.058}],8222:[.084,.124,.472],8223:[.722,-.514,.333,{ic:.137}],8226:[.407,-.121,.778],8233:[.722,.194,.472,{ic:.12}],8240:[.75,.056,1.154],8241:[.75,.056,1.471],8249:[.439,0,.333,{ic:.04}],8250:[.439,0,.333],8251:[.492,-.009,.778],8253:[.726,0,.472,{ic:.051}],8255:[.345,-.086,.333,{ic:.018}],8256:[.692,-.568,.597,{ic:.049}],8261:[.751,.309,.361,{ic:.108}],8262:[.751,.249,.361,{ic:.066}],8274:[.751,-.001,.5,{ic:.103}],8276:[-.07,.194,.597],8319:[.571,-.297,.373],8320:[.361,.028,.444],8353:[.79,.096,.639,{ic:.084}],8358:[.694,0,.708,{ic:.052}],8361:[.694,0,.944,{ic:.135}],8363:[.694,.064,.517,{ic:.099}],8369:[.694,0,.639,{ic:.052}],8370:[.75,.028,.778,{ic:.067}],8451:[.717,.021,.861,{ic:.084}],8470:[.695,0,.819,{ic:.028}],8471:[.694,0,.694,{ic:.089}],8478:[.694,0,.646,{ic:.054}],8480:[.694,-.252,.858,{ic:.052}],8482:[.698,-.282,.933,{ic:.067}],8494:[.712,.01,.669,{ic:.062}],8960:[.583,.083,.778,{ic:.069}],9250:[.694,.011,.517,{ic:.018}],9251:[.241,.118,.5,{ic:.005}],11800:[.528,.195,.472],64256:[.705,0,.583,{ic:.19}],64257:[.705,0,.536,{ic:.07}],64258:[.705,0,.536,{ic:.066}],64259:[.705,0,.814,{ic:.07}],64260:[.705,0,.814,{ic:.066}],65126:[.344,-.085,.333,{ic:.018}],184:[-.024,.192,.444],688:[.73,-.297,.373],689:[.727,-.297,.373,{ic:.046}],690:[.705,-.174,.223,{ic:.039}],691:[.57,-.297,.268,{ic:.05}],692:[.564,-.29,.268,{ic:.008}],693:[.564,-.166,.268,{ic:.023}],694:[.564,-.297,.333,{ic:.045}],695:[.564,-.297,.472,{ic:.052}],696:[.564,-.173,.339,{ic:.052}],697:[.694,-.495,.167,{ic:.145}],698:[.695,-.528,.5,{ic:.068}],699:[.695,-.486,.278,{ic:.052}],700:[.722,-.514,.278,{ic:.056}],701:[.695,-.486,.278,{ic:.05}],702:[.638,-.287,.397,{ic:.046}],703:[.638,-.287,.397,{ic:.068}],704:[.761,-.355,.444,{ic:.077}],705:[.761,-.355,.444,{ic:.15}],706:[.727,-.488,.333,{ic:.118}],707:[.727,-.488,.333,{ic:.1}],708:[.697,-.525,.5],709:[.697,-.525,.5],712:[.695,-.473,.222,{ic:.068}],716:[.027,.195,.222],718:[-.128,.258,.5],719:[-.128,.258,.5],720:[.445,0,.278,{ic:.042}],721:[.445,-.268,.278,{ic:.041}],722:[.425,-.142,.333],723:[.425,-.142,.333],724:[.283,-.086,.444],725:[.283,-.086,.444],726:[.283,0,.444],727:[.255,-.189,.444],731:[0,.212,.5],733:[.694,-.527,.5,{ic:.068}],734:[.483,-.22,.333,{ic:.068}],735:[.674,-.456,.5,{ic:.035}],736:[.564,-.167,.339,{ic:.051}],737:[.73,-.297,.206,{ic:.044}],738:[.574,-.291,.292,{ic:.033}],739:[.564,-.297,.339,{ic:.053}],740:[.72,-.297,.363,{ic:.05}],741:[.717,.022,.333,{ic:.183}],742:[.717,.022,.333,{ic:.183}],743:[.717,.022,.333,{ic:.183}],744:[.717,.022,.333,{ic:.183}],745:[.717,.023,.333,{ic:.183}],746:[.717,-.253,.333,{ic:.01}],747:[.717,.022,.343,{ic:.074}],748:[-.043,.215,.5],749:[.659,-.485,.5],750:[.723,-.514,.428],751:[.006,.212,.556,{ic:.027}],752:[.006,.212,.556,{ic:.003}],753:[-.043,.282,.333],754:[-.043,.282,.333],755:[-.04,.236,.296],756:[.325,-.158,.376],757:[.325,-.158,.546],758:[.325,-.158,.546],759:[-.041,.16,.433],760:[.544,-.292,.278],761:[.672,-.45,.289,{ic:.132}],762:[.672,-.45,.289,{ic:.087}],763:[.127,.095,.289],764:[.127,.095,.289,{ic:.012}],765:[.132,.096,.55],766:[.132,.096,.55],777:[.718,-.503,0,{dx:.1}],779:[.694,-.527,0,{dx:.098}],781:[.717,-.528,0,{dx:.114}],782:[.717,-.528,0,{dx:.114}],783:[.694,-.527,0,{dx:.122}],784:[.751,-.522,0,{dx:.236}],785:[.7,-.522,0,{dx:.127}],786:[.695,-.486,.278],787:[.694,-.511,0,{dx:-.043}],788:[.694,-.511,0,{dx:.004}],789:[.866,-.658,0,{dx:-.161}],790:[-.128,.258,0,{dx:.339}],791:[-.128,.258,0,{dx:.244}],792:[-.057,.309,.444],793:[-.057,.309,.444],794:[.806,-.584,.173,{ic:.034}],795:[.694,-.511,0,{dx:.081}],796:[-.041,.324,0,{dx:.202}],797:[-.057,.254,0,{dx:.27}],798:[-.057,.254,0,{dx:.24}],799:[-.057,.34,0,{dx:.264}],800:[-.051,.117,0,{dx:.24}],801:[.011,.217,0,{dx:.201}],802:[.011,.217,0,{dx:.066}],803:[-.111,.2,0,{dx:.274}],804:[-.066,.156,0,{dx:.274}],805:[-.064,.225,0,{dx:.393}],806:[-.079,.266,0,{dx:.278}],807:[-.023,.192,0,{dx:.282}],808:[.051,.214,0,{dx:.216}],809:[-.057,.279,0,{dx:.146}],810:[-.111,.295,0,{dx:.294}],811:[-.094,.303,0,{dx:.288}],812:[-.064,.158,0,{dx:.263}],813:[-.065,.206,0,{dx:.296}],814:[-.066,.244,0,{dx:.255}],815:[-.066,.244,0,{dx:.29}],816:[-.095,.214,0,{dx:.272}],817:[-.123,.187,0,{dx:.273}],818:[-.123,.187,0,{dx:.273}],819:[-.043,.227,0,{dx:.239}],820:[.319,-.209,0],821:[.272,-.216,0],822:[.272,-.216,0],823:[.353,-.098,0],825:[-.041,.324,0,{dx:.211}],826:[-.111,.295,0,{dx:.294}],827:[-.111,.325,0,{dx:.297}],828:[-.101,.266,0,{dx:.299}],829:[.674,-.456,0,{dx:.131}],830:[.827,-.494,0,{dx:.239}],831:[.682,-.542,.778],832:[.694,-.527,0,{dx:.276}],833:[.694,-.527,0,{dx:.204}],834:[.66,-.563,0,{dx:.236}],835:[.694,-.511,.222],836:[.694,-.489,.264],837:[-.067,.238,.111,{ic:.001}],838:[.676,-.492,0,{dx:.127}],839:[-.069,.328,0,{dx:.232}],840:[-.143,.332,0,{dx:.297}],841:[-.067,.289,0,{dx:.189}],842:[.74,-.466,0,{dx:.239}],843:[.741,-.489,0,{dx:.239}],844:[.685,-.485,.449],845:[-.025,.275,0,{dx:.31}],846:[-.041,.34,0,{dx:.279}],848:[.733,-.483,.273],849:[.7,-.504,.296],850:[.751,-.522,0,{dx:.242}],851:[-.042,.289,0,{dx:.223}],852:[-.025,.275,0,{dx:.198}],853:[-.025,.275,0,{dx:.225}],854:[-.025,.275,0,{dx:.112}],855:[.7,-.504,.296],856:[.655,-.566,0,{dx:.051}],857:[-.043,.269,.25],858:[-.052,.24,0,{dx:.265}],859:[.757,-.451,.5],860:[-.098,.354,0,{dx:.367}],861:[.733,-.477,0,{dx:-.133}],862:[.587,-.518,0,{dx:-.001}],863:[-.118,.187,0,{dx:-.001}],864:[.724,-.567,0,{dx:-.136}],865:[.719,-.463,0,{dx:-.137}],866:[-.025,.275,0,{dx:.033}],867:[.711,-.46,.25],868:[.71,-.459,.252],869:[.802,-.46,.135],870:[.71,-.459,.275],871:[.701,-.46,.275],872:[.711,-.459,.27],873:[.827,-.459,.267,{ic:.008}],874:[.822,-.462,.253],875:[.701,-.459,.411],876:[.702,-.46,.203],877:[.766,-.46,.214],878:[.694,-.457,.289],879:[.698,-.46,.307],7620:[.695,-.488,0,{dx:.104}],7621:[.695,-.488,0,{dx:.137}],7624:[.695,-.528,0,{dx:.12}],7625:[.695,-.528,0,{dx:.121}],9474:[.75,.25,.278,{ic:.06}],9553:[.75,.25,.5,{ic:.044}],9773:[.593,.001,.7],9792:[.467,.217,.5,{ic:.012}],9834:[.723,.03,.611],9901:[.473,-.029,.5,{ic:.147}],9902:[.615,.113,.5,{ic:.259}],9906:[.467,.217,.5,{ic:.011}],10013:[.625,.028,.5,{ic:.037}],59395:[.705,0,.792,{ic:.058}],59908:[.857,-.522,.5,{ic:.087}],59909:[-.066,.244,.5],59910:[-.066,.244,.5],59913:[.857,-.522,.5,{ic:.069}],59915:[.93,-.522,.5,{ic:.069}],59917:[.7,-.522,.5,{ic:.034}],59920:[.874,-.522,.5,{ic:.104}],59927:[.816,-.525,.5,{ic:.077}],59930:[.816,-.525,.5,{ic:.048}],59932:[.889,-.525,.5,{ic:.118}],59934:[.833,-.525,.5,{ic:.095}],59935:[-.079,.266,.5],59942:[.694,-.527,.5,{ic:.005}],59946:[.829,-.571,.5,{ic:.128}],59948:[.831,-.571,.5,{ic:.09}],59951:[.829,-.571,.5,{ic:.002}],59957:[.718,-.503,.5],59962:[-.123,.187,.5],59966:[-.123,.187,.5],59970:[.842,-.517,.738],59973:[-.095,.214,.5],60163:[.868,.212,.667,{ic:.052}],60164:[.694,.212,.481,{ic:.054}],60168:[.694,0,.694,{ic:.089}],60175:[.694,0,.694,{ic:.089}],60176:[0,0,0],60177:[0,0,0],60178:[0,0,0],60182:[.626,.027,.5,{ic:.037}],60185:[-.111,.2,.278],60190:[.868,.212,.597,{ic:.091}],60191:[.694,.212,.444,{ic:.073}],60200:[.716,.022,1.111,{ic:.053}],60201:[.5,.226,.472],60203:[.79,.096,.667,{ic:.067}],60209:[.345,-.086,.167,{ic:.184}],60213:[.868,.212,.278,{ic:.297}],60214:[.694,.212,.239,{ic:.207}],60218:[.868,.022,.472,{ic:.312}],60219:[.694,.205,.267,{ic:.207}],60224:[.77,.047,1,{ic:.169}],60232:[.868,.212,.736,{ic:.027}],60233:[.694,.212,.5,{ic:.045}],60237:[.347,.056,.392],60257:[.399,-.265,.239,{ic:.079}],60259:[.639,-.477,.294,{ic:.41}],60261:[.692,-.568,.239,{ic:.407}],60270:[.694,.244,.688,{ic:.054}],60271:[.444,.244,.517,{ic:.013}],60424:[.855,0,.708,{ic:.054}],60425:[.855,0,.517,{ic:.091}],60426:[.855,0,.542],60427:[.855,0,.239,{ic:.231}],60428:[.855,0,.681,{ic:.11}],60429:[.732,.011,.361,{ic:.103}],60430:[.816,0,.681,{ic:.11}],60432:[.881,.186,.736,{ic:.026}],60433:[.631,.186,.5,{ic:.022}],61699:[.716,.022,1.111,{ic:.052}],61700:[.305,-.244,.667,{ic:.064}],61705:[.127,0,.611],61719:[.353,-.098,.239,{ic:.043}],61720:[.759,.055,.528,{ic:.017}],61721:[.753,.041,.444,{ic:.019}],61722:[.694,.217,.694,{ic:.055}],61723:[.445,.205,.537,{ic:.014}],61724:[.694,.195,.728,{ic:.037}],61725:[.694,.195,.891,{ic:.031}],61726:[.694,.195,.639,{ic:.052}],61729:[.445,.162,.539,{ic:.001}],61730:[.445,.162,.68,{ic:.003}],61731:[.455,.311,.517,{ic:.018}],61734:[.694,.195,.542,{ic:.105}],61735:[.716,.022,.639,{ic:.084}],61736:[.445,.162,.39,{ic:.084}],61737:[.461,.011,.444,{ic:.057}],61738:[.694,.217,.875,{ic:.048}],61739:[.694,.217,.639,{ic:.052}],61740:[.445,.205,.669,{ic:.014}],61741:[.455,.322,.517,{ic:.018}],61743:[.658,.205,.555,{ic:.099}],61747:[.694,0,.667],61748:[.822,0,.639,{ic:.066}],61749:[.455,.011,.633],61750:[.625,.011,.417,{ic:.016}],61751:[.005,.208,.139],61752:[.004,.206,.194],61757:[.722,-.526,.667,{ic:.158}],61761:[.695,-.528,.5,{ic:.031}],61762:[.695,-.528,.5],61763:[.283,-.031,.444],61764:[.283,-.031,.444],61765:[.695,-.4,.333,{ic:.124}],61766:[.678,-.41,.222,{ic:.199}],61771:[.039,.039,.333,{ic:.038}],61772:[.212,.039,.333,{ic:.039}],61773:[.386,.039,.333,{ic:.038}],61774:[.56,.039,.333,{ic:.038}],61775:[.733,.039,.333,{ic:.038}],61776:[.212,.039,.333,{ic:.075}],61777:[.386,.039,.333,{ic:.112}],61778:[.56,.039,.333,{ic:.149}],61779:[.733,.04,.333,{ic:.186}],61780:[.039,.039,.222,{ic:.039}],61781:[.212,.039,.222,{ic:.039}],61782:[.386,.039,.222,{ic:.038}],61783:[.56,.039,.222,{ic:.038}],61784:[.733,.039,.222,{ic:.038}],61785:[.212,.039,.222,{ic:.075}],61786:[.386,.039,.222,{ic:.112}],61787:[.56,.039,.222,{ic:.149}],61788:[.733,.039,.222,{ic:.186}],61791:[.695,-.488,.5],61792:[.695,-.488,.5],61793:[.695,-.528,.5],61794:[.695,-.528,.5],61795:[.695,-.528,.5,{ic:.032}],61796:[.695,-.528,.5,{ic:.068}],61797:[.455,.195,.314],61800:[.461,.016,.722,{ic:.03}],61804:[.445,.205,.267,{ic:.014}],61805:[.027,.205,.333],61806:[.1,.217,.222,{ic:.034}],61807:[.1,.217,.222],61808:[.1,.217,.278],61809:[.684,-.445,.339,{ic:.091}],61810:[.732,-.482,.444,{ic:.1}],61813:[.455,.011,.517,{ic:.013}],61817:[.711,.22,.5,{ic:.056}],61818:[.461,.22,.444,{ic:.057}],61819:[.695,.011,.697,{ic:.067}],61822:[.455,.217,.556,{ic:.042}],61823:[.455,.217,.556,{ic:.042}],61824:[.717,.217,.536,{ic:.039}],61826:[.679,.205,.331,{ic:.026}],61828:[.695,0,.794],61829:[.455,0,.628],61832:[.455,.002,.611,{ic:.03}],61833:[.455,.217,.544,{ic:.02}],61834:[.571,.011,.528,{ic:.05}],61835:[.455,.252,.361],61836:[.445,.233,.5,{ic:.044}],61837:[.467,.233,.5,{ic:.035}],61838:[.695,.067,.5],61839:[.695,.011,.5],61842:[.695,0,.342,{ic:.083}],61850:[.445,0,.463,{ic:.07}],61854:[.445,0,.483,{ic:.038}],61855:[.445,0,.372,{ic:.038}],61857:[.46,0,.484,{ic:.009}],61859:[.717,-.528,.5],61860:[.717,-.528,.5,{ic:.02}],61863:[.011,.217,.222],61864:[.011,.217,.222,{ic:.034}],61865:[-.111,.295,.5],61866:[-.094,.303,.5],61867:[.272,-.216,.278],61868:[.353,-.098,.239],61869:[-.111,.295,.5],61870:[-.111,.325,.5],61871:[-.101,.266,.5],61872:[-.025,.275,.556],61873:[.661,-.467,.555],61874:[.738,-.508,.5],61875:[.738,-.508,.5],61876:[.802,.302,1.111],61877:[.854,.354,1.111],62082:[.07,0,.278],62083:[.728,-.511,.5],62110:[.733,-.508,.5],62113:[.694,.022,.639,{ic:.051}],62116:[.694,0,.694,{ic:.054}],62119:[.694,0,.694,{ic:.053}],62120:[.694,.195,1.091,{ic:.044}],62121:[.445,.011,.48,{ic:.013}],62124:[.445,0,.537,{ic:.013}],62126:[.445,0,.537,{ic:.013}],62127:[.445,.162,.76,{ic:.012}],62560:[.85,0,.667,{ic:.002}],62561:[.857,0,.597,{ic:.093}],62562:[.857,0,.694,{ic:.054}],62563:[.85,.022,.736,{ic:.027}],62564:[.857,0,.667,{ic:.135}],62565:[.857,0,.889,{ic:.047}],62566:[.857,.022,.639,{ic:.016}],62567:[.857,.022,1.041,{ic:.027}],62568:[.857,0,.646,{ic:.058}],62570:[.64,.011,.48,{ic:.011}],62571:[.64,.011,.444,{ic:.028}],62572:[.641,0,.537,{ic:.013}],62573:[.64,.011,.5,{ic:.046}],62574:[.641,.205,.461,{ic:.083}],62575:[.641,0,.683,{ic:.013}],62576:[.641,.011,.444,{ic:.031}],62577:[.641,.011,.73,{ic:.022}],62578:[.641,0,.515,{ic:.042}],63166:[.444,.205,.267,{ic:.012}],63187:[.851,-.76,.5,{ic:.185}],63188:[.639,-.5,.5,{ic:.056}],63189:[.65,-.51,.5,{ic:.029}],63190:[.64,-.51,.5,{ic:.004}],63198:[.305,-.244,.75,{ic:.065}],8592:[.511,.009,1,{ic:.001}],8593:[.712,.195,.5,{ic:.072}],8594:[.511,.009,1],8595:[.695,.211,.5],8730:[.763,.104,.472,{ic:.212}],8738:[.583,.083,.778,{ic:.048}],9001:[.751,.249,.389,{ic:.102}],9002:[.751,.249,.389],9702:[.407,-.121,.778],10214:[.751,.249,.403,{ic:.138}],10215:[.751,.249,.403,{ic:.042}]}},SSBIX:{"sans-serif-bold-italic":{161:[.5,.194,.367],162:[.548,.089,.459,{ic:.053}],164:[.541,.041,.856],166:[.75,.25,.319,{ic:.03}],169:[.694,0,.694,{ic:.115}],170:[.715,-.276,.416,{ic:.117}],171:[.5,0,.55,{ic:.045}],173:[.265,-.193,.367],174:[.694,0,.694,{ic:.115}],186:[.684,-.278,.461,{ic:.061}],187:[.5,0,.55],188:[.739,.037,.88,{ic:.033}],189:[.739,.037,.978,{ic:.023}],190:[.739,.037,.88,{ic:.033}],191:[.528,.178,.519],3647:[.794,.1,.733,{ic:.045}],8204:[0,0,0],8205:[0,0,0],8218:[.129,.113,.306],8219:[.695,-.453,.306,{ic:.066}],8222:[.129,.113,.529],8223:[.722,-.48,.61],8226:[.418,-.114,.856],8233:[.722,.194,.519,{ic:.153}],8240:[.773,.079,1.4],8241:[.773,.079,1.845],8249:[.5,0,.319,{ic:.048}],8250:[.5,0,.319],8251:[.541,.04,.856],8253:[.743,0,.487,{ic:.108}],8255:[-.063,.194,.649],8256:[.696,-.565,.649,{ic:.083}],8261:[.751,.252,.397,{ic:.104}],8262:[.751,.252,.397,{ic:.096}],8274:[.768,.016,.55,{ic:.113}],8276:[-.063,.194,.649],8319:[.587,-.305,.336,{ic:.086}],8320:[.361,.03,.489],8353:[.885,.193,.703,{ic:.073}],8358:[.694,0,.794,{ic:.082}],8361:[.694,0,1.039,{ic:.131}],8363:[.654,.168,.561,{ic:.092}],8369:[.694,0,.703,{ic:.052}],8370:[.887,.191,.733,{ic:.055}],8451:[.706,.011,1.053,{ic:.073}],8470:[.694,0,.959,{ic:.062}],8471:[.694,0,.694,{ic:.115}],8478:[.694,0,.703,{ic:.076}],8480:[.711,-.27,.869,{ic:.115}],8482:[.698,-.28,.952,{ic:.115}],8494:[.712,.01,.758,{ic:.087}],8960:[.636,.135,.856,{ic:.079}],9250:[.653,.01,.627,{ic:.04}],9251:[.276,.122,.55,{ic:.013}],11800:[.529,.214,.487],64256:[.706,0,.642,{ic:.19}],64257:[.706,0,.586,{ic:.084}],64258:[.706,0,.586,{ic:.085}],64259:[.706,0,.892,{ic:.084}],64260:[.706,0,.892,{ic:.085}],65126:[.354,-.053,.367,{ic:.009}],184:[-.023,.194,.489],688:[.73,-.306,.336,{ic:.09}],689:[.772,-.306,.336,{ic:.153}],690:[.717,-.183,.173,{ic:.111}],691:[.601,-.305,.223,{ic:.12}],692:[.601,-.305,.223,{ic:.07}],693:[.58,-.159,.223,{ic:.112}],694:[.597,-.299,.33,{ic:.095}],695:[.593,-.305,.446,{ic:.122}],696:[.581,-.184,.3,{ic:.118}],697:[.695,-.507,.183,{ic:.158}],698:[.695,-.507,.423,{ic:.118}],699:[.722,-.48,.305,{ic:.057}],700:[.722,-.48,.305,{ic:.059}],701:[.695,-.453,.306,{ic:.066}],702:[.63,-.268,.436,{ic:.055}],703:[.63,-.268,.436,{ic:.058}],704:[.761,-.496,.489,{ic:.038}],705:[.761,-.496,.489,{ic:.033}],706:[.737,-.487,.367,{ic:.122}],707:[.737,-.487,.367,{ic:.102}],708:[.694,-.546,.55,{ic:.006}],709:[.661,-.513,.55,{ic:.03}],712:[.694,-.451,.244,{ic:.06}],716:[.049,.194,.244],718:[-.132,.287,.55],719:[-.136,.288,.55],720:[.458,.003,.306,{ic:.028}],721:[.458,-.281,.306,{ic:.03}],722:[.454,-.15,.367],723:[.454,-.15,.367,{ic:.01}],724:[.317,-.065,.489],725:[.317,-.065,.489],726:[.313,-.004,.489],727:[.275,-.183,.489],731:[.018,.213,.55],733:[.694,-.546,.55,{ic:.054}],734:[.463,-.214,.367,{ic:.1}],735:[.672,-.462,.55,{ic:.034}],736:[.58,-.174,.3,{ic:.106}],737:[.738,-.305,.153,{ic:.12}],738:[.59,-.298,.253,{ic:.095}],739:[.58,-.305,.3,{ic:.095}],740:[.729,-.305,.33,{ic:.108}],741:[.716,.022,.367,{ic:.219}],742:[.717,.022,.367,{ic:.219}],743:[.717,.022,.367,{ic:.219}],744:[.717,.022,.367,{ic:.219}],745:[.716,.022,.367,{ic:.219}],746:[.716,-.228,.367,{ic:.155}],747:[.717,.022,.367,{ic:.173}],748:[-.042,.19,.55],749:[.767,-.532,.55,{ic:.224}],750:[.722,-.48,.505,{ic:.059}],751:[0,.228,.556],752:[0,.228,.556],753:[-.041,.291,.367],754:[-.041,.291,.367],755:[-.041,.224,.223],756:[.314,-.167,.436],757:[.314,-.167,.554],758:[.314,-.167,.554,{ic:.016}],759:[-.042,.169,.55],760:[.544,-.203,.306,{ic:.027}],761:[.672,-.431,.318,{ic:.126}],762:[.672,-.431,.318,{ic:.126}],763:[.129,.112,.318],764:[.129,.112,.318,{ic:.01}],765:[.129,.112,.558,{ic:.01}],766:[.129,.112,.558],777:[.72,-.513,0,{dx:.117}],779:[.695,-.507,0,{dx:.101}],781:[.717,-.529,0,{dx:.124}],782:[.717,-.529,0,{dx:.128}],783:[.695,-.507,0,{dx:.164}],784:[.817,-.533,.256],785:[.685,-.513,.256],786:[.722,-.48,.305,{ic:.057}],787:[.692,-.45,0,{dx:-.012}],788:[.692,-.45,0,{dx:-.022}],789:[.866,-.624,0,{dx:-.153}],790:[-.136,.283,0,{dx:.367}],791:[-.136,.284,0,{dx:.266}],792:[-.066,.38,.489],793:[-.066,.38,.489],794:[.806,-.565,.18,{ic:.205}],795:[.692,-.45,0,{dx:-.012}],796:[-.042,.346,0,{dx:.232}],797:[-.095,.317,0,{dx:.304}],798:[-.063,.285,0,{dx:.266}],799:[-.066,.375,0,{dx:.292}],800:[-.059,.144,0,{dx:.27}],801:[.024,.217,0,{dx:.22}],802:[.024,.217,0,{dx:.243}],803:[-.09,.195,0,{dx:.292}],804:[-.09,.195,0,{dx:.306}],805:[-.058,.241,.223],806:[-.066,.308,0,{dx:.303}],807:[-.023,.194,0,{dx:.316}],808:[.008,.223,0,{dx:.23}],809:[-.063,.306,0,{dx:.162}],810:[-.111,.297,0,{dx:.32}],811:[-.112,.308,0,{dx:.318}],812:[-.062,.21,0,{dx:.269}],813:[-.062,.21,0,{dx:.301}],814:[-.041,.213,0,{dx:.281}],815:[-.041,.213,0,{dx:.296}],816:[-.08,.207,0,{dx:.292}],817:[-.099,.184,0,{dx:.291}],818:[-.099,.184,0,{dx:.291}],819:[-.042,.267,0,{dx:.294}],820:[.333,-.206,0],821:[.284,-.219,0],822:[.284,-.219,0],823:[.448,-.12,0],825:[-.042,.346,0,{dx:.219}],826:[-.115,.301,0,{dx:.32}],827:[-.111,.337,0,{dx:.324}],828:[-.1,.233,0,{dx:.317}],829:[.672,-.462,0,{dx:.155}],830:[.864,-.498,.209,{ic:.153}],831:[.772,-.537,.855,{ic:.071}],832:[.684,-.537,.55],833:[.685,-.537,.55,{ic:.044}],834:[.65,-.52,.633],835:[.694,-.511,.222,{ic:.093}],836:[.694,-.508,.278,{ic:.167}],837:[-.068,.257,.11],838:[.698,-.512,0,{dx:.147}],839:[-.071,.373,0,{dx:.256}],840:[-.143,.323,0,{dx:.313}],841:[-.067,.308,0,{dx:.204}],842:[.771,-.474,.55,{ic:.055}],843:[.797,-.465,.55,{ic:.055}],844:[.837,-.503,.556,{ic:.165}],845:[-.025,.319,0,{dx:.346}],846:[-.031,.313,0,{dx:.337}],847:[0,0,0],848:[.789,-.495,.278,{ic:.086}],849:[.689,-.506,.223,{ic:.081}],850:[.817,-.533,.256],851:[-.085,.356,0,{dx:.292}],852:[-.017,.311,0,{dx:.331}],853:[-.017,.311,0,{dx:.361}],854:[-.017,.311,0,{dx:.218}],855:[.689,-.506,.223,{ic:.073}],856:[.672,-.567,0,{dx:-.08}],857:[-.041,.287,.317],858:[-.041,.224,.369],859:[.757,-.451,.5,{ic:.087}],860:[-.152,.431,0,{dx:.381}],861:[.765,-.486,0,{dx:-.19}],862:[.633,-.548,0,{dx:-.115}],863:[-.099,.184,0,{dx:.03}],864:[.722,-.562,0,{dx:-.137}],865:[.666,-.387,0],866:[-.011,.334,0,{dx:.038}],867:[.712,-.474,.294,{ic:.11}],868:[.715,-.477,.289,{ic:.109}],869:[.803,-.476,.13,{ic:.139}],870:[.714,-.476,.296,{ic:.112}],871:[.705,-.475,.267,{ic:.119}],872:[.712,-.474,.255,{ic:.114}],873:[.807,-.472,.273,{ic:.142}],874:[.809,-.478,.258,{ic:.121}],875:[.709,-.478,.442,{ic:.108}],876:[.708,-.478,.23,{ic:.104}],877:[.768,-.472,.222,{ic:.114}],878:[.703,-.476,.294,{ic:.111}],879:[.705,-.478,.32,{ic:.097}],7620:[.695,-.486,0,{dx:.117}],7621:[.695,-.486,0,{dx:.173}],7624:[.695,-.537,0,{dx:.145}],7625:[.695,-.537,0,{dx:.145}],9474:[.752,.253,.306,{ic:.074}],9553:[.752,.253,.531,{ic:.078}],9773:[.593,.001,.7,{ic:.04}],9792:[.48,.217,.55,{ic:.034}],9834:[.724,.052,.672,{ic:.016}],9901:[.484,-.022,.67,{ic:.062}],9902:[.629,.127,1.249,{ic:.052}],9906:[.48,.217,.55,{ic:.034}],10013:[.632,.028,.55,{ic:.068}],59395:[.706,0,.867,{ic:.055}],59908:[.866,-.519,.55,{ic:.067}],59909:[-.071,.213,.55],59910:[-.071,.213,.55],59913:[.866,-.545,.55,{ic:.058}],59915:[.923,-.545,.55,{ic:.058}],59917:[.687,-.545,.55,{ic:.06}],59920:[.888,-.545,.55,{ic:.097}],59927:[.841,-.535,.55,{ic:.061}],59930:[.841,-.535,.55,{ic:.041}],59932:[.898,-.535,.55,{ic:.119}],59934:[.863,-.535,.55,{ic:.091}],59935:[-.079,.292,.55],59942:[.694,-.537,.55,{ic:.008}],59946:[.858,-.564,.55,{ic:.116}],59948:[.846,-.564,.55,{ic:.082}],59951:[.858,-.564,.55,{ic:.051}],59957:[.719,-.513,.55],59962:[-.099,.184,.55],59966:[-.099,.184,.55],59970:[.863,-.526,.733],59973:[-.076,.207,.55],60163:[.885,.213,.733,{ic:.031}],60164:[.694,.213,.525,{ic:.05}],60168:[.694,0,.694,{ic:.115}],60175:[.694,0,.694,{ic:.115}],60176:[0,0,0],60177:[0,0,0],60178:[0,0,0],60182:[.631,.025,.55,{ic:.066}],60185:[-.085,.2,.306],60190:[.885,.213,.642,{ic:.082}],60191:[.694,.213,.511,{ic:.05}],60200:[.716,.022,1.222,{ic:.042}],60201:[.5,.244,.519],60203:[.844,.15,.733,{ic:.057}],60209:[.356,-.053,.367,{ic:.011}],60213:[.885,.213,.331,{ic:.262}],60214:[.694,.213,.256,{ic:.187}],60218:[.885,.022,.519,{ic:.265}],60219:[.694,.205,.286,{ic:.187}],60224:[.797,.073,1.1,{ic:.184}],60232:[.885,.213,.794,{ic:.054}],60233:[.694,.213,.55,{ic:.051}],60237:[.347,.056,.485],60257:[.416,-.292,.256,{ic:.146}],60259:[.667,-.486,.336,{ic:.483}],60261:[.694,-.563,.256,{ic:.464}],60270:[.694,.213,.764,{ic:.052}],60271:[.458,.213,.561,{ic:.033}],60424:[.877,0,.794,{ic:.052}],60425:[.877,0,.561,{ic:.09}],60426:[.877,0,.581],60427:[.877,0,.256,{ic:.242}],60428:[.877,0,.733,{ic:.102}],60429:[.772,.011,.404,{ic:.098}],60430:[.849,0,.733,{ic:.102}],60432:[.889,.194,.794,{ic:.052}],60433:[.653,.194,.55,{ic:.048}],61699:[.717,.022,1.222,{ic:.039}],61700:[.32,-.247,.733,{ic:.063}],61705:[.131,0,.672],61719:[.419,-.119,.255,{ic:.08}],61720:[.779,.05,.55,{ic:.066}],61721:[.761,.035,.489,{ic:.074}],61722:[.694,.217,.764,{ic:.051}],61723:[.458,.206,.592,{ic:.028}],61724:[.694,.195,.844,{ic:.013}],61725:[.694,.195,1.018,{ic:.011}],61726:[.694,.195,.703,{ic:.05}],61729:[.458,.162,.636,{ic:.007}],61730:[.458,.162,.782],61731:[.469,.311,.561,{ic:.024}],61734:[.694,.195,.58,{ic:.103}],61735:[.717,.022,.703,{ic:.074}],61736:[.458,.162,.418,{ic:.083}],61737:[.475,.013,.489,{ic:.053}],61738:[.694,.217,.978,{ic:.054}],61739:[.694,.217,.703,{ic:.052}],61740:[.458,.206,.744,{ic:.03}],61741:[.469,.322,.561,{ic:.024}],61743:[.811,.285,.611,{ic:.107}],61747:[.694,.002,.733],61748:[.871,0,.703,{ic:.076}],61749:[.471,.011,.696,{ic:.055}],61750:[.638,.011,.458,{ic:.022}],61751:[-.001,.226,.153],61752:[0,.216,.214,{ic:.001}],61757:[.722,-.521,.733,{ic:.149}],61761:[.695,-.537,.55,{ic:.024}],61762:[.695,-.537,.55],61763:[.316,-.001,.489],61764:[.316,-.001,.489],61765:[.695,-.412,.367,{ic:.114}],61766:[.684,-.389,.244,{ic:.209}],61771:[.068,.068,.367,{ic:.071}],61772:[.242,.068,.367,{ic:.078}],61773:[.415,.068,.367,{ic:.074}],61774:[.589,.068,.367,{ic:.073}],61775:[.762,.068,.367,{ic:.07}],61776:[.242,.068,.367,{ic:.112}],61777:[.415,.068,.367,{ic:.148}],61778:[.589,.068,.367,{ic:.185}],61779:[.762,.068,.367,{ic:.223}],61780:[.068,.068,.244,{ic:.076}],61781:[.242,.068,.244,{ic:.077}],61782:[.415,.068,.244,{ic:.072}],61783:[.589,.068,.244,{ic:.07}],61784:[.762,.068,.244,{ic:.072}],61785:[.242,.068,.244,{ic:.112}],61786:[.415,.068,.244,{ic:.149}],61787:[.589,.068,.244,{ic:.187}],61788:[.763,.068,.244,{ic:.223}],61791:[.695,-.478,.55],61792:[.695,-.486,.55],61793:[.695,-.536,.55],61794:[.695,-.536,.55],61795:[.695,-.531,.55,{ic:.053}],61796:[.695,-.531,.55,{ic:.053}],61797:[.469,.195,.342,{ic:.034}],61800:[.475,.016,.794,{ic:.047}],61804:[.458,.205,.286,{ic:.037}],61805:[.032,.206,.367],61806:[.116,.217,.244,{ic:.04}],61807:[.116,.217,.244],61808:[.115,.217,.306],61809:[.684,-.458,.378,{ic:.085}],61810:[.816,-.494,.489,{ic:.11}],61813:[.469,.011,.561,{ic:.034}],61817:[.711,.223,.55,{ic:.058}],61818:[.475,.223,.489,{ic:.055}],61819:[.695,.011,.76,{ic:.084}],61822:[.469,.217,.611,{ic:.035}],61823:[.469,.217,.611,{ic:.036}],61824:[.717,.217,.586,{ic:.052}],61826:[.696,.206,.36,{ic:.043}],61828:[.695,0,.867,{ic:.041}],61829:[.469,0,.683,{ic:.029}],61832:[.469,.011,.672,{ic:.049}],61833:[.469,.217,.592,{ic:.057}],61834:[.59,.011,.588,{ic:.042}],61835:[.469,.249,.404],61836:[.458,.258,.55,{ic:.042}],61837:[.48,.258,.55,{ic:.036}],61838:[.695,.069,.55,{ic:.011}],61839:[.695,.011,.55],61842:[.695,0,.372,{ic:.083}],61850:[.458,.002,.574,{ic:.05}],61854:[.459,0,.598,{ic:.036}],61855:[.458,0,.448,{ic:.024}],61857:[.474,.003,.604,{ic:.011}],61859:[.717,-.537,.55],61860:[.717,-.537,.55,{ic:.055}],61863:[.024,.217,.244],61864:[.024,.217,.244,{ic:.04}],61865:[-.111,.3,.55],61866:[-.112,.308,.55],61867:[.284,-.22,.305],61868:[.419,-.119,.255],61869:[-.112,.301,.55],61870:[-.111,.337,.55],61871:[-.1,.233,.55],61872:[-.011,.334,.611],61873:[.689,-.481,.611],61874:[.752,-.53,.55],61875:[.752,-.53,.55],61876:[.835,.335,1.222],61877:[.94,.44,1.222],62082:[.112,.001,.305],62083:[.735,-.528,.55],62110:[.747,-.53,.55],62113:[.694,.022,.703,{ic:.055}],62116:[.694,0,.764,{ic:.055}],62119:[.694,0,.764,{ic:.055}],62120:[.694,.194,1.223,{ic:.037}],62121:[.458,.011,.525,{ic:.028}],62124:[.458,0,.592,{ic:.028}],62126:[.458,0,.592,{ic:.028}],62127:[.458,.162,.836,{ic:.028}],62560:[.912,0,.733,{ic:.001}],62561:[.912,0,.642,{ic:.084}],62562:[.912,0,.764,{ic:.085}],62563:[.912,.022,.794,{ic:.077}],62564:[.912,0,.733,{ic:.13}],62565:[.912,0,.978,{ic:.058}],62566:[.912,.022,.703,{ic:.075}],62567:[.912,.022,1.14,{ic:.052}],62568:[.912,0,.703,{ic:.058}],62570:[.668,.01,.493,{ic:.061}],62571:[.668,.01,.48,{ic:.066}],62572:[.668,0,.592,{ic:.008}],62573:[.668,.01,.517,{ic:.05}],62574:[.661,.167,.47,{ic:.08}],62575:[.661,0,.744,{ic:.003}],62576:[.668,.011,.489,{ic:.032}],62577:[.668,.011,.8,{ic:.024}],62578:[.661,0,.555,{ic:.017}],63166:[.522,.033,.391,{ic:.037}],63187:[.878,-.763,.55,{ic:.193}],63188:[.666,-.52,.55,{ic:.051}],63189:[.678,-.529,.55,{ic:.042}],63190:[.68,-.528,.55],63198:[.319,-.247,.825,{ic:.067}],8592:[.548,.046,1.1],8593:[.668,.194,.622,{ic:.079}],8594:[.548,.046,1.1],8595:[.668,.194,.622,{ic:.012}],8730:[.807,.082,.519,{ic:.25}],8738:[.634,.134,.856,{ic:.04}],9001:[.761,.262,.428,{ic:.107}],9002:[.761,.262,.428,{ic:.004}],9702:[.418,-.114,.856],10214:[.75,.222,.545,{ic:.111}],10215:[.75,.222,.545,{ic:.111}]}}},"NCM"),{},["MJX-NCM-SSX","MJX-NCM-SSBX","MJX-NCM-SSIX","MJX-NCM-SSBIX"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/sans-serif-ex","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/braille.js 0000644 0001762 0000144 00000013704 15112352537 022730 0 ustar ligges users (()=>{"use strict";const t=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","braille",t({br:{"sans-serif":{10240:[0,0,.725],10241:[.651,-.492,.725],10242:[.405,-.246,.725],10243:[.651,-.246,.725],10244:[.159,0,.725],10245:[.651,0,.725],10246:[.405,0,.725],10247:[.651,0,.725],10248:[.651,-.492,.725],10249:[.651,-.492,.725],10250:[.651,-.246,.725],10251:[.651,-.246,.725],10252:[.651,0,.725],10253:[.651,0,.725],10254:[.651,0,.725],10255:[.651,0,.725],10256:[.405,-.246,.725],10257:[.651,-.246,.725],10258:[.405,-.246,.725],10259:[.651,-.246,.725],10260:[.405,0,.725],10261:[.651,0,.725],10262:[.405,0,.725],10263:[.651,0,.725],10264:[.651,-.246,.725],10265:[.651,-.246,.725],10266:[.651,-.246,.725],10267:[.651,-.246,.725],10268:[.651,0,.725],10269:[.651,0,.725],10270:[.651,0,.725],10271:[.651,0,.725],10272:[.159,0,.725],10273:[.651,0,.725],10274:[.405,0,.725],10275:[.651,0,.725],10276:[.159,0,.725],10277:[.651,0,.725],10278:[.405,0,.725],10279:[.651,0,.725],10280:[.651,0,.725],10281:[.651,0,.725],10282:[.651,0,.725],10283:[.651,0,.725],10284:[.651,0,.725],10285:[.651,0,.725],10286:[.651,0,.725],10287:[.651,0,.725],10288:[.405,0,.725],10289:[.651,0,.725],10290:[.405,0,.725],10291:[.651,0,.725],10292:[.405,0,.725],10293:[.651,0,.725],10294:[.405,0,.725],10295:[.651,0,.725],10296:[.651,0,.725],10297:[.651,0,.725],10298:[.651,0,.725],10299:[.651,0,.725],10300:[.651,0,.725],10301:[.651,0,.725],10302:[.651,0,.725],10303:[.651,0,.725],10304:[-.087,.246,.725],10305:[.651,.246,.725],10306:[.405,.246,.725],10307:[.651,.246,.725],10308:[.159,.246,.725],10309:[.651,.246,.725],10310:[.405,.246,.725],10311:[.651,.246,.725],10312:[.651,.246,.725],10313:[.651,.246,.725],10314:[.651,.246,.725],10315:[.651,.246,.725],10316:[.651,.246,.725],10317:[.651,.246,.725],10318:[.651,.246,.725],10319:[.651,.246,.725],10320:[.615,.246,.725],10321:[.651,.246,.725],10322:[.405,.246,.725],10323:[.651,.246,.725],10324:[.405,.246,.725],10325:[.651,.246,.725],10326:[.405,.246,.725],10327:[.651,.246,.725],10328:[.651,.246,.725],10329:[.651,.246,.725],10330:[.651,.246,.725],10331:[.651,.246,.725],10332:[.651,.246,.725],10333:[.651,.246,.725],10334:[.651,.246,.725],10335:[.651,.246,.725],10336:[.159,.246,.725],10337:[.651,.246,.725],10338:[.405,.246,.725],10339:[.651,.246,.725],10340:[.159,.246,.725],10341:[.651,.246,.725],10342:[.405,.246,.725],10343:[.651,.246,.725],10344:[.651,.246,.725],10345:[.651,.246,.725],10346:[.651,.246,.725],10347:[.651,.246,.725],10348:[.651,.246,.725],10349:[.651,.246,.725],10350:[.651,.246,.725],10351:[.651,.246,.725],10352:[.405,.246,.725],10353:[.651,.246,.725],10354:[.405,.246,.725],10355:[.651,.246,.725],10356:[.405,.246,.725],10357:[.651,.246,.725],10358:[.405,.246,.725],10359:[.651,.246,.725],10360:[.651,.246,.725],10361:[.651,.246,.725],10362:[.651,.246,.725],10363:[.651,.246,.725],10364:[.651,.246,.725],10365:[.651,.246,.725],10366:[.651,.246,.725],10367:[.651,.246,.725],10368:[-.087,.246,.725],10369:[.651,.246,.725],10370:[.405,.246,.725],10371:[.651,.246,.725],10372:[.159,.246,.725],10373:[.651,.246,.725],10374:[.405,.246,.725],10375:[.651,.246,.725],10376:[.651,.246,.725],10377:[.651,.246,.725],10378:[.651,.246,.725],10379:[.651,.246,.725],10380:[.651,.246,.725],10381:[.651,.246,.725],10382:[.651,.246,.725],10383:[.651,.246,.725],10384:[.405,.246,.725],10385:[.651,.246,.725],10386:[.405,.246,.725],10387:[.651,.246,.725],10388:[.405,.246,.725],10389:[.651,.246,.725],10390:[.405,.246,.725],10391:[.651,.246,.725],10392:[.651,.246,.725],10393:[.651,.246,.725],10394:[.651,.246,.725],10395:[.651,.246,.725],10396:[.651,.246,.725],10397:[.651,.246,.725],10398:[.651,.246,.725],10399:[.651,.246,.725],10400:[.159,.246,.725],10401:[.651,.246,.725],10402:[.405,.246,.725],10403:[.651,.246,.725],10404:[.159,.246,.725],10405:[.651,.246,.725],10406:[.405,.246,.725],10407:[.651,.246,.725],10408:[.651,.246,.725],10409:[.651,.246,.725],10410:[.651,.246,.725],10411:[.651,.246,.725],10412:[.651,.246,.725],10413:[.651,.246,.725],10414:[.651,.246,.725],10415:[.651,.246,.725],10416:[.405,.246,.725],10417:[.651,.246,.725],10418:[.405,.246,.725],10419:[.651,.246,.725],10420:[.405,.246,.725],10421:[.651,.246,.725],10422:[.405,.246,.725],10423:[.651,.246,.725],10424:[.651,.246,.725],10425:[.651,.246,.725],10426:[.651,.246,.725],10427:[.651,.246,.725],10428:[.651,.246,.725],10429:[.651,.246,.725],10430:[.651,.246,.725],10431:[.651,.246,.725],10432:[-.087,.246,.725],10433:[.651,.246,.725],10434:[.405,.246,.725],10435:[.651,.246,.725],10436:[.159,.246,.725],10437:[.651,.246,.725],10438:[.405,.246,.725],10439:[.651,.246,.725],10440:[.651,.246,.725],10441:[.651,.246,.725],10442:[.651,.246,.725],10443:[.651,.246,.725],10444:[.651,.246,.725],10445:[.651,.246,.725],10446:[.651,.246,.725],10447:[.651,.246,.725],10448:[.405,.246,.725],10449:[.651,.246,.725],10450:[.405,.246,.725],10451:[.651,.246,.725],10452:[.405,.246,.725],10453:[.651,.246,.725],10454:[.405,.246,.725],10455:[.651,.246,.725],10456:[.651,.246,.725],10457:[.651,.246,.725],10458:[.651,.246,.725],10459:[.651,.246,.725],10460:[.651,.246,.725],10461:[.651,.246,.725],10462:[.651,.246,.725],10463:[.651,.246,.725],10464:[.159,.246,.725],10465:[.651,.246,.725],10466:[.405,.246,.725],10467:[.651,.246,.725],10468:[.159,.246,.725],10469:[.651,.246,.725],10470:[.405,.246,.725],10471:[.651,.246,.725],10472:[.651,.246,.725],10473:[.651,.246,.725],10474:[.651,.246,.725],10475:[.651,.246,.725],10476:[.651,.246,.725],10477:[.651,.246,.725],10478:[.651,.246,.725],10479:[.651,.246,.725],10480:[.405,.246,.725],10481:[.651,.246,.725],10482:[.405,.246,.725],10483:[.651,.246,.725],10484:[.405,.246,.725],10485:[.651,.246,.725],10486:[.405,.246,.725],10487:[.651,.246,.725],10488:[.651,.246,.725],10489:[.651,.246,.725],10490:[.651,.246,.725],10491:[.651,.246,.725],10492:[.651,.246,.725],10493:[.651,.246,.725],10494:[.651,.246,.725],10495:[.651,.246,.725]}}},"NCM"),{},["MJX-NCM-br"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/braille","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/accents.js 0000644 0001762 0000144 00000016501 15112352537 022734 0 ustar ligges users (()=>{"use strict";const d=MathJax._.output.chtml.DynamicFonts.AddFontIds,i=MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont,x=MathJax._.output.common.Direction,c=(x.DIRECTION,x.V,x.H);i.dynamicSetup("","accents",d({"":{normal:{184:[.005,.2,.444],688:[.712,-.287,.366],689:[.714,-.287,.366],690:[.691,-.162,.254],691:[.557,-.287,.257],692:[.55,-.28,.257],693:[.55,-.164,.308],694:[.554,-.287,.321],695:[.557,-.287,.499],696:[.557,-.168,.366],697:[.705,-.423,.278],698:[.705,-.423,.374],699:[.692,-.394,.278],700:[.694,-.397,.278],701:[.694,-.397,.278],702:[.667,-.326,.398],703:[.667,-.326,.398],704:[.761,-.344,.444],705:[.761,-.345,.444],706:[.709,-.495,.333],707:[.709,-.495,.333],708:[.744,-.562,.556,{ic:.005}],709:[.744,-.562,.556,{ic:.005}],712:[.686,-.443,.278],716:[.027,.194,.222],718:[-.128,.28,.5],719:[-.128,.28,.5],720:[.441,.011,.278],721:[.441,-.277,.278],722:[.356,-.119,.333],723:[.356,-.119,.333],724:[.243,-.046,.444],725:[.245,-.048,.444],726:[.243,-.002,.444],727:[.139,-.106,.444],731:[.005,.211,.5],733:[.697,-.51,.5,{sk:.024}],734:[.439,-.231,.333],735:[.671,-.485,.5],736:[.545,-.157,.316],737:[.712,-.287,.175],738:[.559,-.279,.259],739:[.551,-.287,.366],740:[.711,-.288,.3],741:[.713,.019,.333,{ic:.019}],742:[.713,.019,.333,{ic:.018}],743:[.713,.019,.333,{ic:.018}],744:[.713,.019,.333,{ic:.018}],745:[.713,.019,.333,{ic:.018}],746:[.713,-.261,.333,{ic:.016}],747:[.713,-.141,.333,{ic:.018}],748:[-.038,.214,.5],749:[.781,-.641,.578],750:[.694,-.397,.359],751:[-.016,.198,.556,{ic:.005}],752:[-.016,.198,.556,{ic:.005}],753:[-.021,.235,.333],754:[-.021,.235,.333],755:[-.02,.196,.23],756:[.32,-.154,.244],757:[.32,-.154,.384],758:[.32,-.154,.384],759:[-.019,.112,.371],760:[.55,-.286,.278],761:[.672,-.452,.289],762:[.672,-.452,.289],763:[.166,.054,.289],764:[.169,.051,.289],765:[.166,.054,.521],766:[.166,.054,.521],777:[.729,-.52,0,{dx:.264}],779:[.732,-.545,0,{dx:.24}],781:[.755,-.519,0,{dx:.251}],782:[.755,-.519,0,{dx:.251}],783:[.732,-.545,0,{dx:.287}],784:[.742,-.518,.299],785:[.742,-.604,0,{dx:.264}],786:[.857,-.559,.12],787:[.694,-.496,0,{dx:.082}],788:[.694,-.496,0,{dx:.141}],789:[.855,-.557,.12],790:[-.128,.28,0,{dx:.307}],791:[-.128,.28,0,{dx:.194}],792:[-.049,.29,.444],793:[-.049,.29,.444],794:[.672,-.522,.329],795:[.694,-.496,0,{dx:-.079}],796:[-.062,.299,0,{dx:.168}],797:[-.049,.246,0,{dx:.222}],798:[-.049,.246,0,{dx:.222}],799:[-.049,.29,0,{dx:.222}],800:[-.153,.186,0,{dx:.222}],801:[.022,.205,0,{dx:.193}],802:[.022,.205,0,{dx:.029}],803:[-.094,.2,0,{dx:.265}],804:[-.066,.171,0,{dx:.251}],805:[-.058,.241,0,{dx:.398}],806:[-.066,.29,0,{dx:.264}],807:[0,.204,0,{dx:.223}],808:[.018,.198,0,{dx:.16}],809:[-.049,.27,0,{dx:.111}],810:[-.111,.274,0,{dx:.251}],811:[-.112,.283,0,{dx:.251}],812:[-.095,.244,0,{dx:.264}],813:[-.107,.256,0,{dx:.264}],814:[-.095,.233,0,{dx:.264}],815:[-.118,.256,0,{dx:.264}],816:[-.118,.31,0,{dx:.264}],817:[-.131,.162,0,{dx:.264}],818:[-.103,.143,0,{dx:.264}],819:[-.103,.293,0,{dx:.264}],820:[.334,-.24,0],821:[.248,-.226,0],822:[.248,-.226,0],823:[.348,-.145,0],825:[-.062,.299,0,{dx:.166}],826:[-.113,.275,0,{dx:.251}],827:[-.111,.287,0,{dx:.251}],828:[-.101,.243,0,{dx:.251}],829:[.671,-.485,0,{dx:.251}],830:[.705,-.394,.278],831:[.82,-.63,0,{dx:.264}],832:[.688,-.522,.5],833:[.69,-.524,.5],834:[.625,-.528,.333],835:[.694,-.496,.222],836:[.7,-.479,.278],837:[-.065,.227,.111],838:[.703,-.54,0,{dx:.251}],839:[-.068,.322,0,{dx:.19}],840:[-.151,.387,0,{dx:.251}],841:[-.067,.287,0,{dx:.167}],842:[.684,-.522,0,{dx:.249}],843:[.731,-.471,0,{dx:.249}],844:[.761,-.558,0,{dx:.249}],845:[-.091,.281,0,{dx:.264}],846:[-.03,.272,0,{dx:.283}],847:[0,0,0],848:[.704,-.454,.217],849:[.706,-.528,.15],850:[.742,-.518,0,{dx:.249}],851:[-.08,.259,0,{dx:.222}],852:[-.076,.326,.217],853:[-.076,.326,.217],854:[-.076,.326,.464],855:[.706,-.528,.148],856:[.657,-.551,0,{dx:.251}],857:[-.073,.298,.255],858:[-.058,.241,.418],859:[.681,-.44,.301],860:[-.161,.356,.716],861:[.663,-.468,0,{dx:-.008}],862:[.619,-.588,.5],863:[-.131,.162,0,{dx:0}],864:[.722,-.607,0,{dx:.001}],865:[.663,-.468,0,{dx:-.008}],866:[-.025,.275,0,{dx:.001}],867:[.67,-.431,.285],868:[.669,-.43,.262],869:[.788,-.432,.278],870:[.671,-.432,.29],871:[.668,-.431,.32],872:[.671,-.432,.26],873:[.793,-.43,.316],874:[.788,-.432,.32],875:[.667,-.435,.46],876:[.665,-.433,.237],877:[.753,-.431,.389],878:[.659,-.429,.314],879:[.658,-.433,.321],7620:[.695,-.51,0,{dx:.242}],7621:[.695,-.516,0,{dx:.259}],7624:[.695,-.503,0,{dx:.257}],7625:[.695,-.503,0,{dx:.244}],8403:[.52,.02,0,{sk:-.264}],8404:[.751,-.589,0,{dx:.264}],8405:[.751,-.589,0,{dx:.264}],8408:[.4,-.1,0,{sk:-.264}],8413:[.772,.272,0],8414:[.75,.25,0],8415:[1.03,.53,0],8420:[.835,.311,0],8421:[.75,.25,0,{sk:-.263}],8422:[.75,.25,0,{sk:-.264}],8423:[.75,.05,.944],8424:[-.096,.188,0,{dx:.264}],8425:[.726,-.552,0,{dx:.264}],8426:[.51,.01,0,{sk:-.264}],8427:[.75,.25,0,{sk:-.264}],8432:[.827,-.518,0,{dx:.26}]},"-smallop":{785:[.756,-.591,.658,{ic:.001}],812:[-.095,.27,.644,{ic:.001}],813:[-.108,.283,.644,{ic:.001}],814:[-.095,.26,.658,{ic:.001}],815:[-.118,.283,.658,{ic:.001}],816:[-.118,.319,.652],818:[-.103,.143,.568],819:[-.103,.293,.568],831:[.82,-.63,.568],845:[-.091,.281,.715]},"-largeop":{785:[.757,-.591,.784,{ic:.001}],812:[-.095,.27,.768,{ic:.001}],813:[-.108,.283,.768,{ic:.001}],814:[-.095,.26,.784,{ic:.001}],815:[-.118,.283,.784,{ic:.001}],816:[-.118,.323,.778]},"-size3":{785:[.758,-.591,.937,{ic:.001}],812:[-.095,.271,.919,{ic:.001}],813:[-.108,.284,.919,{ic:.001}],814:[-.095,.262,.937,{ic:.001}],815:[-.118,.285,.937,{ic:.001}],816:[-.118,.332,.931]},"-size4":{785:[.759,-.591,1.12,{ic:.001}],812:[-.095,.273,1.1,{ic:.001}],813:[-.108,.286,1.1,{ic:.001}],814:[-.095,.263,1.12,{ic:.001}],815:[-.118,.286,1.12,{ic:.001}],816:[-.118,.341,1.115]},"-size5":{785:[.76,-.591,1.341,{ic:.001}],812:[-.095,.274,1.32,{ic:.001}],813:[-.108,.287,1.32,{ic:.001}],814:[-.095,.264,1.341,{ic:.001}],815:[-.118,.287,1.341,{ic:.001}],816:[-.118,.35,1.335]},"-size6":{785:[.76,-.59,1.604,{ic:.001}],812:[-.096,.275,1.581,{ic:.001}],813:[-.108,.287,1.581,{ic:.001}],814:[-.095,.265,1.604,{ic:.001}],815:[-.118,.288,1.604,{ic:.001}],816:[-.118,.355,1.599]},"-size7":{785:[.761,-.59,1.92,{ic:.001}],812:[-.096,.276,1.896],813:[-.108,.288,1.896],814:[-.095,.266,1.92,{ic:.001}],815:[-.118,.289,1.92,{ic:.001}],816:[-.118,.364,1.915]},"-ex-md":{818:[-.103,.143,.19],819:[-.103,.293,.19],831:[.82,-.63,.19],845:[-.171,.201,.151]}}},"NCM"),{785:{dir:c,sizes:[.376,.658,.784,.937,1.12,1.341,1.604,1.92]},812:{dir:c,sizes:[.366,.644,.768,.919,1.1,1.32,1.581,1.896]},813:{dir:c,sizes:[.366,.644,.768,.919,1.1,1.32,1.581,1.896]},814:{dir:c,sizes:[.376,.658,.784,.937,1.12,1.341,1.604,1.92]},815:{dir:c,sizes:[.376,.658,.784,.937,1.12,1.341,1.604,1.92]},816:{dir:c,sizes:[.37,.652,.778,.931,1.115,1.335,1.599,1.915]},818:{dir:c,sizes:[.392,.568],stretch:[0,818],stretchv:[0,1],HDW:[-.103,.143,0],hd:[-.103,.143]},819:{dir:c,sizes:[.392,.568],stretch:[0,819],stretchv:[0,1],HDW:[-.103,.293,0],hd:[-.103,.293]},831:{dir:c,sizes:[.392,.568],stretch:[0,831],stretchv:[0,1],HDW:[.82,-.63,0],hd:[.82,-.63]},845:{dir:c,sizes:[.47,.715],stretch:[8430,845,8431],stretchv:[3,1,4],HDW:[-.091,.281,0],hd:[-.171,.201]},8425:{dir:c,sizes:[.36,.735,1.11,1.485,1.86,2.235,2.61,2.985],schar:[8425,9140],stretch:[9140,9140,9140],stretchv:[3,1,4],HDW:[.772,-.504,0],hd:[.772,-.706]}});MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/accents","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/greek-ss.js 0000644 0001762 0000144 00000075536 15112352537 023051 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","greek-ss",c({GKSS:{"sans-serif":{880:[.694,0,.611],881:[.529,0,.414],882:[.689,0,.68],883:[.523,0,.5],884:[.694,-.495,.194],885:[0,.2,.194,{ic:.002}],886:[.694,0,.708],887:[.529,0,.555],890:[-.067,.238,.111],891:[.461,.011,.444],892:[.461,.011,.444],893:[.461,.011,.444],894:[.444,.127,.278],895:[.694,.022,.472],900:[.694,-.495,.167],901:[.694,-.489,.264],902:[.694,0,.667],903:[.448,-.357,.278],904:[.694,0,.764],905:[.694,0,.875],906:[.694,0,.445],908:[.716,.022,.819],910:[.716,0,.945],911:[.716,0,.805],912:[.694,.011,.278],938:[.822,0,.278],939:[.822,0,.778],940:[.694,.011,.633],941:[.694,.011,.43],942:[.694,.195,.514],943:[.694,.011,.264],944:[.694,.011,.5],970:[.625,.011,.264],971:[.625,.011,.5],972:[.694,.011,.528],973:[.694,.011,.5],974:[.694,.011,.667],975:[.694,.261,.694],976:[.733,.011,.51],979:[.716,0,.945],980:[.822,0,.778],983:[.458,.268,.555],984:[.705,0,.5],985:[.613,.064,.5],986:[.689,0,.548],987:[.468,0,.5],988:[.691,0,.569],989:[.445,.195,.5],990:[.693,.034,.389],991:[.583,.145,.389],992:[.702,0,.639],993:[.722,0,.722],994:[.716,.23,.916],995:[.467,.227,.819],996:[.694,.189,.643],997:[.436,.278,.553],998:[.683,.206,.703],999:[.459,.193,.553],1e3:[.668,.162,.51],1001:[.468,.162,.51],1002:[.695,0,.787],1003:[.434,0,.567],1004:[.691,.011,.539],1005:[.471,.011,.539],1006:[.694,0,.753],1007:[.654,0,.514],1010:[.461,.011,.444],1011:[.655,.205,.267],1015:[.684,0,.639],1016:[.716,.195,.472],1017:[.706,.011,.639],1018:[.694,0,.875],1019:[.445,.206,.757],1020:[.455,.195,.472],1021:[.706,.011,.639],1022:[.706,.011,.639],1023:[.706,.011,.639],7936:[.694,.011,.633],7937:[.694,.011,.633],7938:[.694,.011,.633],7939:[.694,.011,.633],7940:[.694,.011,.633],7941:[.694,.011,.633],7942:[.694,.011,.567,{ic:.044}],7943:[.694,.011,.633],7944:[.694,0,.75],7945:[.694,0,.722],7946:[.694,0,.862],7947:[.694,0,.862],7948:[.694,0,.862],7949:[.694,0,.862],7950:[.694,0,.889],7951:[.694,0,.889],7952:[.694,.011,.43],7953:[.694,.011,.43],7954:[.694,.011,.43],7955:[.694,.011,.43],7956:[.694,.011,.43],7957:[.694,.011,.43],7960:[.694,0,.819],7961:[.694,0,.819],7962:[.694,0,.875],7963:[.694,0,.875],7964:[.694,0,.875],7965:[.694,0,.875],7968:[.694,.195,.514],7969:[.694,.195,.514],7970:[.694,.195,.514],7971:[.694,.195,.514],7972:[.694,.195,.514],7973:[.694,.195,.514],7974:[.694,.195,.514],7975:[.694,.195,.514],7976:[.694,0,.93],7977:[.694,0,.93],7978:[.694,0,.986],7979:[.694,0,.986],7980:[.694,0,.986],7981:[.694,0,.986],7982:[.694,0,1.041],7983:[.694,0,1.041],7984:[.694,.011,.264],7985:[.694,.011,.264],7986:[.694,.011,.264],7987:[.694,.011,.264],7988:[.694,.011,.264],7989:[.694,.011,.264],7990:[.694,.011,.264],7991:[.694,.011,.264],7992:[.694,0,.5],7993:[.694,0,.5],7994:[.694,0,.556],7995:[.694,0,.556],7996:[.694,0,.556],7997:[.694,0,.556],7998:[.694,0,.611],7999:[.694,0,.611],8e3:[.694,.011,.528],8001:[.694,.011,.528],8002:[.694,.011,.528],8003:[.694,.011,.528],8004:[.694,.011,.528],8005:[.694,.011,.528],8008:[.716,.022,.902],8009:[.716,.022,.902],8010:[.716,.022,.986],8011:[.716,.022,.986],8012:[.716,.022,.986],8013:[.716,.022,.986],8016:[.694,.011,.5],8017:[.694,.011,.5],8018:[.694,.011,.5],8019:[.694,.011,.5],8020:[.694,.011,.5],8021:[.694,.011,.5],8022:[.694,.011,.5],8023:[.694,.011,.5],8025:[.716,0,1],8027:[.716,0,1.056],8029:[.716,0,1.056],8031:[.716,0,1.111],8032:[.694,.011,.667],8033:[.694,.011,.667],8034:[.694,.011,.667],8035:[.694,.011,.667],8036:[.694,.011,.667],8037:[.694,.011,.667],8038:[.694,.011,.667],8039:[.694,.011,.667],8040:[.716,0,.916],8041:[.716,0,.916],8042:[.716,0,1],8043:[.716,0,1],8044:[.716,0,1],8045:[.716,0,1],8046:[.716,0,1.055],8047:[.716,0,1.055],8048:[.694,.011,.633],8049:[.694,.011,.633],8050:[.694,.011,.43],8051:[.694,.011,.43],8052:[.694,.195,.514],8053:[.694,.195,.514],8054:[.694,.011,.264],8055:[.694,.011,.264],8056:[.694,.011,.528],8057:[.694,.011,.528],8058:[.694,.011,.5],8059:[.694,.011,.5],8060:[.694,.011,.667],8061:[.694,.011,.667],8064:[.694,.238,.633],8065:[.694,.238,.633],8066:[.694,.238,.633],8067:[.694,.238,.633],8068:[.694,.238,.633],8069:[.694,.238,.633],8070:[.694,.238,.633],8071:[.694,.238,.633],8072:[.694,.223,.75],8073:[.694,.223,.722],8074:[.694,.223,.862],8075:[.694,.223,.862],8076:[.694,.223,.862],8077:[.694,.223,.862],8078:[.694,.223,.889],8079:[.694,.223,.889],8080:[.694,.238,.514],8081:[.694,.238,.514],8082:[.694,.238,.514],8083:[.694,.238,.514],8084:[.694,.238,.514],8085:[.694,.238,.514],8086:[.694,.238,.514],8087:[.694,.238,.514],8088:[.694,.223,.93],8089:[.694,.223,.93],8090:[.694,.223,.986],8091:[.694,.223,.986],8092:[.694,.223,.986],8093:[.694,.223,.986],8094:[.694,.223,1.041],8095:[.694,.223,1.041],8096:[.694,.238,.667],8097:[.694,.238,.667],8098:[.694,.238,.667],8099:[.694,.238,.667],8100:[.694,.238,.667],8101:[.694,.238,.667],8102:[.694,.238,.667],8103:[.694,.238,.667],8104:[.716,.223,.916],8105:[.716,.223,.916],8106:[.716,.223,1],8107:[.716,.223,1],8108:[.716,.223,1],8109:[.716,.223,1],8110:[.716,.223,1.055],8111:[.716,.223,1.055],8112:[.707,.011,.633],8113:[.575,.011,.633],8114:[.694,.238,.633],8115:[.455,.238,.633],8116:[.694,.238,.633],8118:[.625,.011,.633],8119:[.625,.238,.633],8120:[.962,0,.667],8121:[.83,0,.667],8122:[.694,0,.723],8123:[.694,0,.667],8124:[.694,.155,.811],8125:[.694,-.511,.222],8126:[.155,.155,.222],8127:[.694,-.511,.222],8128:[.625,-.535,.333],8129:[.694,-.512,.444],8130:[.694,.238,.514],8131:[.467,.238,.514],8132:[.694,.238,.514],8134:[.625,.195,.514],8135:[.625,.238,.514],8136:[.694,0,.764],8137:[.694,0,.764],8138:[.694,0,.875],8139:[.694,0,.875],8140:[.694,.155,.853],8141:[.694,-.495,.278,{ic:.017}],8142:[.694,-.495,.278,{ic:.009}],8143:[.694,-.489,.333],8144:[.707,.011,.278],8145:[.575,.011,.278],8146:[.694,.011,.264],8147:[.694,.011,.264],8150:[.625,.011,.264],8151:[.694,.011,.264],8152:[.962,0,.278,{ic:.055}],8153:[.83,0,.278,{ic:.055}],8154:[.694,0,.445],8155:[.694,0,.445],8157:[.694,-.495,.278,{ic:.017}],8158:[.694,-.495,.278,{ic:.01}],8159:[.694,-.489,.333],8160:[.707,.011,.5],8161:[.575,.011,.5],8162:[.694,.011,.5],8163:[.694,.011,.5],8164:[.694,.195,.472],8165:[.694,.195,.472],8166:[.625,.011,.5],8167:[.694,.011,.5],8168:[.962,0,.778],8169:[.83,0,.778],8170:[.716,0,.945],8171:[.716,0,.945],8172:[.694,0,.861],8173:[.694,-.495,.278],8174:[.694,-.495,.278],8175:[.694,-.495,.167,{ic:.01}],8178:[.694,.238,.667],8179:[.445,.238,.667],8180:[.694,.238,.667],8182:[.625,.011,.667],8183:[.625,.238,.667],8184:[.716,.022,.847],8185:[.716,.022,.819],8186:[.716,0,.861],8187:[.716,0,.805],8188:[.716,.155,.878],8189:[.694,-.495,.167],8190:[.694,-.511,.222]}},GKSSB:{"bold-sans-serif":{880:[.694,0,.645],881:[.522,0,.485],882:[.689,0,.733],883:[.516,0,.549],884:[.694,-.503,.214,{ic:.003}],885:[0,.191,.214,{ic:.001}],886:[.694,0,.794],887:[.522,0,.588],890:[-.068,.257,.11],891:[.46,.01,.459],892:[.46,.01,.459],893:[.46,.01,.459],894:[.458,.104,.305],895:[.694,.022,.519],900:[.694,-.503,.183,{ic:.024}],901:[.694,-.508,.318,{ic:.05}],902:[.694,0,.733],903:[.458,-.327,.305],904:[.694,0,.825],905:[.694,0,.977],906:[.694,0,.508],908:[.717,.022,.885],910:[.716,0,1.038],911:[.716,0,.885],912:[.694,.011,.278,{ic:.04}],938:[.871,0,.325,{ic:.025}],939:[.871,0,.855],940:[.694,.011,.633],941:[.694,.011,.43],942:[.694,.195,.514],943:[.694,.011,.278],944:[.694,.011,.5],970:[.625,.011,.264],971:[.625,.011,.5],972:[.694,.011,.528],973:[.694,.011,.5],974:[.694,.011,.71],975:[.694,.261,.694],976:[.733,.011,.51],979:[.716,0,.945],980:[.852,0,.778],983:[.458,.273,.555],984:[.705,0,.5],985:[.613,.064,.5],986:[.522,.205,.439],987:[.468,0,.5],988:[.691,0,.569],989:[.445,.195,.5],990:[.697,.038,.389],991:[.583,.145,.389],992:[.734,0,.639],993:[.722,0,.722],994:[.716,.235,.916],995:[.467,.232,.819],996:[.697,.189,.643],997:[.44,.278,.553],998:[.683,.206,.703],999:[.459,.193,.553],1e3:[.668,.162,.51],1001:[.468,.162,.51],1002:[.695,0,.787],1003:[.434,0,.567],1004:[.691,.011,.539],1005:[.471,.011,.539],1006:[.694,0,.753],1007:[.654,0,.514],1010:[.461,.011,.444],1011:[.655,.205,.267],1015:[.684,0,.639],1016:[.716,.195,.472],1017:[.706,.011,.639],1018:[.694,0,.875],1019:[.445,.206,.757],1020:[.455,.195,.472],1021:[.706,.011,.639],1022:[.706,.011,.639],1023:[.706,.011,.639],7936:[.703,.011,.633],7937:[.703,.011,.633],7938:[.706,.011,.633],7939:[.706,.011,.633],7940:[.706,.011,.633],7941:[.706,.011,.633],7942:[.78,.011,.633],7943:[.78,.011,.633],7944:[.717,0,.733],7945:[.717,0,.733],7946:[.717,0,.967],7947:[.717,0,.967],7948:[.717,0,.897],7949:[.717,0,.897],7950:[.717,0,.894],7951:[.717,0,.894],7952:[.703,.011,.43],7953:[.703,.011,.43],7954:[.706,.011,.43],7955:[.706,.011,.43],7956:[.706,.011,.43],7957:[.706,.011,.43],7960:[.717,0,.744],7961:[.717,0,.744],7962:[.717,0,.988],7963:[.717,0,.988],7964:[.717,0,.988],7965:[.717,0,.988],7968:[.71,.195,.514],7969:[.71,.195,.514],7970:[.713,.195,.514],7971:[.713,.195,.514],7972:[.713,.195,.514],7973:[.713,.195,.514],7974:[.819,.195,.514],7975:[.819,.195,.514],7976:[.717,0,.896],7977:[.717,0,.896],7978:[.717,0,1.14],7979:[.717,0,1.14],7980:[.717,0,1.14],7981:[.717,0,1.14],7982:[.717,0,1.137],7983:[.717,0,1.137],7984:[.703,.011,.278],7985:[.703,.011,.278],7986:[.706,.011,.278,{ic:.001}],7987:[.706,.011,.278,{ic:.001}],7988:[.706,.011,.278,{ic:.031}],7989:[.706,.011,.278,{ic:.031}],7990:[.812,.011,.278],7991:[.812,.011,.278],7992:[.717,0,.433],7993:[.717,0,.433],7994:[.717,0,.677],7995:[.717,0,.677],7996:[.717,0,.677],7997:[.717,0,.677],7998:[.717,0,.674],7999:[.717,0,.674],8e3:[.703,.011,.528],8001:[.703,.011,.528],8002:[.706,.011,.528],8003:[.706,.011,.528],8004:[.706,.011,.528],8005:[.706,.011,.528],8008:[.717,.022,.895],8009:[.717,.022,.881],8010:[.717,.022,1.155],8011:[.717,.022,1.145],8012:[.717,.022,1.065],8013:[.717,.022,1.045],8016:[.703,.011,.5],8017:[.703,.011,.5],8018:[.706,.011,.5],8019:[.706,.011,.5],8020:[.706,.011,.5],8021:[.706,.011,.5],8022:[.812,.011,.5],8023:[.812,.011,.5],8025:[.717,0,.988],8027:[.717,0,1.232],8029:[.717,0,1.182],8031:[.717,0,1.199],8032:[.703,.011,.667],8033:[.703,.011,.667],8034:[.706,.011,.667],8035:[.706,.011,.667],8036:[.706,.011,.667],8037:[.706,.011,.667],8038:[.812,.011,.667],8039:[.812,.011,.667],8040:[.717,0,.9],8041:[.717,0,.89],8042:[.717,0,1.17],8043:[.717,0,1.171],8044:[.717,0,1.084],8045:[.717,0,1.084],8046:[.717,0,1.111],8047:[.717,0,1.121],8048:[.706,.011,.633],8049:[.706,.011,.633],8050:[.706,.011,.43],8051:[.706,.011,.43],8052:[.713,.195,.514],8053:[.713,.195,.514],8054:[.706,.011,.278],8055:[.706,.011,.278],8056:[.706,.011,.528],8057:[.706,.011,.528],8058:[.706,.011,.5],8059:[.706,.011,.5],8060:[.706,.011,.667],8061:[.706,.011,.667],8064:[.703,.26,.633],8065:[.703,.26,.633],8066:[.706,.26,.633],8067:[.706,.26,.633],8068:[.706,.26,.633],8069:[.706,.26,.633],8070:[.78,.26,.633],8071:[.78,.26,.633],8072:[.717,.26,.733],8073:[.717,.26,.733],8074:[.717,.26,.967],8075:[.717,.26,.967],8076:[.717,.26,.897],8077:[.717,.26,.897],8078:[.717,.26,.894],8079:[.717,.26,.894],8080:[.71,.249,.514],8081:[.71,.249,.514],8082:[.713,.249,.514],8083:[.713,.249,.514],8084:[.713,.249,.514],8085:[.713,.249,.514],8086:[.819,.249,.514],8087:[.819,.249,.514],8088:[.717,.26,.896],8089:[.717,.26,.896],8090:[.717,.26,1.14],8091:[.717,.26,1.14],8092:[.717,.26,1.14],8093:[.717,.26,1.14],8094:[.717,.26,1.137],8095:[.717,.26,1.137],8096:[.703,.26,.667],8097:[.703,.26,.667],8098:[.706,.26,.667],8099:[.706,.26,.667],8100:[.706,.26,.667],8101:[.706,.26,.667],8102:[.812,.26,.667],8103:[.812,.26,.667],8104:[.717,.26,.9],8105:[.717,.26,.89],8106:[.717,.26,1.17],8107:[.717,.26,1.171],8108:[.717,.26,1.084],8109:[.717,.26,1.084],8110:[.717,.26,1.111],8111:[.717,.26,1.121],8112:[.692,.011,.633],8113:[.605,.011,.633],8114:[.706,.26,.633],8115:[.455,.26,.633],8116:[.694,.26,.633],8118:[.65,.011,.633],8119:[.65,.26,.633],8120:[.919,0,.733],8121:[.862,0,.733],8123:[.717,0,.733],8124:[.694,.26,.733],8125:[.694,-.511,.222],8126:[.154,.154,.2],8127:[.694,-.511,.222],8128:[.694,-.564,.374],8129:[.694,-.429,.367,{ic:.007}],8130:[.713,.249,.514],8131:[.467,.249,.514],8132:[.694,.249,.514],8134:[.657,.195,.514],8135:[.657,.249,.514],8136:[.717,0,.642],8137:[.717,0,.642],8138:[.717,0,.794],8139:[.717,0,.794],8140:[.694,.26,.794],8141:[.694,-.508,.38],8142:[.694,-.508,.38],8143:[.694,-.402,.367,{ic:.007}],8144:[.692,.011,.278],8145:[.605,.011,.278,{ic:.011}],8146:[.719,.011,.278,{ic:.03}],8147:[.719,.011,.278,{ic:.03}],8150:[.65,.011,.278],8151:[.785,.011,.278],8152:[.919,0,.331,{ic:.022}],8153:[.862,0,.331,{ic:.032}],8154:[.717,0,.331],8155:[.717,0,.331],8157:[.694,-.508,.38],8158:[.694,-.508,.38],8159:[.694,-.402,.222,{ic:.152}],8160:[.692,.011,.5],8161:[.605,.011,.5],8162:[.719,.011,.5],8163:[.719,.011,.5],8164:[.703,.195,.472],8165:[.703,.195,.472],8166:[.65,.011,.5],8167:[.785,.011,.5],8168:[.919,0,.855],8169:[.862,0,.855],8170:[.717,0,1.055],8171:[.717,0,1.015],8172:[.717,0,.805],8173:[.694,-.495,.305,{ic:.065}],8174:[.694,-.495,.305,{ic:.065}],8175:[.694,-.508,.278],8178:[.706,.26,.667],8179:[.445,.26,.667],8180:[.694,.26,.71],8182:[.65,.011,.667],8183:[.65,.26,.667],8184:[.717,.022,.968],8185:[.717,.022,.888],8186:[.717,0,.987],8187:[.717,0,.917],8188:[.716,.26,.794],8189:[.694,-.508,.278],8190:[.694,-.511,.222]}},GKSSI:{"sans-serif-italic":{880:[.694,0,.611],881:[.529,0,.414],882:[.689,0,.68,{ic:.036}],883:[.523,0,.5,{ic:.019}],884:[.694,-.495,.194,{ic:.141}],885:[0,.2,.194,{ic:.004}],886:[.694,0,.708],887:[.529,0,.555],890:[-.067,.239,.111],891:[.461,.011,.444],892:[.461,.011,.444,{ic:.008}],893:[.461,.011,.444],894:[.444,.127,.278],895:[.694,.022,.472],900:[.694,-.495,.167,{ic:.145}],901:[.694,-.495,.278,{ic:.118}],902:[.694,0,.667],903:[.444,-.361,.278],904:[.694,0,.764,{ic:.092}],905:[.694,0,.875,{ic:.054}],906:[.694,0,.445,{ic:.054}],908:[.716,.022,.819,{ic:.027}],910:[.716,0,.945,{ic:.065}],911:[.716,0,.805,{ic:.047}],912:[.694,.011,.264,{ic:.08}],938:[.822,0,.278,{ic:.146}],939:[.822,0,.778,{ic:.065}],940:[.694,.011,.633],941:[.694,.011,.43,{ic:.042}],942:[.694,.195,.514,{ic:.041}],943:[.694,.011,.264,{ic:.08}],944:[.694,.011,.5,{ic:.016}],970:[.625,.011,.264,{ic:.079}],971:[.625,.011,.5,{ic:.016}],972:[.694,.011,.472,{ic:.02}],973:[.694,.011,.5,{ic:.016}],974:[.694,.011,.667,{ic:.009}],975:[.694,.261,.694,{ic:.097}],976:[.733,.011,.51,{ic:.037}],979:[.716,0,.945,{ic:.08}],980:[.822,0,.778,{ic:.08}],983:[.458,.268,.555,{ic:.059}],984:[.705,0,.5,{ic:.08}],985:[.613,.064,.5,{ic:.063}],986:[.689,0,.548,{ic:.108}],987:[.468,0,.5,{ic:.043}],988:[.691,0,.569,{ic:.105}],989:[.445,.195,.5,{ic:.039}],990:[.693,.034,.389,{ic:.042}],991:[.583,.145,.389,{ic:.004}],992:[.702,0,.639],993:[.722,0,.722],994:[.716,.23,.916,{ic:.072}],995:[.467,.227,.819,{ic:.024}],996:[.694,.189,.643,{ic:.091}],997:[.436,.278,.553,{ic:.045}],998:[.683,.206,.703,{ic:.015}],999:[.459,.193,.553,{ic:.016}],1e3:[.668,.162,.51,{ic:.079}],1001:[.468,.162,.51,{ic:.023}],1002:[.695,0,.787,{ic:.087}],1003:[.434,0,.567,{ic:.041}],1004:[.691,.011,.539,{ic:.08}],1005:[.471,.011,.539,{ic:.033}],1006:[.694,0,.753,{ic:.084}],1007:[.654,0,.514,{ic:.058}],1010:[.461,.011,.444,{ic:.056}],1011:[.655,.205,.267,{ic:.056}],1015:[.684,0,.639,{ic:.058}],1016:[.716,.195,.472,{ic:.03}],1017:[.706,.011,.639,{ic:.08}],1018:[.694,0,.875],1019:[.445,.206,.757],1020:[.455,.195,.472,{ic:.03}],1021:[.706,.011,.639,{ic:.061}],1022:[.706,.011,.639,{ic:.08}],1023:[.706,.011,.639,{ic:.061}],7936:[.694,.011,.633],7937:[.694,.011,.633],7938:[.694,.011,.633],7939:[.694,.011,.633],7940:[.694,.011,.633],7941:[.694,.011,.633],7942:[.694,.011,.567,{ic:.009}],7943:[.694,.011,.633],7944:[.694,0,.75],7945:[.694,0,.722],7946:[.694,0,.862],7947:[.694,0,.862],7948:[.694,0,.862],7949:[.694,0,.862],7950:[.694,0,.889],7951:[.694,0,.889],7952:[.694,.011,.43,{ic:.027}],7953:[.694,.011,.43,{ic:.027}],7954:[.694,.011,.43,{ic:.045}],7955:[.694,.011,.43,{ic:.045}],7956:[.694,.011,.43,{ic:.082}],7957:[.694,.011,.43,{ic:.082}],7960:[.694,0,.819,{ic:.092}],7961:[.694,0,.819,{ic:.092}],7962:[.694,0,.875,{ic:.092}],7963:[.694,0,.875,{ic:.092}],7964:[.694,0,.875,{ic:.092}],7965:[.694,0,.875,{ic:.092}],7968:[.694,.195,.514,{ic:.02}],7969:[.694,.195,.514,{ic:.02}],7970:[.694,.195,.514,{ic:.044}],7971:[.694,.195,.514,{ic:.044}],7972:[.694,.195,.514,{ic:.081}],7973:[.694,.195,.514,{ic:.081}],7974:[.694,.195,.514,{ic:.099}],7975:[.694,.195,.514,{ic:.099}],7976:[.694,0,.93,{ic:.054}],7977:[.694,0,.93,{ic:.054}],7978:[.694,0,.986,{ic:.054}],7979:[.694,0,.986,{ic:.054}],7980:[.694,0,.986,{ic:.054}],7981:[.694,0,.986,{ic:.054}],7982:[.694,0,1.041,{ic:.054}],7983:[.694,0,1.041,{ic:.054}],7984:[.694,.011,.264,{ic:.045}],7985:[.694,.011,.264,{ic:.009}],7986:[.694,.011,.264,{ic:.083}],7987:[.694,.011,.264,{ic:.083}],7988:[.694,.011,.264,{ic:.12}],7989:[.694,.011,.264,{ic:.12}],7990:[.694,.011,.264,{ic:.138}],7991:[.694,.011,.264,{ic:.138}],7992:[.694,0,.5,{ic:.054}],7993:[.694,0,.5,{ic:.054}],7994:[.694,0,.556,{ic:.054}],7995:[.694,0,.556,{ic:.054}],7996:[.694,0,.556,{ic:.054}],7997:[.694,0,.556,{ic:.054}],7998:[.694,0,.611,{ic:.054}],7999:[.694,0,.611,{ic:.054}],8e3:[.694,.011,.472,{ic:.011}],8001:[.694,.011,.472,{ic:.011}],8002:[.694,.011,.472,{ic:.023}],8003:[.694,.011,.472,{ic:.023}],8004:[.694,.011,.472,{ic:.06}],8005:[.694,.011,.472,{ic:.06}],8008:[.716,.022,.902,{ic:.027}],8009:[.716,.022,.902,{ic:.027}],8010:[.716,.022,.986,{ic:.027}],8011:[.716,.022,.986,{ic:.027}],8012:[.716,.022,.986,{ic:.027}],8013:[.716,.022,.986,{ic:.027}],8016:[.694,.011,.5,{ic:.016}],8017:[.694,.011,.5,{ic:.016}],8018:[.694,.011,.5,{ic:.016}],8019:[.694,.011,.5,{ic:.016}],8020:[.694,.011,.5,{ic:.037}],8021:[.694,.011,.5,{ic:.037}],8022:[.694,.011,.5,{ic:.055}],8023:[.694,.011,.5,{ic:.055}],8025:[.716,0,1,{ic:.065}],8027:[.716,0,1.056,{ic:.065}],8029:[.716,0,1.056,{ic:.065}],8031:[.716,0,1.111,{ic:.065}],8032:[.694,.011,.667,{ic:.009}],8033:[.694,.011,.667,{ic:.009}],8034:[.694,.011,.667,{ic:.009}],8035:[.694,.011,.667,{ic:.009}],8036:[.694,.011,.667,{ic:.009}],8037:[.694,.011,.667,{ic:.009}],8038:[.694,.011,.667,{ic:.035}],8039:[.694,.011,.667,{ic:.035}],8040:[.716,0,.916,{ic:.047}],8041:[.716,0,.916,{ic:.047}],8042:[.716,0,1,{ic:.047}],8043:[.716,0,1,{ic:.047}],8044:[.716,0,1,{ic:.047}],8045:[.716,0,1,{ic:.047}],8046:[.716,0,1.055,{ic:.047}],8047:[.716,0,1.055,{ic:.047}],8048:[.694,.011,.633],8049:[.694,.011,.633],8050:[.694,.011,.43,{ic:.027}],8051:[.694,.011,.43,{ic:.042}],8052:[.694,.195,.514,{ic:.02}],8053:[.694,.195,.514,{ic:.041}],8054:[.694,.011,.264,{ic:.009}],8055:[.694,.011,.264,{ic:.08}],8056:[.694,.011,.472,{ic:.011}],8057:[.694,.011,.472,{ic:.02}],8058:[.694,.011,.5,{ic:.016}],8059:[.694,.011,.5,{ic:.016}],8060:[.694,.011,.667,{ic:.009}],8061:[.694,.011,.667,{ic:.009}],8064:[.694,.239,.633],8065:[.694,.239,.633],8066:[.694,.239,.633],8067:[.694,.239,.633],8068:[.694,.239,.633],8069:[.694,.239,.633],8070:[.694,.239,.633],8071:[.694,.239,.633],8072:[.694,.224,.75],8073:[.694,.224,.722],8074:[.694,.224,.862],8075:[.694,.224,.862],8076:[.694,.224,.862],8077:[.694,.224,.862],8078:[.694,.224,.889],8079:[.694,.224,.889],8080:[.694,.239,.514,{ic:.02}],8081:[.694,.239,.514,{ic:.02}],8082:[.694,.239,.514,{ic:.043}],8083:[.694,.239,.514,{ic:.044}],8084:[.694,.239,.514,{ic:.08}],8085:[.694,.239,.514,{ic:.08}],8086:[.694,.239,.514,{ic:.098}],8087:[.694,.239,.514,{ic:.098}],8088:[.694,.224,.93,{ic:.054}],8089:[.694,.224,.93,{ic:.054}],8090:[.694,.224,.986,{ic:.054}],8091:[.694,.224,.986,{ic:.054}],8092:[.694,.224,.986,{ic:.054}],8093:[.694,.224,.986,{ic:.054}],8094:[.694,.224,1.041,{ic:.054}],8095:[.694,.224,1.041,{ic:.054}],8096:[.694,.239,.667,{ic:.009}],8097:[.694,.239,.667,{ic:.009}],8098:[.694,.239,.667,{ic:.009}],8099:[.694,.239,.667,{ic:.009}],8100:[.694,.239,.667,{ic:.009}],8101:[.694,.239,.667,{ic:.009}],8102:[.694,.239,.667,{ic:.035}],8103:[.694,.239,.667,{ic:.035}],8104:[.716,.224,.916,{ic:.047}],8105:[.716,.224,.916,{ic:.047}],8106:[.716,.224,1,{ic:.047}],8107:[.716,.224,1,{ic:.047}],8108:[.716,.224,1,{ic:.047}],8109:[.716,.224,1,{ic:.047}],8110:[.716,.224,1.055,{ic:.047}],8111:[.716,.224,1.055,{ic:.047}],8112:[.687,.011,.633],8113:[.591,.011,.633],8114:[.694,.239,.633],8115:[.455,.239,.633],8116:[.694,.239,.633],8118:[.625,.011,.633],8119:[.625,.239,.633],8120:[.961,0,.667,{ic:.022}],8121:[.865,0,.667,{ic:.005}],8122:[.694,0,.723],8123:[.694,0,.667],8124:[.694,.155,.811],8125:[.694,-.511,.222,{ic:.11}],8126:[.155,.155,.222],8127:[.694,-.511,.222,{ic:.11}],8128:[.625,-.535,.333,{ic:.133}],8129:[.694,-.512,.444,{ic:.093}],8130:[.694,.239,.514,{ic:.02}],8131:[.467,.239,.514,{ic:.02}],8132:[.694,.239,.514,{ic:.041}],8134:[.625,.195,.514,{ic:.084}],8135:[.625,.239,.514,{ic:.084}],8136:[.694,0,.764,{ic:.092}],8137:[.694,0,.764,{ic:.092}],8138:[.694,0,.875,{ic:.054}],8139:[.694,0,.875,{ic:.054}],8140:[.694,.155,.853],8141:[.694,-.495,.278,{ic:.12}],8142:[.694,-.495,.278,{ic:.158}],8143:[.694,-.489,.333,{ic:.147}],8144:[.687,.011,.278,{ic:.119}],8145:[.591,.011,.278,{ic:.102}],8146:[.694,.011,.264,{ic:.064}],8147:[.694,.011,.264,{ic:.08}],8150:[.625,.011,.264,{ic:.123}],8151:[.694,.011,.264,{ic:.138}],8152:[.961,0,.278,{ic:.231}],8153:[.865,0,.278,{ic:.214}],8154:[.694,0,.445,{ic:.054}],8155:[.694,0,.445,{ic:.054}],8157:[.694,-.495,.278,{ic:.12}],8158:[.694,-.495,.278,{ic:.157}],8159:[.694,-.489,.333,{ic:.147}],8160:[.687,.011,.5,{ic:.051}],8161:[.591,.011,.5,{ic:.034}],8162:[.694,.011,.5,{ic:.016}],8163:[.694,.011,.5,{ic:.016}],8164:[.694,.195,.472,{ic:.011}],8165:[.694,.195,.472,{ic:.011}],8166:[.625,.011,.5,{ic:.04}],8167:[.694,.011,.5,{ic:.055}],8168:[.961,0,.778,{ic:.065}],8169:[.865,0,.778,{ic:.065}],8170:[.716,0,.945,{ic:.065}],8171:[.716,0,.945,{ic:.065}],8172:[.694,0,.861,{ic:.052}],8173:[.694,-.495,.278,{ic:.102}],8174:[.694,-.495,.278,{ic:.118}],8175:[.694,-.495,.167,{ic:.113}],8178:[.694,.239,.667,{ic:.009}],8179:[.445,.239,.667,{ic:.009}],8180:[.694,.239,.667,{ic:.009}],8182:[.625,.011,.667,{ic:.021}],8183:[.625,.239,.667,{ic:.021}],8184:[.716,.022,.847,{ic:.027}],8185:[.716,.022,.819,{ic:.027}],8186:[.716,0,.861,{ic:.047}],8187:[.716,0,.805,{ic:.047}],8188:[.716,.155,.878],8189:[.694,-.495,.167,{ic:.145}],8190:[.694,-.511,.222,{ic:.069}]}},GKSSBI:{"sans-serif-bold-italic":{880:[.694,0,.645],881:[.522,0,.485],882:[.689,0,.733,{ic:.105}],883:[.516,0,.549,{ic:.074}],884:[.694,-.503,.214,{ic:.151}],885:[0,.191,.214,{ic:.001}],886:[.694,0,.794,{ic:.055}],887:[.522,0,.588,{ic:.028}],890:[-.068,.257,.11],891:[.46,.01,.459,{ic:.049}],892:[.46,.01,.459,{ic:.053}],893:[.46,.01,.459,{ic:.049}],894:[.458,.104,.305,{ic:.003}],895:[.694,.022,.519,{ic:.055}],900:[.694,-.503,.183,{ic:.172}],901:[.694,-.495,.305,{ic:.192}],902:[.694,0,.733],903:[.458,-.327,.305,{ic:.003}],904:[.694,0,.825,{ic:.081}],905:[.694,0,.977,{ic:.052}],906:[.694,0,.508,{ic:.058}],908:[.717,.022,.885,{ic:.036}],910:[.716,0,1.038,{ic:.083}],911:[.716,0,.885,{ic:.053}],912:[.694,.011,.278,{ic:.167}],938:[.871,0,.325,{ic:.204}],939:[.871,0,.855,{ic:.086}],940:[.694,.011,.633,{ic:.015}],941:[.694,.011,.43,{ic:.08}],942:[.694,.195,.514,{ic:.046}],943:[.694,.011,.278,{ic:.109}],944:[.694,.011,.5,{ic:.075}],970:[.625,.011,.264,{ic:.107}],971:[.625,.011,.5,{ic:.023}],972:[.694,.011,.528,{ic:.034}],973:[.694,.011,.5,{ic:.023}],974:[.694,.011,.71],975:[.694,.261,.694,{ic:.118}],976:[.733,.011,.51,{ic:.04}],979:[.716,0,.945,{ic:.079}],980:[.852,0,.778,{ic:.079}],983:[.458,.273,.555,{ic:.075}],984:[.705,0,.5,{ic:.094}],985:[.613,.064,.5,{ic:.065}],986:[.522,.205,.439,{ic:.068}],987:[.468,0,.5,{ic:.043}],988:[.691,0,.569,{ic:.105}],989:[.445,.195,.5,{ic:.039}],990:[.697,.038,.389,{ic:.055}],991:[.583,.145,.389,{ic:.007}],992:[.734,0,.639],993:[.722,0,.722,{ic:.042}],994:[.716,.235,.916,{ic:.07}],995:[.467,.232,.819,{ic:.023}],996:[.697,.189,.643,{ic:.091}],997:[.44,.278,.553,{ic:.045}],998:[.683,.206,.703,{ic:.016}],999:[.459,.193,.553,{ic:.017}],1e3:[.668,.162,.51,{ic:.078}],1001:[.468,.162,.51,{ic:.024}],1002:[.695,0,.787,{ic:.085}],1003:[.434,0,.567,{ic:.039}],1004:[.691,.011,.539,{ic:.079}],1005:[.471,.011,.539,{ic:.033}],1006:[.694,0,.753,{ic:.089}],1007:[.654,0,.514,{ic:.064}],1010:[.461,.011,.444,{ic:.056}],1011:[.655,.205,.267,{ic:.056}],1015:[.684,0,.639,{ic:.059}],1016:[.716,.195,.472,{ic:.031}],1017:[.706,.011,.639,{ic:.081}],1018:[.694,0,.875],1019:[.445,.206,.757],1020:[.455,.195,.472,{ic:.028}],1021:[.706,.011,.639,{ic:.061}],1022:[.706,.011,.639,{ic:.081}],1023:[.706,.011,.639,{ic:.061}],7936:[.703,.011,.633,{ic:.013}],7937:[.703,.011,.633,{ic:.013}],7938:[.706,.011,.633,{ic:.013}],7939:[.706,.011,.633,{ic:.013}],7940:[.706,.011,.633,{ic:.037}],7941:[.706,.011,.633,{ic:.027}],7942:[.78,.011,.633,{ic:.022}],7943:[.78,.011,.633,{ic:.013}],7944:[.717,0,.733],7945:[.717,0,.733],7946:[.717,0,.967],7947:[.717,0,.967],7948:[.717,0,.897],7949:[.717,0,.897],7950:[.717,0,.894],7951:[.717,0,.894],7952:[.703,.011,.43,{ic:.03}],7953:[.703,.011,.43,{ic:.03}],7954:[.706,.011,.43,{ic:.083}],7955:[.706,.011,.43,{ic:.083}],7956:[.706,.011,.43,{ic:.122}],7957:[.706,.011,.43,{ic:.122}],7960:[.717,0,.744,{ic:.084}],7961:[.717,0,.744,{ic:.084}],7962:[.717,0,.988,{ic:.084}],7963:[.717,0,.988,{ic:.084}],7964:[.717,0,.988,{ic:.084}],7965:[.717,0,.988,{ic:.084}],7968:[.71,.195,.514,{ic:.042}],7969:[.71,.195,.514,{ic:.042}],7970:[.713,.195,.514,{ic:.043}],7971:[.713,.195,.514,{ic:.043}],7972:[.713,.195,.514,{ic:.123}],7973:[.713,.195,.514,{ic:.113}],7974:[.819,.195,.514,{ic:.124}],7975:[.819,.195,.514,{ic:.124}],7976:[.717,0,.896,{ic:.055}],7977:[.717,0,.896,{ic:.055}],7978:[.717,0,1.14,{ic:.055}],7979:[.717,0,1.14,{ic:.055}],7980:[.717,0,1.14,{ic:.055}],7981:[.717,0,1.14,{ic:.055}],7982:[.717,0,1.137,{ic:.055}],7983:[.717,0,1.137,{ic:.055}],7984:[.703,.011,.278,{ic:.019}],7985:[.703,.011,.278,{ic:.023}],7986:[.706,.011,.278,{ic:.112}],7987:[.706,.011,.278,{ic:.112}],7988:[.706,.011,.278,{ic:.181}],7989:[.706,.011,.278,{ic:.181}],7990:[.812,.011,.278,{ic:.173}],7991:[.812,.011,.278,{ic:.173}],7992:[.717,0,.433,{ic:.055}],7993:[.717,0,.433,{ic:.055}],7994:[.717,0,.677,{ic:.055}],7995:[.717,0,.677,{ic:.055}],7996:[.717,0,.677,{ic:.055}],7997:[.717,0,.677,{ic:.055}],7998:[.717,0,.674,{ic:.055}],7999:[.717,0,.674,{ic:.055}],8e3:[.703,.011,.528,{ic:.032}],8001:[.703,.011,.528,{ic:.032}],8002:[.706,.011,.528,{ic:.035}],8003:[.706,.011,.528,{ic:.035}],8004:[.706,.011,.528,{ic:.104}],8005:[.706,.011,.528,{ic:.094}],8008:[.717,.022,.895,{ic:.037}],8009:[.717,.022,.881,{ic:.037}],8010:[.717,.022,1.155,{ic:.037}],8011:[.717,.022,1.145,{ic:.037}],8012:[.717,.022,1.065,{ic:.037}],8013:[.717,.022,1.045,{ic:.037}],8016:[.703,.011,.5,{ic:.022}],8017:[.703,.011,.5,{ic:.022}],8018:[.706,.011,.5,{ic:.022}],8019:[.706,.011,.5,{ic:.022}],8020:[.706,.011,.5,{ic:.106}],8021:[.706,.011,.5,{ic:.076}],8022:[.812,.011,.5,{ic:.097}],8023:[.812,.011,.5,{ic:.097}],8025:[.717,0,.988,{ic:.086}],8027:[.717,0,1.232,{ic:.086}],8029:[.717,0,1.182,{ic:.086}],8031:[.717,0,1.199,{ic:.086}],8032:[.703,.011,.667,{ic:.025}],8033:[.703,.011,.667,{ic:.025}],8034:[.706,.011,.667,{ic:.025}],8035:[.706,.011,.667,{ic:.025}],8036:[.706,.011,.667,{ic:.045}],8037:[.706,.011,.667,{ic:.035}],8038:[.812,.011,.667,{ic:.026}],8039:[.812,.011,.667,{ic:.026}],8040:[.717,0,.9,{ic:.054}],8041:[.717,0,.89,{ic:.054}],8042:[.717,0,1.17,{ic:.054}],8043:[.717,0,1.171,{ic:.054}],8044:[.717,0,1.084,{ic:.054}],8045:[.717,0,1.084,{ic:.054}],8046:[.717,0,1.111,{ic:.054}],8047:[.717,0,1.121,{ic:.054}],8048:[.706,.011,.633,{ic:.013}],8049:[.706,.011,.633,{ic:.013}],8050:[.706,.011,.43,{ic:.03}],8051:[.706,.011,.43,{ic:.063}],8052:[.713,.195,.514,{ic:.042}],8053:[.713,.195,.514,{ic:.044}],8054:[.706,.011,.278],8055:[.706,.011,.278,{ic:.102}],8056:[.706,.011,.528,{ic:.032}],8057:[.706,.011,.528,{ic:.045}],8058:[.706,.011,.5,{ic:.022}],8059:[.706,.011,.5,{ic:.022}],8060:[.706,.011,.667,{ic:.025}],8061:[.706,.011,.667,{ic:.025}],8064:[.703,.26,.633,{ic:.013}],8065:[.703,.26,.633,{ic:.013}],8066:[.706,.26,.633,{ic:.013}],8067:[.706,.26,.633,{ic:.013}],8068:[.706,.26,.633,{ic:.037}],8069:[.706,.26,.633,{ic:.027}],8070:[.78,.26,.633,{ic:.022}],8071:[.78,.26,.633,{ic:.013}],8072:[.717,.26,.733],8073:[.717,.26,.733],8074:[.717,.26,.967],8075:[.717,.26,.967],8076:[.717,.26,.897],8077:[.717,.26,.897],8078:[.717,.26,.894],8079:[.717,.26,.894],8080:[.71,.249,.514,{ic:.042}],8081:[.71,.249,.514,{ic:.042}],8082:[.713,.249,.514,{ic:.043}],8083:[.713,.249,.514,{ic:.043}],8084:[.713,.249,.514,{ic:.123}],8085:[.713,.249,.514,{ic:.113}],8086:[.819,.249,.514,{ic:.124}],8087:[.819,.249,.514,{ic:.124}],8088:[.717,.26,.896,{ic:.055}],8089:[.717,.26,.896,{ic:.055}],8090:[.717,.26,1.14,{ic:.055}],8091:[.717,.26,1.14,{ic:.055}],8092:[.717,.26,1.14,{ic:.055}],8093:[.717,.26,1.14,{ic:.055}],8094:[.717,.26,1.137,{ic:.055}],8095:[.717,.26,1.137,{ic:.055}],8096:[.703,.26,.667,{ic:.025}],8097:[.703,.26,.667,{ic:.025}],8098:[.706,.26,.667,{ic:.025}],8099:[.706,.26,.667,{ic:.025}],8100:[.706,.26,.667,{ic:.045}],8101:[.706,.26,.667,{ic:.035}],8102:[.812,.26,.667,{ic:.026}],8103:[.812,.26,.667,{ic:.026}],8104:[.717,.26,.9,{ic:.054}],8105:[.717,.26,.89,{ic:.054}],8106:[.717,.26,1.17,{ic:.054}],8107:[.717,.26,1.171,{ic:.054}],8108:[.717,.26,1.084,{ic:.054}],8109:[.717,.26,1.084,{ic:.054}],8110:[.717,.26,1.111,{ic:.054}],8111:[.717,.26,1.121,{ic:.054}],8112:[.692,.011,.633,{ic:.013}],8113:[.605,.011,.633,{ic:.013}],8114:[.706,.26,.633,{ic:.013}],8115:[.455,.26,.633,{ic:.013}],8116:[.694,.26,.633,{ic:.015}],8118:[.65,.011,.633,{ic:.013}],8119:[.65,.26,.633,{ic:.013}],8120:[.919,0,.733,{ic:.014}],8121:[.862,0,.733,{ic:.014}],8123:[.717,0,.733],8124:[.694,.26,.733],8125:[.694,-.511,.222,{ic:.093}],8126:[.154,.154,.2],8127:[.694,-.511,.222,{ic:.093}],8128:[.694,-.564,.374,{ic:.148}],8129:[.694,-.429,.367,{ic:.155}],8130:[.713,.249,.514,{ic:.042}],8131:[.467,.249,.514,{ic:.042}],8132:[.694,.249,.514,{ic:.046}],8134:[.657,.195,.514,{ic:.08}],8135:[.657,.249,.514,{ic:.08}],8136:[.717,0,.642,{ic:.084}],8137:[.717,0,.642,{ic:.084}],8138:[.717,0,.794,{ic:.055}],8139:[.717,0,.794,{ic:.055}],8140:[.694,.26,.794,{ic:.055}],8141:[.694,-.508,.38,{ic:.106}],8142:[.694,-.508,.38,{ic:.146}],8143:[.694,-.402,.367,{ic:.155}],8144:[.692,.011,.278,{ic:.147}],8145:[.605,.011,.278,{ic:.138}],8146:[.719,.011,.278,{ic:.162}],8147:[.719,.011,.278,{ic:.162}],8150:[.65,.011,.278,{ic:.138}],8151:[.785,.011,.278,{ic:.167}],8152:[.919,0,.331,{ic:.215}],8153:[.862,0,.331,{ic:.215}],8154:[.717,0,.331,{ic:.055}],8155:[.717,0,.331,{ic:.055}],8157:[.694,-.508,.38,{ic:.106}],8158:[.694,-.508,.38,{ic:.146}],8159:[.694,-.402,.222,{ic:.3}],8160:[.692,.011,.5,{ic:.053}],8161:[.605,.011,.5,{ic:.043}],8162:[.719,.011,.5,{ic:.068}],8163:[.719,.011,.5,{ic:.068}],8164:[.703,.195,.472,{ic:.028}],8165:[.703,.195,.472,{ic:.028}],8166:[.65,.011,.5,{ic:.042}],8167:[.785,.011,.5,{ic:.071}],8168:[.919,0,.855,{ic:.086}],8169:[.862,0,.855,{ic:.086}],8170:[.717,0,1.055,{ic:.086}],8171:[.717,0,1.015,{ic:.086}],8172:[.717,0,.805,{ic:.052}],8173:[.694,-.495,.305,{ic:.192}],8174:[.694,-.495,.305,{ic:.192}],8175:[.694,-.508,.278,{ic:.069}],8178:[.706,.26,.667,{ic:.025}],8179:[.445,.26,.667,{ic:.025}],8180:[.694,.26,.71],8182:[.65,.011,.667,{ic:.025}],8183:[.65,.26,.667,{ic:.025}],8184:[.717,.022,.968,{ic:.037}],8185:[.717,.022,.888,{ic:.037}],8186:[.717,0,.987,{ic:.054}],8187:[.717,0,.917,{ic:.054}],8188:[.716,.26,.794,{ic:.054}],8189:[.694,-.508,.278,{ic:.109}],8190:[.694,-.511,.222,{ic:.072}]}}},"NCM"),{},["MJX-NCM-GKSS","MJX-NCM-GKSSB","MJX-NCM-GKSSI","MJX-NCM-GKSSBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/greek-ss","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/greek.js 0000644 0001762 0000144 00000124012 15112352537 022406 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","greek",c({GK:{normal:{880:[.683,0,.568],881:[.512,0,.452],882:[.677,0,.722],883:[.507,0,.5],884:[.7,-.48,.194],885:[.004,.216,.194],886:[.683,0,.75],887:[.512,0,.528],890:[-.065,.227,.111],891:[.528,.014,.591],892:[.528,.014,.591],893:[.528,.014,.591],894:[.43,.194,.278],895:[.683,.022,.514],900:[.7,-.479,.167],901:[.7,-.479,.278],902:[.716,0,.75],903:[.43,-.323,.278],904:[.7,0,.874],905:[.7,0,.944],906:[.7,0,.559],908:[.705,.022,.852],910:[.715,0,.93],911:[.705,0,.836],912:[.704,.013,.25],938:[.831,0,.361],939:[.831,0,.778],940:[.7,.011,.5],941:[.7,.022,.43],942:[.7,.271,.5],943:[.7,.013,.25],944:[.704,.01,.5],970:[.613,.013,.25],971:[.613,.01,.5],972:[.7,.011,.528],973:[.7,.01,.5],974:[.7,.01,.667],975:[.683,.262,.764],976:[.705,.011,.522],979:[.715,0,.778],980:[.831,0,.778],983:[.456,.261,.528],984:[.694,.002,.5],985:[.598,.064,.5],986:[.678,0,.778],987:[.453,.034,.5],988:[.68,0,.625],989:[.429,.259,.5],990:[.68,.006,.389],991:[.608,.139,.389],992:[.694,0,.766],993:[.694,.021,.722],994:[.705,.219,.982],995:[.433,.216,.789],996:[.686,.19,.658],997:[.444,.279,.535],998:[.683,.205,.698],999:[.459,.205,.555],1e3:[.666,.134,.51],1001:[.466,.134,.484],1002:[.705,0,.75],1003:[.433,0,.528],1004:[.684,.011,.5],1005:[.465,.009,.5],1006:[.683,0,.716],1007:[.654,0,.458],1010:[.448,.011,.444],1011:[.657,.211,.266],1015:[.683,0,.625],1016:[.728,.28,.472],1017:[.705,.022,.722],1018:[.683,0,.916],1019:[.43,.166,.583,{ic:.083}],1020:[.446,.26,.472],1021:[.705,.022,.722],1022:[.705,.022,.722],1023:[.705,.022,.722],7936:[.694,.011,.5],7937:[.694,.011,.5],7938:[.699,.011,.5],7939:[.699,.011,.5],7940:[.699,.011,.5],7941:[.699,.011,.5],7942:[.694,.011,.5],7943:[.694,.011,.5],7944:[.716,0,.803],7945:[.716,0,.765],7946:[.716,0,.905],7947:[.716,0,.905],7948:[.716,0,.845],7949:[.716,0,.845],7950:[.716,0,.872],7951:[.716,0,.872],7952:[.694,.022,.43],7953:[.694,.022,.43],7954:[.699,.022,.43],7955:[.699,.022,.43],7956:[.699,.022,.43],7957:[.699,.022,.43],7960:[.694,0,.902],7961:[.694,0,.902],7962:[.699,0,.958],7963:[.699,0,.958],7964:[.699,0,.958],7965:[.699,0,.958],7968:[.694,.272,.5],7969:[.694,.272,.5],7970:[.7,.272,.5],7971:[.7,.272,.5],7972:[.7,.272,.5],7973:[.7,.272,.5],7974:[.694,.271,.5],7975:[.694,.272,.5],7976:[.694,0,.972],7977:[.694,0,.972],7978:[.699,0,1.028],7979:[.699,0,1.028],7980:[.699,0,1.028],7981:[.699,0,1.028],7982:[.694,0,1.083],7983:[.694,0,1.083],7984:[.694,.013,.25],7985:[.694,.013,.25],7986:[.699,.013,.25],7987:[.699,.013,.25],7988:[.699,.013,.25],7989:[.699,.013,.25],7990:[.694,.013,.25,{ic:.009}],7991:[.694,.013,.25,{ic:.009}],7992:[.694,0,.583],7993:[.694,0,.583],7994:[.699,0,.639],7995:[.699,0,.639],7996:[.699,0,.639],7997:[.699,0,.639],7998:[.694,0,.694],7999:[.694,0,.694],8e3:[.694,.011,.528],8001:[.694,.011,.528],8002:[.699,.011,.528],8003:[.699,.011,.528],8004:[.699,.011,.528],8005:[.699,.011,.528],8008:[.705,.022,.944],8009:[.705,.022,.924],8010:[.705,.022,1.028],8011:[.705,.022,1.028],8012:[.705,.022,1.008],8013:[.705,.022,1.008],8016:[.694,.011,.5],8017:[.694,.011,.5],8018:[.699,.011,.5],8019:[.699,.011,.5],8020:[.699,.011,.5],8021:[.699,.011,.5],8022:[.694,.01,.5],8023:[.694,.011,.5],8025:[.705,0,.98],8027:[.705,0,1.056],8029:[.705,0,1.056],8031:[.705,0,1.111],8032:[.694,.011,.667],8033:[.694,.011,.667],8034:[.7,.011,.667],8035:[.7,.011,.667],8036:[.7,.011,.667],8037:[.7,.011,.667],8038:[.694,.011,.667],8039:[.694,.011,.667],8040:[.705,0,.916],8041:[.705,0,.896],8042:[.705,0,1],8043:[.705,0,1],8044:[.705,0,.98],8045:[.705,0,.98],8046:[.705,0,1.035],8047:[.705,0,1.035],8048:[.698,.011,.5],8049:[.7,.011,.5],8050:[.699,.022,.43],8051:[.699,.022,.43],8052:[.7,.272,.5],8053:[.699,.272,.5],8054:[.699,.013,.25],8055:[.699,.013,.25],8056:[.699,.011,.528],8057:[.699,.011,.528],8058:[.699,.011,.5],8059:[.699,.011,.5],8060:[.699,.011,.667],8061:[.699,.011,.667],8064:[.694,.227,.5],8065:[.694,.227,.5],8066:[.699,.227,.5],8067:[.699,.227,.5],8068:[.699,.227,.5],8069:[.699,.227,.5],8070:[.694,.227,.5],8071:[.694,.227,.5],8072:[.716,.211,.833],8073:[.716,.211,.755],8074:[.716,.211,.895],8075:[.716,.211,.895],8076:[.716,.211,.845],8077:[.716,.211,.845],8078:[.716,.211,.892],8079:[.716,.211,.892],8080:[.694,.272,.5],8081:[.694,.272,.5],8082:[.7,.272,.5],8083:[.7,.272,.5],8084:[.7,.272,.5],8085:[.7,.272,.5],8086:[.694,.272,.5],8087:[.694,.272,.5],8088:[.694,.211,.972],8089:[.694,.211,.952],8090:[.699,.211,1.028],8091:[.699,.211,1.028],8092:[.699,.211,1.028],8093:[.699,.211,1.028],8094:[.694,.211,1.083],8095:[.694,.211,1.083],8096:[.694,.227,.667],8097:[.694,.227,.667],8098:[.7,.227,.667],8099:[.7,.227,.667],8100:[.7,.227,.667],8101:[.7,.227,.667],8102:[.694,.227,.667],8103:[.694,.227,.667],8104:[.705,.211,.916],8105:[.705,.211,.896],8106:[.705,.211,1],8107:[.705,.211,1],8108:[.705,.211,.98],8109:[.705,.211,.98],8110:[.705,.211,1.035],8111:[.705,.211,1.035],8112:[.67,.011,.5],8113:[.565,.011,.5],8114:[.698,.227,.5],8115:[.441,.227,.5],8116:[.7,.227,.5],8118:[.625,.011,.5],8119:[.625,.227,.5],8120:[.939,0,.75],8121:[.799,0,.75],8122:[.716,0,.806],8123:[.716,0,.75],8124:[.716,.211,.75],8125:[.694,-.496,.222],8126:[.157,.157,.222],8127:[.694,-.496,.222],8128:[.625,-.528,.333],8129:[.694,-.482,.444],8130:[.7,.272,.5],8131:[.453,.272,.5],8132:[.699,.272,.5],8134:[.625,.272,.5],8135:[.625,.272,.5],8136:[.699,0,.847],8137:[.699,0,.874],8138:[.699,0,.917],8139:[.699,0,.944],8140:[.683,.211,.75],8141:[.699,-.48,.278,{ic:.017}],8142:[.699,-.48,.278,{ic:.012}],8143:[.694,-.474,.333],8144:[.67,.013,.25,{ic:.034}],8145:[.53,.013,.25,{ic:.034}],8146:[.699,.013,.25],8147:[.699,.013,.25],8150:[.625,.013,.25,{ic:.009}],8151:[.694,.013,.25,{ic:.009}],8152:[.928,0,.361,{ic:.013}],8153:[.788,0,.361,{ic:.013}],8154:[.699,0,.528],8155:[.699,0,.559],8157:[.699,-.48,.278,{ic:.017}],8158:[.699,-.48,.278,{ic:.012}],8159:[.694,-.474,.333],8160:[.679,.011,.5],8161:[.539,.011,.5],8162:[.699,.011,.5],8163:[.699,.011,.5],8164:[.694,.26,.472],8165:[.694,.26,.472],8166:[.625,.011,.5],8167:[.694,.011,.5],8168:[.928,0,.778],8169:[.788,0,.778],8170:[.705,0,.945],8171:[.705,0,.93],8172:[.694,0,.882],8173:[.699,-.48,.278],8174:[.699,-.48,.278],8175:[.699,-.48,.167],8178:[.699,.227,.667],8179:[.45,.227,.667],8180:[.699,.227,.667],8182:[.625,.011,.667],8183:[.625,.227,.667],8184:[.705,.022,.889],8185:[.705,.022,.852],8186:[.705,0,.861],8187:[.705,0,.876],8188:[.705,.211,.722],8189:[.7,-.479,.172],8190:[.694,-.496,.222],11392:[.672,.007,.75],11393:[.432,.01,.566],11394:[.683,.001,.708],11395:[.43,0,.5],11396:[.68,0,.625],11397:[.43,0,.472],11398:[.672,0,.75],11399:[.432,0,.576],11400:[.705,.022,.681],11401:[.447,.011,.438],11402:[.716,.1,.813],11403:[.477,.151,.625],11404:[.683,.085,.605],11405:[.43,.062,.419],11406:[.683,0,.75],11407:[.43,0,.555],11408:[.705,.022,.778],11409:[.447,.011,.5],11410:[.683,0,.361],11411:[.43,0,.25],11412:[.683,0,.778],11413:[.43,0,.555],11414:[.684,0,.694],11415:[.43,0,.475],11416:[.683,.012,1.127],11417:[.43,.008,.749],11418:[.683,0,.75],11419:[.432,0,.552],11420:[.677,.097,.637],11421:[.431,.074,.402],11422:[.705,.022,.778],11423:[.448,.011,.5],11424:[.68,0,.75],11425:[.43,0,.555],11426:[.686,0,.68],11427:[.43,0,.5],11428:[.705,.022,.722],11429:[.447,.011,.439],11430:[.677,0,.722],11431:[.43,0,.5],11432:[.683,0,.75],11433:[.431,0,.547],11434:[.683,0,.722],11435:[.43,.088,.458],11436:[.683,0,.75],11437:[.43,0,.528],11438:[.683,0,.778],11439:[.43,0,.583],11440:[.705,.022,1],11441:[.433,.011,.779],11442:[.678,-.129,.728],11443:[.43,-.061,.499],11444:[.695,0,.49],11445:[.439,0,.313],11446:[.763,.086,.667],11447:[.498,.069,.533],11448:[.695,.15,.524],11449:[.439,.108,.337],11450:[.473,-.23,.667],11451:[.321,-.123,.533],11452:[.685,.008,.667,{ic:.043}],11453:[.434,.005,.61],11454:[.685,.008,.843],11455:[.434,.005,.734],11456:[.686,0,.74],11457:[.43,.142,.5],11458:[1.063,.219,.982],11459:[.79,.216,.789],11460:[.683,.022,.555],11461:[.43,.205,.444],11462:[.683,.167,.409],11463:[.43,.122,.25],11464:[.666,.134,.536],11465:[.466,.134,.513],11466:[.694,.109,.488],11467:[.43,.078,.355],11468:[.666,.022,.48],11469:[.472,.126,.43],11470:[.686,.169,.63],11471:[.43,.122,.414],11472:[.683,0,.625],11473:[.43,0,.472],11474:[.669,.022,.488],11475:[.498,.01,.355],11476:[.873,0,.401],11477:[.608,0,.343],11478:[.683,.196,.687],11479:[.43,.158,.522],11480:[.68,0,.75],11481:[.43,0,.555],11482:[.672,0,.75],11483:[.432,-0,.576],11484:[.899,.022,.778],11485:[.635,.011,.5],11486:[.68,.001,.625],11487:[.43,-0,.472],11488:[.681,.402,.817],11489:[.454,.268,.623],11490:[.677,.221,.742],11491:[.43,.165,.5],11492:[.43,.252,.567,{ic:.005}],11493:[.708,.162,.749],11494:[.708,.162,.648],11495:[.808,.162,1.143],11496:[.708,.162,.749],11497:[.708,.162,.616],11498:[.448,.011,.918],11499:[.69,-.06,.789],11500:[.477,-.023,.533],11501:[.685,.008,.667,{ic:.043}],11502:[.434,.005,.61],11503:[.697,-.499,.533],11504:[.782,-.614,0,{dx:.277}],11505:[.782,-.614,0,{dx:.233}],11506:[.76,.022,.778],11507:[.503,.014,.5],11513:[.562,0,.843],11514:[.562,.009,.573],11515:[.562,.009,.573],11516:[.562,0,.843],11517:[.439,.004,.241],11518:[.42,.011,.313],11519:[.572,-.37,.313]}},GKB:{bold:{880:[.686,0,.654],881:[.516,0,.55],882:[.675,0,.8],883:[.505,0,.638],884:[.711,-.489,.261],885:[.005,.217,.261],886:[.686,0,.9],887:[.516,0,.733],890:[-.055,.243,.161],891:[.523,.007,.669],892:[.523,.007,.669],893:[.523,.007,.669],894:[.445,.193,.361],895:[.686,.011,.594],900:[.711,-.489,.228],901:[.711,-.489,.628],902:[.711,0,.933],903:[.445,-.289,.361],904:[.711,0,1.044],905:[.711,0,1.192],906:[.711,0,.703],908:[.711,.011,1.044],910:[.711,0,1.189],911:[.711,0,1.008],912:[.711,.009,.328,{ic:.078}],938:[.886,0,.475],939:[.886,0,.961],940:[.711,.005,.655,{ic:.011}],941:[.711,.011,.544],942:[.711,.261,.628],943:[.711,.009,.328],944:[.711,.005,.628],970:[.694,.009,.328,{ic:.03}],971:[.694,.005,.628],972:[.711,.005,.661],973:[.711,.005,.628],974:[.711,.005,.828],975:[.686,.258,.901],976:[.705,.011,.532],979:[.702,0,1.032],980:[.886,0,.778,{ic:.041}],983:[.479,.261,.528],984:[.691,.004,.628],985:[.648,.099,.628],986:[.675,0,.961],987:[.455,.026,.628],990:[.695,.024,.389],991:[.618,.146,.494],992:[.702,0,.948],993:[.694,.01,.894],994:[.707,.219,.982],995:[.434,.216,.789],996:[.689,.19,.738],997:[.451,.281,.535],998:[.686,.205,.731],999:[.46,.205,.555],1e3:[.666,.134,.51],1001:[.466,.134,.484],1002:[.705,0,.75],1003:[.433,.001,.528],1004:[.684,.011,.5],1005:[.465,.037,.5],1006:[.683,0,.716],1007:[.656,.001,.458],1010:[.453,.006,.498],1011:[.685,.2,.388],1015:[.683,0,.625],1016:[.738,.295,.472],1017:[.697,.011,.831],1018:[.683,0,.916],1019:[.43,.181,.657],1020:[.45,.256,.622],1021:[.697,.011,.831],1022:[.697,.011,.831],1023:[.697,.011,.831],7936:[.694,.005,.655,{ic:.011}],7937:[.694,.005,.655,{ic:.011}],7938:[.711,.005,.655,{ic:.011}],7939:[.711,.005,.655,{ic:.011}],7940:[.711,.005,.655,{ic:.011}],7941:[.711,.005,.655,{ic:.011}],7942:[.694,.005,.628,{ic:.038}],7943:[.694,.005,.655,{ic:.011}],7944:[.698,0,.96],7945:[.698,0,.937],7946:[.711,0,1.054],7947:[.711,0,1.064],7948:[.711,0,1.034],7949:[.711,0,1.034],7950:[.698,0,1.098],7951:[.698,0,1.078],7952:[.694,.011,.544],7953:[.694,.011,.544],7954:[.711,.011,.544],7955:[.711,.011,.544],7956:[.711,.011,.544],7957:[.711,.011,.544],7960:[.694,0,1.11],7961:[.694,0,1.11],7962:[.711,0,1.177],7963:[.711,0,1.177],7964:[.711,0,1.177],7965:[.711,0,1.177],7968:[.694,.261,.628],7969:[.694,.261,.628],7970:[.711,.261,.628],7971:[.711,.261,.628],7972:[.711,.261,.628],7973:[.711,.261,.628],7974:[.694,.261,.628],7975:[.694,.261,.628],7976:[.694,0,1.258],7977:[.694,0,1.258],7978:[.711,0,1.325],7979:[.711,0,1.325],7980:[.711,0,1.325],7981:[.711,0,1.325],7982:[.694,0,1.392],7983:[.694,0,1.392],7984:[.694,.009,.328],7985:[.694,.009,.328],7986:[.711,.009,.328],7987:[.711,.009,.328],7988:[.711,.009,.328],7989:[.711,.009,.328],7990:[.694,.009,.328,{ic:.014}],7991:[.694,.009,.328,{ic:.014}],7992:[.694,0,.769],7993:[.694,0,.769],7994:[.711,0,.836],7995:[.711,0,.836],7996:[.711,0,.836],7997:[.711,0,.836],7998:[.694,0,.903],7999:[.694,0,.903],8e3:[.694,.005,.661],8001:[.694,.005,.661],8002:[.711,.005,.661],8003:[.711,.005,.661],8004:[.711,.005,.661],8005:[.711,.005,.661],8008:[.697,.011,1.157],8009:[.697,.011,1.157],8010:[.711,.011,1.258],8011:[.711,.011,1.258],8012:[.711,.011,1.258],8013:[.711,.011,1.258],8016:[.694,.005,.628],8017:[.694,.005,.628],8018:[.711,.005,.628],8019:[.711,.005,.628],8020:[.711,.005,.628],8021:[.711,.005,.628],8022:[.694,.005,.628],8023:[.694,.005,.628],8025:[.697,0,1.215],8027:[.711,0,1.322],8029:[.711,0,1.322],8031:[.697,0,1.389],8032:[.694,.005,.828],8033:[.694,.005,.828],8034:[.711,.005,.828],8035:[.711,.005,.828],8036:[.711,.005,.828],8037:[.711,.005,.828],8038:[.694,.005,.828],8039:[.694,.005,.828],8040:[.697,0,1.155],8041:[.697,0,1.155],8042:[.711,0,1.255],8043:[.711,0,1.255],8044:[.711,0,1.255],8045:[.711,0,1.255],8046:[.697,0,1.322],8047:[.697,0,1.322],8048:[.711,.005,.655,{ic:.011}],8049:[.711,.005,.655,{ic:.011}],8050:[.711,.011,.544],8051:[.711,.011,.544],8052:[.711,.261,.628],8053:[.711,.261,.628],8054:[.711,.009,.328],8055:[.711,.009,.328],8056:[.711,.005,.661],8057:[.711,.005,.661],8058:[.711,.005,.628],8059:[.711,.005,.628],8060:[.711,.005,.828],8061:[.711,.005,.828],8064:[.694,.243,.655,{ic:.011}],8065:[.694,.243,.655,{ic:.011}],8066:[.711,.243,.655,{ic:.011}],8067:[.711,.243,.655,{ic:.011}],8068:[.711,.243,.655,{ic:.011}],8069:[.711,.243,.655,{ic:.011}],8070:[.694,.243,.655,{ic:.011}],8071:[.694,.243,.655,{ic:.011}],8072:[.698,.244,.96],8073:[.698,.244,.947],8074:[.711,.244,1.084],8075:[.711,.244,1.074],8076:[.711,.244,1.044],8077:[.711,.244,1.034],8078:[.698,.244,1.098],8079:[.698,.244,1.088],8080:[.694,.261,.628],8081:[.694,.261,.628],8082:[.711,.261,.628],8083:[.711,.261,.628],8084:[.711,.261,.628],8085:[.711,.261,.628],8086:[.694,.261,.628],8087:[.694,.261,.628],8088:[.694,.244,1.258],8089:[.694,.244,1.258],8090:[.711,.244,1.325],8091:[.711,.244,1.325],8092:[.711,.244,1.325],8093:[.711,.244,1.325],8094:[.694,.244,1.392],8095:[.694,.244,1.392],8096:[.694,.243,.828],8097:[.694,.243,.828],8098:[.711,.243,.828],8099:[.711,.243,.828],8100:[.711,.243,.828],8101:[.711,.243,.828],8102:[.694,.243,.828],8103:[.694,.243,.828],8104:[.697,.244,1.155],8105:[.697,.244,1.155],8106:[.711,.244,1.255],8107:[.711,.244,1.255],8108:[.711,.244,1.255],8109:[.711,.244,1.255],8110:[.697,.244,1.322],8111:[.697,.244,1.322],8112:[.69,.005,.655,{ic:.011}],8113:[.554,.005,.655,{ic:.011}],8114:[.711,.243,.655,{ic:.011}],8115:[.45,.243,.655,{ic:.011}],8116:[.711,.243,.655,{ic:.011}],8118:[.694,.005,.655,{ic:.011}],8119:[.694,.243,.655,{ic:.011}],8120:[.935,0,.933],8121:[.799,0,.933],8122:[.711,0,.928],8123:[.711,0,.913],8124:[.698,.244,.933],8125:[.694,-.5,.294],8126:[.155,.155,.294],8127:[.694,-.5,.294],8128:[.694,-.598,.428],8129:[.694,-.468,.561],8130:[.711,.261,.628],8131:[.455,.261,.628],8132:[.711,.261,.628],8134:[.694,.261,.628],8135:[.694,.261,.628],8136:[.711,0,1.044],8137:[.711,0,1.044],8138:[.711,0,1.192],8139:[.711,0,1.192],8140:[.686,.244,.964],8141:[.711,-.489,.361],8142:[.711,-.489,.361],8143:[.694,-.49,.428],8144:[.69,.009,.355,{ic:.021}],8145:[.554,.009,.355,{ic:.021}],8146:[.711,.009,.328,{ic:.078}],8147:[.711,.009,.328,{ic:.078}],8150:[.694,.009,.328,{ic:.014}],8151:[.694,.009,.328,{ic:.014}],8152:[.934,0,.475],8153:[.798,0,.475],8154:[.711,0,.703],8155:[.711,0,.703],8157:[.711,-.489,.361],8158:[.711,-.489,.361],8159:[.694,-.49,.428],8160:[.704,.005,.655],8161:[.568,.005,.655],8162:[.711,.005,.628],8163:[.711,.005,.628],8164:[.694,.256,.594],8165:[.694,.256,.594],8166:[.694,.005,.628],8167:[.694,.005,.628],8168:[.934,0,.961],8169:[.798,0,.961],8170:[.711,0,1.189],8171:[.711,0,1.189],8172:[.694,0,1.141],8173:[.711,-.489,.328,{ic:.078}],8174:[.711,-.489,.328,{ic:.078}],8175:[.711,-.489,.228],8178:[.711,.243,.828],8179:[.454,.243,.828],8180:[.711,.243,.828],8182:[.694,.005,.828],8183:[.694,.243,.828],8184:[.711,.011,1.091],8185:[.711,.011,1.044],8186:[.711,0,1.089],8187:[.711,0,1.008],8188:[.697,.244,.894],8189:[.711,-.489,.228],8190:[.694,-.5,.294],11392:[.672,.007,.75],11393:[.432,.01,.566],11394:[.686,0,.818],11395:[.445,0,.575],11396:[.68,0,.692],11397:[.445,0,.496],11398:[.672,0,.75],11399:[.432,0,.556],11400:[.697,.011,.831],11401:[.453,.006,.489],11402:[.715,.143,.813],11403:[.476,.187,.625],11404:[.686,.091,.605],11405:[.43,.069,.419],11406:[.686,0,.9],11407:[.445,0,.639],11408:[.697,.011,.894],11409:[.455,.011,.511],11410:[.686,0,.436],11411:[.445,0,.275],11412:[.686,0,.901],11413:[.445,0,.639],11414:[.685,0,.806],11415:[.444,.003,.554],11416:[.684,.012,1.127],11417:[.431,.008,.749],11418:[.686,0,.9],11419:[.445,0,.659],11420:[.677,.106,.637],11421:[.431,.074,.402],11422:[.697,.011,.864],11423:[.453,.006,.575],11424:[.68,0,.9],11425:[.445,0,.639],11426:[.686,0,.786],11427:[.445,0,.567],11428:[.697,.011,.831],11429:[.453,.006,.511],11430:[.675,0,.8],11431:[.445,0,.544],11432:[.686,0,.869],11433:[.445,0,.609],11434:[.686,0,.831],11435:[.446,.109,.518],11436:[.686,0,.869],11437:[.445,0,.607],11438:[.686,0,.894],11439:[.445,0,.588],11440:[.707,.03,.982],11441:[.434,.023,.789],11442:[.679,-.129,.728],11443:[.431,-.061,.499],11444:[.71,0,.49],11445:[.454,0,.313],11446:[.766,.089,.667],11447:[.487,.058,.533],11448:[.71,.15,.49],11449:[.454,.108,.313,{ic:.004}],11450:[.488,-.212,.667],11451:[.317,-.127,.533],11452:[.688,.012,.845],11453:[.439,.01,.606],11454:[.688,.012,.949],11455:[.439,.01,.718],11456:[.686,0,.786],11457:[.445,.14,.617],11458:[1.107,.219,.982],11459:[.819,.216,.789],11460:[.686,.011,.639],11461:[.445,.2,.511],11462:[.683,.167,.409],11463:[.443,.123,.25],11464:[.666,.134,.51],11465:[.466,.134,.6],11466:[.694,.109,.488],11467:[.43,.078,.355],11468:[.655,.011,.535],11469:[.473,.127,.43],11470:[.686,.169,.786],11471:[.445,.122,.567],11472:[.686,0,.692],11473:[.445,0,.496],11474:[.676,.027,.488],11475:[.497,.011,.355],11476:[.873,0,.436],11477:[.608,0,.325],11478:[.686,.186,.692],11479:[.445,.148,.496],11480:[.68,0,.9],11481:[.445,0,.639],11482:[.672,0,.75],11483:[.432,0,.556],11484:[.899,.011,.864],11485:[.638,.006,.575],11486:[.68,.001,.692],11487:[.445,.001,.496],11488:[.681,.401,.817],11489:[.454,.268,.623],11490:[.675,.221,.8],11491:[.445,.165,.544],11492:[.446,.253,.602],11493:[.723,.161,.749],11494:[.723,.161,.749],11495:[.833,.161,1.099],11496:[.708,.161,.691],11497:[.723,.146,.736],11498:[.453,.006,1.074],11499:[.689,-.054,.951],11500:[.474,-.046,.653],11501:[.688,.012,.741],11502:[.439,.01,.598],11503:[.698,-.498,.533],11504:[.782,-.614,0,{dx:.281}],11505:[.782,-.614,0,{dx:.23}],11506:[.76,.022,.804],11507:[.503,.014,.52],11513:[.57,0,.893],11514:[.57,.009,.573],11515:[.57,.009,.573],11516:[.57,0,.893],11517:[.444,.009,.241],11518:[.419,.025,.363],11519:[.582,-.355,.313]}},GKI:{italic:{880:[.683,0,.629],881:[.514,0,.562],882:[.677,0,.716,{ic:.09}],883:[.506,0,.572],884:[.7,-.477,.194,{ic:.134}],885:[.005,.217,.194],886:[.683,0,.743,{ic:.092}],887:[.514,0,.743],890:[-.064,.25,.111],891:[.528,.014,.591,{ic:.031}],892:[.528,.014,.591,{ic:.077}],893:[.528,.014,.591,{ic:.031}],894:[.43,.192,.278,{ic:.008}],895:[.683,.022,.525,{ic:.097}],900:[.7,-.478,.167,{ic:.138}],901:[.7,-.478,.278,{ic:.111}],902:[.716,0,.75],903:[.43,-.323,.278],904:[.7,0,.847,{ic:.087}],905:[.7,0,.917,{ic:.137}],906:[.7,0,.528,{ic:.142}],908:[.705,.022,.861,{ic:.04}],910:[.7,0,.861,{ic:.161}],911:[.705,0,.805,{ic:.063}],912:[.7,.011,.25,{ic:.125}],938:[.833,0,.361,{ic:.128}],939:[.833,0,.778,{ic:.065}],940:[.7,.014,.5],941:[.7,.01,.43,{ic:.037}],942:[.708,.25,.555,{ic:.004}],943:[.7,.011,.25,{ic:.125}],944:[.7,.011,.5,{ic:.025}],970:[.625,.011,.25,{ic:.155}],971:[.625,.011,.5,{ic:.025}],972:[.7,.01,.472,{ic:.021}],973:[.7,.011,.5,{ic:.025}],974:[.7,.012,.667,{ic:.007}],975:[.683,.261,.764,{ic:.078}],976:[.705,.011,.474,{ic:.053}],979:[.722,0,.778,{ic:.007}],980:[.828,0,.778,{ic:.007}],983:[.456,.261,.528,{ic:.047}],984:[.695,.002,.5,{ic:.076}],985:[.603,.05,.5,{ic:.031}],986:[.677,0,.778,{ic:.113}],987:[.444,0,.5,{ic:.037}],988:[.681,0,.653,{ic:.073}],989:[.43,.25,.5,{ic:.035}],990:[.681,.006,.389],991:[.599,.139,.389],992:[.694,.001,.766],993:[.705,0,.722],994:[.705,.219,.982,{ic:.012}],995:[.433,.216,.789,{ic:.017}],996:[.687,.19,.658,{ic:.081}],997:[.437,.279,.535,{ic:.061}],998:[.683,.205,.698],999:[.459,.205,.555],1e3:[.666,.134,.51,{ic:.031}],1001:[.466,.134,.484,{ic:.009}],1002:[.705,0,.75,{ic:.047}],1003:[.433,0,.528,{ic:.001}],1004:[.684,.011,.5,{ic:.032}],1005:[.465,.009,.5,{ic:.03}],1006:[.683,0,.716],1007:[.654,0,.458],1010:[.448,.011,.444,{ic:.009}],1011:[.657,.211,.266,{ic:.048}],1015:[.683,0,.625],1016:[.73,.28,.472],1017:[.705,.022,.722],1018:[.683,0,.916],1019:[.43,.166,.583,{ic:.07}],1020:[.446,.26,.472,{ic:.005}],1021:[.705,.022,.722],1022:[.705,.022,.722],1023:[.705,.022,.722],7936:[.694,.014,.5],7937:[.694,.014,.5],7938:[.7,.014,.5],7939:[.7,.014,.5],7940:[.7,.014,.5,{ic:.024}],7941:[.7,.014,.5,{ic:.024}],7942:[.694,.014,.5,{ic:.042}],7943:[.694,.014,.5,{ic:.042}],7944:[.716,0,.833],7945:[.716,0,.805],7946:[.716,0,.945],7947:[.716,0,.945],7948:[.716,0,.945],7949:[.716,0,.945],7950:[.716,0,.972],7951:[.716,0,.972],7952:[.694,.01,.43,{ic:.037}],7953:[.694,.01,.43,{ic:.037}],7954:[.7,.01,.43,{ic:.044}],7955:[.7,.01,.43,{ic:.044}],7956:[.7,.01,.43,{ic:.077}],7957:[.7,.01,.43,{ic:.077}],7960:[.694,0,.902,{ic:.087}],7961:[.694,0,.902,{ic:.087}],7962:[.7,0,.958,{ic:.087}],7963:[.7,0,.958,{ic:.087}],7964:[.7,0,.958,{ic:.087}],7965:[.7,0,.958,{ic:.087}],7968:[.694,.25,.555,{ic:.004}],7969:[.694,.25,.555,{ic:.004}],7970:[.7,.25,.555,{ic:.004}],7971:[.7,.25,.555,{ic:.004}],7972:[.7,.25,.555,{ic:.007}],7973:[.7,.25,.555,{ic:.007}],7974:[.694,.25,.555,{ic:.035}],7975:[.694,.25,.555,{ic:.035}],7976:[.694,0,.972,{ic:.137}],7977:[.694,0,.972,{ic:.137}],7978:[.7,0,1.028,{ic:.137}],7979:[.7,0,1.028,{ic:.137}],7980:[.7,0,1.028,{ic:.137}],7981:[.7,0,1.028,{ic:.137}],7982:[.695,0,1.083,{ic:.137}],7983:[.695,0,1.083,{ic:.137}],7984:[.694,.011,.25,{ic:.087}],7985:[.694,.011,.25,{ic:.068}],7986:[.7,.011,.25,{ic:.135}],7987:[.7,.011,.25,{ic:.135}],7988:[.7,.011,.25,{ic:.167}],7989:[.7,.011,.25,{ic:.167}],7990:[.694,.011,.25,{ic:.185}],7991:[.694,.011,.25,{ic:.185}],7992:[.694,0,.583,{ic:.142}],7993:[.694,0,.583,{ic:.142}],7994:[.7,0,.639,{ic:.142}],7995:[.7,0,.639,{ic:.142}],7996:[.7,0,.639,{ic:.142}],7997:[.7,0,.639,{ic:.142}],7998:[.695,0,.694,{ic:.142}],7999:[.695,0,.694,{ic:.142}],8e3:[.694,.01,.472,{ic:.021}],8001:[.694,.01,.472,{ic:.021}],8002:[.7,.01,.472,{ic:.023}],8003:[.7,.01,.472,{ic:.023}],8004:[.7,.01,.472,{ic:.056}],8005:[.7,.01,.472,{ic:.056}],8008:[.705,.022,.944,{ic:.04}],8009:[.705,.022,.944,{ic:.04}],8010:[.705,.022,1.028,{ic:.04}],8011:[.705,.022,1.028,{ic:.04}],8012:[.705,.022,1.028,{ic:.04}],8013:[.705,.022,1.028,{ic:.04}],8016:[.694,.011,.5,{ic:.025}],8017:[.694,.011,.5,{ic:.025}],8018:[.7,.011,.5,{ic:.025}],8019:[.7,.011,.5,{ic:.025}],8020:[.7,.011,.5,{ic:.033}],8021:[.7,.011,.5,{ic:.033}],8022:[.694,.011,.5,{ic:.052}],8023:[.694,.011,.5,{ic:.052}],8025:[.694,0,.916,{ic:.161}],8027:[.7,0,.972,{ic:.161}],8029:[.7,0,.972,{ic:.161}],8031:[.695,0,1.027,{ic:.161}],8032:[.694,.012,.667,{ic:.007}],8033:[.694,.012,.667,{ic:.007}],8034:[.706,.012,.667,{ic:.007}],8035:[.706,.012,.667,{ic:.007}],8036:[.7,.012,.667,{ic:.007}],8037:[.7,.012,.667,{ic:.007}],8038:[.694,.012,.667,{ic:.033}],8039:[.694,.012,.667,{ic:.033}],8040:[.705,0,.916,{ic:.063}],8041:[.705,0,.916,{ic:.063}],8042:[.705,0,1,{ic:.063}],8043:[.705,0,1,{ic:.063}],8044:[.705,0,1,{ic:.063}],8045:[.705,0,1,{ic:.063}],8046:[.705,0,1.055,{ic:.063}],8047:[.705,0,1.055,{ic:.063}],8048:[.7,.014,.5],8049:[.7,.014,.5,{ic:.007}],8050:[.7,.01,.43,{ic:.037}],8051:[.7,.01,.43,{ic:.077}],8052:[.7,.25,.555,{ic:.004}],8053:[.7,.25,.555,{ic:.004}],8054:[.7,.011,.25,{ic:.017}],8055:[.7,.011,.25,{ic:.127}],8056:[.7,.01,.472,{ic:.021}],8057:[.7,.01,.472,{ic:.035}],8058:[.7,.011,.5,{ic:.025}],8059:[.7,.011,.5,{ic:.025}],8060:[.7,.012,.667,{ic:.007}],8061:[.7,.012,.667,{ic:.007}],8064:[.694,.25,.5],8065:[.694,.25,.5],8066:[.7,.25,.5],8067:[.7,.25,.5],8068:[.7,.25,.5,{ic:.024}],8069:[.7,.25,.5,{ic:.024}],8070:[.694,.25,.5,{ic:.042}],8071:[.694,.25,.5,{ic:.042}],8072:[.716,.267,.833],8073:[.716,.267,.805],8074:[.716,.267,.945],8075:[.716,.267,.945],8076:[.716,.267,.945],8077:[.716,.267,.945],8078:[.716,.267,.972],8079:[.716,.267,.972],8080:[.694,.25,.555,{ic:.004}],8081:[.694,.25,.555,{ic:.004}],8082:[.7,.25,.555,{ic:.004}],8083:[.7,.25,.555,{ic:.004}],8084:[.7,.25,.555,{ic:.007}],8085:[.7,.25,.555,{ic:.007}],8086:[.694,.25,.555,{ic:.035}],8087:[.694,.25,.555,{ic:.035}],8088:[.694,.267,.972,{ic:.137}],8089:[.694,.267,.972,{ic:.137}],8090:[.7,.267,1.028,{ic:.137}],8091:[.7,.267,1.028,{ic:.137}],8092:[.7,.267,1.028,{ic:.137}],8093:[.7,.267,1.028,{ic:.137}],8094:[.695,.267,1.083,{ic:.137}],8095:[.695,.267,1.083,{ic:.137}],8096:[.694,.25,.667,{ic:.007}],8097:[.694,.25,.667,{ic:.007}],8098:[.706,.25,.667,{ic:.007}],8099:[.706,.25,.667,{ic:.007}],8100:[.7,.25,.667,{ic:.007}],8101:[.7,.25,.667,{ic:.007}],8102:[.694,.25,.667,{ic:.033}],8103:[.694,.25,.667,{ic:.033}],8104:[.705,.267,.916,{ic:.063}],8105:[.705,.267,.916,{ic:.063}],8106:[.705,.267,1,{ic:.063}],8107:[.705,.267,1,{ic:.063}],8108:[.705,.267,1,{ic:.063}],8109:[.705,.267,1,{ic:.063}],8110:[.705,.267,1.055,{ic:.063}],8111:[.705,.267,1.055,{ic:.063}],8112:[.705,.014,.555,{ic:.087}],8113:[.565,.014,.555,{ic:.039}],8114:[.7,.25,.5],8115:[.441,.25,.5],8116:[.7,.25,.5],8118:[.625,.014,.5,{ic:.038}],8119:[.625,.25,.5,{ic:.037}],8120:[.979,0,.75,{ic:.065}],8121:[.839,0,.75,{ic:.03}],8122:[.716,0,.806],8123:[.716,0,.75],8124:[.716,.267,.75],8125:[.694,-.496,.222,{ic:.139}],8126:[.157,.158,.222,{ic:.005}],8127:[.694,-.494,.222,{ic:.115}],8128:[.625,-.527,.333,{ic:.141}],8129:[.694,-.481,.444,{ic:.089}],8130:[.7,.25,.555,{ic:.004}],8131:[.441,.25,.555,{ic:.004}],8132:[.701,.25,.555,{ic:.004}],8134:[.626,.25,.555,{ic:.024}],8135:[.626,.25,.555,{ic:.024}],8136:[.7,0,.847,{ic:.087}],8137:[.7,0,.847,{ic:.087}],8138:[.7,0,.917,{ic:.137}],8139:[.7,0,.917,{ic:.137}],8140:[.683,.267,.75,{ic:.137}],8141:[.7,-.478,.278,{ic:.121}],8142:[.7,-.478,.278,{ic:.153}],8143:[.694,-.473,.333,{ic:.144}],8144:[.705,.011,.25,{ic:.201}],8145:[.565,.011,.25,{ic:.166}],8146:[.7,.011,.25,{ic:.114}],8147:[.7,.011,.25,{ic:.12}],8150:[.625,.011,.25,{ic:.178}],8151:[.694,.011,.25,{ic:.185}],8152:[.968,0,.361,{ic:.253}],8153:[.828,0,.361,{ic:.219}],8154:[.7,0,.528,{ic:.142}],8155:[.7,0,.528,{ic:.142}],8157:[.7,-.478,.278,{ic:.121}],8158:[.7,-.478,.278,{ic:.153}],8159:[.694,-.473,.333,{ic:.144}],8160:[.705,.011,.517,{ic:.079}],8161:[.565,.011,.517,{ic:.024}],8162:[.7,.011,.5,{ic:.025}],8163:[.7,.011,.5,{ic:.031}],8164:[.694,.25,.472,{ic:.011}],8165:[.694,.25,.472,{ic:.011}],8166:[.625,.011,.5,{ic:.037}],8167:[.694,.011,.5,{ic:.052}],8168:[.968,0,.694,{ic:.161}],8169:[.828,0,.694,{ic:.161}],8170:[.7,0,.861,{ic:.161}],8171:[.7,0,.861,{ic:.161}],8172:[.694,0,.902,{ic:.073}],8173:[.7,-.473,.278,{ic:.1}],8174:[.7,-.479,.278,{ic:.145}],8175:[.7,-.478,.167,{ic:.088}],8178:[.7,.25,.667,{ic:.007}],8179:[.43,.25,.667,{ic:.007}],8180:[.7,.25,.667,{ic:.007}],8182:[.625,.012,.667,{ic:.021}],8183:[.625,.25,.667,{ic:.021}],8184:[.705,.022,.889,{ic:.04}],8185:[.705,.022,.861,{ic:.04}],8186:[.705,0,.861,{ic:.063}],8187:[.705,0,.805,{ic:.063}],8188:[.705,.267,.722,{ic:.063}],8189:[.7,-.479,.167,{ic:.137}],8190:[.694,-.495,.222,{ic:.069}],11392:[.672,.007,.75],11393:[.432,.01,.566],11394:[.683,0,.708],11395:[.43,0,.5],11396:[.68,0,.625,{ic:.016}],11397:[.43,0,.472],11398:[.672,0,.75],11399:[.432,0,.576],11400:[.705,.022,.681,{ic:.044}],11401:[.447,.011,.438,{ic:.007}],11402:[.716,.1,.813,{ic:.065}],11403:[.476,.177,.625,{ic:.05}],11404:[.683,.086,.605,{ic:.075}],11405:[.43,.063,.419,{ic:.029}],11406:[.683,0,.75,{ic:.053}],11407:[.43,0,.555,{ic:.029}],11408:[.705,.022,.778],11409:[.447,.011,.5,{ic:.003}],11410:[.683,0,.361,{ic:.059}],11411:[.43,0,.25,{ic:.043}],11412:[.683,0,.778,{ic:.031}],11413:[.43,0,.555,{ic:.016}],11414:[.684,0,.694],11415:[.43,0,.475],11416:[.683,.012,1.127],11417:[.43,.008,.749],11418:[.683,0,.75,{ic:.053}],11419:[.432,0,.552,{ic:.03}],11420:[.677,.097,.637,{ic:.033}],11421:[.431,.074,.402,{ic:.027}],11422:[.705,.022,.778],11423:[.448,.011,.5,{ic:.004}],11424:[.68,0,.75,{ic:.054}],11425:[.43,0,.555,{ic:.029}],11426:[.684,0,.68,{ic:.011}],11427:[.43,0,.5,{ic:.006}],11428:[.705,.022,.722,{ic:.034}],11429:[.447,.011,.439,{ic:.026}],11430:[.677,0,.722,{ic:.03}],11431:[.43,0,.5,{ic:.019}],11432:[.683,0,.75,{ic:.075}],11433:[.431,0,.547,{ic:.037}],11434:[.683,0,.722],11435:[.43,.092,.458,{ic:.004}],11436:[.683,0,.75,{ic:.021}],11437:[.43,0,.528,{ic:.026}],11438:[.683,0,.778],11439:[.43,0,.583],11440:[.705,.022,1],11441:[.433,.011,.779,{ic:.002}],11442:[.678,-.129,.728],11443:[.43,-.061,.499],11444:[.697,0,.49],11445:[.441,0,.313],11446:[.763,.086,.667,{ic:.076}],11447:[.498,.069,.533,{ic:.055}],11448:[.698,.15,.524],11449:[.441,.108,.337],11450:[.473,-.23,.667],11451:[.321,-.123,.533,{ic:.009}],11452:[.685,.008,.667,{ic:.043}],11453:[.434,.005,.61],11454:[.685,.008,.843,{ic:.007}],11455:[.434,.005,.734,{ic:.007}],11456:[.684,0,.74,{ic:.011}],11457:[.43,.142,.5,{ic:.024}],11458:[1.063,.219,.982],11459:[.79,.216,.789],11460:[.683,.022,.555,{ic:.042}],11461:[.43,.205,.444,{ic:.037}],11462:[.683,.167,.409,{ic:.071}],11463:[.43,.122,.25,{ic:.065}],11464:[.666,.134,.536,{ic:.005}],11465:[.466,.134,.513],11466:[.694,.109,.488,{ic:.064}],11467:[.43,.078,.355,{ic:.033}],11468:[.666,.022,.48,{ic:.004}],11469:[.472,.126,.43,{ic:.012}],11470:[.684,.169,.63,{ic:.064}],11471:[.43,.122,.414,{ic:.045}],11472:[.683,0,.625],11473:[.43,0,.472],11474:[.669,.022,.488,{ic:.023}],11475:[.498,.01,.355,{ic:.026}],11476:[.873,0,.401],11477:[.608,0,.343],11478:[.683,.196,.687],11479:[.43,.158,.522],11480:[.68,0,.75,{ic:.054}],11481:[.43,0,.555,{ic:.029}],11482:[.672,0,.75],11483:[.432,0,.576],11484:[.899,.022,.778],11485:[.635,.011,.5],11486:[.68,.001,.625,{ic:.016}],11487:[.43,.001,.472],11488:[.681,.402,.817,{ic:.05}],11489:[.454,.268,.623,{ic:.013}],11490:[.677,.221,.742,{ic:.068}],11491:[.43,.165,.5,{ic:.039}],11492:[.43,.252,.567,{ic:.035}],11493:[.708,.162,.749,{ic:.026}],11494:[.708,.162,.648,{ic:.077}],11495:[.808,.162,1.143,{ic:.004}],11496:[.708,.162,.749],11497:[.708,.162,.616,{ic:.079}],11498:[.448,.011,.918,{ic:.027}],11499:[.69,-.06,.789,{ic:.031}],11500:[.477,-.023,.533,{ic:.025}],11501:[.685,.008,.667,{ic:.043}],11502:[.434,.005,.61],11503:[.697,-.499,.533],11504:[.782,-.614,0,{dx:.286}],11505:[.782,-.614,0,{dx:.224}],11506:[.76,.022,.778],11507:[.503,.014,.5],11513:[.564,0,.843],11514:[.564,.009,.573,{ic:.023}],11515:[.564,.009,.573],11516:[.564,0,.843,{ic:.022}],11517:[.44,.005,.241,{ic:.031}],11518:[.421,.011,.313],11519:[.574,-.366,.313]}},GKBI:{"bold-italic":{880:[.686,0,.654,{ic:.051}],881:[.516,0,.55,{ic:.016}],882:[.675,0,.8,{ic:.105}],883:[.505,0,.638,{ic:.073}],884:[.728,-.489,.261,{ic:.111}],885:[.005,.217,.261],886:[.686,0,.9,{ic:.131}],887:[.516,0,.733,{ic:.082}],890:[-.055,.249,.161],891:[.523,.007,.669],892:[.523,.007,.669,{ic:.01}],893:[.523,.007,.669],894:[.444,.193,.361],895:[.686,.017,.611,{ic:.08}],900:[.729,-.488,.228,{ic:.117}],901:[.712,-.488,.361,{ic:.118}],902:[.714,0,.933],903:[.444,-.288,.361],904:[.714,0,1.044,{ic:.059}],905:[.714,0,1.192,{ic:.112}],906:[.714,0,.703,{ic:.117}],908:[.714,.011,1.044,{ic:.017}],910:[.714,0,1.094,{ic:.139}],911:[.714,.002,1.008,{ic:.038}],912:[.712,.008,.328,{ic:.148}],938:[.887,0,.475,{ic:.149}],939:[.887,0,.961,{ic:.038}],940:[.712,.006,.655],941:[.712,.006,.544,{ic:.042}],942:[.716,.25,.694],943:[.712,.008,.328,{ic:.114}],944:[.712,.006,.628,{ic:.012}],970:[.694,.008,.328,{ic:.196}],971:[.694,.006,.628,{ic:.035}],972:[.712,.01,.594],973:[.712,.006,.628,{ic:.012}],974:[.712,.008,.828],975:[.686,.258,.901,{ic:.106}],976:[.705,.011,.522],979:[.702,0,1.032,{ic:.121}],980:[.886,0,.778,{ic:.195}],983:[.479,.261,.528,{ic:.076}],984:[.702,.004,.628,{ic:.051}],985:[.614,.05,.628,{ic:.006}],986:[.675,0,.961,{ic:.089}],987:[.461,0,.628,{ic:.014}],988:[.68,0,.783,{ic:.048}],989:[.444,.25,.628,{ic:.013}],990:[.695,.024,.389,{ic:.06}],991:[.618,.146,.494],992:[.704,0,.948],993:[.7,0,.894],994:[.707,.219,.982,{ic:.07}],995:[.434,.216,.789,{ic:.042}],996:[.689,.19,.738,{ic:.116}],997:[.451,.281,.535,{ic:.078}],998:[.686,.205,.731,{ic:.034}],999:[.46,.205,.555,{ic:.02}],1e3:[.666,.134,.51,{ic:.094}],1001:[.466,.134,.484,{ic:.048}],1002:[.705,0,.75,{ic:.143}],1003:[.433,.001,.528,{ic:.05}],1004:[.684,.011,.5,{ic:.114}],1005:[.465,.037,.5,{ic:.082}],1006:[.683,0,.716,{ic:.09}],1007:[.656,.001,.458,{ic:.082}],1010:[.453,.006,.498,{ic:.065}],1011:[.685,.2,.388,{ic:.111}],1015:[.683,0,.625,{ic:.052}],1016:[.738,.295,.472,{ic:.026}],1017:[.697,.011,.831,{ic:.037}],1018:[.683,0,.916,{ic:.066}],1019:[.43,.181,.657],1020:[.45,.256,.622,{ic:.025}],1021:[.697,.011,.831,{ic:.072}],1022:[.697,.011,.831,{ic:.037}],1023:[.697,.011,.831,{ic:.072}],7936:[.694,.006,.655],7937:[.711,.006,.655],7938:[.715,.006,.655],7939:[.715,.006,.655],7940:[.712,.006,.655],7941:[.712,.006,.655],7942:[.694,.006,.628,{ic:.027}],7943:[.696,.006,.655,{ic:.009}],7944:[.699,0,.99],7945:[.699,0,.977],7946:[.714,0,1.104],7947:[.714,0,1.084],7948:[.714,0,1.044],7949:[.714,0,1.054],7950:[.699,0,1.118],7951:[.699,0,1.098],7952:[.694,.006,.544,{ic:.042}],7953:[.711,.006,.544,{ic:.042}],7954:[.712,.006,.544,{ic:.042}],7955:[.712,.006,.544,{ic:.042}],7956:[.712,.006,.544,{ic:.046}],7957:[.712,.006,.544,{ic:.046}],7960:[.694,0,1.11,{ic:.059}],7961:[.694,0,1.11,{ic:.059}],7962:[.714,0,1.177,{ic:.059}],7963:[.714,0,1.177,{ic:.059}],7964:[.714,0,1.177,{ic:.059}],7965:[.714,0,1.177,{ic:.059}],7968:[.694,.25,.694],7969:[.711,.25,.694],7970:[.711,.25,.694],7971:[.711,.25,.694],7972:[.716,.25,.694],7973:[.716,.25,.694],7974:[.704,.25,.694,{ic:.014}],7975:[.704,.25,.694,{ic:.014}],7976:[.694,0,1.258,{ic:.112}],7977:[.694,0,1.258,{ic:.112}],7978:[.714,0,1.325,{ic:.112}],7979:[.714,0,1.325,{ic:.112}],7980:[.714,0,1.325,{ic:.112}],7981:[.714,0,1.325,{ic:.112}],7982:[.694,0,1.392,{ic:.112}],7983:[.694,0,1.392,{ic:.112}],7984:[.694,.008,.328,{ic:.057}],7985:[.711,.008,.328,{ic:.061}],7986:[.715,.008,.328,{ic:.102}],7987:[.715,.008,.328,{ic:.102}],7988:[.712,.008,.328,{ic:.154}],7989:[.712,.008,.328,{ic:.154}],7990:[.7,.008,.328,{ic:.192}],7991:[.7,.008,.328,{ic:.192}],7992:[.694,0,.769,{ic:.117}],7993:[.694,0,.769,{ic:.117}],7994:[.714,0,.836,{ic:.117}],7995:[.714,0,.836,{ic:.117}],7996:[.714,0,.836,{ic:.117}],7997:[.714,0,.836,{ic:.117}],7998:[.694,0,.903,{ic:.117}],7999:[.694,0,.903,{ic:.117}],8e3:[.694,.01,.594],8001:[.711,.01,.594],8002:[.712,.01,.594],8003:[.712,.01,.594],8004:[.712,.01,.594,{ic:.007}],8005:[.712,.01,.594,{ic:.007}],8008:[.697,.011,1.157,{ic:.017}],8009:[.697,.011,1.157,{ic:.017}],8010:[.714,.011,1.258,{ic:.017}],8011:[.714,.011,1.258,{ic:.017}],8012:[.714,.011,1.258,{ic:.017}],8013:[.714,.011,1.258,{ic:.017}],8016:[.694,.006,.628,{ic:.012}],8017:[.711,.006,.628,{ic:.012}],8018:[.715,.006,.628,{ic:.012}],8019:[.715,.006,.628,{ic:.012}],8020:[.712,.006,.628,{ic:.012}],8021:[.712,.006,.628,{ic:.012}],8022:[.694,.006,.628,{ic:.032}],8023:[.694,.006,.628,{ic:.032}],8025:[.694,0,1.16,{ic:.139}],8027:[.714,0,1.227,{ic:.139}],8029:[.714,0,1.227,{ic:.139}],8031:[.694,0,1.294,{ic:.139}],8032:[.694,.008,.828],8033:[.711,.008,.828],8034:[.712,.008,.828],8035:[.712,.008,.828],8036:[.712,.008,.828],8037:[.712,.008,.828],8038:[.704,.008,.828],8039:[.704,.008,.828],8040:[.697,.002,1.155,{ic:.038}],8041:[.697,.002,1.155,{ic:.038}],8042:[.714,.002,1.255,{ic:.038}],8043:[.714,.002,1.255,{ic:.038}],8044:[.714,.002,1.255,{ic:.038}],8045:[.714,.002,1.255,{ic:.038}],8046:[.697,.002,1.322,{ic:.038}],8047:[.697,.002,1.322,{ic:.038}],8048:[.715,.006,.655],8049:[.712,.006,.655],8050:[.712,.006,.544,{ic:.042}],8051:[.712,.006,.544,{ic:.046}],8052:[.711,.25,.694],8053:[.712,.25,.694],8054:[.715,.008,.328,{ic:.038}],8055:[.712,.008,.328,{ic:.092}],8056:[.712,.01,.594],8057:[.712,.01,.594],8058:[.715,.006,.628,{ic:.012}],8059:[.712,.006,.628,{ic:.012}],8060:[.712,.008,.828],8061:[.712,.008,.828],8064:[.694,.249,.655],8065:[.711,.249,.655],8066:[.715,.249,.655],8067:[.715,.249,.655],8068:[.712,.249,.655],8069:[.712,.249,.655],8070:[.696,.249,.655,{ic:.009}],8071:[.696,.249,.655,{ic:.009}],8072:[.699,.28,1.06],8073:[.699,.28,1.027],8074:[.714,.28,1.114],8075:[.714,.28,1.094],8076:[.714,.28,1.064],8077:[.714,.28,1.054],8078:[.699,.28,1.138],8079:[.699,.28,1.118],8080:[.694,.25,.694],8081:[.711,.25,.694],8082:[.711,.25,.694],8083:[.711,.25,.694],8084:[.716,.25,.694],8085:[.716,.25,.694],8086:[.704,.25,.694,{ic:.014}],8087:[.704,.25,.694,{ic:.014}],8088:[.694,.28,1.258,{ic:.112}],8089:[.694,.28,1.258,{ic:.112}],8090:[.714,.28,1.325,{ic:.112}],8091:[.714,.28,1.325,{ic:.112}],8092:[.714,.28,1.325,{ic:.112}],8093:[.714,.28,1.325,{ic:.112}],8094:[.694,.28,1.392,{ic:.112}],8095:[.694,.28,1.392,{ic:.112}],8096:[.694,.249,.828],8097:[.711,.249,.828],8098:[.712,.249,.828],8099:[.712,.249,.828],8100:[.712,.249,.828],8101:[.712,.249,.828],8102:[.704,.249,.828],8103:[.704,.249,.828],8104:[.697,.28,1.155,{ic:.038}],8105:[.697,.28,1.155,{ic:.038}],8106:[.714,.28,1.255,{ic:.038}],8107:[.714,.28,1.255,{ic:.038}],8108:[.714,.28,1.255,{ic:.038}],8109:[.714,.28,1.255,{ic:.038}],8110:[.697,.28,1.322,{ic:.038}],8111:[.697,.28,1.322,{ic:.038}],8112:[.732,.006,.688],8113:[.598,.006,.648],8114:[.715,.249,.655],8115:[.45,.249,.655],8116:[.712,.249,.655],8118:[.699,.006,.655,{ic:.009}],8119:[.699,.249,.655,{ic:.009}],8120:[.984,0,.933,{ic:.011}],8121:[.85,0,.933],8122:[.714,0,.958],8123:[.714,0,.923],8124:[.699,.28,.933],8125:[.694,-.5,.294,{ic:.101}],8126:[.156,.156,.294],8127:[.694,-.499,.294,{ic:.078}],8128:[.694,-.595,.428,{ic:.129}],8129:[.7,-.458,.561,{ic:.062}],8130:[.711,.25,.694],8131:[.468,.25,.694],8132:[.716,.25,.694],8134:[.708,.25,.694,{ic:.014}],8135:[.708,.25,.694,{ic:.014}],8136:[.714,0,1.044,{ic:.059}],8137:[.714,0,1.044,{ic:.059}],8138:[.714,0,1.192,{ic:.112}],8139:[.714,0,1.192,{ic:.112}],8140:[.686,.28,.964,{ic:.112}],8141:[.715,-.488,.361,{ic:.072}],8142:[.712,-.488,.361,{ic:.124}],8143:[.694,-.488,.428,{ic:.129}],8144:[.732,.008,.355,{ic:.182}],8145:[.598,.008,.355,{ic:.149}],8146:[.715,.008,.328,{ic:.108}],8147:[.714,.008,.328,{ic:.152}],8150:[.705,.008,.328,{ic:.192}],8151:[.7,.008,.328,{ic:.192}],8152:[.984,0,.475,{ic:.238}],8153:[.85,0,.475,{ic:.205}],8154:[.714,0,.703,{ic:.117}],8155:[.714,0,.703,{ic:.117}],8157:[.715,-.488,.361,{ic:.072}],8158:[.712,-.488,.361,{ic:.124}],8159:[.694,-.488,.428,{ic:.129}],8160:[.736,.006,.625,{ic:.055}],8161:[.602,.006,.635,{ic:.032}],8162:[.715,.006,.628,{ic:.012}],8163:[.714,.006,.628,{ic:.031}],8164:[.694,.25,.594,{ic:.017}],8165:[.711,.25,.594,{ic:.017}],8166:[.705,.006,.628,{ic:.032}],8167:[.694,.006,.628,{ic:.032}],8168:[.984,0,.866,{ic:.139}],8169:[.85,0,.866,{ic:.139}],8170:[.714,0,1.094,{ic:.139}],8171:[.714,0,1.094,{ic:.139}],8172:[.694,0,1.141,{ic:.046}],8173:[.715,-.488,.361,{ic:.118}],8174:[.714,-.489,.361,{ic:.17}],8175:[.711,-.488,.228,{ic:.062}],8178:[.712,.249,.828],8179:[.444,.249,.828],8180:[.712,.249,.828],8182:[.694,.008,.828],8183:[.694,.249,.828],8184:[.714,.011,1.091,{ic:.017}],8185:[.714,.011,1.044,{ic:.017}],8186:[.714,.002,1.089,{ic:.038}],8187:[.714,.002,1.008,{ic:.038}],8188:[.697,.28,.894,{ic:.038}],8189:[.714,-.49,.228,{ic:.12}],8190:[.711,-.499,.294,{ic:.048}],11392:[.672,.007,.75],11393:[.432,.01,.566],11394:[.686,0,.818],11395:[.445,0,.575],11396:[.68,0,.692,{ic:.005}],11397:[.445,0,.496,{ic:.013}],11398:[.672,0,.75],11399:[.432,0,.556],11400:[.697,.011,.831],11401:[.453,.006,.489],11402:[.715,.143,.813,{ic:.076}],11403:[.476,.187,.625,{ic:.06}],11404:[.686,.091,.605,{ic:.074}],11405:[.43,.069,.419,{ic:.03}],11406:[.686,0,.9,{ic:.046}],11407:[.445,0,.639,{ic:.021}],11408:[.697,.011,.894],11409:[.455,.011,.511,{ic:.002}],11410:[.686,0,.436,{ic:.053}],11411:[.445,0,.275,{ic:.044}],11412:[.686,0,.901,{ic:.021}],11413:[.445,0,.639,{ic:.009}],11414:[.685,0,.806],11415:[.444,.003,.554],11416:[.684,.012,1.127],11417:[.431,.008,.749],11418:[.686,0,.9,{ic:.046}],11419:[.445,0,.659,{ic:.002}],11420:[.677,.106,.637,{ic:.034}],11421:[.431,.074,.402,{ic:.027}],11422:[.697,.011,.864],11423:[.453,.006,.575],11424:[.68,0,.9,{ic:.045}],11425:[.445,0,.639,{ic:.021}],11426:[.686,0,.786],11427:[.445,0,.567,{ic:.009}],11428:[.697,.011,.831,{ic:.023}],11429:[.453,.006,.511],11430:[.675,0,.8,{ic:.02}],11431:[.445,0,.544,{ic:.014}],11432:[.686,0,.869,{ic:.066}],11433:[.445,0,.609,{ic:.026}],11434:[.686,0,.831],11435:[.446,.109,.518],11436:[.686,0,.869,{ic:.003}],11437:[.445,0,.607,{ic:.013}],11438:[.686,0,.894],11439:[.445,0,.588,{ic:.002}],11440:[.707,.03,.982],11441:[.434,.023,.789],11442:[.679,-.129,.728],11443:[.431,-.061,.499],11444:[.71,0,.49],11445:[.454,0,.313],11446:[.766,.089,.667,{ic:.078}],11447:[.487,.058,.533,{ic:.053}],11448:[.71,.15,.49],11449:[.454,.108,.313],11450:[.488,-.212,.667,{ic:.005}],11451:[.317,-.127,.533,{ic:.009}],11452:[.688,.012,.845],11453:[.439,.01,.606],11454:[.688,.012,.949,{ic:.009}],11455:[.439,.01,.718],11456:[.686,0,.786],11457:[.445,.14,.617,{ic:.027}],11458:[1.107,.219,.982],11459:[.819,.216,.789],11460:[.686,.011,.639,{ic:.036}],11461:[.445,.2,.511,{ic:.028}],11462:[.683,.167,.409,{ic:.071}],11463:[.443,.123,.25,{ic:.07}],11464:[.666,.134,.51,{ic:.028}],11465:[.466,.134,.6],11466:[.694,.109,.488,{ic:.061}],11467:[.43,.078,.355,{ic:.031}],11468:[.655,.011,.535],11469:[.473,.127,.43,{ic:.009}],11470:[.686,.169,.786,{ic:.061}],11471:[.445,.122,.567,{ic:.026}],11472:[.686,0,.692],11473:[.445,0,.496],11474:[.676,.027,.488,{ic:.041}],11475:[.497,.011,.355,{ic:.023}],11476:[.873,0,.436],11477:[.608,0,.325],11478:[.686,.186,.692],11479:[.445,.148,.496],11480:[.68,0,.9,{ic:.045}],11481:[.445,0,.639,{ic:.021}],11482:[.672,0,.75],11483:[.432,0,.556],11484:[.899,.011,.864],11485:[.638,.006,.575],11486:[.68,.001,.692,{ic:.005}],11487:[.445,.001,.496,{ic:.014}],11488:[.681,.401,.817,{ic:.053}],11489:[.454,.268,.623,{ic:.014}],11490:[.675,.221,.8,{ic:.048}],11491:[.445,.165,.544,{ic:.035}],11492:[.446,.253,.602,{ic:.039}],11493:[.723,.161,.749,{ic:.072}],11494:[.723,.161,.749,{ic:.072}],11495:[.833,.161,1.099],11496:[.708,.161,.691,{ic:.062}],11497:[.723,.146,.736,{ic:.057}],11498:[.453,.006,1.074,{ic:.003}],11499:[.689,-.054,.951,{ic:.029}],11500:[.474,-.046,.653,{ic:.023}],11501:[.688,.012,.741],11502:[.439,.01,.598],11503:[.698,-.498,.533],11504:[.782,-.614,0,{dx:.287}],11505:[.782,-.614,0,{dx:.223}],11506:[.76,.022,.804],11507:[.503,.014,.52],11513:[.57,0,.893],11514:[.57,.009,.573,{ic:.025}],11515:[.57,.009,.573],11516:[.57,0,.893,{ic:.024}],11517:[.444,.009,.241,{ic:.03}],11518:[.419,.025,.363],11519:[.582,-.355,.313]}}},"NCM"),{},["MJX-NCM-GK","MJX-NCM-GKB","MJX-NCM-GKI","MJX-NCM-GKBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/greek","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/sans-serif-i.js 0000644 0001762 0000144 00000043132 15112352537 023614 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","sans-serif-i",c({SSLI:{"sans-serif-italic":{192:[.868,0,.667],193:[.868,0,.667,{ic:.052}],194:[.87,0,.667],195:[.855,0,.667,{ic:.016}],196:[.816,0,.667],197:[.862,0,.667],198:[.694,0,.861,{ic:.092}],199:[.716,.214,.639,{ic:.084}],200:[.868,0,.597,{ic:.091}],201:[.868,0,.597,{ic:.091}],202:[.87,0,.597,{ic:.091}],203:[.816,0,.597,{ic:.091}],204:[.868,0,.278,{ic:.07}],205:[.868,0,.278,{ic:.297}],206:[.87,0,.278,{ic:.177}],207:[.816,0,.278,{ic:.162}],208:[.694,0,.722,{ic:.025}],209:[.855,0,.708,{ic:.052}],210:[.868,.022,.736,{ic:.026}],211:[.868,.022,.736,{ic:.026}],212:[.87,.022,.736,{ic:.026}],213:[.855,.022,.736,{ic:.026}],214:[.816,.022,.736,{ic:.026}],216:[.76,.066,.778,{ic:.026}],217:[.868,.022,.688,{ic:.054}],218:[.868,.022,.688,{ic:.054}],219:[.87,.022,.688,{ic:.054}],220:[.816,.022,.688,{ic:.054}],221:[.868,0,.667,{ic:.149}],222:[.694,0,.583,{ic:.027}],223:[.705,.011,.481,{ic:.065}],224:[.694,.011,.481],225:[.694,.011,.481,{ic:.054}],226:[.697,.011,.481,{ic:.029}],227:[.67,.011,.481,{ic:.069}],228:[.651,.011,.481,{ic:.011}],229:[.685,.011,.481],230:[.461,.011,.722,{ic:.037}],231:[.461,.214,.444,{ic:.056}],232:[.694,.011,.444,{ic:.027}],233:[.694,.011,.444,{ic:.073}],234:[.697,.011,.444,{ic:.048}],235:[.651,.011,.444,{ic:.03}],236:[.694,0,.239,{ic:.032}],237:[.694,0,.239,{ic:.207}],238:[.697,0,.239,{ic:.15}],239:[.651,0,.239,{ic:.132}],241:[.67,0,.517,{ic:.051}],242:[.694,.011,.5,{ic:.022}],243:[.694,.011,.5,{ic:.045}],244:[.697,.011,.5,{ic:.022}],245:[.67,.011,.5,{ic:.06}],246:[.651,.011,.5,{ic:.022}],248:[.558,.113,.5,{ic:.07}],249:[.694,.011,.517,{ic:.013}],250:[.694,.011,.517,{ic:.036}],251:[.697,.011,.517,{ic:.013}],252:[.651,.011,.517,{ic:.013}],253:[.694,.205,.461,{ic:.082}],254:[.694,.194,.517,{ic:.018}],255:[.651,.205,.461,{ic:.082}],256:[.82,0,.667,{ic:.022}],257:[.643,.011,.481,{ic:.078}],258:[.924,0,.667,{ic:.032}],259:[.7,.011,.481,{ic:.078}],260:[.694,.212,.667],261:[.461,.212,.481],262:[.868,.011,.639,{ic:.098}],263:[.694,.011,.444,{ic:.095}],264:[.87,.011,.639,{ic:.08}],265:[.697,.011,.444,{ic:.07}],266:[.825,.011,.639,{ic:.08}],267:[.655,.011,.444,{ic:.056}],268:[.87,.011,.639,{ic:.08}],269:[.697,.011,.444,{ic:.108}],270:[.87,0,.722,{ic:.025}],271:[.694,.011,.517,{ic:.177}],272:[.694,0,.722,{ic:.025}],273:[.694,.011,.517,{ic:.124}],274:[.82,0,.597,{ic:.091}],275:[.643,.011,.444,{ic:.097}],276:[.924,0,.597,{ic:.091}],277:[.7,.011,.444,{ic:.097}],278:[.825,0,.597,{ic:.091}],279:[.655,.011,.444,{ic:.027}],280:[.691,.212,.597,{ic:.091}],281:[.461,.212,.444,{ic:.027}],282:[.87,0,.597,{ic:.091}],283:[.697,.011,.444,{ic:.086}],284:[.87,.011,.667,{ic:.063}],285:[.697,.206,.5,{ic:.071}],286:[.924,.011,.667,{ic:.063}],287:[.7,.206,.5,{ic:.071}],288:[.825,.011,.667,{ic:.063}],289:[.655,.206,.5,{ic:.071}],290:[.706,.266,.667,{ic:.063}],291:[.727,.206,.5,{ic:.071}],292:[.87,0,.708,{ic:.054}],293:[.87,0,.517,{ic:.057}],294:[.694,0,.708,{ic:.076}],295:[.694,0,.517],296:[.855,0,.278,{ic:.211}],297:[.67,0,.239,{ic:.19}],298:[.82,0,.278,{ic:.217}],299:[.643,0,.239,{ic:.199}],300:[.924,0,.278,{ic:.227}],301:[.7,0,.239,{ic:.199}],302:[.694,.212,.278,{ic:.054}],303:[.68,.212,.239,{ic:.07}],304:[.825,0,.278,{ic:.081}],306:[.694,.022,.722,{ic:.065}],307:[.655,.205,.482,{ic:.057}],308:[.87,.022,.472,{ic:.189}],309:[.697,.205,.267,{ic:.143}],310:[.694,.266,.694,{ic:.098}],311:[.694,.266,.489,{ic:.061}],312:[.444,0,.489,{ic:.013}],313:[.868,0,.542,{ic:.033}],314:[.868,0,.239,{ic:.323}],315:[.694,.266,.542],316:[.694,.266,.239,{ic:.066}],317:[.694,0,.542],318:[.694,0,.239,{ic:.177}],319:[.694,0,.542],320:[.694,0,.288,{ic:.107}],321:[.694,0,.625],322:[.694,0,.324,{ic:.092}],323:[.868,0,.708,{ic:.052}],324:[.694,0,.517,{ic:.036}],325:[.694,.266,.708,{ic:.052}],326:[.455,.266,.517],327:[.87,0,.708,{ic:.052}],328:[.697,0,.517,{ic:.049}],329:[.632,0,.695],330:[.716,.022,.708],331:[.455,.209,.517],332:[.82,.022,.736,{ic:.026}],333:[.643,.011,.5,{ic:.069}],334:[.924,.022,.736,{ic:.026}],335:[.7,.011,.5,{ic:.069}],336:[.913,.022,.736,{ic:.026}],337:[.694,.011,.5,{ic:.068}],338:[.716,.022,.972,{ic:.092}],339:[.461,.011,.778,{ic:.028}],340:[.868,0,.646,{ic:.064}],341:[.694,0,.342,{ic:.105}],342:[.694,.266,.646,{ic:.054}],343:[.455,.266,.342,{ic:.083}],344:[.87,0,.646,{ic:.054}],345:[.697,0,.342,{ic:.137}],346:[.868,.022,.556,{ic:.108}],347:[.694,.011,.383,{ic:.104}],348:[.87,.022,.556,{ic:.052}],349:[.697,.011,.383,{ic:.079}],350:[.716,.214,.556,{ic:.052}],351:[.461,.214,.383,{ic:.052}],352:[.87,.022,.556,{ic:.07}],353:[.697,.011,.383,{ic:.117}],354:[.688,.192,.681,{ic:.11}],355:[.571,.192,.361,{ic:.05}],356:[.87,0,.681,{ic:.11}],357:[.668,.011,.361,{ic:.068}],358:[.688,0,.681,{ic:.036}],359:[.571,.011,.361],360:[.855,.022,.688,{ic:.054}],361:[.67,.011,.517,{ic:.051}],362:[.82,.022,.688,{ic:.054}],363:[.643,.011,.517,{ic:.06}],364:[.924,.022,.688,{ic:.054}],365:[.7,.011,.517,{ic:.06}],366:[.862,.022,.688,{ic:.054}],367:[.685,.011,.517,{ic:.013}],368:[.913,.022,.688,{ic:.054}],369:[.694,.011,.517,{ic:.059}],370:[.694,.212,.688,{ic:.054}],371:[.444,.212,.517,{ic:.013}],372:[.87,0,.944,{ic:.135}],373:[.697,0,.683,{ic:.082}],374:[.87,0,.667,{ic:.149}],375:[.697,.205,.461,{ic:.082}],376:[.816,0,.667,{ic:.149}],377:[.868,0,.611,{ic:.092}],378:[.694,0,.435,{ic:.077}],379:[.825,0,.611,{ic:.092}],380:[.655,0,.435,{ic:.06}],381:[.87,0,.611,{ic:.092}],382:[.697,0,.435,{ic:.09}],383:[.705,0,.286,{ic:.19}],384:[.695,.011,.517,{ic:.018}],385:[.694,0,.837],386:[.694,0,.667],387:[.694,.011,.517],388:[.703,0,.667],389:[.709,.011,.517],390:[.716,.023,.639,{ic:.017}],391:[.915,.011,.639,{ic:.182}],392:[.678,.011,.5,{ic:.204}],393:[.694,0,.762],394:[.694,0,.902],395:[.694,0,.667,{ic:.017}],396:[.694,.011,.517,{ic:.038}],397:[.455,.277,.472,{ic:.02}],398:[.691,0,.597,{ic:.105}],399:[.716,.022,.669,{ic:.041}],400:[.716,.022,.555,{ic:.085}],401:[.691,.217,.569,{ic:.054}],402:[.705,0,.306,{ic:.19}],403:[.915,.011,.639,{ic:.182}],404:[.681,.206,.685,{ic:.096}],405:[.695,.011,.728,{ic:.056}],406:[.694,.011,.333],407:[.694,0,.418],408:[.698,0,.794,{ic:.02}],409:[.717,0,.489,{ic:.1}],410:[.695,0,.389,{ic:.038}],411:[.695,.011,.528],412:[.694,.005,.794],413:[.694,.217,.708],414:[.455,.195,.489,{ic:.018}],415:[.716,.022,.736],416:[.778,.022,.736,{ic:.043}],417:[.528,.011,.5,{ic:.082}],418:[.716,.197,.839,{ic:.028}],419:[.461,.246,.6,{ic:.013}],420:[.694,0,.819],421:[.717,.195,.489,{ic:.104}],422:[.694,.178,.646,{ic:.01}],423:[.717,.022,.555,{ic:.063}],424:[.462,.011,.383,{ic:.043}],425:[.694,0,.722,{ic:.018}],426:[.717,.217,.358],427:[.571,.217,.389,{ic:.022}],428:[.688,0,.777,{ic:.03}],429:[.647,.011,.389,{ic:.1}],430:[.688,.217,.681,{ic:.059}],431:[.778,.022,.687,{ic:.168}],432:[.528,.011,.544,{ic:.102}],433:[.716,0,.722,{ic:.031}],434:[.694,.022,.688],435:[.698,0,.767,{ic:.04}],436:[.446,.205,.581,{ic:.034}],437:[.694,0,.611,{ic:.017}],438:[.444,0,.435,{ic:.012}],439:[.694,.022,.546,{ic:.113}],440:[.694,.022,.546,{ic:.042}],441:[.445,.205,.435,{ic:.061}],442:[.445,.205,.435,{ic:.059}],443:[.678,0,.5,{ic:.003}],444:[.656,.022,.5],445:[.428,.25,.5],446:[.571,.011,.453],447:[.449,.206,.461,{ic:.025}],448:[.695,.195,.278,{ic:.048}],449:[.695,.195,.444,{ic:.052}],450:[.695,.195,.556,{ic:.016}],451:[.695,0,.319,{ic:.03}],452:[.889,0,1.333,{ic:.092}],453:[.694,0,1.157,{ic:.092}],454:[.722,.011,.952,{ic:.092}],455:[.694,.022,1.014,{ic:.064}],456:[.694,.205,.809,{ic:.064}],457:[.722,.205,.506,{ic:.064}],458:[.694,.022,1.18,{ic:.064}],459:[.694,.205,.975,{ic:.064}],460:[.679,.205,.784,{ic:.064}],461:[.87,0,.667,{ic:.014}],462:[.697,.011,.481,{ic:.067}],463:[.87,0,.278,{ic:.209}],464:[.697,0,.239,{ic:.188}],465:[.87,.022,.736,{ic:.026}],466:[.697,.011,.5,{ic:.058}],467:[.87,.022,.688,{ic:.054}],468:[.697,.011,.517,{ic:.049}],469:[1.017,.022,.688,{ic:.054}],470:[.773,.011,.517,{ic:.086}],471:[.99,.022,.688,{ic:.068}],472:[.829,.011,.517,{ic:.119}],473:[.992,.022,.688,{ic:.054}],474:[.831,.011,.517,{ic:.081}],475:[.99,.022,.688,{ic:.054}],476:[.829,.011,.517,{ic:.013}],477:[.461,.011,.444,{ic:.024}],478:[1.017,0,.667,{ic:.043}],479:[.813,.011,.481,{ic:.101}],480:[1.007,0,.667,{ic:.059}],481:[.823,.011,.48,{ic:.11}],482:[.837,0,.861,{ic:.092}],483:[.616,.011,.722,{ic:.03}],484:[.706,.011,.73],485:[.455,.206,.57,{ic:.004}],486:[.87,.011,.667,{ic:.063}],487:[.697,.206,.5,{ic:.071}],488:[.889,0,.694,{ic:.098}],489:[.9,0,.489,{ic:.156}],490:[.716,.212,.736,{ic:.027}],491:[.461,.212,.5,{ic:.022}],492:[.855,.212,.736,{ic:.027}],493:[.609,.212,.5,{ic:.059}],494:[.889,.022,.546,{ic:.113}],495:[.639,.205,.435,{ic:.103}],496:[.697,.205,.267,{ic:.181}],497:[.694,0,1.333,{ic:.092}],498:[.694,0,1.157,{ic:.059}],499:[.722,.011,.952,{ic:.059}],500:[.868,.011,.667,{ic:.063}],501:[.694,.206,.5,{ic:.071}],502:[.694,.011,.996],503:[.721,.206,.461,{ic:.154}],504:[.851,0,.708,{ic:.051}],505:[.64,0,.517],506:[1.019,0,.667,{ic:.036}],507:[.842,.011,.481,{ic:.092}],508:[.868,0,.861,{ic:.092}],509:[.694,.011,.722,{ic:.037}],510:[.868,.066,.778,{ic:.026}],511:[.694,.113,.5,{ic:.07}],512:[.913,0,.667],513:[.694,.011,.481,{ic:.014}],514:[.889,0,.667],515:[.639,.011,.48,{ic:.03}],516:[.913,0,.597,{ic:.091}],517:[.694,.011,.444,{ic:.033}],518:[.889,0,.597,{ic:.092}],519:[.639,.011,.444,{ic:.069}],520:[.913,0,.278,{ic:.162}],521:[.694,0,.239,{ic:.135}],522:[.889,0,.278,{ic:.187}],523:[.639,0,.239,{ic:.156}],524:[.913,.022,.736,{ic:.026}],525:[.694,.011,.5,{ic:.022}],526:[.889,.022,.736,{ic:.027}],527:[.639,.011,.5,{ic:.026}],528:[.913,0,.646,{ic:.054}],529:[.694,0,.342,{ic:.084}],530:[.889,0,.646,{ic:.054}],531:[.639,0,.342,{ic:.138}],532:[.913,.022,.688,{ic:.054}],533:[.694,.011,.517,{ic:.013}],534:[.889,.023,.687,{ic:.053}],535:[.639,.011,.517,{ic:.017}],536:[.716,.266,.556,{ic:.052}],537:[.461,.266,.383,{ic:.052}],538:[.688,.266,.681,{ic:.11}],539:[.571,.266,.361,{ic:.05}],540:[.69,.054,.579],541:[.457,.197,.48],542:[.889,0,.708,{ic:.054}],543:[.9,0,.517,{ic:.109}],544:[.71,.196,.737],545:[.695,.146,.572,{ic:.038}],546:[.708,.011,.5,{ic:.039}],547:[.656,.011,.5,{ic:.04}],548:[.694,.186,.611,{ic:.038}],549:[.445,.186,.49,{ic:.005}],550:[.855,0,.667],551:[.679,.011,.48],552:[.691,.188,.597,{ic:.091}],553:[.461,.196,.444,{ic:.027}],554:[1.017,.022,.736,{ic:.026}],555:[.773,.011,.5,{ic:.095}],556:[1.017,.022,.736,{ic:.036}],557:[.791,.011,.5,{ic:.117}],558:[.855,.022,.736,{ic:.027}],559:[.679,.011,.5,{ic:.021}],560:[1.027,.022,.736,{ic:.032}],561:[.82,.011,.5,{ic:.109}],562:[.837,0,.667,{ic:.148}],563:[.616,.205,.461,{ic:.085}],564:[.694,.146,.239,{ic:.043}],565:[.455,.146,.572,{ic:.039}],566:[.571,.146,.361,{ic:.05}],568:[.695,.011,.833,{ic:.017}],569:[.455,.195,.833,{ic:.017}],570:[.839,.16,.667],571:[.839,.16,.639,{ic:.018}],572:[.62,.16,.444,{ic:.046}],573:[.694,0,.542],574:[.839,.16,.681,{ic:.037}],575:[.461,.161,.383,{ic:.02}],576:[.444,.184,.435,{ic:.033}],577:[.705,0,.5],578:[.448,0,.5],579:[.694,0,.667],580:[.694,.022,.688],581:[.694,0,.667],582:[.839,.16,.597,{ic:.018}],583:[.62,.16,.444,{ic:.046}],584:[.694,.022,.472],585:[.655,.205,.267,{ic:.028}],586:[.715,.218,.633],587:[.455,.217,.517,{ic:.011}],588:[.694,0,.666],589:[.455,0,.342,{ic:.033}],590:[.694,0,.667,{ic:.074}],591:[.444,.205,.461,{ic:.056}],11377:[.455,0,.492,{ic:.077}],7680:[.694,.281,.667],7681:[.461,.222,.48],7682:[.855,0,.667,{ic:.028}],7683:[.94,.011,.517,{ic:.018}],7684:[.694,.146,.667,{ic:.028}],7685:[.722,.17,.517,{ic:.018}],7686:[.694,.135,.667,{ic:.028}],7687:[.722,.158,.517,{ic:.018}],7688:[.851,.192,.639,{ic:.085}],7689:[.64,.192,.444,{ic:.106}],7690:[.855,0,.722,{ic:.026}],7691:[.94,.011,.517,{ic:.071}],7692:[.694,.2,.722,{ic:.025}],7693:[.694,.2,.517,{ic:.066}],7694:[.694,.187,.722,{ic:.025}],7695:[.694,.187,.517,{ic:.066}],7696:[.694,.169,.722,{ic:.026}],7697:[.722,.169,.517,{ic:.071}],7698:[.694,.231,.722,{ic:.026}],7699:[.722,.202,.517,{ic:.071}],7704:[.691,.231,.597,{ic:.092}],7705:[.461,.202,.444,{ic:.028}],7706:[.691,.22,.597,{ic:.092}],7707:[.461,.171,.444,{ic:.028}],7710:[.855,0,.569,{ic:.106}],7711:[.94,0,.305,{ic:.207}],7712:[.837,.022,.667,{ic:.097}],7713:[.616,.206,.5,{ic:.071}],7714:[.855,0,.708,{ic:.054}],7715:[.94,0,.517],7716:[.694,.2,.708,{ic:.054}],7717:[.694,.2,.517],7718:[.816,0,.708,{ic:.054}],7719:[.816,0,.517,{ic:.042}],7722:[.694,.244,.708,{ic:.054}],7723:[.694,.244,.517],7724:[.694,.22,.278,{ic:.054}],7725:[.679,.171,.239,{ic:.069}],7726:[.99,0,.278,{ic:.273}],7727:[.829,0,.239,{ic:.258}],7728:[.851,0,.694,{ic:.098}],7729:[.901,0,.489,{ic:.14}],7730:[.694,.146,.694,{ic:.098}],7731:[.722,.17,.489,{ic:.061}],7732:[.694,.135,.694,{ic:.098}],7733:[.722,.158,.489,{ic:.061}],7734:[.694,.2,.542],7735:[.694,.2,.239,{ic:.066}],7736:[.82,.2,.542],7737:[.82,.2,.239,{ic:.248}],7738:[.694,.135,.542],7739:[.722,.158,.239,{ic:.072}],7740:[.694,.231,.542],7741:[.722,.202,.239,{ic:.072}],7742:[.851,0,.875,{ic:.048}],7743:[.64,0,.794],7744:[.855,0,.875,{ic:.048}],7745:[.679,0,.794],7746:[.694,.2,.875,{ic:.048}],7747:[.455,.2,.794],7748:[.825,0,.708,{ic:.052}],7749:[.655,0,.517],7750:[.694,.2,.708,{ic:.052}],7751:[.455,.2,.517],7752:[.694,.135,.708,{ic:.051}],7753:[.455,.158,.517],7754:[.694,.231,.708,{ic:.051}],7755:[.455,.202,.517],7764:[.851,0,.639,{ic:.052}],7765:[.64,.195,.517,{ic:.06}],7766:[.855,0,.639,{ic:.052}],7767:[.679,.195,.517,{ic:.018}],7768:[.825,0,.646,{ic:.054}],7769:[.655,0,.342,{ic:.083}],7770:[.694,.2,.646,{ic:.054}],7771:[.455,.2,.342,{ic:.083}],7772:[.82,.2,.646,{ic:.054}],7773:[.643,.2,.342,{ic:.148}],7774:[.694,.135,.646,{ic:.054}],7775:[.455,.158,.342,{ic:.082}],7776:[.855,.022,.555,{ic:.052}],7777:[.679,.011,.383,{ic:.053}],7778:[.716,.2,.556,{ic:.052}],7779:[.461,.2,.383,{ic:.052}],7784:[.855,.146,.555,{ic:.052}],7785:[.679,.17,.383,{ic:.053}],7786:[.855,0,.68,{ic:.111}],7787:[.789,.011,.361,{ic:.05}],7788:[.688,.2,.681,{ic:.11}],7789:[.571,.2,.361,{ic:.05}],7790:[.688,.187,.681,{ic:.11}],7791:[.571,.187,.361,{ic:.05}],7792:[.689,.231,.68,{ic:.111}],7793:[.571,.202,.361,{ic:.05}],7794:[.694,.148,.687,{ic:.053}],7795:[.445,.171,.517,{ic:.014}],7796:[.694,.22,.687,{ic:.053}],7797:[.445,.171,.517,{ic:.014}],7798:[.694,.231,.687,{ic:.053}],7799:[.445,.202,.517,{ic:.014}],7804:[.889,0,.667,{ic:.135}],7805:[.639,0,.461,{ic:.083}],7806:[.694,.146,.667,{ic:.135}],7807:[.445,.17,.461,{ic:.083}],7808:[.868,0,.944,{ic:.135}],7809:[.694,0,.683,{ic:.082}],7810:[.868,0,.944,{ic:.135}],7811:[.694,0,.683,{ic:.082}],7812:[.816,0,.944,{ic:.135}],7813:[.651,0,.683,{ic:.082}],7814:[.855,0,.944,{ic:.135}],7815:[.679,0,.683,{ic:.083}],7816:[.694,.146,.944,{ic:.135}],7817:[.445,.17,.683,{ic:.083}],7818:[.855,0,.667,{ic:.096}],7819:[.679,0,.461,{ic:.083}],7820:[.85,0,.667,{ic:.096}],7821:[.66,0,.461,{ic:.083}],7822:[.855,0,.667,{ic:.148}],7823:[.679,.205,.461,{ic:.083}],7824:[.9,0,.611,{ic:.092}],7825:[.65,0,.435,{ic:.059}],7826:[.694,.2,.611,{ic:.092}],7827:[.444,.2,.435,{ic:.06}],7828:[.694,.135,.611,{ic:.092}],7829:[.445,.158,.435,{ic:.059}],7830:[.722,.158,.517],7831:[.693,.011,.361,{ic:.054}],7832:[.638,0,.683,{ic:.083}],7833:[.638,.205,.461,{ic:.083}],7835:[.94,0,.305,{ic:.208}],7838:[.705,.011,.541],7840:[.694,.2,.667],7841:[.461,.2,.481],7842:[.951,0,.667],7843:[.718,.011,.481],7844:[1.027,0,.667,{ic:.039}],7845:[.816,.011,.481,{ic:.086}],7846:[1.027,0,.667,{ic:.008}],7847:[.816,.011,.481,{ic:.057}],7848:[1.1,0,.667,{ic:.079}],7849:[.889,.011,.481,{ic:.127}],7850:[1.044,0,.667,{ic:.056}],7851:[.833,.011,.481,{ic:.104}],7852:[.87,.2,.667],7853:[.697,.2,.481,{ic:.029}],7854:[1.081,0,.667,{ic:.052}],7855:[.857,.011,.481,{ic:.096}],7856:[1.081,0,.667,{ic:.032}],7857:[.857,.011,.481,{ic:.078}],7858:[1.154,0,.667,{ic:.032}],7859:[.93,.011,.481,{ic:.078}],7860:[1.098,0,.667,{ic:.067}],7861:[.874,.011,.481,{ic:.113}],7862:[.924,.2,.667,{ic:.032}],7863:[.7,.2,.481,{ic:.078}],7864:[.691,.2,.597,{ic:.091}],7865:[.461,.2,.444,{ic:.027}],7866:[.951,0,.597,{ic:.091}],7867:[.718,.011,.444,{ic:.027}],7868:[.855,0,.597,{ic:.091}],7869:[.67,.011,.444,{ic:.088}],7870:[1.027,0,.597,{ic:.091}],7871:[.816,.011,.444,{ic:.105}],7872:[1.027,0,.597,{ic:.091}],7873:[.816,.011,.444,{ic:.076}],7874:[1.1,0,.597,{ic:.115}],7875:[.889,.011,.444,{ic:.146}],7876:[1.044,0,.597,{ic:.092}],7877:[.833,.011,.444,{ic:.123}],7878:[.87,.2,.597,{ic:.091}],7879:[.697,.2,.444,{ic:.048}],7880:[.951,0,.278,{ic:.145}],7881:[.718,0,.239,{ic:.115}],7882:[.694,.2,.278,{ic:.054}],7883:[.655,.2,.239,{ic:.065}],7884:[.716,.2,.736,{ic:.026}],7885:[.461,.2,.5,{ic:.022}],7886:[.951,.022,.736,{ic:.026}],7887:[.718,.011,.5,{ic:.022}],7888:[1.027,.022,.736,{ic:.026}],7889:[.816,.011,.5,{ic:.077}],7890:[1.027,.022,.736,{ic:.026}],7891:[.816,.011,.5,{ic:.048}],7892:[1.1,.022,.736,{ic:.045}],7893:[.889,.011,.5,{ic:.118}],7894:[1.044,.022,.736,{ic:.026}],7895:[.833,.011,.5,{ic:.095}],7896:[.87,.2,.736,{ic:.026}],7897:[.697,.2,.5,{ic:.022}],7898:[.868,.022,.736,{ic:.043}],7899:[.694,.011,.5,{ic:.082}],7900:[.868,.022,.736,{ic:.043}],7901:[.694,.011,.5,{ic:.082}],7902:[.951,.022,.736,{ic:.043}],7903:[.718,.011,.5,{ic:.082}],7904:[.855,.022,.736,{ic:.043}],7905:[.67,.011,.5,{ic:.082}],7906:[.778,.2,.736,{ic:.043}],7907:[.528,.2,.5,{ic:.082}],7908:[.694,.2,.688,{ic:.054}],7909:[.444,.2,.517,{ic:.013}],7910:[.951,.022,.688,{ic:.054}],7911:[.718,.011,.517,{ic:.013}],7912:[.868,.022,.687,{ic:.168}],7913:[.694,.011,.544,{ic:.102}],7914:[.868,.022,.687,{ic:.168}],7915:[.694,.011,.544,{ic:.102}],7916:[.951,.022,.687,{ic:.168}],7917:[.718,.011,.544,{ic:.102}],7918:[.855,.022,.687,{ic:.168}],7919:[.67,.011,.544,{ic:.102}],7920:[.778,.2,.687,{ic:.168}],7921:[.528,.2,.544,{ic:.102}],7922:[.868,0,.667,{ic:.149}],7923:[.694,.205,.461,{ic:.082}],7924:[.694,.2,.667,{ic:.149}],7925:[.444,.205,.461,{ic:.082}],7926:[.951,0,.667,{ic:.149}],7927:[.718,.205,.461,{ic:.082}],7928:[.855,0,.667,{ic:.149}],7929:[.67,.205,.461,{ic:.082}]}}},"NCM"),{},["MJX-NCM-SSLI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/sans-serif-i","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/braille-d.js 0000644 0001762 0000144 00000013701 15112352537 023146 0 ustar ligges users (()=>{"use strict";const t=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","braille-d",t({brd:{normal:{10240:[0,0,.725],10241:[.651,-.036,.725],10242:[.615,-.036,.725],10243:[.651,-.036,.725],10244:[.615,0,.725],10245:[.651,0,.725],10246:[.615,0,.725],10247:[.651,0,.725],10248:[.651,-.036,.725],10249:[.651,-.036,.725],10250:[.651,-.036,.725],10251:[.651,-.036,.725],10252:[.651,0,.725],10253:[.651,0,.725],10254:[.651,0,.725],10255:[.651,0,.725],10256:[.615,-.036,.725],10257:[.651,-.036,.725],10258:[.615,-.036,.725],10259:[.651,-.036,.725],10260:[.615,0,.725],10261:[.651,0,.725],10262:[.615,0,.725],10263:[.651,0,.725],10264:[.651,-.036,.725],10265:[.651,-.036,.725],10266:[.651,-.036,.725],10267:[.651,-.036,.725],10268:[.651,0,.725],10269:[.651,0,.725],10270:[.651,0,.725],10271:[.651,0,.725],10272:[.615,0,.725],10273:[.651,0,.725],10274:[.615,0,.725],10275:[.651,0,.725],10276:[.615,0,.725],10277:[.651,0,.725],10278:[.615,0,.725],10279:[.651,0,.725],10280:[.651,0,.725],10281:[.651,0,.725],10282:[.651,0,.725],10283:[.651,0,.725],10284:[.651,0,.725],10285:[.651,0,.725],10286:[.651,0,.725],10287:[.651,0,.725],10288:[.615,0,.725],10289:[.651,0,.725],10290:[.615,0,.725],10291:[.651,0,.725],10292:[.615,0,.725],10293:[.651,0,.725],10294:[.615,0,.725],10295:[.651,0,.725],10296:[.651,0,.725],10297:[.651,0,.725],10298:[.651,0,.725],10299:[.651,0,.725],10300:[.651,0,.725],10301:[.651,0,.725],10302:[.651,0,.725],10303:[.651,0,.725],10304:[.615,.246,.725],10305:[.651,.246,.725],10306:[.615,.246,.725],10307:[.651,.246,.725],10308:[.615,.246,.725],10309:[.651,.246,.725],10310:[.615,.246,.725],10311:[.651,.246,.725],10312:[.651,.246,.725],10313:[.651,.246,.725],10314:[.651,.246,.725],10315:[.651,.246,.725],10316:[.651,.246,.725],10317:[.651,.246,.725],10318:[.651,.246,.725],10319:[.651,.246,.725],10320:[.615,.246,.725],10321:[.651,.246,.725],10322:[.615,.246,.725],10323:[.651,.246,.725],10324:[.615,.246,.725],10325:[.651,.246,.725],10326:[.615,.246,.725],10327:[.651,.246,.725],10328:[.651,.246,.725],10329:[.651,.246,.725],10330:[.651,.246,.725],10331:[.651,.246,.725],10332:[.651,.246,.725],10333:[.651,.246,.725],10334:[.651,.246,.725],10335:[.651,.246,.725],10336:[.615,.246,.725],10337:[.651,.246,.725],10338:[.615,.246,.725],10339:[.651,.246,.725],10340:[.615,.246,.725],10341:[.651,.246,.725],10342:[.615,.246,.725],10343:[.651,.246,.725],10344:[.651,.246,.725],10345:[.651,.246,.725],10346:[.651,.246,.725],10347:[.651,.246,.725],10348:[.651,.246,.725],10349:[.651,.246,.725],10350:[.651,.246,.725],10351:[.651,.246,.725],10352:[.615,.246,.725],10353:[.651,.246,.725],10354:[.615,.246,.725],10355:[.651,.246,.725],10356:[.615,.246,.725],10357:[.651,.246,.725],10358:[.615,.246,.725],10359:[.651,.246,.725],10360:[.651,.246,.725],10361:[.651,.246,.725],10362:[.651,.246,.725],10363:[.651,.246,.725],10364:[.651,.246,.725],10365:[.651,.246,.725],10366:[.651,.246,.725],10367:[.651,.246,.725],10368:[.615,.246,.725],10369:[.651,.246,.725],10370:[.615,.246,.725],10371:[.651,.246,.725],10372:[.615,.246,.725],10373:[.651,.246,.725],10374:[.615,.246,.725],10375:[.651,.246,.725],10376:[.651,.246,.725],10377:[.651,.246,.725],10378:[.651,.246,.725],10379:[.651,.246,.725],10380:[.651,.246,.725],10381:[.651,.246,.725],10382:[.651,.246,.725],10383:[.651,.246,.725],10384:[.615,.246,.725],10385:[.651,.246,.725],10386:[.615,.246,.725],10387:[.651,.246,.725],10388:[.615,.246,.725],10389:[.651,.246,.725],10390:[.615,.246,.725],10391:[.651,.246,.725],10392:[.651,.246,.725],10393:[.651,.246,.725],10394:[.651,.246,.725],10395:[.651,.246,.725],10396:[.651,.246,.725],10397:[.651,.246,.725],10398:[.651,.246,.725],10399:[.651,.246,.725],10400:[.615,.246,.725],10401:[.651,.246,.725],10402:[.615,.246,.725],10403:[.651,.246,.725],10404:[.615,.246,.725],10405:[.651,.246,.725],10406:[.615,.246,.725],10407:[.651,.246,.725],10408:[.651,.246,.725],10409:[.651,.246,.725],10410:[.651,.246,.725],10411:[.651,.246,.725],10412:[.651,.246,.725],10413:[.651,.246,.725],10414:[.651,.246,.725],10415:[.651,.246,.725],10416:[.615,.246,.725],10417:[.651,.246,.725],10418:[.615,.246,.725],10419:[.651,.246,.725],10420:[.615,.246,.725],10421:[.651,.246,.725],10422:[.615,.246,.725],10423:[.651,.246,.725],10424:[.651,.246,.725],10425:[.651,.246,.725],10426:[.651,.246,.725],10427:[.651,.246,.725],10428:[.651,.246,.725],10429:[.651,.246,.725],10430:[.651,.246,.725],10431:[.651,.246,.725],10432:[.615,.246,.725],10433:[.651,.246,.725],10434:[.615,.246,.725],10435:[.651,.246,.725],10436:[.615,.246,.725],10437:[.651,.246,.725],10438:[.615,.246,.725],10439:[.651,.246,.725],10440:[.651,.246,.725],10441:[.651,.246,.725],10442:[.651,.246,.725],10443:[.651,.246,.725],10444:[.651,.246,.725],10445:[.651,.246,.725],10446:[.651,.246,.725],10447:[.651,.246,.725],10448:[.615,.246,.725],10449:[.651,.246,.725],10450:[.615,.246,.725],10451:[.651,.246,.725],10452:[.615,.246,.725],10453:[.651,.246,.725],10454:[.615,.246,.725],10455:[.651,.246,.725],10456:[.651,.246,.725],10457:[.651,.246,.725],10458:[.651,.246,.725],10459:[.651,.246,.725],10460:[.651,.246,.725],10461:[.651,.246,.725],10462:[.651,.246,.725],10463:[.651,.246,.725],10464:[.615,.246,.725],10465:[.651,.246,.725],10466:[.615,.246,.725],10467:[.651,.246,.725],10468:[.615,.246,.725],10469:[.651,.246,.725],10470:[.615,.246,.725],10471:[.651,.246,.725],10472:[.651,.246,.725],10473:[.651,.246,.725],10474:[.651,.246,.725],10475:[.651,.246,.725],10476:[.651,.246,.725],10477:[.651,.246,.725],10478:[.651,.246,.725],10479:[.651,.246,.725],10480:[.615,.246,.725],10481:[.651,.246,.725],10482:[.615,.246,.725],10483:[.651,.246,.725],10484:[.615,.246,.725],10485:[.651,.246,.725],10486:[.615,.246,.725],10487:[.651,.246,.725],10488:[.651,.246,.725],10489:[.651,.246,.725],10490:[.651,.246,.725],10491:[.651,.246,.725],10492:[.651,.246,.725],10493:[.651,.246,.725],10494:[.651,.246,.725],10495:[.651,.246,.725]}}},"NCM"),{},["MJX-NCM-brd"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/braille-d","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/variants.js 0000644 0001762 0000144 00000002452 15112352537 023143 0 ustar ligges users (()=>{"use strict";const t=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","variants",t({VX:{"-tex-variant":{34:[.549,-.096,.647],39:[.549,-.096,.407],42:[.462,-.039,.5],96:[.549,-.096,.407],126:[.116,.002,.556,{ic:.001}],170:[.448,.143,.5,{c:"a\u0332"}],176:[.445,-.055,.5],178:[.666,0,.5,{sk:-.01}],179:[.666,.022,.5],185:[.666,0,.5],186:[.448,.143,.5,{c:"o\u0332"}],8212:[.278,-.256,.667],8289:[.64,.24,.96],8304:[.666,.022,.5],8305:[.657,0,.278],8308:[.677,0,.5,{sk:.103}],8309:[.666,.022,.5],8310:[.666,.022,.5,{sk:.068}],8311:[.676,.022,.5,{sk:-.147}],8312:[.666,.022,.5,{sk:.011}],8313:[.666,.022,.5],8314:[.583,.083,.778],8315:[.27,-.23,.778],8316:[.367,-.133,.778],8317:[.748,.248,.389],8318:[.748,.248,.389],8319:[.442,0,.556,{sk:.013}],8320:[.666,.022,.5],8321:[.666,0,.5],8322:[.666,0,.5,{sk:-.01}],8323:[.666,.022,.5],8324:[.677,0,.5,{sk:.103}],8325:[.666,.022,.5],8326:[.666,.022,.5,{sk:.068}],8327:[.676,.022,.5,{sk:-.147}],8328:[.666,.022,.5,{sk:.011}],8329:[.666,.022,.5],8330:[.583,.083,.778],8331:[.27,-.23,.778],8332:[.367,-.133,.778],8333:[.748,.248,.389],8334:[.748,.248,.389]}}},"NCM"),{},["MJX-NCM-VX"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/variants","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/latin-b.js 0000644 0001762 0000144 00000031403 15112352537 022640 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","latin-b",c({LB:{bold:{192:[.909,0,.869],193:[.909,0,.869],194:[.893,0,.869],195:[.836,0,.869],196:[.868,0,.869],197:[.866,0,.869],198:[.686,0,1.042],199:[.697,.2,.831],200:[.909,0,.756],201:[.909,0,.756],202:[.893,0,.756],203:[.868,0,.756],204:[.909,0,.436],205:[.909,0,.436],206:[.893,0,.436],207:[.868,0,.436,{ic:.004}],208:[.686,0,.882],209:[.836,0,.9],210:[.909,.011,.864],211:[.909,.011,.864],212:[.893,.011,.864],213:[.836,.011,.864],214:[.868,.011,.864],216:[.746,.06,.894],217:[.909,.011,.885],218:[.909,.011,.885],219:[.893,.011,.885],220:[.868,.011,.885],221:[.909,0,.869],222:[.686,0,.724],223:[.7,.006,.597],224:[.704,.006,.559],225:[.704,.006,.559],226:[.71,.006,.559],227:[.661,.006,.559],228:[.677,.006,.559],229:[.689,.006,.559],230:[.453,.006,.831],231:[.453,.2,.511],232:[.704,.006,.527],233:[.704,.006,.527],234:[.71,.006,.527],235:[.677,.006,.527],236:[.704,0,.319],237:[.704,0,.319],238:[.71,0,.319,{ic:.018}],239:[.677,0,.319,{ic:.039}],241:[.661,0,.639],242:[.704,.006,.575],243:[.704,.006,.575],244:[.71,.006,.575],245:[.661,.006,.575],246:[.677,.006,.575],248:[.552,.107,.575],249:[.704,.006,.639],250:[.704,.006,.639],251:[.71,.006,.639],252:[.677,.006,.639],253:[.704,.2,.607],254:[.694,.194,.639],255:[.677,.2,.607],256:[.8,0,.869],257:[.633,.006,.559],258:[.925,0,.869],259:[.7,.006,.559],260:[.698,.206,.869],261:[.453,.206,.559],262:[.909,.011,.831],263:[.704,.006,.511],264:[.893,.011,.831],265:[.71,.006,.511],266:[.895,.011,.831],267:[.685,.006,.511],268:[.893,.011,.831],269:[.71,.006,.511],270:[.893,0,.882],271:[.694,.006,.639,{ic:.063}],272:[.686,0,.882],273:[.694,.006,.639],274:[.8,0,.756],275:[.633,.006,.527],276:[.925,0,.756],277:[.7,.006,.527],278:[.895,0,.756],279:[.685,.006,.527],280:[.68,.206,.756],281:[.453,.206,.527],282:[.893,0,.756],283:[.71,.006,.527],284:[.893,.011,.904],285:[.71,.201,.575],286:[.925,.011,.904],287:[.7,.201,.575],288:[.895,.011,.904],289:[.685,.201,.575],290:[.697,.295,.904],291:[.749,.201,.575],292:[.893,0,.9],293:[.901,0,.639],294:[.686,0,.9],295:[.694,0,.639],296:[.836,0,.436],297:[.661,0,.319,{ic:.032}],298:[.8,0,.436],299:[.633,0,.319,{ic:.048}],300:[.925,0,.436],301:[.7,0,.319,{ic:.018}],302:[.686,.206,.436],303:[.695,.206,.319],304:[.895,0,.436],306:[.686,.011,.987],307:[.685,.2,.639],308:[.893,.011,.594],309:[.71,.2,.351,{ic:.016}],310:[.686,.295,.901],311:[.694,.295,.607],312:[.452,0,.607],313:[.909,0,.692],314:[.917,0,.319,{ic:.004}],315:[.686,.295,.692],316:[.694,.295,.319],317:[.686,0,.692],318:[.694,0,.319,{ic:.075}],319:[.686,0,.692],320:[.694,0,.436],321:[.686,0,.692],322:[.694,0,.387],323:[.909,0,.9],324:[.704,0,.639],325:[.686,.295,.9],326:[.45,.295,.639],327:[.893,0,.9],328:[.71,0,.639],329:[.694,0,.958],330:[.697,.011,.9],331:[.45,.205,.592],332:[.8,.011,.864],333:[.633,.006,.575],334:[.925,.011,.864],335:[.7,.006,.575],336:[.933,.011,.864],337:[.704,.006,.575],338:[.697,.011,1.169],339:[.453,.006,.894],340:[.909,.011,.863],341:[.704,0,.474],342:[.686,.295,.863],343:[.45,.295,.474],344:[.893,.011,.863],345:[.71,0,.474],346:[.909,.011,.639],347:[.704,.006,.454],348:[.893,.011,.639],349:[.71,.006,.454],350:[.697,.2,.639],351:[.453,.2,.454],352:[.893,.011,.639],353:[.71,.006,.454],354:[.675,.2,.8],355:[.635,.2,.447],356:[.893,0,.8],357:[.749,.006,.447],358:[.675,0,.8],359:[.635,.006,.447],360:[.836,.011,.885],361:[.661,.006,.639],362:[.8,.011,.885],363:[.633,.006,.639],364:[.925,.011,.885],365:[.7,.006,.639],366:[.866,.011,.885],367:[.689,.006,.639],368:[.933,.011,.885],369:[.704,.006,.639],370:[.686,.206,.885],371:[.45,.206,.639],372:[.893,.008,1.189],373:[.71,.004,.831],374:[.893,0,.869],375:[.71,.2,.607],376:[.868,0,.869],377:[.909,0,.703],378:[.704,0,.511],379:[.895,0,.703],380:[.685,0,.511],381:[.893,0,.703],382:[.71,0,.511],383:[.7,0,.351,{ic:.086}],384:[.695,.005,.639],385:[.686,0,.985],386:[.686,0,.818],387:[.686,.006,.639],388:[.694,0,.818],389:[.694,.006,.639],390:[.697,.011,.83],391:[.792,.011,.871,{ic:.081}],392:[.649,.005,.575,{ic:.079}],393:[.686,0,.882],394:[.686,0,1.049],395:[.686,0,.818],396:[.688,.006,.639],397:[.544,.165,.594],398:[.68,0,.756],399:[.697,.011,.795],400:[.697,.011,.703],401:[.68,.205,.724],402:[.7,0,.351,{ic:.086}],403:[.792,.011,.871,{ic:.08}],404:[.682,.205,.808],405:[.695,.005,.882],406:[.683,.009,.355],407:[.686,0,.436],408:[.701,0,.925],409:[.7,0,.607],410:[.695,0,.447],411:[.695,.009,.607],412:[.688,.006,.833],413:[.686,.205,.9],414:[.45,.195,.607,{ic:.009}],415:[.697,.011,.864],416:[.819,.011,.864],417:[.578,.006,.575],418:[.709,.202,.964],419:[.466,.197,.739],420:[.686,0,.954],421:[.7,.195,.607],422:[.686,.18,.863],423:[.697,.01,.639],424:[.453,.006,.454],425:[.686,0,.831],426:[.7,.2,.391,{ic:.03}],427:[.635,.2,.479],428:[.675,0,.8],429:[.63,.005,.479],430:[.675,.225,.8],431:[.819,.011,.885],432:[.578,.006,.671,{ic:.016}],433:[.697,0,.831],434:[.686,.022,.724],435:[.686,0,.954],436:[.453,.2,.702],437:[.686,0,.703],438:[.444,0,.511],439:[.686,.011,.639],440:[.686,.011,.639],441:[.445,.2,.511],442:[.445,.2,.511],443:[.655,0,.575],444:[.675,.011,.575],445:[.445,.2,.511],446:[.635,.006,.454],447:[.47,.236,.575],448:[.695,.195,.319],449:[.695,.195,.511],450:[.695,.195,.639],451:[.705,0,.35],452:[.904,0,1.585],453:[.686,0,1.393],454:[.694,.006,1.15],455:[.686,.011,1.285],456:[.695,.2,1.042],457:[.695,.2,.67],458:[.686,.011,1.494],459:[.695,.2,1.251],460:[.695,.2,.99],461:[.893,0,.869],462:[.71,.006,.559],463:[.893,0,.436],464:[.71,0,.319,{ic:.018}],465:[.893,.011,.864],466:[.71,.006,.575],467:[.893,.011,.885],468:[.71,.006,.639],469:[1.098,.011,.885],470:[.822,.006,.639],471:[1.091,.011,.885],472:[.9,.006,.639],473:[1.075,.011,.885],474:[.884,.006,.639],475:[1.091,.011,.885],476:[.9,.006,.639],477:[.453,.006,.527],478:[1.078,0,.869],479:[.842,.006,.559],480:[1.066,0,.869],481:[.802,.006,.559],482:[.842,0,1.041],483:[.604,.005,.83],484:[.697,.011,.904],485:[.455,.201,.575],486:[.893,.011,.904],487:[.71,.201,.575],488:[.894,0,.901],489:[.905,0,.606],490:[.697,.206,.864],491:[.453,.206,.575],492:[.866,.206,.864],493:[.631,.206,.575],494:[.894,.011,.639],495:[.664,.2,.511],496:[.71,.2,.351,{ic:.016}],497:[.686,0,1.585],498:[.686,0,1.393],499:[.694,.006,1.15],500:[.909,.011,.904],501:[.704,.201,.575],502:[.686,.012,1.178],503:[.72,.228,.66],504:[.875,0,.9],505:[.662,0,.638],506:[1.072,0,.869],507:[.895,.006,.559],508:[.909,0,1.042],509:[.704,.006,.831],510:[.909,.06,.894],511:[.704,.107,.575],512:[.933,0,.869],513:[.704,.006,.559],514:[.894,0,.869],515:[.653,.006,.559],516:[.933,0,.756],517:[.704,.006,.527],518:[.894,0,.755],519:[.653,.006,.527],520:[.933,0,.436],521:[.704,0,.319],522:[.894,0,.436],523:[.653,0,.319,{ic:.028}],524:[.933,.011,.864],525:[.704,.006,.575],526:[.894,.011,.863],527:[.653,.006,.575],528:[.933,.011,.863],529:[.704,0,.474],530:[.894,.011,.862],531:[.653,0,.473],532:[.933,.011,.885],533:[.704,.006,.639],534:[.894,.011,.884],535:[.653,.006,.638],536:[.697,.295,.639],537:[.453,.295,.454],538:[.675,.295,.8],539:[.635,.295,.447],540:[.683,-.001,.487],541:[.473,.209,.487],542:[.894,0,.9],543:[.905,0,.638],544:[.71,.2,.829],545:[.695,.163,.703],546:[.699,.02,.552],547:[.659,.02,.548],548:[.686,.174,.733],549:[.445,.174,.575],550:[.902,0,.869],551:[.694,.006,.559],552:[.68,.196,.756],553:[.453,.204,.527],554:[1.098,.011,.864],555:[.829,.006,.575],556:[1.038,.011,.864],557:[.829,.006,.575],558:[.902,.011,.863],559:[.694,.006,.575],560:[1.058,.011,.863],561:[.829,.006,.575],562:[.842,0,.869],563:[.604,.2,.606],564:[.694,.159,.431],565:[.45,.163,.703],566:[.635,.159,.447],568:[.695,.006,.958],569:[.45,.195,.958],570:[.782,.083,.869],571:[.782,.083,.869],572:[.503,.083,.555],573:[.686,0,.692],574:[.782,.083,.8],575:[.453,.242,.454],576:[.444,.227,.511],577:[.7,0,.575],578:[.46,0,.575],579:[.686,0,.818],580:[.686,.011,.885],581:[.694,0,.869],582:[.782,.083,.756],583:[.503,.083,.527],584:[.686,.011,.64],585:[.685,.2,.351,{ic:.012}],586:[.681,.225,1.032],587:[.45,.206,.684,{ic:.041}],588:[.686,.011,.863],589:[.45,0,.474],590:[.686,0,.869],591:[.444,.2,.607],11377:[.45,.008,.685],7680:[.698,.23,.869],7681:[.453,.23,.559],7682:[.902,0,.818],7683:[.935,.006,.638],7684:[.686,.196,.818],7685:[.694,.217,.638],7686:[.686,.143,.818],7687:[.694,.166,.638],7688:[.875,.199,.83],7689:[.662,.199,.511],7690:[.902,0,.881],7691:[.935,.006,.638],7692:[.686,.2,.882],7693:[.694,.2,.639],7694:[.686,.148,.882],7695:[.694,.148,.639],7696:[.686,.199,.881],7697:[.694,.199,.638],7698:[.686,.211,.881],7699:[.694,.24,.638],7704:[.68,.211,.755],7705:[.453,.24,.527],7706:[.68,.155,.755],7707:[.453,.164,.527],7710:[.902,0,.723],7711:[.935,0,.351,{ic:.086}],7712:[.842,.011,.904],7713:[.604,.201,.575],7714:[.902,0,.9],7715:[.935,0,.638],7716:[.686,.2,.9],7717:[.694,.2,.639],7718:[.868,0,.9],7719:[.876,0,.639],7722:[.686,.215,.9],7723:[.694,.215,.639],7724:[.686,.155,.436,{ic:.005}],7725:[.695,.164,.319,{ic:.042}],7726:[1.091,0,.436,{ic:.004}],7727:[.9,0,.319,{ic:.039}],7728:[.875,0,.901],7729:[.903,0,.606],7730:[.686,.196,.901],7731:[.694,.217,.606],7732:[.686,.143,.901],7733:[.694,.166,.606],7734:[.686,.2,.692],7735:[.694,.2,.319],7736:[.8,.2,.692],7737:[.808,.2,.319,{ic:.054}],7738:[.686,.143,.691],7739:[.694,.166,.319,{ic:.059}],7740:[.686,.211,.691],7741:[.694,.24,.319,{ic:.009}],7742:[.875,0,1.091],7743:[.662,0,.958],7744:[.902,0,1.091],7745:[.694,0,.958],7746:[.686,.2,1.092],7747:[.45,.2,.958],7748:[.884,0,.9],7749:[.685,0,.639],7750:[.686,.2,.9],7751:[.45,.2,.639],7752:[.686,.143,.9],7753:[.45,.166,.638],7754:[.686,.211,.9],7755:[.45,.24,.638],7764:[.875,0,.786],7765:[.662,.194,.638],7766:[.902,0,.786],7767:[.694,.194,.638],7768:[.895,.011,.863],7769:[.685,0,.474],7770:[.686,.2,.863],7771:[.45,.2,.474],7772:[.8,.2,.863],7773:[.633,.2,.474],7774:[.686,.143,.862],7775:[.45,.166,.473],7776:[.902,.011,.638],7777:[.694,.006,.453],7778:[.697,.2,.639],7779:[.453,.2,.454],7784:[.902,.196,.638],7785:[.694,.217,.453],7786:[.902,0,.8],7787:[.876,.006,.447],7788:[.675,.2,.8],7789:[.635,.2,.447],7790:[.675,.148,.8],7791:[.635,.148,.447],7792:[.675,.211,.8],7793:[.635,.24,.447],7794:[.686,.196,.884],7795:[.45,.218,.638],7796:[.686,.155,.884],7797:[.45,.164,.638],7798:[.686,.211,.884],7799:[.45,.24,.638],7804:[.894,.008,.869],7805:[.632,.004,.606],7806:[.686,.196,.869],7807:[.444,.217,.606],7808:[.909,.008,1.189],7809:[.704,.004,.831],7810:[.909,.008,1.189],7811:[.704,.004,.831],7812:[.868,.008,1.189],7813:[.677,.004,.831],7814:[.902,.008,1.188],7815:[.694,.004,.83],7816:[.686,.196,1.188],7817:[.444,.217,.83],7818:[.902,0,.869],7819:[.694,0,.606],7820:[.894,0,.869],7821:[.686,0,.606],7822:[.902,0,.869],7823:[.694,.2,.606],7824:[.9,0,.702],7825:[.658,0,.511],7826:[.686,.2,.703],7827:[.444,.2,.511],7828:[.686,.143,.702],7829:[.444,.166,.511],7830:[.694,.166,.638],7831:[.826,.006,.447],7832:[.661,.004,.83],7833:[.661,.2,.606],7835:[.935,0,.351,{ic:.086}],7838:[.7,.006,.665],7840:[.698,.2,.869],7841:[.453,.2,.559],7842:[.932,0,.869],7843:[.703,.006,.559],7844:[1.099,0,.869],7845:[.874,.006,.559],7846:[1.099,0,.869],7847:[.874,.006,.559],7848:[1.101,0,.869],7849:[.876,.006,.559],7850:[1.056,0,.869],7851:[.831,.006,.559],7852:[.893,.2,.869],7853:[.71,.2,.559],7854:[1.131,0,.869],7855:[.907,.006,.559],7856:[1.131,0,.869],7857:[.907,.006,.559],7858:[1.133,0,.869],7859:[.909,.006,.559],7860:[1.088,0,.869],7861:[.864,.006,.559],7862:[.925,.2,.869],7863:[.7,.2,.559],7864:[.68,.2,.756],7865:[.453,.2,.527],7866:[.932,0,.756],7867:[.703,.006,.527],7868:[.836,0,.756],7869:[.661,.006,.527],7870:[1.099,0,.756],7871:[.874,.006,.527],7872:[1.099,0,.756],7873:[.874,.006,.527],7874:[1.101,0,.756],7875:[.876,.006,.527],7876:[1.056,0,.756],7877:[.831,.006,.527],7878:[.893,.2,.756],7879:[.71,.2,.527],7880:[.932,0,.436],7881:[.703,0,.319],7882:[.686,.2,.436],7883:[.685,.2,.319],7884:[.697,.2,.864],7885:[.453,.2,.575],7886:[.932,.011,.864],7887:[.703,.006,.575],7888:[1.099,.011,.864],7889:[.874,.006,.575],7890:[1.099,.011,.864],7891:[.874,.006,.575],7892:[1.101,.011,.864],7893:[.876,.006,.575],7894:[1.056,.011,.864],7895:[.831,.006,.575],7896:[.893,.2,.864],7897:[.71,.2,.575],7898:[.909,.011,.864],7899:[.704,.006,.575],7900:[.909,.011,.864],7901:[.704,.006,.575],7902:[.932,.011,.864],7903:[.703,.006,.575],7904:[.836,.011,.864],7905:[.661,.006,.575],7906:[.819,.2,.864],7907:[.578,.2,.575],7908:[.686,.2,.885],7909:[.45,.2,.639],7910:[.932,.011,.885],7911:[.703,.006,.639],7912:[.909,.011,.885],7913:[.704,.006,.671,{ic:.016}],7914:[.909,.011,.885],7915:[.704,.006,.671,{ic:.016}],7916:[.932,.011,.885],7917:[.703,.006,.671,{ic:.016}],7918:[.836,.011,.885],7919:[.661,.006,.671,{ic:.016}],7920:[.819,.2,.885],7921:[.578,.2,.671,{ic:.016}],7922:[.909,0,.869],7923:[.704,.2,.607],7924:[.686,.2,.869],7925:[.444,.2,.607],7926:[.932,0,.869],7927:[.703,.2,.607],7928:[.836,0,.869],7929:[.661,.2,.607]}}},"NCM"),{},["MJX-NCM-LB"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/latin-b","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/symbols-b-i.js 0000644 0001762 0000144 00000013267 15112352537 023457 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","symbols-b-i",c({SYB:{bold:{161:[.5,.205,.35],162:[.516,.072,.511],164:[.543,.042,.894],166:[.75,.25,.319],169:[.686,0,.686],170:[.697,-.292,.496],171:[.472,0,.639],173:[.271,-.174,.383],174:[.686,0,.686],186:[.697,-.292,.482],187:[.472,0,.639],188:[.697,.01,.983],189:[.697,.01,.983],190:[.697,.01,.983],191:[.5,.2,.543],3647:[.758,.072,.818],8204:[0,0,0],8205:[0,0,0],8218:[.154,.196,.319],8219:[.694,-.346,.319],8222:[.154,.196,.571],8223:[.694,-.346,.411,{ic:.024}],8226:[.381,-.077,.894],8233:[.694,.195,.543],8240:[.75,.056,1.288],8241:[.75,.056,1.667],8249:[.472,0,.445],8250:[.472,0,.445],8251:[.543,.042,.894],8253:[.769,0,.543],8255:[-.068,.194,.732],8256:[.668,-.542,.732],8261:[.751,.257,.415],8262:[.751,.25,.415],8274:[.751,-.001,.575],8276:[-.068,.194,.732],8319:[.568,-.297,.383],8320:[.347,.055,.447],8353:[.758,.072,.831],8358:[.686,0,.9],8361:[.686,.008,1.189],8362:[.696,.005,1.042],8363:[.694,.048,.639],8369:[.686,0,.786],8370:[.75,.055,.904],8451:[.699,.01,1.086],8470:[.693,.005,1.103],8471:[.686,0,.686],8478:[.686,.011,.863],8480:[.686,-.261,1.038],8482:[.693,-.281,1.135],8494:[.696,.005,.795],8960:[.633,.132,.894],9250:[.694,.006,.639],9251:[.253,.11,.575],11800:[.499,.205,.543],64256:[.7,0,.671,{ic:.075}],64257:[.7,0,.639],64258:[.7,0,.639],64259:[.7,0,.958],64260:[.7,0,.958],64261:[.7,.006,.797],64262:[.708,.006,.867],65126:[.404,-.084,.383]}},SYI:{italic:{161:[.5,.216,.307,{ic:.013}],162:[.476,.045,.46,{ic:.01}],164:[.48,-.018,.767],166:[.75,.25,.278,{ic:.066}],169:[.683,0,.683],170:[.705,-.337,.473,{ic:.07}],171:[.483,0,.562],173:[.243,-.187,.358],174:[.683,0,.683],186:[.705,-.337,.429,{ic:.091}],187:[.483,0,.562],188:[.705,.116,.807,{ic:.031}],189:[.705,.013,.807],190:[.705,.116,.807,{ic:.031}],191:[.5,.216,.511],3647:[.728,.045,.704,{ic:.03}],8204:[0,0,0],8205:[0,0,0],8218:[.104,.195,.307],8219:[.694,-.396,.307,{ic:.08}],8222:[.104,.195,.49],8223:[.694,-.396,.361,{ic:.151}],8226:[.379,-.081,.767],8233:[.694,.194,.485,{ic:.116}],8240:[.75,.056,1.083],8241:[.75,.056,1.379,{ic:.007}],8249:[.483,0,.358,{ic:.016}],8250:[.483,0,.358],8251:[.471,-.018,.767],8253:[.756,0,.511,{ic:.04}],8255:[.327,-.077,.358,{ic:.001}],8256:[.666,-.538,.691,{ic:.001}],8261:[.751,.252,.383,{ic:.093}],8262:[.751,.249,.383,{ic:.063}],8274:[.751,-.001,.511,{ic:.105}],8276:[-.066,.194,.691],8320:[.347,.055,.409],8353:[.728,.045,.716,{ic:.096}],8358:[.683,0,.743,{ic:.109}],8361:[.683,.022,.999,{ic:.125}],8363:[.694,.03,.511,{ic:.056}],8369:[.683,0,.678,{ic:.052}],8370:[.749,.055,.773,{ic:.037}],8451:[.706,.021,.92,{ic:.096}],8470:[.695,.01,.894,{ic:.009}],8471:[.683,0,.683],8478:[.683,.022,.729],8480:[.683,-.247,.875,{ic:.083}],8482:[.687,-.277,.967,{ic:.098}],8494:[.701,.01,.673,{ic:.056}],8960:[.557,.057,.767,{ic:.063}],9250:[.694,.011,.46],9251:[.251,.105,.511],11800:[.499,.216,.511],64256:[.705,.205,.613,{ic:.145}],64257:[.705,.205,.562,{ic:.034}],64258:[.705,.205,.588,{ic:.049}],64259:[.705,.205,.882,{ic:.034}],64260:[.705,.205,.894,{ic:.049}],64261:[.705,.205,.612,{ic:.041}],64262:[.708,.011,.741,{ic:.041}],65126:[.325,-.075,.358],163:[.706,.011,.769],165:[.683,0,.743,{ic:.131}],167:[.713,.213,.49,{ic:.047}],172:[.367,-.133,.767,{ic:.014}],177:[.614,0,.767],181:[.441,.216,.511,{ic:.024}],182:[.694,.194,.611,{ic:.144}],183:[.346,-.24,.278],215:[.471,-.018,.767],240:[.695,.011,.511,{ic:.024}],247:[.46,-.04,.767],8224:[.705,.216,.444,{ic:.052}],8225:[.705,.205,.444,{ic:.064}]}},SYBI:{"bold-italic":{161:[.5,.211,.386],162:[.516,.072,.532,{ic:.004}],164:[.516,.015,.886],166:[.75,.25,.319,{ic:.059}],169:[.686,0,.686],170:[.703,-.318,.544,{ic:.073}],171:[.472,0,.65],173:[.269,-.175,.414],174:[.686,0,.686],186:[.703,-.318,.496,{ic:.095}],187:[.472,0,.65],188:[.703,.116,.966,{ic:.002}],189:[.703,.01,.966],190:[.703,.116,.966,{ic:.002}],191:[.5,.211,.591],3647:[.758,.072,.817,{ic:.014}],8204:[0,0,0],8205:[0,0,0],8218:[.144,.197,.356],8219:[.695,-.354,.355,{ic:.081}],8222:[.144,.197,.59],8223:[.695,-.354,.444,{ic:.163}],8226:[.386,-.072,.886],8233:[.694,.194,.562,{ic:.103}],8240:[.75,.056,1.222],8241:[.75,.056,1.578],8249:[.472,0,.409],8250:[.472,0,.409],8251:[.516,.015,.886],8253:[.775,0,.591,{ic:.023}],8255:[-.068,.194,.798],8256:[.668,-.542,.798],8261:[.751,.257,.444,{ic:.084}],8262:[.751,.249,.444,{ic:.062}],8274:[.75,-.001,.591,{ic:.089}],8276:[-.068,.194,.798],8320:[.347,.055,.473],8353:[.758,.072,.827,{ic:.082}],8358:[.686,0,.896,{ic:.107}],8361:[.686,.017,1.16,{ic:.114}],8362:[.696,.005,1.042,{ic:.046}],8363:[.695,.048,.591,{ic:.031}],8369:[.686,0,.787,{ic:.038}],8370:[.75,.055,.895,{ic:.013}],8451:[.709,.021,1.062,{ic:.083}],8470:[.698,.01,1.087],8471:[.686,0,.686],8478:[.686,.017,.859],8480:[.686,-.254,1.034,{ic:.076}],8482:[.693,-.281,1.121,{ic:.094}],8494:[.704,.01,.796,{ic:.047}],8960:[.603,.102,.886,{ic:.059}],9250:[.695,.008,.532,{ic:.005}],9251:[.253,.11,.591],11800:[.5,.216,.591],64256:[.702,.202,.756,{ic:.138}],64257:[.702,.202,.674,{ic:.034}],64258:[.702,.202,.704,{ic:.045}],64259:[.702,.202,1.045,{ic:.034}],64260:[.702,.202,1.059,{ic:.045}],64261:[.702,.202,.735,{ic:.034}],64262:[.708,.008,.85,{ic:.034}],65126:[.382,-.066,.414],163:[.706,.008,.869],165:[.686,0,.866,{ic:.119}],167:[.714,.214,.685,{ic:.026}],172:[.393,-.108,.886,{ic:.006}],177:[.693,0,.886],181:[.455,.216,.591,{ic:.034}],182:[.694,.194,.703,{ic:.141}],183:[.387,-.24,.278,{ic:.025}],215:[.516,.015,.886],240:[.695,.011,.591,{ic:.022}],247:[.558,.057,.886],8224:[.702,.211,.511,{ic:.054}],8225:[.702,.202,.511,{ic:.062}]}}},"NCM"),{},["MJX-NCM-SYB","MJX-NCM-SYI","MJX-NCM-SYBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/symbols-b-i","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/script.js 0000644 0001762 0000144 00000007427 15112352537 022627 0 ustar ligges users (()=>{"use strict";const s=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","script",s({S:{normal:{119964:[.674,.015,.855,{sk:.364}],8492:[.687,.015,.95,{sk:.324}],119966:[.687,.015,.797,{sk:.275}],119967:[.687,.015,.885,{sk:.285}],8496:[.687,.015,.75,{sk:.244}],8497:[.68,0,.919,{sk:.21}],119970:[.687,.015,.773,{sk:.237}],8459:[.687,.015,.997,{sk:.224}],8464:[.675,.015,.897,{sk:.26}],119973:[.674,.177,.802,{sk:.229}],119974:[.687,.015,1.009,{sk:.28}],8466:[.687,.015,.946,{sk:.349}],8499:[.674,.015,1.072,{sk:.326}],119977:[.687,.015,.97,{sk:.228}],119978:[.68,.015,.692,{sk:.172}],119979:[.687,.015,.91,{sk:.28}],119980:[.68,.038,.692,{sk:.146}],8475:[.687,.015,.944,{sk:.255}],119982:[.68,.015,.743,{sk:.183}],119983:[.687,.015,.912,{sk:.2}],119984:[.687,.015,.842,{sk:.15}],119985:[.687,.015,.932,{sk:.212}],119986:[.687,.015,1.078,{sk:.229}],119987:[.687,.015,.891,{sk:.165}],119988:[.687,.226,.926,{sk:.191}],119989:[.687,.015,.932,{sk:.144}],119990:[.441,.011,.819,{sk:.083}],119991:[.687,.012,.58,{sk:.197}],119992:[.441,.011,.662,{sk:.151}],119993:[.687,.011,.845,{sk:.359}],8495:[.441,.011,.627,{sk:.086}],119995:[.687,.209,.685,{sk:.239}],8458:[.441,.219,.738,{sk:.103}],119997:[.687,.011,.753,{sk:.136}],119998:[.653,.011,.496,{sk:.194}],119999:[.653,.219,.73,{sk:.311}],12e4:[.687,.011,.726,{sk:.144}],120001:[.687,.011,.579,{sk:.21}],120002:[.441,.011,1.038,{sk:.088}],120003:[.441,.011,.761,{sk:.098}],8500:[.441,.011,.697],120005:[.441,.209,.773,{sk:.1}],120006:[.441,.209,.78,{sk:.103}],120007:[.444,0,.58,{sk:.114}],120008:[.531,.011,.515,{sk:.111}],120009:[.658,.011,.551,{sk:.141}],120010:[.424,.011,.753,{sk:.054}],120011:[.441,.011,.618,{sk:.08}],120012:[.441,.011,.888,{sk:.119}],120013:[.441,.011,.752,{sk:.095}],120014:[.424,.219,.658,{sk:.095}],120015:[.478,.011,.691,{sk:.069}],8467:[.705,.012,.417,{sk:.102}],8472:[.453,.216,.636]},script:{}},SB:{normal:{120016:[.699,.021,.984,{sk:.37}],120017:[.699,.021,1.06,{sk:.268}],120018:[.699,.021,.912,{sk:.28}],120019:[.699,.021,.991,{sk:.243}],120020:[.699,.021,.826,{sk:.238}],120021:[.699,.021,1.042,{sk:.232}],120022:[.699,.021,.834,{sk:.237}],120023:[.699,.021,1.171,{sk:.288}],120024:[.699,.021,.997,{sk:.291}],120025:[.699,.224,.906,{sk:.237}],120026:[.699,.021,1.154,{sk:.349}],120027:[.699,.021,1.036,{sk:.374}],120028:[.699,.021,1.3,{sk:.35}],120029:[.699,.021,1.095,{sk:.28}],120030:[.699,.021,.809,{sk:.147}],120031:[.699,.021,1.025,{sk:.247}],120032:[.699,.052,.809,{sk:.147}],120033:[.699,.021,1.048,{sk:.234}],120034:[.699,.021,.816,{sk:.205}],120035:[.699,.021,1.03,{sk:.21}],120036:[.699,.021,.964,{sk:.15}],120037:[.699,.021,1.04,{sk:.262}],120038:[.699,.021,1.32,{sk:.289}],120039:[.699,.021,1.033,{sk:.15}],120040:[.699,.224,.989,{sk:.172}],120041:[.699,.021,.996,{sk:.179}],120042:[.462,.014,.942,{sk:.114}],120043:[.699,.014,.646,{sk:.198}],120044:[.462,.014,.764,{sk:.174}],120045:[.699,.014,.949,{sk:.369}],120046:[.462,.014,.726,{sk:.161}],120047:[.699,.205,.768,{sk:.229}],120048:[.462,.224,.819,{sk:.145}],120049:[.699,.014,.838,{sk:.139}],120050:[.698,.014,.558,{sk:.191}],120051:[.698,.223,.84,{sk:.34}],120052:[.699,.014,.81,{sk:.151}],120053:[.699,.014,.65,{sk:.201}],120054:[.462,.014,1.137,{sk:.12}],120055:[.462,.014,.851,{sk:.12}],120056:[.462,.014,.848,{sk:.148}],120057:[.462,.205,.885,{sk:.093}],120058:[.462,.205,.913,{sk:.104}],120059:[.462,0,.677,{sk:.126}],120060:[.557,.014,.562,{sk:.094}],120061:[.669,.014,.618,{sk:.169}],120062:[.45,.014,.842,{sk:.073}],120063:[.458,.014,.732,{sk:.099}],120064:[.458,.014,1.012,{sk:.147}],120065:[.462,.014,.82,{sk:.084}],120066:[.45,.224,.784,{sk:.114}],120067:[.493,.014,.782,{sk:.053}]},"bold-script":{}}},"NCM"));MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/script","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/cyrillic.js 0000644 0001762 0000144 00000063627 15112352537 023141 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","cyrillic",c({CY:{normal:{1024:[.877,0,.68],1025:[.824,0,.68],1026:[.683,.022,.861],1027:[.873,0,.625],1028:[.705,.022,.722],1029:[.705,.022,.555],1030:[.683,0,.361],1031:[.824,0,.361],1032:[.683,.022,.513],1033:[.683,.022,1.083],1034:[.683,0,1.083],1035:[.683,0,.764],1036:[.873,0,.778],1037:[.877,0,.778],1038:[.866,.022,.75],1039:[.683,.195,.778],1040:[.716,0,.75],1041:[.683,0,.708],1042:[.683,0,.708],1043:[.683,0,.625],1044:[.683,.195,.778,{ic:.004}],1045:[.683,0,.68],1046:[.683,0,1.194],1047:[.705,.022,.611],1048:[.683,0,.778],1049:[.866,0,.778],1050:[.683,0,.778],1051:[.683,.022,.778],1052:[.683,0,.916],1053:[.683,0,.778],1054:[.705,.022,.777],1055:[.683,0,.778],1056:[.683,0,.68],1057:[.705,.022,.722],1058:[.683,0,.722],1059:[.683,.022,.75],1060:[.683,0,.833],1061:[.683,0,.75],1062:[.683,.195,.778,{ic:.004}],1063:[.683,0,.778],1064:[.683,0,1.125],1065:[.683,.195,1.125,{ic:.003}],1066:[.683,0,.889],1067:[.683,0,.972],1068:[.683,0,.708],1069:[.705,.022,.722],1070:[.705,.022,1.125],1071:[.683,0,.778],1072:[.448,.011,.5],1073:[.693,.011,.5],1074:[.43,0,.5],1075:[.43,0,.444],1076:[.43,.162,.555],1077:[.448,.011,.444],1078:[.43,0,.833],1079:[.447,.011,.444],1080:[.43,0,.555],1081:[.613,0,.555],1082:[.43,0,.555],1083:[.43,.016,.555],1084:[.43,0,.667],1085:[.43,0,.555],1086:[.448,.011,.5],1087:[.43,0,.555],1088:[.441,.195,.555],1089:[.448,.011,.444],1090:[.43,0,.5],1091:[.43,.205,.528],1092:[.694,.195,.778],1093:[.43,0,.528],1094:[.43,.162,.555],1095:[.43,0,.555],1096:[.43,0,.805],1097:[.43,.162,.805],1098:[.43,0,.611],1099:[.43,0,.722],1100:[.43,0,.5],1101:[.447,.011,.444],1102:[.447,.011,.75],1103:[.43,0,.542],1104:[.677,.011,.444],1105:[.624,.011,.444],1106:[.694,.195,.528],1107:[.673,0,.444],1108:[.447,.011,.439],1109:[.448,.011,.394],1110:[.668,0,.278],1111:[.624,0,.278],1112:[.669,.205,.305],1113:[.43,.016,.764],1114:[.43,0,.764],1115:[.694,0,.555],1116:[.673,0,.555],1117:[.677,0,.555],1118:[.613,.205,.528],1119:[.43,.162,.555],1120:[.705,.022,1],1121:[.447,.011,.778],1122:[.75,0,.819],1123:[.647,0,.5],1124:[.705,.022,1.069],1125:[.447,.011,.7],1126:[.716,0,.928],1127:[.446,0,.694],1128:[.716,0,1.261],1129:[.446,0,.958],1130:[.683,0,1.028],1131:[.431,0,.833],1132:[.683,0,1.361],1133:[.431,0,1.125],1134:[.847,.205,.555],1135:[.56,.205,.417],1136:[.683,0,.778],1137:[.694,.195,.639],1138:[.705,.022,.778],1139:[.453,.022,.444],1140:[.705,.022,.819],1141:[.441,.021,.587],1142:[.915,.022,.819],1143:[.695,.021,.587],1146:[.771,.088,.944],1147:[.495,.059,.611],1148:[.914,.022,1],1149:[.661,.011,.778],1150:[.892,.022,1],1151:[.639,.011,.778],1152:[.705,.214,.722],1153:[.45,.205,.439],1154:[.184,.103,.444],1155:[.661,-.5,0,{dx:0}],1156:[.661,-.453,0,{dx:.253}],1157:[.716,-.5,0,{dx:.265}],1158:[.716,-.5,0,{dx:.237}],1160:[.802,.302,0],1161:[.853,.353,0],1162:[.866,.195,.778,{ic:.004}],1163:[.613,.162,.555],1164:[.683,0,.819],1165:[.639,0,.5],1166:[.683,0,.68],1167:[.441,.195,.555,{ic:.007}],1168:[.878,0,.639],1169:[.569,0,.444],1170:[.683,0,.625],1171:[.43,0,.444],1172:[.683,.205,.708],1173:[.43,.205,.555],1174:[.683,.195,1.194],1175:[.43,.162,.833],1176:[.705,.228,.611],1177:[.447,.228,.444],1178:[.683,.195,.778],1179:[.43,.162,.555],1180:[.683,0,.861],1181:[.43,0,.639],1182:[.683,0,.778],1183:[.694,0,.555],1184:[.683,0,.958],1185:[.43,0,.667],1186:[.683,.195,.778,{ic:.004}],1187:[.43,.162,.555],1188:[.683,0,.958],1189:[.43,0,.667],1190:[.683,.205,1.083],1191:[.43,.205,.778],1192:[.705,.079,.778],1193:[.447,.076,.5],1194:[.705,.228,.722],1195:[.447,.228,.444],1196:[.683,.195,.722],1197:[.43,.162,.5],1198:[.683,0,.75],1199:[.43,.195,.528],1200:[.683,0,.75],1201:[.43,.195,.528],1202:[.683,.195,.75,{ic:.011}],1203:[.43,.162,.528,{ic:.01}],1204:[.683,.195,.986,{ic:.004}],1205:[.43,.162,.683],1206:[.683,.195,.778,{ic:.004}],1207:[.43,.162,.555],1208:[.683,0,.778],1209:[.43,0,.555],1210:[.683,0,.778],1211:[.694,0,.555],1212:[.705,.022,.812],1213:[.447,.011,.576],1214:[.705,.203,.812],1215:[.447,.206,.576],1216:[.683,0,.361],1217:[.892,0,1.194],1218:[.639,0,.833],1219:[.683,.205,.778],1220:[.43,.205,.555],1221:[.683,.195,.778],1222:[.43,.162,.555],1223:[.683,.205,.778],1224:[.43,.205,.555],1225:[.683,.195,.778],1226:[.43,.162,.555],1227:[.683,.195,.778],1228:[.43,.162,.555],1229:[.683,.195,.916],1230:[.43,.162,.667],1232:[.92,0,.75],1233:[.689,.011,.5],1234:[.855,0,.75],1235:[.624,.011,.5],1236:[.683,0,.903],1237:[.447,.011,.722],1238:[.889,0,.68],1239:[.689,.011,.444],1240:[.705,.022,.676],1241:[.441,.011,.458],1242:[.874,.022,.676],1243:[.624,.011,.458],1244:[.824,0,1.194],1245:[.624,0,.833],1246:[.847,.022,.611],1247:[.624,.011,.444],1248:[.683,.022,.555],1249:[.43,.205,.444],1250:[.809,0,.778],1251:[.609,0,.555],1252:[.824,0,.778],1253:[.624,0,.555],1254:[.856,.022,.777],1255:[.624,.011,.5],1256:[.705,.022,.778],1257:[.447,.011,.5],1258:[.868,.022,.778],1259:[.624,.011,.5,{ic:.038}],1260:[.851,.022,.722],1261:[.624,.011,.444],1262:[.809,.022,.75],1263:[.609,.205,.528],1264:[.824,.022,.75],1265:[.624,.205,.528],1266:[.895,.022,.75],1267:[.695,.205,.528],1268:[.824,0,.778],1269:[.624,0,.555],1270:[.683,.195,.625],1271:[.43,.162,.444],1272:[.824,0,.972],1273:[.624,0,.722],1276:[.683,.205,.75],1277:[.43,.205,.528],1278:[.683,0,.75],1279:[.43,0,.528],1298:[.683,.205,.778],1299:[.43,.205,.555],1306:[.705,.194,.777],1307:[.441,.195,.528],1308:[.683,.022,1.027],1309:[.43,.01,.722]}},CYB:{bold:{1024:[.876,0,.755],1025:[.894,0,.755],1026:[.686,.011,.959],1027:[.876,0,.691],1028:[.697,.011,.83],1029:[.697,.011,.638],1030:[.686,0,.436],1031:[.894,0,.436],1032:[.686,.011,.594],1033:[.686,.011,1.234],1034:[.686,0,1.234],1035:[.686,0,.878],1036:[.876,0,.901],1037:[.876,0,.901],1038:[.929,.011,.869],1039:[.686,.195,.901],1040:[.698,0,.869],1041:[.686,0,.818],1042:[.686,0,.818],1043:[.686,0,.691],1044:[.686,.195,.901,{ic:.002}],1045:[.686,0,.755],1046:[.686,0,1.366],1047:[.697,.011,.703],1048:[.686,0,.901],1049:[.929,0,.901],1050:[.686,0,.901],1051:[.686,.011,.901],1052:[.686,0,1.091],1053:[.686,0,.901],1054:[.697,.011,.863],1055:[.686,0,.901],1056:[.686,0,.786],1057:[.697,.011,.83],1058:[.686,0,.8],1059:[.686,.011,.869],1060:[.686,0,.958],1061:[.686,0,.869],1062:[.686,.195,.901,{ic:.002}],1063:[.686,0,.901],1064:[.686,0,1.331],1065:[.686,.195,1.331,{ic:.002}],1066:[.686,0,1.007],1067:[.686,0,1.125],1068:[.686,0,.818],1069:[.697,.011,.83],1070:[.697,.011,1.273],1071:[.686,0,.901],1072:[.453,.006,.559],1073:[.694,.005,.575],1074:[.445,0,.575],1075:[.445,0,.496],1076:[.445,.162,.639],1077:[.453,.006,.527],1078:[.445,0,.958],1079:[.453,.005,.511],1080:[.445,0,.639],1081:[.688,0,.639],1082:[.445,0,.639],1083:[.445,.008,.639],1084:[.445,0,.766],1085:[.445,0,.639],1086:[.453,.006,.575],1087:[.445,0,.639],1088:[.45,.195,.639],1089:[.453,.006,.511],1090:[.445,0,.544],1091:[.445,.2,.607],1092:[.694,.195,.894],1093:[.445,0,.607],1094:[.445,.162,.639],1095:[.445,0,.639],1096:[.445,0,.941],1097:[.445,.162,.941],1098:[.445,0,.687],1099:[.445,0,.83],1100:[.445,0,.575],1101:[.453,.005,.511],1102:[.453,.005,.862],1103:[.445,0,.607],1104:[.662,.006,.527],1105:[.686,.006,.527],1106:[.694,.194,.607],1107:[.662,0,.48],1108:[.453,.005,.505],1109:[.453,.006,.453],1110:[.694,0,.319],1111:[.686,0,.319,{ic:.041}],1112:[.695,.2,.351],1113:[.445,.008,.863],1114:[.445,0,.863],1115:[.694,0,.639],1116:[.662,0,.639],1117:[.662,0,.639],1118:[.688,.2,.607],1119:[.445,.162,.639],1120:[.697,.011,1.18],1121:[.453,.006,.925],1122:[.75,0,.946],1123:[.669,0,.575],1124:[.697,.011,1.24],1125:[.453,.005,.805],1126:[.698,0,1.152],1127:[.451,0,.866],1128:[.698,0,1.543],1129:[.451,0,1.17],1130:[.686,0,1.189],1131:[.445,0,.958],1132:[.686,0,1.579],1133:[.445,0,1.293],1134:[.844,.2,.639],1135:[.578,.2,.479],1136:[.686,0,.894],1137:[.694,.195,.735],1138:[.697,.011,.864],1139:[.455,.011,.511],1140:[.697,.008,.946],1141:[.45,.008,.685],1142:[.876,.008,.946],1143:[.662,.008,.685],1146:[.782,.096,1.086],1147:[.515,.067,.703],1148:[.905,.011,1.18],1149:[.664,.006,.925],1150:[.895,.011,1.18],1151:[.653,.006,.925],1152:[.697,.204,.83],1153:[.461,.199,.505],1154:[.2,.104,.511],1155:[.664,-.514,0,{dx:0}],1156:[.664,-.456,0,{dx:.298}],1157:[.705,-.514,0,{dx:.296}],1158:[.705,-.514,0,{dx:.28}],1160:[.806,.306,0],1161:[.881,.381,0],1162:[.929,.195,.901,{ic:.002}],1163:[.688,.162,.639],1164:[.686,0,.946],1165:[.653,0,.575],1166:[.686,0,.786],1167:[.45,.195,.639,{ic:.003}],1168:[.88,0,.707],1169:[.583,0,.496],1170:[.686,0,.691],1171:[.445,0,.496],1172:[.686,.2,.848],1173:[.445,.2,.639],1174:[.686,.195,1.366],1175:[.445,.162,.958],1176:[.697,.224,.703],1177:[.453,.224,.511],1178:[.686,.195,.901],1179:[.445,.162,.639],1180:[.686,0,.997],1181:[.445,0,.735],1182:[.686,0,.901],1183:[.694,0,.639],1184:[.686,0,1.083],1185:[.445,0,.751],1186:[.686,.195,.901,{ic:.002}],1187:[.445,.162,.639],1188:[.686,0,1.09],1189:[.445,0,.751],1190:[.686,.2,1.249],1191:[.445,.2,.894],1192:[.697,.083,.894],1193:[.453,.082,.575],1194:[.697,.224,.83],1195:[.453,.224,.511],1196:[.686,.195,.8],1197:[.445,.162,.544],1198:[.686,0,.869],1199:[.445,.195,.607],1200:[.686,0,.869],1201:[.445,.195,.607],1202:[.686,.195,.869,{ic:.005}],1203:[.445,.162,.607,{ic:.002}],1204:[.686,.195,1.152,{ic:.002}],1205:[.445,.162,.77],1206:[.686,.195,.901,{ic:.002}],1207:[.445,.162,.639],1208:[.686,0,.901],1209:[.445,0,.639],1210:[.686,0,.901],1211:[.694,0,.639],1212:[.697,.011,.992],1213:[.453,.005,.721],1214:[.697,.206,.992],1215:[.453,.213,.721],1216:[.686,0,.436],1217:[.895,0,1.366],1218:[.653,0,.958],1219:[.686,.2,.901],1220:[.445,.2,.639],1221:[.686,.195,.901],1222:[.445,.162,.639],1223:[.686,.2,.901],1224:[.445,.2,.639],1225:[.686,.195,.901],1226:[.445,.162,.639],1227:[.686,.195,.901],1228:[.445,.162,.639],1229:[.686,.195,1.091],1230:[.445,.162,.766],1232:[.895,0,.869],1233:[.653,.006,.559],1234:[.894,0,.869],1235:[.686,.006,.559],1236:[.686,0,1.041],1237:[.453,.005,.83],1238:[.895,0,.755],1239:[.653,.006,.527],1240:[.697,.011,.795],1241:[.45,.005,.527],1242:[.894,.011,.83],1243:[.686,.005,.527],1244:[.894,0,1.366],1245:[.686,0,.958],1246:[.894,.011,.703],1247:[.686,.005,.511],1248:[.686,.011,.639],1249:[.445,.2,.511],1250:[.894,0,.901],1251:[.697,0,.639],1252:[.894,0,.901],1253:[.686,0,.639],1254:[.894,.011,.863],1255:[.686,.006,.575],1256:[.697,.011,.864],1257:[.453,.005,.575],1258:[.894,.011,.864],1259:[.686,.005,.575],1260:[.894,.011,.83],1261:[.686,.005,.511],1262:[.894,.011,.869],1263:[.697,.2,.607],1264:[.894,.011,.869],1265:[.685,.2,.607],1266:[.876,.011,.869],1267:[.662,.2,.607],1268:[.894,0,.901],1269:[.686,0,.639],1270:[.686,.195,.691],1271:[.445,.162,.496],1272:[.894,0,1.125],1273:[.686,0,.83],1276:[.686,.2,.869],1277:[.445,.2,.607],1278:[.686,0,.869],1279:[.445,0,.607],1298:[.686,.2,.901],1299:[.445,.2,.639],1306:[.697,.194,.863],1307:[.45,.195,.607],1308:[.686,.008,1.188],1309:[.445,.004,.83]}},CYI:{italic:{1024:[.871,0,.678,{ic:.065}],1025:[.891,0,.678,{ic:.065}],1026:[.683,.022,.843,{ic:.007}],1027:[.871,.001,.627,{ic:.077}],1028:[.705,.022,.715,{ic:.095}],1029:[.705,.022,.562,{ic:.07}],1030:[.683,0,.385,{ic:.116}],1031:[.892,0,.385,{ic:.16}],1032:[.683,.022,.525,{ic:.097}],1033:[.683,.022,1.049],1034:[.683,0,1.049],1035:[.683,0,.754,{ic:.001}],1036:[.871,0,.768,{ic:.091}],1037:[.871,0,.769,{ic:.107}],1038:[.891,.022,.743,{ic:.123}],1039:[.683,.194,.769,{ic:.107}],1040:[.716,0,.743],1041:[.683,0,.704,{ic:.013}],1042:[.683,0,.703,{ic:.031}],1043:[.683,.001,.627,{ic:.077}],1044:[.683,.194,.769,{ic:.108}],1045:[.683,0,.678,{ic:.065}],1046:[.683,0,1.152,{ic:.088}],1047:[.705,.022,.613,{ic:.044}],1048:[.683,0,.769,{ic:.107}],1049:[.891,0,.769,{ic:.107}],1050:[.683,0,.768,{ic:.091}],1051:[.683,.022,.769,{ic:.107}],1052:[.683,0,.896,{ic:.106}],1053:[.683,0,.769,{ic:.107}],1054:[.705,.022,.766,{ic:.022}],1055:[.683,0,.769,{ic:.107}],1056:[.683,0,.678,{ic:.052}],1057:[.705,.022,.715,{ic:.097}],1058:[.683,0,.715,{ic:.09}],1059:[.683,.022,.743,{ic:.123}],1060:[.683,0,.818,{ic:.019}],1061:[.683,0,.743,{ic:.082}],1062:[.683,.194,.769,{ic:.107}],1063:[.683,0,.769,{ic:.107}],1064:[.684,0,1.088,{ic:.108}],1065:[.683,.194,1.088,{ic:.108}],1066:[.683,0,.869],1067:[.683,0,.948,{ic:.098}],1068:[.683,0,.704],1069:[.705,.022,.715,{ic:.02}],1070:[.705,.022,1.087,{ic:.021}],1071:[.683,0,.769,{ic:.106}],1072:[.442,.011,.493,{ic:.024}],1073:[.694,.011,.475,{ic:.11}],1074:[.442,.011,.493,{ic:.001}],1075:[.442,.011,.422,{ic:.006}],1076:[.705,.011,.475,{ic:.056}],1077:[.442,.011,.442,{ic:.008}],1078:[.442,.011,1.048,{ic:.008}],1079:[.442,.011,.46],1080:[.441,.011,.562,{ic:.024}],1081:[.638,.011,.562,{ic:.024}],1082:[.442,.011,.511,{ic:.041}],1083:[.441,.011,.537,{ic:.022}],1084:[.43,.011,.741,{ic:.023}],1085:[.442,.011,.562,{ic:.024}],1086:[.442,.011,.475,{ic:.016}],1087:[.442,.011,.562,{ic:.024}],1088:[.442,.194,.506,{ic:.017}],1089:[.442,.011,.442,{ic:.01}],1090:[.442,.011,.817,{ic:.025}],1091:[.442,.206,.511,{ic:.029}],1092:[.706,.205,.68,{ic:.016}],1093:[.442,.011,.54,{ic:.042}],1094:[.441,.203,.567,{ic:.007}],1095:[.441,.011,.537,{ic:.023}],1096:[.442,.011,.818,{ic:.023}],1097:[.442,.203,.823,{ic:.007}],1098:[.439,.011,.485,{ic:.002}],1099:[.441,.011,.664,{ic:.024}],1100:[.441,.011,.511,{ic:.002}],1101:[.442,.011,.442,{ic:.015}],1102:[.442,.011,.723,{ic:.016}],1103:[.43,.011,.537,{ic:.023}],1104:[.651,.011,.442,{ic:.008}],1105:[.659,.011,.442,{ic:.064}],1106:[.694,.194,.46,{ic:.086}],1107:[.651,.011,.422,{ic:.028}],1108:[.442,.011,.442,{ic:.034}],1109:[.442,.011,.408,{ic:.011}],1110:[.656,.011,.306,{ic:.025}],1111:[.659,.011,.306,{ic:.141}],1112:[.656,.205,.306,{ic:.051}],1113:[.442,.011,.69,{ic:.002}],1114:[.442,.011,.715,{ic:.003}],1115:[.694,.011,.511,{ic:.023}],1116:[.651,.011,.511,{ic:.041}],1117:[.651,.011,.562,{ic:.024}],1118:[.638,.206,.511,{ic:.029}],1119:[.442,.18,.537,{ic:.023}],1120:[.705,.022,.971,{ic:.025}],1121:[.438,.011,.613,{ic:.015}],1122:[.75,0,.806],1123:[.442,.011,.715,{ic:.003}],1124:[.705,.022,1.036,{ic:.095}],1125:[.442,.011,.7,{ic:.034}],1126:[.716,0,.904],1127:[.442,.011,.639,{ic:.023}],1128:[.716,0,1.211],1129:[.442,.011,.869,{ic:.023}],1130:[.683,0,.999],1131:[.431,.011,.715,{ic:.023}],1132:[.683,0,1.305],1133:[.442,.011,.971,{ic:.023}],1134:[.846,.205,.562,{ic:.057}],1135:[.515,.205,.434,{ic:.026}],1136:[.683,0,.766,{ic:.057}],1137:[.695,.194,.613,{ic:.033}],1138:[.705,.022,.766,{ic:.021}],1139:[.442,.011,.46],1140:[.705,.022,.806,{ic:.133}],1141:[.442,.022,.615,{ic:.071}],1142:[.871,.022,.806,{ic:.133}],1143:[.651,.022,.615,{ic:.071}],1146:[.759,.076,.92,{ic:.023}],1147:[.474,.044,.577,{ic:.019}],1148:[.913,.022,.971,{ic:.025}],1149:[.64,.011,.613,{ic:.09}],1150:[.892,.022,.971,{ic:.025}],1151:[.639,.011,.613,{ic:.015}],1152:[.705,.214,.715,{ic:.095}],1153:[.45,.205,.442,{ic:.01}],1154:[.179,.101,.46],1155:[.661,-.489,0,{dx:-.143}],1156:[.661,-.453,0,{dx:.139}],1157:[.716,-.491,0,{dx:.126}],1158:[.716,-.491,0,{dx:.096}],1160:[.802,.302,0],1161:[.854,.354,0],1162:[.891,.194,.769,{ic:.107}],1163:[.638,.203,.567,{ic:.007}],1164:[.683,0,.806],1165:[.638,.011,.511,{ic:.001}],1166:[.683,0,.678,{ic:.052}],1167:[.442,.194,.506,{ic:.017}],1168:[.877,.001,.64,{ic:.15}],1169:[.624,.011,.537,{ic:.107}],1170:[.683,0,.627,{ic:.077}],1171:[.442,.011,.422,{ic:.013}],1172:[.683,.206,.704,{ic:.001}],1173:[.43,.206,.498,{ic:.013}],1174:[.683,.194,1.152,{ic:.088}],1175:[.442,.203,1.048,{ic:.008}],1176:[.705,.217,.613,{ic:.044}],1177:[.442,.217,.46],1178:[.683,.194,.769,{ic:.088}],1179:[.442,.203,.516,{ic:.036}],1180:[.683,0,.845,{ic:.089}],1181:[.442,.011,.562,{ic:.041}],1182:[.683,0,.769,{ic:.088}],1183:[.694,.011,.46,{ic:.041}],1184:[.683,0,.934,{ic:.089}],1185:[.442,.011,.626,{ic:.041}],1186:[.683,.194,.769,{ic:.107}],1187:[.442,.203,.567,{ic:.007}],1188:[.683,0,.934,{ic:.115}],1189:[.442,.011,.677,{ic:.058}],1190:[.683,.206,1.049],1191:[.442,.206,.715],1192:[.705,.076,.766,{ic:.017}],1193:[.447,.075,.488],1194:[.705,.217,.715,{ic:.095}],1195:[.442,.217,.442,{ic:.009}],1196:[.683,.194,.715,{ic:.09}],1197:[.442,.203,.823,{ic:.006}],1198:[.683,0,.743,{ic:.131}],1199:[.442,.194,.615,{ic:.071}],1200:[.683,0,.743,{ic:.13}],1201:[.442,.194,.615,{ic:.071}],1202:[.683,.194,.743,{ic:.08}],1203:[.442,.203,.52,{ic:.048}],1204:[.683,.194,.959,{ic:.108}],1205:[.431,.203,.72,{ic:.007}],1206:[.683,.194,.769,{ic:.107}],1207:[.441,.203,.542,{ic:.007}],1208:[.683,0,.769,{ic:.107}],1209:[.441,.011,.537,{ic:.023}],1210:[.683,0,.769],1211:[.694,.011,.511,{ic:.024}],1212:[.705,.022,.809,{ic:.056}],1213:[.442,.011,.577,{ic:.007}],1214:[.705,.204,.809,{ic:.056}],1215:[.442,.208,.577,{ic:.007}],1216:[.683,0,.385,{ic:.116}],1217:[.89,0,1.152,{ic:.088}],1218:[.637,.011,1.048,{ic:.008}],1219:[.683,.206,.769,{ic:.088}],1220:[.442,.206,.511,{ic:.041}],1221:[.683,.194,.769,{ic:.107}],1222:[.442,.203,.542,{ic:.006}],1223:[.683,.206,.769,{ic:.107}],1224:[.442,.206,.511,{ic:.029}],1225:[.683,.194,.769,{ic:.107}],1227:[.683,.194,.769,{ic:.107}],1228:[.441,.18,.537,{ic:.023}],1229:[.683,.194,.896,{ic:.104}],1230:[.43,.203,.746,{ic:.007}],1232:[.89,0,.743],1233:[.637,.011,.493,{ic:.038}],1234:[.892,0,.743],1235:[.658,.011,.493,{ic:.039}],1236:[.683,0,.883,{ic:.065}],1237:[.442,.011,.715,{ic:.002}],1238:[.89,0,.678,{ic:.065}],1239:[.637,.011,.442,{ic:.064}],1240:[.705,.022,.673,{ic:.034}],1241:[.442,.011,.442,{ic:.02}],1242:[.892,.022,.715,{ic:.033}],1243:[.659,.011,.442,{ic:.082}],1244:[.892,0,1.152,{ic:.088}],1245:[.658,.011,1.048,{ic:.008}],1246:[.891,.022,.613,{ic:.046}],1247:[.659,.011,.46,{ic:.064}],1248:[.683,.022,.562,{ic:.1}],1249:[.431,.205,.46,{ic:.037}],1250:[.891,0,.769,{ic:.107}],1251:[.681,.011,.562,{ic:.035}],1252:[.891,0,.769,{ic:.107}],1253:[.658,.011,.562,{ic:.024}],1254:[.892,.022,.766,{ic:.022}],1255:[.659,.011,.511,{ic:.038}],1256:[.705,.022,.766,{ic:.021}],1257:[.442,.011,.511],1258:[.892,.022,.766,{ic:.021}],1259:[.659,.011,.511,{ic:.038}],1260:[.891,.022,.715,{ic:.02}],1261:[.659,.011,.442,{ic:.082}],1262:[.891,.022,.743,{ic:.123}],1263:[.681,.206,.511,{ic:.06}],1264:[.891,.022,.743,{ic:.123}],1265:[.658,.206,.511,{ic:.039}],1266:[.871,.022,.743,{ic:.123}],1267:[.651,.206,.511,{ic:.111}],1268:[.891,0,.769,{ic:.107}],1269:[.659,.011,.537,{ic:.026}],1270:[.683,.194,.627,{ic:.077}],1271:[.442,.203,.422,{ic:.006}],1272:[.891,0,.948,{ic:.098}],1273:[.658,.011,.664,{ic:.024}],1276:[.683,.206,.743,{ic:.08}],1277:[.442,.18,.535,{ic:.046}],1278:[.683,0,.743,{ic:.08}],1279:[.442,.011,.54,{ic:.042}],1298:[.683,.206,.769,{ic:.107}],1299:[.442,.206,.485,{ic:.017}],1306:[.705,.194,.766,{ic:.022}],1307:[.442,.194,.46,{ic:.037}],1308:[.683,.022,.998,{ic:.126}],1309:[.442,.011,.664,{ic:.033}]}},CYBI:{"bold-italic":{1024:[.892,0,.756,{ic:.049}],1025:[.895,0,.756,{ic:.049}],1026:[.686,.022,.943,{ic:.023}],1027:[.892,0,.698,{ic:.062}],1028:[.708,.022,.826,{ic:.083}],1029:[.708,.022,.65,{ic:.052}],1030:[.686,0,.472,{ic:.111}],1031:[.895,0,.472,{ic:.147}],1032:[.686,.022,.61,{ic:.079}],1033:[.686,.022,1.199],1034:[.686,0,1.199],1035:[.686,0,.871],1036:[.892,0,.895,{ic:.075}],1037:[.892,0,.895,{ic:.105}],1038:[.931,.022,.865,{ic:.112}],1039:[.686,.194,.895,{ic:.105}],1040:[.705,0,.865],1041:[.686,0,.816],1042:[.686,0,.816,{ic:.014}],1043:[.686,0,.698,{ic:.062}],1044:[.686,.194,.895,{ic:.105}],1045:[.686,0,.756,{ic:.049}],1046:[.686,0,1.318,{ic:.076}],1047:[.708,.022,.709,{ic:.029}],1048:[.686,0,.895,{ic:.105}],1049:[.931,0,.895,{ic:.105}],1050:[.686,0,.895,{ic:.075}],1051:[.686,.022,.895,{ic:.105}],1052:[.686,0,1.073,{ic:.104}],1053:[.686,0,.895,{ic:.105}],1054:[.708,.022,.855,{ic:.01}],1055:[.686,0,.895,{ic:.105}],1056:[.686,0,.787,{ic:.037}],1057:[.708,.022,.826,{ic:.082}],1058:[.686,0,.796,{ic:.076}],1059:[.686,.022,.865,{ic:.112}],1060:[.686,0,.944,{ic:.007}],1061:[.686,0,.865,{ic:.059}],1062:[.686,.194,.895,{ic:.105}],1063:[.686,0,.895,{ic:.104}],1064:[.686,0,1.293,{ic:.105}],1065:[.686,.194,1.293,{ic:.105}],1066:[.686,0,.988],1067:[.686,0,1.101,{ic:.099}],1068:[.686,0,.816],1069:[.708,.022,.826,{ic:.009}],1070:[.708,.022,1.237,{ic:.009}],1071:[.686,0,.895,{ic:.105}],1072:[.456,.011,.57,{ic:.032}],1073:[.694,.011,.55,{ic:.098}],1074:[.456,.011,.57],1075:[.456,.011,.488,{ic:.011}],1076:[.705,.011,.55,{ic:.049}],1077:[.456,.011,.511,{ic:.002}],1078:[.456,.011,1.209,{ic:.003}],1079:[.456,.011,.532],1080:[.456,.011,.65,{ic:.032}],1081:[.689,.011,.65,{ic:.032}],1082:[.455,.011,.591,{ic:.032}],1083:[.456,.011,.62,{ic:.032}],1084:[.444,.011,.856,{ic:.032}],1085:[.455,.011,.65,{ic:.032}],1086:[.456,.011,.55,{ic:.024}],1087:[.456,.011,.65,{ic:.032}],1088:[.456,.194,.585,{ic:.025}],1089:[.456,.011,.511,{ic:.002}],1090:[.456,.011,.944,{ic:.032}],1091:[.456,.206,.591,{ic:.032}],1092:[.705,.206,.785,{ic:.026}],1093:[.456,.011,.649,{ic:.027}],1094:[.456,.204,.656,{ic:.043}],1095:[.456,.011,.62,{ic:.032}],1096:[.456,.011,.944,{ic:.032}],1097:[.456,.204,.95,{ic:.044}],1098:[.456,.011,.562,{ic:.008}],1099:[.456,.011,.768,{ic:.031}],1100:[.456,.011,.591,{ic:.008}],1101:[.456,.011,.511,{ic:.025}],1102:[.456,.011,.835,{ic:.024}],1103:[.444,.011,.62,{ic:.032}],1104:[.675,.011,.511,{ic:.002}],1105:[.686,.011,.511,{ic:.064}],1106:[.694,.194,.532,{ic:.085}],1107:[.675,.011,.488,{ic:.011}],1108:[.456,.011,.511,{ic:.026}],1109:[.456,.011,.487],1110:[.693,.011,.355,{ic:.032}],1111:[.686,.011,.355,{ic:.153}],1112:[.693,.206,.355,{ic:.057}],1113:[.456,.011,.797,{ic:.009}],1114:[.455,.011,.826,{ic:.009}],1115:[.694,.011,.591,{ic:.032}],1116:[.675,.011,.591,{ic:.032}],1117:[.675,.011,.65,{ic:.032}],1118:[.689,.206,.591,{ic:.032}],1119:[.455,.195,.62,{ic:.032}],1120:[.708,.022,1.151,{ic:.014}],1121:[.451,.011,.709,{ic:.004}],1122:[.75,0,.934],1123:[.456,.011,.826,{ic:.009}],1124:[.708,.022,1.208,{ic:.082}],1125:[.456,.011,.809,{ic:.026}],1126:[.705,0,1.137],1127:[.456,.011,.738,{ic:.032}],1128:[.705,0,1.5],1129:[.456,.011,1.003,{ic:.032}],1130:[.686,0,1.16],1131:[.445,.011,.826,{ic:.032}],1132:[.686,0,1.522],1133:[.455,.011,1.121,{ic:.032}],1134:[.854,.205,.65,{ic:.032}],1135:[.563,.205,.503,{ic:.026}],1136:[.686,0,.885,{ic:.041}],1137:[.694,.194,.709,{ic:.022}],1138:[.708,.022,.855,{ic:.01}],1139:[.456,.011,.532,{ic:.005}],1140:[.708,.013,.934,{ic:.126}],1141:[.456,.013,.723,{ic:.063}],1142:[.892,.013,.934,{ic:.126}],1143:[.676,.013,.723,{ic:.063}],1146:[.787,.101,1.062,{ic:.012}],1147:[.5,.056,.668,{ic:.028}],1148:[.917,.022,1.151,{ic:.014}],1149:[.687,.011,.709,{ic:.089}],1150:[.895,.022,1.151,{ic:.014}],1151:[.653,.011,.709,{ic:.004}],1152:[.708,.215,.826,{ic:.083}],1153:[.47,.205,.511],1154:[.193,.102,.532],1155:[.675,-.505,0,{dx:-.146}],1156:[.675,-.467,0,{dx:.179}],1157:[.716,-.506,0,{dx:.157}],1158:[.716,-.506,0,{dx:.136}],1160:[.817,.318,0],1161:[.895,.395,0],1162:[.931,.194,.895,{ic:.105}],1163:[.689,.204,.656,{ic:.043}],1164:[.686,0,.934],1165:[.652,.011,.591,{ic:.008}],1166:[.686,0,.787,{ic:.037}],1167:[.456,.194,.585,{ic:.025}],1168:[.881,0,.712,{ic:.139}],1169:[.638,.011,.605,{ic:.1}],1170:[.686,0,.698,{ic:.062}],1171:[.456,.011,.488,{ic:.012}],1172:[.686,.206,.847],1173:[.444,.206,.576],1174:[.686,.194,1.318,{ic:.076}],1175:[.456,.204,1.209,{ic:.033}],1176:[.708,.217,.709,{ic:.029}],1177:[.456,.217,.532],1178:[.686,.194,.895,{ic:.075}],1179:[.455,.204,.597,{ic:.043}],1180:[.686,0,.983,{ic:.075}],1181:[.455,.011,.65,{ic:.032}],1182:[.686,0,.895,{ic:.075}],1183:[.694,.011,.532,{ic:.032}],1184:[.686,0,1.057,{ic:.075}],1185:[.456,.011,.755,{ic:.032}],1186:[.686,.194,.895,{ic:.105}],1187:[.455,.204,.656,{ic:.043}],1188:[.686,0,1.066,{ic:.107}],1189:[.455,.011,.814,{ic:.049}],1190:[.686,.206,1.214],1191:[.456,.206,.826],1192:[.708,.083,.885,{ic:.003}],1193:[.461,.082,.595],1194:[.708,.217,.826,{ic:.082}],1195:[.456,.217,.511,{ic:.002}],1196:[.686,.194,.796,{ic:.076}],1197:[.456,.204,.95,{ic:.033}],1198:[.686,0,.865,{ic:.117}],1199:[.456,.194,.723,{ic:.063}],1200:[.686,0,.865,{ic:.117}],1201:[.456,.194,.723,{ic:.063}],1202:[.686,.194,.865,{ic:.059}],1203:[.456,.204,.625,{ic:.036}],1204:[.686,.194,1.126,{ic:.105}],1205:[.444,.204,.864,{ic:.044}],1206:[.686,.194,.895,{ic:.104}],1207:[.456,.204,.626,{ic:.044}],1208:[.686,0,.895,{ic:.104}],1209:[.456,.011,.62,{ic:.032}],1210:[.686,0,.895],1211:[.694,.011,.591,{ic:.031}],1212:[.708,.022,.98,{ic:.046}],1213:[.456,.011,.679,{ic:.001}],1214:[.708,.217,.98,{ic:.046}],1215:[.456,.225,.679,{ic:.001}],1216:[.686,0,.472,{ic:.111}],1217:[.893,0,1.318,{ic:.076}],1218:[.651,.011,1.209,{ic:.003}],1219:[.686,.206,.895,{ic:.075}],1220:[.455,.206,.591,{ic:.029}],1221:[.686,.194,.895,{ic:.105}],1222:[.456,.204,.626,{ic:.044}],1223:[.686,.206,.895,{ic:.105}],1224:[.455,.206,.591,{ic:.032}],1225:[.686,.194,.895,{ic:.105}],1227:[.686,.194,.895,{ic:.104}],1228:[.455,.195,.62,{ic:.032}],1229:[.686,.194,1.073,{ic:.104}],1230:[.444,.204,.862,{ic:.041}],1232:[.893,0,.865],1233:[.651,.011,.57,{ic:.032}],1234:[.895,0,.865],1235:[.686,.011,.57,{ic:.035}],1236:[.686,0,1.023,{ic:.048}],1237:[.456,.011,.826,{ic:.001}],1238:[.893,0,.756,{ic:.049}],1239:[.651,.011,.511,{ic:.056}],1240:[.708,.022,.796,{ic:.024}],1241:[.456,.011,.511,{ic:.027}],1242:[.895,.022,.826,{ic:.024}],1243:[.686,.011,.511,{ic:.086}],1244:[.895,0,1.318,{ic:.076}],1245:[.686,.011,1.209,{ic:.003}],1246:[.895,.022,.709,{ic:.029}],1247:[.686,.011,.532,{ic:.064}],1248:[.686,.022,.65,{ic:.088}],1249:[.444,.206,.532,{ic:.028}],1250:[.894,0,.895,{ic:.105}],1251:[.708,.011,.65,{ic:.032}],1252:[.895,0,.895,{ic:.105}],1253:[.686,.011,.65,{ic:.032}],1254:[.895,.022,.855,{ic:.01}],1255:[.686,.011,.591,{ic:.035}],1256:[.708,.022,.855,{ic:.01}],1257:[.456,.011,.591,{ic:.004}],1258:[.895,.022,.855,{ic:.01}],1259:[.686,.011,.591,{ic:.035}],1260:[.894,.022,.826,{ic:.009}],1261:[.686,.011,.511,{ic:.085}],1262:[.894,.022,.865,{ic:.112}],1263:[.708,.206,.591,{ic:.058}],1264:[.894,.022,.865,{ic:.112}],1265:[.686,.206,.591,{ic:.035}],1266:[.892,.022,.865,{ic:.112}],1267:[.675,.206,.591,{ic:.103}],1268:[.895,0,.895,{ic:.104}],1269:[.686,.011,.62,{ic:.032}],1270:[.686,.194,.698,{ic:.062}],1271:[.456,.204,.488,{ic:.011}],1272:[.894,0,1.101,{ic:.099}],1273:[.686,.011,.768,{ic:.031}],1276:[.686,.206,.865,{ic:.059}],1277:[.456,.195,.643,{ic:.034}],1278:[.686,0,.865,{ic:.059}],1279:[.456,.011,.649,{ic:.027}],1298:[.686,.206,.895,{ic:.105}],1299:[.456,.206,.562,{ic:.023}],1306:[.708,.194,.855,{ic:.01}],1307:[.456,.194,.532,{ic:.043}],1308:[.686,.013,1.16,{ic:.112}],1309:[.456,.011,.768,{ic:.021}]}}},"NCM"),{},["MJX-NCM-CY","MJX-NCM-CYB","MJX-NCM-CYI","MJX-NCM-CYBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/cyrillic","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/mshapes.js 0000644 0001762 0000144 00000005420 15112352537 022752 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","mshapes",c({MSH:{normal:{128896:[.498,-.002,.356],128897:[.379,-.121,.356,{ic:.072}],128898:[.498,-.002,.356],128899:[.379,-.121,.356,{ic:.072}],128900:[.308,-.192,.278],128901:[.592,.092,.796],128902:[.592,.092,.796],128903:[.592,.092,.796],128904:[.592,.092,.796],128905:[.592,.092,.796],128906:[.592,.092,.778],128907:[.592,.092,.778],128908:[.337,-.161,.316],128909:[.367,-.131,.316],128910:[.686,.18,1.024],128911:[.586,.08,1.024],128912:[.586,.08,1.024],128913:[.586,.08,1.024],128914:[.586,.08,1.024],128915:[.586,.08,1.024],128916:[.586,.08,1.024],128917:[.586,.08,1.024],128918:[.586,.08,1.024],128919:[.344,-.155,.316],128920:[.372,-.125,.316],128921:[.415,-.084,.316,{ic:.007}],128922:[.714,.21,1.024],128923:[.714,.21,1.024],128924:[.714,.21,1.024],128925:[.356,-.142,.316],128926:[.371,-.124,.316],128927:[.414,-.084,.316],128928:[.715,.21,1.024],128929:[.583,.083,.778],128930:[.583,.083,.778],128931:[.583,.083,.778],128932:[.583,.083,.778],128933:[.583,.083,.778],128934:[.583,.083,.778],128935:[.583,.083,.778],128936:[.494,-.006,.778],128937:[.502,.045,.778],128938:[.507,.007,.778],128939:[.514,.014,.778],128940:[.521,.021,.778],128941:[.528,.028,.778],128942:[.535,.035,.778],128943:[.48,-.015,.5],128944:[.48,-.013,.5],128945:[.48,-.011,.5],128946:[.48,-.01,.5],128947:[.48,-.009,.5],128948:[.48,-.008,.5],128949:[.462,-.039,.5],128950:[.462,-.039,.5],128951:[.462,-.039,.5],128952:[.462,-.039,.5],128953:[.462,-.039,.5],128954:[.462,-.039,.5],128955:[.462,-.039,.5],128956:[.462,-.039,.5],128957:[.462,-.039,.5],128958:[.462,-.039,.5],128959:[.462,-.039,.5],128960:[.509,-.13,.5],128961:[.547,-.115,.5,{ic:.001}],128962:[.566,-.107,.5,{ic:.017}],128963:[.566,-.107,.5,{ic:.017}],128964:[.509,.029,.5,{ic:.019}],128965:[.547,.067,.5,{ic:.057}],128966:[.566,.086,.5,{ic:.076}],128967:[.566,.086,.5,{ic:.076}],128968:[.566,.086,.5,{ic:.076}],128969:[.527,.016,.62],128970:[.524,.013,.625],128971:[.586,.042,.64],128972:[.628,.084,.64],128973:[.628,.084,.64],128974:[.632,.047,.792],128975:[.674,.089,.792],128976:[.694,.109,.792],128977:[.694,.109,.792],128978:[.586,.042,.64],128979:[.628,.083,.64,{ic:.037}],128980:[.628,.083,.754],128981:[.445,-.055,.5],128982:[.445,-.055,.5],128983:[.445,-.055,.5],128984:[.445,-.055,.5],128992:[.592,.092,.796],128993:[.585,.099,.796],128994:[.625,.126,.796],128995:[.625,.126,.796],128996:[.592,.092,.796],128997:[.583,.083,.778],128998:[.583,.083,.778],128999:[.583,.083,.778],129e3:[.583,.083,.778],129001:[.583,.083,.778],129002:[.583,.083,.778],129003:[.583,.083,.778]}}},"NCM"),{},["MJX-NCM-MSH"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/mshapes","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/PUA.js 0000644 0001762 0000144 00000051220 15112352537 021736 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","PUA",c({PU:{normal:{57344:[.694,0,.667],57345:[.694,0,.667,{sk:-.019}],57346:[.691,0,.542,{sk:.033}],57347:[.694,0,.833,{sk:-.011}],57348:[.691,0,.597,{sk:.028}],57349:[.694,0,.611,{sk:.011}],57350:[.694,0,.708],57351:[.716,.022,.778],57352:[.694,0,.278],57353:[.694,0,.694],57354:[.694,0,.611],57355:[.694,0,.875],57356:[.694,0,.708],57357:[.689,0,.667],57358:[.716,.022,.736],57359:[.691,0,.708],57360:[.694,0,.639],57361:[.694,0,.722,{sk:.027}],57362:[.689,0,.68],57363:[.716,0,.778],57364:[.694,0,.722],57365:[.694,0,.667],57366:[.694,0,.778],57367:[.716,0,.722],57368:[.455,.011,.633,{sk:-.022}],57369:[.733,.139,.5,{sk:-.027}],57370:[.455,.171,.555,{sk:.011}],57371:[.721,.011,.472],57372:[.455,.011,.43],57373:[.738,.153,.472],57374:[.467,.195,.514,{sk:.017}],57375:[.733,.011,.5],57376:[.445,.011,.278,{sk:-.059}],57377:[.445,0,.483],57378:[.722,0,.5,{sk:-.136}],57379:[.445,.195,.555,{sk:-.045}],57380:[.445,0,.472,{sk:.01}],57381:[.744,.156,.472],57382:[.455,.011,.528],57383:[.445,.011,.583],57384:[.455,.195,.472],57385:[.445,.13,.444,{sk:.022}],57386:[.445,.011,.569,{sk:-.022}],57387:[.445,.011,.458],57388:[.445,.011,.5],57389:[.455,.195,.583],57390:[.458,.208,.555],57391:[.722,.195,.583],57392:[.445,.011,.667],57393:[.455,.011,.43],57394:[.75,.25,.997],57395:[.75,.25,.997],57409:[.694,0,.667,{sk:.154}],57410:[.694,0,.667,{ic:.028,sk:.16}],57411:[.691,0,.542,{ic:.105,sk:.116}],57412:[.694,0,.833,{sk:.149}],57413:[.691,0,.597,{ic:.092,sk:.115}],57414:[.694,0,.611,{ic:.092,sk:.087}],57415:[.694,0,.708,{ic:.054,sk:.112}],57416:[.716,.022,.778,{ic:.026,sk:.155}],57417:[.694,0,.278,{ic:.054,sk:.106}],57418:[.694,0,.694,{ic:.098,sk:.096}],57419:[.694,0,.611,{sk:.144}],57420:[.694,0,.875,{ic:.048,sk:.115}],57421:[.694,0,.708,{ic:.051,sk:.13}],57422:[.689,0,.667,{ic:.098,sk:.073}],57423:[.716,.022,.736,{ic:.027,sk:.152}],57424:[.691,0,.708,{ic:.053,sk:.116}],57425:[.694,0,.639,{ic:.052,sk:.128}],57426:[.694,0,.722,{ic:.092,sk:.12}],57427:[.689,0,.68,{ic:.111,sk:.081}],57428:[.716,0,.778,{ic:.065,sk:.104}],57429:[.694,0,.722,{ic:.022,sk:.131}],57430:[.694,0,.667,{ic:.096,sk:.072}],57431:[.694,0,.778,{ic:.075,sk:.093}],57432:[.716,0,.722,{ic:.047,sk:.13}],57433:[.455,.011,.633,{ic:.004,sk:.064}],57434:[.733,.139,.5,{ic:.032,sk:.136}],57435:[.455,.171,.555,{ic:.056,sk:.079}],57436:[.721,.011,.472,{ic:.092,sk:.047}],57437:[.455,.011,.43,{ic:.027,sk:.081}],57438:[.738,.153,.472,{ic:.097,sk:.097}],57439:[.467,.195,.514,{ic:.02,sk:.116}],57440:[.733,.011,.5,{ic:.053,sk:.152}],57441:[.445,.011,.278,{sk:.04}],57442:[.445,0,.483,{ic:.034,sk:.084}],57443:[.722,0,.5,{sk:.024}],57444:[.445,.195,.655,{sk:.09}],57445:[.445,0,.472,{ic:.053,sk:.063}],57446:[.744,.156,.472,{ic:.056,sk:.128}],57447:[.455,.011,.472,{ic:.011,sk:.123}],57448:[.445,.011,.583,{ic:.053,sk:.073}],57449:[.455,.195,.472,{ic:.011,sk:.13}],57450:[.445,.13,.444,{ic:.054,sk:.066}],57451:[.445,.011,.569,{ic:.066,sk:.046}],57452:[.445,.011,.458,{ic:.053,sk:.059}],57453:[.445,.011,.5,{ic:.016,sk:.074}],57454:[.456,.195,.583,{ic:.015,sk:.099}],57455:[.458,.208,.555,{ic:.06,sk:.066}],57456:[.722,.195,.583,{ic:.027,sk:.136}],57457:[.445,.011,.667,{ic:.009,sk:.09}],57458:[.455,.011,.43,{ic:.042,sk:.052}],59264:[.705,.29,.785],59265:[.738,.206,.5],59266:[.683,.29,.778],59267:[.694,.29,.528],59268:[.683,.29,.625],59269:[.694,.29,.278],59270:[.683,.29,.75],59271:[.442,.29,.556],59272:[.683,.29,.736],59273:[.442,.29,.392],59274:[.623,.183,.555],59395:[.705,0,.816],59908:[.873,-.518,.5],59909:[-.061,.233,.5],59910:[-.061,.233,.5],59913:[.873,-.518,.5],59915:[.899,-.518,.5],59917:[.69,-.518,.5],59920:[.823,-.518,.5],59927:[.832,-.516,.5],59930:[.832,-.516,.5],59932:[.858,-.516,.5],59934:[.782,-.516,.5],59935:[-.066,.29,.5],59942:[.697,-.51,.5,{sk:-.024}],59946:[.87,-.557,.5],59948:[.83,-.557,.5],59951:[.87,-.557,.5],59957:[.709,-.5,.5],59962:[-.131,.162,.5],59966:[-.131,.162,.5],59970:[.888,-.529,.75],59973:[-.1,.193,.5],60163:[.909,.211,.75],60164:[.698,.211,.5],60168:[.683,0,.683],60175:[.683,0,.683],60176:[0,0,0],60177:[0,0,0],60178:[0,0,0],60182:[.603,.025,.5],60185:[-.094,.2,.278],60190:[.909,.211,.681],60191:[.698,.211,.444],60200:[.705,.022,1.111],60201:[.5,.256,.472],60203:[.728,.045,.785],60209:[.341,-.088,.333],60213:[.909,.211,.361],60214:[.698,.211,.278],60218:[.909,.022,.514],60219:[.698,.205,.306],60224:[.746,.05,1,{ic:.011}],60232:[.909,.211,.778],60233:[.698,.211,.5],60237:[.347,.056,.392],60257:[.392,-.28,.278],60259:[.639,-.491,.333,{ic:.26}],60261:[.666,-.539,.278,{ic:.233}],60270:[.683,.233,.75],60271:[.442,.233,.556],60424:[.829,0,.75],60425:[.84,0,.556],60426:[.829,0,.625],60427:[.84,0,.278,{ic:.028}],60428:[.829,0,.722],60429:[.76,.011,.389],60430:[.831,0,.722],60432:[.878,.194,.778],60433:[.625,.194,.5],61699:[.705,.022,1.111],61700:[.277,-.255,.667],61705:[.123,0,.611],61719:[.348,-.145,.278],61720:[.712,.026,.555],61721:[.712,.012,.444],61722:[.683,.205,.778],61723:[.43,.205,.555],61724:[.683,.195,.778],61725:[.683,.195,.916],61726:[.683,.195,.68],61729:[.43,.162,.555],61730:[.43,.162,.667],61731:[.441,.311,.555],61734:[.683,.195,.625],61735:[.705,.022,.722],61736:[.43,.162,.43],61737:[.447,.011,.444],61738:[.683,.205,.916],61739:[.683,.205,.68],61740:[.43,.205,.667],61741:[.441,.322,.555],61743:[.62,.179,.555],61747:[.716,0,.75],61748:[.832,0,.639],61749:[.441,.011,.5],61750:[.625,.011,.417],61751:[0,.252,.139,{ic:.004}],61752:[0,.251,.194,{ic:.001}],61757:[.694,-.521,.667],61761:[.668,-.48,.5],61762:[.668,-.48,.5],61763:[.243,-.002,.444],61764:[.243,-.002,.444],61765:[.696,-.38,.333],61766:[.647,-.374,.222,{ic:.069}],61771:[.02,.02,.333,{ic:.018}],61772:[.192,.019,.333,{ic:.018}],61773:[.366,.019,.333,{ic:.018}],61774:[.54,.019,.333,{ic:.018}],61775:[.713,.019,.333,{ic:.018}],61776:[.192,.019,.333,{ic:.018}],61777:[.366,.019,.333,{ic:.018}],61778:[.54,.019,.333,{ic:.018}],61779:[.713,.019,.333,{ic:.019}],61780:[.02,.02,.222,{ic:.018}],61781:[.192,.019,.222,{ic:.018}],61782:[.366,.019,.222,{ic:.019}],61783:[.539,.019,.222,{ic:.019}],61784:[.713,.019,.222,{ic:.019}],61785:[.192,.019,.222,{ic:.023}],61786:[.366,.019,.222,{ic:.019}],61787:[.54,.019,.222,{ic:.019}],61788:[.713,.019,.222,{ic:.019}],61791:[.695,-.51,.5],61792:[.695,-.516,.5],61793:[.695,-.503,.5],61794:[.695,-.503,.5],61795:[.698,-.51,.5],61796:[.698,-.51,.5],61797:[.441,.195,.333],61800:[.447,.016,.722],61804:[.43,.205,.306],61805:[.009,.205,.333],61806:[.107,.205,.222,{ic:.069}],61807:[.107,.205,.222],61808:[.107,.205,.278],61809:[.684,-.43,.3],61810:[.72,-.47,.444],61813:[.441,.011,.556],61817:[.711,.212,.5],61818:[.447,.206,.444],61819:[.695,.011,.736],61822:[.441,.205,.556],61823:[.441,.205,.556],61824:[.705,.205,.556,{ic:.059}],61826:[.668,.205,.35],61828:[.695,0,.833],61829:[.441,0,.667],61832:[.441,.008,.611],61833:[.441,.205,.583],61834:[.615,.011,.556],61835:[.441,.219,.389],61836:[.43,.236,.5],61837:[.453,.236,.5],61838:[.695,.063,.5],61839:[.695,.011,.5],61842:[.695,0,.392],61850:[.43,.02,.547],61854:[.43,0,.566],61855:[.43,0,.455],61857:[.445,0,.547],61859:[.755,-.519,.5],61860:[.755,-.519,.5],61863:[.022,.205,.222],61864:[.022,.205,.222,{ic:.069}],61865:[-.111,.274,.5],61866:[-.112,.283,.5],61867:[.248,-.226,.278],61868:[.348,-.145,.278],61869:[-.113,.276,.5],61870:[-.111,.287,.5],61871:[-.101,.243,.5],61872:[-.025,.275,.556],61873:[.661,-.453,.555],61874:[.716,-.5,.5],61875:[.716,-.5,.5],61876:[.802,.302,1.111],61877:[.853,.353,1.111],62082:[.09,0,.278],62083:[.705,-.498,.5],62110:[.694,-.5,.5],62113:[.694,.022,.68],62116:[.683,0,.778],62119:[.683,0,.778],62120:[.683,.193,1.122],62121:[.441,.011,.5],62124:[.43,0,.555],62126:[.43,0,.555],62127:[.43,.16,.778],62560:[.904,0,.75],62561:[.875,0,.68],62562:[.875,0,.778],62563:[.862,.022,.777],62564:[.875,.022,.75],62565:[.875,0,.972],62566:[.875,.022,.722],62567:[.875,.022,1.125],62568:[.875,0,.778],62570:[.642,.011,.5],62571:[.642,.011,.444],62572:[.649,0,.555],62573:[.642,.011,.5],62574:[.649,.205,.528],62575:[.649,0,.722],62576:[.649,.011,.444],62577:[.649,.011,.75],62578:[.649,0,.542],63166:[.442,.205,.306,{sk:.024}],63187:[.862,-.742,.5],63188:[.613,-.475,.5],63189:[.649,-.5,.5],63190:[.642,-.49,.5],63198:[.277,-.255,.75]}},PUB:{bold:{59395:[.7,0,.945],59908:[.907,-.514,.575],59909:[-.028,.215,.575],59910:[-.028,.215,.575],59913:[.907,-.514,.575],59915:[.909,-.514,.575],59917:[.7,-.513,.575],59920:[.864,-.514,.575],59927:[.874,-.503,.575],59930:[.874,-.503,.575],59932:[.876,-.503,.575],59934:[.831,-.503,.575],59935:[-.033,.295,.575],59942:[.704,-.509,.575],59946:[.9,-.537,.575],59948:[.884,-.537,.575],59951:[.9,-.537,.575],59957:[.703,-.51,.575],59962:[-.096,.148,.575],59966:[-.096,.148,.575],59970:[.895,-.521,.869],59973:[-.068,.176,.575],60163:[.909,.206,.869],60164:[.704,.206,.559],60168:[.686,0,.686],60175:[.686,0,.686],60176:[0,0,0],60177:[0,0,0],60178:[0,0,0],60182:[.608,.024,.575],60185:[-.044,.2,.319],60190:[.909,.206,.756],60191:[.704,.206,.527],60200:[.697,.011,1.278],60201:[.5,.269,.543],60203:[.758,.072,.904],60209:[.406,-.085,.383],60213:[.909,.206,.436],60214:[.704,.206,.319],60218:[.909,.011,.594],60219:[.704,.2,.351],60224:[.775,.079,1.15,{ic:.017}],60232:[.909,.206,.864],60233:[.704,.206,.575],60237:[.347,.056,.45],60257:[.402,-.278,.319,{ic:.003}],60259:[.654,-.499,.397,{ic:.309}],60261:[.668,-.542,.319,{ic:.277}],60270:[.686,.215,.885],60271:[.45,.215,.639],60424:[.836,0,.9],60425:[.844,0,.639],60426:[.836,0,.692],60427:[.844,0,.319,{ic:.032}],60428:[.836,0,.8],60429:[.794,.006,.447],60430:[.868,0,.8],60432:[.881,.194,.864],60433:[.639,.194,.575],61699:[.697,.011,1.277],61700:[.293,-.256,.766],61705:[.127,0,.703],61719:[.355,-.127,.319],61720:[.728,.018,.608],61721:[.718,.01,.511],61722:[.686,.2,.901],61723:[.445,.2,.639],61724:[.686,.195,.901],61725:[.686,.195,1.091,{ic:.001}],61726:[.686,.195,.786],61729:[.445,.162,.639],61730:[.445,.162,.766],61731:[.45,.311,.639],61734:[.686,.195,.691],61735:[.697,.011,.83],61736:[.445,.162,.48],61737:[.453,.005,.511],61738:[.686,.2,1.091],61739:[.686,.2,.786],61740:[.445,.2,.766],61741:[.45,.316,.639],61743:[.752,.285,.694],61747:[.698,0,.933],61748:[.886,0,.794],61749:[.45,.005,.655,{ic:.011}],61750:[.694,.005,.528],61751:[0,.256,.194],61752:[0,.255,.261],61757:[.694,-.507,.828],61761:[.656,-.461,.575],61762:[.656,-.461,.575],61763:[.291,-.001,.511],61764:[.291,-.001,.511],61765:[.7,-.384,.383],61766:[.648,-.364,.256,{ic:.078}],61771:[.03,.03,.383,{ic:.029}],61772:[.203,.029,.383,{ic:.029}],61773:[.377,.029,.383,{ic:.029}],61774:[.55,.029,.383,{ic:.029}],61775:[.724,.029,.383,{ic:.029}],61776:[.203,.029,.383,{ic:.029}],61777:[.377,.029,.383,{ic:.029}],61778:[.55,.029,.383,{ic:.029}],61779:[.724,.029,.383,{ic:.029}],61780:[.03,.03,.256,{ic:.028}],61781:[.203,.029,.256,{ic:.028}],61782:[.377,.029,.256,{ic:.028}],61783:[.55,.029,.256,{ic:.028}],61784:[.724,.029,.256,{ic:.028}],61785:[.203,.029,.256,{ic:.028}],61786:[.377,.029,.256,{ic:.028}],61787:[.55,.029,.256,{ic:.028}],61788:[.724,.029,.256,{ic:.028}],61791:[.696,-.487,.575],61792:[.696,-.487,.575],61793:[.697,-.5,.575],61794:[.697,-.5,.575],61795:[.705,-.498,.575],61796:[.705,-.498,.575],61797:[.45,.195,.383],61800:[.453,.008,.831],61804:[.445,.2,.351,{ic:.013}],61805:[.016,.2,.383],61806:[.113,.2,.256,{ic:.078}],61807:[.113,.2,.256],61808:[.113,.2,.319],61809:[.689,-.445,.356],61810:[.732,-.482,.511],61813:[.45,.005,.639],61817:[.703,.213,.575],61818:[.453,.202,.511],61819:[.695,.005,.847],61822:[.45,.2,.639],61823:[.45,.2,.639],61824:[.7,.2,.639,{ic:.073}],61826:[.695,.2,.402],61828:[.695,0,.958],61829:[.45,0,.767],61832:[.45,.012,.703],61833:[.45,.2,.671],61834:[.635,.005,.639],61835:[.45,.21,.447],61836:[.445,.211,.575],61837:[.455,.211,.575],61838:[.695,.066,.575],61839:[.695,.005,.575],61842:[.695,0,.474],61850:[.445,.008,.702],61854:[.445,0,.727],61855:[.445,0,.552],61857:[.452,0,.718],61859:[.774,-.528,.575],61860:[.774,-.528,.575],61863:[.023,.2,.256],61864:[.023,.2,.256,{ic:.078}],61865:[-.111,.281,.575],61866:[-.108,.29,.575],61867:[.261,-.228,.319],61868:[.355,-.127,.319],61869:[-.112,.282,.575],61870:[-.111,.301,.575],61871:[-.106,.251,.575],61872:[-.035,.286,.639],61873:[.664,-.456,.639],61874:[.705,-.514,.575],61875:[.705,-.514,.575],61876:[.806,.306,1.277],61877:[.881,.381,1.277],62082:[.124,.001,.319],62083:[.706,-.513,.575],62110:[.714,-.514,.575],62113:[.694,.011,.786],62116:[.686,0,.901],62119:[.686,0,.901],62120:[.686,.194,1.328],62121:[.45,.005,.575],62124:[.445,0,.639],62126:[.445,0,.639],62127:[.445,.162,.91],62560:[.875,0,.869],62561:[.889,0,.755],62562:[.889,0,.901],62563:[.875,.011,.863],62564:[.889,.011,.869],62565:[.889,0,1.125],62566:[.889,.011,.83],62567:[.889,.011,1.273],62568:[.889,0,.901],62570:[.662,.006,.559],62571:[.662,.006,.527],62572:[.671,0,.639],62573:[.662,.006,.575],62574:[.671,.2,.607],62575:[.671,0,.83],62576:[.671,.005,.511],62577:[.671,.005,.862],62578:[.671,0,.607],63166:[.45,.2,.351,{sk:.041}],63187:[.875,-.733,.575],63188:[.688,-.491,.575],63189:[.658,-.514,.575],63190:[.662,-.494,.575],63198:[.292,-.256,.863]}},PUI:{italic:{59395:[.705,.205,.792,{ic:.041}],59908:[.865,-.516,.511,{ic:.059}],59909:[-.062,.232,.511],59910:[-.062,.232,.511],59913:[.865,-.516,.511,{ic:.052}],59915:[.895,-.516,.511,{ic:.052}],59917:[.686,-.516,.511,{ic:.021}],59920:[.827,-.516,.511,{ic:.101}],59927:[.816,-.516,.511,{ic:.046}],59930:[.816,-.516,.511,{ic:.019}],59932:[.846,-.516,.511,{ic:.121}],59934:[.778,-.516,.511,{ic:.088}],59935:[-.066,.29,.511],59942:[.696,-.506,.511],59946:[.867,-.553,.511,{ic:.093}],59948:[.82,-.553,.511,{ic:.086}],59951:[.867,-.553,.511,{ic:.032}],59957:[.705,-.496,.511],59962:[-.132,.162,.511],59966:[-.132,.162,.511],59970:[.884,-.529,.831],59973:[-.096,.197,.511],60163:[.906,.211,.743],60164:[.696,.211,.511,{ic:.028}],60168:[.683,0,.683],60175:[.683,0,.683],60176:[0,0,0],60177:[0,0,0],60178:[0,0,0],60182:[.603,.025,.511,{ic:.053}],60185:[-.094,.2,.307],60190:[.906,.211,.678,{ic:.069}],60191:[.696,.211,.46,{ic:.053}],60200:[.705,.022,1.124,{ic:.07}],60201:[.5,.256,.511],60203:[.728,.045,.774,{ic:.038}],60209:[.327,-.077,.179,{ic:.132}],60213:[.906,.211,.386,{ic:.165}],60214:[.696,.211,.307,{ic:.13}],60218:[.906,.022,.525,{ic:.152}],60219:[.696,.205,.307,{ic:.13}],60224:[.736,.039,.971,{ic:.159}],60232:[.906,.211,.767,{ic:.021}],60233:[.696,.211,.511,{ic:.028}],60237:[.347,.056,.408],60257:[.392,-.28,.256,{ic:.087}],60259:[.639,-.49,.358,{ic:.398}],60261:[.666,-.538,.307,{ic:.385}],60270:[.683,.232,.743,{ic:.109}],60271:[.442,.232,.537,{ic:.024}],60424:[.837,0,.743,{ic:.109}],60425:[.848,.011,.511,{ic:.106}],60426:[.837,0,.627],60427:[.848,.011,.256,{ic:.233}],60428:[.837,0,.716,{ic:.09}],60429:[.798,.011,.332,{ic:.183}],60430:[.832,0,.716,{ic:.09}],60432:[.874,.19,.767,{ic:.021}],60433:[.621,.19,.511],61699:[.705,.022,1.073,{ic:.069}],61700:[.277,-.255,.715,{ic:.012}],61705:[.125,0,.613],61719:[.356,-.138,.307],61720:[.711,.026,.562,{ic:.039}],61721:[.711,.013,.46,{ic:.039}],61722:[.683,.205,.769,{ic:.108}],61723:[.442,.205,.562,{ic:.024}],61724:[.683,.194,.769,{ic:.107}],61725:[.683,.194,.896,{ic:.104}],61726:[.683,.194,.678,{ic:.052}],61729:[.442,.203,.542,{ic:.006}],61730:[.43,.203,.746,{ic:.007}],61731:[.442,.31,.506,{ic:.017}],61734:[.683,.194,.627,{ic:.077}],61735:[.705,.022,.715,{ic:.095}],61736:[.442,.203,.422,{ic:.013}],61737:[.442,.011,.442,{ic:.009}],61738:[.683,.206,.896,{ic:.104}],61739:[.683,.206,.678,{ic:.052}],61740:[.432,.206,.69,{ic:.035}],61741:[.442,.322,.506,{ic:.017}],61743:[.619,.178,.555,{ic:.095}],61747:[.716,0,.75],61748:[.832,0,.555,{ic:.175}],61749:[.442,.011,.555],61750:[.625,.011,.417,{ic:.045}],61751:[.008,.251,.139],61752:[.009,.252,.194],61757:[.694,-.52,.667,{ic:.18}],61867:[.248,-.226,.307],61868:[.356,-.138,.307],61873:[.661,-.453,.562],61874:[.716,-.491,.511],61875:[.716,-.491,.511],61876:[.802,.302,1.073],61877:[.854,.354,1.073],62082:[.083,0,.307],62083:[.706,-.498,.511],62110:[.688,-.491,.511],62113:[.694,.022,.678,{ic:.016}],62116:[.683,0,.769,{ic:.107}],62119:[.684,0,.769,{ic:.107}],62120:[.683,.194,1.086,{ic:.107}],62560:[.87,0,.743],62561:[.875,0,.678,{ic:.065}],62562:[.875,0,.769,{ic:.107}],62563:[.87,.022,.766,{ic:.022}],62564:[.875,.022,.743,{ic:.123}],62565:[.875,0,.948,{ic:.098}],62566:[.875,.022,.715,{ic:.02}],62567:[.875,.022,1.087,{ic:.021}],62568:[.875,0,.769,{ic:.106}],62570:[.651,.011,.511,{ic:.034}],62571:[.651,.011,.46,{ic:.06}],62572:[.644,.011,.562,{ic:.024}],62573:[.651,.011,.511,{ic:.034}],62574:[.644,.206,.511,{ic:.029}],62575:[.644,.011,.664,{ic:.024}],62576:[.644,.011,.442,{ic:.02}],62577:[.644,.011,.723,{ic:.016}],62578:[.644,.011,.537,{ic:.049}],63166:[.442,.205,.307,{ic:.014}],63172:[.563,.011,.422,{ic:.09}],63174:[.442,.205,.46,{ic:.027}],63175:[.563,.011,.562,{ic:.024}],63176:[.572,.011,.818,{ic:.023}],63187:[.871,-.751,.511,{ic:.161}],63188:[.638,-.475,.511,{ic:.026}],63189:[.65,-.491,.511,{ic:.012}],63190:[.651,-.499,.511],63198:[.277,-.255,.767,{ic:.027}]}},PUBI:{"bold-italic":{59395:[.702,.202,.935,{ic:.039}],59908:[.893,-.512,.591,{ic:.038}],59909:[-.036,.215,.591],59910:[-.036,.215,.591],59913:[.893,-.512,.591,{ic:.038}],59915:[.908,-.512,.591,{ic:.038}],59917:[.69,-.511,.591,{ic:.006}],59920:[.865,-.512,.591,{ic:.094}],59927:[.863,-.497,.591,{ic:.029}],59930:[.863,-.497,.591,{ic:.01}],59932:[.878,-.497,.591,{ic:.116}],59934:[.835,-.497,.591,{ic:.086}],59935:[-.051,.307,.591],59942:[.699,-.503,.591],59946:[.899,-.535,.591,{ic:.077}],59948:[.886,-.535,.591,{ic:.095}],59951:[.899,-.535,.591,{ic:.045}],59957:[.702,-.5,.591],59962:[-.101,.151,.591],59966:[-.101,.151,.591],59970:[.904,-.534,.949],59973:[-.066,.185,.591],60163:[.918,.204,.866],60164:[.699,.204,.591,{ic:.024}],60168:[.686,0,.686],60175:[.686,0,.686],60176:[0,0,0],60177:[0,0,0],60178:[0,0,0],60182:[.608,.024,.591,{ic:.056}],60185:[-.053,.2,.356],60190:[.918,.204,.757,{ic:.048}],60191:[.699,.204,.532,{ic:.035}],60200:[.703,.017,1.3,{ic:.053}],60201:[.5,.275,.591],60203:[.758,.072,.895,{ic:.013}],60209:[.384,-.067,.414,{ic:.001}],60213:[.918,.204,.472,{ic:.141}],60214:[.699,.204,.356,{ic:.122}],60218:[.918,.017,.611,{ic:.115}],60219:[.699,.202,.356,{ic:.122}],60224:[.762,.065,1.121,{ic:.16}],60232:[.918,.204,.855,{ic:.01}],60233:[.699,.204,.591,{ic:.005}],60237:[.347,.056,.475],60257:[.402,-.278,.297,{ic:.111}],60259:[.654,-.508,.433,{ic:.457}],60261:[.668,-.542,.356,{ic:.432}],60270:[.686,.215,.881,{ic:.107}],60271:[.452,.215,.621,{ic:.034}],60424:[.86,0,.896,{ic:.107}],60425:[.868,.008,.591,{ic:.094}],60426:[.86,0,.698],60427:[.868,.008,.297,{ic:.24}],60428:[.86,0,.796,{ic:.076}],60429:[.818,.008,.385,{ic:.184}],60430:[.873,0,.796,{ic:.076}],60432:[.881,.194,.855,{ic:.01}],60433:[.639,.194,.591,{ic:.004}],61699:[.708,.022,1.239,{ic:.052}],61700:[.293,-.256,.829,{ic:.005}],61705:[.127,0,.709],61719:[.353,-.13,.355],61720:[.729,.029,.619,{ic:.016}],61721:[.718,.016,.532,{ic:.017}],61722:[.686,.206,.895,{ic:.105}],61723:[.456,.205,.65,{ic:.033}],61724:[.686,.194,.895,{ic:.105}],61725:[.686,.194,1.073,{ic:.104}],61726:[.686,.194,.787,{ic:.037}],61729:[.456,.204,.626,{ic:.044}],61730:[.444,.204,.862,{ic:.041}],61731:[.456,.311,.585,{ic:.025}],61734:[.686,.194,.698,{ic:.062}],61735:[.708,.022,.826,{ic:.082}],61736:[.456,.204,.488,{ic:.012}],61737:[.456,.011,.511,{ic:.002}],61738:[.686,.206,1.073,{ic:.104}],61739:[.686,.206,.787,{ic:.037}],61740:[.449,.206,.797,{ic:.043}],61741:[.456,.322,.585,{ic:.025}],61743:[.752,.285,.694,{ic:.1}],61747:[.699,0,.933],61748:[.886,0,.694,{ic:.158}],61749:[.45,.006,.722],61750:[.694,.006,.528,{ic:.05}],61751:[0,.256,.194],61752:[0,.255,.261],61757:[.694,-.508,.828,{ic:.158}],61867:[.261,-.228,.355],61868:[.353,-.13,.355],61873:[.675,-.467,.65],61874:[.716,-.506,.591],61875:[.716,-.506,.591],61876:[.817,.318,1.239],61877:[.895,.395,1.239],62082:[.117,.001,.355],62083:[.715,-.513,.591],62110:[.708,-.506,.591],62113:[.695,.022,.787],62116:[.686,0,.895,{ic:.105}],62119:[.686,0,.895,{ic:.104}],62120:[.686,.194,1.29,{ic:.105}],62560:[.892,0,.865],62561:[.894,0,.756,{ic:.049}],62562:[.894,0,.895,{ic:.105}],62563:[.891,.022,.855,{ic:.01}],62564:[.894,.022,.865,{ic:.112}],62565:[.894,0,1.101,{ic:.099}],62566:[.894,.022,.826,{ic:.009}],62567:[.894,.022,1.237,{ic:.009}],62568:[.894,0,.895,{ic:.105}],62570:[.675,.011,.591,{ic:.032}],62571:[.675,.011,.532,{ic:.044}],62572:[.666,.011,.65,{ic:.032}],62573:[.675,.011,.591,{ic:.015}],62574:[.666,.206,.591,{ic:.032}],62575:[.666,.011,.768,{ic:.031}],62576:[.666,.011,.511,{ic:.025}],62577:[.666,.011,.835,{ic:.024}],62578:[.666,.011,.62,{ic:.041}],63166:[.452,.202,.356,{ic:.019}],63172:[.596,.011,.488,{ic:.09}],63174:[.456,.206,.532,{ic:.03}],63175:[.596,.011,.65,{ic:.032}],63176:[.606,.011,.944,{ic:.032}],63187:[.892,-.756,.591,{ic:.144}],63188:[.689,-.503,.591,{ic:.024}],63189:[.664,-.506,.591,{ic:.003}],63190:[.675,-.515,.591],63198:[.292,-.256,.887,{ic:.022}]}}},"NCM"),{},["MJX-NCM-PU","MJX-NCM-PUB","MJX-NCM-PUI","MJX-NCM-PUBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/PUA","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/sans-serif-bi.js 0000644 0001762 0000144 00000044221 15112352537 023756 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","sans-serif-bi",c({SSLIB:{"sans-serif-bold-italic":{192:[.924,0,.733],193:[.912,0,.733,{ic:.001}],194:[.934,0,.733],195:[.884,0,.733],196:[.899,0,.733,{ic:.006}],197:[.953,0,.733],198:[.694,0,.947,{ic:.085}],199:[.706,.202,.703,{ic:.073}],200:[.924,0,.642,{ic:.084}],201:[.912,0,.642,{ic:.084}],202:[.934,0,.642,{ic:.084}],203:[.899,0,.642,{ic:.084}],204:[.924,0,.331,{ic:.055}],205:[.912,0,.331,{ic:.211}],206:[.934,0,.331,{ic:.184}],207:[.899,0,.331,{ic:.216}],208:[.694,0,.794,{ic:.034}],209:[.884,0,.794,{ic:.055}],210:[.924,.022,.794,{ic:.077}],211:[.912,.022,.794,{ic:.077}],212:[.934,.022,.794,{ic:.077}],213:[.884,.022,.794,{ic:.077}],214:[.899,.022,.794,{ic:.077}],216:[.756,.061,.856,{ic:.036}],217:[.924,.022,.764,{ic:.055}],218:[.912,.022,.764,{ic:.055}],219:[.934,.022,.764,{ic:.055}],220:[.899,.022,.764,{ic:.055}],221:[.912,0,.733,{ic:.143}],222:[.694,0,.642,{ic:.054}],223:[.706,.011,.565,{ic:.08}],224:[.667,.01,.493,{ic:.032}],225:[.668,.01,.493,{ic:.061}],226:[.69,.01,.493,{ic:.034}],227:[.64,.01,.493,{ic:.037}],228:[.655,.01,.493,{ic:.066}],229:[.709,.01,.493,{ic:.032}],230:[.46,.01,.794],231:[.475,.214,.489,{ic:.054}],232:[.667,.01,.48,{ic:.054}],233:[.668,.01,.48,{ic:.066}],234:[.69,.01,.48,{ic:.054}],235:[.655,.01,.48,{ic:.071}],236:[.673,0,.235,{ic:.113}],237:[.668,0,.235,{ic:.215}],238:[.69,0,.235,{ic:.188}],239:[.655,0,.235,{ic:.22}],241:[.64,0,.527,{ic:.033}],242:[.667,.01,.517,{ic:.05}],243:[.668,.01,.517,{ic:.05}],244:[.69,.01,.517,{ic:.05}],245:[.666,.01,.517,{ic:.067}],246:[.655,.01,.517,{ic:.05}],248:[.54,.095,.55,{ic:.017}],249:[.667,.01,.527,{ic:.037}],250:[.668,.01,.527,{ic:.046}],251:[.69,.01,.527,{ic:.037}],252:[.655,.01,.527,{ic:.051}],253:[.661,.167,.47,{ic:.081}],254:[.666,.186,.541,{ic:.057}],255:[.648,.167,.47,{ic:.086}],256:[.891,0,.733,{ic:.033}],257:[.647,.01,.493,{ic:.093}],258:[.951,0,.733,{ic:.031}],259:[.707,.01,.493,{ic:.091}],260:[.694,.213,.733],261:[.46,.219,.493,{ic:.032}],262:[.912,.011,.703,{ic:.073}],263:[.668,.01,.459,{ic:.103}],264:[.934,.011,.703,{ic:.073}],265:[.69,.01,.459,{ic:.076}],266:[.881,.011,.703,{ic:.073}],267:[.637,.01,.459,{ic:.053}],268:[.941,.011,.703,{ic:.073}],269:[.697,.01,.459,{ic:.107}],270:[.941,0,.794,{ic:.053}],271:[.754,.01,.527,{ic:.288}],272:[.694,0,.794,{ic:.034}],273:[.654,.01,.561,{ic:.092}],274:[.891,0,.642,{ic:.088}],275:[.647,.01,.48,{ic:.098}],276:[.951,0,.642,{ic:.086}],277:[.707,.01,.48,{ic:.096}],278:[.881,0,.642,{ic:.084}],279:[.637,.01,.48,{ic:.054}],280:[.692,.218,.642,{ic:.084}],281:[.46,.226,.48,{ic:.054}],282:[.941,0,.642,{ic:.084}],283:[.697,.01,.48,{ic:.07}],284:[.934,.011,.733,{ic:.055}],285:[.69,.18,.527,{ic:.04}],286:[.951,.011,.733,{ic:.062}],287:[.707,.18,.527,{ic:.068}],288:[.881,.011,.733,{ic:.055}],289:[.637,.18,.527,{ic:.04}],290:[.706,.331,.733,{ic:.055}],291:[.808,.18,.527,{ic:.04}],292:[.934,0,.794,{ic:.055}],293:[.93,0,.527,{ic:.031}],294:[.694,0,.853,{ic:.091}],295:[.673,0,.525,{ic:.048}],296:[.884,0,.331,{ic:.187}],297:[.639,0,.235,{ic:.172}],298:[.891,0,.331,{ic:.243}],299:[.646,0,.235,{ic:.227}],300:[.951,0,.331,{ic:.241}],301:[.706,0,.235,{ic:.226}],302:[.694,.215,.331,{ic:.055}],303:[.653,.216,.24,{ic:.08}],304:[.881,0,.331,{ic:.086}],306:[.694,.022,.798,{ic:.073}],307:[.653,.167,.507,{ic:.08}],308:[.934,.022,.519,{ic:.157}],309:[.696,.178,.286,{ic:.145}],310:[.694,.301,.764,{ic:.085}],311:[.653,.302,.499,{ic:.052}],312:[.444,0,.499,{ic:.052}],313:[.912,0,.581],314:[.908,0,.24,{ic:.265}],315:[.694,.303,.581],316:[.653,.306,.24,{ic:.08}],317:[.754,0,.581,{ic:.144}],318:[.754,0,.24,{ic:.295}],319:[.694,0,.581,{ic:.017}],320:[.653,0,.475,{ic:.046}],321:[.694,0,.675],322:[.653,0,.584,{ic:.055}],323:[.912,0,.794,{ic:.055}],324:[.668,0,.527,{ic:.037}],325:[.694,.299,.794,{ic:.055}],326:[.455,.299,.527,{ic:.031}],327:[.941,0,.794,{ic:.055}],328:[.697,0,.527,{ic:.041}],329:[.722,0,.682,{ic:.031}],330:[.716,.022,.794,{ic:.023}],331:[.455,.186,.543,{ic:.03}],332:[.891,.022,.794,{ic:.077}],333:[.647,.01,.517,{ic:.072}],334:[.951,.022,.794,{ic:.077}],335:[.707,.01,.517,{ic:.07}],336:[.937,.022,.794,{ic:.077}],337:[.693,.01,.517,{ic:.076}],338:[.717,.022,1.069,{ic:.085}],339:[.46,.01,.802,{ic:.042}],340:[.912,0,.703,{ic:.076}],341:[.668,0,.349,{ic:.164}],342:[.694,.301,.703,{ic:.076}],343:[.454,.313,.349,{ic:.082}],344:[.941,0,.703,{ic:.076}],345:[.697,0,.349,{ic:.168}],346:[.912,.022,.611,{ic:.045}],347:[.668,.01,.396,{ic:.118}],348:[.934,.022,.611,{ic:.045}],349:[.69,.01,.396,{ic:.091}],350:[.717,.207,.611,{ic:.045}],351:[.46,.193,.396,{ic:.052}],352:[.941,.022,.611,{ic:.045}],353:[.697,.01,.396,{ic:.122}],354:[.689,.187,.733,{ic:.105}],355:[.571,.193,.38,{ic:.047}],356:[.941,0,.733,{ic:.105}],357:[.794,.01,.38,{ic:.224}],358:[.689,0,.733,{ic:.105}],359:[.571,.01,.38,{ic:.047}],360:[.884,.022,.764,{ic:.055}],361:[.64,.01,.527,{ic:.037}],362:[.891,.022,.764,{ic:.055}],363:[.647,.01,.527,{ic:.078}],364:[.951,.022,.764,{ic:.055}],365:[.707,.01,.527,{ic:.076}],366:[.953,.022,.764,{ic:.055}],367:[.709,.01,.527,{ic:.037}],368:[.95,.022,.764,{ic:.055}],369:[.706,.01,.527,{ic:.096}],370:[.694,.234,.764,{ic:.055}],371:[.444,.218,.527,{ic:.037}],372:[.934,0,1.039,{ic:.131}],373:[.69,0,.699,{ic:.079}],374:[.934,0,.733,{ic:.143}],375:[.683,.167,.47,{ic:.078}],376:[.899,0,.733,{ic:.143}],377:[.912,0,.672,{ic:.085}],378:[.668,0,.447,{ic:.096}],379:[.881,0,.672,{ic:.085}],380:[.637,0,.447,{ic:.059}],381:[.941,0,.672,{ic:.085}],382:[.697,0,.447,{ic:.1}],383:[.664,0,.316,{ic:.18}],384:[.674,.011,.543,{ic:.047}],385:[.694,0,.903,{ic:.048}],386:[.694,0,.733,{ic:.006}],387:[.653,.01,.527,{ic:.04}],388:[.694,0,.733],389:[.695,.01,.527,{ic:.04}],390:[.717,.022,.703,{ic:.056}],391:[.917,.011,.703,{ic:.291}],392:[.671,.01,.562,{ic:.169}],393:[.694,0,.904,{ic:.034}],394:[.694,0,.964,{ic:.034}],395:[.694,0,.733,{ic:.085}],396:[.653,.01,.527,{ic:.104}],397:[.454,.278,.472,{ic:.046}],398:[.692,0,.642,{ic:.099}],399:[.717,.022,.758,{ic:.066}],400:[.717,.022,.611,{ic:.073}],401:[.692,.177,.611,{ic:.099}],402:[.664,.177,.316,{ic:.18}],403:[.917,.011,.703,{ic:.311}],404:[.681,.206,.685,{ic:.145}],405:[.653,.011,.805,{ic:.038}],406:[.694,.011,.278,{ic:.01}],407:[.694,0,.495,{ic:.05}],408:[.699,0,.795,{ic:.13}],409:[.717,0,.499,{ic:.084}],410:[.695,0,.428,{ic:.062}],411:[.722,0,.5,{ic:.052}],412:[.694,.005,.815,{ic:.09}],413:[.694,.175,.794,{ic:.055}],414:[.455,.194,.527,{ic:.031}],415:[.717,.022,.794,{ic:.037}],416:[.824,.022,.794,{ic:.142}],417:[.563,.01,.517,{ic:.182}],418:[.717,.194,1.026,{ic:.083}],419:[.46,.194,.741,{ic:.05}],420:[.694,0,.883,{ic:.052}],421:[.717,.157,.527,{ic:.13}],422:[.694,.192,.714,{ic:.057}],423:[.717,.022,.611,{ic:.064}],424:[.46,.01,.396,{ic:.047}],425:[.693,0,.794,{ic:.085}],426:[.717,.217,.419,{ic:.018}],427:[.571,.217,.347,{ic:.08}],428:[.689,0,.903,{ic:.105}],429:[.633,.01,.38,{ic:.134}],430:[.689,.177,.611,{ic:.227}],431:[.786,.022,.764,{ic:.194}],432:[.563,.011,.561,{ic:.176}],433:[.716,0,.794,{ic:.102}],434:[.694,.022,.718,{ic:.092}],435:[.706,0,.833,{ic:.125}],436:[.444,.167,.47,{ic:.078}],437:[.694,0,.672,{ic:.085}],438:[.444,0,.447,{ic:.059}],439:[.694,.022,.598,{ic:.111}],440:[.694,.022,.598,{ic:.114}],441:[.458,.205,.476,{ic:.062}],442:[.458,.206,.476,{ic:.06}],443:[.717,0,.55,{ic:.074}],444:[.694,.022,.62,{ic:.055}],445:[.459,.257,.62,{ic:.005}],446:[.571,.01,.47,{ic:.035}],447:[.487,.209,.5,{ic:.063}],448:[.694,.195,.306,{ic:.063}],449:[.694,.195,.5,{ic:.069}],450:[.694,.195,.614,{ic:.015}],451:[.694,0,.367,{ic:.029}],452:[.941,0,1.465,{ic:.085}],453:[.697,0,1.244,{ic:.1}],454:[.697,.011,1.037,{ic:.08}],455:[.694,.022,1.1,{ic:.055}],456:[.694,.178,.867,{ic:.086}],457:[.694,.178,.542,{ic:.086}],458:[.694,.022,1.313,{ic:.055}],459:[.694,.178,1.08,{ic:.086}],460:[.694,.178,.847,{ic:.086}],461:[.904,0,.733,{ic:.002}],462:[.697,.01,.493,{ic:.065}],463:[.904,0,.331,{ic:.203}],464:[.697,0,.256,{ic:.184}],465:[.904,.022,.794,{ic:.037}],466:[.697,.011,.55,{ic:.038}],467:[.904,.022,.764,{ic:.055}],468:[.697,.01,.527,{ic:.05}],469:[1.053,.022,.764,{ic:.076}],470:[.807,.01,.527,{ic:.112}],471:[1.074,.022,.764,{ic:.055}],472:[.828,.01,.527,{ic:.08}],473:[1.103,.022,.764,{ic:.055}],474:[.857,.01,.527,{ic:.084}],475:[1.097,.022,.764,{ic:.055}],476:[.876,.011,.561,{ic:.039}],477:[.46,.01,.48,{ic:.033}],478:[1.05,0,.733,{ic:.061}],479:[.798,.01,.493,{ic:.121}],480:[1.058,0,.733,{ic:.059}],481:[.787,.01,.493,{ic:.115}],482:[.888,0,.947,{ic:.085}],483:[.618,.01,.794],484:[.706,.011,.733,{ic:.055}],485:[.455,.18,.527,{ic:.04}],486:[.931,.011,.733,{ic:.055}],487:[.676,.18,.527,{ic:.048}],488:[.931,0,.764,{ic:.085}],489:[.916,0,.499,{ic:.052}],490:[.717,.227,.794,{ic:.077}],491:[.46,.22,.517,{ic:.05}],492:[.888,.227,.794,{ic:.077}],493:[.648,.22,.517,{ic:.071}],494:[.931,.022,.598,{ic:.111}],495:[.674,.205,.476,{ic:.072}],496:[.682,.178,.286,{ic:.171}],497:[.694,0,1.466,{ic:.085}],498:[.694,0,1.243,{ic:.059}],499:[.653,.01,.979,{ic:.059}],500:[.92,.011,.733,{ic:.055}],501:[.668,.18,.527,{ic:.046}],502:[.694,.011,1.045,{ic:.048}],503:[.697,.198,.71,{ic:.058}],504:[.9,0,.794,{ic:.055}],505:[.667,0,.527,{ic:.031}],506:[1.188,0,.733,{ic:.067}],507:[.928,.01,.493,{ic:.115}],508:[.92,0,.947,{ic:.085}],509:[.638,.01,.794],510:[.92,.061,.856,{ic:.036}],511:[.682,.095,.55,{ic:.017}],512:[.92,0,.733],513:[.709,.01,.493,{ic:.032}],514:[.925,0,.733,{ic:.014}],515:[.683,.01,.493,{ic:.072}],516:[.92,0,.642,{ic:.084}],517:[.709,.01,.48,{ic:.054}],518:[.925,0,.642,{ic:.084}],519:[.683,.01,.48,{ic:.077}],520:[.92,0,.331,{ic:.198}],521:[.708,0,.235,{ic:.134}],522:[.925,0,.331,{ic:.224}],523:[.682,0,.235,{ic:.206}],524:[.92,.022,.794,{ic:.077}],525:[.709,.01,.517,{ic:.05}],526:[.925,.022,.794,{ic:.077}],527:[.683,.01,.517,{ic:.051}],528:[.92,0,.703,{ic:.076}],529:[.709,0,.349,{ic:.102}],530:[.925,0,.703,{ic:.076}],531:[.683,0,.349,{ic:.175}],532:[.92,.022,.764,{ic:.055}],533:[.709,.01,.527,{ic:.037}],534:[.925,.022,.764,{ic:.055}],535:[.683,.01,.527,{ic:.057}],536:[.717,.334,.611,{ic:.045}],537:[.46,.305,.396,{ic:.052}],538:[.689,.305,.733,{ic:.105}],539:[.571,.305,.38,{ic:.047}],540:[.69,.054,.579,{ic:.04}],541:[.457,.197,.48,{ic:.024}],542:[.931,0,.794,{ic:.055}],543:[.916,0,.527,{ic:.031}],544:[.685,.196,.718,{ic:.074}],545:[.653,.157,.66],546:[.708,.011,.5,{ic:.113}],547:[.656,.011,.5,{ic:.108}],548:[.694,.192,.67,{ic:.087}],549:[.444,.192,.546],550:[.882,0,.733],551:[.625,.01,.493,{ic:.032}],552:[.692,.196,.642,{ic:.084}],553:[.46,.204,.48,{ic:.054}],554:[1.05,.022,.794,{ic:.077}],555:[.808,.01,.517,{ic:.096}],556:[1.102,.022,.794,{ic:.077}],557:[.868,.01,.517,{ic:.112}],558:[.882,.022,.794,{ic:.077}],559:[.625,.01,.517,{ic:.05}],560:[1.058,.022,.794,{ic:.077}],561:[.823,.01,.517,{ic:.113}],562:[.888,0,.733,{ic:.143}],563:[.641,.167,.47,{ic:.103}],564:[.653,.157,.24,{ic:.132}],565:[.455,.157,.661,{ic:.001}],566:[.571,.157,.38,{ic:.047}],568:[.674,.011,.888,{ic:.05}],569:[.454,.231,.888,{ic:.052}],570:[.806,.125,.733,{ic:.161}],571:[.806,.125,.733,{ic:.081}],572:[.596,.125,.459,{ic:.135}],573:[.694,0,.661],574:[.806,.125,.733,{ic:.131}],575:[.46,.206,.432,{ic:.016}],576:[.444,.19,.447,{ic:.059}],577:[.705,0,.55,{ic:.071}],578:[.465,0,.55,{ic:.02}],579:[.694,0,.763,{ic:.048}],580:[.694,.022,.824,{ic:.042}],581:[.694,0,.733],582:[.806,.125,.642,{ic:.162}],583:[.596,.125,.48,{ic:.114}],584:[.694,.022,.595,{ic:.05}],585:[.653,.167,.269,{ic:.094}],586:[.712,.215,.687,{ic:.032}],587:[.454,.218,.527,{ic:.051}],588:[.694,0,.753,{ic:.076}],589:[.454,0,.349,{ic:.082}],590:[.694,0,.733,{ic:.143}],591:[.444,.167,.47,{ic:.078}],11377:[.469,0,.562,{ic:.078}],7680:[.694,.3,.733],7681:[.46,.252,.493,{ic:.032}],7682:[.882,0,.733,{ic:.048}],7683:[.818,.01,.527,{ic:.04}],7684:[.694,.159,.733,{ic:.048}],7685:[.653,.176,.527,{ic:.04}],7686:[.694,.18,.733,{ic:.048}],7687:[.653,.178,.527,{ic:.04}],7688:[.92,.202,.703,{ic:.074}],7689:[.668,.214,.489,{ic:.079}],7690:[.882,0,.794,{ic:.053}],7691:[.818,.01,.527,{ic:.082}],7692:[.694,.154,.794,{ic:.053}],7693:[.653,.182,.527,{ic:.082}],7694:[.694,.175,.794,{ic:.053}],7695:[.653,.184,.527,{ic:.082}],7696:[.694,.197,.794,{ic:.053}],7697:[.653,.202,.527,{ic:.082}],7698:[.694,.216,.794,{ic:.053}],7699:[.653,.217,.527,{ic:.082}],7704:[.692,.179,.642,{ic:.084}],7705:[.46,.231,.48,{ic:.054}],7706:[.692,.227,.642,{ic:.084}],7707:[.46,.181,.48,{ic:.054}],7710:[.882,0,.611,{ic:.099}],7711:[.829,0,.316,{ic:.183}],7712:[.888,.011,.733,{ic:.055}],7713:[.648,.18,.527,{ic:.07}],7714:[.882,0,.794,{ic:.055}],7715:[.818,0,.527,{ic:.031}],7716:[.694,.156,.794,{ic:.055}],7717:[.653,.155,.527,{ic:.031}],7718:[.894,0,.794,{ic:.055}],7719:[.889,0,.527,{ic:.031}],7722:[.694,.226,.794,{ic:.055}],7723:[.653,.202,.527,{ic:.031}],7724:[.694,.227,.331,{ic:.055}],7725:[.653,.169,.24,{ic:.08}],7726:[1.082,0,.331,{ic:.265}],7727:[.828,0,.235,{ic:.251}],7728:[.92,0,.764,{ic:.085}],7729:[.909,0,.499,{ic:.052}],7730:[.694,.155,.764,{ic:.085}],7731:[.653,.156,.499,{ic:.052}],7732:[.694,.176,.764,{ic:.085}],7733:[.653,.158,.499,{ic:.052}],7734:[.694,.157,.581],7735:[.653,.16,.24,{ic:.08}],7736:[.867,.157,.581],7737:[.888,.16,.24,{ic:.296}],7738:[.694,.178,.581],7739:[.653,.162,.24,{ic:.08}],7740:[.694,.219,.581],7741:[.653,.222,.24,{ic:.08}],7742:[.92,0,.978,{ic:.054}],7743:[.668,0,.815,{ic:.03}],7744:[.882,0,.978,{ic:.054}],7745:[.625,0,.815,{ic:.03}],7746:[.694,.165,.978,{ic:.054}],7747:[.455,.159,.815,{ic:.03}],7748:[.882,0,.794,{ic:.055}],7749:[.625,0,.527,{ic:.031}],7750:[.694,.153,.794,{ic:.055}],7751:[.455,.153,.527,{ic:.031}],7752:[.694,.174,.794,{ic:.055}],7753:[.455,.155,.527,{ic:.031}],7754:[.694,.179,.794,{ic:.055}],7755:[.455,.215,.527,{ic:.031}],7764:[.92,0,.703,{ic:.052}],7765:[.668,.157,.527,{ic:.094}],7766:[.882,0,.703,{ic:.052}],7767:[.625,.157,.527,{ic:.04}],7768:[.882,0,.703,{ic:.076}],7769:[.625,0,.349,{ic:.082}],7770:[.694,.155,.703,{ic:.076}],7771:[.454,.167,.349,{ic:.082}],7772:[.888,.155,.703,{ic:.076}],7773:[.648,.167,.349,{ic:.193}],7774:[.694,.176,.703,{ic:.076}],7775:[.454,.169,.349,{ic:.082}],7776:[.882,.022,.611,{ic:.045}],7777:[.625,.01,.396,{ic:.052}],7778:[.717,.188,.611,{ic:.045}],7779:[.46,.159,.396,{ic:.052}],7784:[.882,.188,.611,{ic:.045}],7785:[.625,.159,.396,{ic:.052}],7786:[.882,0,.733,{ic:.105}],7787:[.736,.01,.38,{ic:.047}],7788:[.689,.159,.733,{ic:.105}],7789:[.571,.159,.38,{ic:.047}],7790:[.689,.18,.733,{ic:.105}],7791:[.571,.161,.38,{ic:.047}],7792:[.689,.179,.733,{ic:.105}],7793:[.571,.221,.38,{ic:.047}],7794:[.694,.225,.764,{ic:.055}],7795:[.444,.217,.527,{ic:.037}],7796:[.694,.249,.764,{ic:.055}],7797:[.444,.173,.527,{ic:.037}],7798:[.694,.201,.764,{ic:.055}],7799:[.444,.223,.527,{ic:.037}],7804:[.955,0,.733,{ic:.131}],7805:[.664,0,.47,{ic:.098}],7806:[.694,.199,.733,{ic:.131}],7807:[.444,.176,.47,{ic:.078}],7808:[.9,0,1.039,{ic:.131}],7809:[.667,0,.699,{ic:.079}],7810:[.92,0,1.039,{ic:.131}],7811:[.668,0,.699,{ic:.079}],7812:[.894,0,1.039,{ic:.131}],7813:[.65,0,.699,{ic:.079}],7814:[.882,0,1.039,{ic:.131}],7815:[.625,0,.699,{ic:.079}],7816:[.694,.153,1.039,{ic:.131}],7817:[.444,.158,.699,{ic:.079}],7818:[.882,0,.733,{ic:.085}],7819:[.625,0,.47,{ic:.076}],7820:[.894,0,.733,{ic:.085}],7821:[.652,0,.47,{ic:.076}],7822:[.882,0,.733,{ic:.143}],7823:[.625,.167,.47,{ic:.078}],7824:[.923,0,.672,{ic:.085}],7825:[.668,0,.447,{ic:.059}],7826:[.694,.161,.672,{ic:.085}],7827:[.444,.159,.447,{ic:.059}],7828:[.694,.182,.672,{ic:.085}],7829:[.444,.161,.447,{ic:.059}],7830:[.653,.157,.527,{ic:.031}],7831:[.82,.01,.38,{ic:.1}],7832:[.703,0,.699,{ic:.079}],7833:[.703,.167,.47,{ic:.078}],7835:[.829,0,.316,{ic:.183}],7838:[.706,.011,.647,{ic:.058}],7840:[.694,.155,.733],7841:[.46,.155,.493,{ic:.032}],7842:[1.003,0,.733],7843:[.785,.01,.493,{ic:.053}],7844:[1.122,0,.733,{ic:.052}],7845:[.858,.01,.493,{ic:.07}],7846:[1.102,0,.733],7847:[.897,.01,.493,{ic:.034}],7848:[.965,0,.733],7849:[1.015,.01,.493,{ic:.102}],7850:[1.157,0,.733,{ic:.072}],7851:[.856,.01,.493,{ic:.088}],7852:[.928,.155,.733,{ic:.008}],7853:[.668,.155,.493,{ic:.032}],7854:[1.12,0,.733,{ic:.051}],7855:[.868,.01,.493,{ic:.091}],7856:[1.1,0,.733,{ic:.031}],7857:[.914,.01,.493,{ic:.091}],7858:[.982,0,.733,{ic:.031}],7859:[1.032,.01,.493,{ic:.106}],7860:[1.155,0,.733,{ic:.071}],7861:[.866,.01,.493,{ic:.091}],7862:[.978,.155,.733,{ic:.051}],7863:[.692,.155,.493,{ic:.089}],7864:[.692,.157,.642,{ic:.084}],7865:[.46,.169,.48,{ic:.054}],7866:[1.003,0,.642,{ic:.084}],7867:[.785,.01,.48,{ic:.074}],7868:[.955,0,.642,{ic:.084}],7869:[.666,.01,.48,{ic:.083}],7870:[1.119,0,.642,{ic:.107}],7871:[.868,.01,.48,{ic:.107}],7872:[1.099,0,.642,{ic:.084}],7873:[.897,.01,.48,{ic:.054}],7874:[.965,0,.642,{ic:.084}],7875:[1.015,.01,.48,{ic:.107}],7876:[1.154,0,.642,{ic:.127}],7877:[.866,.01,.48,{ic:.126}],7878:[.923,.157,.642,{ic:.088}],7879:[.668,.169,.48,{ic:.054}],7880:[1.003,0,.331,{ic:.163}],7881:[.785,0,.235,{ic:.183}],7882:[.694,.159,.331,{ic:.055}],7883:[.653,.157,.24,{ic:.08}],7884:[.717,.198,.794,{ic:.077}],7885:[.46,.167,.517,{ic:.05}],7886:[1.003,.022,.794,{ic:.077}],7887:[.785,.01,.517,{ic:.05}],7888:[1.12,.022,.794,{ic:.077}],7889:[.87,.01,.517,{ic:.081}],7890:[1.1,.022,.794,{ic:.077}],7891:[.897,.01,.517,{ic:.05}],7892:[1.203,.022,.794,{ic:.077}],7893:[1.015,.01,.517,{ic:.081}],7894:[1.155,.022,.794,{ic:.077}],7895:[.868,.01,.517,{ic:.1}],7896:[.919,.198,.794,{ic:.077}],7897:[.668,.167,.517,{ic:.05}],7898:[.945,.022,.794,{ic:.142}],7899:[.668,.01,.517,{ic:.182}],7900:[.925,.022,.794,{ic:.142}],7901:[.71,.01,.517,{ic:.182}],7902:[1.028,.022,.794,{ic:.142}],7903:[.8,.01,.517,{ic:.182}],7904:[.98,.022,.794,{ic:.142}],7905:[.666,.01,.517,{ic:.182}],7906:[.824,.187,.794,{ic:.142}],7907:[.563,.167,.517,{ic:.182}],7908:[.694,.179,.764,{ic:.055}],7909:[.444,.161,.527,{ic:.037}],7910:[.973,.022,.764,{ic:.055}],7911:[.785,.01,.527,{ic:.037}],7912:[.923,.022,.764,{ic:.194}],7913:[.668,.011,.561,{ic:.176}],7914:[.903,.022,.764,{ic:.194}],7915:[.7,.011,.561,{ic:.176}],7916:[1.006,.022,.764,{ic:.194}],7917:[.812,.011,.561,{ic:.176}],7918:[.958,.022,.764,{ic:.194}],7919:[.666,.011,.561,{ic:.176}],7920:[.786,.185,.764,{ic:.194}],7921:[.563,.16,.561,{ic:.176}],7922:[.85,0,.733,{ic:.143}],7923:[.667,.167,.47,{ic:.078}],7924:[.694,.155,.733,{ic:.143}],7925:[.444,.287,.47,{ic:.078}],7926:[.953,0,.733,{ic:.143}],7927:[.785,.167,.47,{ic:.078}],7928:[.905,0,.733,{ic:.143}],7929:[.659,.167,.47,{ic:.098}]}}},"NCM"),{},["MJX-NCM-SSLIB"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/sans-serif-bi","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/cherokee.js 0000644 0001762 0000144 00000023226 15112352537 023103 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","cherokee",c({CH:{normal:{5024:[.683,0,.764],5025:[.683,.022,.736],5026:[.677,0,.722],5027:[.66,.011,.769],5028:[.705,.022,1.099],5029:[.657,0,.278],5030:[.705,.022,.651],5031:[.705,.022,.778],5032:[.683,0,.685],5033:[.683,.022,.75],5034:[.716,0,.75],5035:[.683,.022,.514],5036:[.68,0,.681],5037:[.683,.022,.954],5038:[.683,0,.681],5039:[.683,.022,.744],5040:[.683,0,.541],5041:[.68,0,.625],5042:[.683,.014,.902],5043:[.683,.022,1.028],5044:[.657,.011,.708],5045:[.673,.002,.595],5046:[.705,.022,.785,{ic:.036}],5047:[.683,0,.917],5048:[.673,.002,.725],5049:[.66,.022,1],5050:[.705,.022,1.101],5051:[.683,0,.75],5052:[.66,.012,.753],5053:[.683,.022,.75],5054:[.705,.022,.777],5055:[.683,.195,.705],5056:[.705,.022,.785],5057:[.683,.014,.818],5058:[.68,.003,.742],5059:[.683,0,.611],5060:[.696,.001,.649],5061:[.705,.022,1.178],5062:[.677,0,.722],5063:[.671,.011,.945],5064:[.683,.014,.902],5065:[.683,.022,1.278],5066:[.671,.011,.945],5067:[.702,.012,.53,{ic:.001}],5068:[.683,.022,.75],5069:[.671,.011,1.03],5070:[.677,0,.5],5071:[.683,0,.708],5072:[.683,0,.661],5073:[.707,.034,.8],5074:[.683,0,.778],5075:[.673,.002,.595],5076:[.683,.022,1.039],5077:[.705,.022,.676],5078:[.677,.011,.786],5079:[.683,.021,.658],5080:[.69,.021,.726],5081:[.683,.022,.75],5082:[.705,.022,.556],5083:[.683,.014,.997],5084:[.679,.011,.748],5085:[.682,0,.625],5086:[.683,0,.625],5087:[.705,.022,.722],5088:[.683,.022,.906],5089:[.683,.014,.902],5090:[.683,0,.681],5091:[.705,.022,.786],5092:[.685,.022,.924],5093:[.68,.003,.868],5094:[.683,0,.778],5095:[.686,.011,.562],5096:[.705,.023,.919],5097:[.705,.022,.931],5098:[.683,.014,1.078],5099:[.705,.022,.778],5100:[.683,.014,.894],5101:[.704,.011,.569],5102:[.666,.011,.562],5103:[.671,.011,.945],5104:[.705,.244,.67],5105:[.66,.012,.753],5106:[.676,.003,.742],5107:[.705,.022,.919],5108:[.683,0,.708],5109:[.705,.022,.789],5112:[.564,.195,.536],5113:[.528,.01,.602],5114:[.541,.002,.593],5115:[.564,.018,.735],5116:[.546,0,.566],5117:[.564,.018,.631]}},CHB:{bold:{5024:[.686,0,.882],5025:[.686,.011,.863],5026:[.675,0,.8],5027:[.661,.011,.769],5028:[.697,.011,1.154],5029:[.657,.001,.278],5030:[.697,.011,.741],5031:[.705,.022,.778],5032:[.686,0,.726],5033:[.686,.011,.869],5034:[.698,0,.869],5035:[.686,.011,.594],5036:[.68,0,.756],5037:[.686,.023,.986],5038:[.686,0,.726],5039:[.683,.084,.744],5040:[.686,0,.529],5041:[.68,0,.692],5042:[.683,.014,.954],5043:[.686,.008,1.189],5044:[.657,.011,.708],5045:[.697,0,.594],5046:[.697,.011,.846,{ic:.048}],5047:[.686,0,1.092],5048:[.697,0,.758],5049:[.661,.022,1],5050:[.697,.011,1.218],5051:[.686,0,.9],5052:[.661,.012,.753],5053:[.686,.011,.869],5054:[.697,.011,.894],5055:[.683,.195,.705],5056:[.697,.011,.904],5057:[.683,.083,.818],5058:[.68,0,.719],5059:[.686,0,.703],5060:[.696,.001,.649],5061:[.697,.011,1.258],5062:[.675,0,.767],5063:[.671,.011,.945],5064:[.683,.014,.802],5065:[.686,.008,1.282],5066:[.671,.011,.945],5067:[.702,.012,.53],5068:[.686,.002,.885],5069:[.671,.011,1.03],5070:[.656,0,.575],5071:[.686,0,.786],5072:[.686,0,.769],5073:[.689,.016,.8],5074:[.686,.002,.809,{ic:.049}],5075:[.686,.011,.636],5076:[.686,.008,1.231],5077:[.697,.011,.746],5078:[.675,.011,.826],5079:[.686,.023,.695],5080:[.675,.023,.846],5081:[.686,.008,.869],5082:[.697,.011,.639],5083:[.683,.014,.997],5084:[.679,.011,.748],5085:[.682,0,.692],5086:[.686,0,.692],5087:[.697,.011,.831],5088:[.686,.002,.885],5089:[.683,.014,.942],5090:[.686,0,.786],5091:[.697,.011,.889],5092:[.678,.022,1.016],5093:[.68,0,.887],5094:[.686,0,.901],5095:[.687,.011,.562],5096:[.697,.011,.993],5097:[.697,.014,.983],5098:[.683,.014,1.078],5099:[.697,.011,.894],5100:[.683,.014,.894],5101:[.704,.011,.569],5102:[.655,.011,.575],5103:[.671,.011,.945],5104:[.705,.245,.67],5105:[.661,.012,.753],5106:[.676,0,.719],5107:[.697,.011,.998],5108:[.686,0,.818],5109:[.705,.011,.904],5112:[.564,.197,.536],5113:[.529,.01,.602],5114:[.541,0,.591],5115:[.523,.007,.774],5116:[.516,0,.66],5117:[.53,.007,.722]}},CHI:{italic:{5024:[.683,0,.764,{ic:.023}],5025:[.683,.022,.736,{ic:.015}],5026:[.677,0,.722,{ic:.089}],5027:[.66,.011,.769,{ic:.026}],5028:[.705,.022,1.099,{ic:.062}],5029:[.657,0,.278,{ic:.043}],5030:[.705,.022,.651,{ic:.031}],5031:[.705,.022,.778,{ic:.024}],5032:[.683,0,.685,{ic:.047}],5033:[.684,.022,.75,{ic:.126}],5034:[.716,0,.75],5035:[.683,.022,.514,{ic:.096}],5036:[.68,0,.681,{ic:.06}],5037:[.683,.022,.954,{ic:.056}],5038:[.683,0,.681,{ic:.053}],5039:[.683,.028,.744,{ic:.032}],5040:[.683,0,.541,{ic:.051}],5041:[.68,0,.625,{ic:.075}],5042:[.683,.014,.902,{ic:.019}],5043:[.683,.022,1.028,{ic:.126}],5044:[.657,.011,.708,{ic:.08}],5045:[.673,.002,.595,{ic:.069}],5046:[.705,.022,.785,{ic:.03}],5047:[.683,0,.917,{ic:.108}],5048:[.673,.002,.725],5049:[.66,.022,1,{ic:.048}],5050:[.705,.022,1.101,{ic:.117}],5051:[.683,0,.75,{ic:.112}],5052:[.66,.012,.753,{ic:.012}],5053:[.683,.022,.75,{ic:.126}],5054:[.705,.022,.777,{ic:.024}],5055:[.683,.195,.705],5056:[.705,.022,.785,{ic:.03}],5057:[.683,.029,.818],5058:[.68,.003,.742],5059:[.683,0,.611,{ic:.089}],5060:[.696,.001,.649],5061:[.705,.022,1.178,{ic:.046}],5062:[.677,0,.722,{ic:.089}],5063:[.671,.011,.945,{ic:.036}],5064:[.683,.014,.902],5065:[.683,.022,1.278,{ic:.072}],5066:[.671,.011,.945,{ic:.036}],5067:[.702,.012,.53,{ic:.075}],5068:[.683,.022,.75,{ic:.112}],5069:[.671,.011,1.03,{ic:.036}],5070:[.677,0,.5,{ic:.015}],5071:[.683,0,.708],5072:[.683,0,.661,{ic:.019}],5073:[.713,.042,.8,{ic:.072}],5074:[.683,0,.778],5075:[.673,.002,.595,{ic:.011}],5076:[.683,.022,1.039,{ic:.126}],5077:[.705,.022,.676,{ic:.057}],5078:[.677,.011,.786,{ic:.025}],5079:[.683,.012,.658,{ic:.111}],5080:[.69,.012,.726,{ic:.1}],5081:[.683,.022,.75,{ic:.125}],5082:[.705,.022,.556,{ic:.065}],5083:[.683,.014,.997,{ic:.065}],5084:[.679,.011,.748,{ic:.001}],5085:[.682,0,.625,{ic:.013}],5086:[.683,0,.625,{ic:.013}],5087:[.705,.022,.722,{ic:.092}],5088:[.683,.022,.906,{ic:.113}],5089:[.683,.014,.902,{ic:.074}],5090:[.683,0,.681,{ic:.053}],5091:[.705,.022,.786,{ic:.056}],5092:[.685,.022,.924,{ic:.113}],5093:[.68,.003,.868,{ic:.03}],5094:[.684,0,.778,{ic:.09}],5095:[.686,.011,.562,{ic:.112}],5096:[.705,.023,.919,{ic:.085}],5097:[.705,.022,.931],5098:[.683,.014,1.078,{ic:.049}],5099:[.705,.022,.778,{ic:.04}],5100:[.683,.014,.894,{ic:.072}],5101:[.704,.011,.569,{ic:.058}],5102:[.666,.011,.562,{ic:.031}],5103:[.671,.011,.945,{ic:.036}],5104:[.705,.244,.67,{ic:.058}],5105:[.66,.012,.753,{ic:.013}],5106:[.676,.003,.742],5107:[.705,.022,.919,{ic:.087}],5108:[.683,0,.708,{ic:.028}],5109:[.705,.022,.789,{ic:.018}],5110:[.564,.195,.536,{ic:.044}],5111:[.528,.01,.602,{ic:.013}],5112:[.541,.002,.593],5113:[.564,.018,.735,{ic:.078}],5114:[.546,0,.566,{ic:.023}],5115:[.564,.018,.631,{ic:.008}]}},CHBI:{"bold-italic":{5024:[.683,0,.764,{ic:.054}],5025:[.683,.022,.736,{ic:.022}],5026:[.677,.001,.722,{ic:.088}],5027:[.661,.011,.769,{ic:.051}],5028:[.705,.022,1.099,{ic:.065}],5029:[.657,.001,.278,{ic:.055}],5030:[.706,.022,.651,{ic:.033}],5031:[.705,.022,.778,{ic:.058}],5032:[.685,.002,.685,{ic:.048}],5033:[.686,.022,.75,{ic:.127}],5034:[.716,.002,.75],5035:[.685,.022,.514,{ic:.096}],5036:[.68,0,.681,{ic:.061}],5037:[.685,.022,.954,{ic:.059}],5038:[.683,.002,.681,{ic:.07}],5039:[.683,.084,.744,{ic:.055}],5040:[.685,.002,.541,{ic:.054}],5041:[.68,0,.625,{ic:.076}],5042:[.683,.014,.902,{ic:.024}],5043:[.685,.022,1.028,{ic:.126}],5044:[.657,.011,.708,{ic:.085}],5045:[.673,.004,.595,{ic:.09}],5046:[.705,.022,.785,{ic:.112}],5047:[.683,.002,.917,{ic:.107}],5048:[.673,.004,.725,{ic:.003}],5049:[.661,.022,1,{ic:.058}],5050:[.705,.022,1.101,{ic:.118}],5051:[.685,.002,.75,{ic:.112}],5052:[.661,.012,.753,{ic:.038}],5053:[.684,.022,.75,{ic:.126}],5054:[.705,.022,.777,{ic:.059}],5055:[.683,.195,.705],5056:[.705,.022,.785,{ic:.033}],5057:[.683,.083,.818],5058:[.681,.004,.742],5059:[.683,0,.611,{ic:.087}],5060:[.696,.001,.649,{ic:.002}],5061:[.705,.022,1.178,{ic:.048}],5062:[.677,0,.722,{ic:.088}],5063:[.671,.011,.945,{ic:.071}],5064:[.683,.014,.902],5065:[.685,.022,1.278,{ic:.084}],5066:[.671,.011,.945,{ic:.071}],5067:[.702,.012,.53,{ic:.078}],5068:[.685,.022,.75,{ic:.111}],5069:[.671,.011,1.03,{ic:.071}],5070:[.677,.001,.5,{ic:.022}],5071:[.684,0,.708,{ic:.007}],5072:[.685,.002,.661,{ic:.03}],5073:[.752,.056,.8,{ic:.114}],5074:[.683,.002,.778],5075:[.675,.002,.595,{ic:.027}],5076:[.685,.022,1.039,{ic:.126}],5077:[.705,.022,.676,{ic:.06}],5078:[.677,.011,.786,{ic:.039}],5079:[.683,.023,.658,{ic:.11}],5080:[.69,.023,.726,{ic:.1}],5081:[.685,.022,.75,{ic:.125}],5082:[.706,.022,.556,{ic:.066}],5083:[.683,.014,.997,{ic:.083}],5084:[.679,.011,.748,{ic:.007}],5085:[.682,0,.625,{ic:.019}],5086:[.685,0,.625,{ic:.019}],5087:[.705,.022,.722,{ic:.091}],5088:[.684,.022,.906,{ic:.112}],5089:[.683,.014,.902,{ic:.077}],5090:[.683,.002,.681,{ic:.07}],5091:[.705,.022,.786,{ic:.058}],5092:[.685,.022,.924,{ic:.127}],5093:[.681,.004,.868,{ic:.05}],5094:[.685,.002,.778,{ic:.091}],5095:[.687,.011,.562,{ic:.111}],5096:[.705,.023,.919,{ic:.097}],5097:[.705,.022,.931],5098:[.683,.014,1.078,{ic:.066}],5099:[.705,.022,.778,{ic:.059}],5100:[.683,.014,.894,{ic:.081}],5101:[.704,.011,.569,{ic:.068}],5102:[.666,.011,.562,{ic:.043}],5103:[.671,.011,.945,{ic:.071}],5104:[.705,.245,.67,{ic:.077}],5105:[.661,.012,.753,{ic:.038}],5106:[.676,.004,.742,{ic:.003}],5107:[.705,.022,.919,{ic:.098}],5108:[.683,0,.708,{ic:.046}],5109:[.705,.022,.789,{ic:.028}],5110:[.564,.197,.536,{ic:.061}],5111:[.529,.01,.602,{ic:.03}],5112:[.541,.003,.593,{ic:.005}],5113:[.564,.018,.735,{ic:.069}],5114:[.546,0,.566,{ic:.037}],5115:[.564,.018,.631,{ic:.01}]}}},"NCM"),{},["MJX-NCM-CH","MJX-NCM-CHB","MJX-NCM-CHI","MJX-NCM-CHBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/cherokee","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/arabic.js 0000644 0001762 0000144 00000010345 15112352537 022535 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","arabic",c({AB:{normal:{126464:[.791,-.013,.21],126465:[.453,.07,.825,{ic:.061}],126466:[.518,.455,.864],126467:[.48,-.113,.348],126468:[.488,-.152,.279],126469:[.354,.186,.547],126470:[.583,.271,.656],126471:[.518,.455,.886],126472:[.851,-.075,.813],126473:[.555,.328,.833],126474:[.881,-.062,.65],126475:[.788,.158,.563,{ic:.018}],126476:[.466,.444,.442],126477:[.716,.044,.567,{ic:.025}],126478:[.35,.172,.806,{ic:.023}],126479:[.744,.446,.83,{ic:.13}],126480:[.76,-.078,1.008,{ic:.016}],126481:[.396,.186,1.057,{ic:.02}],126482:[.567,.137,.588,{ic:.019}],126483:[.36,.271,.625],126484:[.695,.172,.83,{ic:.017}],126485:[.537,-.078,.888,{ic:.026}],126486:[.65,-.078,.882,{ic:.022}],126487:[.819,.455,.911,{ic:.001}],126488:[.671,-.099,.385],126489:[.546,.216,1.047,{ic:.02}],126490:[.851,-.075,.789],126491:[.915,.457,.907,{ic:.107}],126492:[.453,-.078,.794],126493:[.492,.044,.567,{ic:.025}],126494:[.579,-.078,.871],126495:[.364,.137,.575,{ic:.036}],126496:[.589,-.15,.359],126497:[.488,.041,.279],126498:[.49,-.05,.793],126500:[.638,-.15,.586],126503:[.49,-.152,.743],126505:[.488,.04,.319],126506:[.964,-.152,.794],126507:[.961,-.148,.353],126508:[.529,-.152,.459],126509:[.704,-.152,.268],126510:[.434,-.152,.575],126511:[.632,-.146,.521,{ic:.041}],126512:[.828,-.15,.359],126513:[.433,-.1,.643],126514:[.846,-.15,.352],126516:[.733,-.152,.583],126517:[.697,-.152,.286],126518:[.799,-.152,.29],126519:[.757,-.152,.803],126521:[.624,-.1,.669],126523:[.859,-.146,.516,{ic:.046}],126530:[.548,.422,.792],126535:[.548,.422,.792],126537:[.555,.328,.947],126539:[.788,.158,.726],126541:[.567,.081,.715],126542:[.375,.154,.988],126543:[.744,.424,.785],126545:[.457,.125,1.23],126546:[.608,.123,.805],126548:[.679,.154,1.003],126551:[.794,.422,.776],126553:[.645,.135,1.226],126555:[.901,.424,.85],126557:[.462,.081,.723],126559:[.378,.123,.795],126561:[.93,-.031,.484],126562:[.936,-.129,.936],126564:[.936,-.225,.773],126567:[.936,-.225,.889],126568:[1.005,-.219,.865],126569:[.93,-.022,.511],126570:[1.034,-.219,1],126572:[.933,-.222,.655],126573:[.93,-.219,.448,{ic:.022}],126574:[.936,-.225,.771],126575:[.936,-.226,.718,{ic:.054}],126576:[.933,-.221,.502,{ic:.002}],126577:[.935,-.17,.858],126578:[.933,-.221,.527],126580:[.936,-.225,.778],126581:[.93,-.219,.52],126582:[.93,-.219,.507],126583:[.936,-.225,.947],126585:[.935,-.17,.863],126586:[1.005,-.219,.905],126587:[.936,-.226,.744,{ic:.028}],126588:[.93,-.219,.489],126590:[.933,-.221,.527],126591:[.456,.013,.905],126592:[.831,-.057,.29],126593:[.456,.139,.905],126594:[.518,.567,.823],126595:[.48,-.056,.355],126596:[.601,-.055,.668],126597:[.354,.238,.599],126598:[.547,.342,.59],126599:[.518,.567,.835],126600:[.885,-.003,.871],126601:[.555,.328,.795],126603:[.816,.208,.567],126604:[.436,.478,.363],126605:[.705,.118,.571],126606:[.35,.27,.826],126607:[.744,.551,.831],126608:[.731,.013,.937],126609:[.396,.281,1.054],126610:[.567,.231,.603],126611:[.36,.342,.59],126612:[.674,.27,.826],126613:[.583,.013,.905],126614:[.674,.013,.905],126615:[.831,.567,.823],126616:[.71,-.056,.355],126617:[.607,.281,1.054],126618:[.885,-.003,.811,{ic:.029}],126619:[.932,.551,.831],126625:[.453,.07,.825,{ic:.061}],126626:[.518,.455,.864],126627:[.48,-.113,.348],126629:[.354,.186,.547],126630:[.583,.271,.656],126631:[.518,.455,.886],126632:[.851,-.075,.813],126633:[.555,.328,.833],126635:[.788,.158,.563,{ic:.018}],126636:[.466,.444,.442],126637:[.716,.044,.567,{ic:.025}],126638:[.35,.172,.806,{ic:.023}],126639:[.744,.446,.83,{ic:.13}],126640:[.76,-.078,1.008,{ic:.016}],126641:[.396,.186,1.057,{ic:.02}],126642:[.567,.137,.588,{ic:.019}],126643:[.36,.271,.625],126644:[.695,.172,.83,{ic:.017}],126645:[.537,-.078,.888,{ic:.026}],126646:[.65,-.078,.882,{ic:.022}],126647:[.819,.455,.911,{ic:.001}],126648:[.671,-.113,.385],126649:[.546,.186,1.047,{ic:.03}],126650:[.851,-.075,.789],126651:[.915,.446,.907,{ic:.053}],126704:[.515,.012,1.368,{sk:-.058}],126705:[.509,.025,1.771]}},ABB:{bold:{}},ABI:{italic:{}},ABBI:{"bold-italic":{}}},"NCM"),{},["MJX-NCM-AB","MJX-NCM-ABB","MJX-NCM-ABI","MJX-NCM-ABBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/arabic","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/cyrillic-ss.js 0000644 0001762 0000144 00000062560 15112352537 023557 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","cyrillic-ss",c({CYSS:{"sans-serif":{1024:[.851,0,.597],1025:[.849,0,.597],1026:[.694,.022,.819],1027:[.851,0,.542],1028:[.716,.022,.639],1029:[.716,.022,.555],1030:[.695,0,.278],1031:[.849,0,.278,{ic:.003}],1032:[.694,.022,.472],1033:[.694,0,1.037],1034:[.694,0,1.021],1035:[.694,0,.764],1036:[.851,0,.694],1037:[.851,0,.694],1038:[.889,0,.667],1039:[.694,.195,.694],1040:[.694,0,.667],1041:[.694,0,.667],1042:[.694,0,.667],1043:[.694,0,.542],1044:[.694,.195,.728],1045:[.694,0,.597],1046:[.694,0,1.111],1047:[.716,.022,.611],1048:[.694,0,.694],1049:[.889,0,.694],1050:[.694,0,.694],1051:[.694,0,.711],1052:[.694,0,.875],1053:[.694,0,.694],1054:[.716,.022,.736],1055:[.694,0,.694],1056:[.694,0,.639],1057:[.716,.022,.639],1058:[.694,0,.68],1059:[.694,0,.667],1060:[.694,0,.833],1061:[.694,0,.667],1062:[.694,.195,.711],1063:[.694,0,.694],1064:[.694,0,1.083],1065:[.694,.195,1.1],1066:[.694,0,.868],1067:[.694,0,.889],1068:[.694,0,.667],1069:[.716,.022,.639],1070:[.716,.022,1.041],1071:[.694,0,.646],1072:[.461,.011,.48],1073:[.722,.011,.5],1074:[.445,0,.48],1075:[.445,0,.404],1076:[.445,.162,.539],1077:[.461,.011,.444],1078:[.445,0,.739],1079:[.461,.011,.444],1080:[.445,0,.537],1081:[.639,0,.537],1082:[.445,0,.489],1083:[.445,0,.528],1084:[.445,0,.669],1085:[.445,0,.517],1086:[.461,.011,.5],1087:[.445,0,.517],1088:[.455,.195,.517],1089:[.461,.011,.444],1090:[.445,0,.458],1091:[.445,.205,.461],1092:[.722,.195,.766],1093:[.445,0,.461,{ic:.004}],1094:[.445,.162,.548],1095:[.445,0,.537],1096:[.445,0,.766],1097:[.445,.162,.778],1098:[.445,0,.59],1099:[.445,0,.683],1100:[.445,0,.48],1101:[.461,.011,.444],1102:[.461,.011,.73],1103:[.445,0,.515],1104:[.64,.011,.444],1105:[.66,.011,.444],1106:[.722,.195,.489],1107:[.64,0,.39],1108:[.461,.011,.439],1109:[.461,.011,.383],1110:[.679,0,.239],1111:[.66,0,.239,{ic:.023}],1112:[.679,.205,.267],1113:[.445,0,.755],1114:[.445,0,.765],1115:[.722,0,.517],1116:[.64,0,.489],1117:[.64,0,.537],1118:[.639,.205,.461],1119:[.445,.162,.537],1120:[.716,.022,.916],1121:[.467,.022,.819],1122:[.75,0,.778],1123:[.639,0,.5],1124:[.716,.022,.944],1125:[.461,.011,.68],1126:[.694,0,.844],1127:[.445,0,.672],1128:[.694,0,1.177,{ic:.003}],1129:[.445,0,.936,{ic:.008}],1130:[.694,0,.944],1131:[.445,0,.794],1132:[.694,0,1.277],1133:[.445,0,1.086],1134:[.843,.205,.546],1135:[.553,.205,.435],1136:[.694,0,.778],1137:[.722,.195,.639],1138:[.716,.022,.736],1139:[.467,.022,.5],1140:[.694,0,.722],1141:[.455,0,.492],1142:[.851,0,.722],1143:[.64,0,.492],1146:[.757,.063,.944],1147:[.496,.046,.611],1148:[.911,.022,.916],1149:[.661,.022,.819],1150:[.889,.022,.916],1151:[.64,.022,.819],1152:[.716,.218,.639],1153:[.522,.205,.439],1154:[.212,.213,.389],1155:[.661,-.51,0,{dx:.001}],1156:[.661,-.467,0,{dx:.261}],1157:[.738,-.508,0,{dx:.265}],1158:[.738,-.508,0,{dx:.292}],1160:[.802,.302,0],1161:[.854,.354,0],1162:[.889,.195,.694],1163:[.639,.162,.537],1164:[.694,0,.778],1165:[.639,0,.5],1166:[.694,0,.639],1167:[.455,.195,.517,{ic:.028}],1168:[.889,0,.555],1169:[.545,0,.404],1170:[.694,0,.542],1171:[.445,0,.404],1172:[.694,.217,.708],1173:[.445,.205,.536],1174:[.694,.195,1.111],1175:[.445,.162,.739],1176:[.716,.217,.611],1177:[.461,.217,.444],1178:[.694,.195,.694],1179:[.445,.162,.489],1180:[.694,0,.798],1181:[.445,0,.621],1182:[.694,0,.694],1183:[.722,0,.517],1184:[.694,0,.896],1185:[.445,0,.598],1186:[.694,.195,.711],1187:[.445,.162,.548],1188:[.694,0,.896],1189:[.445,0,.647],1190:[.694,.217,1.041],1191:[.445,.205,.762],1192:[.716,.095,.778],1193:[.462,.094,.5],1194:[.716,.217,.639],1195:[.461,.217,.444],1196:[.694,.195,.68],1197:[.445,.162,.458],1198:[.694,0,.667],1199:[.445,.195,.461],1200:[.694,0,.667],1201:[.445,.195,.461],1202:[.694,.195,.667],1203:[.445,.162,.461],1204:[.694,.195,.912],1205:[.445,.162,.675],1206:[.694,.195,.711],1207:[.445,.162,.548],1208:[.694,0,.694],1209:[.445,0,.537],1210:[.694,0,.694],1211:[.722,0,.517],1212:[.716,.022,.794],1213:[.461,.011,.548],1214:[.716,.21,.794],1215:[.461,.212,.548],1216:[.694,0,.278],1217:[.889,0,1.111],1218:[.639,0,.739],1219:[.694,.217,.694],1220:[.445,.205,.517],1221:[.694,.195,.728],1222:[.445,.162,.539],1223:[.694,.217,.694],1224:[.445,.205,.537],1225:[.694,.195,.711],1226:[.445,.162,.548],1227:[.694,.195,.694],1228:[.445,.162,.537],1229:[.694,.195,.891],1230:[.445,.162,.68],1232:[.889,0,.667],1233:[.639,.011,.48],1234:[.849,0,.667],1235:[.66,.011,.48],1236:[.694,0,.861],1237:[.461,.011,.722],1238:[.889,0,.597],1239:[.639,.011,.444],1240:[.716,.022,.669],1241:[.455,.011,.458],1242:[.849,.022,.667],1243:[.66,.011,.458],1244:[.85,0,1.111],1245:[.66,0,.739],1246:[.849,.022,.611],1247:[.66,.011,.444],1248:[.694,.022,.546],1249:[.445,.205,.435],1250:[.85,0,.694],1251:[.682,0,.537],1252:[.849,0,.694],1253:[.66,0,.537],1254:[.849,.022,.736],1255:[.66,.011,.5],1256:[.716,.022,.736],1257:[.461,.011,.5],1258:[.849,.022,.736],1259:[.66,.011,.5],1260:[.849,.022,.639],1261:[.66,.011,.444],1262:[.85,0,.667],1263:[.682,.205,.461],1264:[.849,0,.667],1265:[.66,.205,.461],1266:[.851,0,.667],1267:[.64,.205,.461,{ic:.012}],1268:[.849,0,.694],1269:[.66,0,.537],1270:[.694,.195,.542],1271:[.445,.162,.404],1272:[.849,0,.889],1273:[.66,0,.683],1276:[.694,.217,.667],1277:[.445,.205,.461],1278:[.694,0,.667],1279:[.445,0,.461,{ic:.004}],1298:[.694,.217,.711],1299:[.445,.205,.528],1306:[.716,.125,.736],1307:[.455,.195,.517],1308:[.694,0,.944],1309:[.445,0,.683]}},CYSSB:{"bold-sans-serif":{1024:[.938,0,.642],1025:[.882,0,.642],1026:[.689,.022,.733,{ic:.113}],1027:[.938,0,.58],1028:[.717,.022,.703],1029:[.717,.022,.611],1030:[.694,0,.331],1031:[.871,0,.325,{ic:.025}],1032:[.694,.022,.519],1033:[.694,0,1.155],1034:[.694,0,1.115],1035:[.689,0,.834],1036:[.938,0,.764],1037:[.938,0,.764],1038:[.901,0,.733],1039:[.694,.195,.764],1040:[.694,0,.733],1041:[.694,0,.733],1042:[.694,0,.733],1043:[.694,0,.58],1044:[.694,.195,.844],1045:[.692,0,.642],1046:[.694,0,1.219],1047:[.717,.022,.672],1048:[.694,0,.734],1049:[.901,0,.734],1050:[.694,0,.764],1051:[.694,0,.755],1052:[.694,0,.978],1053:[.694,0,.764],1054:[.717,.022,.794],1055:[.691,0,.734],1056:[.694,0,.703],1057:[.706,.011,.703],1058:[.689,0,.733],1059:[.694,0,.733],1060:[.694,0,.794],1061:[.694,0,.733],1062:[.694,.195,.804],1063:[.694,0,.764],1064:[.694,0,1.197],1065:[.694,.195,1.347],1066:[.694,0,.943],1067:[.694,0,.978],1068:[.694,0,.733],1069:[.717,.022,.703],1070:[.717,.022,1.14],1071:[.694,0,.703],1072:[.46,.011,.525],1073:[.698,.011,.55],1074:[.443,0,.525],1075:[.444,0,.433],1076:[.443,.157,.636],1077:[.46,.011,.511],1078:[.445,.001,.805],1079:[.46,.011,.489],1080:[.443,0,.592],1081:[.651,0,.592],1082:[.443,0,.53],1083:[.443,0,.598],1084:[.443,0,.744],1085:[.443,0,.561],1086:[.46,.011,.55],1087:[.443,0,.561],1088:[.454,.188,.561],1089:[.46,.011,.489],1090:[.443,0,.489],1091:[.443,.199,.5],1092:[.699,.188,.836],1093:[.443,0,.5],1094:[.443,.157,.629],1095:[.443,0,.592],1096:[.443,0,.836],1097:[.443,.157,.873],1098:[.443,0,.642],1099:[.443,0,.744],1100:[.443,0,.525],1101:[.46,.011,.489],1102:[.46,.011,.8],1103:[.443,0,.555],1104:[.667,.011,.511],1105:[.656,.011,.511],1106:[.699,.192,.53],1107:[.652,0,.433],1108:[.46,.011,.483],1109:[.454,.011,.396],1110:[.632,0,.24],1111:[.63,0,.256,{ic:.032}],1112:[.632,.162,.269],1113:[.443,0,.853],1114:[.443,0,.846],1115:[.699,0,.561],1116:[.652,0,.53],1117:[.667,0,.592],1118:[.692,.199,.5],1119:[.443,.157,.592],1120:[.716,.022,1.008],1121:[.466,.021,.916],1122:[.75,0,.855],1123:[.68,0,.55],1124:[.717,.022,1.048],1125:[.46,.011,.745],1126:[.694,0,1.016],1127:[.443,0,.833],1128:[.694,0,1.393],1129:[.443,0,1.123],1130:[.693,0,1.121],1131:[.443,0,.866],1132:[.694,0,1.459],1133:[.443,0,1.187],1134:[.852,.209,.598],1135:[.557,.209,.476],1136:[.694,0,.855],1137:[.699,.189,.703],1138:[.717,.022,.794],1139:[.466,.021,.55],1140:[.694,0,.794],1141:[.454,0,.562],1142:[.927,0,.794],1143:[.663,0,.562],1146:[.775,.08,1.039],1147:[.515,.066,.672],1148:[.925,.022,1.008],1149:[.668,.021,.916],1150:[.903,.022,1.008],1151:[.646,.021,.916],1152:[.717,.224,.703],1153:[.506,.204,.483],1154:[.228,.233,.428],1155:[.689,-.528,0,{dx:.001}],1156:[.69,-.495,0,{dx:.287}],1157:[.752,-.527,0,{dx:.295}],1158:[.752,-.527,0,{dx:.318}],1160:[.835,.335,0],1161:[.94,.44,0],1162:[.91,.194,.764],1163:[.673,.162,.592],1164:[.695,0,.855],1165:[.668,0,.55],1166:[.694,0,.703],1167:[.469,.194,.561,{ic:.048}],1168:[.865,0,.596],1169:[.597,0,.433],1170:[.694,0,.58],1171:[.459,0,.433],1172:[.694,.217,.794],1173:[.458,.206,.586],1174:[.694,.195,1.219],1175:[.46,.161,.815],1176:[.717,.213,.672],1177:[.46,.206,.489],1178:[.694,.194,.764],1179:[.458,.162,.53],1180:[.694,0,.886],1181:[.458,0,.707],1182:[.694,0,.764],1183:[.722,0,.51],1184:[.694,0,.925],1185:[.46,0,.63],1186:[.694,.194,.764],1187:[.458,.162,.608],1188:[.694,0,.974],1189:[.459,0,.703],1190:[.691,.217,1.116],1191:[.458,.206,.838],1192:[.717,.101,.855],1193:[.46,.096,.55],1194:[.706,.213,.703],1195:[.46,.206,.489],1196:[.689,.194,.733],1197:[.458,.162,.489],1198:[.694,0,.733],1199:[.46,.194,.5],1200:[.694,0,.733],1201:[.46,.194,.5],1202:[.694,.194,.733],1203:[.458,.162,.504],1204:[.694,.194,1.011],1205:[.458,.162,.764],1206:[.694,.194,.804],1207:[.458,.162,.629],1208:[.694,0,.764],1209:[.458,0,.592],1210:[.694,0,.764],1211:[.722,0,.561],1212:[.717,.023,.882],1213:[.475,.011,.674],1214:[.717,.213,.882],1215:[.475,.213,.674],1216:[.694,0,.325],1217:[.929,0,1.219],1218:[.692,.001,.805],1219:[.694,.217,.764],1220:[.459,.206,.561],1221:[.694,.194,.844,{ic:.004}],1222:[.458,.162,.662],1223:[.694,.217,.764],1224:[.458,.206,.592],1225:[.694,.194,.804],1226:[.458,.162,.609],1227:[.694,.194,.764],1228:[.458,.162,.592],1229:[.694,.194,1.018],1230:[.458,.162,.782],1232:[.96,0,.733],1233:[.692,.011,.525],1234:[.881,0,.733],1235:[.634,.011,.525],1236:[.694,0,.947],1237:[.458,.01,.794],1238:[.929,0,.642],1239:[.692,.011,.511],1240:[.717,.022,.758],1241:[.454,.011,.504],1242:[.897,.022,.758],1243:[.634,.011,.504],1244:[.85,0,1.219],1245:[.638,.001,.805],1246:[.873,.022,.672],1247:[.634,.011,.489],1248:[.694,.022,.598],1249:[.458,.206,.476],1250:[.844,0,.734],1251:[.632,0,.592],1252:[.85,0,.734],1253:[.634,0,.592],1254:[.882,.022,.794],1255:[.635,.011,.55],1256:[.717,.022,.794],1257:[.46,.011,.55],1258:[.898,.022,.794],1259:[.643,.011,.55],1260:[.877,.022,.703],1261:[.634,.011,.489],1262:[.872,0,.733],1263:[.632,.199,.5],1264:[.878,0,.733],1265:[.634,.199,.5],1266:[.925,0,.733],1267:[.677,.199,.5],1268:[.85,0,.764],1269:[.634,0,.592],1270:[.694,.194,.58],1271:[.459,.161,.433],1272:[.85,0,.978],1273:[.634,0,.744],1276:[.694,.217,.733],1277:[.458,.206,.5],1278:[.694,0,.733],1279:[.458,0,.5],1298:[.694,.217,.755],1299:[.458,.206,.598],1306:[.717,.111,.794],1307:[.454,.157,.527],1308:[.694,0,1.039],1309:[.444,0,.699]}},CYSSI:{"sans-serif-italic":{1024:[.851,0,.597,{ic:.093}],1025:[.849,0,.597,{ic:.093}],1026:[.694,.022,.819,{ic:.032}],1027:[.851,0,.542,{ic:.105}],1028:[.716,.022,.639,{ic:.084}],1029:[.716,.022,.555,{ic:.052}],1030:[.694,0,.278,{ic:.054}],1031:[.849,0,.278,{ic:.183}],1032:[.694,.022,.472,{ic:.064}],1033:[.694,0,1.037],1034:[.694,0,1.021],1035:[.694,0,.764,{ic:.014}],1036:[.851,0,.694,{ic:.098}],1037:[.851,0,.694,{ic:.054}],1038:[.889,0,.667,{ic:.135}],1039:[.694,.195,.694,{ic:.054}],1040:[.694,0,.667],1041:[.694,0,.667,{ic:.035}],1042:[.694,0,.667,{ic:.028}],1043:[.694,0,.542,{ic:.105}],1044:[.694,.195,.728,{ic:.037}],1045:[.694,0,.597,{ic:.093}],1046:[.694,0,1.111,{ic:.097}],1047:[.716,.022,.611,{ic:.047}],1048:[.694,0,.694,{ic:.054}],1049:[.889,0,.694,{ic:.054}],1050:[.694,0,.694,{ic:.098}],1051:[.694,0,.711,{ic:.054}],1052:[.694,0,.875,{ic:.048}],1053:[.694,0,.694,{ic:.054}],1054:[.716,.022,.736,{ic:.027}],1055:[.694,0,.694,{ic:.054}],1056:[.694,0,.639,{ic:.052}],1057:[.716,.022,.639,{ic:.084}],1058:[.694,0,.68,{ic:.111}],1059:[.694,0,.667,{ic:.135}],1060:[.694,0,.833,{ic:.028}],1061:[.694,0,.667,{ic:.096}],1062:[.694,.195,.711,{ic:.037}],1063:[.694,0,.694,{ic:.053}],1064:[.694,0,1.083,{ic:.053}],1065:[.694,.195,1.1,{ic:.036}],1066:[.694,0,.868],1067:[.694,0,.889,{ic:.047}],1068:[.694,0,.667],1069:[.716,.022,.639,{ic:.016}],1070:[.716,.022,1.041,{ic:.027}],1071:[.694,0,.646,{ic:.051}],1072:[.461,.011,.48],1073:[.723,.011,.5,{ic:.085}],1074:[.445,0,.48,{ic:.017}],1075:[.445,0,.404,{ic:.07}],1076:[.445,.162,.539,{ic:.002}],1077:[.461,.011,.444,{ic:.028}],1078:[.445,0,.739,{ic:.061}],1079:[.461,.011,.444,{ic:.029}],1080:[.445,0,.537,{ic:.013}],1081:[.639,0,.537,{ic:.037}],1082:[.445,0,.489,{ic:.061}],1083:[.445,0,.528,{ic:.013}],1084:[.445,0,.669,{ic:.014}],1085:[.445,0,.517,{ic:.012}],1086:[.461,.011,.5,{ic:.021}],1087:[.445,0,.517,{ic:.012}],1088:[.455,.195,.517,{ic:.018}],1089:[.461,.011,.444,{ic:.056}],1090:[.445,0,.458,{ic:.07}],1091:[.445,.205,.461,{ic:.083}],1092:[.722,.195,.766,{ic:.019}],1093:[.445,0,.461,{ic:.083}],1094:[.445,.162,.548,{ic:.002}],1095:[.445,0,.537,{ic:.013}],1096:[.445,0,.766,{ic:.013}],1097:[.445,.162,.778,{ic:.001}],1098:[.445,0,.59],1099:[.445,0,.683,{ic:.013}],1100:[.445,0,.48],1101:[.461,.011,.444,{ic:.017}],1102:[.461,.011,.73,{ic:.022}],1103:[.445,0,.515,{ic:.013}],1104:[.64,.011,.444,{ic:.032}],1105:[.659,.011,.444,{ic:.06}],1106:[.722,.195,.489,{ic:.094}],1107:[.64,0,.39,{ic:.084}],1108:[.461,.011,.439,{ic:.055}],1109:[.461,.011,.383,{ic:.053}],1110:[.679,0,.239,{ic:.069}],1111:[.659,0,.239,{ic:.162}],1112:[.679,.205,.267,{ic:.064}],1113:[.445,0,.755],1114:[.445,0,.765],1115:[.722,0,.517,{ic:.011}],1116:[.64,0,.489,{ic:.061}],1117:[.64,0,.537,{ic:.013}],1118:[.639,.205,.461,{ic:.083}],1119:[.445,.162,.537,{ic:.013}],1120:[.716,.022,.916,{ic:.026}],1121:[.467,.022,.819],1122:[.75,0,.778],1123:[.639,0,.5],1124:[.716,.022,.944,{ic:.085}],1125:[.461,.011,.68,{ic:.051}],1126:[.694,0,.844],1127:[.445,0,.672],1128:[.694,0,1.177,{ic:.002}],1129:[.445,0,.936,{ic:.007}],1130:[.694,0,.944],1131:[.445,0,.794],1132:[.694,0,1.277],1133:[.445,0,1.086],1134:[.843,.205,.546,{ic:.091}],1135:[.553,.205,.435,{ic:.076}],1136:[.694,0,.778,{ic:.075}],1137:[.722,.195,.639,{ic:.068}],1138:[.716,.022,.736,{ic:.027}],1139:[.467,.022,.5,{ic:.021}],1140:[.694,0,.722,{ic:.12}],1141:[.455,0,.492,{ic:.077}],1142:[.851,0,.722,{ic:.12}],1143:[.64,0,.492,{ic:.077}],1146:[.757,.063,.944,{ic:.031}],1147:[.496,.046,.611,{ic:.024}],1148:[.911,.022,.916,{ic:.026}],1149:[.661,.022,.819],1150:[.889,.022,.916,{ic:.026}],1151:[.64,.022,.819],1152:[.716,.218,.639,{ic:.084}],1153:[.522,.205,.439,{ic:.066}],1154:[.212,.213,.389,{ic:.026}],1155:[.661,-.51,0,{dx:-.123}],1156:[.661,-.467,0,{dx:.151}],1157:[.738,-.508,0,{dx:.126}],1158:[.738,-.508,0,{dx:.154}],1160:[.802,.302,0],1161:[.854,.354,0],1162:[.889,.195,.694,{ic:.054}],1163:[.639,.162,.537,{ic:.037}],1164:[.694,0,.778],1165:[.639,0,.5],1166:[.694,0,.639,{ic:.052}],1167:[.455,.195,.517,{ic:.036}],1168:[.889,0,.555,{ic:.148}],1169:[.545,0,.404,{ic:.092}],1170:[.694,0,.542,{ic:.105}],1171:[.445,0,.404,{ic:.07}],1172:[.694,.217,.708],1173:[.445,.205,.536],1174:[.694,.195,1.111,{ic:.097}],1175:[.445,.162,.739,{ic:.061}],1176:[.716,.217,.611,{ic:.047}],1177:[.461,.217,.444,{ic:.029}],1178:[.694,.195,.694,{ic:.098}],1179:[.445,.162,.489,{ic:.061}],1180:[.694,0,.798,{ic:.099}],1181:[.445,0,.621,{ic:.061}],1182:[.694,0,.694,{ic:.098}],1183:[.722,0,.517,{ic:.061}],1184:[.694,0,.896,{ic:.097}],1185:[.445,0,.598,{ic:.062}],1186:[.694,.195,.711,{ic:.037}],1187:[.445,.162,.548,{ic:.002}],1188:[.694,0,.896,{ic:.111}],1189:[.445,0,.647,{ic:.07}],1190:[.694,.217,1.041],1191:[.445,.205,.762],1192:[.716,.095,.778,{ic:.023}],1193:[.461,.094,.5,{ic:.019}],1194:[.716,.217,.639,{ic:.084}],1195:[.461,.217,.444,{ic:.056}],1196:[.694,.195,.68,{ic:.111}],1197:[.445,.162,.458,{ic:.07}],1198:[.694,0,.667,{ic:.148}],1199:[.445,.195,.461,{ic:.094}],1200:[.694,0,.667,{ic:.148}],1201:[.445,.195,.461,{ic:.093}],1202:[.694,.195,.667,{ic:.096}],1203:[.445,.162,.461,{ic:.083}],1204:[.694,.195,.912,{ic:.037}],1205:[.445,.162,.675,{ic:.002}],1206:[.694,.195,.711,{ic:.036}],1207:[.445,.162,.548,{ic:.002}],1208:[.694,0,.694,{ic:.053}],1209:[.445,0,.537,{ic:.013}],1210:[.694,0,.694],1211:[.722,0,.517],1212:[.716,.022,.794,{ic:.062}],1213:[.461,.011,.548,{ic:.028}],1214:[.716,.21,.794,{ic:.062}],1215:[.461,.212,.548,{ic:.028}],1216:[.694,0,.278,{ic:.054}],1217:[.889,0,1.111,{ic:.097}],1218:[.639,0,.739,{ic:.061}],1219:[.694,.217,.694,{ic:.098}],1220:[.445,.205,.517,{ic:.061}],1221:[.694,.195,.728,{ic:.037}],1222:[.445,.162,.539,{ic:.001}],1223:[.694,.217,.694,{ic:.054}],1224:[.445,.206,.537,{ic:.013}],1225:[.694,.195,.711,{ic:.037}],1226:[.445,.162,.548,{ic:.002}],1227:[.694,.195,.694,{ic:.053}],1228:[.445,.162,.537,{ic:.013}],1229:[.694,.195,.891,{ic:.031}],1230:[.445,.162,.68,{ic:.003}],1232:[.889,0,.667,{ic:.018}],1233:[.639,.011,.48,{ic:.076}],1234:[.849,0,.667],1235:[.659,.011,.48,{ic:.052}],1236:[.694,0,.861,{ic:.092}],1237:[.461,.011,.722,{ic:.03}],1238:[.889,0,.597,{ic:.093}],1239:[.639,.011,.444,{ic:.084}],1240:[.716,.022,.669,{ic:.041}],1241:[.455,.011,.458,{ic:.018}],1242:[.849,.022,.667,{ic:.04}],1243:[.659,.011,.458,{ic:.053}],1244:[.849,0,1.111,{ic:.097}],1245:[.659,0,.739,{ic:.061}],1246:[.849,.022,.611,{ic:.047}],1247:[.659,.011,.444,{ic:.06}],1248:[.694,.022,.546,{ic:.113}],1249:[.445,.205,.435,{ic:.059}],1250:[.85,0,.694,{ic:.054}],1251:[.682,0,.537,{ic:.046}],1252:[.849,0,.694,{ic:.054}],1253:[.66,0,.537,{ic:.013}],1254:[.849,.022,.736,{ic:.027}],1255:[.659,.011,.5,{ic:.031}],1256:[.716,.022,.736,{ic:.027}],1257:[.461,.011,.5,{ic:.021}],1258:[.849,.022,.736,{ic:.027}],1259:[.659,.011,.5,{ic:.031}],1260:[.849,.022,.639,{ic:.016}],1261:[.659,.011,.444,{ic:.06}],1262:[.85,0,.667,{ic:.135}],1263:[.682,.205,.461,{ic:.086}],1264:[.849,0,.667,{ic:.135}],1265:[.66,.205,.461,{ic:.083}],1266:[.851,0,.667,{ic:.135}],1267:[.64,.205,.461,{ic:.15}],1268:[.849,0,.694,{ic:.053}],1269:[.659,0,.537,{ic:.013}],1270:[.694,.195,.542,{ic:.105}],1271:[.445,.162,.404,{ic:.07}],1272:[.85,0,.889,{ic:.047}],1273:[.66,0,.683,{ic:.013}],1276:[.694,.217,.667,{ic:.096}],1277:[.445,.205,.461,{ic:.083}],1278:[.694,0,.667,{ic:.096}],1279:[.445,0,.461,{ic:.083}],1298:[.694,.217,.711,{ic:.054}],1299:[.445,.206,.528,{ic:.013}],1306:[.716,.125,.736,{ic:.027}],1307:[.455,.195,.517,{ic:.015}],1308:[.694,0,.944,{ic:.135}],1309:[.445,0,.683,{ic:.083}]}},CYSSBI:{"sans-serif-bold-italic":{1024:[.938,0,.642,{ic:.084}],1025:[.882,0,.642,{ic:.084}],1026:[.689,.022,.733,{ic:.194}],1027:[.938,0,.58,{ic:.101}],1028:[.717,.022,.703,{ic:.082}],1029:[.717,.022,.611,{ic:.045}],1030:[.694,0,.331,{ic:.055}],1031:[.871,0,.325,{ic:.204}],1032:[.694,.022,.519,{ic:.055}],1033:[.694,0,1.155,{ic:.022}],1034:[.694,0,1.115,{ic:.018}],1035:[.689,0,.834,{ic:.032}],1036:[.938,0,.764,{ic:.085}],1037:[.938,0,.764,{ic:.085}],1038:[.901,0,.733,{ic:.13}],1039:[.694,.195,.764,{ic:.055}],1040:[.694,0,.733],1041:[.694,0,.733,{ic:.025}],1042:[.694,0,.733,{ic:.048}],1043:[.694,0,.58,{ic:.101}],1044:[.694,.195,.844,{ic:.016}],1045:[.692,0,.642,{ic:.084}],1046:[.694,0,1.219,{ic:.085}],1047:[.717,.022,.672,{ic:.074}],1048:[.694,0,.734,{ic:.085}],1049:[.901,0,.734,{ic:.085}],1050:[.694,0,.764,{ic:.085}],1051:[.694,0,.755,{ic:.104}],1052:[.694,0,.978,{ic:.054}],1053:[.694,0,.764,{ic:.055}],1054:[.717,.022,.794,{ic:.052}],1055:[.691,0,.734,{ic:.084}],1056:[.694,0,.703,{ic:.052}],1057:[.706,.011,.703,{ic:.073}],1058:[.689,0,.733,{ic:.105}],1059:[.694,0,.733,{ic:.13}],1060:[.694,0,.794,{ic:.043}],1061:[.694,0,.733,{ic:.085}],1062:[.694,.195,.804,{ic:.015}],1063:[.694,0,.764,{ic:.06}],1064:[.694,0,1.197,{ic:.065}],1065:[.694,.195,1.347],1066:[.694,0,.943,{ic:.017}],1067:[.694,0,.978,{ic:.058}],1068:[.694,0,.733,{ic:.017}],1069:[.717,.022,.703,{ic:.075}],1070:[.717,.022,1.14,{ic:.052}],1071:[.694,0,.703,{ic:.058}],1072:[.46,.011,.525,{ic:.008}],1073:[.698,.011,.55,{ic:.056}],1074:[.443,0,.525,{ic:.016}],1075:[.444,0,.433,{ic:.052}],1076:[.443,.157,.636],1077:[.46,.011,.511,{ic:.03}],1078:[.445,.001,.805,{ic:.054}],1079:[.46,.011,.489,{ic:.028}],1080:[.443,0,.592,{ic:.008}],1081:[.651,0,.592,{ic:.016}],1082:[.443,0,.53,{ic:.062}],1083:[.443,0,.598,{ic:.008}],1084:[.443,0,.744,{ic:.004}],1085:[.443,0,.561,{ic:.008}],1086:[.46,.011,.55,{ic:.033}],1087:[.443,0,.561,{ic:.008}],1088:[.454,.188,.561,{ic:.018}],1089:[.46,.011,.489,{ic:.038}],1090:[.443,0,.489,{ic:.05}],1091:[.443,.199,.5,{ic:.064}],1092:[.699,.188,.836,{ic:.026}],1093:[.443,0,.5,{ic:.059}],1094:[.443,.157,.629],1095:[.443,0,.592,{ic:.008}],1096:[.443,0,.836],1097:[.443,.157,.873],1098:[.443,0,.642],1099:[.443,0,.744,{ic:.003}],1100:[.443,0,.525],1101:[.46,.011,.489,{ic:.032}],1102:[.46,.011,.8,{ic:.024}],1103:[.443,0,.555,{ic:.017}],1104:[.667,.011,.511,{ic:.03}],1105:[.656,.011,.511,{ic:.057}],1106:[.699,.192,.53,{ic:.107}],1107:[.652,0,.433,{ic:.095}],1108:[.46,.011,.483,{ic:.035}],1109:[.454,.011,.396,{ic:.056}],1110:[.632,0,.24,{ic:.069}],1111:[.63,0,.256,{ic:.166}],1112:[.632,.162,.269,{ic:.069}],1113:[.443,0,.853],1114:[.443,0,.846],1115:[.699,0,.561,{ic:.022}],1116:[.652,0,.53,{ic:.062}],1117:[.667,0,.592,{ic:.008}],1118:[.692,.199,.5,{ic:.077}],1119:[.443,.157,.592,{ic:.008}],1120:[.716,.022,1.008,{ic:.071}],1121:[.466,.021,.916],1122:[.75,0,.855],1123:[.68,0,.55],1124:[.717,.022,1.048,{ic:.084}],1125:[.46,.011,.745,{ic:.023}],1126:[.694,0,1.016],1127:[.443,0,.833],1128:[.694,0,1.393],1129:[.443,0,1.123],1130:[.693,0,1.121],1131:[.443,0,.866],1132:[.694,0,1.459],1133:[.443,0,1.187],1134:[.852,.209,.598,{ic:.071}],1135:[.557,.209,.476,{ic:.028}],1136:[.694,0,.855,{ic:.065}],1137:[.699,.189,.703,{ic:.046}],1138:[.717,.022,.794,{ic:.052}],1139:[.466,.021,.55,{ic:.039}],1140:[.694,0,.794,{ic:.115}],1141:[.454,0,.562,{ic:.057}],1142:[.927,0,.794,{ic:.115}],1143:[.663,0,.562,{ic:.057}],1146:[.775,.08,1.039,{ic:.047}],1147:[.515,.066,.672,{ic:.028}],1148:[.925,.022,1.008,{ic:.07}],1149:[.668,.021,.916],1150:[.903,.022,1.008,{ic:.07}],1151:[.646,.021,.916],1152:[.717,.224,.703,{ic:.077}],1153:[.506,.204,.483,{ic:.052}],1154:[.228,.233,.428,{ic:.027}],1155:[.689,-.528,0,{dx:-.129}],1156:[.69,-.495,0,{dx:.172}],1157:[.752,-.527,0,{dx:.149}],1158:[.752,-.527,0,{dx:.18}],1160:[.835,.335,0],1161:[.94,.44,0],1162:[.91,.194,.764,{ic:.055}],1163:[.673,.162,.592,{ic:.037}],1164:[.695,0,.855],1165:[.668,0,.55],1166:[.694,0,.703,{ic:.052}],1167:[.469,.194,.561,{ic:.054}],1168:[.865,0,.596,{ic:.138}],1169:[.597,0,.433,{ic:.099}],1170:[.694,0,.58,{ic:.101}],1171:[.459,0,.433,{ic:.068}],1172:[.694,.217,.794,{ic:.015}],1173:[.458,.206,.586],1174:[.694,.195,1.219,{ic:.085}],1175:[.46,.161,.815,{ic:.072}],1176:[.717,.213,.672,{ic:.074}],1177:[.46,.206,.489,{ic:.028}],1178:[.694,.194,.764,{ic:.085}],1179:[.458,.162,.53,{ic:.081}],1180:[.694,0,.886,{ic:.12}],1181:[.458,0,.707,{ic:.054}],1182:[.694,0,.764,{ic:.115}],1183:[.722,0,.51,{ic:.051}],1184:[.694,0,.925,{ic:.115}],1185:[.46,0,.63,{ic:.051}],1186:[.694,.194,.764,{ic:.055}],1187:[.458,.162,.608],1188:[.694,0,.974,{ic:.106}],1189:[.459,0,.703,{ic:.077}],1190:[.691,.217,1.116,{ic:.074}],1191:[.458,.206,.838],1192:[.717,.101,.855,{ic:.024}],1193:[.46,.096,.55,{ic:.016}],1194:[.706,.213,.703,{ic:.073}],1195:[.46,.206,.489,{ic:.038}],1196:[.689,.194,.733,{ic:.105}],1197:[.458,.162,.489,{ic:.068}],1198:[.694,0,.733,{ic:.143}],1199:[.46,.194,.5,{ic:.097}],1200:[.694,0,.733,{ic:.143}],1201:[.46,.194,.5,{ic:.097}],1202:[.694,.194,.733,{ic:.085}],1203:[.458,.162,.504,{ic:.073}],1204:[.694,.194,1.011,{ic:.015}],1205:[.458,.162,.764],1206:[.694,.194,.804,{ic:.02}],1207:[.458,.162,.629],1208:[.694,0,.764,{ic:.06}],1209:[.458,0,.592,{ic:.028}],1210:[.694,0,.764],1211:[.722,0,.561,{ic:.039}],1212:[.717,.023,.882,{ic:.107}],1213:[.475,.011,.674,{ic:.047}],1214:[.717,.213,.882,{ic:.107}],1215:[.475,.213,.674,{ic:.047}],1216:[.694,0,.325,{ic:.061}],1217:[.929,0,1.219,{ic:.085}],1218:[.692,.001,.805,{ic:.054}],1219:[.694,.217,.764,{ic:.115}],1220:[.459,.206,.561,{ic:.089}],1221:[.694,.194,.844,{ic:.025}],1222:[.458,.162,.662,{ic:.003}],1223:[.694,.217,.764,{ic:.055}],1224:[.458,.206,.592,{ic:.028}],1225:[.694,.194,.804,{ic:.015}],1226:[.458,.162,.609,{ic:.006}],1227:[.694,.194,.764,{ic:.06}],1228:[.458,.162,.592,{ic:.028}],1229:[.694,.194,1.018,{ic:.014}],1230:[.458,.162,.782,{ic:.002}],1232:[.96,0,.733,{ic:.042}],1233:[.692,.011,.525,{ic:.065}],1234:[.881,0,.733],1235:[.634,.011,.525,{ic:.033}],1236:[.694,0,.947,{ic:.085}],1237:[.458,.01,.794],1238:[.929,0,.642,{ic:.115}],1239:[.692,.011,.511,{ic:.086}],1240:[.717,.022,.758,{ic:.066}],1241:[.454,.011,.504,{ic:.04}],1242:[.897,.022,.758,{ic:.066}],1243:[.634,.011,.504,{ic:.04}],1244:[.85,0,1.219,{ic:.085}],1245:[.638,.001,.805,{ic:.054}],1246:[.873,.022,.672,{ic:.074}],1247:[.634,.011,.489,{ic:.038}],1248:[.694,.022,.598,{ic:.112}],1249:[.458,.206,.476,{ic:.06}],1250:[.844,0,.734,{ic:.085}],1251:[.632,0,.592,{ic:.008}],1252:[.85,0,.734,{ic:.085}],1253:[.634,0,.592,{ic:.008}],1254:[.882,.022,.794,{ic:.052}],1255:[.635,.011,.55,{ic:.033}],1256:[.717,.022,.794,{ic:.052}],1257:[.46,.011,.55,{ic:.034}],1258:[.898,.022,.794,{ic:.052}],1259:[.643,.011,.55,{ic:.034}],1260:[.877,.022,.703,{ic:.075}],1261:[.634,.011,.489,{ic:.043}],1262:[.872,0,.733,{ic:.13}],1263:[.632,.199,.5,{ic:.08}],1264:[.878,0,.733,{ic:.13}],1265:[.634,.199,.5,{ic:.064}],1266:[.925,0,.733,{ic:.13}],1267:[.677,.199,.5,{ic:.091}],1268:[.85,0,.764,{ic:.06}],1269:[.634,0,.592,{ic:.008}],1270:[.694,.194,.58,{ic:.101}],1271:[.459,.161,.433,{ic:.068}],1272:[.85,0,.978,{ic:.058}],1273:[.634,0,.744,{ic:.003}],1276:[.694,.217,.733,{ic:.085}],1277:[.458,.206,.5,{ic:.077}],1278:[.694,0,.733,{ic:.085}],1279:[.458,0,.5,{ic:.077}],1298:[.694,.217,.755,{ic:.104}],1299:[.458,.206,.598,{ic:.028}],1306:[.717,.111,.794,{ic:.037}],1307:[.454,.157,.527,{ic:.039}],1308:[.694,0,1.039,{ic:.131}],1309:[.444,0,.699,{ic:.079}]}}},"NCM"),{},["MJX-NCM-CYSS","MJX-NCM-CYSSB","MJX-NCM-CYSSI","MJX-NCM-CYSSBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/cyrillic-ss","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/sans-serif-b.js 0000644 0001762 0000144 00000032304 15112352537 023604 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","sans-serif-b",c({SSLB:{"bold-sans-serif":{192:[.924,0,.733],193:[.912,0,.733],194:[.934,0,.733],195:[.884,0,.733],196:[.899,0,.733],197:[.953,0,.733],198:[.694,0,.947],199:[.706,.202,.703],200:[.924,0,.642],201:[.912,0,.642],202:[.934,0,.642],203:[.899,0,.642],204:[.924,0,.331],205:[.912,0,.331,{ic:.017}],206:[.934,0,.331,{ic:.017}],207:[.899,0,.331,{ic:.025}],208:[.694,0,.794],209:[.884,0,.794],210:[.924,.022,.794],211:[.912,.022,.794],212:[.934,.022,.794],213:[.884,.022,.794],214:[.899,.022,.794],216:[.756,.061,.856],217:[.924,.022,.764],218:[.912,.022,.764],219:[.934,.022,.764],220:[.899,.022,.764],221:[.912,0,.733],222:[.694,0,.642],223:[.706,.011,.565],224:[.667,.01,.493],225:[.668,.01,.493],226:[.69,.01,.493],227:[.64,.01,.493],228:[.655,.01,.493],229:[.709,.01,.493],230:[.46,.01,.794],231:[.475,.214,.489],232:[.667,.01,.48],233:[.668,.01,.48],234:[.69,.01,.48],235:[.655,.01,.48],236:[.673,0,.235],237:[.668,0,.235,{ic:.073}],238:[.69,0,.235,{ic:.073}],239:[.655,0,.235,{ic:.081}],241:[.64,0,.527],242:[.667,.01,.517],243:[.668,.01,.517],244:[.69,.01,.517],245:[.666,.01,.517],246:[.655,.01,.517],248:[.54,.095,.55],249:[.667,.01,.527],250:[.668,.01,.527],251:[.69,.01,.527],252:[.655,.01,.527],253:[.661,.167,.47],254:[.666,.186,.541],255:[.648,.167,.47],256:[.891,0,.733],257:[.647,.01,.493],258:[.951,0,.733],259:[.707,.01,.493],260:[.694,.213,.733],261:[.46,.219,.493,{ic:.016}],262:[.912,.011,.703],263:[.668,.01,.459],264:[.934,.011,.703],265:[.69,.01,.459],266:[.881,.011,.703],267:[.637,.01,.459],268:[.941,.011,.703],269:[.697,.01,.459],270:[.941,0,.794],271:[.754,.01,.527,{ic:.128}],272:[.694,0,.794],273:[.654,.01,.561],274:[.891,0,.642],275:[.647,.01,.48],276:[.951,0,.642],277:[.707,.01,.48],278:[.881,0,.642],279:[.637,.01,.48],280:[.692,.218,.642],281:[.46,.226,.48],282:[.941,0,.642],283:[.697,.01,.48],284:[.934,.011,.733],285:[.69,.18,.527],286:[.951,.011,.733],287:[.707,.18,.527],288:[.881,.011,.733],289:[.637,.18,.527],290:[.706,.331,.733],291:[.808,.18,.527],292:[.934,0,.794],293:[.93,0,.527],294:[.694,0,.853],295:[.673,0,.525],296:[.884,0,.331],297:[.639,0,.235,{ic:.036}],298:[.891,0,.331,{ic:.053}],299:[.646,0,.235,{ic:.09}],300:[.951,0,.331,{ic:.039}],301:[.706,0,.235,{ic:.076}],302:[.694,.215,.331,{ic:.033}],303:[.653,.216,.24,{ic:.043}],304:[.881,0,.331],306:[.694,.022,.798],307:[.653,.167,.507],308:[.934,.022,.519],309:[.696,.178,.286,{ic:.028}],310:[.694,.301,.764],311:[.653,.302,.499],312:[.444,0,.499],313:[.912,0,.581],314:[.908,0,.24,{ic:.072}],315:[.694,.303,.581],316:[.653,.306,.24],317:[.754,0,.581],318:[.754,0,.24,{ic:.135}],319:[.694,0,.581],320:[.653,0,.475],321:[.694,0,.675],322:[.653,0,.584],323:[.912,0,.794],324:[.668,0,.527],325:[.694,.299,.794],326:[.455,.299,.527],327:[.941,0,.794],328:[.697,0,.527],329:[.722,0,.682],330:[.716,.022,.794],331:[.455,.186,.543],332:[.891,.022,.794],333:[.647,.01,.517],334:[.951,.022,.794],335:[.707,.01,.517],336:[.937,.022,.794],337:[.693,.01,.517],338:[.717,.022,1.069],339:[.46,.01,.802],340:[.912,0,.703],341:[.668,0,.349,{ic:.022}],342:[.694,.301,.703],343:[.454,.313,.349],344:[.941,0,.703],345:[.697,0,.349,{ic:.02}],346:[.912,.022,.611],347:[.668,.01,.396],348:[.934,.022,.611],349:[.69,.01,.396],350:[.717,.207,.611],351:[.46,.193,.396],352:[.941,.022,.611],353:[.697,.01,.396],354:[.689,.187,.733],355:[.571,.193,.38],356:[.941,0,.733],357:[.794,.01,.38,{ic:.055}],358:[.689,0,.733],359:[.571,.01,.38],360:[.884,.022,.764],361:[.64,.01,.527],362:[.891,.022,.764],363:[.647,.01,.527],364:[.951,.022,.764],365:[.707,.01,.527],366:[.953,.022,.764],367:[.709,.01,.527],368:[.95,.022,.764],369:[.706,.01,.527],370:[.694,.234,.764],371:[.444,.218,.527,{ic:.017}],372:[.934,0,1.039],373:[.69,0,.699],374:[.934,0,.733],375:[.683,.167,.47],376:[.899,0,.733],377:[.912,0,.672],378:[.668,0,.447],379:[.881,0,.672],380:[.637,0,.447],381:[.941,0,.672],382:[.697,0,.447],383:[.664,0,.316,{ic:.041}],384:[.674,.011,.543],385:[.694,0,.903],386:[.694,0,.733],387:[.653,.01,.527],388:[.694,0,.733],389:[.695,.01,.527],390:[.717,.022,.703],391:[.917,.011,.703,{ic:.105}],392:[.671,.01,.562,{ic:.036}],393:[.694,0,.904],394:[.694,0,.964],395:[.694,0,.733],396:[.653,.01,.527],397:[.454,.278,.472],398:[.692,0,.642],399:[.717,.022,.758],400:[.717,.022,.611],401:[.692,.177,.611],402:[.664,.177,.316,{ic:.041}],403:[.917,.011,.703,{ic:.125}],404:[.681,.206,.685],405:[.653,.011,.805],406:[.694,.011,.278],407:[.694,0,.495],408:[.699,0,.795,{ic:.001}],409:[.717,0,.499],410:[.695,0,.428],411:[.722,0,.5],412:[.694,.005,.815],413:[.694,.175,.794],414:[.455,.194,.527],415:[.717,.022,.794],416:[.824,.022,.794],417:[.563,.01,.517,{ic:.062}],418:[.717,.194,1.026],419:[.46,.194,.741],420:[.694,0,.883],421:[.717,.157,.527],422:[.694,.192,.714,{ic:.066}],423:[.717,.022,.611],424:[.46,.01,.396],425:[.693,0,.794],426:[.717,.217,.419,{ic:.029}],427:[.571,.217,.347],428:[.689,0,.903],429:[.633,.01,.38,{ic:.009}],430:[.689,.177,.611,{ic:.081}],431:[.786,.022,.764,{ic:.027}],432:[.563,.011,.561,{ic:.057}],433:[.716,0,.794],434:[.694,.022,.718],435:[.706,0,.833,{ic:.006}],436:[.444,.167,.47],437:[.694,0,.672],438:[.444,0,.447],439:[.694,.022,.598],440:[.694,.022,.598],441:[.458,.205,.476],442:[.458,.206,.476,{ic:.003}],443:[.717,0,.55],444:[.694,.022,.62],445:[.459,.257,.62],446:[.571,.01,.47],447:[.487,.209,.5],448:[.694,.195,.306],449:[.694,.195,.5],450:[.694,.195,.614],451:[.694,0,.367],452:[.941,0,1.465],453:[.697,0,1.244],454:[.697,.011,1.037],455:[.694,.022,1.1],456:[.694,.178,.867],457:[.694,.178,.542],458:[.694,.022,1.313],459:[.694,.178,1.08],460:[.694,.178,.847],461:[.904,0,.733],462:[.697,.01,.493],463:[.904,0,.331,{ic:.014}],464:[.697,0,.256,{ic:.036}],465:[.904,.022,.794],466:[.697,.011,.55],467:[.904,.022,.764],468:[.697,.01,.527],469:[1.053,.022,.764],470:[.807,.01,.527],471:[1.074,.022,.764],472:[.828,.01,.527],473:[1.103,.022,.764],474:[.857,.01,.527],475:[1.097,.022,.764],476:[.876,.011,.561],477:[.46,.01,.48],478:[1.05,0,.733],479:[.798,.01,.493],480:[1.058,0,.733],481:[.787,.01,.493],482:[.888,0,.947],483:[.618,.01,.794],484:[.706,.011,.733],485:[.455,.18,.527],486:[.931,.011,.733],487:[.676,.18,.527],488:[.931,0,.764],489:[.916,0,.499],490:[.717,.227,.794],491:[.46,.22,.517],492:[.888,.227,.794],493:[.648,.22,.517],494:[.931,.022,.598],495:[.674,.205,.476],496:[.682,.178,.286,{ic:.027}],497:[.694,0,1.466],498:[.694,0,1.243],499:[.653,.01,.979],500:[.92,.011,.733],501:[.668,.18,.527],502:[.694,.011,1.045],503:[.697,.198,.71],504:[.9,0,.794],505:[.667,0,.527],506:[1.188,0,.733],507:[.928,.01,.493],508:[.92,0,.947],509:[.638,.01,.794],510:[.92,.061,.856],511:[.682,.095,.55],512:[.92,0,.733],513:[.709,.01,.493],514:[.925,0,.733],515:[.683,.01,.493],516:[.92,0,.642],517:[.709,.01,.48],518:[.925,0,.642],519:[.683,.01,.48],520:[.92,0,.331,{ic:.025}],521:[.708,0,.235,{ic:.023}],522:[.925,0,.331,{ic:.043}],523:[.682,0,.235,{ic:.077}],524:[.92,.022,.794],525:[.709,.01,.517],526:[.925,.022,.794],527:[.683,.01,.517],528:[.92,0,.703],529:[.709,0,.349],530:[.925,0,.703],531:[.683,0,.349,{ic:.045}],532:[.92,.022,.764],533:[.709,.01,.527],534:[.925,.022,.764],535:[.683,.01,.527],536:[.717,.334,.611],537:[.46,.305,.396],538:[.689,.305,.733],539:[.571,.305,.38],540:[.69,.054,.579],541:[.457,.197,.48],542:[.931,0,.794],543:[.916,0,.527],544:[.685,.196,.718],545:[.653,.157,.66],546:[.708,.011,.5],547:[.656,.011,.5],548:[.694,.192,.67],549:[.444,.192,.546],550:[.882,0,.733],551:[.625,.01,.493],552:[.692,.196,.642],553:[.46,.204,.48],554:[1.05,.022,.794],555:[.808,.01,.517],556:[1.102,.022,.794],557:[.868,.01,.517],558:[.882,.022,.794],559:[.625,.01,.517],560:[1.058,.022,.794],561:[.823,.01,.517],562:[.888,0,.733],563:[.641,.167,.47],564:[.653,.157,.24,{ic:.102}],565:[.455,.157,.661],566:[.571,.157,.38],568:[.674,.011,.888],569:[.454,.231,.888],570:[.806,.125,.733],571:[.806,.125,.733],572:[.596,.125,.459,{ic:.014}],573:[.694,0,.661],574:[.806,.125,.733],575:[.46,.206,.432],576:[.444,.19,.447],577:[.705,0,.55],578:[.465,0,.55],579:[.694,0,.763],580:[.694,.022,.824],581:[.694,0,.733],582:[.806,.125,.642],583:[.596,.125,.48],584:[.694,.022,.595],585:[.653,.167,.269,{ic:.034}],586:[.712,.215,.687,{ic:.059}],587:[.454,.218,.527,{ic:.091}],588:[.694,0,.753],589:[.454,0,.349],590:[.694,0,.733,{ic:.013}],591:[.444,.167,.47],11377:[.469,0,.562],7680:[.694,.3,.733],7681:[.46,.252,.493],7682:[.882,0,.733],7683:[.818,.01,.527],7684:[.694,.159,.733],7685:[.653,.176,.527],7686:[.694,.18,.733],7687:[.653,.178,.527],7688:[.92,.202,.703],7689:[.668,.214,.489],7690:[.882,0,.794],7691:[.818,.01,.527],7692:[.694,.154,.794],7693:[.653,.182,.527],7694:[.694,.175,.794],7695:[.653,.184,.527],7696:[.694,.197,.794],7697:[.653,.202,.527],7698:[.694,.216,.794],7699:[.653,.217,.527],7704:[.692,.179,.642],7705:[.46,.231,.48],7706:[.692,.227,.642],7707:[.46,.181,.48],7710:[.882,0,.611],7711:[.829,0,.316,{ic:.041}],7712:[.888,.011,.733],7713:[.648,.18,.527],7714:[.882,0,.794],7715:[.818,0,.527],7716:[.694,.156,.794],7717:[.653,.155,.527],7718:[.894,0,.794],7719:[.889,0,.527],7722:[.694,.226,.794],7723:[.653,.202,.527],7724:[.694,.227,.331,{ic:.017}],7725:[.653,.169,.24,{ic:.066}],7726:[1.082,0,.331,{ic:.035}],7727:[.828,0,.235,{ic:.081}],7728:[.92,0,.764],7729:[.909,0,.499],7730:[.694,.155,.764],7731:[.653,.156,.499],7732:[.694,.176,.764],7733:[.653,.158,.499],7734:[.694,.157,.581],7735:[.653,.16,.24],7736:[.867,.157,.581],7737:[.888,.16,.24,{ic:.107}],7738:[.694,.178,.581],7739:[.653,.162,.24,{ic:.061}],7740:[.694,.219,.581],7741:[.653,.222,.24,{ic:.047}],7742:[.92,0,.978],7743:[.668,0,.815],7744:[.882,0,.978],7745:[.625,0,.815],7746:[.694,.165,.978],7747:[.455,.159,.815],7748:[.882,0,.794],7749:[.625,0,.527],7750:[.694,.153,.794],7751:[.455,.153,.527],7752:[.694,.174,.794],7753:[.455,.155,.527],7754:[.694,.179,.794],7755:[.455,.215,.527],7764:[.92,0,.703],7765:[.668,.157,.527],7766:[.882,0,.703],7767:[.625,.157,.527],7768:[.882,0,.703],7769:[.625,0,.349],7770:[.694,.155,.703],7771:[.454,.167,.349],7772:[.888,.155,.703],7773:[.648,.167,.349,{ic:.055}],7774:[.694,.176,.703],7775:[.454,.169,.349],7776:[.882,.022,.611],7777:[.625,.01,.396],7778:[.717,.188,.611],7779:[.46,.159,.396],7784:[.882,.188,.611],7785:[.625,.159,.396],7786:[.882,0,.733],7787:[.736,.01,.38],7788:[.689,.159,.733],7789:[.571,.159,.38],7790:[.689,.18,.733],7791:[.571,.161,.38,{ic:.023}],7792:[.689,.179,.733],7793:[.571,.221,.38,{ic:.009}],7794:[.694,.225,.764],7795:[.444,.217,.527],7796:[.694,.249,.764],7797:[.444,.173,.527],7798:[.694,.201,.764],7799:[.444,.223,.527],7804:[.955,0,.733],7805:[.664,0,.47],7806:[.694,.199,.733],7807:[.444,.176,.47],7808:[.9,0,1.039],7809:[.667,0,.699],7810:[.92,0,1.039],7811:[.668,0,.699],7812:[.894,0,1.039],7813:[.65,0,.699],7814:[.882,0,1.039],7815:[.625,0,.699],7816:[.694,.153,1.039],7817:[.444,.158,.699],7818:[.882,0,.733],7819:[.625,0,.47],7820:[.894,0,.733],7821:[.652,0,.47],7822:[.882,0,.733],7823:[.625,.167,.47],7824:[.923,0,.672],7825:[.668,0,.447],7826:[.694,.161,.672],7827:[.444,.159,.447],7828:[.694,.182,.672],7829:[.444,.161,.447],7830:[.653,.157,.527],7831:[.82,.01,.38],7832:[.703,0,.699],7833:[.703,.167,.47],7835:[.829,0,.316,{ic:.041}],7838:[.706,.011,.647],7840:[.694,.155,.733],7841:[.46,.155,.493],7842:[1.003,0,.733],7843:[.785,.01,.493],7844:[1.122,0,.733],7845:[.858,.01,.493],7846:[1.102,0,.733],7847:[.897,.01,.493],7848:[.965,0,.733],7849:[1.015,.01,.493],7850:[1.157,0,.733],7851:[.856,.01,.493],7852:[.928,.155,.733],7853:[.668,.155,.493],7854:[1.12,0,.733],7855:[.868,.01,.493],7856:[1.1,0,.733],7857:[.914,.01,.493],7858:[.982,0,.733],7859:[1.032,.01,.493],7860:[1.155,0,.733],7861:[.866,.01,.493],7862:[.978,.155,.733],7863:[.692,.155,.493],7864:[.692,.157,.642],7865:[.46,.169,.48],7866:[1.003,0,.642],7867:[.785,.01,.48],7868:[.955,0,.642],7869:[.666,.01,.48],7870:[1.119,0,.642],7871:[.868,.01,.48],7872:[1.099,0,.642],7873:[.897,.01,.48],7874:[.965,0,.642],7875:[1.015,.01,.48],7876:[1.154,0,.642],7877:[.866,.01,.48],7878:[.923,.157,.642],7879:[.668,.169,.48],7880:[1.003,0,.331],7881:[.785,0,.235,{ic:.022}],7882:[.694,.159,.331],7883:[.653,.157,.24],7884:[.717,.198,.794],7885:[.46,.167,.517],7886:[1.003,.022,.794],7887:[.785,.01,.517],7888:[1.12,.022,.794],7889:[.87,.01,.517],7890:[1.1,.022,.794],7891:[.897,.01,.517],7892:[1.203,.022,.794],7893:[1.015,.01,.517],7894:[1.155,.022,.794],7895:[.868,.01,.517],7896:[.919,.198,.794],7897:[.668,.167,.517],7898:[.945,.022,.794],7899:[.668,.01,.517,{ic:.062}],7900:[.925,.022,.794],7901:[.71,.01,.517,{ic:.062}],7902:[1.028,.022,.794],7903:[.8,.01,.517,{ic:.062}],7904:[.98,.022,.794],7905:[.666,.01,.517,{ic:.062}],7906:[.824,.187,.794],7907:[.563,.167,.517,{ic:.062}],7908:[.694,.179,.764],7909:[.444,.161,.527],7910:[.973,.022,.764],7911:[.785,.01,.527],7912:[.923,.022,.764,{ic:.027}],7913:[.668,.011,.561,{ic:.057}],7914:[.903,.022,.764,{ic:.027}],7915:[.7,.011,.561,{ic:.057}],7916:[1.006,.022,.764,{ic:.027}],7917:[.812,.011,.561,{ic:.057}],7918:[.958,.022,.764,{ic:.027}],7919:[.666,.011,.561,{ic:.057}],7920:[.786,.185,.764,{ic:.027}],7921:[.563,.16,.561,{ic:.057}],7922:[.85,0,.733],7923:[.667,.167,.47],7924:[.694,.155,.733],7925:[.444,.287,.47],7926:[.953,0,.733],7927:[.785,.167,.47],7928:[.905,0,.733],7929:[.659,.167,.47]}}},"NCM"),{},["MJX-NCM-SSLB"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/sans-serif-b","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/monospace-ex.js 0000644 0001762 0000144 00000063461 15112352537 023721 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","monospace-ex",c({MX:{monospace:{161:[.389,.233,.525],162:[.524,.093,.525],164:[.475,-.137,.525],166:[.694,.083,.525],169:[.525,0,.525],170:[.622,-.237,.525],171:[.531,-.081,.525],173:[.341,-.271,.525],174:[.525,0,.525],186:[.622,-.237,.525],187:[.531,-.081,.525],188:[.626,.015,.525],189:[.626,.015,.525],190:[.626,.015,.525],191:[.389,.228,.525],3647:[.704,.093,.525],8218:[.092,.202,.525],8219:[.611,-.278,.525],8222:[.092,.202,.525],8223:[.611,-.347,.525],8226:[.372,-.096,.525],8233:[.611,.222,.525],8240:[.694,.083,.525],8241:[.694,.083,.525],8249:[.531,-.081,.525],8250:[.531,-.081,.525],8251:[.476,-.136,.525],8253:[.705,0,.525],8255:[.432,-.18,.525],8256:[.593,-.482,.901],8261:[.695,.087,.525],8262:[.695,.082,.525],8274:[.695,-.001,.525],8276:[-.111,.222,.901],8319:[.549,-.287,.525],8320:[.183,.083,.525],8353:[.704,.093,.525],8358:[.611,0,.525],8361:[.611,.008,.525],8363:[.611,.062,.525],8369:[.611,0,.525],8370:[.694,.083,.525],8451:[.623,.01,.525],8470:[.618,.005,.525,{ic:.002}],8471:[.525,0,.525],8478:[.611,.011,.525],8480:[.705,-.336,.525],8482:[.705,-.336,.525],8494:[.621,.005,.525],8960:[.531,-.081,.525],9250:[.611,.006,.525],9251:[.24,.132,.525],11800:[.388,.233,.525],64256:[.616,0,.525,{ic:.048}],64257:[.616,0,.525],64258:[.616,0,.525],64259:[.616,0,.525,{ic:.004}],64260:[.616,0,.525,{ic:.004}],64261:[0,0,.525],64262:[0,0,.525],65126:[.316,-.105,.525],184:[.045,.208,.525],688:[.716,-.288,.525],689:[.719,-.287,.525],690:[.733,-.15,.525],691:[.592,-.286,.525],692:[.545,-.24,.525],693:[.545,-.085,.525],694:[.593,-.286,.525],695:[.588,-.284,.525],696:[.545,-.084,.525],697:[.611,-.473,.525],698:[.611,-.479,.525],699:[.68,-.372,.525],700:[.611,-.278,.525],701:[.611,-.303,.525],702:[.555,-.223,.525],703:[.555,-.223,.525],704:[.7,-.343,.525],705:[.7,-.344,.525],706:[.642,-.453,.525],707:[.642,-.453,.525],708:[.624,-.487,.525],709:[.623,-.486,.525],712:[.611,-.378,.525],716:[.011,.222,.525],718:[-.029,.162,.525],719:[-.029,.162,.525],720:[.436,.006,.525],721:[.436,-.27,.525],722:[.414,-.138,.525],723:[.414,-.138,.525],724:[.294,-.056,.525],725:[.295,-.057,.525],726:[.294,0,.525],727:[.308,-.123,.525],731:[.012,.203,.525],733:[.638,-.485,.525],734:[.437,-.191,.525],735:[.6,-.467,.525],736:[.545,-.147,.525],737:[.654,-.287,.525],738:[.551,-.283,.525],739:[.545,-.287,.525],740:[.658,-.287,.525],741:[.646,.034,.525,{ic:.035}],742:[.646,.034,.525,{ic:.035}],743:[.646,.034,.525,{ic:.035}],744:[.646,.034,.525,{ic:.035}],745:[.646,.035,.525,{ic:.035}],746:[.646,-.226,.525,{ic:.019}],747:[.646,.034,.525,{ic:.019}],748:[-.027,.164,.525],749:[.687,-.514,.525],750:[.611,-.278,.525],751:[-.03,.19,.525],752:[-.03,.19,.525],753:[-.03,.219,.525],754:[-.03,.219,.525],755:[-.029,.209,.525],756:[.291,-.158,.525],757:[.308,-.155,.525],758:[.288,-.135,.525],759:[-.031,.151,.525],760:[.431,-.11,.525],761:[.6,-.367,.525],762:[.6,-.367,.525],763:[.134,.099,.525],764:[.134,.099,.525],765:[.134,.099,.525],766:[.134,.099,.525],777:[.67,-.44,0,{dx:.263}],779:[.638,-.485,0,{dx:.262}],781:[.629,-.483,.525],782:[.629,-.483,.525],783:[.626,-.485,0,{dx:.261}],784:[.699,-.499,.412],785:[.612,-.499,0,{dx:.262}],786:[.68,-.372,.525],787:[.639,-.485,.525],788:[.639,-.485,.525],789:[.733,-.4,.525],790:[-.048,.182,.272],791:[-.048,.182,.272],792:[-.059,.353,.525],793:[-.059,.353,.525],794:[.72,-.487,.165,{ic:.034}],795:[.611,-.278,.525],796:[-.044,.32,.525],797:[-.059,.297,.525],798:[-.059,.297,.525],799:[-.059,.353,.525],800:[-.062,.247,.525],801:[.034,.227,.525],802:[.034,.228,.525],803:[-.1,.2,0,{dx:.262}],804:[-.061,.161,.525],805:[-.029,.209,.525],806:[-.033,.231,0,{dx:.263}],807:[.057,.208,.525],808:[.056,.192,.525],809:[-.059,.292,.525],810:[-.127,.333,.525],811:[-.125,.342,.525],812:[-.064,.219,.525],813:[-.064,.22,.525],814:[-.093,.206,0,{dx:.262}],815:[-.093,.206,0,{dx:.262}],816:[-.09,.21,0,{dx:.262}],817:[-.118,.181,0,{dx:.262}],818:[-.118,.181,0,{dx:.262}],819:[-.031,.201,0,{dx:.262}],820:[.305,-.185,.525],821:[.267,-.207,.525],822:[.267,-.207,.525],823:[.384,-.111,.525],825:[-.044,.32,.525],826:[-.128,.333,.525],827:[-.127,.363,.525],828:[-.122,.297,.525],829:[.6,-.467,.525],830:[.812,-.462,.525],831:[.672,-.462,.525],832:[.622,-.488,.272],833:[.622,-.488,.272],834:[.639,-.528,.525],835:[.639,-.485,.525],836:[.612,-.467,.525],837:[-.054,.184,.525],838:[.654,-.448,.525],839:[-.063,.274,.525],840:[-.126,.272,.525],841:[-.06,.293,.525],842:[.699,-.402,.525],843:[.698,-.405,.525],844:[.732,-.462,.525],845:[-.008,.359,.525],846:[-.014,.352,.525],847:[0,0,0],848:[.813,-.462,.525],849:[.651,-.471,.525],850:[.699,-.499,.412],851:[-.086,.327,.525],852:[-.027,.378,.525],853:[-.027,.378,.525],854:[-.027,.378,.525],855:[.651,-.471,.525],856:[.605,-.505,0,{dx:.062}],857:[-.031,.256,.525],858:[-.028,.209,.525],859:[.763,-.366,.525],860:[-.124,.388,.525],861:[.707,-.443,.525],862:[.637,-.573,.5],863:[-.113,.177,0,{dx:-.001}],864:[.653,-.518,.525],865:[.707,-.443,.525],866:[-.008,.359,.525],867:[.692,-.46,.525],868:[.694,-.462,.525],869:[.776,-.463,.525],870:[.693,-.461,.525],871:[.687,-.458,.525],872:[.695,-.463,.525],873:[.779,-.46,.525],874:[.779,-.464,.525],875:[.692,-.463,.525],876:[.691,-.462,.525],877:[.749,-.459,.525],878:[.689,-.462,.525],879:[.688,-.463,.525],7620:[.611,-.444,.525],7621:[.611,-.444,.525],7624:[.611,-.477,.525],7625:[.611,-.477,.525],9472:[.31,-.24,.525],9474:[.837,.355,.525],9484:[.31,.355,.525],9488:[.31,.355,.525],9492:[.837,-.24,.525],9496:[.837,-.24,.525],9500:[.837,.355,.525],9508:[.837,.355,.525],9516:[.31,.355,.525],9524:[.837,-.24,.525],9532:[.837,.355,.525],9552:[.39,-.16,.525],9553:[.837,.355,.525],9554:[.39,.355,.525],9555:[.31,.355,.525],9556:[.39,.355,.525],9557:[.39,.355,.525],9558:[.31,.355,.525],9559:[.39,.355,.525],9560:[.837,-.16,.525],9561:[.837,-.24,.525],9562:[.837,-.16,.525],9563:[.837,-.16,.525],9564:[.837,-.24,.525],9565:[.837,-.16,.525],9566:[.837,.355,.525],9567:[.837,.355,.525],9568:[.837,.355,.525],9569:[.837,.355,.525],9570:[.837,.355,.525],9571:[.837,.355,.525],9572:[.39,.355,.525],9573:[.31,.355,.525],9574:[.39,.355,.525],9575:[.837,-.16,.525],9576:[.837,-.24,.525],9577:[.837,-.16,.525],9578:[.837,.355,.525],9579:[.837,.355,.525],9773:[.593,.001,.525],9792:[.442,.233,.525],9834:[.612,.04,.642],9901:[.523,-.091,.525,{ic:.09}],9902:[.679,.065,.525,{ic:.206}],9906:[.442,.233,.525],10013:[.548,.018,.525],59908:[.766,-.499,.525],59909:[-.093,.206,.525],59910:[-.093,.206,.525],59913:[.766,-.499,.525],59915:[.842,-.499,.525],59917:[.612,-.499,.525],59920:[.772,-.499,.525],59927:[.743,-.487,.525],59930:[.743,-.487,.525],59932:[.819,-.487,.525],59934:[.749,-.487,.525],59935:[-.033,.231,.525],59942:[.626,-.485,.525],59946:[.807,-.51,.525],59948:[.766,-.51,.525],59951:[.807,-.51,.525],59957:[.67,-.44,.525],59962:[-.118,.181,.525],59966:[-.118,.181,.525],59970:[.79,-.492,.525],59973:[-.09,.21,.525],60163:[.807,.203,.525],60164:[.622,.203,.525],60168:[.525,0,.525],60175:[.525,0,.525],60176:[0,0,0],60177:[0,0,0],60178:[0,0,0],60182:[.549,.017,.525],60185:[-.1,.2,.525],60190:[.807,.203,.525],60191:[.622,.203,.525],60201:[.389,.316,.525],60203:[.704,.093,.525],60209:[.432,-.18,.525],60213:[.807,.203,.525],60214:[.622,.203,.525],60218:[.807,.011,.525],60219:[.622,.228,.525],60224:[.635,.021,.525,{ic:.032}],60232:[.807,.203,.525],60233:[.622,.203,.525],60237:[.183,.083,.525],60259:[.639,-.443,.525,{ic:.164}],60261:[.593,-.482,.525,{ic:.149}],60270:[.611,.206,.525],60271:[.431,.206,.525],60424:[.783,0,.525],60425:[.783,0,.525],60426:[.783,0,.525],60427:[.783,0,.525],60428:[.783,0,.525],60429:[.725,.006,.525],60430:[.753,0,.525],60432:[.775,.163,.525],60433:[.594,.163,.525],61699:[.622,.011,.525],61700:[.297,-.235,.525],61705:[.123,0,.525],61719:[.384,-.111,.525],61720:[.654,.014,.525],61721:[.644,.008,.525],61722:[.611,.227,.525],61723:[.43,.227,.525],61724:[.611,.166,.525],61725:[.611,.166,.525],61726:[.611,.166,.525],61729:[.43,.138,.525],61730:[.43,.138,.525],61731:[.436,.355,.525],61734:[.611,.166,.525],61735:[.622,.011,.525],61736:[.43,.138,.525],61737:[.439,.005,.525],61738:[.611,.227,.525],61739:[.611,.227,.525],61740:[.43,.227,.525],61741:[.436,.361,.525],61743:[.603,.14,.525],61747:[.651,0,.525],61748:[.782,0,.525],61749:[.436,.005,.525,{ic:.001}],61750:[.638,.005,.525],61751:[-.001,.314,.525],61752:[0,.225,.525,{ic:.001}],61757:[.639,-.48,.525],61761:[.61,-.477,.525],61762:[.61,-.477,.525],61763:[.294,0,.525],61764:[.294,0,.525],61765:[.611,-.354,.525],61766:[.586,-.358,.525],61771:[.035,.035,.525,{ic:.035}],61772:[.187,.034,.525,{ic:.035}],61773:[.34,.034,.525,{ic:.035}],61774:[.493,.034,.525,{ic:.035}],61775:[.646,.034,.525,{ic:.035}],61776:[.187,.034,.525,{ic:.035}],61777:[.34,.034,.525,{ic:.035}],61778:[.493,.034,.525,{ic:.035}],61779:[.646,.034,.525,{ic:.035}],61780:[.035,.035,.525,{ic:.035}],61781:[.187,.034,.525,{ic:.035}],61782:[.34,.034,.525,{ic:.035}],61783:[.493,.034,.525,{ic:.035}],61784:[.646,.034,.525,{ic:.035}],61785:[.187,.034,.525,{ic:.035}],61786:[.34,.034,.525,{ic:.035}],61787:[.493,.034,.525,{ic:.035}],61788:[.646,.034,.525,{ic:.035}],61791:[.611,-.444,.525],61792:[.611,-.444,.525],61793:[.611,-.477,.525],61794:[.611,-.477,.525],61795:[.611,-.478,.525],61796:[.611,-.478,.525],61797:[.436,.222,.525],61800:[.439,.008,.525],61804:[.431,.227,.525],61805:[.03,.228,.525],61806:[.12,.228,.525],61807:[.12,.228,.525],61808:[.12,.228,.525],61809:[.606,-.43,.525],61810:[.807,-.457,.525],61813:[.436,.005,.525],61817:[.62,.229,.525],61818:[.439,.229,.525],61819:[.611,.005,.525],61822:[.436,.228,.525],61823:[.436,.227,.525],61824:[.617,.227,.525,{ic:.052}],61826:[.611,.227,.525],61828:[.611,0,.525,{ic:.004}],61829:[.436,0,.525],61832:[.436,.028,.525],61833:[.436,.227,.525],61834:[.554,.005,.525],61835:[.436,.262,.525],61836:[.43,.192,.525],61837:[.442,.192,.525],61838:[.611,.065,.525],61839:[.611,.005,.525],61842:[.611,0,.525],61850:[.43,.009,.525],61854:[.43,0,.525],61855:[.43,0,.525],61857:[.439,0,.525],61859:[.629,-.483,.525],61860:[.629,-.483,.525],61863:[.034,.227,.525],61864:[.034,.228,.525],61865:[-.127,.333,.525],61866:[-.125,.342,.525],61867:[.267,-.207,.525],61868:[.384,-.111,.525],61869:[-.128,.333,.525],61870:[-.127,.363,.525],61871:[-.122,.297,.525],61872:[-.008,.359,.525],61873:[.65,-.442,.525,{ic:.028}],61874:[.622,-.483,.525],61875:[.622,-.483,.525],61876:[.758,.286,.525,{ic:.127}],61877:[.854,.382,.525,{ic:.206}],62082:[.088,0,.525],62083:[.727,-.496,.525],62110:[.649,-.484,.525],62113:[.611,.011,.525],62116:[.611,0,.525],62119:[.611,0,.525],62120:[.611,.166,.525],62121:[.431,.005,.525],62124:[.43,0,.525],62126:[.43,0,.525],62127:[.43,.138,.525],62560:[.807,0,.525],62561:[.793,0,.525],62562:[.793,0,.525],62563:[.807,.011,.525],62564:[.793,.011,.525],62565:[.793,0,.525],62566:[.793,.011,.525],62567:[.793,.011,.525],62568:[.793,0,.525],62570:[.639,.006,.525],62571:[.639,.006,.525],62572:[.622,0,.525],62573:[.639,.006,.525],62574:[.622,.228,.525],62575:[.622,0,.525],62576:[.622,.005,.525],62577:[.622,.005,.525],62578:[.622,0,.525],63166:[.431,.228,.525],63187:[.807,-.686,.525],63188:[.656,-.493,.525],63189:[.644,-.483,.525],63190:[.639,-.506,.525],63198:[.341,-.271,.525],8592:[.481,-.131,.525],8593:[.611,0,.525],8594:[.481,-.131,.525],8595:[.611,0,.525],8730:[.682,.006,.525,{ic:.068}],8738:[.531,-.081,.525],9001:[.695,.083,.525],9002:[.695,.083,.525],9702:[.372,-.096,.525],10214:[.696,.082,.525],10215:[.695,.082,.525],592:[.436,.008,.525],593:[.436,.005,.525],594:[.436,.005,.525],595:[.617,.005,.525],596:[.436,.008,.525],597:[.439,.166,.525],598:[.611,.227,.525,{ic:.051}],599:[.617,.005,.525,{ic:.077}],600:[.44,.006,.525],601:[.44,.006,.525],602:[.436,.008,.525],603:[.439,.005,.525],604:[.442,.011,.525],605:[.442,.011,.525,{ic:.034}],606:[.442,.011,.525],607:[.43,.228,.525],608:[.555,.234,.525,{ic:.077}],609:[.436,.234,.525],610:[.439,.008,.525],611:[.43,.233,.525],612:[.442,.011,.525],613:[.43,.222,.525],614:[.617,0,.525],615:[.617,.227,.525],616:[.611,0,.525],617:[.431,.005,.525],618:[.43,0,.525],619:[.611,0,.525],620:[.611,0,.525],621:[.611,.228,.525],622:[.611,.227,.525],623:[.43,.005,.525,{ic:.003}],624:[.43,.222,.525,{ic:.003}],625:[.436,.227,.525],626:[.436,.227,.525],627:[.436,.227,.525,{ic:.052}],628:[.43,0,.525],629:[.439,.005,.525],630:[.439,.008,.525],631:[.464,.005,.525],632:[.611,.222,.525],633:[.43,.005,.525],634:[.653,.005,.525],635:[.43,.228,.525,{ic:.074}],636:[.436,.222,.525],637:[.436,.228,.525],638:[.436,0,.525],639:[.436,0,.525],640:[.43,.008,.525],641:[.439,0,.525],642:[.439,.227,.525],643:[.617,.227,.525],644:[.555,.228,.525],645:[.436,.227,.525],646:[.617,.259,.525],647:[.436,.123,.525],648:[.554,.227,.525],649:[.43,.005,.525],650:[.43,.011,.525],651:[.435,.005,.525],652:[.435,0,.525],653:[.435,0,.525],654:[.658,0,.525],655:[.43,0,.525],656:[.43,.228,.525,{ic:.091}],657:[.43,.167,.525],658:[.43,.228,.525],659:[.43,.259,.525],660:[.617,0,.525],661:[.617,0,.525],662:[.611,.005,.525],663:[.62,.228,.525],664:[.623,.011,.525],665:[.43,0,.525],666:[.442,.011,.525],667:[.585,.008,.525,{ic:.063}],668:[.43,0,.525],669:[.611,.227,.525,{ic:.002}],670:[.431,.222,.525],671:[.43,0,.525],672:[.555,.222,.525,{ic:.077}],673:[.617,0,.525],674:[.617,0,.525],675:[.611,.006,.525],676:[.611,.227,.525],677:[.611,.167,.525],678:[.554,.006,.525],679:[.617,.227,.525],680:[.554,.166,.525],681:[.617,.233,.525],682:[.611,0,.525],683:[.611,0,.525],684:[.613,.004,.525],685:[.478,.001,.525],686:[.436,.222,.525],687:[.436,.227,.525,{ic:.02}],7424:[.439,.001,.525],7431:[.43,0,.525],7434:[.43,.008,.525],7435:[.43,0,.525],7437:[.43,0,.525],7448:[.431,0,.525],7449:[.43,.008,.525],7452:[.43,.008,.525],7491:[.55,-.284,.525],7492:[.549,-.282,.525],7493:[.55,-.284,.525],7494:[.551,-.283,.525],7495:[.653,-.283,.525],7496:[.654,-.284,.525],7497:[.55,-.283,.525],7498:[.549,-.282,.525],7499:[.55,-.284,.525],7501:[.552,-.15,.525],7503:[.654,-.287,.525],7504:[.549,-.287,.525],7505:[.549,-.15,.525],7506:[.551,-.284,.525],7507:[.55,-.282,.525],7510:[.549,-.154,.525],7511:[.619,-.283,.525],7512:[.545,-.284,.525],7514:[.545,-.283,.525],7515:[.545,-.284,.525],7517:[.674,-.147,.525],7518:[.548,-.181,.525],7520:[.552,-.147,.525],7521:[.55,-.149,.525],7544:[.545,-.287,.525],7568:[.439,.227,.525,{ic:.088}],7569:[.617,.227,.525],7570:[.439,.227,.525,{ic:.099}],7571:[.442,.227,.525,{ic:.056}],7575:[.436,.227,.525],880:[.611,0,.525],881:[.512,0,.525],882:[.611,0,.525],883:[.512,0,.525],884:[.612,-.473,.525],885:[0,.139,.525],886:[.611,0,.525],887:[.512,0,.525],890:[-.054,.184,.525],891:[.44,.006,.525],892:[.44,.006,.525],893:[.44,.006,.525],894:[.43,.138,.525],895:[.611,.011,.525],900:[.611,-.473,.525],901:[.612,-.473,.525],902:[.623,0,.525],903:[.43,-.305,.525],904:[.623,0,.525],905:[.623,0,.525],906:[.623,0,.525],908:[.623,.011,.525],910:[.623,0,.525],911:[.623,0,.525],912:[.612,.005,.525],938:[.782,0,.525],939:[.782,0,.525],940:[.612,.005,.525,{ic:.001}],941:[.612,.011,.525],942:[.612,.233,.525],943:[.612,.005,.525],944:[.612,.005,.525],970:[.586,.005,.525],971:[.586,.005,.525],972:[.612,.005,.525],973:[.612,.005,.525],974:[.612,.005,.525],975:[.611,.216,.525],976:[.636,.011,.525],979:[.64,0,.525],980:[.769,0,.525],983:[.452,.228,.525],984:[.644,0,.525],985:[.607,.055,.525],986:[.639,.027,.525],987:[.442,.017,.525],988:[.639,0,.525],989:[.431,.222,.525],990:[.611,.062,.525],991:[.54,.101,.525],992:[.666,0,.525],993:[.639,.011,.525],994:[0,0,.525],995:[0,0,.525],1010:[.44,.006,.525],1011:[.605,.228,.525],1015:[.611,0,.525],1016:[.612,.222,.525],1017:[.622,.011,.525],1018:[.611,0,.525],1019:[.43,.181,.525],1020:[.436,.222,.525],1021:[.622,.011,.525],1022:[.622,.011,.525],1023:[.622,.011,.525],7936:[.654,.005,.525,{ic:.001}],7937:[.654,.005,.525,{ic:.001}],7938:[.654,.005,.525,{ic:.001}],7939:[.654,.005,.525,{ic:.001}],7940:[.654,.005,.525,{ic:.001}],7941:[.654,.005,.525,{ic:.001}],7942:[.72,.005,.525,{ic:.001}],7943:[.72,.005,.525,{ic:.001}],7944:[.623,0,.525],7945:[.623,0,.525],7946:[.623,0,.525],7947:[.623,0,.525],7948:[.623,0,.525],7949:[.623,0,.525],7950:[.623,0,.525],7951:[.623,0,.525],7952:[.656,.011,.525],7953:[.656,.011,.525],7954:[.656,.011,.525],7955:[.656,.011,.525],7956:[.656,.011,.525],7957:[.656,.011,.525],7960:[.622,0,.525],7961:[.622,0,.525],7962:[.622,0,.525],7963:[.622,0,.525],7964:[.622,0,.525],7965:[.622,0,.525],7968:[.656,.233,.525],7969:[.656,.233,.525],7970:[.656,.233,.525],7971:[.656,.233,.525],7972:[.656,.233,.525],7973:[.656,.233,.525],7974:[.722,.233,.525],7975:[.722,.233,.525],7976:[.622,0,.525],7977:[.622,0,.525],7978:[.622,0,.525],7979:[.622,0,.525],7980:[.622,0,.525],7981:[.622,0,.525],7982:[.622,0,.525],7983:[.622,0,.525],7984:[.654,.005,.525],7985:[.654,.005,.525],7986:[.666,.005,.525],7987:[.666,.005,.525],7988:[.666,.005,.525],7989:[.666,.005,.525],7990:[.72,.005,.525],7991:[.72,.005,.525],7992:[.622,0,.525],7993:[.622,0,.525],7994:[.622,0,.525],7995:[.622,0,.525],7996:[.622,0,.525],7997:[.622,0,.525],7998:[.622,0,.525],7999:[.622,0,.525],8e3:[.654,.005,.525],8001:[.654,.005,.525],8002:[.654,.005,.525],8003:[.654,.005,.525],8004:[.654,.005,.525],8005:[.654,.005,.525],8008:[.622,.011,.525],8009:[.622,.011,.525],8010:[.622,.011,.525],8011:[.622,.011,.525],8012:[.622,.011,.525],8013:[.622,.011,.525],8016:[.655,.005,.525],8017:[.655,.005,.525],8018:[.655,.005,.525],8019:[.655,.005,.525],8020:[.655,.005,.525],8021:[.655,.005,.525],8022:[.721,.005,.525],8023:[.721,.005,.525],8025:[.622,0,.525],8027:[.622,0,.525],8029:[.622,0,.525],8031:[.622,0,.525],8032:[.655,.005,.525],8033:[.655,.005,.525],8034:[.655,.005,.525],8035:[.655,.005,.525],8036:[.655,.005,.525],8037:[.655,.005,.525],8038:[.721,.005,.525],8039:[.721,.005,.525],8040:[.622,0,.525],8041:[.622,0,.525],8042:[.622,0,.525],8043:[.622,0,.525],8044:[.622,0,.525],8045:[.622,0,.525],8046:[.622,0,.525],8047:[.622,0,.525],8048:[.639,.005,.525,{ic:.001}],8049:[.638,.005,.525,{ic:.001}],8050:[.641,.011,.525],8051:[.64,.011,.525],8052:[.641,.233,.525],8053:[.64,.233,.525],8054:[.639,.005,.525],8055:[.638,.005,.525],8056:[.639,.005,.525],8057:[.638,.005,.525],8058:[.64,.005,.525],8059:[.639,.005,.525],8060:[.64,.005,.525],8061:[.639,.005,.525],8064:[.639,.184,.525,{ic:.001}],8065:[.639,.184,.525,{ic:.001}],8066:[.639,.184,.525,{ic:.001}],8067:[.639,.184,.525,{ic:.001}],8068:[.639,.184,.525,{ic:.001}],8069:[.639,.184,.525,{ic:.001}],8070:[.694,.184,.525,{ic:.001}],8071:[.694,.184,.525,{ic:.001}],8072:[.623,.184,.525],8073:[.623,.184,.525],8074:[.623,.184,.525],8075:[.623,.184,.525],8076:[.623,.184,.525],8077:[.623,.184,.525],8078:[.623,.184,.525],8079:[.623,.184,.525],8080:[.639,.233,.525],8081:[.639,.233,.525],8082:[.639,.233,.525],8083:[.639,.233,.525],8084:[.639,.233,.525],8085:[.639,.233,.525],8086:[.694,.233,.525],8087:[.694,.233,.525],8088:[.622,.184,.525],8089:[.622,.184,.525],8090:[.622,.184,.525],8091:[.622,.184,.525],8092:[.622,.184,.525],8093:[.622,.184,.525],8094:[.622,.184,.525],8095:[.622,.184,.525],8096:[.639,.184,.525],8097:[.639,.184,.525],8098:[.639,.184,.525],8099:[.639,.184,.525],8100:[.639,.184,.525],8101:[.639,.184,.525],8102:[.694,.184,.525],8103:[.694,.184,.525],8104:[.622,.184,.525],8105:[.622,.184,.525],8106:[.622,.184,.525],8107:[.622,.184,.525],8108:[.622,.184,.525],8109:[.622,.184,.525],8110:[.622,.184,.525],8111:[.622,.184,.525],8112:[.619,.005,.525,{ic:.001}],8113:[.577,.005,.525,{ic:.001}],8114:[.612,.184,.525,{ic:.001}],8115:[.436,.184,.525,{ic:.001}],8116:[.612,.184,.525,{ic:.001}],8118:[.639,.005,.525,{ic:.001}],8119:[.639,.184,.525,{ic:.001}],8120:[.796,0,.525],8121:[.746,0,.525],8122:[.623,0,.525],8123:[.623,0,.525],8124:[.651,.169,.525],8125:[.639,-.485,.525],8126:[.135,.135,.525],8127:[.639,-.485,.525],8128:[.639,-.535,.525],8129:[.764,-.51,.525],8130:[.612,.233,.525],8131:[.442,.233,.525],8132:[.612,.233,.525],8134:[.639,.233,.525],8135:[.639,.233,.525],8136:[.622,0,.525],8137:[.623,0,.525],8138:[.622,0,.525],8139:[.623,0,.525],8140:[.639,.169,.525],8141:[.639,-.485,.525],8142:[.639,-.485,.525],8143:[.694,-.474,.525],8144:[.613,.005,.525],8145:[.571,.005,.525],8146:[.639,.005,.525],8147:[.639,.005,.525],8150:[.604,.005,.525],8151:[.773,.005,.525],8152:[.795,0,.525],8153:[.745,0,.525],8154:[.622,0,.525],8155:[.623,0,.525],8157:[.639,-.485,.525],8158:[.639,-.485,.525],8159:[.694,-.474,.525],8160:[.608,.005,.525],8161:[.566,.005,.525],8162:[.64,.005,.525],8163:[.64,.005,.525],8164:[.639,.222,.525],8165:[.639,.222,.525],8166:[.639,.005,.525],8167:[.755,.005,.525],8168:[.795,0,.525],8169:[.745,0,.525],8170:[.622,0,.525],8171:[.623,0,.525],8172:[.622,0,.525],8173:[.612,-.473,.525],8174:[.612,-.473,.525],8175:[.612,-.473,.525],8178:[.612,.184,.525],8179:[.441,.184,.525],8180:[.612,.184,.525],8182:[.639,.005,.525],8183:[.639,.184,.525],8184:[.622,.011,.525],8185:[.623,.011,.525],8186:[.622,0,.525],8187:[.623,0,.525],8188:[.622,.169,.525],8189:[.611,-.473,.525],8190:[.639,-.485,.525],1024:[.807,0,.525],1025:[.819,0,.525],1026:[.611,.011,.525],1027:[.807,0,.525],1028:[.622,.011,.525],1029:[.622,.011,.525],1030:[.611,0,.525],1031:[.819,0,.525],1032:[.611,.011,.525],1033:[.611,.011,.525],1034:[.611,0,.525],1035:[.611,0,.525],1036:[.807,0,.525],1037:[.807,0,.525],1038:[.837,.011,.525],1039:[.611,.166,.525],1040:[.623,0,.525],1041:[.611,0,.525],1042:[.611,0,.525],1043:[.611,0,.525],1044:[.611,.166,.525],1045:[.611,0,.525],1046:[.611,0,.525],1047:[.622,.011,.525],1048:[.611,0,.525],1049:[.837,0,.525],1050:[.611,0,.525],1051:[.611,.011,.525],1052:[.611,0,.525],1053:[.611,0,.525],1054:[.622,.011,.525],1055:[.611,0,.525],1056:[.611,0,.525],1057:[.622,.011,.525],1058:[.611,0,.525],1059:[.611,.011,.525],1060:[.611,0,.525],1061:[.611,0,.525],1062:[.611,.166,.525],1063:[.611,0,.525],1064:[.611,0,.525],1065:[.611,.166,.525],1066:[.611,0,.525],1067:[.611,0,.525],1068:[.611,0,.525],1069:[.622,.011,.525],1070:[.622,.011,.525],1071:[.611,0,.525],1072:[.44,.006,.525],1073:[.611,.005,.525],1074:[.431,0,.525],1075:[.43,0,.525],1076:[.43,.138,.525],1077:[.44,.006,.525],1078:[.43,0,.525],1079:[.439,.005,.525],1080:[.43,0,.525],1081:[.656,0,.525],1082:[.43,0,.525],1083:[.43,.008,.525],1084:[.43,0,.525],1085:[.43,0,.525],1086:[.44,.006,.525],1087:[.43,0,.525],1088:[.437,.222,.525],1089:[.44,.006,.525],1090:[.43,0,.525],1091:[.431,.228,.525],1092:[.611,.222,.525],1093:[.431,0,.525],1094:[.43,.138,.525],1095:[.43,0,.525],1096:[.43,0,.525],1097:[.43,.138,.525,{ic:.002}],1098:[.43,0,.525],1099:[.43,0,.525],1100:[.43,0,.525],1101:[.439,.005,.525],1102:[.439,.005,.525],1103:[.43,0,.525],1104:[.639,.006,.525],1105:[.61,.006,.525],1106:[.611,.222,.525],1107:[.639,0,.525],1108:[.439,.005,.525],1109:[.44,.006,.525],1110:[.612,0,.525],1111:[.611,0,.525],1112:[.612,.228,.525],1113:[.43,.008,.525],1114:[.43,0,.525],1115:[.611,0,.525],1116:[.639,0,.525],1117:[.639,0,.525],1118:[.656,.228,.525],1119:[.43,.138,.525],1120:[.622,.011,.525],1121:[.439,.005,.525],1122:[.694,0,.525],1123:[.667,0,.525],1124:[.622,.011,.525],1125:[.439,.005,.525],1126:[.623,0,.525],1127:[.437,0,.525],1128:[.623,0,.525],1129:[.437,0,.525],1130:[.611,0,.525],1131:[.43,0,.525],1132:[.611,0,.525],1133:[.43,0,.525],1134:[.76,.227,.525],1135:[.565,.227,.525],1136:[.611,0,.525],1137:[.611,.222,.525,{ic:.007}],1138:[.622,.011,.525],1139:[.442,.011,.525],1140:[.622,.008,.525],1141:[.436,.008,.525],1142:[.807,.008,.525],1143:[.639,.008,.525],1146:[.668,.057,.525],1147:[.483,.05,.525],1148:[.83,.011,.525],1149:[.65,.005,.525],1150:[.82,.011,.525],1151:[.639,.005,.525],1152:[.622,.233,.525],1153:[.444,.227,.525],1154:[.206,.103,.525],1155:[.65,-.483,.525],1156:[.65,-.442,.525,{ic:.028}],1157:[.622,-.483,.525],1158:[.622,-.483,.525],1160:[.758,.286,.525,{ic:.127}],1161:[.854,.382,.525,{ic:.206}],1162:[.837,.166,.525],1163:[.656,.138,.525],1164:[.611,0,.525],1165:[.639,0,.525],1166:[.611,0,.525],1167:[.436,.222,.525,{ic:.002}],1168:[.778,0,.525],1169:[.498,0,.525],1170:[.611,0,.525],1171:[.43,0,.525],1172:[.611,.228,.525],1173:[.43,.228,.525],1174:[.611,.166,.525],1175:[.43,.138,.525],1176:[.622,.236,.525],1177:[.439,.236,.525],1178:[.611,.166,.525],1179:[.43,.138,.525],1180:[.611,0,.525],1181:[.43,0,.525],1182:[.611,0,.525],1183:[.611,0,.525],1184:[.611,0,.525],1185:[.431,0,.525],1186:[.611,.166,.525],1187:[.43,.138,.525],1188:[.611,0,.525],1189:[.431,0,.525],1190:[.611,.228,.525],1191:[.43,.228,.525,{ic:.009}],1192:[.622,.105,.525],1193:[.439,.105,.525],1194:[.622,.236,.525],1195:[.439,.236,.525],1196:[.611,.166,.525],1197:[.43,.138,.525],1198:[.611,0,.525],1199:[.43,.222,.525],1200:[.611,0,.525],1201:[.43,.222,.525],1202:[.611,.166,.525],1203:[.43,.138,.525],1204:[.611,.166,.525],1205:[.43,.138,.525],1206:[.611,.166,.525],1207:[.43,.138,.525],1208:[.611,0,.525],1209:[.43,0,.525],1210:[.611,0,.525],1211:[.611,0,.525],1212:[.622,.011,.525],1213:[.439,.005,.525],1214:[.622,.226,.525],1215:[.439,.229,.525],1216:[.611,0,.525],1217:[.819,0,.525],1218:[.639,0,.525],1219:[.611,.228,.525],1220:[.43,.227,.525],1221:[.611,.166,.525],1222:[.43,.138,.525],1223:[.611,.227,.525],1224:[.43,.227,.525],1225:[.611,.166,.525],1226:[.43,.138,.525],1227:[.611,.166,.525],1228:[.43,.138,.525],1229:[.611,.167,.525],1230:[.43,.138,.525],1232:[.819,0,.525],1233:[.639,.006,.525],1234:[.819,0,.525],1235:[.611,.006,.525],1236:[.611,0,.525],1237:[.439,.005,.525],1238:[.819,0,.525],1239:[.639,.006,.525],1240:[.622,.011,.525],1241:[.436,.005,.525],1242:[.819,.011,.525],1243:[.611,.005,.525],1244:[.819,0,.525],1245:[.611,0,.525],1246:[.819,.011,.525],1247:[.61,.005,.525],1248:[.611,.011,.525],1249:[.43,.228,.525],1250:[.819,0,.525],1251:[.622,0,.525],1252:[.819,0,.525],1253:[.61,0,.525],1254:[.819,.011,.525],1255:[.61,.006,.525],1256:[.622,.011,.525],1257:[.439,.005,.525],1258:[.819,.011,.525],1259:[.61,.005,.525],1260:[.819,.011,.525],1261:[.61,.005,.525],1262:[.819,.011,.525],1263:[.622,.228,.525],1264:[.819,.011,.525],1265:[.611,.228,.525],1266:[.807,.011,.525],1267:[.639,.228,.525],1268:[.819,0,.525],1269:[.61,0,.525],1270:[.611,.166,.525],1271:[.43,.138,.525],1272:[.819,0,.525],1273:[.611,0,.525],1276:[.611,.227,.525],1277:[.43,.227,.525],1278:[.611,0,.525],1279:[.43,0,.525],1298:[.611,.227,.525],1299:[.43,.227,.525],1306:[.622,.139,.525],1307:[.437,.222,.525,{ic:.012}],1308:[.611,.008,.525],1309:[.431,.004,.525]}}},"NCM"),{},["MJX-NCM-MX"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/monospace-ex","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/math.js 0000644 0001762 0000144 00000022417 15112352537 022250 0 ustar ligges users (()=>{"use strict";const t=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","math",t({MM:{normal:{8714:[.447,-.054,.547],8717:[.447,-.054,.547],8731:[.046,.96,.833,{ic:.02}],8732:[.04,.96,.833,{ic:.02}],8762:[.504,.004,.778],8763:[.536,.036,.773],8782:[.49,-.01,.778],8783:[.49,-.133,.778],8785:[.601,.101,.778],8786:[.601,.101,.778],8787:[.601,.101,.778],8790:[.367,-.133,.778],8791:[.73,-.133,.778],8792:[.619,-.133,.778],8793:[.752,-.133,.778],8794:[.76,-.133,.778],8795:[.81,-.133,.778],8796:[.81,-.133,.778],8798:[.684,-.133,.778],8844:[.604,.02,.667],8886:[.4,-.1,1.078],8887:[.4,-.1,1.078],8888:[.4,-.1,.948],8889:[.603,.103,.818],8891:[.569,.136,.642],8892:[.684,.021,.642],8893:[.684,.018,.642],8894:[.679,.109,.9],8895:[.679,-.013,.778],8903:[.591,.091,.802],8912:[.543,.043,.698],8913:[.543,.043,.698],8914:[.604,.02,.658],8915:[.604,.02,.658],8916:[.65,.023,.839],8917:[.75,.25,.778],8918:[.547,.052,.778],8919:[.547,.047,.778],8920:[.554,.047,1.285],8921:[.546,.054,1.285],8922:[.855,.354,.778],8923:[.849,.355,.778],8924:[.631,.124,.778],8925:[.631,.119,.778],8926:[.639,.139,.738],8927:[.639,.139,.738],8928:[.73,.23,.738],8929:[.73,.23,.738],8932:[.627,.211,.778],8933:[.627,.211,.778],8934:[.668,.241,.776],8935:[.636,.209,.776],8936:[.682,.254,.773],8937:[.682,.254,.773],8946:[.543,.043,.839],8947:[.543,.043,.667],8948:[.447,-.054,.547],8949:[.741,.043,.667],8950:[.684,.043,.667],8951:[.614,-.054,.547],8952:[.543,.184,.667],8953:[.543,.043,.667],8954:[.543,.043,.839],8955:[.543,.043,.667],8956:[.447,-.054,.547],8957:[.684,.043,.667],8958:[.614,-.054,.547],8959:[.684,0,.556],10176:[.684,0,.778],10177:[.741,.005,.968],10178:[.684,0,.778],10179:[.543,.043,.778],10180:[.543,.043,.778],10181:[.719,.173,.466],10182:[.719,.173,.466],10183:[.605,.02,.667],10184:[.603,.103,1.168],10185:[.603,.103,1.168],10186:[.75,.25,.552],10187:[.505,.005,.623],10188:[.77,.27,.45,{ic:.214}],10189:[.505,.005,.623],10190:[.583,.083,.778],10191:[.583,.083,.778],10192:[.48,-.02,.5],10193:[.605,.031,.667],10194:[.503,.003,.667],10195:[.479,-.013,.578],10196:[.479,-.013,.578],10197:[.505,.005,.758],10198:[.505,.005,.758],10199:[.505,.005,.892],10202:[.684,0,1.026],10203:[.684,0,1.026],10204:[.4,-.1,.948],10207:[.683,.02,.4],10208:[.61,.11,.572],10209:[.501,.001,.614],10210:[.501,.001,.73],10211:[.501,.001,.73],10212:[.583,.083,.991],10213:[.583,.083,.991],10625:[.346,-.154,.291],10626:[.506,-.034,.291],10627:[.75,.25,.5],10628:[.75,.25,.5],10629:[.748,.248,.389],10630:[.748,.248,.389],10631:[.75,.25,.542],10632:[.75,.25,.542],10633:[.75,.25,.47],10634:[.75,.25,.47],10635:[.75,.381,.278],10636:[.75,.381,.278],10637:[.75,.25,.278,{ic:.019}],10638:[.75,.25,.278],10639:[.75,.25,.278,{ic:.005}],10640:[.75,.25,.278],10641:[.75,.25,.389],10642:[.75,.25,.389],10643:[.748,.248,.778],10644:[.748,.248,.778],10645:[.748,.248,.778],10646:[.748,.248,.778],10649:[.596,.096,.192],10650:[.609,.075,.62],10651:[.526,.109,.778],10652:[.679,-.013,.778],10653:[.679,-.013,.778],10654:[.724,-.013,.778],10655:[.424,-.013,.778],10656:[.562,.062,.778],10657:[.557,.057,.724],10658:[.724,-.013,.778],10659:[.724,-.013,.778],10660:[.724,.137,.778],10661:[.724,.137,.778],10662:[.362,-.107,.564],10663:[.362,-.106,.564],10664:[.739,.109,.778],10665:[.739,.109,.778],10666:[.739,.109,.778],10667:[.739,.109,.778],10668:[.666,.036,.778,{ic:.054}],10669:[.666,.036,.778,{ic:.053}],10670:[.666,.036,.778,{ic:.054}],10671:[.666,.036,.778,{ic:.053}],10672:[.597,.097,.778],10673:[.735,.097,.778],10674:[.803,.097,.778],10675:[.788,.097,.778],10676:[.788,.097,.778],10677:[.563,.063,1.047],10678:[.731,.231,.712],10679:[.563,.063,.712],10680:[.563,.063,.712],10681:[.563,.063,.712],10682:[.563,.063,.712],10683:[.597,.097,.778],10684:[.563,.063,.712],10685:[.869,.203,.712],10686:[.563,.063,.712],10687:[.563,.063,.712],10688:[.563,.063,.712],10689:[.563,.063,.712],10690:[.563,.063,.954],10691:[.563,.063,.984],10692:[.56,.06,.712],10693:[.56,.06,.712],10694:[.56,.06,.712],10695:[.56,.06,.712],10696:[.56,.06,.712],10697:[.56,.06,.712],10698:[.741,.005,.968],10699:[.741,.005,.968],10700:[.741,.005,.968],10701:[.741,.005,1.236],10702:[.787,.247,.738],10703:[.547,.047,.886],10704:[.547,.047,.886],10705:[.505,.005,.623],10706:[.505,.005,.623],10707:[.505,.005,.623],10708:[.505,.005,.623],10709:[.505,.005,.623],10710:[.51,0,.623],10711:[.51,0,.623],10712:[.931,.267,.46],10713:[.931,.267,.46],10714:[.931,.267,.85],10715:[.931,.267,.85],10716:[.442,.011,1],10717:[.663,.011,1],10718:[.59,.16,1],10719:[.4,-.1,1.15],10720:[.56,.06,.712],10721:[.424,.137,.778],10722:[.487,-.043,.784],10723:[.563,.032,.797],10724:[.61,.032,.797],10725:[.563,.032,.797],10726:[.564,.062,.778],10727:[.673,.173,.844],10728:[.748,0,.973],10729:[.748,0,.973],10730:[.809,.144,.778],10731:[.737,.199,.778],10732:[.741,.193,.712],10733:[.741,.193,.712],10734:[.748,.248,.566],10735:[.768,.248,.566],10736:[.748,.248,.742],10737:[.748,.248,.742],10738:[.748,.248,.648],10739:[.748,.248,.648],10740:[.51,.01,1.14],10742:[.72,.103,.556],10746:[.583,.083,.964],10747:[.583,.083,1.14],10748:[.75,.25,.389],10749:[.75,.25,.389],10750:[.583,.083,.778],10751:[.303,-.197,.778],10762:[.75,.25,1.056],10763:[.805,.306,.707],10781:[.658,.108,.929],10782:[.632,.134,.738,{sk:.039}],10783:[.58,.186,.28],10784:[.547,.047,1.118,{sk:.011}],10785:[.697,.203,.441,{sk:-.09}],10786:[.694,-.037,.778],10787:[.659,-.037,.778],10788:[.696,-.037,.778],10789:[.633,0,.778],10790:[.633,.001,.778],10791:[.583,.26,.827],10792:[.583,.083,.778],10793:[.646,-.23,.778],10794:[.27,.004,.778],10795:[.504,.004,.778],10796:[.504,.004,.778],10797:[.592,.092,.669],10798:[.592,.092,.669],10800:[.604,-.009,.778],10801:[.491,.12,.778],10802:[.491,-.009,.778],10803:[.58,.066,.778],10804:[.592,.092,.606],10805:[.592,.092,.606],10806:[.779,.092,.778],10807:[.592,.092,.778],10808:[.592,.092,.778],10809:[.741,.005,.968],10810:[.741,.005,.968],10811:[.741,.005,.968],10812:[.367,-.133,.667],10813:[.367,-.133,.667],10814:[.56,.186,.24],10816:[.604,.02,.667],10817:[.604,.02,.667],10818:[.72,.02,.667],10819:[.72,.02,.667],10820:[.604,.023,.667],10821:[.604,.022,.667],10822:[.604,.02,.607],10823:[.604,.02,.607],10824:[.72,.02,.607],10825:[.72,.02,.607],10826:[.374,-.1,1.057],10827:[.374,-.1,1.057],10828:[.604,.02,.846],10829:[.604,.02,.846],10830:[.604,.02,.667],10831:[.604,.02,.667],10832:[.604,.02,.846],10833:[.788,.02,.667],10834:[.788,.022,.667],10835:[.602,.023,.667],10836:[.603,.022,.667],10837:[.602,.02,.805],10838:[.605,.02,.805],10839:[.644,.022,.778],10840:[.644,.022,.778],10841:[.731,.02,.667],10842:[.602,.02,.667],10843:[.605,.02,.667],10844:[.602,.02,.771],10845:[.602,.02,.771],10846:[.831,.02,.667],10847:[.602,.173,.667],10848:[.602,.287,.667],10849:[.727,-.204,.642],10850:[.831,.022,.667],10851:[.604,.25,.667],10852:[.647,.157,.838],10853:[.647,.157,.838],10854:[.367,.101,.778],10855:[.698,-.036,.778],10856:[.67,.17,.778],10857:[.67,.17,.778],10858:[.536,-.134,.773],10859:[.536,.036,.773],10860:[.578,.078,.778],10861:[.726,-.036,.778],10862:[.739,-.133,.778],10863:[.679,-.043,.773],10864:[.773,-.036,.778],10865:[.767,-.037,.778],10866:[.767,-.037,.778],10867:[.552,-.036,.778],10868:[.422,-.078,.842],10869:[.367,-.133,.992],10870:[.367,-.123,1.312],10871:[.601,.101,.778],10872:[.698,-.036,.778],10873:[.547,.052,.778],10874:[.547,.047,.778],10875:[.705,.052,.778],10876:[.705,.047,.778],10879:[.634,.134,.778],10880:[.634,.134,.778],10881:[.634,.134,.778],10882:[.634,.134,.778],10883:[.816,.134,.778],10884:[.816,.134,.778],10893:[.721,.143,.776],10894:[.721,.143,.776],10895:[.886,.378,.776],10896:[.886,.38,.776],10897:[.958,.257,.778],10898:[.958,.257,.778],10899:[1.004,.389,.778],10900:[1.004,.389,.778],10903:[.629,.134,.778],10904:[.629,.129,.778],10905:[.807,.052,.778],10906:[.807,.047,.778],10907:[.791,.134,.778],10908:[.791,.129,.778],10909:[.636,.135,.776],10910:[.636,.125,.776],10911:[.898,.203,.778],10912:[.898,.203,.778],10913:[.547,.052,.77],10914:[.553,.047,.77],10915:[.636,.119,1.011],10916:[.554,.054,.876],10917:[.547,.053,1.526],10918:[.551,.05,.864],10919:[.551,.05,.864],10920:[.638,.134,.86],10921:[.638,.134,.86],10922:[.547,.047,.778],10923:[.547,.047,.778],10924:[.631,.119,.778],10925:[.631,.119,.778],10926:[.685,-.133,.778],10939:[.547,.047,1.248],10940:[.547,.047,1.248],10941:[.543,.043,.778],10942:[.543,.043,.778],10943:[.543,.265,.718],10944:[.543,.265,.718],10945:[.543,.225,.778],10946:[.543,.225,.778],10947:[.693,.127,.718],10948:[.693,.127,.718],10951:[.543,.17,.718],10952:[.543,.17,.718],10953:[.703,.203,.72],10954:[.703,.203,.72],10957:[.543,.043,1.384],10958:[.543,.043,1.384],10959:[.543,.043,.778],10960:[.543,.043,.778],10961:[.469,.127,.718],10962:[.469,.127,.718],10963:[.803,.163,.718],10964:[.803,.163,.718],10965:[.803,.163,.718],10966:[.803,.163,.718],10967:[.469,-.043,1.348],10968:[.469,-.043,1.348],10969:[.503,.011,.667],10970:[.685,.007,.839],10971:[.666,.007,.839],10972:[.513,.033,.667],10973:[.503,.003,.667],10988:[.367,.017,.667],10989:[.367,.017,.667],10990:[.75,.25,.388],10991:[.668,.02,.4],10992:[.668,.02,.4],10993:[.683,.02,.4],10998:[.58,.002,.278],10999:[.666,.171,1.013],11e3:[.672,.166,1.013],11001:[.634,.306,.778],11002:[.634,.306,.778],11003:[.75,.25,.779],11005:[.75,.25,.634],11006:[.75,.25,.398],11007:[.92,.32,.398]}}},"NCM"),{},["MJX-NCM-MM"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/math","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/latin.js 0000644 0001762 0000144 00000032456 15112352537 022432 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","latin",c({LR:{normal:{192:[.909,0,.75],193:[.909,0,.75],194:[.87,0,.75],195:[.831,0,.75],196:[.831,0,.75],197:[.892,0,.75],198:[.683,0,.903],199:[.705,.2,.722],200:[.909,0,.681],201:[.909,0,.681],202:[.87,0,.681],203:[.831,0,.681],204:[.909,0,.361],205:[.909,0,.361],206:[.87,0,.361],207:[.831,0,.361],208:[.683,0,.764],209:[.831,0,.75],210:[.909,.022,.778],211:[.909,.022,.778],212:[.87,.022,.778],213:[.831,.022,.778],214:[.831,.022,.778],216:[.74,.058,.778],217:[.909,.022,.75],218:[.909,.022,.75],219:[.87,.022,.75],220:[.831,.022,.75],221:[.909,0,.75],222:[.683,0,.625],223:[.705,.011,.5],224:[.698,.011,.5],225:[.698,.011,.5],226:[.694,.011,.5],227:[.653,.011,.5],228:[.652,.011,.5],229:[.705,.011,.5],230:[.448,.011,.722],231:[.448,.2,.444],232:[.698,.011,.444],233:[.698,.011,.444],234:[.694,.011,.444],235:[.652,.011,.444],236:[.698,0,.278],237:[.698,0,.278],238:[.694,0,.278,{ic:.014}],239:[.652,0,.278],241:[.653,0,.556],242:[.698,.011,.5],243:[.698,.011,.5],244:[.694,.011,.5],245:[.653,.011,.5],246:[.652,.011,.5],248:[.536,.104,.5],249:[.698,.011,.556],250:[.698,.011,.556],251:[.694,.011,.556],252:[.652,.011,.556],253:[.698,.205,.528],254:[.694,.194,.556],255:[.652,.205,.528],256:[.787,0,.75],257:[.62,.011,.5],258:[.918,0,.75],259:[.69,.011,.5],260:[.716,.211,.75],261:[.448,.211,.5],262:[.909,.022,.722],263:[.698,.011,.444],264:[.944,.022,.722],265:[.687,.011,.444],266:[.871,.022,.722],267:[.614,.011,.444],268:[.87,.022,.722],269:[.693,.011,.444],270:[.87,0,.764],271:[.694,.011,.556,{ic:.018}],272:[.683,0,.764],273:[.694,.011,.556],274:[.787,0,.681],275:[.62,.011,.444],276:[.903,0,.681],277:[.646,.011,.444],278:[.864,0,.681],279:[.657,.011,.444],280:[.68,.211,.681],281:[.448,.211,.444],282:[.87,0,.681],283:[.693,.011,.444],284:[.944,.022,.785],285:[.692,.206,.5],286:[.918,.022,.785],287:[.69,.206,.5],288:[.871,.022,.785],289:[.619,.206,.5],290:[.705,.29,.785],291:[.738,.206,.5],292:[.944,0,.75],293:[.933,0,.556],294:[.683,0,.75],295:[.694,0,.556],296:[.831,0,.361],297:[.653,0,.278,{ic:.03}],298:[.787,0,.361,{ic:.001}],299:[.62,0,.278,{ic:.042}],300:[.903,0,.361,{ic:.007}],301:[.646,0,.278,{ic:.054}],302:[.683,.211,.361],303:[.669,.211,.278],304:[.864,0,.361],306:[.683,.022,.839],307:[.657,.205,.556],308:[.944,.022,.514],309:[.687,.205,.306,{ic:.021}],310:[.683,.29,.778],311:[.694,.29,.528],312:[.444,0,.528],313:[.909,0,.625],314:[.92,0,.278,{ic:.002}],315:[.683,.29,.625],316:[.694,.29,.278],317:[.683,0,.625],318:[.694,0,.278,{ic:.024}],319:[.683,0,.625],320:[.694,0,.426],321:[.683,0,.625],322:[.694,0,.336],323:[.909,0,.75],324:[.698,0,.556],325:[.683,.29,.75],326:[.442,.29,.556],327:[.87,0,.75],328:[.693,0,.556],329:[.683,0,.556],330:[.705,.022,.75],331:[.442,.216,.506],332:[.787,.022,.778],333:[.62,.011,.5],334:[.903,.022,.778],335:[.646,.011,.5],336:[.932,.022,.778],337:[.697,.011,.5],338:[.705,.022,1.014],339:[.448,.011,.778],340:[.909,.022,.736],341:[.698,0,.392],342:[.683,.29,.736],343:[.442,.29,.392],344:[.87,.022,.736],345:[.693,0,.392],346:[.909,.022,.556],347:[.698,.011,.394],348:[.944,.022,.556],349:[.687,.011,.394],350:[.705,.2,.556],351:[.448,.2,.394],352:[.87,.022,.556],353:[.693,.011,.394],354:[.677,.2,.722],355:[.615,.2,.389],356:[.87,0,.722],357:[.692,.011,.389],358:[.677,0,.722],359:[.615,.011,.389],360:[.831,.022,.75],361:[.653,.011,.556],362:[.787,.022,.75],363:[.62,.011,.556],364:[.903,.022,.75],365:[.646,.011,.556],366:[.892,.022,.75],367:[.705,.011,.556],368:[.932,.022,.75],369:[.697,.011,.556],370:[.683,.211,.75],371:[.442,.211,.556,{ic:.002}],372:[.944,.022,1.028],373:[.687,.011,.722],374:[.944,0,.75],375:[.687,.205,.528],376:[.831,0,.75],377:[.909,0,.611],378:[.698,0,.444],379:[.864,0,.611],380:[.657,0,.444],381:[.87,0,.611],382:[.693,0,.444],383:[.705,0,.306,{ic:.051}],384:[.694,.011,.556],385:[.683,0,.818],386:[.683,0,.683],387:[.683,.011,.514],388:[.683,0,.682],389:[.683,.011,.556],390:[.706,.021,.722],391:[.869,.022,.756,{ic:.073}],392:[.647,.011,.5,{ic:.069}],393:[.683,0,.763],394:[.683,0,.874],395:[.683,0,.668],396:[.683,.011,.555],397:[.548,.12,.495],398:[.68,0,.681],399:[.705,.022,.676],400:[.706,.022,.611],401:[.68,.205,.652],402:[.705,0,.306,{ic:.051}],403:[.869,.022,.784,{ic:.045}],404:[.683,.217,.751],405:[.695,.011,.767],406:[.694,.025,.417],407:[.683,0,.361],408:[.69,0,.765],409:[.705,0,.528],410:[.695,0,.389],411:[.694,.012,.528],412:[.683,.023,1.056],413:[.683,.205,.75],414:[.441,.195,.528,{ic:.006}],415:[.705,.022,.777],416:[.789,.022,.778],417:[.536,.011,.5],418:[.706,.2,.852,{ic:.028}],419:[.448,.199,.611,{ic:.008}],420:[.683,0,.791],421:[.706,.195,.528],422:[.683,.177,.722,{ic:.01}],423:[.706,.022,.555],424:[.447,.011,.394],425:[.683,0,.722],426:[.705,.205,.332,{ic:.027}],427:[.615,.205,.417],428:[.677,0,.722],429:[.636,.011,.417],430:[.677,.205,.722],431:[.789,.022,.75],432:[.536,.011,.556,{ic:.015}],433:[.705,0,.722],434:[.697,.022,.724],435:[.689,0,.749,{ic:.016}],436:[.689,.205,.64,{ic:.026}],437:[.683,0,.611],438:[.431,0,.443],439:[.683,.022,.555],440:[.683,.022,.55],441:[.43,.205,.444],442:[.43,.205,.444],443:[.666,0,.499],444:[.683,.022,.519],445:[.43,.022,.399],446:[.615,.011,.46],447:[.457,.228,.5],448:[.694,.194,.278],449:[.694,.194,.444],450:[.695,.195,.556],451:[.716,-.001,.278],452:[.869,0,1.375],453:[.692,0,1.208],454:[.694,.011,1],455:[.683,.022,1.139],456:[.683,.205,.931],457:[.694,.205,.584],458:[.683,.022,1.264],459:[.683,.205,1.056],460:[.657,.205,.862],461:[.935,0,.75],462:[.691,.011,.5],463:[.935,0,.361],464:[.691,0,.278,{ic:.015}],465:[.935,.022,.778],466:[.691,.011,.5],467:[.935,.022,.75],468:[.691,.011,.556],469:[1.015,.022,.75],470:[.769,.011,.556],471:[1.079,.022,.75],472:[.852,.011,.556],473:[1.097,.022,.75],474:[.851,.011,.556],475:[1.083,.022,.75],476:[.86,.011,.556],477:[.448,.011,.444],478:[1.015,0,.75],479:[.769,.011,.5],480:[1.037,0,.75],481:[.808,.011,.5],482:[.796,0,.903],483:[.539,.011,.722],484:[.705,.022,.784],485:[.453,.206,.5,{ic:.002}],486:[.935,.022,.785],487:[.691,.206,.5],488:[.935,0,.778],489:[.931,0,.528],490:[.705,.209,.778],491:[.448,.202,.5],492:[.853,.209,.778],493:[.609,.202,.5],494:[.917,.022,.555],495:[.66,.205,.444],496:[.692,.205,.306,{ic:.003}],497:[.683,0,1.375],498:[.683,0,1.208],499:[.694,.011,1],500:[.936,.022,.785],501:[.692,.206,.5],502:[.683,.011,.983],503:[.72,.228,.642],504:[.921,0,.75],505:[.69,0,.556],506:[1.185,0,.75],507:[.933,.011,.5],508:[.909,0,.903],509:[.692,.011,.722],510:[.936,.056,.778],511:[.739,.102,.5],512:[.939,0,.75],513:[.695,.011,.5],514:[.932,0,.75],515:[.688,.011,.5],516:[.932,0,.681],517:[.695,.011,.444],518:[.937,0,.681],519:[.68,.011,.444],520:[.939,0,.361],521:[.695,0,.278],522:[.932,0,.361],523:[.688,0,.278,{ic:.009}],524:[.939,.022,.778],525:[.695,.011,.5],526:[.932,.022,.778],527:[.688,.011,.5],528:[.939,.022,.736],529:[.695,0,.392],530:[.932,.022,.736],531:[.688,0,.392],532:[.939,.022,.75],533:[.695,.011,.556],534:[.932,.022,.75],535:[.688,.011,.556],536:[.705,.29,.556],537:[.448,.29,.394],538:[.677,.29,.722],539:[.615,.29,.389],540:[.698,.061,.579],541:[.459,.215,.48],542:[.935,0,.75],543:[.931,0,.556],544:[.71,.2,.852],545:[.695,.155,.611],546:[.699,.02,.552],547:[.658,.022,.5],548:[.683,.167,.611],549:[.431,.167,.5],550:[.866,0,.75],551:[.622,.011,.5],552:[.68,.201,.681],553:[.448,.209,.444],554:[1.015,.022,.778],555:[.769,.011,.5],556:[1.035,.022,.778],557:[.769,.011,.5],558:[.866,.022,.778],559:[.622,.011,.5],560:[1.023,.022,.778],561:[.789,.011,.5],562:[.853,0,.75],563:[.609,.205,.528],564:[.694,.154,.383],565:[.441,.155,.611],566:[.615,.154,.389],568:[.695,.011,.833],569:[.441,.195,.833],570:[.741,.068,.75],571:[.741,.068,.722],572:[.58,.13,.444],573:[.683,0,.625],574:[.741,.068,.722],575:[.448,.205,.394],576:[.431,.205,.444],577:[.705,0,.444],578:[.448,0,.444],579:[.683,0,.708],580:[.683,.022,.75],581:[.716,0,.75],582:[.741,.068,.68],583:[.58,.13,.444],584:[.683,.022,.513],585:[.669,.205,.312],586:[.683,.205,.715,{ic:.037}],587:[.442,.205,.593,{ic:.041}],588:[.683,.022,.736],589:[.442,0,.391],590:[.683,0,.75],591:[.431,.205,.527],11377:[.441,.021,.587],7680:[.716,.23,.75],7681:[.448,.23,.5],7682:[.866,0,.708],7683:[.862,.011,.556],7684:[.683,.187,.708],7685:[.694,.209,.556],7686:[.683,.149,.708],7687:[.694,.171,.556],7688:[.917,.212,.722],7689:[.673,.205,.444],7690:[.866,0,.764],7691:[.862,.011,.556],7692:[.683,.187,.764],7693:[.694,.188,.556],7694:[.683,.149,.764],7695:[.694,.15,.556],7696:[.683,.202,.764],7697:[.694,.205,.556],7698:[.683,.219,.764],7699:[.694,.22,.556],7700:[1.121,0,.681],7701:[.9,.011,.444],7702:[1.117,0,.681],7703:[.892,.011,.444],7704:[.68,.222,.681],7705:[.448,.234,.444],7706:[.68,.183,.681],7707:[.448,.195,.444],7708:[.933,.201,.681],7709:[.689,.209,.444],7710:[.866,0,.653],7711:[.862,0,.306,{ic:.051}],7712:[.853,.022,.785],7713:[.609,.206,.5],7714:[.866,0,.75],7715:[.862,0,.556],7716:[.683,.189,.75],7717:[.694,.188,.556],7718:[.868,0,.75],7719:[.864,0,.556],7720:[.683,.198,.75],7721:[.694,.199,.556,{ic:.007}],7722:[.683,.222,.75],7723:[.694,.221,.556],7724:[.683,.185,.361],7725:[.657,.183,.278,{ic:.043}],7726:[1.098,0,.361],7727:[.852,0,.278],7728:[.936,0,.778],7729:[.932,0,.528],7730:[.683,.188,.778],7731:[.694,.189,.528],7732:[.683,.15,.778],7733:[.694,.151,.528],7734:[.683,.19,.625],7735:[.694,.188,.278],7736:[.832,.19,.625],7737:[.849,.188,.278,{ic:.059}],7738:[.683,.152,.625],7739:[.694,.15,.278,{ic:.06}],7740:[.683,.222,.625],7741:[.694,.22,.278,{ic:.011}],7742:[.936,0,.917],7743:[.692,0,.833],7744:[.866,0,.917],7745:[.622,0,.833],7746:[.683,.166,.917],7747:[.442,.191,.833],7748:[.866,0,.75],7749:[.622,0,.556],7750:[.683,.186,.75],7751:[.442,.186,.556],7752:[.683,.148,.75],7753:[.442,.148,.556],7754:[.683,.218,.75],7755:[.442,.218,.556],7756:[1.118,.022,.778],7757:[.852,.011,.5],7758:[1.05,.022,.778],7759:[.784,.011,.5],7760:[1.114,.022,.778],7761:[.88,.011,.5],7762:[1.106,.022,.778],7763:[.872,.011,.5],7764:[.936,0,.681],7765:[.692,.194,.556],7766:[.866,0,.681],7767:[.622,.194,.556],7768:[.866,.022,.736],7769:[.622,0,.392],7770:[.683,.188,.736],7771:[.442,.2,.392],7772:[.853,.188,.736],7773:[.609,.2,.392,{ic:.002}],7774:[.683,.15,.736],7775:[.442,.162,.392],7776:[.866,.022,.556],7777:[.622,.011,.394],7778:[.705,.221,.556],7779:[.448,.192,.394],7780:[1.064,.022,.556],7781:[.82,.011,.394],7782:[1.076,.022,.556],7783:[.822,.011,.394],7784:[.875,.221,.556],7785:[.616,.192,.394],7786:[.866,0,.722],7787:[.792,.011,.389],7788:[.677,.192,.722],7789:[.615,.192,.389],7790:[.677,.154,.722],7791:[.615,.154,.389,{ic:.029}],7792:[.677,.224,.722],7793:[.615,.224,.389],7794:[.683,.187,.75],7795:[.442,.176,.556],7796:[.683,.205,.75],7797:[.442,.187,.556],7798:[.683,.244,.75],7799:[.442,.226,.556],7800:[1.106,.022,.75],7801:[.872,.011,.556],7802:[1.048,.022,.75],7803:[.804,.011,.556],7804:[.867,.022,.75],7805:[.623,.011,.528],7806:[.683,.232,.75],7807:[.431,.209,.528],7808:[.944,.022,1.028],7809:[.7,.011,.722],7810:[.936,.022,1.028],7811:[.692,.011,.722],7812:[.868,.022,1.028],7813:[.624,.011,.722],7814:[.866,.022,1.028],7815:[.622,.011,.722],7816:[.683,.186,1.028],7817:[.431,.191,.722],7818:[.866,0,.75],7819:[.622,0,.528],7820:[.868,0,.75],7821:[.624,0,.528],7822:[.866,0,.75],7823:[.622,.205,.528],7824:[.928,0,.611],7825:[.684,0,.444],7826:[.683,.192,.611],7827:[.431,.192,.444],7828:[.683,.154,.611],7829:[.431,.154,.444],7830:[.694,.15,.556],7831:[.794,.011,.389],7832:[.71,.011,.722],7833:[.71,.205,.528],7834:[.667,.011,.818],7835:[.868,0,.306,{ic:.051}],7838:[.705,.022,1.111],7840:[.716,.2,.75],7841:[.448,.2,.5],7842:[.967,0,.75],7843:[.709,.011,.5],7844:[1.052,0,.75],7845:[.832,.011,.5],7846:[1.052,0,.75],7847:[.832,.011,.5],7848:[1.078,0,.75],7849:[.858,.011,.5],7850:[1.004,0,.75],7851:[.784,.011,.5],7852:[.87,.2,.75],7853:[.694,.2,.5],7854:[1.101,0,.75],7855:[.873,.011,.5],7856:[1.101,0,.75],7857:[.873,.011,.5],7858:[1.127,0,.75],7859:[.899,.011,.5],7860:[1.053,0,.75],7861:[.825,.011,.5],7862:[.918,.2,.75],7863:[.69,.2,.5],7864:[.68,.2,.681],7865:[.448,.2,.444],7866:[.967,0,.681],7867:[.709,.011,.444],7868:[.831,0,.681],7869:[.653,.011,.444],7870:[1.052,0,.681],7871:[.832,.011,.444],7872:[1.052,0,.681],7873:[.832,.011,.444],7874:[1.078,0,.681],7875:[.858,.011,.444],7876:[1.004,0,.681],7877:[.784,.011,.444],7878:[.87,.2,.681],7879:[.694,.2,.444],7880:[.967,0,.361],7881:[.709,0,.278],7882:[.683,.2,.361],7883:[.657,.2,.278],7884:[.705,.2,.778],7885:[.448,.2,.5],7886:[.967,.022,.778],7887:[.709,.011,.5],7888:[1.052,.022,.778],7889:[.832,.011,.5],7890:[1.052,.022,.778],7891:[.832,.011,.5],7892:[1.078,.022,.778],7893:[.858,.011,.5],7894:[1.004,.022,.778],7895:[.784,.011,.5],7896:[.87,.2,.778],7897:[.694,.2,.5],7898:[.909,.022,.778],7899:[.698,.011,.5],7900:[.909,.022,.778],7901:[.698,.011,.5],7902:[.967,.022,.778],7903:[.709,.011,.5],7904:[.831,.022,.778],7905:[.653,.011,.5],7906:[.789,.2,.778],7907:[.536,.2,.5],7908:[.683,.2,.75],7909:[.442,.2,.556],7910:[.967,.022,.75],7911:[.709,.011,.556],7912:[.909,.022,.75],7913:[.698,.011,.556,{ic:.015}],7914:[.909,.022,.75],7915:[.698,.011,.556,{ic:.015}],7916:[.967,.022,.75],7917:[.709,.011,.556,{ic:.015}],7918:[.831,.022,.75],7919:[.653,.011,.556,{ic:.015}],7920:[.789,.2,.75],7921:[.536,.2,.556,{ic:.015}],7922:[.909,0,.75],7923:[.698,.205,.528],7924:[.683,.2,.75],7925:[.431,.205,.528],7926:[.967,0,.75],7927:[.709,.205,.528],7928:[.831,0,.75],7929:[.653,.205,.528]}}},"NCM"),{},["MJX-NCM-LR"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/latin","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/monospace.js 0000644 0001762 0000144 00000012057 15112352537 023302 0 ustar ligges users (()=>{"use strict";const s=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","monospace",s({M:{normal:{120432:[.623,0,.525],120433:[.611,0,.525,{sk:-.073}],120434:[.622,.011,.525,{sk:.1}],120435:[.611,0,.525,{sk:-.098}],120436:[.611,0,.525],120437:[.611,0,.525],120438:[.622,.011,.525,{sk:.072}],120439:[.611,0,.525],120440:[.611,0,.525],120441:[.611,.011,.525,{sk:.085}],120442:[.611,0,.525],120443:[.611,0,.525,{sk:-.11}],120444:[.611,0,.525],120445:[.611,0,.525],120446:[.622,.011,.525],120447:[.611,0,.525,{sk:-.07}],120448:[.622,.139,.525],120449:[.611,.011,.525,{sk:-.097}],120450:[.622,.011,.525,{sk:.046}],120451:[.611,0,.525],120452:[.611,.011,.525],120453:[.611,.008,.525],120454:[.611,.008,.525],120455:[.611,0,.525],120456:[.611,0,.525],120457:[.611,0,.525],120458:[.44,.006,.525,{sk:-.048}],120459:[.611,.006,.525,{sk:-.172}],120460:[.44,.006,.525,{sk:.043}],120461:[.611,.006,.525,{sk:.088}],120462:[.44,.006,.525],120463:[.617,0,.525,{sk:.077}],120464:[.442,.229,.525,{sk:.07}],120465:[.611,0,.525,{sk:-.172}],120466:[.605,0,.525],120467:[.605,.228,.525,{sk:.057}],120468:[.611,0,.525,{sk:-.169}],120469:[.611,0,.525,{sk:-.085}],120470:[.437,0,.525,{sk:-.052}],120471:[.437,0,.525,{sk:-.071}],120472:[.44,.006,.525],120473:[.437,.222,.525,{sk:-.074}],120474:[.437,.222,.525,{ic:.012,sk:.044}],120475:[.437,0,.525,{sk:-.018}],120476:[.44,.006,.525,{sk:.04}],120477:[.554,.006,.525,{sk:-.074}],120478:[.431,.006,.525,{sk:-.043}],120479:[.431,.004,.525],120480:[.431,.004,.525],120481:[.431,0,.525],120482:[.431,.228,.525],120483:[.431,0,.525],120822:[.622,.011,.525],120823:[.622,0,.525,{sk:.015}],120824:[.622,0,.525,{sk:-.011}],120825:[.622,.011,.525,{sk:-.015}],120826:[.623,0,.525,{sk:.06}],120827:[.611,.011,.525],120828:[.622,.011,.525,{sk:.054}],120829:[.627,.011,.525,{sk:-.184}],120830:[.622,.011,.525],120831:[.622,.011,.525]},monospace:{305:[.431,0,.525],567:[.431,.228,.525],32:[0,0,.525],33:[.622,0,.525],34:[.622,-.328,.525],35:[.611,0,.525],36:[.694,.083,.525],37:[.694,.083,.525],38:[.622,.011,.525],39:[.622,-.328,.525],40:[.694,.082,.525],41:[.694,.082,.525],42:[.521,-.09,.525],43:[.531,-.081,.525],44:[.125,.139,.525],45:[.341,-.271,.525],46:[.125,0,.525],47:[.694,.083,.525],58:[.431,0,.525],59:[.431,.139,.525],60:[.556,-.056,.525],61:[.417,-.195,.525],62:[.556,-.056,.525],63:[.617,0,.525],64:[.617,.006,.525],91:[.694,.083,.525],92:[.694,.083,.525],93:[.694,.083,.525],94:[.626,-.479,.525],95:[-.097,.167,.525],96:[.622,-.488,.525],123:[.694,.083,.525],124:[.694,.083,.525],125:[.694,.083,.525],126:[.366,-.246,.525],160:[0,0,.525],163:[.611,.011,.525],165:[.611,0,.525],167:[.622,.122,.525],168:[.6,-.51,.525],172:[.417,-.195,.525],175:[.577,-.514,.525],176:[.611,-.319,.525],177:[.45,0,.525],180:[.622,-.488,.525],181:[.43,.222,.525],182:[.694,.194,.525],183:[.368,-.243,.525],215:[.475,-.137,.525],240:[.611,.006,.525],247:[.58,-.031,.525],710:[.624,-.487,.525],711:[.623,-.486,.525],728:[.612,-.499,.525],729:[.605,-.505,.525],730:[.651,-.471,.525],732:[.615,-.495,.525],768:[.622,-.488,.272],769:[.622,-.488,.272],770:[.624,-.487,0,{dx:.262}],771:[.615,-.495,0,{dx:.262}],772:[.587,-.524,0,{dx:.262}],773:[.622,-.552,.525],774:[.612,-.499,0,{dx:.262}],775:[.605,-.505,0,{dx:.262}],776:[.6,-.51,0,{dx:.263}],778:[.651,-.471,.525],780:[.623,-.486,0,{dx:.262}],913:[.623,0,.525],914:[.611,0,.525],915:[.611,0,.525],916:[.623,0,.525],917:[.611,0,.525],918:[.611,0,.525],919:[.611,0,.525],920:[.622,.011,.525],921:[.611,0,.525],922:[.611,0,.525],923:[.623,0,.525],924:[.611,0,.525],925:[.611,0,.525],926:[.611,0,.525],927:[.622,.011,.525],928:[.611,0,.525],929:[.611,0,.525],931:[.611,0,.525],932:[.611,0,.525],933:[.622,0,.525],934:[.611,0,.525],935:[.611,0,.525],936:[.611,0,.525],937:[.622,0,.525],945:[.436,.005,.525,{ic:.001}],946:[.644,.233,.525],947:[.436,.177,.525],948:[.634,.005,.525],949:[.442,.011,.525],950:[.65,.133,.525],951:[.442,.233,.525],952:[.644,.005,.525],953:[.436,.005,.525],954:[.444,.014,.525],955:[.641,.005,.525],956:[.441,.227,.525],957:[.439,.005,.525],958:[.65,.133,.525],959:[.436,.005,.525],960:[.43,.005,.525],961:[.436,.222,.525],962:[.436,.111,.525],963:[.436,.005,.525],964:[.43,.005,.525],965:[.441,.005,.525],966:[.442,.233,.525],967:[.437,.229,.525],968:[.65,.233,.525],969:[.441,.005,.525],977:[.644,.005,.525],978:[.622,0,.525],981:[.64,.233,.525],982:[.441,.005,.525],1008:[.452,.032,.525],1009:[.436,.222,.525],1012:[.622,.011,.525],1013:[.436,.005,.525],1014:[.436,.005,.525],8208:[.341,-.271,.525],8209:[.341,-.271,.525],8210:[.246,-.185,.525],8211:[.341,-.271,.525],8212:[.341,-.271,.525],8214:[.694,.083,.525],8216:[.681,-.372,.525],8217:[.611,-.302,.525],8220:[.622,-.328,.525],8221:[.622,-.328,.525],8224:[.705,.216,.525],8225:[.705,.205,.525],8230:[.125,0,.525],8260:[.626,.015,.525],8364:[.622,.011,.525],8486:[.622,0,.525],8487:[.612,.01,.525],8592:[.481,-.131,.525],8593:[.611,0,.525],8594:[.481,-.131,.525],8595:[.611,0,.525],8722:[.341,-.271,.525],8734:[.435,.004,.525]}}},"NCM"));MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/monospace","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/arrows.js 0000644 0001762 0000144 00000032024 15112352537 022627 0 ustar ligges users (()=>{"use strict";const s=MathJax._.output.chtml.DynamicFonts.AddFontIds,t=MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont,r=MathJax._.output.common.Direction,i=(r.DIRECTION,r.V),e=r.H;t.dynamicSetup("","arrows",s({AR:{normal:{8604:[.47,-.09,.889],8605:[.47,-.09,.889],8607:[.689,.213,.572],8609:[.713,.189,.572],8613:[.679,.183,.632],8615:[.683,.179,.632],8616:[.757,.172,.5,{ic:.01}],8621:[.51,.01,.996],8623:[.703,.177,.608],8624:[.679,.179,.564],8625:[.679,.179,.564],8626:[.679,.179,.564],8627:[.679,.179,.564],8628:[.53,.006,.882],8629:[.65,.15,.65],8632:[.733,.203,.92],8633:[.672,.172,1.018],8662:[.682,.272,1.066],8663:[.682,.272,1.066],8664:[.772,.182,1.066],8665:[.772,.182,1.066],8668:[.51,.01,.997],8669:[.51,.01,.997],8670:[.693,.192,.997],8671:[.693,.192,.997],8678:[.52,.02,1.05],8679:[.725,.213,.652],8680:[.52,.02,1.05],8681:[.713,.225,.652],8682:[.725,.213,.652],8683:[.725,.213,.652],8684:[.725,.213,.652],8685:[.725,.213,.652],8686:[.725,.213,.652],8687:[.725,.213,.652],8688:[.52,.02,1.05],8689:[.733,.107,.92],8690:[.733,.107,.92],8691:[.725,.225,.652],8692:[.51,.01,.999],8695:[.525,.025,.997],8696:[.535,.025,.997],8697:[.533,.025,1],8698:[.535,.034,.997],8699:[.535,.034,.997],8700:[.534,.025,1],8701:[.51,.01,1],8702:[.51,.01,1],8703:[.51,.01,1],9166:[.713,.02,1.05],10145:[.469,-.031,.977],10224:[.702,.202,1.015],10225:[.702,.202,1.015],10226:[.651,-.032,.941],10227:[.65,-.032,.941],10228:[.592,.092,1.121],10239:[.51,.01,1.463],10496:[.519,.01,1.017],10497:[.519,.01,1.017],10498:[.52,.02,1],10499:[.52,.02,1],10500:[.52,.02,1],10501:[.519,.01,1.017],10502:[.52,.029,.991],10503:[.52,.029,.991],10504:[.703,.179,.5,{ic:.013}],10505:[.703,.179,.5,{ic:.013}],10508:[.51,.01,1],10509:[.51,.01,1],10510:[.51,.01,1],10511:[.51,.01,1],10512:[.51,.01,1.375],10513:[.51,.01,1],10514:[.765,.203,.5,{ic:.01}],10515:[.765,.203,.5,{ic:.01}],10516:[.526,.002,1.214],10517:[.526,.002,1.214],10518:[.51,.01,1.23],10519:[.526,.01,1.23],10520:[.526,.01,1.23],10521:[.519,.001,1.12],10522:[.519,.001,1.12],10523:[.519,.001,1.12],10524:[.519,.001,1.12],10525:[.51,.01,1.332],10526:[.51,.01,1.332],10527:[.51,.011,1.332],10528:[.51,.011,1.332],10529:[.62,.121,.837],10530:[.62,.12,.837],10531:[.635,.174,.716],10532:[.635,.174,.716],10533:[.629,.181,.716],10534:[.629,.181,.716],10535:[.714,.203,1],10536:[.714,.204,1],10537:[.714,.203,1],10538:[.714,.204,1],10539:[.609,.123,.83],10540:[.603,.116,.83],10541:[.738,.208,1],10542:[.714,.214,1],10543:[.678,.128,.83,{ic:.014}],10544:[.682,.122,.83,{ic:.019}],10545:[.715,.203,1],10546:[.715,.203,1],10547:[.51,.01,1.077],10548:[.654,-.229,1.118],10549:[.271,.154,1.118],10550:[.746,.01,.854],10551:[.746,.01,.854],10552:[.83,.038,.445],10553:[.83,.038,.445],10554:[.562,-.229,.98],10555:[.562,-.229,.98],10556:[.562,-.229,.98],10557:[.562,-.117,.98],10558:[.509,-.015,.771],10559:[.509,-.015,.771],10560:[.794,.062,.728],10561:[.786,.061,.728],10562:[.672,.172,1.018],10563:[.672,.172,1.018],10564:[.672,.172,1.018],10565:[.672,.028,1.018],10566:[.672,.028,1.018],10567:[.51,.01,1],10568:[.51,.01,1],10569:[.707,.375,1.017],10572:[.706,.206,.606],10573:[.706,.206,.606],10575:[.828,.095,.373],10577:[.828,.095,.373],10580:[.736,.252,.621],10581:[.736,.252,.621],10584:[.735,.251,.62],10585:[.735,.251,.62],10588:[.705,.205,.62],10589:[.705,.205,.62],10592:[.705,.205,.62],10593:[.705,.205,.62],10594:[.6,.1,1.018],10595:[.703,.203,.8],10596:[.6,.1,1.018],10597:[.703,.203,.8],10598:[.66,-.071,1.018],10599:[.427,.162,1.018],10600:[.66,-.071,1.018],10601:[.427,.162,1.018],10608:[.367,-.133,1.046],10609:[.524,.01,1],10610:[.566,.01,1.085],10611:[.71,-.134,1.065],10612:[.71,-.134,1.065],10613:[.83,-.043,1.039],10614:[.752,.01,1],10615:[.547,.052,1.123],10616:[.752,.01,1],10617:[.743,.01,1],10618:[.543,.043,1.073],10619:[.743,.01,1],11008:[.606,.15,.823],11009:[.605,.15,.823],11010:[.594,.161,.823],11011:[.594,.161,.823],11012:[.52,.02,1.062],11013:[.469,-.031,.977],11014:[.672,.193,.612],11015:[.693,.172,.612],11016:[.548,.127,.612,{ic:.002}],11017:[.548,.127,.612,{ic:.002}],11018:[.552,.132,.612,{ic:.006}],11019:[.548,.127,.612,{ic:.002}],11020:[.469,-.031,1.022],11021:[.672,.172,.549],11022:[.27,.076,.882],11023:[.576,-.23,.882],11024:[.27,.076,.882],11025:[.576,-.23,.882],11026:[.583,.083,.778],11056:[.51,.01,.999],11057:[.99,.49,.997],11058:[.592,.092,1.121],11059:[.51,.01,1.463],11060:[.519,.01,1.017],11061:[.519,.01,1.017],11062:[.519,.01,1.017],11063:[.51,.01,1.375],11064:[.51,.01,1],11065:[.526,.002,1.214],11066:[.526,.002,1.214],11067:[.51,.01,1.23],11068:[.526,.01,1.23],11069:[.526,.01,1.23],11070:[.51,.01,1],11071:[.51,.01,1.077],11072:[.524,.01,1],11073:[.519,.01,1],11074:[.83,-.043,1.039],11075:[.553,.047,1.123],11076:[.543,.043,1.073],11077:[.617,.117,1.015],11078:[.617,.117,1.015],11079:[.566,.01,1.085],11080:[.83,-.043,1.039],11081:[.566,.01,1.083],11082:[.83,-.043,1.039],11083:[.71,-.134,1.065],11084:[.71,-.134,1.065],11085:[.886,.041,.535],11086:[.773,-.161,.571],11087:[.775,-.162,.571],11098:[.689,0,.972],11099:[.638,.106,.901],11100:[.842,.003,.918],11101:[.84,.003,.918],11102:[.811,.032,.674],11103:[.563,.032,.674],11104:[.38,-.12,1],11105:[.692,.192,.39],11106:[.38,-.12,1],11107:[.692,.192,.39],11108:[.38,-.12,1.17],11109:[.768,.268,.41],11110:[.569,.071,1],11111:[.568,.071,.39,{ic:.124}],11112:[.571,.067,1],11113:[.57,.069,.39,{ic:.126}],11114:[.38,-.12,1],11115:[.682,.182,.388],11116:[.38,-.12,1],11117:[.682,.182,.388],11118:[.57,.087,.851],11119:[.57,.087,.851],11120:[.51,.01,1.132],11121:[.753,.253,.676],11122:[.51,.01,1.132],11123:[.753,.253,.676],11126:[.753,.071,.814],11127:[.753,.071,.814],11128:[.768,.069,.814],11129:[.755,.069,.814],11130:[.535,.035,.998],11131:[.693,.192,.704],11132:[.535,.035,.998],11133:[.693,.192,.704],11134:[.672,.172,1.132],11135:[.753,.253,1.008],11136:[.542,.042,1.022],11137:[.698,.198,1.022],11138:[.542,.042,1.022],11139:[.698,.198,1.022],11140:[.542,.042,1.022],11141:[.698,.198,1.022],11142:[.542,.042,1.022],11143:[.698,.198,1.022],11144:[.516,.016,.635],11145:[.513,.013,.635],11146:[.516,.016,.635],11147:[.513,.013,.635],11148:[.685,.009,1.102],11149:[.798,.123,.882],11150:[.684,.01,1.102],11151:[.798,.123,.882],11152:[.628,-.12,1.096],11153:[.628,-.12,1.096],11154:[.628,-.12,1.096],11155:[.628,-.12,1.096],11156:[.558,.068,.976],11157:[.359,-.141,.76],11160:[.564,.041,.649],11161:[.524,.004,.683],11162:[.564,.041,.649],11163:[.527,0,.683],11164:[.564,.041,.649],11165:[.524,.004,.683],11166:[.564,.041,.649],11167:[.527,0,.683],11168:[.607,-.12,.918],11169:[.607,-.12,.918],11170:[.608,-.123,.918],11171:[.608,-.123,.918],11172:[.791,.001,.646],11173:[.791,.001,.646],11174:[.791,.001,.646],11175:[.791,.001,.646],11176:[.571,-.027,.977],11177:[.571,-.027,.977],11178:[.571,-.031,.977],11179:[.571,-.027,.977],11180:[.734,.134,.667],11181:[.734,.134,.667],11182:[.731,.137,.667],11183:[.731,.137,.667],11184:[.713,.02,1.05],11185:[.713,.02,1.05],11186:[.713,.02,1.05],11187:[.713,.02,1.05],11188:[.816,.123,.926],11189:[.816,.123,.926],11190:[.816,.123,.926],11191:[.816,.123,.926],11192:[.725,.144,.652],11244:[.381,-.119,1],11245:[.692,.192,.39],11246:[.381,-.12,1],11247:[.692,.192,.39]}},ARL:{"-largeop":{8593:[.912,.436,.5],8595:[.936,.412,.5],8597:[.757,.257,.572],8598:[.947,.436,1.495],8599:[.947,.436,1.495],8600:[.936,.447,1.495],8601:[.936,.447,1.495],8602:[.51,.01,1.463],8603:[.51,.01,1.463],8606:[.51,.01,1.463],8607:[.912,.436,.572],8608:[.51,.01,1.463],8609:[.936,.412,.572],8610:[.51,.01,1.658],8611:[.51,.01,1.658],8613:[.912,.416,.632],8615:[.916,.412,.632],8617:[.55,.01,1.463],8618:[.55,.01,1.463],8619:[.55,.05,1.463],8620:[.55,.05,1.463],8621:[.51,.01,1.442],8622:[.51,.01,1.442],8624:[.834,.334,.797],8625:[.834,.334,.797],8626:[.834,.334,.797],8627:[.834,.334,.797],8630:[.659,-.229,1.33],8631:[.659,-.229,1.33],8636:[.503,-.23,1.478],8637:[.27,.003,1.478],8638:[.93,.436,.441],8639:[.93,.436,.441],8640:[.503,-.23,1.478],8641:[.27,.003,1.478],8642:[.936,.43,.441],8643:[.936,.43,.441],8644:[.672,.172,1.484],8645:[.936,.436,.896],8646:[.672,.172,1.484],8647:[.75,.25,1.463],8648:[.912,.436,.992],8649:[.75,.25,1.463],8650:[.936,.412,.992],8651:[.6,.1,1.484],8652:[.6,.1,1.484],8653:[.52,.02,1.457],8654:[.52,.02,1.534],8655:[.52,.02,1.457],8657:[.909,.436,.652],8659:[.936,.409,.652],8661:[.961,.461,.652],8662:[.915,.505,1.532],8663:[.915,.505,1.532],8664:[1.005,.415,1.532],8665:[1.005,.415,1.532],8666:[.617,.117,1.461],8667:[.617,.117,1.461],8678:[.52,.02,1.496],8679:[.948,.436,.652],8680:[.52,.02,1.496],8681:[.936,.448,.652],8691:[.948,.448,.652],8693:[.936,.436,.896],8694:[.99,.49,1.463],11012:[.52,.02,1.508],11013:[.469,-.031,1.423],11014:[.895,.416,.612],11015:[.916,.395,.612],11020:[.469,-.031,1.468],11021:[.895,.395,.549],11057:[.99,.49,1.463]}},"":{"-lf-tp":{8678:[.52,.02,.519],8679:[.519,0,.652],8680:[.369,-.131,.519],8681:[.519,0,.652],10503:[.52,.021,.497],11013:[.469,-.031,.492],11014:[.492,0,.612]},"-rt-bt":{8678:[.369,-.131,.519],8679:[.519,0,.652],8680:[.52,.02,.519],8681:[.519,0,.652],10502:[.52,.021,.497],11015:[.492,0,.612],11020:[.469,-.031,.484]},"-ex-md":{8678:[.369,-.131,.346],8679:[.346,0,.652],11013:[.349,-.151,.327],11014:[.327,0,.612]}}},"NCM"),{8607:{dir:i,sizes:[.903,1.349],variants:[0,2],stretch:[8607,8593],stretchv:[3,1],HDW:[.689,.213,.5]},8609:{dir:i,sizes:[.903,1.349],variants:[0,2],stretch:[0,8593,8609],stretchv:[0,1,4],HDW:[.713,.189,.5]},8613:{dir:i,sizes:[.863,1.329],variants:[0,2],stretch:[8593,8593,8613],stretchv:[3,1,4],HDW:[.679,.183,.5]},8615:{dir:i,sizes:[.863,1.329],variants:[0,2],stretch:[8615,8593,8595],stretchv:[3,1,4],HDW:[.683,.179,.5]},8621:{dir:e,sizes:[.996,1.442],variants:[0,2]},8622:{dir:e,sizes:[.996,1.442],variants:[0,2],stretch:[8602,8592,8603,8602],stretchv:[3,1,4,1],HDW:[.51,.01,.996],hd:[.274,-.226]},8624:{dir:i,sizes:[.859,1.169],variants:[0,2]},8625:{dir:i,sizes:[.859,1.169],variants:[0,2]},8626:{dir:i,sizes:[.859,1.169],variants:[0,2]},8627:{dir:i,sizes:[.859,1.169],variants:[0,2]},8662:{dir:i,sizes:[.955,1.421],variants:[0,2]},8663:{dir:i,sizes:[.955,1.421],variants:[0,2]},8664:{dir:i,sizes:[.955,1.421],variants:[0,2]},8665:{dir:i,sizes:[.955,1.421],variants:[0,2]},8668:{dir:e,sizes:[.997,1.463],variants:[0,0],schar:[8668,11059]},8669:{dir:e,sizes:[.997,1.463],variants:[0,0],schar:[8669,10239]},8678:{dir:e,sizes:[1.05,1.496],variants:[0,2],stretch:[8678,8678,8678],stretchv:[3,1,4],HDW:[.52,.02,1.05],hd:[.369,-.131]},8679:{dir:i,sizes:[.939,1.385],variants:[0,2],stretch:[8679,8679,8679],stretchv:[3,1,4],HDW:[.725,.213,.652]},8680:{dir:e,sizes:[1.05,1.496],variants:[0,2],stretch:[8680,8678,8680],stretchv:[3,1,4],HDW:[.52,.02,1.05],hd:[.369,-.131]},8681:{dir:i,sizes:[.939,1.385],variants:[0,2],stretch:[8681,8679,8681],stretchv:[3,1,4],HDW:[.713,.225,.652]},8691:{dir:i,sizes:[.951,1.397],variants:[0,2],stretch:[8679,8679,8681],stretchv:[3,1,4],HDW:[.725,.225,.652]},10145:{dir:e,sizes:[.977,1.423],variants:[0,2],stretch:[0,11013,11020],stretchv:[0,1,4],HDW:[.469,-.031,.977],hd:[.349,-.151]},10237:{c:10502,dir:e,sizes:[.991,1.437],variants:[0,0],schar:[10502,10237],stretch:[8656,8656,10502],stretchv:[3,1,4],HDW:[.52,.021,.991],hd:[.369,-.131]},10238:{c:10503,dir:e,sizes:[.991,1.437],variants:[0,0],schar:[10503,10238],stretch:[10503,8656,8658],stretchv:[3,1,4],HDW:[.52,.021,.991],hd:[.369,-.131]},10502:{dir:e,sizes:[.991,1.437],variants:[0,0],schar:[10502,10237],stretch:[8656,8656,10502],stretchv:[3,1,4],HDW:[.52,.021,.991],hd:[.369,-.131]},10503:{dir:e,sizes:[.991,1.437],variants:[0,0],schar:[10503,10238],stretch:[10503,8656,8658],stretchv:[3,1,4],HDW:[.52,.021,.991],hd:[.369,-.131]},10572:{dir:i,sizes:[.911],stretch:[10572,10572,10572],stretchv:[3,1,4],HDW:[.706,.206,.616]},10573:{dir:i,sizes:[.911],stretch:[10573,10572,10573],stretchv:[3,1,4],HDW:[.706,.206,.616]},10575:{dir:i,sizes:[.922],stretch:[10572,10572,10573],stretchv:[3,1,4],HDW:[.828,.095,.616]},10577:{dir:i,sizes:[.922],stretch:[10573,10572,10572],stretchv:[3,1,4],HDW:[.828,.095,.616]},10588:{dir:i,sizes:[.909],stretch:[10572,10572,8613],stretchv:[3,1,4],HDW:[.705,.205,.616]},10589:{dir:i,sizes:[.909],stretch:[8615,10572,10573],stretchv:[3,1,4],HDW:[.705,.205,.616]},10592:{dir:i,sizes:[.909],stretch:[10573,10572,8613],stretchv:[3,1,4],HDW:[.705,.205,.616]},10593:{dir:i,sizes:[.909],stretch:[8615,10572,10572],stretchv:[3,1,4],HDW:[.705,.205,.616]},11012:{dir:e,sizes:[1.062,1.508],variants:[0,2],stretch:[8678,8678,8680],stretchv:[3,1,4],HDW:[.52,.02,1.062],hd:[.369,-.131]},11013:{dir:e,sizes:[.977,1.423],variants:[0,2],stretch:[11013,11013],stretchv:[3,1],HDW:[.469,-.031,.977],hd:[.349,-.151]},11014:{dir:i,sizes:[.866,1.312],variants:[0,2],stretch:[11014,11014],stretchv:[3,1],HDW:[.672,.193,.612]},11015:{dir:i,sizes:[.866,1.312],variants:[0,2],stretch:[0,11014,11015],stretchv:[0,1,4],HDW:[.693,.172,.612]},11020:{dir:e,sizes:[1.022,1.468],variants:[0,2],stretch:[0,11013,11020],stretchv:[0,1,4],HDW:[.469,-.031,1.022],hd:[.349,-.151]},11021:{dir:i,sizes:[.845,1.291],variants:[0,2],stretch:[11014,11014,11015],stretchv:[3,1,4],HDW:[.672,.172,.612]},11057:{dir:e,sizes:[.997,1.463],variants:[0,2],stretch:[11057,8694],stretchv:[3,1],HDW:[.99,.49,.997],hd:[.751,.251]}},["MJX-NCM-AR","MJX-NCM-ARL"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/arrows","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/hebrew.js 0000644 0001762 0000144 00000037177 15112352537 022604 0 ustar ligges users (()=>{"use strict";const d=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","hebrew",d({HE:{normal:{1425:[-.068,.291,0,{dx:-.001}],1426:[.972,-.746,0,{dx:0}],1427:[1.033,-.746,0,{dx:-.001}],1428:[.972,-.746,0,{dx:0}],1429:[.976,-.746,0,{dx:0}],1430:[-.068,.307,0,{dx:-.001}],1431:[.959,-.746,0,{dx:-.001}],1432:[.911,-.746,0,{dx:0}],1433:[.985,-.746,0,{dx:-.001}],1434:[-.068,.291,0,{dx:-.001}],1435:[-.068,.307,0,{dx:-.001}],1436:[.985,-.746,0,{dx:-.001}],1437:[.985,-.746,0,{dx:-.001}],1438:[.985,-.746,0,{dx:-.001}],1439:[.961,-.746,0,{dx:-.001}],1440:[.961,-.746,0,{dx:-.001}],1441:[.935,-.746,0,{dx:-.001}],1442:[-.068,.291,0,{dx:-.001}],1443:[-.068,.294,0,{dx:0}],1444:[-.068,.291,0,{dx:-.001}],1445:[-.068,.307,0,{dx:-.001}],1446:[-.068,.307,0,{dx:-.001}],1447:[-.068,.291,0,{dx:-.001}],1448:[.985,-.746,0,{dx:-.001}],1449:[.961,-.746,0,{dx:-.001}],1450:[-.068,.203,0,{dx:-.001}],1451:[.969,-.746,0,{dx:-.001}],1452:[.972,-.746,0,{dx:0}],1453:[-.068,.307,0,{dx:-.001}],1454:[.911,-.746,0,{dx:0}],1455:[.969,-.746,0,{dx:-.001}],1456:[-.067,.294,0,{dx:0}],1457:[-.068,.294,0,{dx:0}],1458:[-.068,.294,0,{dx:0}],1459:[-.068,.294,0,{dx:0}],1460:[-.067,.158,0,{dx:0}],1461:[-.067,.158,0,{dx:.001}],1462:[-.067,.294,0,{dx:.001}],1463:[-.079,.147,0,{dx:0}],1464:[-.079,.266,0,{dx:0}],1465:[.837,-.746,0,{dx:-0}],1466:[.837,-.746,0,{dx:-0}],1467:[-.067,.294,0,{dx:-.001}],1468:[.384,-.293,0],1469:[-.068,.298,0,{dx:-.001}],1470:[.678,-.588,.488],1471:[.836,-.768,0,{dx:0}],1472:[.749,.095,.202],1473:[.798,-.707,0,{dx:-.091}],1474:[.798,-.707,0,{dx:-.096}],1475:[.487,0,.344],1476:[.881,-.746,0,{dx:-.001}],1477:[-.068,.203,0,{dx:-.001}],1478:[.719,0,.415],1479:[-.079,.277,0,{dx:0}],1488:[.725,.012,.691],1489:[.725,.043,.604],1490:[.725,.034,.517],1491:[.713,.019,.596],1492:[.713,.003,.652],1493:[.713,.007,.367],1494:[.719,.019,.383],1495:[.713,.003,.652],1496:[.713,0,.656],1497:[.725,-.337,.37],1498:[.713,.297,.605],1499:[.725,.043,.604],1500:[1.034,.005,.607],1501:[.713,0,.632],1502:[.725,.032,.659],1503:[.713,.299,.363],1504:[.725,.043,.429,{ic:.038}],1505:[.713,.013,.632],1506:[.725,.154,.656],1507:[.713,.297,.594],1508:[.725,.043,.604],1509:[.725,.305,.656],1510:[.725,.032,.652],1511:[.713,.3,.607],1512:[.713,.007,.614],1513:[.713,0,.806],1514:[.713,.007,.631],1519:[1.061,-.337,.741],1520:[.713,.007,.768],1521:[.725,.007,.754],1522:[.725,-.337,.741],1523:[.794,-.509,.27],1524:[.794,-.509,.482],1525:[.713,.007,.367],1527:[.713,.3,.607],64285:[.725,-.142,.37],64286:[.855,-.739,0,{dx:-.001}],64287:[.725,-.077,.741],64288:[.725,.034,.647],64289:[.725,.012,1.311],64290:[.713,.019,1.296],64291:[.713,.003,1.312],64292:[.725,.043,1.27],64293:[1.034,.005,1.267],64294:[.713,0,1.282],64295:[.713,.007,1.284],64296:[.713,.007,1.311],64297:[.571,-.241,.684],64298:[.798,0,.806],64299:[.798,0,.806],64300:[.798,0,.806],64301:[.798,0,.806],64302:[.725,.147,.691],64303:[.725,.266,.691],64304:[.725,.012,.691],64305:[.725,.043,.604],64306:[.725,.034,.517],64307:[.713,.019,.596],64308:[.713,.003,.652],64309:[.713,.007,.367],64310:[.719,.019,.373],64311:[.713,.003,.652],64312:[.713,0,.656],64313:[.725,-.337,.37],64314:[.713,.297,.605],64315:[.725,.043,.604],64316:[1.034,.005,.607],64317:[.713,0,.632],64318:[.725,.032,.659],64319:[.713,.299,.363],64320:[.725,.043,.429,{ic:.038}],64321:[.713,.013,.632],64322:[.725,.154,.656],64323:[.713,.297,.594],64324:[.725,.043,.604],64325:[.725,.305,.656],64326:[.725,.032,.652],64327:[.713,.3,.607],64328:[.713,.007,.614],64329:[.713,0,.806],64330:[.713,.007,.631],64331:[.836,.007,.367],64332:[.836,.043,.604],64333:[.836,.043,.604],64334:[.836,.043,.604],64335:[1.032,.012,.861]}},HEB:{bold:{1425:[-.068,.291,0,{dx:-.001}],1426:[.972,-.746,0,{dx:0}],1427:[1.035,-.744,0,{dx:-.001}],1428:[.972,-.746,0,{dx:0}],1429:[.976,-.746,0,{dx:0}],1430:[-.068,.314,0,{dx:-.004}],1431:[.97,-.735,0,{dx:-.001}],1432:[.911,-.746,0,{dx:0}],1433:[.992,-.746,0,{dx:.002}],1434:[-.066,.293,0,{dx:-.001}],1435:[-.068,.314,0,{dx:-.001}],1436:[.992,-.746,0,{dx:-.004}],1437:[.992,-.746,0,{dx:-.004}],1438:[.992,-.746,0,{dx:-.004}],1439:[.961,-.739,0,{dx:-.001}],1440:[.961,-.739,0,{dx:.003}],1441:[.935,-.746,0,{dx:-.001}],1442:[-.068,.291,0,{dx:-.001}],1443:[-.068,.294,0,{dx:0}],1444:[-.066,.293,0,{dx:-.001}],1445:[-.068,.314,0,{dx:.002}],1446:[-.068,.314,0,{dx:.002}],1447:[-.068,.291,0,{dx:-.001}],1448:[.992,-.746,0,{dx:.002}],1449:[.961,-.739,0,{dx:-.004}],1450:[-.068,.203,0,{dx:-.001}],1451:[.971,-.744,0,{dx:-.001}],1452:[.972,-.746,0,{dx:0}],1453:[-.068,.314,0,{dx:-.004}],1454:[.911,-.746,0,{dx:0}],1455:[.969,-.746,0,{dx:-.001}],1456:[-.068,.294,0,{dx:0}],1457:[-.068,.294,0,{dx:0}],1458:[-.068,.294,0,{dx:0}],1459:[-.068,.294,0,{dx:0}],1460:[-.068,.158,0,{dx:0}],1461:[-.068,.158,0,{dx:0}],1462:[-.068,.294,0,{dx:0}],1463:[-.079,.147,0,{dx:0}],1464:[-.079,.266,0,{dx:0}],1465:[.836,-.746,0,{dx:0}],1466:[.836,-.746,0,{dx:0}],1467:[-.068,.294,0,{dx:-.001}],1468:[.384,-.293,0],1469:[-.068,.298,0,{dx:-.001}],1470:[.678,-.588,.488],1471:[.836,-.768,0,{dx:0}],1472:[.757,.103,.202],1473:[.798,-.707,0,{dx:-.671}],1474:[.798,-.707,0,{dx:-.176}],1475:[.487,0,.344],1476:[.881,-.746,0,{dx:-.001}],1477:[-.068,.203,0,{dx:-.001}],1478:[.758,0,.415],1479:[-.079,.277,0,{dx:0}],1488:[.751,.012,.691],1489:[.74,.054,.604],1490:[.73,.041,.517],1491:[.724,.046,.596],1492:[.724,.014,.652],1493:[.724,.007,.367],1494:[.742,.045,.383],1495:[.724,.014,.652],1496:[.724,0,.656],1497:[.739,-.325,.37],1498:[.724,.297,.605],1499:[.731,.054,.604],1500:[1.074,.005,.607],1501:[.724,0,.632],1502:[.73,.043,.659],1503:[.724,.31,.363],1504:[.731,.054,.429],1505:[.724,.013,.632],1506:[.73,.161,.656],1507:[.724,.297,.594],1508:[.731,.054,.604],1509:[.73,.333,.656],1510:[.73,.043,.652],1511:[.724,.309,.607],1512:[.724,.007,.614],1513:[.724,0,.806],1514:[.724,.007,.631],1515:[0,0,1],1519:[1.075,-.325,.741],1520:[.724,.007,.768],1521:[.739,.007,.754],1522:[.739,-.325,.741],1523:[.794,-.508,.27],1524:[.794,-.508,.482],1525:[.724,.007,.367],1527:[.724,.309,.607],64285:[.739,-.142,.37],64286:[.855,-.739,0,{dx:-.001}],64287:[.739,-.077,.741],64288:[.73,.041,.647],64289:[.751,.012,1.311],64290:[.724,.046,1.296],64291:[.724,.014,1.312],64292:[.731,.054,1.27],64293:[1.074,.005,1.267],64294:[.724,0,1.282],64295:[.724,.007,1.284],64296:[.724,.007,1.311],64297:[.571,-.241,.684],64298:[.798,0,.806],64299:[.798,0,.806],64300:[.798,0,.806],64301:[.798,0,.806],64302:[.751,.147,.691],64303:[.751,.266,.691],64304:[.751,.147,.691],64305:[.74,.054,.604],64306:[.73,.041,.517],64307:[.724,.046,.596],64308:[.724,.014,.652],64309:[.724,.007,.367],64310:[.742,.045,.363],64311:[.724,.014,.652],64312:[.724,0,.656],64313:[.739,-.325,.37],64314:[.724,.297,.605],64315:[.731,.054,.604],64316:[1.074,.005,.607],64317:[.724,0,.632],64318:[.73,.043,.659],64319:[.724,.31,.363],64320:[.731,.054,.429],64321:[.724,.013,.632],64322:[.73,.161,.656],64323:[.724,.297,.594],64324:[.731,.054,.604],64325:[.73,.333,.656],64326:[.73,.043,.652],64327:[.724,.309,.607],64328:[.724,.007,.614],64329:[.724,0,.806],64330:[.724,.007,.631],64331:[.836,.007,.367],64332:[.836,.054,.604],64333:[.836,.054,.604],64334:[.836,.054,.604],64335:[1.037,.012,.861]}},HEI:{italic:{1425:[-.068,.291,0,{dx:-.001}],1426:[.972,-.746,0,{dx:0}],1427:[1.033,-.746,0,{dx:-.001}],1428:[.972,-.746,0,{dx:0}],1429:[.976,-.746,0,{dx:0}],1430:[-.068,.309,0,{dx:-.002}],1431:[.962,-.743,0,{dx:-.001}],1432:[.911,-.746,0,{dx:0}],1433:[.987,-.746,0,{dx:-.001}],1434:[-.068,.291,0,{dx:-.001}],1435:[-.068,.309,0,{dx:-.001}],1436:[.987,-.746,0,{dx:-.002}],1437:[.987,-.746,0,{dx:-.002}],1438:[.987,-.746,0,{dx:-.002}],1439:[.961,-.744,0,{dx:-.001}],1440:[.961,-.744,0,{dx:0}],1441:[.935,-.746,0,{dx:-.001}],1442:[-.068,.291,0,{dx:-.001}],1443:[-.068,.294,0,{dx:0}],1444:[-.068,.291,0,{dx:-.001}],1445:[-.068,.309,0,{dx:-.001}],1446:[-.068,.309,0,{dx:-.001}],1447:[-.068,.291,0,{dx:-.001}],1448:[.987,-.746,0,{dx:-.001}],1449:[.961,-.744,0,{dx:-.002}],1450:[-.068,.203,0,{dx:-.001}],1451:[.969,-.746,0,{dx:-.001}],1452:[.972,-.746,0,{dx:0}],1453:[-.068,.309,0,{dx:-.002}],1454:[.911,-.746,0,{dx:0}],1455:[.969,-.746,0,{dx:-.001}],1456:[-.068,.294,0,{dx:0}],1457:[-.068,.294,0,{dx:0}],1458:[-.068,.294,0,{dx:0}],1459:[-.068,.294,0,{dx:0}],1460:[-.068,.158,0,{dx:0}],1461:[-.068,.158,0,{dx:0}],1462:[-.068,.294,0,{dx:0}],1463:[-.079,.147,0,{dx:0}],1464:[-.079,.266,0,{dx:0}],1465:[.836,-.746,0,{dx:0}],1466:[.836,-.746,0,{dx:0}],1467:[-.068,.294,0,{dx:-.001}],1468:[.384,-.293,0],1469:[-.068,.298,0,{dx:-.001}],1470:[.678,-.588,.488],1471:[.836,-.768,0,{dx:0}],1472:[.751,.097,.202],1473:[.798,-.707,0,{dx:-.671}],1474:[.798,-.707,0,{dx:-.176}],1475:[.487,0,.344],1476:[.881,-.746,0,{dx:-.001}],1477:[-.068,.203,0,{dx:-.001}],1478:[.729,0,.415,{ic:.069}],1479:[-.079,.277,0,{dx:0}],1488:[.726,.012,.691,{ic:.076}],1489:[.721,.04,.604,{ic:.028}],1490:[.722,.029,.517],1491:[.71,.031,.596,{ic:.087}],1492:[.71,.006,.652,{ic:.082}],1493:[.71,.007,.367,{ic:.082}],1494:[.724,.034,.383,{ic:.093}],1495:[.71,.006,.652,{ic:.086}],1496:[.71,0,.656,{ic:.056}],1497:[.721,-.336,.37,{ic:.09}],1498:[.71,.297,.605,{ic:.084}],1499:[.721,.04,.604,{ic:.05}],1500:[1.04,.005,.607,{ic:.083}],1501:[.71,0,.632,{ic:.086}],1502:[.722,.033,.659,{ic:.047}],1503:[.71,.302,.363,{ic:.101}],1504:[.721,.04,.429,{ic:.075}],1505:[.71,.013,.632,{ic:.049}],1506:[.727,.153,.656,{ic:.078}],1507:[.71,.297,.594,{ic:.097}],1508:[.721,.04,.604,{ic:.05}],1509:[.722,.316,.656,{ic:.079}],1510:[.728,.033,.652,{ic:.052}],1511:[.71,.302,.607,{ic:.083}],1512:[.71,.007,.614,{ic:.082}],1513:[.71,0,.806,{ic:.093}],1514:[.71,.007,.631,{ic:.099}],1519:[1.057,-.336,.741,{ic:.028}],1520:[.71,.007,.768,{ic:.001}],1521:[.721,.007,.754,{ic:.004}],1522:[.721,-.336,.741,{ic:.028}],1523:[.792,-.506,.27],1524:[.792,-.506,.482],1525:[.71,.007,.367,{ic:.082}],1527:[.71,.302,.607,{ic:.083}],64285:[.721,-.142,.37,{ic:.09}],64286:[.858,-.739,0,{dx:-.001}],64287:[.726,-.077,.741,{ic:.029}],64288:[.722,.033,.647,{ic:.106}],64289:[.725,.012,1.311,{ic:.103}],64290:[.71,.031,1.296,{ic:.087}],64291:[.71,.006,1.312,{ic:.082}],64292:[.721,.04,1.27,{ic:.041}],64293:[1.04,.005,1.267,{ic:.083}],64294:[.71,0,1.282,{ic:.086}],64295:[.71,.007,1.284,{ic:.082}],64296:[.71,.007,1.311,{ic:.099}],64297:[.571,-.241,.684],64298:[.798,0,.806,{ic:.096}],64299:[.798,0,.806,{ic:.093}],64300:[.798,0,.806,{ic:.093}],64301:[.798,0,.806,{ic:.093}],64302:[.726,.147,.691,{ic:.076}],64303:[.726,.266,.691,{ic:.076}],64304:[.726,.147,.691,{ic:.076}],64305:[.721,.04,.604,{ic:.028}],64306:[.722,.029,.517],64307:[.71,.031,.596,{ic:.087}],64308:[.71,.006,.652,{ic:.082}],64309:[.71,.007,.367,{ic:.082}],64310:[.724,.034,.373,{ic:.092}],64311:[.71,.006,.652,{ic:.086}],64312:[.71,0,.656,{ic:.056}],64313:[.721,-.336,.37,{ic:.09}],64314:[.71,.297,.605,{ic:.084}],64315:[.721,.04,.604,{ic:.05}],64316:[1.04,.005,.607,{ic:.083}],64317:[.71,0,.632,{ic:.086}],64318:[.722,.033,.659,{ic:.047}],64319:[.71,.302,.363,{ic:.101}],64320:[.721,.04,.429,{ic:.075}],64321:[.71,.013,.632,{ic:.049}],64322:[.727,.153,.656,{ic:.078}],64323:[.71,.297,.594,{ic:.097}],64324:[.721,.04,.604,{ic:.05}],64325:[.722,.316,.656,{ic:.079}],64326:[.728,.033,.652,{ic:.052}],64327:[.71,.302,.607,{ic:.083}],64328:[.71,.007,.614,{ic:.082}],64329:[.71,0,.806,{ic:.093}],64330:[.71,.007,.631,{ic:.099}],64331:[.836,.007,.367,{ic:.082}],64332:[.836,.04,.604,{ic:.028}],64333:[.836,.04,.604,{ic:.05}],64334:[.836,.04,.604,{ic:.05}],64335:[1.029,.012,.861,{ic:.076}]}},HEBI:{"bold-italic":{1425:[-.068,.291,0,{dx:-.001}],1426:[.972,-.746,0,{dx:0}],1427:[1.035,-.744,0,{dx:-.001}],1428:[.972,-.746,0,{dx:0}],1429:[.976,-.746,0,{dx:0}],1430:[-.068,.314,0,{dx:-.004}],1431:[.97,-.735,0,{dx:-.001}],1432:[.911,-.746,0,{dx:0}],1433:[.992,-.746,0,{dx:.002}],1434:[-.066,.293,0,{dx:-.001}],1435:[-.068,.314,0,{dx:-.001}],1436:[.992,-.746,0,{dx:-.004}],1437:[.992,-.746,0,{dx:-.004}],1438:[.992,-.746,0,{dx:-.004}],1439:[.961,-.739,0,{dx:-.001}],1440:[.961,-.739,0,{dx:.003}],1441:[.935,-.746,0,{dx:-.001}],1442:[-.068,.291,0,{dx:-.001}],1443:[-.068,.294,0,{dx:0}],1444:[-.066,.293,0,{dx:-.001}],1445:[-.068,.314,0,{dx:.002}],1446:[-.068,.314,0,{dx:.002}],1447:[-.068,.291,0,{dx:-.001}],1448:[.992,-.746,0,{dx:.002}],1449:[.961,-.739,0,{dx:-.004}],1450:[-.068,.203,0,{dx:-.001}],1451:[.971,-.744,0,{dx:-.001}],1452:[.972,-.746,0,{dx:0}],1453:[-.068,.314,0,{dx:-.004}],1454:[.911,-.746,0,{dx:0}],1455:[.969,-.746,0,{dx:-.001}],1456:[-.068,.294,0,{dx:0}],1457:[-.068,.294,0,{dx:0}],1458:[-.068,.294,0,{dx:0}],1459:[-.068,.294,0,{dx:0}],1460:[-.068,.158,0,{dx:0}],1461:[-.068,.158,0,{dx:0}],1462:[-.068,.294,0,{dx:0}],1463:[-.079,.147,0,{dx:0}],1464:[-.079,.266,0,{dx:0}],1465:[.836,-.746,0,{dx:0}],1466:[.836,-.746,0,{dx:0}],1467:[-.068,.294,0,{dx:-.001}],1468:[.384,-.293,0],1469:[-.068,.298,0,{dx:-.001}],1470:[.678,-.588,.488],1471:[.836,-.768,0,{dx:0}],1472:[.757,.103,.202],1473:[.798,-.707,0,{dx:-.671}],1474:[.798,-.707,0,{dx:-.176}],1475:[.487,0,.344],1476:[.881,-.746,0,{dx:-.001}],1477:[-.068,.203,0,{dx:-.001}],1478:[.758,0,.415,{ic:.071}],1479:[-.079,.277,0,{dx:0}],1488:[.751,.012,.691,{ic:.082}],1489:[.74,.054,.604,{ic:.106}],1490:[.73,.041,.517],1491:[.724,.046,.596,{ic:.084}],1492:[.724,.014,.652,{ic:.084}],1493:[.724,.007,.367,{ic:.085}],1494:[.742,.045,.383,{ic:.104}],1495:[.724,.014,.652,{ic:.083}],1496:[.724,0,.656,{ic:.071}],1497:[.739,-.325,.37,{ic:.107}],1498:[.724,.297,.605,{ic:.087}],1499:[.731,.054,.604,{ic:.102}],1500:[1.074,.005,.607,{ic:.091}],1501:[.724,0,.632,{ic:.085}],1502:[.73,.043,.659,{ic:.068}],1503:[.724,.31,.363,{ic:.103}],1504:[.731,.054,.429,{ic:.129}],1505:[.724,.013,.632,{ic:.081}],1506:[.73,.161,.656,{ic:.077}],1507:[.724,.297,.594,{ic:.1}],1508:[.731,.054,.604,{ic:.102}],1509:[.73,.333,.656,{ic:.076}],1510:[.73,.043,.652,{ic:.051}],1511:[.724,.309,.607,{ic:.088}],1512:[.724,.007,.614,{ic:.085}],1513:[.724,0,.806,{ic:.1}],1514:[.724,.007,.631,{ic:.101}],1515:[0,0,1],1519:[1.075,-.325,.741,{ic:.045}],1520:[.724,.007,.768,{ic:.004}],1521:[.739,.007,.754,{ic:.007}],1522:[.739,-.325,.741,{ic:.045}],1523:[.794,-.508,.27],1524:[.794,-.508,.482],1525:[.724,.007,.367,{ic:.085}],1527:[.724,.309,.607,{ic:.088}],64285:[.739,-.142,.37,{ic:.107}],64286:[.855,-.739,0,{dx:-.001}],64287:[.739,-.077,.741,{ic:.045}],64288:[.73,.041,.647,{ic:.106}],64289:[.751,.012,1.311,{ic:.102}],64290:[.724,.046,1.296,{ic:.084}],64291:[.724,.014,1.312,{ic:.084}],64292:[.731,.054,1.27,{ic:.054}],64293:[1.074,.005,1.267,{ic:.09}],64294:[.724,0,1.282,{ic:.084}],64295:[.724,.007,1.284,{ic:.085}],64296:[.724,.007,1.311,{ic:.101}],64297:[.571,-.241,.684],64298:[.798,0,.806,{ic:.1}],64299:[.798,0,.806,{ic:.1}],64300:[.798,0,.806,{ic:.1}],64301:[.798,0,.806,{ic:.1}],64302:[.751,.147,.691,{ic:.082}],64303:[.751,.266,.691,{ic:.082}],64304:[.751,.147,.691,{ic:.082}],64305:[.74,.054,.604,{ic:.106}],64306:[.73,.041,.517],64307:[.724,.046,.596,{ic:.084}],64308:[.724,.014,.652,{ic:.084}],64309:[.724,.007,.367,{ic:.085}],64310:[.742,.045,.363,{ic:.104}],64311:[.724,.014,.652,{ic:.083}],64312:[.724,0,.656,{ic:.071}],64313:[.739,-.325,.37,{ic:.107}],64314:[.724,.297,.605,{ic:.087}],64315:[.731,.054,.604,{ic:.102}],64316:[1.074,.005,.607,{ic:.091}],64317:[.724,0,.632,{ic:.085}],64318:[.73,.043,.659,{ic:.068}],64319:[.724,.31,.363,{ic:.103}],64320:[.731,.054,.429,{ic:.129}],64321:[.724,.013,.632,{ic:.081}],64322:[.73,.161,.656,{ic:.077}],64323:[.724,.297,.594,{ic:.1}],64324:[.731,.054,.604,{ic:.102}],64325:[.73,.333,.656,{ic:.076}],64326:[.73,.043,.652,{ic:.051}],64327:[.724,.309,.607,{ic:.088}],64328:[.724,.007,.614,{ic:.085}],64329:[.724,0,.806,{ic:.1}],64330:[.724,.007,.631,{ic:.101}],64331:[.836,.007,.367,{ic:.085}],64332:[.836,.054,.604,{ic:.106}],64333:[.836,.054,.604,{ic:.102}],64334:[.836,.054,.604,{ic:.102}],64335:[1.037,.012,.861,{ic:.084}]}}},"NCM"),{},["MJX-NCM-HE","MJX-NCM-HEB","MJX-NCM-HEI","MJX-NCM-HEBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/hebrew","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/marrows.js 0000644 0001762 0000144 00000007333 15112352537 023011 0 ustar ligges users (()=>{"use strict";const t=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","marrows",t({MAR:{normal:{129024:[.359,-.141,1],129025:[.692,.192,.5],129026:[.359,-.141,1],129027:[.692,.192,.5],129028:[.4,-.1,1],129029:[.692,.192,.5],129030:[.4,-.1,1],129031:[.692,.192,.5],129032:[.44,-.06,1],129033:[.692,.192,.5],129034:[.44,-.06,1],129035:[.692,.192,.5],129040:[.358,-.142,1],129041:[.692,.192,.5],129042:[.358,-.142,1],129043:[.692,.192,.5],129044:[.378,-.122,1],129045:[.692,.192,.5],129046:[.378,-.122,1],129047:[.692,.192,.5],129048:[.422,-.078,1],129049:[.692,.192,.5],129050:[.422,-.078,1],129051:[.692,.192,.5],129052:[.452,-.048,1],129053:[.691,.191,.5],129054:[.452,-.048,1],129055:[.691,.191,.5],129056:[.359,-.141,1],129057:[.692,.192,.5],129058:[.359,-.141,1],129059:[.692,.192,.5],129060:[.359,-.141,1],129061:[.692,.192,.5],129062:[.359,-.141,1],129063:[.692,.192,.5],129064:[.359,-.141,1],129065:[.692,.192,.5],129066:[.359,-.141,1],129067:[.692,.192,.5],129068:[.359,-.141,1],129069:[.692,.192,.5],129070:[.359,-.141,1],129071:[.692,.192,.5],129072:[.359,-.141,1],129073:[.692,.192,.5],129074:[.359,-.141,1],129075:[.692,.192,.5],129076:[.394,-.106,.702],129077:[.533,.033,.702],129078:[.394,-.106,.702],129079:[.533,.033,.702],129080:[.359,-.141,.52],129081:[.452,-.048,.52],129082:[.359,-.141,.52],129083:[.452,-.048,.52],129084:[.359,-.141,.44],129085:[.412,-.088,.44],129086:[.359,-.141,.44],129087:[.412,-.088,.44],129088:[.422,-.078,.452],129089:[.421,-.079,.452],129090:[.422,-.078,.452],129091:[.421,-.079,.452],129092:[.422,-.078,.532],129093:[.461,-.039,.532],129094:[.422,-.078,.532],129095:[.461,-.039,.532],129104:[.445,-.055,1],129105:[.692,.192,.528],129106:[.445,-.055,1],129107:[.692,.192,.528],129108:[.568,.071,1],129109:[.571,.071,.528,{ic:.057}],129110:[.571,.068,1],129111:[.571,.071,.528,{ic:.057}],129112:[.445,-.055,1.068],129113:[.726,.226,.61],129120:[.517,.008,1],129121:[.687,.188,.646],129122:[.517,.008,1],129123:[.687,.188,.646],129124:[.564,.068,1],129125:[.567,.069,.646],129126:[.569,.064,1],129127:[.567,.065,.646],129128:[.51,.01,1],129129:[.692,.192,.646],129130:[.51,.01,1],129131:[.692,.192,.646],129132:[.568,.071,1],129133:[.568,.071,.646],129134:[.571,.068,1],129135:[.571,.068,.646],129136:[.511,.011,1],129137:[.692,.192,.666],129138:[.511,.011,1],129139:[.692,.192,.666],129140:[.568,.079,1],129141:[.568,.079,.666],129142:[.579,.068,1],129143:[.579,.068,.666],129144:[.51,.01,1],129145:[.692,.192,.684],129146:[.51,.01,1],129147:[.692,.192,.684],129148:[.568,.085,1],129149:[.568,.084,.684],129150:[.585,.068,1],129151:[.584,.068,.684],129152:[.511,.011,1],129153:[.692,.192,.676],129154:[.511,.011,1],129155:[.692,.192,.676],129156:[.568,.092,1],129157:[.568,.092,.676],129158:[.592,.068,1],129159:[.591,.068,.676,{ic:.003}],129168:[.362,-.142,.324],129169:[.35,-.148,.324],129170:[.362,-.138,.324],129171:[.352,-.15,.324],129172:[.452,-.048,.438],129173:[.406,-.094,.438],129174:[.452,-.048,.438],129175:[.406,-.094,.438],129176:[.359,-.141,.971],129177:[.67,.17,.375],129178:[.359,-.141,.971],129179:[.67,.17,.375],129180:[.291,-.211,.72],129181:[.291,-.211,.48],129182:[.291,-.211,.36],129183:[.291,-.211,.24],129184:[.492,.078,1.026],129185:[.492,.078,1.026],129186:[.492,.078,1.026],129187:[.492,.078,1.026],129188:[.501,.05,1.053],129189:[.501,.058,1.053],129190:[.492,.048,1.061],129191:[.492,.048,1.061],129192:[.492,.078,1.026],129193:[.492,.078,1.026],129194:[.492,.078,1.026],129195:[.492,.078,1.026],129196:[.341,-.105,.654],129197:[.341,-.105,.474],129200:[.714,.204,1],129201:[.757,.144,.618,{ic:.044}]}}},"NCM"),{},["MJX-NCM-MAR"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/marrows","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/symbols.js 0000644 0001762 0000144 00000020116 15112352537 023001 0 ustar ligges users (()=>{"use strict";const t=MathJax._.output.chtml.DynamicFonts.AddFontIds,c=MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont,a=MathJax._.output.common.Direction,i=(a.DIRECTION,a.V,a.H);c.dynamicSetup("","symbols",t({SY:{normal:{161:[.5,.216,.278],162:[.476,.045,.444],164:[.491,-.01,.778],166:[.75,.25,.278],169:[.683,0,.683],170:[.705,-.333,.449],171:[.483,0,.556],173:[.245,-.187,.333],174:[.683,0,.683],178:[.705,-.306,.359],179:[.705,-.293,.359],185:[.705,-.306,.366],186:[.705,-.333,.419],187:[.483,0,.556],188:[.705,0,.825],189:[.705,0,.825],190:[.705,0,.825],191:[.5,.205,.472],3647:[.728,.045,.708],8204:[0,0,0],8205:[0,0,0],8215:[-.103,.293,.504],8218:[.104,.195,.278],8219:[.693,-.394,.262],8222:[.104,.195,.472],8223:[.693,-.394,.472],8226:[.445,-.055,.5],8227:[.45,-.052,.5],8228:[.106,0,.277],8229:[.106,0,.557],8233:[.694,.195,.472],8240:[.75,.056,1.14],8241:[.75,.056,1.457],8248:[.116,.063,.523],8249:[.483,0,.389],8250:[.483,0,.389],8251:[.492,-.009,.778],8252:[.716,0,.478],8253:[.756,0,.472],8254:[.802,-.762,.68],8255:[-.079,.272,.6],8256:[.74,-.547,.6],8257:[.402,.189,.562],8258:[.549,.028,.665],8259:[.266,-.16,.5],8261:[.75,.25,.278],8262:[.75,.25,.278],8263:[.705,0,.891],8264:[.716,0,.648],8265:[.716,0,.648],8266:[.529,.153,.442],8267:[.694,.194,.611],8268:[.428,-.066,.572],8269:[.428,-.066,.572],8270:[.269,.028,.335],8271:[.431,.193,.278],8272:[.725,-.023,.717],8273:[.589,.028,.335],8274:[.751,-.001,.5],8275:[.309,-.191,.556,{ic:.001}],8276:[-.08,.273,.6],8277:[.394,-.096,.335],8278:[.474,-.012,.345],8280:[.474,-.012,.516],8281:[.474,-.012,.516],8282:[.554,-.012,.175],8283:[.594,.028,.476],8284:[.483,-.017,.588],8285:[.554,-.012,.175],8286:[.554,-.012,.175],8319:[.553,-.287,.333],8320:[.347,.055,.389],8353:[.728,.045,.722],8358:[.683,0,.75],8361:[.683,.022,1.028],8362:[.682,.005,1.042],8363:[.694,.03,.556],8369:[.683,0,.681],8370:[.75,.055,.785],8448:[.683,.082,1.141],8449:[.683,.098,1.109],8451:[.705,.022,1.03],8452:[.683,0,.711],8453:[.683,.05,1.141],8454:[.683,.049,1.227],8456:[.706,.022,.72],8457:[.683,0,.98],8468:[.705,.012,.978],8470:[.695,.01,.916],8471:[.683,0,.683],8478:[.683,.022,.736],8479:[.833,.153,.736],8480:[.683,-.247,.883],8481:[.677,0,1.582],8482:[.687,-.277,.983],8483:[.833,.153,.75],8485:[.671,.365,.444],8489:[.441,.013,.25],8494:[.701,.01,.676],8505:[.685,0,.319],8506:[.671,0,.985],8507:[.68,0,1.399],8522:[.694,0,.632],8523:[.716,.022,.778],8524:[.7,.006,.806,{ic:.001}],8525:[.774,.12,1.019],8526:[.519,0,.46],8527:[.512,.01,1.258],8960:[.597,.097,.778],8961:[.389,0,.902],8962:[.725,-.001,.652],8963:[.802,-.524,.778],8964:[.192,.085,.778],8965:[.27,.163,.778],8966:[.367,.26,.778],8977:[.432,-.071,.572],8978:[.619,-.448,.778],8979:[.604,-.36,.667],8980:[.468,.057,.778],8981:[.599,-.094,.587],8982:[.703,.203,.986],8983:[.58,.086,.778],8984:[.575,.061,.738],8986:[.693,.191,.778],8987:[.698,0,.658],8996:[.266,.037,.778],8997:[.267,0,.759],8998:[.505,.005,.984],8999:[.483,-.017,.726],9e3:[.483,-.007,1.046],9003:[.505,.005,.984],9004:[.755,.131,.93],9005:[.597,.097,.81],9006:[.599,-.049,.655],9007:[.384,-.116,.68],9008:[.766,.011,1.137],9009:[.731,.231,1.15],9010:[.547,.047,.738],9011:[.547,-.23,.738],9012:[.131,0,.5],9013:[.202,.09,.529],9014:[.664,.024,.578],9015:[.666,0,.386],9016:[.773,.083,.618],9017:[.773,.083,.618],9018:[.773,.083,.618],9019:[.773,.083,.618],9020:[.773,.083,.618],9021:[.731,.231,.778],9022:[.592,.092,.796],9023:[.603,.103,.568],9024:[.603,.103,.568],9025:[.773,.083,.618],9026:[.773,.083,.618],9027:[.773,.083,.618],9028:[.773,.083,.618],9029:[.75,.25,.72],9030:[.75,.25,.72],9031:[.773,.083,.618],9032:[.773,.083,.618],9033:[.673,.173,.778],9034:[.684,0,.778],9035:[.81,.19,.778,{ic:.007}],9036:[.773,.083,.618],9037:[.773,.083,.618],9038:[.684,0,.778],9039:[.552,.052,.72],9040:[.773,.083,.618],9041:[.684,0,.778],9042:[.81,.19,.778,{ic:.007}],9043:[.773,.083,.618],9044:[.773,.083,.618],9045:[.684,0,.778],9046:[.552,.052,.72],9047:[.773,.083,.618],9048:[.705,0,.278],9049:[.615,0,.618],9050:[.668,0,.568],9051:[.575,0,.588],9052:[.63,0,.551],9053:[.604,.02,.667],9054:[.773,.083,.618],9055:[.445,-.055,.5],9056:[.773,.083,.618],9057:[.802,.02,.778],9058:[.802,.033,1],9059:[.572,.07,.827],9060:[.552,-.108,.618],9061:[.592,-.055,.5],9062:[.75,.25,.667],9063:[.75,.25,.778],9064:[.592,-.191,.556,{ic:.001}],9065:[.592,.058,.778],9066:[.46,-.007,.278],9067:[.683,.033,1],9068:[.666,.022,.6],9069:[.75,.25,.6],9070:[.431,.193,.33],9071:[.773,.083,.618],9072:[.773,.083,.618],9073:[.583,.023,.642],9074:[.574,.032,.642],9075:[.442,.011,.308,{ic:.004}],9076:[.442,.216,.488],9077:[.442,.011,.641],9078:[.442,.19,.641,{ic:.018}],9079:[.453,.19,.471],9080:[.442,.19,.331],9081:[.442,.19,.641],9082:[.442,.011,.641,{ic:.018}],9083:[.699,.027,.833],9084:[.679,.262,.957],9085:[.174,0,.52],9086:[.454,0,.667],9087:[.75,.25,.278],9088:[.632,.02,.623],9089:[.462,0,.965],9090:[.462,0,1.076],9091:[.54,-.007,1.31],9092:[.483,-.017,.786],9093:[.75,.25,.566],9094:[.574,.073,.756],9095:[.343,0,.767],9096:[.59,.09,.788],9097:[.445,-.055,.5],9098:[.445,-.055,.5],9099:[.47,-.055,.5],9100:[.637,-.108,1.028],9101:[.703,0,.613],9102:[.703,-.001,.589],9103:[.605,.073,.756],9104:[.607,.071,.756],9105:[.605,.073,.756],9106:[.607,.071,.756],9107:[.367,-.133,.778],9108:[.755,.131,.93],9109:[.773,.083,.618],9110:[.452,.004,.738],9111:[.626,0,.748],9112:[.626,0,.748],9113:[.723,.011,.777],9114:[.494,.011,.777],9142:[.469,-.031,1.066],9146:[.472,-.432,.396],9147:[.328,-.288,.396],9148:[.184,-.144,.396],9149:[.04,0,.396],9150:[.75,.05,.444],9151:[.75,.05,.444],9152:[.65,.1,.551],9153:[.65,.1,.551],9154:[.65,.1,.551],9155:[.75,.19,.734],9156:[.75,.19,.734],9157:[.75,.19,.734],9158:[.75,.19,.6],9159:[.75,.19,.65],9160:[.75,.19,.65],9161:[.75,.19,.734],9162:[.75,.19,.734],9163:[.75,.05,.444],9164:[.75,.05,.444],9165:[.617,-.017,.566],9167:[.442,0,.668],9169:[.38,-.208,.5],9170:[.473,-.208,.5],9171:[.47,-.206,.5],9172:[.473,-.208,.848],9173:[.47,-.206,.848],9174:[.38,-.208,.848],9175:[.471,-.229,.636],9176:[.471,-.229,.636],9177:[.471,-.229,.636],9178:[.75,.03,.734],9179:[.388,-.022,.967],9186:[.583,.083,1.184],9187:[.755,.131,.93],9188:[.27,-.23,.856],9189:[.423,.083,1.07],9190:[.442,.011,1],9191:[.859,.083,.948],9192:[.209,.204,.746],9193:[.422,-.078,.591],9194:[.422,-.082,.591],9195:[.52,0,.591],9196:[.52,0,.591],9197:[.422,-.078,.499],9198:[.422,-.082,.645],9199:[.422,-.078,.645],9200:[.693,.146,.778],9201:[.693,.092,.778],9202:[.592,.092,.778],9203:[.698,0,.658],9208:[.415,-.085,.239],9209:[.415,-.085,.428],9210:[.413,-.087,.428],9211:[.481,-.036,.5],9212:[.445,-.055,.5],9213:[.367,-.135,.5],9214:[.582,.031,.667],9215:[.52,.02,.778],9250:[.694,.011,.556],9251:[.25,.105,.5],11159:[.562,.064,.766],11193:[.508,-.002,.978],11209:[.679,.162,.778],11216:[.583,.083,.778],11217:[.573,.073,.778],11218:[.673,.173,.744],11219:[.463,.313,.778],11220:[.713,0,.674],11221:[.582,0,.712],11222:[.563,.063,.712],11223:[.706,-.004,.485,{ic:.016}],11224:[.75,0,.614],11225:[.799,.049,.558],11226:[.742,.144,.346],11227:[.778,0,.626],11228:[.752,0,.57],11229:[.668,.25,.712],11230:[.631,.25,.6],11231:[.38,.25,.712],11232:[.77,.135,.801],11233:[.684,.097,.553],11234:[.737,-.009,.841],11235:[.725,-.081,.717],11236:[.77,.082,.801],11237:[.685,.084,.485],11238:[.706,0,.893],11239:[.625,-.023,.717],11240:[.568,.07,.826],11241:[.568,.07,.826],11248:[.7,.02,.585],11249:[.725,-.023,.485],11250:[.712,-.112,.713],11251:[.497,.015,.778],11252:[.557,0,.496],11253:[.575,.008,.504],11254:[.497,0,.778],11255:[.565,.007,.325],11256:[.377,.015,.456],11257:[.747,.011,1],11258:[.445,-.055,.952],11259:[.445,-.055,1.212],11260:[.67,.17,.486],11261:[.706,-.004,.485,{ic:.016}],11262:[.679,-.013,.778],11263:[.683,-.001,.377],11800:[.5,.256,.472],12306:[.622,.018,.793],12310:[.77,.27,.458],12311:[.77,.27,.458],12336:[.319,-.151,1.216],64256:[.705,0,.583,{ic:.045}],64257:[.705,0,.556],64258:[.705,0,.556],64259:[.705,0,.833],64260:[.705,0,.833],64261:[.705,.011,.669],64262:[.708,.011,.783],65126:[.34,-.086,.333],65279:[0,0,0],127:[.66,0,1.418]}}},"NCM"),{8215:{dir:i,stretch:[0,8215],HDW:[-.103,.293,.504],ext:.112,hd:[-.103,.293]}},["MJX-NCM-SY"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/symbols","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/devanagari.js 0000644 0001762 0000144 00000006637 15112352537 023426 0 ustar ligges users (()=>{"use strict";const d=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","devanagari",d({DV:{normal:{2304:[.906,-.683,0,{dx:.044}],2305:[.896,-.683,0,{dx:.028}],2306:[.828,-.718,0,{dx:.147}],2307:[.493,-.054,.252],2308:[1.003,.091,.917],2309:[.68,.091,.917],2310:[.68,.091,1.22],2311:[.68,.227,.72],2312:[.968,.227,.72],2313:[.68,0,.705],2314:[.68,0,.915],2315:[.68,.091,1.042],2316:[.68,.078,1.042],2317:[.922,.151,.709],2318:[1.003,.151,.709],2319:[.68,.151,.709],2320:[1.033,.151,.709],2321:[.922,.091,1.139],2322:[1.003,.091,1.22],2323:[1.033,.091,1.22],2324:[1.033,.091,1.219],2325:[.68,.092,1.041],2326:[.68,.088,.994],2327:[.68,.091,.787],2328:[.68,.088,.869],2329:[.68,.007,.788,{ic:.066}],2330:[.68,.088,.894],2331:[.68,-.008,.861],2332:[.68,.091,.921],2333:[.68,.227,.994],2334:[.68,.088,1.07],2335:[.68,-.043,.735],2336:[.68,-.043,.808],2337:[.68,.007,.788],2338:[.68,-.043,.731],2339:[.68,.088,.922],2340:[.68,.088,.793],2341:[.704,.088,.764],2342:[.68,.033,.68],2343:[.68,.088,.715],2344:[.68,.091,.789],2345:[.68,.091,.789],2346:[.68,.088,.784],2347:[.68,.088,1.025],2348:[.68,.088,.79],2349:[.704,.088,.774],2350:[.68,.088,.774],2351:[.68,.088,.787],2352:[.68,.015,.623],2353:[.68,.015,.623],2354:[.68,.088,.929],2355:[.68,-.063,.979],2356:[.68,.089,.979,{ic:.002}],2357:[.68,.088,.79],2358:[.68,.091,.865],2359:[.68,.088,.784],2360:[.68,.088,.892],2361:[.68,.173,.715],2362:[1.009,-.609,0,{dx:.128}],2363:[1.009,.088,.301,{ic:.066}],2364:[-.081,.204,0,{dx:.277}],2365:[.68,-.08,.435],2366:[.68,.088,.301,{ic:.066}],2367:[.978,.088,.301,{ic:.384}],2368:[.977,.088,.279,{ic:.066}],2369:[.038,.288,0,{dx:.232}],2370:[.024,.314,0,{dx:.074}],2371:[.032,.309,0,{dx:.166}],2372:[.065,.372,0,{dx:.16}],2373:[.922,-.749,0,{dx:0}],2374:[1.003,-.632,0,{dx:.223}],2375:[1.033,-.664,0,{dx:.178}],2376:[1.033,-.664,0,{dx:.184}],2377:[.922,.088,.301,{ic:.066}],2378:[1.003,.088,.301,{ic:.066}],2379:[1.033,.088,.301,{ic:.066}],2380:[1.033,.088,.301,{ic:.066}],2381:[-.024,.309,0,{dx:-.011}],2382:[.68,.088,.26,{ic:.066}],2383:[1.096,.088,.3,{ic:.066}],2384:[.865,-.081,.984],2385:[1.077,-.681,0,{dx:.138}],2386:[-.085,.153,0,{dx:.263}],2387:[.971,-.733,0,{dx:.178}],2388:[.971,-.733,0,{dx:.081}],2389:[1.028,-.737,0,{dx:.039}],2390:[-.048,.221,0,{dx:.328}],2391:[-.048,.388,0,{dx:.328}],2392:[.68,.092,1.041],2393:[.68,.088,.994],2394:[.68,.091,.787],2395:[.68,.091,.921],2396:[.68,.173,.788],2397:[.68,.148,.731],2398:[.68,.088,1.025],2399:[.68,.088,.787],2400:[.68,.088,1.043],2401:[.68,.258,1.042],2402:[.029,.344,0,{dx:.072}],2403:[.029,.431,0,{dx:.074}],2404:[.786,.036,.311],2405:[.786,.036,.498],2406:[.541,-.149,.487],2407:[.68,.025,.409],2408:[.68,.025,.481],2409:[.68,.025,.481],2410:[.67,.002,.646],2411:[.679,.013,.523],2412:[.68,.046,.464],2413:[.661,-.029,.685],2414:[.67,0,.454],2415:[.68,.017,.404],2416:[.437,-.155,.427],2417:[.704,-.582,.338],2418:[.922,.091,.917],2419:[1.009,.091,.917],2420:[1.009,.091,1.139],2421:[1.096,.091,1.138],2422:[.68,.221,.917],2423:[.68,.388,.917],2424:[.68,.028,.765],2425:[.68,.183,.921],2426:[.68,.088,.787],2427:[.68,.091,.8],2428:[.68,.091,.921],2429:[.689,.018,.522],2430:[.68,.173,.788],2431:[.68,.088,.79]}},DVB:{bold:{}},DVI:{italic:{}},DVBI:{"bold-italic":{}}},"NCM"),{},["MJX-NCM-DV","MJX-NCM-DVB","MJX-NCM-DVI","MJX-NCM-DVBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/devanagari","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/phonetics.js 0000644 0001762 0000144 00000026403 15112352537 023312 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","phonetics",c({PH:{normal:{592:[.441,.016,.5],593:[.441,.011,.556],594:[.441,.011,.556],595:[.705,.011,.528],596:[.441,.016,.444],597:[.447,.144,.444],598:[.695,.205,.556,{ic:.054}],599:[.705,.011,.556,{ic:.082}],600:[.448,.011,.444],601:[.448,.011,.444],602:[.441,.016,.639],603:[.447,.011,.444],604:[.453,.022,.472],605:[.453,.022,.639,{ic:.011}],606:[.453,.022,.5],607:[.43,.205,.306],608:[.636,.217,.556,{ic:.082}],609:[.441,.217,.528],610:[.445,.015,.565],611:[.43,.217,.528],612:[.454,.022,.528],613:[.43,.205,.556],614:[.705,0,.556],615:[.705,.205,.528],616:[.668,0,.311],617:[.441,.013,.25],618:[.43,0,.274],619:[.695,0,.422],620:[.695,0,.389],621:[.695,.205,.278,{ic:.059}],622:[.695,.205,.561],623:[.43,.011,.833],624:[.43,.205,.833],625:[.441,.205,.806],626:[.441,.205,.556],627:[.441,.205,.556,{ic:.059}],628:[.43,0,.547],629:[.447,.011,.5],630:[.445,.015,.727],631:[.451,.011,.611],632:[.695,.193,.61],633:[.43,.011,.392],634:[.625,.011,.392],635:[.43,.205,.392,{ic:.054}],636:[.441,.195,.392],637:[.441,.205,.392],638:[.441,0,.392],639:[.441,0,.333],640:[.431,.015,.536],641:[.445,0,.536],642:[.447,.205,.394],643:[.705,.205,.333,{ic:.028}],644:[.636,.205,.333,{ic:.042}],645:[.441,.205,.367],646:[.705,.226,.333,{ic:.027}],647:[.441,.185,.389],648:[.615,.205,.361],649:[.441,.011,.556],650:[.431,.022,.556],651:[.441,.011,.511],652:[.44,0,.528],653:[.44,0,.722],654:[.636,0,.528],655:[.43,0,.547],656:[.43,.205,.444,{ic:.11}],657:[.43,.146,.5],658:[.43,.205,.444],659:[.43,.226,.444],660:[.705,0,.5],661:[.705,-.001,.5],662:[.695,.011,.5],663:[.711,.206,.5],664:[.705,.022,.777],665:[.43,0,.513],666:[.453,.022,.5],667:[.643,.015,.584,{ic:.063}],668:[.43,0,.547],669:[.668,.205,.35],670:[.431,.205,.528],671:[.43,0,.455],672:[.636,.195,.556,{ic:.082}],673:[.705,0,.5],674:[.705,-.001,.5],675:[.694,.011,.824],676:[.695,.205,.722],677:[.694,.146,.881],678:[.615,.011,.667],679:[.705,.205,.556],680:[.615,.144,.704],681:[.705,.205,.759],682:[.694,0,.555],683:[.694,0,.553],684:[.484,.006,.361],685:[.379,0,.5],686:[.441,.195,.556],687:[.441,.205,.556,{ic:.015}],7424:[.45,0,.547],7431:[.43,0,.494],7434:[.43,.015,.377],7435:[.43,0,.566],7437:[.43,0,.663],7448:[.43,0,.494],7449:[.431,.015,.536],7452:[.43,.015,.547],7491:[.555,-.279,.3],7492:[.553,-.278,.3],7493:[.552,-.28,.333],7494:[.555,-.28,.433],7495:[.703,-.28,.333],7496:[.703,-.28,.333],7497:[.555,-.281,.266],7498:[.552,-.277,.266],7499:[.555,-.281,.266],7501:[.558,-.163,.3],7503:[.703,-.287,.316],7504:[.553,-.287,.499],7505:[.552,-.163,.333],7506:[.555,-.281,.3],7507:[.552,-.277,.266],7510:[.552,-.17,.333],7511:[.656,-.281,.233],7512:[.552,-.28,.333],7514:[.545,-.279,.499],7515:[.545,-.281,.316],7517:[.709,-.121,.3],7518:[.552,-.167,.333],7520:[.558,-.121,.349],7521:[.552,-.13,.333],7544:[.545,-.287,.333],7568:[.447,.205,.556,{ic:.105}],7569:[.705,.205,.653],7570:[.447,.205,.5,{ic:.083}],7571:[.453,.205,.528,{ic:.074}],7575:[.441,.205,.444]}},PHB:{bold:{592:[.45,.008,.559],593:[.45,.005,.639],594:[.45,.005,.639],595:[.7,.005,.637],596:[.45,.008,.511],597:[.453,.145,.511],598:[.695,.2,.639,{ic:.063}],599:[.7,.005,.639,{ic:.095}],600:[.453,.006,.527],601:[.453,.006,.527],602:[.45,.008,.735],603:[.453,.006,.511],604:[.455,.011,.543],605:[.455,.011,.735,{ic:.021}],606:[.456,.011,.575],607:[.445,.2,.351,{ic:.013}],608:[.63,.206,.639,{ic:.095}],609:[.45,.206,.607],610:[.452,.008,.723],611:[.445,.205,.607],612:[.456,.011,.607],613:[.445,.2,.639],614:[.7,0,.639],615:[.7,.2,.607],616:[.695,0,.358],617:[.45,.005,.383],618:[.445,0,.366],619:[.695,0,.486],620:[.695,0,.447],621:[.695,.2,.319,{ic:.074}],622:[.695,.2,.65],623:[.445,.006,.958],624:[.445,.2,.958],625:[.45,.2,.926],626:[.45,.2,.639],627:[.45,.2,.639,{ic:.073}],628:[.445,0,.733],629:[.453,.005,.575],630:[.452,.008,.933],631:[.464,.005,.703],632:[.695,.195,.703],633:[.445,.005,.474],634:[.639,.005,.474],635:[.445,.2,.474,{ic:.062}],636:[.45,.195,.474],637:[.45,.2,.474],638:[.45,0,.474],639:[.45,0,.383],640:[.445,.008,.697],641:[.452,0,.697],642:[.453,.2,.454],643:[.7,.2,.383,{ic:.032}],644:[.63,.2,.383,{ic:.048}],645:[.45,.2,.422,{ic:.007}],646:[.7,.221,.383,{ic:.032}],647:[.45,.19,.447],648:[.635,.2,.415],649:[.45,.005,.639],650:[.445,.011,.639],651:[.45,.005,.597],652:[.449,0,.607],653:[.449,0,.831],654:[.644,0,.607],655:[.445,0,.702],656:[.445,.2,.511,{ic:.126}],657:[.445,.146,.575],658:[.445,.2,.511],659:[.445,.221,.511],660:[.7,0,.575],661:[.7,-.001,.575],662:[.695,.005,.575],663:[.703,.2,.575],664:[.697,.011,.864],665:[.445,0,.658],666:[.456,.011,.575],667:[.647,.008,.778,{ic:.053}],668:[.445,0,.733],669:[.695,.2,.402],670:[.445,.2,.607],671:[.445,0,.552],672:[.63,.195,.639,{ic:.095}],673:[.7,0,.575],674:[.7,-.001,.575],675:[.694,.006,.947],676:[.695,.2,.831],677:[.694,.146,1.011],678:[.635,.006,.767],679:[.7,.2,.639,{ic:.035}],680:[.635,.145,.81],681:[.7,.2,.874],682:[.694,0,.639],683:[.694,0,.639],684:[.499,.002,.415],685:[.396,0,.575],686:[.656,.195,.639],687:[.655,.2,.639,{ic:.025}],7424:[.453,0,.702],7431:[.445,0,.602],7434:[.445,.008,.483],7435:[.445,0,.727],7437:[.445,0,.883],7448:[.445,0,.633],7449:[.445,.008,.697],7452:[.445,.008,.718],7491:[.569,-.294,.335],7492:[.568,-.292,.335],7493:[.567,-.294,.383],7494:[.57,-.293,.498],7495:[.713,-.294,.383],7496:[.713,-.293,.383],7497:[.569,-.294,.316],7498:[.567,-.292,.316],7499:[.569,-.293,.306],7501:[.57,-.177,.345],7503:[.713,-.297,.364],7504:[.567,-.297,.574],7505:[.568,-.177,.383],7506:[.57,-.294,.345],7507:[.568,-.291,.306],7510:[.568,-.18,.383],7511:[.678,-.294,.268],7512:[.567,-.294,.383],7514:[.564,-.293,.574],7515:[.564,-.295,.364],7517:[.717,-.135,.376],7518:[.567,-.177,.433],7520:[.573,-.135,.436],7521:[.568,-.143,.416],7544:[.564,-.297,.383],7568:[.453,.2,.623,{ic:.116}],7569:[.7,.2,.751],7570:[.453,.2,.591,{ic:.086}],7571:[.455,.2,.607,{ic:.084}],7575:[.45,.2,.511]}},PHI:{italic:{592:[.445,.046,.5,{ic:.03}],593:[.445,.019,.5],594:[.449,.015,.5],595:[.706,.011,.46,{ic:.059}],596:[.441,.012,.46],597:[.442,.15,.46,{ic:.01}],598:[.694,.204,.511,{ic:.049}],599:[.706,.011,.511,{ic:.205}],600:[.442,.011,.46,{ic:.05}],601:[.442,.011,.46,{ic:.039}],602:[.442,.011,.59,{ic:.023}],603:[.442,.011,.46,{ic:.047}],604:[.441,.011,.46,{ic:.004}],605:[.443,.011,.669,{ic:.019}],606:[.441,.011,.46,{ic:.004}],607:[.442,.205,.307,{ic:.077}],608:[.637,.205,.67,{ic:.047}],609:[.442,.205,.46,{ic:.027}],610:[.45,.014,.565],611:[.432,.215,.528,{ic:.052}],612:[.456,.021,.528,{ic:.041}],613:[.441,.264,.511,{ic:.032}],614:[.706,.011,.51,{ic:.075}],615:[.706,.204,.51,{ic:.075}],616:[.654,.011,.307,{ic:.055}],617:[.441,.011,.25,{ic:.014}],618:[.432,-.001,.274,{ic:.041}],619:[.694,.011,.256,{ic:.089}],620:[.694,.011,.256,{ic:.093}],621:[.694,.204,.256,{ic:.05}],622:[.694,.205,.558,{ic:.059}],623:[.442,.011,.818,{ic:.023}],624:[.442,.201,.818],625:[.442,.205,.805],626:[.442,.205,.562,{ic:.024}],627:[.442,.204,.562],628:[.432,0,.547,{ic:.037}],629:[.442,.011,.511],630:[.449,.017,.727,{ic:.007}],631:[.453,.012,.667,{ic:.007}],632:[.695,.193,.611],633:[.441,.012,.422,{ic:.024}],634:[.623,.012,.422,{ic:.027}],635:[.441,.204,.422,{ic:.01}],636:[.443,.192,.422,{ic:.025}],637:[.443,.204,.422,{ic:.025}],638:[.443,-.001,.392,{ic:.032}],639:[.443,-.001,.392],640:[.432,.014,.536,{ic:.008}],641:[.447,-.001,.536,{ic:.054}],642:[.442,.205,.409,{ic:.01}],643:[.705,.205,.333,{ic:.184}],644:[.636,.205,.333,{ic:.187}],645:[.443,.205,.333],646:[.705,.233,.333,{ic:.184}],647:[.441,.195,.332,{ic:.016}],648:[.626,.203,.332,{ic:.041}],649:[.442,.011,.537,{ic:.043}],650:[.432,.021,.556,{ic:.017}],651:[.443,.009,.511,{ic:.006}],652:[.442,.011,.46,{ic:.004}],653:[.442,.011,.664],654:[.636,.011,.486,{ic:.03}],655:[.432,-.001,.547,{ic:.054}],656:[.442,.204,.409,{ic:.115}],657:[.442,.144,.409,{ic:.055}],658:[.431,.205,.46,{ic:.037}],659:[.431,.226,.46,{ic:.037}],660:[.706,-.001,.5,{ic:.034}],661:[.706,-.002,.5,{ic:.041}],662:[.695,.011,.5],663:[.711,.204,.5,{ic:.029}],664:[.705,.022,.767,{ic:.021}],665:[.432,-.001,.513],666:[.441,.011,.46,{ic:.037}],667:[.644,.014,.584,{ic:.158}],668:[.432,-.001,.547,{ic:.037}],669:[.654,.201,.307,{ic:.051}],670:[.442,.263,.46,{ic:.042}],671:[.432,-.001,.455],672:[.637,.194,.627,{ic:.092}],673:[.706,-.001,.5,{ic:.034}],674:[.706,-.002,.5,{ic:.041}],675:[.694,.011,.729,{ic:.055}],676:[.694,.205,.75,{ic:.037}],677:[.694,.144,.729,{ic:.055}],678:[.626,.011,.657,{ic:.01}],679:[.705,.205,.52,{ic:.184}],680:[.626,.15,.67,{ic:.01}],681:[.705,.216,.724,{ic:.02}],682:[.694,.011,.631,{ic:.01}],683:[.694,.011,.537,{ic:.055}],684:[.484,.005,.361,{ic:.043}],685:[.379,0,.5],687:[.58,.204,.511,{ic:.042}]}},PHBI:{"bold-italic":{592:[.452,.008,.591,{ic:.024}],593:[.45,.006,.655],594:[.45,.006,.655],595:[.647,.007,.532,{ic:.031}],596:[.455,.012,.532,{ic:.006}],597:[.452,.154,.532],598:[.695,.21,.591,{ic:.075}],599:[.693,.008,.591,{ic:.214}],600:[.452,.008,.532,{ic:.092}],601:[.452,.008,.532,{ic:.043}],602:[.452,.008,.784,{ic:.015}],603:[.456,.011,.532,{ic:.041}],604:[.455,.012,.532,{ic:.006}],605:[.479,.012,.778],606:[.475,.011,.556,{ic:.013}],607:[.452,.202,.356,{ic:.045}],608:[.62,.202,.532,{ic:.258}],609:[.452,.202,.532,{ic:.031}],610:[.452,.008,.723],611:[.462,.215,.556,{ic:.053}],612:[.462,.01,.556,{ic:.045}],613:[.456,.25,.591,{ic:.036}],614:[.701,.199,.591,{ic:.056}],615:[.702,.199,.591,{ic:.056}],616:[.674,.008,.356,{ic:.048}],617:[.46,.008,.355,{ic:.011}],618:[.461,0,.472,{ic:.057}],619:[.695,.008,.297,{ic:.108}],620:[.695,.008,.342,{ic:.039}],621:[.693,.209,.297,{ic:.044}],622:[.693,.206,.659],623:[.456,.011,.944,{ic:.032}],624:[.456,.209,.944],625:[.452,.209,.944],626:[.452,.209,.65,{ic:.034}],627:[.452,.23,.65,{ic:.048}],628:[.445,0,.733,{ic:.002}],629:[.456,.011,.591,{ic:.004}],630:[.452,.008,.933],631:[.464,.005,.703],632:[.695,.195,.703],633:[.455,.012,.502,{ic:.034}],634:[.637,.012,.502,{ic:.034}],635:[.455,.21,.502],636:[.452,.195,.502,{ic:.06}],637:[.452,.209,.502,{ic:.06}],638:[.45,0,.474,{ic:.006}],639:[.45,0,.383],640:[.445,.008,.697],641:[.452,0,.697,{ic:.033}],642:[.452,.209,.487],643:[.7,.2,.383,{ic:.12}],644:[.701,.008,.683,{ic:.044}],645:[.45,.2,.422],646:[.698,.231,.364,{ic:.133}],647:[.455,.202,.385,{ic:.02}],648:[.643,.209,.385,{ic:.031}],649:[.452,.008,.621,{ic:.05}],650:[.445,.011,.639],651:[.453,.008,.532,{ic:.023}],652:[.449,0,.607],653:[.449,0,.831],654:[.655,-.001,.562,{ic:.033}],655:[.445,0,.702,{ic:.023}],656:[.452,.209,.575,{ic:.068}],657:[.452,.153,.491,{ic:.049}],658:[.444,.206,.532,{ic:.028}],659:[.444,.226,.532,{ic:.028}],660:[.7,0,.575],661:[.7,-.001,.575],662:[.695,.005,.575],663:[.693,.209,.556,{ic:.026}],664:[.703,.017,.855,{ic:.01}],665:[.445,0,.658],666:[.474,.012,.556,{ic:.031}],667:[.647,.008,.778,{ic:.116}],668:[.445,0,.733,{ic:.002}],669:[.674,.209,.356,{ic:.048}],670:[.462,.241,.532],671:[.445,0,.552],672:[.693,.21,.591,{ic:.214}],673:[.7,0,.575],674:[.7,-.001,.575,{ic:.001}],675:[.695,.008,.895,{ic:.049}],676:[.695,.206,.876,{ic:.046}],677:[.695,.153,.895,{ic:.049}],678:[.643,.008,.727],679:[.7,.2,.653,{ic:.12}],680:[.643,.154,.802],681:[.702,.207,.905],682:[.695,.008,.695],683:[.695,.009,.605,{ic:.049}],684:[.499,.002,.415,{ic:.049}],685:[.396,0,.575],686:[.678,.25,.591,{ic:.036}],687:[.678,.199,.591,{ic:.054}]}}},"NCM"),{},["MJX-NCM-PH","MJX-NCM-PHB","MJX-NCM-PHI","MJX-NCM-PHBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/phonetics","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/shapes.js 0000644 0001762 0000144 00000022071 15112352537 022576 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","shapes",c({SH:{normal:{8962:[.725,-.001,.652],8998:[.505,.005,.984],8999:[.483,-.017,.726],9e3:[.483,-.007,1.046],9003:[.505,.005,.984],9211:[.481,-.036,.5],9212:[.445,-.055,.5],9213:[.367,-.135,.5],9214:[.582,.031,.667],9472:[.274,-.226,.666,{ic:.032}],9473:[.284,-.216,.666,{ic:.031}],9474:[.782,.282,.666],9475:[.781,.281,.666],9476:[.274,-.226,.666,{ic:.032}],9477:[.284,-.216,.666,{ic:.031}],9478:[.782,.282,.666],9479:[.781,.281,.666],9480:[.274,-.226,.666,{ic:.032}],9481:[.284,-.216,.666,{ic:.031}],9482:[.782,.282,.666],9483:[.781,.281,.666],9484:[.274,.282,.666,{ic:.031}],9485:[.284,.282,.666,{ic:.031}],9486:[.274,.281,.666,{ic:.032}],9487:[.284,.281,.666,{ic:.031}],9488:[.274,.282,.666],9489:[.284,.282,.666],9490:[.274,.281,.666],9491:[.284,.281,.666],9492:[.782,-.226,.666,{ic:.032}],9493:[.782,-.216,.666,{ic:.031}],9494:[.781,-.226,.666,{ic:.032}],9495:[.781,-.216,.666,{ic:.031}],9496:[.782,-.226,.666],9497:[.782,-.216,.666],9498:[.781,-.226,.666],9499:[.781,-.216,.666],9500:[.782,.282,.502,{ic:.033}],9501:[.782,.282,.502,{ic:.032}],9502:[.781,.282,.502,{ic:.033}],9503:[.782,.281,.502,{ic:.033}],9504:[.781,.281,.502,{ic:.033}],9505:[.781,.282,.502,{ic:.032}],9506:[.782,.281,.502,{ic:.032}],9507:[.781,.281,.502,{ic:.032}],9508:[.782,.282,.502],9509:[.782,.282,.502],9510:[.781,.282,.502],9511:[.782,.281,.502],9512:[.781,.281,.502],9513:[.781,.282,.502],9514:[.782,.281,.502],9515:[.781,.281,.502],9516:[.274,.282,.666,{ic:.032}],9517:[.274,.282,.666,{ic:.032}],9518:[.274,.282,.666,{ic:.031}],9519:[.284,.282,.666,{ic:.031}],9520:[.274,.281,.666,{ic:.032}],9521:[.274,.281,.666,{ic:.032}],9522:[.274,.281,.666,{ic:.031}],9523:[.274,.281,.666,{ic:.031}],9524:[.782,-.226,.666,{ic:.032}],9525:[.782,-.226,.666,{ic:.032}],9526:[.782,-.226,.666,{ic:.031}],9527:[.782,-.226,.666,{ic:.031}],9528:[.781,-.226,.666,{ic:.032}],9529:[.781,-.226,.666,{ic:.032}],9530:[.781,-.226,.666,{ic:.031}],9531:[.781,-.226,.666,{ic:.031}],9532:[.782,.282,.666,{ic:.032}],9533:[.782,.282,.666,{ic:.032}],9534:[.782,.282,.666,{ic:.031}],9535:[.782,.282,.666,{ic:.031}],9536:[.781,.282,.666,{ic:.032}],9537:[.782,.281,.666,{ic:.032}],9538:[.781,.281,.666,{ic:.032}],9539:[.781,.282,.666,{ic:.032}],9540:[.781,.282,.666,{ic:.031}],9541:[.782,.281,.666,{ic:.032}],9542:[.782,.281,.666,{ic:.031}],9543:[.781,.282,.666,{ic:.031}],9544:[.782,.281,.666,{ic:.031}],9545:[.781,.281,.666,{ic:.032}],9546:[.781,.281,.666,{ic:.031}],9547:[.781,.281,.666,{ic:.031}],9548:[.274,-.226,.666,{ic:.032}],9549:[.284,-.216,.666,{ic:.031}],9550:[.782,.282,.666],9551:[.781,.281,.666],9552:[.324,-.176,.666,{ic:.032}],9553:[.782,.282,.666],9554:[.324,.282,.666,{ic:.032}],9555:[.274,.282,.666,{ic:.032}],9556:[.324,.282,.666,{ic:.032}],9557:[.324,.282,.666],9558:[.274,.282,.666],9559:[.324,.282,.666],9560:[.792,-.226,.666,{ic:.032}],9561:[.782,-.226,.666,{ic:.032}],9562:[.782,-.176,.666,{ic:.032}],9563:[.792,-.226,.666],9564:[.782,-.226,.666],9565:[.782,-.176,.666],9566:[.782,.282,.502,{ic:.033}],9567:[.782,.282,.502,{ic:.033}],9568:[.782,.282,.502,{ic:.033}],9569:[.782,.282,.502],9570:[.782,.282,.502],9571:[.782,.282,.502],9572:[.324,.282,.666,{ic:.032}],9573:[.274,.282,.666,{ic:.032}],9574:[.324,.282,.666,{ic:.032}],9575:[.782,-.176,.666,{ic:.032}],9576:[.782,-.226,.666,{ic:.032}],9577:[.782,-.176,.666,{ic:.032}],9578:[.782,.282,.502,{ic:.033}],9579:[.782,.282,.666,{ic:.032}],9580:[.782,.282,.666,{ic:.032}],9581:[.274,.288,.666,{ic:.032}],9582:[.274,.288,.666],9583:[.788,-.226,.666],9584:[.788,-.226,.666,{ic:.032}],9585:[.754,.254,.5],9586:[.754,.254,.5],9587:[.754,.254,.5],9588:[.274,-.226,.666],9589:[.782,-.338,.666],9590:[.274,-.226,.666,{ic:.032}],9591:[.162,.282,.666],9592:[.284,-.216,.666],9593:[.781,-.339,.666],9594:[.284,-.216,.666,{ic:.031}],9595:[.161,.281,.666],9596:[.284,-.216,.666,{ic:.031}],9597:[.782,.281,.666],9598:[.284,-.216,.666,{ic:.032}],9599:[.781,.282,.666],9600:[.583,-.237,.778],9601:[.083,0,.664],9602:[.166,0,.664],9603:[.249,0,.664],9604:[.332,0,.664],9605:[.415,0,.664],9606:[.498,0,.664],9607:[.581,0,.664],9608:[.664,0,.664],9609:[.664,0,.664],9610:[.664,0,.664],9611:[.664,0,.664],9612:[.666,0,.778],9613:[.664,0,.664],9614:[.664,0,.664],9615:[.664,0,.664],9616:[.666,0,.778],9617:[.664,0,.664],9618:[.664,0,.664],9619:[.664,0,.664],9620:[.664,-.581,.664],9621:[.664,0,.664],9622:[.332,0,.664],9623:[.332,0,.664],9624:[.664,-.332,.664],9625:[.664,0,.664],9626:[.664,0,.664],9627:[.664,0,.664],9628:[.664,0,.664],9629:[.664,-.332,.664],9630:[.664,0,.664],9631:[.664,0,.664],9634:[.583,.083,.778],9635:[.583,.083,.778],9636:[.583,.083,.778],9637:[.583,.083,.778],9638:[.583,.083,.778],9639:[.583,.083,.778],9640:[.583,.083,.778],9641:[.583,.083,.778],9644:[.417,-.084,.778],9645:[.417,-.084,.778],9646:[.666,0,.466],9647:[.666,0,.466],9648:[.423,0,1.17],9649:[.423,0,1.17],9672:[.713,.213,.778,{ic:.075}],9673:[.701,.201,1.013],9676:[.622,.122,.796],9677:[.592,.092,.796],9678:[.592,.092,.796],9680:[.592,.092,.796],9681:[.592,.092,.796],9682:[.592,.092,.796],9683:[.592,.092,.796],9684:[.592,.092,.796],9685:[.592,.092,.796],9686:[.592,.092,.442],9687:[.592,.092,.442],9688:[.595,.097,.792],9689:[.686,.18,1.024],9690:[.686,-.252,1.024],9691:[.252,.182,1.024],9692:[.89,-.5,.6],9693:[.89,-.5,.6],9694:[.5,-.11,.6],9695:[.5,-.11,.6],9696:[.89,-.5,1],9697:[.5,-.11,1],9698:[.583,.083,.778],9699:[.583,.083,.778],9700:[.583,.083,.778],9701:[.583,.083,.778],9703:[.583,.083,.778],9704:[.583,.083,.778],9705:[.583,.083,.778],9706:[.583,.083,.778],9707:[.583,.083,.778],9708:[.688,0,.613],9709:[.748,0,.973],9710:[.748,0,.973],9712:[.583,.083,.778],9713:[.583,.083,.778],9714:[.583,.083,.778],9715:[.583,.083,.778],9716:[.594,.09,.848],9717:[.594,.09,.848],9718:[.594,.09,.848],9719:[.594,.09,.848],9728:[.603,.103,.846],9733:[.568,.076,.827],9734:[.568,.076,.827],9737:[.592,.092,.778],9761:[.548,.07,.778],9773:[.593,.001,.7],9785:[.701,.201,1.013],9786:[.701,.201,1.013],9787:[.701,.201,1.013],9788:[.603,.103,.846],9789:[.701,.201,.667],9790:[.701,.201,.667],9792:[.445,.238,.5],9794:[.599,-.055,.655],9824:[.727,.13,.778],9825:[.716,.033,.778],9826:[.727,.163,.778],9827:[.727,.13,.778],9828:[.727,.13,.778],9829:[.716,.033,.778],9830:[.727,.163,.778],9831:[.727,.13,.778],9833:[.695,.029,.442],9834:[.695,.029,.611],9835:[.695,.199,.898],9837:[.75,.022,.388],9838:[.728,.217,.388],9839:[.716,.216,.388],9854:[.701,.201,1.013],9856:[.533,.033,.706],9857:[.533,.033,.706],9858:[.533,.033,.706],9859:[.533,.033,.706],9860:[.533,.033,.706],9861:[.533,.033,.706],9862:[.592,.092,.796],9863:[.592,.092,.796],9864:[.592,.092,.796],9865:[.592,.092,.796],9893:[.599,.238,.654],9898:[.592,.092,.796],9899:[.592,.092,.796],9900:[.445,-.055,.5],9901:[.467,-.036,.5,{ic:.077}],9902:[.606,.104,.5,{ic:.188}],9906:[.716,.19,.664],10003:[.699,.027,.833],10013:[.602,.026,.5],10016:[.684,0,.796],10026:[.696,.116,1.013],10038:[.638,.099,.8],10045:[.634,.03,.575],10098:[.748,.248,.278],10099:[.748,.248,.278],10139:[.51,.01,1],10145:[.469,-.031,.977],11026:[.583,.083,.778],11027:[.583,.083,.778],11028:[.583,.083,.778],11029:[.583,.083,.778],11030:[.727,.163,.778],11031:[.727,.163,.778],11032:[.727,.163,.778],11033:[.727,.163,.778],11034:[.64,.24,.96],11035:[.686,.18,1.024],11036:[.686,.18,1.024],11037:[.217,-.001,.316],11038:[.218,-.001,.316],11039:[.636,0,.827],11040:[.634,0,.794],11041:[.639,.1,.8],11042:[.639,.1,.8],11043:[.639,0,.857],11044:[.701,.201,1.013],11045:[.623,.123,1.025],11046:[.623,.123,1.025],11047:[.538,.038,.572],11048:[.538,.038,.572],11049:[.548,.048,1.025],11050:[.48,-.02,.572],11051:[.48,-.02,.572],11052:[.592,.092,1.186],11053:[.592,.092,1.186],11054:[.763,.263,.764],11055:[.763,.263,.764],11088:[.504,.012,.827],11089:[.453,-.04,.486],11090:[.453,-.04,.486],11091:[.62,.049,.827],11092:[.619,.049,.794],11093:[.701,.201,1.013],11094:[.506,.006,.778],11095:[.592,.092,.778],11096:[.592,.092,.778],11097:[.592,.092,.778],11194:[.56,.06,.712],11195:[.56,.06,.712],11196:[.56,.06,.712],11197:[.483,-.017,.566],11198:[.592,.092,.778],11199:[.592,.092,.778],11200:[.4,-.1,.41],11201:[.456,-.044,.51],11202:[.417,-.081,.414],11203:[.439,-.061,.51],11204:[.452,-.045,.51],11205:[.637,-.099,.626],11206:[.637,-.099,.626],11207:[.676,-.06,.626],11208:[.676,-.06,.626],11210:[.529,-.255,.656],11211:[.255,.019,.656],11212:[.458,-.042,.51],11213:[.41,-.09,.51],11214:[.458,-.042,.51],11215:[.41,-.09,.51],11242:[.568,.07,.827],11243:[.568,.07,.827]}},SHB:{bold:{9474:[.75,.25,.319],9553:[.75,.25,.575],9773:[.593,.001,.7],9792:[.455,.205,.575],9834:[.695,.036,.703],9901:[.474,-.028,.575,{ic:.1}],9902:[.615,.113,.575,{ic:.228}],9906:[.455,.205,.575],10013:[.607,.025,.575]}},SHI:{italic:{9773:[.593,.001,.7],9834:[.695,.03,.562],9901:[.466,-.036,.511,{ic:.117}],9902:[.607,.105,.511,{ic:.22}],10013:[.602,.027,.511,{ic:.051}]}},SHBI:{"bold-italic":{9773:[.593,.001,.7],9834:[.695,.04,.648],9901:[.474,-.029,.591,{ic:.133}],9902:[.616,.113,.591,{ic:.252}],10013:[.608,.025,.591,{ic:.054}]}}},"NCM"),{},["MJX-NCM-SH","MJX-NCM-SHB","MJX-NCM-SHI","MJX-NCM-SHBI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/shapes","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/latin-i.js 0000644 0001762 0000144 00000043726 15112352537 022662 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","latin-i",c({LI:{italic:{192:[.969,0,.743],193:[.952,0,.743],194:[.923,0,.743],195:[.867,0,.743],196:[.845,0,.743],197:[.892,0,.743],198:[.683,0,.883,{ic:.068}],199:[.705,.213,.716,{ic:.096}],200:[.969,0,.678,{ic:.069}],201:[.952,0,.678,{ic:.071}],202:[.923,0,.678,{ic:.069}],203:[.845,0,.678,{ic:.069}],204:[.969,0,.386,{ic:.115}],205:[.952,0,.386,{ic:.183}],206:[.923,0,.386,{ic:.124}],207:[.845,0,.386,{ic:.138}],208:[.683,0,.755,{ic:.02}],209:[.867,0,.743,{ic:.109}],210:[.969,.022,.767,{ic:.021}],211:[.952,.022,.767,{ic:.022}],212:[.923,.022,.767,{ic:.021}],213:[.867,.022,.767,{ic:.021}],214:[.845,.022,.767,{ic:.021}],216:[.743,.06,.767,{ic:.055}],217:[.969,.022,.743,{ic:.109}],218:[.952,.022,.743,{ic:.109}],219:[.923,.022,.743,{ic:.109}],220:[.845,.022,.743,{ic:.109}],221:[.952,0,.743,{ic:.131}],222:[.684,.001,.627,{ic:.02}],223:[.705,.205,.537,{ic:.041}],224:[.725,.011,.511,{ic:.014}],225:[.708,.011,.511,{ic:.041}],226:[.679,.011,.511,{ic:.014}],227:[.623,.011,.511,{ic:.031}],228:[.601,.011,.511,{ic:.014}],229:[.709,.011,.511,{ic:.014}],230:[.442,.011,.716,{ic:.003}],231:[.442,.208,.46,{ic:.01}],232:[.725,.011,.46,{ic:.008}],233:[.708,.011,.46,{ic:.122}],234:[.679,.011,.46,{ic:.063}],235:[.601,.011,.46,{ic:.077}],236:[.725,.011,.307,{ic:.024}],237:[.708,.011,.307,{ic:.155}],238:[.679,.011,.307,{ic:.096}],239:[.601,.011,.307,{ic:.11}],241:[.623,.011,.562,{ic:.024}],242:[.725,.011,.511],243:[.708,.011,.511,{ic:.091}],244:[.679,.011,.511,{ic:.032}],245:[.623,.011,.511,{ic:.081}],246:[.601,.011,.511,{ic:.046}],248:[.538,.107,.511,{ic:.039}],249:[.725,.011,.537,{ic:.024}],250:[.708,.011,.537,{ic:.025}],251:[.679,.011,.537,{ic:.024}],252:[.601,.011,.537,{ic:.024}],253:[.708,.205,.486,{ic:.096}],254:[.694,.194,.511],255:[.601,.205,.486,{ic:.051}],256:[.859,0,.743],257:[.615,.011,.511,{ic:.03}],258:[.931,0,.743],259:[.687,.011,.511,{ic:.028}],260:[.716,.164,.743],261:[.442,.179,.511,{ic:.014}],262:[.952,.022,.716,{ic:.096}],263:[.708,.011,.46,{ic:.112}],264:[.923,.022,.716,{ic:.096}],265:[.679,.011,.46,{ic:.053}],266:[.897,.022,.716,{ic:.096}],267:[.653,.011,.46,{ic:.01}],268:[.938,.022,.716,{ic:.096}],269:[.694,.011,.46,{ic:.107}],270:[.938,0,.755,{ic:.02}],271:[.694,.011,.511,{ic:.295}],272:[.683,0,.755,{ic:.02}],273:[.694,.011,.511,{ic:.081}],274:[.859,0,.678,{ic:.069}],275:[.615,.011,.46,{ic:.111}],276:[.931,0,.678,{ic:.069}],277:[.687,.011,.46,{ic:.109}],278:[.897,0,.678,{ic:.069}],279:[.653,.011,.46,{ic:.008}],280:[.68,.178,.678,{ic:.069}],281:[.442,.186,.46,{ic:.008}],282:[.938,0,.678,{ic:.069}],283:[.694,.011,.46,{ic:.117}],284:[.923,.022,.774,{ic:.038}],285:[.679,.205,.46,{ic:.053}],286:[.931,.022,.774,{ic:.038}],287:[.687,.205,.46,{ic:.099}],288:[.897,.022,.774,{ic:.038}],289:[.653,.205,.46,{ic:.027}],290:[.705,.31,.774,{ic:.038}],291:[.735,.205,.46,{ic:.027}],292:[.923,0,.743,{ic:.109}],293:[.919,.011,.511,{ic:.024}],294:[.683,0,.743,{ic:.109}],295:[.694,.011,.511,{ic:.024}],296:[.867,0,.386,{ic:.173}],297:[.623,.011,.307,{ic:.145}],298:[.859,0,.386,{ic:.172}],299:[.615,.011,.307,{ic:.144}],300:[.931,0,.386,{ic:.17}],301:[.687,.011,.307,{ic:.142}],302:[.683,.175,.386,{ic:.115}],303:[.654,.18,.307,{ic:.051}],304:[.897,0,.386,{ic:.115}],306:[.683,.022,.872,{ic:.097}],307:[.654,.205,.583,{ic:.06}],308:[.923,.022,.525,{ic:.123}],309:[.679,.205,.307,{ic:.102}],310:[.683,.283,.769,{ic:.09}],311:[.694,.283,.46,{ic:.042}],312:[.43,0,.531],313:[.952,0,.627],314:[.948,.011,.256,{ic:.23}],315:[.683,.283,.627],316:[.694,.283,.256,{ic:.05}],317:[.696,0,.627,{ic:.198}],318:[.694,.011,.256,{ic:.302}],319:[.683,0,.627],320:[.694,.011,.456],321:[.683,0,.627],322:[.694,.011,.319,{ic:.032}],323:[.952,0,.743,{ic:.109}],324:[.708,.011,.562,{ic:.05}],325:[.683,.283,.743,{ic:.109}],326:[.442,.283,.562,{ic:.024}],327:[.938,0,.743,{ic:.109}],328:[.694,.011,.562,{ic:.045}],329:[.694,.011,.819,{ic:.024}],330:[.705,.022,.743,{ic:.078}],331:[.442,.216,.498,{ic:.02}],332:[.859,.022,.767,{ic:.021}],333:[.615,.011,.511,{ic:.08}],334:[.931,.022,.767,{ic:.021}],335:[.687,.011,.511,{ic:.078}],336:[.939,.022,.767,{ic:.036}],337:[.695,.011,.511,{ic:.105}],338:[.705,.022,.985,{ic:.068}],339:[.443,.012,.716,{ic:.003}],340:[.952,.022,.729],341:[.708,.011,.422,{ic:.11}],342:[.683,.283,.729],343:[.442,.295,.422,{ic:.067}],344:[.938,.022,.729],345:[.694,.011,.422,{ic:.105}],346:[.952,.022,.562,{ic:.08}],347:[.708,.011,.409,{ic:.123}],348:[.923,.022,.562,{ic:.07}],349:[.679,.011,.409,{ic:.064}],350:[.705,.217,.562,{ic:.07}],351:[.442,.209,.409,{ic:.01}],352:[.938,.022,.562,{ic:.075}],353:[.694,.011,.409,{ic:.118}],354:[.677,.198,.716,{ic:.09}],355:[.626,.204,.332,{ic:.041}],356:[.938,0,.716,{ic:.09}],357:[.684,.011,.332,{ic:.296}],358:[.678,0,.716,{ic:.09}],359:[.626,.011,.332,{ic:.041}],360:[.867,.022,.743,{ic:.109}],361:[.623,.011,.537,{ic:.024}],362:[.859,.022,.743,{ic:.109}],363:[.615,.011,.537,{ic:.024}],364:[.931,.022,.743,{ic:.109}],365:[.687,.011,.537,{ic:.024}],366:[.953,.022,.743,{ic:.109}],367:[.709,.011,.537,{ic:.024}],368:[.939,.022,.743,{ic:.109}],369:[.695,.011,.537,{ic:.039}],370:[.683,.195,.743,{ic:.109}],371:[.442,.184,.537,{ic:.024}],372:[.923,.022,.999,{ic:.125}],373:[.679,.011,.664,{ic:.033}],374:[.923,0,.743,{ic:.131}],375:[.679,.205,.486,{ic:.037}],376:[.845,0,.743,{ic:.131}],377:[.952,0,.613,{ic:.096}],378:[.708,.011,.409,{ic:.143}],379:[.897,0,.613,{ic:.091}],380:[.653,.011,.409,{ic:.055}],381:[.938,0,.613,{ic:.091}],382:[.694,.011,.409,{ic:.138}],383:[.705,.205,.307,{ic:.145}],384:[.694,.011,.46],385:[.683,0,.704,{ic:.03}],386:[.683,0,.704,{ic:.026}],387:[.68,.011,.46,{ic:.06}],388:[.689,0,.704],389:[.692,.011,.46],390:[.704,.023,.715,{ic:.022}],391:[.871,.022,.846,{ic:.098}],392:[.656,.011,.5,{ic:.168}],393:[.683,0,.755,{ic:.02}],394:[.683,0,.755,{ic:.02}],395:[.683,0,.704,{ic:.056}],396:[.68,.011,.46,{ic:.08}],397:[.446,.277,.472,{ic:.045}],398:[.68,0,.678,{ic:.118}],399:[.705,.022,.673,{ic:.034}],400:[.705,.022,.613,{ic:.078}],401:[.68,.205,.652,{ic:.024}],402:[.705,.205,.307,{ic:.145}],403:[.881,.022,.846,{ic:.098}],404:[.683,.217,.751,{ic:.076}],405:[.694,.011,.635,{ic:.033}],406:[.687,.011,.25,{ic:.039}],407:[.683,0,.386,{ic:.115}],408:[.69,0,.765,{ic:.095}],409:[.705,.011,.513,{ic:.08}],410:[.694,.011,.256,{ic:.087}],411:[.694,.01,.5,{ic:.01}],412:[.683,.023,1.056,{ic:.057}],413:[.683,.205,.743,{ic:.109}],414:[.442,.195,.562],415:[.705,.022,.767,{ic:.021}],416:[.789,.022,.767,{ic:.06}],417:[.536,.011,.511,{ic:.074}],418:[.706,.2,.852,{ic:.017}],419:[.448,.199,.611],420:[.683,0,.678,{ic:.052}],421:[.705,.194,.511,{ic:.131}],422:[.683,.177,.722],423:[.705,.022,.562,{ic:.047}],424:[.442,.011,.409,{ic:.008}],425:[.683,0,.716,{ic:.069}],426:[.705,.205,.332],427:[.626,.203,.332,{ic:.041}],428:[.677,0,.711,{ic:.09}],429:[.645,.011,.332,{ic:.152}],430:[.678,.205,.722,{ic:.084}],431:[.789,.022,.743,{ic:.131}],432:[.536,.011,.537,{ic:.093}],433:[.705,0,.716,{ic:.058}],434:[.697,.022,.724],435:[.689,0,.749,{ic:.188}],436:[.702,.205,.64,{ic:.156}],437:[.683,.001,.613,{ic:.091}],438:[.442,.011,.409,{ic:.055}],439:[.683,.022,.562,{ic:.1}],440:[.683,.022,.562,{ic:.158}],441:[.432,.225,.444,{ic:.018}],442:[.43,.205,.444,{ic:.022}],443:[.666,.022,.511,{ic:.054}],444:[.665,.022,.511,{ic:.056}],445:[.43,.014,.381],446:[.626,.011,.409],447:[.46,.227,.5,{ic:.033}],448:[.694,.194,.278],449:[.694,.194,.444],450:[.695,.195,.556],451:[.716,0,.307,{ic:.068}],452:[.93,0,1.368,{ic:.091}],453:[.683,.011,1.164,{ic:.103}],454:[.694,.011,.92,{ic:.103}],455:[.683,.022,1.152,{ic:.097}],456:[.683,.205,.934,{ic:.05}],457:[.694,.205,.562,{ic:.05}],458:[.683,.022,1.268,{ic:.097}],459:[.683,.205,1.05,{ic:.05}],460:[.656,.205,.869,{ic:.05}],461:[.938,0,.743],462:[.694,.011,.511,{ic:.036}],463:[.938,0,.386,{ic:.178}],464:[.694,.011,.307,{ic:.15}],465:[.938,.022,.767,{ic:.021}],466:[.694,.011,.511,{ic:.086}],467:[.938,.022,.743,{ic:.109}],468:[.694,.011,.537,{ic:.024}],469:[.935,.022,.743,{ic:.109}],470:[.727,.011,.537,{ic:.036}],471:[1.066,.022,.743,{ic:.109}],472:[.82,.011,.537,{ic:.047}],473:[1.052,.022,.743,{ic:.109}],474:[.806,.011,.537,{ic:.042}],475:[1.083,.022,.743,{ic:.109}],476:[.837,.011,.537,{ic:.024}],477:[.442,.011,.46,{ic:.039}],478:[.935,0,.743,{ic:.011}],479:[.825,.011,.511,{ic:.06}],480:[.987,0,.743,{ic:.015}],481:[.743,.011,.511,{ic:.056}],482:[.856,0,.883,{ic:.065}],483:[.591,.011,.715,{ic:.002}],484:[.705,.022,.774,{ic:.038}],485:[.442,.205,.46,{ic:.027}],486:[.938,.022,.774,{ic:.038}],487:[.694,.205,.46,{ic:.107}],488:[.938,0,.769,{ic:.09}],489:[.934,.011,.46,{ic:.042}],490:[.705,.211,.767,{ic:.021}],491:[.442,.211,.511],492:[.795,.211,.767,{ic:.021}],493:[.615,.211,.511,{ic:.08}],494:[.94,.022,.562,{ic:.101}],495:[.694,.205,.46,{ic:.087}],496:[.694,.205,.307,{ic:.156}],497:[.683,0,1.368,{ic:.091}],498:[.683,.011,1.164,{ic:.055}],499:[.694,.011,.92,{ic:.055}],500:[.952,.022,.774,{ic:.038}],501:[.708,.205,.46,{ic:.112}],502:[.683,.011,.931,{ic:.033}],503:[.458,.229,.5,{ic:.045}],504:[.969,0,.743,{ic:.109}],505:[.725,.011,.562,{ic:.024}],506:[1.143,0,.743,{ic:.057}],507:[.968,.011,.511,{ic:.103}],508:[.906,0,.883,{ic:.068}],509:[.696,.011,.716,{ic:.003}],510:[.906,.06,.767,{ic:.055}],511:[.696,.107,.511,{ic:.039}],512:[.939,0,.743],513:[.695,.011,.511,{ic:.014}],514:[.929,0,.743],515:[.685,.011,.511,{ic:.014}],516:[.939,0,.678,{ic:.069}],517:[.695,.011,.46,{ic:.023}],518:[.929,0,.678,{ic:.069}],519:[.685,.011,.46,{ic:.055}],520:[.939,0,.386,{ic:.115}],521:[.695,.011,.307,{ic:.056}],522:[.929,0,.386,{ic:.116}],523:[.685,.011,.307,{ic:.088}],524:[.939,.022,.767,{ic:.021}],525:[.695,.011,.511],526:[.929,.022,.767,{ic:.021}],527:[.685,.011,.511,{ic:.024}],528:[.939,.022,.729],529:[.695,.011,.422,{ic:.067}],530:[.929,.022,.729],531:[.685,.011,.422,{ic:.067}],532:[.939,.022,.743,{ic:.109}],533:[.695,.011,.537,{ic:.024}],534:[.929,.022,.743,{ic:.109}],535:[.685,.011,.537,{ic:.024}],536:[.705,.309,.562,{ic:.07}],537:[.442,.283,.409,{ic:.01}],538:[.677,.283,.716,{ic:.09}],539:[.626,.283,.332,{ic:.041}],540:[.721,.063,.533,{ic:.051}],541:[.487,.225,.533],542:[.938,0,.743,{ic:.109}],543:[.934,.011,.511,{ic:.024}],544:[.71,.2,.852,{ic:.015}],545:[.694,.135,.511,{ic:.049}],546:[.7,.02,.552,{ic:.053}],547:[.593,.02,.5],548:[.683,.167,.611,{ic:.093}],549:[.442,.161,.409,{ic:.055}],550:[.897,0,.743],551:[.653,.011,.511,{ic:.014}],552:[.705,.202,.678,{ic:.013}],553:[.442,.206,.46,{ic:.008}],554:[.935,.022,.767,{ic:.033}],555:[.747,.011,.511,{ic:.11}],556:[.957,.022,.767,{ic:.021}],557:[.761,.011,.511,{ic:.125}],558:[.897,.022,.767,{ic:.021}],559:[.653,.011,.511],560:[.987,.022,.767,{ic:.037}],561:[.743,.011,.511,{ic:.106}],562:[.859,0,.743,{ic:.131}],563:[.615,.205,.486,{ic:.085}],564:[.694,.163,.256,{ic:.083}],565:[.442,.156,.587,{ic:.013}],566:[.626,.156,.332,{ic:.041}],568:[.694,.011,.714],569:[.442,.194,.71],570:[.778,.218,.743],571:[.778,.218,.716,{ic:.096}],572:[.519,.087,.46,{ic:.01}],573:[.683,0,.627],574:[.778,.218,.716,{ic:.09}],575:[.442,.205,.409,{ic:.01}],576:[.442,.205,.409,{ic:.055}],577:[.705,0,.444,{ic:.022}],578:[.42,0,.444],579:[.683,0,.704,{ic:.03}],580:[.683,.022,.743,{ic:.109}],581:[.704,0,.743],582:[.778,.218,.678,{ic:.071}],583:[.519,.087,.46,{ic:.008}],584:[.683,.022,.525,{ic:.097}],585:[.654,.205,.307,{ic:.103}],586:[.683,.205,.715],587:[.442,.205,.517,{ic:.045}],588:[.683,.022,.729],589:[.442,.011,.422,{ic:.067}],590:[.683,0,.743,{ic:.131}],591:[.442,.205,.486,{ic:.054}],7680:[.716,.222,.743],7681:[.442,.222,.511,{ic:.014}],7682:[.897,0,.704,{ic:.03}],7683:[.893,.011,.46],7684:[.683,.193,.704,{ic:.03}],7685:[.694,.193,.46],7686:[.683,.155,.704,{ic:.03}],7687:[.694,.155,.46],7688:[.952,.213,.716,{ic:.096}],7689:[.708,.208,.46,{ic:.112}],7690:[.897,0,.755,{ic:.02}],7691:[.893,.011,.511,{ic:.101}],7692:[.683,.193,.755,{ic:.02}],7693:[.694,.193,.511,{ic:.049}],7694:[.683,.155,.755,{ic:.02}],7695:[.694,.155,.511,{ic:.049}],7696:[.683,.203,.755,{ic:.02}],7697:[.694,.204,.511,{ic:.049}],7698:[.683,.225,.755,{ic:.02}],7699:[.694,.225,.511,{ic:.049}],7704:[.68,.225,.678,{ic:.069}],7705:[.442,.225,.46,{ic:.008}],7706:[.68,.19,.678,{ic:.069}],7707:[.442,.19,.46,{ic:.008}],7710:[.897,0,.653,{ic:.082}],7711:[.893,.205,.307,{ic:.155}],7712:[.859,.022,.774,{ic:.038}],7713:[.615,.205,.46,{ic:.101}],7714:[.897,0,.743,{ic:.109}],7715:[.893,.011,.511,{ic:.024}],7716:[.683,.193,.743,{ic:.109}],7717:[.694,.193,.511,{ic:.024}],7718:[.845,0,.743,{ic:.109}],7719:[.841,.011,.511,{ic:.024}],7722:[.683,.225,.743,{ic:.109}],7723:[.694,.225,.511,{ic:.024}],7724:[.683,.19,.386,{ic:.115}],7725:[.654,.19,.307,{ic:.051}],7726:[1.072,0,.386,{ic:.207}],7727:[.838,.011,.307,{ic:.186}],7728:[.952,0,.769,{ic:.09}],7729:[.948,.011,.46,{ic:.042}],7730:[.683,.193,.769,{ic:.09}],7731:[.694,.193,.46,{ic:.042}],7732:[.683,.155,.769,{ic:.09}],7733:[.694,.155,.46,{ic:.042}],7734:[.683,.193,.627],7735:[.694,.193,.256,{ic:.05}],7736:[.859,.193,.627],7737:[.855,.193,.256,{ic:.219}],7738:[.683,.155,.627],7739:[.694,.155,.256,{ic:.081}],7740:[.683,.225,.627],7741:[.694,.225,.256,{ic:.05}],7742:[.952,0,.897,{ic:.105}],7743:[.708,.011,.818,{ic:.024}],7744:[.897,0,.897,{ic:.105}],7745:[.653,.011,.818,{ic:.024}],7746:[.683,.193,.897,{ic:.105}],7747:[.442,.193,.818,{ic:.024}],7748:[.897,0,.743,{ic:.109}],7749:[.653,.011,.562,{ic:.024}],7750:[.683,.193,.743,{ic:.109}],7751:[.442,.193,.562,{ic:.024}],7752:[.683,.155,.743,{ic:.109}],7753:[.442,.155,.562,{ic:.024}],7754:[.683,.225,.743,{ic:.109}],7755:[.442,.225,.562,{ic:.024}],7764:[.952,0,.678,{ic:.052}],7765:[.708,.194,.511,{ic:.071}],7766:[.897,0,.678,{ic:.052}],7767:[.653,.194,.511],7768:[.897,.022,.729],7769:[.653,.011,.422,{ic:.067}],7770:[.683,.193,.729],7771:[.442,.205,.422,{ic:.067}],7772:[.859,.193,.729],7773:[.615,.205,.422,{ic:.099}],7774:[.683,.155,.729],7775:[.442,.167,.422,{ic:.067}],7776:[.897,.022,.562,{ic:.07}],7777:[.653,.011,.409,{ic:.01}],7778:[.705,.219,.562,{ic:.07}],7779:[.442,.193,.409,{ic:.01}],7784:[.897,.219,.562,{ic:.07}],7785:[.653,.193,.409,{ic:.01}],7786:[.897,0,.716,{ic:.09}],7787:[.823,.011,.332,{ic:.041}],7788:[.677,.193,.716,{ic:.09}],7789:[.626,.193,.332,{ic:.041}],7790:[.677,.155,.716,{ic:.09}],7791:[.626,.155,.332,{ic:.041}],7792:[.677,.225,.716,{ic:.09}],7793:[.626,.225,.332,{ic:.041}],7794:[.683,.171,.743,{ic:.109}],7795:[.442,.165,.537,{ic:.024}],7796:[.683,.196,.743,{ic:.109}],7797:[.442,.19,.537,{ic:.024}],7798:[.683,.231,.743,{ic:.109}],7799:[.442,.225,.537,{ic:.024}],7804:[.867,.022,.743,{ic:.125}],7805:[.623,.011,.46,{ic:.092}],7806:[.683,.204,.743,{ic:.125}],7807:[.442,.193,.46,{ic:.033}],7808:[.969,.022,.999,{ic:.125}],7809:[.725,.011,.664,{ic:.033}],7810:[.952,.022,.999,{ic:.125}],7811:[.708,.011,.664,{ic:.033}],7812:[.845,.022,.999,{ic:.125}],7813:[.601,.011,.664,{ic:.033}],7814:[.897,.022,.999,{ic:.125}],7815:[.653,.011,.664,{ic:.033}],7816:[.683,.193,.999,{ic:.125}],7817:[.442,.193,.664,{ic:.033}],7818:[.897,0,.743,{ic:.082}],7819:[.653,.011,.464,{ic:.054}],7820:[.845,0,.743,{ic:.082}],7821:[.601,.011,.464,{ic:.054}],7822:[.897,0,.743,{ic:.131}],7823:[.653,.205,.486,{ic:.03}],7824:[.923,0,.613,{ic:.091}],7825:[.679,.011,.409,{ic:.084}],7826:[.683,.193,.613,{ic:.091}],7827:[.442,.193,.409,{ic:.055}],7828:[.683,.155,.613,{ic:.091}],7829:[.442,.155,.409,{ic:.055}],7830:[.694,.155,.511,{ic:.024}],7831:[.771,.011,.332,{ic:.112}],7832:[.709,.011,.664,{ic:.033}],7833:[.709,.205,.486,{ic:.03}],7835:[.92,.205,.306,{ic:.146}],7838:[.705,.011,.618],7840:[.716,.193,.743],7841:[.442,.193,.511,{ic:.014}],7842:[.988,0,.743],7843:[.744,.011,.511,{ic:.014}],7844:[1.182,0,.743,{ic:.03}],7845:[.918,.011,.511,{ic:.081}],7846:[1.199,0,.743],7847:[.935,.011,.511,{ic:.014}],7848:[1.218,0,.743],7849:[.954,.011,.511,{ic:.032}],7850:[1.097,0,.743,{ic:.02}],7851:[.833,.011,.511,{ic:.071}],7852:[.923,.193,.743],7853:[.679,.193,.511,{ic:.014}],7854:[1.152,0,.743,{ic:.03}],7855:[.938,.011,.511,{ic:.089}],7856:[1.169,0,.743],7857:[.938,.011,.511,{ic:.028}],7858:[1.188,0,.743],7859:[.956,.011,.511,{ic:.035}],7860:[1.067,0,.743,{ic:.02}],7861:[.848,.011,.511,{ic:.079}],7862:[.931,.193,.743],7863:[.687,.193,.511,{ic:.028}],7864:[.68,.193,.678,{ic:.069}],7865:[.442,.193,.46,{ic:.008}],7866:[.988,0,.678,{ic:.069}],7867:[.744,.011,.46,{ic:.073}],7868:[.867,0,.678,{ic:.069}],7869:[.623,.011,.46,{ic:.112}],7870:[1.165,0,.678,{ic:.104}],7871:[.918,.011,.46,{ic:.162}],7872:[1.182,0,.678,{ic:.069}],7873:[.935,.011,.46,{ic:.063}],7874:[1.201,0,.678,{ic:.069}],7875:[.954,.011,.46,{ic:.113}],7876:[1.08,0,.678,{ic:.094}],7877:[.833,.011,.46,{ic:.152}],7878:[.923,.193,.678,{ic:.069}],7879:[.679,.193,.46,{ic:.063}],7880:[.988,0,.386,{ic:.134}],7881:[.744,.011,.307,{ic:.106}],7882:[.683,.193,.386,{ic:.115}],7883:[.654,.193,.307,{ic:.051}],7884:[.705,.213,.767,{ic:.021}],7885:[.442,.192,.511],7886:[.988,.022,.767,{ic:.021}],7887:[.744,.011,.511,{ic:.042}],7888:[1.162,.022,.767,{ic:.056}],7889:[.912,.011,.511,{ic:.127}],7890:[1.179,.022,.767,{ic:.021}],7891:[.929,.011,.511,{ic:.032}],7892:[1.198,.022,.767,{ic:.021}],7893:[.948,.011,.511,{ic:.078}],7894:[1.077,.022,.767,{ic:.046}],7895:[.827,.011,.511,{ic:.117}],7896:[.923,.213,.767,{ic:.021}],7897:[.679,.192,.511,{ic:.022}],7898:[1.02,.022,.767,{ic:.06}],7899:[.718,.011,.511,{ic:.074}],7900:[1.037,.022,.767,{ic:.06}],7901:[.735,.011,.511,{ic:.074}],7902:[1.056,.022,.767,{ic:.06}],7903:[.754,.011,.511,{ic:.074}],7904:[.935,.022,.767,{ic:.06}],7905:[.633,.011,.511,{ic:.074}],7906:[.789,.213,.767,{ic:.06}],7907:[.536,.192,.511,{ic:.074}],7908:[.683,.199,.743,{ic:.109}],7909:[.442,.193,.537,{ic:.024}],7910:[.988,.022,.743,{ic:.109}],7911:[.744,.011,.537,{ic:.024}],7912:[1.01,.022,.743,{ic:.131}],7913:[.708,.011,.537,{ic:.093}],7914:[1.027,.022,.743,{ic:.131}],7915:[.725,.011,.537,{ic:.093}],7916:[1.046,.022,.743,{ic:.131}],7917:[.744,.011,.537,{ic:.093}],7918:[.925,.022,.743,{ic:.131}],7919:[.623,.011,.537,{ic:.093}],7920:[.789,.199,.743,{ic:.131}],7921:[.536,.193,.537,{ic:.093}],7922:[.969,0,.743,{ic:.131}],7923:[.725,.205,.486,{ic:.03}],7924:[.683,.193,.743,{ic:.131}],7925:[.442,.424,.486,{ic:.03}],7926:[.988,0,.743,{ic:.131}],7927:[.744,.205,.486,{ic:.047}],7928:[.867,0,.743,{ic:.131}],7929:[.623,.205,.486,{ic:.086}]}}},"NCM"),{},["MJX-NCM-LI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/latin-i","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/sans-serif-r.js 0000644 0001762 0000144 00000031750 15112352537 023630 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","sans-serif-r",c({SSLR:{"sans-serif":{192:[.868,0,.667],193:[.868,0,.667],194:[.87,0,.667],195:[.855,0,.667],196:[.816,0,.667],197:[.862,0,.667],198:[.694,0,.861],199:[.716,.214,.639],200:[.868,0,.597],201:[.868,0,.597],202:[.87,0,.597],203:[.816,0,.597],204:[.868,0,.278],205:[.868,0,.278,{ic:.112}],206:[.87,0,.278,{ic:.022}],207:[.816,0,.278],208:[.694,0,.722],209:[.855,0,.708],210:[.868,.022,.736],211:[.868,.022,.736],212:[.87,.022,.736],213:[.855,.022,.736],214:[.816,.022,.736],216:[.76,.066,.778],217:[.868,.022,.688],218:[.868,.022,.688],219:[.87,.022,.688],220:[.816,.022,.688],221:[.868,0,.667],222:[.694,0,.583],223:[.705,.011,.481],224:[.694,.011,.481],225:[.694,.011,.481],226:[.697,.011,.481],227:[.67,.011,.481],228:[.651,.011,.481],229:[.685,.011,.481],230:[.461,.011,.722],231:[.461,.214,.444],232:[.694,.011,.444],233:[.694,.011,.444],234:[.697,.011,.444],235:[.651,.011,.444],236:[.694,0,.239],237:[.694,0,.239,{ic:.058}],238:[.697,0,.239,{ic:.039}],239:[.651,0,.239],241:[.67,0,.517],242:[.694,.011,.5],243:[.694,.011,.5],244:[.697,.011,.5],245:[.67,.011,.5],246:[.651,.011,.5],248:[.558,.113,.5],249:[.694,.011,.517],250:[.694,.011,.517],251:[.697,.011,.517],252:[.651,.011,.517],253:[.694,.205,.461],254:[.694,.194,.517],255:[.651,.205,.461],256:[.82,0,.667],257:[.643,.011,.481],258:[.924,0,.667],259:[.7,.011,.481],260:[.694,.212,.667],261:[.461,.212,.481],262:[.868,.011,.639],263:[.694,.011,.444],264:[.87,.011,.639],265:[.697,.011,.444],266:[.825,.011,.639],267:[.655,.011,.444],268:[.87,.011,.639],269:[.697,.011,.444],270:[.87,0,.722],271:[.694,.011,.517,{ic:.028}],272:[.694,0,.722],273:[.694,.011,.517],274:[.82,0,.597],275:[.643,.011,.444],276:[.924,0,.597],277:[.7,.011,.444],278:[.825,0,.597],279:[.655,.011,.444],280:[.691,.212,.597],281:[.461,.212,.444],282:[.87,0,.597],283:[.697,.011,.444],284:[.87,.011,.667],285:[.697,.206,.5],286:[.924,.011,.667],287:[.7,.206,.5],288:[.825,.011,.667],289:[.655,.206,.5],290:[.706,.266,.667],291:[.727,.206,.5],292:[.87,0,.708],293:[.87,0,.517],294:[.694,0,.708],295:[.694,0,.517],296:[.855,0,.278,{ic:.028}],297:[.67,0,.239,{ic:.047}],298:[.82,0,.278,{ic:.042}],299:[.643,0,.239,{ic:.061}],300:[.924,0,.278,{ic:.03}],301:[.7,0,.239,{ic:.049}],302:[.694,.212,.278],303:[.68,.212,.239],304:[.825,0,.278],306:[.694,.022,.722],307:[.655,.205,.482],308:[.87,.022,.472,{ic:.034}],309:[.697,.205,.267,{ic:.032}],310:[.694,.266,.694],311:[.694,.266,.489],312:[.444,0,.489],313:[.868,0,.542],314:[.868,0,.239,{ic:.138}],315:[.694,.266,.542],316:[.694,.266,.239],317:[.694,0,.542],318:[.694,0,.239,{ic:.028}],319:[.694,0,.542],320:[.694,0,.288,{ic:.018}],321:[.694,0,.625],322:[.694,0,.324],323:[.868,0,.708],324:[.694,0,.517],325:[.694,.266,.708],326:[.455,.266,.517],327:[.87,0,.708],328:[.697,0,.517],329:[.623,0,.645],330:[.716,.022,.708],331:[.455,.209,.517],332:[.82,.022,.736],333:[.643,.011,.5],334:[.924,.022,.736],335:[.7,.011,.5],336:[.913,.022,.736],337:[.694,.011,.5],338:[.716,.022,.972],339:[.461,.011,.778],340:[.868,0,.646],341:[.694,0,.342],342:[.694,.266,.646],343:[.455,.266,.342],344:[.87,0,.646],345:[.697,0,.342],346:[.868,.022,.556],347:[.694,.011,.383],348:[.87,.022,.556],349:[.697,.011,.383],350:[.716,.214,.556],351:[.461,.214,.383],352:[.87,.022,.556],353:[.697,.011,.383],354:[.688,.192,.681],355:[.571,.192,.361],356:[.87,0,.681],357:[.668,.011,.361],358:[.688,0,.681],359:[.571,.011,.361],360:[.855,.022,.688],361:[.67,.011,.517],362:[.82,.022,.688],363:[.643,.011,.517],364:[.924,.022,.688],365:[.7,.011,.517],366:[.862,.022,.688],367:[.685,.011,.517],368:[.913,.022,.688],369:[.694,.011,.517],370:[.694,.212,.688],371:[.444,.212,.517],372:[.87,0,.944],373:[.697,0,.683],374:[.87,0,.667],375:[.697,.205,.461],376:[.816,0,.667],377:[.868,0,.611],378:[.694,0,.435],379:[.825,0,.611],380:[.655,0,.435],381:[.87,0,.611],382:[.697,0,.435],383:[.705,0,.286,{ic:.041}],384:[.695,.011,.517],385:[.694,0,.837],386:[.694,0,.667],387:[.694,.011,.517],388:[.703,0,.667],389:[.709,.011,.517],390:[.716,.022,.639],391:[.915,.011,.639,{ic:.094}],392:[.678,.011,.5,{ic:.069}],393:[.694,0,.762],394:[.694,0,.902],395:[.694,0,.667],396:[.694,.011,.517],397:[.455,.277,.472],398:[.691,0,.597],399:[.716,.022,.669],400:[.716,.022,.555],401:[.691,.217,.569],402:[.705,0,.306,{ic:.041}],403:[.915,.011,.639,{ic:.094}],404:[.681,.206,.685,{ic:.002}],405:[.695,.011,.728],406:[.694,.011,.333,{ic:.002}],407:[.694,0,.418],408:[.698,0,.794],409:[.717,0,.489],410:[.695,0,.389],411:[.695,.012,.528],412:[.694,.005,.794],413:[.694,.217,.708],414:[.455,.195,.489],415:[.716,.022,.736],416:[.778,.022,.736],417:[.528,.011,.5],418:[.716,.197,.839],419:[.461,.246,.6],420:[.694,0,.819],421:[.717,.195,.489],422:[.694,.178,.646,{ic:.012}],423:[.717,.022,.555],424:[.461,.011,.383],425:[.694,0,.722],426:[.717,.217,.358,{ic:.028}],427:[.571,.217,.389],428:[.688,0,.777],429:[.647,.011,.389],430:[.688,.217,.681],431:[.778,.022,.687,{ic:.003}],432:[.528,.011,.544],433:[.716,0,.722],434:[.694,.022,.688],435:[.698,0,.767,{ic:.01}],436:[.446,.205,.581,{ic:.009}],437:[.694,0,.611],438:[.444,0,.435],439:[.694,.022,.546],440:[.694,.022,.546],441:[.445,.205,.435],442:[.445,.205,.435],443:[.678,0,.5],444:[.656,.022,.5],445:[.428,.25,.5],446:[.571,.011,.453],447:[.449,.206,.461],448:[.695,.195,.278],449:[.695,.195,.444],450:[.695,.195,.556],451:[.695,0,.319],452:[.889,0,1.333],453:[.694,0,1.157],454:[.722,.011,.952],455:[.694,.022,1.014],456:[.694,.205,.809],457:[.722,.205,.506],458:[.694,.022,1.18],459:[.694,.205,.975],460:[.679,.205,.784],461:[.87,0,.667],462:[.697,.011,.481],463:[.87,0,.278,{ic:.022}],464:[.697,0,.239,{ic:.039}],465:[.87,.022,.736],466:[.697,.011,.5],467:[.87,.022,.688],468:[.697,.011,.517],469:[1.049,.022,.688],470:[.812,.011,.517],471:[.99,.022,.688],472:[.829,.011,.517],473:[.992,.022,.688],474:[.831,.011,.517],475:[.99,.022,.688],476:[.829,.011,.517],477:[.461,.011,.444],478:[1.049,0,.667],479:[.812,.011,.481],480:[1.057,0,.667],481:[.832,.011,.48],482:[.837,0,.861],483:[.616,.011,.722],484:[.706,.011,.73],485:[.455,.206,.57],486:[.87,.011,.667],487:[.697,.206,.5],488:[.889,0,.694],489:[.9,0,.489],490:[.716,.212,.736],491:[.461,.212,.5],492:[.887,.212,.736],493:[.575,.218,.5],494:[.889,.022,.546],495:[.639,.205,.435],496:[.697,.205,.267,{ic:.032}],497:[.694,0,1.333],498:[.694,0,1.157],499:[.722,.011,.952],500:[.868,.011,.667],501:[.694,.206,.5],502:[.694,.011,.996],503:[.721,.206,.461,{ic:.074}],504:[.851,0,.708],505:[.64,0,.517],506:[1.019,0,.667],507:[.842,.011,.481],508:[.868,0,.861],509:[.694,.011,.722],510:[.868,.066,.778],511:[.694,.113,.5],512:[.913,0,.667],513:[.694,.011,.481],514:[.889,0,.667],515:[.639,.011,.48],516:[.913,0,.597],517:[.694,.011,.444],518:[.889,0,.597],519:[.639,.011,.444],520:[.913,0,.278,{ic:.005}],521:[.694,0,.239,{ic:.024}],522:[.889,0,.278,{ic:.031}],523:[.639,0,.239,{ic:.048}],524:[.913,.022,.736],525:[.694,.011,.5],526:[.889,.022,.736],527:[.639,.011,.5],528:[.913,0,.646],529:[.694,0,.342],530:[.889,0,.646],531:[.639,0,.342,{ic:.031}],532:[.913,.022,.688],533:[.694,.011,.517],534:[.889,.022,.687],535:[.639,.011,.517],536:[.716,.266,.556],537:[.461,.266,.383],538:[.688,.266,.681],539:[.571,.266,.361],540:[.69,.054,.579],541:[.457,.197,.48],542:[.889,0,.708],543:[.9,0,.517],544:[.71,.196,.737],545:[.695,.146,.572,{ic:.022}],546:[.708,.011,.5],547:[.656,.011,.5],548:[.694,.186,.611],549:[.445,.186,.49],550:[.855,0,.667],551:[.679,.011,.48],552:[.691,.194,.597],553:[.461,.202,.444],554:[1.049,.022,.736],555:[.812,.011,.5],556:[1.069,.022,.736],557:[.812,.011,.5],558:[.855,.022,.736],559:[.679,.011,.5],560:[1.057,.022,.736],561:[.832,.011,.5],562:[.837,0,.667],563:[.616,.205,.461],564:[.694,.146,.239,{ic:.076}],565:[.455,.146,.572,{ic:.023}],566:[.571,.146,.361],568:[.695,.011,.833],569:[.455,.195,.833],570:[.839,.16,.667],571:[.839,.16,.639],572:[.62,.16,.444],573:[.694,0,.542],574:[.839,.16,.681],575:[.461,.161,.383],576:[.444,.184,.435],577:[.705,0,.5],578:[.448,0,.5],579:[.694,0,.667],580:[.694,.022,.688],581:[.694,0,.667],582:[.839,.16,.597],583:[.62,.16,.444],584:[.694,.022,.472],585:[.655,.205,.267,{ic:.019}],586:[.715,.218,.633,{ic:.079}],587:[.455,.217,.517,{ic:.07}],588:[.694,0,.666],589:[.455,0,.342],590:[.694,0,.667,{ic:.007}],591:[.444,.205,.461],11377:[.455,0,.492],7680:[.694,.28,.667],7681:[.461,.224,.48],7682:[.855,0,.667],7683:[.94,.011,.517],7684:[.694,.148,.667],7685:[.722,.17,.517],7686:[.694,.135,.667],7687:[.722,.158,.517],7688:[.851,.192,.639],7689:[.64,.192,.444],7690:[.855,0,.722],7691:[.94,.011,.517],7692:[.694,.2,.722],7693:[.694,.2,.517],7694:[.694,.187,.722],7695:[.694,.187,.517],7696:[.694,.169,.722],7697:[.722,.169,.517],7698:[.694,.231,.722],7699:[.722,.202,.517],7704:[.691,.231,.597],7705:[.461,.202,.444],7706:[.691,.22,.597],7707:[.461,.171,.444],7710:[.855,0,.569],7711:[.94,0,.305,{ic:.042}],7712:[.837,.022,.667],7713:[.616,.206,.5],7714:[.855,0,.708],7715:[.94,0,.517],7716:[.694,.2,.708],7717:[.694,.2,.517],7718:[.816,0,.708],7719:[.816,0,.517],7722:[.694,.244,.708],7723:[.694,.244,.517],7724:[.694,.22,.278,{ic:.027}],7725:[.679,.171,.239,{ic:.045}],7726:[.99,0,.278,{ic:.062}],7727:[.829,0,.239,{ic:.081}],7728:[.851,0,.694],7729:[.901,0,.489],7730:[.694,.148,.694],7731:[.722,.17,.489],7732:[.694,.135,.694],7733:[.722,.158,.489],7734:[.694,.2,.542],7735:[.694,.2,.239],7736:[.82,.2,.542],7737:[.82,.2,.239,{ic:.073}],7738:[.694,.135,.542],7739:[.722,.158,.239,{ic:.059}],7740:[.694,.231,.542],7741:[.722,.202,.239,{ic:.039}],7742:[.851,0,.875],7743:[.64,0,.794],7744:[.855,0,.875],7745:[.679,0,.794],7746:[.694,.2,.875],7747:[.455,.2,.794],7748:[.825,0,.708],7749:[.655,0,.517],7750:[.694,.2,.708],7751:[.455,.2,.517],7752:[.694,.135,.708],7753:[.455,.158,.517],7754:[.694,.231,.708],7755:[.455,.202,.517],7764:[.851,0,.639],7765:[.64,.195,.517],7766:[.855,0,.639],7767:[.679,.195,.517],7768:[.825,0,.646],7769:[.655,0,.342],7770:[.694,.2,.646],7771:[.455,.2,.342],7772:[.82,.2,.646],7773:[.643,.2,.342,{ic:.01}],7774:[.694,.135,.646],7775:[.455,.158,.342],7776:[.855,.022,.555],7777:[.679,.011,.383],7778:[.716,.2,.556],7779:[.461,.2,.383],7784:[.855,.148,.555],7785:[.679,.17,.383],7786:[.855,0,.68],7787:[.789,.011,.361],7788:[.688,.2,.681],7789:[.571,.2,.361],7790:[.688,.187,.681],7791:[.571,.187,.361,{ic:.001}],7792:[.689,.231,.68],7793:[.571,.202,.361],7794:[.694,.148,.687],7795:[.445,.17,.517],7796:[.694,.22,.687],7797:[.445,.171,.517],7798:[.694,.231,.687],7799:[.445,.202,.517],7804:[.889,0,.667],7805:[.639,0,.461],7806:[.694,.148,.667],7807:[.445,.17,.461],7808:[.868,0,.944],7809:[.694,0,.683],7810:[.868,0,.944],7811:[.694,0,.683],7812:[.816,0,.944],7813:[.651,0,.683],7814:[.855,0,.944],7815:[.679,0,.683],7816:[.694,.148,.944],7817:[.445,.17,.683],7818:[.855,0,.667],7819:[.679,0,.461,{ic:.004}],7820:[.849,0,.667],7821:[.66,0,.461,{ic:.004}],7822:[.855,0,.667],7823:[.679,.205,.461],7824:[.9,0,.611],7825:[.65,0,.435],7826:[.694,.2,.611],7827:[.444,.2,.435],7828:[.694,.135,.611],7829:[.445,.158,.435],7830:[.722,.158,.517],7831:[.693,.011,.361],7832:[.639,0,.683],7833:[.639,.205,.461],7835:[.94,0,.305,{ic:.042}],7838:[.705,.011,.541],7840:[.694,.2,.667],7841:[.461,.2,.481],7842:[.951,0,.667],7843:[.718,.011,.481],7844:[1.027,0,.667],7845:[.816,.011,.481],7846:[1.027,0,.667],7847:[.816,.011,.481],7848:[1.1,0,.667],7849:[.889,.011,.481],7850:[1.044,0,.667],7851:[.833,.011,.481],7852:[.87,.2,.667],7853:[.697,.2,.481],7854:[1.081,0,.667],7855:[.857,.011,.481],7856:[1.081,0,.667],7857:[.857,.011,.481],7858:[1.154,0,.667],7859:[.93,.011,.481],7860:[1.098,0,.667],7861:[.874,.011,.481],7862:[.924,.2,.667],7863:[.7,.2,.481],7864:[.691,.2,.597],7865:[.461,.2,.444],7866:[.951,0,.597],7867:[.718,.011,.444],7868:[.855,0,.597],7869:[.67,.011,.444],7870:[1.027,0,.597],7871:[.816,.011,.444],7872:[1.027,0,.597],7873:[.816,.011,.444],7874:[1.1,0,.597],7875:[.889,.011,.444],7876:[1.044,0,.597],7877:[.833,.011,.444],7878:[.87,.2,.597],7879:[.697,.2,.444],7880:[.951,0,.278],7881:[.718,0,.239],7882:[.694,.2,.278],7883:[.655,.2,.239],7884:[.716,.2,.736],7885:[.461,.2,.5],7886:[.951,.022,.736],7887:[.718,.011,.5],7888:[1.027,.022,.736],7889:[.816,.011,.5],7890:[1.027,.022,.736],7891:[.816,.011,.5],7892:[1.1,.022,.736],7893:[.889,.011,.5],7894:[1.044,.022,.736],7895:[.833,.011,.5],7896:[.87,.2,.736],7897:[.697,.2,.5],7898:[.868,.022,.736],7899:[.694,.011,.5],7900:[.868,.022,.736],7901:[.694,.011,.5],7902:[.951,.022,.736],7903:[.718,.011,.5],7904:[.855,.022,.736],7905:[.67,.011,.5],7906:[.778,.2,.736],7907:[.528,.2,.5],7908:[.694,.2,.688],7909:[.444,.2,.517],7910:[.951,.022,.688],7911:[.718,.011,.517],7912:[.868,.022,.687,{ic:.003}],7913:[.694,.011,.544],7914:[.868,.022,.687,{ic:.003}],7915:[.694,.011,.544],7916:[.951,.022,.687,{ic:.003}],7917:[.718,.011,.544],7918:[.855,.022,.687,{ic:.003}],7919:[.67,.011,.544],7920:[.778,.2,.687,{ic:.003}],7921:[.528,.2,.544],7922:[.868,0,.667],7923:[.694,.205,.461],7924:[.694,.2,.667],7925:[.444,.205,.461],7926:[.951,0,.667],7927:[.718,.205,.461],7928:[.855,0,.667],7929:[.67,.205,.461]}}},"NCM"),{},["MJX-NCM-SSLR"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/sans-serif-r","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/fraktur.js 0000644 0001762 0000144 00000007525 15112352537 023000 0 ustar ligges users (()=>{"use strict";const s=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","fraktur",s({F:{normal:{120068:[.698,.029,.717,{sk:.085}],120069:[.691,.027,.904,{sk:.032}],8493:[.687,.024,.612,{ic:.001,sk:.064}],120071:[.69,.027,.831],120072:[.687,.024,.662,{sk:.027}],120073:[.686,.155,.611,{ic:.011,sk:.062}],120074:[.695,.025,.785,{sk:-.038}],8460:[.668,.133,.72,{sk:.02}],8465:[.686,.027,.554,{sk:.138}],120077:[.686,.139,.552,{sk:.084}],120078:[.681,.027,.668,{ic:.022,sk:.074}],120079:[.686,.027,.666,{sk:.073}],120080:[.692,.029,1.049,{sk:.138}],120081:[.686,.031,.832,{sk:.121}],120082:[.729,.027,.828,{sk:.048}],120083:[.692,.22,.823,{sk:.102}],120084:[.729,.069,.828,{sk:.042}],8476:[.686,.029,.828,{sk:.08}],120086:[.689,.027,.828,{sk:.017}],120087:[.71,.027,.669,{ic:.007,sk:.032}],120088:[.698,.029,.645,{ic:.021,sk:.013}],120089:[.686,.027,.831,{sk:.061}],120090:[.687,.028,1.046,{ic:.011,sk:.117}],120091:[.69,.027,.719,{sk:.049}],120092:[.687,.219,.834,{sk:.057}],8488:[.729,.139,.602,{sk:.015}],120094:[.472,.037,.5],120095:[.687,.032,.513,{sk:-.096}],120096:[.466,.03,.389,{sk:.025}],120097:[.612,.035,.498],120098:[.468,.032,.4],120099:[.679,.239,.329,{sk:.029}],120100:[.471,.209,.503,{sk:.013}],120101:[.69,.199,.521,{sk:-.117}],120102:[.677,.023,.279],120103:[.675,.203,.28,{sk:-.01}],120104:[.687,.027,.389,{sk:-.042}],120105:[.687,.022,.279,{sk:.025}],120106:[.476,.028,.766,{sk:.022}],120107:[.476,.025,.526],120108:[.482,.029,.488,{sk:.014}],120109:[.539,.215,.5,{sk:.024}],120110:[.481,.225,.489],120111:[.476,.022,.389,{ic:.007}],120112:[.48,.031,.442],120113:[.642,.022,.333,{ic:.016,sk:-.015}],120114:[.476,.027,.517],120115:[.533,.029,.511,{sk:.029}],120116:[.533,.029,.773,{sk:.026}],120117:[.474,.188,.388,{sk:.01}],120118:[.524,.22,.498,{sk:.015}],120119:[.472,.215,.39,{sk:-.01}]},fraktur:{305:[.477,.023,.279,{sk:-.019}],567:[.476,.203,.28]}},FB:{normal:{120172:[.688,.031,.847,{sk:.082}],120173:[.685,.031,1.043],120174:[.677,.032,.723,{ic:.006,sk:.218}],120175:[.685,.029,.981,{sk:-.033}],120176:[.687,.029,.782,{sk:.207}],120177:[.684,.147,.721,{ic:.013,sk:-.078}],120178:[.692,.027,.927,{sk:.17}],120179:[.684,.127,.85,{sk:.071}],120180:[.683,.025,.654,{sk:.073}],120181:[.681,.142,.652,{sk:-.059}],120182:[.682,.026,.789,{ic:.024,sk:.126}],120183:[.684,.028,.786,{sk:.126}],120184:[.686,.033,1.239,{sk:.038}],120185:[.681,.033,.982,{sk:.024}],120186:[.726,.029,.976,{sk:-.087}],120187:[.685,.223,.977,{sk:.013}],120188:[.726,.082,.976,{sk:-.087}],120189:[.689,.029,.977,{sk:.011}],120190:[.685,.031,.978],120191:[.691,.03,.789,{ic:.009,sk:.153}],120192:[.689,.039,.85,{ic:.021,sk:.104}],120193:[.687,.029,.981],120194:[.682,.03,1.235,{ic:.005,sk:.022}],120195:[.682,.035,.849,{sk:.064}],120196:[.689,.214,.983],120197:[.718,.137,.726,{sk:-.169}],120198:[.472,.032,.602,{sk:.087}],120199:[.691,.032,.589],120200:[.473,.026,.463,{sk:.081}],120201:[.632,.029,.588,{sk:-.105}],120202:[.471,.028,.471,{sk:.048}],120203:[.681,.242,.387,{sk:.072}],120204:[.473,.208,.594,{sk:.111}],120205:[.687,.203,.615,{sk:-.097}],120206:[.686,.026,.331],120207:[.683,.207,.331],120208:[.683,.025,.464,{sk:-.017}],120209:[.682,.024,.336,{sk:.125}],120210:[.476,.031,.921,{sk:-.056}],120211:[.474,.028,.653,{sk:-.071}],120212:[.482,.034,.609,{sk:.029}],120213:[.558,.208,.603,{sk:-.124}],120214:[.485,.212,.595,{sk:.112}],120215:[.473,.026,.459,{sk:.013}],120216:[.48,.035,.522],120217:[.654,.027,.393,{ic:.014,sk:.085}],120218:[.473,.035,.588,{ic:.016,sk:.011}],120219:[.546,.028,.604,{sk:-.142}],120220:[.549,.033,.917,{sk:-.296}],120221:[.471,.188,.458,{sk:.026}],120222:[.559,.222,.589,{sk:-.127}],120223:[.472,.215,.461]},"bold-fraktur":{305:[.478,.026,.331,{sk:-.025}],567:[.483,.207,.331,{sk:-.015}]}}},"NCM"));MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/fraktur","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/sans-serif.js 0000644 0001762 0000144 00000057041 15112352537 023372 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","sans-serif",c({SS:{normal:{8513:[.706,.011,.667],8514:[.694,0,.542],8515:[.694,0,.542],8516:[.694,0,.667],120224:[.694,0,.667],120225:[.694,0,.667,{sk:-.077}],120226:[.706,.011,.639,{sk:.091}],120227:[.694,0,.722,{sk:-.109}],120228:[.691,0,.597,{sk:.018}],120229:[.691,0,.569,{sk:.025}],120230:[.706,.011,.667,{sk:.073}],120231:[.694,0,.708],120232:[.694,0,.278],120233:[.694,.022,.472,{sk:.109}],120234:[.694,0,.694,{sk:.02}],120235:[.694,0,.542,{sk:-.132}],120236:[.694,0,.875],120237:[.694,0,.708],120238:[.716,.022,.736],120239:[.694,0,.639,{sk:-.06}],120240:[.716,.125,.736],120241:[.694,0,.646,{sk:-.066}],120242:[.716,.022,.556,{sk:.015}],120243:[.688,0,.681],120244:[.694,.022,.688],120245:[.694,0,.667],120246:[.694,0,.944],120247:[.694,0,.667,{sk:-.015}],120248:[.694,0,.667],120249:[.694,0,.611],120250:[.461,.011,.481,{sk:-.013}],120251:[.694,.011,.517,{sk:-.139}],120252:[.461,.011,.444,{sk:.042}],120253:[.694,.011,.517,{sk:.139}],120254:[.461,.011,.444,{sk:.016}],120255:[.705,0,.306,{ic:.041,sk:.096}],120256:[.455,.206,.5,{sk:.074}],120257:[.694,0,.517,{sk:-.14}],120258:[.655,0,.239],120259:[.655,.205,.267],120260:[.694,0,.489,{sk:-.124}],120261:[.694,0,.239],120262:[.455,0,.794,{sk:-.038}],120263:[.455,0,.517,{sk:-.038}],120264:[.461,.011,.5],120265:[.455,.194,.517,{sk:-.03}],120266:[.455,.194,.517,{sk:.041}],120267:[.455,0,.342,{sk:.034}],120268:[.461,.011,.383,{sk:.022}],120269:[.571,.011,.361,{sk:-.04}],120270:[.444,.011,.517],120271:[.444,0,.461],120272:[.444,0,.683],120273:[.444,0,.461,{ic:.004}],120274:[.444,.205,.461],120275:[.444,0,.435],120802:[.678,.022,.5],120803:[.678,0,.5,{sk:.01}],120804:[.678,0,.5],120805:[.678,.022,.5],120806:[.656,0,.5,{sk:.073}],120807:[.656,.022,.5],120808:[.678,.022,.5,{sk:.084}],120809:[.656,.011,.5],120810:[.678,.022,.5],120811:[.678,.022,.5]},"sans-serif":{305:[.444,0,.239],567:[.444,.205,.267,{sk:.013}],32:[0,0,.333],33:[.694,0,.319],34:[.716,-.43,.434],35:[.694,.194,.833],36:[.75,.056,.5],37:[.75,.056,.833],38:[.716,.022,.758],39:[.716,-.43,.278],40:[.75,.25,.389],41:[.75,.25,.389],42:[.75,-.306,.5],43:[.583,.083,.778],44:[.083,.125,.278],45:[.251,-.193,.333],46:[.083,0,.278],47:[.75,.25,.5],58:[.444,0,.278],59:[.444,.125,.278],60:[.54,.04,.778],61:[.37,-.13,.778],62:[.54,.04,.778],63:[.705,0,.472],64:[.705,.011,.667],91:[.75,.25,.289],92:[.75,.25,.5],93:[.75,.25,.289],94:[.745,-.561,.556,{ic:.006}],95:[-.086,.164,.667],96:[.694,-.527,.5],123:[.75,.25,.5],124:[.75,.25,.278],125:[.75,.25,.5],126:[.309,-.191,.556,{ic:.001}],160:[0,0,.5],163:[.694,.022,.667],165:[.694,0,.667],167:[.712,.212,.528],168:[.651,-.571,.5],172:[.37,-.13,.778],175:[.631,-.567,.5],176:[.694,-.417,.375],177:[.666,0,.778],180:[.694,-.527,.5],181:[.444,.194,.517],182:[.694,.194,.611],183:[.389,-.306,.778],215:[.491,-.01,.778],240:[.725,.011,.5],247:[.414,-.085,.778],710:[.697,-.525,.5],711:[.697,-.525,.5],713:[.631,-.567,.5],714:[.694,-.527,.5],715:[.694,-.527,.5],728:[.7,-.522,.5],729:[.655,-.566,.278],730:[.7,-.504,.296],732:[.67,-.551,.5],768:[.694,-.527,0,{dx:.276}],769:[.694,-.527,0,{dx:.204}],770:[.697,-.525,0,{dx:.24}],771:[.67,-.551,0,{dx:.239}],772:[.643,-.579,0,{dx:.239}],773:[.682,-.642,.778],774:[.7,-.522,0,{dx:.239}],775:[.655,-.566,0,{dx:.24}],776:[.651,-.571,0,{dx:.24}],778:[.7,-.504,.296],780:[.697,-.525,0,{dx:.24}],913:[.694,0,.667],914:[.694,0,.667],915:[.691,0,.542],916:[.694,0,.833],917:[.691,0,.597],918:[.694,0,.611],919:[.694,0,.708],920:[.716,.022,.778],921:[.695,0,.278],922:[.694,0,.694],923:[.694,0,.611],924:[.694,0,.875],925:[.694,0,.708],926:[.689,0,.667],927:[.716,.022,.736],928:[.691,0,.708],929:[.694,0,.639],931:[.694,0,.722],932:[.689,0,.68],933:[.716,0,.778],934:[.694,0,.722],935:[.694,0,.667],936:[.694,0,.778],937:[.716,0,.722],945:[.455,.011,.633],946:[.733,.139,.5],947:[.455,.171,.555],948:[.721,.011,.472],949:[.455,.011,.43],950:[.738,.153,.472],951:[.467,.195,.514],952:[.733,.011,.5],953:[.445,.011,.278],954:[.445,0,.483],955:[.722,0,.5],956:[.445,.195,.555],957:[.445,0,.472],958:[.744,.156,.472],959:[.455,.011,.528],960:[.445,.011,.583],961:[.455,.195,.472],962:[.445,.13,.444],963:[.445,.011,.569],964:[.445,.011,.458],965:[.445,.011,.5],966:[.455,.195,.583],967:[.458,.208,.555],968:[.722,.195,.583],969:[.445,.011,.667],977:[.733,.011,.5],978:[.716,0,.778],981:[.714,.195,.583],982:[.445,.011,.807],1008:[.458,.022,.555],1009:[.455,.249,.472],1012:[.716,.022,.778],1013:[.455,.011,.43],1014:[.455,.011,.43],8208:[.251,-.193,.333],8209:[.251,-.193,.333],8210:[.305,-.244,.5],8211:[.305,-.244,.5],8212:[.305,-.244,1],8214:[.75,.25,.398],8216:[.694,-.486,.278],8217:[.694,-.486,.278],8220:[.694,-.486,.472],8221:[.694,-.486,.472],8224:[.705,.216,.444],8225:[.705,.205,.444],8230:[.083,0,.626],8260:[.674,-.02,.558],8364:[.716,.022,.599],8486:[.716,0,.722],8487:[.694,.022,.722],8592:[.511,.009,1],8593:[.711,.195,.5],8594:[.511,.009,1],8595:[.694,.211,.5],8722:[.27,-.23,.778],8734:[.468,.024,1]}},SSB:{normal:{120276:[.694,0,.733],120277:[.694,0,.733,{sk:-.07}],120278:[.706,.011,.703,{sk:.082}],120279:[.694,0,.794,{sk:-.096}],120280:[.692,0,.642,{sk:.015}],120281:[.692,0,.611,{sk:.022}],120282:[.706,.011,.733,{sk:.061}],120283:[.694,0,.794],120284:[.694,0,.331],120285:[.694,.022,.519,{sk:.097}],120286:[.694,0,.764,{sk:.016}],120287:[.694,0,.581,{sk:-.126}],120288:[.694,0,.978],120289:[.694,0,.794],120290:[.717,.022,.794],120291:[.694,0,.703,{sk:-.064}],120292:[.717,.111,.794],120293:[.694,0,.703,{sk:-.056}],120294:[.717,.022,.611],120295:[.689,0,.733],120296:[.694,.022,.764],120297:[.694,0,.733],120298:[.694,0,1.039],120299:[.694,0,.733,{sk:-.015}],120300:[.694,0,.733],120301:[.694,0,.672],120302:[.489,.011,.525],120303:[.694,.011,.561,{sk:-.152}],120304:[.489,.011,.489,{sk:.041}],120305:[.694,.011,.561,{sk:.152}],120306:[.489,.011,.511,{sk:.011}],120307:[.706,0,.336,{ic:.044,sk:.088}],120308:[.483,.191,.561,{sk:.059}],120309:[.694,0,.561,{sk:-.153}],120310:[.694,0,.256],120311:[.694,.178,.286],120312:[.694,0,.531,{sk:-.138}],120313:[.694,0,.256],120314:[.483,0,.867,{sk:-.028}],120315:[.483,0,.561,{sk:-.028}],120316:[.489,.011,.55],120317:[.483,.167,.561,{sk:-.043}],120318:[.483,.167,.561,{sk:.061}],120319:[.483,0,.372,{sk:.03}],120320:[.489,.011,.422,{sk:.015}],120321:[.607,.011,.404,{sk:-.047}],120322:[.472,.011,.561],120323:[.472,0,.5],120324:[.472,0,.744],120325:[.472,0,.5],120326:[.472,.178,.5],120327:[.472,0,.476],120812:[.717,.022,.55],120813:[.717,0,.55],120814:[.717,0,.55,{sk:-.016}],120815:[.717,.022,.55],120816:[.694,0,.55,{sk:.068}],120817:[.694,.022,.55],120818:[.717,.022,.55,{sk:.056}],120819:[.694,.011,.55],120820:[.717,.022,.55],120821:[.717,.022,.55,{sk:-.016}],120662:[.694,0,.733],120663:[.694,0,.733,{sk:-.04}],120664:[.694,0,.58,{sk:.023}],120665:[.694,0,.916],120666:[.692,0,.642,{sk:.015}],120667:[.694,0,.672],120668:[.694,0,.794],120669:[.716,.022,.855],120670:[.694,0,.331],120671:[.694,0,.764,{sk:.012}],120672:[.694,0,.672],120673:[.694,0,.978],120674:[.694,0,.794],120675:[.689,0,.733],120676:[.717,.022,.794],120677:[.691,0,.794],120678:[.694,0,.703,{sk:-.034}],120679:[.716,.022,.856],120680:[.693,0,.794],120681:[.689,0,.733],120682:[.716,0,.855],120683:[.694,0,.794],120684:[.694,0,.733,{sk:-.015}],120685:[.694,0,.855],120686:[.716,0,.794],120687:[.694,0,.916],120688:[.455,.011,.633],120689:[.733,.139,.5,{sk:-.024}],120690:[.455,.171,.555],120691:[.721,.011,.472,{sk:.017}],120692:[.455,.011,.43],120693:[.744,.153,.472],120694:[.467,.195,.514,{sk:.018}],120695:[.733,.011,.5],120696:[.445,.011,.278,{sk:-.046}],120697:[.445,0,.483],120698:[.722,0,.5,{sk:-.133}],120699:[.445,.195,.555,{sk:-.038}],120700:[.445,0,.472,{sk:.013}],120701:[.747,.156,.472],120702:[.455,.011,.528],120703:[.445,.011,.583],120704:[.455,.195,.472],120705:[.445,.13,.444],120706:[.445,.011,.569,{sk:-.018}],120707:[.445,.011,.458,{sk:-.025}],120708:[.445,.011,.5],120709:[.455,.195,.583],120710:[.458,.208,.555],120711:[.722,.195,.583],120712:[.445,.011,.667],120713:[.716,.022,.569],120714:[.455,.011,.43,{sk:.016}],120715:[.705,.012,.811,{sk:.07}],120716:[.492,.033,.609],120717:[.695,.195,.611],120718:[.469,.245,.567],120719:[.458,.012,1.035,{sk:.049}]},"bold-sans-serif":{305:[.458,0,.256],567:[.458,.205,.286,{sk:.015}],32:[0,0,.367],33:[.694,0,.367],35:[.694,.167,.917],36:[.75,.056,.55],37:[.773,.079,1.029],38:[.717,.022,.831],39:[.695,-.453,.306],40:[.75,.222,.428],41:[.75,.222,.428],42:[.75,-.278,.55],43:[.626,.098,.856],44:[.131,.111,.306],45:[.272,-.2,.367],46:[.131,0,.306],47:[.775,.195,.55],58:[.471,0,.306],59:[.471,.111,.306],61:[.425,-.103,.856],63:[.706,0,.519],64:[.706,.011,.733],91:[.75,.222,.343],92:[.775,.262,.575],93:[.75,.222,.343],94:[.744,-.562,.556,{ic:.005}],95:[-.057,.193,.733],96:[.694,-.537,.55],123:[.75,.25,.575],124:[.796,.282,.338],125:[.75,.25,.575],126:[.327,-.173,.556],160:[0,0,.55],163:[.694,.047,.733],165:[.694,0,.733],167:[.709,.209,.566],168:[.62,-.515,.527],172:[.408,-.098,.856],175:[.658,-.573,.55],176:[.694,-.389,.413],177:[.691,0,.856],180:[.694,-.537,.55],181:[.445,.195,.555],182:[.694,.194,.703],183:[.413,-.282,.856],215:[.54,.039,.856],240:[.69,.01,.55],247:[.507,.039,.856],710:[.694,-.546,.55],711:[.661,-.513,.55],713:[.658,-.573,.55],714:[.694,-.537,.55],715:[.694,-.537,.55],728:[.694,-.522,.55],729:[.699,-.594,.306],730:[.729,-.546,.223],732:[.694,-.567,.55],768:[.684,-.537,0,{dx:.203}],769:[.685,-.537,0,{dx:.199}],770:[.698,-.549,0,{dx:.261}],771:[.668,-.553,.733],772:[.658,-.573,0,{dx:.262}],773:[.717,-.632,.855],774:[.708,-.536,.256],775:[.672,-.567,0,{dx:.252}],776:[.672,-.567,.733],778:[.705,-.522,.733],780:[.698,-.549,0,{dx:.251}],978:[.716,0,.778],1014:[.455,.011,.43],8208:[.265,-.193,.367],8209:[.265,-.193,.367],8210:[.32,-.247,.55],8211:[.328,-.256,.55],8212:[.328,-.256,1.1],8214:[.75,.25,.571],8216:[.722,-.48,.306],8217:[.722,-.48,.305],8220:[.722,-.48,.61],8221:[.722,-.48,.61],8224:[.702,.211,.511],8225:[.702,.202,.511],8230:[.131,0,.768],8260:[.735,.039,.55,{ic:.055}],8364:[.716,.022,.658],8486:[.716,0,.794],8487:[.716,0,.794],8592:[.548,.046,1.1],8593:[.668,.194,.622],8594:[.548,.046,1.1],8595:[.668,.194,.622],8722:[.293,-.208,.856],8734:[.492,.034,1.1]}},SSI:{normal:{120328:[.694,0,.667,{sk:.147}],120329:[.694,0,.667,{ic:.03,sk:.047}],120330:[.706,.011,.639,{ic:.08,sk:.179}],120331:[.694,0,.722,{ic:.025,sk:.02}],120332:[.691,0,.597,{ic:.091,sk:.097}],120333:[.691,0,.569,{ic:.105,sk:.094}],120334:[.706,.011,.667,{ic:.063,sk:.173}],120335:[.694,0,.708,{ic:.054,sk:.107}],120336:[.694,0,.278,{ic:.054,sk:.107}],120337:[.694,.022,.472,{ic:.065,sk:.208}],120338:[.694,0,.694,{ic:.098,sk:.095}],120339:[.694,0,.542,{sk:.016}],120340:[.694,0,.875,{ic:.048,sk:.112}],120341:[.694,0,.708,{ic:.052,sk:.109}],120342:[.716,.022,.736,{ic:.026,sk:.132}],120343:[.694,0,.639,{ic:.052,sk:.048}],120344:[.716,.125,.736,{ic:.027,sk:.131}],120345:[.694,0,.646,{ic:.054,sk:.041}],120346:[.716,.022,.556,{ic:.052,sk:.125}],120347:[.688,0,.681,{ic:.11,sk:.061}],120348:[.694,.022,.688,{ic:.054,sk:.105}],120349:[.694,0,.667,{ic:.136,sk:.045}],120350:[.694,0,.944,{ic:.135,sk:.047}],120351:[.694,0,.667,{ic:.096,sk:.061}],120352:[.694,0,.667,{ic:.149,sk:.036}],120353:[.694,0,.611,{ic:.092,sk:.084}],120354:[.461,.011,.481,{sk:.084}],120355:[.694,.011,.517,{ic:.018}],120356:[.461,.011,.444,{ic:.056,sk:.095}],120357:[.694,.011,.517,{ic:.066,sk:.236}],120358:[.461,.011,.444,{ic:.027,sk:.091}],120359:[.705,0,.306,{ic:.19,sk:.133}],120360:[.455,.206,.5,{ic:.071,sk:.116}],120361:[.694,0,.517],120362:[.655,0,.239,{ic:.065,sk:.09}],120363:[.655,.205,.267,{ic:.057,sk:.102}],120364:[.694,0,.489,{ic:.061,sk:-.022}],120365:[.694,0,.239,{ic:.066,sk:.098}],120366:[.455,0,.794,{sk:.057}],120367:[.455,0,.517,{sk:.057}],120368:[.461,.011,.5,{ic:.022,sk:.079}],120369:[.455,.194,.517,{ic:.018,sk:.05}],120370:[.455,.194,.517,{ic:.015,sk:.125}],120371:[.455,0,.342,{ic:.083,sk:.068}],120372:[.461,.011,.383,{ic:.052,sk:.08}],120373:[.571,.011,.361,{ic:.05,sk:.042}],120374:[.444,.011,.517,{ic:.013,sk:.083}],120375:[.444,0,.461,{ic:.082,sk:.032}],120376:[.444,0,.683,{ic:.082,sk:.032}],120377:[.444,0,.461,{ic:.082,sk:.027}],120378:[.444,.205,.461,{ic:.082,sk:.032}],120379:[.444,0,.435,{ic:.06,sk:.051}]},"sans-serif-italic":{305:[.444,0,.239,{ic:.012,sk:.083}],567:[.444,.205,.267,{ic:.012,sk:.097}],32:[0,0,.333],33:[.694,0,.319,{ic:.031}],34:[.716,-.43,.434,{ic:.053}],35:[.694,.194,.833,{ic:.021}],36:[.75,.056,.5,{ic:.066}],37:[.75,.056,.833],38:[.716,.022,.758],39:[.716,-.43,.278,{ic:.053}],40:[.75,.25,.389,{ic:.109}],41:[.75,.25,.389],42:[.75,-.306,.5,{ic:.071}],43:[.583,.083,.778],44:[.083,.125,.278],45:[.251,-.193,.333],46:[.083,0,.278],47:[.75,.25,.5,{ic:.101}],48:[.678,.022,.5,{ic:.046}],49:[.678,0,.5],50:[.678,0,.5,{ic:.053}],51:[.678,.022,.5,{ic:.045}],52:[.656,0,.5,{ic:.021}],53:[.656,.022,.5,{ic:.056}],54:[.678,.022,.5,{ic:.056}],55:[.656,.011,.5,{ic:.097}],56:[.678,.022,.5,{ic:.054}],57:[.678,.022,.5,{ic:.045}],58:[.444,0,.278],59:[.444,.125,.278],60:[.54,.04,.778,{ic:.03}],61:[.37,-.13,.778,{ic:.021}],62:[.54,.04,.778],63:[.705,0,.472,{ic:.064}],64:[.705,.011,.667,{ic:.038}],91:[.75,.25,.289,{ic:.137}],92:[.75,.25,.5],93:[.75,.25,.289,{ic:.057}],94:[.745,-.561,.556,{ic:.131}],95:[-.086,.164,.667],96:[.694,-.527,.5],123:[.75,.25,.5,{ic:.086}],124:[.75,.25,.278,{ic:.038}],125:[.75,.25,.5],126:[.309,-.191,.556,{ic:.062}],160:[0,0,.5],163:[.694,.022,.667],165:[.694,0,.667,{ic:.149}],167:[.712,.212,.528,{ic:.043}],168:[.651,-.571,.5,{ic:.002}],172:[.37,-.13,.778,{ic:.02}],175:[.631,-.567,.5,{ic:.065}],176:[.694,-.417,.375,{ic:.072}],177:[.666,0,.778,{ic:.018}],180:[.694,-.527,.5,{ic:.045}],181:[.444,.194,.517,{ic:.013}],182:[.694,.194,.611,{ic:.118}],183:[.389,-.306,.778],215:[.492,-.01,.778],240:[.725,.011,.5,{ic:.034}],247:[.414,-.085,.778],710:[.697,-.525,.5,{ic:.02}],711:[.697,-.525,.5,{ic:.058}],713:[.631,-.567,.5,{ic:.065}],714:[.694,-.527,.5,{ic:.045}],715:[.694,-.527,.5],728:[.7,-.522,.5,{ic:.069}],729:[.655,-.566,.278,{ic:.045}],730:[.685,-.517,.738],732:[.67,-.551,.5,{ic:.06}],768:[.694,-.527,0,{dx:.145}],769:[.694,-.527,0,{dx:.074}],770:[.697,-.525,0,{dx:.129}],771:[.67,-.551,0,{dx:.11}],772:[.643,-.579,0,{dx:.11}],773:[.682,-.642,.778,{ic:.056}],774:[.7,-.522,0,{dx:.092}],775:[.655,-.566,0,{dx:.111}],776:[.651,-.571,0,{dx:.111}],778:[.685,-.517,0,{dx:.113}],780:[.697,-.525,0,{dx:.091}],913:[.694,0,.667],914:[.694,0,.667,{ic:.028}],915:[.691,0,.542,{ic:.105}],916:[.694,0,.833],917:[.691,0,.597,{ic:.092}],918:[.694,0,.611,{ic:.092}],919:[.694,0,.708,{ic:.054}],920:[.716,.022,.778,{ic:.026}],921:[.694,0,.278,{ic:.054}],922:[.694,0,.694,{ic:.098}],923:[.694,0,.611],924:[.694,0,.875,{ic:.048}],925:[.694,0,.708,{ic:.051}],926:[.689,0,.667,{ic:.098}],927:[.716,.022,.736,{ic:.027}],928:[.691,0,.708,{ic:.053}],929:[.694,0,.639,{ic:.052}],931:[.694,0,.722,{ic:.092}],932:[.689,0,.68,{ic:.111}],933:[.716,0,.778,{ic:.065}],934:[.694,0,.722,{ic:.022}],935:[.694,0,.667,{ic:.096}],936:[.694,0,.778,{ic:.075}],937:[.716,0,.722,{ic:.047}],945:[.455,.011,.633],946:[.733,.139,.5,{ic:.032}],947:[.455,.171,.555,{ic:.056}],948:[.721,.011,.472,{ic:.092}],949:[.455,.011,.43,{ic:.027}],950:[.738,.153,.472,{ic:.097}],951:[.467,.195,.514,{ic:.02}],952:[.733,.011,.5,{ic:.053}],953:[.445,.011,.278],954:[.445,0,.483,{ic:.034}],955:[.722,0,.5],956:[.445,.195,.655],957:[.445,0,.472,{ic:.053}],958:[.744,.156,.472,{ic:.056}],959:[.455,.011,.472,{ic:.011}],960:[.445,.011,.583,{ic:.053}],961:[.455,.195,.472,{ic:.011}],962:[.445,.13,.444,{ic:.054}],963:[.445,.011,.569,{ic:.066}],964:[.445,.011,.458,{ic:.053}],965:[.445,.011,.5,{ic:.016}],966:[.456,.195,.583,{ic:.015}],967:[.458,.208,.555,{ic:.06}],968:[.722,.195,.583,{ic:.027}],969:[.445,.011,.667,{ic:.009}],977:[.733,.011,.5,{ic:.057}],978:[.716,0,.778,{ic:.08}],981:[.714,.195,.583,{ic:.035}],982:[.445,.011,.807,{ic:.054}],1008:[.458,.022,.555,{ic:.059}],1009:[.455,.249,.472,{ic:.03}],1012:[.716,.022,.778,{ic:.061}],1013:[.455,.011,.43,{ic:.048}],1014:[.455,.011,.43,{ic:.029}],8208:[.251,-.193,.333,{ic:.02}],8209:[.251,-.193,.333,{ic:.02}],8210:[.305,-.244,.5,{ic:.065}],8211:[.305,-.244,.5,{ic:.065}],8212:[.305,-.244,1,{ic:.065}],8214:[.75,.25,.398,{ic:.038}],8216:[.694,-.486,.278,{ic:.052}],8217:[.694,-.486,.278,{ic:.051}],8220:[.694,-.486,.472,{ic:.052}],8221:[.694,-.486,.472,{ic:.052}],8224:[.705,.216,.444,{ic:.035}],8225:[.705,.205,.444,{ic:.045}],8230:[.083,0,.626],8260:[.674,-.02,.558,{ic:.091}],8364:[.716,.022,.599,{ic:.085}],8486:[.716,0,.722,{ic:.046}],8487:[.694,.022,.722,{ic:.105}],8592:[.511,.009,1,{ic:.001}],8593:[.712,.195,.5,{ic:.072}],8594:[.511,.009,1],8595:[.695,.211,.5],8722:[.27,-.23,.778],8734:[.468,.024,1]}},SSBI:{normal:{120380:[.694,0,.733,{sk:.144}],120381:[.694,0,.733,{ic:.02,sk:.061}],120382:[.706,.011,.703,{ic:.073,sk:.174}],120383:[.694,0,.794,{ic:.023,sk:.033}],120384:[.692,0,.642,{ic:.084,sk:.097}],120385:[.692,0,.611,{ic:.099,sk:.093}],120386:[.706,.011,.733,{ic:.055,sk:.167}],120387:[.694,0,.794,{ic:.055,sk:.105}],120388:[.694,0,.331,{ic:.055,sk:.105}],120389:[.694,.022,.519,{ic:.055,sk:.2}],120390:[.694,0,.764,{ic:.085,sk:.097}],120391:[.694,0,.581,{sk:.021}],120392:[.694,0,.978,{ic:.054,sk:.105}],120393:[.694,0,.794,{ic:.055,sk:.105}],120394:[.717,.022,.794,{ic:.026,sk:.13}],120395:[.694,0,.703,{ic:.045,sk:.049}],120396:[.717,.111,.794,{ic:.025,sk:.13}],120397:[.694,0,.703,{ic:.047,sk:.054}],120398:[.717,.022,.611,{ic:.045,sk:.121}],120399:[.689,0,.733,{ic:.105,sk:.066}],120400:[.694,.022,.764,{ic:.055,sk:.105}],120401:[.694,0,.733,{ic:.131,sk:.046}],120402:[.694,0,1.039,{ic:.131,sk:.045}],120403:[.694,0,.733,{ic:.085,sk:.067}],120404:[.694,0,.733,{ic:.143,sk:.037}],120405:[.694,0,.672,{ic:.085,sk:.089}],120406:[.489,.011,.525,{ic:.013,sk:.091}],120407:[.694,.011,.561,{ic:.024,sk:-.025}],120408:[.489,.011,.489,{ic:.056,sk:.098}],120409:[.694,.011,.561,{ic:.086,sk:.233}],120410:[.489,.011,.511,{ic:.032,sk:.086}],120411:[.706,0,.336,{ic:.191,sk:.126}],120412:[.483,.191,.561,{ic:.041,sk:.126}],120413:[.694,0,.561,{ic:.016,sk:-.019}],120414:[.694,0,.256,{ic:.084,sk:.078}],120415:[.694,.178,.286,{ic:.086,sk:.085}],120416:[.694,0,.531,{ic:.055,sk:-.033}],120417:[.694,0,.256,{ic:.084,sk:.083}],120418:[.483,0,.867,{ic:.015,sk:.058}],120419:[.483,0,.561,{ic:.016,sk:.058}],120420:[.489,.011,.55,{ic:.027,sk:.078}],120421:[.483,.167,.561,{ic:.025,sk:.036}],120422:[.483,.167,.561,{ic:.041,sk:.129}],120423:[.483,0,.372,{ic:.086,sk:.063}],120424:[.489,.011,.422,{ic:.054,sk:.073}],120425:[.607,.011,.404,{ic:.05,sk:.038}],120426:[.472,.011,.561,{ic:.039,sk:.066}],120427:[.472,0,.5,{ic:.083,sk:.031}],120428:[.472,0,.744,{ic:.083,sk:.032}],120429:[.472,0,.5,{ic:.08,sk:.029}],120430:[.472,.178,.5,{ic:.083,sk:.033}],120431:[.472,0,.476,{ic:.062,sk:.051}],120720:[.694,0,.733,{sk:.146}],120721:[.694,0,.733,{ic:.048,sk:.063}],120722:[.694,0,.58,{ic:.101,sk:.085}],120723:[.694,0,.916,{sk:.139}],120724:[.692,0,.642,{ic:.084,sk:.09}],120725:[.694,0,.672,{ic:.085,sk:.082}],120726:[.694,0,.794,{ic:.055,sk:.097}],120727:[.716,.022,.855,{ic:.053,sk:.106}],120728:[.694,0,.331,{ic:.055,sk:.097}],120729:[.694,0,.764,{ic:.085,sk:.088}],120730:[.694,0,.672,{sk:.138}],120731:[.694,0,.978,{ic:.054,sk:.098}],120732:[.694,0,.794,{ic:.055,sk:.097}],120733:[.689,0,.733,{ic:.093,sk:.067}],120734:[.717,.022,.794,{ic:.037,sk:.111}],120735:[.691,0,.794,{ic:.054,sk:.098}],120736:[.694,0,.703,{ic:.052,sk:.067}],120737:[.716,.022,.856,{ic:.062,sk:.099}],120738:[.693,0,.794,{ic:.085,sk:.074}],120739:[.689,0,.733,{ic:.105,sk:.056}],120740:[.716,0,.855,{ic:.085,sk:.079}],120741:[.694,0,.794,{ic:.043,sk:.103}],120742:[.694,0,.733,{ic:.085,sk:.084}],120743:[.694,0,.855,{ic:.064,sk:.096}],120744:[.716,0,.794,{ic:.054,sk:.098}],120745:[.682,.012,.916,{ic:.027,sk:.051}],120746:[.455,.011,.633,{ic:.013}],120747:[.733,.139,.5,{ic:.058,sk:.088}],120748:[.455,.171,.555,{ic:.055,sk:.058}],120749:[.721,.011,.472,{ic:.097,sk:.044}],120750:[.455,.011,.43,{ic:.03,sk:.059}],120751:[.744,.153,.472,{ic:.1,sk:.088}],120752:[.467,.195,.514,{ic:.042,sk:.085}],120753:[.733,.011,.5,{ic:.078,sk:.115}],120754:[.445,.011,.278,{sk:.059}],120755:[.445,0,.483,{ic:.036,sk:.073}],120756:[.722,0,.5,{sk:.057}],120757:[.445,.195,.555,{ic:.011,sk:.062}],120758:[.445,0,.472,{ic:.052,sk:.067}],120759:[.747,.156,.472,{ic:.057,sk:.117}],120760:[.455,.011,.528,{ic:.032,sk:.079}],120761:[.445,.011,.583,{ic:.054,sk:.061}],120762:[.455,.195,.472,{ic:.028,sk:.086}],120763:[.445,.13,.444,{ic:.053,sk:.05}],120764:[.445,.011,.569,{ic:.066,sk:.042}],120765:[.445,.011,.458,{ic:.053,sk:.065}],120766:[.445,.011,.5,{ic:.022,sk:.075}],120767:[.455,.195,.583,{ic:.027,sk:.09}],120768:[.458,.208,.555,{ic:.068,sk:.036}],120769:[.722,.195,.583,{ic:.028,sk:.142}],120770:[.445,.011,.667,{ic:.025,sk:.087}],120771:[.716,.022,.569,{ic:.036,sk:.1}],120772:[.455,.011,.43,{ic:.048,sk:.072}],120773:[.705,.012,.811,{ic:.026,sk:.19}],120774:[.492,.033,.609,{ic:.04}],120775:[.695,.195,.611,{ic:.027,sk:.134}],120776:[.469,.245,.567,{ic:.008,sk:.084}],120777:[.458,.012,1.035,{ic:.061,sk:.109}]},"sans-serif-bold-italic":{305:[.458,0,.256,{ic:.027,sk:.075}],567:[.458,.205,.286,{ic:.028,sk:.089}],32:[0,0,.367],33:[.694,0,.367,{ic:.029}],35:[.694,.167,.917,{ic:.023}],36:[.75,.056,.55,{ic:.057}],37:[.773,.079,1.029],38:[.717,.022,.831],39:[.695,-.453,.306,{ic:.059}],40:[.75,.222,.428,{ic:.096}],41:[.75,.222,.428,{ic:.01}],42:[.75,-.278,.55,{ic:.065}],43:[.626,.098,.856],44:[.131,.111,.306],45:[.272,-.2,.367],46:[.131,0,.306],47:[.775,.195,.55,{ic:.113}],48:[.717,.022,.55,{ic:.071}],49:[.717,0,.55],50:[.717,0,.55,{ic:.074}],51:[.717,.022,.55,{ic:.063}],52:[.694,0,.55,{ic:.025}],53:[.694,.022,.55,{ic:.055}],54:[.717,.022,.55,{ic:.035}],55:[.694,.011,.55,{ic:.1}],56:[.717,.022,.55,{ic:.059}],57:[.717,.022,.55,{ic:.071}],58:[.471,0,.306,{ic:.011}],59:[.471,.111,.306,{ic:.011}],61:[.425,-.103,.856,{ic:.024}],63:[.706,0,.519,{ic:.08}],64:[.706,.011,.733,{ic:.061}],91:[.75,.222,.343,{ic:.133}],92:[.775,.262,.575],93:[.75,.222,.343,{ic:.072}],94:[.744,-.562,.556,{ic:.129}],95:[-.057,.193,.733],96:[.694,-.537,.55],123:[.75,.25,.575,{ic:.081}],124:[.796,.282,.338,{ic:.045}],125:[.75,.25,.575],126:[.327,-.173,.556,{ic:.056}],160:[0,0,.55],163:[.694,.047,.733],165:[.694,0,.733,{ic:.143}],167:[.709,.209,.566,{ic:.085}],168:[.62,-.515,.527,{ic:.044}],172:[.408,-.098,.856,{ic:.025}],175:[.658,-.573,.55,{ic:.064}],176:[.694,-.389,.413,{ic:.079}],177:[.691,0,.856,{ic:.018}],180:[.694,-.537,.55,{ic:.029}],181:[.445,.195,.555,{ic:.012}],182:[.694,.194,.703,{ic:.115}],183:[.413,-.282,.856],215:[.54,.039,.856],240:[.69,.01,.55,{ic:.018}],247:[.507,.039,.856],710:[.694,-.546,.55,{ic:.006}],711:[.661,-.513,.55,{ic:.03}],713:[.658,-.573,.55,{ic:.064}],714:[.694,-.537,.55,{ic:.029}],715:[.694,-.537,.55],728:[.694,-.522,.55,{ic:.06}],729:[.699,-.594,.306,{ic:.047}],730:[.729,-.546,.223,{ic:.128}],732:[.694,-.567,.55,{ic:.055}],768:[.684,-.537,0,{dx:.073}],769:[.685,-.537,0,{dx:.069}],770:[.698,-.549,0,{dx:.144}],771:[.668,-.553,.733],772:[.658,-.573,0,{dx:.131}],773:[.717,-.632,.855,{ic:.059}],774:[.708,-.536,.256],775:[.672,-.567,0,{dx:.12}],776:[.672,-.567,.733],778:[.705,-.522,.733],780:[.698,-.549,0,{dx:.103}],978:[.716,0,.778,{ic:.079}],1014:[.455,.011,.43,{ic:.03}],8208:[.265,-.193,.367,{ic:.02}],8209:[.265,-.193,.367,{ic:.02}],8210:[.32,-.247,.55,{ic:.062}],8211:[.328,-.256,.55,{ic:.068}],8212:[.328,-.256,1.1,{ic:.068}],8214:[.75,.25,.571,{ic:.03}],8216:[.722,-.48,.306,{ic:.056}],8217:[.722,-.48,.305,{ic:.059}],8220:[.722,-.48,.61,{ic:.066}],8221:[.722,-.48,.61],8224:[.702,.211,.511,{ic:.036}],8225:[.702,.202,.511,{ic:.043}],8230:[.131,0,.768],8260:[.735,.039,.55,{ic:.201}],8364:[.716,.022,.658,{ic:.075}],8486:[.716,0,.794,{ic:.054}],8487:[.716,0,.794,{ic:.102}],8592:[.548,.046,1.1],8593:[.668,.194,.622,{ic:.079}],8594:[.548,.046,1.1],8595:[.668,.194,.622,{ic:.012}],8722:[.293,-.208,.856],8734:[.492,.034,1.1,{ic:.031}]}}},"NCM"));MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/sans-serif","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/latin-bi.js 0000644 0001762 0000144 00000043665 15112352537 023026 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","latin-bi",c({LIB:{"bold-italic":{192:[.918,0,.866],193:[.918,0,.866],194:[.905,0,.866],195:[.86,0,.866],196:[.873,0,.866],197:[.879,0,.866],198:[.686,0,1.023,{ic:.052}],199:[.703,.2,.827,{ic:.082}],200:[.918,0,.757,{ic:.048}],201:[.918,0,.757,{ic:.048}],202:[.905,0,.757,{ic:.048}],203:[.873,0,.757,{ic:.048}],204:[.918,0,.472,{ic:.113}],205:[.918,0,.472,{ic:.141}],206:[.905,0,.472,{ic:.13}],207:[.873,0,.472,{ic:.179}],208:[.686,0,.876,{ic:.009}],209:[.86,0,.896,{ic:.107}],210:[.918,.017,.855,{ic:.01}],211:[.918,.017,.855,{ic:.01}],212:[.905,.017,.855,{ic:.01}],213:[.86,.017,.855,{ic:.01}],214:[.873,.017,.855,{ic:.01}],216:[.754,.068,.886,{ic:.009}],217:[.918,.017,.881,{ic:.107}],218:[.918,.017,.881,{ic:.107}],219:[.905,.017,.881,{ic:.107}],220:[.873,.017,.881,{ic:.107}],221:[.918,0,.866,{ic:.119}],222:[.686,0,.728,{ic:.009}],223:[.702,.202,.665,{ic:.026}],224:[.699,.008,.591,{ic:.024}],225:[.699,.008,.591,{ic:.024}],226:[.704,.008,.591,{ic:.024}],227:[.66,.008,.591,{ic:.042}],228:[.667,.008,.591,{ic:.045}],229:[.702,.008,.591,{ic:.024}],230:[.452,.008,.827],231:[.452,.2,.532,{ic:.004}],232:[.699,.008,.532,{ic:.004}],233:[.699,.008,.532,{ic:.035}],234:[.704,.008,.532,{ic:.042}],235:[.667,.008,.532,{ic:.075}],236:[.699,.008,.356,{ic:.034}],237:[.699,.008,.356,{ic:.122}],238:[.704,.008,.356,{ic:.129}],239:[.667,.008,.356,{ic:.162}],241:[.66,.008,.65,{ic:.034}],242:[.699,.008,.591,{ic:.004}],243:[.699,.008,.591,{ic:.005}],244:[.704,.008,.591,{ic:.012}],245:[.66,.008,.591,{ic:.042}],246:[.667,.008,.591,{ic:.045}],248:[.56,.115,.591,{ic:.034}],249:[.699,.008,.621,{ic:.034}],250:[.699,.008,.621,{ic:.034}],251:[.704,.008,.621,{ic:.034}],252:[.667,.008,.621,{ic:.034}],253:[.699,.202,.562,{ic:.033}],254:[.695,.194,.591,{ic:.005}],255:[.667,.202,.562,{ic:.059}],256:[.811,0,.866],257:[.626,.008,.591,{ic:.047}],258:[.93,0,.866],259:[.69,.008,.591,{ic:.037}],260:[.711,.204,.866],261:[.452,.204,.591,{ic:.024}],262:[.918,.017,.827,{ic:.082}],263:[.699,.008,.532,{ic:.061}],264:[.905,.017,.827,{ic:.082}],265:[.704,.008,.532,{ic:.068}],266:[.905,.017,.827,{ic:.082}],267:[.674,.008,.532,{ic:.004}],268:[.905,.017,.827,{ic:.082}],269:[.704,.008,.532,{ic:.108}],270:[.905,0,.876,{ic:.009}],271:[.695,.008,.591,{ic:.191}],272:[.686,0,.876,{ic:.009}],273:[.695,.008,.591,{ic:.055}],274:[.811,0,.757,{ic:.048}],275:[.626,.008,.532,{ic:.077}],276:[.93,0,.757,{ic:.048}],277:[.69,.008,.532,{ic:.067}],278:[.905,0,.757,{ic:.048}],279:[.674,.008,.532,{ic:.004}],280:[.68,.204,.757,{ic:.048}],281:[.452,.204,.532,{ic:.004}],282:[.905,0,.757,{ic:.048}],283:[.704,.008,.532,{ic:.082}],284:[.905,.017,.895,{ic:.013}],285:[.704,.202,.532,{ic:.057}],286:[.93,.017,.895,{ic:.013}],287:[.69,.202,.532,{ic:.082}],288:[.905,.017,.895,{ic:.013}],289:[.674,.202,.532,{ic:.031}],290:[.703,.307,.895,{ic:.013}],291:[.746,.202,.532,{ic:.031}],292:[.905,0,.896,{ic:.107}],293:[.913,.008,.591,{ic:.073}],294:[.686,0,.896,{ic:.107}],295:[.695,.008,.591,{ic:.034}],296:[.86,0,.472,{ic:.151}],297:[.66,.008,.356,{ic:.159}],298:[.811,0,.472,{ic:.153}],299:[.626,.008,.356,{ic:.164}],300:[.93,0,.472,{ic:.157}],301:[.69,.008,.356,{ic:.154}],302:[.686,.204,.472,{ic:.113}],303:[.694,.204,.356,{ic:.034}],304:[.905,0,.472,{ic:.113}],306:[.686,.017,1.035,{ic:.08}],307:[.674,.202,.676,{ic:.064}],308:[.905,.017,.611,{ic:.104}],309:[.704,.202,.356,{ic:.129}],310:[.686,.307,.895,{ic:.077}],311:[.695,.307,.532,{ic:.034}],312:[.452,0,.607,{ic:.001}],313:[.918,0,.698],314:[.926,.008,.297,{ic:.23}],315:[.686,.307,.698],316:[.695,.307,.297,{ic:.044}],317:[.686,0,.698,{ic:.073}],318:[.695,.008,.297,{ic:.191}],319:[.686,0,.698,{ic:.071}],320:[.695,.008,.369,{ic:.102}],321:[.686,0,.698],322:[.695,.008,.356,{ic:.074}],323:[.918,0,.896,{ic:.107}],324:[.699,.008,.65,{ic:.034}],325:[.686,.307,.896,{ic:.107}],326:[.452,.307,.65,{ic:.034}],327:[.905,0,.896,{ic:.107}],328:[.706,.008,.65,{ic:.034}],329:[.694,.008,1.005,{ic:.034}],330:[.703,.017,.896,{ic:.071}],331:[.452,.211,.585,{ic:.019}],332:[.811,.017,.855,{ic:.01}],333:[.626,.008,.591,{ic:.047}],334:[.93,.017,.855,{ic:.01}],335:[.69,.008,.591,{ic:.037}],336:[.947,.017,.855,{ic:.01}],337:[.699,.008,.591,{ic:.049}],338:[.703,.017,1.141,{ic:.052}],339:[.456,.012,.827],340:[.918,.017,.859],341:[.699,.008,.502,{ic:.06}],342:[.686,.307,.859],343:[.452,.307,.502,{ic:.06}],344:[.905,.017,.859],345:[.704,.008,.502,{ic:.096}],346:[.918,.017,.65,{ic:.053}],347:[.699,.008,.487,{ic:.057}],348:[.905,.017,.65,{ic:.053}],349:[.704,.008,.487,{ic:.064}],350:[.703,.2,.65,{ic:.053}],351:[.452,.2,.487],352:[.905,.017,.65,{ic:.07}],353:[.704,.008,.487,{ic:.104}],354:[.675,.2,.796,{ic:.076}],355:[.643,.2,.385,{ic:.034}],356:[.905,0,.796,{ic:.076}],357:[.74,.008,.385,{ic:.142}],358:[.675,0,.796,{ic:.076}],359:[.643,.008,.385,{ic:.034}],360:[.86,.017,.881,{ic:.107}],361:[.66,.008,.621,{ic:.034}],362:[.811,.017,.881,{ic:.107}],363:[.626,.008,.621,{ic:.034}],364:[.93,.017,.881,{ic:.107}],365:[.69,.008,.621,{ic:.034}],366:[.879,.017,.881,{ic:.107}],367:[.702,.008,.621,{ic:.034}],368:[.947,.017,.881,{ic:.107}],369:[.699,.008,.621,{ic:.034}],370:[.686,.204,.881,{ic:.107}],371:[.452,.204,.621,{ic:.034}],372:[.905,.017,1.16,{ic:.114}],373:[.704,.008,.768,{ic:.023}],374:[.905,0,.866,{ic:.119}],375:[.704,.202,.562,{ic:.033}],376:[.873,0,.866,{ic:.119}],377:[.918,0,.709,{ic:.077}],378:[.699,.008,.491,{ic:.055}],379:[.905,0,.709,{ic:.077}],380:[.674,.008,.491,{ic:.049}],381:[.905,0,.709,{ic:.077}],382:[.704,.008,.491,{ic:.102}],383:[.702,.202,.4,{ic:.138}],384:[.695,.008,.532,{ic:.005}],385:[.686,0,.817,{ic:.014}],386:[.686,0,.817],387:[.693,.008,.532,{ic:.022}],388:[.694,0,.817],389:[.716,.008,.532,{ic:.005}],390:[.708,.022,.826,{ic:.011}],391:[.819,.017,.961,{ic:.066}],392:[.624,.008,.532,{ic:.175}],393:[.686,0,.876,{ic:.009}],394:[.686,0,.876,{ic:.009}],395:[.686,0,.817],396:[.695,.008,.591,{ic:.044}],397:[.456,.26,.594,{ic:.006}],398:[.68,0,.757,{ic:.115}],399:[.708,.022,.796,{ic:.024}],400:[.708,.022,.709,{ic:.072}],401:[.68,.225,.611,{ic:.179}],402:[.702,.202,.4,{ic:.138}],403:[.819,.017,.961,{ic:.066}],404:[.682,.205,.808,{ic:.1}],405:[.683,.005,.767,{ic:.027}],406:[.692,.008,.355,{ic:.011}],407:[.686,0,.472,{ic:.113}],408:[.687,0,.975,{ic:.059}],409:[.696,-.001,.556,{ic:.037}],410:[.695,.008,.297,{ic:.062}],411:[.694,.005,.655,{ic:.005}],412:[.688,.006,.833,{ic:.061}],413:[.686,.202,.896,{ic:.107}],414:[.452,.196,.65],415:[.703,.017,.855,{ic:.01}],416:[.819,.022,.855,{ic:.07}],417:[.578,.011,.591,{ic:.096}],418:[.709,.204,.964],419:[.466,.194,.739],420:[.686,0,.787,{ic:.038}],421:[.7,.194,.626,{ic:.065}],422:[.686,.182,.859],423:[.703,.017,.65,{ic:.044}],424:[.452,.008,.487],425:[.686,0,.827,{ic:.052}],426:[.697,.218,.374,{ic:.016}],427:[.643,.209,.385,{ic:.034}],428:[.678,0,.876],429:[.64,.008,.385,{ic:.105}],430:[.675,.247,.796,{ic:.076}],431:[.819,.022,.881,{ic:.138}],432:[.578,.011,.62,{ic:.117}],433:[.703,0,.827,{ic:.032}],434:[.686,.022,.724,{ic:.043}],435:[.686,0,.975,{ic:.057}],436:[.453,.202,.78,{ic:.029}],437:[.686,0,.709,{ic:.077}],438:[.452,.008,.491,{ic:.049}],439:[.686,.022,.65,{ic:.088}],440:[.686,.022,.65,{ic:.1}],441:[.444,.206,.493,{ic:.019}],442:[.445,.2,.511,{ic:.027}],443:[.661,.017,.591,{ic:.056}],444:[.678,.017,.617,{ic:.023}],445:[.445,.219,.617,{ic:.023}],446:[.643,.008,.385,{ic:.08}],447:[.47,.236,.575,{ic:.03}],448:[.71,.014,.319],449:[.708,.012,.511],450:[.711,.015,.639,{ic:.016}],451:[.711,0,.386,{ic:.044}],452:[.894,0,1.584,{ic:.076}],453:[.686,.011,1.365,{ic:.084}],454:[.694,.011,1.081,{ic:.084}],455:[.686,.022,1.308,{ic:.079}],456:[.693,.206,1.053,{ic:.057}],457:[.694,.206,.652,{ic:.057}],458:[.686,.022,1.506,{ic:.079}],459:[.693,.206,1.251,{ic:.057}],460:[.693,.206,1.005,{ic:.057}],461:[.905,0,.866],462:[.704,.008,.591,{ic:.052}],463:[.905,0,.472,{ic:.159}],464:[.704,.008,.356,{ic:.169}],465:[.905,.017,.855,{ic:.01}],466:[.704,.008,.591,{ic:.052}],467:[.905,.017,.881,{ic:.107}],468:[.704,.008,.621,{ic:.037}],469:[1,.017,.881,{ic:.107}],470:[.78,.008,.621,{ic:.053}],471:[1.118,.017,.881,{ic:.107}],472:[.899,.008,.621,{ic:.062}],473:[1.105,.017,.881,{ic:.107}],474:[.886,.008,.621,{ic:.08}],475:[1.118,.017,.881,{ic:.107}],476:[.899,.008,.621,{ic:.034}],477:[.452,.008,.532,{ic:.043}],478:[1.004,0,.866],479:[.778,.008,.591,{ic:.058}],480:[1.014,0,.865],481:[.79,.011,.591,{ic:.032}],482:[.847,0,1.023,{ic:.048}],483:[.62,.011,.826,{ic:.001}],484:[.703,.017,.895,{ic:.013}],485:[.452,.202,.532,{ic:.031}],486:[.905,.017,.895,{ic:.013}],487:[.704,.202,.532,{ic:.097}],488:[.884,0,.895,{ic:.075}],489:[.889,.011,.532,{ic:.098}],490:[.703,.204,.855,{ic:.01}],491:[.452,.204,.591,{ic:.004}],492:[.842,.204,.855,{ic:.01}],493:[.606,.204,.591,{ic:.004}],494:[.884,.022,.65,{ic:.088}],495:[.651,.206,.532,{ic:.046}],496:[.704,.202,.356,{ic:.169}],497:[.686,0,1.584,{ic:.076}],498:[.686,.011,1.365,{ic:.048}],499:[.694,.011,1.081,{ic:.048}],500:[.918,.017,.895,{ic:.013}],501:[.699,.202,.532,{ic:.05}],502:[.686,.005,1.316,{ic:.031}],503:[.695,.216,.639,{ic:.027}],504:[.892,0,.896,{ic:.105}],505:[.675,.011,.65,{ic:.032}],506:[1.081,0,.866],507:[.904,.008,.591,{ic:.039}],508:[.918,0,1.023,{ic:.052}],509:[.699,.008,.827],510:[.918,.068,.886,{ic:.009}],511:[.699,.115,.591,{ic:.034}],512:[.947,0,.866],513:[.699,.008,.591,{ic:.024}],514:[.893,0,.865],515:[.651,.011,.591,{ic:.032}],516:[.947,0,.757,{ic:.048}],517:[.699,.008,.532,{ic:.013}],518:[.893,0,.756,{ic:.047}],519:[.651,.011,.532,{ic:.055}],520:[.947,0,.472,{ic:.113}],521:[.699,.008,.356,{ic:.1}],522:[.893,0,.472,{ic:.126}],523:[.651,.011,.355,{ic:.122}],524:[.947,.017,.855,{ic:.01}],525:[.699,.008,.591,{ic:.004}],526:[.893,.022,.855,{ic:.01}],527:[.651,.011,.591,{ic:.004}],528:[.947,.017,.859],529:[.699,.008,.502,{ic:.06}],530:[.893,.022,.859],531:[.651,.011,.502,{ic:.058}],532:[.947,.017,.881,{ic:.107}],533:[.699,.008,.621,{ic:.034}],534:[.893,.022,.881,{ic:.104}],535:[.651,.011,.62,{ic:.032}],536:[.703,.307,.65,{ic:.053}],537:[.452,.307,.487],538:[.675,.307,.796,{ic:.076}],539:[.643,.307,.385,{ic:.034}],540:[.683,-.001,.487],541:[.473,.209,.487],542:[.884,0,.896,{ic:.105}],543:[.889,.011,.591,{ic:.044}],544:[.704,.198,.8,{ic:.013}],545:[.695,.171,.591,{ic:.044}],546:[.699,.02,.552,{ic:.004}],547:[.659,.02,.548,{ic:.003}],548:[.686,.188,.709,{ic:.077}],549:[.452,.137,.491,{ic:.049}],550:[.906,0,.865],551:[.695,.011,.591,{ic:.032}],552:[.68,.201,.757,{ic:.048}],553:[.452,.209,.532,{ic:.004}],554:[1.002,.017,.855,{ic:.01}],555:[.763,.008,.591,{ic:.045}],556:[1.046,.017,.855,{ic:.01}],557:[.811,.008,.591,{ic:.047}],558:[.906,.022,.855,{ic:.01}],559:[.695,.011,.591,{ic:.004}],560:[1.036,.022,.855,{ic:.01}],561:[.816,.011,.591,{ic:.064}],562:[.847,0,.865,{ic:.117}],563:[.62,.206,.562,{ic:.088}],564:[.695,.166,.347,{ic:.012}],565:[.452,.171,.65,{ic:.002}],566:[.643,.166,.385,{ic:.031}],568:[.695,.009,.836],569:[.452,.194,.823,{ic:.005}],570:[.782,.083,.866,{ic:.017}],571:[.782,.083,.827,{ic:.082}],572:[.503,.083,.532,{ic:.056}],573:[.686,0,.698],574:[.782,.083,.796,{ic:.087}],575:[.452,.242,.487],576:[.452,.227,.511,{ic:.029}],577:[.688,0,.575,{ic:.017}],578:[.46,0,.575],579:[.686,0,.817,{ic:.014}],580:[.686,.017,.881,{ic:.107}],581:[.699,.001,.865],582:[.782,.083,.757,{ic:.106}],583:[.503,.083,.532,{ic:.004}],584:[.686,.017,.611,{ic:.08}],585:[.674,.202,.356,{ic:.048}],586:[.681,.225,1.032],587:[.45,.206,.684],588:[.686,.017,.859],589:[.452,.008,.502,{ic:.06}],590:[.686,0,.866,{ic:.119}],591:[.452,.202,.562,{ic:.049}],7680:[.705,.237,.865],7681:[.456,.234,.591,{ic:.032}],7682:[.906,0,.816,{ic:.014}],7683:[.933,.011,.532,{ic:.027}],7684:[.686,.2,.816,{ic:.014}],7685:[.694,.215,.532,{ic:.006}],7686:[.686,.152,.816,{ic:.014}],7687:[.694,.166,.532,{ic:.006}],7688:[.892,.192,.826,{ic:.082}],7689:[.675,.192,.532,{ic:.072}],7690:[.906,0,.875,{ic:.009}],7691:[.933,.011,.591,{ic:.042}],7692:[.686,.2,.876,{ic:.009}],7693:[.695,.2,.591,{ic:.044}],7694:[.686,.151,.876,{ic:.009}],7695:[.695,.151,.591,{ic:.044}],7696:[.686,.198,.875,{ic:.009}],7697:[.694,.198,.591,{ic:.042}],7698:[.686,.222,.875,{ic:.009}],7699:[.694,.248,.591,{ic:.042}],7704:[.68,.222,.756,{ic:.047}],7705:[.456,.248,.532,{ic:.002}],7706:[.68,.163,.756,{ic:.047}],7707:[.456,.18,.532,{ic:.002}],7710:[.906,0,.727,{ic:.061}],7711:[.933,.206,.4,{ic:.137}],7712:[.847,.022,.895,{ic:.013}],7713:[.62,.206,.532,{ic:.069}],7714:[.906,0,.896,{ic:.105}],7715:[.933,.011,.591,{ic:.031}],7716:[.686,.2,.896,{ic:.107}],7717:[.695,.2,.591,{ic:.034}],7718:[.873,0,.896,{ic:.107}],7719:[.881,.008,.591,{ic:.122}],7722:[.686,.215,.896,{ic:.107}],7723:[.695,.215,.591,{ic:.034}],7724:[.686,.163,.472,{ic:.111}],7725:[.693,.18,.355,{ic:.032}],7726:[1.118,0,.472,{ic:.191}],7727:[.899,.008,.356,{ic:.194}],7728:[.892,0,.895,{ic:.075}],7729:[.913,.011,.532,{ic:.101}],7730:[.686,.2,.895,{ic:.075}],7731:[.694,.215,.532,{ic:.032}],7732:[.686,.152,.895,{ic:.075}],7733:[.694,.166,.532,{ic:.032}],7734:[.686,.2,.698],7735:[.695,.2,.297,{ic:.044}],7736:[.811,.2,.698],7737:[.819,.2,.297,{ic:.206}],7738:[.686,.152,.698],7739:[.694,.166,.297,{ic:.042}],7740:[.686,.222,.698],7741:[.694,.248,.297,{ic:.042}],7742:[.892,0,1.073,{ic:.104}],7743:[.675,.011,.944,{ic:.032}],7744:[.906,0,1.073,{ic:.104}],7745:[.695,.011,.944,{ic:.032}],7746:[.686,.2,1.073,{ic:.107}],7747:[.452,.2,.944,{ic:.034}],7748:[.888,0,.896,{ic:.107}],7749:[.674,.008,.65,{ic:.034}],7750:[.686,.2,.896,{ic:.107}],7751:[.452,.2,.65,{ic:.034}],7752:[.686,.152,.896,{ic:.105}],7753:[.456,.166,.65,{ic:.032}],7754:[.686,.222,.896,{ic:.105}],7755:[.456,.248,.65,{ic:.032}],7764:[.892,0,.787,{ic:.037}],7765:[.675,.194,.591,{ic:.051}],7766:[.906,0,.787,{ic:.037}],7767:[.695,.194,.591,{ic:.005}],7768:[.905,.017,.859],7769:[.674,.008,.502,{ic:.06}],7770:[.686,.2,.859],7771:[.452,.2,.502,{ic:.06}],7772:[.811,.2,.859],7773:[.626,.2,.502,{ic:.091}],7774:[.686,.152,.859],7775:[.456,.166,.502,{ic:.058}],7776:[.906,.022,.65,{ic:.052}],7777:[.695,.011,.487],7778:[.703,.2,.65,{ic:.053}],7779:[.452,.2,.487],7784:[.906,.2,.65,{ic:.052}],7785:[.695,.215,.487],7786:[.906,0,.796,{ic:.073}],7787:[.885,.011,.385,{ic:.041}],7788:[.675,.2,.796,{ic:.076}],7789:[.643,.2,.385,{ic:.034}],7790:[.675,.151,.796,{ic:.076}],7791:[.643,.151,.385,{ic:.034}],7792:[.675,.222,.796,{ic:.073}],7793:[.646,.248,.385,{ic:.032}],7794:[.686,.199,.881,{ic:.104}],7795:[.456,.214,.62,{ic:.032}],7796:[.686,.163,.881,{ic:.104}],7797:[.456,.18,.62,{ic:.032}],7798:[.686,.222,.881,{ic:.104}],7799:[.456,.248,.62,{ic:.032}],7804:[.894,.013,.865,{ic:.111}],7805:[.654,.011,.532,{ic:.048}],7806:[.686,.2,.865,{ic:.111}],7807:[.456,.215,.532,{ic:.022}],7808:[.918,.017,1.16,{ic:.114}],7809:[.699,.008,.768,{ic:.023}],7810:[.918,.017,1.16,{ic:.114}],7811:[.699,.008,.768,{ic:.023}],7812:[.873,.017,1.16,{ic:.114}],7813:[.667,.008,.768,{ic:.023}],7814:[.906,.013,1.16,{ic:.112}],7815:[.695,.011,.768,{ic:.021}],7816:[.686,.2,1.16,{ic:.112}],7817:[.456,.215,.768,{ic:.021}],7818:[.906,0,.865,{ic:.059}],7819:[.695,.011,.56,{ic:.043}],7820:[.895,0,.865,{ic:.059}],7821:[.686,.011,.56,{ic:.05}],7822:[.906,0,.865,{ic:.117}],7823:[.695,.206,.562,{ic:.031}],7824:[.904,0,.709,{ic:.076}],7825:[.663,.011,.49,{ic:.067}],7826:[.686,.2,.709,{ic:.077}],7827:[.452,.2,.491,{ic:.049}],7828:[.686,.152,.709,{ic:.076}],7829:[.456,.166,.49,{ic:.048}],7830:[.694,.166,.591,{ic:.031}],7831:[.831,.008,.385,{ic:.212}],7832:[.665,.011,.768,{ic:.021}],7833:[.665,.206,.562,{ic:.031}],7835:[.933,.206,.4,{ic:.137}],7838:[.7,.006,.665],7840:[.711,.2,.866],7841:[.452,.2,.591,{ic:.024}],7842:[.96,0,.866],7843:[.702,.008,.591,{ic:.024}],7844:[1.107,0,.866],7845:[.863,.008,.591,{ic:.029}],7846:[1.107,0,.866],7847:[.863,.008,.591,{ic:.024}],7848:[1.122,0,.866,{ic:.039}],7849:[.878,.008,.591,{ic:.116}],7850:[1.079,0,.866,{ic:.009}],7851:[.835,.008,.591,{ic:.086}],7852:[.905,.2,.866],7853:[.704,.2,.591,{ic:.024}],7854:[1.132,0,.866],7855:[.893,.008,.591,{ic:.038}],7856:[1.132,0,.866],7857:[.893,.008,.591,{ic:.038}],7858:[1.147,0,.866],7859:[.908,.008,.591,{ic:.038}],7860:[1.104,0,.866,{ic:.016}],7861:[.865,.008,.591,{ic:.094}],7862:[.93,.2,.866],7863:[.69,.2,.591,{ic:.037}],7864:[.68,.2,.757,{ic:.048}],7865:[.452,.2,.532,{ic:.004}],7866:[.96,0,.757,{ic:.048}],7867:[.702,.008,.532,{ic:.004}],7868:[.86,0,.757,{ic:.048}],7869:[.66,.008,.532,{ic:.072}],7870:[1.107,0,.757,{ic:.048}],7871:[.863,.008,.532,{ic:.059}],7872:[1.107,0,.757,{ic:.048}],7873:[.863,.008,.532,{ic:.04}],7874:[1.122,0,.757,{ic:.093}],7875:[.878,.008,.532,{ic:.146}],7876:[1.079,0,.757,{ic:.063}],7877:[.835,.008,.532,{ic:.116}],7878:[.905,.2,.757,{ic:.048}],7879:[.704,.2,.532,{ic:.042}],7880:[.96,0,.472,{ic:.113}],7881:[.702,.008,.356,{ic:.085}],7882:[.686,.2,.472,{ic:.113}],7883:[.674,.2,.356,{ic:.048}],7884:[.703,.2,.855,{ic:.01}],7885:[.452,.2,.591,{ic:.004}],7886:[.96,.017,.855,{ic:.01}],7887:[.702,.008,.591,{ic:.004}],7888:[1.107,.017,.855,{ic:.01}],7889:[.863,.008,.591,{ic:.029}],7890:[1.107,.017,.855,{ic:.01}],7891:[.863,.008,.591,{ic:.01}],7892:[1.122,.017,.855,{ic:.044}],7893:[.878,.008,.591,{ic:.116}],7894:[1.079,.017,.855,{ic:.014}],7895:[.835,.008,.591,{ic:.086}],7896:[.905,.2,.855,{ic:.01}],7897:[.704,.2,.591,{ic:.012}],7898:[.918,.022,.855,{ic:.07}],7899:[.699,.011,.591,{ic:.096}],7900:[.918,.022,.855,{ic:.07}],7901:[.699,.011,.591,{ic:.096}],7902:[.96,.022,.855,{ic:.07}],7903:[.702,.011,.591,{ic:.096}],7904:[.86,.022,.855,{ic:.07}],7905:[.66,.011,.591,{ic:.096}],7906:[.819,.178,.855,{ic:.07}],7907:[.578,.2,.591,{ic:.096}],7908:[.686,.2,.881,{ic:.107}],7909:[.452,.2,.621,{ic:.034}],7910:[.96,.017,.881,{ic:.107}],7911:[.702,.008,.621,{ic:.034}],7912:[.918,.022,.881,{ic:.138}],7913:[.699,.011,.62,{ic:.117}],7914:[.918,.022,.881,{ic:.138}],7915:[.699,.011,.62,{ic:.117}],7916:[.96,.022,.881,{ic:.138}],7917:[.702,.011,.62,{ic:.117}],7918:[.86,.022,.881,{ic:.138}],7919:[.66,.011,.62,{ic:.117}],7920:[.819,.178,.881,{ic:.138}],7921:[.578,.2,.62,{ic:.117}],7922:[.918,0,.866,{ic:.119}],7923:[.699,.202,.562,{ic:.033}],7924:[.686,.2,.866,{ic:.119}],7925:[.452,.202,.562,{ic:.097}],7926:[.96,0,.866,{ic:.119}],7927:[.702,.202,.562,{ic:.033}],7928:[.86,0,.866,{ic:.119}],7929:[.66,.202,.562,{ic:.056}]}}},"NCM"),{},["MJX-NCM-LIB"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/latin-bi","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/monospace-l.js 0000644 0001762 0000144 00000031335 15112352537 023533 0 ustar ligges users (()=>{"use strict";const c=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","monospace-l",c({ML:{monospace:{192:[.807,0,.525],193:[.807,0,.525],194:[.767,0,.525],195:[.783,0,.525],196:[.753,0,.525],197:[.767,0,.525],198:[.611,0,.525],199:[.622,.208,.525],200:[.807,0,.525],201:[.807,0,.525],202:[.767,0,.525],203:[.753,0,.525],204:[.807,0,.525],205:[.807,0,.525],206:[.767,0,.525],207:[.753,0,.525],208:[.611,0,.525],209:[.783,0,.525],210:[.807,.011,.525],211:[.807,.011,.525],212:[.767,.011,.525],213:[.783,.011,.525],214:[.753,.011,.525],216:[.696,.085,.525],217:[.807,.011,.525],218:[.807,.011,.525],219:[.767,.011,.525],220:[.753,.011,.525],221:[.807,0,.525],222:[.611,0,.525],223:[.617,.006,.525],224:[.622,.006,.525],225:[.622,.006,.525],226:[.624,.006,.525],227:[.615,.006,.525],228:[.6,.006,.525],229:[.636,.006,.525],230:[.44,.006,.525],231:[.44,.208,.525],232:[.622,.006,.525],233:[.622,.006,.525],234:[.624,.006,.525],235:[.6,.006,.525],236:[.622,0,.525],237:[.622,0,.525],238:[.624,0,.525],239:[.6,0,.525],241:[.615,0,.525],242:[.622,.006,.525],243:[.622,.006,.525],244:[.624,.006,.525],245:[.615,.006,.525],246:[.6,.006,.525],248:[.571,.14,.525],249:[.622,.006,.525],250:[.622,.006,.525],251:[.624,.006,.525],252:[.6,.006,.525],253:[.622,.228,.525],254:[.611,.222,.525],255:[.6,.228,.525],256:[.746,0,.525],257:[.587,.006,.525],258:[.786,0,.525],259:[.612,.006,.525],260:[.623,.203,.525],261:[.44,.203,.525],262:[.807,.011,.525],263:[.622,.006,.525],264:[.767,.011,.525],265:[.624,.006,.525],266:[.774,.011,.525],267:[.605,.006,.525],268:[.766,.011,.525],269:[.623,.006,.525],270:[.766,0,.525],271:[.611,.006,.525,{ic:.066}],272:[.611,0,.525],273:[.611,.006,.525],274:[.746,0,.525],275:[.587,.006,.525],276:[.786,0,.525],277:[.612,.006,.525],278:[.774,0,.525],279:[.605,.006,.525],280:[.611,.203,.525],281:[.44,.203,.525],282:[.766,0,.525],283:[.623,.006,.525],284:[.767,.011,.525],285:[.624,.229,.525],286:[.786,.011,.525],287:[.612,.229,.525],288:[.774,.011,.525],289:[.605,.229,.525],290:[.622,.231,.525],291:[.665,.229,.525],292:[.767,0,.525],293:[.767,0,.525],294:[.611,0,.525],295:[.611,0,.525],296:[.783,0,.525],297:[.615,0,.525],298:[.746,0,.525],299:[.587,0,.525],300:[.786,0,.525],301:[.612,0,.525],302:[.611,.203,.525],303:[.612,.203,.525],304:[.774,0,.525],306:[.611,.011,.525],307:[.611,.227,.525],308:[.767,.011,.525],309:[.624,.228,.525],310:[.611,.231,.525],311:[.611,.231,.525],312:[.431,0,.525],313:[.807,0,.525],314:[.807,0,.525],315:[.611,.231,.525],316:[.611,.231,.525],317:[.611,0,.525],318:[.611,0,.525],319:[.611,0,.525],320:[.611,0,.525,{ic:.05}],321:[.611,0,.525],322:[.611,0,.525],323:[.807,0,.525],324:[.622,0,.525],325:[.611,.231,.525],326:[.437,.231,.525],327:[.766,0,.525],328:[.623,0,.525],329:[.791,0,.525],330:[.622,.011,.525],331:[.437,.233,.525],332:[.746,.011,.525],333:[.587,.006,.525],334:[.786,.011,.525],335:[.612,.006,.525],336:[.827,.011,.525],337:[.639,.006,.525],338:[.622,.011,.525],339:[.44,.006,.525],340:[.807,.011,.525],341:[.622,0,.525],342:[.611,.231,.525],343:[.437,.231,.525],344:[.766,.011,.525],345:[.623,0,.525],346:[.807,.011,.525],347:[.622,.006,.525],348:[.767,.011,.525],349:[.624,.006,.525],350:[.622,.219,.525],351:[.44,.208,.525],352:[.766,.011,.525],353:[.623,.006,.525],354:[.611,.211,.525],355:[.554,.211,.525],356:[.766,0,.525],357:[.667,.006,.525],358:[.611,0,.525],359:[.554,.006,.525],360:[.783,.011,.525],361:[.615,.006,.525],362:[.746,.011,.525],363:[.587,.006,.525],364:[.786,.011,.525],365:[.612,.006,.525],366:[.767,.011,.525],367:[.636,.006,.525],368:[.827,.011,.525],369:[.639,.006,.525],370:[.611,.203,.525],371:[.431,.203,.525,{ic:.011}],372:[.767,.008,.525],373:[.624,.004,.525],374:[.767,0,.525],375:[.624,.228,.525],376:[.753,0,.525],377:[.807,0,.525],378:[.622,0,.525],379:[.774,0,.525],380:[.605,0,.525],381:[.766,0,.525],382:[.623,0,.525],383:[.617,0,.525],384:[.611,.005,.525],385:[.611,0,.525],386:[.611,0,.525],387:[.611,.006,.525],388:[.669,0,.525],389:[.669,.006,.525],390:[.621,.012,.525],391:[.726,.011,.525,{ic:.11}],392:[.586,.005,.525,{ic:.038}],393:[.611,0,.525],394:[.611,0,.525],395:[.611,0,.525],396:[.611,.006,.525],397:[.438,.201,.525],398:[.611,0,.525],399:[.622,.011,.525],400:[.622,.011,.525,{ic:.004}],401:[.611,.228,.525],402:[.617,0,.525],403:[.726,.011,.525,{ic:.09}],404:[.611,.233,.525],405:[.611,.005,.525],406:[.61,.005,.525],407:[.611,0,.525],408:[.611,0,.525],409:[.617,0,.525],410:[.611,0,.525],411:[.611,.005,.525],412:[.611,0,.525],413:[.611,.228,.525],414:[.436,.222,.525,{ic:.013}],415:[.622,.011,.525],416:[.711,.011,.525],417:[.531,.006,.525],418:[.622,.222,.525],419:[.44,.171,.525],420:[.611,0,.525],421:[.617,.222,.525],422:[.611,.011,.525],423:[.622,.011,.525],424:[.439,.006,.525],425:[.611,0,.525],426:[.617,.228,.525],427:[.554,.228,.525],428:[.611,0,.525],429:[.617,.005,.525],430:[.611,.228,.525],431:[.711,.011,.525],432:[.53,.006,.525],433:[.622,0,.525],434:[.611,.011,.525],435:[.614,0,.525],436:[.432,.228,.528],437:[.611,0,.525],438:[.431,0,.525],439:[.611,.011,.525],440:[.611,.011,.525],441:[.43,.227,.525],442:[.43,.227,.525],443:[.622,0,.525],444:[.611,.011,.525],445:[.431,.191,.525],446:[.554,.006,.525],447:[.435,.261,.525],448:[.611,.223,.525],449:[.611,.223,.525],450:[.611,.222,.525],451:[.622,0,.525],452:[.793,0,.525,{ic:.012}],453:[.643,0,.525,{ic:.012}],454:[.643,.006,.525,{ic:.012}],455:[.611,.011,.525],456:[.611,.228,.525],457:[.611,.228,.525],458:[.611,.011,.525],459:[.611,.228,.525],460:[.605,.228,.525],461:[.766,0,.525],462:[.623,.006,.525],463:[.766,0,.525],464:[.623,0,.525],465:[.766,.011,.525],466:[.623,.006,.525],467:[.766,.011,.525],468:[.623,.006,.525],469:[.876,.011,.525],470:[.723,.006,.525],471:[.948,.011,.525],472:[.807,.006,.525],473:[.907,.011,.525],474:[.766,.006,.525],475:[.948,.011,.525],476:[.807,.006,.525],477:[.44,.006,.525],478:[.876,0,.525],479:[.723,.006,.525],480:[.895,0,.525],481:[.734,.006,.525],482:[.801,0,.525,{ic:.029}],483:[.582,.005,.525],484:[.622,.011,.525],485:[.442,.229,.525],486:[.766,.011,.525],487:[.623,.229,.525],488:[.804,0,.525],489:[.81,0,.525],490:[.622,.203,.525],491:[.44,.203,.525],492:[.745,.203,.525],493:[.563,.203,.525],494:[.804,.011,.525],495:[.639,.228,.525],496:[.623,.228,.525],497:[.613,0,.525],498:[.611,0,.525],499:[.611,.006,.525],500:[.807,.011,.525],501:[.622,.229,.525],502:[.611,.005,.525],503:[.615,.26,.525],504:[.807,0,.525],505:[.639,0,.525],506:[.921,0,.525],507:[.79,.006,.525],508:[.807,0,.525],509:[.622,.006,.525],510:[.807,.085,.525],511:[.622,.14,.525],512:[.814,0,.525],513:[.626,.006,.525],514:[.819,0,.525],515:[.639,.006,.525],516:[.814,0,.525],517:[.626,.006,.525],518:[.819,0,.525],519:[.639,.006,.525],520:[.814,0,.525],521:[.626,0,.525],522:[.819,0,.525],523:[.639,0,.525],524:[.814,.011,.525],525:[.626,.006,.525],526:[.819,.011,.525],527:[.639,.006,.525],528:[.814,.011,.525],529:[.626,0,.525],530:[.819,.011,.525],531:[.639,0,.525],532:[.814,.011,.525],533:[.626,.006,.525],534:[.819,.011,.525],535:[.639,.006,.525],536:[.622,.231,.525],537:[.44,.231,.525],538:[.611,.231,.525],539:[.554,.231,.525],540:[.672,.029,.525],541:[.432,.269,.525],542:[.804,0,.525],543:[.81,0,.525],544:[.617,.221,.525],545:[.611,.195,.525],546:[.622,.011,.525],547:[.48,.011,.525],548:[.611,.208,.525],549:[.43,.208,.525],550:[.772,0,.525],551:[.611,.006,.525],552:[.611,.256,.525],553:[.44,.262,.525],554:[.876,.011,.525],555:[.723,.006,.525],556:[.906,.011,.525],557:[.738,.006,.525],558:[.772,.011,.525],559:[.611,.006,.525],560:[.895,.011,.525],561:[.734,.006,.525],562:[.801,0,.525],563:[.582,.228,.525],564:[.611,.195,.525],565:[.436,.195,.525],566:[.554,.195,.525],568:[.611,.005,.525],569:[.436,.222,.525],570:[.704,.073,.525],571:[.704,.073,.525],572:[.534,.073,.525],573:[.611,0,.525],574:[.704,.073,.525],575:[.44,.212,.525],576:[.431,.212,.525],577:[.617,0,.525],578:[.431,0,.525],579:[.611,0,.525],580:[.611,.011,.525],581:[.618,.001,.525],582:[.704,.073,.525],583:[.534,.073,.525],584:[.611,.011,.525],585:[.605,.228,.525],586:[.622,.228,.525,{ic:.045}],587:[.437,.228,.525,{ic:.045}],588:[.611,.011,.525],589:[.437,0,.525],590:[.611,0,.525],591:[.431,.228,.525],11377:[.436,.008,.525],7680:[.623,.284,.525],7681:[.44,.23,.525],7682:[.772,0,.525],7683:[.782,.006,.525],7684:[.611,.157,.525],7685:[.611,.172,.525],7686:[.611,.139,.525],7687:[.611,.154,.525],7688:[.807,.208,.525],7689:[.639,.208,.525],7690:[.772,0,.525],7691:[.782,.006,.525],7692:[.611,.2,.525],7693:[.611,.2,.525],7694:[.611,.181,.525],7695:[.611,.181,.525],7696:[.611,.235,.525],7697:[.611,.235,.525],7698:[.611,.212,.525],7699:[.611,.212,.525],7704:[.611,.212,.525],7705:[.44,.212,.525],7706:[.611,.176,.525],7707:[.44,.176,.525],7710:[.772,0,.525],7711:[.782,0,.525],7712:[.801,.011,.525],7713:[.582,.229,.525],7714:[.772,0,.525],7715:[.782,0,.525],7716:[.611,.2,.525],7717:[.611,.2,.525],7718:[.753,0,.525],7719:[.753,0,.525],7722:[.611,.206,.525],7723:[.611,.206,.525],7724:[.611,.176,.525],7725:[.612,.176,.525],7726:[.948,0,.525],7727:[.807,0,.525],7728:[.807,0,.525],7729:[.81,0,.525],7730:[.611,.157,.525],7731:[.611,.172,.525],7732:[.611,.139,.525],7733:[.611,.154,.525],7734:[.611,.2,.525],7735:[.611,.2,.525],7736:[.746,.2,.525],7737:[.746,.2,.525],7738:[.611,.139,.525],7739:[.611,.154,.525],7740:[.611,.212,.525],7741:[.611,.212,.525],7742:[.807,0,.525],7743:[.639,0,.525,{ic:.003}],7744:[.772,0,.525],7745:[.611,0,.525,{ic:.003}],7746:[.611,.2,.525],7747:[.437,.2,.525],7748:[.763,0,.525],7749:[.605,0,.525],7750:[.611,.2,.525],7751:[.437,.2,.525],7752:[.611,.139,.525],7753:[.437,.154,.525],7754:[.611,.212,.525],7755:[.437,.212,.525],7764:[.807,0,.525],7765:[.639,.222,.525],7766:[.772,0,.525],7767:[.611,.222,.525],7768:[.774,.011,.525],7769:[.605,0,.525],7770:[.611,.2,.525],7771:[.437,.2,.525],7772:[.746,.2,.525],7773:[.587,.2,.525],7774:[.611,.139,.525],7775:[.437,.154,.525],7776:[.772,.011,.525],7777:[.611,.006,.525],7778:[.622,.2,.525],7779:[.44,.2,.525],7784:[.772,.157,.525],7785:[.611,.172,.525],7786:[.772,0,.525],7787:[.725,.006,.525],7788:[.611,.2,.525],7789:[.554,.2,.525],7790:[.611,.181,.525],7791:[.554,.181,.525],7792:[.611,.212,.525],7793:[.554,.212,.525],7794:[.611,.157,.525],7795:[.431,.172,.525],7796:[.611,.176,.525],7797:[.431,.176,.525],7798:[.611,.212,.525],7799:[.431,.212,.525],7804:[.819,.008,.525],7805:[.611,.004,.525],7806:[.611,.157,.525],7807:[.431,.172,.525],7808:[.807,.008,.525],7809:[.622,.004,.525],7810:[.807,.008,.525],7811:[.622,.004,.525],7812:[.753,.008,.525],7813:[.6,.004,.525],7814:[.772,.008,.525],7815:[.611,.004,.525],7816:[.611,.157,.525],7817:[.431,.172,.525],7818:[.772,0,.525],7819:[.611,0,.525],7820:[.819,0,.525],7821:[.611,0,.525],7822:[.772,0,.525],7823:[.611,.228,.525],7824:[.824,0,.525],7825:[.644,0,.525],7826:[.611,.2,.525],7827:[.431,.2,.525],7828:[.611,.139,.525,{ic:.001}],7829:[.431,.154,.525],7830:[.611,.154,.525],7831:[.695,.006,.525],7832:[.647,.004,.525],7833:[.647,.228,.525],7835:[.782,0,.525],7838:[.617,.006,.525],7840:[.623,.2,.525],7841:[.44,.2,.525],7842:[.904,0,.525],7843:[.67,.006,.525],7844:[.919,0,.525],7845:[.743,.006,.525],7846:[.919,0,.525],7847:[.743,.006,.525],7848:[.995,0,.525],7849:[.819,.006,.525],7850:[.925,0,.525],7851:[.749,.006,.525],7852:[.767,.2,.525],7853:[.624,.2,.525],7854:[.94,0,.525],7855:[.766,.006,.525],7856:[.94,0,.525],7857:[.766,.006,.525],7858:[1.016,0,.525],7859:[.842,.006,.525],7860:[.946,0,.525],7861:[.772,.006,.525],7862:[.786,.2,.525],7863:[.612,.2,.525],7864:[.611,.2,.525],7865:[.44,.2,.525],7866:[.904,0,.525],7867:[.67,.006,.525],7868:[.783,0,.525],7869:[.615,.006,.525],7870:[.919,0,.525],7871:[.743,.006,.525],7872:[.919,0,.525],7873:[.743,.006,.525],7874:[.995,0,.525],7875:[.819,.006,.525],7876:[.925,0,.525],7877:[.749,.006,.525],7878:[.767,.2,.525],7879:[.624,.2,.525],7880:[.904,0,.525],7881:[.67,0,.525],7882:[.611,.2,.525],7883:[.605,.2,.525],7884:[.622,.2,.525],7885:[.44,.2,.525],7886:[.904,.011,.525],7887:[.67,.006,.525],7888:[.919,.011,.525],7889:[.743,.006,.525],7890:[.919,.011,.525],7891:[.743,.006,.525],7892:[.995,.011,.525],7893:[.819,.006,.525],7894:[.925,.011,.525],7895:[.749,.006,.525],7896:[.767,.2,.525],7897:[.624,.2,.525],7898:[.807,.011,.525],7899:[.622,.006,.525],7900:[.807,.011,.525],7901:[.622,.006,.525],7902:[.904,.011,.525],7903:[.67,.006,.525],7904:[.783,.011,.525],7905:[.615,.006,.525],7906:[.711,.2,.525],7907:[.531,.2,.525],7908:[.611,.2,.525],7909:[.431,.2,.525],7910:[.904,.011,.525],7911:[.67,.006,.525],7912:[.807,.011,.525],7913:[.622,.006,.525],7914:[.807,.011,.525],7915:[.622,.006,.525],7916:[.904,.011,.525],7917:[.67,.006,.525],7918:[.783,.011,.525],7919:[.615,.006,.525],7920:[.711,.2,.525],7921:[.53,.2,.525],7922:[.807,0,.525],7923:[.622,.228,.525],7924:[.611,.2,.525],7925:[.431,.228,.525],7926:[.904,0,.525],7927:[.67,.228,.525],7928:[.783,0,.525],7929:[.615,.228,.525]}}},"NCM"),{},["MJX-NCM-ML"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/monospace-l","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/dynamic/accents-b-i.js 0000644 0001762 0000144 00000032263 15112352537 023404 0 ustar ligges users (()=>{"use strict";const d=MathJax._.output.chtml.DynamicFonts.AddFontIds;MathJax._.output.fonts["mathjax-newcm"].chtml_ts.MathJaxNewcmFont.dynamicSetup("","accents-b-i",d({AB:{bold:{184:[.005,.2,.511],688:[.713,-.297,.383],689:[.717,-.297,.383],690:[.714,-.177,.21],691:[.568,-.297,.283],692:[.564,-.293,.284],693:[.564,-.177,.284,{ic:.037}],694:[.568,-.297,.418],695:[.564,-.295,.498],696:[.564,-.176,.364],697:[.711,-.489,.228],698:[.71,-.515,.575],699:[.693,-.344,.319],700:[.694,-.345,.319],701:[.694,-.346,.319],702:[.656,-.314,.456],703:[.656,-.314,.456],704:[.755,-.355,.511],705:[.755,-.355,.511],706:[.72,-.494,.383],707:[.72,-.494,.383],708:[.71,-.503,.575],709:[.71,-.503,.575],712:[.694,-.438,.256],716:[.061,.194,.256],718:[-.132,.3,.575],719:[-.132,.3,.575],720:[.45,.005,.319],721:[.45,-.28,.319],722:[.387,-.129,.383],723:[.387,-.129,.383],724:[.291,-.047,.511],725:[.292,-.049,.511],726:[.291,-.001,.511],727:[.172,-.12,.511],731:[.005,.206,.575],733:[.704,-.509,.575],734:[.46,-.218,.383],735:[.683,-.496,.575],736:[.564,-.174,.364],737:[.713,-.297,.191],738:[.569,-.293,.272],739:[.564,-.297,.364],740:[.717,-.298,.345],741:[.724,.029,.383,{ic:.029}],742:[.724,.029,.383,{ic:.029}],743:[.724,.029,.383,{ic:.029}],744:[.724,.029,.383,{ic:.029}],745:[.724,.03,.383,{ic:.028}],746:[.723,-.271,.385],747:[.724,.029,.383,{ic:.026}],748:[-.04,.247,.575],749:[.793,-.629,.578],750:[.694,-.345,.559],751:[-.04,.247,.575],752:[-.04,.247,.575],753:[-.016,.37,.575],754:[-.016,.37,.575],755:[-.036,.258,.338],756:[.384,-.19,.429],757:[.384,-.19,.575],758:[.384,-.19,.575],759:[-.069,.177,.575],760:[.6,-.236,.278],761:[.684,-.428,.332],762:[.684,-.428,.332],763:[.166,.09,.289,{ic:.01}],764:[.166,.09,.289,{ic:.01}],765:[.166,.075,.521],766:[.166,.075,.521],777:[.703,-.51,0,{dx:.28}],779:[.704,-.509,0,{dx:.252}],781:[.774,-.528,0,{dx:.288}],782:[.774,-.528,0,{dx:.288}],783:[.704,-.509,0,{dx:.307}],784:[.795,-.513,0,{dx:.279}],785:[.7,-.513,0,{dx:.279}],786:[.694,-.5,0,{dx:.167}],787:[.694,-.5,0,{dx:.129}],788:[.694,-.5,0,{dx:.167}],789:[.833,-.484,0,{dx:-.008}],790:[-.132,.3,0,{dx:.353}],791:[-.132,.3,0,{dx:.223}],792:[-.058,.348,.511],793:[-.058,.348,.511],794:[.821,-.565,.19,{ic:.034}],795:[.694,-.5,0,{dx:.009}],796:[-.064,.322,0,{dx:.193}],797:[-.058,.302,0,{dx:.256}],798:[-.058,.301,0,{dx:.256}],799:[-.058,.348,0,{dx:.257}],800:[-.156,.208,0,{dx:.26}],801:[.023,.2,0,{dx:.218}],802:[.023,.2,0,{dx:.038}],803:[-.044,.2,0,{dx:.279}],804:[-.069,.225,0,{dx:.288}],805:[-.066,.24,0,{dx:.435}],806:[-.033,.295,0,{dx:.28}],807:[0,.199,0,{dx:.256}],808:[.028,.217,0,{dx:.19}],809:[-.058,.313,0,{dx:.129}],810:[-.111,.281,0,{dx:.288}],811:[-.108,.29,0,{dx:.288}],812:[-.066,.26,0,{dx:.287}],813:[-.066,.25,0,{dx:.288}],814:[-.028,.215,0,{dx:.279}],815:[-.028,.215,0,{dx:.279}],816:[-.068,.176,0,{dx:.279}],817:[-.096,.148,0,{dx:.279}],818:[-.096,.148,0,{dx:.279}],819:[-.096,.278,0,{dx:.279}],820:[.347,-.239,0],821:[.261,-.228,0],822:[.261,-.228,0],823:[.355,-.127,0],825:[-.064,.322,0,{dx:.192}],826:[-.111,.282,0,{dx:.287}],827:[-.111,.3,0,{dx:.288}],828:[-.106,.251,0,{dx:.288}],829:[.683,-.496,0,{dx:.288}],830:[.798,-.416,.575],831:[.77,-.588,.192],832:[.704,-.509,0,{dx:.317}],833:[.704,-.509,0,{dx:.242}],834:[.661,-.553,0,{dx:.279}],835:[.694,-.5,.294],836:[.711,-.489,.628],837:[-.055,.243,.161],838:[.725,-.555,0,{dx:.288}],839:[-.081,.401,0,{dx:.218}],840:[-.155,.401,0,{dx:.288}],841:[-.068,.324,0,{dx:.192}],842:[.729,-.476,0,{dx:.279}],843:[.776,-.438,0,{dx:.279}],844:[.811,-.553,0,{dx:.279}],845:[-.035,.286,0,{dx:.32}],846:[-.032,.307,0,{dx:.315}],848:[.716,-.465,0,{dx:.357}],849:[.764,-.542,0,{dx:.294}],850:[.795,-.513,0,{dx:.279}],851:[-.043,.263,0,{dx:.257}],852:[-.065,.316,0,{dx:.378}],853:[-.065,.316,0,{dx:.258}],854:[-.065,.316,0,{dx:.258}],855:[.764,-.542,0,{dx:.294}],856:[.685,-.529,.319],857:[-.063,.308,.255],858:[-.058,.241,.418],859:[.704,-.435,.301],860:[-.191,.355,0,{dx:.435}],861:[.665,-.501,0,{dx:.001}],862:[.594,-.542,0,{dx:.002}],863:[-.096,.148,0,{dx:.002}],864:[.722,-.6,0,{dx:-.001}],865:[.659,-.495,0,{dx:.001}],866:[-.035,.286,0,{dx:.001}],867:[.675,-.426,.285],868:[.674,-.425,.262],869:[.793,-.427,.278],870:[.676,-.427,.29],871:[.673,-.426,.32],872:[.676,-.427,.26],873:[.798,-.425,.316],874:[.793,-.427,.32],875:[.672,-.43,.46],876:[.67,-.428,.237],877:[.758,-.426,.389],878:[.664,-.424,.314],879:[.663,-.428,.321],7620:[.696,-.487,0,{dx:.274}],7621:[.696,-.487,0,{dx:.301}],7624:[.697,-.5,0,{dx:.298}],7625:[.697,-.5,0,{dx:.278}]}},AI:{italic:{184:[.01,.192,.46],688:[.712,-.286,.366,{ic:.042}],689:[.714,-.286,.366,{ic:.079}],690:[.691,-.162,.254],691:[.557,-.287,.257,{ic:.02}],692:[.55,-.28,.257,{ic:.011}],693:[.55,-.164,.308],694:[.554,-.287,.321,{ic:.018}],695:[.558,-.287,.499,{ic:.011}],696:[.557,-.168,.366,{ic:.024}],697:[.7,-.479,.167,{ic:.137}],698:[.705,-.423,.374],699:[.692,-.394,.278],700:[.694,-.396,.307,{ic:.065}],702:[.667,-.33,.386,{ic:.079}],703:[.667,-.33,.386,{ic:.056}],704:[.761,-.344,.444],705:[.761,-.345,.444],706:[.711,-.495,.333],707:[.711,-.495,.333],708:[.745,-.561,.556],709:[.745,-.561,.556,{ic:.021}],712:[.695,-.471,.222],716:[.027,.194,.222],718:[.003,.255,.194],719:[.008,.254,.139],720:[.443,.01,.278,{ic:.014}],721:[.443,-.277,.278,{ic:.014}],722:[.239,-.001,.333],723:[.239,0,.333],724:[.245,-.045,.444],725:[.245,-.045,.444],726:[.247,-.001,.444],727:[.022,.021,.333,{ic:.019}],731:[.005,.211,.511],733:[.696,-.506,.511,{ic:.065}],734:[.442,-.231,.333,{ic:.026}],735:[.671,-.485,.5],736:[.545,-.157,.316,{ic:.03}],737:[.712,-.287,.175],738:[.559,-.279,.259],739:[.551,-.286,.366,{ic:.006}],740:[.711,-.288,.3,{ic:.004}],741:[.713,.019,.333,{ic:.096}],742:[.713,.019,.333,{ic:.104}],743:[.713,.019,.333,{ic:.093}],744:[.713,.019,.333,{ic:.093}],745:[.713,.019,.333,{ic:.093}],746:[.713,-.261,.333],747:[.713,-.141,.333,{ic:.036}],748:[-.037,.216,.5],749:[.781,-.641,.578],750:[.694,-.397,.359],751:[-.015,.199,.556,{ic:.021}],752:[-.015,.199,.556],753:[-.021,.235,.333],754:[-.021,.235,.333],755:[-.02,.196,.23],756:[.318,-.153,.244],757:[.318,-.153,.384],758:[.318,-.153,.384],759:[-.017,.114,.371],760:[.55,-.286,.278],761:[.672,-.452,.289,{ic:.011}],762:[.672,-.452,.289],763:[.166,.054,.289],764:[.169,.051,.289],765:[.166,.054,.521],766:[.166,.054,.521],777:[.705,-.496,0,{dx:.095}],779:[.696,-.506,0,{dx:.088}],781:[.695,-.471,.222],782:[.755,-.519,0,{dx:.241}],783:[.696,-.506,0,{dx:.131}],784:[.742,-.518,0,{dx:.246}],785:[.686,-.516,0,{dx:.12}],786:[.694,-.496,0,{dx:.078}],787:[.694,-.496,0,{dx:-.06}],788:[.694,-.496,0,{dx:-.015}],789:[.833,-.535,0,{dx:-.178}],790:[-.13,.282,0,{dx:.358}],791:[-.13,.282,0,{dx:.261}],792:[.245,-.001,.444],793:[.245,-.001,.444],794:[.672,-.452,.155,{ic:.038}],795:[.694,-.496,0,{dx:-.06}],796:[-.062,.299,0,{dx:.165}],797:[.245,-.045,.444],798:[.245,-.045,.444],799:[.247,-.001,.444],800:[-.132,.162,0,{dx:.292}],801:[.027,.205,.222],802:[.025,.204,.222,{ic:.048}],803:[-.094,.2,0,{dx:.292}],804:[-.066,.172,0,{dx:.285}],805:[-.066,.227,0,{dx:.445}],806:[-.066,.29,0,{dx:.3}],807:[.022,.192,0,{dx:.267}],808:[.02,.179,0,{dx:.194}],809:[.029,.193,.222],810:[-.111,.274,0,{dx:.251}],811:[-.105,.282,.5],812:[-.064,.213,0,{dx:.249}],813:[-.065,.232,0,{dx:.284}],814:[-.062,.232,0,{dx:.277}],815:[-.062,.232,0,{dx:.307}],816:[-.096,.197,0,{dx:.292}],817:[-.132,.162,0,{dx:.292}],818:[-.132,.162,0,{dx:.292}],819:[-.065,.315,0,{dx:.248}],820:[.333,-.233,0],821:[.248,-.226,0],822:[.248,-.226,0],823:[.356,-.138,0],825:[-.062,.299,0,{dx:.17}],826:[-.113,.275,0,{dx:.251}],827:[-.11,.286,.5],828:[-.098,.243,.5],829:[.673,-.485,.408],830:[.707,-.393,.278],831:[.781,-.641,.778],832:[.687,-.521,.5],833:[.689,-.523,.5],834:[.625,-.528,.333,{ic:.009}],835:[.694,-.496,0,{dx:-.06}],836:[.7,-.478,.278,{ic:.111}],837:[-.065,.227,.111],838:[.703,-.54,0,{dx:.251}],839:[-.065,.315,0,{dx:.248}],840:[-.151,.387,0,{dx:.241}],841:[-.067,.287,0,{dx:.147}],842:[.685,-.521,0,{dx:.248}],843:[.731,-.471,0,{dx:.249}],844:[.763,-.556,0,{dx:.249}],845:[-.025,.275,0,{dx:.279}],846:[-.022,.272,0,{dx:.286}],848:[.758,-.452,0,{dx:.265}],849:[.704,-.467,0,{dx:.234}],850:[.69,-.51,0,{dx:.257}],851:[-.075,.263,0,{dx:.222}],852:[-.062,.368,0,{dx:.252}],853:[-.062,.368,0,{dx:.265}],854:[-.062,.368,0,{dx:.245}],855:[.704,-.467,0,{dx:.244}],856:[.657,-.551,0,{dx:.021}],857:[-.071,.3,.255],858:[-.051,.227,0,{dx:.306}],859:[.683,-.438,.301],860:[-.185,.4,0,{dx:.487}],861:[.706,-.491,0,{dx:-.115}],862:[.62,-.589,0,{dx:0}],863:[-.131,.162,0,{dx:0}],864:[.723,-.606,0,{dx:.001}],865:[.639,-.424,0,{dx:-.142}],866:[-.025,.275,0,{dx:-.004}],867:[.672,-.429,.285],868:[.671,-.428,.262],869:[.79,-.43,.278],870:[.673,-.43,.29],871:[.67,-.429,.32],872:[.673,-.43,.26],873:[.795,-.428,.316],874:[.79,-.43,.32],875:[.669,-.433,.46],876:[.667,-.431,.237],877:[.755,-.429,.389],878:[.661,-.427,.314],879:[.66,-.431,.321]}},ABI:{"bold-italic":{184:[.005,.2,.532],688:[.713,-.297,.383,{ic:.061}],689:[.717,-.297,.383],690:[.714,-.177,.21,{ic:.014}],691:[.568,-.297,.283,{ic:.009}],692:[.564,-.293,.284,{ic:.012}],693:[.564,-.177,.284,{ic:.026}],694:[.568,-.297,.418,{ic:.02}],695:[.564,-.295,.498,{ic:.019}],696:[.564,-.176,.364,{ic:.032}],697:[.714,-.49,.228,{ic:.12}],698:[.71,-.515,.575],699:[.693,-.344,.319],700:[.694,-.354,.355,{ic:.058}],701:[.694,-.346,.319],702:[.656,-.314,.457,{ic:.068}],703:[.656,-.314,.457,{ic:.039}],704:[.755,-.355,.511],705:[.755,-.355,.511],706:[.72,-.494,.383],707:[.72,-.494,.383],708:[.71,-.503,.575],709:[.71,-.503,.575],712:[.694,-.438,.256],716:[.061,.194,.256],718:[0,.256,.261],719:[-.001,.257,.194],720:[.45,.005,.319],721:[.45,-.28,.319],722:[.387,-.129,.383],723:[.387,-.129,.383],724:[.291,-.047,.511],725:[.292,-.049,.511],726:[.291,-.001,.511],727:[.172,-.12,.511],731:[.005,.204,.591],733:[.699,-.503,.591,{ic:.049}],734:[.46,-.218,.383],735:[.683,-.496,.575],736:[.564,-.174,.364,{ic:.032}],737:[.713,-.297,.191],738:[.569,-.293,.272],739:[.564,-.297,.364,{ic:.008}],740:[.717,-.298,.345,{ic:.004}],741:[.724,.029,.383,{ic:.121}],742:[.724,.029,.383,{ic:.121}],743:[.724,.029,.383,{ic:.121}],744:[.724,.029,.383,{ic:.121}],745:[.724,.029,.383,{ic:.121}],746:[.719,-.134,.383,{ic:.062}],747:[.724,.029,.383,{ic:.095}],748:[-.047,.254,.5],749:[.772,-.592,0,{dx:.131}],750:[.694,-.354,.483],751:[-.016,.247,.556,{ic:.025}],752:[-.016,.247,.556,{ic:.025}],753:[-.018,.235,.333],754:[-.021,.238,.333],755:[-.011,.205,.23,{ic:.002}],756:[.384,-.19,.339],757:[.384,-.19,.569],758:[.384,-.19,.339],759:[-.006,.125,.371,{ic:.004}],760:[.543,-.191,.25],761:[.684,-.428,.332,{ic:.016}],762:[.684,-.428,.332],763:[.182,.074,.289],764:[.182,.074,.289,{ic:.013}],765:[.182,.074,.499,{ic:.013}],766:[.182,.074,.499],777:[.702,-.5,0,{dx:.136}],779:[.699,-.503,0,{dx:.129}],781:[.774,-.528,0,{dx:.288}],782:[.774,-.528,0,{dx:.288}],783:[.699,-.503,0,{dx:.171}],784:[.789,-.511,0,{dx:.161}],785:[.69,-.511,0,{dx:.161}],786:[.694,-.5,0,{dx:.021}],787:[.694,-.5,0,{dx:-.017}],788:[.694,-.5,0,{dx:.013}],789:[.833,-.493,0,{dx:-.177}],790:[-.135,.295,0,{dx:.406}],791:[-.135,.295,0,{dx:.301}],792:[-.058,.348,.511],793:[-.058,.348,.511],794:[.821,-.565,.19,{ic:.032}],795:[.694,-.5,0,{dx:-.017}],796:[-.064,.322,0,{dx:.19}],797:[-.058,.302,0,{dx:.276}],798:[-.058,.301,0,{dx:.235}],799:[-.058,.348,0,{dx:.257}],800:[-.156,.208,0,{dx:.26}],801:[.023,.2,0,{dx:.216}],802:[.023,.2,0,{dx:.047}],803:[-.053,.2,0,{dx:.327}],804:[-.069,.216,0,{dx:.333}],805:[-.067,.24,0,{dx:.506}],806:[-.051,.307,0,{dx:.338}],807:[.036,.192,0,{dx:.302}],808:[.035,.195,0,{dx:.224}],809:[-.058,.313,0,{dx:.129}],810:[-.111,.281,0,{dx:.289}],811:[-.108,.29,0,{dx:.287}],812:[-.065,.241,0,{dx:.286}],813:[-.066,.253,0,{dx:.321}],814:[-.036,.215,0,{dx:.31}],815:[-.036,.215,0,{dx:.342}],816:[-.066,.185,0,{dx:.327}],817:[-.101,.151,0,{dx:.326}],818:[-.101,.151,0,{dx:.326}],819:[-.101,.281,0,{dx:.326}],820:[.347,-.228,0],821:[.261,-.228,0],822:[.261,-.228,0],823:[.353,-.13,0],825:[-.064,.322,0,{dx:.196}],826:[-.111,.282,0,{dx:.289}],827:[-.111,.3,0,{dx:.289}],828:[-.106,.251,0,{dx:.293}],829:[.683,-.496,0,{dx:.289}],830:[.798,-.416,.575],831:[.772,-.592,0,{dx:.236}],832:[.699,-.502,0,{dx:.188}],833:[.699,-.502,0,{dx:.113}],834:[.66,-.541,0,{dx:.145}],835:[.694,-.5,.294,{ic:.101}],836:[.712,-.488,.361,{ic:.118}],837:[-.055,.249,.161],838:[.725,-.555,0,{dx:.288}],839:[-.076,.392,0,{dx:.29}],840:[-.155,.401,0,{dx:.288}],841:[-.068,.324,0,{dx:.192}],842:[.765,-.448,0,{dx:.145}],843:[.778,-.43,0,{dx:.145}],844:[.72,-.451,0,{dx:.145}],845:[-.035,.286,0,{dx:.32}],846:[-.032,.307,0,{dx:.319}],848:[.716,-.465,0,{dx:.344}],849:[.764,-.542,0,{dx:.29}],850:[.795,-.513,0,{dx:.278}],851:[-.043,.263,0,{dx:.256}],852:[-.065,.316,0,{dx:.364}],853:[-.065,.316,0,{dx:.272}],854:[-.065,.316,0,{dx:.275}],855:[.764,-.542,0,{dx:.299}],856:[.685,-.529,.319],857:[-.063,.308,.255],858:[-.058,.241,.418],859:[.704,-.435,.301],860:[-.092,.374,0,{dx:.559}],861:[.758,-.476,0,{dx:-.132}],862:[.594,-.542,0,{dx:.002}],863:[-.096,.148,0,{dx:.002}],864:[.722,-.6,0,{dx:-.001}],865:[.717,-.435,0,{dx:-.124}],866:[-.035,.286,0,{dx:.253}],867:[.675,-.426,.285],868:[.674,-.425,.262],869:[.793,-.427,.278],870:[.676,-.427,.29],871:[.673,-.426,.32],872:[.676,-.427,.26],873:[.798,-.425,.316],874:[.793,-.427,.32],875:[.672,-.43,.46],876:[.67,-.428,.237],877:[.758,-.426,.389],878:[.664,-.424,.314],879:[.663,-.428,.321]}}},"NCM"),{},["MJX-NCM-AB","MJX-NCM-AI","MJX-NCM-ABI"]);MathJax.loader&&MathJax.loader.checkVersion("[mathjax-newcm]/chtml/dynamic/accents-b-i","4.0.0","dynamic-font")})(); mathjaxr/inst/doc/mathjax/font/chtml/woff2/ 0000755 0001762 0000144 00000000000 15112352537 020352 5 ustar ligges users mathjaxr/inst/doc/mathjax/font/chtml/woff2/mjx-ncm-brd.woff2 0000644 0001762 0000144 00000007434 15112352537 023445 0 ustar ligges users wOF2OTTO
` $6$?ltag* [q@@?8 їΘFNiH58ڱy!(,^`u~]V.$bx][#8}c9{HXL'IZOZĘ-%-EBQBF⡂*Qx/up^ l3&6~7Q"
MBU^Xsu,vB#5xS8!%M~E53qP
Ev_ @L!Zlܗ i𫮭.@㞝ʃ-UZ@4._dS"Nx u R +CUj~IYETWlդW+W6D/Rs6]Ik& WHܡg.-;hѣUg?g3뻉77($ IB6?\!#=KJS49-@wz2c*sX*6,W#^*@S2)
ʕ\aNaUGD|-ZmnI]uSg2?(2!=yjt1@DrG%f
'(!kbmڒM2܈H+iyU6tЎYP^WjH6RsuLH+iΖa 8*GRg`i=0dP'CˮČڲUj7
XlJvQeCܒؽo)t~1J "L(B*m"L(B*m "L(B*m"L(B*mO "L(B*mO"L(B*m "L(B*m"L(B*m/ "L(B*m/"L(B*m "L(B*m"L(B*mo "L(B*mo"L(B*m "L(B*mDPƅTXk@c@FP'HfXDIVTM7Lv\(N,/ʪnڮvNͰ/nQY^Uݴ]?Ӽ#B@baec`pr1yx !Rh1bʼn Q&D1X@$)Td9\_ %R\T5Z`,GZFVN^AQIYEUM]CSK[GWOЈ`.0"2A1\ljfnaiemckgol
6̆ildoh՟=wWgockA煴|B?=#Ey,?VLTX5M|O ;&M_ibO>Suo/'qt_N97Cq7Wf욞'v/}o7Hle֩txf6S!,楶ZhfquyrFf6dC~x=$'cťi}֞^knW==xiCg[0|Ɉ#]B'DM^}\E@BeNQT[P̬UN=:>&ʈ\(ҩ:ov]{lw^=Cw.O<N"IGB.RF.)
YoL̙څ<=4!=gXNRiUa7u;ts^^ʵ6`]>qvlL#2T#jyfxՒ-S{hGn;wDo1z=G1Ύ?\\A\r>UxR?'T C^;%&?_\Mdg)>G/+x6ޮzlXI?hK,hHT+@LJ=_6xK#X "Hu-9~`0EhVx&1J-<X"1
0l-b>c_\^