storybook 10.1.0-alpha.12 → 10.1.0-alpha.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.
Files changed (99) hide show
  1. package/dist/_browser-chunks/{chunk-74YHFU5B.js → chunk-2XZMBGTA.js} +1 -1
  2. package/dist/_browser-chunks/{chunk-EBHB6RPS.js → chunk-FQ7SLVLR.js} +6 -1
  3. package/dist/_browser-chunks/{chunk-X3DUQ5RA.js → chunk-GFY5R5EY.js} +1 -1
  4. package/dist/_browser-chunks/{chunk-WXP2XJ3O.js → chunk-P4F4UVXX.js} +1 -0
  5. package/dist/_browser-chunks/{chunk-BE2DAXKJ.js → chunk-SS2NHR7W.js} +4 -1
  6. package/dist/_browser-chunks/{syntaxhighlighter-WKBQ5RC7.js → syntaxhighlighter-IQDEPFLK.js} +1 -1
  7. package/dist/_node-chunks/{builder-manager-YUOHSIUB.js → builder-manager-FQ5J6V3U.js} +32 -22
  8. package/dist/_node-chunks/{chunk-B6JWY6PC.js → camelcase-VGUYV77Z.js} +8 -8
  9. package/dist/_node-chunks/{chunk-FZLRAH4N.js → chunk-2JR3QBT2.js} +7 -7
  10. package/dist/_node-chunks/chunk-3EBH66BB.js +23 -0
  11. package/dist/_node-chunks/{chunk-E5FJS66Z.js → chunk-4ZFHN3ZY.js} +6 -6
  12. package/dist/_node-chunks/{chunk-5HV3B5OP.js → chunk-63PL4NNE.js} +1104 -13
  13. package/dist/_node-chunks/{chunk-NAOYEL54.js → chunk-A4KENTXT.js} +7 -7
  14. package/dist/_node-chunks/{chunk-4FT2DHGE.js → chunk-ALIA3J6S.js} +44 -10
  15. package/dist/_node-chunks/{chunk-WFLWJO24.js → chunk-C2HKH2XQ.js} +5710 -2414
  16. package/dist/_node-chunks/{chunk-WA6KZQZ2.js → chunk-DQNBAQYT.js} +6 -6
  17. package/dist/_node-chunks/{chunk-JARUEMEP.js → chunk-F74UHHR6.js} +7 -7
  18. package/dist/_node-chunks/{chunk-WUXQMQCB.js → chunk-H5XWXVWR.js} +6 -6
  19. package/dist/_node-chunks/{chunk-OP3INKUD.js → chunk-JMP7YFX2.js} +6 -6
  20. package/dist/_node-chunks/{chunk-DWXTZT3D.js → chunk-JZR4DHG2.js} +19 -7
  21. package/dist/_node-chunks/{chunk-QCO2ZM7F.js → chunk-KEA7CVMZ.js} +122 -32
  22. package/dist/_node-chunks/{chunk-DUXPWBOK.js → chunk-KF3WTAEP.js} +7 -7
  23. package/dist/_node-chunks/{chunk-2D2IODUU.js → chunk-LPPM7L5D.js} +51 -71
  24. package/dist/_node-chunks/{chunk-2DMESZFJ.js → chunk-MJUDR7HQ.js} +7 -7
  25. package/dist/_node-chunks/chunk-NPB4THZQ.js +18 -0
  26. package/dist/_node-chunks/chunk-NZBK3DSJ.js +29 -0
  27. package/dist/_node-chunks/{chunk-5KLIDWFN.js → chunk-Q2QUNQK6.js} +7 -7
  28. package/dist/_node-chunks/{chunk-EZWWR7AR.js → chunk-TMCKISJR.js} +101 -118
  29. package/dist/_node-chunks/chunk-TWK7AR3U.js +6024 -0
  30. package/dist/_node-chunks/{chunk-CZ5GHJCC.js → chunk-V7CXWJXC.js} +7 -7
  31. package/dist/_node-chunks/chunk-W4F3T6CY.js +3781 -0
  32. package/dist/_node-chunks/{chunk-SEMIAAWG.js → chunk-WACDSFMO.js} +9 -9
  33. package/dist/_node-chunks/{chunk-A4APXFQ2.js → chunk-WVXZFQQU.js} +14 -8
  34. package/dist/_node-chunks/chunk-XBPE4PT7.js +78 -0
  35. package/dist/_node-chunks/chunk-YMM6BYF2.js +61 -0
  36. package/dist/_node-chunks/{chunk-XXPJ7XR3.js → chunk-ZGZKNZ5S.js} +6 -6
  37. package/dist/_node-chunks/{dist-DS2B5A3J.js → dist-DR3AP3RJ.js} +9 -9
  38. package/dist/_node-chunks/{globby-6THB7HVX.js → globby-D4FPSHY2.js} +9 -9
  39. package/dist/_node-chunks/{lib-5NKX4YGG.js → lib-ZEFOVNTK.js} +7 -7
  40. package/dist/_node-chunks/{mdx-N42X6CFJ-ZLT3QOFF.js → mdx-N42X6CFJ-PJF3ICCG.js} +8 -8
  41. package/dist/_node-chunks/{p-limit-PDMWNG7W.js → p-limit-CYQOFYPV.js} +7 -7
  42. package/dist/babel/index.js +10 -11
  43. package/dist/bin/core.js +33 -26
  44. package/dist/bin/dispatcher.js +31 -20
  45. package/dist/bin/loader.js +10 -13
  46. package/dist/cli/index.d.ts +1479 -133
  47. package/dist/cli/index.js +30 -5159
  48. package/dist/common/index.d.ts +139 -62
  49. package/dist/common/index.js +66 -51
  50. package/dist/components/index.d.ts +136 -26
  51. package/dist/components/index.js +3163 -2859
  52. package/dist/core-server/index.d.ts +3 -2
  53. package/dist/core-server/index.js +112 -1486
  54. package/dist/core-server/presets/common-manager.js +5 -5
  55. package/dist/core-server/presets/common-override-preset.js +9 -9
  56. package/dist/core-server/presets/common-preset.js +272 -81
  57. package/dist/csf/index.js +2 -2
  58. package/dist/csf-tools/index.js +9 -9
  59. package/dist/manager/globals-runtime.js +21557 -21133
  60. package/dist/manager/manager-stores.d.ts +1 -0
  61. package/dist/manager/manager-stores.js +23 -0
  62. package/dist/manager/runtime.js +6695 -720
  63. package/dist/manager-api/index.d.ts +1802 -1
  64. package/dist/manager-api/index.js +105 -11
  65. package/dist/manager-errors.d.ts +6 -0
  66. package/dist/manager-errors.js +2 -2
  67. package/dist/mocking-utils/index.d.ts +1126 -0
  68. package/dist/{_node-chunks/chunk-ZXSD6L3S.js → mocking-utils/index.js} +441 -16
  69. package/dist/node-logger/index.d.ts +192 -24
  70. package/dist/node-logger/index.js +23 -3148
  71. package/dist/preview/runtime.js +35 -3
  72. package/dist/preview-api/index.d.ts +69 -68
  73. package/dist/preview-api/index.js +2 -2
  74. package/dist/preview-errors.d.ts +6 -0
  75. package/dist/preview-errors.js +2 -2
  76. package/dist/server-errors.d.ts +31 -1
  77. package/dist/server-errors.js +17 -10
  78. package/dist/telemetry/index.d.ts +24 -3
  79. package/dist/telemetry/index.js +25 -24
  80. package/dist/types/index.d.ts +71 -8
  81. package/dist/types/index.js +25 -1
  82. package/package.json +11 -9
  83. package/dist/_node-chunks/camelcase-JREIL7NV.js +0 -18
  84. package/dist/_node-chunks/chunk-FDXFVHIL.js +0 -1114
  85. package/dist/_node-chunks/chunk-HZG65SU3.js +0 -34
  86. package/dist/_node-chunks/chunk-IXVYNBMD.js +0 -18
  87. package/dist/_node-chunks/chunk-LIH7MTP7.js +0 -3214
  88. package/dist/_node-chunks/chunk-N5GIRUP5.js +0 -1047
  89. package/dist/_node-chunks/chunk-O5DA7YLO.js +0 -3171
  90. package/dist/_node-chunks/chunk-QYQIZBS6.js +0 -26
  91. package/dist/_node-chunks/chunk-TS2UUH2J.js +0 -301
  92. package/dist/_node-chunks/chunk-Y4E6IGQF.js +0 -61
  93. package/dist/_node-chunks/chunk-ZL3AFKRX.js +0 -1029
  94. package/dist/_node-chunks/plugin-6XMWOGPO.js +0 -123
  95. package/dist/_node-chunks/plugin-LTOXVT6A.js +0 -109
  96. package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-2SFE5LQS.js +0 -46582
  97. package/dist/_node-chunks/webpack-mock-plugin-CX5J2U56.js +0 -92
  98. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +0 -32
  99. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +0 -28
