velo-plot 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +22 -15
  2. package/dist/ChartCore-AnR_3Xkb.js +7338 -0
  3. package/dist/ChartCore-AnR_3Xkb.js.map +1 -0
  4. package/dist/GpuChartRenderer-Dxc0hrQA.js +75 -0
  5. package/dist/GpuChartRenderer-Dxc0hrQA.js.map +1 -0
  6. package/dist/{index.core-BmZe2jRQ.js → PluginRegistry-CzMHebYP.js} +19 -33
  7. package/dist/PluginRegistry-CzMHebYP.js.map +1 -0
  8. package/dist/angular-hooks.js +1 -1
  9. package/dist/angular.js +8 -8
  10. package/dist/{axisFormat-CzumxpCL.js → axisFormat-Sz4WIJfQ.js} +2 -2
  11. package/dist/{axisFormat-CzumxpCL.js.map → axisFormat-Sz4WIJfQ.js.map} +1 -1
  12. package/dist/{chartSyncBridge-DbWrwtyP.js → chartSyncBridge-D_rCtbFq.js} +12 -11
  13. package/dist/{chartSyncBridge-DbWrwtyP.js.map → chartSyncBridge-D_rCtbFq.js.map} +1 -1
  14. package/dist/core/ChartStatistics.d.ts +1 -1
  15. package/dist/core/chart/ChartCore.d.ts +12 -17
  16. package/dist/core/chart/ChartFeatureHooks.d.ts +7 -0
  17. package/dist/core/chart/chartExportPatch.d.ts +2 -0
  18. package/dist/core/chart/overlaySeriesRegistry.d.ts +7 -0
  19. package/dist/core/chart/series/SeriesActions.d.ts +1 -0
  20. package/dist/core/chart/series/SeriesBufferLite.d.ts +13 -0
  21. package/dist/core/chart/series/seriesOptionsRegistry.d.ts +8 -0
  22. package/dist/core/chart/series/seriesTypeRegistry.d.ts +5 -0
  23. package/dist/createStackedChart-DqcLCFGS.js +1338 -0
  24. package/dist/createStackedChart-DqcLCFGS.js.map +1 -0
  25. package/dist/{hooks-CYPCxoZx.js → hooks-DH-3bewj.js} +7 -7
  26. package/dist/{hooks-CYPCxoZx.js.map → hooks-DH-3bewj.js.map} +1 -1
  27. package/dist/{index-qunX30Xu.js → index-B7PTX94B.js} +2133 -2133
  28. package/dist/index-B7PTX94B.js.map +1 -0
  29. package/dist/{index-BMiZoKmm.js → index-BgrvqltV.js} +67 -67
  30. package/dist/index-BgrvqltV.js.map +1 -0
  31. package/dist/index-Cv6ZDLWf.js +521 -0
  32. package/dist/index-Cv6ZDLWf.js.map +1 -0
  33. package/dist/index-qhscKTDy.js.map +1 -1
  34. package/dist/index.core.d.ts +8 -6
  35. package/dist/index.d.ts +1 -14
  36. package/dist/plugins/3d.js +3 -1
  37. package/dist/plugins/3d.js.map +1 -1
  38. package/dist/plugins/analysis.js.map +1 -1
  39. package/dist/plugins/createPlugin.d.ts +8 -0
  40. package/dist/plugins/debug.js +32 -32
  41. package/dist/plugins/debug.js.map +1 -1
  42. package/dist/plugins/gpu.js +2033 -209
  43. package/dist/plugins/gpu.js.map +1 -1
  44. package/dist/plugins/i18n.js +286 -23
  45. package/dist/plugins/i18n.js.map +1 -1
  46. package/dist/plugins/latex.js +766 -207
  47. package/dist/plugins/latex.js.map +1 -1
  48. package/dist/plugins/loading/index.d.ts +1 -2
  49. package/dist/plugins/loading.js +3 -4
  50. package/dist/plugins/offscreen.js +11 -10
  51. package/dist/plugins/offscreen.js.map +1 -1
  52. package/dist/plugins/regression.js +254 -256
  53. package/dist/plugins/regression.js.map +1 -1
  54. package/dist/plugins/streaming.js +1 -1
  55. package/dist/plugins/tools.js +1 -1
  56. package/dist/react.js +55 -58
  57. package/dist/react.js.map +1 -1
  58. package/dist/renderer/NativeWebGLRenderer.d.ts +2 -1
  59. package/dist/renderer/native/NativeWebGLRenderer.d.ts +5 -1
  60. package/dist/renderer/native/draw.d.ts +2 -47
  61. package/dist/renderer/native/drawCore.d.ts +27 -0
  62. package/dist/renderer/native/drawExtended.d.ts +29 -0
  63. package/dist/renderer/native/frameRenderExtended.d.ts +1 -0
  64. package/dist/renderer/native/frameRenderRegistry.d.ts +27 -0
  65. package/dist/renderer/native/programFactoryCore.d.ts +6 -0
  66. package/dist/renderer/native/programFactoryExtended.d.ts +4 -0
  67. package/dist/renderer/native/utils.d.ts +3 -29
  68. package/dist/renderer/native/utilsCore.d.ts +14 -0
  69. package/dist/renderer/native/utilsExtended.d.ts +17 -0
  70. package/dist/renderer/overlaySeriesExtended.d.ts +1 -0
  71. package/dist/renderer/registerExtendedSeries.d.ts +1 -0
  72. package/dist/renderer/registerWebGPU.d.ts +2 -0
  73. package/dist/renderer/seriesBufferExtended.d.ts +4 -0
  74. package/dist/scientific/index.d.ts +1 -5
  75. package/dist/scientific/registerScientific.d.ts +1 -0
  76. package/dist/scientific.js +41 -41
  77. package/dist/solid.js +56 -59
  78. package/dist/solid.js.map +1 -1
  79. package/dist/svelte.js +26 -29
  80. package/dist/svelte.js.map +1 -1
  81. package/dist/trading/index.d.ts +1 -4
  82. package/dist/trading/registerTrading.d.ts +3 -0
  83. package/dist/trading.js +42 -42
  84. package/dist/types.d.ts +3 -3
  85. package/dist/velo-plot.full.js +2212 -1351
  86. package/dist/velo-plot.full.js.map +1 -1
  87. package/dist/velo-plot.js +33 -28
  88. package/dist/velo-plot.js.map +1 -1
  89. package/dist/vue/index.d.ts +2 -2
  90. package/dist/vue.js +17 -20
  91. package/dist/vue.js.map +1 -1
  92. package/package.json +9 -1
  93. package/dist/ChartCore-BpzRvN4Y.js +0 -8467
  94. package/dist/ChartCore-BpzRvN4Y.js.map +0 -1
  95. package/dist/createStackedChart-Dm-YqUT7.js +0 -756
  96. package/dist/createStackedChart-Dm-YqUT7.js.map +0 -1
  97. package/dist/gpuRenderer-BpaMYz-k.js +0 -1848
  98. package/dist/gpuRenderer-BpaMYz-k.js.map +0 -1
  99. package/dist/index-BMiZoKmm.js.map +0 -1
  100. package/dist/index-qunX30Xu.js.map +0 -1
  101. package/dist/index-x4stH3jD.js +0 -282
  102. package/dist/index-x4stH3jD.js.map +0 -1
  103. package/dist/index.core-BmZe2jRQ.js.map +0 -1
  104. package/dist/mockDatafeed-DHIDPcpX.js +0 -515
  105. package/dist/mockDatafeed-DHIDPcpX.js.map +0 -1
  106. package/dist/symbols-DT0eLlpW.js +0 -568
  107. package/dist/symbols-DT0eLlpW.js.map +0 -1
