@wirecat/drive-cli 0.70.0 → 0.72.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.
- package/README.md +150 -70
- package/contracts/wirecat.json +77 -8
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/agent-23OB2NZP.js +46 -0
- package/dist/bundle/{all-profiles-FW3GK3QO.js → all-profiles-GXGDVNQJ.js} +67 -25
- package/dist/bundle/{anthropic-QVKJT3II.js → anthropic-H5C4GQHC.js} +9 -9
- package/dist/bundle/{app-server-QU73RD5R.js → app-server-EQ3UK4C7.js} +97 -79
- package/dist/bundle/{bun-5XCD5CBB.js → bun-DTJVSRY3.js} +2 -2
- package/dist/bundle/{bun-sqlite-TIGSVNSV.js → bun-sqlite-JIFY7MAE.js} +9 -9
- package/dist/bundle/chunk-2Q325BBD.js +353 -0
- package/dist/bundle/chunk-35FIJGTT.js +52 -0
- package/dist/bundle/{chunk-7C5KENNU.js → chunk-3FRQ6V4T.js} +3 -3
- package/dist/bundle/chunk-47L262VI.js +340 -0
- package/dist/bundle/chunk-4HP6KGBI.js +32 -0
- package/dist/bundle/{chunk-GA3URWIF.js → chunk-4HPXWYTE.js} +1 -1
- package/dist/bundle/{chunk-HYXXMSVD.js → chunk-4IUNYYYL.js} +4473 -2685
- package/dist/bundle/{chunk-FYPW7NMH.js → chunk-4JS32SRX.js} +64 -4
- package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
- package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
- package/dist/bundle/{chunk-SONPLYV7.js → chunk-55FH6IEL.js} +5 -5
- package/dist/bundle/{chunk-VVN6GHAZ.js → chunk-5BNMWSU2.js} +659 -255
- package/dist/bundle/{chunk-FVTKFIQH.js → chunk-5H747A76.js} +5496 -3195
- package/dist/bundle/{chunk-PR7XD2DI.js → chunk-5KWCO56H.js} +2 -2
- package/dist/bundle/{chunk-3AHBZP33.js → chunk-5U3NCE5R.js} +35 -12
- package/dist/bundle/{chunk-HRATXUFH.js → chunk-6CCO3JCM.js} +31 -22
- package/dist/bundle/{chunk-RLNZ7NX5.js → chunk-6ZW2ZJYC.js} +2 -2
- package/dist/bundle/{chunk-RQNRYF6D.js → chunk-75DAHQOV.js} +3 -3
- package/dist/bundle/{chunk-7QSRODXM.js → chunk-77OBW43F.js} +6 -6
- package/dist/bundle/{chunk-GV5DGHSA.js → chunk-7EFM6AW3.js} +4 -4
- package/dist/bundle/{chunk-BXPC5TFG.js → chunk-A3S7QM5L.js} +3 -3
- package/dist/bundle/{chunk-IGNIUDI3.js → chunk-AA4LKC6W.js} +251 -565
- package/dist/bundle/chunk-ASTKHB6B.js +3233 -0
- package/dist/bundle/{chunk-3TCMANIM.js → chunk-BM6V7456.js} +8 -227
- package/dist/bundle/chunk-BO6EDBYJ.js +50 -0
- package/dist/bundle/{chunk-F5KJWRF5.js → chunk-BPA3R4KN.js} +2 -100
- package/dist/bundle/chunk-CIFE4KPX.js +2159 -0
- package/dist/bundle/chunk-CKB4XZZJ.js +730 -0
- package/dist/bundle/{chunk-YCL3SK4T.js → chunk-COJTCEZP.js} +113 -860
- package/dist/bundle/{chunk-BD2K2ONK.js → chunk-CWPYDT73.js} +6 -6
- package/dist/bundle/{chunk-6BMTW5A6.js → chunk-D4JNCXS7.js} +9 -9
- package/dist/bundle/chunk-DCPWZIOV.js +696 -0
- package/dist/bundle/{chunk-P7PLKNPX.js → chunk-DHMNCOQI.js} +415 -272
- package/dist/bundle/chunk-DOQMH4DC.js +280 -0
- package/dist/bundle/chunk-DQSOYH6N.js +20 -0
- package/dist/bundle/{chunk-ML3R2UHV.js → chunk-DWRUOLBF.js} +4 -4
- package/dist/bundle/{chunk-5JTB4URG.js → chunk-E3VWZC3K.js} +14 -13
- package/dist/bundle/chunk-ECYOTDJM.js +14 -0
- package/dist/bundle/{chunk-7IBENBCK.js → chunk-EVG3AA5M.js} +2 -2
- package/dist/bundle/chunk-F4BX7TH2.js +15 -0
- package/dist/bundle/{chunk-FCSHWUMW.js → chunk-FBEZSA76.js} +5 -5
- package/dist/bundle/{chunk-RHSBXOQM.js → chunk-FBQJN74J.js} +1 -1
- package/dist/bundle/{chunk-4WK26MPY.js → chunk-FIZOPJYY.js} +1 -1
- package/dist/bundle/chunk-FNAYSZWK.js +783 -0
- package/dist/bundle/{chunk-LINBDWJK.js → chunk-FRCJHGZM.js} +2 -2
- package/dist/bundle/{chunk-RCTOWLCD.js → chunk-FTG5QBSD.js} +41 -33
- package/dist/bundle/{chunk-ABZ2NYDT.js → chunk-FUDUXIVG.js} +1 -1
- package/dist/bundle/{chunk-NYECVHFH.js → chunk-G4NHRFS7.js} +755 -0
- package/dist/bundle/{chunk-PAPY6Q6H.js → chunk-GIEZYBRC.js} +1 -1
- package/dist/bundle/chunk-GTPPUBYU.js +1876 -0
- package/dist/bundle/chunk-GU6ICH53.js +108 -0
- package/dist/bundle/{chunk-REM5WHHQ.js → chunk-GUMKKRE6.js} +107 -71
- package/dist/bundle/{chunk-QBAOIMVB.js → chunk-GWCDOYSC.js} +1 -1
- package/dist/bundle/{chunk-HHAZ6DCY.js → chunk-GXGSC622.js} +69 -7
- package/dist/bundle/chunk-HAGXTGJC.js +188 -0
- package/dist/bundle/{chunk-TNKQDS5A.js → chunk-IMAWQC5K.js} +6 -6
- package/dist/bundle/{chunk-ZHZYGY5R.js → chunk-IVGVVSPW.js} +4 -4
- package/dist/bundle/{chunk-EDO5LZVF.js → chunk-J4NUHSM7.js} +1 -1
- package/dist/bundle/{chunk-DVVUJ254.js → chunk-K652FYCO.js} +6 -6
- package/dist/bundle/chunk-K6ZWNTXY.js +561 -0
- package/dist/bundle/{chunk-FONIFRYI.js → chunk-KF3ZBQJV.js} +4 -4
- package/dist/bundle/chunk-KFZCHJRT.js +80 -0
- package/dist/bundle/chunk-KLPFDFLI.js +221 -0
- package/dist/bundle/{chunk-LMJBQFW6.js → chunk-KP2XMCNT.js} +13 -13
- package/dist/bundle/{chunk-FADAOLGB.js → chunk-KWDZ3KVH.js} +4 -4
- package/dist/bundle/{chunk-MXNQZAJQ.js → chunk-KX4C32WD.js} +2 -2
- package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
- package/dist/bundle/{chunk-ILAQIBEO.js → chunk-M2ZWYVWO.js} +1 -1
- package/dist/bundle/chunk-MEYYH47C.js +25 -0
- package/dist/bundle/{chunk-ZCXWV4XO.js → chunk-ML2QIWX2.js} +4 -4
- package/dist/bundle/{chunk-XOL346TJ.js → chunk-MUFF2YTH.js} +2 -2
- package/dist/bundle/{chunk-GAHIHE4K.js → chunk-N24YSLED.js} +9166 -9751
- package/dist/bundle/chunk-N4GTCPML.js +7 -0
- package/dist/bundle/{chunk-DVI72ZQG.js → chunk-NBMGDRP4.js} +1 -1
- package/dist/bundle/chunk-NMQRSEZM.js +37 -0
- package/dist/bundle/{chunk-I7YSHUPW.js → chunk-NNGA4QDR.js} +13 -26
- package/dist/bundle/{chunk-5DPV7X27.js → chunk-NTZWY5R3.js} +321 -0
- package/dist/bundle/chunk-O7CZZ36M.js +80 -0
- package/dist/bundle/{chunk-HWUPU6WX.js → chunk-OAONP6KI.js} +13 -9
- package/dist/bundle/{chunk-3CHW7JGR.js → chunk-OESP4PHB.js} +17 -17
- package/dist/bundle/chunk-OHR6IZNH.js +116 -0
- package/dist/bundle/{chunk-54NDYVZA.js → chunk-OLCU7Q2B.js} +1 -1
- package/dist/bundle/{chunk-FN3RXBO7.js → chunk-OLDQLEPA.js} +6 -6
- package/dist/bundle/{chunk-7DJNURKV.js → chunk-OPIPG6AP.js} +16 -9
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/chunk-PRYMT3OG.js +30 -0
- package/dist/bundle/chunk-QDUIVMEW.js +36 -0
- package/dist/bundle/{chunk-66PL7P4C.js → chunk-QKBPCX7Y.js} +1 -1
- package/dist/bundle/{chunk-PN4JYURZ.js → chunk-QSLOACDT.js} +201 -423
- package/dist/bundle/{chunk-3UWRAIWA.js → chunk-QUZFDU4K.js} +4 -4
- package/dist/bundle/{chunk-KSJAFMU5.js → chunk-R32DHS6J.js} +211 -380
- package/dist/bundle/{chunk-2SBC4DVV.js → chunk-R57QUYBG.js} +6 -28
- package/dist/bundle/{chunk-IFTX7AQU.js → chunk-R64OSDOD.js} +45 -66
- package/dist/bundle/{chunk-WJK6KTCS.js → chunk-RSPBVKOC.js} +8 -8
- package/dist/bundle/{chunk-GPDPEHYX.js → chunk-SPNPJ3FZ.js} +3 -4
- package/dist/bundle/chunk-SQHDSIFL.js +388 -0
- package/dist/bundle/{chunk-XZBA6FVH.js → chunk-ST35FIUG.js} +3 -3
- package/dist/bundle/{chunk-37MAA6F2.js → chunk-STUPCKAA.js} +11 -2221
- package/dist/bundle/chunk-SZ7XJZGH.js +2231 -0
- package/dist/bundle/chunk-TRYYWV7J.js +291 -0
- package/dist/bundle/{chunk-OY7TNUEC.js → chunk-TTPWKTVR.js} +1 -1
- package/dist/bundle/{chunk-3UZ4OH22.js → chunk-U7VEJ3CW.js} +49 -129
- package/dist/bundle/{chunk-6Y2BYFXQ.js → chunk-UC7JLE6J.js} +0 -7
- package/dist/bundle/{chunk-HK225DAG.js → chunk-UIQ35CA5.js} +1 -1
- package/dist/bundle/{chunk-GK3BJMGK.js → chunk-UJY26HW4.js} +1 -1
- package/dist/bundle/{chunk-EG62WVR2.js → chunk-UWG3PRY7.js} +9 -60
- package/dist/bundle/{chunk-BBRMDMIR.js → chunk-VAR3MJU6.js} +3 -3
- package/dist/bundle/{chunk-GJZSVSV3.js → chunk-VPQSI5IU.js} +4 -4
- package/dist/bundle/{chunk-YZPE72GE.js → chunk-VQPT3Y7W.js} +12 -12
- package/dist/bundle/{chunk-T5D4OGDC.js → chunk-WMG3H2VK.js} +2 -2
- package/dist/bundle/{chunk-6DPOWBKA.js → chunk-X5BGAZC5.js} +6 -6
- package/dist/bundle/{chunk-DHX27E5M.js → chunk-XC6TRWLZ.js} +3 -3
- package/dist/bundle/{chunk-Q5C6YKAY.js → chunk-XQZEMRCU.js} +402 -402
- package/dist/bundle/{chunk-54BQWRJL.js → chunk-XZ7MO6EU.js} +7 -7
- package/dist/bundle/{chunk-TGS5VPJD.js → chunk-YAIOEPKU.js} +341 -433
- package/dist/bundle/chunk-YHWFF6DN.js +39 -0
- package/dist/bundle/{chunk-WWE5GO6G.js → chunk-YWOLQEDV.js} +16 -3
- package/dist/bundle/{chunk-DR57KDAY.js → chunk-ZFDSJ5YJ.js} +38 -8
- package/dist/bundle/{chunk-BBFXQPKD.js → chunk-ZFUZEFU6.js} +3 -3
- package/dist/bundle/{chunk-YRUR3E3E.js → chunk-ZJKXSMXK.js} +72 -59
- package/dist/bundle/{chunk-BFKFKDPC.js → chunk-ZKWT6HXT.js} +1 -1
- package/dist/bundle/chunk-ZPUY3COZ.js +250 -0
- package/dist/bundle/{cli-K4D4DIGQ.js → cli-2P5FW2RL.js} +201 -98
- package/dist/bundle/command-contract-BMQT2G5X.js +45 -0
- package/dist/bundle/{command-server-entry-WREK3QBB.js → command-server-entry-KP2UDGLA.js} +36 -34
- package/dist/bundle/{decode-SEETPKBH.js → decode-K2JZ5D6V.js} +10 -10
- package/dist/bundle/{dispatch-SQCEURVK.js → dispatch-KOQZA74A.js} +10 -10
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-WZ5RKFCX.js → echarts-URO3QGCG.js} +2 -2
- package/dist/bundle/{embed-B2UCRZZR.js → embed-JLIPWTNN.js} +10 -10
- package/dist/bundle/{embedder-4R6Z7G7L.js → embedder-LUTDO3HS.js} +15 -15
- package/dist/bundle/entry-AVF6LMG7.js +25 -0
- package/dist/bundle/{failure-CYNXH3RQ.js → failure-GJMQLM7O.js} +4 -4
- package/dist/bundle/first-run-VYTIEUDA.js +31 -0
- package/dist/bundle/first-screen-QVZPF7KL.js +45 -0
- package/dist/bundle/google-VX7IPACN.js +46 -0
- package/dist/bundle/{google-api-SAND2F7L.js → google-api-RFXKRLL4.js} +88 -73
- package/dist/bundle/grants-4XWJFVD6.js +133 -0
- package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
- package/dist/bundle/hast-util-to-html-VP6XLPKJ.js +998 -0
- package/dist/bundle/hast-util-to-mdast-IZ5PRX72.js +2272 -0
- package/dist/bundle/{identity-JVVGS4U6.js → identity-FXPB5EMT.js} +7 -6
- package/dist/bundle/{instructions-JSMTSB22.js → instructions-IROIUVZI.js} +1 -1
- package/dist/bundle/{login-6WG3YBDU.js → login-WIY5VQU7.js} +96 -81
- package/dist/bundle/{mcp-VFIOZDVY.js → mcp-NJIOKW3E.js} +2 -2
- package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-HEZF7KJ4.js} +137 -195
- package/dist/bundle/mdast-util-gfm-AQW6R6MG.js +925 -0
- package/dist/bundle/mdast-util-to-hast-DF2QVIRV.js +879 -0
- package/dist/bundle/mdast-util-to-markdown-XYLXB3Z3.js +18 -0
- package/dist/bundle/meeting-combined-JUNV35GM.js +28 -0
- package/dist/bundle/meeting-model-XY4UNWWK.js +29 -0
- package/dist/bundle/{meeting-semantic-5U7JQCFF.js → meeting-semantic-62QNQMOM.js} +10 -10
- package/dist/bundle/{micromark-extension-gfm-GRL24TU6.js → micromark-extension-gfm-OE2GBORZ.js} +11 -78
- package/dist/bundle/{node-VJMVHOWD.js → node-IACCI2CW.js} +2 -2
- package/dist/bundle/{node-sqlite-DCNT3HVE.js → node-sqlite-WYIRC7C7.js} +10 -10
- package/dist/bundle/notes-search-DEDUJKSN.js +70 -0
- package/dist/bundle/oauth-HXBXF4VI.js +22 -0
- package/dist/bundle/{open-NFOEHVW7.js → open-H32B6BCT.js} +8 -8
- package/dist/bundle/{openai-D47WY7EC.js → openai-VHMPJJUG.js} +22 -21
- package/dist/bundle/{process-Q2FRU5VA.js → process-RNHPF5OK.js} +1 -1
- package/dist/bundle/{program-T2AJJQEM.js → program-GYMJ3DDH.js} +276 -1132
- package/dist/bundle/{prompt-YJSDABXN.js → prompt-TOG2CRCE.js} +8 -8
- package/dist/bundle/{reasons-WEHPCSJX.js → reasons-TLFQ45YX.js} +6 -5
- package/dist/bundle/{recognize-6OBEIEB3.js → recognize-GYGY45EY.js} +7 -7
- package/dist/bundle/remote-6XN2QLI5.js +35 -0
- package/dist/bundle/{rerank-L6F5SLIB.js → rerank-HJO3O4TW.js} +11 -11
- package/dist/bundle/{serve-GYSWIWH4.js → serve-XPCNLHCR.js} +19 -19
- package/dist/bundle/server-UBJZ66XE.js +97 -0
- package/dist/bundle/{server-GWWP3RIT.js → server-WPT3NC5B.js} +89 -70
- package/dist/bundle/{services-BDQBRXT5.js → services-253KKKVU.js} +109 -89
- package/dist/bundle/{sqlite-runtime-ZSZGAUYB.js → sqlite-runtime-EZASGJXW.js} +9 -9
- package/dist/bundle/{start-BJ275RUK.js → start-UHI35JFL.js} +7 -7
- package/dist/bundle/{state-HLNGFI2T.js → state-KJTSPFGK.js} +9 -9
- package/dist/bundle/{store-I43KZNJW.js → store-62J2H2A3.js} +36 -25
- package/dist/bundle/{store-OSRTGYGI.js → store-G5B7T7M7.js} +38 -23
- package/dist/bundle/store-maintenance-command-C6T4YLVF.js +85 -0
- package/dist/bundle/surface-3OT64BHS.js +83 -0
- package/dist/bundle/tokens-EHYO6D2X.js +133 -0
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +11 -1
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/remote.d.ts.map +1 -1
- package/dist/commands/remote.js +8 -22
- package/dist/commands/remote.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +14 -4
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -1
- package/dist/config.js.map +1 -1
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +2 -1
- package/dist/first-screen.js.map +1 -1
- package/dist/generated/manifest.d.ts +2 -1
- package/dist/generated/manifest.d.ts.map +1 -1
- package/dist/generated/manifest.js +782 -0
- package/dist/generated/manifest.js.map +1 -1
- package/dist/generated/types.d.ts +262 -58
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/google.d.ts.map +1 -1
- package/dist/google.js +5 -5
- package/dist/google.js.map +1 -1
- package/dist/model.d.ts +5 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js.map +1 -1
- package/dist/policy-keys.js +1 -1
- package/dist/policy-keys.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +9 -4
- package/dist/program.js.map +1 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +6 -1
- package/dist/state.js.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +2 -7
- package/dist/store.js.map +1 -1
- package/dist/supported.d.ts +2 -2
- package/dist/supported.d.ts.map +1 -1
- package/dist/supported.js +2 -3
- package/dist/supported.js.map +1 -1
- package/dist/sync.d.ts +2 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +6 -4
- package/dist/sync.js.map +1 -1
- package/dist/transcripts.d.ts +0 -6
- package/dist/transcripts.d.ts.map +1 -1
- package/dist/transcripts.js +0 -13
- package/dist/transcripts.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/scenarios/find-decision.md +1 -1
- package/skills/drive-cli/SKILL.md +4 -2
- package/dist/bundle/chunk-AV5UKJZM.js +0 -729
- package/dist/bundle/chunk-NP7LJATI.js +0 -598
- package/dist/bundle/chunk-P77FL6RY.js +0 -896
- package/dist/bundle/chunk-ZI3YTXSF.js +0 -2
- package/dist/bundle/command-contract-V3F452QI.js +0 -43
- package/dist/bundle/entry-ORZYRJ5N.js +0 -25
- package/dist/bundle/first-run-KAKA6KBY.js +0 -31
- package/dist/bundle/first-screen-R645UHRH.js +0 -41
- package/dist/bundle/google-BSO3YB7N.js +0 -45
- package/dist/bundle/grants-PLNFYARD.js +0 -118
- package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +0 -2103
- package/dist/bundle/meeting-combined-SUKMFK3F.js +0 -27
- package/dist/bundle/meeting-model-S4YGKIFI.js +0 -29
- package/dist/bundle/oauth-KCMNQ3ZP.js +0 -22
- package/dist/bundle/remote-3SL2QJ7T.js +0 -35
- package/dist/bundle/server-BI46BSRE.js +0 -80
- package/dist/bundle/store-maintenance-command-FO7LEVSL.js +0 -72
- package/dist/bundle/tokens-DB7O7QNB.js +0 -118
|
@@ -0,0 +1,925 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
ok
|
|
5
|
+
} from "./chunk-ECYOTDJM.js";
|
|
6
|
+
import {
|
|
7
|
+
ccount
|
|
8
|
+
} from "./chunk-MEYYH47C.js";
|
|
9
|
+
import {
|
|
10
|
+
normalizeIdentifier
|
|
11
|
+
} from "./chunk-F4BX7TH2.js";
|
|
12
|
+
import {
|
|
13
|
+
handle
|
|
14
|
+
} from "./chunk-GTPPUBYU.js";
|
|
15
|
+
import "./chunk-NMQRSEZM.js";
|
|
16
|
+
import {
|
|
17
|
+
SKIP,
|
|
18
|
+
convert,
|
|
19
|
+
visitParents
|
|
20
|
+
} from "./chunk-TRYYWV7J.js";
|
|
21
|
+
import "./chunk-4HP6KGBI.js";
|
|
22
|
+
import "./chunk-35FIJGTT.js";
|
|
23
|
+
import "./chunk-SZ7XJZGH.js";
|
|
24
|
+
import "./chunk-XFLCVHSQ.js";
|
|
25
|
+
import {
|
|
26
|
+
unicodePunctuation,
|
|
27
|
+
unicodeWhitespace
|
|
28
|
+
} from "./chunk-UC7JLE6J.js";
|
|
29
|
+
import {
|
|
30
|
+
__name
|
|
31
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
32
|
+
|
|
33
|
+
// node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
|
|
34
|
+
function escapeStringRegexp(string) {
|
|
35
|
+
if (typeof string !== "string") {
|
|
36
|
+
throw new TypeError("Expected a string");
|
|
37
|
+
}
|
|
38
|
+
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
39
|
+
}
|
|
40
|
+
__name(escapeStringRegexp, "escapeStringRegexp");
|
|
41
|
+
|
|
42
|
+
// node_modules/.pnpm/mdast-util-find-and-replace@3.0.4/node_modules/mdast-util-find-and-replace/lib/index.js
|
|
43
|
+
function findAndReplace(tree, list, options) {
|
|
44
|
+
const settings = options || {};
|
|
45
|
+
const ignored = convert(settings.ignore || []);
|
|
46
|
+
const pairs = toPairs(list);
|
|
47
|
+
let pairIndex = -1;
|
|
48
|
+
while (++pairIndex < pairs.length) {
|
|
49
|
+
visitParents(tree, visitor);
|
|
50
|
+
}
|
|
51
|
+
function visitor(node, parents, index) {
|
|
52
|
+
if (node.type === "text" && typeof index === "number") {
|
|
53
|
+
return handler(node, parents, index);
|
|
54
|
+
}
|
|
55
|
+
if (ignored(node, index, parents[parents.length - 1])) return SKIP;
|
|
56
|
+
}
|
|
57
|
+
__name(visitor, "visitor");
|
|
58
|
+
function handler(node, parents, index) {
|
|
59
|
+
const parent = parents[parents.length - 1];
|
|
60
|
+
const find = pairs[pairIndex][0];
|
|
61
|
+
const replace2 = pairs[pairIndex][1];
|
|
62
|
+
let start = 0;
|
|
63
|
+
let change = false;
|
|
64
|
+
let nodes = [];
|
|
65
|
+
find.lastIndex = 0;
|
|
66
|
+
let match = find.exec(node.value);
|
|
67
|
+
while (match) {
|
|
68
|
+
const position = match.index;
|
|
69
|
+
const matchObject = {
|
|
70
|
+
index: match.index,
|
|
71
|
+
input: match.input,
|
|
72
|
+
stack: [...parents, node]
|
|
73
|
+
};
|
|
74
|
+
let value = replace2(...match, matchObject);
|
|
75
|
+
if (typeof value === "string") {
|
|
76
|
+
value = value.length > 0 ? { type: "text", value } : void 0;
|
|
77
|
+
}
|
|
78
|
+
if (value === false) {
|
|
79
|
+
find.lastIndex = position + 1;
|
|
80
|
+
} else {
|
|
81
|
+
if (start !== position) {
|
|
82
|
+
add({ type: "text", value: node.value.slice(start, position) });
|
|
83
|
+
}
|
|
84
|
+
if (Array.isArray(value)) {
|
|
85
|
+
for (const child of value) add(child);
|
|
86
|
+
} else if (value) {
|
|
87
|
+
add(value);
|
|
88
|
+
}
|
|
89
|
+
start = position + match[0].length;
|
|
90
|
+
change = true;
|
|
91
|
+
}
|
|
92
|
+
if (!find.global) {
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
match = find.exec(node.value);
|
|
96
|
+
}
|
|
97
|
+
if (change) {
|
|
98
|
+
if (start < node.value.length) {
|
|
99
|
+
add({ type: "text", value: node.value.slice(start) });
|
|
100
|
+
}
|
|
101
|
+
parent.children.splice(index, 1, ...nodes);
|
|
102
|
+
} else {
|
|
103
|
+
nodes = [node];
|
|
104
|
+
}
|
|
105
|
+
return index + nodes.length;
|
|
106
|
+
function add(child) {
|
|
107
|
+
const previous2 = nodes[nodes.length - 1];
|
|
108
|
+
if (previous2 && previous2.type === "text" && child.type === "text") {
|
|
109
|
+
previous2.value += child.value;
|
|
110
|
+
} else {
|
|
111
|
+
nodes.push(child);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
__name(add, "add");
|
|
115
|
+
}
|
|
116
|
+
__name(handler, "handler");
|
|
117
|
+
}
|
|
118
|
+
__name(findAndReplace, "findAndReplace");
|
|
119
|
+
function toPairs(tupleOrList) {
|
|
120
|
+
if (!Array.isArray(tupleOrList)) {
|
|
121
|
+
throw new TypeError("Expected find and replace tuple or list of tuples");
|
|
122
|
+
}
|
|
123
|
+
const result = [];
|
|
124
|
+
const list = !tupleOrList[0] || Array.isArray(tupleOrList[0]) ? (
|
|
125
|
+
/** @type {FindAndReplaceList} */
|
|
126
|
+
tupleOrList
|
|
127
|
+
) : [
|
|
128
|
+
/** @type {FindAndReplaceTuple} */
|
|
129
|
+
tupleOrList
|
|
130
|
+
];
|
|
131
|
+
let index = -1;
|
|
132
|
+
while (++index < list.length) {
|
|
133
|
+
const tuple = list[index];
|
|
134
|
+
result.push([toExpression(tuple[0]), toFunction(tuple[1])]);
|
|
135
|
+
}
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
138
|
+
__name(toPairs, "toPairs");
|
|
139
|
+
function toExpression(find) {
|
|
140
|
+
return typeof find === "string" ? new RegExp(escapeStringRegexp(find), "g") : find;
|
|
141
|
+
}
|
|
142
|
+
__name(toExpression, "toExpression");
|
|
143
|
+
function toFunction(replace2) {
|
|
144
|
+
return typeof replace2 === "function" ? replace2 : function() {
|
|
145
|
+
return replace2;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
__name(toFunction, "toFunction");
|
|
149
|
+
|
|
150
|
+
// node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
|
|
151
|
+
var inConstruct = "phrasing";
|
|
152
|
+
var notInConstruct = ["autolink", "link", "image", "label"];
|
|
153
|
+
function gfmAutolinkLiteralFromMarkdown() {
|
|
154
|
+
return {
|
|
155
|
+
transforms: [transformGfmAutolinkLiterals],
|
|
156
|
+
enter: {
|
|
157
|
+
literalAutolink: enterLiteralAutolink,
|
|
158
|
+
literalAutolinkEmail: enterLiteralAutolinkValue,
|
|
159
|
+
literalAutolinkHttp: enterLiteralAutolinkValue,
|
|
160
|
+
literalAutolinkWww: enterLiteralAutolinkValue
|
|
161
|
+
},
|
|
162
|
+
exit: {
|
|
163
|
+
literalAutolink: exitLiteralAutolink,
|
|
164
|
+
literalAutolinkEmail: exitLiteralAutolinkEmail,
|
|
165
|
+
literalAutolinkHttp: exitLiteralAutolinkHttp,
|
|
166
|
+
literalAutolinkWww: exitLiteralAutolinkWww
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
__name(gfmAutolinkLiteralFromMarkdown, "gfmAutolinkLiteralFromMarkdown");
|
|
171
|
+
function gfmAutolinkLiteralToMarkdown() {
|
|
172
|
+
return {
|
|
173
|
+
unsafe: [
|
|
174
|
+
{
|
|
175
|
+
character: "@",
|
|
176
|
+
before: "[+\\-.\\w]",
|
|
177
|
+
after: "[\\-.\\w]",
|
|
178
|
+
inConstruct,
|
|
179
|
+
notInConstruct
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
character: ".",
|
|
183
|
+
before: "[Ww]",
|
|
184
|
+
after: "[\\-.\\w]",
|
|
185
|
+
inConstruct,
|
|
186
|
+
notInConstruct
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
character: ":",
|
|
190
|
+
before: "[ps]",
|
|
191
|
+
after: "\\/",
|
|
192
|
+
inConstruct,
|
|
193
|
+
notInConstruct
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
__name(gfmAutolinkLiteralToMarkdown, "gfmAutolinkLiteralToMarkdown");
|
|
199
|
+
function enterLiteralAutolink(token) {
|
|
200
|
+
this.enter({ type: "link", title: null, url: "", children: [] }, token);
|
|
201
|
+
}
|
|
202
|
+
__name(enterLiteralAutolink, "enterLiteralAutolink");
|
|
203
|
+
function enterLiteralAutolinkValue(token) {
|
|
204
|
+
this.config.enter.autolinkProtocol.call(this, token);
|
|
205
|
+
}
|
|
206
|
+
__name(enterLiteralAutolinkValue, "enterLiteralAutolinkValue");
|
|
207
|
+
function exitLiteralAutolinkHttp(token) {
|
|
208
|
+
this.config.exit.autolinkProtocol.call(this, token);
|
|
209
|
+
}
|
|
210
|
+
__name(exitLiteralAutolinkHttp, "exitLiteralAutolinkHttp");
|
|
211
|
+
function exitLiteralAutolinkWww(token) {
|
|
212
|
+
this.config.exit.data.call(this, token);
|
|
213
|
+
const node = this.stack[this.stack.length - 1];
|
|
214
|
+
ok(node.type === "link");
|
|
215
|
+
node.url = "http://" + this.sliceSerialize(token);
|
|
216
|
+
}
|
|
217
|
+
__name(exitLiteralAutolinkWww, "exitLiteralAutolinkWww");
|
|
218
|
+
function exitLiteralAutolinkEmail(token) {
|
|
219
|
+
this.config.exit.autolinkEmail.call(this, token);
|
|
220
|
+
}
|
|
221
|
+
__name(exitLiteralAutolinkEmail, "exitLiteralAutolinkEmail");
|
|
222
|
+
function exitLiteralAutolink(token) {
|
|
223
|
+
this.exit(token);
|
|
224
|
+
}
|
|
225
|
+
__name(exitLiteralAutolink, "exitLiteralAutolink");
|
|
226
|
+
function transformGfmAutolinkLiterals(tree) {
|
|
227
|
+
findAndReplace(
|
|
228
|
+
tree,
|
|
229
|
+
[
|
|
230
|
+
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],
|
|
231
|
+
[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), findEmail]
|
|
232
|
+
],
|
|
233
|
+
{ ignore: ["link", "linkReference"] }
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
__name(transformGfmAutolinkLiterals, "transformGfmAutolinkLiterals");
|
|
237
|
+
function findUrl(_, protocol, domain, path, match) {
|
|
238
|
+
let prefix = "";
|
|
239
|
+
if (!previous(match)) {
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
if (/^w/i.test(protocol)) {
|
|
243
|
+
domain = protocol + domain;
|
|
244
|
+
protocol = "";
|
|
245
|
+
prefix = "http://";
|
|
246
|
+
}
|
|
247
|
+
if (!isCorrectDomain(domain)) {
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
const parts = splitUrl(domain + path);
|
|
251
|
+
if (!parts[0]) return false;
|
|
252
|
+
const result = {
|
|
253
|
+
type: "link",
|
|
254
|
+
title: null,
|
|
255
|
+
url: prefix + protocol + parts[0],
|
|
256
|
+
children: [{ type: "text", value: protocol + parts[0] }]
|
|
257
|
+
};
|
|
258
|
+
if (parts[1]) {
|
|
259
|
+
return [result, { type: "text", value: parts[1] }];
|
|
260
|
+
}
|
|
261
|
+
return result;
|
|
262
|
+
}
|
|
263
|
+
__name(findUrl, "findUrl");
|
|
264
|
+
function findEmail(_, atext, label, match) {
|
|
265
|
+
if (
|
|
266
|
+
// Not an expected previous character.
|
|
267
|
+
!previous(match, true) || // Label ends in not allowed character.
|
|
268
|
+
/[-\d_]$/.test(label)
|
|
269
|
+
) {
|
|
270
|
+
return false;
|
|
271
|
+
}
|
|
272
|
+
return {
|
|
273
|
+
type: "link",
|
|
274
|
+
title: null,
|
|
275
|
+
url: "mailto:" + atext + "@" + label,
|
|
276
|
+
children: [{ type: "text", value: atext + "@" + label }]
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
__name(findEmail, "findEmail");
|
|
280
|
+
function isCorrectDomain(domain) {
|
|
281
|
+
const parts = domain.split(".");
|
|
282
|
+
if (parts.length < 2 || parts[parts.length - 1] && (/_/.test(parts[parts.length - 1]) || !/[a-zA-Z\d]/.test(parts[parts.length - 1])) || parts[parts.length - 2] && (/_/.test(parts[parts.length - 2]) || !/[a-zA-Z\d]/.test(parts[parts.length - 2]))) {
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
__name(isCorrectDomain, "isCorrectDomain");
|
|
288
|
+
function splitUrl(url) {
|
|
289
|
+
const trailExec = /[!"&'),.:;<>?\]}]+$/.exec(url);
|
|
290
|
+
if (!trailExec) {
|
|
291
|
+
return [url, void 0];
|
|
292
|
+
}
|
|
293
|
+
url = url.slice(0, trailExec.index);
|
|
294
|
+
let trail = trailExec[0];
|
|
295
|
+
let closingParenIndex = trail.indexOf(")");
|
|
296
|
+
const openingParens = ccount(url, "(");
|
|
297
|
+
let closingParens = ccount(url, ")");
|
|
298
|
+
while (closingParenIndex !== -1 && openingParens > closingParens) {
|
|
299
|
+
url += trail.slice(0, closingParenIndex + 1);
|
|
300
|
+
trail = trail.slice(closingParenIndex + 1);
|
|
301
|
+
closingParenIndex = trail.indexOf(")");
|
|
302
|
+
closingParens++;
|
|
303
|
+
}
|
|
304
|
+
return [url, trail];
|
|
305
|
+
}
|
|
306
|
+
__name(splitUrl, "splitUrl");
|
|
307
|
+
function previous(match, email) {
|
|
308
|
+
const code = match.input.charCodeAt(match.index - 1);
|
|
309
|
+
return (match.index === 0 || unicodeWhitespace(code) || unicodePunctuation(code)) && // If it’s an email, the previous character should not be a slash.
|
|
310
|
+
(!email || code !== 47);
|
|
311
|
+
}
|
|
312
|
+
__name(previous, "previous");
|
|
313
|
+
|
|
314
|
+
// node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.js
|
|
315
|
+
footnoteReference.peek = footnoteReferencePeek;
|
|
316
|
+
function enterFootnoteCallString() {
|
|
317
|
+
this.buffer();
|
|
318
|
+
}
|
|
319
|
+
__name(enterFootnoteCallString, "enterFootnoteCallString");
|
|
320
|
+
function enterFootnoteCall(token) {
|
|
321
|
+
this.enter({ type: "footnoteReference", identifier: "", label: "" }, token);
|
|
322
|
+
}
|
|
323
|
+
__name(enterFootnoteCall, "enterFootnoteCall");
|
|
324
|
+
function enterFootnoteDefinitionLabelString() {
|
|
325
|
+
this.buffer();
|
|
326
|
+
}
|
|
327
|
+
__name(enterFootnoteDefinitionLabelString, "enterFootnoteDefinitionLabelString");
|
|
328
|
+
function enterFootnoteDefinition(token) {
|
|
329
|
+
this.enter(
|
|
330
|
+
{ type: "footnoteDefinition", identifier: "", label: "", children: [] },
|
|
331
|
+
token
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
__name(enterFootnoteDefinition, "enterFootnoteDefinition");
|
|
335
|
+
function exitFootnoteCallString(token) {
|
|
336
|
+
const label = this.resume();
|
|
337
|
+
const node = this.stack[this.stack.length - 1];
|
|
338
|
+
ok(node.type === "footnoteReference");
|
|
339
|
+
node.identifier = normalizeIdentifier(
|
|
340
|
+
this.sliceSerialize(token)
|
|
341
|
+
).toLowerCase();
|
|
342
|
+
node.label = label;
|
|
343
|
+
}
|
|
344
|
+
__name(exitFootnoteCallString, "exitFootnoteCallString");
|
|
345
|
+
function exitFootnoteCall(token) {
|
|
346
|
+
this.exit(token);
|
|
347
|
+
}
|
|
348
|
+
__name(exitFootnoteCall, "exitFootnoteCall");
|
|
349
|
+
function exitFootnoteDefinitionLabelString(token) {
|
|
350
|
+
const label = this.resume();
|
|
351
|
+
const node = this.stack[this.stack.length - 1];
|
|
352
|
+
ok(node.type === "footnoteDefinition");
|
|
353
|
+
node.identifier = normalizeIdentifier(
|
|
354
|
+
this.sliceSerialize(token)
|
|
355
|
+
).toLowerCase();
|
|
356
|
+
node.label = label;
|
|
357
|
+
}
|
|
358
|
+
__name(exitFootnoteDefinitionLabelString, "exitFootnoteDefinitionLabelString");
|
|
359
|
+
function exitFootnoteDefinition(token) {
|
|
360
|
+
this.exit(token);
|
|
361
|
+
}
|
|
362
|
+
__name(exitFootnoteDefinition, "exitFootnoteDefinition");
|
|
363
|
+
function footnoteReferencePeek() {
|
|
364
|
+
return "[";
|
|
365
|
+
}
|
|
366
|
+
__name(footnoteReferencePeek, "footnoteReferencePeek");
|
|
367
|
+
function footnoteReference(node, _, state, info) {
|
|
368
|
+
const tracker = state.createTracker(info);
|
|
369
|
+
let value = tracker.move("[^");
|
|
370
|
+
const exit2 = state.enter("footnoteReference");
|
|
371
|
+
const subexit = state.enter("reference");
|
|
372
|
+
value += tracker.move(
|
|
373
|
+
state.safe(state.associationId(node), { after: "]", before: value })
|
|
374
|
+
);
|
|
375
|
+
subexit();
|
|
376
|
+
exit2();
|
|
377
|
+
value += tracker.move("]");
|
|
378
|
+
return value;
|
|
379
|
+
}
|
|
380
|
+
__name(footnoteReference, "footnoteReference");
|
|
381
|
+
function gfmFootnoteFromMarkdown() {
|
|
382
|
+
return {
|
|
383
|
+
enter: {
|
|
384
|
+
gfmFootnoteCallString: enterFootnoteCallString,
|
|
385
|
+
gfmFootnoteCall: enterFootnoteCall,
|
|
386
|
+
gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,
|
|
387
|
+
gfmFootnoteDefinition: enterFootnoteDefinition
|
|
388
|
+
},
|
|
389
|
+
exit: {
|
|
390
|
+
gfmFootnoteCallString: exitFootnoteCallString,
|
|
391
|
+
gfmFootnoteCall: exitFootnoteCall,
|
|
392
|
+
gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,
|
|
393
|
+
gfmFootnoteDefinition: exitFootnoteDefinition
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
__name(gfmFootnoteFromMarkdown, "gfmFootnoteFromMarkdown");
|
|
398
|
+
function gfmFootnoteToMarkdown(options) {
|
|
399
|
+
let firstLineBlank = false;
|
|
400
|
+
if (options && options.firstLineBlank) {
|
|
401
|
+
firstLineBlank = true;
|
|
402
|
+
}
|
|
403
|
+
return {
|
|
404
|
+
handlers: { footnoteDefinition, footnoteReference },
|
|
405
|
+
// This is on by default already.
|
|
406
|
+
unsafe: [{ character: "[", inConstruct: ["label", "phrasing", "reference"] }]
|
|
407
|
+
};
|
|
408
|
+
function footnoteDefinition(node, _, state, info) {
|
|
409
|
+
const tracker = state.createTracker(info);
|
|
410
|
+
let value = tracker.move("[^");
|
|
411
|
+
const exit2 = state.enter("footnoteDefinition");
|
|
412
|
+
const subexit = state.enter("label");
|
|
413
|
+
value += tracker.move(
|
|
414
|
+
state.safe(state.associationId(node), { before: value, after: "]" })
|
|
415
|
+
);
|
|
416
|
+
subexit();
|
|
417
|
+
value += tracker.move("]:");
|
|
418
|
+
if (node.children && node.children.length > 0) {
|
|
419
|
+
tracker.shift(4);
|
|
420
|
+
value += tracker.move(
|
|
421
|
+
(firstLineBlank ? "\n" : " ") + state.indentLines(
|
|
422
|
+
state.containerFlow(node, tracker.current()),
|
|
423
|
+
firstLineBlank ? mapAll : mapExceptFirst
|
|
424
|
+
)
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
exit2();
|
|
428
|
+
return value;
|
|
429
|
+
}
|
|
430
|
+
__name(footnoteDefinition, "footnoteDefinition");
|
|
431
|
+
}
|
|
432
|
+
__name(gfmFootnoteToMarkdown, "gfmFootnoteToMarkdown");
|
|
433
|
+
function mapExceptFirst(line, index, blank) {
|
|
434
|
+
return index === 0 ? line : mapAll(line, index, blank);
|
|
435
|
+
}
|
|
436
|
+
__name(mapExceptFirst, "mapExceptFirst");
|
|
437
|
+
function mapAll(line, index, blank) {
|
|
438
|
+
return (blank ? "" : " ") + line;
|
|
439
|
+
}
|
|
440
|
+
__name(mapAll, "mapAll");
|
|
441
|
+
|
|
442
|
+
// node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.1/node_modules/mdast-util-gfm-strikethrough/lib/index.js
|
|
443
|
+
var constructsWithoutStrikethrough = [
|
|
444
|
+
"autolink",
|
|
445
|
+
"destinationLiteral",
|
|
446
|
+
"destinationRaw",
|
|
447
|
+
"reference",
|
|
448
|
+
"titleQuote",
|
|
449
|
+
"titleApostrophe"
|
|
450
|
+
];
|
|
451
|
+
handleDelete.attention = attentionDelete;
|
|
452
|
+
handleDelete.peek = peekDelete;
|
|
453
|
+
function gfmStrikethroughFromMarkdown() {
|
|
454
|
+
return {
|
|
455
|
+
canContainEols: ["delete"],
|
|
456
|
+
enter: { strikethrough: enterStrikethrough },
|
|
457
|
+
exit: { strikethrough: exitStrikethrough }
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
__name(gfmStrikethroughFromMarkdown, "gfmStrikethroughFromMarkdown");
|
|
461
|
+
function gfmStrikethroughToMarkdown() {
|
|
462
|
+
return {
|
|
463
|
+
handlers: { delete: handleDelete },
|
|
464
|
+
unsafe: [
|
|
465
|
+
{
|
|
466
|
+
character: "~",
|
|
467
|
+
inConstruct: "phrasing",
|
|
468
|
+
notInConstruct: constructsWithoutStrikethrough
|
|
469
|
+
}
|
|
470
|
+
]
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
__name(gfmStrikethroughToMarkdown, "gfmStrikethroughToMarkdown");
|
|
474
|
+
function enterStrikethrough(token) {
|
|
475
|
+
this.enter({ type: "delete", children: [], position: void 0 }, token);
|
|
476
|
+
}
|
|
477
|
+
__name(enterStrikethrough, "enterStrikethrough");
|
|
478
|
+
function exitStrikethrough(token) {
|
|
479
|
+
this.exit(token);
|
|
480
|
+
}
|
|
481
|
+
__name(exitStrikethrough, "exitStrikethrough");
|
|
482
|
+
function handleDelete(node, _, state, info) {
|
|
483
|
+
const tracker = state.createTracker(info);
|
|
484
|
+
const sequence = state.stack.includes("strikethrough") ? "~" : "~~";
|
|
485
|
+
const exit2 = state.enter("strikethrough");
|
|
486
|
+
let value = tracker.move(sequence);
|
|
487
|
+
value += state.containerPhrasing(node, {
|
|
488
|
+
...tracker.current(),
|
|
489
|
+
before: value,
|
|
490
|
+
after: "~"
|
|
491
|
+
});
|
|
492
|
+
value += tracker.move(sequence);
|
|
493
|
+
exit2();
|
|
494
|
+
return value;
|
|
495
|
+
}
|
|
496
|
+
__name(handleDelete, "handleDelete");
|
|
497
|
+
function attentionDelete() {
|
|
498
|
+
return { construct: "strikethrough", markers: ["~"], sizes: [2, 1] };
|
|
499
|
+
}
|
|
500
|
+
__name(attentionDelete, "attentionDelete");
|
|
501
|
+
function peekDelete() {
|
|
502
|
+
return "~";
|
|
503
|
+
}
|
|
504
|
+
__name(peekDelete, "peekDelete");
|
|
505
|
+
|
|
506
|
+
// node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.js
|
|
507
|
+
function defaultStringLength(value) {
|
|
508
|
+
return value.length;
|
|
509
|
+
}
|
|
510
|
+
__name(defaultStringLength, "defaultStringLength");
|
|
511
|
+
function markdownTable(table, options) {
|
|
512
|
+
const settings = options || {};
|
|
513
|
+
const align = (settings.align || []).concat();
|
|
514
|
+
const stringLength = settings.stringLength || defaultStringLength;
|
|
515
|
+
const alignments = [];
|
|
516
|
+
const cellMatrix = [];
|
|
517
|
+
const sizeMatrix = [];
|
|
518
|
+
const longestCellByColumn = [];
|
|
519
|
+
let mostCellsPerRow = 0;
|
|
520
|
+
let rowIndex = -1;
|
|
521
|
+
while (++rowIndex < table.length) {
|
|
522
|
+
const row2 = [];
|
|
523
|
+
const sizes2 = [];
|
|
524
|
+
let columnIndex2 = -1;
|
|
525
|
+
if (table[rowIndex].length > mostCellsPerRow) {
|
|
526
|
+
mostCellsPerRow = table[rowIndex].length;
|
|
527
|
+
}
|
|
528
|
+
while (++columnIndex2 < table[rowIndex].length) {
|
|
529
|
+
const cell = serialize(table[rowIndex][columnIndex2]);
|
|
530
|
+
if (settings.alignDelimiters !== false) {
|
|
531
|
+
const size = stringLength(cell);
|
|
532
|
+
sizes2[columnIndex2] = size;
|
|
533
|
+
if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {
|
|
534
|
+
longestCellByColumn[columnIndex2] = size;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
row2.push(cell);
|
|
538
|
+
}
|
|
539
|
+
cellMatrix[rowIndex] = row2;
|
|
540
|
+
sizeMatrix[rowIndex] = sizes2;
|
|
541
|
+
}
|
|
542
|
+
let columnIndex = -1;
|
|
543
|
+
if (typeof align === "object" && "length" in align) {
|
|
544
|
+
while (++columnIndex < mostCellsPerRow) {
|
|
545
|
+
alignments[columnIndex] = toAlignment(align[columnIndex]);
|
|
546
|
+
}
|
|
547
|
+
} else {
|
|
548
|
+
const code = toAlignment(align);
|
|
549
|
+
while (++columnIndex < mostCellsPerRow) {
|
|
550
|
+
alignments[columnIndex] = code;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
columnIndex = -1;
|
|
554
|
+
const row = [];
|
|
555
|
+
const sizes = [];
|
|
556
|
+
while (++columnIndex < mostCellsPerRow) {
|
|
557
|
+
const code = alignments[columnIndex];
|
|
558
|
+
let before = "";
|
|
559
|
+
let after = "";
|
|
560
|
+
if (code === 99) {
|
|
561
|
+
before = ":";
|
|
562
|
+
after = ":";
|
|
563
|
+
} else if (code === 108) {
|
|
564
|
+
before = ":";
|
|
565
|
+
} else if (code === 114) {
|
|
566
|
+
after = ":";
|
|
567
|
+
}
|
|
568
|
+
let size = settings.alignDelimiters === false ? 1 : Math.max(
|
|
569
|
+
1,
|
|
570
|
+
longestCellByColumn[columnIndex] - before.length - after.length
|
|
571
|
+
);
|
|
572
|
+
const cell = before + "-".repeat(size) + after;
|
|
573
|
+
if (settings.alignDelimiters !== false) {
|
|
574
|
+
size = before.length + size + after.length;
|
|
575
|
+
if (size > longestCellByColumn[columnIndex]) {
|
|
576
|
+
longestCellByColumn[columnIndex] = size;
|
|
577
|
+
}
|
|
578
|
+
sizes[columnIndex] = size;
|
|
579
|
+
}
|
|
580
|
+
row[columnIndex] = cell;
|
|
581
|
+
}
|
|
582
|
+
cellMatrix.splice(1, 0, row);
|
|
583
|
+
sizeMatrix.splice(1, 0, sizes);
|
|
584
|
+
rowIndex = -1;
|
|
585
|
+
const lines = [];
|
|
586
|
+
while (++rowIndex < cellMatrix.length) {
|
|
587
|
+
const row2 = cellMatrix[rowIndex];
|
|
588
|
+
const sizes2 = sizeMatrix[rowIndex];
|
|
589
|
+
columnIndex = -1;
|
|
590
|
+
const line = [];
|
|
591
|
+
while (++columnIndex < mostCellsPerRow) {
|
|
592
|
+
const cell = row2[columnIndex] || "";
|
|
593
|
+
let before = "";
|
|
594
|
+
let after = "";
|
|
595
|
+
if (settings.alignDelimiters !== false) {
|
|
596
|
+
const size = longestCellByColumn[columnIndex] - (sizes2[columnIndex] || 0);
|
|
597
|
+
const code = alignments[columnIndex];
|
|
598
|
+
if (code === 114) {
|
|
599
|
+
before = " ".repeat(size);
|
|
600
|
+
} else if (code === 99) {
|
|
601
|
+
if (size % 2) {
|
|
602
|
+
before = " ".repeat(size / 2 + 0.5);
|
|
603
|
+
after = " ".repeat(size / 2 - 0.5);
|
|
604
|
+
} else {
|
|
605
|
+
before = " ".repeat(size / 2);
|
|
606
|
+
after = before;
|
|
607
|
+
}
|
|
608
|
+
} else {
|
|
609
|
+
after = " ".repeat(size);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
if (settings.delimiterStart !== false && !columnIndex) {
|
|
613
|
+
line.push("|");
|
|
614
|
+
}
|
|
615
|
+
if (settings.padding !== false && // Don’t add the opening space if we’re not aligning and the cell is
|
|
616
|
+
// empty: there will be a closing space.
|
|
617
|
+
!(settings.alignDelimiters === false && cell === "") && (settings.delimiterStart !== false || columnIndex)) {
|
|
618
|
+
line.push(" ");
|
|
619
|
+
}
|
|
620
|
+
if (settings.alignDelimiters !== false) {
|
|
621
|
+
line.push(before);
|
|
622
|
+
}
|
|
623
|
+
line.push(cell);
|
|
624
|
+
if (settings.alignDelimiters !== false) {
|
|
625
|
+
line.push(after);
|
|
626
|
+
}
|
|
627
|
+
if (settings.padding !== false) {
|
|
628
|
+
line.push(" ");
|
|
629
|
+
}
|
|
630
|
+
if (settings.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) {
|
|
631
|
+
line.push("|");
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
lines.push(
|
|
635
|
+
settings.delimiterEnd === false ? line.join("").replace(/ +$/, "") : line.join("")
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
return lines.join("\n");
|
|
639
|
+
}
|
|
640
|
+
__name(markdownTable, "markdownTable");
|
|
641
|
+
function serialize(value) {
|
|
642
|
+
return value === null || value === void 0 ? "" : String(value);
|
|
643
|
+
}
|
|
644
|
+
__name(serialize, "serialize");
|
|
645
|
+
function toAlignment(value) {
|
|
646
|
+
const code = typeof value === "string" ? value.codePointAt(0) : 0;
|
|
647
|
+
return code === 67 || code === 99 ? 99 : code === 76 || code === 108 ? 108 : code === 82 || code === 114 ? 114 : 0;
|
|
648
|
+
}
|
|
649
|
+
__name(toAlignment, "toAlignment");
|
|
650
|
+
|
|
651
|
+
// node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.js
|
|
652
|
+
function gfmTableFromMarkdown() {
|
|
653
|
+
return {
|
|
654
|
+
enter: {
|
|
655
|
+
table: enterTable,
|
|
656
|
+
tableData: enterCell,
|
|
657
|
+
tableHeader: enterCell,
|
|
658
|
+
tableRow: enterRow
|
|
659
|
+
},
|
|
660
|
+
exit: {
|
|
661
|
+
codeText: exitCodeText,
|
|
662
|
+
table: exitTable,
|
|
663
|
+
tableData: exit,
|
|
664
|
+
tableHeader: exit,
|
|
665
|
+
tableRow: exit
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
__name(gfmTableFromMarkdown, "gfmTableFromMarkdown");
|
|
670
|
+
function enterTable(token) {
|
|
671
|
+
const align = token._align;
|
|
672
|
+
ok(align, "expected `_align` on table");
|
|
673
|
+
this.enter(
|
|
674
|
+
{
|
|
675
|
+
type: "table",
|
|
676
|
+
align: align.map(function(d) {
|
|
677
|
+
return d === "none" ? null : d;
|
|
678
|
+
}),
|
|
679
|
+
children: []
|
|
680
|
+
},
|
|
681
|
+
token
|
|
682
|
+
);
|
|
683
|
+
this.data.inTable = true;
|
|
684
|
+
}
|
|
685
|
+
__name(enterTable, "enterTable");
|
|
686
|
+
function exitTable(token) {
|
|
687
|
+
this.exit(token);
|
|
688
|
+
this.data.inTable = void 0;
|
|
689
|
+
}
|
|
690
|
+
__name(exitTable, "exitTable");
|
|
691
|
+
function enterRow(token) {
|
|
692
|
+
this.enter({ type: "tableRow", children: [] }, token);
|
|
693
|
+
}
|
|
694
|
+
__name(enterRow, "enterRow");
|
|
695
|
+
function exit(token) {
|
|
696
|
+
this.exit(token);
|
|
697
|
+
}
|
|
698
|
+
__name(exit, "exit");
|
|
699
|
+
function enterCell(token) {
|
|
700
|
+
this.enter({ type: "tableCell", children: [] }, token);
|
|
701
|
+
}
|
|
702
|
+
__name(enterCell, "enterCell");
|
|
703
|
+
function exitCodeText(token) {
|
|
704
|
+
let value = this.resume();
|
|
705
|
+
if (this.data.inTable) {
|
|
706
|
+
value = value.replace(/\\([\\|])/g, replace);
|
|
707
|
+
}
|
|
708
|
+
const node = this.stack[this.stack.length - 1];
|
|
709
|
+
ok(node.type === "inlineCode");
|
|
710
|
+
node.value = value;
|
|
711
|
+
this.exit(token);
|
|
712
|
+
}
|
|
713
|
+
__name(exitCodeText, "exitCodeText");
|
|
714
|
+
function replace($0, $1) {
|
|
715
|
+
return $1 === "|" ? $1 : $0;
|
|
716
|
+
}
|
|
717
|
+
__name(replace, "replace");
|
|
718
|
+
function gfmTableToMarkdown(options) {
|
|
719
|
+
const settings = options || {};
|
|
720
|
+
const padding = settings.tableCellPadding;
|
|
721
|
+
const alignDelimiters = settings.tablePipeAlign;
|
|
722
|
+
const stringLength = settings.stringLength;
|
|
723
|
+
const around = padding ? " " : "|";
|
|
724
|
+
return {
|
|
725
|
+
unsafe: [
|
|
726
|
+
{ character: "\r", inConstruct: "tableCell" },
|
|
727
|
+
{ character: "\n", inConstruct: "tableCell" },
|
|
728
|
+
// A pipe, when followed by a tab or space (padding), or a dash or colon
|
|
729
|
+
// (unpadded delimiter row), could result in a table.
|
|
730
|
+
{ atBreak: true, character: "|", after: "[ :-]" },
|
|
731
|
+
// A pipe in a cell must be encoded.
|
|
732
|
+
{ character: "|", inConstruct: "tableCell" },
|
|
733
|
+
// A colon must be followed by a dash, in which case it could start a
|
|
734
|
+
// delimiter row.
|
|
735
|
+
{ atBreak: true, character: ":", after: "-" },
|
|
736
|
+
// A delimiter row can also start with a dash, when followed by more
|
|
737
|
+
// dashes, a colon, or a pipe.
|
|
738
|
+
// This is a stricter version than the built in check for lists, thematic
|
|
739
|
+
// breaks, and setex heading underlines though:
|
|
740
|
+
// <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>
|
|
741
|
+
{ atBreak: true, character: "-", after: "[:|-]" }
|
|
742
|
+
],
|
|
743
|
+
handlers: {
|
|
744
|
+
inlineCode: inlineCodeWithTable,
|
|
745
|
+
table: handleTable,
|
|
746
|
+
tableCell: handleTableCell,
|
|
747
|
+
tableRow: handleTableRow
|
|
748
|
+
}
|
|
749
|
+
};
|
|
750
|
+
function handleTable(node, _, state, info) {
|
|
751
|
+
return serializeData(handleTableAsData(node, state, info), node.align);
|
|
752
|
+
}
|
|
753
|
+
__name(handleTable, "handleTable");
|
|
754
|
+
function handleTableRow(node, _, state, info) {
|
|
755
|
+
const row = handleTableRowAsData(node, state, info);
|
|
756
|
+
const value = serializeData([row]);
|
|
757
|
+
return value.slice(0, value.indexOf("\n"));
|
|
758
|
+
}
|
|
759
|
+
__name(handleTableRow, "handleTableRow");
|
|
760
|
+
function handleTableCell(node, _, state, info) {
|
|
761
|
+
const exit2 = state.enter("tableCell");
|
|
762
|
+
const subexit = state.enter("phrasing");
|
|
763
|
+
const value = state.containerPhrasing(node, {
|
|
764
|
+
...info,
|
|
765
|
+
before: around,
|
|
766
|
+
after: around
|
|
767
|
+
});
|
|
768
|
+
subexit();
|
|
769
|
+
exit2();
|
|
770
|
+
return value;
|
|
771
|
+
}
|
|
772
|
+
__name(handleTableCell, "handleTableCell");
|
|
773
|
+
function serializeData(matrix, align) {
|
|
774
|
+
return markdownTable(matrix, {
|
|
775
|
+
align,
|
|
776
|
+
// @ts-expect-error: `markdown-table` types should support `null`.
|
|
777
|
+
alignDelimiters,
|
|
778
|
+
// @ts-expect-error: `markdown-table` types should support `null`.
|
|
779
|
+
padding,
|
|
780
|
+
// @ts-expect-error: `markdown-table` types should support `null`.
|
|
781
|
+
stringLength
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
__name(serializeData, "serializeData");
|
|
785
|
+
function handleTableAsData(node, state, info) {
|
|
786
|
+
const children = node.children;
|
|
787
|
+
let index = -1;
|
|
788
|
+
const result = [];
|
|
789
|
+
const subexit = state.enter("table");
|
|
790
|
+
while (++index < children.length) {
|
|
791
|
+
result[index] = handleTableRowAsData(children[index], state, info);
|
|
792
|
+
}
|
|
793
|
+
subexit();
|
|
794
|
+
return result;
|
|
795
|
+
}
|
|
796
|
+
__name(handleTableAsData, "handleTableAsData");
|
|
797
|
+
function handleTableRowAsData(node, state, info) {
|
|
798
|
+
const children = node.children;
|
|
799
|
+
let index = -1;
|
|
800
|
+
const result = [];
|
|
801
|
+
const subexit = state.enter("tableRow");
|
|
802
|
+
while (++index < children.length) {
|
|
803
|
+
result[index] = handleTableCell(children[index], node, state, info);
|
|
804
|
+
}
|
|
805
|
+
subexit();
|
|
806
|
+
return result;
|
|
807
|
+
}
|
|
808
|
+
__name(handleTableRowAsData, "handleTableRowAsData");
|
|
809
|
+
function inlineCodeWithTable(node, parent, state) {
|
|
810
|
+
let value = handle.inlineCode(node, parent, state);
|
|
811
|
+
if (state.stack.includes("tableCell")) {
|
|
812
|
+
value = value.replace(/\|/g, "\\$&");
|
|
813
|
+
}
|
|
814
|
+
return value;
|
|
815
|
+
}
|
|
816
|
+
__name(inlineCodeWithTable, "inlineCodeWithTable");
|
|
817
|
+
}
|
|
818
|
+
__name(gfmTableToMarkdown, "gfmTableToMarkdown");
|
|
819
|
+
|
|
820
|
+
// node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.js
|
|
821
|
+
function gfmTaskListItemFromMarkdown() {
|
|
822
|
+
return {
|
|
823
|
+
exit: {
|
|
824
|
+
taskListCheckValueChecked: exitCheck,
|
|
825
|
+
taskListCheckValueUnchecked: exitCheck,
|
|
826
|
+
paragraph: exitParagraphWithTaskListItem
|
|
827
|
+
}
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
__name(gfmTaskListItemFromMarkdown, "gfmTaskListItemFromMarkdown");
|
|
831
|
+
function gfmTaskListItemToMarkdown() {
|
|
832
|
+
return {
|
|
833
|
+
unsafe: [{ atBreak: true, character: "-", after: "[:|-]" }],
|
|
834
|
+
handlers: { listItem: listItemWithTaskListItem }
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
__name(gfmTaskListItemToMarkdown, "gfmTaskListItemToMarkdown");
|
|
838
|
+
function exitCheck(token) {
|
|
839
|
+
const node = this.stack[this.stack.length - 2];
|
|
840
|
+
ok(node.type === "listItem");
|
|
841
|
+
node.checked = token.type === "taskListCheckValueChecked";
|
|
842
|
+
}
|
|
843
|
+
__name(exitCheck, "exitCheck");
|
|
844
|
+
function exitParagraphWithTaskListItem(token) {
|
|
845
|
+
const parent = this.stack[this.stack.length - 2];
|
|
846
|
+
if (parent && parent.type === "listItem" && typeof parent.checked === "boolean") {
|
|
847
|
+
const node = this.stack[this.stack.length - 1];
|
|
848
|
+
ok(node.type === "paragraph");
|
|
849
|
+
const head = node.children[0];
|
|
850
|
+
if (head && head.type === "text") {
|
|
851
|
+
const siblings = parent.children;
|
|
852
|
+
let index = -1;
|
|
853
|
+
let firstParaghraph;
|
|
854
|
+
while (++index < siblings.length) {
|
|
855
|
+
const sibling = siblings[index];
|
|
856
|
+
if (sibling.type === "paragraph") {
|
|
857
|
+
firstParaghraph = sibling;
|
|
858
|
+
break;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
if (firstParaghraph === node) {
|
|
862
|
+
head.value = head.value.slice(1);
|
|
863
|
+
if (head.value.length === 0) {
|
|
864
|
+
node.children.shift();
|
|
865
|
+
} else if (node.position && head.position && typeof head.position.start.offset === "number") {
|
|
866
|
+
head.position.start.column++;
|
|
867
|
+
head.position.start.offset++;
|
|
868
|
+
node.position.start = Object.assign({}, head.position.start);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
this.exit(token);
|
|
874
|
+
}
|
|
875
|
+
__name(exitParagraphWithTaskListItem, "exitParagraphWithTaskListItem");
|
|
876
|
+
function listItemWithTaskListItem(node, parent, state, info) {
|
|
877
|
+
const head = node.children[0];
|
|
878
|
+
const checkable = typeof node.checked === "boolean" && head && head.type === "paragraph";
|
|
879
|
+
const checkbox = "[" + (node.checked ? "x" : " ") + "] ";
|
|
880
|
+
const tracker = state.createTracker(info);
|
|
881
|
+
if (checkable) {
|
|
882
|
+
tracker.move(checkbox);
|
|
883
|
+
}
|
|
884
|
+
let value = handle.listItem(node, parent, state, {
|
|
885
|
+
...info,
|
|
886
|
+
...tracker.current()
|
|
887
|
+
});
|
|
888
|
+
if (checkable) {
|
|
889
|
+
value = value.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, check);
|
|
890
|
+
}
|
|
891
|
+
return value;
|
|
892
|
+
function check($0) {
|
|
893
|
+
return $0 + checkbox;
|
|
894
|
+
}
|
|
895
|
+
__name(check, "check");
|
|
896
|
+
}
|
|
897
|
+
__name(listItemWithTaskListItem, "listItemWithTaskListItem");
|
|
898
|
+
|
|
899
|
+
// node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.js
|
|
900
|
+
function gfmFromMarkdown() {
|
|
901
|
+
return [
|
|
902
|
+
gfmAutolinkLiteralFromMarkdown(),
|
|
903
|
+
gfmFootnoteFromMarkdown(),
|
|
904
|
+
gfmStrikethroughFromMarkdown(),
|
|
905
|
+
gfmTableFromMarkdown(),
|
|
906
|
+
gfmTaskListItemFromMarkdown()
|
|
907
|
+
];
|
|
908
|
+
}
|
|
909
|
+
__name(gfmFromMarkdown, "gfmFromMarkdown");
|
|
910
|
+
function gfmToMarkdown(options) {
|
|
911
|
+
return {
|
|
912
|
+
extensions: [
|
|
913
|
+
gfmAutolinkLiteralToMarkdown(),
|
|
914
|
+
gfmFootnoteToMarkdown(options),
|
|
915
|
+
gfmStrikethroughToMarkdown(),
|
|
916
|
+
gfmTableToMarkdown(options),
|
|
917
|
+
gfmTaskListItemToMarkdown()
|
|
918
|
+
]
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
__name(gfmToMarkdown, "gfmToMarkdown");
|
|
922
|
+
export {
|
|
923
|
+
gfmFromMarkdown,
|
|
924
|
+
gfmToMarkdown
|
|
925
|
+
};
|