@@ -1,30 +1,26 @@
1
- import CJS_COMPAT_NODE_URL_57ru1wfqqjv from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_57ru1wfqqjv from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_57ru1wfqqjv from "node:module";
1
+ import CJS_COMPAT_NODE_URL_yntchggdu3k from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_yntchggdu3k from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_yntchggdu3k from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_57ru1wfqqjv.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_57ru1wfqqjv.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_57ru1wfqqjv.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_yntchggdu3k.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_yntchggdu3k.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_yntchggdu3k.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import {
13
- require_gen_mapping_umd,
14
- require_trace_mapping_umd
15
- } from "./chunk-FDXFVHIL.js";
16
12
  import {
17
13
  require_lib,
18
14
  require_src
19
- } from "./chunk-FZLRAH4N.js";
15
+ } from "./chunk-2JR3QBT2.js";
20
16
  import {
21
17
  require_picocolors
22
- } from "./chunk-NAOYEL54.js";
18
+ } from "./chunk-A4KENTXT.js";
23
19
  import {
24
20
  __commonJS,
25
21
  __require,
26
22
  __toESM
27
- } from "./chunk-OP3INKUD.js";
23
+ } from "./chunk-JMP7YFX2.js";
28
24
 
29
25
  // ../node_modules/@babel/types/lib/utils/shallowEqual.js