@@ -1,115 +1,674 @@
1
- import { F as W, C as E, B as H, i as _, g as D } from "../symbols-DT0eLlpW.js";
2
- const $ = {
1
+ const B = {
2
+ alpha: "α",
3
+ beta: "β",
4
+ gamma: "γ",
5
+ delta: "δ",
6
+ epsilon: "ε",
7
+ zeta: "ζ",
8
+ eta: "η",
9
+ theta: "θ",
10
+ iota: "ι",
11
+ kappa: "κ",
12
+ lambda: "λ",
13
+ mu: "μ",
14
+ nu: "ν",
15
+ xi: "ξ",
16
+ omicron: "ο",
17
+ pi: "π",
18
+ rho: "ρ",
19
+ sigma: "σ",
20
+ tau: "τ",
21
+ upsilon: "υ",
22
+ phi: "φ",
23
+ chi: "χ",
24
+ psi: "ψ",
25
+ omega: "ω"
26
+ }, F = {
27
+ Alpha: "Α",
28
+ Beta: "Β",
29
+ Gamma: "Γ",
30
+ Delta: "Δ",
31
+ Epsilon: "Ε",
32
+ Zeta: "Ζ",
33
+ Eta: "Η",
34
+ Theta: "Θ",
35
+ Iota: "Ι",
36
+ Kappa: "Κ",
37
+ Lambda: "Λ",
38
+ Mu: "Μ",
39
+ Nu: "Ν",
40
+ Xi: "Ξ",
41
+ Omicron: "Ο",
42
+ Pi: "Π",
43
+ Rho: "Ρ",
44
+ Sigma: "Σ",
45
+ Tau: "Τ",
46
+ Upsilon: "Υ",
47
+ Phi: "Φ",
48
+ Chi: "Χ",
49
+ Psi: "Ψ",
50
+ Omega: "Ω"
51
+ }, X = {
52
+ sum: "∑",
53
+ prod: "∏",
54
+ int: "∫",
55
+ oint: "∮",
56
+ partial: "∂",
57
+ nabla: "∇",
58
+ infty: "∞",
59
+ hbar: "ℏ",
60
+ pm: "±",
61
+ mp: "∓",
62
+ times: "×",
63
+ div: "÷",
64
+ cdot: "·",
65
+ ast: "∗",
66
+ star: "⋆",
67
+ circ: "∘",
68
+ bullet: "•",
69
+ cap: "∩",
70
+ cup: "∪",
71
+ vee: "∨",
72
+ wedge: "∧",
73
+ oplus: "⊕",
74
+ otimes: "⊗",
75
+ equiv: "≡",
76
+ cong: "≅",
77
+ approx: "≈",
78
+ propto: "∝",
79
+ neq: "≠",
80
+ leq: "≤",
81
+ geq: "≥",
82
+ ll: "≪",
83
+ gg: "≫",
84
+ subset: "⊂",
85
+ supset: "⊃",
86
+ subseteq: "⊆",
87
+ supseteq: "⊇",
88
+ in: "∈",
89
+ notin: "∉",
90
+ ni: "∋",
91
+ forall: "∀",
92
+ exists: "∃",
93
+ emptyset: "∅",
94
+ neg: "¬",
95
+ angle: "∠",
96
+ perp: "⊥",
97
+ parallel: "∥",
98
+ rightarrow: "→",
99
+ leftarrow: "←",
100
+ leftrightarrow: "↔",
101
+ Rightarrow: "⇒",
102
+ Leftarrow: "⇐",
103
+ Leftrightarrow: "⇔",
104
+ mapsto: "↦",
105
+ to: "→",
106
+ langle: "⟨",
107
+ rangle: "⟩",
108
+ rightleftharpoons: "⇌",
109
+ log: "log",
110
+ ln: "ln",
111
+ sin: "sin",
112
+ cos: "cos",
113
+ tan: "tan"
114
+ }, W = {
115
+ varepsilon: "ϵ",
116
+ vartheta: "ϑ",
117
+ varkappa: "ϰ",
118
+ varphi: "φ",
119
+ varpi: "ϖ",
120
+ varrho: "ϱ",
121
+ varsigma: "ς",
122
+ digamma: "ϝ",
123
+ varDelta: "Δ",
124
+ varGamma: "Γ",
125
+ varSigma: "Σ",
126
+ varOmega: "Ω",
127
+ varPhi: "Φ",
128
+ varPi: "Π",
129
+ varLambda: "Λ",
130
+ varTheta: "Θ",
131
+ varUpsilon: "Υ",
132
+ varXi: "Ξ",
133
+ varPsi: "Ψ"
134
+ }, N = {
135
+ uparrow: "↑",
136
+ downarrow: "↓",
137
+ updownarrow: "↕",
138
+ Uparrow: "⇑",
139
+ Downarrow: "⇓",
140
+ Updownarrow: "⇕",
141
+ nearrow: "↗",
142
+ searrow: "↘",
143
+ swarrow: "↙",
144
+ nwarrow: "↖",
145
+ longrightarrow: "⟶",
146
+ longleftarrow: "⟵",
147
+ longleftrightarrow: "⟷",
148
+ Longrightarrow: "⟹",
149
+ Longleftarrow: "⟸",
150
+ Longleftrightarrow: "⟺",
151
+ implies: "⟹",
152
+ impliedby: "⟸",
153
+ iff: "⟺",
154
+ hookrightarrow: "↪",
155
+ hookleftarrow: "↩",
156
+ twoheadrightarrow: "↠",
157
+ twoheadleftarrow: "↞",
158
+ rightarrowtail: "↣",
159
+ leftarrowtail: "↢",
160
+ rightleftarrows: "⇄",
161
+ leftrightarrows: "⇆",
162
+ rightrightarrows: "⇉",
163
+ leftleftarrows: "⇇",
164
+ upuparrows: "⇈",
165
+ downdownarrows: "⇊",
166
+ leadsto: "⇝",
167
+ rightsquigarrow: "⇝",
168
+ leftrightsquigarrow: "↭",
169
+ circlearrowleft: "↺",
170
+ circlearrowright: "↻",
171
+ curvearrowleft: "↶",
172
+ curvearrowright: "↷",
173
+ Rrightarrow: "⇛",
174
+ Lleftarrow: "⇚",
175
+ dashrightarrow: "⇢",
176
+ dashleftarrow: "⇠",
177
+ nrightarrow: "↛",
178
+ nleftarrow: "↚",
179
+ nLeftrightarrow: "⇎",
180
+ nRightarrow: "⇏",
181
+ nLeftarrow: "⇍",
182
+ restriction: "↾",
183
+ upharpoonright: "↾",
184
+ upharpoonleft: "↿",
185
+ downharpoonright: "⇂",
186
+ downharpoonleft: "⇃",
187
+ leftharpoonup: "↼",
188
+ leftharpoondown: "↽",
189
+ rightharpoonup: "⇀",
190
+ rightharpoondown: "⇁",
191
+ leftrightharpoons: "⇋"
192
+ }, _ = {
193
+ sim: "∼",
194
+ simeq: "≃",
195
+ asymp: "≍",
196
+ approxeq: "≊",
197
+ doteq: "≐",
198
+ prec: "≺",
199
+ succ: "≻",
200
+ preceq: "⪯",
201
+ succeq: "⪰",
202
+ precsim: "≾",
203
+ succsim: "≿",
204
+ ll: "≪",
205
+ gg: "≫",
206
+ lll: "⋘",
207
+ ggg: "⋙",
208
+ models: "⊨",
209
+ vdash: "⊢",
210
+ dashv: "⊣",
211
+ vDash: "⊨",
212
+ Vdash: "⊩",
213
+ Vvdash: "⊪",
214
+ smile: "⌣",
215
+ frown: "⌢",
216
+ bowtie: "⋈",
217
+ sqsubset: "⊏",
218
+ sqsupset: "⊐",
219
+ sqsubseteq: "⊑",
220
+ sqsupseteq: "⊒",
221
+ subsetneq: "⊊",
222
+ supsetneq: "⊋",
223
+ Subset: "⋐",
224
+ Supset: "⋑",
225
+ between: "≬",
226
+ pitchfork: "⋔",
227
+ therefore: "∴",
228
+ because: "∵",
229
+ eqcirc: "≖",
230
+ circeq: "≗",
231
+ triangleq: "≜",
232
+ gtrless: "≷",
233
+ lessgtr: "≶",
234
+ lesssim: "≲",
235
+ gtrsim: "≳",
236
+ lessdot: "⋖",
237
+ gtrdot: "⋗",
238
+ ne: "≠",
239
+ nless: "≮",
240
+ ngtr: "≯",
241
+ nleq: "≰",
242
+ ngeq: "≱",
243
+ nsim: "≁",
244
+ nmid: "∤",
245
+ nparallel: "∦",
246
+ nsubseteq: "⊈",
247
+ nsupseteq: "⊉",
248
+ nsubset: "⊄",
249
+ nsupset: "⊅",
250
+ nvdash: "⊬",
251
+ nvDash: "⊭",
252
+ precnsim: "⋨",
253
+ succnsim: "⋩",
254
+ mid: "∣",
255
+ shortmid: "∣",
256
+ varpropto: "∝",
257
+ backsim: "∽",
258
+ eqsim: "≂",
259
+ Doteq: "≑",
260
+ fallingdotseq: "≒",
261
+ risingdotseq: "≓"
262
+ }, G = {
263
+ setminus: "∖",
264
+ smallsetminus: "∖",
265
+ wr: "≀",
266
+ amalg: "⨿",
267
+ uplus: "⊎",
268
+ sqcap: "⊓",
269
+ sqcup: "⊔",
270
+ triangleleft: "◁",
271
+ triangleright: "▷",
272
+ bigtriangleup: "△",
273
+ bigtriangledown: "▽",
274
+ triangledown: "▿",
275
+ diamond: "⋄",
276
+ ominus: "⊖",
277
+ oslash: "⊘",
278
+ odot: "⊙",
279
+ bigcirc: "◯",
280
+ boxplus: "⊞",
281
+ boxminus: "⊟",
282
+ boxtimes: "⊠",
283
+ boxdot: "⊡",
284
+ ltimes: "⋉",
285
+ rtimes: "⋊",
286
+ divideontimes: "⋇",
287
+ dagger: "†",
288
+ ddagger: "‡",
289
+ intercal: "⊺",
290
+ curlyvee: "⋎",
291
+ curlywedge: "⋏",
292
+ barwedge: "⊼",
293
+ veebar: "⊻",
294
+ doublebarwedge: "⩞",
295
+ circledast: "⊛",
296
+ circledcirc: "⊚",
297
+ circleddash: "⊝",
298
+ lesseqgtr: "⋚",
299
+ gtreqless: "⋛",
300
+ dotplus: "∔",
301
+ centerdot: "·"
302
+ }, H = {
303
+ bigcup: "⋃",
304
+ bigcap: "⋂",
305
+ bigsqcup: "⨆",
306
+ biguplus: "⨄",
307
+ bigvee: "⋁",
308
+ bigwedge: "⋀",
309
+ bigoplus: "⨁",
310
+ bigotimes: "⨂",
311
+ bigodot: "⨀",
312
+ coprod: "∐",
313
+ iint: "∬",
314
+ iiint: "∭",
315
+ iiiint: "⨌",
316
+ oiint: "∯",
317
+ oiiint: "∰"
318
+ }, Y = {
319
+ aleph: "ℵ",
320
+ beth: "ℶ",
321
+ gimel: "ℷ",
322
+ daleth: "ℸ",
323
+ ell: "ℓ",
324
+ wp: "℘",
325
+ Re: "ℜ",
326
+ Im: "ℑ",
327
+ imath: "ı",
328
+ jmath: "ȷ",
329
+ hslash: "ℏ",
330
+ surd: "√",
331
+ top: "⊤",
332
+ bot: "⊥",
333
+ measuredangle: "∡",
334
+ sphericalangle: "∢",
335
+ triangle: "△",
336
+ blacktriangle: "▲",
337
+ blacktriangledown: "▼",
338
+ blacktriangleleft: "◀",
339
+ blacktriangleright: "▶",
340
+ square: "□",
341
+ blacksquare: "■",
342
+ lozenge: "◊",
343
+ blacklozenge: "⧫",
344
+ bigstar: "★",
345
+ backslash: "\\",
346
+ prime: "′",
347
+ dprime: "″",
348
+ backprime: "‵",
349
+ varnothing: "∅",
350
+ complement: "∁",
351
+ degree: "°",
352
+ flat: "♭",
353
+ natural: "♮",
354
+ sharp: "♯",
355
+ clubsuit: "♣",
356
+ diamondsuit: "♢",
357
+ heartsuit: "♡",
358
+ spadesuit: "♠",
359
+ checkmark: "✓",
360
+ maltese: "✠",
361
+ copyright: "©",
362
+ circledR: "®",
363
+ circledS: "Ⓢ",
364
+ pounds: "£",
365
+ yen: "¥",
366
+ euro: "€",
367
+ cent: "¢",
368
+ S: "§",
369
+ P: "¶",
370
+ dag: "†",
371
+ ddag: "‡",
372
+ sun: "☉",
373
+ mercury: "☿",
374
+ venus: "♀",
375
+ earth: "♁",
376
+ mars: "♂",
377
+ jupiter: "♃",
378
+ saturn: "♄",
379
+ partialdiff: "∂",
380
+ Finv: "Ⅎ",
381
+ Game: "⅁",
382
+ mho: "℧",
383
+ eth: "ð",
384
+ hbar2: "ℏ",
385
+ nexists: "∄",
386
+ angstrom: "Å",
387
+ micro: "µ",
388
+ ohm: "Ω",
389
+ perthousand: "‰",
390
+ numero: "№"
391
+ }, K = {
392
+ ldots: "…",
393
+ cdots: "⋯",
394
+ vdots: "⋮",
395
+ ddots: "⋱",
396
+ dots: "…",
397
+ dotsc: "…",
398
+ dotsb: "⋯",
399
+ dotsm: "⋯",
400
+ dotsi: "⋯"
401
+ }, U = {
402
+ lfloor: "⌊",
403
+ rfloor: "⌋",
404
+ lceil: "⌈",
405
+ rceil: "⌉",
406
+ lbrace: "{",
407
+ rbrace: "}",
408
+ lbrack: "[",
409
+ rbrack: "]",
410
+ lvert: "|",
411
+ rvert: "|",
412
+ lVert: "‖",
413
+ rVert: "‖",
414
+ vert: "|",
415
+ Vert: "‖",
416
+ ulcorner: "⌜",
417
+ urcorner: "⌝",
418
+ llcorner: "⌞",
419
+ lrcorner: "⌟",
420
+ lgroup: "⟮",
421
+ rgroup: "⟯",
422
+ lmoustache: "⎰",
423
+ rmoustache: "⎱",
424
+ llbracket: "⟦",
425
+ rrbracket: "⟧"
426
+ }, V = {
427
+ sec: "sec",
428
+ csc: "csc",
429
+ cot: "cot",
430
+ sinh: "sinh",
431
+ cosh: "cosh",
432
+ tanh: "tanh",
433
+ coth: "coth",
434
+ arcsin: "arcsin",
435
+ arccos: "arccos",
436
+ arctan: "arctan",
437
+ arcsec: "arcsec",
438
+ arccsc: "arccsc",
439
+ arccot: "arccot",
440
+ exp: "exp",
441
+ det: "det",
442
+ dim: "dim",
443
+ ker: "ker",
444
+ deg: "deg",
445
+ gcd: "gcd",
446
+ hom: "hom",
447
+ lim: "lim",
448
+ liminf: "lim inf",
449
+ limsup: "lim sup",
450
+ max: "max",
451
+ min: "min",
452
+ sup: "sup",
453
+ inf: "inf",
454
+ arg: "arg",
455
+ Pr: "Pr",
456
+ lg: "lg",
457
+ mod: "mod",
458
+ bmod: "mod"
459
+ }, A = {
460
+ ...B,
461
+ ...F,
462
+ ...W,
463
+ ...X,
464
+ ...N,
465
+ ..._,
466
+ ...G,
467
+ ...H,
468
+ ...Y,
469
+ ...K,
470
+ ...U,
471
+ ...V
472
+ }, $ = {
473
+ A: "𝔸",
474
+ B: "𝔹",
475
+ C: "ℂ",
476
+ D: "𝔻",
477
+ E: "𝔼",
478
+ F: "𝔽",
479
+ G: "𝔾",
480
+ H: "ℍ",
481
+ I: "𝕀",
482
+ J: "𝕁",
483
+ K: "𝕂",
484
+ L: "𝕃",
485
+ M: "𝕄",
486
+ N: "ℕ",
487
+ O: "𝕆",
488
+ P: "ℙ",
489
+ Q: "ℚ",
490
+ R: "ℝ",
491
+ S: "𝕊",
492
+ T: "𝕋",
493
+ U: "𝕌",
494
+ V: "𝕍",
495
+ W: "𝕎",
496
+ X: "𝕏",
497
+ Y: "𝕐",
498
+ Z: "ℤ"
499
+ }, J = {
500
+ A: "𝒜",
501
+ B: "ℬ",
502
+ C: "𝒞",
503
+ D: "𝒟",
504
+ E: "ℰ",
505
+ F: "ℱ",
506
+ G: "𝒢",
507
+ H: "ℋ",
508
+ I: "ℐ",
509
+ J: "𝒥",
510
+ K: "𝒦",
511
+ L: "ℒ",
512
+ M: "ℳ",
513
+ N: "𝒩",
514
+ O: "𝒪",
515
+ P: "𝒫",
516
+ Q: "𝒬",
517
+ R: "ℛ",
518
+ S: "𝒮",
519
+ T: "𝒯",
520
+ U: "𝒰",
521
+ V: "𝒱",
522
+ W: "𝒲",
523
+ X: "𝒳",
524
+ Y: "𝒴",
525
+ Z: "𝒵"
526
+ }, Z = {
527
+ A: "𝔄",
528
+ B: "𝔅",
529
+ C: "ℭ",
530
+ D: "𝔇",
531
+ E: "𝔈",
532
+ F: "𝔉",
533
+ G: "𝔊",
534
+ H: "ℌ",
535
+ I: "ℑ",
536
+ J: "𝔍",
537
+ K: "𝔎",
538
+ L: "𝔏",
539
+ M: "𝔐",
540
+ N: "𝔑",
541
+ O: "𝔒",
542
+ P: "𝔓",
543
+ Q: "𝔔",
544
+ R: "ℜ",
545
+ S: "𝔖",
546
+ T: "𝔗",
547
+ U: "𝔘",
548
+ V: "𝔙",
549
+ W: "𝔚",
550
+ X: "𝔛",
551
+ Y: "𝔜",
552
+ Z: "ℨ"
553
+ };
554
+ Object.keys(A).length;
555
+ function L(r) {
556
+ return A[r];
557
+ }
558
+ function j(r) {
559
+ return r in A;
560
+ }
561
+ const Q = {
3
562
  matrix: ["", ""],
4
563
  pmatrix: ["(", ")"],
5
564
  bmatrix: ["[", "]"],
6
565
  Bmatrix: ["{", "}"],
7
566
  vmatrix: ["|", "|"],
8
567
  Vmatrix: ["‖", "‖"]
9
- }, F = {
10
- mathbb: H,
11
- mathcal: E,
12
- mathfrak: W
568
+ }, M = {
569
+ mathbb: $,
570
+ mathcal: J,
571
+ mathfrak: Z
13
572
  };
14
- function P(s) {
15
- const t = N(s);
16
- return M(t);
573
+ function P(r) {
574
+ const t = ee(r);
575
+ return R(t);
17
576
  }
18
- function v(s) {
577
+ function z(r) {
19
578
  let t = "";
20
- for (const e of s)
21
- e.type === "text" || e.type === "textgroup" || e.type === "symbol" ? t += e.content || "" : e.children && (t += v(e.children));
579
+ for (const e of r)
580
+ e.type === "text" || e.type === "textgroup" || e.type === "symbol" ? t += e.content || "" : e.children && (t += z(e.children));
22
581
  return t;
23
582
  }
24
- function N(s) {
583
+ function ee(r) {
25
584
  const t = [];
26
585
  let e = 0;
27
- for (; e < s.length; ) {
28
- const n = s[e];
586
+ for (; e < r.length; ) {
587
+ const n = r[e];
29
588
  if (n === "\\") {
30
- let i = "";
31
- for (e++; e < s.length && /[a-zA-Z]/.test(s[e]); )
32
- i += s[e], e++;
33
- i ? t.push("\\" + i) : e < s.length && (t.push("\\" + s[e]), e++);
589
+ let s = "";
590
+ for (e++; e < r.length && /[a-zA-Z]/.test(r[e]); )
591
+ s += r[e], e++;
592
+ s ? t.push("\\" + s) : e < r.length && (t.push("\\" + r[e]), e++);
34
593
  } else if (n === "{" || n === "}" || n === "^" || n === "_")
35
594
  t.push(n), e++;
36
595
  else if (/\s/.test(n))
37
- for (t.push(" "), e++; e < s.length && /\s/.test(s[e]); )
596
+ for (t.push(" "), e++; e < r.length && /\s/.test(r[e]); )
38
597
  e++;
39
598
  else
40
599
  t.push(n), e++;
41
600
  }
42
601
  return t;
43
602
  }
44
- function M(s) {
603
+ function R(r) {
45
604
  const t = [];
46
605
  let e = 0;
47
- for (; e < s.length; ) {
48
- const n = s[e];
606
+ for (; e < r.length; ) {
607
+ const n = r[e];
49
608
  if (n === "^") {
50
609
  e++;
51
- const i = w(s, e);
610
+ const s = T(r, e);
52
611
  t.push({
53
612
  type: "superscript",
54
- children: i.nodes
55
- }), e = i.nextIndex;
613
+ children: s.nodes
614
+ }), e = s.nextIndex;
56
615
  } else if (n === "_") {
57
616
  e++;
58
- const i = w(s, e);
617
+ const s = T(r, e);
59
618
  t.push({
60
619
  type: "subscript",
61
- children: i.nodes
62
- }), e = i.nextIndex;
620
+ children: s.nodes
621
+ }), e = s.nextIndex;
63
622
  } else if (n.startsWith("\\")) {
64
- const i = n.substring(1);
65
- if (i === "frac") {
623
+ const s = n.substring(1);
624
+ if (s === "frac") {
66
625
  e++;
67
- const o = w(s, e);
626
+ const o = T(r, e);
68
627
  e = o.nextIndex;
69
- const l = w(s, e);
628
+ const l = T(r, e);
70
629
  e = l.nextIndex, t.push({
71
630
  type: "fraction",
72
631
  numerator: o.nodes,
73
632
  denominator: l.nodes
74
633
  });
75
- } else if (i === "sqrt") {
634
+ } else if (s === "sqrt") {
76
635
  e++;
77
- const o = w(s, e);
636
+ const o = T(r, e);
78
637
  t.push({
79
638
  type: "sqrt",
80
639
  children: o.nodes
81
640
  }), e = o.nextIndex;
82
- } else if (i === "text" || i === "mathrm" || i === "mathbf" || i === "mathit" || i === "operatorname") {
641
+ } else if (s === "text" || s === "mathrm" || s === "mathbf" || s === "mathit" || s === "operatorname") {
83
642
  e++;
84
- const o = w(s, e), l = v(o.nodes);
643
+ const o = T(r, e), l = z(o.nodes);
85
644
  t.push({
86
645
  type: "textgroup",
87
646
  content: l
88
647
  }), e = o.nextIndex;
89
- } else if (i in F) {
648
+ } else if (s in M) {
90
649
  e++;
91
- const o = w(s, e);
650
+ const o = T(r, e);
92
651
  e = o.nextIndex;
93
- const l = F[i], r = v(o.nodes);
652
+ const l = M[s], i = z(o.nodes);
94
653
  let c = "";
95
- for (const f of r) c += l[f] ?? f;
654
+ for (const h of i) c += l[h] ?? h;
96
655
  t.push({ type: "text", content: c });
97
- } else i === "begin" ? e = Y(s, e, t) : _(i) ? (t.push({
656
+ } else s === "begin" ? e = te(r, e, t) : j(s) ? (t.push({
98
657
  type: "symbol",
99
- content: D(i)
100
- }), e++) : i === "times" || i === "cdot" || i === "pm" || i === "mp" ? (t.push({
658
+ content: L(s)
659
+ }), e++) : s === "times" || s === "cdot" || s === "pm" || s === "mp" ? (t.push({
101
660
  type: "symbol",
102
- content: D(i)
661
+ content: L(s)
103
662
  }), e++) : (t.push({
104
663
  type: "text",
105
664
  content: n
106
665
  }), e++);
107
666
  } else if (n === "{") {
108
- const i = w(s, e);
667
+ const s = T(r, e);
109
668
  t.push({
110
669
  type: "group",
111
- children: i.nodes
112
- }), e = i.nextIndex;
670
+ children: s.nodes
671
+ }), e = s.nextIndex;
113
672
  } else
114
673
  t.push({
115
674
  type: "text",
@@ -118,152 +677,152 @@ function M(s) {
118
677
  }
119
678
  return t;
120
679
  }
121
- function Y(s, t, e) {
122
- let n = t + 1, i = "";
123
- if (s[n] === "{") {
124
- for (n++; n < s.length && s[n] !== "}"; )
125
- i += s[n], n++;
126
- s[n] === "}" && n++;
680
+ function te(r, t, e) {
681
+ let n = t + 1, s = "";
682
+ if (r[n] === "{") {
683
+ for (n++; n < r.length && r[n] !== "}"; )
684
+ s += r[n], n++;
685
+ r[n] === "}" && n++;
127
686
  }
128
687
  const o = [];
129
688
  let l = 1;
130
- for (; n < s.length && l > 0; ) {
131
- const a = s[n];
689
+ for (; n < r.length && l > 0; ) {
690
+ const a = r[n];
132
691
  if (a === "\\begin")
133
692
  l++, o.push(a), n++;
134
693
  else if (a === "\\end")
135
694
  if (l--, l === 0) {
136
- if (n++, s[n] === "{") {
137
- for (n++; n < s.length && s[n] !== "}"; ) n++;
138
- s[n] === "}" && n++;
695
+ if (n++, r[n] === "{") {
696
+ for (n++; n < r.length && r[n] !== "}"; ) n++;
697
+ r[n] === "}" && n++;
139
698
  }
140
699
  } else
141
700
  o.push(a), n++;
142
701
  else
143
702
  o.push(a), n++;
144
703
  }
145
- const r = [];
146
- let c = [], f = [];
704
+ const i = [];
705
+ let c = [], h = [];
147
706
  const p = () => {
148
- c.push(M(f)), f = [];
149
- }, b = () => {
150
- p(), r.push(c), c = [];
707
+ c.push(R(h)), h = [];
708
+ }, g = () => {
709
+ p(), i.push(c), c = [];
151
710
  };
152
711
  for (const a of o)
153
- a === "&" ? p() : a === "\\\\" ? b() : f.push(a);
154
- (f.length > 0 || c.length > 0) && b();
155
- const m = $[i] ?? ["", ""];
156
- return e.push({ type: "matrix", rows: r, delimiters: m }), n;
712
+ a === "&" ? p() : a === "\\\\" ? g() : h.push(a);
713
+ (h.length > 0 || c.length > 0) && g();
714
+ const m = Q[s] ?? ["", ""];
715
+ return e.push({ type: "matrix", rows: i, delimiters: m }), n;
157
716
  }
158
- function w(s, t) {
159
- if (s[t] !== "{")
717
+ function T(r, t) {
718
+ if (r[t] !== "{")
160
719
  return {
161
720
  nodes: [
162
721
  {
163
722
  type: "text",
164
- content: s[t] || ""
723
+ content: r[t] || ""
165
724
  }
166
725
  ],
167
726
  nextIndex: t + 1
168
727
  };
169
728
  let e = t + 1;
170
729
  const n = [];
171
- let i = 1;
172
- for (; e < s.length && i > 0; ) {
173
- const o = s[e];
174
- o === "{" ? (i++, n.push(o)) : o === "}" ? (i--, i > 0 && n.push(o)) : n.push(o), e++;
730
+ let s = 1;
731
+ for (; e < r.length && s > 0; ) {
732
+ const o = r[e];
733
+ o === "{" ? (s++, n.push(o)) : o === "}" ? (s--, s > 0 && n.push(o)) : n.push(o), e++;
175
734
  }
176
735
  return {
177
- nodes: M(n),
736
+ nodes: R(n),
178
737
  nextIndex: e
179
738
  };
180
739
  }
181
- function T(s, t) {
182
- let e = t.x, n = 0, i = 0;
183
- for (let o = 0; o < s.length; o++) {
184
- const l = s[o], r = l.type === "subscript", c = l.type === "superscript", f = s[o + 1], p = (f == null ? void 0 : f.type) === "subscript", b = (f == null ? void 0 : f.type) === "superscript";
185
- if (r && b || c && p) {
186
- const m = C(l, { ...t, x: e }), a = C(f, { ...t, x: e }), u = Math.max(m.width, a.width);
187
- e += u + t.fontSize * 0.15, n = Math.max(n, m.baseline, a.baseline), i = Math.max(i, m.height - m.baseline, a.height - a.baseline), o++;
740
+ function v(r, t) {
741
+ let e = t.x, n = 0, s = 0;
742
+ for (let o = 0; o < r.length; o++) {
743
+ const l = r[o], i = l.type === "subscript", c = l.type === "superscript", h = r[o + 1], p = (h == null ? void 0 : h.type) === "subscript", g = (h == null ? void 0 : h.type) === "superscript";
744
+ if (i && g || c && p) {
745
+ const m = q(l, { ...t, x: e }), a = q(h, { ...t, x: e }), d = Math.max(m.width, a.width);
746
+ e += d + t.fontSize * 0.15, n = Math.max(n, m.baseline, a.baseline), s = Math.max(s, m.height - m.baseline, a.height - a.baseline), o++;
188
747
  } else {
189
- const m = C(l, { ...t, x: e });
190
- e += m.width, (r || c) && (e += t.fontSize * 0.12), n = Math.max(n, m.baseline), i = Math.max(i, m.height - m.baseline);
748
+ const m = q(l, { ...t, x: e });
749
+ e += m.width, (i || c) && (e += t.fontSize * 0.12), n = Math.max(n, m.baseline), s = Math.max(s, m.height - m.baseline);
191
750
  }
192
751
  }
193
752
  return {
194
753
  width: e - t.x,
195
- height: n + i,
754
+ height: n + s,
196
755
  baseline: n
197
756
  };
198
757
  }
199
- function C(s, t) {
200
- switch (s.type) {
758
+ function q(r, t) {
759
+ switch (r.type) {
201
760
  case "text":
202
- return R(s.content || "", t);
761
+ return k(r.content || "", t);
203
762
  case "textgroup":
204
- return R(s.content || "", t);
763
+ return k(r.content || "", t);
205
764
  case "symbol":
206
- return x(s.content || "", t);
765
+ return re(r.content || "", t);
207
766
  case "superscript":
208
- return K(s.children || [], t);
767
+ return se(r.children || [], t);
209
768
  case "subscript":
210
- return O(s.children || [], t);
769
+ return oe(r.children || [], t);
211
770
  case "fraction":
212
- return G(
213
- s.numerator || [],
214
- s.denominator || [],
771
+ return ie(
772
+ r.numerator || [],
773
+ r.denominator || [],
215
774
  t
216
775
  );
217
776
  case "sqrt":
218
- return J(s.children || [], t);
777
+ return ae(r.children || [], t);
219
778
  case "group":
220
- return T(s.children || [], t);
779
+ return v(r.children || [], t);
221
780
  case "matrix":
222
- return k(s.rows || [], s.delimiters || ["", ""], t);
781
+ return ne(r.rows || [], r.delimiters || ["", ""], t);
223
782
  default:
224
783
  return { width: 0, height: 0, baseline: 0 };
225
784
  }
226
785
  }
227
- function k(s, t, e) {
228
- const n = s.length, i = s.reduce((h, d) => Math.max(h, d.length), 0);
229
- if (n === 0 || i === 0)
786
+ function ne(r, t, e) {
787
+ const n = r.length, s = r.reduce((u, f) => Math.max(u, f.length), 0);
788
+ if (n === 0 || s === 0)
230
789
  return { width: 0, height: 0, baseline: 0 };
231
- const o = e.fontSize * 0.35, l = e.fontSize * 0.25, r = e.fontSize * 0.35, c = s.map((h) => h.map((d) => A(d, e))), f = new Array(i).fill(0), p = new Array(n).fill(0), b = new Array(n).fill(0);
232
- for (let h = 0; h < n; h++)
233
- for (let d = 0; d < s[h].length; d++) {
234
- const g = c[h][d];
235
- f[d] = Math.max(f[d], g.width), p[h] = Math.max(p[h], g.baseline), b[h] = Math.max(b[h], g.height - g.baseline);
790
+ const o = e.fontSize * 0.35, l = e.fontSize * 0.25, i = e.fontSize * 0.35, c = r.map((u) => u.map((f) => C(f, e))), h = new Array(s).fill(0), p = new Array(n).fill(0), g = new Array(n).fill(0);
791
+ for (let u = 0; u < n; u++)
792
+ for (let f = 0; f < r[u].length; f++) {
793
+ const b = c[u][f];
794
+ h[f] = Math.max(h[f], b.width), p[u] = Math.max(p[u], b.baseline), g[u] = Math.max(g[u], b.height - b.baseline);
236
795
  }
237
- const m = p.map((h, d) => h + b[d]), a = m.reduce((h, d) => h + d, 0) + l * 2 * n, z = f.reduce((h, d) => h + d, 0) + o * 2 * i + r * 2, y = e.y - a / 2;
238
- X(e, t[0], e.x, y, a, r, "left"), X(e, t[1], e.x + z - r, y, a, r, "right");
239
- let S = y + l;
240
- for (let h = 0; h < n; h++) {
241
- let d = e.x + r + o;
242
- for (let g = 0; g < i; g++) {
243
- const I = s[h][g];
244
- if (I) {
245
- const q = c[h][g], B = d + (f[g] - q.width) / 2, L = S + p[h];
246
- T(I, { ...e, x: B, y: L });
796
+ const m = p.map((u, f) => u + g[f]), a = m.reduce((u, f) => u + f, 0) + l * 2 * n, y = h.reduce((u, f) => u + f, 0) + o * 2 * s + i * 2, w = e.y - a / 2;
797
+ I(e, t[0], e.x, w, a, i, "left"), I(e, t[1], e.x + y - i, w, a, i, "right");
798
+ let S = w + l;
799
+ for (let u = 0; u < n; u++) {
800
+ let f = e.x + i + o;
801
+ for (let b = 0; b < s; b++) {
802
+ const E = r[u][b];
803
+ if (E) {
804
+ const D = c[u][b], O = f + (h[b] - D.width) / 2, x = S + p[u];
805
+ v(E, { ...e, x: O, y: x });
247
806
  }
248
- d += f[g] + o * 2;
807
+ f += h[b] + o * 2;
249
808
  }
250
- S += m[h] + l * 2;
809
+ S += m[u] + l * 2;
251
810
  }
252
- return { width: z, height: a, baseline: a / 2 };
811
+ return { width: y, height: a, baseline: a / 2 };
253
812
  }
254
- function X(s, t, e, n, i, o, l) {
813
+ function I(r, t, e, n, s, o, l) {
255
814
  if (!t) return;
256
- const r = s.ctx;
257
- r.save(), r.strokeStyle = s.color, r.lineWidth = Math.max(1, s.fontSize * 0.05), r.lineCap = "round", r.lineJoin = "round";
258
- const c = n + i, f = o * 0.7, p = (u) => {
259
- r.beginPath(), u ? (r.moveTo(e + o, n), r.quadraticCurveTo(e, (n + c) / 2, e + o, c)) : (r.moveTo(e, n), r.quadraticCurveTo(e + o, (n + c) / 2, e, c)), r.stroke();
260
- }, b = (u) => {
261
- r.beginPath(), u ? (r.moveTo(e + f, n), r.lineTo(e, n), r.lineTo(e, c), r.lineTo(e + f, c)) : (r.moveTo(e + o - f, n), r.lineTo(e + o, n), r.lineTo(e + o, c), r.lineTo(e + o - f, c)), r.stroke();
262
- }, m = (u) => {
263
- r.beginPath(), r.moveTo(e + u, n), r.lineTo(e + u, c), r.stroke();
264
- }, a = (u) => {
265
- const z = (n + c) / 2, y = u ? e + o : e, S = u ? e : e + o;
266
- r.beginPath(), r.moveTo(y, n), r.quadraticCurveTo(S, n + i * 0.25, (y + S) / 2, n + i * 0.4), r.quadraticCurveTo(S, z - 1, S, z), r.quadraticCurveTo(S, z + 1, (y + S) / 2, c - i * 0.4), r.quadraticCurveTo(S, c - i * 0.25, y, c), r.stroke();
815
+ const i = r.ctx;
816
+ i.save(), i.strokeStyle = r.color, i.lineWidth = Math.max(1, r.fontSize * 0.05), i.lineCap = "round", i.lineJoin = "round";
817
+ const c = n + s, h = o * 0.7, p = (d) => {
818
+ i.beginPath(), d ? (i.moveTo(e + o, n), i.quadraticCurveTo(e, (n + c) / 2, e + o, c)) : (i.moveTo(e, n), i.quadraticCurveTo(e + o, (n + c) / 2, e, c)), i.stroke();
819
+ }, g = (d) => {
820
+ i.beginPath(), d ? (i.moveTo(e + h, n), i.lineTo(e, n), i.lineTo(e, c), i.lineTo(e + h, c)) : (i.moveTo(e + o - h, n), i.lineTo(e + o, n), i.lineTo(e + o, c), i.lineTo(e + o - h, c)), i.stroke();
821
+ }, m = (d) => {
822
+ i.beginPath(), i.moveTo(e + d, n), i.lineTo(e + d, c), i.stroke();
823
+ }, a = (d) => {
824
+ const y = (n + c) / 2, w = d ? e + o : e, S = d ? e : e + o;
825
+ i.beginPath(), i.moveTo(w, n), i.quadraticCurveTo(S, n + s * 0.25, (w + S) / 2, n + s * 0.4), i.quadraticCurveTo(S, y - 1, S, y), i.quadraticCurveTo(S, y + 1, (w + S) / 2, c - s * 0.4), i.quadraticCurveTo(S, c - s * 0.25, w, c), i.stroke();
267
826
  };
268
827
  switch (t) {
269
828
  case "(":
@@ -273,10 +832,10 @@ function X(s, t, e, n, i, o, l) {
273
832
  p(!1);
274
833
  break;
275
834
  case "[":
276
- b(!0);
835
+ g(!0);
277
836
  break;
278
837
  case "]":
279
- b(!1);
838
+ g(!1);
280
839
  break;
281
840
  case "{":
282
841
  a(!0);
@@ -291,155 +850,155 @@ function X(s, t, e, n, i, o, l) {
291
850
  m(o * 0.3), m(o * 0.7);
292
851
  break;
293
852
  }
294
- r.restore();
853
+ i.restore();
295
854
  }
296
- function R(s, t) {
855
+ function k(r, t) {
297
856
  t.ctx.save(), t.ctx.font = `${t.fontSize}px ${t.fontFamily}`, t.ctx.fillStyle = t.color, t.ctx.textAlign = "left", t.ctx.textBaseline = "alphabetic";
298
- const e = t.ctx.measureText(s);
299
- t.ctx.fillText(s, t.x, t.y), t.ctx.restore();
300
- const n = t.fontSize, i = n * 0.75;
857
+ const e = t.ctx.measureText(r);
858
+ t.ctx.fillText(r, t.x, t.y), t.ctx.restore();
859
+ const n = t.fontSize, s = n * 0.75;
301
860
  return {
302
861
  width: e.width,
303
862
  height: n,
304
- baseline: i
863
+ baseline: s
305
864
  };
306
865
  }
307
- function x(s, t) {
866
+ function re(r, t) {
308
867
  t.ctx.save(), t.ctx.font = `${t.fontSize * 1.1}px ${t.fontFamily}`, t.ctx.fillStyle = t.color, t.ctx.textAlign = "left", t.ctx.textBaseline = "alphabetic";
309
- const e = t.ctx.measureText(s);
310
- t.ctx.fillText(s, t.x, t.y), t.ctx.restore();
311
- const n = t.fontSize * 1.1, i = n * 0.75;
868
+ const e = t.ctx.measureText(r);
869
+ t.ctx.fillText(r, t.x, t.y), t.ctx.restore();
870
+ const n = t.fontSize * 1.1, s = n * 0.75;
312
871
  return {
313
872
  width: e.width,
314
873
  height: n,
315
- baseline: i
874
+ baseline: s
316
875
  };
317
876
  }
318
- function K(s, t) {
319
- const e = t.fontSize * 0.7, n = -t.fontSize * 0.4, i = T(s, {
877
+ function se(r, t) {
878
+ const e = t.fontSize * 0.7, n = -t.fontSize * 0.4, s = v(r, {
320
879
  ...t,
321
880
  fontSize: e,
322
881
  y: t.y + n
323
- }), o = i.baseline, l = i.height - i.baseline;
882
+ }), o = s.baseline, l = s.height - s.baseline;
324
883
  return {
325
- width: i.width,
884
+ width: s.width,
326
885
  height: o - n + (l + n),
327
886
  baseline: o - n
328
887
  };
329
888
  }
330
- function O(s, t) {
331
- const e = t.fontSize * 0.7, n = t.fontSize * 0.3, i = T(s, {
889
+ function oe(r, t) {
890
+ const e = t.fontSize * 0.7, n = t.fontSize * 0.3, s = v(r, {
332
891
  ...t,
333
892
  fontSize: e,
334
893
  y: t.y + n
335
- }), o = i.baseline, l = i.height - i.baseline;
894
+ }), o = s.baseline, l = s.height - s.baseline;
336
895
  return {
337
- width: i.width,
896
+ width: s.width,
338
897
  height: o - n + (l + n),
339
898
  baseline: o - n
340
899
  };
341
900
  }
342
- function G(s, t, e) {
343
- const n = e.fontSize * 0.85, i = Math.max(1, e.fontSize * 0.05), o = e.fontSize * 0.1, l = A(s, {
901
+ function ie(r, t, e) {
902
+ const n = e.fontSize * 0.85, s = Math.max(1, e.fontSize * 0.05), o = e.fontSize * 0.1, l = C(r, {
344
903
  ...e,
345
904
  fontSize: n
346
- }), r = A(t, {
905
+ }), i = C(t, {
347
906
  ...e,
348
907
  fontSize: n
349
- }), c = Math.max(l.width, r.width), f = l.height + r.height + o * 2 + i, p = e.x + (c - l.width) / 2, b = e.y - o - i / 2;
350
- T(s, {
908
+ }), c = Math.max(l.width, i.width), h = l.height + i.height + o * 2 + s, p = e.x + (c - l.width) / 2, g = e.y - o - s / 2;
909
+ v(r, {
351
910
  ...e,
352
911
  x: p,
353
- y: b,
912
+ y: g,
354
913
  fontSize: n
355
914
  }), e.ctx.fillStyle = e.color, e.ctx.fillRect(
356
915
  e.x,
357
- e.y - i / 2,
916
+ e.y - s / 2,
358
917
  c,
359
- i
918
+ s
360
919
  );
361
- const m = e.x + (c - r.width) / 2, a = e.y + r.baseline + o + i / 2;
362
- return T(t, {
920
+ const m = e.x + (c - i.width) / 2, a = e.y + i.baseline + o + s / 2;
921
+ return v(t, {
363
922
  ...e,
364
923
  x: m,
365
924
  y: a,
366
925
  fontSize: n
367
926
  }), {
368
927
  width: c,
369
- height: f,
370
- baseline: f / 2
928
+ height: h,
929
+ baseline: h / 2
371
930
  };
372
931
  }
373
- function J(s, t) {
374
- const e = T(s, {
932
+ function ae(r, t) {
933
+ const e = v(r, {
375
934
  ...t,
376
935
  x: t.x + t.fontSize * 0.4
377
- }), n = e.width + t.fontSize * 0.5, i = e.height * 1.1;
378
- return t.ctx.save(), t.ctx.strokeStyle = t.color, t.ctx.lineWidth = Math.max(1, t.fontSize * 0.05), t.ctx.lineCap = "round", t.ctx.lineJoin = "miter", t.ctx.beginPath(), t.ctx.moveTo(t.x, t.y - i * 0.3), t.ctx.lineTo(t.x + t.fontSize * 0.15, t.y), t.ctx.lineTo(t.x + t.fontSize * 0.3, t.y - i * 0.9), t.ctx.lineTo(t.x + n, t.y - i * 0.9), t.ctx.stroke(), t.ctx.restore(), {
936
+ }), n = e.width + t.fontSize * 0.5, s = e.height * 1.1;
937
+ return t.ctx.save(), t.ctx.strokeStyle = t.color, t.ctx.lineWidth = Math.max(1, t.fontSize * 0.05), t.ctx.lineCap = "round", t.ctx.lineJoin = "miter", t.ctx.beginPath(), t.ctx.moveTo(t.x, t.y - s * 0.3), t.ctx.lineTo(t.x + t.fontSize * 0.15, t.y), t.ctx.lineTo(t.x + t.fontSize * 0.3, t.y - s * 0.9), t.ctx.lineTo(t.x + n, t.y - s * 0.9), t.ctx.stroke(), t.ctx.restore(), {
379
938
  width: n,
380
- height: i,
939
+ height: s,
381
940
  baseline: e.baseline
382
941
  };
383
942
  }
384
- function A(s, t) {
943
+ function C(r, t) {
385
944
  const n = document.createElement("canvas").getContext("2d");
386
- return n ? T(s, { ...t, ctx: n, x: 0, y: 0 }) : { width: 0, height: 0, baseline: 0 };
945
+ return n ? v(r, { ...t, ctx: n, x: 0, y: 0 }) : { width: 0, height: 0, baseline: 0 };
387
946
  }
388
- function V(s = {}) {
947
+ function le(r = {}) {
389
948
  const e = { ...{
390
949
  fontSize: 14,
391
950
  fontFamily: "serif",
392
951
  color: "#000000",
393
952
  enableCache: !0,
394
953
  customSymbols: {}
395
- }, ...s }, n = 1e3;
396
- function i(a) {
954
+ }, ...r }, n = 1e3;
955
+ function s(a) {
397
956
  if (a.size > n) {
398
- const u = a.keys().next().value;
399
- u !== void 0 && a.delete(u);
957
+ const d = a.keys().next().value;
958
+ d !== void 0 && a.delete(d);
400
959
  }
401
960
  }
402
961
  const o = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
403
- function r() {
962
+ function i() {
404
963
  o.clear(), l.clear();
405
964
  }
406
965
  function c(a) {
407
966
  if (!e.enableCache)
408
967
  return P(a);
409
- let u = o.get(a);
410
- return u || (u = P(a), o.set(a, u), i(o)), u;
968
+ let d = o.get(a);
969
+ return d || (d = P(a), o.set(a, d), s(o)), d;
411
970
  }
412
- function f(a, u, z, y, S = {}) {
413
- const h = { ...e, ...S }, d = c(a);
414
- return T(d, {
415
- ctx: u,
416
- x: z,
417
- y,
418
- fontSize: h.fontSize,
419
- fontFamily: h.fontFamily,
420
- color: h.color,
971
+ function h(a, d, y, w, S = {}) {
972
+ const u = { ...e, ...S }, f = c(a);
973
+ return v(f, {
974
+ ctx: d,
975
+ x: y,
976
+ y: w,
977
+ fontSize: u.fontSize,
978
+ fontFamily: u.fontFamily,
979
+ color: u.color,
421
980
  scale: 1
422
981
  });
423
982
  }
424
- function p(a, u = {}) {
425
- const z = `${a}:${u.fontSize || e.fontSize}`;
426
- if (e.enableCache && l.has(z))
427
- return l.get(z);
428
- const y = { ...e, ...u }, S = c(a), d = document.createElement("canvas").getContext("2d");
429
- if (!d)
983
+ function p(a, d = {}) {
984
+ const y = `${a}:${d.fontSize || e.fontSize}`;
985
+ if (e.enableCache && l.has(y))
986
+ return l.get(y);
987
+ const w = { ...e, ...d }, S = c(a), f = document.createElement("canvas").getContext("2d");
988
+ if (!f)
430
989
  return { width: 0, height: 0, baseline: 0 };
431
- const g = T(S, {
432
- ctx: d,
990
+ const b = v(S, {
991
+ ctx: f,
433
992
  x: 0,
434
993
  y: 0,
435
- fontSize: y.fontSize,
436
- fontFamily: y.fontFamily,
437
- color: y.color,
994
+ fontSize: w.fontSize,
995
+ fontFamily: w.fontFamily,
996
+ color: w.color,
438
997
  scale: 1
439
998
  });
440
- return e.enableCache && (l.set(z, g), i(l)), g;
999
+ return e.enableCache && (l.set(y, b), s(l)), b;
441
1000
  }
442
- function b() {
1001
+ function g() {
443
1002
  return {
444
1003
  parseCache: o.size,
445
1004
  measureCache: l.size,
@@ -458,17 +1017,17 @@ function V(s = {}) {
458
1017
  a.log.info("LaTeX plugin initialized");
459
1018
  },
460
1019
  onDestroy(a) {
461
- r(), a.log.info("LaTeX plugin destroyed");
1020
+ i(), a.log.info("LaTeX plugin destroyed");
462
1021
  },
463
1022
  api: {
464
- render: f,
1023
+ render: h,
465
1024
  measure: p,
466
- clearCache: r,
467
- getCacheStats: b
1025
+ clearCache: i,
1026
+ getCacheStats: g
468
1027
  }
469
1028
  };
470
1029
  }
471
1030
  export {
472
- V as PluginLaTeX
1031
+ le as PluginLaTeX
473
1032
  };
474
1033
  //# sourceMappingURL=latex.js.map