@nice-code/action 0.2.15 → 0.2.16

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.
@@ -1,21 +1,1830 @@
1
- // src/ActionDefinition/Action/RunningAction.types.ts
2
- var ERunningActionState;
3
- ((ERunningActionState2) => {
4
- ERunningActionState2["running"] = "running";
5
- ERunningActionState2["completed"] = "completed";
6
- })(ERunningActionState ||= {});
7
- var ERunningActionUpdateType;
8
- ((ERunningActionUpdateType2) => {
9
- ERunningActionUpdateType2["started"] = "started";
10
- ERunningActionUpdateType2["progress"] = "progress";
11
- ERunningActionUpdateType2["finished"] = "finished";
12
- })(ERunningActionUpdateType ||= {});
13
- var ERunningActionFinishedType;
14
- ((ERunningActionFinishedType2) => {
15
- ERunningActionFinishedType2["aborted"] = "aborted";
16
- ERunningActionFinishedType2["failed"] = "failed";
17
- ERunningActionFinishedType2["success"] = "success";
18
- })(ERunningActionFinishedType ||= {});
1
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
2
+
3
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.js
4
+ var require_base64 = __commonJS((exports) => {
5
+ var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
6
+ exports.encode = function(number) {
7
+ if (0 <= number && number < intToCharMap.length) {
8
+ return intToCharMap[number];
9
+ }
10
+ throw new TypeError("Must be between 0 and 63: " + number);
11
+ };
12
+ exports.decode = function(charCode) {
13
+ var bigA = 65;
14
+ var bigZ = 90;
15
+ var littleA = 97;
16
+ var littleZ = 122;
17
+ var zero = 48;
18
+ var nine = 57;
19
+ var plus = 43;
20
+ var slash = 47;
21
+ var littleOffset = 26;
22
+ var numberOffset = 52;
23
+ if (bigA <= charCode && charCode <= bigZ) {
24
+ return charCode - bigA;
25
+ }
26
+ if (littleA <= charCode && charCode <= littleZ) {
27
+ return charCode - littleA + littleOffset;
28
+ }
29
+ if (zero <= charCode && charCode <= nine) {
30
+ return charCode - zero + numberOffset;
31
+ }
32
+ if (charCode == plus) {
33
+ return 62;
34
+ }
35
+ if (charCode == slash) {
36
+ return 63;
37
+ }
38
+ return -1;
39
+ };
40
+ });
41
+
42
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.js
43
+ var require_base64_vlq = __commonJS((exports) => {
44
+ var base64 = require_base64();
45
+ var VLQ_BASE_SHIFT = 5;
46
+ var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
47
+ var VLQ_BASE_MASK = VLQ_BASE - 1;
48
+ var VLQ_CONTINUATION_BIT = VLQ_BASE;
49
+ function toVLQSigned(aValue) {
50
+ return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
51
+ }
52
+ function fromVLQSigned(aValue) {
53
+ var isNegative = (aValue & 1) === 1;
54
+ var shifted = aValue >> 1;
55
+ return isNegative ? -shifted : shifted;
56
+ }
57
+ exports.encode = function base64VLQ_encode(aValue) {
58
+ var encoded = "";
59
+ var digit;
60
+ var vlq = toVLQSigned(aValue);
61
+ do {
62
+ digit = vlq & VLQ_BASE_MASK;
63
+ vlq >>>= VLQ_BASE_SHIFT;
64
+ if (vlq > 0) {
65
+ digit |= VLQ_CONTINUATION_BIT;
66
+ }
67
+ encoded += base64.encode(digit);
68
+ } while (vlq > 0);
69
+ return encoded;
70
+ };
71
+ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
72
+ var strLen = aStr.length;
73
+ var result = 0;
74
+ var shift = 0;
75
+ var continuation, digit;
76
+ do {
77
+ if (aIndex >= strLen) {
78
+ throw new Error("Expected more digits in base 64 VLQ value.");
79
+ }
80
+ digit = base64.decode(aStr.charCodeAt(aIndex++));
81
+ if (digit === -1) {
82
+ throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
83
+ }
84
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
85
+ digit &= VLQ_BASE_MASK;
86
+ result = result + (digit << shift);
87
+ shift += VLQ_BASE_SHIFT;
88
+ } while (continuation);
89
+ aOutParam.value = fromVLQSigned(result);
90
+ aOutParam.rest = aIndex;
91
+ };
92
+ });
93
+
94
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/util.js
95
+ var require_util = __commonJS((exports) => {
96
+ function getArg(aArgs, aName, aDefaultValue) {
97
+ if (aName in aArgs) {
98
+ return aArgs[aName];
99
+ } else if (arguments.length === 3) {
100
+ return aDefaultValue;
101
+ } else {
102
+ throw new Error('"' + aName + '" is a required argument.');
103
+ }
104
+ }
105
+ exports.getArg = getArg;
106
+ var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
107
+ var dataUrlRegexp = /^data:.+\,.+$/;
108
+ function urlParse(aUrl) {
109
+ var match = aUrl.match(urlRegexp);
110
+ if (!match) {
111
+ return null;
112
+ }
113
+ return {
114
+ scheme: match[1],
115
+ auth: match[2],
116
+ host: match[3],
117
+ port: match[4],
118
+ path: match[5]
119
+ };
120
+ }
121
+ exports.urlParse = urlParse;
122
+ function urlGenerate(aParsedUrl) {
123
+ var url = "";
124
+ if (aParsedUrl.scheme) {
125
+ url += aParsedUrl.scheme + ":";
126
+ }
127
+ url += "//";
128
+ if (aParsedUrl.auth) {
129
+ url += aParsedUrl.auth + "@";
130
+ }
131
+ if (aParsedUrl.host) {
132
+ url += aParsedUrl.host;
133
+ }
134
+ if (aParsedUrl.port) {
135
+ url += ":" + aParsedUrl.port;
136
+ }
137
+ if (aParsedUrl.path) {
138
+ url += aParsedUrl.path;
139
+ }
140
+ return url;
141
+ }
142
+ exports.urlGenerate = urlGenerate;
143
+ var MAX_CACHED_INPUTS = 32;
144
+ function lruMemoize(f) {
145
+ var cache = [];
146
+ return function(input) {
147
+ for (var i = 0;i < cache.length; i++) {
148
+ if (cache[i].input === input) {
149
+ var temp = cache[0];
150
+ cache[0] = cache[i];
151
+ cache[i] = temp;
152
+ return cache[0].result;
153
+ }
154
+ }
155
+ var result = f(input);
156
+ cache.unshift({
157
+ input,
158
+ result
159
+ });
160
+ if (cache.length > MAX_CACHED_INPUTS) {
161
+ cache.pop();
162
+ }
163
+ return result;
164
+ };
165
+ }
166
+ var normalize = lruMemoize(function normalize2(aPath) {
167
+ var path = aPath;
168
+ var url = urlParse(aPath);
169
+ if (url) {
170
+ if (!url.path) {
171
+ return aPath;
172
+ }
173
+ path = url.path;
174
+ }
175
+ var isAbsolute = exports.isAbsolute(path);
176
+ var parts = [];
177
+ var start = 0;
178
+ var i = 0;
179
+ while (true) {
180
+ start = i;
181
+ i = path.indexOf("/", start);
182
+ if (i === -1) {
183
+ parts.push(path.slice(start));
184
+ break;
185
+ } else {
186
+ parts.push(path.slice(start, i));
187
+ while (i < path.length && path[i] === "/") {
188
+ i++;
189
+ }
190
+ }
191
+ }
192
+ for (var part, up = 0, i = parts.length - 1;i >= 0; i--) {
193
+ part = parts[i];
194
+ if (part === ".") {
195
+ parts.splice(i, 1);
196
+ } else if (part === "..") {
197
+ up++;
198
+ } else if (up > 0) {
199
+ if (part === "") {
200
+ parts.splice(i + 1, up);
201
+ up = 0;
202
+ } else {
203
+ parts.splice(i, 2);
204
+ up--;
205
+ }
206
+ }
207
+ }
208
+ path = parts.join("/");
209
+ if (path === "") {
210
+ path = isAbsolute ? "/" : ".";
211
+ }
212
+ if (url) {
213
+ url.path = path;
214
+ return urlGenerate(url);
215
+ }
216
+ return path;
217
+ });
218
+ exports.normalize = normalize;
219
+ function join(aRoot, aPath) {
220
+ if (aRoot === "") {
221
+ aRoot = ".";
222
+ }
223
+ if (aPath === "") {
224
+ aPath = ".";
225
+ }
226
+ var aPathUrl = urlParse(aPath);
227
+ var aRootUrl = urlParse(aRoot);
228
+ if (aRootUrl) {
229
+ aRoot = aRootUrl.path || "/";
230
+ }
231
+ if (aPathUrl && !aPathUrl.scheme) {
232
+ if (aRootUrl) {
233
+ aPathUrl.scheme = aRootUrl.scheme;
234
+ }
235
+ return urlGenerate(aPathUrl);
236
+ }
237
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
238
+ return aPath;
239
+ }
240
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
241
+ aRootUrl.host = aPath;
242
+ return urlGenerate(aRootUrl);
243
+ }
244
+ var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
245
+ if (aRootUrl) {
246
+ aRootUrl.path = joined;
247
+ return urlGenerate(aRootUrl);
248
+ }
249
+ return joined;
250
+ }
251
+ exports.join = join;
252
+ exports.isAbsolute = function(aPath) {
253
+ return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
254
+ };
255
+ function relative(aRoot, aPath) {
256
+ if (aRoot === "") {
257
+ aRoot = ".";
258
+ }
259
+ aRoot = aRoot.replace(/\/$/, "");
260
+ var level = 0;
261
+ while (aPath.indexOf(aRoot + "/") !== 0) {
262
+ var index = aRoot.lastIndexOf("/");
263
+ if (index < 0) {
264
+ return aPath;
265
+ }
266
+ aRoot = aRoot.slice(0, index);
267
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
268
+ return aPath;
269
+ }
270
+ ++level;
271
+ }
272
+ return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
273
+ }
274
+ exports.relative = relative;
275
+ var supportsNullProto = function() {
276
+ var obj = Object.create(null);
277
+ return !("__proto__" in obj);
278
+ }();
279
+ function identity(s) {
280
+ return s;
281
+ }
282
+ function toSetString(aStr) {
283
+ if (isProtoString(aStr)) {
284
+ return "$" + aStr;
285
+ }
286
+ return aStr;
287
+ }
288
+ exports.toSetString = supportsNullProto ? identity : toSetString;
289
+ function fromSetString(aStr) {
290
+ if (isProtoString(aStr)) {
291
+ return aStr.slice(1);
292
+ }
293
+ return aStr;
294
+ }
295
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
296
+ function isProtoString(s) {
297
+ if (!s) {
298
+ return false;
299
+ }
300
+ var length = s.length;
301
+ if (length < 9) {
302
+ return false;
303
+ }
304
+ if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
305
+ return false;
306
+ }
307
+ for (var i = length - 10;i >= 0; i--) {
308
+ if (s.charCodeAt(i) !== 36) {
309
+ return false;
310
+ }
311
+ }
312
+ return true;
313
+ }
314
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
315
+ var cmp = strcmp(mappingA.source, mappingB.source);
316
+ if (cmp !== 0) {
317
+ return cmp;
318
+ }
319
+ cmp = mappingA.originalLine - mappingB.originalLine;
320
+ if (cmp !== 0) {
321
+ return cmp;
322
+ }
323
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
324
+ if (cmp !== 0 || onlyCompareOriginal) {
325
+ return cmp;
326
+ }
327
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
328
+ if (cmp !== 0) {
329
+ return cmp;
330
+ }
331
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
332
+ if (cmp !== 0) {
333
+ return cmp;
334
+ }
335
+ return strcmp(mappingA.name, mappingB.name);
336
+ }
337
+ exports.compareByOriginalPositions = compareByOriginalPositions;
338
+ function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {
339
+ var cmp;
340
+ cmp = mappingA.originalLine - mappingB.originalLine;
341
+ if (cmp !== 0) {
342
+ return cmp;
343
+ }
344
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
345
+ if (cmp !== 0 || onlyCompareOriginal) {
346
+ return cmp;
347
+ }
348
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
349
+ if (cmp !== 0) {
350
+ return cmp;
351
+ }
352
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
353
+ if (cmp !== 0) {
354
+ return cmp;
355
+ }
356
+ return strcmp(mappingA.name, mappingB.name);
357
+ }
358
+ exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;
359
+ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
360
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
361
+ if (cmp !== 0) {
362
+ return cmp;
363
+ }
364
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
365
+ if (cmp !== 0 || onlyCompareGenerated) {
366
+ return cmp;
367
+ }
368
+ cmp = strcmp(mappingA.source, mappingB.source);
369
+ if (cmp !== 0) {
370
+ return cmp;
371
+ }
372
+ cmp = mappingA.originalLine - mappingB.originalLine;
373
+ if (cmp !== 0) {
374
+ return cmp;
375
+ }
376
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
377
+ if (cmp !== 0) {
378
+ return cmp;
379
+ }
380
+ return strcmp(mappingA.name, mappingB.name);
381
+ }
382
+ exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
383
+ function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {
384
+ var cmp = mappingA.generatedColumn - mappingB.generatedColumn;
385
+ if (cmp !== 0 || onlyCompareGenerated) {
386
+ return cmp;
387
+ }
388
+ cmp = strcmp(mappingA.source, mappingB.source);
389
+ if (cmp !== 0) {
390
+ return cmp;
391
+ }
392
+ cmp = mappingA.originalLine - mappingB.originalLine;
393
+ if (cmp !== 0) {
394
+ return cmp;
395
+ }
396
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
397
+ if (cmp !== 0) {
398
+ return cmp;
399
+ }
400
+ return strcmp(mappingA.name, mappingB.name);
401
+ }
402
+ exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;
403
+ function strcmp(aStr1, aStr2) {
404
+ if (aStr1 === aStr2) {
405
+ return 0;
406
+ }
407
+ if (aStr1 === null) {
408
+ return 1;
409
+ }
410
+ if (aStr2 === null) {
411
+ return -1;
412
+ }
413
+ if (aStr1 > aStr2) {
414
+ return 1;
415
+ }
416
+ return -1;
417
+ }
418
+ function compareByGeneratedPositionsInflated(mappingA, mappingB) {
419
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
420
+ if (cmp !== 0) {
421
+ return cmp;
422
+ }
423
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
424
+ if (cmp !== 0) {
425
+ return cmp;
426
+ }
427
+ cmp = strcmp(mappingA.source, mappingB.source);
428
+ if (cmp !== 0) {
429
+ return cmp;
430
+ }
431
+ cmp = mappingA.originalLine - mappingB.originalLine;
432
+ if (cmp !== 0) {
433
+ return cmp;
434
+ }
435
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
436
+ if (cmp !== 0) {
437
+ return cmp;
438
+ }
439
+ return strcmp(mappingA.name, mappingB.name);
440
+ }
441
+ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
442
+ function parseSourceMapInput(str) {
443
+ return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
444
+ }
445
+ exports.parseSourceMapInput = parseSourceMapInput;
446
+ function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
447
+ sourceURL = sourceURL || "";
448
+ if (sourceRoot) {
449
+ if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
450
+ sourceRoot += "/";
451
+ }
452
+ sourceURL = sourceRoot + sourceURL;
453
+ }
454
+ if (sourceMapURL) {
455
+ var parsed = urlParse(sourceMapURL);
456
+ if (!parsed) {
457
+ throw new Error("sourceMapURL could not be parsed");
458
+ }
459
+ if (parsed.path) {
460
+ var index = parsed.path.lastIndexOf("/");
461
+ if (index >= 0) {
462
+ parsed.path = parsed.path.substring(0, index + 1);
463
+ }
464
+ }
465
+ sourceURL = join(urlGenerate(parsed), sourceURL);
466
+ }
467
+ return normalize(sourceURL);
468
+ }
469
+ exports.computeSourceURL = computeSourceURL;
470
+ });
471
+
472
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.js
473
+ var require_array_set = __commonJS((exports) => {
474
+ var util = require_util();
475
+ var has = Object.prototype.hasOwnProperty;
476
+ var hasNativeMap = typeof Map !== "undefined";
477
+ function ArraySet() {
478
+ this._array = [];
479
+ this._set = hasNativeMap ? new Map : Object.create(null);
480
+ }
481
+ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
482
+ var set = new ArraySet;
483
+ for (var i = 0, len = aArray.length;i < len; i++) {
484
+ set.add(aArray[i], aAllowDuplicates);
485
+ }
486
+ return set;
487
+ };
488
+ ArraySet.prototype.size = function ArraySet_size() {
489
+ return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
490
+ };
491
+ ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
492
+ var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
493
+ var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
494
+ var idx = this._array.length;
495
+ if (!isDuplicate || aAllowDuplicates) {
496
+ this._array.push(aStr);
497
+ }
498
+ if (!isDuplicate) {
499
+ if (hasNativeMap) {
500
+ this._set.set(aStr, idx);
501
+ } else {
502
+ this._set[sStr] = idx;
503
+ }
504
+ }
505
+ };
506
+ ArraySet.prototype.has = function ArraySet_has(aStr) {
507
+ if (hasNativeMap) {
508
+ return this._set.has(aStr);
509
+ } else {
510
+ var sStr = util.toSetString(aStr);
511
+ return has.call(this._set, sStr);
512
+ }
513
+ };
514
+ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
515
+ if (hasNativeMap) {
516
+ var idx = this._set.get(aStr);
517
+ if (idx >= 0) {
518
+ return idx;
519
+ }
520
+ } else {
521
+ var sStr = util.toSetString(aStr);
522
+ if (has.call(this._set, sStr)) {
523
+ return this._set[sStr];
524
+ }
525
+ }
526
+ throw new Error('"' + aStr + '" is not in the set.');
527
+ };
528
+ ArraySet.prototype.at = function ArraySet_at(aIdx) {
529
+ if (aIdx >= 0 && aIdx < this._array.length) {
530
+ return this._array[aIdx];
531
+ }
532
+ throw new Error("No element indexed by " + aIdx);
533
+ };
534
+ ArraySet.prototype.toArray = function ArraySet_toArray() {
535
+ return this._array.slice();
536
+ };
537
+ exports.ArraySet = ArraySet;
538
+ });
539
+
540
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.js
541
+ var require_mapping_list = __commonJS((exports) => {
542
+ var util = require_util();
543
+ function generatedPositionAfter(mappingA, mappingB) {
544
+ var lineA = mappingA.generatedLine;
545
+ var lineB = mappingB.generatedLine;
546
+ var columnA = mappingA.generatedColumn;
547
+ var columnB = mappingB.generatedColumn;
548
+ return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
549
+ }
550
+ function MappingList() {
551
+ this._array = [];
552
+ this._sorted = true;
553
+ this._last = { generatedLine: -1, generatedColumn: 0 };
554
+ }
555
+ MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
556
+ this._array.forEach(aCallback, aThisArg);
557
+ };
558
+ MappingList.prototype.add = function MappingList_add(aMapping) {
559
+ if (generatedPositionAfter(this._last, aMapping)) {
560
+ this._last = aMapping;
561
+ this._array.push(aMapping);
562
+ } else {
563
+ this._sorted = false;
564
+ this._array.push(aMapping);
565
+ }
566
+ };
567
+ MappingList.prototype.toArray = function MappingList_toArray() {
568
+ if (!this._sorted) {
569
+ this._array.sort(util.compareByGeneratedPositionsInflated);
570
+ this._sorted = true;
571
+ }
572
+ return this._array;
573
+ };
574
+ exports.MappingList = MappingList;
575
+ });
576
+
577
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.js
578
+ var require_source_map_generator = __commonJS((exports) => {
579
+ var base64VLQ = require_base64_vlq();
580
+ var util = require_util();
581
+ var ArraySet = require_array_set().ArraySet;
582
+ var MappingList = require_mapping_list().MappingList;
583
+ function SourceMapGenerator(aArgs) {
584
+ if (!aArgs) {
585
+ aArgs = {};
586
+ }
587
+ this._file = util.getArg(aArgs, "file", null);
588
+ this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
589
+ this._skipValidation = util.getArg(aArgs, "skipValidation", false);
590
+ this._ignoreInvalidMapping = util.getArg(aArgs, "ignoreInvalidMapping", false);
591
+ this._sources = new ArraySet;
592
+ this._names = new ArraySet;
593
+ this._mappings = new MappingList;
594
+ this._sourcesContents = null;
595
+ }
596
+ SourceMapGenerator.prototype._version = 3;
597
+ SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) {
598
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
599
+ var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, {
600
+ file: aSourceMapConsumer.file,
601
+ sourceRoot
602
+ }));
603
+ aSourceMapConsumer.eachMapping(function(mapping) {
604
+ var newMapping = {
605
+ generated: {
606
+ line: mapping.generatedLine,
607
+ column: mapping.generatedColumn
608
+ }
609
+ };
610
+ if (mapping.source != null) {
611
+ newMapping.source = mapping.source;
612
+ if (sourceRoot != null) {
613
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
614
+ }
615
+ newMapping.original = {
616
+ line: mapping.originalLine,
617
+ column: mapping.originalColumn
618
+ };
619
+ if (mapping.name != null) {
620
+ newMapping.name = mapping.name;
621
+ }
622
+ }
623
+ generator.addMapping(newMapping);
624
+ });
625
+ aSourceMapConsumer.sources.forEach(function(sourceFile) {
626
+ var sourceRelative = sourceFile;
627
+ if (sourceRoot !== null) {
628
+ sourceRelative = util.relative(sourceRoot, sourceFile);
629
+ }
630
+ if (!generator._sources.has(sourceRelative)) {
631
+ generator._sources.add(sourceRelative);
632
+ }
633
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
634
+ if (content != null) {
635
+ generator.setSourceContent(sourceFile, content);
636
+ }
637
+ });
638
+ return generator;
639
+ };
640
+ SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
641
+ var generated = util.getArg(aArgs, "generated");
642
+ var original = util.getArg(aArgs, "original", null);
643
+ var source = util.getArg(aArgs, "source", null);
644
+ var name = util.getArg(aArgs, "name", null);
645
+ if (!this._skipValidation) {
646
+ if (this._validateMapping(generated, original, source, name) === false) {
647
+ return;
648
+ }
649
+ }
650
+ if (source != null) {
651
+ source = String(source);
652
+ if (!this._sources.has(source)) {
653
+ this._sources.add(source);
654
+ }
655
+ }
656
+ if (name != null) {
657
+ name = String(name);
658
+ if (!this._names.has(name)) {
659
+ this._names.add(name);
660
+ }
661
+ }
662
+ this._mappings.add({
663
+ generatedLine: generated.line,
664
+ generatedColumn: generated.column,
665
+ originalLine: original != null && original.line,
666
+ originalColumn: original != null && original.column,
667
+ source,
668
+ name
669
+ });
670
+ };
671
+ SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
672
+ var source = aSourceFile;
673
+ if (this._sourceRoot != null) {
674
+ source = util.relative(this._sourceRoot, source);
675
+ }
676
+ if (aSourceContent != null) {
677
+ if (!this._sourcesContents) {
678
+ this._sourcesContents = Object.create(null);
679
+ }
680
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
681
+ } else if (this._sourcesContents) {
682
+ delete this._sourcesContents[util.toSetString(source)];
683
+ if (Object.keys(this._sourcesContents).length === 0) {
684
+ this._sourcesContents = null;
685
+ }
686
+ }
687
+ };
688
+ SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
689
+ var sourceFile = aSourceFile;
690
+ if (aSourceFile == null) {
691
+ if (aSourceMapConsumer.file == null) {
692
+ throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, " + `or the source map's "file" property. Both were omitted.`);
693
+ }
694
+ sourceFile = aSourceMapConsumer.file;
695
+ }
696
+ var sourceRoot = this._sourceRoot;
697
+ if (sourceRoot != null) {
698
+ sourceFile = util.relative(sourceRoot, sourceFile);
699
+ }
700
+ var newSources = new ArraySet;
701
+ var newNames = new ArraySet;
702
+ this._mappings.unsortedForEach(function(mapping) {
703
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
704
+ var original = aSourceMapConsumer.originalPositionFor({
705
+ line: mapping.originalLine,
706
+ column: mapping.originalColumn
707
+ });
708
+ if (original.source != null) {
709
+ mapping.source = original.source;
710
+ if (aSourceMapPath != null) {
711
+ mapping.source = util.join(aSourceMapPath, mapping.source);
712
+ }
713
+ if (sourceRoot != null) {
714
+ mapping.source = util.relative(sourceRoot, mapping.source);
715
+ }
716
+ mapping.originalLine = original.line;
717
+ mapping.originalColumn = original.column;
718
+ if (original.name != null) {
719
+ mapping.name = original.name;
720
+ }
721
+ }
722
+ }
723
+ var source = mapping.source;
724
+ if (source != null && !newSources.has(source)) {
725
+ newSources.add(source);
726
+ }
727
+ var name = mapping.name;
728
+ if (name != null && !newNames.has(name)) {
729
+ newNames.add(name);
730
+ }
731
+ }, this);
732
+ this._sources = newSources;
733
+ this._names = newNames;
734
+ aSourceMapConsumer.sources.forEach(function(sourceFile2) {
735
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
736
+ if (content != null) {
737
+ if (aSourceMapPath != null) {
738
+ sourceFile2 = util.join(aSourceMapPath, sourceFile2);
739
+ }
740
+ if (sourceRoot != null) {
741
+ sourceFile2 = util.relative(sourceRoot, sourceFile2);
742
+ }
743
+ this.setSourceContent(sourceFile2, content);
744
+ }
745
+ }, this);
746
+ };
747
+ SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
748
+ if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
749
+ var message = "original.line and original.column are not numbers -- you probably meant to omit " + "the original mapping entirely and only map the generated position. If so, pass " + "null for the original mapping instead of an object with empty or null values.";
750
+ if (this._ignoreInvalidMapping) {
751
+ if (typeof console !== "undefined" && console.warn) {
752
+ console.warn(message);
753
+ }
754
+ return false;
755
+ } else {
756
+ throw new Error(message);
757
+ }
758
+ }
759
+ if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
760
+ return;
761
+ } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
762
+ return;
763
+ } else {
764
+ var message = "Invalid mapping: " + JSON.stringify({
765
+ generated: aGenerated,
766
+ source: aSource,
767
+ original: aOriginal,
768
+ name: aName
769
+ });
770
+ if (this._ignoreInvalidMapping) {
771
+ if (typeof console !== "undefined" && console.warn) {
772
+ console.warn(message);
773
+ }
774
+ return false;
775
+ } else {
776
+ throw new Error(message);
777
+ }
778
+ }
779
+ };
780
+ SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
781
+ var previousGeneratedColumn = 0;
782
+ var previousGeneratedLine = 1;
783
+ var previousOriginalColumn = 0;
784
+ var previousOriginalLine = 0;
785
+ var previousName = 0;
786
+ var previousSource = 0;
787
+ var result = "";
788
+ var next;
789
+ var mapping;
790
+ var nameIdx;
791
+ var sourceIdx;
792
+ var mappings = this._mappings.toArray();
793
+ for (var i = 0, len = mappings.length;i < len; i++) {
794
+ mapping = mappings[i];
795
+ next = "";
796
+ if (mapping.generatedLine !== previousGeneratedLine) {
797
+ previousGeneratedColumn = 0;
798
+ while (mapping.generatedLine !== previousGeneratedLine) {
799
+ next += ";";
800
+ previousGeneratedLine++;
801
+ }
802
+ } else {
803
+ if (i > 0) {
804
+ if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
805
+ continue;
806
+ }
807
+ next += ",";
808
+ }
809
+ }
810
+ next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
811
+ previousGeneratedColumn = mapping.generatedColumn;
812
+ if (mapping.source != null) {
813
+ sourceIdx = this._sources.indexOf(mapping.source);
814
+ next += base64VLQ.encode(sourceIdx - previousSource);
815
+ previousSource = sourceIdx;
816
+ next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
817
+ previousOriginalLine = mapping.originalLine - 1;
818
+ next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
819
+ previousOriginalColumn = mapping.originalColumn;
820
+ if (mapping.name != null) {
821
+ nameIdx = this._names.indexOf(mapping.name);
822
+ next += base64VLQ.encode(nameIdx - previousName);
823
+ previousName = nameIdx;
824
+ }
825
+ }
826
+ result += next;
827
+ }
828
+ return result;
829
+ };
830
+ SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
831
+ return aSources.map(function(source) {
832
+ if (!this._sourcesContents) {
833
+ return null;
834
+ }
835
+ if (aSourceRoot != null) {
836
+ source = util.relative(aSourceRoot, source);
837
+ }
838
+ var key = util.toSetString(source);
839
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
840
+ }, this);
841
+ };
842
+ SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
843
+ var map = {
844
+ version: this._version,
845
+ sources: this._sources.toArray(),
846
+ names: this._names.toArray(),
847
+ mappings: this._serializeMappings()
848
+ };
849
+ if (this._file != null) {
850
+ map.file = this._file;
851
+ }
852
+ if (this._sourceRoot != null) {
853
+ map.sourceRoot = this._sourceRoot;
854
+ }
855
+ if (this._sourcesContents) {
856
+ map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
857
+ }
858
+ return map;
859
+ };
860
+ SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
861
+ return JSON.stringify(this.toJSON());
862
+ };
863
+ exports.SourceMapGenerator = SourceMapGenerator;
864
+ });
865
+
866
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.js
867
+ var require_binary_search = __commonJS((exports) => {
868
+ exports.GREATEST_LOWER_BOUND = 1;
869
+ exports.LEAST_UPPER_BOUND = 2;
870
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
871
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
872
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
873
+ if (cmp === 0) {
874
+ return mid;
875
+ } else if (cmp > 0) {
876
+ if (aHigh - mid > 1) {
877
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
878
+ }
879
+ if (aBias == exports.LEAST_UPPER_BOUND) {
880
+ return aHigh < aHaystack.length ? aHigh : -1;
881
+ } else {
882
+ return mid;
883
+ }
884
+ } else {
885
+ if (mid - aLow > 1) {
886
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
887
+ }
888
+ if (aBias == exports.LEAST_UPPER_BOUND) {
889
+ return mid;
890
+ } else {
891
+ return aLow < 0 ? -1 : aLow;
892
+ }
893
+ }
894
+ }
895
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
896
+ if (aHaystack.length === 0) {
897
+ return -1;
898
+ }
899
+ var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
900
+ if (index < 0) {
901
+ return -1;
902
+ }
903
+ while (index - 1 >= 0) {
904
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
905
+ break;
906
+ }
907
+ --index;
908
+ }
909
+ return index;
910
+ };
911
+ });
912
+
913
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.js
914
+ var require_quick_sort = __commonJS((exports) => {
915
+ function SortTemplate(comparator) {
916
+ function swap(ary, x, y) {
917
+ var temp = ary[x];
918
+ ary[x] = ary[y];
919
+ ary[y] = temp;
920
+ }
921
+ function randomIntInRange(low, high) {
922
+ return Math.round(low + Math.random() * (high - low));
923
+ }
924
+ function doQuickSort(ary, comparator2, p, r) {
925
+ if (p < r) {
926
+ var pivotIndex = randomIntInRange(p, r);
927
+ var i = p - 1;
928
+ swap(ary, pivotIndex, r);
929
+ var pivot = ary[r];
930
+ for (var j = p;j < r; j++) {
931
+ if (comparator2(ary[j], pivot, false) <= 0) {
932
+ i += 1;
933
+ swap(ary, i, j);
934
+ }
935
+ }
936
+ swap(ary, i + 1, j);
937
+ var q = i + 1;
938
+ doQuickSort(ary, comparator2, p, q - 1);
939
+ doQuickSort(ary, comparator2, q + 1, r);
940
+ }
941
+ }
942
+ return doQuickSort;
943
+ }
944
+ function cloneSort(comparator) {
945
+ let template = SortTemplate.toString();
946
+ let templateFn = new Function(`return ${template}`)();
947
+ return templateFn(comparator);
948
+ }
949
+ var sortCache = new WeakMap;
950
+ exports.quickSort = function(ary, comparator, start = 0) {
951
+ let doQuickSort = sortCache.get(comparator);
952
+ if (doQuickSort === undefined) {
953
+ doQuickSort = cloneSort(comparator);
954
+ sortCache.set(comparator, doQuickSort);
955
+ }
956
+ doQuickSort(ary, comparator, start, ary.length - 1);
957
+ };
958
+ });
959
+
960
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.js
961
+ var require_source_map_consumer = __commonJS((exports) => {
962
+ var util = require_util();
963
+ var binarySearch = require_binary_search();
964
+ var ArraySet = require_array_set().ArraySet;
965
+ var base64VLQ = require_base64_vlq();
966
+ var quickSort = require_quick_sort().quickSort;
967
+ function SourceMapConsumer(aSourceMap, aSourceMapURL) {
968
+ var sourceMap = aSourceMap;
969
+ if (typeof aSourceMap === "string") {
970
+ sourceMap = util.parseSourceMapInput(aSourceMap);
971
+ }
972
+ return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
973
+ }
974
+ SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
975
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
976
+ };
977
+ SourceMapConsumer.prototype._version = 3;
978
+ SourceMapConsumer.prototype.__generatedMappings = null;
979
+ Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
980
+ configurable: true,
981
+ enumerable: true,
982
+ get: function() {
983
+ if (!this.__generatedMappings) {
984
+ this._parseMappings(this._mappings, this.sourceRoot);
985
+ }
986
+ return this.__generatedMappings;
987
+ }
988
+ });
989
+ SourceMapConsumer.prototype.__originalMappings = null;
990
+ Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
991
+ configurable: true,
992
+ enumerable: true,
993
+ get: function() {
994
+ if (!this.__originalMappings) {
995
+ this._parseMappings(this._mappings, this.sourceRoot);
996
+ }
997
+ return this.__originalMappings;
998
+ }
999
+ });
1000
+ SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
1001
+ var c = aStr.charAt(index);
1002
+ return c === ";" || c === ",";
1003
+ };
1004
+ SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
1005
+ throw new Error("Subclasses must implement _parseMappings");
1006
+ };
1007
+ SourceMapConsumer.GENERATED_ORDER = 1;
1008
+ SourceMapConsumer.ORIGINAL_ORDER = 2;
1009
+ SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
1010
+ SourceMapConsumer.LEAST_UPPER_BOUND = 2;
1011
+ SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
1012
+ var context = aContext || null;
1013
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
1014
+ var mappings;
1015
+ switch (order) {
1016
+ case SourceMapConsumer.GENERATED_ORDER:
1017
+ mappings = this._generatedMappings;
1018
+ break;
1019
+ case SourceMapConsumer.ORIGINAL_ORDER:
1020
+ mappings = this._originalMappings;
1021
+ break;
1022
+ default:
1023
+ throw new Error("Unknown order of iteration.");
1024
+ }
1025
+ var sourceRoot = this.sourceRoot;
1026
+ var boundCallback = aCallback.bind(context);
1027
+ var names = this._names;
1028
+ var sources = this._sources;
1029
+ var sourceMapURL = this._sourceMapURL;
1030
+ for (var i = 0, n = mappings.length;i < n; i++) {
1031
+ var mapping = mappings[i];
1032
+ var source = mapping.source === null ? null : sources.at(mapping.source);
1033
+ if (source !== null) {
1034
+ source = util.computeSourceURL(sourceRoot, source, sourceMapURL);
1035
+ }
1036
+ boundCallback({
1037
+ source,
1038
+ generatedLine: mapping.generatedLine,
1039
+ generatedColumn: mapping.generatedColumn,
1040
+ originalLine: mapping.originalLine,
1041
+ originalColumn: mapping.originalColumn,
1042
+ name: mapping.name === null ? null : names.at(mapping.name)
1043
+ });
1044
+ }
1045
+ };
1046
+ SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
1047
+ var line = util.getArg(aArgs, "line");
1048
+ var needle = {
1049
+ source: util.getArg(aArgs, "source"),
1050
+ originalLine: line,
1051
+ originalColumn: util.getArg(aArgs, "column", 0)
1052
+ };
1053
+ needle.source = this._findSourceIndex(needle.source);
1054
+ if (needle.source < 0) {
1055
+ return [];
1056
+ }
1057
+ var mappings = [];
1058
+ var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
1059
+ if (index >= 0) {
1060
+ var mapping = this._originalMappings[index];
1061
+ if (aArgs.column === undefined) {
1062
+ var originalLine = mapping.originalLine;
1063
+ while (mapping && mapping.originalLine === originalLine) {
1064
+ mappings.push({
1065
+ line: util.getArg(mapping, "generatedLine", null),
1066
+ column: util.getArg(mapping, "generatedColumn", null),
1067
+ lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
1068
+ });
1069
+ mapping = this._originalMappings[++index];
1070
+ }
1071
+ } else {
1072
+ var originalColumn = mapping.originalColumn;
1073
+ while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
1074
+ mappings.push({
1075
+ line: util.getArg(mapping, "generatedLine", null),
1076
+ column: util.getArg(mapping, "generatedColumn", null),
1077
+ lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
1078
+ });
1079
+ mapping = this._originalMappings[++index];
1080
+ }
1081
+ }
1082
+ }
1083
+ return mappings;
1084
+ };
1085
+ exports.SourceMapConsumer = SourceMapConsumer;
1086
+ function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
1087
+ var sourceMap = aSourceMap;
1088
+ if (typeof aSourceMap === "string") {
1089
+ sourceMap = util.parseSourceMapInput(aSourceMap);
1090
+ }
1091
+ var version = util.getArg(sourceMap, "version");
1092
+ var sources = util.getArg(sourceMap, "sources");
1093
+ var names = util.getArg(sourceMap, "names", []);
1094
+ var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
1095
+ var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
1096
+ var mappings = util.getArg(sourceMap, "mappings");
1097
+ var file = util.getArg(sourceMap, "file", null);
1098
+ if (version != this._version) {
1099
+ throw new Error("Unsupported version: " + version);
1100
+ }
1101
+ if (sourceRoot) {
1102
+ sourceRoot = util.normalize(sourceRoot);
1103
+ }
1104
+ sources = sources.map(String).map(util.normalize).map(function(source) {
1105
+ return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
1106
+ });
1107
+ this._names = ArraySet.fromArray(names.map(String), true);
1108
+ this._sources = ArraySet.fromArray(sources, true);
1109
+ this._absoluteSources = this._sources.toArray().map(function(s) {
1110
+ return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
1111
+ });
1112
+ this.sourceRoot = sourceRoot;
1113
+ this.sourcesContent = sourcesContent;
1114
+ this._mappings = mappings;
1115
+ this._sourceMapURL = aSourceMapURL;
1116
+ this.file = file;
1117
+ }
1118
+ BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
1119
+ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
1120
+ BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
1121
+ var relativeSource = aSource;
1122
+ if (this.sourceRoot != null) {
1123
+ relativeSource = util.relative(this.sourceRoot, relativeSource);
1124
+ }
1125
+ if (this._sources.has(relativeSource)) {
1126
+ return this._sources.indexOf(relativeSource);
1127
+ }
1128
+ var i;
1129
+ for (i = 0;i < this._absoluteSources.length; ++i) {
1130
+ if (this._absoluteSources[i] == aSource) {
1131
+ return i;
1132
+ }
1133
+ }
1134
+ return -1;
1135
+ };
1136
+ BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
1137
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
1138
+ var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
1139
+ var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
1140
+ smc.sourceRoot = aSourceMap._sourceRoot;
1141
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
1142
+ smc.file = aSourceMap._file;
1143
+ smc._sourceMapURL = aSourceMapURL;
1144
+ smc._absoluteSources = smc._sources.toArray().map(function(s) {
1145
+ return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
1146
+ });
1147
+ var generatedMappings = aSourceMap._mappings.toArray().slice();
1148
+ var destGeneratedMappings = smc.__generatedMappings = [];
1149
+ var destOriginalMappings = smc.__originalMappings = [];
1150
+ for (var i = 0, length = generatedMappings.length;i < length; i++) {
1151
+ var srcMapping = generatedMappings[i];
1152
+ var destMapping = new Mapping;
1153
+ destMapping.generatedLine = srcMapping.generatedLine;
1154
+ destMapping.generatedColumn = srcMapping.generatedColumn;
1155
+ if (srcMapping.source) {
1156
+ destMapping.source = sources.indexOf(srcMapping.source);
1157
+ destMapping.originalLine = srcMapping.originalLine;
1158
+ destMapping.originalColumn = srcMapping.originalColumn;
1159
+ if (srcMapping.name) {
1160
+ destMapping.name = names.indexOf(srcMapping.name);
1161
+ }
1162
+ destOriginalMappings.push(destMapping);
1163
+ }
1164
+ destGeneratedMappings.push(destMapping);
1165
+ }
1166
+ quickSort(smc.__originalMappings, util.compareByOriginalPositions);
1167
+ return smc;
1168
+ };
1169
+ BasicSourceMapConsumer.prototype._version = 3;
1170
+ Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
1171
+ get: function() {
1172
+ return this._absoluteSources.slice();
1173
+ }
1174
+ });
1175
+ function Mapping() {
1176
+ this.generatedLine = 0;
1177
+ this.generatedColumn = 0;
1178
+ this.source = null;
1179
+ this.originalLine = null;
1180
+ this.originalColumn = null;
1181
+ this.name = null;
1182
+ }
1183
+ var compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine;
1184
+ function sortGenerated(array, start) {
1185
+ let l = array.length;
1186
+ let n = array.length - start;
1187
+ if (n <= 1) {
1188
+ return;
1189
+ } else if (n == 2) {
1190
+ let a = array[start];
1191
+ let b = array[start + 1];
1192
+ if (compareGenerated(a, b) > 0) {
1193
+ array[start] = b;
1194
+ array[start + 1] = a;
1195
+ }
1196
+ } else if (n < 20) {
1197
+ for (let i = start;i < l; i++) {
1198
+ for (let j = i;j > start; j--) {
1199
+ let a = array[j - 1];
1200
+ let b = array[j];
1201
+ if (compareGenerated(a, b) <= 0) {
1202
+ break;
1203
+ }
1204
+ array[j - 1] = b;
1205
+ array[j] = a;
1206
+ }
1207
+ }
1208
+ } else {
1209
+ quickSort(array, compareGenerated, start);
1210
+ }
1211
+ }
1212
+ BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
1213
+ var generatedLine = 1;
1214
+ var previousGeneratedColumn = 0;
1215
+ var previousOriginalLine = 0;
1216
+ var previousOriginalColumn = 0;
1217
+ var previousSource = 0;
1218
+ var previousName = 0;
1219
+ var length = aStr.length;
1220
+ var index = 0;
1221
+ var cachedSegments = {};
1222
+ var temp = {};
1223
+ var originalMappings = [];
1224
+ var generatedMappings = [];
1225
+ var mapping, str, segment, end, value;
1226
+ let subarrayStart = 0;
1227
+ while (index < length) {
1228
+ if (aStr.charAt(index) === ";") {
1229
+ generatedLine++;
1230
+ index++;
1231
+ previousGeneratedColumn = 0;
1232
+ sortGenerated(generatedMappings, subarrayStart);
1233
+ subarrayStart = generatedMappings.length;
1234
+ } else if (aStr.charAt(index) === ",") {
1235
+ index++;
1236
+ } else {
1237
+ mapping = new Mapping;
1238
+ mapping.generatedLine = generatedLine;
1239
+ for (end = index;end < length; end++) {
1240
+ if (this._charIsMappingSeparator(aStr, end)) {
1241
+ break;
1242
+ }
1243
+ }
1244
+ str = aStr.slice(index, end);
1245
+ segment = [];
1246
+ while (index < end) {
1247
+ base64VLQ.decode(aStr, index, temp);
1248
+ value = temp.value;
1249
+ index = temp.rest;
1250
+ segment.push(value);
1251
+ }
1252
+ if (segment.length === 2) {
1253
+ throw new Error("Found a source, but no line and column");
1254
+ }
1255
+ if (segment.length === 3) {
1256
+ throw new Error("Found a source and line, but no column");
1257
+ }
1258
+ mapping.generatedColumn = previousGeneratedColumn + segment[0];
1259
+ previousGeneratedColumn = mapping.generatedColumn;
1260
+ if (segment.length > 1) {
1261
+ mapping.source = previousSource + segment[1];
1262
+ previousSource += segment[1];
1263
+ mapping.originalLine = previousOriginalLine + segment[2];
1264
+ previousOriginalLine = mapping.originalLine;
1265
+ mapping.originalLine += 1;
1266
+ mapping.originalColumn = previousOriginalColumn + segment[3];
1267
+ previousOriginalColumn = mapping.originalColumn;
1268
+ if (segment.length > 4) {
1269
+ mapping.name = previousName + segment[4];
1270
+ previousName += segment[4];
1271
+ }
1272
+ }
1273
+ generatedMappings.push(mapping);
1274
+ if (typeof mapping.originalLine === "number") {
1275
+ let currentSource = mapping.source;
1276
+ while (originalMappings.length <= currentSource) {
1277
+ originalMappings.push(null);
1278
+ }
1279
+ if (originalMappings[currentSource] === null) {
1280
+ originalMappings[currentSource] = [];
1281
+ }
1282
+ originalMappings[currentSource].push(mapping);
1283
+ }
1284
+ }
1285
+ }
1286
+ sortGenerated(generatedMappings, subarrayStart);
1287
+ this.__generatedMappings = generatedMappings;
1288
+ for (var i = 0;i < originalMappings.length; i++) {
1289
+ if (originalMappings[i] != null) {
1290
+ quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource);
1291
+ }
1292
+ }
1293
+ this.__originalMappings = [].concat(...originalMappings);
1294
+ };
1295
+ BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
1296
+ if (aNeedle[aLineName] <= 0) {
1297
+ throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
1298
+ }
1299
+ if (aNeedle[aColumnName] < 0) {
1300
+ throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
1301
+ }
1302
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
1303
+ };
1304
+ BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
1305
+ for (var index = 0;index < this._generatedMappings.length; ++index) {
1306
+ var mapping = this._generatedMappings[index];
1307
+ if (index + 1 < this._generatedMappings.length) {
1308
+ var nextMapping = this._generatedMappings[index + 1];
1309
+ if (mapping.generatedLine === nextMapping.generatedLine) {
1310
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
1311
+ continue;
1312
+ }
1313
+ }
1314
+ mapping.lastGeneratedColumn = Infinity;
1315
+ }
1316
+ };
1317
+ BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
1318
+ var needle = {
1319
+ generatedLine: util.getArg(aArgs, "line"),
1320
+ generatedColumn: util.getArg(aArgs, "column")
1321
+ };
1322
+ var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
1323
+ if (index >= 0) {
1324
+ var mapping = this._generatedMappings[index];
1325
+ if (mapping.generatedLine === needle.generatedLine) {
1326
+ var source = util.getArg(mapping, "source", null);
1327
+ if (source !== null) {
1328
+ source = this._sources.at(source);
1329
+ source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
1330
+ }
1331
+ var name = util.getArg(mapping, "name", null);
1332
+ if (name !== null) {
1333
+ name = this._names.at(name);
1334
+ }
1335
+ return {
1336
+ source,
1337
+ line: util.getArg(mapping, "originalLine", null),
1338
+ column: util.getArg(mapping, "originalColumn", null),
1339
+ name
1340
+ };
1341
+ }
1342
+ }
1343
+ return {
1344
+ source: null,
1345
+ line: null,
1346
+ column: null,
1347
+ name: null
1348
+ };
1349
+ };
1350
+ BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
1351
+ if (!this.sourcesContent) {
1352
+ return false;
1353
+ }
1354
+ return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
1355
+ return sc == null;
1356
+ });
1357
+ };
1358
+ BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
1359
+ if (!this.sourcesContent) {
1360
+ return null;
1361
+ }
1362
+ var index = this._findSourceIndex(aSource);
1363
+ if (index >= 0) {
1364
+ return this.sourcesContent[index];
1365
+ }
1366
+ var relativeSource = aSource;
1367
+ if (this.sourceRoot != null) {
1368
+ relativeSource = util.relative(this.sourceRoot, relativeSource);
1369
+ }
1370
+ var url;
1371
+ if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
1372
+ var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
1373
+ if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
1374
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
1375
+ }
1376
+ if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
1377
+ return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
1378
+ }
1379
+ }
1380
+ if (nullOnMissing) {
1381
+ return null;
1382
+ } else {
1383
+ throw new Error('"' + relativeSource + '" is not in the SourceMap.');
1384
+ }
1385
+ };
1386
+ BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
1387
+ var source = util.getArg(aArgs, "source");
1388
+ source = this._findSourceIndex(source);
1389
+ if (source < 0) {
1390
+ return {
1391
+ line: null,
1392
+ column: null,
1393
+ lastColumn: null
1394
+ };
1395
+ }
1396
+ var needle = {
1397
+ source,
1398
+ originalLine: util.getArg(aArgs, "line"),
1399
+ originalColumn: util.getArg(aArgs, "column")
1400
+ };
1401
+ var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
1402
+ if (index >= 0) {
1403
+ var mapping = this._originalMappings[index];
1404
+ if (mapping.source === needle.source) {
1405
+ return {
1406
+ line: util.getArg(mapping, "generatedLine", null),
1407
+ column: util.getArg(mapping, "generatedColumn", null),
1408
+ lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
1409
+ };
1410
+ }
1411
+ }
1412
+ return {
1413
+ line: null,
1414
+ column: null,
1415
+ lastColumn: null
1416
+ };
1417
+ };
1418
+ exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
1419
+ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
1420
+ var sourceMap = aSourceMap;
1421
+ if (typeof aSourceMap === "string") {
1422
+ sourceMap = util.parseSourceMapInput(aSourceMap);
1423
+ }
1424
+ var version = util.getArg(sourceMap, "version");
1425
+ var sections = util.getArg(sourceMap, "sections");
1426
+ if (version != this._version) {
1427
+ throw new Error("Unsupported version: " + version);
1428
+ }
1429
+ this._sources = new ArraySet;
1430
+ this._names = new ArraySet;
1431
+ var lastOffset = {
1432
+ line: -1,
1433
+ column: 0
1434
+ };
1435
+ this._sections = sections.map(function(s) {
1436
+ if (s.url) {
1437
+ throw new Error("Support for url field in sections not implemented.");
1438
+ }
1439
+ var offset = util.getArg(s, "offset");
1440
+ var offsetLine = util.getArg(offset, "line");
1441
+ var offsetColumn = util.getArg(offset, "column");
1442
+ if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
1443
+ throw new Error("Section offsets must be ordered and non-overlapping.");
1444
+ }
1445
+ lastOffset = offset;
1446
+ return {
1447
+ generatedOffset: {
1448
+ generatedLine: offsetLine + 1,
1449
+ generatedColumn: offsetColumn + 1
1450
+ },
1451
+ consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL)
1452
+ };
1453
+ });
1454
+ }
1455
+ IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
1456
+ IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
1457
+ IndexedSourceMapConsumer.prototype._version = 3;
1458
+ Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
1459
+ get: function() {
1460
+ var sources = [];
1461
+ for (var i = 0;i < this._sections.length; i++) {
1462
+ for (var j = 0;j < this._sections[i].consumer.sources.length; j++) {
1463
+ sources.push(this._sections[i].consumer.sources[j]);
1464
+ }
1465
+ }
1466
+ return sources;
1467
+ }
1468
+ });
1469
+ IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
1470
+ var needle = {
1471
+ generatedLine: util.getArg(aArgs, "line"),
1472
+ generatedColumn: util.getArg(aArgs, "column")
1473
+ };
1474
+ var sectionIndex = binarySearch.search(needle, this._sections, function(needle2, section2) {
1475
+ var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
1476
+ if (cmp) {
1477
+ return cmp;
1478
+ }
1479
+ return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
1480
+ });
1481
+ var section = this._sections[sectionIndex];
1482
+ if (!section) {
1483
+ return {
1484
+ source: null,
1485
+ line: null,
1486
+ column: null,
1487
+ name: null
1488
+ };
1489
+ }
1490
+ return section.consumer.originalPositionFor({
1491
+ line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
1492
+ column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
1493
+ bias: aArgs.bias
1494
+ });
1495
+ };
1496
+ IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
1497
+ return this._sections.every(function(s) {
1498
+ return s.consumer.hasContentsOfAllSources();
1499
+ });
1500
+ };
1501
+ IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
1502
+ for (var i = 0;i < this._sections.length; i++) {
1503
+ var section = this._sections[i];
1504
+ var content = section.consumer.sourceContentFor(aSource, true);
1505
+ if (content || content === "") {
1506
+ return content;
1507
+ }
1508
+ }
1509
+ if (nullOnMissing) {
1510
+ return null;
1511
+ } else {
1512
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
1513
+ }
1514
+ };
1515
+ IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
1516
+ for (var i = 0;i < this._sections.length; i++) {
1517
+ var section = this._sections[i];
1518
+ if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) {
1519
+ continue;
1520
+ }
1521
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
1522
+ if (generatedPosition) {
1523
+ var ret = {
1524
+ line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
1525
+ column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
1526
+ };
1527
+ return ret;
1528
+ }
1529
+ }
1530
+ return {
1531
+ line: null,
1532
+ column: null
1533
+ };
1534
+ };
1535
+ IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
1536
+ this.__generatedMappings = [];
1537
+ this.__originalMappings = [];
1538
+ for (var i = 0;i < this._sections.length; i++) {
1539
+ var section = this._sections[i];
1540
+ var sectionMappings = section.consumer._generatedMappings;
1541
+ for (var j = 0;j < sectionMappings.length; j++) {
1542
+ var mapping = sectionMappings[j];
1543
+ var source = section.consumer._sources.at(mapping.source);
1544
+ if (source !== null) {
1545
+ source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
1546
+ }
1547
+ this._sources.add(source);
1548
+ source = this._sources.indexOf(source);
1549
+ var name = null;
1550
+ if (mapping.name) {
1551
+ name = section.consumer._names.at(mapping.name);
1552
+ this._names.add(name);
1553
+ name = this._names.indexOf(name);
1554
+ }
1555
+ var adjustedMapping = {
1556
+ source,
1557
+ generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
1558
+ generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
1559
+ originalLine: mapping.originalLine,
1560
+ originalColumn: mapping.originalColumn,
1561
+ name
1562
+ };
1563
+ this.__generatedMappings.push(adjustedMapping);
1564
+ if (typeof adjustedMapping.originalLine === "number") {
1565
+ this.__originalMappings.push(adjustedMapping);
1566
+ }
1567
+ }
1568
+ }
1569
+ quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
1570
+ quickSort(this.__originalMappings, util.compareByOriginalPositions);
1571
+ };
1572
+ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
1573
+ });
1574
+
1575
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.js
1576
+ var require_source_node = __commonJS((exports) => {
1577
+ var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
1578
+ var util = require_util();
1579
+ var REGEX_NEWLINE = /(\r?\n)/;
1580
+ var NEWLINE_CODE = 10;
1581
+ var isSourceNode = "$$$isSourceNode$$$";
1582
+ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
1583
+ this.children = [];
1584
+ this.sourceContents = {};
1585
+ this.line = aLine == null ? null : aLine;
1586
+ this.column = aColumn == null ? null : aColumn;
1587
+ this.source = aSource == null ? null : aSource;
1588
+ this.name = aName == null ? null : aName;
1589
+ this[isSourceNode] = true;
1590
+ if (aChunks != null)
1591
+ this.add(aChunks);
1592
+ }
1593
+ SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
1594
+ var node = new SourceNode;
1595
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
1596
+ var remainingLinesIndex = 0;
1597
+ var shiftNextLine = function() {
1598
+ var lineContents = getNextLine();
1599
+ var newLine = getNextLine() || "";
1600
+ return lineContents + newLine;
1601
+ function getNextLine() {
1602
+ return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined;
1603
+ }
1604
+ };
1605
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
1606
+ var lastMapping = null;
1607
+ aSourceMapConsumer.eachMapping(function(mapping) {
1608
+ if (lastMapping !== null) {
1609
+ if (lastGeneratedLine < mapping.generatedLine) {
1610
+ addMappingWithCode(lastMapping, shiftNextLine());
1611
+ lastGeneratedLine++;
1612
+ lastGeneratedColumn = 0;
1613
+ } else {
1614
+ var nextLine = remainingLines[remainingLinesIndex] || "";
1615
+ var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
1616
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
1617
+ lastGeneratedColumn = mapping.generatedColumn;
1618
+ addMappingWithCode(lastMapping, code);
1619
+ lastMapping = mapping;
1620
+ return;
1621
+ }
1622
+ }
1623
+ while (lastGeneratedLine < mapping.generatedLine) {
1624
+ node.add(shiftNextLine());
1625
+ lastGeneratedLine++;
1626
+ }
1627
+ if (lastGeneratedColumn < mapping.generatedColumn) {
1628
+ var nextLine = remainingLines[remainingLinesIndex] || "";
1629
+ node.add(nextLine.substr(0, mapping.generatedColumn));
1630
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
1631
+ lastGeneratedColumn = mapping.generatedColumn;
1632
+ }
1633
+ lastMapping = mapping;
1634
+ }, this);
1635
+ if (remainingLinesIndex < remainingLines.length) {
1636
+ if (lastMapping) {
1637
+ addMappingWithCode(lastMapping, shiftNextLine());
1638
+ }
1639
+ node.add(remainingLines.splice(remainingLinesIndex).join(""));
1640
+ }
1641
+ aSourceMapConsumer.sources.forEach(function(sourceFile) {
1642
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
1643
+ if (content != null) {
1644
+ if (aRelativePath != null) {
1645
+ sourceFile = util.join(aRelativePath, sourceFile);
1646
+ }
1647
+ node.setSourceContent(sourceFile, content);
1648
+ }
1649
+ });
1650
+ return node;
1651
+ function addMappingWithCode(mapping, code) {
1652
+ if (mapping === null || mapping.source === undefined) {
1653
+ node.add(code);
1654
+ } else {
1655
+ var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
1656
+ node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
1657
+ }
1658
+ }
1659
+ };
1660
+ SourceNode.prototype.add = function SourceNode_add(aChunk) {
1661
+ if (Array.isArray(aChunk)) {
1662
+ aChunk.forEach(function(chunk) {
1663
+ this.add(chunk);
1664
+ }, this);
1665
+ } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
1666
+ if (aChunk) {
1667
+ this.children.push(aChunk);
1668
+ }
1669
+ } else {
1670
+ throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
1671
+ }
1672
+ return this;
1673
+ };
1674
+ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
1675
+ if (Array.isArray(aChunk)) {
1676
+ for (var i = aChunk.length - 1;i >= 0; i--) {
1677
+ this.prepend(aChunk[i]);
1678
+ }
1679
+ } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
1680
+ this.children.unshift(aChunk);
1681
+ } else {
1682
+ throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
1683
+ }
1684
+ return this;
1685
+ };
1686
+ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
1687
+ var chunk;
1688
+ for (var i = 0, len = this.children.length;i < len; i++) {
1689
+ chunk = this.children[i];
1690
+ if (chunk[isSourceNode]) {
1691
+ chunk.walk(aFn);
1692
+ } else {
1693
+ if (chunk !== "") {
1694
+ aFn(chunk, {
1695
+ source: this.source,
1696
+ line: this.line,
1697
+ column: this.column,
1698
+ name: this.name
1699
+ });
1700
+ }
1701
+ }
1702
+ }
1703
+ };
1704
+ SourceNode.prototype.join = function SourceNode_join(aSep) {
1705
+ var newChildren;
1706
+ var i;
1707
+ var len = this.children.length;
1708
+ if (len > 0) {
1709
+ newChildren = [];
1710
+ for (i = 0;i < len - 1; i++) {
1711
+ newChildren.push(this.children[i]);
1712
+ newChildren.push(aSep);
1713
+ }
1714
+ newChildren.push(this.children[i]);
1715
+ this.children = newChildren;
1716
+ }
1717
+ return this;
1718
+ };
1719
+ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
1720
+ var lastChild = this.children[this.children.length - 1];
1721
+ if (lastChild[isSourceNode]) {
1722
+ lastChild.replaceRight(aPattern, aReplacement);
1723
+ } else if (typeof lastChild === "string") {
1724
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
1725
+ } else {
1726
+ this.children.push("".replace(aPattern, aReplacement));
1727
+ }
1728
+ return this;
1729
+ };
1730
+ SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
1731
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
1732
+ };
1733
+ SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
1734
+ for (var i = 0, len = this.children.length;i < len; i++) {
1735
+ if (this.children[i][isSourceNode]) {
1736
+ this.children[i].walkSourceContents(aFn);
1737
+ }
1738
+ }
1739
+ var sources = Object.keys(this.sourceContents);
1740
+ for (var i = 0, len = sources.length;i < len; i++) {
1741
+ aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
1742
+ }
1743
+ };
1744
+ SourceNode.prototype.toString = function SourceNode_toString() {
1745
+ var str = "";
1746
+ this.walk(function(chunk) {
1747
+ str += chunk;
1748
+ });
1749
+ return str;
1750
+ };
1751
+ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
1752
+ var generated = {
1753
+ code: "",
1754
+ line: 1,
1755
+ column: 0
1756
+ };
1757
+ var map = new SourceMapGenerator(aArgs);
1758
+ var sourceMappingActive = false;
1759
+ var lastOriginalSource = null;
1760
+ var lastOriginalLine = null;
1761
+ var lastOriginalColumn = null;
1762
+ var lastOriginalName = null;
1763
+ this.walk(function(chunk, original) {
1764
+ generated.code += chunk;
1765
+ if (original.source !== null && original.line !== null && original.column !== null) {
1766
+ if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
1767
+ map.addMapping({
1768
+ source: original.source,
1769
+ original: {
1770
+ line: original.line,
1771
+ column: original.column
1772
+ },
1773
+ generated: {
1774
+ line: generated.line,
1775
+ column: generated.column
1776
+ },
1777
+ name: original.name
1778
+ });
1779
+ }
1780
+ lastOriginalSource = original.source;
1781
+ lastOriginalLine = original.line;
1782
+ lastOriginalColumn = original.column;
1783
+ lastOriginalName = original.name;
1784
+ sourceMappingActive = true;
1785
+ } else if (sourceMappingActive) {
1786
+ map.addMapping({
1787
+ generated: {
1788
+ line: generated.line,
1789
+ column: generated.column
1790
+ }
1791
+ });
1792
+ lastOriginalSource = null;
1793
+ sourceMappingActive = false;
1794
+ }
1795
+ for (var idx = 0, length = chunk.length;idx < length; idx++) {
1796
+ if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
1797
+ generated.line++;
1798
+ generated.column = 0;
1799
+ if (idx + 1 === length) {
1800
+ lastOriginalSource = null;
1801
+ sourceMappingActive = false;
1802
+ } else if (sourceMappingActive) {
1803
+ map.addMapping({
1804
+ source: original.source,
1805
+ original: {
1806
+ line: original.line,
1807
+ column: original.column
1808
+ },
1809
+ generated: {
1810
+ line: generated.line,
1811
+ column: generated.column
1812
+ },
1813
+ name: original.name
1814
+ });
1815
+ }
1816
+ } else {
1817
+ generated.column++;
1818
+ }
1819
+ }
1820
+ });
1821
+ this.walkSourceContents(function(sourceFile, sourceContent) {
1822
+ map.setSourceContent(sourceFile, sourceContent);
1823
+ });
1824
+ return { code: generated.code, map };
1825
+ };
1826
+ exports.SourceNode = SourceNode;
1827
+ });
19
1828
 