30
26
  var require_shallowEqual = __commonJS({
@@ -24656,6 +24652,1101 @@ var require_scope = __commonJS({
24656
24652
  }
24657
24653
  });
24658
24654
 
24655
+ // ../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js
24656
+ var require_sourcemap_codec_umd = __commonJS({
24657
+ "../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"(exports, module) {
24658
+ (function(global2, factory) {
24659
+ if (typeof exports == "object" && typeof module < "u")
24660
+ factory(module), module.exports = def(module);
24661
+ else if (typeof define == "function" && define.amd)
24662
+ define(["module"], function(mod) {
24663
+ factory.apply(this, arguments), mod.exports = def(mod);
24664
+ });
24665
+ else {
24666
+ let mod = { exports: {} };
24667
+ factory(mod), global2 = typeof globalThis < "u" ? globalThis : global2 || self, global2.sourcemapCodec = def(mod);
24668
+ }
24669
+ function def(m) {
24670
+ return "default" in m.exports ? m.exports.default : m.exports;
24671
+ }
24672
+ })(exports, (function(module2) {
24673
+ "use strict";
24674
+ var __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __hasOwnProp = Object.prototype.hasOwnProperty, __export = (target, all) => {
24675
+ for (var name in all)
24676
+ __defProp(target, name, { get: all[name], enumerable: !0 });
24677
+ }, __copyProps = (to, from, except, desc) => {
24678
+ if (from && typeof from == "object" || typeof from == "function")
24679
+ for (let key of __getOwnPropNames(from))
24680
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
24681
+ return to;
24682
+ }, __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod), sourcemap_codec_exports = {};
24683
+ __export(sourcemap_codec_exports, {
24684
+ decode: () => decode,
24685
+ decodeGeneratedRanges: () => decodeGeneratedRanges,
24686
+ decodeOriginalScopes: () => decodeOriginalScopes,
24687
+ encode: () => encode,
24688
+ encodeGeneratedRanges: () => encodeGeneratedRanges,
24689
+ encodeOriginalScopes: () => encodeOriginalScopes
24690
+ }), module2.exports = __toCommonJS(sourcemap_codec_exports);
24691
+ var comma = 44, semicolon = 59, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);
24692
+ for (let i = 0; i < chars.length; i++) {
24693
+ let c = chars.charCodeAt(i);
24694
+ intToChar[i] = c, charToInt[c] = i;
24695
+ }
24696
+ function decodeInteger(reader, relative) {
24697
+ let value2 = 0, shift = 0, integer = 0;
24698
+ do {
24699
+ let c = reader.next();
24700
+ integer = charToInt[c], value2 |= (integer & 31) << shift, shift += 5;
24701
+ } while (integer & 32);
24702
+ let shouldNegate = value2 & 1;
24703
+ return value2 >>>= 1, shouldNegate && (value2 = -2147483648 | -value2), relative + value2;
24704
+ }
24705
+ function encodeInteger(builder, num, relative) {
24706
+ let delta = num - relative;
24707
+ delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
24708
+ do {
24709
+ let clamped = delta & 31;
24710
+ delta >>>= 5, delta > 0 && (clamped |= 32), builder.write(intToChar[clamped]);
24711
+ } while (delta > 0);
24712
+ return num;
24713
+ }
24714
+ function hasMoreVlq(reader, max) {
24715
+ return reader.pos >= max ? !1 : reader.peek() !== comma;
24716
+ }
24717
+ var bufLength = 1024 * 16, td = typeof TextDecoder < "u" ? new TextDecoder() : typeof Buffer < "u" ? {
24718
+ decode(buf) {
24719
+ return Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength).toString();
24720
+ }
24721
+ } : {
24722
+ decode(buf) {
24723
+ let out = "";
24724
+ for (let i = 0; i < buf.length; i++)
24725
+ out += String.fromCharCode(buf[i]);
24726
+ return out;
24727
+ }
24728
+ }, StringWriter = class {
24729
+ constructor() {
24730
+ this.pos = 0, this.out = "", this.buffer = new Uint8Array(bufLength);
24731
+ }
24732
+ write(v) {
24733
+ let { buffer } = this;
24734
+ buffer[this.pos++] = v, this.pos === bufLength && (this.out += td.decode(buffer), this.pos = 0);
24735
+ }
24736
+ flush() {
24737
+ let { buffer, out, pos } = this;
24738
+ return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
24739
+ }
24740
+ }, StringReader = class {
24741
+ constructor(buffer) {
24742
+ this.pos = 0, this.buffer = buffer;
24743
+ }
24744
+ next() {
24745
+ return this.buffer.charCodeAt(this.pos++);
24746
+ }
24747
+ peek() {
24748
+ return this.buffer.charCodeAt(this.pos);
24749
+ }
24750
+ indexOf(char) {
24751
+ let { buffer, pos } = this, idx = buffer.indexOf(char, pos);
24752
+ return idx === -1 ? buffer.length : idx;
24753
+ }
24754
+ }, EMPTY = [];
24755
+ function decodeOriginalScopes(input) {
24756
+ let { length } = input, reader = new StringReader(input), scopes = [], stack = [], line = 0;
24757
+ for (; reader.pos < length; reader.pos++) {
24758
+ line = decodeInteger(reader, line);
24759
+ let column = decodeInteger(reader, 0);
24760
+ if (!hasMoreVlq(reader, length)) {
24761
+ let last = stack.pop();
24762
+ last[2] = line, last[3] = column;
24763
+ continue;
24764
+ }
24765
+ let kind = decodeInteger(reader, 0), scope = decodeInteger(reader, 0) & 1 ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind], vars = EMPTY;
24766
+ if (hasMoreVlq(reader, length)) {
24767
+ vars = [];
24768
+ do {
24769
+ let varsIndex = decodeInteger(reader, 0);
24770
+ vars.push(varsIndex);
24771
+ } while (hasMoreVlq(reader, length));
24772
+ }
24773
+ scope.vars = vars, scopes.push(scope), stack.push(scope);
24774
+ }
24775
+ return scopes;
24776
+ }
24777
+ function encodeOriginalScopes(scopes) {
24778
+ let writer = new StringWriter();
24779
+ for (let i = 0; i < scopes.length; )
24780
+ i = _encodeOriginalScopes(scopes, i, writer, [0]);
24781
+ return writer.flush();
24782
+ }
24783
+ function _encodeOriginalScopes(scopes, index, writer, state) {
24784
+ let scope = scopes[index], { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;
24785
+ index > 0 && writer.write(comma), state[0] = encodeInteger(writer, startLine, state[0]), encodeInteger(writer, startColumn, 0), encodeInteger(writer, kind, 0);
24786
+ let fields = scope.length === 6 ? 1 : 0;
24787
+ encodeInteger(writer, fields, 0), scope.length === 6 && encodeInteger(writer, scope[5], 0);
24788
+ for (let v of vars)
24789
+ encodeInteger(writer, v, 0);
24790
+ for (index++; index < scopes.length; ) {
24791
+ let next = scopes[index], { 0: l, 1: c } = next;
24792
+ if (l > endLine || l === endLine && c >= endColumn)
24793
+ break;
24794
+ index = _encodeOriginalScopes(scopes, index, writer, state);
24795
+ }
24796
+ return writer.write(comma), state[0] = encodeInteger(writer, endLine, state[0]), encodeInteger(writer, endColumn, 0), index;
24797
+ }
24798
+ function decodeGeneratedRanges(input) {
24799
+ let { length } = input, reader = new StringReader(input), ranges = [], stack = [], genLine = 0, definitionSourcesIndex = 0, definitionScopeIndex = 0, callsiteSourcesIndex = 0, callsiteLine = 0, callsiteColumn = 0, bindingLine = 0, bindingColumn = 0;
24800
+ do {
24801
+ let semi = reader.indexOf(";"), genColumn = 0;
24802
+ for (; reader.pos < semi; reader.pos++) {
24803
+ if (genColumn = decodeInteger(reader, genColumn), !hasMoreVlq(reader, semi)) {
24804
+ let last = stack.pop();
24805
+ last[2] = genLine, last[3] = genColumn;
24806
+ continue;
24807
+ }
24808
+ let fields = decodeInteger(reader, 0), hasDefinition = fields & 1, hasCallsite = fields & 2, hasScope = fields & 4, callsite = null, bindings = EMPTY, range;
24809
+ if (hasDefinition) {
24810
+ let defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);
24811
+ definitionScopeIndex = decodeInteger(
24812
+ reader,
24813
+ definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0
24814
+ ), definitionSourcesIndex = defSourcesIndex, range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];
24815
+ } else
24816
+ range = [genLine, genColumn, 0, 0];
24817
+ if (range.isScope = !!hasScope, hasCallsite) {
24818
+ let prevCsi = callsiteSourcesIndex, prevLine = callsiteLine;
24819
+ callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);
24820
+ let sameSource = prevCsi === callsiteSourcesIndex;
24821
+ callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0), callsiteColumn = decodeInteger(
24822
+ reader,
24823
+ sameSource && prevLine === callsiteLine ? callsiteColumn : 0
24824
+ ), callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];
24825
+ }
24826
+ if (range.callsite = callsite, hasMoreVlq(reader, semi)) {
24827
+ bindings = [];
24828
+ do {
24829
+ bindingLine = genLine, bindingColumn = genColumn;
24830
+ let expressionsCount = decodeInteger(reader, 0), expressionRanges;
24831
+ if (expressionsCount < -1) {
24832
+ expressionRanges = [[decodeInteger(reader, 0)]];
24833
+ for (let i = -1; i > expressionsCount; i--) {
24834
+ let prevBl = bindingLine;
24835
+ bindingLine = decodeInteger(reader, bindingLine), bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);
24836
+ let expression = decodeInteger(reader, 0);
24837
+ expressionRanges.push([expression, bindingLine, bindingColumn]);
24838
+ }
24839
+ } else
24840
+ expressionRanges = [[expressionsCount]];
24841
+ bindings.push(expressionRanges);
24842
+ } while (hasMoreVlq(reader, semi));
24843
+ }
24844
+ range.bindings = bindings, ranges.push(range), stack.push(range);
24845
+ }
24846
+ genLine++, reader.pos = semi + 1;
24847
+ } while (reader.pos < length);
24848
+ return ranges;
24849
+ }
24850
+ function encodeGeneratedRanges(ranges) {
24851
+ if (ranges.length === 0) return "";
24852
+ let writer = new StringWriter();
24853
+ for (let i = 0; i < ranges.length; )
24854
+ i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);
24855
+ return writer.flush();
24856
+ }
24857
+ function _encodeGeneratedRanges(ranges, index, writer, state) {
24858
+ let range = ranges[index], {
24859
+ 0: startLine,
24860
+ 1: startColumn,
24861
+ 2: endLine,
24862
+ 3: endColumn,
24863
+ isScope,
24864
+ callsite,
24865
+ bindings
24866
+ } = range;
24867
+ state[0] < startLine ? (catchupLine(writer, state[0], startLine), state[0] = startLine, state[1] = 0) : index > 0 && writer.write(comma), state[1] = encodeInteger(writer, range[1], state[1]);
24868
+ let fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);
24869
+ if (encodeInteger(writer, fields, 0), range.length === 6) {
24870
+ let { 4: sourcesIndex, 5: scopesIndex } = range;
24871
+ sourcesIndex !== state[2] && (state[3] = 0), state[2] = encodeInteger(writer, sourcesIndex, state[2]), state[3] = encodeInteger(writer, scopesIndex, state[3]);
24872
+ }
24873
+ if (callsite) {
24874
+ let { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;
24875
+ sourcesIndex !== state[4] ? (state[5] = 0, state[6] = 0) : callLine !== state[5] && (state[6] = 0), state[4] = encodeInteger(writer, sourcesIndex, state[4]), state[5] = encodeInteger(writer, callLine, state[5]), state[6] = encodeInteger(writer, callColumn, state[6]);
24876
+ }
24877
+ if (bindings)
24878
+ for (let binding of bindings) {
24879
+ binding.length > 1 && encodeInteger(writer, -binding.length, 0);
24880
+ let expression = binding[0][0];
24881
+ encodeInteger(writer, expression, 0);
24882
+ let bindingStartLine = startLine, bindingStartColumn = startColumn;
24883
+ for (let i = 1; i < binding.length; i++) {
24884
+ let expRange = binding[i];
24885
+ bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine), bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn), encodeInteger(writer, expRange[0], 0);
24886
+ }
24887
+ }
24888
+ for (index++; index < ranges.length; ) {
24889
+ let next = ranges[index], { 0: l, 1: c } = next;
24890
+ if (l > endLine || l === endLine && c >= endColumn)
24891
+ break;
24892
+ index = _encodeGeneratedRanges(ranges, index, writer, state);
24893
+ }
24894
+ return state[0] < endLine ? (catchupLine(writer, state[0], endLine), state[0] = endLine, state[1] = 0) : writer.write(comma), state[1] = encodeInteger(writer, endColumn, state[1]), index;
24895
+ }
24896
+ function catchupLine(writer, lastLine, line) {
24897
+ do
24898
+ writer.write(semicolon);
24899
+ while (++lastLine < line);
24900
+ }
24901
+ function decode(mappings) {
24902
+ let { length } = mappings, reader = new StringReader(mappings), decoded = [], genColumn = 0, sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0;
24903
+ do {
24904
+ let semi = reader.indexOf(";"), line = [], sorted = !0, lastCol = 0;
24905
+ for (genColumn = 0; reader.pos < semi; ) {
24906
+ let seg;
24907
+ genColumn = decodeInteger(reader, genColumn), genColumn < lastCol && (sorted = !1), lastCol = genColumn, hasMoreVlq(reader, semi) ? (sourcesIndex = decodeInteger(reader, sourcesIndex), sourceLine = decodeInteger(reader, sourceLine), sourceColumn = decodeInteger(reader, sourceColumn), hasMoreVlq(reader, semi) ? (namesIndex = decodeInteger(reader, namesIndex), seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]) : seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]) : seg = [genColumn], line.push(seg), reader.pos++;
24908
+ }
24909
+ sorted || sort(line), decoded.push(line), reader.pos = semi + 1;
24910
+ } while (reader.pos <= length);
24911
+ return decoded;
24912
+ }
24913
+ function sort(line) {
24914
+ line.sort(sortComparator);
24915
+ }
24916
+ function sortComparator(a, b) {
24917
+ return a[0] - b[0];
24918
+ }
24919
+ function encode(decoded) {
24920
+ let writer = new StringWriter(), sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0;
24921
+ for (let i = 0; i < decoded.length; i++) {
24922
+ let line = decoded[i];
24923
+ if (i > 0 && writer.write(semicolon), line.length === 0) continue;
24924
+ let genColumn = 0;
24925
+ for (let j = 0; j < line.length; j++) {
24926
+ let segment = line[j];
24927
+ j > 0 && writer.write(comma), genColumn = encodeInteger(writer, segment[0], genColumn), segment.length !== 1 && (sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex), sourceLine = encodeInteger(writer, segment[2], sourceLine), sourceColumn = encodeInteger(writer, segment[3], sourceColumn), segment.length !== 4 && (namesIndex = encodeInteger(writer, segment[4], namesIndex)));
24928
+ }
24929
+ }
24930
+ return writer.flush();
24931
+ }
24932
+ }));
24933
+ }
24934
+ });
24935
+
24936
+ // ../node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js
24937
+ var require_resolve_uri_umd = __commonJS({
24938
+ "../node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"(exports, module) {
24939
+ (function(global2, factory) {
24940
+ typeof exports == "object" && typeof module < "u" ? module.exports = factory() : typeof define == "function" && define.amd ? define(factory) : (global2 = typeof globalThis < "u" ? globalThis : global2 || self, global2.resolveURI = factory());
24941
+ })(exports, (function() {
24942
+ "use strict";
24943
+ let schemeRegex = /^[\w+.-]+:\/\//, urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/, fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
24944
+ function isAbsoluteUrl(input) {
24945
+ return schemeRegex.test(input);
24946
+ }
24947
+ function isSchemeRelativeUrl(input) {
24948
+ return input.startsWith("//");
24949
+ }
24950
+ function isAbsolutePath(input) {
24951
+ return input.startsWith("/");
24952
+ }
24953
+ function isFileUrl(input) {
24954
+ return input.startsWith("file:");
24955
+ }
24956
+ function isRelative(input) {
24957
+ return /^[.?#]/.test(input);
24958
+ }
24959
+ function parseAbsoluteUrl(input) {
24960
+ let match = urlRegex.exec(input);
24961
+ return makeUrl(match[1], match[2] || "", match[3], match[4] || "", match[5] || "/", match[6] || "", match[7] || "");
24962
+ }
24963
+ function parseFileUrl(input) {
24964
+ let match = fileRegex.exec(input), path = match[2];
24965
+ return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path) ? path : "/" + path, match[3] || "", match[4] || "");
24966
+ }
24967
+ function makeUrl(scheme, user, host, port, path, query, hash) {
24968
+ return {
24969
+ scheme,
24970
+ user,
24971
+ host,
24972
+ port,
24973
+ path,
24974
+ query,
24975
+ hash,
24976
+ type: 7
24977
+ };
24978
+ }
24979
+ function parseUrl(input) {
24980
+ if (isSchemeRelativeUrl(input)) {
24981
+ let url2 = parseAbsoluteUrl("http:" + input);
24982
+ return url2.scheme = "", url2.type = 6, url2;
24983
+ }
24984
+ if (isAbsolutePath(input)) {
24985
+ let url2 = parseAbsoluteUrl("http://foo.com" + input);
24986
+ return url2.scheme = "", url2.host = "", url2.type = 5, url2;
24987
+ }
24988
+ if (isFileUrl(input))
24989
+ return parseFileUrl(input);
24990
+ if (isAbsoluteUrl(input))
24991
+ return parseAbsoluteUrl(input);
24992
+ let url = parseAbsoluteUrl("http://foo.com/" + input);
24993
+ return url.scheme = "", url.host = "", url.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1, url;
24994
+ }
24995
+ function stripPathFilename(path) {
24996
+ if (path.endsWith("/.."))
24997
+ return path;
24998
+ let index = path.lastIndexOf("/");
24999
+ return path.slice(0, index + 1);
25000
+ }
25001
+ function mergePaths(url, base) {
25002
+ normalizePath(base, base.type), url.path === "/" ? url.path = base.path : url.path = stripPathFilename(base.path) + url.path;
25003
+ }
25004
+ function normalizePath(url, type) {
25005
+ let rel = type <= 4, pieces = url.path.split("/"), pointer = 1, positive = 0, addTrailingSlash = !1;
25006
+ for (let i = 1; i < pieces.length; i++) {
25007
+ let piece = pieces[i];
25008
+ if (!piece) {
25009
+ addTrailingSlash = !0;
25010
+ continue;
25011
+ }
25012
+ if (addTrailingSlash = !1, piece !== ".") {
25013
+ if (piece === "..") {
25014
+ positive ? (addTrailingSlash = !0, positive--, pointer--) : rel && (pieces[pointer++] = piece);
25015
+ continue;
25016
+ }
25017
+ pieces[pointer++] = piece, positive++;
25018
+ }
25019
+ }
25020
+ let path = "";
25021
+ for (let i = 1; i < pointer; i++)
25022
+ path += "/" + pieces[i];
25023
+ (!path || addTrailingSlash && !path.endsWith("/..")) && (path += "/"), url.path = path;
25024
+ }
25025
+ function resolve(input, base) {
25026
+ if (!input && !base)
25027
+ return "";
25028
+ let url = parseUrl(input), inputType = url.type;
25029
+ if (base && inputType !== 7) {
25030
+ let baseUrl = parseUrl(base), baseType = baseUrl.type;
25031
+ switch (inputType) {
25032
+ case 1:
25033
+ url.hash = baseUrl.hash;
25034
+ // fall through
25035
+ case 2:
25036
+ url.query = baseUrl.query;
25037
+ // fall through
25038
+ case 3:
25039
+ case 4:
25040
+ mergePaths(url, baseUrl);
25041
+ // fall through
25042
+ case 5:
25043
+ url.user = baseUrl.user, url.host = baseUrl.host, url.port = baseUrl.port;
25044
+ // fall through
25045
+ case 6:
25046
+ url.scheme = baseUrl.scheme;
25047
+ }
25048
+ baseType > inputType && (inputType = baseType);
25049
+ }
25050
+ normalizePath(url, inputType);
25051
+ let queryHash = url.query + url.hash;
25052
+ switch (inputType) {
25053
+ // This is impossible, because of the empty checks at the start of the function.
25054
+ // case UrlType.Empty:
25055
+ case 2:
25056
+ case 3:
25057
+ return queryHash;
25058
+ case 4: {
25059
+ let path = url.path.slice(1);
25060
+ return path ? isRelative(base || input) && !isRelative(path) ? "./" + path + queryHash : path + queryHash : queryHash || ".";
25061
+ }
25062
+ case 5:
25063
+ return url.path + queryHash;
25064
+ default:
25065
+ return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
25066
+ }
25067
+ }
25068
+ return resolve;
25069
+ }));
25070
+ }
25071
+ });
25072
+
25073
+ // ../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js
25074
+ var require_trace_mapping_umd = __commonJS({
25075
+ "../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"(exports, module) {
25076
+ (function(global2, factory) {
25077
+ if (typeof exports == "object" && typeof module < "u")
25078
+ factory(module, require_resolve_uri_umd(), require_sourcemap_codec_umd()), module.exports = def(module);
25079
+ else if (typeof define == "function" && define.amd)
25080
+ define(["module", "@jridgewell/resolve-uri", "@jridgewell/sourcemap-codec"], function(mod) {
25081
+ factory.apply(this, arguments), mod.exports = def(mod);
25082
+ });
25083
+ else {
25084
+ let mod = { exports: {} };
25085
+ factory(mod, global2.resolveURI, global2.sourcemapCodec), global2 = typeof globalThis < "u" ? globalThis : global2 || self, global2.traceMapping = def(mod);
25086
+ }
25087
+ function def(m) {
25088
+ return "default" in m.exports ? m.exports.default : m.exports;
25089
+ }
25090
+ })(exports, (function(module2, require_resolveURI, require_sourcemapCodec) {
25091
+ "use strict";
25092
+ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJS2 = (cb, mod) => function() {
25093
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
25094
+ }, __export = (target, all) => {
25095
+ for (var name in all)
25096
+ __defProp(target, name, { get: all[name], enumerable: !0 });
25097
+ }, __copyProps = (to, from, except, desc) => {
25098
+ if (from && typeof from == "object" || typeof from == "function")
25099
+ for (let key of __getOwnPropNames(from))
25100
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25101
+ return to;
25102
+ }, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25103
+ // If the importer is in node compatibility mode or this is not an ESM
25104
+ // file that has been converted to a CommonJS file using a Babel-
25105
+ // compatible transform (i.e. "__esModule" has not been set), then set
25106
+ // "default" to the CommonJS "module.exports" for node compatibility.
25107
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
25108
+ mod
25109
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod), require_sourcemap_codec = __commonJS2({
25110
+ "umd:@jridgewell/sourcemap-codec"(exports2, module22) {
25111
+ module22.exports = require_sourcemapCodec;
25112
+ }
25113
+ }), require_resolve_uri = __commonJS2({
25114
+ "umd:@jridgewell/resolve-uri"(exports2, module22) {
25115
+ module22.exports = require_resolveURI;
25116
+ }
25117
+ }), trace_mapping_exports = {};
25118
+ __export(trace_mapping_exports, {
25119
+ AnyMap: () => FlattenMap,
25120
+ FlattenMap: () => FlattenMap,
25121
+ GREATEST_LOWER_BOUND: () => GREATEST_LOWER_BOUND,
25122
+ LEAST_UPPER_BOUND: () => LEAST_UPPER_BOUND,
25123
+ TraceMap: () => TraceMap,
25124
+ allGeneratedPositionsFor: () => allGeneratedPositionsFor,
25125
+ decodedMap: () => decodedMap,
25126
+ decodedMappings: () => decodedMappings,
25127
+ eachMapping: () => eachMapping,
25128
+ encodedMap: () => encodedMap,
25129
+ encodedMappings: () => encodedMappings,
25130
+ generatedPositionFor: () => generatedPositionFor,
25131
+ isIgnored: () => isIgnored,
25132
+ originalPositionFor: () => originalPositionFor,
25133
+ presortedDecodedMap: () => presortedDecodedMap,
25134
+ sourceContentFor: () => sourceContentFor,
25135
+ traceSegment: () => traceSegment
25136
+ }), module2.exports = __toCommonJS(trace_mapping_exports);
25137
+ var import_sourcemap_codec = __toESM2(require_sourcemap_codec()), import_resolve_uri = __toESM2(require_resolve_uri());
25138
+ function stripFilename(path) {
25139
+ if (!path) return "";
25140
+ let index = path.lastIndexOf("/");
25141
+ return path.slice(0, index + 1);
25142
+ }
25143
+ function resolver(mapUrl, sourceRoot) {
25144
+ let from = stripFilename(mapUrl), prefix = sourceRoot ? sourceRoot + "/" : "";
25145
+ return (source) => (0, import_resolve_uri.default)(prefix + (source || ""), from);
25146
+ }
25147
+ var COLUMN = 0, SOURCES_INDEX = 1, SOURCE_LINE = 2, SOURCE_COLUMN = 3, NAMES_INDEX = 4, REV_GENERATED_LINE = 1, REV_GENERATED_COLUMN = 2;
25148
+ function maybeSort(mappings, owned) {
25149
+ let unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
25150
+ if (unsortedIndex === mappings.length) return mappings;
25151
+ owned || (mappings = mappings.slice());
25152
+ for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1))
25153
+ mappings[i] = sortSegments(mappings[i], owned);
25154
+ return mappings;
25155
+ }
25156
+ function nextUnsortedSegmentLine(mappings, start) {
25157
+ for (let i = start; i < mappings.length; i++)
25158
+ if (!isSorted(mappings[i])) return i;
25159
+ return mappings.length;
25160
+ }
25161
+ function isSorted(line) {
25162
+ for (let j = 1; j < line.length; j++)
25163
+ if (line[j][COLUMN] < line[j - 1][COLUMN])
25164
+ return !1;
25165
+ return !0;
25166
+ }
25167
+ function sortSegments(line, owned) {
25168
+ return owned || (line = line.slice()), line.sort(sortComparator);
25169
+ }
25170
+ function sortComparator(a, b) {
25171
+ return a[COLUMN] - b[COLUMN];
25172
+ }
25173
+ function buildBySources(decoded, memos) {
25174
+ let sources = memos.map(() => []);
25175
+ for (let i = 0; i < decoded.length; i++) {
25176
+ let line = decoded[i];
25177
+ for (let j = 0; j < line.length; j++) {
25178
+ let seg = line[j];
25179
+ if (seg.length === 1) continue;
25180
+ let sourceIndex2 = seg[SOURCES_INDEX], sourceLine = seg[SOURCE_LINE], sourceColumn = seg[SOURCE_COLUMN], source = sources[sourceIndex2];
25181
+ (source[sourceLine] || (source[sourceLine] = [])).push([sourceColumn, i, seg[COLUMN]]);
25182
+ }
25183
+ }
25184
+ for (let i = 0; i < sources.length; i++) {
25185
+ let source = sources[i];
25186
+ for (let j = 0; j < source.length; j++) {
25187
+ let line = source[j];
25188
+ line && line.sort(sortComparator);
25189
+ }
25190
+ }
25191
+ return sources;
25192
+ }
25193
+ var found = !1;
25194
+ function binarySearch(haystack, needle, low, high) {
25195
+ for (; low <= high; ) {
25196
+ let mid = low + (high - low >> 1), cmp = haystack[mid][COLUMN] - needle;
25197
+ if (cmp === 0)
25198
+ return found = !0, mid;
25199
+ cmp < 0 ? low = mid + 1 : high = mid - 1;
25200
+ }
25201
+ return found = !1, low - 1;
25202
+ }
25203
+ function upperBound(haystack, needle, index) {
25204
+ for (let i = index + 1; i < haystack.length && haystack[i][COLUMN] === needle; index = i++)
25205
+ ;
25206
+ return index;
25207
+ }
25208
+ function lowerBound(haystack, needle, index) {
25209
+ for (let i = index - 1; i >= 0 && haystack[i][COLUMN] === needle; index = i--)
25210
+ ;
25211
+ return index;
25212
+ }
25213
+ function memoizedState() {
25214
+ return {
25215
+ lastKey: -1,
25216
+ lastNeedle: -1,
25217
+ lastIndex: -1
25218
+ };
25219
+ }
25220
+ function memoizedBinarySearch(haystack, needle, state, key) {
25221
+ let { lastKey, lastNeedle, lastIndex } = state, low = 0, high = haystack.length - 1;
25222
+ if (key === lastKey) {
25223
+ if (needle === lastNeedle)
25224
+ return found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle, lastIndex;
25225
+ needle >= lastNeedle ? low = lastIndex === -1 ? 0 : lastIndex : high = lastIndex;
25226
+ }
25227
+ return state.lastKey = key, state.lastNeedle = needle, state.lastIndex = binarySearch(haystack, needle, low, high);
25228
+ }
25229
+ function parse3(map) {
25230
+ return typeof map == "string" ? JSON.parse(map) : map;
25231
+ }
25232
+ var FlattenMap = function(map, mapUrl) {
25233
+ let parsed = parse3(map);
25234
+ if (!("sections" in parsed))
25235
+ return new TraceMap(parsed, mapUrl);
25236
+ let mappings = [], sources = [], sourcesContent = [], names = [], ignoreList = [];
25237
+ recurse(
25238
+ parsed,
25239
+ mapUrl,
25240
+ mappings,
25241
+ sources,
25242
+ sourcesContent,
25243
+ names,
25244
+ ignoreList,
25245
+ 0,
25246
+ 0,
25247
+ 1 / 0,
25248
+ 1 / 0
25249
+ );
25250
+ let joined = {
25251
+ version: 3,
25252
+ file: parsed.file,
25253
+ names,
25254
+ sources,
25255
+ sourcesContent,
25256
+ mappings,
25257
+ ignoreList
25258
+ };
25259
+ return presortedDecodedMap(joined);
25260
+ };
25261
+ function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
25262
+ let { sections } = input;
25263
+ for (let i = 0; i < sections.length; i++) {
25264
+ let { map, offset } = sections[i], sl = stopLine, sc = stopColumn;
25265
+ if (i + 1 < sections.length) {
25266
+ let nextOffset = sections[i + 1].offset;
25267
+ sl = Math.min(stopLine, lineOffset + nextOffset.line), sl === stopLine ? sc = Math.min(stopColumn, columnOffset + nextOffset.column) : sl < stopLine && (sc = columnOffset + nextOffset.column);
25268
+ }
25269
+ addSection(
25270
+ map,
25271
+ mapUrl,
25272
+ mappings,
25273
+ sources,
25274
+ sourcesContent,
25275
+ names,
25276
+ ignoreList,
25277
+ lineOffset + offset.line,
25278
+ columnOffset + offset.column,
25279
+ sl,
25280
+ sc
25281
+ );
25282
+ }
25283
+ }
25284
+ function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
25285
+ let parsed = parse3(input);
25286
+ if ("sections" in parsed) return recurse(...arguments);
25287
+ let map = new TraceMap(parsed, mapUrl), sourcesOffset = sources.length, namesOffset = names.length, decoded = decodedMappings(map), { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;
25288
+ if (append(sources, resolvedSources), append(names, map.names), contents) append(sourcesContent, contents);
25289
+ else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);
25290
+ if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);
25291
+ for (let i = 0; i < decoded.length; i++) {
25292
+ let lineI = lineOffset + i;
25293
+ if (lineI > stopLine) return;
25294
+ let out = getLine(mappings, lineI), cOffset = i === 0 ? columnOffset : 0, line = decoded[i];
25295
+ for (let j = 0; j < line.length; j++) {
25296
+ let seg = line[j], column = cOffset + seg[COLUMN];
25297
+ if (lineI === stopLine && column >= stopColumn) return;
25298
+ if (seg.length === 1) {
25299
+ out.push([column]);
25300
+ continue;
25301
+ }
25302
+ let sourcesIndex = sourcesOffset + seg[SOURCES_INDEX], sourceLine = seg[SOURCE_LINE], sourceColumn = seg[SOURCE_COLUMN];
25303
+ out.push(
25304
+ seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]
25305
+ );
25306
+ }
25307
+ }
25308
+ }
25309
+ function append(arr, other) {
25310
+ for (let i = 0; i < other.length; i++) arr.push(other[i]);
25311
+ }
25312
+ function getLine(arr, index) {
25313
+ for (let i = arr.length; i <= index; i++) arr[i] = [];
25314
+ return arr[index];
25315
+ }
25316
+ var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)", COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)", LEAST_UPPER_BOUND = -1, GREATEST_LOWER_BOUND = 1, TraceMap = class {
25317
+ constructor(map, mapUrl) {
25318
+ let isString = typeof map == "string";
25319
+ if (!isString && map._decodedMemo) return map;
25320
+ let parsed = parse3(map), { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
25321
+ this.version = version, this.file = file, this.names = names || [], this.sourceRoot = sourceRoot, this.sources = sources, this.sourcesContent = sourcesContent, this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
25322
+ let resolve = resolver(mapUrl, sourceRoot);
25323
+ this.resolvedSources = sources.map(resolve);
25324
+ let { mappings } = parsed;
25325
+ if (typeof mappings == "string")
25326
+ this._encoded = mappings, this._decoded = void 0;
25327
+ else if (Array.isArray(mappings))
25328
+ this._encoded = void 0, this._decoded = maybeSort(mappings, isString);
25329
+ else throw parsed.sections ? new Error("TraceMap passed sectioned source map, please use FlattenMap export instead") : new Error(`invalid source map: ${JSON.stringify(parsed)}`);
25330
+ this._decodedMemo = memoizedState(), this._bySources = void 0, this._bySourceMemos = void 0;
25331
+ }
25332
+ };
25333
+ function cast(map) {
25334
+ return map;
25335
+ }
25336
+ function encodedMappings(map) {
25337
+ var _a, _b;
25338
+ return (_b = (_a = map)._encoded) != null ? _b : _a._encoded = (0, import_sourcemap_codec.encode)(map._decoded);
25339
+ }
25340
+ function decodedMappings(map) {
25341
+ var _a;
25342
+ return (_a = map)._decoded || (_a._decoded = (0, import_sourcemap_codec.decode)(map._encoded));
25343
+ }
25344
+ function traceSegment(map, line, column) {
25345
+ let decoded = decodedMappings(map);
25346
+ if (line >= decoded.length) return null;
25347
+ let segments = decoded[line], index = traceSegmentInternal(
25348
+ segments,
25349
+ map._decodedMemo,
25350
+ line,
25351
+ column,
25352
+ GREATEST_LOWER_BOUND
25353
+ );
25354
+ return index === -1 ? null : segments[index];
25355
+ }
25356
+ function originalPositionFor(map, needle) {
25357
+ let { line, column, bias } = needle;
25358
+ if (line--, line < 0) throw new Error(LINE_GTR_ZERO);
25359
+ if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
25360
+ let decoded = decodedMappings(map);
25361
+ if (line >= decoded.length) return OMapping(null, null, null, null);
25362
+ let segments = decoded[line], index = traceSegmentInternal(
25363
+ segments,
25364
+ map._decodedMemo,
25365
+ line,
25366
+ column,
25367
+ bias || GREATEST_LOWER_BOUND
25368
+ );
25369
+ if (index === -1) return OMapping(null, null, null, null);
25370
+ let segment = segments[index];
25371
+ if (segment.length === 1) return OMapping(null, null, null, null);
25372
+ let { names, resolvedSources } = map;
25373
+ return OMapping(
25374
+ resolvedSources[segment[SOURCES_INDEX]],
25375
+ segment[SOURCE_LINE] + 1,
25376
+ segment[SOURCE_COLUMN],
25377
+ segment.length === 5 ? names[segment[NAMES_INDEX]] : null
25378
+ );
25379
+ }
25380
+ function generatedPositionFor(map, needle) {
25381
+ let { source, line, column, bias } = needle;
25382
+ return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, !1);
25383
+ }
25384
+ function allGeneratedPositionsFor(map, needle) {
25385
+ let { source, line, column, bias } = needle;
25386
+ return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, !0);
25387
+ }
25388
+ function eachMapping(map, cb) {
25389
+ let decoded = decodedMappings(map), { names, resolvedSources } = map;
25390
+ for (let i = 0; i < decoded.length; i++) {
25391
+ let line = decoded[i];
25392
+ for (let j = 0; j < line.length; j++) {
25393
+ let seg = line[j], generatedLine = i + 1, generatedColumn = seg[0], source = null, originalLine = null, originalColumn = null, name = null;
25394
+ seg.length !== 1 && (source = resolvedSources[seg[1]], originalLine = seg[2] + 1, originalColumn = seg[3]), seg.length === 5 && (name = names[seg[4]]), cb({
25395
+ generatedLine,
25396
+ generatedColumn,
25397
+ source,
25398
+ originalLine,
25399
+ originalColumn,
25400
+ name
25401
+ });
25402
+ }
25403
+ }
25404
+ }
25405
+ function sourceIndex(map, source) {
25406
+ let { sources, resolvedSources } = map, index = sources.indexOf(source);
25407
+ return index === -1 && (index = resolvedSources.indexOf(source)), index;
25408
+ }
25409
+ function sourceContentFor(map, source) {
25410
+ let { sourcesContent } = map;
25411
+ if (sourcesContent == null) return null;
25412
+ let index = sourceIndex(map, source);
25413
+ return index === -1 ? null : sourcesContent[index];
25414
+ }
25415
+ function isIgnored(map, source) {
25416
+ let { ignoreList } = map;
25417
+ if (ignoreList == null) return !1;
25418
+ let index = sourceIndex(map, source);
25419
+ return index === -1 ? !1 : ignoreList.includes(index);
25420
+ }
25421
+ function presortedDecodedMap(map, mapUrl) {
25422
+ let tracer = new TraceMap(clone(map, []), mapUrl);
25423
+ return tracer._decoded = map.mappings, tracer;
25424
+ }
25425
+ function decodedMap(map) {
25426
+ return clone(map, decodedMappings(map));
25427
+ }
25428
+ function encodedMap(map) {
25429
+ return clone(map, encodedMappings(map));
25430
+ }
25431
+ function clone(map, mappings) {
25432
+ return {
25433
+ version: map.version,
25434
+ file: map.file,
25435
+ names: map.names,
25436
+ sourceRoot: map.sourceRoot,
25437
+ sources: map.sources,
25438
+ sourcesContent: map.sourcesContent,
25439
+ mappings,
25440
+ ignoreList: map.ignoreList || map.x_google_ignoreList
25441
+ };
25442
+ }
25443
+ function OMapping(source, line, column, name) {
25444
+ return { source, line, column, name };
25445
+ }
25446
+ function GMapping(line, column) {
25447
+ return { line, column };
25448
+ }
25449
+ function traceSegmentInternal(segments, memo, line, column, bias) {
25450
+ let index = memoizedBinarySearch(segments, column, memo, line);
25451
+ return found ? index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index) : bias === LEAST_UPPER_BOUND && index++, index === -1 || index === segments.length ? -1 : index;
25452
+ }
25453
+ function sliceGeneratedPositions(segments, memo, line, column, bias) {
25454
+ let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
25455
+ if (!found && bias === LEAST_UPPER_BOUND && min++, min === -1 || min === segments.length) return [];
25456
+ let matchedColumn = found ? column : segments[min][COLUMN];
25457
+ found || (min = lowerBound(segments, matchedColumn, min));
25458
+ let max = upperBound(segments, matchedColumn, min), result = [];
25459
+ for (; min <= max; min++) {
25460
+ let segment = segments[min];
25461
+ result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
25462
+ }
25463
+ return result;
25464
+ }
25465
+ function generatedPosition(map, source, line, column, bias, all) {
25466
+ var _a, _b;
25467
+ if (line--, line < 0) throw new Error(LINE_GTR_ZERO);
25468
+ if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
25469
+ let { sources, resolvedSources } = map, sourceIndex2 = sources.indexOf(source);
25470
+ if (sourceIndex2 === -1 && (sourceIndex2 = resolvedSources.indexOf(source)), sourceIndex2 === -1) return all ? [] : GMapping(null, null);
25471
+ let bySourceMemos = (_a = map)._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState)), segments = ((_b = map)._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos)))[sourceIndex2][line];
25472
+ if (segments == null) return all ? [] : GMapping(null, null);
25473
+ let memo = bySourceMemos[sourceIndex2];
25474
+ if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);
25475
+ let index = traceSegmentInternal(segments, memo, line, column, bias);
25476
+ if (index === -1) return GMapping(null, null);
25477
+ let segment = segments[index];
25478
+ return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
25479
+ }
25480
+ }));
25481
+ }
25482
+ });
25483
+
25484
+ // ../node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js
25485
+ var require_gen_mapping_umd = __commonJS({
25486
+ "../node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(exports, module) {
25487
+ (function(global2, factory) {
25488
+ if (typeof exports == "object" && typeof module < "u")
25489
+ factory(module, require_sourcemap_codec_umd(), require_trace_mapping_umd()), module.exports = def(module);
25490
+ else if (typeof define == "function" && define.amd)
25491
+ define(["module", "@jridgewell/sourcemap-codec", "@jridgewell/trace-mapping"], function(mod) {
25492
+ factory.apply(this, arguments), mod.exports = def(mod);
25493
+ });
25494
+ else {
25495
+ let mod = { exports: {} };
25496
+ factory(mod, global2.sourcemapCodec, global2.traceMapping), global2 = typeof globalThis < "u" ? globalThis : global2 || self, global2.genMapping = def(mod);
25497
+ }
25498
+ function def(m) {
25499
+ return "default" in m.exports ? m.exports.default : m.exports;
25500
+ }
25501
+ })(exports, (function(module2, require_sourcemapCodec, require_traceMapping) {
25502
+ "use strict";
25503
+ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJS2 = (cb, mod) => function() {
25504
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
25505
+ }, __export = (target, all) => {
25506
+ for (var name in all)
25507
+ __defProp(target, name, { get: all[name], enumerable: !0 });
25508
+ }, __copyProps = (to, from, except, desc) => {
25509
+ if (from && typeof from == "object" || typeof from == "function")
25510
+ for (let key of __getOwnPropNames(from))
25511
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25512
+ return to;
25513
+ }, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25514
+ // If the importer is in node compatibility mode or this is not an ESM
25515
+ // file that has been converted to a CommonJS file using a Babel-
25516
+ // compatible transform (i.e. "__esModule" has not been set), then set
25517
+ // "default" to the CommonJS "module.exports" for node compatibility.
25518
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
25519
+ mod
25520
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod), require_sourcemap_codec = __commonJS2({
25521
+ "umd:@jridgewell/sourcemap-codec"(exports2, module22) {
25522
+ module22.exports = require_sourcemapCodec;
25523
+ }
25524
+ }), require_trace_mapping = __commonJS2({
25525
+ "umd:@jridgewell/trace-mapping"(exports2, module22) {
25526
+ module22.exports = require_traceMapping;
25527
+ }
25528
+ }), gen_mapping_exports = {};
25529
+ __export(gen_mapping_exports, {
25530
+ GenMapping: () => GenMapping,
25531
+ addMapping: () => addMapping,
25532
+ addSegment: () => addSegment,
25533
+ allMappings: () => allMappings,
25534
+ fromMap: () => fromMap,
25535
+ maybeAddMapping: () => maybeAddMapping,
25536
+ maybeAddSegment: () => maybeAddSegment,
25537
+ setIgnore: () => setIgnore,
25538
+ setSourceContent: () => setSourceContent,
25539
+ toDecodedMap: () => toDecodedMap,
25540
+ toEncodedMap: () => toEncodedMap
25541
+ }), module2.exports = __toCommonJS(gen_mapping_exports);
25542
+ var SetArray = class {
25543
+ constructor() {
25544
+ this._indexes = { __proto__: null }, this.array = [];
25545
+ }
25546
+ };
25547
+ function cast(set) {
25548
+ return set;
25549
+ }
25550
+ function get(setarr, key) {
25551
+ return setarr._indexes[key];
25552
+ }
25553
+ function put(setarr, key) {
25554
+ let index = get(setarr, key);
25555
+ if (index !== void 0) return index;
25556
+ let { array, _indexes: indexes } = setarr, length = array.push(key);
25557
+ return indexes[key] = length - 1;
25558
+ }
25559
+ function remove(setarr, key) {
25560
+ let index = get(setarr, key);
25561
+ if (index === void 0) return;
25562
+ let { array, _indexes: indexes } = setarr;
25563
+ for (let i = index + 1; i < array.length; i++) {
25564
+ let k = array[i];
25565
+ array[i - 1] = k, indexes[k]--;
25566
+ }
25567
+ indexes[key] = void 0, array.pop();
25568
+ }
25569
+ var import_sourcemap_codec = __toESM2(require_sourcemap_codec()), import_trace_mapping = __toESM2(require_trace_mapping()), COLUMN = 0, SOURCES_INDEX = 1, SOURCE_LINE = 2, SOURCE_COLUMN = 3, NAMES_INDEX = 4, NO_NAME = -1, GenMapping = class {
25570
+ constructor({ file, sourceRoot } = {}) {
25571
+ this._names = new SetArray(), this._sources = new SetArray(), this._sourcesContent = [], this._mappings = [], this.file = file, this.sourceRoot = sourceRoot, this._ignoreList = new SetArray();
25572
+ }
25573
+ };
25574
+ function cast2(map) {
25575
+ return map;
25576
+ }
25577
+ function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
25578
+ return addSegmentInternal(
25579
+ !1,
25580
+ map,
25581
+ genLine,
25582
+ genColumn,
25583
+ source,
25584
+ sourceLine,
25585
+ sourceColumn,
25586
+ name,
25587
+ content
25588
+ );
25589
+ }
25590
+ function addMapping(map, mapping) {
25591
+ return addMappingInternal(!1, map, mapping);
25592
+ }
25593
+ var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => addSegmentInternal(
25594
+ !0,
25595
+ map,
25596
+ genLine,
25597
+ genColumn,
25598
+ source,
25599
+ sourceLine,
25600
+ sourceColumn,
25601
+ name,
25602
+ content
25603
+ ), maybeAddMapping = (map, mapping) => addMappingInternal(!0, map, mapping);
25604
+ function setSourceContent(map, source, content) {
25605
+ let {
25606
+ _sources: sources,
25607
+ _sourcesContent: sourcesContent
25608
+ // _originalScopes: originalScopes,
25609
+ } = map, index = put(sources, source);
25610
+ sourcesContent[index] = content;
25611
+ }
25612
+ function setIgnore(map, source, ignore = !0) {
25613
+ let {
25614
+ _sources: sources,
25615
+ _sourcesContent: sourcesContent,
25616
+ _ignoreList: ignoreList
25617
+ // _originalScopes: originalScopes,
25618
+ } = map, index = put(sources, source);
25619
+ index === sourcesContent.length && (sourcesContent[index] = null), ignore ? put(ignoreList, index) : remove(ignoreList, index);
25620
+ }
25621
+ function toDecodedMap(map) {
25622
+ let {
25623
+ _mappings: mappings,
25624
+ _sources: sources,
25625
+ _sourcesContent: sourcesContent,
25626
+ _names: names,
25627
+ _ignoreList: ignoreList
25628
+ // _originalScopes: originalScopes,
25629
+ // _generatedRanges: generatedRanges,
25630
+ } = map;
25631
+ return removeEmptyFinalLines(mappings), {
25632
+ version: 3,
25633
+ file: map.file || void 0,
25634
+ names: names.array,
25635
+ sourceRoot: map.sourceRoot || void 0,
25636
+ sources: sources.array,
25637
+ sourcesContent,
25638
+ mappings,
25639
+ // originalScopes,
25640
+ // generatedRanges,
25641
+ ignoreList: ignoreList.array
25642
+ };
25643
+ }
25644
+ function toEncodedMap(map) {
25645
+ let decoded = toDecodedMap(map);
25646
+ return Object.assign({}, decoded, {
25647
+ // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)),
25648
+ // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]),
25649
+ mappings: (0, import_sourcemap_codec.encode)(decoded.mappings)
25650
+ });
25651
+ }
25652
+ function fromMap(input) {
25653
+ let map = new import_trace_mapping.TraceMap(input), gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
25654
+ return putAll(gen._names, map.names), putAll(gen._sources, map.sources), gen._sourcesContent = map.sourcesContent || map.sources.map(() => null), gen._mappings = (0, import_trace_mapping.decodedMappings)(map), map.ignoreList && putAll(gen._ignoreList, map.ignoreList), gen;
25655
+ }
25656
+ function allMappings(map) {
25657
+ let out = [], { _mappings: mappings, _sources: sources, _names: names } = map;
25658
+ for (let i = 0; i < mappings.length; i++) {
25659
+ let line = mappings[i];
25660
+ for (let j = 0; j < line.length; j++) {
25661
+ let seg = line[j], generated = { line: i + 1, column: seg[COLUMN] }, source, original, name;
25662
+ seg.length !== 1 && (source = sources.array[seg[SOURCES_INDEX]], original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }, seg.length === 5 && (name = names.array[seg[NAMES_INDEX]])), out.push({ generated, source, original, name });
25663
+ }
25664
+ }
25665
+ return out;
25666
+ }
25667
+ function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
25668
+ let {
25669
+ _mappings: mappings,
25670
+ _sources: sources,
25671
+ _sourcesContent: sourcesContent,
25672
+ _names: names
25673
+ // _originalScopes: originalScopes,
25674
+ } = map, line = getIndex(mappings, genLine), index = getColumnIndex(line, genColumn);
25675
+ if (!source)
25676
+ return skipable && skipSourceless(line, index) ? void 0 : insert(line, index, [genColumn]);
25677
+ let sourcesIndex = put(sources, source), namesIndex = name ? put(names, name) : NO_NAME;
25678
+ if (sourcesIndex === sourcesContent.length && (sourcesContent[sourcesIndex] = content ?? null), !(skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)))
25679
+ return insert(
25680
+ line,
25681
+ index,
25682
+ name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn]
25683
+ );
25684
+ }
25685
+ function assert(_val) {
25686
+ }
25687
+ function getIndex(arr, index) {
25688
+ for (let i = arr.length; i <= index; i++)
25689
+ arr[i] = [];
25690
+ return arr[index];
25691
+ }
25692
+ function getColumnIndex(line, genColumn) {
25693
+ let index = line.length;
25694
+ for (let i = index - 1; i >= 0; index = i--) {
25695
+ let current = line[i];
25696
+ if (genColumn >= current[COLUMN]) break;
25697
+ }
25698
+ return index;
25699
+ }
25700
+ function insert(array, index, value2) {
25701
+ for (let i = array.length; i > index; i--)
25702
+ array[i] = array[i - 1];
25703
+ array[index] = value2;
25704
+ }
25705
+ function removeEmptyFinalLines(mappings) {
25706
+ let { length } = mappings, len = length;
25707
+ for (let i = len - 1; i >= 0 && !(mappings[i].length > 0); len = i, i--)
25708
+ ;
25709
+ len < length && (mappings.length = len);
25710
+ }
25711
+ function putAll(setarr, array) {
25712
+ for (let i = 0; i < array.length; i++) put(setarr, array[i]);
25713
+ }
25714
+ function skipSourceless(line, index) {
25715
+ return index === 0 ? !0 : line[index - 1].length === 1;
25716
+ }
25717
+ function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
25718
+ if (index === 0) return !1;
25719
+ let prev = line[index - 1];
25720
+ return prev.length === 1 ? !1 : sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
25721
+ }
25722
+ function addMappingInternal(skipable, map, mapping) {
25723
+ let { generated, source, original, name, content } = mapping;
25724
+ return source ? addSegmentInternal(
25725
+ skipable,
25726
+ map,
25727
+ generated.line - 1,
25728
+ generated.column,
25729
+ source,
25730
+ original.line - 1,
25731
+ original.column,
25732
+ name,
25733
+ content
25734
+ ) : addSegmentInternal(
25735
+ skipable,
25736
+ map,
25737
+ generated.line - 1,
25738
+ generated.column,
25739
+ null,
25740
+ null,
25741
+ null,
25742
+ null,
25743
+ null
25744
+ );
25745
+ }
25746
+ }));
25747
+ }
25748
+ });
25749
+
24659
25750
  // ../node_modules/@babel/generator/lib/source-map.js
24660
25751
  var require_source_map = __commonJS({
24661
25752
  "../node_modules/@babel/generator/lib/source-map.js"(exports) {