@retrivora-ai/rag-engine 2.5.3 → 2.5.5
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/FREE_TIER_ARCHITECTURE.md +232 -232
- package/README.md +206 -206
- package/dist/handlers/index.d.mts +2 -2
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.js +129 -82
- package/dist/handlers/index.mjs +11888 -24
- package/dist/{BatchProcessor-B8OLSahY.d.ts → index-8vijDPfT.d.ts} +395 -379
- package/dist/{BatchProcessor-OVOIlNfK.d.mts → index-BKOyhayB.d.mts} +395 -379
- package/dist/{index-BSzhBMdH.d.mts → index-DE8qPWpI.d.mts} +1 -1
- package/dist/{index-T-TH-wJd.d.ts → index-DkOhRqEc.d.ts} +1 -1
- package/dist/index.css +851 -1352
- package/dist/index.d.mts +54 -30
- package/dist/index.d.ts +54 -30
- package/dist/index.js +3779 -3790
- package/dist/index.min.css +2 -2
- package/dist/index.mjs +1641 -310
- package/dist/server.d.mts +32 -31
- package/dist/server.d.ts +32 -31
- package/dist/server.js +151 -84
- package/dist/server.mjs +12444 -371
- package/package.json +157 -157
- package/dist/1c-EBREIWTW.mjs +0 -146
- package/dist/ChromaDBProvider-4RPJN7Y3.mjs +0 -8
- package/dist/ChromaDBProvider-G2V6SE7V.mjs +0 -8
- package/dist/MilvusProvider-FWDM6SB6.mjs +0 -8
- package/dist/MilvusProvider-WJLLZ6TW.mjs +0 -8
- package/dist/MongoDBProvider-QSERELZX.mjs +0 -8
- package/dist/MongoDBProvider-QXKT6PP6.mjs +0 -8
- package/dist/MultiTablePostgresProvider-2X2DMRKH.mjs +0 -9
- package/dist/MultiTablePostgresProvider-JF2HEUDZ.mjs +0 -9
- package/dist/PineconeProvider-Q5SD254K.mjs +0 -10
- package/dist/PineconeProvider-SM6ULSYT.mjs +0 -10
- package/dist/PostgreSQLProvider-JQMCNHRO.mjs +0 -8
- package/dist/PostgreSQLProvider-YET2HBKQ.mjs +0 -8
- package/dist/QdrantProvider-6MNFPEVC.mjs +0 -8
- package/dist/QdrantProvider-OHKKKERB.mjs +0 -8
- package/dist/RedisProvider-ERQL6AEB.mjs +0 -8
- package/dist/RedisProvider-XXXBWC4L.mjs +0 -8
- package/dist/SimpleGraphProvider-3FBIK4SP.mjs +0 -70
- package/dist/SimpleGraphProvider-OP3HAJJM.mjs +0 -70
- package/dist/UniversalVectorProvider-INM3KH5F.mjs +0 -9
- package/dist/UniversalVectorProvider-JNGYSY6K.mjs +0 -9
- package/dist/WeaviateProvider-VHWWICCC.mjs +0 -8
- package/dist/WeaviateProvider-WILDWYCU.mjs +0 -8
- package/dist/abap-WNGGW2VB.mjs +0 -7
- package/dist/abnf-BGGAKJOG.mjs +0 -80
- package/dist/abnf-CLVQL7IW.mjs +0 -7
- package/dist/accesslog-AW4TMVBR.mjs +0 -102
- package/dist/actionscript-LDBW7DZN.mjs +0 -9
- package/dist/actionscript-SJQA7YO2.mjs +0 -92
- package/dist/ada-5NUV4FXL.mjs +0 -7
- package/dist/ada-C4SZDD2N.mjs +0 -153
- package/dist/agda-UD47ECFZ.mjs +0 -7
- package/dist/al-TFIDG74E.mjs +0 -7
- package/dist/all-XHREXETZ.mjs +0 -305
- package/dist/angelscript-ACNK4CYA.mjs +0 -124
- package/dist/antlr4-G6CQUZ2D.mjs +0 -7
- package/dist/apache-XDWBIP3F.mjs +0 -84
- package/dist/apacheconf-Y65Q5KSY.mjs +0 -7
- package/dist/apex-EWTMFSY5.mjs +0 -9
- package/dist/apl-ZJEOL4BM.mjs +0 -7
- package/dist/applescript-LSSKJYWQ.mjs +0 -146
- package/dist/applescript-TDKWHEBN.mjs +0 -7
- package/dist/aql-C7I3QNPK.mjs +0 -7
- package/dist/arcade-EYNEVUEM.mjs +0 -154
- package/dist/arduino-JOVHFA3R.mjs +0 -10
- package/dist/arduino-WPJOZF2Q.mjs +0 -430
- package/dist/arff-KZ7QGS44.mjs +0 -7
- package/dist/armasm-AEPI2UBM.mjs +0 -101
- package/dist/armasm-I36FUMNF.mjs +0 -7
- package/dist/arturo-BQ3VRFKF.mjs +0 -7
- package/dist/asciidoc-7THCKEEE.mjs +0 -7
- package/dist/asciidoc-FCEOLYRF.mjs +0 -283
- package/dist/asm6502-MQSXKVKX.mjs +0 -7
- package/dist/asmatmel-VYPLCNX4.mjs +0 -7
- package/dist/aspectj-K3JIUMID.mjs +0 -161
- package/dist/aspnet-YIFISSHD.mjs +0 -10
- package/dist/autohotkey-3FUCNGDY.mjs +0 -7
- package/dist/autohotkey-S675MA75.mjs +0 -84
- package/dist/autoit-6EC4LIFF.mjs +0 -7
- package/dist/autoit-OYRPIUEX.mjs +0 -168
- package/dist/avisynth-SJN5SPLC.mjs +0 -7
- package/dist/avrasm-6YKZF5NN.mjs +0 -69
- package/dist/avro-idl-DU6N3NTX.mjs +0 -7
- package/dist/awk-DFHXRUGP.mjs +0 -74
- package/dist/awk-EHJ72KGN.mjs +0 -7
- package/dist/axapta-J6O4OPTW.mjs +0 -175
- package/dist/bash-L47TFVTQ.mjs +0 -144
- package/dist/bash-RW5QGICG.mjs +0 -7
- package/dist/basic-KRHBUH4Q.mjs +0 -7
- package/dist/basic-XCFCUNQJ.mjs +0 -54
- package/dist/batch-XOXCYEL4.mjs +0 -7
- package/dist/bbcode-HGCFVVJQ.mjs +0 -7
- package/dist/bbj-MFUEOWFL.mjs +0 -7
- package/dist/bicep-COPGQHAW.mjs +0 -7
- package/dist/birb-RNKSLPQ7.mjs +0 -8
- package/dist/bison-P5JHD2NT.mjs +0 -9
- package/dist/bnf-22GAP3DX.mjs +0 -40
- package/dist/bnf-CZNGBIRM.mjs +0 -7
- package/dist/bqn-C72UTBAF.mjs +0 -7
- package/dist/brainfuck-RX67ZTKJ.mjs +0 -7
- package/dist/brainfuck-XOLDR7KM.mjs +0 -48
- package/dist/brightscript-7QASPOYI.mjs +0 -7
- package/dist/bro-AI3KSENM.mjs +0 -7
- package/dist/bsl-DRVDLKP6.mjs +0 -7
- package/dist/c-L6PNSVOV.mjs +0 -253
- package/dist/c-VSCSOGCO.mjs +0 -8
- package/dist/c-like-3HOZD2N5.mjs +0 -430
- package/dist/cal-I27UVPAA.mjs +0 -101
- package/dist/capnproto-OHUPLF3N.mjs +0 -62
- package/dist/ceylon-HGLYEJK7.mjs +0 -73
- package/dist/cfscript-MFVE7RSZ.mjs +0 -8
- package/dist/chaiscript-JMR44JSQ.mjs +0 -10
- package/dist/chunk-24KBROYU.mjs +0 -64
- package/dist/chunk-2AL6NDUD.mjs +0 -69
- package/dist/chunk-2ZGMRLS2.mjs +0 -73
- package/dist/chunk-353NWWBK.mjs +0 -79
- package/dist/chunk-36GPRAF6.mjs +0 -102
- package/dist/chunk-37YNNB3W.mjs +0 -61
- package/dist/chunk-3B67MLYC.mjs +0 -197
- package/dist/chunk-3JZPJ5J4.mjs +0 -82
- package/dist/chunk-3LVEBYSC.mjs +0 -374
- package/dist/chunk-3P2MI7HF.mjs +0 -336
- package/dist/chunk-3RZAZFEU.mjs +0 -177
- package/dist/chunk-3SIHJKB4.mjs +0 -34
- package/dist/chunk-3YYX3D4T.mjs +0 -156
- package/dist/chunk-425XUIWE.mjs +0 -61
- package/dist/chunk-44M35G7Z.mjs +0 -54
- package/dist/chunk-45ZOXJFQ.mjs +0 -29
- package/dist/chunk-46PPCH2N.mjs +0 -52
- package/dist/chunk-4GPCGAFU.mjs +0 -318
- package/dist/chunk-4H4VBYBC.mjs +0 -31
- package/dist/chunk-4MS5JQEH.mjs +0 -49
- package/dist/chunk-4RZ3ACXD.mjs +0 -30
- package/dist/chunk-4S53M4C4.mjs +0 -83
- package/dist/chunk-4VWIH6DQ.mjs +0 -47
- package/dist/chunk-4X2CL3IQ.mjs +0 -109
- package/dist/chunk-4XWE2SWC.mjs +0 -52
- package/dist/chunk-53KZDXRW.mjs +0 -143
- package/dist/chunk-53Q6ESIL.mjs +0 -41
- package/dist/chunk-54WCNRZJ.mjs +0 -29
- package/dist/chunk-56226XXM.mjs +0 -165
- package/dist/chunk-56OI6W4H.mjs +0 -29
- package/dist/chunk-5BDPKJ6Y.mjs +0 -306
- package/dist/chunk-5F42BHTW.mjs +0 -112
- package/dist/chunk-5ID4EPQA.mjs +0 -131
- package/dist/chunk-5IXLUSDV.mjs +0 -53
- package/dist/chunk-5RROYZHX.mjs +0 -28
- package/dist/chunk-5UV7M5EU.mjs +0 -41
- package/dist/chunk-5XDBEAKK.mjs +0 -48
- package/dist/chunk-62WBBPBE.mjs +0 -651
- package/dist/chunk-6CLUTKPO.mjs +0 -57
- package/dist/chunk-6J2OLOZQ.mjs +0 -56
- package/dist/chunk-6J5SU6C7.mjs +0 -73
- package/dist/chunk-6OIK4NDX.mjs +0 -20
- package/dist/chunk-6TDWOHUA.mjs +0 -112
- package/dist/chunk-6WEP476E.mjs +0 -129
- package/dist/chunk-6WT5UGSS.mjs +0 -64
- package/dist/chunk-6YA4NYTY.mjs +0 -41
- package/dist/chunk-7ACPC4WG.mjs +0 -105
- package/dist/chunk-7EKXO46A.mjs +0 -39
- package/dist/chunk-7EWVBXEM.mjs +0 -29
- package/dist/chunk-7JAAWZ6M.mjs +0 -22
- package/dist/chunk-7K2L66XX.mjs +0 -73
- package/dist/chunk-7NFKVMAZ.mjs +0 -98
- package/dist/chunk-7PUPFWKS.mjs +0 -68
- package/dist/chunk-7YES2STE.mjs +0 -34
- package/dist/chunk-AD5VQQXO.mjs +0 -28
- package/dist/chunk-AGBAETQL.mjs +0 -50
- package/dist/chunk-ARO6I5WR.mjs +0 -122
- package/dist/chunk-ATH2U2VT.mjs +0 -38
- package/dist/chunk-AVHZ6YNV.mjs +0 -39
- package/dist/chunk-AZNYSXF2.mjs +0 -283
- package/dist/chunk-AZR3CC74.mjs +0 -23305
- package/dist/chunk-AZVF7NXO.mjs +0 -107
- package/dist/chunk-B36KGPR3.mjs +0 -36
- package/dist/chunk-B4AXIUM7.mjs +0 -49
- package/dist/chunk-B5SMFA6Y.mjs +0 -356
- package/dist/chunk-BAOD4KDW.mjs +0 -21
- package/dist/chunk-BEPLYQBS.mjs +0 -89
- package/dist/chunk-BMS3P73V.mjs +0 -80
- package/dist/chunk-BNOPQCZW.mjs +0 -238
- package/dist/chunk-BNUG5H34.mjs +0 -40
- package/dist/chunk-BR6K55MU.mjs +0 -36
- package/dist/chunk-BTVRNVQM.mjs +0 -55
- package/dist/chunk-BZCXV3LG.mjs +0 -107
- package/dist/chunk-C2A43JHI.mjs +0 -37
- package/dist/chunk-C2S4QV4U.mjs +0 -87
- package/dist/chunk-C32XOSS6.mjs +0 -88
- package/dist/chunk-C5ALZKTS.mjs +0 -72
- package/dist/chunk-C7KTMGHZ.mjs +0 -29
- package/dist/chunk-CASPYOUV.mjs +0 -33
- package/dist/chunk-CJLO3EDH.mjs +0 -157
- package/dist/chunk-CKTJQRFM.mjs +0 -30
- package/dist/chunk-COLGDCFR.mjs +0 -37
- package/dist/chunk-CX776XAS.mjs +0 -70
- package/dist/chunk-CYBAJKNA.mjs +0 -96
- package/dist/chunk-CYHP3BTO.mjs +0 -43
- package/dist/chunk-D2X6GS5O.mjs +0 -138
- package/dist/chunk-DA7JAJTU.mjs +0 -37
- package/dist/chunk-DABY3J56.mjs +0 -22
- package/dist/chunk-DDAURLDF.mjs +0 -66
- package/dist/chunk-DGDYNWYR.mjs +0 -65
- package/dist/chunk-DGRKZN3X.mjs +0 -158
- package/dist/chunk-DI4VFT7Q.mjs +0 -41
- package/dist/chunk-DM36CSZO.mjs +0 -191
- package/dist/chunk-DOENMU66.mjs +0 -58
- package/dist/chunk-DPLQGHIH.mjs +0 -281
- package/dist/chunk-DRJEECIQ.mjs +0 -72
- package/dist/chunk-DT2OSTVS.mjs +0 -54
- package/dist/chunk-DXT2K7WR.mjs +0 -56
- package/dist/chunk-E2526GUT.mjs +0 -30
- package/dist/chunk-E26IAM43.mjs +0 -145
- package/dist/chunk-ECEYM4LR.mjs +0 -55
- package/dist/chunk-ECP2LGXT.mjs +0 -35
- package/dist/chunk-EFECPLWP.mjs +0 -18
- package/dist/chunk-EM77UBEU.mjs +0 -68
- package/dist/chunk-ENBRIH7E.mjs +0 -60
- package/dist/chunk-EPFSENEW.mjs +0 -28
- package/dist/chunk-EVS3BFHU.mjs +0 -156
- package/dist/chunk-EZZI6VVY.mjs +0 -134
- package/dist/chunk-F5A7WWU7.mjs +0 -31
- package/dist/chunk-F5BFQTNM.mjs +0 -207
- package/dist/chunk-F6MFGVUD.mjs +0 -69
- package/dist/chunk-FGXIA3R7.mjs +0 -37
- package/dist/chunk-FHVJNAYD.mjs +0 -100
- package/dist/chunk-FKSBUL4E.mjs +0 -74
- package/dist/chunk-FLJJMJSJ.mjs +0 -87
- package/dist/chunk-FLOHZEYO.mjs +0 -36
- package/dist/chunk-FNLDG434.mjs +0 -72
- package/dist/chunk-FOVZHPLR.mjs +0 -27
- package/dist/chunk-FWGKSVXV.mjs +0 -34
- package/dist/chunk-FZF3BLSB.mjs +0 -96
- package/dist/chunk-G3ZDT4R5.mjs +0 -318
- package/dist/chunk-G5XSLDAB.mjs +0 -234
- package/dist/chunk-G73FQRRH.mjs +0 -4720
- package/dist/chunk-GFAAOIJ7.mjs +0 -56
- package/dist/chunk-GKTJV6TW.mjs +0 -81
- package/dist/chunk-GLIHIGNW.mjs +0 -52
- package/dist/chunk-GMDOMJ2U.mjs +0 -89
- package/dist/chunk-GP2AJQRQ.mjs +0 -107
- package/dist/chunk-GUI4PF6W.mjs +0 -59
- package/dist/chunk-GW3C7ZEN.mjs +0 -44
- package/dist/chunk-GWULZIAC.mjs +0 -49
- package/dist/chunk-GYHTSAUQ.mjs +0 -64
- package/dist/chunk-GYN4DEP4.mjs +0 -58
- package/dist/chunk-HAWFTDSB.mjs +0 -20
- package/dist/chunk-HIFPVOLS.mjs +0 -88
- package/dist/chunk-HMDPGJHZ.mjs +0 -33
- package/dist/chunk-HRB4D3AQ.mjs +0 -40
- package/dist/chunk-HSKFBW5N.mjs +0 -35
- package/dist/chunk-HTNRSSPJ.mjs +0 -145
- package/dist/chunk-HUMYU6YT.mjs +0 -107
- package/dist/chunk-HV7ENVP6.mjs +0 -53
- package/dist/chunk-HWKTI4K5.mjs +0 -58
- package/dist/chunk-HZDVG65R.mjs +0 -211
- package/dist/chunk-IJARWX2J.mjs +0 -31
- package/dist/chunk-IKEYRVNO.mjs +0 -146
- package/dist/chunk-IKTUEH2L.mjs +0 -54
- package/dist/chunk-IKXNCR5M.mjs +0 -40
- package/dist/chunk-ILV4WMVY.mjs +0 -144
- package/dist/chunk-IMP6FUCY.mjs +0 -30
- package/dist/chunk-IN7MHMT7.mjs +0 -152
- package/dist/chunk-IOSXMLA3.mjs +0 -51
- package/dist/chunk-IZBADY66.mjs +0 -141
- package/dist/chunk-J4ZJ66CR.mjs +0 -35
- package/dist/chunk-J5HJOWHG.mjs +0 -89
- package/dist/chunk-J6TZWF5T.mjs +0 -28
- package/dist/chunk-J74VV3TW.mjs +0 -90
- package/dist/chunk-JEEODZGS.mjs +0 -106
- package/dist/chunk-JL6ZSWZP.mjs +0 -37
- package/dist/chunk-JRQWSJNF.mjs +0 -202
- package/dist/chunk-JS7TBJC3.mjs +0 -50
- package/dist/chunk-JWQFZ37Q.mjs +0 -27
- package/dist/chunk-JYZAXNEX.mjs +0 -72
- package/dist/chunk-JZDXZFTC.mjs +0 -19
- package/dist/chunk-K24TPR3X.mjs +0 -72
- package/dist/chunk-K4PNNFZZ.mjs +0 -98
- package/dist/chunk-KCTI32UG.mjs +0 -57
- package/dist/chunk-KD7Y3NQE.mjs +0 -70
- package/dist/chunk-KHAAYTKK.mjs +0 -107
- package/dist/chunk-KJWL6BH2.mjs +0 -63
- package/dist/chunk-KK3VUFRU.mjs +0 -65
- package/dist/chunk-KLF6W6OK.mjs +0 -96
- package/dist/chunk-KO2RCBMO.mjs +0 -53
- package/dist/chunk-KUL33RN6.mjs +0 -23
- package/dist/chunk-KUPY2M4R.mjs +0 -39
- package/dist/chunk-KWN4H2SK.mjs +0 -78
- package/dist/chunk-KYHHBFFU.mjs +0 -43
- package/dist/chunk-L5J5BRSV.mjs +0 -26
- package/dist/chunk-LAL4U5ZY.mjs +0 -87
- package/dist/chunk-LF5D4CD4.mjs +0 -94
- package/dist/chunk-LHSMOUWA.mjs +0 -36
- package/dist/chunk-LL5HM2IL.mjs +0 -22
- package/dist/chunk-LONF3WLA.mjs +0 -61
- package/dist/chunk-LPIMB7BN.mjs +0 -33
- package/dist/chunk-LSSEZBDR.mjs +0 -37
- package/dist/chunk-LYHCKUNF.mjs +0 -112
- package/dist/chunk-M5IOO2NE.mjs +0 -77
- package/dist/chunk-MBCXE2JX.mjs +0 -43
- package/dist/chunk-MBEKXI2X.mjs +0 -23
- package/dist/chunk-MFIWWUC7.mjs +0 -152
- package/dist/chunk-MGWM63L3.mjs +0 -92
- package/dist/chunk-MQASXSQP.mjs +0 -113
- package/dist/chunk-MS4V6IZO.mjs +0 -931
- package/dist/chunk-MSLEAWCD.mjs +0 -21
- package/dist/chunk-MU2WX5MJ.mjs +0 -116
- package/dist/chunk-MUVFBHMZ.mjs +0 -97
- package/dist/chunk-MWICNCB2.mjs +0 -157
- package/dist/chunk-MZJMWUUV.mjs +0 -81
- package/dist/chunk-N2KO4GER.mjs +0 -127
- package/dist/chunk-N54YTFBN.mjs +0 -76
- package/dist/chunk-ND3IPLH2.mjs +0 -95
- package/dist/chunk-NF5WZDWP.mjs +0 -105
- package/dist/chunk-NFOQ23PO.mjs +0 -67
- package/dist/chunk-NLAJ7DKF.mjs +0 -36
- package/dist/chunk-NNDFANAN.mjs +0 -38
- package/dist/chunk-NRA5D7QO.mjs +0 -93
- package/dist/chunk-NROFUE73.mjs +0 -50
- package/dist/chunk-NTUTBJ7Y.mjs +0 -72
- package/dist/chunk-NXICO2UA.mjs +0 -64
- package/dist/chunk-NYBB6PRX.mjs +0 -31
- package/dist/chunk-O2ZYAHJD.mjs +0 -51
- package/dist/chunk-O3H6GV3Y.mjs +0 -65
- package/dist/chunk-OB4PPPH2.mjs +0 -42
- package/dist/chunk-OKIWJ7FA.mjs +0 -236
- package/dist/chunk-ORVO4EZJ.mjs +0 -21
- package/dist/chunk-OUYML22K.mjs +0 -57
- package/dist/chunk-OZYKOI26.mjs +0 -91
- package/dist/chunk-P3ELVMCC.mjs +0 -152
- package/dist/chunk-P6TDRTZQ.mjs +0 -57
- package/dist/chunk-PG7O6BY6.mjs +0 -60
- package/dist/chunk-PGCE2UE5.mjs +0 -22
- package/dist/chunk-PIMBXK6H.mjs +0 -51
- package/dist/chunk-PL6S4P4B.mjs +0 -73
- package/dist/chunk-POOWU2HR.mjs +0 -211
- package/dist/chunk-PQDAGF45.mjs +0 -93
- package/dist/chunk-PVILVBTP.mjs +0 -29
- package/dist/chunk-PYI2JMTB.mjs +0 -96
- package/dist/chunk-Q2QAZZT2.mjs +0 -31
- package/dist/chunk-QAOPNIPD.mjs +0 -34
- package/dist/chunk-QEMWQTNW.mjs +0 -98
- package/dist/chunk-QGVNUT2H.mjs +0 -59
- package/dist/chunk-QHF5K7KB.mjs +0 -107
- package/dist/chunk-QJWOEPXO.mjs +0 -238
- package/dist/chunk-QOBL2CCS.mjs +0 -30
- package/dist/chunk-QOGP6RKQ.mjs +0 -145
- package/dist/chunk-QOPA32CS.mjs +0 -57
- package/dist/chunk-QOSBCNOL.mjs +0 -76
- package/dist/chunk-QP7Q6T4D.mjs +0 -146
- package/dist/chunk-QUC5WXRL.mjs +0 -61
- package/dist/chunk-R2ACZM6S.mjs +0 -39
- package/dist/chunk-R4HNDMW7.mjs +0 -36
- package/dist/chunk-R5QMEYGM.mjs +0 -105
- package/dist/chunk-RBXXHJS3.mjs +0 -44
- package/dist/chunk-RFWLCVJI.mjs +0 -53
- package/dist/chunk-RJHP2TRO.mjs +0 -342
- package/dist/chunk-RL545ZDL.mjs +0 -57
- package/dist/chunk-RM2AN4WX.mjs +0 -19
- package/dist/chunk-RV2EV72B.mjs +0 -17
- package/dist/chunk-RV63XGV4.mjs +0 -33
- package/dist/chunk-RVXIWAZN.mjs +0 -50
- package/dist/chunk-RYEHGIGZ.mjs +0 -37
- package/dist/chunk-S45OTSGB.mjs +0 -33
- package/dist/chunk-S4AFUAMK.mjs +0 -46
- package/dist/chunk-SA7NQFBH.mjs +0 -55
- package/dist/chunk-SBC7VBZN.mjs +0 -229
- package/dist/chunk-SCH4R4AJ.mjs +0 -154
- package/dist/chunk-SCXMB3X3.mjs +0 -93
- package/dist/chunk-SK64537N.mjs +0 -51
- package/dist/chunk-SKR2H5PP.mjs +0 -49
- package/dist/chunk-SNL4I326.mjs +0 -100
- package/dist/chunk-SPLIZTXR.mjs +0 -32
- package/dist/chunk-SRYYJW6L.mjs +0 -124
- package/dist/chunk-T37HUHMP.mjs +0 -89
- package/dist/chunk-T5QKF6NH.mjs +0 -41
- package/dist/chunk-TDYA7OZL.mjs +0 -141
- package/dist/chunk-TK3ZBYU3.mjs +0 -81
- package/dist/chunk-TNDIFWEF.mjs +0 -46
- package/dist/chunk-TYOOLW7O.mjs +0 -86
- package/dist/chunk-TZDJJPDB.mjs +0 -97
- package/dist/chunk-U2Y2KG4V.mjs +0 -38
- package/dist/chunk-U33ZZ3Q5.mjs +0 -1193
- package/dist/chunk-U766TQKY.mjs +0 -66
- package/dist/chunk-UAMSMWXX.mjs +0 -26
- package/dist/chunk-UBG4IN2Y.mjs +0 -152
- package/dist/chunk-UFW3LUKC.mjs +0 -25
- package/dist/chunk-UM4DIO3H.mjs +0 -19
- package/dist/chunk-UP4YFQ5C.mjs +0 -186
- package/dist/chunk-UP6R6FXP.mjs +0 -46
- package/dist/chunk-USYLX2KE.mjs +0 -8691
- package/dist/chunk-UUIR3O4R.mjs +0 -24
- package/dist/chunk-UYNKZWSI.mjs +0 -49
- package/dist/chunk-UZ64LFY3.mjs +0 -19
- package/dist/chunk-V5FEJO5H.mjs +0 -203
- package/dist/chunk-V6KLBTID.mjs +0 -47
- package/dist/chunk-VAWLUSHA.mjs +0 -62
- package/dist/chunk-VCRH6KHB.mjs +0 -43
- package/dist/chunk-VKUTQHLL.mjs +0 -69
- package/dist/chunk-VLTOV7HT.mjs +0 -81
- package/dist/chunk-VO56WRKB.mjs +0 -29
- package/dist/chunk-VOEQS3R4.mjs +0 -54
- package/dist/chunk-VRQ6DRFR.mjs +0 -66
- package/dist/chunk-VXIVRVUP.mjs +0 -74
- package/dist/chunk-VY6R5EWX.mjs +0 -29
- package/dist/chunk-VZAGOPXK.mjs +0 -129
- package/dist/chunk-VZTB23JU.mjs +0 -29
- package/dist/chunk-W2DKVD3G.mjs +0 -81
- package/dist/chunk-W4FIJVDH.mjs +0 -192
- package/dist/chunk-WAIRETE3.mjs +0 -111
- package/dist/chunk-WBZ7QUFI.mjs +0 -44
- package/dist/chunk-WDJODUZW.mjs +0 -89
- package/dist/chunk-WG7TKVBL.mjs +0 -72
- package/dist/chunk-WGKQSSVM.mjs +0 -34
- package/dist/chunk-WSFQS3WJ.mjs +0 -17
- package/dist/chunk-X4RRHV3M.mjs +0 -41
- package/dist/chunk-X5WFUYZB.mjs +0 -31
- package/dist/chunk-X6TJKD4J.mjs +0 -69
- package/dist/chunk-X6Z6T7ZP.mjs +0 -40
- package/dist/chunk-XHSDHPKI.mjs +0 -336
- package/dist/chunk-XJCKDBMP.mjs +0 -37
- package/dist/chunk-XLH3B3GV.mjs +0 -65
- package/dist/chunk-XMF4PKWZ.mjs +0 -37
- package/dist/chunk-XTMKISZY.mjs +0 -130
- package/dist/chunk-Y6CL6A3V.mjs +0 -43
- package/dist/chunk-YCZHGF5L.mjs +0 -121
- package/dist/chunk-YDIELCJS.mjs +0 -91
- package/dist/chunk-YEUDGGMZ.mjs +0 -96
- package/dist/chunk-YEXGYK57.mjs +0 -92
- package/dist/chunk-YI3LY73Z.mjs +0 -17
- package/dist/chunk-YI4DBSAT.mjs +0 -28
- package/dist/chunk-YKMHUGN4.mjs +0 -651
- package/dist/chunk-YSPBV2YN.mjs +0 -421
- package/dist/chunk-YVVDPSKP.mjs +0 -197
- package/dist/chunk-YYSN3YCL.mjs +0 -26
- package/dist/chunk-Z3AKA3KE.mjs +0 -30
- package/dist/chunk-Z6JJIYMP.mjs +0 -34
- package/dist/chunk-ZA465M4H.mjs +0 -46
- package/dist/chunk-ZC367C4K.mjs +0 -281
- package/dist/chunk-ZCJNV2WB.mjs +0 -90
- package/dist/chunk-ZH2VDUC2.mjs +0 -34
- package/dist/chunk-ZHBKXVTG.mjs +0 -53
- package/dist/chunk-ZJ2FMMA4.mjs +0 -31
- package/dist/chunk-ZKOCHX43.mjs +0 -140
- package/dist/chunk-ZTTIDD57.mjs +0 -72
- package/dist/chunk-ZUW5WWT6.mjs +0 -13
- package/dist/cil-OX77PIZP.mjs +0 -7
- package/dist/cilkc-BDYOXZY5.mjs +0 -9
- package/dist/cilkcpp-KZN7MPWX.mjs +0 -10
- package/dist/clean-BLPANDN4.mjs +0 -36
- package/dist/clike-UUOWHDIR.mjs +0 -7
- package/dist/clojure-4MK5ONG5.mjs +0 -127
- package/dist/clojure-KTYQ4S7G.mjs +0 -7
- package/dist/clojure-repl-HWYI7CXM.mjs +0 -26
- package/dist/cmake-WHHZR2V7.mjs +0 -7
- package/dist/cmake-X2SGPNAG.mjs +0 -34
- package/dist/cobol-3CRTQG4X.mjs +0 -7
- package/dist/coffeescript-2BBF2PM5.mjs +0 -9
- package/dist/coffeescript-6KMIBZTX.mjs +0 -348
- package/dist/concurnas-CMH2MQMO.mjs +0 -7
- package/dist/cooklang-XPZDBZRQ.mjs +0 -7
- package/dist/coq-VPBWZI4H.mjs +0 -7
- package/dist/coq-XHEDPREY.mjs +0 -35
- package/dist/core-53TVE6ED.mjs +0 -1811
- package/dist/core-EFA5INDY.mjs +0 -7
- package/dist/cos-MTQDQCSA.mjs +0 -98
- package/dist/cpp-22ZXPFI6.mjs +0 -409
- package/dist/cpp-3QCYFNK6.mjs +0 -9
- package/dist/crmsh-3WRNVSTP.mjs +0 -97
- package/dist/crystal-2EHE2T46.mjs +0 -322
- package/dist/crystal-NWCQSLUO.mjs +0 -9
- package/dist/csharp-O3I3SJ3U.mjs +0 -8
- package/dist/csharp-ZV6YFQOP.mjs +0 -438
- package/dist/cshtml-LHWACG2S.mjs +0 -10
- package/dist/csp-35EVUMH3.mjs +0 -7
- package/dist/csp-VGB42C4V.mjs +0 -34
- package/dist/css-MNNVIBFJ.mjs +0 -7
- package/dist/css-SEV6MHRT.mjs +0 -597
- package/dist/css-extras-VESJUQ7R.mjs +0 -8
- package/dist/csv-Q6LVKY6B.mjs +0 -7
- package/dist/cue-4HRQJQ3R.mjs +0 -7
- package/dist/cypher-GT3MK3QV.mjs +0 -7
- package/dist/d-3DEZYWVP.mjs +0 -8
- package/dist/d-3ZCSNCJV.mjs +0 -121
- package/dist/dart-QALF24GY.mjs +0 -8
- package/dist/dart-XRFXD5NS.mjs +0 -189
- package/dist/dataweave-CEXE5S2M.mjs +0 -7
- package/dist/dax-7F67K7YK.mjs +0 -7
- package/dist/delphi-WFNKQ6WQ.mjs +0 -118
- package/dist/dhall-IBEFEXHW.mjs +0 -7
- package/dist/diff-FMR6ALMO.mjs +0 -7
- package/dist/diff-YPVRB2CU.mjs +0 -85
- package/dist/django-5YUPXABX.mjs +0 -9
- package/dist/django-LT2HNZGS.mjs +0 -57
- package/dist/dns-IFOJ77LV.mjs +0 -45
- package/dist/dns-zone-file-2CGVUUHD.mjs +0 -7
- package/dist/docker-QUSAJHC2.mjs +0 -7
- package/dist/dockerfile-ZB7LFK2K.mjs +0 -33
- package/dist/dos-GS4GLAUA.mjs +0 -61
- package/dist/dot-EJOMR6ES.mjs +0 -7
- package/dist/dsconfig-VJKRFJYE.mjs +0 -66
- package/dist/dts-ACRDLUDL.mjs +0 -144
- package/dist/dust-PTJ3DDBL.mjs +0 -44
- package/dist/ebnf-B3NDJ47R.mjs +0 -51
- package/dist/ebnf-XR4NJT5O.mjs +0 -7
- package/dist/editorconfig-YIXKX6PC.mjs +0 -7
- package/dist/eiffel-Z3NTT5RG.mjs +0 -7
- package/dist/ejs-HSSKSQKD.mjs +0 -11
- package/dist/elixir-DUZIZIJE.mjs +0 -7
- package/dist/elixir-FE2WKL6Y.mjs +0 -260
- package/dist/elm-5LDDVRJS.mjs +0 -120
- package/dist/elm-LI4XTQ6E.mjs +0 -7
- package/dist/erb-ANDNIMHK.mjs +0 -11
- package/dist/erb-SYU7FYSK.mjs +0 -27
- package/dist/erlang-KDEF4DYJ.mjs +0 -7
- package/dist/erlang-WDL2I3MK.mjs +0 -192
- package/dist/erlang-repl-NFUOVYAF.mjs +0 -70
- package/dist/etlua-X55UO5HM.mjs +0 -10
- package/dist/excel-IXNS4PYL.mjs +0 -69
- package/dist/excel-formula-MCOXGT6C.mjs +0 -7
- package/dist/factor-YNYKUWUH.mjs +0 -7
- package/dist/false-DPAUHKI5.mjs +0 -7
- package/dist/firestore-security-rules-A7WORSBC.mjs +0 -8
- package/dist/fix-NLAEEWWO.mjs +0 -40
- package/dist/flix-ZSHQ5XTB.mjs +0 -51
- package/dist/flow-6FFTX3ZP.mjs +0 -9
- package/dist/fortran-3AEDT6XT.mjs +0 -102
- package/dist/fortran-B3P5B7ES.mjs +0 -7
- package/dist/fsharp-BC5JMMR2.mjs +0 -8
- package/dist/fsharp-JITTJ54M.mjs +0 -79
- package/dist/ftl-AGA3I4XJ.mjs +0 -9
- package/dist/gams-WAPNC62I.mjs +0 -177
- package/dist/gap-NQYBQZ2B.mjs +0 -7
- package/dist/gauss-MECLGUAT.mjs +0 -206
- package/dist/gcode-MG7JXQ7V.mjs +0 -88
- package/dist/gcode-RRRVAYT2.mjs +0 -7
- package/dist/gdscript-ENR6AP4E.mjs +0 -7
- package/dist/gedcom-XBQGOHZ3.mjs +0 -7
- package/dist/gettext-6PGLS7V5.mjs +0 -7
- package/dist/gherkin-2H4XSYV4.mjs +0 -7
- package/dist/gherkin-3GRG53ES.mjs +0 -51
- package/dist/git-TYFIJXO4.mjs +0 -7
- package/dist/glsl-D26NB6J3.mjs +0 -9
- package/dist/glsl-LL7DU4TU.mjs +0 -39
- package/dist/gml-B52KPF4C.mjs +0 -8
- package/dist/gml-SI5MSGKE.mjs +0 -32
- package/dist/gn-3SZRXCF5.mjs +0 -7
- package/dist/go-ILRFIZP3.mjs +0 -8
- package/dist/go-QV2RBBLW.mjs +0 -69
- package/dist/go-module-RS3DPE3U.mjs +0 -7
- package/dist/golo-CIYAWEC6.mjs +0 -29
- package/dist/gradle-FT5KGOKN.mjs +0 -28
- package/dist/gradle-JDKJRVUN.mjs +0 -8
- package/dist/graphql-ARI5GIJV.mjs +0 -7
- package/dist/groovy-EITVUB7G.mjs +0 -8
- package/dist/groovy-VNBLNCR2.mjs +0 -147
- package/dist/haml-2ASE7KCG.mjs +0 -9
- package/dist/haml-WK3PC3I5.mjs +0 -117
- package/dist/handlebars-VVNCKCG2.mjs +0 -9
- package/dist/handlebars-ZL76DGI2.mjs +0 -270
- package/dist/haskell-6ILWUO7I.mjs +0 -7
- package/dist/haskell-NTK5RBZP.mjs +0 -163
- package/dist/haxe-4QQCCPVH.mjs +0 -8
- package/dist/haxe-5MW6GLB2.mjs +0 -162
- package/dist/hcl-73BIQ3M4.mjs +0 -7
- package/dist/hlsl-OULX4HA6.mjs +0 -9
- package/dist/hoon-LUXS3O2A.mjs +0 -7
- package/dist/hpkp-ML5FM4Q7.mjs +0 -7
- package/dist/hsp-IAWLPXBG.mjs +0 -62
- package/dist/hsts-Y7BGEHZR.mjs +0 -7
- package/dist/htmlbars-S6FRWYPY.mjs +0 -278
- package/dist/http-TJ7OZI2Q.mjs +0 -106
- package/dist/http-XL3ZNGIY.mjs +0 -7
- package/dist/hy-FUJRHAQL.mjs +0 -82
- package/dist/ichigojam-UFIQSIDS.mjs +0 -7
- package/dist/icon-L3WTN2K2.mjs +0 -7
- package/dist/icu-message-format-BQRWIPGH.mjs +0 -7
- package/dist/idris-ZDQ4PXMA.mjs +0 -8
- package/dist/iecst-TD53KMLC.mjs +0 -7
- package/dist/ignore-YJEHPWMH.mjs +0 -7
- package/dist/inform7-3RY726UI.mjs +0 -66
- package/dist/inform7-YPPQWHLN.mjs +0 -7
- package/dist/ini-CETYIAUM.mjs +0 -7
- package/dist/ini-SPOLXKBK.mjs +0 -148
- package/dist/io-EYJW7VN6.mjs +0 -7
- package/dist/irpf90-6SBM76YD.mjs +0 -81
- package/dist/isbl-FSGOKI4V.mjs +0 -268
- package/dist/j-Q5JQ4SLX.mjs +0 -7
- package/dist/java-DJQZUC6R.mjs +0 -177
- package/dist/java-YR4IU5BM.mjs +0 -8
- package/dist/javadoc-BRJNCLP6.mjs +0 -11
- package/dist/javadoclike-TFSRBPQM.mjs +0 -7
- package/dist/javascript-2ZEIO6XD.mjs +0 -552
- package/dist/javascript-QTUJKQHC.mjs +0 -8
- package/dist/javastacktrace-GGTEZXE3.mjs +0 -7
- package/dist/jboss-cli-77LKGYS3.mjs +0 -62
- package/dist/jexl-BTJOELHK.mjs +0 -7
- package/dist/jolie-FSJACUDX.mjs +0 -8
- package/dist/jq-ZM5F7ZDK.mjs +0 -7
- package/dist/js-extras-4DGOZNV7.mjs +0 -9
- package/dist/js-templates-NCH5GDOS.mjs +0 -9
- package/dist/jsdoc-RVRQ2ONF.mjs +0 -11
- package/dist/json-ROTEBQRJ.mjs +0 -7
- package/dist/json-YZZOVRBO.mjs +0 -65
- package/dist/json5-UP2ZOKOQ.mjs +0 -8
- package/dist/jsonp-DR56NR56.mjs +0 -8
- package/dist/jsstacktrace-VDL5T4D5.mjs +0 -7
- package/dist/jsx-SXP6XKYC.mjs +0 -10
- package/dist/julia-HTJ7H7C7.mjs +0 -7
- package/dist/julia-Q4ZVHRDI.mjs +0 -356
- package/dist/julia-repl-BTX3J3NJ.mjs +0 -35
- package/dist/keepalived-QZJZ5HOV.mjs +0 -7
- package/dist/keyman-ZGSFJPGK.mjs +0 -7
- package/dist/kotlin-IGZZRCGC.mjs +0 -264
- package/dist/kotlin-JJZ52WH7.mjs +0 -8
- package/dist/kumir-7GXMJK3V.mjs +0 -7
- package/dist/kusto-WG6JJXRJ.mjs +0 -7
- package/dist/lasso-WWTZY5UH.mjs +0 -170
- package/dist/latex-2YADPEPI.mjs +0 -7
- package/dist/latex-WRAYL6SG.mjs +0 -259
- package/dist/latte-SLTLZ42G.mjs +0 -11
- package/dist/ldif-6UEPZ3X4.mjs +0 -45
- package/dist/leaf-NI5FUQC2.mjs +0 -52
- package/dist/less-IZNHBS3M.mjs +0 -8
- package/dist/less-NIE4VYT6.mjs +0 -659
- package/dist/lilypond-5Q7S6AWI.mjs +0 -8
- package/dist/linker-script-U2G3YT6Y.mjs +0 -7
- package/dist/liquid-APSL6YSQ.mjs +0 -9
- package/dist/lisp-66VVBLOV.mjs +0 -118
- package/dist/lisp-VKANOWYN.mjs +0 -7
- package/dist/livecodeserver-DUT3Q46F.mjs +0 -119
- package/dist/livescript-747Z7BTF.mjs +0 -366
- package/dist/livescript-Q5U2BMW5.mjs +0 -7
- package/dist/llvm-GL4XTW5Y.mjs +0 -7
- package/dist/llvm-QVOA6LPG.mjs +0 -100
- package/dist/log-WZTVEF6C.mjs +0 -7
- package/dist/lolcode-4MINGUJV.mjs +0 -7
- package/dist/lsl-QPPMC5D4.mjs +0 -90
- package/dist/lua-L6OBT7JV.mjs +0 -71
- package/dist/lua-ZSJIAUOH.mjs +0 -7
- package/dist/magma-XCJJFWJR.mjs +0 -7
- package/dist/makefile-OOWCTVQ7.mjs +0 -82
- package/dist/makefile-QIYFPW2R.mjs +0 -7
- package/dist/markdown-DAR7DPFL.mjs +0 -8
- package/dist/markdown-N3SY7XVC.mjs +0 -239
- package/dist/markup-OXVKDD47.mjs +0 -7
- package/dist/markup-templating-J4DO7422.mjs +0 -8
- package/dist/mata-765PWMBX.mjs +0 -7
- package/dist/mathematica-LT6GQUHF.mjs +0 -6751
- package/dist/matlab-4GFLVE2P.mjs +0 -87
- package/dist/matlab-6HITLEEC.mjs +0 -7
- package/dist/maxima-Z3RYDEQB.mjs +0 -63
- package/dist/maxscript-WQI6JYAB.mjs +0 -7
- package/dist/mel-27RKMW7S.mjs +0 -7
- package/dist/mel-SFVB3IOI.mjs +0 -35
- package/dist/mercury-CKPXMMW7.mjs +0 -99
- package/dist/mermaid-XHBPQM2B.mjs +0 -7
- package/dist/metafont-7AGXCDBQ.mjs +0 -7
- package/dist/mipsasm-3NYLGAR6.mjs +0 -85
- package/dist/mizar-64NH7HJA.mjs +0 -20
- package/dist/mizar-U2HYXZIV.mjs +0 -7
- package/dist/mojolicious-P7XXJCR3.mjs +0 -37
- package/dist/mongodb-WUNFEENG.mjs +0 -9
- package/dist/monkey-PPCGIXWW.mjs +0 -84
- package/dist/monkey-QLUD3OXB.mjs +0 -7
- package/dist/moonscript-4CWFAPGN.mjs +0 -7
- package/dist/moonscript-A2M4GDBP.mjs +0 -148
- package/dist/n1ql-JCXANXED.mjs +0 -7
- package/dist/n1ql-SDCT2EHR.mjs +0 -56
- package/dist/n4js-XYYHI2EG.mjs +0 -9
- package/dist/nand2tetris-hdl-EFYRZT6S.mjs +0 -7
- package/dist/naniscript-MA6QESE2.mjs +0 -7
- package/dist/nasm-VHY6J4EF.mjs +0 -7
- package/dist/neon-QCP2WSBT.mjs +0 -7
- package/dist/nevod-EFXVYLVX.mjs +0 -7
- package/dist/nginx-TGT7EO4X.mjs +0 -7
- package/dist/nginx-WW7TAPC7.mjs +0 -138
- package/dist/nim-HL4DQ5UH.mjs +0 -70
- package/dist/nim-YWSIL2DE.mjs +0 -7
- package/dist/nix-2AR5CCIH.mjs +0 -63
- package/dist/nix-E3D77UG6.mjs +0 -7
- package/dist/node-repl-NKLTAWN7.mjs +0 -38
- package/dist/nsis-33NHQMB7.mjs +0 -7
- package/dist/nsis-3IEZ3YJJ.mjs +0 -110
- package/dist/objectivec-3IFCJWCA.mjs +0 -9
- package/dist/objectivec-KOG52TJY.mjs +0 -96
- package/dist/ocaml-KY5FDADX.mjs +0 -7
- package/dist/ocaml-VAM3KDWB.mjs +0 -74
- package/dist/odin-A2IE76HA.mjs +0 -7
- package/dist/opencl-4S3HASAT.mjs +0 -9
- package/dist/openqasm-AWQKXLGZ.mjs +0 -7
- package/dist/openscad-HHFIEWVA.mjs +0 -82
- package/dist/oxygene-66TQWGHU.mjs +0 -95
- package/dist/oz-ZITDMMHD.mjs +0 -7
- package/dist/parigp-VBT7UQG5.mjs +0 -7
- package/dist/parser-YEZVTKJT.mjs +0 -8
- package/dist/parser3-NMC257GM.mjs +0 -58
- package/dist/pascal-XXANPKBW.mjs +0 -7
- package/dist/pascaligo-4AUPQUM4.mjs +0 -7
- package/dist/pcaxis-XLPP7YFP.mjs +0 -7
- package/dist/peoplecode-2JPUOZ5D.mjs +0 -7
- package/dist/perl-J6SU2KAK.mjs +0 -480
- package/dist/perl-XPOI3VE2.mjs +0 -7
- package/dist/pf-L6J5TXP5.mjs +0 -44
- package/dist/pgsql-CXOXGLSM.mjs +0 -388
- package/dist/php-7COQUIL6.mjs +0 -9
- package/dist/php-THQHZWBK.mjs +0 -192
- package/dist/php-extras-KXCGVKVT.mjs +0 -10
- package/dist/php-template-MDQ7YQYU.mjs +0 -55
- package/dist/phpdoc-P3J4KDLP.mjs +0 -11
- package/dist/plaintext-FOX4HEYD.mjs +0 -21
- package/dist/plant-uml-HLQGLS6L.mjs +0 -7
- package/dist/plsql-S52OSJ2U.mjs +0 -8
- package/dist/pony-W4DRRBBC.mjs +0 -65
- package/dist/powerquery-YHSDPEFX.mjs +0 -7
- package/dist/powershell-FLJWJJQQ.mjs +0 -7
- package/dist/powershell-P6JU2TP5.mjs +0 -280
- package/dist/processing-GGDIH7QS.mjs +0 -29
- package/dist/processing-LTLRX2F5.mjs +0 -8
- package/dist/profile-SWN3ONGX.mjs +0 -46
- package/dist/prolog-22I55WFQ.mjs +0 -90
- package/dist/prolog-NTHCGAGP.mjs +0 -7
- package/dist/promql-WFSRW4IG.mjs +0 -7
- package/dist/properties-WFMQKC4W.mjs +0 -7
- package/dist/properties-WSAVMNCN.mjs +0 -82
- package/dist/protobuf-6IXRTNB4.mjs +0 -51
- package/dist/protobuf-HKASI7GQ.mjs +0 -8
- package/dist/psl-IOI6QPHM.mjs +0 -7
- package/dist/pug-347NHF34.mjs +0 -10
- package/dist/puppet-VTVLTBI2.mjs +0 -121
- package/dist/puppet-YOC76H6Z.mjs +0 -7
- package/dist/pure-JBAF6TB6.mjs +0 -7
- package/dist/purebasic-C3YNOS5P.mjs +0 -70
- package/dist/purebasic-JWVWWWJD.mjs +0 -8
- package/dist/purescript-N3Q4R3YA.mjs +0 -8
- package/dist/python-A4CFGSSI.mjs +0 -7
- package/dist/python-NT5AD4JY.mjs +0 -412
- package/dist/python-repl-LHNIOXJX.mjs +0 -38
- package/dist/q-FMB4DBLN.mjs +0 -7
- package/dist/q-UTM7ZTW7.mjs +0 -33
- package/dist/qml-MJHPGC4V.mjs +0 -9
- package/dist/qml-WIGTJGI4.mjs +0 -177
- package/dist/qore-NTRR7XWO.mjs +0 -8
- package/dist/qsharp-SDEJFN7R.mjs +0 -8
- package/dist/r-RELSGV5I.mjs +0 -7
- package/dist/r-WY7E4G62.mjs +0 -175
- package/dist/racket-QSCJEQRD.mjs +0 -8
- package/dist/reason-TTF6YRJC.mjs +0 -8
- package/dist/reasonml-XPP4N3QO.mjs +0 -294
- package/dist/regex-PRGZTHZL.mjs +0 -7
- package/dist/rego-EPT6TBBG.mjs +0 -7
- package/dist/renpy-TIIZPWPG.mjs +0 -7
- package/dist/rescript-4KMHHGJS.mjs +0 -7
- package/dist/rest-CAP5QXCA.mjs +0 -7
- package/dist/rib-7TW3PGSO.mjs +0 -24
- package/dist/rip-U3OVF6I5.mjs +0 -7
- package/dist/roboconf-DXZX2XRS.mjs +0 -7
- package/dist/roboconf-EWDKJ5LM.mjs +0 -78
- package/dist/robotframework-5MDZVXUI.mjs +0 -7
- package/dist/routeros-F63X5ZIY.mjs +0 -163
- package/dist/rsl-KI4U6V76.mjs +0 -42
- package/dist/ruby-RXY2RLEY.mjs +0 -346
- package/dist/ruby-SRVPHZXE.mjs +0 -8
- package/dist/ruleslanguage-CW4QBLC4.mjs +0 -40
- package/dist/rust-CA3GNIOD.mjs +0 -7
- package/dist/rust-PMGZCFRY.mjs +0 -123
- package/dist/sas-7FFW2O23.mjs +0 -7
- package/dist/sas-PMTXHOIS.mjs +0 -66
- package/dist/sass-YWHWQAUT.mjs +0 -8
- package/dist/scala-4SFCTX6I.mjs +0 -9
- package/dist/scala-5GJ43JLG.mjs +0 -131
- package/dist/scheme-6GQTRHJH.mjs +0 -7
- package/dist/scheme-LAM5SAF2.mjs +0 -159
- package/dist/scilab-YCB5BINJ.mjs +0 -69
- package/dist/scss-GQSUZCJS.mjs +0 -8
- package/dist/scss-QK2HU2CK.mjs +0 -551
- package/dist/shell-UOPX2W7I.mjs +0 -30
- package/dist/shell-session-6VKIJ4UE.mjs +0 -8
- package/dist/smali-5FECMKNA.mjs +0 -137
- package/dist/smali-J3GXN3CR.mjs +0 -7
- package/dist/smalltalk-DJMU7FZQ.mjs +0 -7
- package/dist/smalltalk-VRGDZA3W.mjs +0 -66
- package/dist/smarty-R6DOPNCK.mjs +0 -9
- package/dist/sml-2F2GSLBP.mjs +0 -7
- package/dist/sml-NYPT675T.mjs +0 -81
- package/dist/solidity-PFRSAYM6.mjs +0 -8
- package/dist/solution-file-U4FZFD55.mjs +0 -7
- package/dist/soy-Y4XP2HZR.mjs +0 -9
- package/dist/sparql-FNWGIQ7N.mjs +0 -8
- package/dist/splunk-spl-JXVVU3X5.mjs +0 -7
- package/dist/sqf-5I2ZD7YO.mjs +0 -8
- package/dist/sqf-QDIV7VDQ.mjs +0 -86
- package/dist/sql-GBCT2QB4.mjs +0 -7
- package/dist/sql-WF5COLPY.mjs +0 -655
- package/dist/sql_more-OYKA6JQY.mjs +0 -60
- package/dist/squirrel-5LI5TRO2.mjs +0 -8
- package/dist/stan-LHT2ZONH.mjs +0 -7
- package/dist/stan-NZHR4RTX.mjs +0 -547
- package/dist/stata-L5S3GROB.mjs +0 -11
- package/dist/stata-M24CXK7H.mjs +0 -54
- package/dist/step21-R2GQ3VPU.mjs +0 -68
- package/dist/stylus-7JEVD63H.mjs +0 -7
- package/dist/stylus-EGU6YPC7.mjs +0 -605
- package/dist/subunit-TBVEFCZ4.mjs +0 -54
- package/dist/supercollider-DQRFF2ZM.mjs +0 -7
- package/dist/swift-KF3IM6ZM.mjs +0 -7
- package/dist/swift-Z37BBBV6.mjs +0 -799
- package/dist/systemd-MN3J4ZZP.mjs +0 -7
- package/dist/t4-cs-4VGLEZ3E.mjs +0 -10
- package/dist/t4-templating-Z5UNC7NL.mjs +0 -7
- package/dist/t4-vb-WND6NL7I.mjs +0 -10
- package/dist/taggerscript-E4K2IWZI.mjs +0 -53
- package/dist/tap-CHINMJXZ.mjs +0 -8
- package/dist/tap-SOP3LUUF.mjs +0 -56
- package/dist/tcl-KFAY3Y76.mjs +0 -83
- package/dist/tcl-RYS635Z3.mjs +0 -7
- package/dist/textile-K4LIB2S4.mjs +0 -8
- package/dist/thrift-CD3DUU44.mjs +0 -49
- package/dist/toml-H32BR4RA.mjs +0 -7
- package/dist/tp-YEGGGPV6.mjs +0 -91
- package/dist/tremor-KW3FV3KC.mjs +0 -7
- package/dist/tsx-5J5VXZS5.mjs +0 -12
- package/dist/tt2-HGSBIVQ4.mjs +0 -10
- package/dist/turtle-3BXU77UR.mjs +0 -7
- package/dist/twig-BHEIMS2I.mjs +0 -70
- package/dist/twig-WPWEOXUJ.mjs +0 -9
- package/dist/typescript-G3NW53G6.mjs +0 -9
- package/dist/typescript-XCHCHZTB.mjs +0 -628
- package/dist/typoscript-JAVNW6VK.mjs +0 -7
- package/dist/unrealscript-42PWKY6Q.mjs +0 -7
- package/dist/uorazor-JCCJPUCB.mjs +0 -7
- package/dist/uri-6TOG7EQ3.mjs +0 -7
- package/dist/v-U43HBEJL.mjs +0 -8
- package/dist/vala-DG57MCH7.mjs +0 -8
- package/dist/vala-SOJ7ADYF.mjs +0 -51
- package/dist/vbnet-NANZ6YNZ.mjs +0 -164
- package/dist/vbnet-VGGYD7UL.mjs +0 -8
- package/dist/vbscript-ZGKTU75O.mjs +0 -68
- package/dist/vbscript-html-IXDLQQWA.mjs +0 -24
- package/dist/velocity-I7WPNNRT.mjs +0 -8
- package/dist/verilog-Q2SCWKH6.mjs +0 -7
- package/dist/verilog-TOWZGWW5.mjs +0 -72
- package/dist/vhdl-LMAC2JYU.mjs +0 -51
- package/dist/vhdl-UMPVMOXL.mjs +0 -7
- package/dist/vim-2YLACCEH.mjs +0 -74
- package/dist/vim-B5DEGKND.mjs +0 -7
- package/dist/visual-basic-TH2SIMKY.mjs +0 -7
- package/dist/warpscript-DRY2GDSF.mjs +0 -7
- package/dist/wasm-5A4VSDDR.mjs +0 -7
- package/dist/web-idl-DDXJ6PB7.mjs +0 -7
- package/dist/wgsl-BTSX35ZR.mjs +0 -7
- package/dist/wiki-7DBBSDZ4.mjs +0 -8
- package/dist/wolfram-GZXM3VCU.mjs +0 -7
- package/dist/wren-67TXQCEN.mjs +0 -7
- package/dist/x86asm-SBYXVAPW.mjs +0 -106
- package/dist/xeora-DPVBEV2S.mjs +0 -8
- package/dist/xl-MJ5LQ7IG.mjs +0 -77
- package/dist/xml-FLJSLCB4.mjs +0 -254
- package/dist/xml-doc-3NHESP5E.mjs +0 -8
- package/dist/xojo-AKFOJ5KB.mjs +0 -7
- package/dist/xquery-KPNYT5DH.mjs +0 -161
- package/dist/xquery-WALO52IF.mjs +0 -8
- package/dist/yaml-CDPEVNU3.mjs +0 -7
- package/dist/yaml-GBY4TVPN.mjs +0 -173
- package/dist/yang-W5ZMJ3A7.mjs +0 -7
- package/dist/zephir-Y2H2MA66.mjs +0 -118
- package/dist/zig-7XFLDRZS.mjs +0 -7
- package/dist/{ILLMProvider-BynaFBpy.d.mts → ILLMProvider-DO5gj-e5.d.mts} +83 -83
- package/dist/{ILLMProvider-BynaFBpy.d.ts → ILLMProvider-DO5gj-e5.d.ts} +83 -83
package/dist/core-53TVE6ED.mjs
DELETED
|
@@ -1,1811 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__commonJS
|
|
3
|
-
} from "./chunk-PYI2JMTB.mjs";
|
|
4
|
-
|
|
5
|
-
// ../../node_modules/highlight.js/lib/core.js
|
|
6
|
-
var require_core = __commonJS({
|
|
7
|
-
"../../node_modules/highlight.js/lib/core.js"(exports, module) {
|
|
8
|
-
"use strict";
|
|
9
|
-
function deepFreeze(obj) {
|
|
10
|
-
if (obj instanceof Map) {
|
|
11
|
-
obj.clear = obj.delete = obj.set = function() {
|
|
12
|
-
throw new Error("map is read-only");
|
|
13
|
-
};
|
|
14
|
-
} else if (obj instanceof Set) {
|
|
15
|
-
obj.add = obj.clear = obj.delete = function() {
|
|
16
|
-
throw new Error("set is read-only");
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
Object.freeze(obj);
|
|
20
|
-
Object.getOwnPropertyNames(obj).forEach(function(name) {
|
|
21
|
-
var prop = obj[name];
|
|
22
|
-
if (typeof prop == "object" && !Object.isFrozen(prop)) {
|
|
23
|
-
deepFreeze(prop);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return obj;
|
|
27
|
-
}
|
|
28
|
-
var deepFreezeEs6 = deepFreeze;
|
|
29
|
-
var _default = deepFreeze;
|
|
30
|
-
deepFreezeEs6.default = _default;
|
|
31
|
-
var Response = class {
|
|
32
|
-
/**
|
|
33
|
-
* @param {CompiledMode} mode
|
|
34
|
-
*/
|
|
35
|
-
constructor(mode) {
|
|
36
|
-
if (mode.data === void 0) mode.data = {};
|
|
37
|
-
this.data = mode.data;
|
|
38
|
-
this.isMatchIgnored = false;
|
|
39
|
-
}
|
|
40
|
-
ignoreMatch() {
|
|
41
|
-
this.isMatchIgnored = true;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
function escapeHTML(value) {
|
|
45
|
-
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
46
|
-
}
|
|
47
|
-
function inherit(original, ...objects) {
|
|
48
|
-
const result = /* @__PURE__ */ Object.create(null);
|
|
49
|
-
for (const key in original) {
|
|
50
|
-
result[key] = original[key];
|
|
51
|
-
}
|
|
52
|
-
objects.forEach(function(obj) {
|
|
53
|
-
for (const key in obj) {
|
|
54
|
-
result[key] = obj[key];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
return (
|
|
58
|
-
/** @type {T} */
|
|
59
|
-
result
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
var SPAN_CLOSE = "</span>";
|
|
63
|
-
var emitsWrappingTags = (node) => {
|
|
64
|
-
return !!node.kind;
|
|
65
|
-
};
|
|
66
|
-
var HTMLRenderer = class {
|
|
67
|
-
/**
|
|
68
|
-
* Creates a new HTMLRenderer
|
|
69
|
-
*
|
|
70
|
-
* @param {Tree} parseTree - the parse tree (must support `walk` API)
|
|
71
|
-
* @param {{classPrefix: string}} options
|
|
72
|
-
*/
|
|
73
|
-
constructor(parseTree, options) {
|
|
74
|
-
this.buffer = "";
|
|
75
|
-
this.classPrefix = options.classPrefix;
|
|
76
|
-
parseTree.walk(this);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Adds texts to the output stream
|
|
80
|
-
*
|
|
81
|
-
* @param {string} text */
|
|
82
|
-
addText(text) {
|
|
83
|
-
this.buffer += escapeHTML(text);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Adds a node open to the output stream (if needed)
|
|
87
|
-
*
|
|
88
|
-
* @param {Node} node */
|
|
89
|
-
openNode(node) {
|
|
90
|
-
if (!emitsWrappingTags(node)) return;
|
|
91
|
-
let className = node.kind;
|
|
92
|
-
if (!node.sublanguage) {
|
|
93
|
-
className = `${this.classPrefix}${className}`;
|
|
94
|
-
}
|
|
95
|
-
this.span(className);
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Adds a node close to the output stream (if needed)
|
|
99
|
-
*
|
|
100
|
-
* @param {Node} node */
|
|
101
|
-
closeNode(node) {
|
|
102
|
-
if (!emitsWrappingTags(node)) return;
|
|
103
|
-
this.buffer += SPAN_CLOSE;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* returns the accumulated buffer
|
|
107
|
-
*/
|
|
108
|
-
value() {
|
|
109
|
-
return this.buffer;
|
|
110
|
-
}
|
|
111
|
-
// helpers
|
|
112
|
-
/**
|
|
113
|
-
* Builds a span element
|
|
114
|
-
*
|
|
115
|
-
* @param {string} className */
|
|
116
|
-
span(className) {
|
|
117
|
-
this.buffer += `<span class="${className}">`;
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
var TokenTree = class _TokenTree {
|
|
121
|
-
constructor() {
|
|
122
|
-
this.rootNode = { children: [] };
|
|
123
|
-
this.stack = [this.rootNode];
|
|
124
|
-
}
|
|
125
|
-
get top() {
|
|
126
|
-
return this.stack[this.stack.length - 1];
|
|
127
|
-
}
|
|
128
|
-
get root() {
|
|
129
|
-
return this.rootNode;
|
|
130
|
-
}
|
|
131
|
-
/** @param {Node} node */
|
|
132
|
-
add(node) {
|
|
133
|
-
this.top.children.push(node);
|
|
134
|
-
}
|
|
135
|
-
/** @param {string} kind */
|
|
136
|
-
openNode(kind) {
|
|
137
|
-
const node = { kind, children: [] };
|
|
138
|
-
this.add(node);
|
|
139
|
-
this.stack.push(node);
|
|
140
|
-
}
|
|
141
|
-
closeNode() {
|
|
142
|
-
if (this.stack.length > 1) {
|
|
143
|
-
return this.stack.pop();
|
|
144
|
-
}
|
|
145
|
-
return void 0;
|
|
146
|
-
}
|
|
147
|
-
closeAllNodes() {
|
|
148
|
-
while (this.closeNode()) ;
|
|
149
|
-
}
|
|
150
|
-
toJSON() {
|
|
151
|
-
return JSON.stringify(this.rootNode, null, 4);
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* @typedef { import("./html_renderer").Renderer } Renderer
|
|
155
|
-
* @param {Renderer} builder
|
|
156
|
-
*/
|
|
157
|
-
walk(builder) {
|
|
158
|
-
return this.constructor._walk(builder, this.rootNode);
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* @param {Renderer} builder
|
|
162
|
-
* @param {Node} node
|
|
163
|
-
*/
|
|
164
|
-
static _walk(builder, node) {
|
|
165
|
-
if (typeof node === "string") {
|
|
166
|
-
builder.addText(node);
|
|
167
|
-
} else if (node.children) {
|
|
168
|
-
builder.openNode(node);
|
|
169
|
-
node.children.forEach((child) => this._walk(builder, child));
|
|
170
|
-
builder.closeNode(node);
|
|
171
|
-
}
|
|
172
|
-
return builder;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* @param {Node} node
|
|
176
|
-
*/
|
|
177
|
-
static _collapse(node) {
|
|
178
|
-
if (typeof node === "string") return;
|
|
179
|
-
if (!node.children) return;
|
|
180
|
-
if (node.children.every((el) => typeof el === "string")) {
|
|
181
|
-
node.children = [node.children.join("")];
|
|
182
|
-
} else {
|
|
183
|
-
node.children.forEach((child) => {
|
|
184
|
-
_TokenTree._collapse(child);
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
var TokenTreeEmitter = class extends TokenTree {
|
|
190
|
-
/**
|
|
191
|
-
* @param {*} options
|
|
192
|
-
*/
|
|
193
|
-
constructor(options) {
|
|
194
|
-
super();
|
|
195
|
-
this.options = options;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* @param {string} text
|
|
199
|
-
* @param {string} kind
|
|
200
|
-
*/
|
|
201
|
-
addKeyword(text, kind) {
|
|
202
|
-
if (text === "") {
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
this.openNode(kind);
|
|
206
|
-
this.addText(text);
|
|
207
|
-
this.closeNode();
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* @param {string} text
|
|
211
|
-
*/
|
|
212
|
-
addText(text) {
|
|
213
|
-
if (text === "") {
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
this.add(text);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* @param {Emitter & {root: DataNode}} emitter
|
|
220
|
-
* @param {string} name
|
|
221
|
-
*/
|
|
222
|
-
addSublanguage(emitter, name) {
|
|
223
|
-
const node = emitter.root;
|
|
224
|
-
node.kind = name;
|
|
225
|
-
node.sublanguage = true;
|
|
226
|
-
this.add(node);
|
|
227
|
-
}
|
|
228
|
-
toHTML() {
|
|
229
|
-
const renderer = new HTMLRenderer(this, this.options);
|
|
230
|
-
return renderer.value();
|
|
231
|
-
}
|
|
232
|
-
finalize() {
|
|
233
|
-
return true;
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
function escape(value) {
|
|
237
|
-
return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), "m");
|
|
238
|
-
}
|
|
239
|
-
function source(re) {
|
|
240
|
-
if (!re) return null;
|
|
241
|
-
if (typeof re === "string") return re;
|
|
242
|
-
return re.source;
|
|
243
|
-
}
|
|
244
|
-
function concat(...args) {
|
|
245
|
-
const joined = args.map((x) => source(x)).join("");
|
|
246
|
-
return joined;
|
|
247
|
-
}
|
|
248
|
-
function either(...args) {
|
|
249
|
-
const joined = "(" + args.map((x) => source(x)).join("|") + ")";
|
|
250
|
-
return joined;
|
|
251
|
-
}
|
|
252
|
-
function countMatchGroups(re) {
|
|
253
|
-
return new RegExp(re.toString() + "|").exec("").length - 1;
|
|
254
|
-
}
|
|
255
|
-
function startsWith(re, lexeme) {
|
|
256
|
-
const match = re && re.exec(lexeme);
|
|
257
|
-
return match && match.index === 0;
|
|
258
|
-
}
|
|
259
|
-
var BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
260
|
-
function join(regexps, separator = "|") {
|
|
261
|
-
let numCaptures = 0;
|
|
262
|
-
return regexps.map((regex) => {
|
|
263
|
-
numCaptures += 1;
|
|
264
|
-
const offset = numCaptures;
|
|
265
|
-
let re = source(regex);
|
|
266
|
-
let out = "";
|
|
267
|
-
while (re.length > 0) {
|
|
268
|
-
const match = BACKREF_RE.exec(re);
|
|
269
|
-
if (!match) {
|
|
270
|
-
out += re;
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
out += re.substring(0, match.index);
|
|
274
|
-
re = re.substring(match.index + match[0].length);
|
|
275
|
-
if (match[0][0] === "\\" && match[1]) {
|
|
276
|
-
out += "\\" + String(Number(match[1]) + offset);
|
|
277
|
-
} else {
|
|
278
|
-
out += match[0];
|
|
279
|
-
if (match[0] === "(") {
|
|
280
|
-
numCaptures++;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
return out;
|
|
285
|
-
}).map((re) => `(${re})`).join(separator);
|
|
286
|
-
}
|
|
287
|
-
var MATCH_NOTHING_RE = /\b\B/;
|
|
288
|
-
var IDENT_RE = "[a-zA-Z]\\w*";
|
|
289
|
-
var UNDERSCORE_IDENT_RE = "[a-zA-Z_]\\w*";
|
|
290
|
-
var NUMBER_RE = "\\b\\d+(\\.\\d+)?";
|
|
291
|
-
var C_NUMBER_RE = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";
|
|
292
|
-
var BINARY_NUMBER_RE = "\\b(0b[01]+)";
|
|
293
|
-
var RE_STARTERS_RE = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";
|
|
294
|
-
var SHEBANG = (opts = {}) => {
|
|
295
|
-
const beginShebang = /^#![ ]*\//;
|
|
296
|
-
if (opts.binary) {
|
|
297
|
-
opts.begin = concat(
|
|
298
|
-
beginShebang,
|
|
299
|
-
/.*\b/,
|
|
300
|
-
opts.binary,
|
|
301
|
-
/\b.*/
|
|
302
|
-
);
|
|
303
|
-
}
|
|
304
|
-
return inherit({
|
|
305
|
-
className: "meta",
|
|
306
|
-
begin: beginShebang,
|
|
307
|
-
end: /$/,
|
|
308
|
-
relevance: 0,
|
|
309
|
-
/** @type {ModeCallback} */
|
|
310
|
-
"on:begin": (m, resp) => {
|
|
311
|
-
if (m.index !== 0) resp.ignoreMatch();
|
|
312
|
-
}
|
|
313
|
-
}, opts);
|
|
314
|
-
};
|
|
315
|
-
var BACKSLASH_ESCAPE = {
|
|
316
|
-
begin: "\\\\[\\s\\S]",
|
|
317
|
-
relevance: 0
|
|
318
|
-
};
|
|
319
|
-
var APOS_STRING_MODE = {
|
|
320
|
-
className: "string",
|
|
321
|
-
begin: "'",
|
|
322
|
-
end: "'",
|
|
323
|
-
illegal: "\\n",
|
|
324
|
-
contains: [BACKSLASH_ESCAPE]
|
|
325
|
-
};
|
|
326
|
-
var QUOTE_STRING_MODE = {
|
|
327
|
-
className: "string",
|
|
328
|
-
begin: '"',
|
|
329
|
-
end: '"',
|
|
330
|
-
illegal: "\\n",
|
|
331
|
-
contains: [BACKSLASH_ESCAPE]
|
|
332
|
-
};
|
|
333
|
-
var PHRASAL_WORDS_MODE = {
|
|
334
|
-
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
|
335
|
-
};
|
|
336
|
-
var COMMENT = function(begin, end, modeOptions = {}) {
|
|
337
|
-
const mode = inherit(
|
|
338
|
-
{
|
|
339
|
-
className: "comment",
|
|
340
|
-
begin,
|
|
341
|
-
end,
|
|
342
|
-
contains: []
|
|
343
|
-
},
|
|
344
|
-
modeOptions
|
|
345
|
-
);
|
|
346
|
-
mode.contains.push(PHRASAL_WORDS_MODE);
|
|
347
|
-
mode.contains.push({
|
|
348
|
-
className: "doctag",
|
|
349
|
-
begin: "(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",
|
|
350
|
-
relevance: 0
|
|
351
|
-
});
|
|
352
|
-
return mode;
|
|
353
|
-
};
|
|
354
|
-
var C_LINE_COMMENT_MODE = COMMENT("//", "$");
|
|
355
|
-
var C_BLOCK_COMMENT_MODE = COMMENT("/\\*", "\\*/");
|
|
356
|
-
var HASH_COMMENT_MODE = COMMENT("#", "$");
|
|
357
|
-
var NUMBER_MODE = {
|
|
358
|
-
className: "number",
|
|
359
|
-
begin: NUMBER_RE,
|
|
360
|
-
relevance: 0
|
|
361
|
-
};
|
|
362
|
-
var C_NUMBER_MODE = {
|
|
363
|
-
className: "number",
|
|
364
|
-
begin: C_NUMBER_RE,
|
|
365
|
-
relevance: 0
|
|
366
|
-
};
|
|
367
|
-
var BINARY_NUMBER_MODE = {
|
|
368
|
-
className: "number",
|
|
369
|
-
begin: BINARY_NUMBER_RE,
|
|
370
|
-
relevance: 0
|
|
371
|
-
};
|
|
372
|
-
var CSS_NUMBER_MODE = {
|
|
373
|
-
className: "number",
|
|
374
|
-
begin: NUMBER_RE + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",
|
|
375
|
-
relevance: 0
|
|
376
|
-
};
|
|
377
|
-
var REGEXP_MODE = {
|
|
378
|
-
// this outer rule makes sure we actually have a WHOLE regex and not simply
|
|
379
|
-
// an expression such as:
|
|
380
|
-
//
|
|
381
|
-
// 3 / something
|
|
382
|
-
//
|
|
383
|
-
// (which will then blow up when regex's `illegal` sees the newline)
|
|
384
|
-
begin: /(?=\/[^/\n]*\/)/,
|
|
385
|
-
contains: [{
|
|
386
|
-
className: "regexp",
|
|
387
|
-
begin: /\//,
|
|
388
|
-
end: /\/[gimuy]*/,
|
|
389
|
-
illegal: /\n/,
|
|
390
|
-
contains: [
|
|
391
|
-
BACKSLASH_ESCAPE,
|
|
392
|
-
{
|
|
393
|
-
begin: /\[/,
|
|
394
|
-
end: /\]/,
|
|
395
|
-
relevance: 0,
|
|
396
|
-
contains: [BACKSLASH_ESCAPE]
|
|
397
|
-
}
|
|
398
|
-
]
|
|
399
|
-
}]
|
|
400
|
-
};
|
|
401
|
-
var TITLE_MODE = {
|
|
402
|
-
className: "title",
|
|
403
|
-
begin: IDENT_RE,
|
|
404
|
-
relevance: 0
|
|
405
|
-
};
|
|
406
|
-
var UNDERSCORE_TITLE_MODE = {
|
|
407
|
-
className: "title",
|
|
408
|
-
begin: UNDERSCORE_IDENT_RE,
|
|
409
|
-
relevance: 0
|
|
410
|
-
};
|
|
411
|
-
var METHOD_GUARD = {
|
|
412
|
-
// excludes method names from keyword processing
|
|
413
|
-
begin: "\\.\\s*" + UNDERSCORE_IDENT_RE,
|
|
414
|
-
relevance: 0
|
|
415
|
-
};
|
|
416
|
-
var END_SAME_AS_BEGIN = function(mode) {
|
|
417
|
-
return Object.assign(
|
|
418
|
-
mode,
|
|
419
|
-
{
|
|
420
|
-
/** @type {ModeCallback} */
|
|
421
|
-
"on:begin": (m, resp) => {
|
|
422
|
-
resp.data._beginMatch = m[1];
|
|
423
|
-
},
|
|
424
|
-
/** @type {ModeCallback} */
|
|
425
|
-
"on:end": (m, resp) => {
|
|
426
|
-
if (resp.data._beginMatch !== m[1]) resp.ignoreMatch();
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
);
|
|
430
|
-
};
|
|
431
|
-
var MODES = /* @__PURE__ */ Object.freeze({
|
|
432
|
-
__proto__: null,
|
|
433
|
-
MATCH_NOTHING_RE,
|
|
434
|
-
IDENT_RE,
|
|
435
|
-
UNDERSCORE_IDENT_RE,
|
|
436
|
-
NUMBER_RE,
|
|
437
|
-
C_NUMBER_RE,
|
|
438
|
-
BINARY_NUMBER_RE,
|
|
439
|
-
RE_STARTERS_RE,
|
|
440
|
-
SHEBANG,
|
|
441
|
-
BACKSLASH_ESCAPE,
|
|
442
|
-
APOS_STRING_MODE,
|
|
443
|
-
QUOTE_STRING_MODE,
|
|
444
|
-
PHRASAL_WORDS_MODE,
|
|
445
|
-
COMMENT,
|
|
446
|
-
C_LINE_COMMENT_MODE,
|
|
447
|
-
C_BLOCK_COMMENT_MODE,
|
|
448
|
-
HASH_COMMENT_MODE,
|
|
449
|
-
NUMBER_MODE,
|
|
450
|
-
C_NUMBER_MODE,
|
|
451
|
-
BINARY_NUMBER_MODE,
|
|
452
|
-
CSS_NUMBER_MODE,
|
|
453
|
-
REGEXP_MODE,
|
|
454
|
-
TITLE_MODE,
|
|
455
|
-
UNDERSCORE_TITLE_MODE,
|
|
456
|
-
METHOD_GUARD,
|
|
457
|
-
END_SAME_AS_BEGIN
|
|
458
|
-
});
|
|
459
|
-
function skipIfhasPrecedingDot(match, response) {
|
|
460
|
-
const before = match.input[match.index - 1];
|
|
461
|
-
if (before === ".") {
|
|
462
|
-
response.ignoreMatch();
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
function beginKeywords(mode, parent) {
|
|
466
|
-
if (!parent) return;
|
|
467
|
-
if (!mode.beginKeywords) return;
|
|
468
|
-
mode.begin = "\\b(" + mode.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)";
|
|
469
|
-
mode.__beforeBegin = skipIfhasPrecedingDot;
|
|
470
|
-
mode.keywords = mode.keywords || mode.beginKeywords;
|
|
471
|
-
delete mode.beginKeywords;
|
|
472
|
-
if (mode.relevance === void 0) mode.relevance = 0;
|
|
473
|
-
}
|
|
474
|
-
function compileIllegal(mode, _parent) {
|
|
475
|
-
if (!Array.isArray(mode.illegal)) return;
|
|
476
|
-
mode.illegal = either(...mode.illegal);
|
|
477
|
-
}
|
|
478
|
-
function compileMatch(mode, _parent) {
|
|
479
|
-
if (!mode.match) return;
|
|
480
|
-
if (mode.begin || mode.end) throw new Error("begin & end are not supported with match");
|
|
481
|
-
mode.begin = mode.match;
|
|
482
|
-
delete mode.match;
|
|
483
|
-
}
|
|
484
|
-
function compileRelevance(mode, _parent) {
|
|
485
|
-
if (mode.relevance === void 0) mode.relevance = 1;
|
|
486
|
-
}
|
|
487
|
-
var COMMON_KEYWORDS = [
|
|
488
|
-
"of",
|
|
489
|
-
"and",
|
|
490
|
-
"for",
|
|
491
|
-
"in",
|
|
492
|
-
"not",
|
|
493
|
-
"or",
|
|
494
|
-
"if",
|
|
495
|
-
"then",
|
|
496
|
-
"parent",
|
|
497
|
-
// common variable name
|
|
498
|
-
"list",
|
|
499
|
-
// common variable name
|
|
500
|
-
"value"
|
|
501
|
-
// common variable name
|
|
502
|
-
];
|
|
503
|
-
var DEFAULT_KEYWORD_CLASSNAME = "keyword";
|
|
504
|
-
function compileKeywords(rawKeywords, caseInsensitive, className = DEFAULT_KEYWORD_CLASSNAME) {
|
|
505
|
-
const compiledKeywords = {};
|
|
506
|
-
if (typeof rawKeywords === "string") {
|
|
507
|
-
compileList(className, rawKeywords.split(" "));
|
|
508
|
-
} else if (Array.isArray(rawKeywords)) {
|
|
509
|
-
compileList(className, rawKeywords);
|
|
510
|
-
} else {
|
|
511
|
-
Object.keys(rawKeywords).forEach(function(className2) {
|
|
512
|
-
Object.assign(
|
|
513
|
-
compiledKeywords,
|
|
514
|
-
compileKeywords(rawKeywords[className2], caseInsensitive, className2)
|
|
515
|
-
);
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
return compiledKeywords;
|
|
519
|
-
function compileList(className2, keywordList) {
|
|
520
|
-
if (caseInsensitive) {
|
|
521
|
-
keywordList = keywordList.map((x) => x.toLowerCase());
|
|
522
|
-
}
|
|
523
|
-
keywordList.forEach(function(keyword) {
|
|
524
|
-
const pair = keyword.split("|");
|
|
525
|
-
compiledKeywords[pair[0]] = [className2, scoreForKeyword(pair[0], pair[1])];
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
function scoreForKeyword(keyword, providedScore) {
|
|
530
|
-
if (providedScore) {
|
|
531
|
-
return Number(providedScore);
|
|
532
|
-
}
|
|
533
|
-
return commonKeyword(keyword) ? 0 : 1;
|
|
534
|
-
}
|
|
535
|
-
function commonKeyword(keyword) {
|
|
536
|
-
return COMMON_KEYWORDS.includes(keyword.toLowerCase());
|
|
537
|
-
}
|
|
538
|
-
function compileLanguage(language, { plugins }) {
|
|
539
|
-
function langRe(value, global) {
|
|
540
|
-
return new RegExp(
|
|
541
|
-
source(value),
|
|
542
|
-
"m" + (language.case_insensitive ? "i" : "") + (global ? "g" : "")
|
|
543
|
-
);
|
|
544
|
-
}
|
|
545
|
-
class MultiRegex {
|
|
546
|
-
constructor() {
|
|
547
|
-
this.matchIndexes = {};
|
|
548
|
-
this.regexes = [];
|
|
549
|
-
this.matchAt = 1;
|
|
550
|
-
this.position = 0;
|
|
551
|
-
}
|
|
552
|
-
// @ts-ignore
|
|
553
|
-
addRule(re, opts) {
|
|
554
|
-
opts.position = this.position++;
|
|
555
|
-
this.matchIndexes[this.matchAt] = opts;
|
|
556
|
-
this.regexes.push([opts, re]);
|
|
557
|
-
this.matchAt += countMatchGroups(re) + 1;
|
|
558
|
-
}
|
|
559
|
-
compile() {
|
|
560
|
-
if (this.regexes.length === 0) {
|
|
561
|
-
this.exec = () => null;
|
|
562
|
-
}
|
|
563
|
-
const terminators = this.regexes.map((el) => el[1]);
|
|
564
|
-
this.matcherRe = langRe(join(terminators), true);
|
|
565
|
-
this.lastIndex = 0;
|
|
566
|
-
}
|
|
567
|
-
/** @param {string} s */
|
|
568
|
-
exec(s) {
|
|
569
|
-
this.matcherRe.lastIndex = this.lastIndex;
|
|
570
|
-
const match = this.matcherRe.exec(s);
|
|
571
|
-
if (!match) {
|
|
572
|
-
return null;
|
|
573
|
-
}
|
|
574
|
-
const i = match.findIndex((el, i2) => i2 > 0 && el !== void 0);
|
|
575
|
-
const matchData = this.matchIndexes[i];
|
|
576
|
-
match.splice(0, i);
|
|
577
|
-
return Object.assign(match, matchData);
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
class ResumableMultiRegex {
|
|
581
|
-
constructor() {
|
|
582
|
-
this.rules = [];
|
|
583
|
-
this.multiRegexes = [];
|
|
584
|
-
this.count = 0;
|
|
585
|
-
this.lastIndex = 0;
|
|
586
|
-
this.regexIndex = 0;
|
|
587
|
-
}
|
|
588
|
-
// @ts-ignore
|
|
589
|
-
getMatcher(index) {
|
|
590
|
-
if (this.multiRegexes[index]) return this.multiRegexes[index];
|
|
591
|
-
const matcher = new MultiRegex();
|
|
592
|
-
this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));
|
|
593
|
-
matcher.compile();
|
|
594
|
-
this.multiRegexes[index] = matcher;
|
|
595
|
-
return matcher;
|
|
596
|
-
}
|
|
597
|
-
resumingScanAtSamePosition() {
|
|
598
|
-
return this.regexIndex !== 0;
|
|
599
|
-
}
|
|
600
|
-
considerAll() {
|
|
601
|
-
this.regexIndex = 0;
|
|
602
|
-
}
|
|
603
|
-
// @ts-ignore
|
|
604
|
-
addRule(re, opts) {
|
|
605
|
-
this.rules.push([re, opts]);
|
|
606
|
-
if (opts.type === "begin") this.count++;
|
|
607
|
-
}
|
|
608
|
-
/** @param {string} s */
|
|
609
|
-
exec(s) {
|
|
610
|
-
const m = this.getMatcher(this.regexIndex);
|
|
611
|
-
m.lastIndex = this.lastIndex;
|
|
612
|
-
let result = m.exec(s);
|
|
613
|
-
if (this.resumingScanAtSamePosition()) {
|
|
614
|
-
if (result && result.index === this.lastIndex) ;
|
|
615
|
-
else {
|
|
616
|
-
const m2 = this.getMatcher(0);
|
|
617
|
-
m2.lastIndex = this.lastIndex + 1;
|
|
618
|
-
result = m2.exec(s);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
if (result) {
|
|
622
|
-
this.regexIndex += result.position + 1;
|
|
623
|
-
if (this.regexIndex === this.count) {
|
|
624
|
-
this.considerAll();
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
return result;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
function buildModeRegex(mode) {
|
|
631
|
-
const mm = new ResumableMultiRegex();
|
|
632
|
-
mode.contains.forEach((term) => mm.addRule(term.begin, { rule: term, type: "begin" }));
|
|
633
|
-
if (mode.terminatorEnd) {
|
|
634
|
-
mm.addRule(mode.terminatorEnd, { type: "end" });
|
|
635
|
-
}
|
|
636
|
-
if (mode.illegal) {
|
|
637
|
-
mm.addRule(mode.illegal, { type: "illegal" });
|
|
638
|
-
}
|
|
639
|
-
return mm;
|
|
640
|
-
}
|
|
641
|
-
function compileMode(mode, parent) {
|
|
642
|
-
const cmode = (
|
|
643
|
-
/** @type CompiledMode */
|
|
644
|
-
mode
|
|
645
|
-
);
|
|
646
|
-
if (mode.isCompiled) return cmode;
|
|
647
|
-
[
|
|
648
|
-
// do this early so compiler extensions generally don't have to worry about
|
|
649
|
-
// the distinction between match/begin
|
|
650
|
-
compileMatch
|
|
651
|
-
].forEach((ext) => ext(mode, parent));
|
|
652
|
-
language.compilerExtensions.forEach((ext) => ext(mode, parent));
|
|
653
|
-
mode.__beforeBegin = null;
|
|
654
|
-
[
|
|
655
|
-
beginKeywords,
|
|
656
|
-
// do this later so compiler extensions that come earlier have access to the
|
|
657
|
-
// raw array if they wanted to perhaps manipulate it, etc.
|
|
658
|
-
compileIllegal,
|
|
659
|
-
// default to 1 relevance if not specified
|
|
660
|
-
compileRelevance
|
|
661
|
-
].forEach((ext) => ext(mode, parent));
|
|
662
|
-
mode.isCompiled = true;
|
|
663
|
-
let keywordPattern = null;
|
|
664
|
-
if (typeof mode.keywords === "object") {
|
|
665
|
-
keywordPattern = mode.keywords.$pattern;
|
|
666
|
-
delete mode.keywords.$pattern;
|
|
667
|
-
}
|
|
668
|
-
if (mode.keywords) {
|
|
669
|
-
mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);
|
|
670
|
-
}
|
|
671
|
-
if (mode.lexemes && keywordPattern) {
|
|
672
|
-
throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");
|
|
673
|
-
}
|
|
674
|
-
keywordPattern = keywordPattern || mode.lexemes || /\w+/;
|
|
675
|
-
cmode.keywordPatternRe = langRe(keywordPattern, true);
|
|
676
|
-
if (parent) {
|
|
677
|
-
if (!mode.begin) mode.begin = /\B|\b/;
|
|
678
|
-
cmode.beginRe = langRe(mode.begin);
|
|
679
|
-
if (mode.endSameAsBegin) mode.end = mode.begin;
|
|
680
|
-
if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/;
|
|
681
|
-
if (mode.end) cmode.endRe = langRe(mode.end);
|
|
682
|
-
cmode.terminatorEnd = source(mode.end) || "";
|
|
683
|
-
if (mode.endsWithParent && parent.terminatorEnd) {
|
|
684
|
-
cmode.terminatorEnd += (mode.end ? "|" : "") + parent.terminatorEnd;
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
if (mode.illegal) cmode.illegalRe = langRe(
|
|
688
|
-
/** @type {RegExp | string} */
|
|
689
|
-
mode.illegal
|
|
690
|
-
);
|
|
691
|
-
if (!mode.contains) mode.contains = [];
|
|
692
|
-
mode.contains = [].concat(...mode.contains.map(function(c) {
|
|
693
|
-
return expandOrCloneMode(c === "self" ? mode : c);
|
|
694
|
-
}));
|
|
695
|
-
mode.contains.forEach(function(c) {
|
|
696
|
-
compileMode(
|
|
697
|
-
/** @type Mode */
|
|
698
|
-
c,
|
|
699
|
-
cmode
|
|
700
|
-
);
|
|
701
|
-
});
|
|
702
|
-
if (mode.starts) {
|
|
703
|
-
compileMode(mode.starts, parent);
|
|
704
|
-
}
|
|
705
|
-
cmode.matcher = buildModeRegex(cmode);
|
|
706
|
-
return cmode;
|
|
707
|
-
}
|
|
708
|
-
if (!language.compilerExtensions) language.compilerExtensions = [];
|
|
709
|
-
if (language.contains && language.contains.includes("self")) {
|
|
710
|
-
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
711
|
-
}
|
|
712
|
-
language.classNameAliases = inherit(language.classNameAliases || {});
|
|
713
|
-
return compileMode(
|
|
714
|
-
/** @type Mode */
|
|
715
|
-
language
|
|
716
|
-
);
|
|
717
|
-
}
|
|
718
|
-
function dependencyOnParent(mode) {
|
|
719
|
-
if (!mode) return false;
|
|
720
|
-
return mode.endsWithParent || dependencyOnParent(mode.starts);
|
|
721
|
-
}
|
|
722
|
-
function expandOrCloneMode(mode) {
|
|
723
|
-
if (mode.variants && !mode.cachedVariants) {
|
|
724
|
-
mode.cachedVariants = mode.variants.map(function(variant) {
|
|
725
|
-
return inherit(mode, { variants: null }, variant);
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
if (mode.cachedVariants) {
|
|
729
|
-
return mode.cachedVariants;
|
|
730
|
-
}
|
|
731
|
-
if (dependencyOnParent(mode)) {
|
|
732
|
-
return inherit(mode, { starts: mode.starts ? inherit(mode.starts) : null });
|
|
733
|
-
}
|
|
734
|
-
if (Object.isFrozen(mode)) {
|
|
735
|
-
return inherit(mode);
|
|
736
|
-
}
|
|
737
|
-
return mode;
|
|
738
|
-
}
|
|
739
|
-
var version = "10.7.3";
|
|
740
|
-
function hasValueOrEmptyAttribute(value) {
|
|
741
|
-
return Boolean(value || value === "");
|
|
742
|
-
}
|
|
743
|
-
function BuildVuePlugin(hljs) {
|
|
744
|
-
const Component = {
|
|
745
|
-
props: ["language", "code", "autodetect"],
|
|
746
|
-
data: function() {
|
|
747
|
-
return {
|
|
748
|
-
detectedLanguage: "",
|
|
749
|
-
unknownLanguage: false
|
|
750
|
-
};
|
|
751
|
-
},
|
|
752
|
-
computed: {
|
|
753
|
-
className() {
|
|
754
|
-
if (this.unknownLanguage) return "";
|
|
755
|
-
return "hljs " + this.detectedLanguage;
|
|
756
|
-
},
|
|
757
|
-
highlighted() {
|
|
758
|
-
if (!this.autoDetect && !hljs.getLanguage(this.language)) {
|
|
759
|
-
console.warn(`The language "${this.language}" you specified could not be found.`);
|
|
760
|
-
this.unknownLanguage = true;
|
|
761
|
-
return escapeHTML(this.code);
|
|
762
|
-
}
|
|
763
|
-
let result = {};
|
|
764
|
-
if (this.autoDetect) {
|
|
765
|
-
result = hljs.highlightAuto(this.code);
|
|
766
|
-
this.detectedLanguage = result.language;
|
|
767
|
-
} else {
|
|
768
|
-
result = hljs.highlight(this.language, this.code, this.ignoreIllegals);
|
|
769
|
-
this.detectedLanguage = this.language;
|
|
770
|
-
}
|
|
771
|
-
return result.value;
|
|
772
|
-
},
|
|
773
|
-
autoDetect() {
|
|
774
|
-
return !this.language || hasValueOrEmptyAttribute(this.autodetect);
|
|
775
|
-
},
|
|
776
|
-
ignoreIllegals() {
|
|
777
|
-
return true;
|
|
778
|
-
}
|
|
779
|
-
},
|
|
780
|
-
// this avoids needing to use a whole Vue compilation pipeline just
|
|
781
|
-
// to build Highlight.js
|
|
782
|
-
render(createElement) {
|
|
783
|
-
return createElement("pre", {}, [
|
|
784
|
-
createElement("code", {
|
|
785
|
-
class: this.className,
|
|
786
|
-
domProps: { innerHTML: this.highlighted }
|
|
787
|
-
})
|
|
788
|
-
]);
|
|
789
|
-
}
|
|
790
|
-
// template: `<pre><code :class="className" v-html="highlighted"></code></pre>`
|
|
791
|
-
};
|
|
792
|
-
const VuePlugin = {
|
|
793
|
-
install(Vue) {
|
|
794
|
-
Vue.component("highlightjs", Component);
|
|
795
|
-
}
|
|
796
|
-
};
|
|
797
|
-
return { Component, VuePlugin };
|
|
798
|
-
}
|
|
799
|
-
var mergeHTMLPlugin = {
|
|
800
|
-
"after:highlightElement": ({ el, result, text }) => {
|
|
801
|
-
const originalStream = nodeStream(el);
|
|
802
|
-
if (!originalStream.length) return;
|
|
803
|
-
const resultNode = document.createElement("div");
|
|
804
|
-
resultNode.innerHTML = result.value;
|
|
805
|
-
result.value = mergeStreams(originalStream, nodeStream(resultNode), text);
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
function tag(node) {
|
|
809
|
-
return node.nodeName.toLowerCase();
|
|
810
|
-
}
|
|
811
|
-
function nodeStream(node) {
|
|
812
|
-
const result = [];
|
|
813
|
-
(function _nodeStream(node2, offset) {
|
|
814
|
-
for (let child = node2.firstChild; child; child = child.nextSibling) {
|
|
815
|
-
if (child.nodeType === 3) {
|
|
816
|
-
offset += child.nodeValue.length;
|
|
817
|
-
} else if (child.nodeType === 1) {
|
|
818
|
-
result.push({
|
|
819
|
-
event: "start",
|
|
820
|
-
offset,
|
|
821
|
-
node: child
|
|
822
|
-
});
|
|
823
|
-
offset = _nodeStream(child, offset);
|
|
824
|
-
if (!tag(child).match(/br|hr|img|input/)) {
|
|
825
|
-
result.push({
|
|
826
|
-
event: "stop",
|
|
827
|
-
offset,
|
|
828
|
-
node: child
|
|
829
|
-
});
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
return offset;
|
|
834
|
-
})(node, 0);
|
|
835
|
-
return result;
|
|
836
|
-
}
|
|
837
|
-
function mergeStreams(original, highlighted, value) {
|
|
838
|
-
let processed = 0;
|
|
839
|
-
let result = "";
|
|
840
|
-
const nodeStack = [];
|
|
841
|
-
function selectStream() {
|
|
842
|
-
if (!original.length || !highlighted.length) {
|
|
843
|
-
return original.length ? original : highlighted;
|
|
844
|
-
}
|
|
845
|
-
if (original[0].offset !== highlighted[0].offset) {
|
|
846
|
-
return original[0].offset < highlighted[0].offset ? original : highlighted;
|
|
847
|
-
}
|
|
848
|
-
return highlighted[0].event === "start" ? original : highlighted;
|
|
849
|
-
}
|
|
850
|
-
function open(node) {
|
|
851
|
-
function attributeString(attr) {
|
|
852
|
-
return " " + attr.nodeName + '="' + escapeHTML(attr.value) + '"';
|
|
853
|
-
}
|
|
854
|
-
result += "<" + tag(node) + [].map.call(node.attributes, attributeString).join("") + ">";
|
|
855
|
-
}
|
|
856
|
-
function close(node) {
|
|
857
|
-
result += "</" + tag(node) + ">";
|
|
858
|
-
}
|
|
859
|
-
function render(event) {
|
|
860
|
-
(event.event === "start" ? open : close)(event.node);
|
|
861
|
-
}
|
|
862
|
-
while (original.length || highlighted.length) {
|
|
863
|
-
let stream = selectStream();
|
|
864
|
-
result += escapeHTML(value.substring(processed, stream[0].offset));
|
|
865
|
-
processed = stream[0].offset;
|
|
866
|
-
if (stream === original) {
|
|
867
|
-
nodeStack.reverse().forEach(close);
|
|
868
|
-
do {
|
|
869
|
-
render(stream.splice(0, 1)[0]);
|
|
870
|
-
stream = selectStream();
|
|
871
|
-
} while (stream === original && stream.length && stream[0].offset === processed);
|
|
872
|
-
nodeStack.reverse().forEach(open);
|
|
873
|
-
} else {
|
|
874
|
-
if (stream[0].event === "start") {
|
|
875
|
-
nodeStack.push(stream[0].node);
|
|
876
|
-
} else {
|
|
877
|
-
nodeStack.pop();
|
|
878
|
-
}
|
|
879
|
-
render(stream.splice(0, 1)[0]);
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
return result + escapeHTML(value.substr(processed));
|
|
883
|
-
}
|
|
884
|
-
var seenDeprecations = {};
|
|
885
|
-
var error = (message) => {
|
|
886
|
-
console.error(message);
|
|
887
|
-
};
|
|
888
|
-
var warn = (message, ...args) => {
|
|
889
|
-
console.log(`WARN: ${message}`, ...args);
|
|
890
|
-
};
|
|
891
|
-
var deprecated = (version2, message) => {
|
|
892
|
-
if (seenDeprecations[`${version2}/${message}`]) return;
|
|
893
|
-
console.log(`Deprecated as of ${version2}. ${message}`);
|
|
894
|
-
seenDeprecations[`${version2}/${message}`] = true;
|
|
895
|
-
};
|
|
896
|
-
var escape$1 = escapeHTML;
|
|
897
|
-
var inherit$1 = inherit;
|
|
898
|
-
var NO_MATCH = /* @__PURE__ */ Symbol("nomatch");
|
|
899
|
-
var HLJS = function(hljs) {
|
|
900
|
-
const languages = /* @__PURE__ */ Object.create(null);
|
|
901
|
-
const aliases = /* @__PURE__ */ Object.create(null);
|
|
902
|
-
const plugins = [];
|
|
903
|
-
let SAFE_MODE = true;
|
|
904
|
-
const fixMarkupRe = /(^(<[^>]+>|\t|)+|\n)/gm;
|
|
905
|
-
const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?";
|
|
906
|
-
const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: "Plain text", contains: [] };
|
|
907
|
-
let options = {
|
|
908
|
-
noHighlightRe: /^(no-?highlight)$/i,
|
|
909
|
-
languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
|
|
910
|
-
classPrefix: "hljs-",
|
|
911
|
-
tabReplace: null,
|
|
912
|
-
useBR: false,
|
|
913
|
-
languages: null,
|
|
914
|
-
// beta configuration options, subject to change, welcome to discuss
|
|
915
|
-
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
916
|
-
__emitter: TokenTreeEmitter
|
|
917
|
-
};
|
|
918
|
-
function shouldNotHighlight(languageName) {
|
|
919
|
-
return options.noHighlightRe.test(languageName);
|
|
920
|
-
}
|
|
921
|
-
function blockLanguage(block) {
|
|
922
|
-
let classes = block.className + " ";
|
|
923
|
-
classes += block.parentNode ? block.parentNode.className : "";
|
|
924
|
-
const match = options.languageDetectRe.exec(classes);
|
|
925
|
-
if (match) {
|
|
926
|
-
const language = getLanguage(match[1]);
|
|
927
|
-
if (!language) {
|
|
928
|
-
warn(LANGUAGE_NOT_FOUND.replace("{}", match[1]));
|
|
929
|
-
warn("Falling back to no-highlight mode for this block.", block);
|
|
930
|
-
}
|
|
931
|
-
return language ? match[1] : "no-highlight";
|
|
932
|
-
}
|
|
933
|
-
return classes.split(/\s+/).find((_class) => shouldNotHighlight(_class) || getLanguage(_class));
|
|
934
|
-
}
|
|
935
|
-
function highlight2(codeOrlanguageName, optionsOrCode, ignoreIllegals, continuation) {
|
|
936
|
-
let code = "";
|
|
937
|
-
let languageName = "";
|
|
938
|
-
if (typeof optionsOrCode === "object") {
|
|
939
|
-
code = codeOrlanguageName;
|
|
940
|
-
ignoreIllegals = optionsOrCode.ignoreIllegals;
|
|
941
|
-
languageName = optionsOrCode.language;
|
|
942
|
-
continuation = void 0;
|
|
943
|
-
} else {
|
|
944
|
-
deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated.");
|
|
945
|
-
deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277");
|
|
946
|
-
languageName = codeOrlanguageName;
|
|
947
|
-
code = optionsOrCode;
|
|
948
|
-
}
|
|
949
|
-
const context = {
|
|
950
|
-
code,
|
|
951
|
-
language: languageName
|
|
952
|
-
};
|
|
953
|
-
fire("before:highlight", context);
|
|
954
|
-
const result = context.result ? context.result : _highlight(context.language, context.code, ignoreIllegals, continuation);
|
|
955
|
-
result.code = context.code;
|
|
956
|
-
fire("after:highlight", result);
|
|
957
|
-
return result;
|
|
958
|
-
}
|
|
959
|
-
function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {
|
|
960
|
-
function keywordData(mode, match) {
|
|
961
|
-
const matchText = language.case_insensitive ? match[0].toLowerCase() : match[0];
|
|
962
|
-
return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText];
|
|
963
|
-
}
|
|
964
|
-
function processKeywords() {
|
|
965
|
-
if (!top.keywords) {
|
|
966
|
-
emitter.addText(modeBuffer);
|
|
967
|
-
return;
|
|
968
|
-
}
|
|
969
|
-
let lastIndex = 0;
|
|
970
|
-
top.keywordPatternRe.lastIndex = 0;
|
|
971
|
-
let match = top.keywordPatternRe.exec(modeBuffer);
|
|
972
|
-
let buf = "";
|
|
973
|
-
while (match) {
|
|
974
|
-
buf += modeBuffer.substring(lastIndex, match.index);
|
|
975
|
-
const data = keywordData(top, match);
|
|
976
|
-
if (data) {
|
|
977
|
-
const [kind, keywordRelevance] = data;
|
|
978
|
-
emitter.addText(buf);
|
|
979
|
-
buf = "";
|
|
980
|
-
relevance += keywordRelevance;
|
|
981
|
-
if (kind.startsWith("_")) {
|
|
982
|
-
buf += match[0];
|
|
983
|
-
} else {
|
|
984
|
-
const cssClass = language.classNameAliases[kind] || kind;
|
|
985
|
-
emitter.addKeyword(match[0], cssClass);
|
|
986
|
-
}
|
|
987
|
-
} else {
|
|
988
|
-
buf += match[0];
|
|
989
|
-
}
|
|
990
|
-
lastIndex = top.keywordPatternRe.lastIndex;
|
|
991
|
-
match = top.keywordPatternRe.exec(modeBuffer);
|
|
992
|
-
}
|
|
993
|
-
buf += modeBuffer.substr(lastIndex);
|
|
994
|
-
emitter.addText(buf);
|
|
995
|
-
}
|
|
996
|
-
function processSubLanguage() {
|
|
997
|
-
if (modeBuffer === "") return;
|
|
998
|
-
let result2 = null;
|
|
999
|
-
if (typeof top.subLanguage === "string") {
|
|
1000
|
-
if (!languages[top.subLanguage]) {
|
|
1001
|
-
emitter.addText(modeBuffer);
|
|
1002
|
-
return;
|
|
1003
|
-
}
|
|
1004
|
-
result2 = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);
|
|
1005
|
-
continuations[top.subLanguage] = /** @type {CompiledMode} */
|
|
1006
|
-
result2.top;
|
|
1007
|
-
} else {
|
|
1008
|
-
result2 = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);
|
|
1009
|
-
}
|
|
1010
|
-
if (top.relevance > 0) {
|
|
1011
|
-
relevance += result2.relevance;
|
|
1012
|
-
}
|
|
1013
|
-
emitter.addSublanguage(result2.emitter, result2.language);
|
|
1014
|
-
}
|
|
1015
|
-
function processBuffer() {
|
|
1016
|
-
if (top.subLanguage != null) {
|
|
1017
|
-
processSubLanguage();
|
|
1018
|
-
} else {
|
|
1019
|
-
processKeywords();
|
|
1020
|
-
}
|
|
1021
|
-
modeBuffer = "";
|
|
1022
|
-
}
|
|
1023
|
-
function startNewMode(mode) {
|
|
1024
|
-
if (mode.className) {
|
|
1025
|
-
emitter.openNode(language.classNameAliases[mode.className] || mode.className);
|
|
1026
|
-
}
|
|
1027
|
-
top = Object.create(mode, { parent: { value: top } });
|
|
1028
|
-
return top;
|
|
1029
|
-
}
|
|
1030
|
-
function endOfMode(mode, match, matchPlusRemainder) {
|
|
1031
|
-
let matched = startsWith(mode.endRe, matchPlusRemainder);
|
|
1032
|
-
if (matched) {
|
|
1033
|
-
if (mode["on:end"]) {
|
|
1034
|
-
const resp = new Response(mode);
|
|
1035
|
-
mode["on:end"](match, resp);
|
|
1036
|
-
if (resp.isMatchIgnored) matched = false;
|
|
1037
|
-
}
|
|
1038
|
-
if (matched) {
|
|
1039
|
-
while (mode.endsParent && mode.parent) {
|
|
1040
|
-
mode = mode.parent;
|
|
1041
|
-
}
|
|
1042
|
-
return mode;
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
if (mode.endsWithParent) {
|
|
1046
|
-
return endOfMode(mode.parent, match, matchPlusRemainder);
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
function doIgnore(lexeme) {
|
|
1050
|
-
if (top.matcher.regexIndex === 0) {
|
|
1051
|
-
modeBuffer += lexeme[0];
|
|
1052
|
-
return 1;
|
|
1053
|
-
} else {
|
|
1054
|
-
resumeScanAtSamePosition = true;
|
|
1055
|
-
return 0;
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
function doBeginMatch(match) {
|
|
1059
|
-
const lexeme = match[0];
|
|
1060
|
-
const newMode = match.rule;
|
|
1061
|
-
const resp = new Response(newMode);
|
|
1062
|
-
const beforeCallbacks = [newMode.__beforeBegin, newMode["on:begin"]];
|
|
1063
|
-
for (const cb of beforeCallbacks) {
|
|
1064
|
-
if (!cb) continue;
|
|
1065
|
-
cb(match, resp);
|
|
1066
|
-
if (resp.isMatchIgnored) return doIgnore(lexeme);
|
|
1067
|
-
}
|
|
1068
|
-
if (newMode && newMode.endSameAsBegin) {
|
|
1069
|
-
newMode.endRe = escape(lexeme);
|
|
1070
|
-
}
|
|
1071
|
-
if (newMode.skip) {
|
|
1072
|
-
modeBuffer += lexeme;
|
|
1073
|
-
} else {
|
|
1074
|
-
if (newMode.excludeBegin) {
|
|
1075
|
-
modeBuffer += lexeme;
|
|
1076
|
-
}
|
|
1077
|
-
processBuffer();
|
|
1078
|
-
if (!newMode.returnBegin && !newMode.excludeBegin) {
|
|
1079
|
-
modeBuffer = lexeme;
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
startNewMode(newMode);
|
|
1083
|
-
return newMode.returnBegin ? 0 : lexeme.length;
|
|
1084
|
-
}
|
|
1085
|
-
function doEndMatch(match) {
|
|
1086
|
-
const lexeme = match[0];
|
|
1087
|
-
const matchPlusRemainder = codeToHighlight.substr(match.index);
|
|
1088
|
-
const endMode = endOfMode(top, match, matchPlusRemainder);
|
|
1089
|
-
if (!endMode) {
|
|
1090
|
-
return NO_MATCH;
|
|
1091
|
-
}
|
|
1092
|
-
const origin = top;
|
|
1093
|
-
if (origin.skip) {
|
|
1094
|
-
modeBuffer += lexeme;
|
|
1095
|
-
} else {
|
|
1096
|
-
if (!(origin.returnEnd || origin.excludeEnd)) {
|
|
1097
|
-
modeBuffer += lexeme;
|
|
1098
|
-
}
|
|
1099
|
-
processBuffer();
|
|
1100
|
-
if (origin.excludeEnd) {
|
|
1101
|
-
modeBuffer = lexeme;
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
do {
|
|
1105
|
-
if (top.className) {
|
|
1106
|
-
emitter.closeNode();
|
|
1107
|
-
}
|
|
1108
|
-
if (!top.skip && !top.subLanguage) {
|
|
1109
|
-
relevance += top.relevance;
|
|
1110
|
-
}
|
|
1111
|
-
top = top.parent;
|
|
1112
|
-
} while (top !== endMode.parent);
|
|
1113
|
-
if (endMode.starts) {
|
|
1114
|
-
if (endMode.endSameAsBegin) {
|
|
1115
|
-
endMode.starts.endRe = endMode.endRe;
|
|
1116
|
-
}
|
|
1117
|
-
startNewMode(endMode.starts);
|
|
1118
|
-
}
|
|
1119
|
-
return origin.returnEnd ? 0 : lexeme.length;
|
|
1120
|
-
}
|
|
1121
|
-
function processContinuations() {
|
|
1122
|
-
const list = [];
|
|
1123
|
-
for (let current = top; current !== language; current = current.parent) {
|
|
1124
|
-
if (current.className) {
|
|
1125
|
-
list.unshift(current.className);
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
list.forEach((item) => emitter.openNode(item));
|
|
1129
|
-
}
|
|
1130
|
-
let lastMatch = {};
|
|
1131
|
-
function processLexeme(textBeforeMatch, match) {
|
|
1132
|
-
const lexeme = match && match[0];
|
|
1133
|
-
modeBuffer += textBeforeMatch;
|
|
1134
|
-
if (lexeme == null) {
|
|
1135
|
-
processBuffer();
|
|
1136
|
-
return 0;
|
|
1137
|
-
}
|
|
1138
|
-
if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") {
|
|
1139
|
-
modeBuffer += codeToHighlight.slice(match.index, match.index + 1);
|
|
1140
|
-
if (!SAFE_MODE) {
|
|
1141
|
-
const err = new Error("0 width match regex");
|
|
1142
|
-
err.languageName = languageName;
|
|
1143
|
-
err.badRule = lastMatch.rule;
|
|
1144
|
-
throw err;
|
|
1145
|
-
}
|
|
1146
|
-
return 1;
|
|
1147
|
-
}
|
|
1148
|
-
lastMatch = match;
|
|
1149
|
-
if (match.type === "begin") {
|
|
1150
|
-
return doBeginMatch(match);
|
|
1151
|
-
} else if (match.type === "illegal" && !ignoreIllegals) {
|
|
1152
|
-
const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || "<unnamed>") + '"');
|
|
1153
|
-
err.mode = top;
|
|
1154
|
-
throw err;
|
|
1155
|
-
} else if (match.type === "end") {
|
|
1156
|
-
const processed = doEndMatch(match);
|
|
1157
|
-
if (processed !== NO_MATCH) {
|
|
1158
|
-
return processed;
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
if (match.type === "illegal" && lexeme === "") {
|
|
1162
|
-
return 1;
|
|
1163
|
-
}
|
|
1164
|
-
if (iterations > 1e5 && iterations > match.index * 3) {
|
|
1165
|
-
const err = new Error("potential infinite loop, way more iterations than matches");
|
|
1166
|
-
throw err;
|
|
1167
|
-
}
|
|
1168
|
-
modeBuffer += lexeme;
|
|
1169
|
-
return lexeme.length;
|
|
1170
|
-
}
|
|
1171
|
-
const language = getLanguage(languageName);
|
|
1172
|
-
if (!language) {
|
|
1173
|
-
error(LANGUAGE_NOT_FOUND.replace("{}", languageName));
|
|
1174
|
-
throw new Error('Unknown language: "' + languageName + '"');
|
|
1175
|
-
}
|
|
1176
|
-
const md = compileLanguage(language, { plugins });
|
|
1177
|
-
let result = "";
|
|
1178
|
-
let top = continuation || md;
|
|
1179
|
-
const continuations = {};
|
|
1180
|
-
const emitter = new options.__emitter(options);
|
|
1181
|
-
processContinuations();
|
|
1182
|
-
let modeBuffer = "";
|
|
1183
|
-
let relevance = 0;
|
|
1184
|
-
let index = 0;
|
|
1185
|
-
let iterations = 0;
|
|
1186
|
-
let resumeScanAtSamePosition = false;
|
|
1187
|
-
try {
|
|
1188
|
-
top.matcher.considerAll();
|
|
1189
|
-
for (; ; ) {
|
|
1190
|
-
iterations++;
|
|
1191
|
-
if (resumeScanAtSamePosition) {
|
|
1192
|
-
resumeScanAtSamePosition = false;
|
|
1193
|
-
} else {
|
|
1194
|
-
top.matcher.considerAll();
|
|
1195
|
-
}
|
|
1196
|
-
top.matcher.lastIndex = index;
|
|
1197
|
-
const match = top.matcher.exec(codeToHighlight);
|
|
1198
|
-
if (!match) break;
|
|
1199
|
-
const beforeMatch = codeToHighlight.substring(index, match.index);
|
|
1200
|
-
const processedCount = processLexeme(beforeMatch, match);
|
|
1201
|
-
index = match.index + processedCount;
|
|
1202
|
-
}
|
|
1203
|
-
processLexeme(codeToHighlight.substr(index));
|
|
1204
|
-
emitter.closeAllNodes();
|
|
1205
|
-
emitter.finalize();
|
|
1206
|
-
result = emitter.toHTML();
|
|
1207
|
-
return {
|
|
1208
|
-
// avoid possible breakage with v10 clients expecting
|
|
1209
|
-
// this to always be an integer
|
|
1210
|
-
relevance: Math.floor(relevance),
|
|
1211
|
-
value: result,
|
|
1212
|
-
language: languageName,
|
|
1213
|
-
illegal: false,
|
|
1214
|
-
emitter,
|
|
1215
|
-
top
|
|
1216
|
-
};
|
|
1217
|
-
} catch (err) {
|
|
1218
|
-
if (err.message && err.message.includes("Illegal")) {
|
|
1219
|
-
return {
|
|
1220
|
-
illegal: true,
|
|
1221
|
-
illegalBy: {
|
|
1222
|
-
msg: err.message,
|
|
1223
|
-
context: codeToHighlight.slice(index - 100, index + 100),
|
|
1224
|
-
mode: err.mode
|
|
1225
|
-
},
|
|
1226
|
-
sofar: result,
|
|
1227
|
-
relevance: 0,
|
|
1228
|
-
value: escape$1(codeToHighlight),
|
|
1229
|
-
emitter
|
|
1230
|
-
};
|
|
1231
|
-
} else if (SAFE_MODE) {
|
|
1232
|
-
return {
|
|
1233
|
-
illegal: false,
|
|
1234
|
-
relevance: 0,
|
|
1235
|
-
value: escape$1(codeToHighlight),
|
|
1236
|
-
emitter,
|
|
1237
|
-
language: languageName,
|
|
1238
|
-
top,
|
|
1239
|
-
errorRaised: err
|
|
1240
|
-
};
|
|
1241
|
-
} else {
|
|
1242
|
-
throw err;
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
function justTextHighlightResult(code) {
|
|
1247
|
-
const result = {
|
|
1248
|
-
relevance: 0,
|
|
1249
|
-
emitter: new options.__emitter(options),
|
|
1250
|
-
value: escape$1(code),
|
|
1251
|
-
illegal: false,
|
|
1252
|
-
top: PLAINTEXT_LANGUAGE
|
|
1253
|
-
};
|
|
1254
|
-
result.emitter.addText(code);
|
|
1255
|
-
return result;
|
|
1256
|
-
}
|
|
1257
|
-
function highlightAuto(code, languageSubset) {
|
|
1258
|
-
languageSubset = languageSubset || options.languages || Object.keys(languages);
|
|
1259
|
-
const plaintext = justTextHighlightResult(code);
|
|
1260
|
-
const results = languageSubset.filter(getLanguage).filter(autoDetection).map(
|
|
1261
|
-
(name) => _highlight(name, code, false)
|
|
1262
|
-
);
|
|
1263
|
-
results.unshift(plaintext);
|
|
1264
|
-
const sorted = results.sort((a, b) => {
|
|
1265
|
-
if (a.relevance !== b.relevance) return b.relevance - a.relevance;
|
|
1266
|
-
if (a.language && b.language) {
|
|
1267
|
-
if (getLanguage(a.language).supersetOf === b.language) {
|
|
1268
|
-
return 1;
|
|
1269
|
-
} else if (getLanguage(b.language).supersetOf === a.language) {
|
|
1270
|
-
return -1;
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
return 0;
|
|
1274
|
-
});
|
|
1275
|
-
const [best, secondBest] = sorted;
|
|
1276
|
-
const result = best;
|
|
1277
|
-
result.second_best = secondBest;
|
|
1278
|
-
return result;
|
|
1279
|
-
}
|
|
1280
|
-
function fixMarkup(html) {
|
|
1281
|
-
if (!(options.tabReplace || options.useBR)) {
|
|
1282
|
-
return html;
|
|
1283
|
-
}
|
|
1284
|
-
return html.replace(fixMarkupRe, (match) => {
|
|
1285
|
-
if (match === "\n") {
|
|
1286
|
-
return options.useBR ? "<br>" : match;
|
|
1287
|
-
} else if (options.tabReplace) {
|
|
1288
|
-
return match.replace(/\t/g, options.tabReplace);
|
|
1289
|
-
}
|
|
1290
|
-
return match;
|
|
1291
|
-
});
|
|
1292
|
-
}
|
|
1293
|
-
function updateClassName(element, currentLang, resultLang) {
|
|
1294
|
-
const language = currentLang ? aliases[currentLang] : resultLang;
|
|
1295
|
-
element.classList.add("hljs");
|
|
1296
|
-
if (language) element.classList.add(language);
|
|
1297
|
-
}
|
|
1298
|
-
const brPlugin = {
|
|
1299
|
-
"before:highlightElement": ({ el }) => {
|
|
1300
|
-
if (options.useBR) {
|
|
1301
|
-
el.innerHTML = el.innerHTML.replace(/\n/g, "").replace(/<br[ /]*>/g, "\n");
|
|
1302
|
-
}
|
|
1303
|
-
},
|
|
1304
|
-
"after:highlightElement": ({ result }) => {
|
|
1305
|
-
if (options.useBR) {
|
|
1306
|
-
result.value = result.value.replace(/\n/g, "<br>");
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
};
|
|
1310
|
-
const TAB_REPLACE_RE = /^(<[^>]+>|\t)+/gm;
|
|
1311
|
-
const tabReplacePlugin = {
|
|
1312
|
-
"after:highlightElement": ({ result }) => {
|
|
1313
|
-
if (options.tabReplace) {
|
|
1314
|
-
result.value = result.value.replace(
|
|
1315
|
-
TAB_REPLACE_RE,
|
|
1316
|
-
(m) => m.replace(/\t/g, options.tabReplace)
|
|
1317
|
-
);
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
};
|
|
1321
|
-
function highlightElement(element) {
|
|
1322
|
-
let node = null;
|
|
1323
|
-
const language = blockLanguage(element);
|
|
1324
|
-
if (shouldNotHighlight(language)) return;
|
|
1325
|
-
fire(
|
|
1326
|
-
"before:highlightElement",
|
|
1327
|
-
{ el: element, language }
|
|
1328
|
-
);
|
|
1329
|
-
node = element;
|
|
1330
|
-
const text = node.textContent;
|
|
1331
|
-
const result = language ? highlight2(text, { language, ignoreIllegals: true }) : highlightAuto(text);
|
|
1332
|
-
fire("after:highlightElement", { el: element, result, text });
|
|
1333
|
-
element.innerHTML = result.value;
|
|
1334
|
-
updateClassName(element, language, result.language);
|
|
1335
|
-
element.result = {
|
|
1336
|
-
language: result.language,
|
|
1337
|
-
// TODO: remove with version 11.0
|
|
1338
|
-
re: result.relevance,
|
|
1339
|
-
relavance: result.relevance
|
|
1340
|
-
};
|
|
1341
|
-
if (result.second_best) {
|
|
1342
|
-
element.second_best = {
|
|
1343
|
-
language: result.second_best.language,
|
|
1344
|
-
// TODO: remove with version 11.0
|
|
1345
|
-
re: result.second_best.relevance,
|
|
1346
|
-
relavance: result.second_best.relevance
|
|
1347
|
-
};
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
function configure(userOptions) {
|
|
1351
|
-
if (userOptions.useBR) {
|
|
1352
|
-
deprecated("10.3.0", "'useBR' will be removed entirely in v11.0");
|
|
1353
|
-
deprecated("10.3.0", "Please see https://github.com/highlightjs/highlight.js/issues/2559");
|
|
1354
|
-
}
|
|
1355
|
-
options = inherit$1(options, userOptions);
|
|
1356
|
-
}
|
|
1357
|
-
const initHighlighting = () => {
|
|
1358
|
-
if (initHighlighting.called) return;
|
|
1359
|
-
initHighlighting.called = true;
|
|
1360
|
-
deprecated("10.6.0", "initHighlighting() is deprecated. Use highlightAll() instead.");
|
|
1361
|
-
const blocks = document.querySelectorAll("pre code");
|
|
1362
|
-
blocks.forEach(highlightElement);
|
|
1363
|
-
};
|
|
1364
|
-
function initHighlightingOnLoad() {
|
|
1365
|
-
deprecated("10.6.0", "initHighlightingOnLoad() is deprecated. Use highlightAll() instead.");
|
|
1366
|
-
wantsHighlight = true;
|
|
1367
|
-
}
|
|
1368
|
-
let wantsHighlight = false;
|
|
1369
|
-
function highlightAll() {
|
|
1370
|
-
if (document.readyState === "loading") {
|
|
1371
|
-
wantsHighlight = true;
|
|
1372
|
-
return;
|
|
1373
|
-
}
|
|
1374
|
-
const blocks = document.querySelectorAll("pre code");
|
|
1375
|
-
blocks.forEach(highlightElement);
|
|
1376
|
-
}
|
|
1377
|
-
function boot() {
|
|
1378
|
-
if (wantsHighlight) highlightAll();
|
|
1379
|
-
}
|
|
1380
|
-
if (typeof window !== "undefined" && window.addEventListener) {
|
|
1381
|
-
window.addEventListener("DOMContentLoaded", boot, false);
|
|
1382
|
-
}
|
|
1383
|
-
function registerLanguage(languageName, languageDefinition) {
|
|
1384
|
-
let lang = null;
|
|
1385
|
-
try {
|
|
1386
|
-
lang = languageDefinition(hljs);
|
|
1387
|
-
} catch (error$1) {
|
|
1388
|
-
error("Language definition for '{}' could not be registered.".replace("{}", languageName));
|
|
1389
|
-
if (!SAFE_MODE) {
|
|
1390
|
-
throw error$1;
|
|
1391
|
-
} else {
|
|
1392
|
-
error(error$1);
|
|
1393
|
-
}
|
|
1394
|
-
lang = PLAINTEXT_LANGUAGE;
|
|
1395
|
-
}
|
|
1396
|
-
if (!lang.name) lang.name = languageName;
|
|
1397
|
-
languages[languageName] = lang;
|
|
1398
|
-
lang.rawDefinition = languageDefinition.bind(null, hljs);
|
|
1399
|
-
if (lang.aliases) {
|
|
1400
|
-
registerAliases(lang.aliases, { languageName });
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
function unregisterLanguage(languageName) {
|
|
1404
|
-
delete languages[languageName];
|
|
1405
|
-
for (const alias of Object.keys(aliases)) {
|
|
1406
|
-
if (aliases[alias] === languageName) {
|
|
1407
|
-
delete aliases[alias];
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
function listLanguages() {
|
|
1412
|
-
return Object.keys(languages);
|
|
1413
|
-
}
|
|
1414
|
-
function requireLanguage(name) {
|
|
1415
|
-
deprecated("10.4.0", "requireLanguage will be removed entirely in v11.");
|
|
1416
|
-
deprecated("10.4.0", "Please see https://github.com/highlightjs/highlight.js/pull/2844");
|
|
1417
|
-
const lang = getLanguage(name);
|
|
1418
|
-
if (lang) {
|
|
1419
|
-
return lang;
|
|
1420
|
-
}
|
|
1421
|
-
const err = new Error("The '{}' language is required, but not loaded.".replace("{}", name));
|
|
1422
|
-
throw err;
|
|
1423
|
-
}
|
|
1424
|
-
function getLanguage(name) {
|
|
1425
|
-
name = (name || "").toLowerCase();
|
|
1426
|
-
return languages[name] || languages[aliases[name]];
|
|
1427
|
-
}
|
|
1428
|
-
function registerAliases(aliasList, { languageName }) {
|
|
1429
|
-
if (typeof aliasList === "string") {
|
|
1430
|
-
aliasList = [aliasList];
|
|
1431
|
-
}
|
|
1432
|
-
aliasList.forEach((alias) => {
|
|
1433
|
-
aliases[alias.toLowerCase()] = languageName;
|
|
1434
|
-
});
|
|
1435
|
-
}
|
|
1436
|
-
function autoDetection(name) {
|
|
1437
|
-
const lang = getLanguage(name);
|
|
1438
|
-
return lang && !lang.disableAutodetect;
|
|
1439
|
-
}
|
|
1440
|
-
function upgradePluginAPI(plugin) {
|
|
1441
|
-
if (plugin["before:highlightBlock"] && !plugin["before:highlightElement"]) {
|
|
1442
|
-
plugin["before:highlightElement"] = (data) => {
|
|
1443
|
-
plugin["before:highlightBlock"](
|
|
1444
|
-
Object.assign({ block: data.el }, data)
|
|
1445
|
-
);
|
|
1446
|
-
};
|
|
1447
|
-
}
|
|
1448
|
-
if (plugin["after:highlightBlock"] && !plugin["after:highlightElement"]) {
|
|
1449
|
-
plugin["after:highlightElement"] = (data) => {
|
|
1450
|
-
plugin["after:highlightBlock"](
|
|
1451
|
-
Object.assign({ block: data.el }, data)
|
|
1452
|
-
);
|
|
1453
|
-
};
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
|
-
function addPlugin(plugin) {
|
|
1457
|
-
upgradePluginAPI(plugin);
|
|
1458
|
-
plugins.push(plugin);
|
|
1459
|
-
}
|
|
1460
|
-
function fire(event, args) {
|
|
1461
|
-
const cb = event;
|
|
1462
|
-
plugins.forEach(function(plugin) {
|
|
1463
|
-
if (plugin[cb]) {
|
|
1464
|
-
plugin[cb](args);
|
|
1465
|
-
}
|
|
1466
|
-
});
|
|
1467
|
-
}
|
|
1468
|
-
function deprecateFixMarkup(arg) {
|
|
1469
|
-
deprecated("10.2.0", "fixMarkup will be removed entirely in v11.0");
|
|
1470
|
-
deprecated("10.2.0", "Please see https://github.com/highlightjs/highlight.js/issues/2534");
|
|
1471
|
-
return fixMarkup(arg);
|
|
1472
|
-
}
|
|
1473
|
-
function deprecateHighlightBlock(el) {
|
|
1474
|
-
deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0");
|
|
1475
|
-
deprecated("10.7.0", "Please use highlightElement now.");
|
|
1476
|
-
return highlightElement(el);
|
|
1477
|
-
}
|
|
1478
|
-
Object.assign(hljs, {
|
|
1479
|
-
highlight: highlight2,
|
|
1480
|
-
highlightAuto,
|
|
1481
|
-
highlightAll,
|
|
1482
|
-
fixMarkup: deprecateFixMarkup,
|
|
1483
|
-
highlightElement,
|
|
1484
|
-
// TODO: Remove with v12 API
|
|
1485
|
-
highlightBlock: deprecateHighlightBlock,
|
|
1486
|
-
configure,
|
|
1487
|
-
initHighlighting,
|
|
1488
|
-
initHighlightingOnLoad,
|
|
1489
|
-
registerLanguage,
|
|
1490
|
-
unregisterLanguage,
|
|
1491
|
-
listLanguages,
|
|
1492
|
-
getLanguage,
|
|
1493
|
-
registerAliases,
|
|
1494
|
-
requireLanguage,
|
|
1495
|
-
autoDetection,
|
|
1496
|
-
inherit: inherit$1,
|
|
1497
|
-
addPlugin,
|
|
1498
|
-
// plugins for frameworks
|
|
1499
|
-
vuePlugin: BuildVuePlugin(hljs).VuePlugin
|
|
1500
|
-
});
|
|
1501
|
-
hljs.debugMode = function() {
|
|
1502
|
-
SAFE_MODE = false;
|
|
1503
|
-
};
|
|
1504
|
-
hljs.safeMode = function() {
|
|
1505
|
-
SAFE_MODE = true;
|
|
1506
|
-
};
|
|
1507
|
-
hljs.versionString = version;
|
|
1508
|
-
for (const key in MODES) {
|
|
1509
|
-
if (typeof MODES[key] === "object") {
|
|
1510
|
-
deepFreezeEs6(MODES[key]);
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
Object.assign(hljs, MODES);
|
|
1514
|
-
hljs.addPlugin(brPlugin);
|
|
1515
|
-
hljs.addPlugin(mergeHTMLPlugin);
|
|
1516
|
-
hljs.addPlugin(tabReplacePlugin);
|
|
1517
|
-
return hljs;
|
|
1518
|
-
};
|
|
1519
|
-
var highlight = HLJS({});
|
|
1520
|
-
module.exports = highlight;
|
|
1521
|
-
}
|
|
1522
|
-
});
|
|
1523
|
-
|
|
1524
|
-
// ../../node_modules/format/format.js
|
|
1525
|
-
var require_format = __commonJS({
|
|
1526
|
-
"../../node_modules/format/format.js"(exports, module) {
|
|
1527
|
-
"use strict";
|
|
1528
|
-
(function() {
|
|
1529
|
-
var namespace;
|
|
1530
|
-
if (typeof module !== "undefined") {
|
|
1531
|
-
namespace = module.exports = format;
|
|
1532
|
-
} else {
|
|
1533
|
-
namespace = (function() {
|
|
1534
|
-
return this || (1, eval)("this");
|
|
1535
|
-
})();
|
|
1536
|
-
}
|
|
1537
|
-
namespace.format = format;
|
|
1538
|
-
namespace.vsprintf = vsprintf;
|
|
1539
|
-
if (typeof console !== "undefined" && typeof console.log === "function") {
|
|
1540
|
-
namespace.printf = printf;
|
|
1541
|
-
}
|
|
1542
|
-
function printf() {
|
|
1543
|
-
console.log(format.apply(null, arguments));
|
|
1544
|
-
}
|
|
1545
|
-
function vsprintf(fmt, replacements) {
|
|
1546
|
-
return format.apply(null, [fmt].concat(replacements));
|
|
1547
|
-
}
|
|
1548
|
-
function format(fmt) {
|
|
1549
|
-
var argIndex = 1, args = [].slice.call(arguments), i = 0, n = fmt.length, result = "", c, escaped = false, arg, tmp, leadingZero = false, precision, nextArg = function() {
|
|
1550
|
-
return args[argIndex++];
|
|
1551
|
-
}, slurpNumber = function() {
|
|
1552
|
-
var digits = "";
|
|
1553
|
-
while (/\d/.test(fmt[i])) {
|
|
1554
|
-
digits += fmt[i++];
|
|
1555
|
-
c = fmt[i];
|
|
1556
|
-
}
|
|
1557
|
-
return digits.length > 0 ? parseInt(digits) : null;
|
|
1558
|
-
};
|
|
1559
|
-
for (; i < n; ++i) {
|
|
1560
|
-
c = fmt[i];
|
|
1561
|
-
if (escaped) {
|
|
1562
|
-
escaped = false;
|
|
1563
|
-
if (c == ".") {
|
|
1564
|
-
leadingZero = false;
|
|
1565
|
-
c = fmt[++i];
|
|
1566
|
-
} else if (c == "0" && fmt[i + 1] == ".") {
|
|
1567
|
-
leadingZero = true;
|
|
1568
|
-
i += 2;
|
|
1569
|
-
c = fmt[i];
|
|
1570
|
-
} else {
|
|
1571
|
-
leadingZero = true;
|
|
1572
|
-
}
|
|
1573
|
-
precision = slurpNumber();
|
|
1574
|
-
switch (c) {
|
|
1575
|
-
case "b":
|
|
1576
|
-
result += parseInt(nextArg(), 10).toString(2);
|
|
1577
|
-
break;
|
|
1578
|
-
case "c":
|
|
1579
|
-
arg = nextArg();
|
|
1580
|
-
if (typeof arg === "string" || arg instanceof String)
|
|
1581
|
-
result += arg;
|
|
1582
|
-
else
|
|
1583
|
-
result += String.fromCharCode(parseInt(arg, 10));
|
|
1584
|
-
break;
|
|
1585
|
-
case "d":
|
|
1586
|
-
result += parseInt(nextArg(), 10);
|
|
1587
|
-
break;
|
|
1588
|
-
case "f":
|
|
1589
|
-
tmp = String(parseFloat(nextArg()).toFixed(precision || 6));
|
|
1590
|
-
result += leadingZero ? tmp : tmp.replace(/^0/, "");
|
|
1591
|
-
break;
|
|
1592
|
-
case "j":
|
|
1593
|
-
result += JSON.stringify(nextArg());
|
|
1594
|
-
break;
|
|
1595
|
-
case "o":
|
|
1596
|
-
result += "0" + parseInt(nextArg(), 10).toString(8);
|
|
1597
|
-
break;
|
|
1598
|
-
case "s":
|
|
1599
|
-
result += nextArg();
|
|
1600
|
-
break;
|
|
1601
|
-
case "x":
|
|
1602
|
-
result += "0x" + parseInt(nextArg(), 10).toString(16);
|
|
1603
|
-
break;
|
|
1604
|
-
case "X":
|
|
1605
|
-
result += "0x" + parseInt(nextArg(), 10).toString(16).toUpperCase();
|
|
1606
|
-
break;
|
|
1607
|
-
default:
|
|
1608
|
-
result += c;
|
|
1609
|
-
break;
|
|
1610
|
-
}
|
|
1611
|
-
} else if (c === "%") {
|
|
1612
|
-
escaped = true;
|
|
1613
|
-
} else {
|
|
1614
|
-
result += c;
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
return result;
|
|
1618
|
-
}
|
|
1619
|
-
})();
|
|
1620
|
-
}
|
|
1621
|
-
});
|
|
1622
|
-
|
|
1623
|
-
// ../../node_modules/fault/index.js
|
|
1624
|
-
var require_fault = __commonJS({
|
|
1625
|
-
"../../node_modules/fault/index.js"(exports, module) {
|
|
1626
|
-
"use strict";
|
|
1627
|
-
var formatter = require_format();
|
|
1628
|
-
var fault = create(Error);
|
|
1629
|
-
module.exports = fault;
|
|
1630
|
-
fault.eval = create(EvalError);
|
|
1631
|
-
fault.range = create(RangeError);
|
|
1632
|
-
fault.reference = create(ReferenceError);
|
|
1633
|
-
fault.syntax = create(SyntaxError);
|
|
1634
|
-
fault.type = create(TypeError);
|
|
1635
|
-
fault.uri = create(URIError);
|
|
1636
|
-
fault.create = create;
|
|
1637
|
-
function create(EConstructor) {
|
|
1638
|
-
FormattedError.displayName = EConstructor.displayName || EConstructor.name;
|
|
1639
|
-
return FormattedError;
|
|
1640
|
-
function FormattedError(format) {
|
|
1641
|
-
if (format) {
|
|
1642
|
-
format = formatter.apply(null, arguments);
|
|
1643
|
-
}
|
|
1644
|
-
return new EConstructor(format);
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
});
|
|
1649
|
-
|
|
1650
|
-
// ../../node_modules/lowlight/lib/core.js
|
|
1651
|
-
var require_core2 = __commonJS({
|
|
1652
|
-
"../../node_modules/lowlight/lib/core.js"(exports) {
|
|
1653
|
-
var high = require_core();
|
|
1654
|
-
var fault = require_fault();
|
|
1655
|
-
exports.highlight = highlight;
|
|
1656
|
-
exports.highlightAuto = highlightAuto;
|
|
1657
|
-
exports.registerLanguage = registerLanguage;
|
|
1658
|
-
exports.listLanguages = listLanguages;
|
|
1659
|
-
exports.registerAlias = registerAlias;
|
|
1660
|
-
Emitter.prototype.addText = text;
|
|
1661
|
-
Emitter.prototype.addKeyword = addKeyword;
|
|
1662
|
-
Emitter.prototype.addSublanguage = addSublanguage;
|
|
1663
|
-
Emitter.prototype.openNode = open;
|
|
1664
|
-
Emitter.prototype.closeNode = close;
|
|
1665
|
-
Emitter.prototype.closeAllNodes = noop;
|
|
1666
|
-
Emitter.prototype.finalize = noop;
|
|
1667
|
-
Emitter.prototype.toHTML = toHtmlNoop;
|
|
1668
|
-
var defaultPrefix = "hljs-";
|
|
1669
|
-
function highlight(name, value, options) {
|
|
1670
|
-
var before = high.configure({});
|
|
1671
|
-
var settings = options || {};
|
|
1672
|
-
var prefix = settings.prefix;
|
|
1673
|
-
var result;
|
|
1674
|
-
if (typeof name !== "string") {
|
|
1675
|
-
throw fault("Expected `string` for name, got `%s`", name);
|
|
1676
|
-
}
|
|
1677
|
-
if (!high.getLanguage(name)) {
|
|
1678
|
-
throw fault("Unknown language: `%s` is not registered", name);
|
|
1679
|
-
}
|
|
1680
|
-
if (typeof value !== "string") {
|
|
1681
|
-
throw fault("Expected `string` for value, got `%s`", value);
|
|
1682
|
-
}
|
|
1683
|
-
if (prefix === null || prefix === void 0) {
|
|
1684
|
-
prefix = defaultPrefix;
|
|
1685
|
-
}
|
|
1686
|
-
high.configure({ __emitter: Emitter, classPrefix: prefix });
|
|
1687
|
-
result = high.highlight(value, { language: name, ignoreIllegals: true });
|
|
1688
|
-
high.configure(before || {});
|
|
1689
|
-
if (result.errorRaised) {
|
|
1690
|
-
throw result.errorRaised;
|
|
1691
|
-
}
|
|
1692
|
-
return {
|
|
1693
|
-
relevance: result.relevance,
|
|
1694
|
-
language: result.language,
|
|
1695
|
-
value: result.emitter.rootNode.children
|
|
1696
|
-
};
|
|
1697
|
-
}
|
|
1698
|
-
function highlightAuto(value, options) {
|
|
1699
|
-
var settings = options || {};
|
|
1700
|
-
var subset = settings.subset || high.listLanguages();
|
|
1701
|
-
var prefix = settings.prefix;
|
|
1702
|
-
var length = subset.length;
|
|
1703
|
-
var index = -1;
|
|
1704
|
-
var result;
|
|
1705
|
-
var secondBest;
|
|
1706
|
-
var current;
|
|
1707
|
-
var name;
|
|
1708
|
-
if (prefix === null || prefix === void 0) {
|
|
1709
|
-
prefix = defaultPrefix;
|
|
1710
|
-
}
|
|
1711
|
-
if (typeof value !== "string") {
|
|
1712
|
-
throw fault("Expected `string` for value, got `%s`", value);
|
|
1713
|
-
}
|
|
1714
|
-
secondBest = { relevance: 0, language: null, value: [] };
|
|
1715
|
-
result = { relevance: 0, language: null, value: [] };
|
|
1716
|
-
while (++index < length) {
|
|
1717
|
-
name = subset[index];
|
|
1718
|
-
if (!high.getLanguage(name)) {
|
|
1719
|
-
continue;
|
|
1720
|
-
}
|
|
1721
|
-
current = highlight(name, value, options);
|
|
1722
|
-
current.language = name;
|
|
1723
|
-
if (current.relevance > secondBest.relevance) {
|
|
1724
|
-
secondBest = current;
|
|
1725
|
-
}
|
|
1726
|
-
if (current.relevance > result.relevance) {
|
|
1727
|
-
secondBest = result;
|
|
1728
|
-
result = current;
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
if (secondBest.language) {
|
|
1732
|
-
result.secondBest = secondBest;
|
|
1733
|
-
}
|
|
1734
|
-
return result;
|
|
1735
|
-
}
|
|
1736
|
-
function registerLanguage(name, syntax) {
|
|
1737
|
-
high.registerLanguage(name, syntax);
|
|
1738
|
-
}
|
|
1739
|
-
function listLanguages() {
|
|
1740
|
-
return high.listLanguages();
|
|
1741
|
-
}
|
|
1742
|
-
function registerAlias(name, alias) {
|
|
1743
|
-
var map = name;
|
|
1744
|
-
var key;
|
|
1745
|
-
if (alias) {
|
|
1746
|
-
map = {};
|
|
1747
|
-
map[name] = alias;
|
|
1748
|
-
}
|
|
1749
|
-
for (key in map) {
|
|
1750
|
-
high.registerAliases(map[key], { languageName: key });
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
function Emitter(options) {
|
|
1754
|
-
this.options = options;
|
|
1755
|
-
this.rootNode = { children: [] };
|
|
1756
|
-
this.stack = [this.rootNode];
|
|
1757
|
-
}
|
|
1758
|
-
function addKeyword(value, name) {
|
|
1759
|
-
this.openNode(name);
|
|
1760
|
-
this.addText(value);
|
|
1761
|
-
this.closeNode();
|
|
1762
|
-
}
|
|
1763
|
-
function addSublanguage(other, name) {
|
|
1764
|
-
var stack = this.stack;
|
|
1765
|
-
var current = stack[stack.length - 1];
|
|
1766
|
-
var results = other.rootNode.children;
|
|
1767
|
-
var node = name ? {
|
|
1768
|
-
type: "element",
|
|
1769
|
-
tagName: "span",
|
|
1770
|
-
properties: { className: [name] },
|
|
1771
|
-
children: results
|
|
1772
|
-
} : results;
|
|
1773
|
-
current.children = current.children.concat(node);
|
|
1774
|
-
}
|
|
1775
|
-
function text(value) {
|
|
1776
|
-
var stack = this.stack;
|
|
1777
|
-
var current;
|
|
1778
|
-
var tail;
|
|
1779
|
-
if (value === "") return;
|
|
1780
|
-
current = stack[stack.length - 1];
|
|
1781
|
-
tail = current.children[current.children.length - 1];
|
|
1782
|
-
if (tail && tail.type === "text") {
|
|
1783
|
-
tail.value += value;
|
|
1784
|
-
} else {
|
|
1785
|
-
current.children.push({ type: "text", value });
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
function open(name) {
|
|
1789
|
-
var stack = this.stack;
|
|
1790
|
-
var className = this.options.classPrefix + name;
|
|
1791
|
-
var current = stack[stack.length - 1];
|
|
1792
|
-
var child = {
|
|
1793
|
-
type: "element",
|
|
1794
|
-
tagName: "span",
|
|
1795
|
-
properties: { className: [className] },
|
|
1796
|
-
children: []
|
|
1797
|
-
};
|
|
1798
|
-
current.children.push(child);
|
|
1799
|
-
stack.push(child);
|
|
1800
|
-
}
|
|
1801
|
-
function close() {
|
|
1802
|
-
this.stack.pop();
|
|
1803
|
-
}
|
|
1804
|
-
function toHtmlNoop() {
|
|
1805
|
-
return "";
|
|
1806
|
-
}
|
|
1807
|
-
function noop() {
|
|
1808
|
-
}
|
|
1809
|
-
}
|
|
1810
|
-
});
|
|
1811
|
-
export default require_core2();
|