@omg-dev/app 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{ChangelogPage-8lbvM9Pz.js → ChangelogPage-Cjj_DiYL.js} +57 -1
- package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
- package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
- package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
- package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
- package/dist-lib/{SessionFilesPanel-BKcTU57t.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
- package/dist-lib/{TermView-gazV6UMU.js → TermView-B4V-DyD-.js} +521 -530
- package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
- package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
- package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
- package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
- package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
- package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
- package/dist-lib/{chat-engine-83mwx0z2.js → chat-engine-CUiDTHFP.js} +1173 -1218
- package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
- package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
- package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
- package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
- package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
- package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
- package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
- package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
- package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
- package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
- package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
- package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
- package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
- package/dist-lib/{coding-agents-page-8Nf-IuE2.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
- package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
- package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
- package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
- package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
- package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
- package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
- package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
- package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
- package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
- package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
- package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
- package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
- package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
- package/dist-lib/{embedded-BmrQsEvQ.js → embedded-PUsgcSTE.js} +13043 -13082
- package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
- package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
- package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
- package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
- package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
- package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
- package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
- package/dist-lib/index-B0neMIbR.js +16520 -0
- package/dist-lib/index-BBC0E3Qg.js +4994 -0
- package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
- package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
- package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
- package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
- package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
- package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
- package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
- package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
- package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
- package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
- package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
- package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
- package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
- package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
- package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
- package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
- package/dist-lib/{resume-session-sheet-Dr_81Gfm.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
- package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
- package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
- package/dist-lib/{session-token-usage-CGhHZ3lT.js → session-token-usage-DY4vFlfs.js} +82 -83
- package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
- package/dist-lib/{shipped-page-p3oulUiM.js → shipped-page-B-ruG8li.js} +233 -236
- package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
- package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
- package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
- package/dist-lib/{streamdown-response-Dbn0PKUH.js → streamdown-response-BQy3geXs.js} +290 -297
- package/dist-lib/styles.css +1 -1
- package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
- package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
- package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
- package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
- package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
- package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
- package/package.json +4 -3
- package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
- package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
- package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
- package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
- package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
- package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
- package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
- package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
- package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
- package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
- package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
- package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
- package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
- package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
- package/dist-lib/index-DcwavxA1.js +0 -5062
- package/dist-lib/index-JkCQXUYs.js +0 -16566
- package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
- package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
- package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
- package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
- package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
- package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
- package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
- package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
- package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
- package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { b as Ke, c as et, a as tt, d as nt } from "./engine-compile-BeDRSL6Y.js";
|
|
8
|
-
import { cn as we } from "cnfast";
|
|
9
|
-
import { a8 as rt, x as it, a9 as ot } from "./embedded-BmrQsEvQ.js";
|
|
1
|
+
import { jsx as B, jsxs as ae } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as We, useState as Ce, useEffect as xe, useRef as Ve } from "react";
|
|
3
|
+
import { B as Ue, C as T, m as He, E as be, F as G, G as Qe, Q as Je } from "./chunk-BO2N2NFS-BbJdm-59.js";
|
|
4
|
+
import { b as Xe, c as Ye, a as Ze, d as Ke } from "./engine-compile-D_stzVMa.js";
|
|
5
|
+
import { cn as je } from "cnfast";
|
|
6
|
+
import { a9 as et, x as tt, aa as nt } from "./embedded-PUsgcSTE.js";
|
|
10
7
|
const d = (
|
|
11
8
|
/** @type {const} */
|
|
12
9
|
{
|
|
@@ -51,7 +48,7 @@ const d = (
|
|
|
51
48
|
// Includes text.
|
|
52
49
|
strongText: "strongText"
|
|
53
50
|
}
|
|
54
|
-
),
|
|
51
|
+
), rt = 161, it = 1114109, ot = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109], st = 12288, ut = 65510, at = [12288, 12288, 65281, 65376, 65504, 65510], ct = 8361, lt = 65518, ft = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518], dt = 32, pt = 10630, ht = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630], gt = 4352, mt = 262141, we = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141], N = (e, t) => {
|
|
55
52
|
let n = 0, r = Math.floor(e.length / 2) - 1;
|
|
56
53
|
for (; n <= r; ) {
|
|
57
54
|
const o = Math.floor((n + r) / 2), i = o * 2;
|
|
@@ -63,55 +60,55 @@ const d = (
|
|
|
63
60
|
return !0;
|
|
64
61
|
}
|
|
65
62
|
return !1;
|
|
66
|
-
},
|
|
67
|
-
function
|
|
63
|
+
}, ce = 19968, [kt, yt] = /* @__PURE__ */ St(we);
|
|
64
|
+
function St(e) {
|
|
68
65
|
let t = e[0], n = e[1];
|
|
69
66
|
for (let r = 0; r < e.length; r += 2) {
|
|
70
67
|
const o = e[r], i = e[r + 1];
|
|
71
|
-
if (
|
|
68
|
+
if (ce >= o && ce <= i)
|
|
72
69
|
return [o, i];
|
|
73
70
|
i - o > n - t && (t = o, n = i);
|
|
74
71
|
}
|
|
75
72
|
return [t, n];
|
|
76
73
|
}
|
|
77
|
-
const
|
|
78
|
-
function
|
|
79
|
-
return
|
|
74
|
+
const Ct = (e) => e < rt || e > it ? !1 : N(ot, e), xt = (e) => e < st || e > ut ? !1 : N(at, e), bt = (e) => e < ct || e > lt ? !1 : N(ft, e), jt = (e) => e < dt || e > pt ? !1 : N(ht, e), wt = (e) => e >= kt && e <= yt ? !0 : e < gt || e > mt ? !1 : N(we, e);
|
|
75
|
+
function Pt(e) {
|
|
76
|
+
return Ct(e) ? "ambiguous" : xt(e) ? "fullwidth" : bt(e) ? "halfwidth" : jt(e) ? "narrow" : wt(e) ? "wide" : "neutral";
|
|
80
77
|
}
|
|
81
|
-
function
|
|
78
|
+
function At(e) {
|
|
82
79
|
if (!Number.isSafeInteger(e))
|
|
83
80
|
throw new TypeError(`Expected a code point, got \`${typeof e}\`.`);
|
|
84
81
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
82
|
+
function $t(e) {
|
|
83
|
+
return At(e), Pt(e);
|
|
87
84
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
85
|
+
function Bt(e) {
|
|
86
|
+
return /^\p{Emoji_Presentation}/u.test(String.fromCodePoint(e));
|
|
90
87
|
}
|
|
91
|
-
function
|
|
88
|
+
function vt(e) {
|
|
92
89
|
if (!e || e < 4352) return !1;
|
|
93
|
-
switch (
|
|
90
|
+
switch ($t(e)) {
|
|
94
91
|
case "fullwidth":
|
|
95
92
|
case "halfwidth":
|
|
96
93
|
return !0;
|
|
97
94
|
case "wide":
|
|
98
|
-
return !
|
|
95
|
+
return !Bt(e);
|
|
99
96
|
case "narrow":
|
|
100
97
|
return !1;
|
|
101
98
|
case "ambiguous":
|
|
102
99
|
return 917760 <= e && e <= 917999 ? null : !1;
|
|
103
100
|
case "neutral":
|
|
104
|
-
return
|
|
101
|
+
return /^\p{sc=Hangul}/u.test(String.fromCodePoint(e));
|
|
105
102
|
}
|
|
106
103
|
}
|
|
107
|
-
function
|
|
104
|
+
function Ft(e, t) {
|
|
108
105
|
return t !== 65025 || !e || e < 8216 ? !1 : e === 8216 || e === 8217 || e === 8220 || e === 8221;
|
|
109
106
|
}
|
|
110
|
-
function
|
|
107
|
+
function Tt(e) {
|
|
111
108
|
return e !== null && e >= 65024 && e <= 65038;
|
|
112
109
|
}
|
|
113
|
-
const
|
|
114
|
-
function
|
|
110
|
+
const Et = Pe(/\p{P}|\p{S}/u), It = Pe(/\s/);
|
|
111
|
+
function Pe(e) {
|
|
115
112
|
return t;
|
|
116
113
|
function t(n) {
|
|
117
114
|
return n !== null && n > -1 && e.test(String.fromCodePoint(n));
|
|
@@ -126,7 +123,7 @@ function b(e) {
|
|
|
126
123
|
function I(e) {
|
|
127
124
|
return !!(e & S.cjk);
|
|
128
125
|
}
|
|
129
|
-
function
|
|
126
|
+
function Nt(e) {
|
|
130
127
|
return e === S.ivs;
|
|
131
128
|
}
|
|
132
129
|
function P(e) {
|
|
@@ -143,11 +140,11 @@ let S;
|
|
|
143
140
|
e.spaceOrPunctuation = 3, e.cjk = 4096, e.cjkPunctuation = 4098, e.ivs = 8192, e.cjkOrIvs = 12288, e.nonEmojiGeneralUseVS = 16384, e.variationSelector = 24576, e.ivsToCjkRightShift = 1;
|
|
144
141
|
})(S || (S = {}));
|
|
145
142
|
function k(e) {
|
|
146
|
-
if (e === d.eof ||
|
|
143
|
+
if (e === d.eof || Ue(e) || It(e)) return v.characterGroupWhitespace;
|
|
147
144
|
let t = 0;
|
|
148
145
|
if (e >= 4352) {
|
|
149
|
-
if (
|
|
150
|
-
switch (
|
|
146
|
+
if (Tt(e)) return S.nonEmojiGeneralUseVS;
|
|
147
|
+
switch (vt(e)) {
|
|
151
148
|
case null:
|
|
152
149
|
return S.ivs;
|
|
153
150
|
case !0:
|
|
@@ -155,23 +152,23 @@ function k(e) {
|
|
|
155
152
|
break;
|
|
156
153
|
}
|
|
157
154
|
}
|
|
158
|
-
return
|
|
155
|
+
return Et(e) && (t |= v.characterGroupPunctuation), t;
|
|
159
156
|
}
|
|
160
157
|
function V(e, t, n) {
|
|
161
158
|
if (!O(e)) return e;
|
|
162
159
|
const r = t(), o = k(r);
|
|
163
|
-
return !r || g(o) ? e :
|
|
160
|
+
return !r || g(o) ? e : Ft(r, n) ? S.cjkPunctuation : Ot(o);
|
|
164
161
|
}
|
|
165
|
-
function
|
|
162
|
+
function Ot(e) {
|
|
166
163
|
return e & ~S.ivs;
|
|
167
164
|
}
|
|
168
|
-
function
|
|
165
|
+
function Ae(e) {
|
|
169
166
|
return !!(e && e >= 55296 && e <= 56319);
|
|
170
167
|
}
|
|
171
|
-
function
|
|
168
|
+
function $e(e) {
|
|
172
169
|
return !!(e && e >= 56320 && e <= 57343);
|
|
173
170
|
}
|
|
174
|
-
function
|
|
171
|
+
function Be(e, t, n) {
|
|
175
172
|
if (t._bufferIndex < 2) return e;
|
|
176
173
|
const r = n({
|
|
177
174
|
start: {
|
|
@@ -182,7 +179,7 @@ function ve(e, t, n) {
|
|
|
182
179
|
}).codePointAt(0);
|
|
183
180
|
return r && r >= 65536 ? r : e;
|
|
184
181
|
}
|
|
185
|
-
function
|
|
182
|
+
function qt(e, t, n) {
|
|
186
183
|
const r = e >= 65536 ? 2 : 1;
|
|
187
184
|
if (t._bufferIndex < 1 + r) return null;
|
|
188
185
|
const o = t._bufferIndex - r - 2, i = n({
|
|
@@ -194,13 +191,14 @@ function Gt(e, t, n) {
|
|
|
194
191
|
...t,
|
|
195
192
|
_bufferIndex: t._bufferIndex - r
|
|
196
193
|
}
|
|
197
|
-
}),
|
|
198
|
-
if (Number.isNaN(
|
|
199
|
-
if (i.length < 2 ||
|
|
200
|
-
const
|
|
201
|
-
return
|
|
202
|
-
}
|
|
203
|
-
var
|
|
194
|
+
}), s = i.charCodeAt(i.length - 1);
|
|
195
|
+
if (Number.isNaN(s)) return null;
|
|
196
|
+
if (i.length < 2 || s < 56320 || 57343 < s) return s;
|
|
197
|
+
const u = i.codePointAt(0);
|
|
198
|
+
return u && u >= 65536 ? u : s;
|
|
199
|
+
}
|
|
200
|
+
var ve = class {
|
|
201
|
+
cachedValue = void 0;
|
|
204
202
|
/**
|
|
205
203
|
* @see {@link tryGetCodeTwoBefore}
|
|
206
204
|
*
|
|
@@ -209,7 +207,6 @@ var Fe = class {
|
|
|
209
207
|
* @param sliceSerialize `this.sliceSerialize` (`this` = `TokenizeContext`)
|
|
210
208
|
*/
|
|
211
209
|
constructor(e, t, n) {
|
|
212
|
-
ae(this, "cachedValue");
|
|
213
210
|
this.previousCode = e, this.nowPoint = t, this.sliceSerialize = n;
|
|
214
211
|
}
|
|
215
212
|
/**
|
|
@@ -222,10 +219,10 @@ var Fe = class {
|
|
|
222
219
|
* @returns a value greater than 65,535 if the code point two positions before represents a [Supplementary Character](https://www.unicode.org/glossary/#supplementary_character), a value less than 65,536 for a [BMP Character](https://www.unicode.org/glossary/#bmp_character), or `null` if not found
|
|
223
220
|
*/
|
|
224
221
|
value() {
|
|
225
|
-
return this.cachedValue === void 0 && (this.cachedValue =
|
|
222
|
+
return this.cachedValue === void 0 && (this.cachedValue = qt(this.previousCode, this.nowPoint, this.sliceSerialize)), this.cachedValue;
|
|
226
223
|
}
|
|
227
224
|
};
|
|
228
|
-
function
|
|
225
|
+
function Fe(e, t, n) {
|
|
229
226
|
const r = n({
|
|
230
227
|
start: t,
|
|
231
228
|
end: {
|
|
@@ -237,21 +234,21 @@ function Te(e, t, n) {
|
|
|
237
234
|
}
|
|
238
235
|
const U = {
|
|
239
236
|
name: "attention",
|
|
240
|
-
resolveAll:
|
|
241
|
-
tokenize:
|
|
237
|
+
resolveAll: _t,
|
|
238
|
+
tokenize: Mt
|
|
242
239
|
};
|
|
243
|
-
function
|
|
244
|
-
let n = -1, r, o, i,
|
|
240
|
+
function _t(e, t) {
|
|
241
|
+
let n = -1, r, o, i, s, u, a, c, l;
|
|
245
242
|
for (; ++n < e.length; ) if (e[n][0] === "enter" && e[n][1].type === "attentionSequence" && e[n][1]._close) {
|
|
246
243
|
for (r = n; r--; ) if (e[r][0] === "exit" && e[r][1].type === "attentionSequence" && e[r][1]._open && t.sliceSerialize(e[r][1]).charCodeAt(0) === t.sliceSerialize(e[n][1]).charCodeAt(0)) {
|
|
247
244
|
if ((e[r][1]._close || e[n][1]._open) && (e[n][1].end.offset - e[n][1].start.offset) % 3 && !((e[r][1].end.offset - e[r][1].start.offset + e[n][1].end.offset - e[n][1].start.offset) % 3)) continue;
|
|
248
245
|
a = e[r][1].end.offset - e[r][1].start.offset > 1 && e[n][1].end.offset - e[n][1].start.offset > 1 ? 2 : 1;
|
|
249
246
|
const f = { ...e[r][1].end }, p = { ...e[n][1].start };
|
|
250
|
-
|
|
247
|
+
le(f, -a), le(p, a), s = {
|
|
251
248
|
type: a > 1 ? x.strongSequence : x.emphasisSequence,
|
|
252
249
|
start: f,
|
|
253
250
|
end: { ...e[r][1].end }
|
|
254
|
-
},
|
|
251
|
+
}, u = {
|
|
255
252
|
type: a > 1 ? x.strongSequence : x.emphasisSequence,
|
|
256
253
|
start: { ...e[n][1].start },
|
|
257
254
|
end: p
|
|
@@ -261,9 +258,9 @@ function Lt(e, t) {
|
|
|
261
258
|
end: { ...e[n][1].start }
|
|
262
259
|
}, o = {
|
|
263
260
|
type: a > 1 ? x.strong : x.emphasis,
|
|
264
|
-
start: { ...
|
|
265
|
-
end: { ...
|
|
266
|
-
}, e[r][1].end = { ...
|
|
261
|
+
start: { ...s.start },
|
|
262
|
+
end: { ...u.end }
|
|
263
|
+
}, e[r][1].end = { ...s.start }, e[n][1].start = { ...u.end }, c = [], e[r][1].end.offset - e[r][1].start.offset && (c = T(c, [[
|
|
267
264
|
"enter",
|
|
268
265
|
e[r][1],
|
|
269
266
|
t
|
|
@@ -279,12 +276,12 @@ function Lt(e, t) {
|
|
|
279
276
|
],
|
|
280
277
|
[
|
|
281
278
|
"enter",
|
|
282
|
-
|
|
279
|
+
s,
|
|
283
280
|
t
|
|
284
281
|
],
|
|
285
282
|
[
|
|
286
283
|
"exit",
|
|
287
|
-
|
|
284
|
+
s,
|
|
288
285
|
t
|
|
289
286
|
],
|
|
290
287
|
[
|
|
@@ -292,7 +289,7 @@ function Lt(e, t) {
|
|
|
292
289
|
i,
|
|
293
290
|
t
|
|
294
291
|
]
|
|
295
|
-
]),
|
|
292
|
+
]), He(t.parser.constructs.insideSpan.null), c = T(c, be(t.parser.constructs.insideSpan.null, e.slice(r + 1, n), t)), c = T(c, [
|
|
296
293
|
[
|
|
297
294
|
"exit",
|
|
298
295
|
i,
|
|
@@ -300,12 +297,12 @@ function Lt(e, t) {
|
|
|
300
297
|
],
|
|
301
298
|
[
|
|
302
299
|
"enter",
|
|
303
|
-
|
|
300
|
+
u,
|
|
304
301
|
t
|
|
305
302
|
],
|
|
306
303
|
[
|
|
307
304
|
"exit",
|
|
308
|
-
|
|
305
|
+
u,
|
|
309
306
|
t
|
|
310
307
|
],
|
|
311
308
|
[
|
|
@@ -328,8 +325,8 @@ function Lt(e, t) {
|
|
|
328
325
|
for (n = -1; ++n < e.length; ) e[n][1].type === "attentionSequence" && (e[n][1].type = "data");
|
|
329
326
|
return e;
|
|
330
327
|
}
|
|
331
|
-
function
|
|
332
|
-
const n = this.parser.constructs.attentionMarkers.null, { now: r, sliceSerialize: o, previous: i } = this,
|
|
328
|
+
function Mt(e, t) {
|
|
329
|
+
const n = this.parser.constructs.attentionMarkers.null, { now: r, sliceSerialize: o, previous: i } = this, s = $e(i) ? Be(i, r(), o) : i, u = k(s), a = new ve(s, r(), o), c = V(u, a.value.bind(a), s);
|
|
333
330
|
let l;
|
|
334
331
|
return f;
|
|
335
332
|
function f(h) {
|
|
@@ -338,14 +335,14 @@ function Rt(e, t) {
|
|
|
338
335
|
function p(h) {
|
|
339
336
|
if (h === l)
|
|
340
337
|
return e.consume(h), p;
|
|
341
|
-
const m = e.exit("attentionSequence"), C = k(
|
|
338
|
+
const m = e.exit("attentionSequence"), C = k(Ae(h) ? Fe(h, r(), o) : h), j = b(c), q = j || g(c), F = b(C), y = F || g(C), _ = P(c), A = !y || F && (q || _) || n.includes(h), w = !q || j && (y || I(C)) || n.includes(s);
|
|
342
339
|
return m._open = !!(l === d.asterisk ? A : A && (R(c) || !w)), m._close = !!(l === d.asterisk ? w : w && (R(C) || !A)), t(h);
|
|
343
340
|
}
|
|
344
341
|
}
|
|
345
|
-
function
|
|
342
|
+
function le(e, t) {
|
|
346
343
|
e.column += t, e.offset += t, e._bufferIndex += t;
|
|
347
344
|
}
|
|
348
|
-
function
|
|
345
|
+
function Gt() {
|
|
349
346
|
return {
|
|
350
347
|
text: {
|
|
351
348
|
[d.asterisk]: U,
|
|
@@ -354,71 +351,71 @@ function zt() {
|
|
|
354
351
|
insideSpan: { null: [U] }
|
|
355
352
|
};
|
|
356
353
|
}
|
|
357
|
-
function
|
|
354
|
+
function Lt() {
|
|
358
355
|
const e = this.data();
|
|
359
|
-
(e.micromarkExtensions || (e.micromarkExtensions = [])).push(
|
|
356
|
+
(e.micromarkExtensions || (e.micromarkExtensions = [])).push(Gt());
|
|
360
357
|
}
|
|
361
|
-
const
|
|
362
|
-
function
|
|
358
|
+
const Rt = ";".codePointAt(0) ?? d.eof, zt = "&".codePointAt(0) ?? d.eof;
|
|
359
|
+
function Dt() {
|
|
363
360
|
return { handlers: {
|
|
364
|
-
emphasis:
|
|
365
|
-
strong:
|
|
366
|
-
text:
|
|
361
|
+
emphasis: Te,
|
|
362
|
+
strong: Ee,
|
|
363
|
+
text: Wt
|
|
367
364
|
} };
|
|
368
365
|
}
|
|
366
|
+
Te.peek = Ie;
|
|
369
367
|
Ee.peek = Ne;
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
return qe(e, t, n, r, Ne(e, t, n), 1);
|
|
368
|
+
function Te(e, t, n, r) {
|
|
369
|
+
return Oe(e, t, n, r, Ie(e, t, n), 1);
|
|
373
370
|
}
|
|
374
|
-
function
|
|
375
|
-
return
|
|
371
|
+
function Ee(e, t, n, r) {
|
|
372
|
+
return Oe(e, t, n, r, Ne(e, t, n), 2);
|
|
376
373
|
}
|
|
377
|
-
function
|
|
374
|
+
function Ie(e, t, n) {
|
|
378
375
|
return n.options.emphasis || "*";
|
|
379
376
|
}
|
|
380
|
-
function
|
|
377
|
+
function Ne(e, t, n) {
|
|
381
378
|
return n.options.strong || "*";
|
|
382
379
|
}
|
|
383
|
-
function
|
|
384
|
-
const
|
|
380
|
+
function Oe(e, t, n, r, o, i) {
|
|
381
|
+
const s = o.repeat(i), u = n.enter(i === 1 ? "emphasis" : "strong"), a = n.createTracker(r), c = a.move(s);
|
|
385
382
|
let l = a.move(n.containerPhrasing(e, {
|
|
386
383
|
after: o,
|
|
387
384
|
before: c,
|
|
388
385
|
...a.current()
|
|
389
386
|
}));
|
|
390
|
-
const f =
|
|
391
|
-
h.inside && l && (l =
|
|
392
|
-
const m =
|
|
387
|
+
const f = Ht(e, t, n, r.before), p = Qt(e, t, n, r.after), h = fe(f, z(l), o, "open");
|
|
388
|
+
h.inside && l && (l = Kt(l));
|
|
389
|
+
const m = fe({
|
|
393
390
|
current: Z(l),
|
|
394
391
|
previous: Y(l)
|
|
395
392
|
}, p, o, "close");
|
|
396
|
-
m.inside && l && (l =
|
|
397
|
-
const C = a.move(
|
|
398
|
-
|
|
399
|
-
const j = m.outside &&
|
|
393
|
+
m.inside && l && (l = en(l));
|
|
394
|
+
const C = a.move(s);
|
|
395
|
+
u();
|
|
396
|
+
const j = m.outside && Zt(t, n);
|
|
400
397
|
return n.attentionEncodeSurroundingInfo = {
|
|
401
398
|
after: m.outside && !j,
|
|
402
399
|
before: h.outside
|
|
403
400
|
}, n.cjkFriendlyEncodeAfterSupplementaryText = j, c + l + C;
|
|
404
401
|
}
|
|
405
|
-
function
|
|
402
|
+
function Wt(e, t, n, r) {
|
|
406
403
|
const o = n;
|
|
407
404
|
if (!o.cjkFriendlyEncodeAfterSupplementaryText) return n.safe(e.value, r);
|
|
408
405
|
o.cjkFriendlyEncodeAfterSupplementaryText = !1;
|
|
409
|
-
const [i = ""] = [...e.value],
|
|
410
|
-
return `${re(i.codePointAt(0) ?? d.eof)}${n.safe(
|
|
406
|
+
const [i = ""] = [...e.value], s = e.value.slice(i.length);
|
|
407
|
+
return `${re(i.codePointAt(0) ?? d.eof)}${n.safe(s, {
|
|
411
408
|
...r,
|
|
412
409
|
before: ";"
|
|
413
410
|
})}`;
|
|
414
411
|
}
|
|
415
|
-
function
|
|
412
|
+
function fe(e, t, n, r) {
|
|
416
413
|
const o = ne(e), i = k(t);
|
|
417
|
-
if (!P(o) && !P(i)) return r === "open" ?
|
|
418
|
-
const
|
|
414
|
+
if (!P(o) && !P(i)) return r === "open" ? de(o, i, n) : de(i, o, n);
|
|
415
|
+
const s = {
|
|
419
416
|
inside: !1,
|
|
420
417
|
outside: !1
|
|
421
|
-
},
|
|
418
|
+
}, u = {
|
|
422
419
|
inside: !0,
|
|
423
420
|
outside: !1
|
|
424
421
|
}, a = {
|
|
@@ -429,17 +426,17 @@ function de(e, t, n, r) {
|
|
|
429
426
|
outside: !0
|
|
430
427
|
};
|
|
431
428
|
for (const l of [
|
|
432
|
-
u,
|
|
433
429
|
s,
|
|
430
|
+
u,
|
|
434
431
|
a,
|
|
435
432
|
c
|
|
436
433
|
]) {
|
|
437
|
-
const f = r === "open" ? l.outside ?
|
|
438
|
-
if (r === "open" ?
|
|
434
|
+
const f = r === "open" ? l.outside ? pe : e : l.inside ? pe : e, p = r === "open" ? l.inside ? he : t : l.outside ? he : t;
|
|
435
|
+
if (r === "open" ? Vt(n, f, p) : Ut(n, f, p)) return l;
|
|
439
436
|
}
|
|
440
437
|
return c;
|
|
441
438
|
}
|
|
442
|
-
function
|
|
439
|
+
function de(e, t, n) {
|
|
443
440
|
return H(e) ? H(t) ? n === "_" ? {
|
|
444
441
|
inside: !0,
|
|
445
442
|
outside: !0
|
|
@@ -469,15 +466,15 @@ function pe(e, t, n) {
|
|
|
469
466
|
outside: !1
|
|
470
467
|
};
|
|
471
468
|
}
|
|
472
|
-
function
|
|
473
|
-
const r = ne(t), { close: o, open: i } =
|
|
469
|
+
function Vt(e, t, n) {
|
|
470
|
+
const r = ne(t), { close: o, open: i } = qe(r, k(n));
|
|
474
471
|
return e === "_" ? i && (R(r) || !o) : i;
|
|
475
472
|
}
|
|
476
|
-
function
|
|
477
|
-
const r = k(n), { close: o, open: i } =
|
|
473
|
+
function Ut(e, t, n) {
|
|
474
|
+
const r = k(n), { close: o, open: i } = qe(ne(t), r);
|
|
478
475
|
return e === "_" ? o && (R(r) || !i) : o;
|
|
479
476
|
}
|
|
480
|
-
function
|
|
477
|
+
function qe(e, t) {
|
|
481
478
|
const n = b(e), r = n || g(e), o = b(t), i = o || g(t);
|
|
482
479
|
return {
|
|
483
480
|
open: !i || o && (r || P(e)),
|
|
@@ -491,85 +488,83 @@ function ne(e) {
|
|
|
491
488
|
const t = k(e.current);
|
|
492
489
|
return e.current === null || !O(t) ? t : V(t, () => e.previous, e.current);
|
|
493
490
|
}
|
|
494
|
-
function
|
|
491
|
+
function Ht(e, t, n, r) {
|
|
495
492
|
let o = Z(r), i = Y(r);
|
|
496
|
-
if (
|
|
497
|
-
const
|
|
498
|
-
|
|
493
|
+
if (Jt(o) || Yt(o, i)) {
|
|
494
|
+
const s = _e(e, t, n, -1);
|
|
495
|
+
s && (o = Z(s), i = Y(s));
|
|
499
496
|
}
|
|
500
497
|
return {
|
|
501
498
|
current: o,
|
|
502
499
|
previous: i
|
|
503
500
|
};
|
|
504
501
|
}
|
|
505
|
-
function
|
|
502
|
+
function Qt(e, t, n, r) {
|
|
506
503
|
const o = z(r);
|
|
507
|
-
if (!
|
|
508
|
-
const i =
|
|
504
|
+
if (!Xt(o)) return o;
|
|
505
|
+
const i = _e(e, t, n, 1);
|
|
509
506
|
return i ? z(i) : o;
|
|
510
507
|
}
|
|
511
|
-
function
|
|
508
|
+
function Jt(e) {
|
|
512
509
|
return e !== null && 56320 <= e && e <= 57343;
|
|
513
510
|
}
|
|
514
|
-
function
|
|
511
|
+
function Xt(e) {
|
|
515
512
|
return e !== null && 55296 <= e && e <= 56319;
|
|
516
513
|
}
|
|
517
|
-
function
|
|
514
|
+
function Yt(e, t) {
|
|
518
515
|
return O(k(e)) && (t === null || t === d.eof);
|
|
519
516
|
}
|
|
520
|
-
function
|
|
517
|
+
function _e(e, t, n, r) {
|
|
521
518
|
if (!t) return;
|
|
522
|
-
const o = n.indexStack.at(-1), i = t.children,
|
|
523
|
-
if (
|
|
524
|
-
const
|
|
525
|
-
return
|
|
519
|
+
const o = n.indexStack.at(-1), i = t.children, s = typeof o == "number" ? o : i.indexOf(e);
|
|
520
|
+
if (s < 0) return;
|
|
521
|
+
const u = i[s + r];
|
|
522
|
+
return Me(u) || void 0;
|
|
526
523
|
}
|
|
527
|
-
function
|
|
524
|
+
function Zt(e, t) {
|
|
528
525
|
if (!e) return !1;
|
|
529
526
|
const n = t.indexStack.at(-1);
|
|
530
527
|
if (typeof n != "number") return !1;
|
|
531
528
|
const r = e.children[n + 1];
|
|
532
|
-
return
|
|
529
|
+
return r?.type === "text" && (z(r.value) ?? 0) > 65535;
|
|
533
530
|
}
|
|
534
|
-
function
|
|
535
|
-
return !e || typeof e != "object" ? "" : "value" in e && typeof e.value == "string" ? e.value : "alt" in e && typeof e.alt == "string" ? e.alt : "children" in e && Array.isArray(e.children) ? e.children.map(
|
|
531
|
+
function Me(e) {
|
|
532
|
+
return !e || typeof e != "object" ? "" : "value" in e && typeof e.value == "string" ? e.value : "alt" in e && typeof e.alt == "string" ? e.alt : "children" in e && Array.isArray(e.children) ? e.children.map(Me).join("") : "";
|
|
536
533
|
}
|
|
537
534
|
function re(e) {
|
|
538
535
|
return `&#x${(e ?? 0).toString(16).toUpperCase()};`;
|
|
539
536
|
}
|
|
540
|
-
function
|
|
537
|
+
function Kt(e) {
|
|
541
538
|
const [t = ""] = [...e];
|
|
542
539
|
return re(t.codePointAt(0) ?? d.eof) + e.slice(t.length);
|
|
543
540
|
}
|
|
544
|
-
function
|
|
541
|
+
function en(e) {
|
|
545
542
|
const t = [...e], n = t.pop();
|
|
546
|
-
return `${t.join("")}${re(
|
|
543
|
+
return `${t.join("")}${re(n?.codePointAt(0) ?? d.eof)}`;
|
|
547
544
|
}
|
|
548
545
|
function Y(e) {
|
|
549
|
-
var n;
|
|
550
546
|
const t = [...e];
|
|
551
|
-
return t.pop(),
|
|
547
|
+
return t.pop(), t.at(-1)?.codePointAt(0) ?? d.eof;
|
|
552
548
|
}
|
|
553
549
|
function z(e) {
|
|
554
550
|
return e.codePointAt(0) ?? d.eof;
|
|
555
551
|
}
|
|
556
552
|
function Z(e) {
|
|
557
|
-
|
|
558
|
-
return ((t = [...e].at(-1)) == null ? void 0 : t.codePointAt(0)) ?? d.eof;
|
|
553
|
+
return [...e].at(-1)?.codePointAt(0) ?? d.eof;
|
|
559
554
|
}
|
|
560
|
-
const
|
|
561
|
-
current:
|
|
555
|
+
const pe = {
|
|
556
|
+
current: Rt,
|
|
562
557
|
previous: d.eof
|
|
563
|
-
},
|
|
564
|
-
function
|
|
558
|
+
}, he = zt;
|
|
559
|
+
function tn() {
|
|
565
560
|
const e = this.data();
|
|
566
|
-
(e.toMarkdownExtensions || (e.toMarkdownExtensions = [])).push(
|
|
561
|
+
(e.toMarkdownExtensions || (e.toMarkdownExtensions = [])).push(Dt());
|
|
567
562
|
}
|
|
568
|
-
function
|
|
569
|
-
|
|
563
|
+
function nn() {
|
|
564
|
+
Lt.call(this), tn.call(this);
|
|
570
565
|
}
|
|
571
|
-
var
|
|
572
|
-
function
|
|
566
|
+
var rn = nn;
|
|
567
|
+
function on(e) {
|
|
573
568
|
let t = (e || {}).singleTilde;
|
|
574
569
|
const n = {
|
|
575
570
|
name: "strikethrough",
|
|
@@ -581,158 +576,158 @@ function an(e) {
|
|
|
581
576
|
insideSpan: { null: [n] },
|
|
582
577
|
attentionMarkers: { null: [d.tilde] }
|
|
583
578
|
};
|
|
584
|
-
function r(i,
|
|
585
|
-
let
|
|
586
|
-
for (; ++
|
|
587
|
-
let a =
|
|
588
|
-
for (; a--; ) if (i[a][0] === "exit" && i[a][1].type === "strikethroughSequenceTemporary" && i[a][1]._open && i[
|
|
589
|
-
i[
|
|
579
|
+
function r(i, s) {
|
|
580
|
+
let u = -1;
|
|
581
|
+
for (; ++u < i.length; ) if (i[u][0] === "enter" && i[u][1].type === "strikethroughSequenceTemporary" && i[u][1]._close) {
|
|
582
|
+
let a = u;
|
|
583
|
+
for (; a--; ) if (i[a][0] === "exit" && i[a][1].type === "strikethroughSequenceTemporary" && i[a][1]._open && i[u][1].end.offset - i[u][1].start.offset === i[a][1].end.offset - i[a][1].start.offset) {
|
|
584
|
+
i[u][1].type = "strikethroughSequence", i[a][1].type = "strikethroughSequence";
|
|
590
585
|
const c = {
|
|
591
586
|
type: "strikethrough",
|
|
592
587
|
start: Object.assign({}, i[a][1].start),
|
|
593
|
-
end: Object.assign({}, i[
|
|
588
|
+
end: Object.assign({}, i[u][1].end)
|
|
594
589
|
}, l = {
|
|
595
590
|
type: "strikethroughText",
|
|
596
591
|
start: Object.assign({}, i[a][1].end),
|
|
597
|
-
end: Object.assign({}, i[
|
|
592
|
+
end: Object.assign({}, i[u][1].start)
|
|
598
593
|
}, f = [
|
|
599
594
|
[
|
|
600
595
|
"enter",
|
|
601
596
|
c,
|
|
602
|
-
|
|
597
|
+
s
|
|
603
598
|
],
|
|
604
599
|
[
|
|
605
600
|
"enter",
|
|
606
601
|
i[a][1],
|
|
607
|
-
|
|
602
|
+
s
|
|
608
603
|
],
|
|
609
604
|
[
|
|
610
605
|
"exit",
|
|
611
606
|
i[a][1],
|
|
612
|
-
|
|
607
|
+
s
|
|
613
608
|
],
|
|
614
609
|
[
|
|
615
610
|
"enter",
|
|
616
611
|
l,
|
|
617
|
-
|
|
612
|
+
s
|
|
618
613
|
]
|
|
619
|
-
], p =
|
|
620
|
-
p && G(f, f.length, 0,
|
|
614
|
+
], p = s.parser.constructs.insideSpan.null;
|
|
615
|
+
p && G(f, f.length, 0, be(p, i.slice(a + 1, u), s)), G(f, f.length, 0, [
|
|
621
616
|
[
|
|
622
617
|
"exit",
|
|
623
618
|
l,
|
|
624
|
-
|
|
619
|
+
s
|
|
625
620
|
],
|
|
626
621
|
[
|
|
627
622
|
"enter",
|
|
628
|
-
i[
|
|
629
|
-
|
|
623
|
+
i[u][1],
|
|
624
|
+
s
|
|
630
625
|
],
|
|
631
626
|
[
|
|
632
627
|
"exit",
|
|
633
|
-
i[
|
|
634
|
-
|
|
628
|
+
i[u][1],
|
|
629
|
+
s
|
|
635
630
|
],
|
|
636
631
|
[
|
|
637
632
|
"exit",
|
|
638
633
|
c,
|
|
639
|
-
|
|
634
|
+
s
|
|
640
635
|
]
|
|
641
|
-
]), G(i, a - 1,
|
|
636
|
+
]), G(i, a - 1, u - a + 3, f), u = a + f.length - 2;
|
|
642
637
|
break;
|
|
643
638
|
}
|
|
644
639
|
}
|
|
645
|
-
for (
|
|
640
|
+
for (u = -1; ++u < i.length; ) i[u][1].type === "strikethroughSequenceTemporary" && (i[u][1].type = x.data);
|
|
646
641
|
return i;
|
|
647
642
|
}
|
|
648
|
-
function o(i,
|
|
649
|
-
const { now: a, sliceSerialize: c, previous: l } = this, f =
|
|
643
|
+
function o(i, s, u) {
|
|
644
|
+
const { now: a, sliceSerialize: c, previous: l } = this, f = $e(l) ? Be(l, a(), c) : l, p = k(f), h = new ve(f, a(), c), m = V(p, h.value.bind(h), f), C = this.events;
|
|
650
645
|
let j = 0;
|
|
651
646
|
return q;
|
|
652
647
|
function q(y) {
|
|
653
|
-
return f === d.tilde && C[C.length - 1][1].type !== x.characterEscape ?
|
|
648
|
+
return f === d.tilde && C[C.length - 1][1].type !== x.characterEscape ? u(y) : (i.enter("strikethroughSequenceTemporary"), F(y));
|
|
654
649
|
}
|
|
655
650
|
function F(y) {
|
|
656
651
|
const _ = k(f);
|
|
657
652
|
if (y === d.tilde)
|
|
658
|
-
return j > 1 ?
|
|
659
|
-
if (j < 2 && !t) return
|
|
660
|
-
const A = i.exit("strikethroughSequenceTemporary"), w = k(
|
|
661
|
-
return A._open = !
|
|
653
|
+
return j > 1 ? u(y) : (i.consume(y), j++, F);
|
|
654
|
+
if (j < 2 && !t) return u(y);
|
|
655
|
+
const A = i.exit("strikethroughSequenceTemporary"), w = k(Ae(y) ? Fe(y, a(), c) : y), se = b(m) || g(m), ue = b(w) || g(w), De = I(m) || Nt(_);
|
|
656
|
+
return A._open = !ue || w === v.attentionSideAfter && (se || De), A._close = !se || _ === v.attentionSideAfter && (ue || I(w)), s(y);
|
|
662
657
|
}
|
|
663
658
|
}
|
|
664
659
|
}
|
|
665
|
-
function
|
|
660
|
+
function sn(e) {
|
|
666
661
|
const t = this.data();
|
|
667
|
-
(t.micromarkExtensions || (t.micromarkExtensions = [])).push(
|
|
662
|
+
(t.micromarkExtensions || (t.micromarkExtensions = [])).push(on(e));
|
|
668
663
|
}
|
|
669
|
-
const
|
|
664
|
+
const un = [
|
|
670
665
|
"autolink",
|
|
671
666
|
"destinationLiteral",
|
|
672
667
|
"destinationRaw",
|
|
673
668
|
"reference",
|
|
674
669
|
"titleQuote",
|
|
675
670
|
"titleApostrophe"
|
|
676
|
-
],
|
|
677
|
-
function
|
|
671
|
+
], an = ";".codePointAt(0) ?? d.eof, cn = "&".codePointAt(0) ?? d.eof;
|
|
672
|
+
function ln() {
|
|
678
673
|
return {
|
|
679
674
|
unsafe: [{
|
|
680
675
|
character: "~",
|
|
681
676
|
inConstruct: "phrasing",
|
|
682
|
-
notInConstruct:
|
|
677
|
+
notInConstruct: un
|
|
683
678
|
}],
|
|
684
679
|
handlers: {
|
|
685
|
-
delete:
|
|
686
|
-
text:
|
|
680
|
+
delete: Ge,
|
|
681
|
+
text: fn
|
|
687
682
|
}
|
|
688
683
|
};
|
|
689
684
|
}
|
|
690
|
-
|
|
691
|
-
function
|
|
692
|
-
const i = n.enter("strikethrough"),
|
|
693
|
-
let a =
|
|
685
|
+
Ge.peek = dn;
|
|
686
|
+
function Ge(e, t, n, r) {
|
|
687
|
+
const i = n.enter("strikethrough"), s = n.createTracker(r), u = s.move("~~");
|
|
688
|
+
let a = s.move(n.containerPhrasing(e, {
|
|
694
689
|
after: "~",
|
|
695
|
-
before:
|
|
696
|
-
...
|
|
690
|
+
before: u,
|
|
691
|
+
...s.current()
|
|
697
692
|
}));
|
|
698
|
-
const c =
|
|
699
|
-
f.inside && a && (a =
|
|
700
|
-
const p =
|
|
693
|
+
const c = gn(e, t, n, r.before), l = mn(e, t, n, r.after), f = ge(c, D(a), "open");
|
|
694
|
+
f.inside && a && (a = xn(a));
|
|
695
|
+
const p = ge({
|
|
701
696
|
current: ee(a),
|
|
702
697
|
previous: K(a)
|
|
703
698
|
}, l, "close");
|
|
704
|
-
p.inside && a && (a =
|
|
705
|
-
const h =
|
|
699
|
+
p.inside && a && (a = bn(a));
|
|
700
|
+
const h = s.move("~~");
|
|
706
701
|
i();
|
|
707
|
-
const m = p.outside &&
|
|
702
|
+
const m = p.outside && Cn(t, n);
|
|
708
703
|
return n.attentionEncodeSurroundingInfo = {
|
|
709
704
|
after: p.outside && !m,
|
|
710
705
|
before: f.outside
|
|
711
|
-
}, n.cjkFriendlyEncodeAfterSupplementaryText = m,
|
|
706
|
+
}, n.cjkFriendlyEncodeAfterSupplementaryText = m, u + a + h;
|
|
712
707
|
}
|
|
713
|
-
function
|
|
708
|
+
function fn(e, t, n, r) {
|
|
714
709
|
const o = n;
|
|
715
710
|
if (!o.cjkFriendlyEncodeAfterSupplementaryText) return n.safe(e.value, r);
|
|
716
711
|
o.cjkFriendlyEncodeAfterSupplementaryText = !1;
|
|
717
|
-
const [i = ""] = [...e.value],
|
|
718
|
-
return `${oe(i.codePointAt(0) ?? d.eof)}${n.safe(
|
|
712
|
+
const [i = ""] = [...e.value], s = e.value.slice(i.length);
|
|
713
|
+
return `${oe(i.codePointAt(0) ?? d.eof)}${n.safe(s, {
|
|
719
714
|
...r,
|
|
720
715
|
before: ";"
|
|
721
716
|
})}`;
|
|
722
717
|
}
|
|
723
|
-
function
|
|
718
|
+
function dn() {
|
|
724
719
|
return "~";
|
|
725
720
|
}
|
|
726
|
-
function
|
|
721
|
+
function ge(e, t, n) {
|
|
727
722
|
const r = ie(e), o = k(t);
|
|
728
|
-
if (!P(r) && !P(o)) return n === "open" ?
|
|
723
|
+
if (!P(r) && !P(o)) return n === "open" ? me(r, o) : me(o, r);
|
|
729
724
|
const i = {
|
|
730
725
|
inside: !1,
|
|
731
726
|
outside: !1
|
|
732
|
-
},
|
|
727
|
+
}, s = {
|
|
733
728
|
inside: !0,
|
|
734
729
|
outside: !1
|
|
735
|
-
},
|
|
730
|
+
}, u = {
|
|
736
731
|
inside: !1,
|
|
737
732
|
outside: !0
|
|
738
733
|
}, a = {
|
|
@@ -741,16 +736,16 @@ function me(e, t, n) {
|
|
|
741
736
|
};
|
|
742
737
|
for (const c of [
|
|
743
738
|
i,
|
|
744
|
-
u,
|
|
745
739
|
s,
|
|
740
|
+
u,
|
|
746
741
|
a
|
|
747
742
|
]) {
|
|
748
|
-
const l = n === "open" ? c.outside ?
|
|
749
|
-
if (n === "open" ?
|
|
743
|
+
const l = n === "open" ? c.outside ? ke : e : c.inside ? ke : e, f = n === "open" ? c.inside ? ye : t : c.outside ? ye : t;
|
|
744
|
+
if (n === "open" ? pn(l, f) : hn(l, f)) return c;
|
|
750
745
|
}
|
|
751
746
|
return a;
|
|
752
747
|
}
|
|
753
|
-
function
|
|
748
|
+
function me(e, t) {
|
|
754
749
|
return Q(e) ? Q(t) ? {
|
|
755
750
|
inside: !1,
|
|
756
751
|
outside: !1
|
|
@@ -777,15 +772,15 @@ function ke(e, t) {
|
|
|
777
772
|
outside: !1
|
|
778
773
|
};
|
|
779
774
|
}
|
|
780
|
-
function
|
|
781
|
-
const { open: n } =
|
|
775
|
+
function pn(e, t) {
|
|
776
|
+
const { open: n } = Le(ie(e), k(t));
|
|
782
777
|
return n;
|
|
783
778
|
}
|
|
784
|
-
function
|
|
785
|
-
const n = k(t), { close: r } =
|
|
779
|
+
function hn(e, t) {
|
|
780
|
+
const n = k(t), { close: r } = Le(ie(e), n);
|
|
786
781
|
return r;
|
|
787
782
|
}
|
|
788
|
-
function
|
|
783
|
+
function Le(e, t) {
|
|
789
784
|
const n = b(e), r = n || g(e), o = b(t), i = o || g(t);
|
|
790
785
|
return {
|
|
791
786
|
open: !i || o && (r || P(e)),
|
|
@@ -799,142 +794,140 @@ function ie(e) {
|
|
|
799
794
|
const t = k(e.current);
|
|
800
795
|
return e.current === null || !O(t) ? t : V(t, () => e.previous, e.current);
|
|
801
796
|
}
|
|
802
|
-
function
|
|
797
|
+
function gn(e, t, n, r) {
|
|
803
798
|
let o = ee(r), i = K(r);
|
|
804
|
-
if (
|
|
805
|
-
const
|
|
806
|
-
|
|
799
|
+
if (kn(o) || Sn(o, i)) {
|
|
800
|
+
const s = Re(e, t, n, -1);
|
|
801
|
+
s && (o = ee(s), i = K(s));
|
|
807
802
|
}
|
|
808
803
|
return {
|
|
809
804
|
current: o,
|
|
810
805
|
previous: i
|
|
811
806
|
};
|
|
812
807
|
}
|
|
813
|
-
function
|
|
808
|
+
function mn(e, t, n, r) {
|
|
814
809
|
const o = D(r);
|
|
815
|
-
if (!
|
|
816
|
-
const i =
|
|
810
|
+
if (!yn(o)) return o;
|
|
811
|
+
const i = Re(e, t, n, 1);
|
|
817
812
|
return i ? D(i) : o;
|
|
818
813
|
}
|
|
819
|
-
function
|
|
814
|
+
function kn(e) {
|
|
820
815
|
return e !== null && 56320 <= e && e <= 57343;
|
|
821
816
|
}
|
|
822
|
-
function
|
|
817
|
+
function yn(e) {
|
|
823
818
|
return e !== null && 55296 <= e && e <= 56319;
|
|
824
819
|
}
|
|
825
|
-
function
|
|
820
|
+
function Sn(e, t) {
|
|
826
821
|
return O(k(e)) && (t === null || t === d.eof);
|
|
827
822
|
}
|
|
828
|
-
function
|
|
823
|
+
function Re(e, t, n, r) {
|
|
829
824
|
if (!t) return;
|
|
830
|
-
const o = n.indexStack.at(-1), i = t.children,
|
|
831
|
-
if (
|
|
832
|
-
const
|
|
833
|
-
return
|
|
825
|
+
const o = n.indexStack.at(-1), i = t.children, s = typeof o == "number" ? o : i.indexOf(e);
|
|
826
|
+
if (s < 0) return;
|
|
827
|
+
const u = i[s + r];
|
|
828
|
+
return ze(u) || void 0;
|
|
834
829
|
}
|
|
835
|
-
function
|
|
830
|
+
function Cn(e, t) {
|
|
836
831
|
if (!e) return !1;
|
|
837
832
|
const n = t.indexStack.at(-1);
|
|
838
833
|
if (typeof n != "number") return !1;
|
|
839
834
|
const r = e.children[n + 1];
|
|
840
|
-
return
|
|
835
|
+
return r?.type === "text" && (D(r.value) ?? 0) > 65535;
|
|
841
836
|
}
|
|
842
|
-
function
|
|
843
|
-
return !e || typeof e != "object" ? "" : "value" in e && typeof e.value == "string" ? e.value : "alt" in e && typeof e.alt == "string" ? e.alt : "children" in e && Array.isArray(e.children) ? e.children.map(
|
|
837
|
+
function ze(e) {
|
|
838
|
+
return !e || typeof e != "object" ? "" : "value" in e && typeof e.value == "string" ? e.value : "alt" in e && typeof e.alt == "string" ? e.alt : "children" in e && Array.isArray(e.children) ? e.children.map(ze).join("") : "";
|
|
844
839
|
}
|
|
845
840
|
function oe(e) {
|
|
846
841
|
return `&#x${(e ?? 0).toString(16).toUpperCase()};`;
|
|
847
842
|
}
|
|
848
|
-
function
|
|
843
|
+
function xn(e) {
|
|
849
844
|
const [t = ""] = [...e];
|
|
850
845
|
return oe(t.codePointAt(0) ?? d.eof) + e.slice(t.length);
|
|
851
846
|
}
|
|
852
|
-
function
|
|
847
|
+
function bn(e) {
|
|
853
848
|
const t = [...e], n = t.pop();
|
|
854
|
-
return `${t.join("")}${oe(
|
|
849
|
+
return `${t.join("")}${oe(n?.codePointAt(0) ?? d.eof)}`;
|
|
855
850
|
}
|
|
856
851
|
function K(e) {
|
|
857
|
-
var n;
|
|
858
852
|
const t = [...e];
|
|
859
|
-
return t.pop(),
|
|
853
|
+
return t.pop(), t.at(-1)?.codePointAt(0) ?? d.eof;
|
|
860
854
|
}
|
|
861
855
|
function D(e) {
|
|
862
856
|
return e.codePointAt(0) ?? d.eof;
|
|
863
857
|
}
|
|
864
858
|
function ee(e) {
|
|
865
|
-
|
|
866
|
-
return ((t = [...e].at(-1)) == null ? void 0 : t.codePointAt(0)) ?? d.eof;
|
|
859
|
+
return [...e].at(-1)?.codePointAt(0) ?? d.eof;
|
|
867
860
|
}
|
|
868
|
-
const
|
|
869
|
-
current:
|
|
861
|
+
const ke = {
|
|
862
|
+
current: an,
|
|
870
863
|
previous: d.eof
|
|
871
|
-
},
|
|
872
|
-
function
|
|
864
|
+
}, ye = cn;
|
|
865
|
+
function jn() {
|
|
873
866
|
const e = this.data();
|
|
874
|
-
(e.toMarkdownExtensions || (e.toMarkdownExtensions = [])).push(
|
|
867
|
+
(e.toMarkdownExtensions || (e.toMarkdownExtensions = [])).push(ln());
|
|
875
868
|
}
|
|
876
|
-
function
|
|
877
|
-
|
|
869
|
+
function wn(e) {
|
|
870
|
+
sn.call(this, e), jn.call(this);
|
|
878
871
|
}
|
|
879
|
-
var
|
|
872
|
+
var Pn = wn, An = /* @__PURE__ */ new Set(["。", ".", ",", "、", "?", "!", ":", ";", "(", ")", "【", "】", "「", "」", "『", "』", "〈", "〉", "《", "》"]), $n = /^(https?:\/\/|mailto:|www\.)/i, Bn = (e) => {
|
|
880
873
|
if (e.children.length !== 1) return !1;
|
|
881
874
|
let t = e.children[0];
|
|
882
875
|
return t.type === "text" && t.value === e.url;
|
|
883
|
-
},
|
|
876
|
+
}, vn = (e) => {
|
|
884
877
|
let t = 0;
|
|
885
878
|
for (let n of e) {
|
|
886
|
-
if (
|
|
879
|
+
if (An.has(n)) return t;
|
|
887
880
|
t += n.length;
|
|
888
881
|
}
|
|
889
882
|
return null;
|
|
890
|
-
},
|
|
891
|
-
|
|
892
|
-
if (!r || typeof n != "number" || !
|
|
893
|
-
let o =
|
|
883
|
+
}, Fn = (e, t) => ({ ...t, url: e, children: [{ type: "text", value: e }] }), Tn = (e) => ({ type: "text", value: e }), En = () => (e) => {
|
|
884
|
+
Qe(e, "link", (t, n, r) => {
|
|
885
|
+
if (!r || typeof n != "number" || !Bn(t) || !$n.test(t.url)) return;
|
|
886
|
+
let o = vn(t.url);
|
|
894
887
|
if (o === null || o === 0) return;
|
|
895
|
-
let i = t.url.slice(0, o),
|
|
896
|
-
return r.children.splice(n, 1,
|
|
888
|
+
let i = t.url.slice(0, o), s = t.url.slice(o), u = Fn(i, t), a = Tn(s);
|
|
889
|
+
return r.children.splice(n, 1, u, a), n + 1;
|
|
897
890
|
});
|
|
898
891
|
};
|
|
899
|
-
function
|
|
900
|
-
let e = [
|
|
892
|
+
function In() {
|
|
893
|
+
let e = [rn], t = [En, Pn], n = [...e, ...t];
|
|
901
894
|
return { name: "cjk", type: "cjk", remarkPluginsBefore: e, remarkPluginsAfter: t, remarkPlugins: n };
|
|
902
895
|
}
|
|
903
|
-
var
|
|
896
|
+
var Nn = In(), On = Ke({ forgiving: !0 }), qn = Object.fromEntries(Ze.flatMap((e) => {
|
|
904
897
|
var t;
|
|
905
898
|
return ((t = e.aliases) != null ? t : []).map((n) => [n, e.id]);
|
|
906
|
-
})), L = new Set(Object.keys(
|
|
899
|
+
})), L = new Set(Object.keys(Xe)), Se = (e) => {
|
|
907
900
|
let t = e.trim().toLowerCase();
|
|
908
|
-
return
|
|
901
|
+
return qn[t] || (L.has(t), t);
|
|
909
902
|
}, J = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map(), W = (e) => {
|
|
910
903
|
var t;
|
|
911
904
|
return typeof e == "string" ? e : (t = e.name) != null ? t : "custom";
|
|
912
|
-
},
|
|
905
|
+
}, _n = (e, t) => `${e}-${W(t[0])}-${W(t[1])}`, Mn = (e, t, n) => {
|
|
913
906
|
let r = e.slice(0, 100), o = e.length > 100 ? e.slice(-100) : "";
|
|
914
907
|
return `${t}:${n[0]}:${n[1]}:${e.length}:${r}:${o}`;
|
|
915
|
-
},
|
|
916
|
-
let n =
|
|
908
|
+
}, Gn = (e, t) => {
|
|
909
|
+
let n = _n(e, t);
|
|
917
910
|
if (J.has(n)) return J.get(n);
|
|
918
|
-
let r =
|
|
911
|
+
let r = Ye({ themes: t, langs: [e], engine: On });
|
|
919
912
|
return J.set(n, r), r;
|
|
920
913
|
};
|
|
921
|
-
function
|
|
914
|
+
function Ln(e = {}) {
|
|
922
915
|
var t;
|
|
923
916
|
let n = (t = e.themes) != null ? t : ["github-light", "github-dark"];
|
|
924
917
|
return { name: "shiki", type: "code-highlighter", supportsLanguage(r) {
|
|
925
|
-
let o =
|
|
918
|
+
let o = Se(r);
|
|
926
919
|
return L.has(o);
|
|
927
920
|
}, getSupportedLanguages() {
|
|
928
921
|
return Array.from(L);
|
|
929
922
|
}, getThemes() {
|
|
930
923
|
return n;
|
|
931
|
-
}, highlight({ code: r, language: o, themes: i },
|
|
932
|
-
let
|
|
924
|
+
}, highlight({ code: r, language: o, themes: i }, s) {
|
|
925
|
+
let u = Se(o), a = [W(i[0]), W(i[1])], c = Mn(r, u, a);
|
|
933
926
|
if (X.has(c)) return X.get(c);
|
|
934
|
-
|
|
935
|
-
let l = L.has(
|
|
936
|
-
return
|
|
937
|
-
let p = f.getLoadedLanguages().includes(
|
|
927
|
+
s && ($.has(c) || $.set(c, /* @__PURE__ */ new Set()), $.get(c).add(s));
|
|
928
|
+
let l = L.has(u) ? u : "text";
|
|
929
|
+
return Gn(l, i).then((f) => {
|
|
930
|
+
let p = f.getLoadedLanguages().includes(u) ? u : "text", h = f.codeToTokens(r, { lang: p, themes: { light: a[0], dark: a[1] } });
|
|
938
931
|
X.set(c, h);
|
|
939
932
|
let m = $.get(c);
|
|
940
933
|
if (m) {
|
|
@@ -946,16 +939,16 @@ function Dn(e = {}) {
|
|
|
946
939
|
}), null;
|
|
947
940
|
} };
|
|
948
941
|
}
|
|
949
|
-
var
|
|
942
|
+
var Rn = Ln();
|
|
950
943
|
let E = null, M = null;
|
|
951
944
|
const te = /* @__PURE__ */ new Set();
|
|
952
|
-
function
|
|
945
|
+
function zn(e) {
|
|
953
946
|
return typeof e != "string" ? !1 : /```(?:mermaid|graph|sequenceDiagram|classDiagram|stateDiagram|erDiagram|journey|gantt|pie|gitGraph|mindmap|timeline|quadrantChart|xychart|block-beta|architecture-beta|packet-beta)\b/i.test(e) || /(^|\n)\s*(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|journey|gantt|pie|gitGraph|mindmap|timeline|quadrantChart)\b/.test(e) || /(^|[^\\])(\$\$|\\\(|\\\[)/.test(e);
|
|
954
947
|
}
|
|
955
|
-
function
|
|
948
|
+
function Dn() {
|
|
956
949
|
return M || (M = Promise.all([
|
|
957
|
-
import("./index-
|
|
958
|
-
import("./index-
|
|
950
|
+
import("./index-FgVvPpIY.js"),
|
|
951
|
+
import("./index-B0neMIbR.js").then((e) => e.bp)
|
|
959
952
|
]).then(([e, t]) => {
|
|
960
953
|
E = { math: e.math, mermaid: t.mermaid };
|
|
961
954
|
for (const n of te) n();
|
|
@@ -963,11 +956,11 @@ function Un() {
|
|
|
963
956
|
M = null;
|
|
964
957
|
})), M;
|
|
965
958
|
}
|
|
966
|
-
function
|
|
967
|
-
const t =
|
|
959
|
+
function Wn(e) {
|
|
960
|
+
const t = zn(e), [n, r] = Ce(
|
|
968
961
|
t ? E : null
|
|
969
962
|
);
|
|
970
|
-
return
|
|
963
|
+
return xe(() => {
|
|
971
964
|
if (!t) {
|
|
972
965
|
r(null);
|
|
973
966
|
return;
|
|
@@ -977,12 +970,12 @@ function Hn(e) {
|
|
|
977
970
|
return;
|
|
978
971
|
}
|
|
979
972
|
const o = () => r(E);
|
|
980
|
-
return te.add(o),
|
|
973
|
+
return te.add(o), Dn(), () => {
|
|
981
974
|
te.delete(o);
|
|
982
975
|
};
|
|
983
|
-
}, [t]), { cjk:
|
|
976
|
+
}, [t]), { cjk: Nn, code: Rn, ...n ?? {} };
|
|
984
977
|
}
|
|
985
|
-
async function
|
|
978
|
+
async function Vn(e) {
|
|
986
979
|
try {
|
|
987
980
|
await navigator.clipboard.writeText(e);
|
|
988
981
|
return;
|
|
@@ -991,26 +984,26 @@ async function Qn(e) {
|
|
|
991
984
|
const t = document.createElement("textarea");
|
|
992
985
|
t.value = e, t.setAttribute("readonly", ""), t.style.position = "fixed", t.style.left = "-9999px", document.body.appendChild(t), t.select(), document.execCommand("copy"), t.remove();
|
|
993
986
|
}
|
|
994
|
-
function
|
|
995
|
-
const [i,
|
|
996
|
-
|
|
997
|
-
|
|
987
|
+
function Un({ children: e, className: t, href: n, node: r, ...o }) {
|
|
988
|
+
const [i, s] = Ce(!1), u = Ve(null), a = typeof n == "string" && n.length > 0;
|
|
989
|
+
xe(() => () => {
|
|
990
|
+
u.current != null && window.clearTimeout(u.current);
|
|
998
991
|
}, []);
|
|
999
992
|
const c = async () => {
|
|
1000
|
-
a && (await
|
|
993
|
+
a && (await Vn(n), s(!0), u.current != null && window.clearTimeout(u.current), u.current = window.setTimeout(() => s(!1), 1200));
|
|
1001
994
|
};
|
|
1002
|
-
return a ? /* @__PURE__ */
|
|
1003
|
-
/* @__PURE__ */
|
|
995
|
+
return a ? /* @__PURE__ */ ae("span", { className: "inline", children: [
|
|
996
|
+
/* @__PURE__ */ ae(
|
|
1004
997
|
"a",
|
|
1005
998
|
{
|
|
1006
|
-
className:
|
|
999
|
+
className: je("break-all font-medium text-primary underline underline-offset-4", t),
|
|
1007
1000
|
href: n,
|
|
1008
1001
|
target: "_blank",
|
|
1009
1002
|
rel: "noreferrer noopener",
|
|
1010
1003
|
...o,
|
|
1011
1004
|
children: [
|
|
1012
1005
|
e,
|
|
1013
|
-
/* @__PURE__ */ B(
|
|
1006
|
+
/* @__PURE__ */ B(et, { className: "ml-0.5 inline size-3 align-[-0.125em]", "aria-hidden": "true" })
|
|
1014
1007
|
]
|
|
1015
1008
|
}
|
|
1016
1009
|
),
|
|
@@ -1024,21 +1017,21 @@ function Jn({ children: e, className: t, href: n, node: r, ...o }) {
|
|
|
1024
1017
|
title: i ? "Copied" : "Copy link",
|
|
1025
1018
|
"aria-label": i ? "Copied" : "Copy link",
|
|
1026
1019
|
className: "ml-1 inline-grid size-5 place-items-center rounded text-muted-foreground align-[-0.25em] hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1027
|
-
children: i ? /* @__PURE__ */ B(
|
|
1020
|
+
children: i ? /* @__PURE__ */ B(tt, { className: "size-3.5" }) : /* @__PURE__ */ B(nt, { className: "size-3.5" })
|
|
1028
1021
|
}
|
|
1029
1022
|
)
|
|
1030
1023
|
] }) : /* @__PURE__ */ B("a", { className: t, ...o, children: e });
|
|
1031
1024
|
}
|
|
1032
|
-
function
|
|
1033
|
-
const i =
|
|
1034
|
-
() => ({ a:
|
|
1025
|
+
function Kn({ className: e, mode: t = "static", children: n, components: r, ...o }) {
|
|
1026
|
+
const i = Wn(n), s = We(
|
|
1027
|
+
() => ({ a: Un, ...r }),
|
|
1035
1028
|
[r]
|
|
1036
1029
|
);
|
|
1037
1030
|
return /* @__PURE__ */ B(
|
|
1038
|
-
|
|
1031
|
+
Je,
|
|
1039
1032
|
{
|
|
1040
|
-
className:
|
|
1041
|
-
components:
|
|
1033
|
+
className: je("markdown msg-text size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", e),
|
|
1034
|
+
components: s,
|
|
1042
1035
|
mode: t,
|
|
1043
1036
|
plugins: i,
|
|
1044
1037
|
...o,
|
|
@@ -1047,5 +1040,5 @@ function rr({ className: e, mode: t = "static", children: n, components: r, ...o
|
|
|
1047
1040
|
);
|
|
1048
1041
|
}
|
|
1049
1042
|
export {
|
|
1050
|
-
|
|
1043
|
+
Kn as StreamdownResponse
|
|
1051
1044
|
};
|