storybook 10.1.0-alpha.10 → 10.1.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/Color-FTG7SQDA.js +1097 -0
- package/dist/_browser-chunks/WithTooltip-LMROHDUP.js +1651 -0
- package/dist/_browser-chunks/chunk-2FRVAXCZ.js +7 -0
- package/dist/_browser-chunks/chunk-3IAH5M2U.js +171 -0
- package/dist/_browser-chunks/chunk-3OXGAGBE.js +779 -0
- package/dist/_browser-chunks/{chunk-TMDZCWME.js → chunk-3PJE6VLG.js} +1 -3
- package/dist/_browser-chunks/{chunk-VAMFPZY3.js → chunk-45UGUKRX.js} +2 -7
- package/dist/_browser-chunks/chunk-6XWLIJQL.js +11 -0
- package/dist/_browser-chunks/{chunk-FDWKXLBI.js → chunk-74YHFU5B.js} +44 -109
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-AIOS4NGK.js +252 -0
- package/dist/_browser-chunks/chunk-AS2HQEYC.js +14 -0
- package/dist/_browser-chunks/chunk-AXG2BOBL.js +836 -0
- package/dist/_browser-chunks/chunk-BE2DAXKJ.js +2966 -0
- package/dist/_browser-chunks/{chunk-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
- package/dist/_browser-chunks/chunk-EBHB6RPS.js +61 -0
- package/dist/_browser-chunks/chunk-EUVGDK4H.js +93 -0
- package/dist/_browser-chunks/chunk-EZSQOHRI.js +18 -0
- package/dist/_browser-chunks/{chunk-CADGRH3P.js → chunk-FNXWN6IK.js} +3 -8
- package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
- package/dist/_browser-chunks/{chunk-L2D73C6Z.js → chunk-H6XK3RSC.js} +13 -21
- package/dist/_browser-chunks/chunk-IPA5A322.js +71 -0
- package/dist/_browser-chunks/chunk-JP7NCOJX.js +37 -0
- package/dist/_browser-chunks/chunk-KJHJLCBK.js +11 -0
- package/dist/_browser-chunks/{chunk-QMY4G4R2.js → chunk-L4RMQ7D7.js} +17 -64
- package/dist/_browser-chunks/{chunk-AB7OOPUX.js → chunk-QKODTO7K.js} +0 -5
- package/dist/_browser-chunks/chunk-RP5RXKFU.js +2491 -0
- package/dist/_browser-chunks/chunk-SL75JR6Y.js +9 -0
- package/dist/_browser-chunks/chunk-UD6FQLAF.js +1481 -0
- package/dist/_browser-chunks/chunk-VYJQ7RU5.js +2853 -0
- package/dist/_browser-chunks/chunk-WJYERY3R.js +136 -0
- package/dist/_browser-chunks/chunk-WXP2XJ3O.js +950 -0
- package/dist/_browser-chunks/chunk-X3DUQ5RA.js +47 -0
- package/dist/_browser-chunks/chunk-XJNX76GA.js +85 -0
- package/dist/_browser-chunks/{chunk-F4Q6SGTB.js → chunk-YKE5S47A.js} +177 -399
- package/dist/_browser-chunks/{chunk-SN4J4IQ3.js → chunk-ZUWEVLDX.js} +1 -7
- package/dist/_browser-chunks/{formatter-OMEEQ6HG.js → formatter-QJ4M4OGQ.js} +4 -9
- package/dist/_browser-chunks/{syntaxhighlighter-RJZASWHL.js → syntaxhighlighter-WKBQ5RC7.js} +704 -1848
- package/dist/_node-chunks/{builder-manager-HA7CYFCK.js → builder-manager-PMPHOSM2.js} +475 -1013
- package/dist/_node-chunks/camelcase-K3IOOFQW.js +18 -0
- package/dist/_node-chunks/{chunk-X4XU27M6.js → chunk-32NE3UE3.js} +15 -24
- package/dist/_node-chunks/chunk-4GZCFQFG.js +58 -0
- package/dist/_node-chunks/chunk-5QK5MSOI.js +943 -0
- package/dist/_node-chunks/{chunk-VPR5IBMG.js → chunk-6ZOLETQK.js} +8 -10
- package/dist/_node-chunks/chunk-7I22Y76Z.js +1047 -0
- package/dist/_node-chunks/chunk-AKTRSR3O.js +72 -0
- package/dist/_node-chunks/chunk-BBOP3XCK.js +119 -0
- package/dist/_node-chunks/chunk-C2GQVDWI.js +34 -0
- package/dist/_node-chunks/{chunk-ZHSCUGNP.js → chunk-GG2WQZSG.js} +3799 -7849
- package/dist/_node-chunks/chunk-GQJOWVVR.js +3214 -0
- package/dist/_node-chunks/chunk-JCRM2YVK.js +3009 -0
- package/dist/_node-chunks/chunk-KK4AT5F3.js +1029 -0
- package/dist/_node-chunks/chunk-L7MYXJUM.js +1114 -0
- package/dist/_node-chunks/{chunk-F3XOPI6H.js → chunk-LCZO45L7.js} +469 -983
- package/dist/_node-chunks/chunk-LR3QITDI.js +209 -0
- package/dist/_node-chunks/chunk-LXG4DK35.js +3171 -0
- package/dist/_node-chunks/chunk-MJ3WOS6F.js +37 -0
- package/dist/_node-chunks/chunk-PHOZWZZO.js +61 -0
- package/dist/_node-chunks/chunk-QECOQWRJ.js +936 -0
- package/dist/_node-chunks/chunk-QH4V5YDB.js +20 -0
- package/dist/_node-chunks/chunk-R6HWGZWD.js +26 -0
- package/dist/_node-chunks/chunk-SPQXMU2Q.js +759 -0
- package/dist/_node-chunks/chunk-TXZY6V6O.js +1564 -0
- package/dist/_node-chunks/chunk-UGDPX5LE.js +756 -0
- package/dist/_node-chunks/chunk-UY26MQLT.js +603 -0
- package/dist/_node-chunks/chunk-WK3EMYK6.js +61 -0
- package/dist/_node-chunks/{chunk-OVXB5GGT.js → chunk-WLHMN7AP.js} +292 -688
- package/dist/_node-chunks/chunk-XGVLB4UJ.js +54 -0
- package/dist/_node-chunks/{chunk-RMHAL25C.js → chunk-YHRFI6BE.js} +87 -227
- package/dist/_node-chunks/chunk-YK4KVMFW.js +18 -0
- package/dist/_node-chunks/chunk-ZZALGOA6.js +4523 -0
- package/dist/_node-chunks/chunk-ZZPBSYA5.js +301 -0
- package/dist/_node-chunks/chunk-ZZSRFAC6.js +45571 -0
- package/dist/_node-chunks/dist-4DWOCZUD.js +121 -0
- package/dist/_node-chunks/globby-AAARUKEU.js +3452 -0
- package/dist/_node-chunks/lib-HEUKGL62.js +366 -0
- package/dist/_node-chunks/mdx-N42X6CFJ-DCVRPS6N.js +14329 -0
- package/dist/_node-chunks/p-limit-F5ZKJ6WZ.js +116 -0
- package/dist/_node-chunks/plugin-7YY7JXCH.js +123 -0
- package/dist/_node-chunks/{plugin-6ZPCS4LI.js → plugin-SZP3CW6W.js} +36 -56
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-TGKNDPO6.js +46623 -0
- package/dist/_node-chunks/webpack-mock-plugin-LNTZZFBE.js +92 -0
- package/dist/actions/decorator.js +21 -42
- package/dist/actions/index.js +3 -3
- package/dist/babel/index.d.ts +671 -335
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +592 -1546
- package/dist/bin/dispatcher.js +26 -37
- package/dist/bin/loader.js +23 -34
- package/dist/channels/index.js +98 -234
- package/dist/cli/index.js +1951 -5308
- package/dist/client-logger/index.js +31 -61
- package/dist/common/index.js +20 -20
- package/dist/components/index.js +4211 -8586
- package/dist/core-events/index.js +2 -66
- package/dist/core-server/index.js +3054 -7290
- package/dist/core-server/presets/common-manager.css +2 -2
- package/dist/core-server/presets/common-manager.js +1806 -3427
- package/dist/core-server/presets/common-override-preset.js +31 -60
- package/dist/core-server/presets/common-preset.js +434 -924
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +15 -19
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +12 -17
- package/dist/csf/index.js +534 -1179
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +6 -6
- package/dist/highlight/index.js +2 -2
- package/dist/instrumenter/index.js +199 -415
- package/dist/manager/globals-runtime.js +24150 -47364
- package/dist/manager/globals.js +2 -3
- package/dist/manager/runtime.js +3961 -8373
- package/dist/manager-api/index.js +1231 -2425
- package/dist/manager-errors.d.ts +3 -0
- package/dist/manager-errors.js +3 -3
- package/dist/node-logger/index.js +1253 -2601
- package/dist/preview/globals.js +2 -3
- package/dist/preview/runtime.js +10364 -21990
- package/dist/preview-api/index.d.ts +67 -68
- package/dist/preview-api/index.js +13 -13
- package/dist/preview-errors.d.ts +3 -0
- package/dist/preview-errors.js +4 -4
- package/dist/router/index.js +347 -899
- package/dist/server-errors.d.ts +3 -0
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +24 -24
- package/dist/test/index.js +5860 -11645
- package/dist/theming/create.js +4 -4
- package/dist/theming/index.d.ts +3363 -2597
- package/dist/theming/index.js +490 -1086
- package/dist/types/index.js +2 -11
- package/dist/viewport/index.js +3 -3
- package/package.json +5 -5
- package/dist/_browser-chunks/Color-FQNEU7YS.js +0 -1695
- package/dist/_browser-chunks/WithTooltip-6NHN2GXF.js +0 -2343
- package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
- package/dist/_browser-chunks/chunk-AW46NMGV.js +0 -1308
- package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
- package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
- package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
- package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
- package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
- package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
- package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
- package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
- package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
- package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
- package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
- package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
- package/dist/_browser-chunks/chunk-RW5PKMWM.js +0 -4182
- package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
- package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
- package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
- package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
- package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
- package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
- package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
- package/dist/_node-chunks/camelcase-QALD4XFE.js +0 -18
- package/dist/_node-chunks/chunk-2XY53ALL.js +0 -420
- package/dist/_node-chunks/chunk-3CBQMG2A.js +0 -6712
- package/dist/_node-chunks/chunk-3WDAPZYQ.js +0 -28
- package/dist/_node-chunks/chunk-4ZB555EJ.js +0 -697
- package/dist/_node-chunks/chunk-52DXKXY3.js +0 -4272
- package/dist/_node-chunks/chunk-5OVB4A6F.js +0 -69
- package/dist/_node-chunks/chunk-AGHGNXGH.js +0 -18
- package/dist/_node-chunks/chunk-B23X5ZCK.js +0 -1531
- package/dist/_node-chunks/chunk-B2DAHWJK.js +0 -220
- package/dist/_node-chunks/chunk-CC4PW5MJ.js +0 -34
- package/dist/_node-chunks/chunk-D7NIZELR.js +0 -2256
- package/dist/_node-chunks/chunk-DO5Q3H4L.js +0 -1250
- package/dist/_node-chunks/chunk-ECK7WVFX.js +0 -304
- package/dist/_node-chunks/chunk-EUH3NHXA.js +0 -79
- package/dist/_node-chunks/chunk-FOQHPHCV.js +0 -1657
- package/dist/_node-chunks/chunk-G6EL47NS.js +0 -111
- package/dist/_node-chunks/chunk-GFLS4TJB.js +0 -90
- package/dist/_node-chunks/chunk-J3XZKWHE.js +0 -1586
- package/dist/_node-chunks/chunk-LE63EHJ5.js +0 -1518
- package/dist/_node-chunks/chunk-M47XA42S.js +0 -4741
- package/dist/_node-chunks/chunk-OOI74AL3.js +0 -61
- package/dist/_node-chunks/chunk-PRJHT3GJ.js +0 -61
- package/dist/_node-chunks/chunk-Q52PVUSU.js +0 -101
- package/dist/_node-chunks/chunk-SDCF5RNN.js +0 -1198
- package/dist/_node-chunks/chunk-UJ5SJ23M.js +0 -5029
- package/dist/_node-chunks/chunk-UPHK4ETU.js +0 -64658
- package/dist/_node-chunks/chunk-V7VURIPB.js +0 -1544
- package/dist/_node-chunks/dist-6TXHNR5C.js +0 -175
- package/dist/_node-chunks/globby-PBTV6PX6.js +0 -5222
- package/dist/_node-chunks/lib-4RTDZVGX.js +0 -518
- package/dist/_node-chunks/mdx-N42X6CFJ-COWEH7KR.js +0 -22017
- package/dist/_node-chunks/p-limit-PBVZQOFY.js +0 -168
- package/dist/_node-chunks/plugin-EOZKYZAG.js +0 -159
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-35HMSMR5.js +0 -69102
- package/dist/_node-chunks/webpack-mock-plugin-GT3MA5E2.js +0 -124
|
@@ -1,1657 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__commonJS,
|
|
14
|
-
__name
|
|
15
|
-
} from "./chunk-OOI74AL3.js";
|
|
16
|
-
|
|
17
|
-
// ../node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js
|
|
18
|
-
var require_resolve_uri_umd = __commonJS({
|
|
19
|
-
"../node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"(exports, module) {
|
|
20
|
-
(function(global, factory) {
|
|
21
|
-
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.resolveURI = factory());
|
|
22
|
-
})(exports, function() {
|
|
23
|
-
"use strict";
|
|
24
|
-
const schemeRegex = /^[\w+.-]+:\/\//;
|
|
25
|
-
const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
|
|
26
|
-
const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
|
|
27
|
-
function isAbsoluteUrl(input) {
|
|
28
|
-
return schemeRegex.test(input);
|
|
29
|
-
}
|
|
30
|
-
__name(isAbsoluteUrl, "isAbsoluteUrl");
|
|
31
|
-
function isSchemeRelativeUrl(input) {
|
|
32
|
-
return input.startsWith("//");
|
|
33
|
-
}
|
|
34
|
-
__name(isSchemeRelativeUrl, "isSchemeRelativeUrl");
|
|
35
|
-
function isAbsolutePath(input) {
|
|
36
|
-
return input.startsWith("/");
|
|
37
|
-
}
|
|
38
|
-
__name(isAbsolutePath, "isAbsolutePath");
|
|
39
|
-
function isFileUrl(input) {
|
|
40
|
-
return input.startsWith("file:");
|
|
41
|
-
}
|
|
42
|
-
__name(isFileUrl, "isFileUrl");
|
|
43
|
-
function isRelative(input) {
|
|
44
|
-
return /^[.?#]/.test(input);
|
|
45
|
-
}
|
|
46
|
-
__name(isRelative, "isRelative");
|
|
47
|
-
function parseAbsoluteUrl(input) {
|
|
48
|
-
const match = urlRegex.exec(input);
|
|
49
|
-
return makeUrl(match[1], match[2] || "", match[3], match[4] || "", match[5] || "/", match[6] || "", match[7] || "");
|
|
50
|
-
}
|
|
51
|
-
__name(parseAbsoluteUrl, "parseAbsoluteUrl");
|
|
52
|
-
function parseFileUrl(input) {
|
|
53
|
-
const match = fileRegex.exec(input);
|
|
54
|
-
const path = match[2];
|
|
55
|
-
return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path) ? path : "/" + path, match[3] || "", match[4] || "");
|
|
56
|
-
}
|
|
57
|
-
__name(parseFileUrl, "parseFileUrl");
|
|
58
|
-
function makeUrl(scheme, user, host, port, path, query, hash) {
|
|
59
|
-
return {
|
|
60
|
-
scheme,
|
|
61
|
-
user,
|
|
62
|
-
host,
|
|
63
|
-
port,
|
|
64
|
-
path,
|
|
65
|
-
query,
|
|
66
|
-
hash,
|
|
67
|
-
type: 7
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
__name(makeUrl, "makeUrl");
|
|
71
|
-
function parseUrl(input) {
|
|
72
|
-
if (isSchemeRelativeUrl(input)) {
|
|
73
|
-
const url2 = parseAbsoluteUrl("http:" + input);
|
|
74
|
-
url2.scheme = "";
|
|
75
|
-
url2.type = 6;
|
|
76
|
-
return url2;
|
|
77
|
-
}
|
|
78
|
-
if (isAbsolutePath(input)) {
|
|
79
|
-
const url2 = parseAbsoluteUrl("http://foo.com" + input);
|
|
80
|
-
url2.scheme = "";
|
|
81
|
-
url2.host = "";
|
|
82
|
-
url2.type = 5;
|
|
83
|
-
return url2;
|
|
84
|
-
}
|
|
85
|
-
if (isFileUrl(input))
|
|
86
|
-
return parseFileUrl(input);
|
|
87
|
-
if (isAbsoluteUrl(input))
|
|
88
|
-
return parseAbsoluteUrl(input);
|
|
89
|
-
const url = parseAbsoluteUrl("http://foo.com/" + input);
|
|
90
|
-
url.scheme = "";
|
|
91
|
-
url.host = "";
|
|
92
|
-
url.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
|
|
93
|
-
return url;
|
|
94
|
-
}
|
|
95
|
-
__name(parseUrl, "parseUrl");
|
|
96
|
-
function stripPathFilename(path) {
|
|
97
|
-
if (path.endsWith("/.."))
|
|
98
|
-
return path;
|
|
99
|
-
const index = path.lastIndexOf("/");
|
|
100
|
-
return path.slice(0, index + 1);
|
|
101
|
-
}
|
|
102
|
-
__name(stripPathFilename, "stripPathFilename");
|
|
103
|
-
function mergePaths(url, base) {
|
|
104
|
-
normalizePath(base, base.type);
|
|
105
|
-
if (url.path === "/") {
|
|
106
|
-
url.path = base.path;
|
|
107
|
-
} else {
|
|
108
|
-
url.path = stripPathFilename(base.path) + url.path;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
__name(mergePaths, "mergePaths");
|
|
112
|
-
function normalizePath(url, type) {
|
|
113
|
-
const rel = type <= 4;
|
|
114
|
-
const pieces = url.path.split("/");
|
|
115
|
-
let pointer = 1;
|
|
116
|
-
let positive = 0;
|
|
117
|
-
let addTrailingSlash = false;
|
|
118
|
-
for (let i = 1; i < pieces.length; i++) {
|
|
119
|
-
const piece = pieces[i];
|
|
120
|
-
if (!piece) {
|
|
121
|
-
addTrailingSlash = true;
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
addTrailingSlash = false;
|
|
125
|
-
if (piece === ".")
|
|
126
|
-
continue;
|
|
127
|
-
if (piece === "..") {
|
|
128
|
-
if (positive) {
|
|
129
|
-
addTrailingSlash = true;
|
|
130
|
-
positive--;
|
|
131
|
-
pointer--;
|
|
132
|
-
} else if (rel) {
|
|
133
|
-
pieces[pointer++] = piece;
|
|
134
|
-
}
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
pieces[pointer++] = piece;
|
|
138
|
-
positive++;
|
|
139
|
-
}
|
|
140
|
-
let path = "";
|
|
141
|
-
for (let i = 1; i < pointer; i++) {
|
|
142
|
-
path += "/" + pieces[i];
|
|
143
|
-
}
|
|
144
|
-
if (!path || addTrailingSlash && !path.endsWith("/..")) {
|
|
145
|
-
path += "/";
|
|
146
|
-
}
|
|
147
|
-
url.path = path;
|
|
148
|
-
}
|
|
149
|
-
__name(normalizePath, "normalizePath");
|
|
150
|
-
function resolve(input, base) {
|
|
151
|
-
if (!input && !base)
|
|
152
|
-
return "";
|
|
153
|
-
const url = parseUrl(input);
|
|
154
|
-
let inputType = url.type;
|
|
155
|
-
if (base && inputType !== 7) {
|
|
156
|
-
const baseUrl = parseUrl(base);
|
|
157
|
-
const baseType = baseUrl.type;
|
|
158
|
-
switch (inputType) {
|
|
159
|
-
case 1:
|
|
160
|
-
url.hash = baseUrl.hash;
|
|
161
|
-
// fall through
|
|
162
|
-
case 2:
|
|
163
|
-
url.query = baseUrl.query;
|
|
164
|
-
// fall through
|
|
165
|
-
case 3:
|
|
166
|
-
case 4:
|
|
167
|
-
mergePaths(url, baseUrl);
|
|
168
|
-
// fall through
|
|
169
|
-
case 5:
|
|
170
|
-
url.user = baseUrl.user;
|
|
171
|
-
url.host = baseUrl.host;
|
|
172
|
-
url.port = baseUrl.port;
|
|
173
|
-
// fall through
|
|
174
|
-
case 6:
|
|
175
|
-
url.scheme = baseUrl.scheme;
|
|
176
|
-
}
|
|
177
|
-
if (baseType > inputType)
|
|
178
|
-
inputType = baseType;
|
|
179
|
-
}
|
|
180
|
-
normalizePath(url, inputType);
|
|
181
|
-
const queryHash = url.query + url.hash;
|
|
182
|
-
switch (inputType) {
|
|
183
|
-
// This is impossible, because of the empty checks at the start of the function.
|
|
184
|
-
// case UrlType.Empty:
|
|
185
|
-
case 2:
|
|
186
|
-
case 3:
|
|
187
|
-
return queryHash;
|
|
188
|
-
case 4: {
|
|
189
|
-
const path = url.path.slice(1);
|
|
190
|
-
if (!path)
|
|
191
|
-
return queryHash || ".";
|
|
192
|
-
if (isRelative(base || input) && !isRelative(path)) {
|
|
193
|
-
return "./" + path + queryHash;
|
|
194
|
-
}
|
|
195
|
-
return path + queryHash;
|
|
196
|
-
}
|
|
197
|
-
case 5:
|
|
198
|
-
return url.path + queryHash;
|
|
199
|
-
default:
|
|
200
|
-
return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
__name(resolve, "resolve");
|
|
204
|
-
return resolve;
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
// ../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js
|
|
210
|
-
var require_sourcemap_codec_umd = __commonJS({
|
|
211
|
-
"../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"(exports, module) {
|
|
212
|
-
(function(global, factory) {
|
|
213
|
-
if (typeof exports === "object" && typeof module !== "undefined") {
|
|
214
|
-
factory(module);
|
|
215
|
-
module.exports = def(module);
|
|
216
|
-
} else if (typeof define === "function" && define.amd) {
|
|
217
|
-
define(["module"], function(mod) {
|
|
218
|
-
factory.apply(this, arguments);
|
|
219
|
-
mod.exports = def(mod);
|
|
220
|
-
});
|
|
221
|
-
} else {
|
|
222
|
-
const mod = { exports: {} };
|
|
223
|
-
factory(mod);
|
|
224
|
-
global = typeof globalThis !== "undefined" ? globalThis : global || self;
|
|
225
|
-
global.sourcemapCodec = def(mod);
|
|
226
|
-
}
|
|
227
|
-
function def(m) {
|
|
228
|
-
return "default" in m.exports ? m.exports.default : m.exports;
|
|
229
|
-
}
|
|
230
|
-
__name(def, "def");
|
|
231
|
-
})(exports, function(module2) {
|
|
232
|
-
"use strict";
|
|
233
|
-
var __defProp = Object.defineProperty;
|
|
234
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
235
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
236
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
237
|
-
var __export = /* @__PURE__ */ __name((target, all) => {
|
|
238
|
-
for (var name in all)
|
|
239
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
240
|
-
}, "__export");
|
|
241
|
-
var __copyProps = /* @__PURE__ */ __name((to, from, except, desc) => {
|
|
242
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
243
|
-
for (let key of __getOwnPropNames(from))
|
|
244
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
245
|
-
__defProp(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
246
|
-
}
|
|
247
|
-
return to;
|
|
248
|
-
}, "__copyProps");
|
|
249
|
-
var __toCommonJS = /* @__PURE__ */ __name((mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
250
|
-
var sourcemap_codec_exports = {};
|
|
251
|
-
__export(sourcemap_codec_exports, {
|
|
252
|
-
decode: /* @__PURE__ */ __name(() => decode, "decode"),
|
|
253
|
-
decodeGeneratedRanges: /* @__PURE__ */ __name(() => decodeGeneratedRanges, "decodeGeneratedRanges"),
|
|
254
|
-
decodeOriginalScopes: /* @__PURE__ */ __name(() => decodeOriginalScopes, "decodeOriginalScopes"),
|
|
255
|
-
encode: /* @__PURE__ */ __name(() => encode, "encode"),
|
|
256
|
-
encodeGeneratedRanges: /* @__PURE__ */ __name(() => encodeGeneratedRanges, "encodeGeneratedRanges"),
|
|
257
|
-
encodeOriginalScopes: /* @__PURE__ */ __name(() => encodeOriginalScopes, "encodeOriginalScopes")
|
|
258
|
-
});
|
|
259
|
-
module2.exports = __toCommonJS(sourcemap_codec_exports);
|
|
260
|
-
var comma = ",".charCodeAt(0);
|
|
261
|
-
var semicolon = ";".charCodeAt(0);
|
|
262
|
-
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
263
|
-
var intToChar = new Uint8Array(64);
|
|
264
|
-
var charToInt = new Uint8Array(128);
|
|
265
|
-
for (let i = 0; i < chars.length; i++) {
|
|
266
|
-
const c = chars.charCodeAt(i);
|
|
267
|
-
intToChar[i] = c;
|
|
268
|
-
charToInt[c] = i;
|
|
269
|
-
}
|
|
270
|
-
function decodeInteger(reader, relative) {
|
|
271
|
-
let value = 0;
|
|
272
|
-
let shift = 0;
|
|
273
|
-
let integer = 0;
|
|
274
|
-
do {
|
|
275
|
-
const c = reader.next();
|
|
276
|
-
integer = charToInt[c];
|
|
277
|
-
value |= (integer & 31) << shift;
|
|
278
|
-
shift += 5;
|
|
279
|
-
} while (integer & 32);
|
|
280
|
-
const shouldNegate = value & 1;
|
|
281
|
-
value >>>= 1;
|
|
282
|
-
if (shouldNegate) {
|
|
283
|
-
value = -2147483648 | -value;
|
|
284
|
-
}
|
|
285
|
-
return relative + value;
|
|
286
|
-
}
|
|
287
|
-
__name(decodeInteger, "decodeInteger");
|
|
288
|
-
function encodeInteger(builder, num, relative) {
|
|
289
|
-
let delta = num - relative;
|
|
290
|
-
delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
|
|
291
|
-
do {
|
|
292
|
-
let clamped = delta & 31;
|
|
293
|
-
delta >>>= 5;
|
|
294
|
-
if (delta > 0) clamped |= 32;
|
|
295
|
-
builder.write(intToChar[clamped]);
|
|
296
|
-
} while (delta > 0);
|
|
297
|
-
return num;
|
|
298
|
-
}
|
|
299
|
-
__name(encodeInteger, "encodeInteger");
|
|
300
|
-
function hasMoreVlq(reader, max) {
|
|
301
|
-
if (reader.pos >= max) return false;
|
|
302
|
-
return reader.peek() !== comma;
|
|
303
|
-
}
|
|
304
|
-
__name(hasMoreVlq, "hasMoreVlq");
|
|
305
|
-
var bufLength = 1024 * 16;
|
|
306
|
-
var td = typeof TextDecoder !== "undefined" ? new TextDecoder() : typeof Buffer !== "undefined" ? {
|
|
307
|
-
decode(buf) {
|
|
308
|
-
const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
309
|
-
return out.toString();
|
|
310
|
-
}
|
|
311
|
-
} : {
|
|
312
|
-
decode(buf) {
|
|
313
|
-
let out = "";
|
|
314
|
-
for (let i = 0; i < buf.length; i++) {
|
|
315
|
-
out += String.fromCharCode(buf[i]);
|
|
316
|
-
}
|
|
317
|
-
return out;
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
var StringWriter = class {
|
|
321
|
-
static {
|
|
322
|
-
__name(this, "StringWriter");
|
|
323
|
-
}
|
|
324
|
-
constructor() {
|
|
325
|
-
this.pos = 0;
|
|
326
|
-
this.out = "";
|
|
327
|
-
this.buffer = new Uint8Array(bufLength);
|
|
328
|
-
}
|
|
329
|
-
write(v) {
|
|
330
|
-
const { buffer } = this;
|
|
331
|
-
buffer[this.pos++] = v;
|
|
332
|
-
if (this.pos === bufLength) {
|
|
333
|
-
this.out += td.decode(buffer);
|
|
334
|
-
this.pos = 0;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
flush() {
|
|
338
|
-
const { buffer, out, pos } = this;
|
|
339
|
-
return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
|
|
340
|
-
}
|
|
341
|
-
};
|
|
342
|
-
var StringReader = class {
|
|
343
|
-
static {
|
|
344
|
-
__name(this, "StringReader");
|
|
345
|
-
}
|
|
346
|
-
constructor(buffer) {
|
|
347
|
-
this.pos = 0;
|
|
348
|
-
this.buffer = buffer;
|
|
349
|
-
}
|
|
350
|
-
next() {
|
|
351
|
-
return this.buffer.charCodeAt(this.pos++);
|
|
352
|
-
}
|
|
353
|
-
peek() {
|
|
354
|
-
return this.buffer.charCodeAt(this.pos);
|
|
355
|
-
}
|
|
356
|
-
indexOf(char) {
|
|
357
|
-
const { buffer, pos } = this;
|
|
358
|
-
const idx = buffer.indexOf(char, pos);
|
|
359
|
-
return idx === -1 ? buffer.length : idx;
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
var EMPTY = [];
|
|
363
|
-
function decodeOriginalScopes(input) {
|
|
364
|
-
const { length } = input;
|
|
365
|
-
const reader = new StringReader(input);
|
|
366
|
-
const scopes = [];
|
|
367
|
-
const stack = [];
|
|
368
|
-
let line = 0;
|
|
369
|
-
for (; reader.pos < length; reader.pos++) {
|
|
370
|
-
line = decodeInteger(reader, line);
|
|
371
|
-
const column = decodeInteger(reader, 0);
|
|
372
|
-
if (!hasMoreVlq(reader, length)) {
|
|
373
|
-
const last = stack.pop();
|
|
374
|
-
last[2] = line;
|
|
375
|
-
last[3] = column;
|
|
376
|
-
continue;
|
|
377
|
-
}
|
|
378
|
-
const kind = decodeInteger(reader, 0);
|
|
379
|
-
const fields = decodeInteger(reader, 0);
|
|
380
|
-
const hasName = fields & 1;
|
|
381
|
-
const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];
|
|
382
|
-
let vars = EMPTY;
|
|
383
|
-
if (hasMoreVlq(reader, length)) {
|
|
384
|
-
vars = [];
|
|
385
|
-
do {
|
|
386
|
-
const varsIndex = decodeInteger(reader, 0);
|
|
387
|
-
vars.push(varsIndex);
|
|
388
|
-
} while (hasMoreVlq(reader, length));
|
|
389
|
-
}
|
|
390
|
-
scope.vars = vars;
|
|
391
|
-
scopes.push(scope);
|
|
392
|
-
stack.push(scope);
|
|
393
|
-
}
|
|
394
|
-
return scopes;
|
|
395
|
-
}
|
|
396
|
-
__name(decodeOriginalScopes, "decodeOriginalScopes");
|
|
397
|
-
function encodeOriginalScopes(scopes) {
|
|
398
|
-
const writer = new StringWriter();
|
|
399
|
-
for (let i = 0; i < scopes.length; ) {
|
|
400
|
-
i = _encodeOriginalScopes(scopes, i, writer, [0]);
|
|
401
|
-
}
|
|
402
|
-
return writer.flush();
|
|
403
|
-
}
|
|
404
|
-
__name(encodeOriginalScopes, "encodeOriginalScopes");
|
|
405
|
-
function _encodeOriginalScopes(scopes, index, writer, state) {
|
|
406
|
-
const scope = scopes[index];
|
|
407
|
-
const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;
|
|
408
|
-
if (index > 0) writer.write(comma);
|
|
409
|
-
state[0] = encodeInteger(writer, startLine, state[0]);
|
|
410
|
-
encodeInteger(writer, startColumn, 0);
|
|
411
|
-
encodeInteger(writer, kind, 0);
|
|
412
|
-
const fields = scope.length === 6 ? 1 : 0;
|
|
413
|
-
encodeInteger(writer, fields, 0);
|
|
414
|
-
if (scope.length === 6) encodeInteger(writer, scope[5], 0);
|
|
415
|
-
for (const v of vars) {
|
|
416
|
-
encodeInteger(writer, v, 0);
|
|
417
|
-
}
|
|
418
|
-
for (index++; index < scopes.length; ) {
|
|
419
|
-
const next = scopes[index];
|
|
420
|
-
const { 0: l, 1: c } = next;
|
|
421
|
-
if (l > endLine || l === endLine && c >= endColumn) {
|
|
422
|
-
break;
|
|
423
|
-
}
|
|
424
|
-
index = _encodeOriginalScopes(scopes, index, writer, state);
|
|
425
|
-
}
|
|
426
|
-
writer.write(comma);
|
|
427
|
-
state[0] = encodeInteger(writer, endLine, state[0]);
|
|
428
|
-
encodeInteger(writer, endColumn, 0);
|
|
429
|
-
return index;
|
|
430
|
-
}
|
|
431
|
-
__name(_encodeOriginalScopes, "_encodeOriginalScopes");
|
|
432
|
-
function decodeGeneratedRanges(input) {
|
|
433
|
-
const { length } = input;
|
|
434
|
-
const reader = new StringReader(input);
|
|
435
|
-
const ranges = [];
|
|
436
|
-
const stack = [];
|
|
437
|
-
let genLine = 0;
|
|
438
|
-
let definitionSourcesIndex = 0;
|
|
439
|
-
let definitionScopeIndex = 0;
|
|
440
|
-
let callsiteSourcesIndex = 0;
|
|
441
|
-
let callsiteLine = 0;
|
|
442
|
-
let callsiteColumn = 0;
|
|
443
|
-
let bindingLine = 0;
|
|
444
|
-
let bindingColumn = 0;
|
|
445
|
-
do {
|
|
446
|
-
const semi = reader.indexOf(";");
|
|
447
|
-
let genColumn = 0;
|
|
448
|
-
for (; reader.pos < semi; reader.pos++) {
|
|
449
|
-
genColumn = decodeInteger(reader, genColumn);
|
|
450
|
-
if (!hasMoreVlq(reader, semi)) {
|
|
451
|
-
const last = stack.pop();
|
|
452
|
-
last[2] = genLine;
|
|
453
|
-
last[3] = genColumn;
|
|
454
|
-
continue;
|
|
455
|
-
}
|
|
456
|
-
const fields = decodeInteger(reader, 0);
|
|
457
|
-
const hasDefinition = fields & 1;
|
|
458
|
-
const hasCallsite = fields & 2;
|
|
459
|
-
const hasScope = fields & 4;
|
|
460
|
-
let callsite = null;
|
|
461
|
-
let bindings = EMPTY;
|
|
462
|
-
let range;
|
|
463
|
-
if (hasDefinition) {
|
|
464
|
-
const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);
|
|
465
|
-
definitionScopeIndex = decodeInteger(
|
|
466
|
-
reader,
|
|
467
|
-
definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0
|
|
468
|
-
);
|
|
469
|
-
definitionSourcesIndex = defSourcesIndex;
|
|
470
|
-
range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];
|
|
471
|
-
} else {
|
|
472
|
-
range = [genLine, genColumn, 0, 0];
|
|
473
|
-
}
|
|
474
|
-
range.isScope = !!hasScope;
|
|
475
|
-
if (hasCallsite) {
|
|
476
|
-
const prevCsi = callsiteSourcesIndex;
|
|
477
|
-
const prevLine = callsiteLine;
|
|
478
|
-
callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);
|
|
479
|
-
const sameSource = prevCsi === callsiteSourcesIndex;
|
|
480
|
-
callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);
|
|
481
|
-
callsiteColumn = decodeInteger(
|
|
482
|
-
reader,
|
|
483
|
-
sameSource && prevLine === callsiteLine ? callsiteColumn : 0
|
|
484
|
-
);
|
|
485
|
-
callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];
|
|
486
|
-
}
|
|
487
|
-
range.callsite = callsite;
|
|
488
|
-
if (hasMoreVlq(reader, semi)) {
|
|
489
|
-
bindings = [];
|
|
490
|
-
do {
|
|
491
|
-
bindingLine = genLine;
|
|
492
|
-
bindingColumn = genColumn;
|
|
493
|
-
const expressionsCount = decodeInteger(reader, 0);
|
|
494
|
-
let expressionRanges;
|
|
495
|
-
if (expressionsCount < -1) {
|
|
496
|
-
expressionRanges = [[decodeInteger(reader, 0)]];
|
|
497
|
-
for (let i = -1; i > expressionsCount; i--) {
|
|
498
|
-
const prevBl = bindingLine;
|
|
499
|
-
bindingLine = decodeInteger(reader, bindingLine);
|
|
500
|
-
bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);
|
|
501
|
-
const expression = decodeInteger(reader, 0);
|
|
502
|
-
expressionRanges.push([expression, bindingLine, bindingColumn]);
|
|
503
|
-
}
|
|
504
|
-
} else {
|
|
505
|
-
expressionRanges = [[expressionsCount]];
|
|
506
|
-
}
|
|
507
|
-
bindings.push(expressionRanges);
|
|
508
|
-
} while (hasMoreVlq(reader, semi));
|
|
509
|
-
}
|
|
510
|
-
range.bindings = bindings;
|
|
511
|
-
ranges.push(range);
|
|
512
|
-
stack.push(range);
|
|
513
|
-
}
|
|
514
|
-
genLine++;
|
|
515
|
-
reader.pos = semi + 1;
|
|
516
|
-
} while (reader.pos < length);
|
|
517
|
-
return ranges;
|
|
518
|
-
}
|
|
519
|
-
__name(decodeGeneratedRanges, "decodeGeneratedRanges");
|
|
520
|
-
function encodeGeneratedRanges(ranges) {
|
|
521
|
-
if (ranges.length === 0) return "";
|
|
522
|
-
const writer = new StringWriter();
|
|
523
|
-
for (let i = 0; i < ranges.length; ) {
|
|
524
|
-
i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);
|
|
525
|
-
}
|
|
526
|
-
return writer.flush();
|
|
527
|
-
}
|
|
528
|
-
__name(encodeGeneratedRanges, "encodeGeneratedRanges");
|
|
529
|
-
function _encodeGeneratedRanges(ranges, index, writer, state) {
|
|
530
|
-
const range = ranges[index];
|
|
531
|
-
const {
|
|
532
|
-
0: startLine,
|
|
533
|
-
1: startColumn,
|
|
534
|
-
2: endLine,
|
|
535
|
-
3: endColumn,
|
|
536
|
-
isScope,
|
|
537
|
-
callsite,
|
|
538
|
-
bindings
|
|
539
|
-
} = range;
|
|
540
|
-
if (state[0] < startLine) {
|
|
541
|
-
catchupLine(writer, state[0], startLine);
|
|
542
|
-
state[0] = startLine;
|
|
543
|
-
state[1] = 0;
|
|
544
|
-
} else if (index > 0) {
|
|
545
|
-
writer.write(comma);
|
|
546
|
-
}
|
|
547
|
-
state[1] = encodeInteger(writer, range[1], state[1]);
|
|
548
|
-
const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);
|
|
549
|
-
encodeInteger(writer, fields, 0);
|
|
550
|
-
if (range.length === 6) {
|
|
551
|
-
const { 4: sourcesIndex, 5: scopesIndex } = range;
|
|
552
|
-
if (sourcesIndex !== state[2]) {
|
|
553
|
-
state[3] = 0;
|
|
554
|
-
}
|
|
555
|
-
state[2] = encodeInteger(writer, sourcesIndex, state[2]);
|
|
556
|
-
state[3] = encodeInteger(writer, scopesIndex, state[3]);
|
|
557
|
-
}
|
|
558
|
-
if (callsite) {
|
|
559
|
-
const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;
|
|
560
|
-
if (sourcesIndex !== state[4]) {
|
|
561
|
-
state[5] = 0;
|
|
562
|
-
state[6] = 0;
|
|
563
|
-
} else if (callLine !== state[5]) {
|
|
564
|
-
state[6] = 0;
|
|
565
|
-
}
|
|
566
|
-
state[4] = encodeInteger(writer, sourcesIndex, state[4]);
|
|
567
|
-
state[5] = encodeInteger(writer, callLine, state[5]);
|
|
568
|
-
state[6] = encodeInteger(writer, callColumn, state[6]);
|
|
569
|
-
}
|
|
570
|
-
if (bindings) {
|
|
571
|
-
for (const binding of bindings) {
|
|
572
|
-
if (binding.length > 1) encodeInteger(writer, -binding.length, 0);
|
|
573
|
-
const expression = binding[0][0];
|
|
574
|
-
encodeInteger(writer, expression, 0);
|
|
575
|
-
let bindingStartLine = startLine;
|
|
576
|
-
let bindingStartColumn = startColumn;
|
|
577
|
-
for (let i = 1; i < binding.length; i++) {
|
|
578
|
-
const expRange = binding[i];
|
|
579
|
-
bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);
|
|
580
|
-
bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);
|
|
581
|
-
encodeInteger(writer, expRange[0], 0);
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
for (index++; index < ranges.length; ) {
|
|
586
|
-
const next = ranges[index];
|
|
587
|
-
const { 0: l, 1: c } = next;
|
|
588
|
-
if (l > endLine || l === endLine && c >= endColumn) {
|
|
589
|
-
break;
|
|
590
|
-
}
|
|
591
|
-
index = _encodeGeneratedRanges(ranges, index, writer, state);
|
|
592
|
-
}
|
|
593
|
-
if (state[0] < endLine) {
|
|
594
|
-
catchupLine(writer, state[0], endLine);
|
|
595
|
-
state[0] = endLine;
|
|
596
|
-
state[1] = 0;
|
|
597
|
-
} else {
|
|
598
|
-
writer.write(comma);
|
|
599
|
-
}
|
|
600
|
-
state[1] = encodeInteger(writer, endColumn, state[1]);
|
|
601
|
-
return index;
|
|
602
|
-
}
|
|
603
|
-
__name(_encodeGeneratedRanges, "_encodeGeneratedRanges");
|
|
604
|
-
function catchupLine(writer, lastLine, line) {
|
|
605
|
-
do {
|
|
606
|
-
writer.write(semicolon);
|
|
607
|
-
} while (++lastLine < line);
|
|
608
|
-
}
|
|
609
|
-
__name(catchupLine, "catchupLine");
|
|
610
|
-
function decode(mappings) {
|
|
611
|
-
const { length } = mappings;
|
|
612
|
-
const reader = new StringReader(mappings);
|
|
613
|
-
const decoded = [];
|
|
614
|
-
let genColumn = 0;
|
|
615
|
-
let sourcesIndex = 0;
|
|
616
|
-
let sourceLine = 0;
|
|
617
|
-
let sourceColumn = 0;
|
|
618
|
-
let namesIndex = 0;
|
|
619
|
-
do {
|
|
620
|
-
const semi = reader.indexOf(";");
|
|
621
|
-
const line = [];
|
|
622
|
-
let sorted = true;
|
|
623
|
-
let lastCol = 0;
|
|
624
|
-
genColumn = 0;
|
|
625
|
-
while (reader.pos < semi) {
|
|
626
|
-
let seg;
|
|
627
|
-
genColumn = decodeInteger(reader, genColumn);
|
|
628
|
-
if (genColumn < lastCol) sorted = false;
|
|
629
|
-
lastCol = genColumn;
|
|
630
|
-
if (hasMoreVlq(reader, semi)) {
|
|
631
|
-
sourcesIndex = decodeInteger(reader, sourcesIndex);
|
|
632
|
-
sourceLine = decodeInteger(reader, sourceLine);
|
|
633
|
-
sourceColumn = decodeInteger(reader, sourceColumn);
|
|
634
|
-
if (hasMoreVlq(reader, semi)) {
|
|
635
|
-
namesIndex = decodeInteger(reader, namesIndex);
|
|
636
|
-
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];
|
|
637
|
-
} else {
|
|
638
|
-
seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
|
|
639
|
-
}
|
|
640
|
-
} else {
|
|
641
|
-
seg = [genColumn];
|
|
642
|
-
}
|
|
643
|
-
line.push(seg);
|
|
644
|
-
reader.pos++;
|
|
645
|
-
}
|
|
646
|
-
if (!sorted) sort(line);
|
|
647
|
-
decoded.push(line);
|
|
648
|
-
reader.pos = semi + 1;
|
|
649
|
-
} while (reader.pos <= length);
|
|
650
|
-
return decoded;
|
|
651
|
-
}
|
|
652
|
-
__name(decode, "decode");
|
|
653
|
-
function sort(line) {
|
|
654
|
-
line.sort(sortComparator);
|
|
655
|
-
}
|
|
656
|
-
__name(sort, "sort");
|
|
657
|
-
function sortComparator(a, b) {
|
|
658
|
-
return a[0] - b[0];
|
|
659
|
-
}
|
|
660
|
-
__name(sortComparator, "sortComparator");
|
|
661
|
-
function encode(decoded) {
|
|
662
|
-
const writer = new StringWriter();
|
|
663
|
-
let sourcesIndex = 0;
|
|
664
|
-
let sourceLine = 0;
|
|
665
|
-
let sourceColumn = 0;
|
|
666
|
-
let namesIndex = 0;
|
|
667
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
668
|
-
const line = decoded[i];
|
|
669
|
-
if (i > 0) writer.write(semicolon);
|
|
670
|
-
if (line.length === 0) continue;
|
|
671
|
-
let genColumn = 0;
|
|
672
|
-
for (let j = 0; j < line.length; j++) {
|
|
673
|
-
const segment = line[j];
|
|
674
|
-
if (j > 0) writer.write(comma);
|
|
675
|
-
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
676
|
-
if (segment.length === 1) continue;
|
|
677
|
-
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
678
|
-
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
679
|
-
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
680
|
-
if (segment.length === 4) continue;
|
|
681
|
-
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
return writer.flush();
|
|
685
|
-
}
|
|
686
|
-
__name(encode, "encode");
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
});
|
|
690
|
-
|
|
691
|
-
// ../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js
|
|
692
|
-
var require_trace_mapping_umd = __commonJS({
|
|
693
|
-
"../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"(exports, module) {
|
|
694
|
-
(function(global, factory) {
|
|
695
|
-
if (typeof exports === "object" && typeof module !== "undefined") {
|
|
696
|
-
factory(module, require_resolve_uri_umd(), require_sourcemap_codec_umd());
|
|
697
|
-
module.exports = def(module);
|
|
698
|
-
} else if (typeof define === "function" && define.amd) {
|
|
699
|
-
define(["module", "@jridgewell/resolve-uri", "@jridgewell/sourcemap-codec"], function(mod) {
|
|
700
|
-
factory.apply(this, arguments);
|
|
701
|
-
mod.exports = def(mod);
|
|
702
|
-
});
|
|
703
|
-
} else {
|
|
704
|
-
const mod = { exports: {} };
|
|
705
|
-
factory(mod, global.resolveURI, global.sourcemapCodec);
|
|
706
|
-
global = typeof globalThis !== "undefined" ? globalThis : global || self;
|
|
707
|
-
global.traceMapping = def(mod);
|
|
708
|
-
}
|
|
709
|
-
function def(m) {
|
|
710
|
-
return "default" in m.exports ? m.exports.default : m.exports;
|
|
711
|
-
}
|
|
712
|
-
__name(def, "def");
|
|
713
|
-
})(exports, function(module2, require_resolveURI, require_sourcemapCodec) {
|
|
714
|
-
"use strict";
|
|
715
|
-
var __create = Object.create;
|
|
716
|
-
var __defProp = Object.defineProperty;
|
|
717
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
718
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
719
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
720
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
721
|
-
var __commonJS2 = /* @__PURE__ */ __name((cb, mod) => /* @__PURE__ */ __name(function __require() {
|
|
722
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
723
|
-
}, "__require"), "__commonJS");
|
|
724
|
-
var __export = /* @__PURE__ */ __name((target, all) => {
|
|
725
|
-
for (var name in all)
|
|
726
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
727
|
-
}, "__export");
|
|
728
|
-
var __copyProps = /* @__PURE__ */ __name((to, from, except, desc) => {
|
|
729
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
730
|
-
for (let key of __getOwnPropNames(from))
|
|
731
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
732
|
-
__defProp(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
733
|
-
}
|
|
734
|
-
return to;
|
|
735
|
-
}, "__copyProps");
|
|
736
|
-
var __toESM = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
737
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
738
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
739
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
740
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
741
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
742
|
-
mod
|
|
743
|
-
)), "__toESM");
|
|
744
|
-
var __toCommonJS = /* @__PURE__ */ __name((mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
745
|
-
var require_sourcemap_codec = __commonJS2({
|
|
746
|
-
"umd:@jridgewell/sourcemap-codec"(exports2, module22) {
|
|
747
|
-
module22.exports = require_sourcemapCodec;
|
|
748
|
-
}
|
|
749
|
-
});
|
|
750
|
-
var require_resolve_uri = __commonJS2({
|
|
751
|
-
"umd:@jridgewell/resolve-uri"(exports2, module22) {
|
|
752
|
-
module22.exports = require_resolveURI;
|
|
753
|
-
}
|
|
754
|
-
});
|
|
755
|
-
var trace_mapping_exports = {};
|
|
756
|
-
__export(trace_mapping_exports, {
|
|
757
|
-
AnyMap: /* @__PURE__ */ __name(() => FlattenMap, "AnyMap"),
|
|
758
|
-
FlattenMap: /* @__PURE__ */ __name(() => FlattenMap, "FlattenMap"),
|
|
759
|
-
GREATEST_LOWER_BOUND: /* @__PURE__ */ __name(() => GREATEST_LOWER_BOUND, "GREATEST_LOWER_BOUND"),
|
|
760
|
-
LEAST_UPPER_BOUND: /* @__PURE__ */ __name(() => LEAST_UPPER_BOUND, "LEAST_UPPER_BOUND"),
|
|
761
|
-
TraceMap: /* @__PURE__ */ __name(() => TraceMap, "TraceMap"),
|
|
762
|
-
allGeneratedPositionsFor: /* @__PURE__ */ __name(() => allGeneratedPositionsFor, "allGeneratedPositionsFor"),
|
|
763
|
-
decodedMap: /* @__PURE__ */ __name(() => decodedMap, "decodedMap"),
|
|
764
|
-
decodedMappings: /* @__PURE__ */ __name(() => decodedMappings, "decodedMappings"),
|
|
765
|
-
eachMapping: /* @__PURE__ */ __name(() => eachMapping, "eachMapping"),
|
|
766
|
-
encodedMap: /* @__PURE__ */ __name(() => encodedMap, "encodedMap"),
|
|
767
|
-
encodedMappings: /* @__PURE__ */ __name(() => encodedMappings, "encodedMappings"),
|
|
768
|
-
generatedPositionFor: /* @__PURE__ */ __name(() => generatedPositionFor, "generatedPositionFor"),
|
|
769
|
-
isIgnored: /* @__PURE__ */ __name(() => isIgnored, "isIgnored"),
|
|
770
|
-
originalPositionFor: /* @__PURE__ */ __name(() => originalPositionFor, "originalPositionFor"),
|
|
771
|
-
presortedDecodedMap: /* @__PURE__ */ __name(() => presortedDecodedMap, "presortedDecodedMap"),
|
|
772
|
-
sourceContentFor: /* @__PURE__ */ __name(() => sourceContentFor, "sourceContentFor"),
|
|
773
|
-
traceSegment: /* @__PURE__ */ __name(() => traceSegment, "traceSegment")
|
|
774
|
-
});
|
|
775
|
-
module2.exports = __toCommonJS(trace_mapping_exports);
|
|
776
|
-
var import_sourcemap_codec = __toESM(require_sourcemap_codec());
|
|
777
|
-
var import_resolve_uri = __toESM(require_resolve_uri());
|
|
778
|
-
function stripFilename(path) {
|
|
779
|
-
if (!path) return "";
|
|
780
|
-
const index = path.lastIndexOf("/");
|
|
781
|
-
return path.slice(0, index + 1);
|
|
782
|
-
}
|
|
783
|
-
__name(stripFilename, "stripFilename");
|
|
784
|
-
function resolver(mapUrl, sourceRoot) {
|
|
785
|
-
const from = stripFilename(mapUrl);
|
|
786
|
-
const prefix = sourceRoot ? sourceRoot + "/" : "";
|
|
787
|
-
return (source) => (0, import_resolve_uri.default)(prefix + (source || ""), from);
|
|
788
|
-
}
|
|
789
|
-
__name(resolver, "resolver");
|
|
790
|
-
var COLUMN = 0;
|
|
791
|
-
var SOURCES_INDEX = 1;
|
|
792
|
-
var SOURCE_LINE = 2;
|
|
793
|
-
var SOURCE_COLUMN = 3;
|
|
794
|
-
var NAMES_INDEX = 4;
|
|
795
|
-
var REV_GENERATED_LINE = 1;
|
|
796
|
-
var REV_GENERATED_COLUMN = 2;
|
|
797
|
-
function maybeSort(mappings, owned) {
|
|
798
|
-
const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
|
|
799
|
-
if (unsortedIndex === mappings.length) return mappings;
|
|
800
|
-
if (!owned) mappings = mappings.slice();
|
|
801
|
-
for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
|
|
802
|
-
mappings[i] = sortSegments(mappings[i], owned);
|
|
803
|
-
}
|
|
804
|
-
return mappings;
|
|
805
|
-
}
|
|
806
|
-
__name(maybeSort, "maybeSort");
|
|
807
|
-
function nextUnsortedSegmentLine(mappings, start) {
|
|
808
|
-
for (let i = start; i < mappings.length; i++) {
|
|
809
|
-
if (!isSorted(mappings[i])) return i;
|
|
810
|
-
}
|
|
811
|
-
return mappings.length;
|
|
812
|
-
}
|
|
813
|
-
__name(nextUnsortedSegmentLine, "nextUnsortedSegmentLine");
|
|
814
|
-
function isSorted(line) {
|
|
815
|
-
for (let j = 1; j < line.length; j++) {
|
|
816
|
-
if (line[j][COLUMN] < line[j - 1][COLUMN]) {
|
|
817
|
-
return false;
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
return true;
|
|
821
|
-
}
|
|
822
|
-
__name(isSorted, "isSorted");
|
|
823
|
-
function sortSegments(line, owned) {
|
|
824
|
-
if (!owned) line = line.slice();
|
|
825
|
-
return line.sort(sortComparator);
|
|
826
|
-
}
|
|
827
|
-
__name(sortSegments, "sortSegments");
|
|
828
|
-
function sortComparator(a, b) {
|
|
829
|
-
return a[COLUMN] - b[COLUMN];
|
|
830
|
-
}
|
|
831
|
-
__name(sortComparator, "sortComparator");
|
|
832
|
-
function buildBySources(decoded, memos) {
|
|
833
|
-
const sources = memos.map(() => []);
|
|
834
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
835
|
-
const line = decoded[i];
|
|
836
|
-
for (let j = 0; j < line.length; j++) {
|
|
837
|
-
const seg = line[j];
|
|
838
|
-
if (seg.length === 1) continue;
|
|
839
|
-
const sourceIndex2 = seg[SOURCES_INDEX];
|
|
840
|
-
const sourceLine = seg[SOURCE_LINE];
|
|
841
|
-
const sourceColumn = seg[SOURCE_COLUMN];
|
|
842
|
-
const source = sources[sourceIndex2];
|
|
843
|
-
const segs = source[sourceLine] || (source[sourceLine] = []);
|
|
844
|
-
segs.push([sourceColumn, i, seg[COLUMN]]);
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
for (let i = 0; i < sources.length; i++) {
|
|
848
|
-
const source = sources[i];
|
|
849
|
-
for (let j = 0; j < source.length; j++) {
|
|
850
|
-
const line = source[j];
|
|
851
|
-
if (line) line.sort(sortComparator);
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
return sources;
|
|
855
|
-
}
|
|
856
|
-
__name(buildBySources, "buildBySources");
|
|
857
|
-
var found = false;
|
|
858
|
-
function binarySearch(haystack, needle, low, high) {
|
|
859
|
-
while (low <= high) {
|
|
860
|
-
const mid = low + (high - low >> 1);
|
|
861
|
-
const cmp = haystack[mid][COLUMN] - needle;
|
|
862
|
-
if (cmp === 0) {
|
|
863
|
-
found = true;
|
|
864
|
-
return mid;
|
|
865
|
-
}
|
|
866
|
-
if (cmp < 0) {
|
|
867
|
-
low = mid + 1;
|
|
868
|
-
} else {
|
|
869
|
-
high = mid - 1;
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
found = false;
|
|
873
|
-
return low - 1;
|
|
874
|
-
}
|
|
875
|
-
__name(binarySearch, "binarySearch");
|
|
876
|
-
function upperBound(haystack, needle, index) {
|
|
877
|
-
for (let i = index + 1; i < haystack.length; index = i++) {
|
|
878
|
-
if (haystack[i][COLUMN] !== needle) break;
|
|
879
|
-
}
|
|
880
|
-
return index;
|
|
881
|
-
}
|
|
882
|
-
__name(upperBound, "upperBound");
|
|
883
|
-
function lowerBound(haystack, needle, index) {
|
|
884
|
-
for (let i = index - 1; i >= 0; index = i--) {
|
|
885
|
-
if (haystack[i][COLUMN] !== needle) break;
|
|
886
|
-
}
|
|
887
|
-
return index;
|
|
888
|
-
}
|
|
889
|
-
__name(lowerBound, "lowerBound");
|
|
890
|
-
function memoizedState() {
|
|
891
|
-
return {
|
|
892
|
-
lastKey: -1,
|
|
893
|
-
lastNeedle: -1,
|
|
894
|
-
lastIndex: -1
|
|
895
|
-
};
|
|
896
|
-
}
|
|
897
|
-
__name(memoizedState, "memoizedState");
|
|
898
|
-
function memoizedBinarySearch(haystack, needle, state, key) {
|
|
899
|
-
const { lastKey, lastNeedle, lastIndex } = state;
|
|
900
|
-
let low = 0;
|
|
901
|
-
let high = haystack.length - 1;
|
|
902
|
-
if (key === lastKey) {
|
|
903
|
-
if (needle === lastNeedle) {
|
|
904
|
-
found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
|
|
905
|
-
return lastIndex;
|
|
906
|
-
}
|
|
907
|
-
if (needle >= lastNeedle) {
|
|
908
|
-
low = lastIndex === -1 ? 0 : lastIndex;
|
|
909
|
-
} else {
|
|
910
|
-
high = lastIndex;
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
state.lastKey = key;
|
|
914
|
-
state.lastNeedle = needle;
|
|
915
|
-
return state.lastIndex = binarySearch(haystack, needle, low, high);
|
|
916
|
-
}
|
|
917
|
-
__name(memoizedBinarySearch, "memoizedBinarySearch");
|
|
918
|
-
function parse(map) {
|
|
919
|
-
return typeof map === "string" ? JSON.parse(map) : map;
|
|
920
|
-
}
|
|
921
|
-
__name(parse, "parse");
|
|
922
|
-
var FlattenMap = /* @__PURE__ */ __name(function(map, mapUrl) {
|
|
923
|
-
const parsed = parse(map);
|
|
924
|
-
if (!("sections" in parsed)) {
|
|
925
|
-
return new TraceMap(parsed, mapUrl);
|
|
926
|
-
}
|
|
927
|
-
const mappings = [];
|
|
928
|
-
const sources = [];
|
|
929
|
-
const sourcesContent = [];
|
|
930
|
-
const names = [];
|
|
931
|
-
const ignoreList = [];
|
|
932
|
-
recurse(
|
|
933
|
-
parsed,
|
|
934
|
-
mapUrl,
|
|
935
|
-
mappings,
|
|
936
|
-
sources,
|
|
937
|
-
sourcesContent,
|
|
938
|
-
names,
|
|
939
|
-
ignoreList,
|
|
940
|
-
0,
|
|
941
|
-
0,
|
|
942
|
-
Infinity,
|
|
943
|
-
Infinity
|
|
944
|
-
);
|
|
945
|
-
const joined = {
|
|
946
|
-
version: 3,
|
|
947
|
-
file: parsed.file,
|
|
948
|
-
names,
|
|
949
|
-
sources,
|
|
950
|
-
sourcesContent,
|
|
951
|
-
mappings,
|
|
952
|
-
ignoreList
|
|
953
|
-
};
|
|
954
|
-
return presortedDecodedMap(joined);
|
|
955
|
-
}, "FlattenMap");
|
|
956
|
-
function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
|
|
957
|
-
const { sections } = input;
|
|
958
|
-
for (let i = 0; i < sections.length; i++) {
|
|
959
|
-
const { map, offset } = sections[i];
|
|
960
|
-
let sl = stopLine;
|
|
961
|
-
let sc = stopColumn;
|
|
962
|
-
if (i + 1 < sections.length) {
|
|
963
|
-
const nextOffset = sections[i + 1].offset;
|
|
964
|
-
sl = Math.min(stopLine, lineOffset + nextOffset.line);
|
|
965
|
-
if (sl === stopLine) {
|
|
966
|
-
sc = Math.min(stopColumn, columnOffset + nextOffset.column);
|
|
967
|
-
} else if (sl < stopLine) {
|
|
968
|
-
sc = columnOffset + nextOffset.column;
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
addSection(
|
|
972
|
-
map,
|
|
973
|
-
mapUrl,
|
|
974
|
-
mappings,
|
|
975
|
-
sources,
|
|
976
|
-
sourcesContent,
|
|
977
|
-
names,
|
|
978
|
-
ignoreList,
|
|
979
|
-
lineOffset + offset.line,
|
|
980
|
-
columnOffset + offset.column,
|
|
981
|
-
sl,
|
|
982
|
-
sc
|
|
983
|
-
);
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
__name(recurse, "recurse");
|
|
987
|
-
function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
|
|
988
|
-
const parsed = parse(input);
|
|
989
|
-
if ("sections" in parsed) return recurse(...arguments);
|
|
990
|
-
const map = new TraceMap(parsed, mapUrl);
|
|
991
|
-
const sourcesOffset = sources.length;
|
|
992
|
-
const namesOffset = names.length;
|
|
993
|
-
const decoded = decodedMappings(map);
|
|
994
|
-
const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;
|
|
995
|
-
append(sources, resolvedSources);
|
|
996
|
-
append(names, map.names);
|
|
997
|
-
if (contents) append(sourcesContent, contents);
|
|
998
|
-
else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);
|
|
999
|
-
if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);
|
|
1000
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
1001
|
-
const lineI = lineOffset + i;
|
|
1002
|
-
if (lineI > stopLine) return;
|
|
1003
|
-
const out = getLine(mappings, lineI);
|
|
1004
|
-
const cOffset = i === 0 ? columnOffset : 0;
|
|
1005
|
-
const line = decoded[i];
|
|
1006
|
-
for (let j = 0; j < line.length; j++) {
|
|
1007
|
-
const seg = line[j];
|
|
1008
|
-
const column = cOffset + seg[COLUMN];
|
|
1009
|
-
if (lineI === stopLine && column >= stopColumn) return;
|
|
1010
|
-
if (seg.length === 1) {
|
|
1011
|
-
out.push([column]);
|
|
1012
|
-
continue;
|
|
1013
|
-
}
|
|
1014
|
-
const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
|
|
1015
|
-
const sourceLine = seg[SOURCE_LINE];
|
|
1016
|
-
const sourceColumn = seg[SOURCE_COLUMN];
|
|
1017
|
-
out.push(
|
|
1018
|
-
seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]
|
|
1019
|
-
);
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
__name(addSection, "addSection");
|
|
1024
|
-
function append(arr, other) {
|
|
1025
|
-
for (let i = 0; i < other.length; i++) arr.push(other[i]);
|
|
1026
|
-
}
|
|
1027
|
-
__name(append, "append");
|
|
1028
|
-
function getLine(arr, index) {
|
|
1029
|
-
for (let i = arr.length; i <= index; i++) arr[i] = [];
|
|
1030
|
-
return arr[index];
|
|
1031
|
-
}
|
|
1032
|
-
__name(getLine, "getLine");
|
|
1033
|
-
var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
|
|
1034
|
-
var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
|
|
1035
|
-
var LEAST_UPPER_BOUND = -1;
|
|
1036
|
-
var GREATEST_LOWER_BOUND = 1;
|
|
1037
|
-
var TraceMap = class {
|
|
1038
|
-
static {
|
|
1039
|
-
__name(this, "TraceMap");
|
|
1040
|
-
}
|
|
1041
|
-
constructor(map, mapUrl) {
|
|
1042
|
-
const isString = typeof map === "string";
|
|
1043
|
-
if (!isString && map._decodedMemo) return map;
|
|
1044
|
-
const parsed = parse(map);
|
|
1045
|
-
const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
|
|
1046
|
-
this.version = version;
|
|
1047
|
-
this.file = file;
|
|
1048
|
-
this.names = names || [];
|
|
1049
|
-
this.sourceRoot = sourceRoot;
|
|
1050
|
-
this.sources = sources;
|
|
1051
|
-
this.sourcesContent = sourcesContent;
|
|
1052
|
-
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
|
|
1053
|
-
const resolve = resolver(mapUrl, sourceRoot);
|
|
1054
|
-
this.resolvedSources = sources.map(resolve);
|
|
1055
|
-
const { mappings } = parsed;
|
|
1056
|
-
if (typeof mappings === "string") {
|
|
1057
|
-
this._encoded = mappings;
|
|
1058
|
-
this._decoded = void 0;
|
|
1059
|
-
} else if (Array.isArray(mappings)) {
|
|
1060
|
-
this._encoded = void 0;
|
|
1061
|
-
this._decoded = maybeSort(mappings, isString);
|
|
1062
|
-
} else if (parsed.sections) {
|
|
1063
|
-
throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
|
|
1064
|
-
} else {
|
|
1065
|
-
throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
|
|
1066
|
-
}
|
|
1067
|
-
this._decodedMemo = memoizedState();
|
|
1068
|
-
this._bySources = void 0;
|
|
1069
|
-
this._bySourceMemos = void 0;
|
|
1070
|
-
}
|
|
1071
|
-
};
|
|
1072
|
-
function cast(map) {
|
|
1073
|
-
return map;
|
|
1074
|
-
}
|
|
1075
|
-
__name(cast, "cast");
|
|
1076
|
-
function encodedMappings(map) {
|
|
1077
|
-
var _a, _b;
|
|
1078
|
-
return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = (0, import_sourcemap_codec.encode)(cast(map)._decoded);
|
|
1079
|
-
}
|
|
1080
|
-
__name(encodedMappings, "encodedMappings");
|
|
1081
|
-
function decodedMappings(map) {
|
|
1082
|
-
var _a;
|
|
1083
|
-
return (_a = cast(map))._decoded || (_a._decoded = (0, import_sourcemap_codec.decode)(cast(map)._encoded));
|
|
1084
|
-
}
|
|
1085
|
-
__name(decodedMappings, "decodedMappings");
|
|
1086
|
-
function traceSegment(map, line, column) {
|
|
1087
|
-
const decoded = decodedMappings(map);
|
|
1088
|
-
if (line >= decoded.length) return null;
|
|
1089
|
-
const segments = decoded[line];
|
|
1090
|
-
const index = traceSegmentInternal(
|
|
1091
|
-
segments,
|
|
1092
|
-
cast(map)._decodedMemo,
|
|
1093
|
-
line,
|
|
1094
|
-
column,
|
|
1095
|
-
GREATEST_LOWER_BOUND
|
|
1096
|
-
);
|
|
1097
|
-
return index === -1 ? null : segments[index];
|
|
1098
|
-
}
|
|
1099
|
-
__name(traceSegment, "traceSegment");
|
|
1100
|
-
function originalPositionFor(map, needle) {
|
|
1101
|
-
let { line, column, bias } = needle;
|
|
1102
|
-
line--;
|
|
1103
|
-
if (line < 0) throw new Error(LINE_GTR_ZERO);
|
|
1104
|
-
if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
|
|
1105
|
-
const decoded = decodedMappings(map);
|
|
1106
|
-
if (line >= decoded.length) return OMapping(null, null, null, null);
|
|
1107
|
-
const segments = decoded[line];
|
|
1108
|
-
const index = traceSegmentInternal(
|
|
1109
|
-
segments,
|
|
1110
|
-
cast(map)._decodedMemo,
|
|
1111
|
-
line,
|
|
1112
|
-
column,
|
|
1113
|
-
bias || GREATEST_LOWER_BOUND
|
|
1114
|
-
);
|
|
1115
|
-
if (index === -1) return OMapping(null, null, null, null);
|
|
1116
|
-
const segment = segments[index];
|
|
1117
|
-
if (segment.length === 1) return OMapping(null, null, null, null);
|
|
1118
|
-
const { names, resolvedSources } = map;
|
|
1119
|
-
return OMapping(
|
|
1120
|
-
resolvedSources[segment[SOURCES_INDEX]],
|
|
1121
|
-
segment[SOURCE_LINE] + 1,
|
|
1122
|
-
segment[SOURCE_COLUMN],
|
|
1123
|
-
segment.length === 5 ? names[segment[NAMES_INDEX]] : null
|
|
1124
|
-
);
|
|
1125
|
-
}
|
|
1126
|
-
__name(originalPositionFor, "originalPositionFor");
|
|
1127
|
-
function generatedPositionFor(map, needle) {
|
|
1128
|
-
const { source, line, column, bias } = needle;
|
|
1129
|
-
return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
|
|
1130
|
-
}
|
|
1131
|
-
__name(generatedPositionFor, "generatedPositionFor");
|
|
1132
|
-
function allGeneratedPositionsFor(map, needle) {
|
|
1133
|
-
const { source, line, column, bias } = needle;
|
|
1134
|
-
return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
|
|
1135
|
-
}
|
|
1136
|
-
__name(allGeneratedPositionsFor, "allGeneratedPositionsFor");
|
|
1137
|
-
function eachMapping(map, cb) {
|
|
1138
|
-
const decoded = decodedMappings(map);
|
|
1139
|
-
const { names, resolvedSources } = map;
|
|
1140
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
1141
|
-
const line = decoded[i];
|
|
1142
|
-
for (let j = 0; j < line.length; j++) {
|
|
1143
|
-
const seg = line[j];
|
|
1144
|
-
const generatedLine = i + 1;
|
|
1145
|
-
const generatedColumn = seg[0];
|
|
1146
|
-
let source = null;
|
|
1147
|
-
let originalLine = null;
|
|
1148
|
-
let originalColumn = null;
|
|
1149
|
-
let name = null;
|
|
1150
|
-
if (seg.length !== 1) {
|
|
1151
|
-
source = resolvedSources[seg[1]];
|
|
1152
|
-
originalLine = seg[2] + 1;
|
|
1153
|
-
originalColumn = seg[3];
|
|
1154
|
-
}
|
|
1155
|
-
if (seg.length === 5) name = names[seg[4]];
|
|
1156
|
-
cb({
|
|
1157
|
-
generatedLine,
|
|
1158
|
-
generatedColumn,
|
|
1159
|
-
source,
|
|
1160
|
-
originalLine,
|
|
1161
|
-
originalColumn,
|
|
1162
|
-
name
|
|
1163
|
-
});
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
__name(eachMapping, "eachMapping");
|
|
1168
|
-
function sourceIndex(map, source) {
|
|
1169
|
-
const { sources, resolvedSources } = map;
|
|
1170
|
-
let index = sources.indexOf(source);
|
|
1171
|
-
if (index === -1) index = resolvedSources.indexOf(source);
|
|
1172
|
-
return index;
|
|
1173
|
-
}
|
|
1174
|
-
__name(sourceIndex, "sourceIndex");
|
|
1175
|
-
function sourceContentFor(map, source) {
|
|
1176
|
-
const { sourcesContent } = map;
|
|
1177
|
-
if (sourcesContent == null) return null;
|
|
1178
|
-
const index = sourceIndex(map, source);
|
|
1179
|
-
return index === -1 ? null : sourcesContent[index];
|
|
1180
|
-
}
|
|
1181
|
-
__name(sourceContentFor, "sourceContentFor");
|
|
1182
|
-
function isIgnored(map, source) {
|
|
1183
|
-
const { ignoreList } = map;
|
|
1184
|
-
if (ignoreList == null) return false;
|
|
1185
|
-
const index = sourceIndex(map, source);
|
|
1186
|
-
return index === -1 ? false : ignoreList.includes(index);
|
|
1187
|
-
}
|
|
1188
|
-
__name(isIgnored, "isIgnored");
|
|
1189
|
-
function presortedDecodedMap(map, mapUrl) {
|
|
1190
|
-
const tracer = new TraceMap(clone(map, []), mapUrl);
|
|
1191
|
-
cast(tracer)._decoded = map.mappings;
|
|
1192
|
-
return tracer;
|
|
1193
|
-
}
|
|
1194
|
-
__name(presortedDecodedMap, "presortedDecodedMap");
|
|
1195
|
-
function decodedMap(map) {
|
|
1196
|
-
return clone(map, decodedMappings(map));
|
|
1197
|
-
}
|
|
1198
|
-
__name(decodedMap, "decodedMap");
|
|
1199
|
-
function encodedMap(map) {
|
|
1200
|
-
return clone(map, encodedMappings(map));
|
|
1201
|
-
}
|
|
1202
|
-
__name(encodedMap, "encodedMap");
|
|
1203
|
-
function clone(map, mappings) {
|
|
1204
|
-
return {
|
|
1205
|
-
version: map.version,
|
|
1206
|
-
file: map.file,
|
|
1207
|
-
names: map.names,
|
|
1208
|
-
sourceRoot: map.sourceRoot,
|
|
1209
|
-
sources: map.sources,
|
|
1210
|
-
sourcesContent: map.sourcesContent,
|
|
1211
|
-
mappings,
|
|
1212
|
-
ignoreList: map.ignoreList || map.x_google_ignoreList
|
|
1213
|
-
};
|
|
1214
|
-
}
|
|
1215
|
-
__name(clone, "clone");
|
|
1216
|
-
function OMapping(source, line, column, name) {
|
|
1217
|
-
return { source, line, column, name };
|
|
1218
|
-
}
|
|
1219
|
-
__name(OMapping, "OMapping");
|
|
1220
|
-
function GMapping(line, column) {
|
|
1221
|
-
return { line, column };
|
|
1222
|
-
}
|
|
1223
|
-
__name(GMapping, "GMapping");
|
|
1224
|
-
function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
1225
|
-
let index = memoizedBinarySearch(segments, column, memo, line);
|
|
1226
|
-
if (found) {
|
|
1227
|
-
index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
|
|
1228
|
-
} else if (bias === LEAST_UPPER_BOUND) index++;
|
|
1229
|
-
if (index === -1 || index === segments.length) return -1;
|
|
1230
|
-
return index;
|
|
1231
|
-
}
|
|
1232
|
-
__name(traceSegmentInternal, "traceSegmentInternal");
|
|
1233
|
-
function sliceGeneratedPositions(segments, memo, line, column, bias) {
|
|
1234
|
-
let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
|
|
1235
|
-
if (!found && bias === LEAST_UPPER_BOUND) min++;
|
|
1236
|
-
if (min === -1 || min === segments.length) return [];
|
|
1237
|
-
const matchedColumn = found ? column : segments[min][COLUMN];
|
|
1238
|
-
if (!found) min = lowerBound(segments, matchedColumn, min);
|
|
1239
|
-
const max = upperBound(segments, matchedColumn, min);
|
|
1240
|
-
const result = [];
|
|
1241
|
-
for (; min <= max; min++) {
|
|
1242
|
-
const segment = segments[min];
|
|
1243
|
-
result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
|
|
1244
|
-
}
|
|
1245
|
-
return result;
|
|
1246
|
-
}
|
|
1247
|
-
__name(sliceGeneratedPositions, "sliceGeneratedPositions");
|
|
1248
|
-
function generatedPosition(map, source, line, column, bias, all) {
|
|
1249
|
-
var _a, _b;
|
|
1250
|
-
line--;
|
|
1251
|
-
if (line < 0) throw new Error(LINE_GTR_ZERO);
|
|
1252
|
-
if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
|
|
1253
|
-
const { sources, resolvedSources } = map;
|
|
1254
|
-
let sourceIndex2 = sources.indexOf(source);
|
|
1255
|
-
if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source);
|
|
1256
|
-
if (sourceIndex2 === -1) return all ? [] : GMapping(null, null);
|
|
1257
|
-
const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState));
|
|
1258
|
-
const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos));
|
|
1259
|
-
const segments = generated[sourceIndex2][line];
|
|
1260
|
-
if (segments == null) return all ? [] : GMapping(null, null);
|
|
1261
|
-
const memo = bySourceMemos[sourceIndex2];
|
|
1262
|
-
if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);
|
|
1263
|
-
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
1264
|
-
if (index === -1) return GMapping(null, null);
|
|
1265
|
-
const segment = segments[index];
|
|
1266
|
-
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
|
|
1267
|
-
}
|
|
1268
|
-
__name(generatedPosition, "generatedPosition");
|
|
1269
|
-
});
|
|
1270
|
-
}
|
|
1271
|
-
});
|
|
1272
|
-
|
|
1273
|
-
// ../node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js
|
|
1274
|
-
var require_gen_mapping_umd = __commonJS({
|
|
1275
|
-
"../node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(exports, module) {
|
|
1276
|
-
(function(global, factory) {
|
|
1277
|
-
if (typeof exports === "object" && typeof module !== "undefined") {
|
|
1278
|
-
factory(module, require_sourcemap_codec_umd(), require_trace_mapping_umd());
|
|
1279
|
-
module.exports = def(module);
|
|
1280
|
-
} else if (typeof define === "function" && define.amd) {
|
|
1281
|
-
define(["module", "@jridgewell/sourcemap-codec", "@jridgewell/trace-mapping"], function(mod) {
|
|
1282
|
-
factory.apply(this, arguments);
|
|
1283
|
-
mod.exports = def(mod);
|
|
1284
|
-
});
|
|
1285
|
-
} else {
|
|
1286
|
-
const mod = { exports: {} };
|
|
1287
|
-
factory(mod, global.sourcemapCodec, global.traceMapping);
|
|
1288
|
-
global = typeof globalThis !== "undefined" ? globalThis : global || self;
|
|
1289
|
-
global.genMapping = def(mod);
|
|
1290
|
-
}
|
|
1291
|
-
function def(m) {
|
|
1292
|
-
return "default" in m.exports ? m.exports.default : m.exports;
|
|
1293
|
-
}
|
|
1294
|
-
__name(def, "def");
|
|
1295
|
-
})(exports, function(module2, require_sourcemapCodec, require_traceMapping) {
|
|
1296
|
-
"use strict";
|
|
1297
|
-
var __create = Object.create;
|
|
1298
|
-
var __defProp = Object.defineProperty;
|
|
1299
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
1300
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
1301
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
1302
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1303
|
-
var __commonJS2 = /* @__PURE__ */ __name((cb, mod) => /* @__PURE__ */ __name(function __require() {
|
|
1304
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1305
|
-
}, "__require"), "__commonJS");
|
|
1306
|
-
var __export = /* @__PURE__ */ __name((target, all) => {
|
|
1307
|
-
for (var name in all)
|
|
1308
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
1309
|
-
}, "__export");
|
|
1310
|
-
var __copyProps = /* @__PURE__ */ __name((to, from, except, desc) => {
|
|
1311
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1312
|
-
for (let key of __getOwnPropNames(from))
|
|
1313
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
1314
|
-
__defProp(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
1315
|
-
}
|
|
1316
|
-
return to;
|
|
1317
|
-
}, "__copyProps");
|
|
1318
|
-
var __toESM = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
1319
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
1320
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
1321
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1322
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
1323
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
1324
|
-
mod
|
|
1325
|
-
)), "__toESM");
|
|
1326
|
-
var __toCommonJS = /* @__PURE__ */ __name((mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
1327
|
-
var require_sourcemap_codec = __commonJS2({
|
|
1328
|
-
"umd:@jridgewell/sourcemap-codec"(exports2, module22) {
|
|
1329
|
-
module22.exports = require_sourcemapCodec;
|
|
1330
|
-
}
|
|
1331
|
-
});
|
|
1332
|
-
var require_trace_mapping = __commonJS2({
|
|
1333
|
-
"umd:@jridgewell/trace-mapping"(exports2, module22) {
|
|
1334
|
-
module22.exports = require_traceMapping;
|
|
1335
|
-
}
|
|
1336
|
-
});
|
|
1337
|
-
var gen_mapping_exports = {};
|
|
1338
|
-
__export(gen_mapping_exports, {
|
|
1339
|
-
GenMapping: /* @__PURE__ */ __name(() => GenMapping, "GenMapping"),
|
|
1340
|
-
addMapping: /* @__PURE__ */ __name(() => addMapping, "addMapping"),
|
|
1341
|
-
addSegment: /* @__PURE__ */ __name(() => addSegment, "addSegment"),
|
|
1342
|
-
allMappings: /* @__PURE__ */ __name(() => allMappings, "allMappings"),
|
|
1343
|
-
fromMap: /* @__PURE__ */ __name(() => fromMap, "fromMap"),
|
|
1344
|
-
maybeAddMapping: /* @__PURE__ */ __name(() => maybeAddMapping, "maybeAddMapping"),
|
|
1345
|
-
maybeAddSegment: /* @__PURE__ */ __name(() => maybeAddSegment, "maybeAddSegment"),
|
|
1346
|
-
setIgnore: /* @__PURE__ */ __name(() => setIgnore, "setIgnore"),
|
|
1347
|
-
setSourceContent: /* @__PURE__ */ __name(() => setSourceContent, "setSourceContent"),
|
|
1348
|
-
toDecodedMap: /* @__PURE__ */ __name(() => toDecodedMap, "toDecodedMap"),
|
|
1349
|
-
toEncodedMap: /* @__PURE__ */ __name(() => toEncodedMap, "toEncodedMap")
|
|
1350
|
-
});
|
|
1351
|
-
module2.exports = __toCommonJS(gen_mapping_exports);
|
|
1352
|
-
var SetArray = class {
|
|
1353
|
-
static {
|
|
1354
|
-
__name(this, "SetArray");
|
|
1355
|
-
}
|
|
1356
|
-
constructor() {
|
|
1357
|
-
this._indexes = { __proto__: null };
|
|
1358
|
-
this.array = [];
|
|
1359
|
-
}
|
|
1360
|
-
};
|
|
1361
|
-
function cast(set) {
|
|
1362
|
-
return set;
|
|
1363
|
-
}
|
|
1364
|
-
__name(cast, "cast");
|
|
1365
|
-
function get(setarr, key) {
|
|
1366
|
-
return cast(setarr)._indexes[key];
|
|
1367
|
-
}
|
|
1368
|
-
__name(get, "get");
|
|
1369
|
-
function put(setarr, key) {
|
|
1370
|
-
const index = get(setarr, key);
|
|
1371
|
-
if (index !== void 0) return index;
|
|
1372
|
-
const { array, _indexes: indexes } = cast(setarr);
|
|
1373
|
-
const length = array.push(key);
|
|
1374
|
-
return indexes[key] = length - 1;
|
|
1375
|
-
}
|
|
1376
|
-
__name(put, "put");
|
|
1377
|
-
function remove(setarr, key) {
|
|
1378
|
-
const index = get(setarr, key);
|
|
1379
|
-
if (index === void 0) return;
|
|
1380
|
-
const { array, _indexes: indexes } = cast(setarr);
|
|
1381
|
-
for (let i = index + 1; i < array.length; i++) {
|
|
1382
|
-
const k = array[i];
|
|
1383
|
-
array[i - 1] = k;
|
|
1384
|
-
indexes[k]--;
|
|
1385
|
-
}
|
|
1386
|
-
indexes[key] = void 0;
|
|
1387
|
-
array.pop();
|
|
1388
|
-
}
|
|
1389
|
-
__name(remove, "remove");
|
|
1390
|
-
var import_sourcemap_codec = __toESM(require_sourcemap_codec());
|
|
1391
|
-
var import_trace_mapping = __toESM(require_trace_mapping());
|
|
1392
|
-
var COLUMN = 0;
|
|
1393
|
-
var SOURCES_INDEX = 1;
|
|
1394
|
-
var SOURCE_LINE = 2;
|
|
1395
|
-
var SOURCE_COLUMN = 3;
|
|
1396
|
-
var NAMES_INDEX = 4;
|
|
1397
|
-
var NO_NAME = -1;
|
|
1398
|
-
var GenMapping = class {
|
|
1399
|
-
static {
|
|
1400
|
-
__name(this, "GenMapping");
|
|
1401
|
-
}
|
|
1402
|
-
constructor({ file, sourceRoot } = {}) {
|
|
1403
|
-
this._names = new SetArray();
|
|
1404
|
-
this._sources = new SetArray();
|
|
1405
|
-
this._sourcesContent = [];
|
|
1406
|
-
this._mappings = [];
|
|
1407
|
-
this.file = file;
|
|
1408
|
-
this.sourceRoot = sourceRoot;
|
|
1409
|
-
this._ignoreList = new SetArray();
|
|
1410
|
-
}
|
|
1411
|
-
};
|
|
1412
|
-
function cast2(map) {
|
|
1413
|
-
return map;
|
|
1414
|
-
}
|
|
1415
|
-
__name(cast2, "cast2");
|
|
1416
|
-
function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
1417
|
-
return addSegmentInternal(
|
|
1418
|
-
false,
|
|
1419
|
-
map,
|
|
1420
|
-
genLine,
|
|
1421
|
-
genColumn,
|
|
1422
|
-
source,
|
|
1423
|
-
sourceLine,
|
|
1424
|
-
sourceColumn,
|
|
1425
|
-
name,
|
|
1426
|
-
content
|
|
1427
|
-
);
|
|
1428
|
-
}
|
|
1429
|
-
__name(addSegment, "addSegment");
|
|
1430
|
-
function addMapping(map, mapping) {
|
|
1431
|
-
return addMappingInternal(false, map, mapping);
|
|
1432
|
-
}
|
|
1433
|
-
__name(addMapping, "addMapping");
|
|
1434
|
-
var maybeAddSegment = /* @__PURE__ */ __name((map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
|
|
1435
|
-
return addSegmentInternal(
|
|
1436
|
-
true,
|
|
1437
|
-
map,
|
|
1438
|
-
genLine,
|
|
1439
|
-
genColumn,
|
|
1440
|
-
source,
|
|
1441
|
-
sourceLine,
|
|
1442
|
-
sourceColumn,
|
|
1443
|
-
name,
|
|
1444
|
-
content
|
|
1445
|
-
);
|
|
1446
|
-
}, "maybeAddSegment");
|
|
1447
|
-
var maybeAddMapping = /* @__PURE__ */ __name((map, mapping) => {
|
|
1448
|
-
return addMappingInternal(true, map, mapping);
|
|
1449
|
-
}, "maybeAddMapping");
|
|
1450
|
-
function setSourceContent(map, source, content) {
|
|
1451
|
-
const {
|
|
1452
|
-
_sources: sources,
|
|
1453
|
-
_sourcesContent: sourcesContent
|
|
1454
|
-
// _originalScopes: originalScopes,
|
|
1455
|
-
} = cast2(map);
|
|
1456
|
-
const index = put(sources, source);
|
|
1457
|
-
sourcesContent[index] = content;
|
|
1458
|
-
}
|
|
1459
|
-
__name(setSourceContent, "setSourceContent");
|
|
1460
|
-
function setIgnore(map, source, ignore = true) {
|
|
1461
|
-
const {
|
|
1462
|
-
_sources: sources,
|
|
1463
|
-
_sourcesContent: sourcesContent,
|
|
1464
|
-
_ignoreList: ignoreList
|
|
1465
|
-
// _originalScopes: originalScopes,
|
|
1466
|
-
} = cast2(map);
|
|
1467
|
-
const index = put(sources, source);
|
|
1468
|
-
if (index === sourcesContent.length) sourcesContent[index] = null;
|
|
1469
|
-
if (ignore) put(ignoreList, index);
|
|
1470
|
-
else remove(ignoreList, index);
|
|
1471
|
-
}
|
|
1472
|
-
__name(setIgnore, "setIgnore");
|
|
1473
|
-
function toDecodedMap(map) {
|
|
1474
|
-
const {
|
|
1475
|
-
_mappings: mappings,
|
|
1476
|
-
_sources: sources,
|
|
1477
|
-
_sourcesContent: sourcesContent,
|
|
1478
|
-
_names: names,
|
|
1479
|
-
_ignoreList: ignoreList
|
|
1480
|
-
// _originalScopes: originalScopes,
|
|
1481
|
-
// _generatedRanges: generatedRanges,
|
|
1482
|
-
} = cast2(map);
|
|
1483
|
-
removeEmptyFinalLines(mappings);
|
|
1484
|
-
return {
|
|
1485
|
-
version: 3,
|
|
1486
|
-
file: map.file || void 0,
|
|
1487
|
-
names: names.array,
|
|
1488
|
-
sourceRoot: map.sourceRoot || void 0,
|
|
1489
|
-
sources: sources.array,
|
|
1490
|
-
sourcesContent,
|
|
1491
|
-
mappings,
|
|
1492
|
-
// originalScopes,
|
|
1493
|
-
// generatedRanges,
|
|
1494
|
-
ignoreList: ignoreList.array
|
|
1495
|
-
};
|
|
1496
|
-
}
|
|
1497
|
-
__name(toDecodedMap, "toDecodedMap");
|
|
1498
|
-
function toEncodedMap(map) {
|
|
1499
|
-
const decoded = toDecodedMap(map);
|
|
1500
|
-
return Object.assign({}, decoded, {
|
|
1501
|
-
// originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)),
|
|
1502
|
-
// generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]),
|
|
1503
|
-
mappings: (0, import_sourcemap_codec.encode)(decoded.mappings)
|
|
1504
|
-
});
|
|
1505
|
-
}
|
|
1506
|
-
__name(toEncodedMap, "toEncodedMap");
|
|
1507
|
-
function fromMap(input) {
|
|
1508
|
-
const map = new import_trace_mapping.TraceMap(input);
|
|
1509
|
-
const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
|
|
1510
|
-
putAll(cast2(gen)._names, map.names);
|
|
1511
|
-
putAll(cast2(gen)._sources, map.sources);
|
|
1512
|
-
cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);
|
|
1513
|
-
cast2(gen)._mappings = (0, import_trace_mapping.decodedMappings)(map);
|
|
1514
|
-
if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList);
|
|
1515
|
-
return gen;
|
|
1516
|
-
}
|
|
1517
|
-
__name(fromMap, "fromMap");
|
|
1518
|
-
function allMappings(map) {
|
|
1519
|
-
const out = [];
|
|
1520
|
-
const { _mappings: mappings, _sources: sources, _names: names } = cast2(map);
|
|
1521
|
-
for (let i = 0; i < mappings.length; i++) {
|
|
1522
|
-
const line = mappings[i];
|
|
1523
|
-
for (let j = 0; j < line.length; j++) {
|
|
1524
|
-
const seg = line[j];
|
|
1525
|
-
const generated = { line: i + 1, column: seg[COLUMN] };
|
|
1526
|
-
let source = void 0;
|
|
1527
|
-
let original = void 0;
|
|
1528
|
-
let name = void 0;
|
|
1529
|
-
if (seg.length !== 1) {
|
|
1530
|
-
source = sources.array[seg[SOURCES_INDEX]];
|
|
1531
|
-
original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };
|
|
1532
|
-
if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];
|
|
1533
|
-
}
|
|
1534
|
-
out.push({ generated, source, original, name });
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
return out;
|
|
1538
|
-
}
|
|
1539
|
-
__name(allMappings, "allMappings");
|
|
1540
|
-
function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
1541
|
-
const {
|
|
1542
|
-
_mappings: mappings,
|
|
1543
|
-
_sources: sources,
|
|
1544
|
-
_sourcesContent: sourcesContent,
|
|
1545
|
-
_names: names
|
|
1546
|
-
// _originalScopes: originalScopes,
|
|
1547
|
-
} = cast2(map);
|
|
1548
|
-
const line = getIndex(mappings, genLine);
|
|
1549
|
-
const index = getColumnIndex(line, genColumn);
|
|
1550
|
-
if (!source) {
|
|
1551
|
-
if (skipable && skipSourceless(line, index)) return;
|
|
1552
|
-
return insert(line, index, [genColumn]);
|
|
1553
|
-
}
|
|
1554
|
-
assert(sourceLine);
|
|
1555
|
-
assert(sourceColumn);
|
|
1556
|
-
const sourcesIndex = put(sources, source);
|
|
1557
|
-
const namesIndex = name ? put(names, name) : NO_NAME;
|
|
1558
|
-
if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
|
|
1559
|
-
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
|
|
1560
|
-
return;
|
|
1561
|
-
}
|
|
1562
|
-
return insert(
|
|
1563
|
-
line,
|
|
1564
|
-
index,
|
|
1565
|
-
name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn]
|
|
1566
|
-
);
|
|
1567
|
-
}
|
|
1568
|
-
__name(addSegmentInternal, "addSegmentInternal");
|
|
1569
|
-
function assert(_val) {
|
|
1570
|
-
}
|
|
1571
|
-
__name(assert, "assert");
|
|
1572
|
-
function getIndex(arr, index) {
|
|
1573
|
-
for (let i = arr.length; i <= index; i++) {
|
|
1574
|
-
arr[i] = [];
|
|
1575
|
-
}
|
|
1576
|
-
return arr[index];
|
|
1577
|
-
}
|
|
1578
|
-
__name(getIndex, "getIndex");
|
|
1579
|
-
function getColumnIndex(line, genColumn) {
|
|
1580
|
-
let index = line.length;
|
|
1581
|
-
for (let i = index - 1; i >= 0; index = i--) {
|
|
1582
|
-
const current = line[i];
|
|
1583
|
-
if (genColumn >= current[COLUMN]) break;
|
|
1584
|
-
}
|
|
1585
|
-
return index;
|
|
1586
|
-
}
|
|
1587
|
-
__name(getColumnIndex, "getColumnIndex");
|
|
1588
|
-
function insert(array, index, value) {
|
|
1589
|
-
for (let i = array.length; i > index; i--) {
|
|
1590
|
-
array[i] = array[i - 1];
|
|
1591
|
-
}
|
|
1592
|
-
array[index] = value;
|
|
1593
|
-
}
|
|
1594
|
-
__name(insert, "insert");
|
|
1595
|
-
function removeEmptyFinalLines(mappings) {
|
|
1596
|
-
const { length } = mappings;
|
|
1597
|
-
let len = length;
|
|
1598
|
-
for (let i = len - 1; i >= 0; len = i, i--) {
|
|
1599
|
-
if (mappings[i].length > 0) break;
|
|
1600
|
-
}
|
|
1601
|
-
if (len < length) mappings.length = len;
|
|
1602
|
-
}
|
|
1603
|
-
__name(removeEmptyFinalLines, "removeEmptyFinalLines");
|
|
1604
|
-
function putAll(setarr, array) {
|
|
1605
|
-
for (let i = 0; i < array.length; i++) put(setarr, array[i]);
|
|
1606
|
-
}
|
|
1607
|
-
__name(putAll, "putAll");
|
|
1608
|
-
function skipSourceless(line, index) {
|
|
1609
|
-
if (index === 0) return true;
|
|
1610
|
-
const prev = line[index - 1];
|
|
1611
|
-
return prev.length === 1;
|
|
1612
|
-
}
|
|
1613
|
-
__name(skipSourceless, "skipSourceless");
|
|
1614
|
-
function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
|
|
1615
|
-
if (index === 0) return false;
|
|
1616
|
-
const prev = line[index - 1];
|
|
1617
|
-
if (prev.length === 1) return false;
|
|
1618
|
-
return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
|
|
1619
|
-
}
|
|
1620
|
-
__name(skipSource, "skipSource");
|
|
1621
|
-
function addMappingInternal(skipable, map, mapping) {
|
|
1622
|
-
const { generated, source, original, name, content } = mapping;
|
|
1623
|
-
if (!source) {
|
|
1624
|
-
return addSegmentInternal(
|
|
1625
|
-
skipable,
|
|
1626
|
-
map,
|
|
1627
|
-
generated.line - 1,
|
|
1628
|
-
generated.column,
|
|
1629
|
-
null,
|
|
1630
|
-
null,
|
|
1631
|
-
null,
|
|
1632
|
-
null,
|
|
1633
|
-
null
|
|
1634
|
-
);
|
|
1635
|
-
}
|
|
1636
|
-
assert(original);
|
|
1637
|
-
return addSegmentInternal(
|
|
1638
|
-
skipable,
|
|
1639
|
-
map,
|
|
1640
|
-
generated.line - 1,
|
|
1641
|
-
generated.column,
|
|
1642
|
-
source,
|
|
1643
|
-
original.line - 1,
|
|
1644
|
-
original.column,
|
|
1645
|
-
name,
|
|
1646
|
-
content
|
|
1647
|
-
);
|
|
1648
|
-
}
|
|
1649
|
-
__name(addMappingInternal, "addMappingInternal");
|
|
1650
|
-
});
|
|
1651
|
-
}
|
|
1652
|
-
});
|
|
1653
|
-
|
|
1654
|
-
export {
|
|
1655
|
-
require_trace_mapping_umd,
|
|
1656
|
-
require_gen_mapping_umd
|
|
1657
|
-
};
|