tiptap-markdown-react 1.2.0 → 1.3.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.
@@ -1,1322 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useState, useRef, useEffect, useLayoutEffect } from "react";
4
- import { c as styles$1, R as ReportContent, p as parseChartFenceBody } from "./ReportContent-B7okwVW0.js";
5
- import { Chart, CategoryScale, LinearScale, PointElement, LineElement, BarElement, ArcElement, LineController, BarController, PieController, DoughnutController, Filler, Legend, Tooltip } from "chart.js";
6
- const defaultChartLabels = {
7
- tabLabel: (chartType, index) => `${chartType} ${index + 1}`,
8
- done: "Done",
9
- cancel: "Cancel",
10
- configLabel: "Chart config (JSON)",
11
- tableLabel: "Data table (Markdown)",
12
- editTitle: "Edit chart"
13
- };
14
- const defaultToolbarLabels = {
15
- undo: "Undo",
16
- redo: "Redo",
17
- style: "Style",
18
- normalText: "Normal text",
19
- headingLabel: (level) => `Heading ${level}`,
20
- fontSize: "Font size",
21
- fontSizeDefault: "Default",
22
- bold: "Bold",
23
- italic: "Italic",
24
- underline: "Underline",
25
- strike: "Strikethrough",
26
- code: "Inline code",
27
- textColor: "Text color",
28
- highlight: "Highlight",
29
- colorNone: "None",
30
- colorTheme: "THEME",
31
- scriptMenu: "Superscript / Subscript",
32
- scriptNormal: "Normal",
33
- superscript: "Superscript",
34
- subscript: "Subscript",
35
- link: "Link",
36
- align: "Alignment",
37
- alignLeft: "Align left",
38
- alignCenter: "Align center",
39
- alignRight: "Align right",
40
- alignJustify: "Justify",
41
- indent: "Indent",
42
- indentIncrease: "Increase indent",
43
- indentDecrease: "Decrease indent",
44
- lineHeight: "Line height",
45
- lineHeightDefault: "Default",
46
- linkPrompt: "Enter URL",
47
- linkApply: "Apply link",
48
- linkOpen: "Open in new window",
49
- linkRemove: "Remove link",
50
- linkInvalid: "The editor rejected this address",
51
- image: "Image",
52
- imageUploadFailed: "Image upload failed",
53
- imageAlign: "Image alignment",
54
- imageAlignLeft: "Align left",
55
- imageAlignCenter: "Align center",
56
- imageAlignRight: "Align right",
57
- imageCaption: "Caption",
58
- imageCaptionPlaceholder: "Add a caption…",
59
- importMarkdownFailed: "Markdown import failed",
60
- importDocument: "Import",
61
- importDocumentHint: "Import a file",
62
- importDocumentOther: "Document",
63
- importDocumentBusy: "Importing…",
64
- importDocumentUploading: (percent) => `Uploading ${percent}%`,
65
- importDocumentConverting: "Converting…",
66
- importDocumentFailed: "Import failed",
67
- blockquote: "Blockquote",
68
- details: "Toggle",
69
- bulletList: "Bullet list",
70
- orderedList: "Ordered list",
71
- numberingFormat: "Numbering format",
72
- taskList: "Task list",
73
- more: "More",
74
- search: "Find & replace",
75
- codeBlock: "Code block",
76
- hr: "Divider",
77
- importMarkdown: "Markdown",
78
- tableInsert: "Insert table",
79
- tableRowMenu: "Row actions",
80
- tableColumnMenu: "Column actions",
81
- tableClearContent: "Clear content",
82
- tableResetCellStyles: "Reset cell styles",
83
- tableAppendRow: "Add row",
84
- tableAppendColumn: "Add column",
85
- tableSizeSelected: (cols, rows) => `${cols} × ${rows}`,
86
- tableAddColumnBefore: "Add column before",
87
- tableAddColumnAfter: "Add column after",
88
- tableDeleteColumn: "Delete column",
89
- tableAddRowBefore: "Add row before",
90
- tableAddRowAfter: "Add row after",
91
- tableDeleteRow: "Delete row",
92
- tableAddColumnBeforeN: (n) => `Add ${n} columns before`,
93
- tableAddColumnAfterN: (n) => `Add ${n} columns after`,
94
- tableDeleteColumnN: (n) => `Delete ${n} columns`,
95
- tableAddRowBeforeN: (n) => `Add ${n} rows before`,
96
- tableAddRowAfterN: (n) => `Add ${n} rows after`,
97
- tableDeleteRowN: (n) => `Delete ${n} rows`,
98
- tableDeleteTable: "Delete table",
99
- inlineMath: "Inline equation",
100
- blockMath: "Block equation",
101
- mathPlaceholder: "E = mc^2",
102
- mathDone: "Done",
103
- mathCancel: "Cancel",
104
- mathNewInline: "New equation",
105
- mathNewBlock: "Add a TeX equation"
106
- };
107
- const defaultBlockDragLabels = {
108
- dragHandle: "Drag to move",
109
- menuLabel: "Block actions",
110
- turnInto: "Turn into",
111
- paragraph: "Normal text",
112
- headingLabel: (level) => `Heading ${level}`,
113
- bulletList: "Bullet list",
114
- orderedList: "Ordered list",
115
- taskList: "Task list",
116
- blockquote: "Blockquote",
117
- codeBlock: "Code block",
118
- copy: "Copy",
119
- duplicate: "Duplicate",
120
- resetFormatting: "Reset formatting",
121
- downloadImage: "Download image",
122
- delete: "Delete"
123
- };
124
- const defaultSlashMenuLabels = {
125
- menuLabel: "Insert block",
126
- groupText: "Text",
127
- groupList: "Lists",
128
- groupAdvanced: "Advanced",
129
- normalText: "Normal text",
130
- headingLabel: (level) => `Heading ${level}`,
131
- bulletList: "Bullet list",
132
- orderedList: "Ordered list",
133
- taskList: "Task list",
134
- blockquote: "Blockquote",
135
- details: "Toggle",
136
- codeBlock: "Code block",
137
- divider: "Divider",
138
- table: "Table",
139
- inlineMath: "Inline equation",
140
- blockMath: "Block equation"
141
- };
142
- const defaultShortcutLabels = {
143
- panelTitle: "Shortcuts",
144
- close: "Close",
145
- colFormat: "Format",
146
- colShortcut: "Shortcut",
147
- colMarkdown: "Markdown",
148
- formatGroup: "Formatting",
149
- insertGroup: "Insert",
150
- editGroup: "Editing",
151
- bold: "Bold",
152
- italic: "Italic",
153
- strike: "Strikethrough",
154
- underline: "Underline",
155
- inlineCode: "Inline code",
156
- highlight: "Highlight",
157
- headingLabel: (level) => `Heading ${level}`,
158
- paragraph: "Normal text",
159
- blockquote: "Blockquote",
160
- bulletList: "Bullet list",
161
- orderedList: "Ordered list",
162
- taskList: "Task list",
163
- codeBlock: "Code block",
164
- divider: "Divider",
165
- undo: "Undo",
166
- redo: "Redo",
167
- hardBreak: "Hard break",
168
- findReplace: "Find & replace",
169
- alignLeft: "Align left",
170
- alignCenter: "Align center",
171
- alignRight: "Align right",
172
- alignJustify: "Justify",
173
- imageUpload: "Upload image",
174
- smartQuote: "Smart quotes",
175
- ellipsis: "Ellipsis",
176
- emDash: "Em dash",
177
- emoji: "Emoji"
178
- };
179
- const defaultCharacterCountLabels = {
180
- label: "Document statistics",
181
- characters: (count) => `${count} ${count === 1 ? "character" : "characters"}`,
182
- words: (count) => `${count} ${count === 1 ? "word" : "words"}`
183
- };
184
- const defaultEmojiSuggestionLabels = {
185
- menuLabel: "Emoji"
186
- };
187
- const defaultLinkPopoverLabels = {
188
- field: "Enter URL",
189
- apply: "Apply link",
190
- open: "Open in new window",
191
- remove: "Remove link",
192
- invalid: "The editor rejected this address"
193
- };
194
- const defaultColorPaletteLabels = {
195
- none: "None",
196
- theme: "THEME"
197
- };
198
- const defaultTocLabels = {
199
- title: "Contents",
200
- expand: "Expand",
201
- collapse: "Collapse"
202
- };
203
- const defaultCodeBlockLabels = {
204
- autoDetect: "Auto-detect",
205
- delete: "Delete code block",
206
- copy: "Copy code",
207
- expand: "Expand code",
208
- collapse: "Collapse code",
209
- language: "Code language"
210
- };
211
- const defaultFindLabels = {
212
- find: "Find",
213
- replace: "Replace with",
214
- next: "Next match",
215
- previous: "Previous match",
216
- replaceOne: "Replace",
217
- replaceAll: "Replace all",
218
- close: "Close",
219
- caseSensitive: "Match case",
220
- wholeWord: "Whole word",
221
- useRegex: "Use regular expression",
222
- counter: (current, total) => `${current} / ${total}`,
223
- invalidRegex: "Invalid pattern",
224
- readOnly: "Read-only"
225
- };
226
- const defaultImageUploadLabels = {
227
- dropzoneClick: "Click to upload",
228
- dropzoneRest: " or drag and drop",
229
- dropzoneLimits: (limit, maxSizeMb) => {
230
- const count = `Maximum ${limit} file${limit === 1 ? "" : "s"}`;
231
- return maxSizeMb == null ? `${count}.` : `${count}, ${maxSizeMb}MB each.`;
232
- },
233
- uploadingCount: (count) => `Uploading ${count} files`,
234
- clearAll: "Clear all",
235
- remove: "Remove",
236
- failed: "Upload failed",
237
- fallbackAlt: "image"
238
- };
239
- const zh = {
240
- toolbar: {
241
- undo: "撤销",
242
- redo: "重做",
243
- style: "样式",
244
- normalText: "正文",
245
- headingLabel: (level) => `标题 ${level}`,
246
- fontSize: "字号",
247
- fontSizeDefault: "默认",
248
- bold: "加粗",
249
- italic: "斜体",
250
- underline: "下划线",
251
- strike: "删除线",
252
- code: "行内代码",
253
- textColor: "文字颜色",
254
- highlight: "高亮",
255
- colorNone: "无",
256
- colorTheme: "主题色",
257
- scriptMenu: "上标 / 下标",
258
- scriptNormal: "常规",
259
- superscript: "上标",
260
- subscript: "下标",
261
- link: "链接",
262
- align: "对齐",
263
- alignLeft: "左对齐",
264
- alignCenter: "居中",
265
- alignRight: "右对齐",
266
- alignJustify: "两端对齐",
267
- indent: "缩进",
268
- indentIncrease: "增加缩进",
269
- indentDecrease: "减少缩进",
270
- lineHeight: "行高",
271
- lineHeightDefault: "默认",
272
- linkPrompt: "输入链接地址",
273
- linkApply: "应用链接",
274
- linkOpen: "在新窗口打开",
275
- linkRemove: "移除链接",
276
- linkInvalid: "编辑器不接受这个地址",
277
- image: "图片",
278
- imageUploadFailed: "图片上传失败",
279
- imageAlign: "图片对齐",
280
- imageAlignLeft: "左对齐",
281
- imageAlignCenter: "居中",
282
- imageAlignRight: "右对齐",
283
- imageCaption: "图片描述",
284
- imageCaptionPlaceholder: "添加描述…",
285
- importMarkdownFailed: "Markdown 导入失败",
286
- importDocument: "导入",
287
- importDocumentHint: "导入文件",
288
- importDocumentOther: "文档",
289
- importDocumentBusy: "正在导入…",
290
- importDocumentUploading: (percent) => `上传中 ${percent}%`,
291
- importDocumentConverting: "正在转换…",
292
- importDocumentFailed: "导入失败",
293
- blockquote: "引用",
294
- details: "折叠块",
295
- bulletList: "无序列表",
296
- orderedList: "有序列表",
297
- numberingFormat: "编号格式",
298
- taskList: "任务列表",
299
- more: "更多",
300
- search: "查找替换",
301
- codeBlock: "代码块",
302
- hr: "分隔线",
303
- importMarkdown: "Markdown",
304
- tableInsert: "插入表格",
305
- tableRowMenu: "行操作",
306
- tableColumnMenu: "列操作",
307
- tableClearContent: "清空内容",
308
- tableResetCellStyles: "重置单元格样式",
309
- tableAppendRow: "添加行",
310
- tableAppendColumn: "添加列",
311
- tableSizeSelected: (cols, rows) => `${cols} × ${rows}`,
312
- tableAddColumnBefore: "在左侧插入列",
313
- tableAddColumnAfter: "在右侧插入列",
314
- tableDeleteColumn: "删除列",
315
- tableAddRowBefore: "在上方插入行",
316
- tableAddRowAfter: "在下方插入行",
317
- tableDeleteRow: "删除行",
318
- tableAddColumnBeforeN: (n) => `在左侧插入 ${n} 列`,
319
- tableAddColumnAfterN: (n) => `在右侧插入 ${n} 列`,
320
- tableDeleteColumnN: (n) => `删除 ${n} 列`,
321
- tableAddRowBeforeN: (n) => `在上方插入 ${n} 行`,
322
- tableAddRowAfterN: (n) => `在下方插入 ${n} 行`,
323
- tableDeleteRowN: (n) => `删除 ${n} 行`,
324
- tableDeleteTable: "删除表格",
325
- inlineMath: "行内公式",
326
- blockMath: "块级公式",
327
- mathPlaceholder: "E = mc^2",
328
- mathDone: "完成",
329
- mathCancel: "取消",
330
- mathNewInline: "新建公式",
331
- mathNewBlock: "插入 TeX 公式"
332
- },
333
- slashMenu: {
334
- menuLabel: "插入块",
335
- groupText: "文本",
336
- groupList: "列表",
337
- groupAdvanced: "高级",
338
- normalText: "正文",
339
- headingLabel: (level) => `标题 ${level}`,
340
- bulletList: "无序列表",
341
- orderedList: "有序列表",
342
- taskList: "任务列表",
343
- blockquote: "引用",
344
- details: "折叠块",
345
- codeBlock: "代码块",
346
- divider: "分隔线",
347
- table: "表格",
348
- inlineMath: "行内公式",
349
- blockMath: "块级公式"
350
- },
351
- chart: {
352
- tabLabel: (chartType, index) => `${chartType} ${index + 1}`,
353
- done: "完成",
354
- cancel: "取消",
355
- configLabel: "图表配置(JSON)",
356
- tableLabel: "数据表(Markdown)",
357
- editTitle: "编辑图表"
358
- },
359
- blockDrag: {
360
- dragHandle: "拖动以移动",
361
- menuLabel: "块操作",
362
- turnInto: "转换成",
363
- paragraph: "正文",
364
- headingLabel: (level) => `标题 ${level}`,
365
- bulletList: "无序列表",
366
- orderedList: "有序列表",
367
- taskList: "任务列表",
368
- blockquote: "引用",
369
- codeBlock: "代码块",
370
- copy: "复制",
371
- duplicate: "再制一份",
372
- resetFormatting: "清除格式",
373
- downloadImage: "下载图片",
374
- delete: "删除"
375
- },
376
- shortcut: {
377
- panelTitle: "快捷键",
378
- close: "关闭",
379
- colFormat: "格式",
380
- colShortcut: "快捷键",
381
- colMarkdown: "Markdown",
382
- formatGroup: "格式",
383
- insertGroup: "插入",
384
- editGroup: "编辑",
385
- bold: "加粗",
386
- italic: "斜体",
387
- strike: "删除线",
388
- underline: "下划线",
389
- inlineCode: "行内代码",
390
- highlight: "高亮",
391
- headingLabel: (level) => `标题 ${level}`,
392
- paragraph: "正文",
393
- blockquote: "引用",
394
- bulletList: "无序列表",
395
- orderedList: "有序列表",
396
- taskList: "任务列表",
397
- codeBlock: "代码块",
398
- divider: "分隔线",
399
- undo: "撤销",
400
- redo: "重做",
401
- hardBreak: "硬换行",
402
- findReplace: "查找替换",
403
- alignLeft: "左对齐",
404
- alignCenter: "居中",
405
- alignRight: "右对齐",
406
- alignJustify: "两端对齐",
407
- imageUpload: "上传图片",
408
- smartQuote: "智能引号",
409
- ellipsis: "省略号",
410
- emDash: "破折号",
411
- emoji: "表情"
412
- },
413
- characterCount: {
414
- label: "字数统计",
415
- characters: (count) => `${count} 字符`,
416
- words: (count) => `${count} 词`
417
- },
418
- emoji: {
419
- menuLabel: "表情"
420
- },
421
- link: {
422
- field: "输入链接地址",
423
- apply: "应用链接",
424
- open: "在新窗口打开",
425
- remove: "移除链接",
426
- invalid: "编辑器不接受这个地址"
427
- },
428
- palette: {
429
- none: "无",
430
- theme: "主题色"
431
- },
432
- toc: {
433
- title: "目录",
434
- expand: "展开",
435
- collapse: "收起"
436
- },
437
- codeBlock: {
438
- autoDetect: "自动识别",
439
- delete: "删除代码块",
440
- copy: "复制代码",
441
- expand: "展开代码",
442
- collapse: "收起代码",
443
- language: "代码语言"
444
- },
445
- find: {
446
- find: "查找",
447
- replace: "替换为",
448
- next: "下一处",
449
- previous: "上一处",
450
- replaceOne: "替换",
451
- replaceAll: "全部替换",
452
- close: "关闭",
453
- caseSensitive: "区分大小写",
454
- wholeWord: "全词匹配",
455
- useRegex: "正则表达式",
456
- counter: (current, total) => `${current} / ${total}`,
457
- invalidRegex: "正则无效",
458
- readOnly: "只读"
459
- },
460
- imageUpload: {
461
- dropzoneClick: "点击上传",
462
- dropzoneRest: ",或拖拽到此处",
463
- dropzoneLimits: (limit, maxSizeMb) => {
464
- const count = `最多 ${limit} 个文件`;
465
- return maxSizeMb == null ? `${count}。` : `${count},每个 ${maxSizeMb}MB。`;
466
- },
467
- uploadingCount: (count) => `正在上传 ${count} 个文件`,
468
- clearAll: "全部清除",
469
- remove: "移除",
470
- failed: "上传失败",
471
- fallbackAlt: "图片"
472
- }
473
- };
474
- const en = {
475
- toolbar: defaultToolbarLabels,
476
- slashMenu: defaultSlashMenuLabels,
477
- chart: defaultChartLabels,
478
- blockDrag: defaultBlockDragLabels,
479
- shortcut: defaultShortcutLabels,
480
- characterCount: defaultCharacterCountLabels,
481
- emoji: defaultEmojiSuggestionLabels,
482
- link: defaultLinkPopoverLabels,
483
- palette: defaultColorPaletteLabels,
484
- toc: defaultTocLabels,
485
- codeBlock: defaultCodeBlockLabels,
486
- find: defaultFindLabels,
487
- imageUpload: defaultImageUploadLabels
488
- };
489
- const bundles = { en, zh };
490
- function getLocaleBundle(locale = "en") {
491
- return bundles[locale] ?? en;
492
- }
493
- function toNumber(value) {
494
- if (typeof value === "number" && !Number.isNaN(value)) return value;
495
- if (typeof value === "string") {
496
- const n = Number(value.replace(/,/g, ""));
497
- if (!Number.isNaN(n)) return n;
498
- }
499
- return 0;
500
- }
501
- function mapChartDataItems(config, dataSource) {
502
- const xKey = config.x;
503
- const yKey = config.y;
504
- const legendKey = config.colorLegend;
505
- const groupKey = config.groupBy;
506
- let rows = [...dataSource];
507
- const sortKey = config.sortBy;
508
- if (sortKey) {
509
- rows.sort((a, b) => {
510
- const av = a[sortKey];
511
- const bv = b[sortKey];
512
- if (typeof av === "number" && typeof bv === "number") return av - bv;
513
- return String(av ?? "").localeCompare(String(bv ?? ""), void 0, {
514
- numeric: true
515
- });
516
- });
517
- }
518
- return rows.map((row) => {
519
- const point = {
520
- x: row[xKey],
521
- y: toNumber(row[yKey])
522
- };
523
- if (legendKey) point.type = String(row[legendKey] ?? "");
524
- if (groupKey) point.category = String(row[groupKey] ?? "");
525
- return point;
526
- });
527
- }
528
- function buildChartJsData(config, payload) {
529
- const points = mapChartDataItems(config, payload.dataSource);
530
- const type = config.chartType;
531
- const isCartesian = !["pie", "donut"].includes(type);
532
- if (!isCartesian) {
533
- return {
534
- labels: points.map((p) => String(p.x)),
535
- datasets: [
536
- {
537
- label: config.title || config.y || "value",
538
- data: points.map((p) => p.y)
539
- }
540
- ],
541
- isCartesian: false
542
- };
543
- }
544
- const seriesKeys = /* @__PURE__ */ new Set();
545
- for (const p of points) {
546
- seriesKeys.add(p.type || config.title || config.y || "series");
547
- }
548
- const seriesList = [...seriesKeys];
549
- const labelSet = [];
550
- for (const p of points) {
551
- const lab = String(p.x);
552
- if (!labelSet.includes(lab)) labelSet.push(lab);
553
- }
554
- const datasets = seriesList.map((series) => ({
555
- label: series,
556
- data: labelSet.map((lab) => {
557
- const hit = points.find(
558
- (p) => String(p.x) === lab && (p.type || config.title || config.y || "series") === series
559
- );
560
- return hit ? hit.y : 0;
561
- })
562
- }));
563
- return { labels: labelSet, datasets, isCartesian: true };
564
- }
565
- const DEFAULT_PALETTE = [
566
- "#3b82f6",
567
- "#10b981",
568
- "#f59e0b",
569
- "#ef4444",
570
- "#8b5cf6",
571
- "#06b6d4",
572
- "#ec4899",
573
- "#84cc16"
574
- ];
575
- function readCssVar(el, name, fallback) {
576
- if (!el || typeof getComputedStyle === "undefined") return fallback;
577
- const v = getComputedStyle(el).getPropertyValue(name).trim();
578
- return v || fallback;
579
- }
580
- function resolveChartTheme(host, override) {
581
- const base = {
582
- backgroundColor: readCssVar(host, "--tmr-bg", "#ffffff"),
583
- textColor: readCssVar(host, "--tmr-fg", "#1f2937"),
584
- gridColor: readCssVar(host, "--tmr-border", "#e5e7eb"),
585
- borderColor: readCssVar(host, "--tmr-border", "#e5e7eb"),
586
- fontFamily: readCssVar(
587
- host,
588
- "--tmr-font",
589
- "ui-sans-serif, system-ui, sans-serif"
590
- ),
591
- palette: DEFAULT_PALETTE
592
- };
593
- if (!override) return base;
594
- return {
595
- backgroundColor: override.backgroundColor ?? base.backgroundColor,
596
- textColor: override.textColor ?? base.textColor,
597
- gridColor: override.gridColor ?? base.gridColor,
598
- borderColor: override.borderColor ?? base.borderColor,
599
- fontFamily: override.fontFamily ?? base.fontFamily,
600
- palette: override.palette && override.palette.length > 0 ? override.palette : base.palette
601
- };
602
- }
603
- let registered = false;
604
- function ensureRegister() {
605
- if (registered) return;
606
- if (typeof window === "undefined") return;
607
- Chart.register(
608
- CategoryScale,
609
- LinearScale,
610
- PointElement,
611
- LineElement,
612
- BarElement,
613
- ArcElement,
614
- LineController,
615
- BarController,
616
- PieController,
617
- DoughnutController,
618
- Filler,
619
- Legend,
620
- Tooltip
621
- );
622
- registered = true;
623
- }
624
- function toChartJsType(chartType) {
625
- switch (chartType) {
626
- case "bar":
627
- return "bar";
628
- case "column":
629
- return "bar";
630
- case "line":
631
- return "line";
632
- case "area":
633
- return "line";
634
- case "pie":
635
- return "pie";
636
- case "donut":
637
- return "doughnut";
638
- default:
639
- return "bar";
640
- }
641
- }
642
- function renderOrUpdateChart({
643
- canvas,
644
- config,
645
- payload,
646
- theme,
647
- chart
648
- }) {
649
- if (typeof window === "undefined") return null;
650
- ensureRegister();
651
- const host = canvas.parentElement;
652
- const colors = resolveChartTheme(host, theme);
653
- const built = buildChartJsData(config, payload);
654
- const jsType = toChartJsType(config.chartType);
655
- const isBarHorizontal = config.chartType === "bar";
656
- const isArea = config.chartType === "area";
657
- const datasets = built.datasets.map((ds, i) => {
658
- const color = colors.palette[i % colors.palette.length];
659
- if (!built.isCartesian) {
660
- return {
661
- ...ds,
662
- backgroundColor: built.labels.map(
663
- (_, j) => colors.palette[j % colors.palette.length]
664
- ),
665
- borderWidth: 0
666
- };
667
- }
668
- return {
669
- ...ds,
670
- backgroundColor: isArea ? `${color}33` : color,
671
- borderColor: color,
672
- borderWidth: 2,
673
- fill: isArea,
674
- tension: 0.25
675
- };
676
- });
677
- const configuration = {
678
- type: jsType,
679
- data: {
680
- labels: built.labels,
681
- datasets
682
- },
683
- options: {
684
- indexAxis: isBarHorizontal ? "y" : "x",
685
- responsive: true,
686
- maintainAspectRatio: false,
687
- plugins: {
688
- legend: {
689
- display: built.datasets.length > 1 || !built.isCartesian,
690
- labels: {
691
- color: colors.textColor,
692
- font: { family: colors.fontFamily }
693
- }
694
- },
695
- title: { display: false },
696
- tooltip: {
697
- titleFont: { family: colors.fontFamily },
698
- bodyFont: { family: colors.fontFamily }
699
- }
700
- },
701
- scales: built.isCartesian ? {
702
- x: {
703
- ticks: {
704
- color: colors.textColor,
705
- font: { family: colors.fontFamily }
706
- },
707
- grid: { color: colors.gridColor },
708
- border: { color: colors.borderColor }
709
- },
710
- y: {
711
- ticks: {
712
- color: colors.textColor,
713
- font: { family: colors.fontFamily }
714
- },
715
- grid: { color: colors.gridColor },
716
- border: { color: colors.borderColor }
717
- }
718
- } : void 0
719
- }
720
- };
721
- if (chart) {
722
- chart.config.type = jsType;
723
- chart.data.labels = configuration.data.labels;
724
- chart.data.datasets = configuration.data.datasets;
725
- chart.options = configuration.options;
726
- chart.update("none");
727
- return chart;
728
- }
729
- return new Chart(canvas, configuration);
730
- }
731
- function destroyChart(chart) {
732
- chart == null ? void 0 : chart.destroy();
733
- }
734
- const anchor = "_anchor_pn514_4";
735
- const nav = "_nav_pn514_17";
736
- const navOpen = "_navOpen_pn514_18";
737
- const list = "_list_pn514_60";
738
- const barButton = "_barButton_pn514_66";
739
- const bar = "_bar_pn514_66";
740
- const barActive = "_barActive_pn514_80";
741
- const item = "_item_pn514_91";
742
- const itemActive = "_itemActive_pn514_112";
743
- const itemText = "_itemText_pn514_119";
744
- const styles = {
745
- anchor,
746
- nav,
747
- navOpen,
748
- list,
749
- barButton,
750
- bar,
751
- barActive,
752
- item,
753
- itemActive,
754
- itemText
755
- };
756
- function easeOutCubic(t) {
757
- return 1 - (1 - t) * (1 - t) * (1 - t);
758
- }
759
- function scrollToTocHeading(headingId, scrollContainer, options) {
760
- const el = scrollContainer.querySelector(
761
- `[data-toc-id="${CSS.escape(headingId)}"]`
762
- );
763
- if (!el) return;
764
- const startTop = scrollContainer.scrollTop;
765
- const rootRect = scrollContainer.getBoundingClientRect();
766
- const elRect = el.getBoundingClientRect();
767
- const targetTop = startTop + (elRect.top - rootRect.top);
768
- if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
769
- scrollContainer.scrollTop = targetTop;
770
- return;
771
- }
772
- const duration = (options == null ? void 0 : options.duration) ?? 400;
773
- const start = performance.now();
774
- const animate = () => {
775
- const t = Math.min((performance.now() - start) / duration, 1);
776
- scrollContainer.scrollTop = startTop + (targetTop - startTop) * easeOutCubic(t);
777
- if (t < 1) requestAnimationFrame(animate);
778
- };
779
- requestAnimationFrame(animate);
780
- }
781
- function barWidth(level) {
782
- if (level <= 1) return 16;
783
- if (level === 2) return 12;
784
- if (level === 3) return 8;
785
- return 6;
786
- }
787
- function findScrollParent(start) {
788
- let node = start.parentElement;
789
- while (node && node !== document.documentElement) {
790
- const style = getComputedStyle(node);
791
- const overflowY = style.overflowY;
792
- const canScroll = overflowY === "auto" || overflowY === "scroll" || overflowY === "overlay";
793
- if (canScroll && (node.scrollHeight > node.clientHeight + 1 || style.maxHeight !== "none")) {
794
- return node;
795
- }
796
- node = node.parentElement;
797
- }
798
- return document.scrollingElement ?? document.documentElement;
799
- }
800
- function isViewportScroller(node) {
801
- return node === document.documentElement || node === document.body || node === document.scrollingElement;
802
- }
803
- function EditorToc({ items, editorDom, locale = "en" }) {
804
- var _a;
805
- const t = getLocaleBundle(locale).toc;
806
- const [open, setOpen] = useState(false);
807
- const [activeId, setActiveId] = useState(((_a = items[0]) == null ? void 0 : _a.id) ?? "");
808
- const [roving, setRoving] = useState(0);
809
- const navRef = useRef(null);
810
- const itemRefs = useRef([]);
811
- const hideTimer = useRef(null);
812
- const pinnedId = useRef(null);
813
- const pinScroll = useRef(null);
814
- const pinTimer = useRef(null);
815
- const clearHide = () => {
816
- if (hideTimer.current !== null) {
817
- window.clearTimeout(hideTimer.current);
818
- hideTimer.current = null;
819
- }
820
- };
821
- const show = () => {
822
- clearHide();
823
- setOpen(true);
824
- };
825
- const hideSoon = () => {
826
- clearHide();
827
- hideTimer.current = window.setTimeout(() => {
828
- var _a2;
829
- hideTimer.current = null;
830
- if ((_a2 = navRef.current) == null ? void 0 : _a2.contains(document.activeElement)) return;
831
- setOpen(false);
832
- }, 80);
833
- };
834
- useEffect(
835
- () => () => {
836
- clearHide();
837
- if (pinTimer.current !== null) window.clearTimeout(pinTimer.current);
838
- },
839
- []
840
- );
841
- useEffect(() => {
842
- const headings = items.map(
843
- (item2) => editorDom.querySelector(
844
- `[data-toc-id="${CSS.escape(item2.id)}"]`
845
- )
846
- ).filter((el) => el !== null);
847
- if (!headings.length) return;
848
- const scrollParent = findScrollParent(editorDom);
849
- const viewport = isViewportScroller(scrollParent);
850
- const visible = /* @__PURE__ */ new Set();
851
- const scrollPos = () => viewport ? window.scrollY : scrollParent.scrollTop;
852
- const apply = () => {
853
- var _a2;
854
- const pos = scrollPos();
855
- if (pinnedId.current) {
856
- const lockedAt = pinScroll.current;
857
- if (lockedAt === null || Math.abs(pos - lockedAt) <= 2) {
858
- setActiveId(pinnedId.current);
859
- return;
860
- }
861
- pinnedId.current = null;
862
- pinScroll.current = null;
863
- }
864
- const maxScroll = viewport ? Math.max(
865
- 0,
866
- (((_a2 = document.scrollingElement) == null ? void 0 : _a2.scrollHeight) ?? 0) - window.innerHeight
867
- ) : Math.max(0, scrollParent.scrollHeight - scrollParent.clientHeight);
868
- if (maxScroll > 1 && pos >= maxScroll - 2) {
869
- const rootBottom = viewport ? window.innerHeight : scrollParent.getBoundingClientRect().bottom;
870
- let lastInView = null;
871
- for (const heading of headings) {
872
- if (heading.getBoundingClientRect().top < rootBottom - 8) {
873
- lastInView = heading;
874
- }
875
- }
876
- const id2 = (lastInView ?? headings[headings.length - 1]).getAttribute(
877
- "data-toc-id"
878
- );
879
- if (id2) setActiveId(id2);
880
- return;
881
- }
882
- const rootTop = viewport ? 0 : scrollParent.getBoundingClientRect().top;
883
- let best = null;
884
- let bestTop = Infinity;
885
- for (const el of visible) {
886
- const top = el.getBoundingClientRect().top;
887
- if (top < bestTop) {
888
- bestTop = top;
889
- best = el;
890
- }
891
- }
892
- if (!best) {
893
- let last = null;
894
- for (const heading of headings) {
895
- if (heading.getBoundingClientRect().top <= rootTop + 12) last = heading;
896
- }
897
- best = last ?? headings[0];
898
- }
899
- const id = best.getAttribute("data-toc-id");
900
- if (id) setActiveId(id);
901
- };
902
- const observer = new IntersectionObserver(
903
- (entries) => {
904
- for (const entry of entries) {
905
- if (entry.isIntersecting) visible.add(entry.target);
906
- else visible.delete(entry.target);
907
- }
908
- apply();
909
- },
910
- {
911
- root: viewport ? null : scrollParent,
912
- rootMargin: "0px 0px -60% 0px",
913
- threshold: [0, 1]
914
- }
915
- );
916
- for (const heading of headings) observer.observe(heading);
917
- const onScroll = () => apply();
918
- const scrollTarget = viewport ? window : scrollParent;
919
- scrollTarget.addEventListener("scroll", onScroll, { passive: true });
920
- apply();
921
- return () => {
922
- observer.disconnect();
923
- scrollTarget.removeEventListener("scroll", onScroll);
924
- };
925
- }, [items, editorDom]);
926
- useEffect(() => {
927
- var _a2;
928
- if ((_a2 = navRef.current) == null ? void 0 : _a2.contains(document.activeElement)) return;
929
- const index = items.findIndex((item2) => item2.id === activeId);
930
- if (index >= 0) setRoving(index);
931
- }, [activeId, items]);
932
- useEffect(() => {
933
- var _a2, _b;
934
- if (!open || !activeId) return;
935
- const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
936
- (_b = (_a2 = navRef.current) == null ? void 0 : _a2.querySelector(`[data-toc-item="${CSS.escape(activeId)}"]`)) == null ? void 0 : _b.scrollIntoView({ block: "nearest", behavior: reduce ? "auto" : "smooth" });
937
- }, [activeId, open]);
938
- const jump = (item2) => {
939
- const scroller = findScrollParent(editorDom);
940
- pinnedId.current = item2.id;
941
- pinScroll.current = null;
942
- setActiveId(item2.id);
943
- scrollToTocHeading(item2.id, scroller);
944
- if (pinTimer.current !== null) window.clearTimeout(pinTimer.current);
945
- pinTimer.current = window.setTimeout(() => {
946
- pinTimer.current = null;
947
- if (pinnedId.current !== item2.id) return;
948
- pinScroll.current = isViewportScroller(scroller) ? window.scrollY : scroller.scrollTop;
949
- }, 480);
950
- };
951
- const move = (delta) => {
952
- var _a2;
953
- const next = Math.min(items.length - 1, Math.max(0, roving + delta));
954
- setRoving(next);
955
- setOpen(true);
956
- (_a2 = itemRefs.current[next]) == null ? void 0 : _a2.focus();
957
- };
958
- return /* @__PURE__ */ jsx("div", { className: styles.anchor, children: /* @__PURE__ */ jsx(
959
- "nav",
960
- {
961
- ref: navRef,
962
- className: open ? styles.navOpen : styles.nav,
963
- "aria-label": t.title,
964
- "data-editor-toc": "",
965
- onMouseEnter: show,
966
- onMouseLeave: hideSoon,
967
- onFocus: show,
968
- onBlur: (event) => {
969
- if (!event.currentTarget.contains(event.relatedTarget)) hideSoon();
970
- },
971
- onKeyDown: (event) => {
972
- if (event.key === "ArrowDown") {
973
- event.preventDefault();
974
- move(1);
975
- } else if (event.key === "ArrowUp") {
976
- event.preventDefault();
977
- move(-1);
978
- } else if (event.key === "Escape") {
979
- setOpen(false);
980
- }
981
- },
982
- children: /* @__PURE__ */ jsx("ul", { className: styles.list, children: items.map((item2, index) => {
983
- const active = item2.id === activeId;
984
- return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
985
- "button",
986
- {
987
- type: "button",
988
- ref: (node) => {
989
- itemRefs.current[index] = node;
990
- },
991
- "data-toc-item": item2.id,
992
- tabIndex: index === roving ? 0 : -1,
993
- className: open ? `${styles.item} ${active ? styles.itemActive : ""}` : styles.barButton,
994
- style: open ? { paddingLeft: `${(item2.level - 1) * 12 + 10}px` } : void 0,
995
- "aria-current": active ? "true" : void 0,
996
- "aria-label": item2.text,
997
- onClick: () => jump(item2),
998
- children: open ? /* @__PURE__ */ jsx("span", { className: styles.itemText, children: item2.text }) : /* @__PURE__ */ jsx(
999
- "span",
1000
- {
1001
- className: active ? styles.barActive : styles.bar,
1002
- style: { width: barWidth(item2.level) }
1003
- }
1004
- )
1005
- }
1006
- ) }, item2.id);
1007
- }) })
1008
- }
1009
- ) });
1010
- }
1011
- function useIsMobile(breakpoint = 768) {
1012
- const [isMobile, setIsMobile] = useState(false);
1013
- useEffect(() => {
1014
- const mq = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
1015
- const update = () => setIsMobile(mq.matches);
1016
- update();
1017
- mq.addEventListener("change", update);
1018
- return () => mq.removeEventListener("change", update);
1019
- }, [breakpoint]);
1020
- return isMobile;
1021
- }
1022
- const HEADING_TAG = /^H([1-6])$/;
1023
- function sameTocItems(a, b) {
1024
- if (a.length !== b.length) return false;
1025
- return a.every(
1026
- (item2, index) => {
1027
- var _a, _b, _c;
1028
- return item2.id === ((_a = b[index]) == null ? void 0 : _a.id) && item2.level === ((_b = b[index]) == null ? void 0 : _b.level) && item2.text === ((_c = b[index]) == null ? void 0 : _c.text);
1029
- }
1030
- );
1031
- }
1032
- function readTocItems(root) {
1033
- const nodes = root.querySelectorAll("[data-toc-id]");
1034
- const items = [];
1035
- nodes.forEach((el) => {
1036
- const id = el.getAttribute("data-toc-id");
1037
- const match = HEADING_TAG.exec(el.tagName);
1038
- if (!id || !match) return;
1039
- const text = (el.textContent ?? "").replace(/\s+/g, " ").trim();
1040
- if (!text) return;
1041
- items.push({ id, level: Number(match[1]), text });
1042
- });
1043
- return items;
1044
- }
1045
- function findCitationRefElement(target, root) {
1046
- let node = null;
1047
- if (target instanceof Element) node = target;
1048
- else if (target instanceof Text) node = target.parentElement;
1049
- else if (target instanceof Node) node = target.parentElement;
1050
- if (!(node instanceof Element)) return null;
1051
- const el = node.closest(".citation-ref");
1052
- if (!(el instanceof HTMLElement)) return null;
1053
- if (!root.contains(el)) return null;
1054
- return el;
1055
- }
1056
- function readCitationAttrs(el) {
1057
- var _a;
1058
- return {
1059
- index: el.getAttribute("data-index") || ((_a = el.textContent) == null ? void 0 : _a.trim()) || "",
1060
- url: el.getAttribute("data-url"),
1061
- title: el.getAttribute("data-title")
1062
- };
1063
- }
1064
- function CitationInteractive({
1065
- containerRef,
1066
- onCitationEnter,
1067
- onCitationLeave
1068
- }) {
1069
- const enterRef = useRef(onCitationEnter);
1070
- const leaveRef = useRef(onCitationLeave);
1071
- enterRef.current = onCitationEnter;
1072
- leaveRef.current = onCitationLeave;
1073
- useEffect(() => {
1074
- const root = containerRef.current;
1075
- if (!root) return;
1076
- let currentEl = null;
1077
- const emitEnter = (el) => {
1078
- currentEl = el;
1079
- const attrs = readCitationAttrs(el);
1080
- enterRef.current({ index: attrs.index, attrs, anchorEl: el });
1081
- };
1082
- const emitLeave = () => {
1083
- if (!currentEl) return;
1084
- currentEl = null;
1085
- leaveRef.current();
1086
- };
1087
- const ACTIVE_ATTR = "data-tmr-citation-active";
1088
- const onClick = (e) => {
1089
- const el = findCitationRefElement(e.target, root);
1090
- if (el) {
1091
- e.preventDefault();
1092
- e.stopPropagation();
1093
- if (el === currentEl && el.hasAttribute(ACTIVE_ATTR)) {
1094
- emitLeave();
1095
- return;
1096
- }
1097
- emitEnter(el);
1098
- return;
1099
- }
1100
- emitLeave();
1101
- };
1102
- const onKeyDown = (e) => {
1103
- if (e.key === "Escape") emitLeave();
1104
- };
1105
- root.addEventListener("click", onClick, true);
1106
- document.addEventListener("keydown", onKeyDown);
1107
- return () => {
1108
- root.removeEventListener("click", onClick, true);
1109
- document.removeEventListener("keydown", onKeyDown);
1110
- };
1111
- }, [containerRef]);
1112
- return null;
1113
- }
1114
- function ContentOutline({
1115
- toc = false,
1116
- locale = "en",
1117
- watch,
1118
- children
1119
- }) {
1120
- const ref = useRef(null);
1121
- const [items, setItems] = useState([]);
1122
- const mobile = useIsMobile(768);
1123
- useLayoutEffect(() => {
1124
- const el = ref.current;
1125
- if (!el || !toc) {
1126
- setItems((prev) => prev.length === 0 ? prev : []);
1127
- return;
1128
- }
1129
- const read = () => {
1130
- const next = readTocItems(el);
1131
- setItems((prev) => sameTocItems(prev, next) ? prev : next);
1132
- };
1133
- read();
1134
- const observer = new MutationObserver(read);
1135
- observer.observe(el, {
1136
- childList: true,
1137
- subtree: true,
1138
- characterData: true
1139
- });
1140
- return () => observer.disconnect();
1141
- }, [toc, watch]);
1142
- const root = ref.current;
1143
- const show = toc && !mobile && items.length > 0 && root !== null;
1144
- return /* @__PURE__ */ jsxs("div", { className: styles$1.editorHost, children: [
1145
- show && root ? /* @__PURE__ */ jsx(EditorToc, { items, editorDom: root, locale }) : null,
1146
- /* @__PURE__ */ jsx("div", { ref, className: show ? styles$1.withToc : void 0, children })
1147
- ] });
1148
- }
1149
- function ReaderReportContent({
1150
- html,
1151
- className,
1152
- toc = false,
1153
- locale = "en",
1154
- ...rest
1155
- }) {
1156
- return /* @__PURE__ */ jsx(ContentOutline, { toc, locale, watch: html, children: /* @__PURE__ */ jsx(ReportContent, { html, className, ...rest }) });
1157
- }
1158
- function ReportContentInteractive({
1159
- onCitationEnter,
1160
- onCitationLeave,
1161
- className,
1162
- html,
1163
- toc = false,
1164
- locale = "en",
1165
- ...rest
1166
- }) {
1167
- const ref = useRef(null);
1168
- return /* @__PURE__ */ jsxs("div", { ref, className, children: [
1169
- /* @__PURE__ */ jsx(ReaderReportContent, { html, toc, locale, ...rest }),
1170
- /* @__PURE__ */ jsx(
1171
- CitationInteractive,
1172
- {
1173
- containerRef: ref,
1174
- onCitationEnter,
1175
- onCitationLeave
1176
- }
1177
- )
1178
- ] });
1179
- }
1180
- function hydrateOne(el, theme, registry) {
1181
- const raw = el.getAttribute("data-chart");
1182
- const payload = parseChartFenceBody(raw ?? "");
1183
- if (!(payload == null ? void 0 : payload.config.length)) return;
1184
- let host = el.querySelector(".tmr-chart-canvas-host");
1185
- if (!host) {
1186
- host = document.createElement("div");
1187
- host.className = "tmr-chart-canvas-host";
1188
- el.appendChild(host);
1189
- }
1190
- host.classList.remove("tmr-chart-skeleton");
1191
- let canvas = host.querySelector("canvas");
1192
- if (!canvas) {
1193
- canvas = document.createElement("canvas");
1194
- host.innerHTML = "";
1195
- host.appendChild(canvas);
1196
- }
1197
- const config = payload.config[0];
1198
- const height = config.height ?? 320;
1199
- host.style.height = `${height}px`;
1200
- if (payload.config.length > 1 && !el.querySelector(".tmr-chart-tabs")) {
1201
- const tabs = document.createElement("div");
1202
- tabs.className = "tmr-chart-tabs";
1203
- tabs.setAttribute("role", "tablist");
1204
- payload.config.forEach((c, i) => {
1205
- var _a;
1206
- const btn = document.createElement("button");
1207
- btn.type = "button";
1208
- btn.className = "tmr-chart-tab";
1209
- btn.setAttribute("role", "tab");
1210
- btn.dataset.active = i === 0 ? "true" : "false";
1211
- btn.textContent = ((_a = c.title) == null ? void 0 : _a.trim()) || `${c.chartType} ${i + 1}`;
1212
- btn.addEventListener("click", () => {
1213
- tabs.querySelectorAll(".tmr-chart-tab").forEach((b, j) => {
1214
- b.dataset.active = j === i ? "true" : "false";
1215
- });
1216
- const existing2 = registry.get(el);
1217
- destroyChart(existing2);
1218
- const next = renderOrUpdateChart({
1219
- canvas,
1220
- config: payload.config[i],
1221
- payload,
1222
- theme,
1223
- chart: null
1224
- });
1225
- if (next) registry.set(el, next);
1226
- const titleEl = el.querySelector(".tmr-chart-title");
1227
- if (titleEl && payload.config[i].title) {
1228
- titleEl.textContent = String(payload.config[i].title);
1229
- titleEl.classList.remove("tmr-chart-title--empty");
1230
- }
1231
- });
1232
- tabs.appendChild(btn);
1233
- });
1234
- el.insertBefore(tabs, host);
1235
- }
1236
- const existing = registry.get(el);
1237
- const chart = renderOrUpdateChart({
1238
- canvas,
1239
- config,
1240
- payload,
1241
- theme,
1242
- chart: existing ?? null
1243
- });
1244
- if (chart) registry.set(el, chart);
1245
- }
1246
- function ChartMount({
1247
- containerRef,
1248
- chartTheme,
1249
- html
1250
- }) {
1251
- const registryRef = useRef(/* @__PURE__ */ new Map());
1252
- useEffect(() => {
1253
- const container = containerRef.current;
1254
- if (!container) return;
1255
- const registry = registryRef.current;
1256
- registry.forEach((chart) => destroyChart(chart));
1257
- registry.clear();
1258
- container.querySelectorAll('div[data-type="chart"]').forEach((el) => hydrateOne(el, chartTheme, registry));
1259
- return () => {
1260
- registry.forEach((chart) => destroyChart(chart));
1261
- registry.clear();
1262
- };
1263
- }, [containerRef, chartTheme, html]);
1264
- return null;
1265
- }
1266
- function mountChartsInContainer(container, chartTheme) {
1267
- const registry = /* @__PURE__ */ new Map();
1268
- container.querySelectorAll('div[data-type="chart"]').forEach((el) => hydrateOne(el, chartTheme, registry));
1269
- return () => {
1270
- registry.forEach((c) => destroyChart(c));
1271
- registry.clear();
1272
- };
1273
- }
1274
- function ReportContentWithCharts({
1275
- onCitationEnter,
1276
- onCitationLeave,
1277
- chartTheme,
1278
- className,
1279
- html,
1280
- toc = false,
1281
- locale = "en",
1282
- ...rest
1283
- }) {
1284
- const ref = useRef(null);
1285
- return /* @__PURE__ */ jsxs("div", { ref, className, children: [
1286
- /* @__PURE__ */ jsx(ReaderReportContent, { html, toc, locale, ...rest }),
1287
- /* @__PURE__ */ jsx(
1288
- ChartMount,
1289
- {
1290
- containerRef: ref,
1291
- chartTheme,
1292
- html
1293
- }
1294
- ),
1295
- onCitationEnter && onCitationLeave ? /* @__PURE__ */ jsx(
1296
- CitationInteractive,
1297
- {
1298
- containerRef: ref,
1299
- onCitationEnter,
1300
- onCitationLeave
1301
- }
1302
- ) : null
1303
- ] });
1304
- }
1305
- export {
1306
- ChartMount as C,
1307
- EditorToc as E,
1308
- ReaderReportContent as R,
1309
- CitationInteractive as a,
1310
- ReportContentInteractive as b,
1311
- ReportContentWithCharts as c,
1312
- renderOrUpdateChart as d,
1313
- destroyChart as e,
1314
- findCitationRefElement as f,
1315
- getLocaleBundle as g,
1316
- sameTocItems as h,
1317
- mountChartsInContainer as m,
1318
- readCitationAttrs as r,
1319
- scrollToTocHeading as s,
1320
- useIsMobile as u
1321
- };
1322
- //# sourceMappingURL=ReportContentWithCharts-DHdD1BaH.js.map