20
1829
  // src/devtools/core/ActionDevtoolsCore.ts
21
1830
  function extractRouting(context) {
@@ -133,6 +1942,12 @@ import { useCallback, useEffect as useEffect3, useMemo as useMemo2, useRef as us
133
1942
  // src/devtools/browser/components/ActionDetailPanel.tsx
134
1943
  import { useMemo, useState as useState5 } from "react";
135
1944
 
1945
+ // src/devtools/core/devtools_colors.ts
1946
+ var DEVTOOL_COLOR_HANDLER_LOCAL_TEXT = "#34bb89";
1947
+ var DEVTOOL_COLOR_HANDLER_LOCAL_BORDER = "#144427";
1948
+ var DEVTOOL_COLOR_HANDLER_EXTERNAL_TEXT = "#cfa12a";
1949
+ var DEVTOOL_COLOR_HANDLER_EXTERNAL_BORDER = "#723917";
1950
+
136
1951
  // src/devtools/browser/components/DomainChip.tsx
137
1952
  import { createContext, useContext, useRef } from "react";
138
1953
  import { jsxDEV } from "react/jsx-dev-runtime";
@@ -244,6 +2059,66 @@ function DomainChip({
244
2059
  }, undefined, true, undefined, this);
245
2060
  }
246
2061
 
2062
+ // src/devtools/browser/components/Chip.tsx
2063
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
2064
+ function Chip({
2065
+ color,
2066
+ borderColor,
2067
+ fontSize = "8px",
2068
+ padding = "1px 4px",
2069
+ children,
2070
+ style
2071
+ }) {
2072
+ return /* @__PURE__ */ jsxDEV2("span", {
2073
+ style: {
2074
+ color,
2075
+ fontSize,
2076
+ background: "#0f172a",
2077
+ border: `1px solid ${borderColor}`,
2078
+ padding,
2079
+ borderRadius: "3px",
2080
+ flexShrink: 0,
2081
+ whiteSpace: "nowrap",
2082
+ ...style
2083
+ },
2084
+ children
2085
+ }, undefined, false, undefined, this);
2086
+ }
2087
+
2088
+ // src/devtools/browser/components/HandlerChips.tsx
2089
+ import { jsxDEV as jsxDEV3, Fragment } from "react/jsx-dev-runtime";
2090
+ function getExternalLabel(hop) {
2091
+ if (hop.handlerType !== "external")
2092
+ return null;
2093
+ return hop.handlerClient != null ? `${hop.transport ?? "ext"} → ${hop.handlerClient.envId}` : `→ ${hop.transport ?? "ext"}`;
2094
+ }
2095
+ function HandlerChips({ entry, size }) {
2096
+ const firstHop = entry.meta.routing[0];
2097
+ const localEnvId = firstHop != null ? firstHop.runtime.envId : null;
2098
+ const externalLabel = firstHop != null ? getExternalLabel(firstHop) : null;
2099
+ const fontSize = size === "md" ? "1em" : "0.8em";
2100
+ const padding = size === "md" ? "1px 5px" : "1px 4px";
2101
+ const firstHopIsLocal = firstHop != null && firstHop.handlerType === "local";
2102
+ return /* @__PURE__ */ jsxDEV3(Fragment, {
2103
+ children: [
2104
+ localEnvId != null && (firstHopIsLocal || externalLabel == null) && /* @__PURE__ */ jsxDEV3(Chip, {
2105
+ color: DEVTOOL_COLOR_HANDLER_LOCAL_TEXT,
2106
+ borderColor: DEVTOOL_COLOR_HANDLER_LOCAL_BORDER,
2107
+ fontSize,
2108
+ padding,
2109
+ children: "local"
2110
+ }, undefined, false, undefined, this),
2111
+ externalLabel != null && /* @__PURE__ */ jsxDEV3(Chip, {
2112
+ color: DEVTOOL_COLOR_HANDLER_EXTERNAL_TEXT,
2113
+ borderColor: DEVTOOL_COLOR_HANDLER_EXTERNAL_BORDER,
2114
+ fontSize,
2115
+ padding,
2116
+ children: externalLabel
2117
+ }, undefined, false, undefined, this)
2118
+ ]
2119
+ }, undefined, true, undefined, this);
2120
+ }
2121
+
247
2122
  // src/devtools/browser/components/RunningTimer.tsx
248
2123
  import { useEffect, useState } from "react";
249
2124
 
@@ -291,14 +2166,14 @@ function formatTimestamp(startTime) {
291
2166
  }
292
2167
 
293
2168
  // src/devtools/browser/components/RunningTimer.tsx
294
- import { jsxDEV as jsxDEV2, Fragment } from "react/jsx-dev-runtime";
2169
+ import { jsxDEV as jsxDEV4, Fragment as Fragment2 } from "react/jsx-dev-runtime";
295
2170
  function RunningTimer({ startTime }) {
296
2171
  const [elapsed, setElapsed] = useState(() => Date.now() - startTime);
297
2172
  useEffect(() => {
298
2173
  const interval = setInterval(() => setElapsed(Date.now() - startTime), 100);
299
2174
  return () => clearInterval(interval);
300
2175
  }, [startTime]);
301
- return /* @__PURE__ */ jsxDEV2(Fragment, {
2176
+ return /* @__PURE__ */ jsxDEV4(Fragment2, {
302
2177
  children: [
303
2178
  elapsed,
304
2179
  "ms"
@@ -307,17 +2182,17 @@ function RunningTimer({ startTime }) {
307
2182
  }
308
2183
  function DurationDisplay({ entry }) {
309
2184
  const d = formatDuration(entry);
310
- return /* @__PURE__ */ jsxDEV2(Fragment, {
311
- children: d ?? /* @__PURE__ */ jsxDEV2(RunningTimer, {
2185
+ return /* @__PURE__ */ jsxDEV4(Fragment2, {
2186
+ children: d ?? /* @__PURE__ */ jsxDEV4(RunningTimer, {
312
2187
  startTime: entry.startTime
313
2188
  }, undefined, false, undefined, this)
314
2189
  }, undefined, false, undefined, this);
315
2190
  }
316
2191
 
317
2192
  // src/devtools/browser/components/SectionLabel.tsx
318
- import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
2193
+ import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
319
2194
  function SectionLabel({ label, color = "#60a5fa" }) {
320
- return /* @__PURE__ */ jsxDEV3("div", {
2195
+ return /* @__PURE__ */ jsxDEV5("div", {
321
2196
  style: {
322
2197
  color,
323
2198
  fontSize: "10px",
@@ -330,7 +2205,24 @@ function SectionLabel({ label, color = "#60a5fa" }) {
330
2205
  }
331
2206
 
332
2207
  // src/devtools/browser/components/CallStackSection.tsx
333
- import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
2208
+ import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
2209
+ function getCalledLabel(entry) {
2210
+ const firstHop = entry.meta.routing[0];
2211
+ if (firstHop == null)
2212
+ return "↳ call";
2213
+ if (firstHop.handlerType === "local")
2214
+ return "↳ local";
2215
+ const label = getExternalLabel(firstHop);
2216
+ return label != null ? `↳ ${label}` : "↳ call";
2217
+ }
2218
+ function getCalledColor(entry) {
2219
+ const firstHop = entry.meta.routing[0];
2220
+ if (firstHop == null)
2221
+ return "#a78bfa";
2222
+ if (firstHop.handlerType === "local")
2223
+ return DEVTOOL_COLOR_HANDLER_LOCAL_TEXT;
2224
+ return DEVTOOL_COLOR_HANDLER_EXTERNAL_TEXT;
2225
+ }
334
2226
  function CallStackLink({
335
2227
  entry,
336
2228
  entryRole,
@@ -339,60 +2231,65 @@ function CallStackLink({
339
2231
  }) {
340
2232
  const color = STATUS_COLOR[entry.status];
341
2233
  const symbol = STATUS_SYMBOL[entry.status];
342
- return /* @__PURE__ */ jsxDEV4("div", {
2234
+ const labelColor = entryRole === "caller" ? "#94a3b8" : getCalledColor(entry);
2235
+ const label = entryRole === "caller" ? "↑ from" : getCalledLabel(entry);
2236
+ return /* @__PURE__ */ jsxDEV6("div", {
343
2237
  onClick,
344
2238
  style: {
345
2239
  background: isFocused ? "#1e2e45" : "#1e293b",
346
2240
  borderRadius: "4px",
347
2241
  borderLeft: isFocused ? "2px solid #a78bfa" : "2px solid transparent",
348
2242
  padding: isFocused ? "5px 8px 5px 6px" : "5px 8px",
349
- display: "flex",
2243
+ display: "grid",
2244
+ gridTemplateColumns: "30% 1fr 30%",
350
2245
  alignItems: "center",
351
- gap: "8px",
2246
+ columnGap: "8px",
352
2247
  cursor: "pointer"
353
2248
  },
354
2249
  children: [
355
- /* @__PURE__ */ jsxDEV4("span", {
2250
+ /* @__PURE__ */ jsxDEV6("span", {
356
2251
  style: {
357
- color: entryRole === "caller" ? "#94a3b8" : "#a78bfa",
2252
+ color: labelColor,
358
2253
  fontSize: "9px",
359
- flexShrink: 0,
360
- minWidth: "34px",
361
- fontFamily: "inherit"
2254
+ whiteSpace: "nowrap",
2255
+ overflow: "hidden",
2256
+ textOverflow: "ellipsis"
362
2257
  },
363
- children: entryRole === "caller" ? "↑ from" : "↓ call"
2258
+ children: label
364
2259
  }, undefined, false, undefined, this),
365
- /* @__PURE__ */ jsxDEV4("span", {
366
- style: { color, fontSize: "10px", flexShrink: 0 },
367
- children: symbol
368
- }, undefined, false, undefined, this),
369
- /* @__PURE__ */ jsxDEV4("span", {
2260
+ /* @__PURE__ */ jsxDEV6("span", {
370
2261
  style: {
371
- color: "#cbd5e1",
372
- fontSize: "11px",
373
- flex: 1,
374
- overflow: "hidden",
375
- textOverflow: "ellipsis",
376
- whiteSpace: "nowrap",
377
- gap: "0.5em",
378
2262
  display: "flex",
379
2263
  alignItems: "center",
380
- justifyContent: "center"
2264
+ justifyContent: "center",
2265
+ gap: "5px",
2266
+ overflow: "hidden"
381
2267
  },
382
2268
  children: [
383
- /* @__PURE__ */ jsxDEV4("span", {
2269
+ /* @__PURE__ */ jsxDEV6("span", {
2270
+ style: { color, fontSize: "10px", flexShrink: 0 },
2271
+ children: symbol
2272
+ }, undefined, false, undefined, this),
2273
+ /* @__PURE__ */ jsxDEV6("span", {
2274
+ style: {
2275
+ color: "#cbd5e1",
2276
+ fontSize: "11px",
2277
+ overflow: "hidden",
2278
+ textOverflow: "ellipsis",
2279
+ whiteSpace: "nowrap"
2280
+ },
384
2281
  children: entry.actionId
385
2282
  }, undefined, false, undefined, this),
386
- /* @__PURE__ */ jsxDEV4(DomainChip, {
2283
+ /* @__PURE__ */ jsxDEV6(DomainChip, {
387
2284
  domain: entry.domain,
388
2285
  allDomains: entry.allDomains,
389
2286
  size: "sm"
390
2287
  }, undefined, false, undefined, this)
391
2288
  ]
392
2289
  }, undefined, true, undefined, this),
393
- /* @__PURE__ */ jsxDEV4("span", {
394
- style: { color: "#475569", fontSize: "10px", flexShrink: 0 },
395
- children: /* @__PURE__ */ jsxDEV4(DurationDisplay, {
2290
+ /* @__PURE__ */ jsxDEV6("span", {
2291
+ style: { color: "#475569", fontSize: "10px", textAlign: "right" },
2292
+ children: /* @__PURE__ */ jsxDEV6(DurationDisplay, {
396
2293
  entry
397
2294
  }, undefined, false, undefined, this)
398
2295
  }, undefined, false, undefined, this)
@@ -408,22 +2305,22 @@ function CallStackSection({
408
2305
  }) {
409
2306
  if (parent == null && childEntries.length === 0)
410
2307
  return null;
411
- return /* @__PURE__ */ jsxDEV4("div", {
2308
+ return /* @__PURE__ */ jsxDEV6("div", {
412
2309
  children: [
413
- /* @__PURE__ */ jsxDEV4(SectionLabel, {
2310
+ /* @__PURE__ */ jsxDEV6(SectionLabel, {
414
2311
  label: "Call Stack",
415
2312
  color: "#a78bfa"
416
2313
  }, undefined, false, undefined, this),
417
- /* @__PURE__ */ jsxDEV4("div", {
2314
+ /* @__PURE__ */ jsxDEV6("div", {
418
2315
  style: { display: "flex", flexDirection: "column", gap: "2px" },
419
2316
  children: [
420
- parent != null && /* @__PURE__ */ jsxDEV4(CallStackLink, {
2317
+ parent != null && /* @__PURE__ */ jsxDEV6(CallStackLink, {
421
2318
  entry: parent,
422
2319
  entryRole: "caller",
423
2320
  isFocused: false,
424
2321
  onClick: () => onSelectParent(parent.cuid)
425
2322
  }, undefined, false, undefined, this),
426
- childEntries.map((child) => /* @__PURE__ */ jsxDEV4(CallStackLink, {
2323
+ childEntries.map((child) => /* @__PURE__ */ jsxDEV6(CallStackLink, {
427
2324
  entry: child,
428
2325
  entryRole: "called",
429
2326
  isFocused: focusedChildCuid === child.cuid,
@@ -435,9 +2332,33 @@ function CallStackSection({
435
2332
  }, undefined, true, undefined, this);
436
2333
  }
437
2334
 
2335
+ // src/devtools/browser/components/ChildDispatchChips.tsx
2336
+ import { jsxDEV as jsxDEV7, Fragment as Fragment3 } from "react/jsx-dev-runtime";
2337
+ function ChildDispatchChips({
2338
+ labels,
2339
+ size = "sm"
2340
+ }) {
2341
+ if (labels == null || labels.length === 0)
2342
+ return null;
2343
+ const fontSize = size === "md" ? "1em" : "0.8em";
2344
+ const padding = size === "md" ? "1px 4px" : "1px 3px";
2345
+ return /* @__PURE__ */ jsxDEV7(Fragment3, {
2346
+ children: labels.map((label) => /* @__PURE__ */ jsxDEV7(Chip, {
2347
+ color: DEVTOOL_COLOR_HANDLER_EXTERNAL_TEXT,
2348
+ borderColor: DEVTOOL_COLOR_HANDLER_EXTERNAL_BORDER,
2349
+ fontSize,
2350
+ padding,
2351
+ children: [
2352
+ "↳ ",
2353
+ label
2354
+ ]
2355
+ }, label, true, undefined, this))
2356
+ }, undefined, false, undefined, this);
2357
+ }
2358
+
438
2359
  // src/devtools/browser/components/DetailSection.tsx
439
2360
  import { useState as useState2 } from "react";
440
- import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
2361
+ import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
441
2362
  var COMPACT_CHAR_LIMIT = 120;
442
2363
  function DetailSection({
443
2364
  label,
@@ -449,9 +2370,9 @@ function DetailSection({
449
2370
  const compactJson = safeStringify(value, 0);
450
2371
  const canExpand = fullJson !== compactJson || compactJson.length > COMPACT_CHAR_LIMIT;
451
2372
  const compactDisplay = compactJson.length > COMPACT_CHAR_LIMIT ? `${compactJson.slice(0, COMPACT_CHAR_LIMIT)}…` : compactJson;
452
- return /* @__PURE__ */ jsxDEV5("div", {
2373
+ return /* @__PURE__ */ jsxDEV8("div", {
453
2374
  children: [
454
- /* @__PURE__ */ jsxDEV5("div", {
2375
+ /* @__PURE__ */ jsxDEV8("div", {
455
2376
  style: {
456
2377
  display: "flex",
457
2378
  alignItems: "center",
@@ -459,7 +2380,7 @@ function DetailSection({
459
2380
  marginBottom: "3px"
460
2381
  },
461
2382
  children: [
462
- /* @__PURE__ */ jsxDEV5("div", {
2383
+ /* @__PURE__ */ jsxDEV8("div", {
463
2384
  style: {
464
2385
  color,
465
2386
  fontSize: "10px",
@@ -468,13 +2389,13 @@ function DetailSection({
468
2389
  },
469
2390
  children: label
470
2391
  }, undefined, false, undefined, this),
471
- canExpand && /* @__PURE__ */ jsxDEV5("span", {
2392
+ canExpand && /* @__PURE__ */ jsxDEV8("span", {
472
2393
  style: { color: "#334155", fontSize: "11px" },
473
2394
  children: expanded ? "▾" : "▸"
474
2395
  }, undefined, false, undefined, this)
475
2396
  ]
476
2397
  }, undefined, true, undefined, this),
477
- expanded ? /* @__PURE__ */ jsxDEV5("div", {
2398
+ expanded ? /* @__PURE__ */ jsxDEV8("div", {
478
2399
  onClick: canExpand ? () => setExpanded(false) : undefined,
479
2400
  style: {
480
2401
  margin: 0,
@@ -490,7 +2411,7 @@ function DetailSection({
490
2411
  cursor: canExpand ? "pointer" : "default"
491
2412
  },
492
2413
  children: fullJson
493
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV5("div", {
2414
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV8("div", {
494
2415
  onClick: canExpand ? () => setExpanded(true) : undefined,
495
2416
  style: {
496
2417
  padding: "5px 8px",
@@ -510,87 +2431,21 @@ function DetailSection({
510
2431
  }, undefined, true, undefined, this);
511
2432
  }
512
2433
 
513
- // src/devtools/core/devtools_colors.ts
514
- var DEVTOOL_COLOR_HANDLER_LOCAL_TEXT = "#34bb89";
515
- var DEVTOOL_COLOR_HANDLER_LOCAL_BORDER = "#144427";
516
- var DEVTOOL_COLOR_HANDLER_EXTERNAL_TEXT = "#cfa12a";
517
- var DEVTOOL_COLOR_HANDLER_EXTERNAL_BORDER = "#723917";
518
-
519
- // src/devtools/browser/components/Chip.tsx
520
- import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
521
- function Chip({
522
- color,
523
- borderColor,
524
- fontSize = "8px",
525
- padding = "1px 4px",
526
- children,
527
- style
528
- }) {
529
- return /* @__PURE__ */ jsxDEV6("span", {
530
- style: {
531
- color,
532
- fontSize,
533
- background: "#0f172a",
534
- border: `1px solid ${borderColor}`,
535
- padding,
536
- borderRadius: "3px",
537
- flexShrink: 0,
538
- whiteSpace: "nowrap",
539
- ...style
540
- },
541
- children
542
- }, undefined, false, undefined, this);
543
- }
544
-
545
- // src/devtools/browser/components/HandlerChips.tsx
546
- import { jsxDEV as jsxDEV7, Fragment as Fragment2 } from "react/jsx-dev-runtime";
547
- function getExternalLabel(hop) {
548
- if (hop.handlerType !== "external")
549
- return null;
550
- return hop.handlerClient != null ? `${hop.transport ?? "ext"} → ${hop.handlerClient.envId}` : `→ ${hop.transport ?? "ext"}`;
551
- }
552
- function HandlerChips({ entry, size }) {
553
- const firstHop = entry.meta.routing[0];
554
- const localEnvId = firstHop != null ? firstHop.runtime.envId : null;
555
- const externalLabel = firstHop != null ? getExternalLabel(firstHop) : null;
556
- const fontSize = size === "md" ? "1em" : "0.8em";
557
- const padding = size === "md" ? "1px 5px" : "1px 4px";
558
- const firstHopIsLocal = firstHop != null && firstHop.handlerType === "local";
559
- return /* @__PURE__ */ jsxDEV7(Fragment2, {
560
- children: [
561
- localEnvId != null && (firstHopIsLocal || externalLabel == null) && /* @__PURE__ */ jsxDEV7(Chip, {
562
- color: DEVTOOL_COLOR_HANDLER_LOCAL_TEXT,
563
- borderColor: DEVTOOL_COLOR_HANDLER_LOCAL_BORDER,
564
- fontSize,
565
- padding,
566
- children: "local"
567
- }, undefined, false, undefined, this),
568
- externalLabel != null && /* @__PURE__ */ jsxDEV7(Chip, {
569
- color: DEVTOOL_COLOR_HANDLER_EXTERNAL_TEXT,
570
- borderColor: DEVTOOL_COLOR_HANDLER_EXTERNAL_BORDER,
571
- fontSize,
572
- padding,
573
- children: externalLabel
574
- }, undefined, false, undefined, this)
575
- ]
576
- }, undefined, true, undefined, this);
577
- }
578
-
579
2434
  // src/devtools/browser/components/MetaSection.tsx
580
2435
  import { useState as useState3 } from "react";
581
- import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
2436
+ import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
582
2437
  function MetaChip({ label, value }) {
583
- return /* @__PURE__ */ jsxDEV8("span", {
2438
+ return /* @__PURE__ */ jsxDEV9("span", {
584
2439
  style: { whiteSpace: "nowrap" },
585
2440
  children: [
586
- /* @__PURE__ */ jsxDEV8("span", {
2441
+ /* @__PURE__ */ jsxDEV9("span", {
587
2442
  style: { color: "#475569" },
588
2443
  children: [
589
2444
  label,
590
2445
  " "
591
2446
  ]
592
2447
  }, undefined, true, undefined, this),
593
- /* @__PURE__ */ jsxDEV8("span", {
2448
+ /* @__PURE__ */ jsxDEV9("span", {
594
2449
  style: { color: "#cbd5e1" },
595
2450
  children: value
596
2451
  }, undefined, false, undefined, this)
@@ -606,9 +2461,9 @@ function MetaSection({ entry }) {
606
2461
  ...meta.originClient.perId != null ? [{ label: "perId", value: meta.originClient.perId }] : [],
607
2462
  ...meta.originClient.insId != null ? [{ label: "insId", value: meta.originClient.insId }] : []
608
2463
  ];
609
- return /* @__PURE__ */ jsxDEV8("div", {
2464
+ return /* @__PURE__ */ jsxDEV9("div", {
610
2465
  children: [
611
- /* @__PURE__ */ jsxDEV8("div", {
2466
+ /* @__PURE__ */ jsxDEV9("div", {
612
2467
  style: {
613
2468
  display: "flex",
614
2469
  alignItems: "center",
@@ -616,7 +2471,7 @@ function MetaSection({ entry }) {
616
2471
  marginBottom: "3px"
617
2472
  },
618
2473
  children: [
619
- /* @__PURE__ */ jsxDEV8("div", {
2474
+ /* @__PURE__ */ jsxDEV9("div", {
620
2475
  style: {
621
2476
  color: "#60a5fa",
622
2477
  fontSize: "10px",
@@ -625,16 +2480,16 @@ function MetaSection({ entry }) {
625
2480
  },
626
2481
  children: "Meta"
627
2482
  }, undefined, false, undefined, this),
628
- /* @__PURE__ */ jsxDEV8("span", {
2483
+ /* @__PURE__ */ jsxDEV9("span", {
629
2484
  style: { color: "#334155", fontSize: "11px" },
630
2485
  children: expanded ? "▾" : "▸"
631
2486
  }, undefined, false, undefined, this)
632
2487
  ]
633
2488
  }, undefined, true, undefined, this),
634
- expanded ? /* @__PURE__ */ jsxDEV8("div", {
2489
+ expanded ? /* @__PURE__ */ jsxDEV9("div", {
635
2490
  onClick: () => setExpanded(false),
636
2491
  style: { background: "#1e293b", borderRadius: "4px", overflow: "hidden", cursor: "pointer" },
637
- children: expandedRows.map(({ label, value }, i) => /* @__PURE__ */ jsxDEV8("div", {
2492
+ children: expandedRows.map(({ label, value }, i) => /* @__PURE__ */ jsxDEV9("div", {
638
2493
  style: {
639
2494
  display: "grid",
640
2495
  gridTemplateColumns: "52px 1fr",
@@ -644,17 +2499,17 @@ function MetaSection({ entry }) {
644
2499
  alignItems: "start"
645
2500
  },
646
2501
  children: [
647
- /* @__PURE__ */ jsxDEV8("span", {
2502
+ /* @__PURE__ */ jsxDEV9("span", {
648
2503
  style: { textAlign: "left", color: "#475569", fontSize: "10px", paddingTop: "1px" },
649
2504
  children: label
650
2505
  }, undefined, false, undefined, this),
651
- /* @__PURE__ */ jsxDEV8("span", {
2506
+ /* @__PURE__ */ jsxDEV9("span", {
652
2507
  style: { textAlign: "left", color: "#cbd5e1", fontSize: "11px", wordBreak: "break-all" },
653
2508
  children: value
654
2509
  }, undefined, false, undefined, this)
655
2510
  ]
656
2511
  }, label, true, undefined, this))
657
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV8("div", {
2512
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV9("div", {
658
2513
  onClick: () => setExpanded(true),
659
2514
  style: {
660
2515
  background: "#1e293b",
@@ -668,19 +2523,19 @@ function MetaSection({ entry }) {
668
2523
  cursor: "pointer"
669
2524
  },
670
2525
  children: [
671
- /* @__PURE__ */ jsxDEV8(MetaChip, {
2526
+ /* @__PURE__ */ jsxDEV9(MetaChip, {
672
2527
  label: "cuid",
673
2528
  value: `…${cuid.slice(-8)}`
674
2529
  }, undefined, false, undefined, this),
675
- /* @__PURE__ */ jsxDEV8(MetaChip, {
2530
+ /* @__PURE__ */ jsxDEV9(MetaChip, {
676
2531
  label: "origin",
677
2532
  value: meta.originClient.envId
678
2533
  }, undefined, false, undefined, this),
679
- meta.originClient.perId != null && /* @__PURE__ */ jsxDEV8(MetaChip, {
2534
+ meta.originClient.perId != null && /* @__PURE__ */ jsxDEV9(MetaChip, {
680
2535
  label: "perId",
681
2536
  value: meta.originClient.perId.length > 10 ? `${meta.originClient.perId.slice(0, 10)}…` : meta.originClient.perId
682
2537
  }, undefined, false, undefined, this),
683
- meta.originClient.insId != null && /* @__PURE__ */ jsxDEV8(MetaChip, {
2538
+ meta.originClient.insId != null && /* @__PURE__ */ jsxDEV9(MetaChip, {
684
2539
  label: "insId",
685
2540
  value: meta.originClient.insId.length > 10 ? `${meta.originClient.insId.slice(0, 10)}…` : meta.originClient.insId
686
2541
  }, undefined, false, undefined, this)
@@ -691,7 +2546,7 @@ function MetaSection({ entry }) {
691
2546
  }
692
2547
 
693
2548
  // src/devtools/browser/components/RoutingSection.tsx
694
- import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
2549
+ import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
695
2550
  function RoutingSection({
696
2551
  entry,
697
2552
  minHopCount = 0
@@ -701,12 +2556,12 @@ function RoutingSection({
701
2556
  const phantomCount = Math.max(0, minHopCount - hopCount);
702
2557
  if (hopCount === 0 && phantomCount === 0)
703
2558
  return null;
704
- return /* @__PURE__ */ jsxDEV9("div", {
2559
+ return /* @__PURE__ */ jsxDEV10("div", {
705
2560
  children: [
706
- /* @__PURE__ */ jsxDEV9(SectionLabel, {
2561
+ /* @__PURE__ */ jsxDEV10(SectionLabel, {
707
2562
  label: hopCount > 0 ? `Routing · ${hopCount} hop${hopCount !== 1 ? "s" : ""}` : "Routing"
708
2563
  }, undefined, false, undefined, this),
709
- /* @__PURE__ */ jsxDEV9("div", {
2564
+ /* @__PURE__ */ jsxDEV10("div", {
710
2565
  style: { display: "flex", flexDirection: "column", gap: "2px" },
711
2566
  children: [
712
2567
  meta.routing.map((hop, i) => {
@@ -715,7 +2570,7 @@ function RoutingSection({
715
2570
  const badgeColor = isLocal ? "#34d399" : "#fbbf24";
716
2571
  const badgeText = isLocal ? "● exec" : `→ ${hop.transport ?? "ext"}`;
717
2572
  const runtimeTitle = [hop.runtime.perId, hop.runtime.insId].filter(Boolean).join(" · ") || undefined;
718
- return /* @__PURE__ */ jsxDEV9("div", {
2573
+ return /* @__PURE__ */ jsxDEV10("div", {
719
2574
  style: {
720
2575
  background: "#1e293b",
721
2576
  borderRadius: "4px",
@@ -728,14 +2583,14 @@ function RoutingSection({
728
2583
  padding: "4px 8px"
729
2584
  },
730
2585
  children: [
731
- /* @__PURE__ */ jsxDEV9("span", {
2586
+ /* @__PURE__ */ jsxDEV10("span", {
732
2587
  style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "10px" },
733
2588
  children: [
734
- /* @__PURE__ */ jsxDEV9("span", {
2589
+ /* @__PURE__ */ jsxDEV10("span", {
735
2590
  style: { color: "#334155", fontSize: "10px", width: "16px", textAlign: "right" },
736
2591
  children: i + 1
737
2592
  }, undefined, false, undefined, this),
738
- /* @__PURE__ */ jsxDEV9("span", {
2593
+ /* @__PURE__ */ jsxDEV10("span", {
739
2594
  title: runtimeTitle,
740
2595
  style: {
741
2596
  color: "#94a3b8",
@@ -749,11 +2604,11 @@ function RoutingSection({
749
2604
  }, undefined, false, undefined, this)
750
2605
  ]
751
2606
  }, undefined, true, undefined, this),
752
- /* @__PURE__ */ jsxDEV9("span", {
2607
+ /* @__PURE__ */ jsxDEV10("span", {
753
2608
  style: { color: badgeColor, fontSize: "10px", whiteSpace: "nowrap" },
754
2609
  children: badgeText
755
2610
  }, undefined, false, undefined, this),
756
- /* @__PURE__ */ jsxDEV9("span", {
2611
+ /* @__PURE__ */ jsxDEV10("span", {
757
2612
  style: {
758
2613
  display: "flex",
759
2614
  alignItems: "center",
@@ -762,7 +2617,7 @@ function RoutingSection({
762
2617
  overflow: "hidden"
763
2618
  },
764
2619
  children: [
765
- /* @__PURE__ */ jsxDEV9("span", {
2620
+ /* @__PURE__ */ jsxDEV10("span", {
766
2621
  style: {
767
2622
  color: "#475569",
768
2623
  fontSize: "10px",
@@ -772,7 +2627,7 @@ function RoutingSection({
772
2627
  },
773
2628
  children: hop.handlerClient != null ? `↳ ${hop.handlerClient.envId}` : ""
774
2629
  }, undefined, false, undefined, this),
775
- /* @__PURE__ */ jsxDEV9("span", {
2630
+ /* @__PURE__ */ jsxDEV10("span", {
776
2631
  style: { color: "#334155", fontSize: "10px", flexShrink: 0, marginLeft: "auto" },
777
2632
  children: [
778
2633
  "+",
@@ -785,7 +2640,7 @@ function RoutingSection({
785
2640
  ]
786
2641
  }, `${hop.time}-${hop.runtime.envId}`, true, undefined, this);
787
2642
  }),
788
- Array.from({ length: phantomCount }, (_, i) => `routing-phantom-${hopCount + i}`).map((key) => /* @__PURE__ */ jsxDEV9("div", {
2643
+ Array.from({ length: phantomCount }, (_, i) => `routing-phantom-${hopCount + i}`).map((key) => /* @__PURE__ */ jsxDEV10("div", {
789
2644
  "aria-hidden": "true",
790
2645
  style: {
791
2646
  visibility: "hidden",
@@ -798,24 +2653,24 @@ function RoutingSection({
798
2653
  padding: "4px 8px"
799
2654
  },
800
2655
  children: [
801
- /* @__PURE__ */ jsxDEV9("span", {
2656
+ /* @__PURE__ */ jsxDEV10("span", {
802
2657
  style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "10px" },
803
2658
  children: [
804
- /* @__PURE__ */ jsxDEV9("span", {
2659
+ /* @__PURE__ */ jsxDEV10("span", {
805
2660
  style: { fontSize: "10px", width: "16px" },
806
2661
  children: "0"
807
2662
  }, undefined, false, undefined, this),
808
- /* @__PURE__ */ jsxDEV9("span", {
2663
+ /* @__PURE__ */ jsxDEV10("span", {
809
2664
  style: { fontSize: "11px" },
810
2665
  children: "placeholder"
811
2666
  }, undefined, false, undefined, this)
812
2667
  ]
813
2668
  }, undefined, true, undefined, this),
814
- /* @__PURE__ */ jsxDEV9("span", {
2669
+ /* @__PURE__ */ jsxDEV10("span", {
815
2670
  style: { fontSize: "10px" },
816
2671
  children: "placeholder"
817
2672
  }, undefined, false, undefined, this),
818
- /* @__PURE__ */ jsxDEV9("span", {}, undefined, false, undefined, this)
2673
+ /* @__PURE__ */ jsxDEV10("span", {}, undefined, false, undefined, this)
819
2674
  ]
820
2675
  }, key, true, undefined, this))
821
2676
  ]
@@ -827,8 +2682,12 @@ function RoutingSection({
827
2682
  // src/devtools/browser/components/StackTraceSection.tsx
828
2683
  import { useEffect as useEffect2, useState as useState4 } from "react";
829
2684
 
2685
+ // ../../node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/source-map.js
2686
+ var $SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
2687
+ var $SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
2688
+ var $SourceNode = require_source_node().SourceNode;
2689
+
830
2690
  // src/devtools/browser/components/sourceMapResolver.ts
831
- import { SourceMapConsumer } from "source-map-js";
832
2691
  var consumerCache = new Map;
833
2692
  async function loadConsumer(fileUrl) {
834
2693
  try {
@@ -857,7 +2716,7 @@ async function loadConsumer(fileUrl) {
857
2716
  return null;
858
2717
  mapJson = await mapResp.text();
859
2718
  }
860
- return new SourceMapConsumer(JSON.parse(mapJson));
2719
+ return new $SourceMapConsumer(JSON.parse(mapJson));
861
2720
  } catch {
862
2721
  return null;
863
2722
  }
@@ -884,7 +2743,7 @@ async function resolveCompiledPosition(fileUrl, line, col) {
884
2743
  }
885
2744
 
886
2745
  // src/devtools/browser/components/StackTraceSection.tsx
887
- import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
2746
+ import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
888
2747
  var INTERNAL_PATTERNS = [
889
2748
  "/nice-action/",
890
2749
  "@nice-code/action",
@@ -981,9 +2840,9 @@ function StackTraceSection({
981
2840
  const displayFrames = showAll ? allFrames : userFrames;
982
2841
  if (allFrames.length === 0)
983
2842
  return null;
984
- return /* @__PURE__ */ jsxDEV10("div", {
2843
+ return /* @__PURE__ */ jsxDEV11("div", {
985
2844
  children: [
986
- /* @__PURE__ */ jsxDEV10("div", {
2845
+ /* @__PURE__ */ jsxDEV11("div", {
987
2846
  style: {
988
2847
  display: "flex",
989
2848
  alignItems: "center",
@@ -991,17 +2850,17 @@ function StackTraceSection({
991
2850
  marginBottom: "3px"
992
2851
  },
993
2852
  children: [
994
- /* @__PURE__ */ jsxDEV10(SectionLabel, {
2853
+ /* @__PURE__ */ jsxDEV11(SectionLabel, {
995
2854
  label,
996
2855
  color
997
2856
  }, undefined, false, undefined, this),
998
- hasInternalFrames && /* @__PURE__ */ jsxDEV10("span", {
2857
+ hasInternalFrames && /* @__PURE__ */ jsxDEV11("span", {
999
2858
  style: { color: "#475569", fontSize: "9px" },
1000
2859
  children: !showAll ? "user only" : `all (${allFrames.length})`
1001
2860
  }, undefined, false, undefined, this)
1002
2861
  ]
1003
2862
  }, undefined, true, undefined, this),
1004
- /* @__PURE__ */ jsxDEV10("div", {
2863
+ /* @__PURE__ */ jsxDEV11("div", {
1005
2864
  onClick: () => setShowAll((s) => !s),
1006
2865
  style: {
1007
2866
  background: "#040a13",
@@ -1010,7 +2869,7 @@ function StackTraceSection({
1010
2869
  overflow: "hidden",
1011
2870
  cursor: "pointer"
1012
2871
  },
1013
- children: displayFrames.length === 0 ? /* @__PURE__ */ jsxDEV10("div", {
2872
+ children: displayFrames.length === 0 ? /* @__PURE__ */ jsxDEV11("div", {
1014
2873
  style: { padding: "6px 10px", color: "#64748b", fontSize: "10px", fontStyle: "italic" },
1015
2874
  children: "no user frames captured"
1016
2875
  }, undefined, false, undefined, this) : displayFrames.map((frame, idx) => {
@@ -1020,7 +2879,7 @@ function StackTraceSection({
1020
2879
  const bareFilename = slashIdx >= 0 ? displayFile.slice(slashIdx + 1) : displayFile;
1021
2880
  const titleStr = frame.file != null ? frame.file : frame.raw;
1022
2881
  const isUser = !frame.isInternal;
1023
- return /* @__PURE__ */ jsxDEV10("div", {
2882
+ return /* @__PURE__ */ jsxDEV11("div", {
1024
2883
  title: titleStr,
1025
2884
  style: {
1026
2885
  display: "flex",
@@ -1030,7 +2889,7 @@ function StackTraceSection({
1030
2889
  borderBottom: idx < displayFrames.length - 1 ? "1px solid #0f172a" : undefined
1031
2890
  },
1032
2891
  children: [
1033
- /* @__PURE__ */ jsxDEV10("span", {
2892
+ /* @__PURE__ */ jsxDEV11("span", {
1034
2893
  style: {
1035
2894
  color: isUser ? "#64748b" : "#2d3f53",
1036
2895
  fontSize: "10px",
@@ -1041,12 +2900,12 @@ function StackTraceSection({
1041
2900
  },
1042
2901
  children: idx + 1
1043
2902
  }, undefined, false, undefined, this),
1044
- /* @__PURE__ */ jsxDEV10("div", {
2903
+ /* @__PURE__ */ jsxDEV11("div", {
1045
2904
  style: { display: "flex", flexDirection: "column", gap: "0.15em", lineHeight: 1.2 },
1046
2905
  children: [
1047
- /* @__PURE__ */ jsxDEV10("div", {
2906
+ /* @__PURE__ */ jsxDEV11("div", {
1048
2907
  style: { display: "flex", alignItems: "center" },
1049
- children: /* @__PURE__ */ jsxDEV10("span", {
2908
+ children: /* @__PURE__ */ jsxDEV11("span", {
1050
2909
  style: {
1051
2910
  color: isUser ? "#e2e8f0" : "#50698b",
1052
2911
  fontSize: "12px",
@@ -1058,10 +2917,10 @@ function StackTraceSection({
1058
2917
  children: frame.fn ?? "(anonymous)"
1059
2918
  }, undefined, false, undefined, this)
1060
2919
  }, undefined, false, undefined, this),
1061
- /* @__PURE__ */ jsxDEV10("div", {
2920
+ /* @__PURE__ */ jsxDEV11("div", {
1062
2921
  style: { display: "flex", alignItems: "baseline", overflow: "hidden" },
1063
2922
  children: [
1064
- folderPrefix !== "" && /* @__PURE__ */ jsxDEV10("span", {
2923
+ folderPrefix !== "" && /* @__PURE__ */ jsxDEV11("span", {
1065
2924
  style: {
1066
2925
  color: isUser ? "#596b83" : "#2d3f53",
1067
2926
  fontSize: "10px",
@@ -1073,7 +2932,7 @@ function StackTraceSection({
1073
2932
  },
1074
2933
  children: folderPrefix
1075
2934
  }, undefined, false, undefined, this),
1076
- /* @__PURE__ */ jsxDEV10("span", {
2935
+ /* @__PURE__ */ jsxDEV11("span", {
1077
2936
  style: {
1078
2937
  color: isUser ? "#8a9ebb" : "#425979",
1079
2938
  fontSize: "10px",
@@ -1082,7 +2941,7 @@ function StackTraceSection({
1082
2941
  },
1083
2942
  children: bareFilename
1084
2943
  }, undefined, false, undefined, this),
1085
- frame.line != null && /* @__PURE__ */ jsxDEV10("span", {
2944
+ frame.line != null && /* @__PURE__ */ jsxDEV11("span", {
1086
2945
  style: {
1087
2946
  color: isUser ? "#4a7fa8" : "#2d4a63",
1088
2947
  fontSize: "10px",
@@ -1108,7 +2967,7 @@ function StackTraceSection({
1108
2967
  }
1109
2968
 
1110
2969
  // src/devtools/browser/components/ActionDetailPanel.tsx
1111
- import { jsxDEV as jsxDEV11, Fragment as Fragment3 } from "react/jsx-dev-runtime";
2970
+ import { jsxDEV as jsxDEV12, Fragment as Fragment4 } from "react/jsx-dev-runtime";
1112
2971
  function DetailHeader({
1113
2972
  entry,
1114
2973
  isActive,
@@ -1118,7 +2977,7 @@ function DetailHeader({
1118
2977
  const color = STATUS_COLOR[entry.status];
1119
2978
  const symbol = STATUS_SYMBOL[entry.status];
1120
2979
  const timestamp = formatTimestamp(entry.startTime);
1121
- return /* @__PURE__ */ jsxDEV11("div", {
2980
+ return /* @__PURE__ */ jsxDEV12("div", {
1122
2981
  onClick: !isActive ? onClick : undefined,
1123
2982
  style: {
1124
2983
  padding: "10px 12px",
@@ -1132,7 +2991,7 @@ function DetailHeader({
1132
2991
  cursor: isActive ? "default" : "pointer"
1133
2992
  },
1134
2993
  children: [
1135
- /* @__PURE__ */ jsxDEV11("span", {
2994
+ /* @__PURE__ */ jsxDEV12("span", {
1136
2995
  style: {
1137
2996
  color,
1138
2997
  fontSize: "15px",
@@ -1142,17 +3001,17 @@ function DetailHeader({
1142
3001
  },
1143
3002
  children: symbol
1144
3003
  }, undefined, false, undefined, this),
1145
- /* @__PURE__ */ jsxDEV11("div", {
3004
+ /* @__PURE__ */ jsxDEV12("div", {
1146
3005
  style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: "0.5em" },
1147
3006
  children: [
1148
- /* @__PURE__ */ jsxDEV11("div", {
3007
+ /* @__PURE__ */ jsxDEV12("div", {
1149
3008
  style: { display: "flex", alignItems: "center", minWidth: 0, gap: "0.4em" },
1150
3009
  children: [
1151
- /* @__PURE__ */ jsxDEV11("span", {
3010
+ /* @__PURE__ */ jsxDEV12("span", {
1152
3011
  style: { fontSize: "1.2em" },
1153
3012
  children: "⚡"
1154
3013
  }, undefined, false, undefined, this),
1155
- /* @__PURE__ */ jsxDEV11("span", {
3014
+ /* @__PURE__ */ jsxDEV12("span", {
1156
3015
  style: {
1157
3016
  color: "#f1f5f9",
1158
3017
  fontSize: "1.2em",
@@ -1165,14 +3024,14 @@ function DetailHeader({
1165
3024
  },
1166
3025
  children: entry.actionId
1167
3026
  }, undefined, false, undefined, this),
1168
- /* @__PURE__ */ jsxDEV11(DomainChip, {
3027
+ /* @__PURE__ */ jsxDEV12(DomainChip, {
1169
3028
  domain: entry.domain,
1170
3029
  allDomains: entry.allDomains,
1171
3030
  size: "md"
1172
3031
  }, undefined, false, undefined, this)
1173
3032
  ]
1174
3033
  }, undefined, true, undefined, this),
1175
- /* @__PURE__ */ jsxDEV11("div", {
3034
+ /* @__PURE__ */ jsxDEV12("div", {
1176
3035
  style: {
1177
3036
  display: "flex",
1178
3037
  alignItems: "center",
@@ -1180,7 +3039,7 @@ function DetailHeader({
1180
3039
  gap: "8px"
1181
3040
  },
1182
3041
  children: [
1183
- /* @__PURE__ */ jsxDEV11("div", {
3042
+ /* @__PURE__ */ jsxDEV12("div", {
1184
3043
  style: {
1185
3044
  display: "flex",
1186
3045
  alignItems: "center",
@@ -1188,21 +3047,27 @@ function DetailHeader({
1188
3047
  minWidth: 0,
1189
3048
  overflow: "hidden"
1190
3049
  },
1191
- children: /* @__PURE__ */ jsxDEV11(HandlerChips, {
1192
- entry,
1193
- size: "md"
1194
- }, undefined, false, undefined, this)
1195
- }, undefined, false, undefined, this),
1196
- /* @__PURE__ */ jsxDEV11("div", {
3050
+ children: [
3051
+ /* @__PURE__ */ jsxDEV12(HandlerChips, {
3052
+ entry,
3053
+ size: "md"
3054
+ }, undefined, false, undefined, this),
3055
+ /* @__PURE__ */ jsxDEV12(ChildDispatchChips, {
3056
+ labels: childExternalLabels,
3057
+ size: "md"
3058
+ }, undefined, false, undefined, this)
3059
+ ]
3060
+ }, undefined, true, undefined, this),
3061
+ /* @__PURE__ */ jsxDEV12("div", {
1197
3062
  style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 },
1198
3063
  children: [
1199
- /* @__PURE__ */ jsxDEV11("span", {
3064
+ /* @__PURE__ */ jsxDEV12("span", {
1200
3065
  style: { color: "#334155", fontSize: "10px", letterSpacing: "0.02em" },
1201
3066
  children: timestamp
1202
3067
  }, undefined, false, undefined, this),
1203
- /* @__PURE__ */ jsxDEV11("span", {
3068
+ /* @__PURE__ */ jsxDEV12("span", {
1204
3069
  style: { color, fontSize: "12px", fontWeight: "500" },
1205
- children: /* @__PURE__ */ jsxDEV11(DurationDisplay, {
3070
+ children: /* @__PURE__ */ jsxDEV12(DurationDisplay, {
1206
3071
  entry
1207
3072
  }, undefined, false, undefined, this)
1208
3073
  }, undefined, false, undefined, this)
@@ -1242,7 +3107,7 @@ function ActionDetailPanel({
1242
3107
  const handleFocusChild = (cuid) => {
1243
3108
  setFocusedChildCuid((prev) => prev === cuid ? null : cuid);
1244
3109
  };
1245
- return /* @__PURE__ */ jsxDEV11("div", {
3110
+ return /* @__PURE__ */ jsxDEV12("div", {
1246
3111
  style: {
1247
3112
  flex: 1,
1248
3113
  display: "flex",
@@ -1252,13 +3117,13 @@ function ActionDetailPanel({
1252
3117
  background: "#0f172a"
1253
3118
  },
1254
3119
  children: [
1255
- /* @__PURE__ */ jsxDEV11(DetailHeader, {
3120
+ /* @__PURE__ */ jsxDEV12(DetailHeader, {
1256
3121
  entry,
1257
3122
  isActive: focusedChildCuid === null,
1258
3123
  onClick: () => setFocusedChildCuid(null),
1259
3124
  childExternalLabels
1260
3125
  }, undefined, false, undefined, this),
1261
- /* @__PURE__ */ jsxDEV11("div", {
3126
+ /* @__PURE__ */ jsxDEV12("div", {
1262
3127
  style: {
1263
3128
  flex: 1,
1264
3129
  overflowY: "auto",
@@ -1269,63 +3134,63 @@ function ActionDetailPanel({
1269
3134
  gap: "8px"
1270
3135
  },
1271
3136
  children: [
1272
- /* @__PURE__ */ jsxDEV11(CallStackSection, {
3137
+ /* @__PURE__ */ jsxDEV12(CallStackSection, {
1273
3138
  parent,
1274
3139
  childEntries,
1275
3140
  focusedChildCuid,
1276
3141
  onFocusChild: handleFocusChild,
1277
3142
  onSelectParent: onSelectEntry
1278
3143
  }, undefined, false, undefined, this),
1279
- /* @__PURE__ */ jsxDEV11(MetaSection, {
3144
+ /* @__PURE__ */ jsxDEV12(MetaSection, {
1280
3145
  entry: focusedEntry
1281
3146
  }, undefined, false, undefined, this),
1282
- /* @__PURE__ */ jsxDEV11(RoutingSection, {
3147
+ /* @__PURE__ */ jsxDEV12(RoutingSection, {
1283
3148
  entry: focusedEntry,
1284
3149
  minHopCount: maxRoutingHops
1285
3150
  }, undefined, false, undefined, this),
1286
- /* @__PURE__ */ jsxDEV11(StackTraceSection, {
3151
+ /* @__PURE__ */ jsxDEV12(StackTraceSection, {
1287
3152
  label: "Dispatch Site",
1288
3153
  stack: focusedEntry.callSite,
1289
3154
  color: "#94a3b8"
1290
3155
  }, undefined, false, undefined, this),
1291
- /* @__PURE__ */ jsxDEV11(DetailSection, {
3156
+ /* @__PURE__ */ jsxDEV12(DetailSection, {
1292
3157
  label: "Input",
1293
3158
  value: focusedEntry.input
1294
3159
  }, undefined, false, undefined, this),
1295
- focusedEntry.status === "success" && /* @__PURE__ */ jsxDEV11(DetailSection, {
3160
+ focusedEntry.status === "success" && /* @__PURE__ */ jsxDEV12(DetailSection, {
1296
3161
  label: "Output",
1297
3162
  value: focusedEntry.output,
1298
3163
  color: "#4ade80"
1299
3164
  }, undefined, false, undefined, this),
1300
- focusedEntry.status === "failed" && /* @__PURE__ */ jsxDEV11(Fragment3, {
3165
+ focusedEntry.status === "failed" && /* @__PURE__ */ jsxDEV12(Fragment4, {
1301
3166
  children: [
1302
- /* @__PURE__ */ jsxDEV11(DetailSection, {
3167
+ /* @__PURE__ */ jsxDEV12(DetailSection, {
1303
3168
  label: "Error",
1304
3169
  value: focusedEntry.error,
1305
3170
  color: "#f87171"
1306
3171
  }, undefined, false, undefined, this),
1307
- /* @__PURE__ */ jsxDEV11(StackTraceSection, {
3172
+ /* @__PURE__ */ jsxDEV12(StackTraceSection, {
1308
3173
  label: "Error Stack",
1309
3174
  stack: focusedEntry.errorStack,
1310
3175
  color: "#f87171"
1311
3176
  }, undefined, false, undefined, this)
1312
3177
  ]
1313
3178
  }, undefined, true, undefined, this),
1314
- focusedEntry.status === "aborted" && /* @__PURE__ */ jsxDEV11(Fragment3, {
3179
+ focusedEntry.status === "aborted" && /* @__PURE__ */ jsxDEV12(Fragment4, {
1315
3180
  children: [
1316
- focusedEntry.abortReason != null && /* @__PURE__ */ jsxDEV11(DetailSection, {
3181
+ focusedEntry.abortReason != null && /* @__PURE__ */ jsxDEV12(DetailSection, {
1317
3182
  label: "Abort Reason",
1318
3183
  value: focusedEntry.abortReason,
1319
3184
  color: "#9ca3af"
1320
3185
  }, undefined, false, undefined, this),
1321
- /* @__PURE__ */ jsxDEV11(StackTraceSection, {
3186
+ /* @__PURE__ */ jsxDEV12(StackTraceSection, {
1322
3187
  label: "Abort Stack",
1323
3188
  stack: focusedEntry.errorStack,
1324
3189
  color: "#9ca3af"
1325
3190
  }, undefined, false, undefined, this)
1326
3191
  ]
1327
3192
  }, undefined, true, undefined, this),
1328
- focusedEntry.progressUpdates.length > 0 && /* @__PURE__ */ jsxDEV11(DetailSection, {
3193
+ focusedEntry.progressUpdates.length > 0 && /* @__PURE__ */ jsxDEV12(DetailSection, {
1329
3194
  label: `Progress (${focusedEntry.progressUpdates.length})`,
1330
3195
  value: focusedEntry.progressUpdates
1331
3196
  }, undefined, false, undefined, this)
@@ -1335,30 +3200,6 @@ function ActionDetailPanel({
1335
3200
  }, undefined, true, undefined, this);
1336
3201
  }
1337
3202
 
1338
- // src/devtools/browser/components/ChildDispatchChips.tsx
1339
- import { jsxDEV as jsxDEV12, Fragment as Fragment4 } from "react/jsx-dev-runtime";
1340
- function ChildDispatchChips({
1341
- labels,
1342
- size = "sm"
1343
- }) {
1344
- if (labels == null || labels.length === 0)
1345
- return null;
1346
- const fontSize = size === "md" ? "1em" : "0.8em";
1347
- const padding = size === "md" ? "1px 4px" : "1px 3px";
1348
- return /* @__PURE__ */ jsxDEV12(Fragment4, {
1349
- children: labels.map((label) => /* @__PURE__ */ jsxDEV12(Chip, {
1350
- color: DEVTOOL_COLOR_HANDLER_EXTERNAL_TEXT,
1351
- borderColor: DEVTOOL_COLOR_HANDLER_EXTERNAL_BORDER,
1352
- fontSize,
1353
- padding,
1354
- children: [
1355
- "↳ ",
1356
- label
1357
- ]
1358
- }, label, true, undefined, this))
1359
- }, undefined, false, undefined, this);
1360
- }
1361
-
1362
3203
  // src/devtools/browser/components/ActionEntryRow.tsx
1363
3204
  import { jsxDEV as jsxDEV13 } from "react/jsx-dev-runtime";
1364
3205
  function ActionEntryRow({