@rohal12/spindle-lsp 0.15.49 → 0.15.51

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/bin.js CHANGED
@@ -55,7 +55,7 @@ var VERSION;
55
55
  var init_version = __esm({
56
56
  "src/version.ts"() {
57
57
  "use strict";
58
- VERSION = false ? pkg.version : "0.15.49";
58
+ VERSION = false ? pkg.version : "0.15.51";
59
59
  }
60
60
  });
61
61
 
@@ -11316,28 +11316,6 @@ function peg$parse(input2, options) {
11316
11316
  const peg$c16 = "=";
11317
11317
  const peg$c17 = '"';
11318
11318
  const peg$c18 = "'";
11319
- const peg$r0 = /^[^\\{[<]/;
11320
- const peg$r1 = /^[{}]/;
11321
- const peg$r2 = /^[$_@%(!\/a-zA-Z]/;
11322
- const peg$r3 = /^[.#]/;
11323
- const peg$r4 = /^[a-zA-Z0-9_\-]/;
11324
- const peg$r5 = /^[$_@%]/;
11325
- const peg$r6 = /^[a-zA-Z0-9_.]/;
11326
- const peg$r7 = /^[$_@%(!]/;
11327
- const peg$r8 = /^[a-zA-Z]/;
11328
- const peg$r9 = /^[^ \t\n\r\v\f\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF}]/;
11329
- const peg$r10 = /^[a-zA-Z0-9.!#$%&'*+\/=?\^_`|~\-]/;
11330
- const peg$r11 = /^[a-zA-Z0-9.\-]/;
11331
- const peg$r12 = /^[a-zA-Z0-9+.\-]/;
11332
- const peg$r13 = /^[^\0- \x7F<>{}]/;
11333
- const peg$r14 = /^[\t-\r \/>\xA0\u1680\u2000-\u200A\u2028-\u2029\u202F\u205F\u3000\uFEFF]/;
11334
- const peg$r15 = /^[a-zA-Z0-9\-]/;
11335
- const peg$r16 = /^[\t-\r "'\/<->{}\xA0\u1680\u2000-\u200A\u2028-\u2029\u202F\u205F\u3000\uFEFF]/;
11336
- const peg$r17 = /^[^"]/;
11337
- const peg$r18 = /^[^']/;
11338
- const peg$r19 = /^["']/;
11339
- const peg$r20 = /^[^ \t\n\r\v\f\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF>]/;
11340
- const peg$r21 = /^[ \t\n\r\v\f\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/;
11341
11319
  const peg$e0 = peg$anyExpectation();
11342
11320
  const peg$e1 = peg$classExpectation([
11343
11321
  "\\",
@@ -11902,6 +11880,7 @@ function peg$parse(input2, options) {
11902
11880
  let peg$maxFailExpected = options.peg$maxFailExpected || [];
11903
11881
  let peg$silentFails = options.peg$silentFails | 0;
11904
11882
  let peg$result;
11883
+ let peg$charCode;
11905
11884
  if (options.startRule) {
11906
11885
  if (!(options.startRule in peg$startRuleFunctions)) throw new Error(`Can't start parsing from rule "` + options.startRule + '".');
11907
11886
  peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
@@ -12009,10 +11988,10 @@ function peg$parse(input2, options) {
12009
11988
  let s0, s1, s2;
12010
11989
  s0 = peg$currPos;
12011
11990
  s1 = [];
12012
- s2 = peg$parseTokenItem();
12013
- while (s2 !== peg$FAILED) {
12014
- s1.push(s2);
11991
+ for (; ; ) {
12015
11992
  s2 = peg$parseTokenItem();
11993
+ if (s2 === peg$FAILED) break;
11994
+ s1.push(s2);
12016
11995
  }
12017
11996
  peg$savedPos = s0;
12018
11997
  s1 = peg$f0(s1);
@@ -12297,15 +12276,7 @@ function peg$parse(input2, options) {
12297
12276
  if (s1 !== peg$FAILED) {
12298
12277
  s2 = peg$currPos;
12299
12278
  s3 = [];
12300
- if (input2.length > peg$currPos) {
12301
- s4 = input2.charAt(peg$currPos);
12302
- peg$currPos++;
12303
- } else {
12304
- s4 = peg$FAILED;
12305
- if (peg$silentFails === 0) peg$fail(peg$e0);
12306
- }
12307
- while (s4 !== peg$FAILED) {
12308
- s3.push(s4);
12279
+ for (; ; ) {
12309
12280
  if (input2.length > peg$currPos) {
12310
12281
  s4 = input2.charAt(peg$currPos);
12311
12282
  peg$currPos++;
@@ -12313,6 +12284,8 @@ function peg$parse(input2, options) {
12313
12284
  s4 = peg$FAILED;
12314
12285
  if (peg$silentFails === 0) peg$fail(peg$e0);
12315
12286
  }
12287
+ if (s4 === peg$FAILED) break;
12288
+ s3.push(s4);
12316
12289
  }
12317
12290
  s2 = input2.substring(s2, peg$currPos);
12318
12291
  peg$savedPos = s0;
@@ -12338,22 +12311,17 @@ function peg$parse(input2, options) {
12338
12311
  s0 = peg$currPos;
12339
12312
  s1 = peg$currPos;
12340
12313
  s2 = [];
12341
- s3 = input2.charAt(peg$currPos);
12342
- if (peg$r0.test(s3)) peg$currPos++;
12343
- else {
12344
- s3 = peg$FAILED;
12345
- if (peg$silentFails === 0) peg$fail(peg$e1);
12346
- }
12347
- if (s3 !== peg$FAILED) while (s3 !== peg$FAILED) {
12348
- s2.push(s3);
12314
+ for (; ; ) {
12349
12315
  s3 = input2.charAt(peg$currPos);
12350
- if (peg$r0.test(s3)) peg$currPos++;
12316
+ if (s3 !== "" && !(peg$charCode = s3.charCodeAt(0), peg$charCode === 92 || peg$charCode === 123 || peg$charCode === 91 || peg$charCode === 60)) peg$currPos++;
12351
12317
  else {
12352
12318
  s3 = peg$FAILED;
12353
12319
  if (peg$silentFails === 0) peg$fail(peg$e1);
12354
12320
  }
12321
+ if (s3 === peg$FAILED) break;
12322
+ s2.push(s3);
12355
12323
  }
12356
- else s2 = peg$FAILED;
12324
+ if (s2.length < 1) s2 = peg$FAILED;
12357
12325
  if (s2 !== peg$FAILED) s1 = input2.substring(s1, peg$currPos);
12358
12326
  else s1 = s2;
12359
12327
  if (s1 !== peg$FAILED) {
@@ -12399,43 +12367,7 @@ function peg$parse(input2, options) {
12399
12367
  else s5 = peg$FAILED;
12400
12368
  if (s5 !== peg$FAILED) {
12401
12369
  s6 = [];
12402
- s7 = peg$currPos;
12403
- s8 = peg$currPos;
12404
- peg$silentFails++;
12405
- if (input2.substr(peg$currPos, 3) === peg$c3) {
12406
- s9 = peg$c3;
12407
- peg$currPos += 3;
12408
- } else {
12409
- s9 = peg$FAILED;
12410
- if (peg$silentFails === 0) peg$fail(peg$e5);
12411
- }
12412
- peg$silentFails--;
12413
- if (s9 === peg$FAILED) s8 = void 0;
12414
- else {
12415
- peg$currPos = s8;
12416
- s8 = peg$FAILED;
12417
- }
12418
- if (s8 !== peg$FAILED) {
12419
- if (input2.length > peg$currPos) {
12420
- s9 = input2.charAt(peg$currPos);
12421
- peg$currPos++;
12422
- } else {
12423
- s9 = peg$FAILED;
12424
- if (peg$silentFails === 0) peg$fail(peg$e0);
12425
- }
12426
- if (s9 !== peg$FAILED) {
12427
- s8 = [s8, s9];
12428
- s7 = s8;
12429
- } else {
12430
- peg$currPos = s7;
12431
- s7 = peg$FAILED;
12432
- }
12433
- } else {
12434
- peg$currPos = s7;
12435
- s7 = peg$FAILED;
12436
- }
12437
- while (s7 !== peg$FAILED) {
12438
- s6.push(s7);
12370
+ for (; ; ) {
12439
12371
  s7 = peg$currPos;
12440
12372
  s8 = peg$currPos;
12441
12373
  peg$silentFails++;
@@ -12471,6 +12403,8 @@ function peg$parse(input2, options) {
12471
12403
  peg$currPos = s7;
12472
12404
  s7 = peg$FAILED;
12473
12405
  }
12406
+ if (s7 === peg$FAILED) break;
12407
+ s6.push(s7);
12474
12408
  }
12475
12409
  if (input2.substr(peg$currPos, 3) === peg$c3) {
12476
12410
  s7 = peg$c3;
@@ -12522,15 +12456,7 @@ function peg$parse(input2, options) {
12522
12456
  s0 = peg$currPos;
12523
12457
  s1 = peg$currPos;
12524
12458
  s2 = [];
12525
- if (input2.charCodeAt(peg$currPos) === 92) {
12526
- s3 = peg$c4;
12527
- peg$currPos++;
12528
- } else {
12529
- s3 = peg$FAILED;
12530
- if (peg$silentFails === 0) peg$fail(peg$e6);
12531
- }
12532
- if (s3 !== peg$FAILED) while (s3 !== peg$FAILED) {
12533
- s2.push(s3);
12459
+ for (; ; ) {
12534
12460
  if (input2.charCodeAt(peg$currPos) === 92) {
12535
12461
  s3 = peg$c4;
12536
12462
  peg$currPos++;
@@ -12538,8 +12464,10 @@ function peg$parse(input2, options) {
12538
12464
  s3 = peg$FAILED;
12539
12465
  if (peg$silentFails === 0) peg$fail(peg$e6);
12540
12466
  }
12467
+ if (s3 === peg$FAILED) break;
12468
+ s2.push(s3);
12541
12469
  }
12542
- else s2 = peg$FAILED;
12470
+ if (s2.length < 1) s2 = peg$FAILED;
12543
12471
  if (s2 !== peg$FAILED) s1 = input2.substring(s1, peg$currPos);
12544
12472
  else s1 = s2;
12545
12473
  if (s1 !== peg$FAILED) {
@@ -12550,7 +12478,7 @@ function peg$parse(input2, options) {
12550
12478
  else s3 = peg$FAILED;
12551
12479
  if (s3 !== peg$FAILED) {
12552
12480
  s4 = input2.charAt(peg$currPos);
12553
- if (peg$r1.test(s4)) peg$currPos++;
12481
+ if (peg$charCode = s4.charCodeAt(0), peg$charCode === 123 || peg$charCode === 125) peg$currPos++;
12554
12482
  else {
12555
12483
  s4 = peg$FAILED;
12556
12484
  if (peg$silentFails === 0) peg$fail(peg$e7);
@@ -12592,7 +12520,7 @@ function peg$parse(input2, options) {
12592
12520
  s4 = peg$parseSelectors();
12593
12521
  if (s4 !== peg$FAILED) {
12594
12522
  s5 = input2.charAt(peg$currPos);
12595
- if (peg$r2.test(s5)) peg$currPos++;
12523
+ if (peg$charCode = s5.charCodeAt(0), peg$charCode === 36 || peg$charCode === 95 || peg$charCode === 64 || peg$charCode === 37 || peg$charCode === 40 || peg$charCode === 33 || peg$charCode === 47 || peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90) peg$currPos++;
12596
12524
  else {
12597
12525
  s5 = peg$FAILED;
12598
12526
  if (peg$silentFails === 0) peg$fail(peg$e9);
@@ -12771,52 +12699,7 @@ function peg$parse(input2, options) {
12771
12699
  function peg$parseLinkText() {
12772
12700
  let s0, s1, s2, s3;
12773
12701
  s0 = [];
12774
- s1 = peg$currPos;
12775
- s2 = peg$currPos;
12776
- peg$silentFails++;
12777
- if (input2.substr(peg$currPos, 2) === peg$c9) {
12778
- s3 = peg$c9;
12779
- peg$currPos += 2;
12780
- } else {
12781
- s3 = peg$FAILED;
12782
- if (peg$silentFails === 0) peg$fail(peg$e13);
12783
- }
12784
- if (s3 === peg$FAILED) {
12785
- if (input2.substr(peg$currPos, 2) === peg$c8) {
12786
- s3 = peg$c8;
12787
- peg$currPos += 2;
12788
- } else {
12789
- s3 = peg$FAILED;
12790
- if (peg$silentFails === 0) peg$fail(peg$e12);
12791
- }
12792
- }
12793
- peg$silentFails--;
12794
- if (s3 === peg$FAILED) s2 = void 0;
12795
- else {
12796
- peg$currPos = s2;
12797
- s2 = peg$FAILED;
12798
- }
12799
- if (s2 !== peg$FAILED) {
12800
- if (input2.length > peg$currPos) {
12801
- s3 = input2.charAt(peg$currPos);
12802
- peg$currPos++;
12803
- } else {
12804
- s3 = peg$FAILED;
12805
- if (peg$silentFails === 0) peg$fail(peg$e0);
12806
- }
12807
- if (s3 !== peg$FAILED) {
12808
- s2 = [s2, s3];
12809
- s1 = s2;
12810
- } else {
12811
- peg$currPos = s1;
12812
- s1 = peg$FAILED;
12813
- }
12814
- } else {
12815
- peg$currPos = s1;
12816
- s1 = peg$FAILED;
12817
- }
12818
- while (s1 !== peg$FAILED) {
12819
- s0.push(s1);
12702
+ for (; ; ) {
12820
12703
  s1 = peg$currPos;
12821
12704
  s2 = peg$currPos;
12822
12705
  peg$silentFails++;
@@ -12861,6 +12744,8 @@ function peg$parse(input2, options) {
12861
12744
  peg$currPos = s1;
12862
12745
  s1 = peg$FAILED;
12863
12746
  }
12747
+ if (s1 === peg$FAILED) break;
12748
+ s0.push(s1);
12864
12749
  }
12865
12750
  return s0;
12866
12751
  }
@@ -12868,12 +12753,12 @@ function peg$parse(input2, options) {
12868
12753
  let s0, s1, s2;
12869
12754
  s0 = peg$currPos;
12870
12755
  s1 = [];
12871
- s2 = peg$parseSelectorPart();
12872
- if (s2 !== peg$FAILED) while (s2 !== peg$FAILED) {
12873
- s1.push(s2);
12756
+ for (; ; ) {
12874
12757
  s2 = peg$parseSelectorPart();
12758
+ if (s2 === peg$FAILED) break;
12759
+ s1.push(s2);
12875
12760
  }
12876
- else s1 = peg$FAILED;
12761
+ if (s1.length < 1) s1 = peg$FAILED;
12877
12762
  if (s1 !== peg$FAILED) {
12878
12763
  if (input2.charCodeAt(peg$currPos) === 32) {
12879
12764
  s2 = peg$c10;
@@ -12905,15 +12790,7 @@ function peg$parse(input2, options) {
12905
12790
  if (s1 !== peg$FAILED) {
12906
12791
  s2 = peg$parseHere();
12907
12792
  s3 = [];
12908
- if (input2.length > peg$currPos) {
12909
- s4 = input2.charAt(peg$currPos);
12910
- peg$currPos++;
12911
- } else {
12912
- s4 = peg$FAILED;
12913
- if (peg$silentFails === 0) peg$fail(peg$e0);
12914
- }
12915
- while (s4 !== peg$FAILED) {
12916
- s3.push(s4);
12793
+ for (; ; ) {
12917
12794
  if (input2.length > peg$currPos) {
12918
12795
  s4 = input2.charAt(peg$currPos);
12919
12796
  peg$currPos++;
@@ -12921,6 +12798,8 @@ function peg$parse(input2, options) {
12921
12798
  s4 = peg$FAILED;
12922
12799
  if (peg$silentFails === 0) peg$fail(peg$e0);
12923
12800
  }
12801
+ if (s4 === peg$FAILED) break;
12802
+ s3.push(s4);
12924
12803
  }
12925
12804
  peg$savedPos = s0;
12926
12805
  s0 = peg$f39(s1, s2);
@@ -12934,7 +12813,7 @@ function peg$parse(input2, options) {
12934
12813
  let s0, s1, s2, s3, s4;
12935
12814
  s0 = peg$currPos;
12936
12815
  s1 = input2.charAt(peg$currPos);
12937
- if (peg$r3.test(s1)) peg$currPos++;
12816
+ if (peg$charCode = s1.charCodeAt(0), peg$charCode === 46 || peg$charCode === 35) peg$currPos++;
12938
12817
  else {
12939
12818
  s1 = peg$FAILED;
12940
12819
  if (peg$silentFails === 0) peg$fail(peg$e15);
@@ -12942,10 +12821,10 @@ function peg$parse(input2, options) {
12942
12821
  if (s1 !== peg$FAILED) {
12943
12822
  s2 = peg$currPos;
12944
12823
  s3 = [];
12945
- s4 = peg$parseSelectorChar();
12946
- while (s4 !== peg$FAILED) {
12947
- s3.push(s4);
12824
+ for (; ; ) {
12948
12825
  s4 = peg$parseSelectorChar();
12826
+ if (s4 === peg$FAILED) break;
12827
+ s3.push(s4);
12949
12828
  }
12950
12829
  s2 = input2.substring(s2, peg$currPos);
12951
12830
  peg$savedPos = s0;
@@ -12959,7 +12838,7 @@ function peg$parse(input2, options) {
12959
12838
  function peg$parseSelectorChar() {
12960
12839
  let s0, s1, s2, s3, s4;
12961
12840
  s0 = input2.charAt(peg$currPos);
12962
- if (peg$r4.test(s0)) peg$currPos++;
12841
+ if (peg$charCode = s0.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90 || peg$charCode >= 48 && peg$charCode <= 57 || peg$charCode === 95 || peg$charCode === 45) peg$currPos++;
12963
12842
  else {
12964
12843
  s0 = peg$FAILED;
12965
12844
  if (peg$silentFails === 0) peg$fail(peg$e16);
@@ -12975,27 +12854,22 @@ function peg$parse(input2, options) {
12975
12854
  }
12976
12855
  if (s1 !== peg$FAILED) {
12977
12856
  s2 = input2.charAt(peg$currPos);
12978
- if (peg$r5.test(s2)) peg$currPos++;
12857
+ if (peg$charCode = s2.charCodeAt(0), peg$charCode === 36 || peg$charCode === 95 || peg$charCode === 64 || peg$charCode === 37) peg$currPos++;
12979
12858
  else {
12980
12859
  s2 = peg$FAILED;
12981
12860
  if (peg$silentFails === 0) peg$fail(peg$e17);
12982
12861
  }
12983
12862
  if (s2 !== peg$FAILED) {
12984
12863
  s3 = [];
12985
- s4 = input2.charAt(peg$currPos);
12986
- if (peg$r6.test(s4)) peg$currPos++;
12987
- else {
12988
- s4 = peg$FAILED;
12989
- if (peg$silentFails === 0) peg$fail(peg$e18);
12990
- }
12991
- while (s4 !== peg$FAILED) {
12992
- s3.push(s4);
12864
+ for (; ; ) {
12993
12865
  s4 = input2.charAt(peg$currPos);
12994
- if (peg$r6.test(s4)) peg$currPos++;
12866
+ if (peg$charCode = s4.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90 || peg$charCode >= 48 && peg$charCode <= 57 || peg$charCode === 95 || peg$charCode === 46) peg$currPos++;
12995
12867
  else {
12996
12868
  s4 = peg$FAILED;
12997
12869
  if (peg$silentFails === 0) peg$fail(peg$e18);
12998
12870
  }
12871
+ if (s4 === peg$FAILED) break;
12872
+ s3.push(s4);
12999
12873
  }
13000
12874
  if (input2.charCodeAt(peg$currPos) === 125) {
13001
12875
  s4 = peg$c11;
@@ -13042,7 +12916,7 @@ function peg$parse(input2, options) {
13042
12916
  s3 = peg$parseSelectors();
13043
12917
  if (s3 !== peg$FAILED) {
13044
12918
  s4 = input2.charAt(peg$currPos);
13045
- if (peg$r5.test(s4)) peg$currPos++;
12919
+ if (peg$charCode = s4.charCodeAt(0), peg$charCode === 36 || peg$charCode === 95 || peg$charCode === 64 || peg$charCode === 37) peg$currPos++;
13046
12920
  else {
13047
12921
  s4 = peg$FAILED;
13048
12922
  if (peg$silentFails === 0) peg$fail(peg$e17);
@@ -13051,20 +12925,15 @@ function peg$parse(input2, options) {
13051
12925
  s5 = peg$parseHere();
13052
12926
  s6 = peg$currPos;
13053
12927
  s7 = [];
13054
- s8 = input2.charAt(peg$currPos);
13055
- if (peg$r6.test(s8)) peg$currPos++;
13056
- else {
13057
- s8 = peg$FAILED;
13058
- if (peg$silentFails === 0) peg$fail(peg$e18);
13059
- }
13060
- while (s8 !== peg$FAILED) {
13061
- s7.push(s8);
12928
+ for (; ; ) {
13062
12929
  s8 = input2.charAt(peg$currPos);
13063
- if (peg$r6.test(s8)) peg$currPos++;
12930
+ if (peg$charCode = s8.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90 || peg$charCode >= 48 && peg$charCode <= 57 || peg$charCode === 95 || peg$charCode === 46) peg$currPos++;
13064
12931
  else {
13065
12932
  s8 = peg$FAILED;
13066
12933
  if (peg$silentFails === 0) peg$fail(peg$e18);
13067
12934
  }
12935
+ if (s8 === peg$FAILED) break;
12936
+ s7.push(s8);
13068
12937
  }
13069
12938
  s6 = input2.substring(s6, peg$currPos);
13070
12939
  s7 = peg$parseBraceEnd();
@@ -13104,7 +12973,7 @@ function peg$parse(input2, options) {
13104
12973
  s5 = peg$currPos;
13105
12974
  peg$silentFails++;
13106
12975
  s6 = input2.charAt(peg$currPos);
13107
- if (peg$r7.test(s6)) peg$currPos++;
12976
+ if (peg$charCode = s6.charCodeAt(0), peg$charCode === 36 || peg$charCode === 95 || peg$charCode === 64 || peg$charCode === 37 || peg$charCode === 40 || peg$charCode === 33) peg$currPos++;
13108
12977
  else {
13109
12978
  s6 = peg$FAILED;
13110
12979
  if (peg$silentFails === 0) peg$fail(peg$e20);
@@ -13156,7 +13025,7 @@ function peg$parse(input2, options) {
13156
13025
  s3 = peg$currPos;
13157
13026
  peg$silentFails++;
13158
13027
  s4 = input2.charAt(peg$currPos);
13159
- if (peg$r7.test(s4)) peg$currPos++;
13028
+ if (peg$charCode = s4.charCodeAt(0), peg$charCode === 36 || peg$charCode === 95 || peg$charCode === 64 || peg$charCode === 37 || peg$charCode === 40 || peg$charCode === 33) peg$currPos++;
13160
13029
  else {
13161
13030
  s4 = peg$FAILED;
13162
13031
  if (peg$silentFails === 0) peg$fail(peg$e20);
@@ -13421,27 +13290,22 @@ function peg$parse(input2, options) {
13421
13290
  s0 = peg$currPos;
13422
13291
  s1 = peg$currPos;
13423
13292
  s2 = input2.charAt(peg$currPos);
13424
- if (peg$r8.test(s2)) peg$currPos++;
13293
+ if (peg$charCode = s2.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90) peg$currPos++;
13425
13294
  else {
13426
13295
  s2 = peg$FAILED;
13427
13296
  if (peg$silentFails === 0) peg$fail(peg$e22);
13428
13297
  }
13429
13298
  if (s2 !== peg$FAILED) {
13430
13299
  s3 = [];
13431
- s4 = input2.charAt(peg$currPos);
13432
- if (peg$r9.test(s4)) peg$currPos++;
13433
- else {
13434
- s4 = peg$FAILED;
13435
- if (peg$silentFails === 0) peg$fail(peg$e23);
13436
- }
13437
- while (s4 !== peg$FAILED) {
13438
- s3.push(s4);
13300
+ for (; ; ) {
13439
13301
  s4 = input2.charAt(peg$currPos);
13440
- if (peg$r9.test(s4)) peg$currPos++;
13302
+ if (s4 !== "" && !(peg$charCode = s4.charCodeAt(0), peg$charCode === 32 || peg$charCode === 9 || peg$charCode === 10 || peg$charCode === 13 || peg$charCode === 11 || peg$charCode === 12 || peg$charCode === 160 || peg$charCode === 5760 || peg$charCode >= 8192 && peg$charCode <= 8202 || peg$charCode === 8232 || peg$charCode === 8233 || peg$charCode === 8239 || peg$charCode === 8287 || peg$charCode === 12288 || peg$charCode === 65279 || peg$charCode === 125)) peg$currPos++;
13441
13303
  else {
13442
13304
  s4 = peg$FAILED;
13443
13305
  if (peg$silentFails === 0) peg$fail(peg$e23);
13444
13306
  }
13307
+ if (s4 === peg$FAILED) break;
13308
+ s3.push(s4);
13445
13309
  }
13446
13310
  s2 = [s2, s3];
13447
13311
  s1 = s2;
@@ -13467,22 +13331,17 @@ function peg$parse(input2, options) {
13467
13331
  }
13468
13332
  if (s3 !== peg$FAILED) {
13469
13333
  s4 = [];
13470
- s5 = input2.charAt(peg$currPos);
13471
- if (peg$r10.test(s5)) peg$currPos++;
13472
- else {
13473
- s5 = peg$FAILED;
13474
- if (peg$silentFails === 0) peg$fail(peg$e24);
13475
- }
13476
- if (s5 !== peg$FAILED) while (s5 !== peg$FAILED) {
13477
- s4.push(s5);
13334
+ for (; ; ) {
13478
13335
  s5 = input2.charAt(peg$currPos);
13479
- if (peg$r10.test(s5)) peg$currPos++;
13336
+ if (peg$charCode = s5.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90 || peg$charCode >= 48 && peg$charCode <= 57 || peg$charCode === 46 || peg$charCode === 33 || peg$charCode === 35 || peg$charCode === 36 || peg$charCode === 37 || peg$charCode === 38 || peg$charCode === 39 || peg$charCode === 42 || peg$charCode === 43 || peg$charCode === 47 || peg$charCode === 61 || peg$charCode === 63 || peg$charCode === 94 || peg$charCode === 95 || peg$charCode === 96 || peg$charCode === 124 || peg$charCode === 126 || peg$charCode === 45) peg$currPos++;
13480
13337
  else {
13481
13338
  s5 = peg$FAILED;
13482
13339
  if (peg$silentFails === 0) peg$fail(peg$e24);
13483
13340
  }
13341
+ if (s5 === peg$FAILED) break;
13342
+ s4.push(s5);
13484
13343
  }
13485
- else s4 = peg$FAILED;
13344
+ if (s4.length < 1) s4 = peg$FAILED;
13486
13345
  if (s4 !== peg$FAILED) {
13487
13346
  if (input2.charCodeAt(peg$currPos) === 64) {
13488
13347
  s5 = peg$c13;
@@ -13493,22 +13352,17 @@ function peg$parse(input2, options) {
13493
13352
  }
13494
13353
  if (s5 !== peg$FAILED) {
13495
13354
  s6 = [];
13496
- s7 = input2.charAt(peg$currPos);
13497
- if (peg$r11.test(s7)) peg$currPos++;
13498
- else {
13499
- s7 = peg$FAILED;
13500
- if (peg$silentFails === 0) peg$fail(peg$e26);
13501
- }
13502
- if (s7 !== peg$FAILED) while (s7 !== peg$FAILED) {
13503
- s6.push(s7);
13355
+ for (; ; ) {
13504
13356
  s7 = input2.charAt(peg$currPos);
13505
- if (peg$r11.test(s7)) peg$currPos++;
13357
+ if (peg$charCode = s7.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90 || peg$charCode >= 48 && peg$charCode <= 57 || peg$charCode === 46 || peg$charCode === 45) peg$currPos++;
13506
13358
  else {
13507
13359
  s7 = peg$FAILED;
13508
13360
  if (peg$silentFails === 0) peg$fail(peg$e26);
13509
13361
  }
13362
+ if (s7 === peg$FAILED) break;
13363
+ s6.push(s7);
13510
13364
  }
13511
- else s6 = peg$FAILED;
13365
+ if (s6.length < 1) s6 = peg$FAILED;
13512
13366
  if (s6 !== peg$FAILED) {
13513
13367
  if (input2.charCodeAt(peg$currPos) === 62) {
13514
13368
  s7 = peg$c1;
@@ -13580,7 +13434,7 @@ function peg$parse(input2, options) {
13580
13434
  }
13581
13435
  if (s3 !== peg$FAILED) {
13582
13436
  s4 = input2.charAt(peg$currPos);
13583
- if (peg$r8.test(s4)) peg$currPos++;
13437
+ if (peg$charCode = s4.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90) peg$currPos++;
13584
13438
  else {
13585
13439
  s4 = peg$FAILED;
13586
13440
  if (peg$silentFails === 0) peg$fail(peg$e22);
@@ -13589,7 +13443,7 @@ function peg$parse(input2, options) {
13589
13443
  s5 = peg$currPos;
13590
13444
  s6 = [];
13591
13445
  s7 = input2.charAt(peg$currPos);
13592
- if (peg$r12.test(s7)) peg$currPos++;
13446
+ if (peg$charCode = s7.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90 || peg$charCode >= 48 && peg$charCode <= 57 || peg$charCode === 43 || peg$charCode === 46 || peg$charCode === 45) peg$currPos++;
13593
13447
  else {
13594
13448
  s7 = peg$FAILED;
13595
13449
  if (peg$silentFails === 0) peg$fail(peg$e27);
@@ -13599,7 +13453,7 @@ function peg$parse(input2, options) {
13599
13453
  if (s6.length >= 31) s7 = peg$FAILED;
13600
13454
  else {
13601
13455
  s7 = input2.charAt(peg$currPos);
13602
- if (peg$r12.test(s7)) peg$currPos++;
13456
+ if (peg$charCode = s7.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90 || peg$charCode >= 48 && peg$charCode <= 57 || peg$charCode === 43 || peg$charCode === 46 || peg$charCode === 45) peg$currPos++;
13603
13457
  else {
13604
13458
  s7 = peg$FAILED;
13605
13459
  if (peg$silentFails === 0) peg$fail(peg$e27);
@@ -13620,42 +13474,7 @@ function peg$parse(input2, options) {
13620
13474
  }
13621
13475
  if (s6 !== peg$FAILED) {
13622
13476
  s7 = [];
13623
- s8 = peg$currPos;
13624
- s9 = peg$currPos;
13625
- peg$silentFails++;
13626
- if (input2.substr(peg$currPos, 2) === peg$c8) {
13627
- s10 = peg$c8;
13628
- peg$currPos += 2;
13629
- } else {
13630
- s10 = peg$FAILED;
13631
- if (peg$silentFails === 0) peg$fail(peg$e12);
13632
- }
13633
- peg$silentFails--;
13634
- if (s10 === peg$FAILED) s9 = void 0;
13635
- else {
13636
- peg$currPos = s9;
13637
- s9 = peg$FAILED;
13638
- }
13639
- if (s9 !== peg$FAILED) {
13640
- s10 = input2.charAt(peg$currPos);
13641
- if (peg$r13.test(s10)) peg$currPos++;
13642
- else {
13643
- s10 = peg$FAILED;
13644
- if (peg$silentFails === 0) peg$fail(peg$e29);
13645
- }
13646
- if (s10 !== peg$FAILED) {
13647
- s9 = [s9, s10];
13648
- s8 = s9;
13649
- } else {
13650
- peg$currPos = s8;
13651
- s8 = peg$FAILED;
13652
- }
13653
- } else {
13654
- peg$currPos = s8;
13655
- s8 = peg$FAILED;
13656
- }
13657
- while (s8 !== peg$FAILED) {
13658
- s7.push(s8);
13477
+ for (; ; ) {
13659
13478
  s8 = peg$currPos;
13660
13479
  s9 = peg$currPos;
13661
13480
  peg$silentFails++;
@@ -13674,7 +13493,7 @@ function peg$parse(input2, options) {
13674
13493
  }
13675
13494
  if (s9 !== peg$FAILED) {
13676
13495
  s10 = input2.charAt(peg$currPos);
13677
- if (peg$r13.test(s10)) peg$currPos++;
13496
+ if (s10 !== "" && !(peg$charCode = s10.charCodeAt(0), peg$charCode >= 0 && peg$charCode <= 32 || peg$charCode === 127 || peg$charCode === 60 || peg$charCode === 62 || peg$charCode === 123 || peg$charCode === 125)) peg$currPos++;
13678
13497
  else {
13679
13498
  s10 = peg$FAILED;
13680
13499
  if (peg$silentFails === 0) peg$fail(peg$e29);
@@ -13690,6 +13509,8 @@ function peg$parse(input2, options) {
13690
13509
  peg$currPos = s8;
13691
13510
  s8 = peg$FAILED;
13692
13511
  }
13512
+ if (s8 === peg$FAILED) break;
13513
+ s7.push(s8);
13693
13514
  }
13694
13515
  if (input2.charCodeAt(peg$currPos) === 62) {
13695
13516
  s8 = peg$c1;
@@ -13752,10 +13573,10 @@ function peg$parse(input2, options) {
13752
13573
  s3 = peg$parseTagName();
13753
13574
  if (s3 !== peg$FAILED) {
13754
13575
  s4 = [];
13755
- s5 = peg$parseAttribute();
13756
- while (s5 !== peg$FAILED) {
13757
- s4.push(s5);
13576
+ for (; ; ) {
13758
13577
  s5 = peg$parseAttribute();
13578
+ if (s5 === peg$FAILED) break;
13579
+ s4.push(s5);
13759
13580
  }
13760
13581
  s5 = peg$parse_();
13761
13582
  if (input2.charCodeAt(peg$currPos) === 47) {
@@ -13804,7 +13625,7 @@ function peg$parse(input2, options) {
13804
13625
  s3 = peg$currPos;
13805
13626
  peg$silentFails++;
13806
13627
  s4 = input2.charAt(peg$currPos);
13807
- if (peg$r14.test(s4)) peg$currPos++;
13628
+ if (peg$charCode = s4.charCodeAt(0), peg$charCode >= 9 && peg$charCode <= 13 || peg$charCode === 32 || peg$charCode === 47 || peg$charCode === 62 || peg$charCode === 160 || peg$charCode === 5760 || peg$charCode >= 8192 && peg$charCode <= 8202 || peg$charCode >= 8232 && peg$charCode <= 8233 || peg$charCode === 8239 || peg$charCode === 8287 || peg$charCode === 12288 || peg$charCode === 65279) peg$currPos++;
13808
13629
  else {
13809
13630
  s4 = peg$FAILED;
13810
13631
  if (peg$silentFails === 0) peg$fail(peg$e30);
@@ -13833,10 +13654,10 @@ function peg$parse(input2, options) {
13833
13654
  } else s3 = peg$FAILED;
13834
13655
  if (s3 !== peg$FAILED) {
13835
13656
  s4 = [];
13836
- s5 = peg$parseAttribute();
13837
- while (s5 !== peg$FAILED) {
13838
- s4.push(s5);
13657
+ for (; ; ) {
13839
13658
  s5 = peg$parseAttribute();
13659
+ if (s5 === peg$FAILED) break;
13660
+ s4.push(s5);
13840
13661
  }
13841
13662
  s5 = peg$parse_();
13842
13663
  s6 = peg$parseHere();
@@ -13901,27 +13722,22 @@ function peg$parse(input2, options) {
13901
13722
  s0 = peg$currPos;
13902
13723
  s1 = peg$currPos;
13903
13724
  s2 = input2.charAt(peg$currPos);
13904
- if (peg$r8.test(s2)) peg$currPos++;
13725
+ if (peg$charCode = s2.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90) peg$currPos++;
13905
13726
  else {
13906
13727
  s2 = peg$FAILED;
13907
13728
  if (peg$silentFails === 0) peg$fail(peg$e22);
13908
13729
  }
13909
13730
  if (s2 !== peg$FAILED) {
13910
13731
  s3 = [];
13911
- s4 = input2.charAt(peg$currPos);
13912
- if (peg$r15.test(s4)) peg$currPos++;
13913
- else {
13914
- s4 = peg$FAILED;
13915
- if (peg$silentFails === 0) peg$fail(peg$e32);
13916
- }
13917
- while (s4 !== peg$FAILED) {
13918
- s3.push(s4);
13732
+ for (; ; ) {
13919
13733
  s4 = input2.charAt(peg$currPos);
13920
- if (peg$r15.test(s4)) peg$currPos++;
13734
+ if (peg$charCode = s4.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90 || peg$charCode >= 48 && peg$charCode <= 57 || peg$charCode === 45) peg$currPos++;
13921
13735
  else {
13922
13736
  s4 = peg$FAILED;
13923
13737
  if (peg$silentFails === 0) peg$fail(peg$e32);
13924
13738
  }
13739
+ if (s4 === peg$FAILED) break;
13740
+ s3.push(s4);
13925
13741
  }
13926
13742
  s2 = [s2, s3];
13927
13743
  s1 = s2;
@@ -13940,47 +13756,12 @@ function peg$parse(input2, options) {
13940
13756
  s2 = peg$parseHere();
13941
13757
  s3 = peg$currPos;
13942
13758
  s4 = [];
13943
- s5 = peg$currPos;
13944
- s6 = peg$currPos;
13945
- peg$silentFails++;
13946
- s7 = input2.charAt(peg$currPos);
13947
- if (peg$r16.test(s7)) peg$currPos++;
13948
- else {
13949
- s7 = peg$FAILED;
13950
- if (peg$silentFails === 0) peg$fail(peg$e33);
13951
- }
13952
- peg$silentFails--;
13953
- if (s7 === peg$FAILED) s6 = void 0;
13954
- else {
13955
- peg$currPos = s6;
13956
- s6 = peg$FAILED;
13957
- }
13958
- if (s6 !== peg$FAILED) {
13959
- if (input2.length > peg$currPos) {
13960
- s7 = input2.charAt(peg$currPos);
13961
- peg$currPos++;
13962
- } else {
13963
- s7 = peg$FAILED;
13964
- if (peg$silentFails === 0) peg$fail(peg$e0);
13965
- }
13966
- if (s7 !== peg$FAILED) {
13967
- s6 = [s6, s7];
13968
- s5 = s6;
13969
- } else {
13970
- peg$currPos = s5;
13971
- s5 = peg$FAILED;
13972
- }
13973
- } else {
13974
- peg$currPos = s5;
13975
- s5 = peg$FAILED;
13976
- }
13977
- if (s5 !== peg$FAILED) while (s5 !== peg$FAILED) {
13978
- s4.push(s5);
13759
+ for (; ; ) {
13979
13760
  s5 = peg$currPos;
13980
13761
  s6 = peg$currPos;
13981
13762
  peg$silentFails++;
13982
13763
  s7 = input2.charAt(peg$currPos);
13983
- if (peg$r16.test(s7)) peg$currPos++;
13764
+ if (peg$charCode = s7.charCodeAt(0), peg$charCode >= 9 && peg$charCode <= 13 || peg$charCode === 32 || peg$charCode === 34 || peg$charCode === 39 || peg$charCode === 47 || peg$charCode >= 60 && peg$charCode <= 62 || peg$charCode === 123 || peg$charCode === 125 || peg$charCode === 160 || peg$charCode === 5760 || peg$charCode >= 8192 && peg$charCode <= 8202 || peg$charCode >= 8232 && peg$charCode <= 8233 || peg$charCode === 8239 || peg$charCode === 8287 || peg$charCode === 12288 || peg$charCode === 65279) peg$currPos++;
13984
13765
  else {
13985
13766
  s7 = peg$FAILED;
13986
13767
  if (peg$silentFails === 0) peg$fail(peg$e33);
@@ -14010,8 +13791,10 @@ function peg$parse(input2, options) {
14010
13791
  peg$currPos = s5;
14011
13792
  s5 = peg$FAILED;
14012
13793
  }
13794
+ if (s5 === peg$FAILED) break;
13795
+ s4.push(s5);
14013
13796
  }
14014
- else s4 = peg$FAILED;
13797
+ if (s4.length < 1) s4 = peg$FAILED;
14015
13798
  if (s4 !== peg$FAILED) s3 = input2.substring(s3, peg$currPos);
14016
13799
  else s3 = s4;
14017
13800
  if (s3 !== peg$FAILED) {
@@ -14070,26 +13853,18 @@ function peg$parse(input2, options) {
14070
13853
  s2 = peg$parseHere();
14071
13854
  s3 = peg$currPos;
14072
13855
  s4 = [];
14073
- s5 = peg$parseValuePart();
14074
- if (s5 === peg$FAILED) {
14075
- s5 = input2.charAt(peg$currPos);
14076
- if (peg$r17.test(s5)) peg$currPos++;
14077
- else {
14078
- s5 = peg$FAILED;
14079
- if (peg$silentFails === 0) peg$fail(peg$e36);
14080
- }
14081
- }
14082
- while (s5 !== peg$FAILED) {
14083
- s4.push(s5);
13856
+ for (; ; ) {
14084
13857
  s5 = peg$parseValuePart();
14085
13858
  if (s5 === peg$FAILED) {
14086
13859
  s5 = input2.charAt(peg$currPos);
14087
- if (peg$r17.test(s5)) peg$currPos++;
13860
+ if (s5 !== "" && !(peg$charCode = s5.charCodeAt(0), peg$charCode === 34)) peg$currPos++;
14088
13861
  else {
14089
13862
  s5 = peg$FAILED;
14090
13863
  if (peg$silentFails === 0) peg$fail(peg$e36);
14091
13864
  }
14092
13865
  }
13866
+ if (s5 === peg$FAILED) break;
13867
+ s4.push(s5);
14093
13868
  }
14094
13869
  s3 = input2.substring(s3, peg$currPos);
14095
13870
  s4 = peg$parseHere();
@@ -14125,26 +13900,18 @@ function peg$parse(input2, options) {
14125
13900
  s2 = peg$parseHere();
14126
13901
  s3 = peg$currPos;
14127
13902
  s4 = [];
14128
- s5 = peg$parseValuePart();
14129
- if (s5 === peg$FAILED) {
14130
- s5 = input2.charAt(peg$currPos);
14131
- if (peg$r18.test(s5)) peg$currPos++;
14132
- else {
14133
- s5 = peg$FAILED;
14134
- if (peg$silentFails === 0) peg$fail(peg$e38);
14135
- }
14136
- }
14137
- while (s5 !== peg$FAILED) {
14138
- s4.push(s5);
13903
+ for (; ; ) {
14139
13904
  s5 = peg$parseValuePart();
14140
13905
  if (s5 === peg$FAILED) {
14141
13906
  s5 = input2.charAt(peg$currPos);
14142
- if (peg$r18.test(s5)) peg$currPos++;
13907
+ if (s5 !== "" && !(peg$charCode = s5.charCodeAt(0), peg$charCode === 39)) peg$currPos++;
14143
13908
  else {
14144
13909
  s5 = peg$FAILED;
14145
13910
  if (peg$silentFails === 0) peg$fail(peg$e38);
14146
13911
  }
14147
13912
  }
13913
+ if (s5 === peg$FAILED) break;
13914
+ s4.push(s5);
14148
13915
  }
14149
13916
  s3 = input2.substring(s3, peg$currPos);
14150
13917
  s4 = peg$parseHere();
@@ -14170,7 +13937,7 @@ function peg$parse(input2, options) {
14170
13937
  if (s0 === peg$FAILED) {
14171
13938
  s0 = peg$currPos;
14172
13939
  s1 = input2.charAt(peg$currPos);
14173
- if (peg$r19.test(s1)) peg$currPos++;
13940
+ if (peg$charCode = s1.charCodeAt(0), peg$charCode === 34 || peg$charCode === 39) peg$currPos++;
14174
13941
  else {
14175
13942
  s1 = peg$FAILED;
14176
13943
  if (peg$silentFails === 0) peg$fail(peg$e39);
@@ -14185,20 +13952,15 @@ function peg$parse(input2, options) {
14185
13952
  s1 = peg$parseHere();
14186
13953
  s2 = peg$currPos;
14187
13954
  s3 = [];
14188
- s4 = input2.charAt(peg$currPos);
14189
- if (peg$r20.test(s4)) peg$currPos++;
14190
- else {
14191
- s4 = peg$FAILED;
14192
- if (peg$silentFails === 0) peg$fail(peg$e40);
14193
- }
14194
- while (s4 !== peg$FAILED) {
14195
- s3.push(s4);
13955
+ for (; ; ) {
14196
13956
  s4 = input2.charAt(peg$currPos);
14197
- if (peg$r20.test(s4)) peg$currPos++;
13957
+ if (s4 !== "" && !(peg$charCode = s4.charCodeAt(0), peg$charCode === 32 || peg$charCode === 9 || peg$charCode === 10 || peg$charCode === 13 || peg$charCode === 11 || peg$charCode === 12 || peg$charCode === 160 || peg$charCode === 5760 || peg$charCode >= 8192 && peg$charCode <= 8202 || peg$charCode === 8232 || peg$charCode === 8233 || peg$charCode === 8239 || peg$charCode === 8287 || peg$charCode === 12288 || peg$charCode === 65279 || peg$charCode === 62)) peg$currPos++;
14198
13958
  else {
14199
13959
  s4 = peg$FAILED;
14200
13960
  if (peg$silentFails === 0) peg$fail(peg$e40);
14201
13961
  }
13962
+ if (s4 === peg$FAILED) break;
13963
+ s3.push(s4);
14202
13964
  }
14203
13965
  s2 = input2.substring(s2, peg$currPos);
14204
13966
  s3 = peg$parseHere();
@@ -14219,15 +13981,7 @@ function peg$parse(input2, options) {
14219
13981
  if (s1 !== peg$FAILED) {
14220
13982
  s2 = peg$currPos;
14221
13983
  s3 = [];
14222
- if (input2.charCodeAt(peg$currPos) === 92) {
14223
- s4 = peg$c4;
14224
- peg$currPos++;
14225
- } else {
14226
- s4 = peg$FAILED;
14227
- if (peg$silentFails === 0) peg$fail(peg$e6);
14228
- }
14229
- if (s4 !== peg$FAILED) while (s4 !== peg$FAILED) {
14230
- s3.push(s4);
13984
+ for (; ; ) {
14231
13985
  if (input2.charCodeAt(peg$currPos) === 92) {
14232
13986
  s4 = peg$c4;
14233
13987
  peg$currPos++;
@@ -14235,8 +13989,10 @@ function peg$parse(input2, options) {
14235
13989
  s4 = peg$FAILED;
14236
13990
  if (peg$silentFails === 0) peg$fail(peg$e6);
14237
13991
  }
13992
+ if (s4 === peg$FAILED) break;
13993
+ s3.push(s4);
14238
13994
  }
14239
- else s3 = peg$FAILED;
13995
+ if (s3.length < 1) s3 = peg$FAILED;
14240
13996
  if (s3 !== peg$FAILED) s2 = input2.substring(s2, peg$currPos);
14241
13997
  else s2 = s3;
14242
13998
  if (s2 !== peg$FAILED) {
@@ -14247,7 +14003,7 @@ function peg$parse(input2, options) {
14247
14003
  else s4 = peg$FAILED;
14248
14004
  if (s4 !== peg$FAILED) {
14249
14005
  s5 = input2.charAt(peg$currPos);
14250
- if (peg$r1.test(s5)) peg$currPos++;
14006
+ if (peg$charCode = s5.charCodeAt(0), peg$charCode === 123 || peg$charCode === 125) peg$currPos++;
14251
14007
  else {
14252
14008
  s5 = peg$FAILED;
14253
14009
  if (peg$silentFails === 0) peg$fail(peg$e7);
@@ -14415,7 +14171,7 @@ function peg$parse(input2, options) {
14415
14171
  }
14416
14172
  if (s6 === peg$FAILED) s6 = null;
14417
14173
  s7 = input2.charAt(peg$currPos);
14418
- if (peg$r8.test(s7)) peg$currPos++;
14174
+ if (peg$charCode = s7.charCodeAt(0), peg$charCode >= 97 && peg$charCode <= 122 || peg$charCode >= 65 && peg$charCode <= 90) peg$currPos++;
14419
14175
  else {
14420
14176
  s7 = peg$FAILED;
14421
14177
  if (peg$silentFails === 0) peg$fail(peg$e22);
@@ -14489,7 +14245,7 @@ function peg$parse(input2, options) {
14489
14245
  s3 = peg$currPos;
14490
14246
  peg$silentFails++;
14491
14247
  s4 = input2.charAt(peg$currPos);
14492
- if (peg$r5.test(s4)) peg$currPos++;
14248
+ if (peg$charCode = s4.charCodeAt(0), peg$charCode === 36 || peg$charCode === 95 || peg$charCode === 64 || peg$charCode === 37) peg$currPos++;
14493
14249
  else {
14494
14250
  s4 = peg$FAILED;
14495
14251
  if (peg$silentFails === 0) peg$fail(peg$e17);
@@ -14540,17 +14296,17 @@ function peg$parse(input2, options) {
14540
14296
  function peg$parse_() {
14541
14297
  let s0, s1;
14542
14298
  s0 = [];
14543
- s1 = peg$parse_c();
14544
- while (s1 !== peg$FAILED) {
14545
- s0.push(s1);
14299
+ for (; ; ) {
14546
14300
  s1 = peg$parse_c();
14301
+ if (s1 === peg$FAILED) break;
14302
+ s0.push(s1);
14547
14303
  }
14548
14304
  return s0;
14549
14305
  }
14550
14306
  function peg$parse_c() {
14551
14307
  let s0;
14552
14308
  s0 = input2.charAt(peg$currPos);
14553
- if (peg$r21.test(s0)) peg$currPos++;
14309
+ if (peg$charCode = s0.charCodeAt(0), peg$charCode === 32 || peg$charCode === 9 || peg$charCode === 10 || peg$charCode === 13 || peg$charCode === 11 || peg$charCode === 12 || peg$charCode === 160 || peg$charCode === 5760 || peg$charCode >= 8192 && peg$charCode <= 8202 || peg$charCode === 8232 || peg$charCode === 8233 || peg$charCode === 8239 || peg$charCode === 8287 || peg$charCode === 12288 || peg$charCode === 65279) peg$currPos++;
14554
14310
  else {
14555
14311
  s0 = peg$FAILED;
14556
14312
  if (peg$silentFails === 0) peg$fail(peg$e41);
@@ -15198,10 +14954,14 @@ function isMemberDot(type) {
15198
14954
  return type === types$1.dot || type === types$1.questionDot;
15199
14955
  }
15200
14956
  function tokenizerAt(src, start, goal, { onComment, afterOperand = false } = {}) {
15201
- const p = new SigilParser(onComment ? {
14957
+ const p = new SigilParser({
15202
14958
  ...OPTIONS,
14959
+ startLocation: {
14960
+ line: 1,
14961
+ column: 0
14962
+ },
15203
14963
  onComment
15204
- } : OPTIONS, src, start);
14964
+ }, src, start);
15205
14965
  if (goal === "expression") p.type = types$1.parenL;
15206
14966
  if (afterOperand) p.exprAllowed = false;
15207
14967
  return p;
@@ -15855,36 +15615,6 @@ function completionIdentifier(source, cursor, goal = "expression") {
15855
15615
  previous2 = token;
15856
15616
  }
15857
15617
  }
15858
- function skipLiteral(input2, i2) {
15859
- const quote = input2[i2];
15860
- const template = quote === "`";
15861
- let ranOut = false;
15862
- for (let j2 = i2 + 1; j2 < input2.length; ) {
15863
- const c = input2[j2];
15864
- if (c === "\\") j2 += 2;
15865
- else if (c === quote) return {
15866
- end: j2 + 1,
15867
- ranOut
15868
- };
15869
- else if (!template && c === "\n") return {
15870
- end: -1,
15871
- ranOut
15872
- };
15873
- else if (template && c === "$" && input2[j2 + 1] === "{") {
15874
- const close = lenientRead(input2, j2 + 2);
15875
- ranOut || (ranOut = close.ranOut);
15876
- if (close.end === -1) return {
15877
- end: -1,
15878
- ranOut
15879
- };
15880
- j2 = close.end + 1;
15881
- } else j2++;
15882
- }
15883
- return {
15884
- end: -1,
15885
- ranOut: ranOut || template
15886
- };
15887
- }
15888
15618
  function lenientClose(input2, i2, onRunOut) {
15889
15619
  const { end, ranOut } = lenientRead(input2, i2);
15890
15620
  if (ranOut) onRunOut?.();
@@ -15902,31 +15632,71 @@ function lenientRead(input2, i2) {
15902
15632
  }
15903
15633
  return read;
15904
15634
  }
15905
- function scanLenient(input2, i2) {
15906
- let depth = 0;
15907
- let ranOut = false;
15908
- while (i2 < input2.length) {
15909
- const c = input2[i2];
15910
- if (c === "{") {
15911
- depth++;
15912
- i2++;
15913
- } else if (c === "}") {
15914
- if (depth === 0) return {
15915
- end: i2,
15916
- ranOut
15917
- };
15918
- depth--;
15919
- i2++;
15920
- } else if (c === "`" || (c === '"' || c === "'") && !(i2 > 0 && NON_STRING_QUOTE_PREFIX.test(input2[i2 - 1]))) {
15921
- const close = skipLiteral(input2, i2);
15922
- ranOut || (ranOut = close.ranOut);
15923
- i2 = close.end === -1 ? i2 + 1 : close.end;
15924
- } else i2++;
15925
- }
15926
- return {
15635
+ function scanLenient(input2, start) {
15636
+ const codeFrame = (start2) => ({
15637
+ kind: "code",
15638
+ start: start2,
15639
+ i: start2,
15640
+ depth: 0,
15641
+ ranOut: false
15642
+ });
15643
+ const frames = [codeFrame(start)];
15644
+ let result2 = {
15927
15645
  end: -1,
15928
15646
  ranOut: true
15929
15647
  };
15648
+ const finish = (end, ranOut) => {
15649
+ const frame = frames.pop();
15650
+ result2 = {
15651
+ end,
15652
+ ranOut
15653
+ };
15654
+ if (frame.kind === "code") memo.set(frame.start, result2);
15655
+ const parent = frames[frames.length - 1];
15656
+ if (!parent) return;
15657
+ parent.ranOut || (parent.ranOut = ranOut);
15658
+ if (parent.kind === "code") parent.i = end === -1 ? parent.i + 1 : end;
15659
+ else if (end === -1) parent.i = input2.length;
15660
+ else parent.i = end + 1;
15661
+ };
15662
+ while (frames.length) {
15663
+ const frame = frames[frames.length - 1];
15664
+ const { i: i2, ranOut } = frame;
15665
+ if (i2 >= input2.length) {
15666
+ finish(-1, ranOut || frame.kind === "code" || frame.quote === "`");
15667
+ continue;
15668
+ }
15669
+ const c = input2[i2];
15670
+ if (frame.kind === "literal") {
15671
+ if (c === "\\") frame.i += 2;
15672
+ else if (c === frame.quote) finish(i2 + 1, ranOut);
15673
+ else if (frame.quote !== "`" && c === "\n") finish(-1, ranOut);
15674
+ else if (frame.quote === "`" && c === "$" && input2[i2 + 1] === "{") {
15675
+ const cached2 = memo.get(i2 + 2);
15676
+ if (cached2) {
15677
+ frame.ranOut || (frame.ranOut = cached2.ranOut);
15678
+ frame.i = cached2.end === -1 ? input2.length : cached2.end + 1;
15679
+ } else frames.push(codeFrame(i2 + 2));
15680
+ } else frame.i++;
15681
+ } else if (c === "{") {
15682
+ frame.depth++;
15683
+ frame.i++;
15684
+ } else if (c === "}") {
15685
+ if (frame.depth === 0) finish(i2, ranOut);
15686
+ else {
15687
+ frame.depth--;
15688
+ frame.i++;
15689
+ }
15690
+ } else if (c === "`" || (c === '"' || c === "'") && !(i2 > 0 && NON_STRING_QUOTE_PREFIX.test(input2[i2 - 1]))) frames.push({
15691
+ kind: "literal",
15692
+ start: i2,
15693
+ i: i2 + 1,
15694
+ quote: c,
15695
+ ranOut: false
15696
+ });
15697
+ else frame.i++;
15698
+ }
15699
+ return result2;
15930
15700
  }
15931
15701
  function jsCodeEnd(onOpenEnd) {
15932
15702
  return {
@@ -17321,7 +17091,7 @@ function widgetDefinitions$1(passages, parametersOf2 = registeredParameters) {
17321
17091
  });
17322
17092
  }
17323
17093
  } else if (open2.length > 0 && (token.type === "variable" && token.scope === "local" && token.name === "children" || tokenTextContainsChildren(token, parametersOf2, passage.content, hooks, budget))) open2[open2.length - 1].isBlock = true;
17324
- done.push(...open2);
17094
+ for (const def of open2) done.push(def);
17325
17095
  const defs = [];
17326
17096
  for (const { token, isBlock, closeStart } of done) try {
17327
17097
  const [from, to] = nameSpan(token.rawArgs);
@@ -17337,7 +17107,8 @@ function widgetDefinitions$1(passages, parametersOf2 = registeredParameters) {
17337
17107
  });
17338
17108
  } catch {
17339
17109
  }
17340
- found.push(...defs.sort((a, b) => a.start - b.start));
17110
+ defs.sort((a, b) => a.start - b.start);
17111
+ for (const def of defs) found.push(def);
17341
17112
  }
17342
17113
  return found;
17343
17114
  };
@@ -17997,10 +17768,24 @@ function discoverMacros(source) {
17997
17768
  }
17998
17769
  return found;
17999
17770
  }
17771
+ function sourceLines(source) {
17772
+ const position = sourcePositions(source);
17773
+ return (offset2) => position(offset2).line - 1;
17774
+ }
18000
17775
  function segmentRegions(body) {
18001
17776
  const lines = body.split("\n");
18002
17777
  if (lines.length > 0 && lines[lines.length - 1] === "") lines.pop();
18003
17778
  if (lines.length === 0) return [];
17779
+ const tags = lines.map(() => []);
17780
+ const tagEndLines = lines.map((_2, line) => line);
17781
+ const lineAt = sourceLines(body);
17782
+ for (const token of tokenizeMarkupTolerant$1(body).tokens) {
17783
+ if (token.type !== "html") continue;
17784
+ const line = lineAt(token.start);
17785
+ tags[line].push(token);
17786
+ tagEndLines[line] = Math.max(tagEndLines[line], lineAt(token.end - 1));
17787
+ }
17788
+ const depthOnLine = (line, name) => tags[line].reduce((depth, token) => token.tag.toLowerCase() === name && !token.isSelfClose ? depth + (token.isClose ? -1 : 1) : depth, 0);
18004
17789
  const regions = [];
18005
17790
  let i2 = 0;
18006
17791
  while (i2 < lines.length) {
@@ -18026,24 +17811,19 @@ function segmentRegions(body) {
18026
17811
  }
18027
17812
  if (/^<([a-zA-Z][\w-]*)/.test(trimmed2)) {
18028
17813
  const tagName = trimmed2.match(/^<([a-zA-Z][\w-]*)/)[1].toLowerCase();
18029
- if (VOID_ELEMENTS.has(tagName) && !lines[i2 + 1]?.trim().startsWith("<")) {
18030
- pushSpindleLine(regions, line);
18031
- i2++;
18032
- continue;
18033
- }
18034
- if (new RegExp(`</${tagName}\\s*>`, "i").test(trimmed2)) {
17814
+ let depth = depthOnLine(i2, tagName);
17815
+ let endLine = tagEndLines[i2];
17816
+ if (depth <= 0 && endLine === i2) {
18035
17817
  pushSpindleLine(regions, line);
18036
17818
  i2++;
18037
17819
  continue;
18038
17820
  }
18039
17821
  const htmlLines = [line];
18040
- let depth = 1;
18041
17822
  i2++;
18042
- while (i2 < lines.length && depth > 0) {
17823
+ while (i2 < lines.length && (depth > 0 || i2 <= endLine)) {
18043
17824
  htmlLines.push(lines[i2]);
18044
- const opens = (lines[i2].match(new RegExp(`<${tagName}(?:[\\s>]|$)`, "gi")) ?? []).length;
18045
- const closes2 = (lines[i2].match(new RegExp(`</${tagName}\\s*>`, "gi")) ?? []).length;
18046
- depth += opens - closes2;
17825
+ endLine = Math.max(endLine, tagEndLines[i2]);
17826
+ depth += depthOnLine(i2, tagName);
18047
17827
  i2++;
18048
17828
  }
18049
17829
  regions.push({
@@ -21929,10 +21709,6 @@ function unclosedHtml(text3) {
21929
21709
  }
21930
21710
  } } };
21931
21711
  }
21932
- function sourceLines(source) {
21933
- const position = sourcePositions(source);
21934
- return (offset2) => position(offset2).line - 1;
21935
- }
21936
21712
  function markdownLines(source, isBlock, types2) {
21937
21713
  const found = /* @__PURE__ */ new Set();
21938
21714
  if (types2.size === 1 && types2.has("codeFenced") && !/`{3}|~{3}/.test(source)) return found;
@@ -22261,13 +22037,13 @@ async function formatLf(text3, options) {
22261
22037
  if (region.type !== "spindle") region.lines = region.lines.map((l) => replaceAll(l, sentinel, "\n"));
22262
22038
  if (region.type === "script") {
22263
22039
  if (region.lines.length === 1) {
22264
- lines.push(...region.lines);
22040
+ for (const line of region.lines) lines.push(line);
22265
22041
  continue;
22266
22042
  }
22267
22043
  const innerCode = region.lines.slice(1, -1).join("\n");
22268
22044
  const formatted = await formatJS(innerCode.trim(), prettier2, prettierOptions);
22269
22045
  if (formatted === void 0 || !sameSpindleTokens(innerCode, formatted)) {
22270
- lines.push(...region.lines);
22046
+ for (const line of region.lines) lines.push(line);
22271
22047
  continue;
22272
22048
  }
22273
22049
  lines.push(region.lines[0]);
@@ -22276,25 +22052,25 @@ async function formatLf(text3, options) {
22276
22052
  continue;
22277
22053
  }
22278
22054
  if (region.type === "svg") {
22279
- lines.push(...region.lines);
22055
+ for (const line of region.lines) lines.push(line);
22280
22056
  continue;
22281
22057
  }
22282
22058
  if (region.type === "html") {
22283
22059
  const htmlText2 = region.lines.join("\n");
22284
22060
  if (WHITESPACE_AS_WRITTEN.test(htmlText2) || region.lines.some((line) => literalLines.has(line.trim())) || hasMarkdownBoundaries(htmlText2, isBlock)) {
22285
22061
  for (let i2 = 0; i2 < region.lines.length; i2++) preservedLines.add(lines.length + i2);
22286
- lines.push(...region.lines);
22062
+ for (const line of region.lines) lines.push(line);
22287
22063
  continue;
22288
22064
  }
22289
22065
  const { text: svgPlaceholdered, tokens: svgTokens } = replaceSvgBlocks(htmlText2);
22290
22066
  if (!placeholdersIntact(svgPlaceholdered, svgTokens, SVG_PLACEHOLDERS)) {
22291
- lines.push(...region.lines);
22067
+ for (const line of region.lines) lines.push(line);
22292
22068
  continue;
22293
22069
  }
22294
22070
  const { text: placeholdered, tokens: tokens2 } = replaceSpindleTokens(svgPlaceholdered);
22295
22071
  const formatted = await formatHTML(placeholdered, prettier2, prettierOptions);
22296
22072
  if (formatted === void 0 || !placeholdersIntact(formatted, tokens2, SPINDLE_PLACEHOLDERS) || !placeholdersIntact(formatted, svgTokens, SVG_PLACEHOLDERS)) {
22297
- lines.push(...region.lines);
22073
+ for (const line of region.lines) lines.push(line);
22298
22074
  continue;
22299
22075
  }
22300
22076
  const restored = restoreHtmlTokens(formatted.trim(), tokens2.map((t) => replaceAll(t, "\n", sentinel)), svgTokens);
@@ -22312,6 +22088,11 @@ async function formatLf(text3, options) {
22312
22088
  output2 = output2.replace(/\n*$/, "\n");
22313
22089
  return replaceAll(output2.split("\n").map((line) => literalLines.get(line.trim()) ?? line).join("\n"), sentinel, "\n");
22314
22090
  }
22091
+ function isDataScript(token) {
22092
+ if (token.tag.toLowerCase() !== "script") return false;
22093
+ const type = Object.entries(token.attributes).find(([name]) => name.toLowerCase() === "type")?.[1].trim();
22094
+ return !!type && !JAVASCRIPT_TYPE.test(type);
22095
+ }
22315
22096
  function hasMarkdownBoundaries(source, isBlock) {
22316
22097
  const { tokens: tokens2 } = analyzeMarkup(source, { hooks: { isBlock } });
22317
22098
  let possibleBoundary = false;
@@ -22324,13 +22105,13 @@ function hasMarkdownBoundaries(source, isBlock) {
22324
22105
  }
22325
22106
  function whitespaceSensitiveLines(source, isBlock) {
22326
22107
  const lines = /* @__PURE__ */ new Set();
22327
- if (!WHITESPACE_AS_WRITTEN.test(source)) return lines;
22108
+ if (!WHITESPACE_AS_WRITTEN.test(source) && !/<script[\s>]/i.test(source)) return lines;
22328
22109
  const lineAt = sourceLines(source);
22329
22110
  const { nodes } = analyzeMarkup(source, { hooks: { isBlock } });
22330
22111
  function visit2(nodes2) {
22331
22112
  for (const node2 of nodes2) {
22332
22113
  const { token, body } = node2;
22333
- if (token.type === "html" && ([
22114
+ if (token.type === "html" && (isDataScript(token) || [
22334
22115
  "pre",
22335
22116
  "textarea",
22336
22117
  "svg"
@@ -22483,7 +22264,7 @@ function wrapLines(lines, maxLen, literalLines, isBlock) {
22483
22264
  continue;
22484
22265
  }
22485
22266
  if (line.endsWith(" ")) wrapped[wrapped.length - 1] += " ";
22486
- result2.push(...wrapped);
22267
+ for (const line2 of wrapped) result2.push(line2);
22487
22268
  }
22488
22269
  return result2;
22489
22270
  }
@@ -22719,7 +22500,7 @@ function validateVariableReferences(passages, declarations, macros = []) {
22719
22500
  const list3 = [...passages];
22720
22501
  return checkVariableReferences(list3.filter((p) => !p.tags?.some((t) => NOT_MARKUP_TAGS.includes(t))), declarations, referenceOptions(macros, false, list3));
22721
22502
  }
22722
- var __defProp2, __exportAll, HTML_TEXT_ELEMENTS$1, SIGIL_SCOPES, SIGIL_CHARS, grammar_shared_default, LB, RB, SIGIL_SCOPES$1, withSelectors, HTML_TEXT_ELEMENTS, VOID_TAGS, BRANCH_PARENT$1, LINK_SEPARATORS, NO_SELECTORS, EMAIL_AUTOLINK, peg$SyntaxError, NameMap, NameSet, OPTION_CLAUSE, PARAMETER_TYPES, STRING_HOLDS, metadataRegistry, companionParents, BLOCK_MACROS, BLOCK_WIDGETS, WIDGETS, DEFINED_BLOCK_MACROS, DEFINED_MACROS, REGISTERED_BLOCK_MACROS, RAW_BODY_MACROS, BRANCHING, quoteArg, MAX_MARKUP_DEPTH, last$1, BRANCH_PARENT, lowerName, nameOf, closerOf, closes, astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars, nonASCIIidentifierStartChars, reservedWords, ecma5AndLessKeywords, keywords$1, keywordRelationalOperator, nonASCIIidentifierStart, nonASCIIidentifier, TokenType, beforeExpr, startsExpr, keywords, types$1, lineBreak, lineBreakG, nonASCIIwhitespace, skipWhiteSpace, ref, hasOwnProperty$1, toString, hasOwn$1, isArray, regexpCache, loneSurrogate, Position, SourceLocation, defaultOptions, warnedAboutEcmaVersion, SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, SCOPE_SUPER, SCOPE_DIRECT_SUPER, SCOPE_CLASS_STATIC_BLOCK, SCOPE_CLASS_FIELD_INIT, SCOPE_SWITCH, SCOPE_VAR, BIND_NONE, BIND_VAR, BIND_LEXICAL, BIND_FUNCTION, BIND_SIMPLE_CATCH, BIND_OUTSIDE, Parser, prototypeAccessors, pp$9, literal, DestructuringErrors, pp$8, loopLabel, switchLabel, empty$1, FUNC_STATEMENT, FUNC_HANGING_STATEMENT, FUNC_NULLABLE_ID, pp$7, TokContext, types, pp$6, pp$5, empty, pp$4, pp$3, Scope, Node, pp$2, scriptValuesAddedInUnicode, ecma9BinaryProperties, ecma10BinaryProperties, ecma11BinaryProperties, ecma12BinaryProperties, ecma13BinaryProperties, unicodeBinaryProperties, unicodeBinaryPropertiesOfStrings, unicodeGeneralCategoryValues, ecma9ScriptValues, ecma10ScriptValues, ecma11ScriptValues, ecma12ScriptValues, ecma13ScriptValues, unicodeScriptValues, data, ecmaVersion, i, list$2, pp$1, BranchID, RegExpValidationState, CharSetNone, CharSetOk, CharSetString, Token, pp, INVALID_TEMPLATE_ESCAPE_ERROR, OPTIONS, AT_NAME_RE, TRANS_NAME_RE, SIGIL_IDENT_RE, LINE_BREAK_RE, NOT_A_BODY_RE, OPERAND_ENDS, SigilParser, OPENERS, CLOSERS$1, CodeSyntaxError, last, CLOSER, isNode, NAMESPACE_NAME, WORD_RE$2, FLAGS_RE, WORDS_BEFORE_STRING, NON_STRING_QUOTE_PREFIX, memoInput, memo, defaultCodeEnd, defaultHooks, MarkupError, OFFSET_FIELD, listeners, RESERVED_NAME, isArrayIndex, hasOwn, createNamespace, TRAILING_OPERATOR_RE, slice, MacroArgumentError, WORD_RE$1, NUMBER_RE$1, WORD_OR_PUNCT_RE, LEADING_OPERATOR_RE, takesRest, SUB_MACRO_PARAMETERS, _MarkupExpansionBudget, MarkupExpansionBudget, parses, CONDITION_MACROS, PASSAGE_BODIES, holdsByDefault, JS_ESCAPE_RE, textPiece, LITERAL, registeredParameters, WIDGET_PARAMETERS, SPECIAL_PASSAGES, NOT_MARKUP, NOT_MARKUP_TAGS$1, BRANCH_MACROS, didYouMean, PASSAGE_ARGUMENT_HINT, BARE_WORD_RE, NUMBER_RE, IDENT_RE, KEY_RE, ARROW_RE, LINE_END_RE, ARRAY_INDEX_RE, UNSUPPORTED_UNDEFINED, Reader, VALID_VAR_TYPES, PRIMITIVE_SAMPLES, UNSUPPORTED_TYPE, NO_STORE_VAR_MACROS, CLOSERS, BLOCK_WORDS, NOT_PARAMETERS, DECLARATIONS, WRITE_RE, MUTATORS, MUTATING_CALL_RE, BEFORE_BINDING, isWordChar, Bindings, CALL_RE, IDENTIFIER_ARGUMENT_RE, WORD_RE, MODIFIER_RE, KEY_START_RE, CONFIG_KEYS, ConfigReader, stringOf, booleanOf, textOf, stringsOf, VOID_ELEMENTS, characterEntities, own, hasOwnProperty, asciiAlpha, asciiAlphanumeric, asciiAtext, asciiDigit, asciiHexDigit, asciiPunctuation, unicodePunctuation, unicodeWhitespace, content$1, EditMap$1, document$1, containerConstruct, attention, autolink, blankLine, blockQuote, characterEscape, characterReference, nonLazyContinuation, codeFenced, codeIndented, furtherStart, codeText, SpliceBuffer, content, continuationConstruct, definition, titleBefore, hardBreakEscape, headingAtx, htmlBlockNames, htmlRawNames, htmlFlow, blankLineBefore, htmlText, labelEnd, resourceConstruct, referenceFullConstruct, referenceCollapsedConstruct, labelStartImage, labelStartLink, lineEnding, thematicBreak, list, listItemPrefixWhitespaceConstruct, indentConstruct, setextUnderline, flow$1, resolver, string$1, text$1, constructs_exports, document, contentInitial, flowInitial, flow, string, text, insideSpan, attentionMarkers, disable, search, alignment, EditMap, joinData, textData, ATEXT, ALPHANUMERIC, ALPHA, DEFAULT_PRETTIER_OPTIONS, SVG_PLACEHOLDERS, SPINDLE_PLACEHOLDERS, PLACEHOLDER_PATTERN, DEFAULT_DEDENTING, WHITESPACE_AS_WRITTEN, HTML_MARKDOWN_BOUNDARIES, LIST_ITEM_REGEX, CODE_FENCE_REGEX, NO_WRAP, NOT_MARKUP_TAGS;
22503
+ var __defProp2, __exportAll, HTML_TEXT_ELEMENTS$1, SIGIL_SCOPES, SIGIL_CHARS, grammar_shared_default, LB, RB, SIGIL_SCOPES$1, withSelectors, HTML_TEXT_ELEMENTS, VOID_TAGS, BRANCH_PARENT$1, LINK_SEPARATORS, NO_SELECTORS, EMAIL_AUTOLINK, peg$SyntaxError, NameMap, NameSet, OPTION_CLAUSE, PARAMETER_TYPES, STRING_HOLDS, metadataRegistry, companionParents, BLOCK_MACROS, BLOCK_WIDGETS, WIDGETS, DEFINED_BLOCK_MACROS, DEFINED_MACROS, REGISTERED_BLOCK_MACROS, RAW_BODY_MACROS, BRANCHING, quoteArg, MAX_MARKUP_DEPTH, last$1, BRANCH_PARENT, lowerName, nameOf, closerOf, closes, astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars, nonASCIIidentifierStartChars, reservedWords, ecma5AndLessKeywords, keywords$1, keywordRelationalOperator, nonASCIIidentifierStart, nonASCIIidentifier, TokenType, beforeExpr, startsExpr, keywords, types$1, lineBreak, lineBreakG, nonASCIIwhitespace, skipWhiteSpace, ref, hasOwnProperty$1, toString, hasOwn$1, isArray, regexpCache, loneSurrogate, Position, SourceLocation, defaultOptions, warnedAboutEcmaVersion, SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, SCOPE_SUPER, SCOPE_DIRECT_SUPER, SCOPE_CLASS_STATIC_BLOCK, SCOPE_CLASS_FIELD_INIT, SCOPE_SWITCH, SCOPE_VAR, BIND_NONE, BIND_VAR, BIND_LEXICAL, BIND_FUNCTION, BIND_SIMPLE_CATCH, BIND_OUTSIDE, Parser, prototypeAccessors, pp$9, literal, DestructuringErrors, pp$8, loopLabel, switchLabel, empty$1, FUNC_STATEMENT, FUNC_HANGING_STATEMENT, FUNC_NULLABLE_ID, pp$7, TokContext, types, pp$6, pp$5, empty, pp$4, pp$3, Scope, Node, pp$2, scriptValuesAddedInUnicode, ecma9BinaryProperties, ecma10BinaryProperties, ecma11BinaryProperties, ecma12BinaryProperties, ecma13BinaryProperties, unicodeBinaryProperties, unicodeBinaryPropertiesOfStrings, unicodeGeneralCategoryValues, ecma9ScriptValues, ecma10ScriptValues, ecma11ScriptValues, ecma12ScriptValues, ecma13ScriptValues, unicodeScriptValues, data, ecmaVersion, i, list$2, pp$1, BranchID, RegExpValidationState, CharSetNone, CharSetOk, CharSetString, Token, pp, INVALID_TEMPLATE_ESCAPE_ERROR, OPTIONS, AT_NAME_RE, TRANS_NAME_RE, SIGIL_IDENT_RE, LINE_BREAK_RE, NOT_A_BODY_RE, OPERAND_ENDS, SigilParser, OPENERS, CLOSERS$1, CodeSyntaxError, last, CLOSER, isNode, NAMESPACE_NAME, WORD_RE$2, FLAGS_RE, WORDS_BEFORE_STRING, NON_STRING_QUOTE_PREFIX, memoInput, memo, defaultCodeEnd, defaultHooks, MarkupError, OFFSET_FIELD, listeners, RESERVED_NAME, isArrayIndex, hasOwn, createNamespace, TRAILING_OPERATOR_RE, slice, MacroArgumentError, WORD_RE$1, NUMBER_RE$1, WORD_OR_PUNCT_RE, LEADING_OPERATOR_RE, takesRest, SUB_MACRO_PARAMETERS, _MarkupExpansionBudget, MarkupExpansionBudget, parses, CONDITION_MACROS, PASSAGE_BODIES, holdsByDefault, JS_ESCAPE_RE, textPiece, LITERAL, registeredParameters, WIDGET_PARAMETERS, SPECIAL_PASSAGES, NOT_MARKUP, NOT_MARKUP_TAGS$1, BRANCH_MACROS, didYouMean, PASSAGE_ARGUMENT_HINT, BARE_WORD_RE, NUMBER_RE, IDENT_RE, KEY_RE, ARROW_RE, LINE_END_RE, ARRAY_INDEX_RE, UNSUPPORTED_UNDEFINED, Reader, VALID_VAR_TYPES, PRIMITIVE_SAMPLES, UNSUPPORTED_TYPE, NO_STORE_VAR_MACROS, CLOSERS, BLOCK_WORDS, NOT_PARAMETERS, DECLARATIONS, WRITE_RE, MUTATORS, MUTATING_CALL_RE, BEFORE_BINDING, isWordChar, Bindings, CALL_RE, IDENTIFIER_ARGUMENT_RE, WORD_RE, MODIFIER_RE, KEY_START_RE, CONFIG_KEYS, ConfigReader, stringOf, booleanOf, textOf, stringsOf, characterEntities, own, hasOwnProperty, asciiAlpha, asciiAlphanumeric, asciiAtext, asciiDigit, asciiHexDigit, asciiPunctuation, unicodePunctuation, unicodeWhitespace, content$1, EditMap$1, document$1, containerConstruct, attention, autolink, blankLine, blockQuote, characterEscape, characterReference, nonLazyContinuation, codeFenced, codeIndented, furtherStart, codeText, SpliceBuffer, content, continuationConstruct, definition, titleBefore, hardBreakEscape, headingAtx, htmlBlockNames, htmlRawNames, htmlFlow, blankLineBefore, htmlText, labelEnd, resourceConstruct, referenceFullConstruct, referenceCollapsedConstruct, labelStartImage, labelStartLink, lineEnding, thematicBreak, list, listItemPrefixWhitespaceConstruct, indentConstruct, setextUnderline, flow$1, resolver, string$1, text$1, constructs_exports, document, contentInitial, flowInitial, flow, string, text, insideSpan, attentionMarkers, disable, search, alignment, EditMap, joinData, textData, ATEXT, ALPHANUMERIC, ALPHA, DEFAULT_PRETTIER_OPTIONS, SVG_PLACEHOLDERS, SPINDLE_PLACEHOLDERS, PLACEHOLDER_PATTERN, DEFAULT_DEDENTING, WHITESPACE_AS_WRITTEN, JAVASCRIPT_TYPE, HTML_MARKDOWN_BOUNDARIES, LIST_ITEM_REGEX, CODE_FENCE_REGEX, NO_WRAP, NOT_MARKUP_TAGS;
22723
22504
  var init_story_variables = __esm({
22724
22505
  "node_modules/@rohal12/spindle/dist/pkg/story-variables.js"() {
22725
22506
  __defProp2 = Object.defineProperty;
@@ -22826,11 +22607,14 @@ var init_story_variables = __esm({
22826
22607
  if (nonPrintable) return s.replace(nonPrintable, (ch) => "\\u{" + hex3(ch) + "}");
22827
22608
  return s;
22828
22609
  }
22610
+ function escape3(s, special) {
22611
+ return unicodeEscape(s.replace(special, "\\$&").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, (ch) => "\\x0" + hex3(ch)).replace(/[\x10-\x1F\x7F-\x9F]/g, (ch) => "\\x" + hex3(ch)));
22612
+ }
22829
22613
  function literalEscape(s) {
22830
- return unicodeEscape(s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, (ch) => "\\x0" + hex3(ch)).replace(/[\x10-\x1F\x7F-\x9F]/g, (ch) => "\\x" + hex3(ch)));
22614
+ return escape3(s, /[\\"]/g);
22831
22615
  }
22832
22616
  function classEscape(s) {
22833
- return unicodeEscape(s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, (ch) => "\\x0" + hex3(ch)).replace(/[\x10-\x1F\x7F-\x9F]/g, (ch) => "\\x" + hex3(ch)));
22617
+ return escape3(s, /[\\\]^-]/g);
22834
22618
  }
22835
22619
  const DESCRIBE_EXPECTATION_FNS = {
22836
22620
  literal(expectation) {
@@ -22945,6 +22729,7 @@ var init_story_variables = __esm({
22945
22729
  "do",
22946
22730
  "button",
22947
22731
  "link",
22732
+ "dialog",
22948
22733
  "listbox",
22949
22734
  "cycle",
22950
22735
  "switch",
@@ -28771,7 +28556,7 @@ var init_story_variables = __esm({
28771
28556
  innermostVisible(bindings, at3) {
28772
28557
  const useFunction = this.functionStart(at3);
28773
28558
  const visible = bindings.filter((b) => b.scope.start <= at3 && at3 < b.scope.end && (!b.ordered || b.at < at3 || this.functionStart(b.at) !== useFunction));
28774
- const innermost = Math.max(...visible.map((b) => b.scope.start));
28559
+ const innermost = visible.reduce((start, b) => Math.max(start, b.scope.start), -Infinity);
28775
28560
  return visible.filter((b) => b.scope.start === innermost);
28776
28561
  }
28777
28562
  readGroups() {
@@ -29318,22 +29103,6 @@ var init_story_variables = __esm({
29318
29103
  booleanOf = (d) => d?.type === "boolean" ? d.value : void 0;
29319
29104
  textOf = (d) => stringOf(d)?.value;
29320
29105
  stringsOf = (d) => d?.type === "array" ? d.items.flatMap((item) => stringOf(item)?.value ?? []) : [];
29321
- VOID_ELEMENTS = /* @__PURE__ */ new Set([
29322
- "area",
29323
- "base",
29324
- "br",
29325
- "col",
29326
- "embed",
29327
- "hr",
29328
- "img",
29329
- "input",
29330
- "link",
29331
- "meta",
29332
- "param",
29333
- "source",
29334
- "track",
29335
- "wbr"
29336
- ]);
29337
29106
  characterEntities = {
29338
29107
  AElig: "\xC6",
29339
29108
  AMP: "&",
@@ -32105,6 +31874,7 @@ var init_story_variables = __esm({
32105
31874
  "default"
32106
31875
  ]);
32107
31876
  WHITESPACE_AS_WRITTEN = /<(?:pre|textarea|svg)[\s>]|white-space\s*:/i;
31877
+ JAVASCRIPT_TYPE = /^(?:module|(?:text|application)\/(?:x-)?(?:java|ecma)script|text\/(?:javascript1\.[0-5]|jscript|livescript))$/i;
32108
31878
  HTML_MARKDOWN_BOUNDARIES = /* @__PURE__ */ new Set([
32109
31879
  "hardBreakTrailing",
32110
31880
  "hardBreakEscape",
@@ -80481,10 +80251,11 @@ var require_connection = __commonJS({
80481
80251
  } finally {
80482
80252
  if (result2 instanceof Promise) {
80483
80253
  result2.then(() => {
80484
- inFlight--;
80485
- triggerMessageQueue();
80486
80254
  }).catch((error62) => {
80487
80255
  logger.error(`Processing message queue failed: ${error62.toString()}`);
80256
+ }).finally(() => {
80257
+ inFlight--;
80258
+ triggerMessageQueue();
80488
80259
  });
80489
80260
  } else {
80490
80261
  inFlight--;
@@ -81689,7 +81460,7 @@ var init_main = __esm({
81689
81460
  ColorPresentation2.create = create;
81690
81461
  function is2(value) {
81691
81462
  const candidate = value;
81692
- return Is2.objectLiteral(candidate) && Is2.string(candidate.label) && (Is2.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is2.undefined(candidate.additionalTextEdits) || Is2.typedArray(candidate.additionalTextEdits, TextEdit.is));
81463
+ return Is2.objectLiteral(candidate) && Is2.string(candidate.label) && (Is2.undefined(candidate.textEdit) || TextEdit.is(candidate.textEdit)) && (Is2.undefined(candidate.additionalTextEdits) || Is2.typedArray(candidate.additionalTextEdits, TextEdit.is));
81693
81464
  }
81694
81465
  ColorPresentation2.is = is2;
81695
81466
  })(ColorPresentation || (ColorPresentation = {}));
@@ -81721,7 +81492,7 @@ var init_main = __esm({
81721
81492
  FoldingRange2.create = create;
81722
81493
  function is2(value) {
81723
81494
  const candidate = value;
81724
- return Is2.objectLiteral(candidate) && Is2.uinteger(candidate.startLine) && Is2.uinteger(candidate.startLine) && (Is2.undefined(candidate.startCharacter) || Is2.uinteger(candidate.startCharacter)) && (Is2.undefined(candidate.endCharacter) || Is2.uinteger(candidate.endCharacter)) && (Is2.undefined(candidate.kind) || Is2.string(candidate.kind));
81495
+ return Is2.objectLiteral(candidate) && Is2.uinteger(candidate.startLine) && Is2.uinteger(candidate.endLine) && (Is2.undefined(candidate.startCharacter) || Is2.uinteger(candidate.startCharacter)) && (Is2.undefined(candidate.endCharacter) || Is2.uinteger(candidate.endCharacter)) && (Is2.undefined(candidate.kind) || Is2.string(candidate.kind));
81725
81496
  }
81726
81497
  FoldingRange2.is = is2;
81727
81498
  })(FoldingRange || (FoldingRange = {}));
@@ -84780,98 +84551,6 @@ var require_api2 = __commonJS({
84780
84551
  }
84781
84552
  });
84782
84553
 
84783
- // node_modules/vscode-languageserver/lib/common/utils/uuid.js
84784
- var require_uuid = __commonJS({
84785
- "node_modules/vscode-languageserver/lib/common/utils/uuid.js"(exports) {
84786
- "use strict";
84787
- Object.defineProperty(exports, "__esModule", { value: true });
84788
- exports.empty = void 0;
84789
- exports.v4 = v4;
84790
- exports.isUUID = isUUID;
84791
- exports.parse = parse6;
84792
- exports.generateUuid = generateUuid;
84793
- var ValueUUID = class {
84794
- _value;
84795
- constructor(_value) {
84796
- this._value = _value;
84797
- }
84798
- asHex() {
84799
- return this._value;
84800
- }
84801
- equals(other) {
84802
- return this.asHex() === other.asHex();
84803
- }
84804
- };
84805
- var V4UUID = class _V4UUID extends ValueUUID {
84806
- static _chars = ["0", "1", "2", "3", "4", "5", "6", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
84807
- static _timeHighBits = ["8", "9", "a", "b"];
84808
- static _oneOf(array2) {
84809
- return array2[Math.floor(array2.length * Math.random())];
84810
- }
84811
- static _randomHex() {
84812
- return _V4UUID._oneOf(_V4UUID._chars);
84813
- }
84814
- constructor() {
84815
- super([
84816
- _V4UUID._randomHex(),
84817
- _V4UUID._randomHex(),
84818
- _V4UUID._randomHex(),
84819
- _V4UUID._randomHex(),
84820
- _V4UUID._randomHex(),
84821
- _V4UUID._randomHex(),
84822
- _V4UUID._randomHex(),
84823
- _V4UUID._randomHex(),
84824
- "-",
84825
- _V4UUID._randomHex(),
84826
- _V4UUID._randomHex(),
84827
- _V4UUID._randomHex(),
84828
- _V4UUID._randomHex(),
84829
- "-",
84830
- "4",
84831
- _V4UUID._randomHex(),
84832
- _V4UUID._randomHex(),
84833
- _V4UUID._randomHex(),
84834
- "-",
84835
- _V4UUID._oneOf(_V4UUID._timeHighBits),
84836
- _V4UUID._randomHex(),
84837
- _V4UUID._randomHex(),
84838
- _V4UUID._randomHex(),
84839
- "-",
84840
- _V4UUID._randomHex(),
84841
- _V4UUID._randomHex(),
84842
- _V4UUID._randomHex(),
84843
- _V4UUID._randomHex(),
84844
- _V4UUID._randomHex(),
84845
- _V4UUID._randomHex(),
84846
- _V4UUID._randomHex(),
84847
- _V4UUID._randomHex(),
84848
- _V4UUID._randomHex(),
84849
- _V4UUID._randomHex(),
84850
- _V4UUID._randomHex(),
84851
- _V4UUID._randomHex()
84852
- ].join(""));
84853
- }
84854
- };
84855
- exports.empty = new ValueUUID("00000000-0000-0000-0000-000000000000");
84856
- function v4() {
84857
- return new V4UUID();
84858
- }
84859
- var _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
84860
- function isUUID(value) {
84861
- return _UUIDPattern.test(value);
84862
- }
84863
- function parse6(value) {
84864
- if (!isUUID(value)) {
84865
- throw new Error("invalid uuid");
84866
- }
84867
- return new ValueUUID(value);
84868
- }
84869
- function generateUuid() {
84870
- return v4().asHex();
84871
- }
84872
- }
84873
- });
84874
-
84875
84554
  // node_modules/vscode-languageserver/lib/common/progress.js
84876
84555
  var require_progress = __commonJS({
84877
84556
  "node_modules/vscode-languageserver/lib/common/progress.js"(exports) {
@@ -84881,7 +84560,6 @@ var require_progress = __commonJS({
84881
84560
  exports.attachWorkDone = attachWorkDone;
84882
84561
  exports.attachPartialResult = attachPartialResult;
84883
84562
  var vscode_languageserver_protocol_1 = require_api2();
84884
- var uuid_1 = require_uuid();
84885
84563
  var WorkDoneProgressReporter;
84886
84564
  (function(WorkDoneProgressReporter2) {
84887
84565
  function isNullInstance(reporter) {
@@ -85008,7 +84686,7 @@ var require_progress = __commonJS({
85008
84686
  }
85009
84687
  createWorkDoneProgress() {
85010
84688
  if (this._progressSupported) {
85011
- const token = (0, uuid_1.generateUuid)();
84689
+ const token = (0, vscode_languageserver_protocol_1.RAL)().crypto.randomUUID();
85012
84690
  return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {
85013
84691
  const result2 = new WorkDoneProgressServerReporterImpl(this.connection, token);
85014
84692
  return result2;
@@ -86067,6 +85745,11 @@ var require_notebook = __commonJS({
86067
85745
  }
86068
85746
  }
86069
85747
  }
85748
+ const removed = [];
85749
+ for (const close of closed) {
85750
+ removed.push(this.getNotebookCell(close));
85751
+ this.notebookCellMap.delete(close);
85752
+ }
86070
85753
  this.updateCellMap(notebookDocument);
86071
85754
  const changeEvent = { notebookDocument };
86072
85755
  if (metadataChanged) {
@@ -86076,10 +85759,6 @@ var require_notebook = __commonJS({
86076
85759
  for (const open2 of opened) {
86077
85760
  added.push(this.getNotebookCell(open2));
86078
85761
  }
86079
- const removed = [];
86080
- for (const close of closed) {
86081
- removed.push(this.getNotebookCell(close));
86082
- }
86083
85762
  const textContent = [];
86084
85763
  for (const change2 of text3) {
86085
85764
  textContent.push(this.getNotebookCell(change2));
@@ -86257,7 +85936,6 @@ var require_server = __commonJS({
86257
85936
  exports.createConnection = createConnection2;
86258
85937
  var vscode_languageserver_protocol_1 = require_api2();
86259
85938
  var Is3 = __importStar(require_is());
86260
- var UUID = __importStar(require_uuid());
86261
85939
  var progress_1 = require_progress();
86262
85940
  var configuration_1 = require_configuration();
86263
85941
  var workspaceFolder_1 = require_workspaceFolder();
@@ -86401,7 +86079,7 @@ var require_server = __commonJS({
86401
86079
  if (this._registered.has(method)) {
86402
86080
  throw new Error(`${method} is already added to this registration`);
86403
86081
  }
86404
- const id = UUID.generateUuid();
86082
+ const id = (0, vscode_languageserver_protocol_1.RAL)().crypto.randomUUID();
86405
86083
  this._registrations.push({
86406
86084
  id,
86407
86085
  method,
@@ -86495,7 +86173,7 @@ var require_server = __commonJS({
86495
86173
  }
86496
86174
  registerSingle1(unregistration, type, registerOptions) {
86497
86175
  const method = Is3.string(type) ? type : type.method;
86498
- const id = UUID.generateUuid();
86176
+ const id = (0, vscode_languageserver_protocol_1.RAL)().crypto.randomUUID();
86499
86177
  const params = {
86500
86178
  registrations: [{ id, method, registerOptions: registerOptions || {} }]
86501
86179
  };
@@ -86512,7 +86190,7 @@ var require_server = __commonJS({
86512
86190
  }
86513
86191
  registerSingle2(type, registerOptions) {
86514
86192
  const method = Is3.string(type) ? type : type.method;
86515
- const id = UUID.generateUuid();
86193
+ const id = (0, vscode_languageserver_protocol_1.RAL)().crypto.randomUUID();
86516
86194
  const params = {
86517
86195
  registrations: [{ id, method, registerOptions: registerOptions || {} }]
86518
86196
  };
@@ -87142,7 +86820,6 @@ var require_files = __commonJS({
87142
86820
  });
87143
86821
  }
87144
86822
  function resolveGlobalNodePath(tracer) {
87145
- let npmCommand = "npm";
87146
86823
  const env = /* @__PURE__ */ Object.create(null);
87147
86824
  Object.keys(process.env).forEach((key) => env[key] = process.env[key]);
87148
86825
  env["NO_UPDATE_NOTIFIER"] = "true";
@@ -87151,14 +86828,13 @@ var require_files = __commonJS({
87151
86828
  env
87152
86829
  };
87153
86830
  if (isWindows()) {
87154
- npmCommand = "npm.cmd";
87155
86831
  options.shell = true;
87156
86832
  }
87157
86833
  const handler = () => {
87158
86834
  };
87159
86835
  try {
87160
86836
  process.on("SIGPIPE", handler);
87161
- const stdout = (0, child_process_1.spawnSync)(npmCommand, ["config", "get", "prefix"], options).stdout;
86837
+ const stdout = (isWindows() ? (0, child_process_1.spawnSync)("npm.cmd config get prefix", options) : (0, child_process_1.spawnSync)("npm", ["config", "get", "prefix"], options)).stdout;
87162
86838
  if (!stdout) {
87163
86839
  if (tracer) {
87164
86840
  tracer(`'npm config get prefix' didn't return a value.`);
@@ -87184,19 +86860,17 @@ var require_files = __commonJS({
87184
86860
  }
87185
86861
  }
87186
86862
  function resolveGlobalYarnPath(tracer) {
87187
- let yarnCommand = "yarn";
87188
86863
  const options = {
87189
86864
  encoding: "utf8"
87190
86865
  };
87191
86866
  if (isWindows()) {
87192
- yarnCommand = "yarn.cmd";
87193
86867
  options.shell = true;
87194
86868
  }
87195
86869
  const handler = () => {
87196
86870
  };
87197
86871
  try {
87198
86872
  process.on("SIGPIPE", handler);
87199
- const results = (0, child_process_1.spawnSync)(yarnCommand, ["global", "dir", "--json"], options);
86873
+ const results = isWindows() ? (0, child_process_1.spawnSync)("yarn.cmd global dir --json", options) : (0, child_process_1.spawnSync)("yarn", ["global", "dir", "--json"], options);
87200
86874
  const stdout = results.stdout;
87201
86875
  if (!stdout) {
87202
86876
  if (tracer) {
@@ -87275,6 +86949,7 @@ var require_ril = __commonJS({
87275
86949
  "use strict";
87276
86950
  Object.defineProperty(exports, "__esModule", { value: true });
87277
86951
  var util_1 = __require("util");
86952
+ var crypto_1 = __require("crypto");
87278
86953
  var api_1 = require_api();
87279
86954
  var MessageBuffer = class _MessageBuffer extends api_1.AbstractMessageBuffer {
87280
86955
  static emptyBuffer = Buffer.allocUnsafe(0);
@@ -87298,7 +86973,7 @@ var require_ril = __commonJS({
87298
86973
  if (length === void 0) {
87299
86974
  return buffer instanceof Buffer ? buffer : Buffer.from(buffer);
87300
86975
  } else {
87301
- return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length);
86976
+ return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer.subarray(0, length));
87302
86977
  }
87303
86978
  }
87304
86979
  allocNative(length) {
@@ -87365,6 +87040,9 @@ var require_ril = __commonJS({
87365
87040
  }
87366
87041
  };
87367
87042
  var _ril = Object.freeze({
87043
+ crypto: Object.freeze({
87044
+ randomUUID: () => (0, crypto_1.randomUUID)()
87045
+ }),
87368
87046
  messageBuffer: Object.freeze({
87369
87047
  create: (encoding) => new MessageBuffer(encoding)
87370
87048
  }),
@@ -87515,7 +87193,7 @@ var require_main = __commonJS({
87515
87193
  this.errorCount = 0;
87516
87194
  const eventEmitter = this.process;
87517
87195
  eventEmitter.on("error", (error62) => this.fireError(error62));
87518
- eventEmitter.on("close", () => this.fireClose);
87196
+ eventEmitter.on("close", () => this.fireClose());
87519
87197
  }
87520
87198
  write(msg) {
87521
87199
  try {
@@ -87548,7 +87226,7 @@ var require_main = __commonJS({
87548
87226
  constructor(port) {
87549
87227
  super();
87550
87228
  this.onData = new api_1.Emitter();
87551
- port.on("close", () => this.fireClose);
87229
+ port.on("close", () => this.fireClose());
87552
87230
  port.on("error", (error62) => this.fireError(error62));
87553
87231
  port.on("message", (message) => {
87554
87232
  this.onData.fire(message);
@@ -87657,6 +87335,9 @@ var require_main = __commonJS({
87657
87335
  resolve8({
87658
87336
  onConnected: () => {
87659
87337
  return connected;
87338
+ },
87339
+ close: () => {
87340
+ server.close();
87660
87341
  }
87661
87342
  });
87662
87343
  });
@@ -87695,6 +87376,9 @@ var require_main = __commonJS({
87695
87376
  port: () => boundPort,
87696
87377
  onConnected: () => {
87697
87378
  return connected;
87379
+ },
87380
+ close: () => {
87381
+ server.close();
87698
87382
  }
87699
87383
  });
87700
87384
  });