@simon_he/vue-tui 1.1.13 → 1.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/agent.cjs CHANGED
@@ -15170,7 +15170,7 @@ function loadBuiltinMathRasterizer() {
15170
15170
  })()), builtinRasterizerLoad;
15171
15171
  }
15172
15172
 
15173
- // node_modules/.pnpm/stream-markdown-parser@1.2.19/node_modules/stream-markdown-parser/dist/index.js
15173
+ // node_modules/.pnpm/stream-markdown-parser@1.2.20/node_modules/stream-markdown-parser/dist/index.js
15174
15174
  var __create2 = Object.create, __defProp$1 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __commonJS = (cb, mod) => function() {
15175
15175
  return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15176
15176
  }, __export$1 = (all) => {
@@ -15553,7 +15553,756 @@ var require_markdown_it_task_checkbox = /* @__PURE__ */ __commonJS({ "../../node
15553
15553
  function startsWithTodoMarkdown(token) {
15554
15554
  return /^\[[xX \u00A0]\][ \u00A0]/.test(token.content);
15555
15555
  }
15556
- } }), decodeMap = /* @__PURE__ */ new Map([
15556
+ } }), import_markdown_it_task_checkbox = /* @__PURE__ */ __toESM2(require_markdown_it_task_checkbox(), 1), ambiguousMinimalCodePoint = 161, ambiguousMaximumCodePoint = 1114109, ambiguousRanges = [
15557
+ 161,
15558
+ 161,
15559
+ 164,
15560
+ 164,
15561
+ 167,
15562
+ 168,
15563
+ 170,
15564
+ 170,
15565
+ 173,
15566
+ 174,
15567
+ 176,
15568
+ 180,
15569
+ 182,
15570
+ 186,
15571
+ 188,
15572
+ 191,
15573
+ 198,
15574
+ 198,
15575
+ 208,
15576
+ 208,
15577
+ 215,
15578
+ 216,
15579
+ 222,
15580
+ 225,
15581
+ 230,
15582
+ 230,
15583
+ 232,
15584
+ 234,
15585
+ 236,
15586
+ 237,
15587
+ 240,
15588
+ 240,
15589
+ 242,
15590
+ 243,
15591
+ 247,
15592
+ 250,
15593
+ 252,
15594
+ 252,
15595
+ 254,
15596
+ 254,
15597
+ 257,
15598
+ 257,
15599
+ 273,
15600
+ 273,
15601
+ 275,
15602
+ 275,
15603
+ 283,
15604
+ 283,
15605
+ 294,
15606
+ 295,
15607
+ 299,
15608
+ 299,
15609
+ 305,
15610
+ 307,
15611
+ 312,
15612
+ 312,
15613
+ 319,
15614
+ 322,
15615
+ 324,
15616
+ 324,
15617
+ 328,
15618
+ 331,
15619
+ 333,
15620
+ 333,
15621
+ 338,
15622
+ 339,
15623
+ 358,
15624
+ 359,
15625
+ 363,
15626
+ 363,
15627
+ 462,
15628
+ 462,
15629
+ 464,
15630
+ 464,
15631
+ 466,
15632
+ 466,
15633
+ 468,
15634
+ 468,
15635
+ 470,
15636
+ 470,
15637
+ 472,
15638
+ 472,
15639
+ 474,
15640
+ 474,
15641
+ 476,
15642
+ 476,
15643
+ 593,
15644
+ 593,
15645
+ 609,
15646
+ 609,
15647
+ 708,
15648
+ 708,
15649
+ 711,
15650
+ 711,
15651
+ 713,
15652
+ 715,
15653
+ 717,
15654
+ 717,
15655
+ 720,
15656
+ 720,
15657
+ 728,
15658
+ 731,
15659
+ 733,
15660
+ 733,
15661
+ 735,
15662
+ 735,
15663
+ 768,
15664
+ 879,
15665
+ 913,
15666
+ 929,
15667
+ 931,
15668
+ 937,
15669
+ 945,
15670
+ 961,
15671
+ 963,
15672
+ 969,
15673
+ 1025,
15674
+ 1025,
15675
+ 1040,
15676
+ 1103,
15677
+ 1105,
15678
+ 1105,
15679
+ 8208,
15680
+ 8208,
15681
+ 8211,
15682
+ 8214,
15683
+ 8216,
15684
+ 8217,
15685
+ 8220,
15686
+ 8221,
15687
+ 8224,
15688
+ 8226,
15689
+ 8228,
15690
+ 8231,
15691
+ 8240,
15692
+ 8240,
15693
+ 8242,
15694
+ 8243,
15695
+ 8245,
15696
+ 8245,
15697
+ 8251,
15698
+ 8251,
15699
+ 8254,
15700
+ 8254,
15701
+ 8308,
15702
+ 8308,
15703
+ 8319,
15704
+ 8319,
15705
+ 8321,
15706
+ 8324,
15707
+ 8364,
15708
+ 8364,
15709
+ 8451,
15710
+ 8451,
15711
+ 8453,
15712
+ 8453,
15713
+ 8457,
15714
+ 8457,
15715
+ 8467,
15716
+ 8467,
15717
+ 8470,
15718
+ 8470,
15719
+ 8481,
15720
+ 8482,
15721
+ 8486,
15722
+ 8486,
15723
+ 8491,
15724
+ 8491,
15725
+ 8531,
15726
+ 8532,
15727
+ 8539,
15728
+ 8542,
15729
+ 8544,
15730
+ 8555,
15731
+ 8560,
15732
+ 8569,
15733
+ 8585,
15734
+ 8585,
15735
+ 8592,
15736
+ 8601,
15737
+ 8632,
15738
+ 8633,
15739
+ 8658,
15740
+ 8658,
15741
+ 8660,
15742
+ 8660,
15743
+ 8679,
15744
+ 8679,
15745
+ 8704,
15746
+ 8704,
15747
+ 8706,
15748
+ 8707,
15749
+ 8711,
15750
+ 8712,
15751
+ 8715,
15752
+ 8715,
15753
+ 8719,
15754
+ 8719,
15755
+ 8721,
15756
+ 8721,
15757
+ 8725,
15758
+ 8725,
15759
+ 8730,
15760
+ 8730,
15761
+ 8733,
15762
+ 8736,
15763
+ 8739,
15764
+ 8739,
15765
+ 8741,
15766
+ 8741,
15767
+ 8743,
15768
+ 8748,
15769
+ 8750,
15770
+ 8750,
15771
+ 8756,
15772
+ 8759,
15773
+ 8764,
15774
+ 8765,
15775
+ 8776,
15776
+ 8776,
15777
+ 8780,
15778
+ 8780,
15779
+ 8786,
15780
+ 8786,
15781
+ 8800,
15782
+ 8801,
15783
+ 8804,
15784
+ 8807,
15785
+ 8810,
15786
+ 8811,
15787
+ 8814,
15788
+ 8815,
15789
+ 8834,
15790
+ 8835,
15791
+ 8838,
15792
+ 8839,
15793
+ 8853,
15794
+ 8853,
15795
+ 8857,
15796
+ 8857,
15797
+ 8869,
15798
+ 8869,
15799
+ 8895,
15800
+ 8895,
15801
+ 8978,
15802
+ 8978,
15803
+ 9312,
15804
+ 9449,
15805
+ 9451,
15806
+ 9547,
15807
+ 9552,
15808
+ 9587,
15809
+ 9600,
15810
+ 9615,
15811
+ 9618,
15812
+ 9621,
15813
+ 9632,
15814
+ 9633,
15815
+ 9635,
15816
+ 9641,
15817
+ 9650,
15818
+ 9651,
15819
+ 9654,
15820
+ 9655,
15821
+ 9660,
15822
+ 9661,
15823
+ 9664,
15824
+ 9665,
15825
+ 9670,
15826
+ 9672,
15827
+ 9675,
15828
+ 9675,
15829
+ 9678,
15830
+ 9681,
15831
+ 9698,
15832
+ 9701,
15833
+ 9711,
15834
+ 9711,
15835
+ 9733,
15836
+ 9734,
15837
+ 9737,
15838
+ 9737,
15839
+ 9742,
15840
+ 9743,
15841
+ 9756,
15842
+ 9756,
15843
+ 9758,
15844
+ 9758,
15845
+ 9792,
15846
+ 9792,
15847
+ 9794,
15848
+ 9794,
15849
+ 9824,
15850
+ 9825,
15851
+ 9827,
15852
+ 9829,
15853
+ 9831,
15854
+ 9834,
15855
+ 9836,
15856
+ 9837,
15857
+ 9839,
15858
+ 9839,
15859
+ 9886,
15860
+ 9887,
15861
+ 9919,
15862
+ 9919,
15863
+ 9926,
15864
+ 9933,
15865
+ 9935,
15866
+ 9939,
15867
+ 9941,
15868
+ 9953,
15869
+ 9955,
15870
+ 9955,
15871
+ 9960,
15872
+ 9961,
15873
+ 9963,
15874
+ 9969,
15875
+ 9972,
15876
+ 9972,
15877
+ 9974,
15878
+ 9977,
15879
+ 9979,
15880
+ 9980,
15881
+ 9982,
15882
+ 9983,
15883
+ 10045,
15884
+ 10045,
15885
+ 10102,
15886
+ 10111,
15887
+ 11094,
15888
+ 11097,
15889
+ 12872,
15890
+ 12879,
15891
+ 57344,
15892
+ 63743,
15893
+ 65024,
15894
+ 65039,
15895
+ 65533,
15896
+ 65533,
15897
+ 127232,
15898
+ 127242,
15899
+ 127248,
15900
+ 127277,
15901
+ 127280,
15902
+ 127337,
15903
+ 127344,
15904
+ 127373,
15905
+ 127375,
15906
+ 127376,
15907
+ 127387,
15908
+ 127404,
15909
+ 917760,
15910
+ 917999,
15911
+ 983040,
15912
+ 1048573,
15913
+ 1048576,
15914
+ 1114109
15915
+ ], fullwidthMinimalCodePoint = 12288, fullwidthMaximumCodePoint = 65510, fullwidthRanges = [
15916
+ 12288,
15917
+ 12288,
15918
+ 65281,
15919
+ 65376,
15920
+ 65504,
15921
+ 65510
15922
+ ], halfwidthMinimalCodePoint = 8361, halfwidthMaximumCodePoint = 65518, halfwidthRanges = [
15923
+ 8361,
15924
+ 8361,
15925
+ 65377,
15926
+ 65470,
15927
+ 65474,
15928
+ 65479,
15929
+ 65482,
15930
+ 65487,
15931
+ 65490,
15932
+ 65495,
15933
+ 65498,
15934
+ 65500,
15935
+ 65512,
15936
+ 65518
15937
+ ], narrowMinimalCodePoint = 32, narrowMaximumCodePoint = 10630, narrowRanges = [
15938
+ 32,
15939
+ 126,
15940
+ 162,
15941
+ 163,
15942
+ 165,
15943
+ 166,
15944
+ 172,
15945
+ 172,
15946
+ 175,
15947
+ 175,
15948
+ 10214,
15949
+ 10221,
15950
+ 10629,
15951
+ 10630
15952
+ ], wideMinimalCodePoint = 4352, wideMaximumCodePoint = 262141, wideRanges = [
15953
+ 4352,
15954
+ 4447,
15955
+ 8986,
15956
+ 8987,
15957
+ 9001,
15958
+ 9002,
15959
+ 9193,
15960
+ 9196,
15961
+ 9200,
15962
+ 9200,
15963
+ 9203,
15964
+ 9203,
15965
+ 9725,
15966
+ 9726,
15967
+ 9748,
15968
+ 9749,
15969
+ 9776,
15970
+ 9783,
15971
+ 9800,
15972
+ 9811,
15973
+ 9855,
15974
+ 9855,
15975
+ 9866,
15976
+ 9871,
15977
+ 9875,
15978
+ 9875,
15979
+ 9889,
15980
+ 9889,
15981
+ 9898,
15982
+ 9899,
15983
+ 9917,
15984
+ 9918,
15985
+ 9924,
15986
+ 9925,
15987
+ 9934,
15988
+ 9934,
15989
+ 9940,
15990
+ 9940,
15991
+ 9962,
15992
+ 9962,
15993
+ 9970,
15994
+ 9971,
15995
+ 9973,
15996
+ 9973,
15997
+ 9978,
15998
+ 9978,
15999
+ 9981,
16000
+ 9981,
16001
+ 9989,
16002
+ 9989,
16003
+ 9994,
16004
+ 9995,
16005
+ 10024,
16006
+ 10024,
16007
+ 10060,
16008
+ 10060,
16009
+ 10062,
16010
+ 10062,
16011
+ 10067,
16012
+ 10069,
16013
+ 10071,
16014
+ 10071,
16015
+ 10133,
16016
+ 10135,
16017
+ 10160,
16018
+ 10160,
16019
+ 10175,
16020
+ 10175,
16021
+ 11035,
16022
+ 11036,
16023
+ 11088,
16024
+ 11088,
16025
+ 11093,
16026
+ 11093,
16027
+ 11904,
16028
+ 11929,
16029
+ 11931,
16030
+ 12019,
16031
+ 12032,
16032
+ 12245,
16033
+ 12272,
16034
+ 12287,
16035
+ 12289,
16036
+ 12350,
16037
+ 12353,
16038
+ 12438,
16039
+ 12441,
16040
+ 12543,
16041
+ 12549,
16042
+ 12591,
16043
+ 12593,
16044
+ 12686,
16045
+ 12688,
16046
+ 12773,
16047
+ 12783,
16048
+ 12830,
16049
+ 12832,
16050
+ 12871,
16051
+ 12880,
16052
+ 42124,
16053
+ 42128,
16054
+ 42182,
16055
+ 43360,
16056
+ 43388,
16057
+ 44032,
16058
+ 55203,
16059
+ 63744,
16060
+ 64255,
16061
+ 65040,
16062
+ 65049,
16063
+ 65072,
16064
+ 65106,
16065
+ 65108,
16066
+ 65126,
16067
+ 65128,
16068
+ 65131,
16069
+ 94176,
16070
+ 94180,
16071
+ 94192,
16072
+ 94198,
16073
+ 94208,
16074
+ 101589,
16075
+ 101631,
16076
+ 101662,
16077
+ 101760,
16078
+ 101874,
16079
+ 110576,
16080
+ 110579,
16081
+ 110581,
16082
+ 110587,
16083
+ 110589,
16084
+ 110590,
16085
+ 110592,
16086
+ 110882,
16087
+ 110898,
16088
+ 110898,
16089
+ 110928,
16090
+ 110930,
16091
+ 110933,
16092
+ 110933,
16093
+ 110948,
16094
+ 110951,
16095
+ 110960,
16096
+ 111355,
16097
+ 119552,
16098
+ 119638,
16099
+ 119648,
16100
+ 119670,
16101
+ 126980,
16102
+ 126980,
16103
+ 127183,
16104
+ 127183,
16105
+ 127374,
16106
+ 127374,
16107
+ 127377,
16108
+ 127386,
16109
+ 127488,
16110
+ 127490,
16111
+ 127504,
16112
+ 127547,
16113
+ 127552,
16114
+ 127560,
16115
+ 127568,
16116
+ 127569,
16117
+ 127584,
16118
+ 127589,
16119
+ 127744,
16120
+ 127776,
16121
+ 127789,
16122
+ 127797,
16123
+ 127799,
16124
+ 127868,
16125
+ 127870,
16126
+ 127891,
16127
+ 127904,
16128
+ 127946,
16129
+ 127951,
16130
+ 127955,
16131
+ 127968,
16132
+ 127984,
16133
+ 127988,
16134
+ 127988,
16135
+ 127992,
16136
+ 128062,
16137
+ 128064,
16138
+ 128064,
16139
+ 128066,
16140
+ 128252,
16141
+ 128255,
16142
+ 128317,
16143
+ 128331,
16144
+ 128334,
16145
+ 128336,
16146
+ 128359,
16147
+ 128378,
16148
+ 128378,
16149
+ 128405,
16150
+ 128406,
16151
+ 128420,
16152
+ 128420,
16153
+ 128507,
16154
+ 128591,
16155
+ 128640,
16156
+ 128709,
16157
+ 128716,
16158
+ 128716,
16159
+ 128720,
16160
+ 128722,
16161
+ 128725,
16162
+ 128728,
16163
+ 128732,
16164
+ 128735,
16165
+ 128747,
16166
+ 128748,
16167
+ 128756,
16168
+ 128764,
16169
+ 128992,
16170
+ 129003,
16171
+ 129008,
16172
+ 129008,
16173
+ 129292,
16174
+ 129338,
16175
+ 129340,
16176
+ 129349,
16177
+ 129351,
16178
+ 129535,
16179
+ 129648,
16180
+ 129660,
16181
+ 129664,
16182
+ 129674,
16183
+ 129678,
16184
+ 129734,
16185
+ 129736,
16186
+ 129736,
16187
+ 129741,
16188
+ 129756,
16189
+ 129759,
16190
+ 129770,
16191
+ 129775,
16192
+ 129784,
16193
+ 131072,
16194
+ 196605,
16195
+ 196608,
16196
+ 262141
16197
+ ], isInRange = (ranges, codePoint) => {
16198
+ let low = 0, high = Math.floor(ranges.length / 2) - 1;
16199
+ for (; low <= high; ) {
16200
+ let mid = Math.floor((low + high) / 2), i = mid * 2;
16201
+ if (codePoint < ranges[i])
16202
+ high = mid - 1;
16203
+ else if (codePoint > ranges[i + 1])
16204
+ low = mid + 1;
16205
+ else
16206
+ return !0;
16207
+ }
16208
+ return !1;
16209
+ }, commonCjkCodePoint = 19968, [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
16210
+ function findWideFastPathRange(ranges) {
16211
+ let fastPathStart = ranges[0], fastPathEnd = ranges[1];
16212
+ for (let index = 0; index < ranges.length; index += 2) {
16213
+ let start = ranges[index], end = ranges[index + 1];
16214
+ if (commonCjkCodePoint >= start && commonCjkCodePoint <= end)
16215
+ return [start, end];
16216
+ end - start > fastPathEnd - fastPathStart && (fastPathStart = start, fastPathEnd = end);
16217
+ }
16218
+ return [fastPathStart, fastPathEnd];
16219
+ }
16220
+ var isAmbiguous = (codePoint) => codePoint < ambiguousMinimalCodePoint || codePoint > ambiguousMaximumCodePoint ? !1 : isInRange(ambiguousRanges, codePoint), isFullWidth = (codePoint) => codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint ? !1 : isInRange(fullwidthRanges, codePoint), isHalfWidth = (codePoint) => codePoint < halfwidthMinimalCodePoint || codePoint > halfwidthMaximumCodePoint ? !1 : isInRange(halfwidthRanges, codePoint), isNarrow = (codePoint) => codePoint < narrowMinimalCodePoint || codePoint > narrowMaximumCodePoint ? !1 : isInRange(narrowRanges, codePoint), isWide = (codePoint) => codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd ? !0 : codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint ? !1 : isInRange(wideRanges, codePoint);
16221
+ function getCategory(codePoint) {
16222
+ return isAmbiguous(codePoint) ? "ambiguous" : isFullWidth(codePoint) ? "fullwidth" : isHalfWidth(codePoint) ? "halfwidth" : isNarrow(codePoint) ? "narrow" : isWide(codePoint) ? "wide" : "neutral";
16223
+ }
16224
+ function validate(codePoint) {
16225
+ if (!Number.isSafeInteger(codePoint))
16226
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
16227
+ }
16228
+ function eastAsianWidthType(codePoint) {
16229
+ return validate(codePoint), getCategory(codePoint);
16230
+ }
16231
+ function isEmoji(uc) {
16232
+ return /^\p{Emoji_Presentation}/u.test(String.fromCodePoint(uc));
16233
+ }
16234
+ function isCjkBase(uc) {
16235
+ if (uc < 4352)
16236
+ return !1;
16237
+ switch (eastAsianWidthType(uc)) {
16238
+ case "fullwidth":
16239
+ case "halfwidth":
16240
+ return !0;
16241
+ case "wide":
16242
+ return !isEmoji(uc);
16243
+ case "narrow":
16244
+ return !1;
16245
+ case "ambiguous":
16246
+ return null;
16247
+ case "neutral":
16248
+ return /^\p{sc=Hangul}/u.test(String.fromCodePoint(uc));
16249
+ }
16250
+ }
16251
+ function is2PreviousCjk(uc, prev) {
16252
+ return isCjkBase(uc) ?? (prev === 65025 && isQuotationMark(uc));
16253
+ function isQuotationMark(uc$1) {
16254
+ return uc$1 === 8216 || uc$1 === 8217 || uc$1 === 8220 || uc$1 === 8221;
16255
+ }
16256
+ }
16257
+ function isPreviousCjk(uc) {
16258
+ return isCjkBase(uc) ?? (917760 <= uc && uc <= 917999);
16259
+ }
16260
+ function isNextCjk(uc) {
16261
+ return isCjkBase(uc) ?? !1;
16262
+ }
16263
+ function nonEmojiGeneralUseVS(uc) {
16264
+ return uc >= 65024 && uc <= 65038;
16265
+ }
16266
+ function markdownItCjkFriendlyPlugin(md) {
16267
+ let PreviousState = md.inline.State;
16268
+ class CjkFriendlyState extends PreviousState {
16269
+ scanDelims(start, canSplitWord) {
16270
+ let max = this.posMax, marker = this.src.charCodeAt(start), [lastChar2, lastCharPos] = getLastCharCode(this.src, start), lastMainChar = lastChar2, twoPrevChar = null;
16271
+ nonEmojiGeneralUseVS(lastChar2) && (twoPrevChar = getLastCharCode(this.src, lastCharPos)[0], /^\p{Zs}/u.test(String.fromCodePoint(twoPrevChar)) || (lastMainChar = twoPrevChar));
16272
+ let pos = start;
16273
+ for (; pos < max && this.src.charCodeAt(pos) === marker; )
16274
+ pos++;
16275
+ let count = pos - start, nextChar = pos < max ? this.src.codePointAt(pos) : 32, isLastWhiteSpace = md.utils.isWhiteSpace(lastMainChar), isNextWhiteSpace = md.utils.isWhiteSpace(nextChar);
16276
+ if (isLastWhiteSpace || isNextWhiteSpace)
16277
+ return {
16278
+ can_open: !isNextWhiteSpace,
16279
+ can_close: !isLastWhiteSpace,
16280
+ length: count
16281
+ };
16282
+ let isLastPunctChar = md.utils.isMdAsciiPunct(lastMainChar) || md.utils.isPunctChar(String.fromCodePoint(lastMainChar)), isNextPunctChar = md.utils.isMdAsciiPunct(nextChar) || md.utils.isPunctChar(String.fromCodePoint(nextChar)), left_flanking = isLastPunctChar, right_flanking = isNextPunctChar;
16283
+ if (canSplitWord) {
16284
+ let isEitherCJKChar = isNextCjk(nextChar) || (twoPrevChar !== null ? is2PreviousCjk(twoPrevChar, lastChar2) : isPreviousCjk(lastChar2));
16285
+ left_flanking || (left_flanking = isEitherCJKChar || !isNextPunctChar), right_flanking || (right_flanking = isEitherCJKChar || !isLastPunctChar);
16286
+ }
16287
+ return {
16288
+ can_open: left_flanking,
16289
+ can_close: right_flanking,
16290
+ length: count
16291
+ };
16292
+ function getLastCharCode(str, pos$1) {
16293
+ if (pos$1 <= 0)
16294
+ return [32, -1];
16295
+ let charCode = str.charCodeAt(pos$1 - 1);
16296
+ if ((charCode & 64512) !== 56320)
16297
+ return [charCode, pos$1 - 1];
16298
+ let codePoint = str.codePointAt(pos$1 - 2);
16299
+ return codePoint > 65535 ? [codePoint, pos$1 - 2] : [charCode, pos$1 - 1];
16300
+ }
16301
+ }
16302
+ }
16303
+ md.inline.State = CjkFriendlyState;
16304
+ }
16305
+ var decodeMap = /* @__PURE__ */ new Map([
15557
16306
  [0, 65533],
15558
16307
  [128, 8364],
15559
16308
  [130, 8218],
@@ -15875,7 +16624,7 @@ var htmlDecoder = /* @__PURE__ */ getDecoder(htmlDecodeTree);
15875
16624
  function decodeHTML(htmlString, mode = DecodingMode.Legacy) {
15876
16625
  return htmlDecoder(htmlString, mode);
15877
16626
  }
15878
- var import_markdown_it_task_checkbox = /* @__PURE__ */ __toESM2(require_markdown_it_task_checkbox(), 1), decodeCache = {};
16627
+ var decodeCache = {};
15879
16628
  function getDecodeCache(exclude) {
15880
16629
  let cache = decodeCache[exclude];
15881
16630
  if (cache)
@@ -18344,6 +19093,13 @@ var ParserInline = class {
18344
19093
  constructor() {
18345
19094
  __publicField(this, "ruler");
18346
19095
  __publicField(this, "ruler2");
19096
+ /**
19097
+ * State class used for inline parsing, mirroring `ParserInline.prototype.State` in
19098
+ * markdown-it. Plugins subclass it (`scanDelims`, `push`, `pushPending`, ...) and assign
19099
+ * the subclass back to `md.inline.State`; the parser then constructs it with
19100
+ * `new this.State(...)`.
19101
+ */
19102
+ __publicField(this, "State", StateInline);
18347
19103
  __publicField(this, "cachedRulesVersion", -1);
18348
19104
  __publicField(this, "cachedRules", []);
18349
19105
  __publicField(this, "cachedRules2Version", -1);
@@ -18450,13 +19206,20 @@ var ParserInline = class {
18450
19206
  isDefaultRuleset() {
18451
19207
  return this.ruler.version === this.defaultRulerVersion && this.ruler2.version === this.defaultRuler2Version;
18452
19208
  }
19209
+ /**
19210
+ * Whether inline parsing still uses the stock `StateInline`. The plain-text fast paths
19211
+ * construct no state at all, so they must stand down once a plugin replaces `State`.
19212
+ */
19213
+ usesDefaultState() {
19214
+ return this.State === StateInline;
19215
+ }
18453
19216
  parseSource(src, md, env, outTokens) {
18454
- if (typeof src == "string" && src.length > 0 && this.isDefaultRuleset() && isPlainInlineText$1(src)) {
19217
+ if (typeof src == "string" && src.length > 0 && this.isDefaultRuleset() && this.usesDefaultState() && isPlainInlineText$1(src)) {
18455
19218
  let token = new Token("text", "", 0);
18456
19219
  token.content = src, outTokens.push(token);
18457
19220
  return;
18458
19221
  }
18459
- let state = new StateInline(src, md, env, outTokens);
19222
+ let state = new this.State(src, md, env, outTokens);
18460
19223
  this.tokenize(state);
18461
19224
  let rules2 = this.getRules2(), len = rules2.length;
18462
19225
  if (!(state.env && (Object.prototype.hasOwnProperty.call(state.env, "__mdtsRuleProfile") || Object.prototype.hasOwnProperty.call(state.env, "__mdtsProfileRules")))) {
@@ -18483,7 +19246,7 @@ var ParserInline = class {
18483
19246
  }
18484
19247
  };
18485
19248
  function inline(state) {
18486
- let tokens = state.tokens, canUsePlainTextFastPath = !!state.md?.inline?.isDefaultRuleset?.();
19249
+ let tokens = state.tokens, inlineParser = state.md?.inline, canUsePlainTextFastPath = !!inlineParser?.isDefaultRuleset?.() && inlineParser?.usesDefaultState?.() !== !1;
18487
19250
  for (let i = 0, l = tokens.length; i < l; i++) {
18488
19251
  let tok = tokens[i];
18489
19252
  if (tok.type === "inline" && state.md) {
@@ -23419,11 +24182,12 @@ function getParserRuleVersions(md) {
23419
24182
  core: md.core.ruler.version,
23420
24183
  block: md.block.ruler.version,
23421
24184
  inline: md.inline.ruler.version,
23422
- inline2: md.inline.ruler2.version
24185
+ inline2: md.inline.ruler2.version,
24186
+ inlineState: md.inline.State
23423
24187
  };
23424
24188
  }
23425
24189
  function hasParserRuleChanges(md, initial) {
23426
- return md.core.ruler.version !== initial.core || md.block.ruler.version !== initial.block || md.inline.ruler.version !== initial.inline || md.inline.ruler2.version !== initial.inline2;
24190
+ return md.core.ruler.version !== initial.core || md.block.ruler.version !== initial.block || md.inline.ruler.version !== initial.inline || md.inline.ruler2.version !== initial.inline2 || md.inline.State !== initial.inlineState;
23427
24191
  }
23428
24192
  function applyExperimentalOptions(options) {
23429
24193
  return options.experimental ? {
@@ -24112,7 +24876,7 @@ function container_plugin(md, name, options) {
24112
24876
  return tokens[idx].nesting === 1 && tokens[idx].attrJoin("class", name), slf.renderToken(tokens, idx, _options, env, slf);
24113
24877
  }
24114
24878
  options = options || {};
24115
- let min_markers = 3, marker_str = options.marker || ":", marker_char = marker_str.charCodeAt(0), marker_len = marker_str.length, validate = options.validate || validateDefault, render = options.render || renderDefault;
24879
+ let min_markers = 3, marker_str = options.marker || ":", marker_char = marker_str.charCodeAt(0), marker_len = marker_str.length, validate$1 = options.validate || validateDefault, render = options.render || renderDefault;
24116
24880
  function container(state, startLine, endLine, silent) {
24117
24881
  let pos, auto_closed = !1, start = state.bMarks[startLine] + state.tShift[startLine], max = state.eMarks[startLine];
24118
24882
  if (marker_char !== state.src.charCodeAt(start))
@@ -24124,7 +24888,7 @@ function container_plugin(md, name, options) {
24124
24888
  return !1;
24125
24889
  pos -= (pos - start) % marker_len;
24126
24890
  let markup = state.src.slice(start, pos), params = state.src.slice(pos, max);
24127
- if (!validate(params, markup))
24891
+ if (!validate$1(params, markup))
24128
24892
  return !1;
24129
24893
  if (silent)
24130
24894
  return !0;
@@ -25489,6 +26253,21 @@ function setSyntheticLinkOrigin(token, origin) {
25489
26253
  function readSyntheticLinkOrigin(token) {
25490
26254
  return syntheticLinkOrigins.get(token);
25491
26255
  }
26256
+ function resolveLinkMarkup(token) {
26257
+ if (!token)
26258
+ return "";
26259
+ let origin = readSyntheticLinkOrigin(token);
26260
+ if (origin === "linkify" || origin === "autolink")
26261
+ return origin;
26262
+ let markup = typeof token.markup == "string" ? token.markup : "";
26263
+ return markup === "linkify" || markup === "autolink" ? markup : "";
26264
+ }
26265
+ function copySyntheticLinkOrigin(from, to) {
26266
+ if (!from || !to)
26267
+ return;
26268
+ let origin = readSyntheticLinkOrigin(from);
26269
+ origin && syntheticLinkOrigins.set(to, origin);
26270
+ }
25492
26271
  function registerCacheStableLinkValidator(validateLink$1) {
25493
26272
  cacheStableLinkValidators.add(validateLink$1);
25494
26273
  }
@@ -25726,7 +26505,7 @@ function fixLinkToken(tokens, raw) {
25726
26505
  } else if (curToken?.type === "text" && curToken.content?.endsWith("(") && tokens[i + 1]?.type === "link_open") {
25727
26506
  let match = curToken.content.match(/\[([^\]]+)\]/);
25728
26507
  if (match) {
25729
- let beforeText = curToken.content.slice(0, match.index), emphasisMatch = beforeText.match(/(\*+)$/), origin = getSyntheticLinkOrigin(tokens[i + 1]?.markup), replacerTokens = [];
26508
+ let beforeText = curToken.content.slice(0, match.index), emphasisMatch = beforeText.match(/(\*+)$/), linkOpenMarkup = tokens[i + 1]?.markup, origin = (linkOpenMarkup === "linkify" || linkOpenMarkup === "autolink") && (match.index ?? 0) + match[0].length === curToken.content.length - 1 ? "explicit" : getSyntheticLinkOrigin(linkOpenMarkup), replacerTokens = [];
25730
26509
  if (emphasisMatch) {
25731
26510
  beforeText = beforeText.slice(0, emphasisMatch.index), beforeText && replacerTokens.push(textToken(beforeText));
25732
26511
  let text$1 = match[1], type = emphasisMatch[1].length;
@@ -27440,7 +28219,7 @@ function factory(opts = {}) {
27440
28219
  });
27441
28220
  registerCacheStableLinkValidator(validateLink$1), md.set({ validateLink: validateLink$1 });
27442
28221
  }
27443
- return applyInlineUrlValidation(md), applyLinkifyCandidateFilter(md), (opts.enableMath ?? !0) && applyMath(md, {
28222
+ return applyInlineUrlValidation(md), applyLinkifyCandidateFilter(md), (opts.cjkFriendly ?? !0) && md.use(markdownItCjkFriendlyPlugin), (opts.enableMath ?? !0) && applyMath(md, {
27444
28223
  ...getDefaultMathOptions() ?? {},
27445
28224
  ...opts.mathOptions ?? {}
27446
28225
  }), (opts.enableContainers ?? !0) && applyContainers(md), opts.enableFixIndentedCodeBlock !== !1 && applyFixIndentedCodeBlock(md), applyFixLinkTokens(md), applyFixStrongTokens(md), applyFixListItem(md), applyFixTableTokens(md), applyRenderRules(md), applyFixHtmlInlineTokens(md, { customHtmlTags: opts.customHtmlTags }), md;
@@ -27801,7 +28580,7 @@ function applyNodeSourceMapRange(node, token, endLine, options) {
27801
28580
  }
27802
28581
  function cloneTokenWithMutableChildren(token) {
27803
28582
  let copy = Object.assign(Object.create(Object.getPrototypeOf(token)), token);
27804
- return Array.isArray(token.attrs) && (copy.attrs = token.attrs.map((attr) => [...attr])), Array.isArray(token.map) && (copy.map = [...token.map]), Array.isArray(token.children) && (copy.children = token.children.map((child) => cloneTokenWithMutableChildren(child))), copy;
28583
+ return Array.isArray(token.attrs) && (copy.attrs = token.attrs.map((attr) => [...attr])), Array.isArray(token.map) && (copy.map = [...token.map]), Array.isArray(token.children) && (copy.children = token.children.map((child) => cloneTokenWithMutableChildren(child))), copySyntheticLinkOrigin(token, copy), copy;
27805
28584
  }
27806
28585
  function isPlainObject(value) {
27807
28586
  if (!value || typeof value != "object")
@@ -27892,6 +28671,10 @@ function canCloneMarkdownTokenFast(token, enumerableKeys) {
27892
28671
  return !0;
27893
28672
  }
27894
28673
  function cloneMarkdownToken(token, cloneObjectFields = !0) {
28674
+ let cloned = cloneMarkdownTokenValue(token, cloneObjectFields);
28675
+ return copySyntheticLinkOrigin(token, cloned), cloned;
28676
+ }
28677
+ function cloneMarkdownTokenValue(token, cloneObjectFields = !0) {
27895
28678
  if (!cloneObjectFields)
27896
28679
  return cloneTokenWithMutableChildren(token);
27897
28680
  let allKeys = Reflect.ownKeys(token), enumerableKeys = Object.keys(token);
@@ -29369,7 +30152,8 @@ function parseHtmlInlineCodeToken(token, tokens, i, parseInlineTokens$1, raw, pP
29369
30152
  attrs: normalizedAttrs,
29370
30153
  children: normalizedChildren$1,
29371
30154
  loading: !fragment$1.closed,
29372
- raw: fragment$1.html || code$1
30155
+ raw: fragment$1.html || code$1,
30156
+ markup: "html"
29373
30157
  }, fragment$1.nextIndex];
29374
30158
  }
29375
30159
  if (selfClosing)
@@ -29520,7 +30304,8 @@ function parseLinkToken(tokens, startIndex, parseInlineTokens$1, options) {
29520
30304
  children,
29521
30305
  raw: `[${linkText}](${href}${title ? ` "${title}"` : ""})`,
29522
30306
  loading,
29523
- attrs: normalizedAttrs
30307
+ attrs: normalizedAttrs,
30308
+ markup: resolveLinkMarkup(openToken)
29524
30309
  },
29525
30310
  nextIndex: i < tokens.length ? i + 1 : tokens.length
29526
30311
  };
@@ -29750,7 +30535,8 @@ function recoverMarkdownLinkFromTrailingText(state, token) {
29750
30535
  content: label,
29751
30536
  raw: label
29752
30537
  }],
29753
- raw: `[${label}](${href}${linkToken.title ? ` "${linkToken.title}"` : ""})`
30538
+ raw: `[${label}](${href}${linkToken.title ? ` "${linkToken.title}"` : ""})`,
30539
+ markup: resolveLinkMarkup(token)
29754
30540
  }), !0;
29755
30541
  }
29756
30542
  function recoverMarkdownImageFromLoadingImageTail(state, token) {
@@ -29813,7 +30599,8 @@ function buildLoadingOuterImageLinkNode(imageNode, href = "", title = null) {
29813
30599
  text: text$1,
29814
30600
  children: [imageNode],
29815
30601
  raw: `[${text$1}](${href}${title ? ` "${title}"` : ""})`,
29816
- loading: !0
30602
+ loading: !0,
30603
+ markup: ""
29817
30604
  };
29818
30605
  }
29819
30606
  function buildLoadingImageNodeFromRaw(raw) {
@@ -29937,7 +30724,8 @@ function handleInlineLinkContent(state, content, _token) {
29937
30724
  content: text$1,
29938
30725
  raw: text$1
29939
30726
  }],
29940
- loading: loading$1
30727
+ loading: loading$1,
30728
+ markup: ""
29941
30729
  }), state.index += index, !0;
29942
30730
  }
29943
30731
  let linkContentEnd = content.indexOf(")", linkEnd), href = linkContentEnd !== -1 ? content.slice(linkEnd + 2, linkContentEnd) : "", loading = linkContentEnd === -1, emphasisMatch = textNodeContent.match(/\*+$/);
@@ -29971,7 +30759,8 @@ function handleInlineLinkContent(state, content, _token) {
29971
30759
  content: text$1,
29972
30760
  raw: text$1
29973
30761
  }],
29974
- loading
30762
+ loading,
30763
+ markup: ""
29975
30764
  }), type === 1) {
29976
30765
  newTokens.push({
29977
30766
  type: "em_close",
@@ -30015,7 +30804,8 @@ function handleInlineLinkContent(state, content, _token) {
30015
30804
  content: text$1,
30016
30805
  raw: text$1
30017
30806
  }],
30018
- loading
30807
+ loading,
30808
+ markup: ""
30019
30809
  });
30020
30810
  let afterText = linkContentEnd !== -1 ? content.slice(linkContentEnd + 1) : "";
30021
30811
  return afterText && (state.dispatchToken({
@@ -30878,7 +31668,7 @@ function parseInlineTokens(tokens, raw, pPreToken, options) {
30878
31668
  function pushToken(token) {
30879
31669
  resetCurrentTextNode();
30880
31670
  let node = cloneTokenWithMutableChildren(token);
30881
- state.result.push(node);
31671
+ node.type === "link" && (node.markup = resolveLinkMarkup(token)), state.result.push(node);
30882
31672
  }
30883
31673
  function pushText(content, raw$1) {
30884
31674
  state.currentTextNode ? (state.currentTextNode.content += content, state.currentTextNode.raw += raw$1 ?? content) : (state.currentTextNode = {