@stencil/core 4.39.0 → 4.40.1-dev.1766552834.64f6089
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/cli/index.cjs +1616 -41
- package/cli/index.js +1616 -41
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +2791 -2515
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +1665 -90
- package/internal/app-data/index.cjs +1 -0
- package/internal/app-data/index.js +1 -0
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +1746 -105
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +1770 -133
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +1794 -104
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +25 -2
- package/internal/stencil-public-compiler.d.ts +33 -3
- package/internal/stencil-public-runtime.d.ts +14 -3
- package/internal/testing/index.js +1758 -133
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +8 -1
- package/mock-doc/index.js +8 -1
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +1608 -30
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +28 -28
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +1696 -109
- package/testing/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Dev Server Process v4.
|
|
2
|
+
Stencil Dev Server Process v4.40.1-dev.1766552834.64f6089 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __create = Object.create;
|
|
@@ -8,6 +8,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
8
8
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
9
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
10
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __typeError = (msg) => {
|
|
12
|
+
throw TypeError(msg);
|
|
13
|
+
};
|
|
14
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
15
|
var __commonJS = (cb, mod) => function __require() {
|
|
12
16
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
17
|
};
|
|
@@ -32,6 +36,220 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
36
|
mod
|
|
33
37
|
));
|
|
34
38
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
39
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
40
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
41
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
42
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
43
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
44
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
45
|
+
|
|
46
|
+
// node_modules/balanced-match/index.js
|
|
47
|
+
var require_balanced_match = __commonJS({
|
|
48
|
+
"node_modules/balanced-match/index.js"(exports2, module2) {
|
|
49
|
+
"use strict";
|
|
50
|
+
module2.exports = balanced;
|
|
51
|
+
function balanced(a, b, str) {
|
|
52
|
+
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
53
|
+
if (b instanceof RegExp) b = maybeMatch(b, str);
|
|
54
|
+
var r = range(a, b, str);
|
|
55
|
+
return r && {
|
|
56
|
+
start: r[0],
|
|
57
|
+
end: r[1],
|
|
58
|
+
pre: str.slice(0, r[0]),
|
|
59
|
+
body: str.slice(r[0] + a.length, r[1]),
|
|
60
|
+
post: str.slice(r[1] + b.length)
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function maybeMatch(reg, str) {
|
|
64
|
+
var m = str.match(reg);
|
|
65
|
+
return m ? m[0] : null;
|
|
66
|
+
}
|
|
67
|
+
balanced.range = range;
|
|
68
|
+
function range(a, b, str) {
|
|
69
|
+
var begs, beg, left, right, result;
|
|
70
|
+
var ai = str.indexOf(a);
|
|
71
|
+
var bi = str.indexOf(b, ai + 1);
|
|
72
|
+
var i = ai;
|
|
73
|
+
if (ai >= 0 && bi > 0) {
|
|
74
|
+
if (a === b) {
|
|
75
|
+
return [ai, bi];
|
|
76
|
+
}
|
|
77
|
+
begs = [];
|
|
78
|
+
left = str.length;
|
|
79
|
+
while (i >= 0 && !result) {
|
|
80
|
+
if (i == ai) {
|
|
81
|
+
begs.push(i);
|
|
82
|
+
ai = str.indexOf(a, i + 1);
|
|
83
|
+
} else if (begs.length == 1) {
|
|
84
|
+
result = [begs.pop(), bi];
|
|
85
|
+
} else {
|
|
86
|
+
beg = begs.pop();
|
|
87
|
+
if (beg < left) {
|
|
88
|
+
left = beg;
|
|
89
|
+
right = bi;
|
|
90
|
+
}
|
|
91
|
+
bi = str.indexOf(b, i + 1);
|
|
92
|
+
}
|
|
93
|
+
i = ai < bi && ai >= 0 ? ai : bi;
|
|
94
|
+
}
|
|
95
|
+
if (begs.length) {
|
|
96
|
+
result = [left, right];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// node_modules/brace-expansion/index.js
|
|
105
|
+
var require_brace_expansion = __commonJS({
|
|
106
|
+
"node_modules/brace-expansion/index.js"(exports2, module2) {
|
|
107
|
+
var balanced = require_balanced_match();
|
|
108
|
+
module2.exports = expandTop;
|
|
109
|
+
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
110
|
+
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
111
|
+
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
112
|
+
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
113
|
+
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
114
|
+
function numeric(str) {
|
|
115
|
+
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
116
|
+
}
|
|
117
|
+
function escapeBraces(str) {
|
|
118
|
+
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
119
|
+
}
|
|
120
|
+
function unescapeBraces(str) {
|
|
121
|
+
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
122
|
+
}
|
|
123
|
+
function parseCommaParts(str) {
|
|
124
|
+
if (!str)
|
|
125
|
+
return [""];
|
|
126
|
+
var parts = [];
|
|
127
|
+
var m = balanced("{", "}", str);
|
|
128
|
+
if (!m)
|
|
129
|
+
return str.split(",");
|
|
130
|
+
var pre = m.pre;
|
|
131
|
+
var body = m.body;
|
|
132
|
+
var post = m.post;
|
|
133
|
+
var p = pre.split(",");
|
|
134
|
+
p[p.length - 1] += "{" + body + "}";
|
|
135
|
+
var postParts = parseCommaParts(post);
|
|
136
|
+
if (post.length) {
|
|
137
|
+
p[p.length - 1] += postParts.shift();
|
|
138
|
+
p.push.apply(p, postParts);
|
|
139
|
+
}
|
|
140
|
+
parts.push.apply(parts, p);
|
|
141
|
+
return parts;
|
|
142
|
+
}
|
|
143
|
+
function expandTop(str) {
|
|
144
|
+
if (!str)
|
|
145
|
+
return [];
|
|
146
|
+
if (str.substr(0, 2) === "{}") {
|
|
147
|
+
str = "\\{\\}" + str.substr(2);
|
|
148
|
+
}
|
|
149
|
+
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
150
|
+
}
|
|
151
|
+
function embrace(str) {
|
|
152
|
+
return "{" + str + "}";
|
|
153
|
+
}
|
|
154
|
+
function isPadded(el) {
|
|
155
|
+
return /^-?0\d/.test(el);
|
|
156
|
+
}
|
|
157
|
+
function lte(i, y) {
|
|
158
|
+
return i <= y;
|
|
159
|
+
}
|
|
160
|
+
function gte(i, y) {
|
|
161
|
+
return i >= y;
|
|
162
|
+
}
|
|
163
|
+
function expand2(str, isTop) {
|
|
164
|
+
var expansions = [];
|
|
165
|
+
var m = balanced("{", "}", str);
|
|
166
|
+
if (!m) return [str];
|
|
167
|
+
var pre = m.pre;
|
|
168
|
+
var post = m.post.length ? expand2(m.post, false) : [""];
|
|
169
|
+
if (/\$$/.test(m.pre)) {
|
|
170
|
+
for (var k = 0; k < post.length; k++) {
|
|
171
|
+
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
172
|
+
expansions.push(expansion);
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
176
|
+
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
177
|
+
var isSequence = isNumericSequence || isAlphaSequence;
|
|
178
|
+
var isOptions = m.body.indexOf(",") >= 0;
|
|
179
|
+
if (!isSequence && !isOptions) {
|
|
180
|
+
if (m.post.match(/,(?!,).*\}/)) {
|
|
181
|
+
str = m.pre + "{" + m.body + escClose + m.post;
|
|
182
|
+
return expand2(str);
|
|
183
|
+
}
|
|
184
|
+
return [str];
|
|
185
|
+
}
|
|
186
|
+
var n;
|
|
187
|
+
if (isSequence) {
|
|
188
|
+
n = m.body.split(/\.\./);
|
|
189
|
+
} else {
|
|
190
|
+
n = parseCommaParts(m.body);
|
|
191
|
+
if (n.length === 1) {
|
|
192
|
+
n = expand2(n[0], false).map(embrace);
|
|
193
|
+
if (n.length === 1) {
|
|
194
|
+
return post.map(function(p) {
|
|
195
|
+
return m.pre + n[0] + p;
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
var N;
|
|
201
|
+
if (isSequence) {
|
|
202
|
+
var x = numeric(n[0]);
|
|
203
|
+
var y = numeric(n[1]);
|
|
204
|
+
var width = Math.max(n[0].length, n[1].length);
|
|
205
|
+
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
206
|
+
var test = lte;
|
|
207
|
+
var reverse = y < x;
|
|
208
|
+
if (reverse) {
|
|
209
|
+
incr *= -1;
|
|
210
|
+
test = gte;
|
|
211
|
+
}
|
|
212
|
+
var pad = n.some(isPadded);
|
|
213
|
+
N = [];
|
|
214
|
+
for (var i = x; test(i, y); i += incr) {
|
|
215
|
+
var c;
|
|
216
|
+
if (isAlphaSequence) {
|
|
217
|
+
c = String.fromCharCode(i);
|
|
218
|
+
if (c === "\\")
|
|
219
|
+
c = "";
|
|
220
|
+
} else {
|
|
221
|
+
c = String(i);
|
|
222
|
+
if (pad) {
|
|
223
|
+
var need = width - c.length;
|
|
224
|
+
if (need > 0) {
|
|
225
|
+
var z = new Array(need + 1).join("0");
|
|
226
|
+
if (i < 0)
|
|
227
|
+
c = "-" + z + c.slice(1);
|
|
228
|
+
else
|
|
229
|
+
c = z + c;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
N.push(c);
|
|
234
|
+
}
|
|
235
|
+
} else {
|
|
236
|
+
N = [];
|
|
237
|
+
for (var j = 0; j < n.length; j++) {
|
|
238
|
+
N.push.apply(N, expand2(n[j], false));
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
for (var j = 0; j < N.length; j++) {
|
|
242
|
+
for (var k = 0; k < post.length; k++) {
|
|
243
|
+
var expansion = pre + N[j] + post[k];
|
|
244
|
+
if (!isTop || isSequence || expansion)
|
|
245
|
+
expansions.push(expansion);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return expansions;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
});
|
|
35
253
|
|
|
36
254
|
// node_modules/is-wsl/node_modules/is-docker/index.js
|
|
37
255
|
var require_is_docker = __commonJS({
|
|
@@ -1695,7 +1913,7 @@ var require_windows = __commonJS({
|
|
|
1695
1913
|
module2.exports = isexe;
|
|
1696
1914
|
isexe.sync = sync;
|
|
1697
1915
|
var fs7 = require("fs");
|
|
1698
|
-
function checkPathExt(
|
|
1916
|
+
function checkPathExt(path12, options) {
|
|
1699
1917
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
1700
1918
|
if (!pathext) {
|
|
1701
1919
|
return true;
|
|
@@ -1706,25 +1924,25 @@ var require_windows = __commonJS({
|
|
|
1706
1924
|
}
|
|
1707
1925
|
for (var i = 0; i < pathext.length; i++) {
|
|
1708
1926
|
var p = pathext[i].toLowerCase();
|
|
1709
|
-
if (p &&
|
|
1927
|
+
if (p && path12.substr(-p.length).toLowerCase() === p) {
|
|
1710
1928
|
return true;
|
|
1711
1929
|
}
|
|
1712
1930
|
}
|
|
1713
1931
|
return false;
|
|
1714
1932
|
}
|
|
1715
|
-
function checkStat(stat,
|
|
1933
|
+
function checkStat(stat, path12, options) {
|
|
1716
1934
|
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
1717
1935
|
return false;
|
|
1718
1936
|
}
|
|
1719
|
-
return checkPathExt(
|
|
1937
|
+
return checkPathExt(path12, options);
|
|
1720
1938
|
}
|
|
1721
|
-
function isexe(
|
|
1722
|
-
fs7.stat(
|
|
1723
|
-
cb(er, er ? false : checkStat(stat,
|
|
1939
|
+
function isexe(path12, options, cb) {
|
|
1940
|
+
fs7.stat(path12, function(er, stat) {
|
|
1941
|
+
cb(er, er ? false : checkStat(stat, path12, options));
|
|
1724
1942
|
});
|
|
1725
1943
|
}
|
|
1726
|
-
function sync(
|
|
1727
|
-
return checkStat(fs7.statSync(
|
|
1944
|
+
function sync(path12, options) {
|
|
1945
|
+
return checkStat(fs7.statSync(path12), path12, options);
|
|
1728
1946
|
}
|
|
1729
1947
|
}
|
|
1730
1948
|
});
|
|
@@ -1735,13 +1953,13 @@ var require_mode = __commonJS({
|
|
|
1735
1953
|
module2.exports = isexe;
|
|
1736
1954
|
isexe.sync = sync;
|
|
1737
1955
|
var fs7 = require("fs");
|
|
1738
|
-
function isexe(
|
|
1739
|
-
fs7.stat(
|
|
1956
|
+
function isexe(path12, options, cb) {
|
|
1957
|
+
fs7.stat(path12, function(er, stat) {
|
|
1740
1958
|
cb(er, er ? false : checkStat(stat, options));
|
|
1741
1959
|
});
|
|
1742
1960
|
}
|
|
1743
|
-
function sync(
|
|
1744
|
-
return checkStat(fs7.statSync(
|
|
1961
|
+
function sync(path12, options) {
|
|
1962
|
+
return checkStat(fs7.statSync(path12), options);
|
|
1745
1963
|
}
|
|
1746
1964
|
function checkStat(stat, options) {
|
|
1747
1965
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -1774,7 +1992,7 @@ var require_isexe = __commonJS({
|
|
|
1774
1992
|
}
|
|
1775
1993
|
module2.exports = isexe;
|
|
1776
1994
|
isexe.sync = sync;
|
|
1777
|
-
function isexe(
|
|
1995
|
+
function isexe(path12, options, cb) {
|
|
1778
1996
|
if (typeof options === "function") {
|
|
1779
1997
|
cb = options;
|
|
1780
1998
|
options = {};
|
|
@@ -1784,7 +2002,7 @@ var require_isexe = __commonJS({
|
|
|
1784
2002
|
throw new TypeError("callback not provided");
|
|
1785
2003
|
}
|
|
1786
2004
|
return new Promise(function(resolve, reject) {
|
|
1787
|
-
isexe(
|
|
2005
|
+
isexe(path12, options || {}, function(er, is) {
|
|
1788
2006
|
if (er) {
|
|
1789
2007
|
reject(er);
|
|
1790
2008
|
} else {
|
|
@@ -1793,7 +2011,7 @@ var require_isexe = __commonJS({
|
|
|
1793
2011
|
});
|
|
1794
2012
|
});
|
|
1795
2013
|
}
|
|
1796
|
-
core(
|
|
2014
|
+
core(path12, options || {}, function(er, is) {
|
|
1797
2015
|
if (er) {
|
|
1798
2016
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
1799
2017
|
er = null;
|
|
@@ -1803,9 +2021,9 @@ var require_isexe = __commonJS({
|
|
|
1803
2021
|
cb(er, is);
|
|
1804
2022
|
});
|
|
1805
2023
|
}
|
|
1806
|
-
function sync(
|
|
2024
|
+
function sync(path12, options) {
|
|
1807
2025
|
try {
|
|
1808
|
-
return core.sync(
|
|
2026
|
+
return core.sync(path12, options || {});
|
|
1809
2027
|
} catch (er) {
|
|
1810
2028
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
1811
2029
|
return false;
|
|
@@ -1821,7 +2039,7 @@ var require_isexe = __commonJS({
|
|
|
1821
2039
|
var require_which = __commonJS({
|
|
1822
2040
|
"node_modules/which/which.js"(exports2, module2) {
|
|
1823
2041
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
1824
|
-
var
|
|
2042
|
+
var path12 = require("path");
|
|
1825
2043
|
var COLON = isWindows ? ";" : ":";
|
|
1826
2044
|
var isexe = require_isexe();
|
|
1827
2045
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -1859,20 +2077,20 @@ var require_which = __commonJS({
|
|
|
1859
2077
|
return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
1860
2078
|
const ppRaw = pathEnv[i];
|
|
1861
2079
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1862
|
-
const pCmd =
|
|
2080
|
+
const pCmd = path12.join(pathPart, cmd);
|
|
1863
2081
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
1864
2082
|
resolve(subStep(p, i, 0));
|
|
1865
2083
|
});
|
|
1866
2084
|
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
1867
2085
|
if (ii === pathExt.length)
|
|
1868
2086
|
return resolve(step(i + 1));
|
|
1869
|
-
const
|
|
1870
|
-
isexe(p +
|
|
2087
|
+
const ext2 = pathExt[ii];
|
|
2088
|
+
isexe(p + ext2, { pathExt: pathExtExe }, (er, is) => {
|
|
1871
2089
|
if (!er && is) {
|
|
1872
2090
|
if (opt.all)
|
|
1873
|
-
found.push(p +
|
|
2091
|
+
found.push(p + ext2);
|
|
1874
2092
|
else
|
|
1875
|
-
return resolve(p +
|
|
2093
|
+
return resolve(p + ext2);
|
|
1876
2094
|
}
|
|
1877
2095
|
return resolve(subStep(p, i, ii + 1));
|
|
1878
2096
|
});
|
|
@@ -1886,7 +2104,7 @@ var require_which = __commonJS({
|
|
|
1886
2104
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
1887
2105
|
const ppRaw = pathEnv[i];
|
|
1888
2106
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1889
|
-
const pCmd =
|
|
2107
|
+
const pCmd = path12.join(pathPart, cmd);
|
|
1890
2108
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
1891
2109
|
for (let j = 0; j < pathExt.length; j++) {
|
|
1892
2110
|
const cur = p + pathExt[j];
|
|
@@ -1934,7 +2152,7 @@ var require_path_key = __commonJS({
|
|
|
1934
2152
|
var require_resolveCommand = __commonJS({
|
|
1935
2153
|
"node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
1936
2154
|
"use strict";
|
|
1937
|
-
var
|
|
2155
|
+
var path12 = require("path");
|
|
1938
2156
|
var which = require_which();
|
|
1939
2157
|
var getPathKey = require_path_key();
|
|
1940
2158
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -1952,7 +2170,7 @@ var require_resolveCommand = __commonJS({
|
|
|
1952
2170
|
try {
|
|
1953
2171
|
resolved = which.sync(parsed.command, {
|
|
1954
2172
|
path: env[getPathKey({ env })],
|
|
1955
|
-
pathExt: withoutPathExt ?
|
|
2173
|
+
pathExt: withoutPathExt ? path12.delimiter : void 0
|
|
1956
2174
|
});
|
|
1957
2175
|
} catch (e) {
|
|
1958
2176
|
} finally {
|
|
@@ -1961,7 +2179,7 @@ var require_resolveCommand = __commonJS({
|
|
|
1961
2179
|
}
|
|
1962
2180
|
}
|
|
1963
2181
|
if (resolved) {
|
|
1964
|
-
resolved =
|
|
2182
|
+
resolved = path12.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
1965
2183
|
}
|
|
1966
2184
|
return resolved;
|
|
1967
2185
|
}
|
|
@@ -2011,12 +2229,12 @@ var require_shebang_command = __commonJS({
|
|
|
2011
2229
|
"use strict";
|
|
2012
2230
|
var shebangRegex = require_shebang_regex();
|
|
2013
2231
|
module2.exports = (string = "") => {
|
|
2014
|
-
const
|
|
2015
|
-
if (!
|
|
2232
|
+
const match2 = string.match(shebangRegex);
|
|
2233
|
+
if (!match2) {
|
|
2016
2234
|
return null;
|
|
2017
2235
|
}
|
|
2018
|
-
const [
|
|
2019
|
-
const binary =
|
|
2236
|
+
const [path12, argument] = match2[0].replace(/#! ?/, "").split(" ");
|
|
2237
|
+
const binary = path12.split("/").pop();
|
|
2020
2238
|
if (binary === "env") {
|
|
2021
2239
|
return argument;
|
|
2022
2240
|
}
|
|
@@ -2051,9 +2269,9 @@ var require_readShebang = __commonJS({
|
|
|
2051
2269
|
var require_parse = __commonJS({
|
|
2052
2270
|
"node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
2053
2271
|
"use strict";
|
|
2054
|
-
var
|
|
2272
|
+
var path12 = require("path");
|
|
2055
2273
|
var resolveCommand = require_resolveCommand();
|
|
2056
|
-
var
|
|
2274
|
+
var escape2 = require_escape();
|
|
2057
2275
|
var readShebang = require_readShebang();
|
|
2058
2276
|
var isWin = process.platform === "win32";
|
|
2059
2277
|
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
@@ -2076,9 +2294,9 @@ var require_parse = __commonJS({
|
|
|
2076
2294
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
2077
2295
|
if (parsed.options.forceShell || needsShell) {
|
|
2078
2296
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
2079
|
-
parsed.command =
|
|
2080
|
-
parsed.command =
|
|
2081
|
-
parsed.args = parsed.args.map((arg) =>
|
|
2297
|
+
parsed.command = path12.normalize(parsed.command);
|
|
2298
|
+
parsed.command = escape2.command(parsed.command);
|
|
2299
|
+
parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
|
|
2082
2300
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
2083
2301
|
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
|
|
2084
2302
|
parsed.command = process.env.comspec || "cmd.exe";
|
|
@@ -2208,7 +2426,7 @@ var require_strip_final_newline = __commonJS({
|
|
|
2208
2426
|
var require_npm_run_path = __commonJS({
|
|
2209
2427
|
"node_modules/run-applescript/node_modules/npm-run-path/index.js"(exports2, module2) {
|
|
2210
2428
|
"use strict";
|
|
2211
|
-
var
|
|
2429
|
+
var path12 = require("path");
|
|
2212
2430
|
var pathKey2 = require_path_key();
|
|
2213
2431
|
var npmRunPath2 = (options) => {
|
|
2214
2432
|
options = {
|
|
@@ -2218,16 +2436,16 @@ var require_npm_run_path = __commonJS({
|
|
|
2218
2436
|
...options
|
|
2219
2437
|
};
|
|
2220
2438
|
let previous;
|
|
2221
|
-
let cwdPath =
|
|
2439
|
+
let cwdPath = path12.resolve(options.cwd);
|
|
2222
2440
|
const result = [];
|
|
2223
2441
|
while (previous !== cwdPath) {
|
|
2224
|
-
result.push(
|
|
2442
|
+
result.push(path12.join(cwdPath, "node_modules/.bin"));
|
|
2225
2443
|
previous = cwdPath;
|
|
2226
|
-
cwdPath =
|
|
2444
|
+
cwdPath = path12.resolve(cwdPath, "..");
|
|
2227
2445
|
}
|
|
2228
|
-
const execPathDir =
|
|
2446
|
+
const execPathDir = path12.resolve(options.cwd, options.execPath, "..");
|
|
2229
2447
|
result.push(execPathDir);
|
|
2230
|
-
return result.concat(options.path).join(
|
|
2448
|
+
return result.concat(options.path).join(path12.delimiter);
|
|
2231
2449
|
};
|
|
2232
2450
|
module2.exports = npmRunPath2;
|
|
2233
2451
|
module2.exports.default = npmRunPath2;
|
|
@@ -2237,9 +2455,9 @@ var require_npm_run_path = __commonJS({
|
|
|
2237
2455
|
...options
|
|
2238
2456
|
};
|
|
2239
2457
|
const env = { ...options.env };
|
|
2240
|
-
const
|
|
2241
|
-
options.path = env[
|
|
2242
|
-
env[
|
|
2458
|
+
const path13 = pathKey2({ env });
|
|
2459
|
+
options.path = env[path13];
|
|
2460
|
+
env[path13] = module2.exports(options);
|
|
2243
2461
|
return env;
|
|
2244
2462
|
};
|
|
2245
2463
|
}
|
|
@@ -3421,7 +3639,7 @@ var require_command = __commonJS({
|
|
|
3421
3639
|
var require_execa = __commonJS({
|
|
3422
3640
|
"node_modules/run-applescript/node_modules/execa/index.js"(exports2, module2) {
|
|
3423
3641
|
"use strict";
|
|
3424
|
-
var
|
|
3642
|
+
var path12 = require("path");
|
|
3425
3643
|
var childProcess3 = require("child_process");
|
|
3426
3644
|
var crossSpawn2 = require_cross_spawn();
|
|
3427
3645
|
var stripFinalNewline2 = require_strip_final_newline();
|
|
@@ -3463,7 +3681,7 @@ var require_execa = __commonJS({
|
|
|
3463
3681
|
};
|
|
3464
3682
|
options.env = getEnv2(options);
|
|
3465
3683
|
options.stdio = normalizeStdio2(options);
|
|
3466
|
-
if (process.platform === "win32" &&
|
|
3684
|
+
if (process.platform === "win32" && path12.basename(file, ".exe") === "cmd") {
|
|
3467
3685
|
args.unshift("/q");
|
|
3468
3686
|
}
|
|
3469
3687
|
return { file, args, options, parsed };
|
|
@@ -7485,12 +7703,12 @@ var TASK_CANCELED_MSG = `task canceled`;
|
|
|
7485
7703
|
|
|
7486
7704
|
// src/utils/path.ts
|
|
7487
7705
|
var import_path = __toESM(require("path"));
|
|
7488
|
-
var normalizePath = (
|
|
7489
|
-
if (typeof
|
|
7706
|
+
var normalizePath = (path12, relativize = true) => {
|
|
7707
|
+
if (typeof path12 !== "string") {
|
|
7490
7708
|
throw new Error(`invalid path to normalize`);
|
|
7491
7709
|
}
|
|
7492
|
-
|
|
7493
|
-
const components = pathComponents(
|
|
7710
|
+
path12 = normalizeSlashes(path12.trim());
|
|
7711
|
+
const components = pathComponents(path12, getRootLength(path12));
|
|
7494
7712
|
const reducedComponents = reducePathComponents(components);
|
|
7495
7713
|
const rootPart = reducedComponents[0];
|
|
7496
7714
|
const secondPart = reducedComponents[1];
|
|
@@ -7498,12 +7716,12 @@ var normalizePath = (path11, relativize = true) => {
|
|
|
7498
7716
|
if (normalized === "") {
|
|
7499
7717
|
return ".";
|
|
7500
7718
|
}
|
|
7501
|
-
if (rootPart === "" && secondPart &&
|
|
7719
|
+
if (rootPart === "" && secondPart && path12.includes("/") && !secondPart.startsWith(".") && !secondPart.startsWith("@") && relativize) {
|
|
7502
7720
|
return "./" + normalized;
|
|
7503
7721
|
}
|
|
7504
7722
|
return normalized;
|
|
7505
7723
|
};
|
|
7506
|
-
var normalizeSlashes = (
|
|
7724
|
+
var normalizeSlashes = (path12) => path12.replace(backslashRegExp, "/");
|
|
7507
7725
|
var altDirectorySeparator = "\\";
|
|
7508
7726
|
var urlSchemeSeparator = "://";
|
|
7509
7727
|
var backslashRegExp = /\\/g;
|
|
@@ -7528,45 +7746,45 @@ var reducePathComponents = (components) => {
|
|
|
7528
7746
|
}
|
|
7529
7747
|
return reduced;
|
|
7530
7748
|
};
|
|
7531
|
-
var getRootLength = (
|
|
7532
|
-
const rootLength = getEncodedRootLength(
|
|
7749
|
+
var getRootLength = (path12) => {
|
|
7750
|
+
const rootLength = getEncodedRootLength(path12);
|
|
7533
7751
|
return rootLength < 0 ? ~rootLength : rootLength;
|
|
7534
7752
|
};
|
|
7535
|
-
var getEncodedRootLength = (
|
|
7536
|
-
if (!
|
|
7537
|
-
const ch0 =
|
|
7753
|
+
var getEncodedRootLength = (path12) => {
|
|
7754
|
+
if (!path12) return 0;
|
|
7755
|
+
const ch0 = path12.charCodeAt(0);
|
|
7538
7756
|
if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) {
|
|
7539
|
-
if (
|
|
7540
|
-
const p1 =
|
|
7541
|
-
if (p1 < 0) return
|
|
7757
|
+
if (path12.charCodeAt(1) !== ch0) return 1;
|
|
7758
|
+
const p1 = path12.indexOf(ch0 === 47 /* slash */ ? "/" : altDirectorySeparator, 2);
|
|
7759
|
+
if (p1 < 0) return path12.length;
|
|
7542
7760
|
return p1 + 1;
|
|
7543
7761
|
}
|
|
7544
|
-
if (isVolumeCharacter(ch0) &&
|
|
7545
|
-
const ch2 =
|
|
7762
|
+
if (isVolumeCharacter(ch0) && path12.charCodeAt(1) === 58 /* colon */) {
|
|
7763
|
+
const ch2 = path12.charCodeAt(2);
|
|
7546
7764
|
if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) return 3;
|
|
7547
|
-
if (
|
|
7765
|
+
if (path12.length === 2) return 2;
|
|
7548
7766
|
}
|
|
7549
|
-
const schemeEnd =
|
|
7767
|
+
const schemeEnd = path12.indexOf(urlSchemeSeparator);
|
|
7550
7768
|
if (schemeEnd !== -1) {
|
|
7551
7769
|
const authorityStart = schemeEnd + urlSchemeSeparator.length;
|
|
7552
|
-
const authorityEnd =
|
|
7770
|
+
const authorityEnd = path12.indexOf("/", authorityStart);
|
|
7553
7771
|
if (authorityEnd !== -1) {
|
|
7554
|
-
const scheme =
|
|
7555
|
-
const authority =
|
|
7556
|
-
if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(
|
|
7557
|
-
const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(
|
|
7772
|
+
const scheme = path12.slice(0, schemeEnd);
|
|
7773
|
+
const authority = path12.slice(authorityStart, authorityEnd);
|
|
7774
|
+
if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path12.charCodeAt(authorityEnd + 1))) {
|
|
7775
|
+
const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path12, authorityEnd + 2);
|
|
7558
7776
|
if (volumeSeparatorEnd !== -1) {
|
|
7559
|
-
if (
|
|
7777
|
+
if (path12.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) {
|
|
7560
7778
|
return ~(volumeSeparatorEnd + 1);
|
|
7561
7779
|
}
|
|
7562
|
-
if (volumeSeparatorEnd ===
|
|
7780
|
+
if (volumeSeparatorEnd === path12.length) {
|
|
7563
7781
|
return ~volumeSeparatorEnd;
|
|
7564
7782
|
}
|
|
7565
7783
|
}
|
|
7566
7784
|
}
|
|
7567
7785
|
return ~(authorityEnd + 1);
|
|
7568
7786
|
}
|
|
7569
|
-
return ~
|
|
7787
|
+
return ~path12.length;
|
|
7570
7788
|
}
|
|
7571
7789
|
return 0;
|
|
7572
7790
|
};
|
|
@@ -7580,9 +7798,9 @@ var getFileUrlVolumeSeparatorEnd = (url, start) => {
|
|
|
7580
7798
|
}
|
|
7581
7799
|
return -1;
|
|
7582
7800
|
};
|
|
7583
|
-
var pathComponents = (
|
|
7584
|
-
const root =
|
|
7585
|
-
const rest =
|
|
7801
|
+
var pathComponents = (path12, rootLength) => {
|
|
7802
|
+
const root = path12.substring(0, rootLength);
|
|
7803
|
+
const rest = path12.substring(rootLength).split("/");
|
|
7586
7804
|
const restLen = rest.length;
|
|
7587
7805
|
if (restLen > 0 && !rest[restLen - 1]) {
|
|
7588
7806
|
rest.pop();
|
|
@@ -7590,6 +7808,1359 @@ var pathComponents = (path11, rootLength) => {
|
|
|
7590
7808
|
return [root, ...rest];
|
|
7591
7809
|
};
|
|
7592
7810
|
|
|
7811
|
+
// node_modules/minimatch/dist/esm/index.js
|
|
7812
|
+
var import_brace_expansion = __toESM(require_brace_expansion(), 1);
|
|
7813
|
+
|
|
7814
|
+
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
7815
|
+
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
7816
|
+
var assertValidPattern = (pattern) => {
|
|
7817
|
+
if (typeof pattern !== "string") {
|
|
7818
|
+
throw new TypeError("invalid pattern");
|
|
7819
|
+
}
|
|
7820
|
+
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
7821
|
+
throw new TypeError("pattern is too long");
|
|
7822
|
+
}
|
|
7823
|
+
};
|
|
7824
|
+
|
|
7825
|
+
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
7826
|
+
var posixClasses = {
|
|
7827
|
+
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
7828
|
+
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
7829
|
+
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
7830
|
+
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
7831
|
+
"[:cntrl:]": ["\\p{Cc}", true],
|
|
7832
|
+
"[:digit:]": ["\\p{Nd}", true],
|
|
7833
|
+
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
7834
|
+
"[:lower:]": ["\\p{Ll}", true],
|
|
7835
|
+
"[:print:]": ["\\p{C}", true],
|
|
7836
|
+
"[:punct:]": ["\\p{P}", true],
|
|
7837
|
+
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
7838
|
+
"[:upper:]": ["\\p{Lu}", true],
|
|
7839
|
+
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
7840
|
+
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
7841
|
+
};
|
|
7842
|
+
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
7843
|
+
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
7844
|
+
var rangesToString = (ranges) => ranges.join("");
|
|
7845
|
+
var parseClass = (glob, position) => {
|
|
7846
|
+
const pos = position;
|
|
7847
|
+
if (glob.charAt(pos) !== "[") {
|
|
7848
|
+
throw new Error("not in a brace expression");
|
|
7849
|
+
}
|
|
7850
|
+
const ranges = [];
|
|
7851
|
+
const negs = [];
|
|
7852
|
+
let i = pos + 1;
|
|
7853
|
+
let sawStart = false;
|
|
7854
|
+
let uflag = false;
|
|
7855
|
+
let escaping = false;
|
|
7856
|
+
let negate = false;
|
|
7857
|
+
let endPos = pos;
|
|
7858
|
+
let rangeStart = "";
|
|
7859
|
+
WHILE: while (i < glob.length) {
|
|
7860
|
+
const c = glob.charAt(i);
|
|
7861
|
+
if ((c === "!" || c === "^") && i === pos + 1) {
|
|
7862
|
+
negate = true;
|
|
7863
|
+
i++;
|
|
7864
|
+
continue;
|
|
7865
|
+
}
|
|
7866
|
+
if (c === "]" && sawStart && !escaping) {
|
|
7867
|
+
endPos = i + 1;
|
|
7868
|
+
break;
|
|
7869
|
+
}
|
|
7870
|
+
sawStart = true;
|
|
7871
|
+
if (c === "\\") {
|
|
7872
|
+
if (!escaping) {
|
|
7873
|
+
escaping = true;
|
|
7874
|
+
i++;
|
|
7875
|
+
continue;
|
|
7876
|
+
}
|
|
7877
|
+
}
|
|
7878
|
+
if (c === "[" && !escaping) {
|
|
7879
|
+
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
7880
|
+
if (glob.startsWith(cls, i)) {
|
|
7881
|
+
if (rangeStart) {
|
|
7882
|
+
return ["$.", false, glob.length - pos, true];
|
|
7883
|
+
}
|
|
7884
|
+
i += cls.length;
|
|
7885
|
+
if (neg)
|
|
7886
|
+
negs.push(unip);
|
|
7887
|
+
else
|
|
7888
|
+
ranges.push(unip);
|
|
7889
|
+
uflag = uflag || u;
|
|
7890
|
+
continue WHILE;
|
|
7891
|
+
}
|
|
7892
|
+
}
|
|
7893
|
+
}
|
|
7894
|
+
escaping = false;
|
|
7895
|
+
if (rangeStart) {
|
|
7896
|
+
if (c > rangeStart) {
|
|
7897
|
+
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
7898
|
+
} else if (c === rangeStart) {
|
|
7899
|
+
ranges.push(braceEscape(c));
|
|
7900
|
+
}
|
|
7901
|
+
rangeStart = "";
|
|
7902
|
+
i++;
|
|
7903
|
+
continue;
|
|
7904
|
+
}
|
|
7905
|
+
if (glob.startsWith("-]", i + 1)) {
|
|
7906
|
+
ranges.push(braceEscape(c + "-"));
|
|
7907
|
+
i += 2;
|
|
7908
|
+
continue;
|
|
7909
|
+
}
|
|
7910
|
+
if (glob.startsWith("-", i + 1)) {
|
|
7911
|
+
rangeStart = c;
|
|
7912
|
+
i += 2;
|
|
7913
|
+
continue;
|
|
7914
|
+
}
|
|
7915
|
+
ranges.push(braceEscape(c));
|
|
7916
|
+
i++;
|
|
7917
|
+
}
|
|
7918
|
+
if (endPos < i) {
|
|
7919
|
+
return ["", false, 0, false];
|
|
7920
|
+
}
|
|
7921
|
+
if (!ranges.length && !negs.length) {
|
|
7922
|
+
return ["$.", false, glob.length - pos, true];
|
|
7923
|
+
}
|
|
7924
|
+
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
|
|
7925
|
+
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
|
|
7926
|
+
return [regexpEscape(r), false, endPos - pos, false];
|
|
7927
|
+
}
|
|
7928
|
+
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
|
|
7929
|
+
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
|
|
7930
|
+
const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
|
|
7931
|
+
return [comb, uflag, endPos - pos, true];
|
|
7932
|
+
};
|
|
7933
|
+
|
|
7934
|
+
// node_modules/minimatch/dist/esm/unescape.js
|
|
7935
|
+
var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
7936
|
+
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
7937
|
+
};
|
|
7938
|
+
|
|
7939
|
+
// node_modules/minimatch/dist/esm/ast.js
|
|
7940
|
+
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
7941
|
+
var isExtglobType = (c) => types.has(c);
|
|
7942
|
+
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
7943
|
+
var startNoDot = "(?!\\.)";
|
|
7944
|
+
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
7945
|
+
var justDots = /* @__PURE__ */ new Set(["..", "."]);
|
|
7946
|
+
var reSpecials = new Set("().*{}+?[]^$\\!");
|
|
7947
|
+
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
7948
|
+
var qmark = "[^/]";
|
|
7949
|
+
var star = qmark + "*?";
|
|
7950
|
+
var starNoEmpty = qmark + "+?";
|
|
7951
|
+
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
|
|
7952
|
+
var _AST = class _AST {
|
|
7953
|
+
constructor(type, parent, options = {}) {
|
|
7954
|
+
__privateAdd(this, _AST_instances);
|
|
7955
|
+
__publicField(this, "type");
|
|
7956
|
+
__privateAdd(this, _root);
|
|
7957
|
+
__privateAdd(this, _hasMagic);
|
|
7958
|
+
__privateAdd(this, _uflag, false);
|
|
7959
|
+
__privateAdd(this, _parts, []);
|
|
7960
|
+
__privateAdd(this, _parent);
|
|
7961
|
+
__privateAdd(this, _parentIndex);
|
|
7962
|
+
__privateAdd(this, _negs);
|
|
7963
|
+
__privateAdd(this, _filledNegs, false);
|
|
7964
|
+
__privateAdd(this, _options);
|
|
7965
|
+
__privateAdd(this, _toString);
|
|
7966
|
+
// set to true if it's an extglob with no children
|
|
7967
|
+
// (which really means one child of '')
|
|
7968
|
+
__privateAdd(this, _emptyExt, false);
|
|
7969
|
+
this.type = type;
|
|
7970
|
+
if (type)
|
|
7971
|
+
__privateSet(this, _hasMagic, true);
|
|
7972
|
+
__privateSet(this, _parent, parent);
|
|
7973
|
+
__privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
|
|
7974
|
+
__privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
|
|
7975
|
+
__privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
|
|
7976
|
+
if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
|
|
7977
|
+
__privateGet(this, _negs).push(this);
|
|
7978
|
+
__privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
|
|
7979
|
+
}
|
|
7980
|
+
get hasMagic() {
|
|
7981
|
+
if (__privateGet(this, _hasMagic) !== void 0)
|
|
7982
|
+
return __privateGet(this, _hasMagic);
|
|
7983
|
+
for (const p of __privateGet(this, _parts)) {
|
|
7984
|
+
if (typeof p === "string")
|
|
7985
|
+
continue;
|
|
7986
|
+
if (p.type || p.hasMagic)
|
|
7987
|
+
return __privateSet(this, _hasMagic, true);
|
|
7988
|
+
}
|
|
7989
|
+
return __privateGet(this, _hasMagic);
|
|
7990
|
+
}
|
|
7991
|
+
// reconstructs the pattern
|
|
7992
|
+
toString() {
|
|
7993
|
+
if (__privateGet(this, _toString) !== void 0)
|
|
7994
|
+
return __privateGet(this, _toString);
|
|
7995
|
+
if (!this.type) {
|
|
7996
|
+
return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
|
|
7997
|
+
} else {
|
|
7998
|
+
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
7999
|
+
}
|
|
8000
|
+
}
|
|
8001
|
+
push(...parts) {
|
|
8002
|
+
for (const p of parts) {
|
|
8003
|
+
if (p === "")
|
|
8004
|
+
continue;
|
|
8005
|
+
if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
|
|
8006
|
+
throw new Error("invalid part: " + p);
|
|
8007
|
+
}
|
|
8008
|
+
__privateGet(this, _parts).push(p);
|
|
8009
|
+
}
|
|
8010
|
+
}
|
|
8011
|
+
toJSON() {
|
|
8012
|
+
var _a;
|
|
8013
|
+
const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())];
|
|
8014
|
+
if (this.isStart() && !this.type)
|
|
8015
|
+
ret.unshift([]);
|
|
8016
|
+
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
|
|
8017
|
+
ret.push({});
|
|
8018
|
+
}
|
|
8019
|
+
return ret;
|
|
8020
|
+
}
|
|
8021
|
+
isStart() {
|
|
8022
|
+
var _a;
|
|
8023
|
+
if (__privateGet(this, _root) === this)
|
|
8024
|
+
return true;
|
|
8025
|
+
if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
|
|
8026
|
+
return false;
|
|
8027
|
+
if (__privateGet(this, _parentIndex) === 0)
|
|
8028
|
+
return true;
|
|
8029
|
+
const p = __privateGet(this, _parent);
|
|
8030
|
+
for (let i = 0; i < __privateGet(this, _parentIndex); i++) {
|
|
8031
|
+
const pp = __privateGet(p, _parts)[i];
|
|
8032
|
+
if (!(pp instanceof _AST && pp.type === "!")) {
|
|
8033
|
+
return false;
|
|
8034
|
+
}
|
|
8035
|
+
}
|
|
8036
|
+
return true;
|
|
8037
|
+
}
|
|
8038
|
+
isEnd() {
|
|
8039
|
+
var _a, _b, _c;
|
|
8040
|
+
if (__privateGet(this, _root) === this)
|
|
8041
|
+
return true;
|
|
8042
|
+
if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
|
|
8043
|
+
return true;
|
|
8044
|
+
if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
|
|
8045
|
+
return false;
|
|
8046
|
+
if (!this.type)
|
|
8047
|
+
return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
|
|
8048
|
+
const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
|
|
8049
|
+
return __privateGet(this, _parentIndex) === pl - 1;
|
|
8050
|
+
}
|
|
8051
|
+
copyIn(part) {
|
|
8052
|
+
if (typeof part === "string")
|
|
8053
|
+
this.push(part);
|
|
8054
|
+
else
|
|
8055
|
+
this.push(part.clone(this));
|
|
8056
|
+
}
|
|
8057
|
+
clone(parent) {
|
|
8058
|
+
const c = new _AST(this.type, parent);
|
|
8059
|
+
for (const p of __privateGet(this, _parts)) {
|
|
8060
|
+
c.copyIn(p);
|
|
8061
|
+
}
|
|
8062
|
+
return c;
|
|
8063
|
+
}
|
|
8064
|
+
static fromGlob(pattern, options = {}) {
|
|
8065
|
+
var _a;
|
|
8066
|
+
const ast = new _AST(null, void 0, options);
|
|
8067
|
+
__privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
|
|
8068
|
+
return ast;
|
|
8069
|
+
}
|
|
8070
|
+
// returns the regular expression if there's magic, or the unescaped
|
|
8071
|
+
// string if not.
|
|
8072
|
+
toMMPattern() {
|
|
8073
|
+
if (this !== __privateGet(this, _root))
|
|
8074
|
+
return __privateGet(this, _root).toMMPattern();
|
|
8075
|
+
const glob = this.toString();
|
|
8076
|
+
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
8077
|
+
const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
|
|
8078
|
+
if (!anyMagic) {
|
|
8079
|
+
return body;
|
|
8080
|
+
}
|
|
8081
|
+
const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
|
|
8082
|
+
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
8083
|
+
_src: re,
|
|
8084
|
+
_glob: glob
|
|
8085
|
+
});
|
|
8086
|
+
}
|
|
8087
|
+
get options() {
|
|
8088
|
+
return __privateGet(this, _options);
|
|
8089
|
+
}
|
|
8090
|
+
// returns the string match, the regexp source, whether there's magic
|
|
8091
|
+
// in the regexp (so a regular expression is required) and whether or
|
|
8092
|
+
// not the uflag is needed for the regular expression (for posix classes)
|
|
8093
|
+
// TODO: instead of injecting the start/end at this point, just return
|
|
8094
|
+
// the BODY of the regexp, along with the start/end portions suitable
|
|
8095
|
+
// for binding the start/end in either a joined full-path makeRe context
|
|
8096
|
+
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
8097
|
+
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
8098
|
+
//
|
|
8099
|
+
// In part-matching mode, the start is:
|
|
8100
|
+
// - if not isStart: nothing
|
|
8101
|
+
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
8102
|
+
// - if dots allowed or not possible: ^
|
|
8103
|
+
// - if dots possible and not allowed: ^(?!\.)
|
|
8104
|
+
// end is:
|
|
8105
|
+
// - if not isEnd(): nothing
|
|
8106
|
+
// - else: $
|
|
8107
|
+
//
|
|
8108
|
+
// In full-path matching mode, we put the slash at the START of the
|
|
8109
|
+
// pattern, so start is:
|
|
8110
|
+
// - if first pattern: same as part-matching mode
|
|
8111
|
+
// - if not isStart(): nothing
|
|
8112
|
+
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
8113
|
+
// - if dots allowed or not possible: /
|
|
8114
|
+
// - if dots possible and not allowed: /(?!\.)
|
|
8115
|
+
// end is:
|
|
8116
|
+
// - if last pattern, same as part-matching mode
|
|
8117
|
+
// - else nothing
|
|
8118
|
+
//
|
|
8119
|
+
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
8120
|
+
// there to bind the end of the negated pattern portion, and it's easier to
|
|
8121
|
+
// just stick it in now rather than try to inject it later in the middle of
|
|
8122
|
+
// the pattern.
|
|
8123
|
+
//
|
|
8124
|
+
// We can just always return the same end, and leave it up to the caller
|
|
8125
|
+
// to know whether it's going to be used joined or in parts.
|
|
8126
|
+
// And, if the start is adjusted slightly, can do the same there:
|
|
8127
|
+
// - if not isStart: nothing
|
|
8128
|
+
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
8129
|
+
// - if dots allowed or not possible: (?:/|^)
|
|
8130
|
+
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
8131
|
+
//
|
|
8132
|
+
// But it's better to have a simpler binding without a conditional, for
|
|
8133
|
+
// performance, so probably better to return both start options.
|
|
8134
|
+
//
|
|
8135
|
+
// Then the caller just ignores the end if it's not the first pattern,
|
|
8136
|
+
// and the start always gets applied.
|
|
8137
|
+
//
|
|
8138
|
+
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
8139
|
+
// so the caller can just attach $ at the end of the pattern when building.
|
|
8140
|
+
//
|
|
8141
|
+
// So the todo is:
|
|
8142
|
+
// - better detect what kind of start is needed
|
|
8143
|
+
// - return both flavors of starting pattern
|
|
8144
|
+
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
8145
|
+
//
|
|
8146
|
+
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
8147
|
+
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
8148
|
+
// that dot prevention biz to live in the extglob portions, because eg
|
|
8149
|
+
// +(*|.x*) can match .xy but not .yx.
|
|
8150
|
+
//
|
|
8151
|
+
// So, return the two flavors if it's #root and the first child is not an
|
|
8152
|
+
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
8153
|
+
// use the (?:^|/) style of start binding.
|
|
8154
|
+
//
|
|
8155
|
+
// Even simplified further:
|
|
8156
|
+
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
8157
|
+
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
8158
|
+
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
8159
|
+
toRegExpSource(allowDot) {
|
|
8160
|
+
var _a;
|
|
8161
|
+
const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
|
|
8162
|
+
if (__privateGet(this, _root) === this)
|
|
8163
|
+
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
8164
|
+
if (!this.type) {
|
|
8165
|
+
const noEmpty = this.isStart() && this.isEnd();
|
|
8166
|
+
const src = __privateGet(this, _parts).map((p) => {
|
|
8167
|
+
var _a2;
|
|
8168
|
+
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
8169
|
+
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
8170
|
+
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
8171
|
+
return re;
|
|
8172
|
+
}).join("");
|
|
8173
|
+
let start2 = "";
|
|
8174
|
+
if (this.isStart()) {
|
|
8175
|
+
if (typeof __privateGet(this, _parts)[0] === "string") {
|
|
8176
|
+
const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
|
|
8177
|
+
if (!dotTravAllowed) {
|
|
8178
|
+
const aps = addPatternStart;
|
|
8179
|
+
const needNoTrav = (
|
|
8180
|
+
// dots are allowed, and the pattern starts with [ or .
|
|
8181
|
+
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
8182
|
+
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
8183
|
+
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
|
|
8184
|
+
);
|
|
8185
|
+
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
8186
|
+
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
|
|
8187
|
+
}
|
|
8188
|
+
}
|
|
8189
|
+
}
|
|
8190
|
+
let end = "";
|
|
8191
|
+
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
|
|
8192
|
+
end = "(?:$|\\/)";
|
|
8193
|
+
}
|
|
8194
|
+
const final2 = start2 + src + end;
|
|
8195
|
+
return [
|
|
8196
|
+
final2,
|
|
8197
|
+
unescape(src),
|
|
8198
|
+
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
8199
|
+
__privateGet(this, _uflag)
|
|
8200
|
+
];
|
|
8201
|
+
}
|
|
8202
|
+
const repeated = this.type === "*" || this.type === "+";
|
|
8203
|
+
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
8204
|
+
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
8205
|
+
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
8206
|
+
const s = this.toString();
|
|
8207
|
+
__privateSet(this, _parts, [s]);
|
|
8208
|
+
this.type = null;
|
|
8209
|
+
__privateSet(this, _hasMagic, void 0);
|
|
8210
|
+
return [s, unescape(this.toString()), false, false];
|
|
8211
|
+
}
|
|
8212
|
+
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
8213
|
+
if (bodyDotAllowed === body) {
|
|
8214
|
+
bodyDotAllowed = "";
|
|
8215
|
+
}
|
|
8216
|
+
if (bodyDotAllowed) {
|
|
8217
|
+
body = `(?:${body})(?:${bodyDotAllowed})*?`;
|
|
8218
|
+
}
|
|
8219
|
+
let final = "";
|
|
8220
|
+
if (this.type === "!" && __privateGet(this, _emptyExt)) {
|
|
8221
|
+
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
|
|
8222
|
+
} else {
|
|
8223
|
+
const close = this.type === "!" ? (
|
|
8224
|
+
// !() must match something,but !(x) can match ''
|
|
8225
|
+
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
|
|
8226
|
+
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
|
|
8227
|
+
final = start + body + close;
|
|
8228
|
+
}
|
|
8229
|
+
return [
|
|
8230
|
+
final,
|
|
8231
|
+
unescape(body),
|
|
8232
|
+
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
8233
|
+
__privateGet(this, _uflag)
|
|
8234
|
+
];
|
|
8235
|
+
}
|
|
8236
|
+
};
|
|
8237
|
+
_root = new WeakMap();
|
|
8238
|
+
_hasMagic = new WeakMap();
|
|
8239
|
+
_uflag = new WeakMap();
|
|
8240
|
+
_parts = new WeakMap();
|
|
8241
|
+
_parent = new WeakMap();
|
|
8242
|
+
_parentIndex = new WeakMap();
|
|
8243
|
+
_negs = new WeakMap();
|
|
8244
|
+
_filledNegs = new WeakMap();
|
|
8245
|
+
_options = new WeakMap();
|
|
8246
|
+
_toString = new WeakMap();
|
|
8247
|
+
_emptyExt = new WeakMap();
|
|
8248
|
+
_AST_instances = new WeakSet();
|
|
8249
|
+
fillNegs_fn = function() {
|
|
8250
|
+
if (this !== __privateGet(this, _root))
|
|
8251
|
+
throw new Error("should only call on root");
|
|
8252
|
+
if (__privateGet(this, _filledNegs))
|
|
8253
|
+
return this;
|
|
8254
|
+
this.toString();
|
|
8255
|
+
__privateSet(this, _filledNegs, true);
|
|
8256
|
+
let n;
|
|
8257
|
+
while (n = __privateGet(this, _negs).pop()) {
|
|
8258
|
+
if (n.type !== "!")
|
|
8259
|
+
continue;
|
|
8260
|
+
let p = n;
|
|
8261
|
+
let pp = __privateGet(p, _parent);
|
|
8262
|
+
while (pp) {
|
|
8263
|
+
for (let i = __privateGet(p, _parentIndex) + 1; !pp.type && i < __privateGet(pp, _parts).length; i++) {
|
|
8264
|
+
for (const part of __privateGet(n, _parts)) {
|
|
8265
|
+
if (typeof part === "string") {
|
|
8266
|
+
throw new Error("string part in extglob AST??");
|
|
8267
|
+
}
|
|
8268
|
+
part.copyIn(__privateGet(pp, _parts)[i]);
|
|
8269
|
+
}
|
|
8270
|
+
}
|
|
8271
|
+
p = pp;
|
|
8272
|
+
pp = __privateGet(p, _parent);
|
|
8273
|
+
}
|
|
8274
|
+
}
|
|
8275
|
+
return this;
|
|
8276
|
+
};
|
|
8277
|
+
_AST_static = new WeakSet();
|
|
8278
|
+
parseAST_fn = function(str, ast, pos, opt) {
|
|
8279
|
+
var _a, _b;
|
|
8280
|
+
let escaping = false;
|
|
8281
|
+
let inBrace = false;
|
|
8282
|
+
let braceStart = -1;
|
|
8283
|
+
let braceNeg = false;
|
|
8284
|
+
if (ast.type === null) {
|
|
8285
|
+
let i2 = pos;
|
|
8286
|
+
let acc2 = "";
|
|
8287
|
+
while (i2 < str.length) {
|
|
8288
|
+
const c = str.charAt(i2++);
|
|
8289
|
+
if (escaping || c === "\\") {
|
|
8290
|
+
escaping = !escaping;
|
|
8291
|
+
acc2 += c;
|
|
8292
|
+
continue;
|
|
8293
|
+
}
|
|
8294
|
+
if (inBrace) {
|
|
8295
|
+
if (i2 === braceStart + 1) {
|
|
8296
|
+
if (c === "^" || c === "!") {
|
|
8297
|
+
braceNeg = true;
|
|
8298
|
+
}
|
|
8299
|
+
} else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
|
|
8300
|
+
inBrace = false;
|
|
8301
|
+
}
|
|
8302
|
+
acc2 += c;
|
|
8303
|
+
continue;
|
|
8304
|
+
} else if (c === "[") {
|
|
8305
|
+
inBrace = true;
|
|
8306
|
+
braceStart = i2;
|
|
8307
|
+
braceNeg = false;
|
|
8308
|
+
acc2 += c;
|
|
8309
|
+
continue;
|
|
8310
|
+
}
|
|
8311
|
+
if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") {
|
|
8312
|
+
ast.push(acc2);
|
|
8313
|
+
acc2 = "";
|
|
8314
|
+
const ext2 = new _AST(c, ast);
|
|
8315
|
+
i2 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i2, opt);
|
|
8316
|
+
ast.push(ext2);
|
|
8317
|
+
continue;
|
|
8318
|
+
}
|
|
8319
|
+
acc2 += c;
|
|
8320
|
+
}
|
|
8321
|
+
ast.push(acc2);
|
|
8322
|
+
return i2;
|
|
8323
|
+
}
|
|
8324
|
+
let i = pos + 1;
|
|
8325
|
+
let part = new _AST(null, ast);
|
|
8326
|
+
const parts = [];
|
|
8327
|
+
let acc = "";
|
|
8328
|
+
while (i < str.length) {
|
|
8329
|
+
const c = str.charAt(i++);
|
|
8330
|
+
if (escaping || c === "\\") {
|
|
8331
|
+
escaping = !escaping;
|
|
8332
|
+
acc += c;
|
|
8333
|
+
continue;
|
|
8334
|
+
}
|
|
8335
|
+
if (inBrace) {
|
|
8336
|
+
if (i === braceStart + 1) {
|
|
8337
|
+
if (c === "^" || c === "!") {
|
|
8338
|
+
braceNeg = true;
|
|
8339
|
+
}
|
|
8340
|
+
} else if (c === "]" && !(i === braceStart + 2 && braceNeg)) {
|
|
8341
|
+
inBrace = false;
|
|
8342
|
+
}
|
|
8343
|
+
acc += c;
|
|
8344
|
+
continue;
|
|
8345
|
+
} else if (c === "[") {
|
|
8346
|
+
inBrace = true;
|
|
8347
|
+
braceStart = i;
|
|
8348
|
+
braceNeg = false;
|
|
8349
|
+
acc += c;
|
|
8350
|
+
continue;
|
|
8351
|
+
}
|
|
8352
|
+
if (isExtglobType(c) && str.charAt(i) === "(") {
|
|
8353
|
+
part.push(acc);
|
|
8354
|
+
acc = "";
|
|
8355
|
+
const ext2 = new _AST(c, part);
|
|
8356
|
+
part.push(ext2);
|
|
8357
|
+
i = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i, opt);
|
|
8358
|
+
continue;
|
|
8359
|
+
}
|
|
8360
|
+
if (c === "|") {
|
|
8361
|
+
part.push(acc);
|
|
8362
|
+
acc = "";
|
|
8363
|
+
parts.push(part);
|
|
8364
|
+
part = new _AST(null, ast);
|
|
8365
|
+
continue;
|
|
8366
|
+
}
|
|
8367
|
+
if (c === ")") {
|
|
8368
|
+
if (acc === "" && __privateGet(ast, _parts).length === 0) {
|
|
8369
|
+
__privateSet(ast, _emptyExt, true);
|
|
8370
|
+
}
|
|
8371
|
+
part.push(acc);
|
|
8372
|
+
acc = "";
|
|
8373
|
+
ast.push(...parts, part);
|
|
8374
|
+
return i;
|
|
8375
|
+
}
|
|
8376
|
+
acc += c;
|
|
8377
|
+
}
|
|
8378
|
+
ast.type = null;
|
|
8379
|
+
__privateSet(ast, _hasMagic, void 0);
|
|
8380
|
+
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
8381
|
+
return i;
|
|
8382
|
+
};
|
|
8383
|
+
partsToRegExp_fn = function(dot) {
|
|
8384
|
+
return __privateGet(this, _parts).map((p) => {
|
|
8385
|
+
if (typeof p === "string") {
|
|
8386
|
+
throw new Error("string type in extglob ast??");
|
|
8387
|
+
}
|
|
8388
|
+
const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
|
|
8389
|
+
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
8390
|
+
return re;
|
|
8391
|
+
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
|
|
8392
|
+
};
|
|
8393
|
+
parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
8394
|
+
let escaping = false;
|
|
8395
|
+
let re = "";
|
|
8396
|
+
let uflag = false;
|
|
8397
|
+
for (let i = 0; i < glob.length; i++) {
|
|
8398
|
+
const c = glob.charAt(i);
|
|
8399
|
+
if (escaping) {
|
|
8400
|
+
escaping = false;
|
|
8401
|
+
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
8402
|
+
continue;
|
|
8403
|
+
}
|
|
8404
|
+
if (c === "\\") {
|
|
8405
|
+
if (i === glob.length - 1) {
|
|
8406
|
+
re += "\\\\";
|
|
8407
|
+
} else {
|
|
8408
|
+
escaping = true;
|
|
8409
|
+
}
|
|
8410
|
+
continue;
|
|
8411
|
+
}
|
|
8412
|
+
if (c === "[") {
|
|
8413
|
+
const [src, needUflag, consumed, magic] = parseClass(glob, i);
|
|
8414
|
+
if (consumed) {
|
|
8415
|
+
re += src;
|
|
8416
|
+
uflag = uflag || needUflag;
|
|
8417
|
+
i += consumed - 1;
|
|
8418
|
+
hasMagic = hasMagic || magic;
|
|
8419
|
+
continue;
|
|
8420
|
+
}
|
|
8421
|
+
}
|
|
8422
|
+
if (c === "*") {
|
|
8423
|
+
if (noEmpty && glob === "*")
|
|
8424
|
+
re += starNoEmpty;
|
|
8425
|
+
else
|
|
8426
|
+
re += star;
|
|
8427
|
+
hasMagic = true;
|
|
8428
|
+
continue;
|
|
8429
|
+
}
|
|
8430
|
+
if (c === "?") {
|
|
8431
|
+
re += qmark;
|
|
8432
|
+
hasMagic = true;
|
|
8433
|
+
continue;
|
|
8434
|
+
}
|
|
8435
|
+
re += regExpEscape(c);
|
|
8436
|
+
}
|
|
8437
|
+
return [re, unescape(glob), !!hasMagic, uflag];
|
|
8438
|
+
};
|
|
8439
|
+
__privateAdd(_AST, _AST_static);
|
|
8440
|
+
var AST = _AST;
|
|
8441
|
+
|
|
8442
|
+
// node_modules/minimatch/dist/esm/escape.js
|
|
8443
|
+
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
8444
|
+
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
8445
|
+
};
|
|
8446
|
+
|
|
8447
|
+
// node_modules/minimatch/dist/esm/index.js
|
|
8448
|
+
var minimatch = (p, pattern, options = {}) => {
|
|
8449
|
+
assertValidPattern(pattern);
|
|
8450
|
+
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
8451
|
+
return false;
|
|
8452
|
+
}
|
|
8453
|
+
return new Minimatch(pattern, options).match(p);
|
|
8454
|
+
};
|
|
8455
|
+
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
8456
|
+
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
|
|
8457
|
+
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
|
|
8458
|
+
var starDotExtTestNocase = (ext2) => {
|
|
8459
|
+
ext2 = ext2.toLowerCase();
|
|
8460
|
+
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
|
|
8461
|
+
};
|
|
8462
|
+
var starDotExtTestNocaseDot = (ext2) => {
|
|
8463
|
+
ext2 = ext2.toLowerCase();
|
|
8464
|
+
return (f) => f.toLowerCase().endsWith(ext2);
|
|
8465
|
+
};
|
|
8466
|
+
var starDotStarRE = /^\*+\.\*+$/;
|
|
8467
|
+
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
8468
|
+
var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
|
|
8469
|
+
var dotStarRE = /^\.\*+$/;
|
|
8470
|
+
var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
8471
|
+
var starRE = /^\*+$/;
|
|
8472
|
+
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
8473
|
+
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
8474
|
+
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
8475
|
+
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
8476
|
+
const noext = qmarksTestNoExt([$0]);
|
|
8477
|
+
if (!ext2)
|
|
8478
|
+
return noext;
|
|
8479
|
+
ext2 = ext2.toLowerCase();
|
|
8480
|
+
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
8481
|
+
};
|
|
8482
|
+
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
|
|
8483
|
+
const noext = qmarksTestNoExtDot([$0]);
|
|
8484
|
+
if (!ext2)
|
|
8485
|
+
return noext;
|
|
8486
|
+
ext2 = ext2.toLowerCase();
|
|
8487
|
+
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
8488
|
+
};
|
|
8489
|
+
var qmarksTestDot = ([$0, ext2 = ""]) => {
|
|
8490
|
+
const noext = qmarksTestNoExtDot([$0]);
|
|
8491
|
+
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
8492
|
+
};
|
|
8493
|
+
var qmarksTest = ([$0, ext2 = ""]) => {
|
|
8494
|
+
const noext = qmarksTestNoExt([$0]);
|
|
8495
|
+
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
8496
|
+
};
|
|
8497
|
+
var qmarksTestNoExt = ([$0]) => {
|
|
8498
|
+
const len = $0.length;
|
|
8499
|
+
return (f) => f.length === len && !f.startsWith(".");
|
|
8500
|
+
};
|
|
8501
|
+
var qmarksTestNoExtDot = ([$0]) => {
|
|
8502
|
+
const len = $0.length;
|
|
8503
|
+
return (f) => f.length === len && f !== "." && f !== "..";
|
|
8504
|
+
};
|
|
8505
|
+
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
8506
|
+
var path2 = {
|
|
8507
|
+
win32: { sep: "\\" },
|
|
8508
|
+
posix: { sep: "/" }
|
|
8509
|
+
};
|
|
8510
|
+
var sep = defaultPlatform === "win32" ? path2.win32.sep : path2.posix.sep;
|
|
8511
|
+
minimatch.sep = sep;
|
|
8512
|
+
var GLOBSTAR = Symbol("globstar **");
|
|
8513
|
+
minimatch.GLOBSTAR = GLOBSTAR;
|
|
8514
|
+
var qmark2 = "[^/]";
|
|
8515
|
+
var star2 = qmark2 + "*?";
|
|
8516
|
+
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
8517
|
+
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
8518
|
+
var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
8519
|
+
minimatch.filter = filter;
|
|
8520
|
+
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
8521
|
+
var defaults = (def) => {
|
|
8522
|
+
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
8523
|
+
return minimatch;
|
|
8524
|
+
}
|
|
8525
|
+
const orig = minimatch;
|
|
8526
|
+
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
|
|
8527
|
+
return Object.assign(m, {
|
|
8528
|
+
Minimatch: class Minimatch extends orig.Minimatch {
|
|
8529
|
+
constructor(pattern, options = {}) {
|
|
8530
|
+
super(pattern, ext(def, options));
|
|
8531
|
+
}
|
|
8532
|
+
static defaults(options) {
|
|
8533
|
+
return orig.defaults(ext(def, options)).Minimatch;
|
|
8534
|
+
}
|
|
8535
|
+
},
|
|
8536
|
+
AST: class AST extends orig.AST {
|
|
8537
|
+
/* c8 ignore start */
|
|
8538
|
+
constructor(type, parent, options = {}) {
|
|
8539
|
+
super(type, parent, ext(def, options));
|
|
8540
|
+
}
|
|
8541
|
+
/* c8 ignore stop */
|
|
8542
|
+
static fromGlob(pattern, options = {}) {
|
|
8543
|
+
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
8544
|
+
}
|
|
8545
|
+
},
|
|
8546
|
+
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
8547
|
+
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
8548
|
+
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
8549
|
+
defaults: (options) => orig.defaults(ext(def, options)),
|
|
8550
|
+
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
8551
|
+
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
8552
|
+
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
8553
|
+
sep: orig.sep,
|
|
8554
|
+
GLOBSTAR
|
|
8555
|
+
});
|
|
8556
|
+
};
|
|
8557
|
+
minimatch.defaults = defaults;
|
|
8558
|
+
var braceExpand = (pattern, options = {}) => {
|
|
8559
|
+
assertValidPattern(pattern);
|
|
8560
|
+
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
8561
|
+
return [pattern];
|
|
8562
|
+
}
|
|
8563
|
+
return (0, import_brace_expansion.default)(pattern);
|
|
8564
|
+
};
|
|
8565
|
+
minimatch.braceExpand = braceExpand;
|
|
8566
|
+
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
8567
|
+
minimatch.makeRe = makeRe;
|
|
8568
|
+
var match = (list, pattern, options = {}) => {
|
|
8569
|
+
const mm = new Minimatch(pattern, options);
|
|
8570
|
+
list = list.filter((f) => mm.match(f));
|
|
8571
|
+
if (mm.options.nonull && !list.length) {
|
|
8572
|
+
list.push(pattern);
|
|
8573
|
+
}
|
|
8574
|
+
return list;
|
|
8575
|
+
};
|
|
8576
|
+
minimatch.match = match;
|
|
8577
|
+
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
8578
|
+
var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
8579
|
+
var Minimatch = class {
|
|
8580
|
+
options;
|
|
8581
|
+
set;
|
|
8582
|
+
pattern;
|
|
8583
|
+
windowsPathsNoEscape;
|
|
8584
|
+
nonegate;
|
|
8585
|
+
negate;
|
|
8586
|
+
comment;
|
|
8587
|
+
empty;
|
|
8588
|
+
preserveMultipleSlashes;
|
|
8589
|
+
partial;
|
|
8590
|
+
globSet;
|
|
8591
|
+
globParts;
|
|
8592
|
+
nocase;
|
|
8593
|
+
isWindows;
|
|
8594
|
+
platform;
|
|
8595
|
+
windowsNoMagicRoot;
|
|
8596
|
+
regexp;
|
|
8597
|
+
constructor(pattern, options = {}) {
|
|
8598
|
+
assertValidPattern(pattern);
|
|
8599
|
+
options = options || {};
|
|
8600
|
+
this.options = options;
|
|
8601
|
+
this.pattern = pattern;
|
|
8602
|
+
this.platform = options.platform || defaultPlatform;
|
|
8603
|
+
this.isWindows = this.platform === "win32";
|
|
8604
|
+
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
8605
|
+
if (this.windowsPathsNoEscape) {
|
|
8606
|
+
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
8607
|
+
}
|
|
8608
|
+
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
8609
|
+
this.regexp = null;
|
|
8610
|
+
this.negate = false;
|
|
8611
|
+
this.nonegate = !!options.nonegate;
|
|
8612
|
+
this.comment = false;
|
|
8613
|
+
this.empty = false;
|
|
8614
|
+
this.partial = !!options.partial;
|
|
8615
|
+
this.nocase = !!this.options.nocase;
|
|
8616
|
+
this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
|
|
8617
|
+
this.globSet = [];
|
|
8618
|
+
this.globParts = [];
|
|
8619
|
+
this.set = [];
|
|
8620
|
+
this.make();
|
|
8621
|
+
}
|
|
8622
|
+
hasMagic() {
|
|
8623
|
+
if (this.options.magicalBraces && this.set.length > 1) {
|
|
8624
|
+
return true;
|
|
8625
|
+
}
|
|
8626
|
+
for (const pattern of this.set) {
|
|
8627
|
+
for (const part of pattern) {
|
|
8628
|
+
if (typeof part !== "string")
|
|
8629
|
+
return true;
|
|
8630
|
+
}
|
|
8631
|
+
}
|
|
8632
|
+
return false;
|
|
8633
|
+
}
|
|
8634
|
+
debug(..._) {
|
|
8635
|
+
}
|
|
8636
|
+
make() {
|
|
8637
|
+
const pattern = this.pattern;
|
|
8638
|
+
const options = this.options;
|
|
8639
|
+
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
8640
|
+
this.comment = true;
|
|
8641
|
+
return;
|
|
8642
|
+
}
|
|
8643
|
+
if (!pattern) {
|
|
8644
|
+
this.empty = true;
|
|
8645
|
+
return;
|
|
8646
|
+
}
|
|
8647
|
+
this.parseNegate();
|
|
8648
|
+
this.globSet = [...new Set(this.braceExpand())];
|
|
8649
|
+
if (options.debug) {
|
|
8650
|
+
this.debug = (...args) => console.error(...args);
|
|
8651
|
+
}
|
|
8652
|
+
this.debug(this.pattern, this.globSet);
|
|
8653
|
+
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
8654
|
+
this.globParts = this.preprocess(rawGlobParts);
|
|
8655
|
+
this.debug(this.pattern, this.globParts);
|
|
8656
|
+
let set = this.globParts.map((s, _, __) => {
|
|
8657
|
+
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
8658
|
+
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
8659
|
+
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
8660
|
+
if (isUNC) {
|
|
8661
|
+
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
8662
|
+
} else if (isDrive) {
|
|
8663
|
+
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
8664
|
+
}
|
|
8665
|
+
}
|
|
8666
|
+
return s.map((ss) => this.parse(ss));
|
|
8667
|
+
});
|
|
8668
|
+
this.debug(this.pattern, set);
|
|
8669
|
+
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
8670
|
+
if (this.isWindows) {
|
|
8671
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
8672
|
+
const p = this.set[i];
|
|
8673
|
+
if (p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
|
|
8674
|
+
p[2] = "?";
|
|
8675
|
+
}
|
|
8676
|
+
}
|
|
8677
|
+
}
|
|
8678
|
+
this.debug(this.pattern, this.set);
|
|
8679
|
+
}
|
|
8680
|
+
// various transforms to equivalent pattern sets that are
|
|
8681
|
+
// faster to process in a filesystem walk. The goal is to
|
|
8682
|
+
// eliminate what we can, and push all ** patterns as far
|
|
8683
|
+
// to the right as possible, even if it increases the number
|
|
8684
|
+
// of patterns that we have to process.
|
|
8685
|
+
preprocess(globParts) {
|
|
8686
|
+
if (this.options.noglobstar) {
|
|
8687
|
+
for (let i = 0; i < globParts.length; i++) {
|
|
8688
|
+
for (let j = 0; j < globParts[i].length; j++) {
|
|
8689
|
+
if (globParts[i][j] === "**") {
|
|
8690
|
+
globParts[i][j] = "*";
|
|
8691
|
+
}
|
|
8692
|
+
}
|
|
8693
|
+
}
|
|
8694
|
+
}
|
|
8695
|
+
const { optimizationLevel = 1 } = this.options;
|
|
8696
|
+
if (optimizationLevel >= 2) {
|
|
8697
|
+
globParts = this.firstPhasePreProcess(globParts);
|
|
8698
|
+
globParts = this.secondPhasePreProcess(globParts);
|
|
8699
|
+
} else if (optimizationLevel >= 1) {
|
|
8700
|
+
globParts = this.levelOneOptimize(globParts);
|
|
8701
|
+
} else {
|
|
8702
|
+
globParts = this.adjascentGlobstarOptimize(globParts);
|
|
8703
|
+
}
|
|
8704
|
+
return globParts;
|
|
8705
|
+
}
|
|
8706
|
+
// just get rid of adjascent ** portions
|
|
8707
|
+
adjascentGlobstarOptimize(globParts) {
|
|
8708
|
+
return globParts.map((parts) => {
|
|
8709
|
+
let gs = -1;
|
|
8710
|
+
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
8711
|
+
let i = gs;
|
|
8712
|
+
while (parts[i + 1] === "**") {
|
|
8713
|
+
i++;
|
|
8714
|
+
}
|
|
8715
|
+
if (i !== gs) {
|
|
8716
|
+
parts.splice(gs, i - gs);
|
|
8717
|
+
}
|
|
8718
|
+
}
|
|
8719
|
+
return parts;
|
|
8720
|
+
});
|
|
8721
|
+
}
|
|
8722
|
+
// get rid of adjascent ** and resolve .. portions
|
|
8723
|
+
levelOneOptimize(globParts) {
|
|
8724
|
+
return globParts.map((parts) => {
|
|
8725
|
+
parts = parts.reduce((set, part) => {
|
|
8726
|
+
const prev = set[set.length - 1];
|
|
8727
|
+
if (part === "**" && prev === "**") {
|
|
8728
|
+
return set;
|
|
8729
|
+
}
|
|
8730
|
+
if (part === "..") {
|
|
8731
|
+
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
8732
|
+
set.pop();
|
|
8733
|
+
return set;
|
|
8734
|
+
}
|
|
8735
|
+
}
|
|
8736
|
+
set.push(part);
|
|
8737
|
+
return set;
|
|
8738
|
+
}, []);
|
|
8739
|
+
return parts.length === 0 ? [""] : parts;
|
|
8740
|
+
});
|
|
8741
|
+
}
|
|
8742
|
+
levelTwoFileOptimize(parts) {
|
|
8743
|
+
if (!Array.isArray(parts)) {
|
|
8744
|
+
parts = this.slashSplit(parts);
|
|
8745
|
+
}
|
|
8746
|
+
let didSomething = false;
|
|
8747
|
+
do {
|
|
8748
|
+
didSomething = false;
|
|
8749
|
+
if (!this.preserveMultipleSlashes) {
|
|
8750
|
+
for (let i = 1; i < parts.length - 1; i++) {
|
|
8751
|
+
const p = parts[i];
|
|
8752
|
+
if (i === 1 && p === "" && parts[0] === "")
|
|
8753
|
+
continue;
|
|
8754
|
+
if (p === "." || p === "") {
|
|
8755
|
+
didSomething = true;
|
|
8756
|
+
parts.splice(i, 1);
|
|
8757
|
+
i--;
|
|
8758
|
+
}
|
|
8759
|
+
}
|
|
8760
|
+
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
8761
|
+
didSomething = true;
|
|
8762
|
+
parts.pop();
|
|
8763
|
+
}
|
|
8764
|
+
}
|
|
8765
|
+
let dd = 0;
|
|
8766
|
+
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
8767
|
+
const p = parts[dd - 1];
|
|
8768
|
+
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
8769
|
+
didSomething = true;
|
|
8770
|
+
parts.splice(dd - 1, 2);
|
|
8771
|
+
dd -= 2;
|
|
8772
|
+
}
|
|
8773
|
+
}
|
|
8774
|
+
} while (didSomething);
|
|
8775
|
+
return parts.length === 0 ? [""] : parts;
|
|
8776
|
+
}
|
|
8777
|
+
// First phase: single-pattern processing
|
|
8778
|
+
// <pre> is 1 or more portions
|
|
8779
|
+
// <rest> is 1 or more portions
|
|
8780
|
+
// <p> is any portion other than ., .., '', or **
|
|
8781
|
+
// <e> is . or ''
|
|
8782
|
+
//
|
|
8783
|
+
// **/.. is *brutal* for filesystem walking performance, because
|
|
8784
|
+
// it effectively resets the recursive walk each time it occurs,
|
|
8785
|
+
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
8786
|
+
// or most strings (other than .., ., and '') can be.
|
|
8787
|
+
//
|
|
8788
|
+
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
8789
|
+
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
8790
|
+
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
8791
|
+
// **/**/<rest> -> **/<rest>
|
|
8792
|
+
//
|
|
8793
|
+
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
8794
|
+
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
8795
|
+
firstPhasePreProcess(globParts) {
|
|
8796
|
+
let didSomething = false;
|
|
8797
|
+
do {
|
|
8798
|
+
didSomething = false;
|
|
8799
|
+
for (let parts of globParts) {
|
|
8800
|
+
let gs = -1;
|
|
8801
|
+
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
8802
|
+
let gss = gs;
|
|
8803
|
+
while (parts[gss + 1] === "**") {
|
|
8804
|
+
gss++;
|
|
8805
|
+
}
|
|
8806
|
+
if (gss > gs) {
|
|
8807
|
+
parts.splice(gs + 1, gss - gs);
|
|
8808
|
+
}
|
|
8809
|
+
let next = parts[gs + 1];
|
|
8810
|
+
const p = parts[gs + 2];
|
|
8811
|
+
const p2 = parts[gs + 3];
|
|
8812
|
+
if (next !== "..")
|
|
8813
|
+
continue;
|
|
8814
|
+
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
|
|
8815
|
+
continue;
|
|
8816
|
+
}
|
|
8817
|
+
didSomething = true;
|
|
8818
|
+
parts.splice(gs, 1);
|
|
8819
|
+
const other = parts.slice(0);
|
|
8820
|
+
other[gs] = "**";
|
|
8821
|
+
globParts.push(other);
|
|
8822
|
+
gs--;
|
|
8823
|
+
}
|
|
8824
|
+
if (!this.preserveMultipleSlashes) {
|
|
8825
|
+
for (let i = 1; i < parts.length - 1; i++) {
|
|
8826
|
+
const p = parts[i];
|
|
8827
|
+
if (i === 1 && p === "" && parts[0] === "")
|
|
8828
|
+
continue;
|
|
8829
|
+
if (p === "." || p === "") {
|
|
8830
|
+
didSomething = true;
|
|
8831
|
+
parts.splice(i, 1);
|
|
8832
|
+
i--;
|
|
8833
|
+
}
|
|
8834
|
+
}
|
|
8835
|
+
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
8836
|
+
didSomething = true;
|
|
8837
|
+
parts.pop();
|
|
8838
|
+
}
|
|
8839
|
+
}
|
|
8840
|
+
let dd = 0;
|
|
8841
|
+
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
8842
|
+
const p = parts[dd - 1];
|
|
8843
|
+
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
8844
|
+
didSomething = true;
|
|
8845
|
+
const needDot = dd === 1 && parts[dd + 1] === "**";
|
|
8846
|
+
const splin = needDot ? ["."] : [];
|
|
8847
|
+
parts.splice(dd - 1, 2, ...splin);
|
|
8848
|
+
if (parts.length === 0)
|
|
8849
|
+
parts.push("");
|
|
8850
|
+
dd -= 2;
|
|
8851
|
+
}
|
|
8852
|
+
}
|
|
8853
|
+
}
|
|
8854
|
+
} while (didSomething);
|
|
8855
|
+
return globParts;
|
|
8856
|
+
}
|
|
8857
|
+
// second phase: multi-pattern dedupes
|
|
8858
|
+
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
8859
|
+
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
8860
|
+
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
8861
|
+
//
|
|
8862
|
+
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
8863
|
+
// ^-- not valid because ** doens't follow symlinks
|
|
8864
|
+
secondPhasePreProcess(globParts) {
|
|
8865
|
+
for (let i = 0; i < globParts.length - 1; i++) {
|
|
8866
|
+
for (let j = i + 1; j < globParts.length; j++) {
|
|
8867
|
+
const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
|
|
8868
|
+
if (!matched)
|
|
8869
|
+
continue;
|
|
8870
|
+
globParts[i] = matched;
|
|
8871
|
+
globParts[j] = [];
|
|
8872
|
+
}
|
|
8873
|
+
}
|
|
8874
|
+
return globParts.filter((gs) => gs.length);
|
|
8875
|
+
}
|
|
8876
|
+
partsMatch(a, b, emptyGSMatch = false) {
|
|
8877
|
+
let ai = 0;
|
|
8878
|
+
let bi = 0;
|
|
8879
|
+
let result = [];
|
|
8880
|
+
let which = "";
|
|
8881
|
+
while (ai < a.length && bi < b.length) {
|
|
8882
|
+
if (a[ai] === b[bi]) {
|
|
8883
|
+
result.push(which === "b" ? b[bi] : a[ai]);
|
|
8884
|
+
ai++;
|
|
8885
|
+
bi++;
|
|
8886
|
+
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
|
|
8887
|
+
result.push(a[ai]);
|
|
8888
|
+
ai++;
|
|
8889
|
+
} else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
|
|
8890
|
+
result.push(b[bi]);
|
|
8891
|
+
bi++;
|
|
8892
|
+
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
|
|
8893
|
+
if (which === "b")
|
|
8894
|
+
return false;
|
|
8895
|
+
which = "a";
|
|
8896
|
+
result.push(a[ai]);
|
|
8897
|
+
ai++;
|
|
8898
|
+
bi++;
|
|
8899
|
+
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
|
|
8900
|
+
if (which === "a")
|
|
8901
|
+
return false;
|
|
8902
|
+
which = "b";
|
|
8903
|
+
result.push(b[bi]);
|
|
8904
|
+
ai++;
|
|
8905
|
+
bi++;
|
|
8906
|
+
} else {
|
|
8907
|
+
return false;
|
|
8908
|
+
}
|
|
8909
|
+
}
|
|
8910
|
+
return a.length === b.length && result;
|
|
8911
|
+
}
|
|
8912
|
+
parseNegate() {
|
|
8913
|
+
if (this.nonegate)
|
|
8914
|
+
return;
|
|
8915
|
+
const pattern = this.pattern;
|
|
8916
|
+
let negate = false;
|
|
8917
|
+
let negateOffset = 0;
|
|
8918
|
+
for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
|
|
8919
|
+
negate = !negate;
|
|
8920
|
+
negateOffset++;
|
|
8921
|
+
}
|
|
8922
|
+
if (negateOffset)
|
|
8923
|
+
this.pattern = pattern.slice(negateOffset);
|
|
8924
|
+
this.negate = negate;
|
|
8925
|
+
}
|
|
8926
|
+
// set partial to true to test if, for example,
|
|
8927
|
+
// "/a/b" matches the start of "/*/b/*/d"
|
|
8928
|
+
// Partial means, if you run out of file before you run
|
|
8929
|
+
// out of pattern, then that's fine, as long as all
|
|
8930
|
+
// the parts match.
|
|
8931
|
+
matchOne(file, pattern, partial = false) {
|
|
8932
|
+
const options = this.options;
|
|
8933
|
+
if (this.isWindows) {
|
|
8934
|
+
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
8935
|
+
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
8936
|
+
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
|
|
8937
|
+
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
|
|
8938
|
+
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
8939
|
+
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
8940
|
+
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
8941
|
+
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
8942
|
+
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
8943
|
+
pattern[pdi] = fd;
|
|
8944
|
+
if (pdi > fdi) {
|
|
8945
|
+
pattern = pattern.slice(pdi);
|
|
8946
|
+
} else if (fdi > pdi) {
|
|
8947
|
+
file = file.slice(fdi);
|
|
8948
|
+
}
|
|
8949
|
+
}
|
|
8950
|
+
}
|
|
8951
|
+
}
|
|
8952
|
+
const { optimizationLevel = 1 } = this.options;
|
|
8953
|
+
if (optimizationLevel >= 2) {
|
|
8954
|
+
file = this.levelTwoFileOptimize(file);
|
|
8955
|
+
}
|
|
8956
|
+
this.debug("matchOne", this, { file, pattern });
|
|
8957
|
+
this.debug("matchOne", file.length, pattern.length);
|
|
8958
|
+
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
8959
|
+
this.debug("matchOne loop");
|
|
8960
|
+
var p = pattern[pi];
|
|
8961
|
+
var f = file[fi];
|
|
8962
|
+
this.debug(pattern, p, f);
|
|
8963
|
+
if (p === false) {
|
|
8964
|
+
return false;
|
|
8965
|
+
}
|
|
8966
|
+
if (p === GLOBSTAR) {
|
|
8967
|
+
this.debug("GLOBSTAR", [pattern, p, f]);
|
|
8968
|
+
var fr = fi;
|
|
8969
|
+
var pr = pi + 1;
|
|
8970
|
+
if (pr === pl) {
|
|
8971
|
+
this.debug("** at the end");
|
|
8972
|
+
for (; fi < fl; fi++) {
|
|
8973
|
+
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
|
|
8974
|
+
return false;
|
|
8975
|
+
}
|
|
8976
|
+
return true;
|
|
8977
|
+
}
|
|
8978
|
+
while (fr < fl) {
|
|
8979
|
+
var swallowee = file[fr];
|
|
8980
|
+
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
8981
|
+
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
8982
|
+
this.debug("globstar found match!", fr, fl, swallowee);
|
|
8983
|
+
return true;
|
|
8984
|
+
} else {
|
|
8985
|
+
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
8986
|
+
this.debug("dot detected!", file, fr, pattern, pr);
|
|
8987
|
+
break;
|
|
8988
|
+
}
|
|
8989
|
+
this.debug("globstar swallow a segment, and continue");
|
|
8990
|
+
fr++;
|
|
8991
|
+
}
|
|
8992
|
+
}
|
|
8993
|
+
if (partial) {
|
|
8994
|
+
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
8995
|
+
if (fr === fl) {
|
|
8996
|
+
return true;
|
|
8997
|
+
}
|
|
8998
|
+
}
|
|
8999
|
+
return false;
|
|
9000
|
+
}
|
|
9001
|
+
let hit;
|
|
9002
|
+
if (typeof p === "string") {
|
|
9003
|
+
hit = f === p;
|
|
9004
|
+
this.debug("string match", p, f, hit);
|
|
9005
|
+
} else {
|
|
9006
|
+
hit = p.test(f);
|
|
9007
|
+
this.debug("pattern match", p, f, hit);
|
|
9008
|
+
}
|
|
9009
|
+
if (!hit)
|
|
9010
|
+
return false;
|
|
9011
|
+
}
|
|
9012
|
+
if (fi === fl && pi === pl) {
|
|
9013
|
+
return true;
|
|
9014
|
+
} else if (fi === fl) {
|
|
9015
|
+
return partial;
|
|
9016
|
+
} else if (pi === pl) {
|
|
9017
|
+
return fi === fl - 1 && file[fi] === "";
|
|
9018
|
+
} else {
|
|
9019
|
+
throw new Error("wtf?");
|
|
9020
|
+
}
|
|
9021
|
+
}
|
|
9022
|
+
braceExpand() {
|
|
9023
|
+
return braceExpand(this.pattern, this.options);
|
|
9024
|
+
}
|
|
9025
|
+
parse(pattern) {
|
|
9026
|
+
assertValidPattern(pattern);
|
|
9027
|
+
const options = this.options;
|
|
9028
|
+
if (pattern === "**")
|
|
9029
|
+
return GLOBSTAR;
|
|
9030
|
+
if (pattern === "")
|
|
9031
|
+
return "";
|
|
9032
|
+
let m;
|
|
9033
|
+
let fastTest = null;
|
|
9034
|
+
if (m = pattern.match(starRE)) {
|
|
9035
|
+
fastTest = options.dot ? starTestDot : starTest;
|
|
9036
|
+
} else if (m = pattern.match(starDotExtRE)) {
|
|
9037
|
+
fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
|
|
9038
|
+
} else if (m = pattern.match(qmarksRE)) {
|
|
9039
|
+
fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
|
|
9040
|
+
} else if (m = pattern.match(starDotStarRE)) {
|
|
9041
|
+
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
9042
|
+
} else if (m = pattern.match(dotStarRE)) {
|
|
9043
|
+
fastTest = dotStarTest;
|
|
9044
|
+
}
|
|
9045
|
+
const re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
9046
|
+
if (fastTest && typeof re === "object") {
|
|
9047
|
+
Reflect.defineProperty(re, "test", { value: fastTest });
|
|
9048
|
+
}
|
|
9049
|
+
return re;
|
|
9050
|
+
}
|
|
9051
|
+
makeRe() {
|
|
9052
|
+
if (this.regexp || this.regexp === false)
|
|
9053
|
+
return this.regexp;
|
|
9054
|
+
const set = this.set;
|
|
9055
|
+
if (!set.length) {
|
|
9056
|
+
this.regexp = false;
|
|
9057
|
+
return this.regexp;
|
|
9058
|
+
}
|
|
9059
|
+
const options = this.options;
|
|
9060
|
+
const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
|
|
9061
|
+
const flags = new Set(options.nocase ? ["i"] : []);
|
|
9062
|
+
let re = set.map((pattern) => {
|
|
9063
|
+
const pp = pattern.map((p) => {
|
|
9064
|
+
if (p instanceof RegExp) {
|
|
9065
|
+
for (const f of p.flags.split(""))
|
|
9066
|
+
flags.add(f);
|
|
9067
|
+
}
|
|
9068
|
+
return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
|
|
9069
|
+
});
|
|
9070
|
+
pp.forEach((p, i) => {
|
|
9071
|
+
const next = pp[i + 1];
|
|
9072
|
+
const prev = pp[i - 1];
|
|
9073
|
+
if (p !== GLOBSTAR || prev === GLOBSTAR) {
|
|
9074
|
+
return;
|
|
9075
|
+
}
|
|
9076
|
+
if (prev === void 0) {
|
|
9077
|
+
if (next !== void 0 && next !== GLOBSTAR) {
|
|
9078
|
+
pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
9079
|
+
} else {
|
|
9080
|
+
pp[i] = twoStar;
|
|
9081
|
+
}
|
|
9082
|
+
} else if (next === void 0) {
|
|
9083
|
+
pp[i - 1] = prev + "(?:\\/|" + twoStar + ")?";
|
|
9084
|
+
} else if (next !== GLOBSTAR) {
|
|
9085
|
+
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
9086
|
+
pp[i + 1] = GLOBSTAR;
|
|
9087
|
+
}
|
|
9088
|
+
});
|
|
9089
|
+
return pp.filter((p) => p !== GLOBSTAR).join("/");
|
|
9090
|
+
}).join("|");
|
|
9091
|
+
const [open2, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
9092
|
+
re = "^" + open2 + re + close + "$";
|
|
9093
|
+
if (this.negate)
|
|
9094
|
+
re = "^(?!" + re + ").+$";
|
|
9095
|
+
try {
|
|
9096
|
+
this.regexp = new RegExp(re, [...flags].join(""));
|
|
9097
|
+
} catch (ex) {
|
|
9098
|
+
this.regexp = false;
|
|
9099
|
+
}
|
|
9100
|
+
return this.regexp;
|
|
9101
|
+
}
|
|
9102
|
+
slashSplit(p) {
|
|
9103
|
+
if (this.preserveMultipleSlashes) {
|
|
9104
|
+
return p.split("/");
|
|
9105
|
+
} else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
|
|
9106
|
+
return ["", ...p.split(/\/+/)];
|
|
9107
|
+
} else {
|
|
9108
|
+
return p.split(/\/+/);
|
|
9109
|
+
}
|
|
9110
|
+
}
|
|
9111
|
+
match(f, partial = this.partial) {
|
|
9112
|
+
this.debug("match", f, this.pattern);
|
|
9113
|
+
if (this.comment) {
|
|
9114
|
+
return false;
|
|
9115
|
+
}
|
|
9116
|
+
if (this.empty) {
|
|
9117
|
+
return f === "";
|
|
9118
|
+
}
|
|
9119
|
+
if (f === "/" && partial) {
|
|
9120
|
+
return true;
|
|
9121
|
+
}
|
|
9122
|
+
const options = this.options;
|
|
9123
|
+
if (this.isWindows) {
|
|
9124
|
+
f = f.split("\\").join("/");
|
|
9125
|
+
}
|
|
9126
|
+
const ff = this.slashSplit(f);
|
|
9127
|
+
this.debug(this.pattern, "split", ff);
|
|
9128
|
+
const set = this.set;
|
|
9129
|
+
this.debug(this.pattern, "set", set);
|
|
9130
|
+
let filename = ff[ff.length - 1];
|
|
9131
|
+
if (!filename) {
|
|
9132
|
+
for (let i = ff.length - 2; !filename && i >= 0; i--) {
|
|
9133
|
+
filename = ff[i];
|
|
9134
|
+
}
|
|
9135
|
+
}
|
|
9136
|
+
for (let i = 0; i < set.length; i++) {
|
|
9137
|
+
const pattern = set[i];
|
|
9138
|
+
let file = ff;
|
|
9139
|
+
if (options.matchBase && pattern.length === 1) {
|
|
9140
|
+
file = [filename];
|
|
9141
|
+
}
|
|
9142
|
+
const hit = this.matchOne(file, pattern, partial);
|
|
9143
|
+
if (hit) {
|
|
9144
|
+
if (options.flipNegate) {
|
|
9145
|
+
return true;
|
|
9146
|
+
}
|
|
9147
|
+
return !this.negate;
|
|
9148
|
+
}
|
|
9149
|
+
}
|
|
9150
|
+
if (options.flipNegate) {
|
|
9151
|
+
return false;
|
|
9152
|
+
}
|
|
9153
|
+
return this.negate;
|
|
9154
|
+
}
|
|
9155
|
+
static defaults(def) {
|
|
9156
|
+
return minimatch.defaults(def).Minimatch;
|
|
9157
|
+
}
|
|
9158
|
+
};
|
|
9159
|
+
minimatch.AST = AST;
|
|
9160
|
+
minimatch.Minimatch = Minimatch;
|
|
9161
|
+
minimatch.escape = escape;
|
|
9162
|
+
minimatch.unescape = unescape;
|
|
9163
|
+
|
|
7593
9164
|
// src/utils/output-target.ts
|
|
7594
9165
|
var import_path3 = require("path");
|
|
7595
9166
|
|
|
@@ -7719,6 +9290,7 @@ var BUILD = {
|
|
|
7719
9290
|
constructableCSS: true,
|
|
7720
9291
|
devTools: false,
|
|
7721
9292
|
shadowDelegatesFocus: true,
|
|
9293
|
+
shadowSlotAssignmentManual: false,
|
|
7722
9294
|
initializeNextTick: false,
|
|
7723
9295
|
asyncLoading: true,
|
|
7724
9296
|
asyncQueue: false,
|
|
@@ -7750,6 +9322,9 @@ var H = win.HTMLElement || class {
|
|
|
7750
9322
|
var supportsShadow = BUILD.shadowDom;
|
|
7751
9323
|
var supportsConstructableStylesheets = BUILD.constructableCSS ? /* @__PURE__ */ (() => {
|
|
7752
9324
|
try {
|
|
9325
|
+
if (!win.document.adoptedStyleSheets) {
|
|
9326
|
+
return false;
|
|
9327
|
+
}
|
|
7753
9328
|
new CSSStyleSheet();
|
|
7754
9329
|
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
7755
9330
|
} catch (e) {
|
|
@@ -7820,7 +9395,7 @@ var DEV_SERVER_INIT_URL = `${DEV_SERVER_URL}-init`;
|
|
|
7820
9395
|
var OPEN_IN_EDITOR_URL = `${DEV_SERVER_URL}-open-in-editor`;
|
|
7821
9396
|
|
|
7822
9397
|
// build/version.js
|
|
7823
|
-
var version = "4.
|
|
9398
|
+
var version = "4.40.1-dev.1766552834.64f6089";
|
|
7824
9399
|
|
|
7825
9400
|
// build/dev-server/content-types-db.json
|
|
7826
9401
|
var content_types_db_default = { "123": "application/vnd.lotus-1-2-3", "210": "model/step", "1km": "application/vnd.1000minds.decision-model+xml", "3dml": "text/vnd.in3d.3dml", "3ds": "image/x-3ds", "3g2": "video/3gpp2", "3gp": "video/3gpp", "3gpp": "video/3gpp", "3mf": "model/3mf", "7z": "application/x-7z-compressed", "aab": "application/x-authorware-bin", "aac": "audio/x-aac", "aam": "application/x-authorware-map", "aas": "application/x-authorware-seg", "abw": "application/x-abiword", "ac": "application/vnd.nokia.n-gage.ac+xml", "acc": "application/vnd.americandynamics.acc", "ace": "application/x-ace-compressed", "acu": "application/vnd.acucobol", "acutc": "application/vnd.acucorp", "adp": "audio/adpcm", "adts": "audio/aac", "aep": "application/vnd.audiograph", "afm": "application/x-font-type1", "afp": "application/vnd.ibm.modcap", "age": "application/vnd.age", "ahead": "application/vnd.ahead.space", "ai": "application/postscript", "aif": "audio/x-aiff", "aifc": "audio/x-aiff", "aiff": "audio/x-aiff", "air": "application/vnd.adobe.air-application-installer-package+zip", "ait": "application/vnd.dvb.ait", "ami": "application/vnd.amiga.ami", "aml": "application/automationml-aml+xml", "amlx": "application/automationml-amlx+zip", "amr": "audio/amr", "apk": "application/vnd.android.package-archive", "apng": "image/apng", "appcache": "text/cache-manifest", "appinstaller": "application/appinstaller", "application": "application/x-ms-application", "appx": "application/appx", "appxbundle": "application/appxbundle", "apr": "application/vnd.lotus-approach", "arc": "application/x-freearc", "arj": "application/x-arj", "asc": "application/pgp-signature", "asf": "video/x-ms-asf", "asm": "text/x-asm", "aso": "application/vnd.accpac.simply.aso", "asx": "video/x-ms-asf", "atc": "application/vnd.acucorp", "atom": "application/atom+xml", "atomcat": "application/atomcat+xml", "atomdeleted": "application/atomdeleted+xml", "atomsvc": "application/atomsvc+xml", "atx": "application/vnd.antix.game-component", "au": "audio/basic", "avci": "image/avci", "avcs": "image/avcs", "avi": "video/x-msvideo", "avif": "image/avif", "aw": "application/applixware", "azf": "application/vnd.airzip.filesecure.azf", "azs": "application/vnd.airzip.filesecure.azs", "azv": "image/vnd.airzip.accelerator.azv", "azw": "application/vnd.amazon.ebook", "b16": "image/vnd.pco.b16", "bary": "model/vnd.bary", "bat": "application/x-msdownload", "bcpio": "application/x-bcpio", "bdf": "application/x-font-bdf", "bdm": "application/vnd.syncml.dm+wbxml", "bdo": "application/vnd.nato.bindingdataobject+xml", "bdoc": "application/x-bdoc", "bed": "application/vnd.realvnc.bed", "bh2": "application/vnd.fujitsu.oasysprs", "bin": "application/octet-stream", "blb": "application/x-blorb", "blend": "application/x-blender", "blorb": "application/x-blorb", "bmi": "application/vnd.bmi", "bmml": "application/vnd.balsamiq.bmml+xml", "bmp": "image/x-ms-bmp", "book": "application/vnd.framemaker", "box": "application/vnd.previewsystems.box", "boz": "application/x-bzip2", "bpk": "application/octet-stream", "brush": "application/vnd.procreate.brush", "brushset": "application/vnd.procrate.brushset", "bsp": "model/vnd.valve.source.compiled-map", "btf": "image/prs.btif", "btif": "image/prs.btif", "buffer": "application/octet-stream", "bz": "application/x-bzip", "bz2": "application/x-bzip2", "c": "text/x-c", "c11amc": "application/vnd.cluetrust.cartomobile-config", "c11amz": "application/vnd.cluetrust.cartomobile-config-pkg", "c4d": "application/vnd.clonk.c4group", "c4f": "application/vnd.clonk.c4group", "c4g": "application/vnd.clonk.c4group", "c4p": "application/vnd.clonk.c4group", "c4u": "application/vnd.clonk.c4group", "cab": "application/vnd.ms-cab-compressed", "caf": "audio/x-caf", "cap": "application/vnd.tcpdump.pcap", "car": "application/vnd.curl.car", "cat": "application/vnd.ms-pki.seccat", "cb7": "application/x-cbr", "cba": "application/x-cbr", "cbr": "application/x-cbr", "cbt": "application/x-cbr", "cbz": "application/x-cbr", "cc": "text/x-c", "cco": "application/x-cocoa", "cct": "application/x-director", "ccxml": "application/ccxml+xml", "cdbcmsg": "application/vnd.contact.cmsg", "cdf": "application/x-netcdf", "cdfx": "application/cdfx+xml", "cdkey": "application/vnd.mediastation.cdkey", "cdmia": "application/cdmi-capability", "cdmic": "application/cdmi-container", "cdmid": "application/cdmi-domain", "cdmio": "application/cdmi-object", "cdmiq": "application/cdmi-queue", "cdx": "chemical/x-cdx", "cdxml": "application/vnd.chemdraw+xml", "cdy": "application/vnd.cinderella", "cer": "application/pkix-cert", "cfs": "application/x-cfs-compressed", "cgm": "image/cgm", "chat": "application/x-chat", "chm": "application/vnd.ms-htmlhelp", "chrt": "application/vnd.kde.kchart", "cif": "chemical/x-cif", "cii": "application/vnd.anser-web-certificate-issue-initiation", "cil": "application/vnd.ms-artgalry", "cjs": "application/node", "cla": "application/vnd.claymore", "class": "application/java-vm", "cld": "model/vnd.cld", "clkk": "application/vnd.crick.clicker.keyboard", "clkp": "application/vnd.crick.clicker.palette", "clkt": "application/vnd.crick.clicker.template", "clkw": "application/vnd.crick.clicker.wordbank", "clkx": "application/vnd.crick.clicker", "clp": "application/x-msclip", "cmc": "application/vnd.cosmocaller", "cmdf": "chemical/x-cmdf", "cml": "chemical/x-cml", "cmp": "application/vnd.yellowriver-custom-menu", "cmx": "image/x-cmx", "cod": "application/vnd.rim.cod", "coffee": "text/coffeescript", "com": "application/x-msdownload", "conf": "text/plain", "cpio": "application/x-cpio", "cpl": "application/cpl+xml", "cpp": "text/x-c", "cpt": "application/mac-compactpro", "crd": "application/x-mscardfile", "crl": "application/pkix-crl", "crt": "application/x-x509-ca-cert", "crx": "application/x-chrome-extension", "cryptonote": "application/vnd.rig.cryptonote", "csh": "application/x-csh", "csl": "application/vnd.citationstyles.style+xml", "csml": "chemical/x-csml", "csp": "application/vnd.commonspace", "css": "text/css", "cst": "application/x-director", "csv": "text/csv", "cu": "application/cu-seeme", "curl": "text/vnd.curl", "cwl": "application/cwl", "cww": "application/prs.cww", "cxt": "application/x-director", "cxx": "text/x-c", "dae": "model/vnd.collada+xml", "daf": "application/vnd.mobius.daf", "dart": "application/vnd.dart", "dataless": "application/vnd.fdsn.seed", "davmount": "application/davmount+xml", "dbf": "application/vnd.dbf", "dbk": "application/docbook+xml", "dcm": "application/dicom", "dcmp": "application/vnd.dcmp+xml", "dcr": "application/x-director", "dcurl": "text/vnd.curl.dcurl", "dd2": "application/vnd.oma.dd2+xml", "ddd": "application/vnd.fujixerox.ddd", "ddf": "application/vnd.syncml.dmddf+xml", "dds": "image/vnd.ms-dds", "deb": "application/x-debian-package", "def": "text/plain", "deploy": "application/octet-stream", "der": "application/x-x509-ca-cert", "dfac": "application/vnd.dreamfactory", "dgc": "application/x-dgc-compressed", "dib": "image/bmp", "dic": "text/x-c", "dir": "application/x-director", "dis": "application/vnd.mobius.dis", "disposition-notification": "message/disposition-notification", "dist": "application/octet-stream", "distz": "application/octet-stream", "djv": "image/vnd.djvu", "djvu": "image/vnd.djvu", "dll": "application/x-msdownload", "dmg": "application/x-apple-diskimage", "dmp": "application/vnd.tcpdump.pcap", "dms": "application/octet-stream", "dna": "application/vnd.dna", "dng": "image/x-adobe-dng", "doc": "application/msword", "docm": "application/vnd.ms-word.document.macroenabled.12", "docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "dot": "application/msword", "dotm": "application/vnd.ms-word.template.macroenabled.12", "dotx": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "dp": "application/vnd.osgi.dp", "dpg": "application/vnd.dpgraph", "dpx": "image/dpx", "dra": "audio/vnd.dra", "drle": "image/dicom-rle", "drm": "application/vnd.procreate.dream", "dsc": "text/prs.lines.tag", "dssc": "application/dssc+der", "dtb": "application/x-dtbook+xml", "dtd": "application/xml-dtd", "dts": "audio/vnd.dts", "dtshd": "audio/vnd.dts.hd", "dump": "application/octet-stream", "dvb": "video/vnd.dvb.file", "dvi": "application/x-dvi", "dwd": "application/atsc-dwd+xml", "dwf": "model/vnd.dwf", "dwg": "image/vnd.dwg", "dxf": "image/vnd.dxf", "dxp": "application/vnd.spotfire.dxp", "dxr": "application/x-director", "ear": "application/java-archive", "ecelp4800": "audio/vnd.nuera.ecelp4800", "ecelp7470": "audio/vnd.nuera.ecelp7470", "ecelp9600": "audio/vnd.nuera.ecelp9600", "ecma": "application/ecmascript", "edm": "application/vnd.novadigm.edm", "edx": "application/vnd.novadigm.edx", "efif": "application/vnd.picsel", "ei6": "application/vnd.pg.osasli", "elc": "application/octet-stream", "emf": "image/emf", "eml": "message/rfc822", "emma": "application/emma+xml", "emotionml": "application/emotionml+xml", "emz": "application/x-msmetafile", "eol": "audio/vnd.digital-winds", "eot": "application/vnd.ms-fontobject", "eps": "application/postscript", "epub": "application/epub+zip", "es3": "application/vnd.eszigno3+xml", "esa": "application/vnd.osgi.subsystem", "esf": "application/vnd.epson.esf", "et3": "application/vnd.eszigno3+xml", "etx": "text/x-setext", "eva": "application/x-eva", "evy": "application/x-envoy", "exe": "application/x-msdownload", "exi": "application/exi", "exp": "application/express", "exr": "image/aces", "ext": "application/vnd.novadigm.ext", "ez": "application/andrew-inset", "ez2": "application/vnd.ezpix-album", "ez3": "application/vnd.ezpix-package", "f": "text/x-fortran", "f4v": "video/x-f4v", "f77": "text/x-fortran", "f90": "text/x-fortran", "fbs": "image/vnd.fastbidsheet", "fbx": "application/vnd.autodesk.fbx", "fcdt": "application/vnd.adobe.formscentral.fcdt", "fcs": "application/vnd.isac.fcs", "fdf": "application/vnd.fdf", "fdt": "application/fdt+xml", "fe_launch": "application/vnd.denovo.fcselayout-link", "fg5": "application/vnd.fujitsu.oasysgp", "fgd": "application/x-director", "fh": "image/x-freehand", "fh4": "image/x-freehand", "fh5": "image/x-freehand", "fh7": "image/x-freehand", "fhc": "image/x-freehand", "fig": "application/x-xfig", "fits": "image/fits", "flac": "audio/x-flac", "fli": "video/x-fli", "flo": "application/vnd.micrografx.flo", "flv": "video/x-flv", "flw": "application/vnd.kde.kivio", "flx": "text/vnd.fmi.flexstor", "fly": "text/vnd.fly", "fm": "application/vnd.framemaker", "fnc": "application/vnd.frogans.fnc", "fo": "application/vnd.software602.filler.form+xml", "for": "text/x-fortran", "fpx": "image/vnd.fpx", "frame": "application/vnd.framemaker", "fsc": "application/vnd.fsc.weblaunch", "fst": "image/vnd.fst", "ftc": "application/vnd.fluxtime.clip", "fti": "application/vnd.anser-web-funds-transfer-initiation", "fvt": "video/vnd.fvt", "fxp": "application/vnd.adobe.fxp", "fxpl": "application/vnd.adobe.fxp", "fzs": "application/vnd.fuzzysheet", "g2w": "application/vnd.geoplan", "g3": "image/g3fax", "g3w": "application/vnd.geospace", "gac": "application/vnd.groove-account", "gam": "application/x-tads", "gbr": "application/rpki-ghostbusters", "gca": "application/x-gca-compressed", "gdl": "model/vnd.gdl", "gdoc": "application/vnd.google-apps.document", "gdraw": "application/vnd.google-apps.drawing", "ged": "text/vnd.familysearch.gedcom", "geo": "application/vnd.dynageo", "geojson": "application/geo+json", "gex": "application/vnd.geometry-explorer", "gform": "application/vnd.google-apps.form", "ggb": "application/vnd.geogebra.file", "ggs": "application/vnd.geogebra.slides", "ggt": "application/vnd.geogebra.tool", "ghf": "application/vnd.groove-help", "gif": "image/gif", "gim": "application/vnd.groove-identity-message", "gjam": "application/vnd.google-apps.jam", "glb": "model/gltf-binary", "gltf": "model/gltf+json", "gmap": "application/vnd.google-apps.map", "gml": "application/gml+xml", "gmx": "application/vnd.gmx", "gnumeric": "application/x-gnumeric", "gph": "application/vnd.flographit", "gpx": "application/gpx+xml", "gqf": "application/vnd.grafeq", "gqs": "application/vnd.grafeq", "gram": "application/srgs", "gramps": "application/x-gramps-xml", "gre": "application/vnd.geometry-explorer", "grv": "application/vnd.groove-injector", "grxml": "application/srgs+xml", "gscript": "application/vnd.google-apps.script", "gsf": "application/x-font-ghostscript", "gsheet": "application/vnd.google-apps.spreadsheet", "gsite": "application/vnd.google-apps.site", "gslides": "application/vnd.google-apps.presentation", "gtar": "application/x-gtar", "gtm": "application/vnd.groove-tool-message", "gtw": "model/vnd.gtw", "gv": "text/vnd.graphviz", "gxf": "application/gxf", "gxt": "application/vnd.geonext", "gz": "application/gzip", "h": "text/x-c", "h261": "video/h261", "h263": "video/h263", "h264": "video/h264", "hal": "application/vnd.hal+xml", "hbci": "application/vnd.hbci", "hbs": "text/x-handlebars-template", "hdd": "application/x-virtualbox-hdd", "hdf": "application/x-hdf", "heic": "image/heic", "heics": "image/heic-sequence", "heif": "image/heif", "heifs": "image/heif-sequence", "hej2": "image/hej2k", "held": "application/atsc-held+xml", "hh": "text/x-c", "hjson": "application/hjson", "hlp": "application/winhlp", "hpgl": "application/vnd.hp-hpgl", "hpid": "application/vnd.hp-hpid", "hps": "application/vnd.hp-hps", "hqx": "application/mac-binhex40", "htc": "text/x-component", "htke": "application/vnd.kenameaapp", "htm": "text/html", "html": "text/html", "hvd": "application/vnd.yamaha.hv-dic", "hvp": "application/vnd.yamaha.hv-voice", "hvs": "application/vnd.yamaha.hv-script", "i2g": "application/vnd.intergeo", "icc": "application/vnd.iccprofile", "ice": "x-conference/x-cooltalk", "icm": "application/vnd.iccprofile", "ico": "image/x-icon", "ics": "text/calendar", "ief": "image/ief", "ifb": "text/calendar", "ifm": "application/vnd.shana.informed.formdata", "iges": "model/iges", "igl": "application/vnd.igloader", "igm": "application/vnd.insors.igm", "igs": "model/iges", "igx": "application/vnd.micrografx.igx", "iif": "application/vnd.shana.informed.interchange", "img": "application/octet-stream", "imp": "application/vnd.accpac.simply.imp", "ims": "application/vnd.ms-ims", "in": "text/plain", "ini": "text/plain", "ink": "application/inkml+xml", "inkml": "application/inkml+xml", "install": "application/x-install-instructions", "iota": "application/vnd.astraea-software.iota", "ipfix": "application/ipfix", "ipk": "application/vnd.shana.informed.package", "ipynb": "application/x-ipynb+json", "irm": "application/vnd.ibm.rights-management", "irp": "application/vnd.irepository.package+xml", "iso": "application/x-iso9660-image", "itp": "application/vnd.shana.informed.formtemplate", "its": "application/its+xml", "ivp": "application/vnd.immervision-ivp", "ivu": "application/vnd.immervision-ivu", "jad": "text/vnd.sun.j2me.app-descriptor", "jade": "text/jade", "jaii": "image/jaii", "jais": "image/jais", "jam": "application/vnd.jam", "jar": "application/java-archive", "jardiff": "application/x-java-archive-diff", "java": "text/x-java-source", "jfif": "image/pjpeg", "jhc": "image/jphc", "jisp": "application/vnd.jisp", "jls": "image/jls", "jlt": "application/vnd.hp-jlyt", "jng": "image/x-jng", "jnlp": "application/x-java-jnlp-file", "joda": "application/vnd.joost.joda-archive", "jp2": "image/jp2", "jpe": "image/jpeg", "jpeg": "image/jpeg", "jpf": "image/jpx", "jpg": "image/jpeg", "jpg2": "image/jp2", "jpgm": "video/jpm", "jpgv": "video/jpeg", "jph": "image/jph", "jpm": "video/jpm", "jpx": "image/jpx", "js": "text/javascript", "json": "application/json", "json5": "application/json5", "jsonld": "application/ld+json", "jsonml": "application/jsonml+json", "jsx": "text/jsx", "jt": "model/jt", "jxl": "image/jxl", "jxr": "image/jxr", "jxra": "image/jxra", "jxrs": "image/jxrs", "jxs": "image/jxs", "jxsc": "image/jxsc", "jxsi": "image/jxsi", "jxss": "image/jxss", "kar": "audio/midi", "karbon": "application/vnd.kde.karbon", "kdbx": "application/x-keepass2", "key": "application/x-iwork-keynote-sffkey", "kfo": "application/vnd.kde.kformula", "kia": "application/vnd.kidspiration", "kml": "application/vnd.google-earth.kml+xml", "kmz": "application/vnd.google-earth.kmz", "kne": "application/vnd.kinar", "knp": "application/vnd.kinar", "kon": "application/vnd.kde.kontour", "kpr": "application/vnd.kde.kpresenter", "kpt": "application/vnd.kde.kpresenter", "kpxx": "application/vnd.ds-keypoint", "ksp": "application/vnd.kde.kspread", "ktr": "application/vnd.kahootz", "ktx": "image/ktx", "ktx2": "image/ktx2", "ktz": "application/vnd.kahootz", "kwd": "application/vnd.kde.kword", "kwt": "application/vnd.kde.kword", "lasxml": "application/vnd.las.las+xml", "latex": "application/x-latex", "lbd": "application/vnd.llamagraphics.life-balance.desktop", "lbe": "application/vnd.llamagraphics.life-balance.exchange+xml", "les": "application/vnd.hhe.lesson-player", "less": "text/less", "lgr": "application/lgr+xml", "lha": "application/x-lzh-compressed", "link66": "application/vnd.route66.link66+xml", "list": "text/plain", "list3820": "application/vnd.ibm.modcap", "listafp": "application/vnd.ibm.modcap", "litcoffee": "text/coffeescript", "lnk": "application/x-ms-shortcut", "log": "text/plain", "lostxml": "application/lost+xml", "lottie": "application/zip+dotlottie", "lrf": "application/octet-stream", "lrm": "application/vnd.ms-lrm", "ltf": "application/vnd.frogans.ltf", "lua": "text/x-lua", "luac": "application/x-lua-bytecode", "lvp": "audio/vnd.lucent.voice", "lwp": "application/vnd.lotus-wordpro", "lzh": "application/x-lzh-compressed", "m13": "application/x-msmediaview", "m14": "application/x-msmediaview", "m1v": "video/mpeg", "m21": "application/mp21", "m2a": "audio/mpeg", "m2t": "video/mp2t", "m2ts": "video/mp2t", "m2v": "video/mpeg", "m3a": "audio/mpeg", "m3u": "audio/x-mpegurl", "m3u8": "application/vnd.apple.mpegurl", "m4a": "audio/x-m4a", "m4b": "audio/mp4", "m4p": "application/mp4", "m4s": "video/iso.segment", "m4u": "video/vnd.mpegurl", "m4v": "video/x-m4v", "ma": "application/mathematica", "mads": "application/mads+xml", "maei": "application/mmt-aei+xml", "mag": "application/vnd.ecowin.chart", "maker": "application/vnd.framemaker", "man": "text/troff", "manifest": "text/cache-manifest", "map": "application/json", "mar": "application/octet-stream", "markdown": "text/markdown", "mathml": "application/mathml+xml", "mb": "application/mathematica", "mbk": "application/vnd.mobius.mbk", "mbox": "application/mbox", "mc1": "application/vnd.medcalcdata", "mcd": "application/vnd.mcd", "mcurl": "text/vnd.curl.mcurl", "md": "text/markdown", "mdb": "application/x-msaccess", "mdi": "image/vnd.ms-modi", "mdx": "text/mdx", "me": "text/troff", "mesh": "model/mesh", "meta4": "application/metalink4+xml", "metalink": "application/metalink+xml", "mets": "application/mets+xml", "mfm": "application/vnd.mfmp", "mft": "application/rpki-manifest", "mgp": "application/vnd.osgeo.mapguide.package", "mgz": "application/vnd.proteus.magazine", "mht": "message/rfc822", "mhtml": "message/rfc822", "mid": "audio/midi", "midi": "audio/midi", "mie": "application/x-mie", "mif": "application/vnd.mif", "mime": "message/rfc822", "mj2": "video/mj2", "mjp2": "video/mj2", "mjs": "text/javascript", "mk3d": "video/x-matroska", "mka": "audio/x-matroska", "mkd": "text/x-markdown", "mks": "video/x-matroska", "mkv": "video/x-matroska", "mlp": "application/vnd.dolby.mlp", "mmd": "application/vnd.chipnuts.karaoke-mmd", "mmf": "application/vnd.smaf", "mml": "text/mathml", "mmr": "image/vnd.fujixerox.edmics-mmr", "mng": "video/x-mng", "mny": "application/x-msmoney", "mobi": "application/x-mobipocket-ebook", "mods": "application/mods+xml", "mov": "video/quicktime", "movie": "video/x-sgi-movie", "mp2": "audio/mpeg", "mp21": "application/mp21", "mp2a": "audio/mpeg", "mp3": "audio/mpeg", "mp4": "video/mp4", "mp4a": "audio/mp4", "mp4s": "application/mp4", "mp4v": "video/mp4", "mpc": "application/vnd.mophun.certificate", "mpd": "application/dash+xml", "mpe": "video/mpeg", "mpeg": "video/mpeg", "mpf": "application/media-policy-dataset+xml", "mpg": "video/mpeg", "mpg4": "video/mp4", "mpga": "audio/mpeg", "mpkg": "application/vnd.apple.installer+xml", "mpm": "application/vnd.blueice.multipass", "mpn": "application/vnd.mophun.application", "mpp": "application/vnd.ms-project", "mpt": "application/vnd.ms-project", "mpy": "application/vnd.ibm.minipay", "mqy": "application/vnd.mobius.mqy", "mrc": "application/marc", "mrcx": "application/marcxml+xml", "ms": "text/troff", "mscml": "application/mediaservercontrol+xml", "mseed": "application/vnd.fdsn.mseed", "mseq": "application/vnd.mseq", "msf": "application/vnd.epson.msf", "msg": "application/vnd.ms-outlook", "msh": "model/mesh", "msi": "application/x-msdownload", "msix": "application/msix", "msixbundle": "application/msixbundle", "msl": "application/vnd.mobius.msl", "msm": "application/octet-stream", "msp": "application/octet-stream", "msty": "application/vnd.muvee.style", "mtl": "model/mtl", "mts": "video/mp2t", "mus": "application/vnd.musician", "musd": "application/mmt-usd+xml", "musicxml": "application/vnd.recordare.musicxml+xml", "mvb": "application/x-msmediaview", "mvt": "application/vnd.mapbox-vector-tile", "mwf": "application/vnd.mfer", "mxf": "application/mxf", "mxl": "application/vnd.recordare.musicxml", "mxmf": "audio/mobile-xmf", "mxml": "application/xv+xml", "mxs": "application/vnd.triscape.mxs", "mxu": "video/vnd.mpegurl", "n-gage": "application/vnd.nokia.n-gage.symbian.install", "n3": "text/n3", "nb": "application/mathematica", "nbp": "application/vnd.wolfram.player", "nc": "application/x-netcdf", "ncx": "application/x-dtbncx+xml", "nfo": "text/x-nfo", "ngdat": "application/vnd.nokia.n-gage.data", "nitf": "application/vnd.nitf", "nlu": "application/vnd.neurolanguage.nlu", "nml": "application/vnd.enliven", "nnd": "application/vnd.noblenet-directory", "nns": "application/vnd.noblenet-sealer", "nnw": "application/vnd.noblenet-web", "npx": "image/vnd.net-fpx", "nq": "application/n-quads", "nsc": "application/x-conference", "nsf": "application/vnd.lotus-notes", "nt": "application/n-triples", "ntf": "application/vnd.nitf", "numbers": "application/x-iwork-numbers-sffnumbers", "nzb": "application/x-nzb", "oa2": "application/vnd.fujitsu.oasys2", "oa3": "application/vnd.fujitsu.oasys3", "oas": "application/vnd.fujitsu.oasys", "obd": "application/x-msbinder", "obgx": "application/vnd.openblox.game+xml", "obj": "model/obj", "oda": "application/oda", "odb": "application/vnd.oasis.opendocument.database", "odc": "application/vnd.oasis.opendocument.chart", "odf": "application/vnd.oasis.opendocument.formula", "odft": "application/vnd.oasis.opendocument.formula-template", "odg": "application/vnd.oasis.opendocument.graphics", "odi": "application/vnd.oasis.opendocument.image", "odm": "application/vnd.oasis.opendocument.text-master", "odp": "application/vnd.oasis.opendocument.presentation", "ods": "application/vnd.oasis.opendocument.spreadsheet", "odt": "application/vnd.oasis.opendocument.text", "oga": "audio/ogg", "ogex": "model/vnd.opengex", "ogg": "audio/ogg", "ogv": "video/ogg", "ogx": "application/ogg", "omdoc": "application/omdoc+xml", "one": "application/onenote", "onea": "application/onenote", "onepkg": "application/onenote", "onetmp": "application/onenote", "onetoc": "application/onenote", "onetoc2": "application/onenote", "opf": "application/oebps-package+xml", "opml": "text/x-opml", "oprc": "application/vnd.palm", "opus": "audio/ogg", "org": "text/x-org", "osf": "application/vnd.yamaha.openscoreformat", "osfpvg": "application/vnd.yamaha.openscoreformat.osfpvg+xml", "osm": "application/vnd.openstreetmap.data+xml", "otc": "application/vnd.oasis.opendocument.chart-template", "otf": "font/otf", "otg": "application/vnd.oasis.opendocument.graphics-template", "oth": "application/vnd.oasis.opendocument.text-web", "oti": "application/vnd.oasis.opendocument.image-template", "otp": "application/vnd.oasis.opendocument.presentation-template", "ots": "application/vnd.oasis.opendocument.spreadsheet-template", "ott": "application/vnd.oasis.opendocument.text-template", "ova": "application/x-virtualbox-ova", "ovf": "application/x-virtualbox-ovf", "owl": "application/rdf+xml", "oxps": "application/oxps", "oxt": "application/vnd.openofficeorg.extension", "p": "text/x-pascal", "p10": "application/pkcs10", "p12": "application/x-pkcs12", "p21": "model/step", "p7b": "application/x-pkcs7-certificates", "p7c": "application/pkcs7-mime", "p7m": "application/pkcs7-mime", "p7r": "application/x-pkcs7-certreqresp", "p7s": "application/pkcs7-signature", "p8": "application/pkcs8", "pac": "application/x-ns-proxy-autoconfig", "pages": "application/x-iwork-pages-sffpages", "pas": "text/x-pascal", "paw": "application/vnd.pawaafile", "pbd": "application/vnd.powerbuilder6", "pbm": "image/x-portable-bitmap", "pcap": "application/vnd.tcpdump.pcap", "pcf": "application/x-font-pcf", "pcl": "application/vnd.hp-pcl", "pclxl": "application/vnd.hp-pclxl", "pct": "image/x-pict", "pcurl": "application/vnd.curl.pcurl", "pcx": "image/x-pcx", "pdb": "application/x-pilot", "pde": "text/x-processing", "pdf": "application/pdf", "pem": "application/x-x509-ca-cert", "pfa": "application/x-font-type1", "pfb": "application/x-font-type1", "pfm": "application/x-font-type1", "pfr": "application/font-tdpfr", "pfx": "application/x-pkcs12", "pgm": "image/x-portable-graymap", "pgn": "application/x-chess-pgn", "pgp": "application/pgp-encrypted", "php": "application/x-httpd-php", "pic": "image/x-pict", "pkg": "application/octet-stream", "pki": "application/pkixcmp", "pkipath": "application/pkix-pkipath", "pkpass": "application/vnd.apple.pkpass", "pl": "application/x-perl", "plb": "application/vnd.3gpp.pic-bw-large", "plc": "application/vnd.mobius.plc", "plf": "application/vnd.pocketlearn", "pls": "application/pls+xml", "pm": "application/x-perl", "pml": "application/vnd.ctc-posml", "png": "image/png", "pnm": "image/x-portable-anymap", "portpkg": "application/vnd.macports.portpkg", "pot": "application/vnd.ms-powerpoint", "potm": "application/vnd.ms-powerpoint.template.macroenabled.12", "potx": "application/vnd.openxmlformats-officedocument.presentationml.template", "ppam": "application/vnd.ms-powerpoint.addin.macroenabled.12", "ppd": "application/vnd.cups-ppd", "ppm": "image/x-portable-pixmap", "pps": "application/vnd.ms-powerpoint", "ppsm": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "ppsx": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "ppt": "application/vnd.ms-powerpoint", "pptm": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "pqa": "application/vnd.palm", "prc": "model/prc", "pre": "application/vnd.lotus-freelance", "prf": "application/pics-rules", "provx": "application/provenance+xml", "ps": "application/postscript", "psb": "application/vnd.3gpp.pic-bw-small", "psd": "image/vnd.adobe.photoshop", "psf": "application/x-font-linux-psf", "pskcxml": "application/pskc+xml", "pti": "image/prs.pti", "ptid": "application/vnd.pvi.ptid1", "pub": "application/x-mspublisher", "pvb": "application/vnd.3gpp.pic-bw-var", "pwn": "application/vnd.3m.post-it-notes", "pya": "audio/vnd.ms-playready.media.pya", "pyo": "model/vnd.pytha.pyox", "pyox": "model/vnd.pytha.pyox", "pyv": "video/vnd.ms-playready.media.pyv", "qam": "application/vnd.epson.quickanime", "qbo": "application/vnd.intu.qbo", "qfx": "application/vnd.intu.qfx", "qps": "application/vnd.publishare-delta-tree", "qt": "video/quicktime", "qwd": "application/vnd.quark.quarkxpress", "qwt": "application/vnd.quark.quarkxpress", "qxb": "application/vnd.quark.quarkxpress", "qxd": "application/vnd.quark.quarkxpress", "qxl": "application/vnd.quark.quarkxpress", "qxt": "application/vnd.quark.quarkxpress", "ra": "audio/x-realaudio", "ram": "audio/x-pn-realaudio", "raml": "application/raml+yaml", "rapd": "application/route-apd+xml", "rar": "application/x-rar-compressed", "ras": "image/x-cmu-raster", "rcprofile": "application/vnd.ipunplugged.rcprofile", "rdf": "application/rdf+xml", "rdz": "application/vnd.data-vision.rdz", "relo": "application/p2p-overlay+xml", "rep": "application/vnd.businessobjects", "res": "application/x-dtbresource+xml", "rgb": "image/x-rgb", "rif": "application/reginfo+xml", "rip": "audio/vnd.rip", "ris": "application/x-research-info-systems", "rl": "application/resource-lists+xml", "rlc": "image/vnd.fujixerox.edmics-rlc", "rld": "application/resource-lists-diff+xml", "rm": "application/vnd.rn-realmedia", "rmi": "audio/midi", "rmp": "audio/x-pn-realaudio-plugin", "rms": "application/vnd.jcp.javame.midlet-rms", "rmvb": "application/vnd.rn-realmedia-vbr", "rnc": "application/relax-ng-compact-syntax", "rng": "application/xml", "roa": "application/rpki-roa", "roff": "text/troff", "rp9": "application/vnd.cloanto.rp9", "rpm": "application/x-redhat-package-manager", "rpss": "application/vnd.nokia.radio-presets", "rpst": "application/vnd.nokia.radio-preset", "rq": "application/sparql-query", "rs": "application/rls-services+xml", "rsat": "application/atsc-rsat+xml", "rsd": "application/rsd+xml", "rsheet": "application/urc-ressheet+xml", "rss": "application/rss+xml", "rtf": "text/rtf", "rtx": "text/richtext", "run": "application/x-makeself", "rusd": "application/route-usd+xml", "s": "text/x-asm", "s3m": "audio/s3m", "saf": "application/vnd.yamaha.smaf-audio", "sass": "text/x-sass", "sbml": "application/sbml+xml", "sc": "application/vnd.ibm.secure-container", "scd": "application/x-msschedule", "scm": "application/vnd.lotus-screencam", "scq": "application/scvp-cv-request", "scs": "application/scvp-cv-response", "scss": "text/x-scss", "scurl": "text/vnd.curl.scurl", "sda": "application/vnd.stardivision.draw", "sdc": "application/vnd.stardivision.calc", "sdd": "application/vnd.stardivision.impress", "sdkd": "application/vnd.solent.sdkm+xml", "sdkm": "application/vnd.solent.sdkm+xml", "sdp": "application/sdp", "sdw": "application/vnd.stardivision.writer", "sea": "application/x-sea", "see": "application/vnd.seemail", "seed": "application/vnd.fdsn.seed", "sema": "application/vnd.sema", "semd": "application/vnd.semd", "semf": "application/vnd.semf", "senmlx": "application/senml+xml", "sensmlx": "application/sensml+xml", "ser": "application/java-serialized-object", "setpay": "application/set-payment-initiation", "setreg": "application/set-registration-initiation", "sfd-hdstx": "application/vnd.hydrostatix.sof-data", "sfs": "application/vnd.spotfire.sfs", "sfv": "text/x-sfv", "sgi": "image/sgi", "sgl": "application/vnd.stardivision.writer-global", "sgm": "text/sgml", "sgml": "text/sgml", "sh": "application/x-sh", "shar": "application/x-shar", "shex": "text/shex", "shf": "application/shf+xml", "shtml": "text/html", "sid": "image/x-mrsid-image", "sieve": "application/sieve", "sig": "application/pgp-signature", "sil": "audio/silk", "silo": "model/mesh", "sis": "application/vnd.symbian.install", "sisx": "application/vnd.symbian.install", "sit": "application/x-stuffit", "sitx": "application/x-stuffitx", "siv": "application/sieve", "skd": "application/vnd.koan", "skm": "application/vnd.koan", "skp": "application/vnd.koan", "skt": "application/vnd.koan", "sldm": "application/vnd.ms-powerpoint.slide.macroenabled.12", "sldx": "application/vnd.openxmlformats-officedocument.presentationml.slide", "slim": "text/slim", "slm": "text/slim", "sls": "application/route-s-tsid+xml", "slt": "application/vnd.epson.salt", "sm": "application/vnd.stepmania.stepchart", "smf": "application/vnd.stardivision.math", "smi": "application/smil+xml", "smil": "application/smil+xml", "smv": "video/x-smv", "smzip": "application/vnd.stepmania.package", "snd": "audio/basic", "snf": "application/x-font-snf", "so": "application/octet-stream", "spc": "application/x-pkcs7-certificates", "spdx": "text/spdx", "spf": "application/vnd.yamaha.smaf-phrase", "spl": "application/x-futuresplash", "spot": "text/vnd.in3d.spot", "spp": "application/scvp-vp-response", "spq": "application/scvp-vp-request", "spx": "audio/ogg", "sql": "application/x-sql", "src": "application/x-wais-source", "srt": "application/x-subrip", "sru": "application/sru+xml", "srx": "application/sparql-results+xml", "ssdl": "application/ssdl+xml", "sse": "application/vnd.kodak-descriptor", "ssf": "application/vnd.epson.ssf", "ssml": "application/ssml+xml", "st": "application/vnd.sailingtracker.track", "stc": "application/vnd.sun.xml.calc.template", "std": "application/vnd.sun.xml.draw.template", "step": "model/step", "stf": "application/vnd.wt.stf", "sti": "application/vnd.sun.xml.impress.template", "stk": "application/hyperstudio", "stl": "model/stl", "stp": "model/step", "stpnc": "model/step", "stpx": "model/step+xml", "stpxz": "model/step-xml+zip", "stpz": "model/step+zip", "str": "application/vnd.pg.format", "stw": "application/vnd.sun.xml.writer.template", "styl": "text/stylus", "stylus": "text/stylus", "sub": "text/vnd.dvb.subtitle", "sus": "application/vnd.sus-calendar", "susp": "application/vnd.sus-calendar", "sv4cpio": "application/x-sv4cpio", "sv4crc": "application/x-sv4crc", "svc": "application/vnd.dvb.service", "svd": "application/vnd.svd", "svg": "image/svg+xml", "svgz": "image/svg+xml", "swa": "application/x-director", "swf": "application/x-shockwave-flash", "swi": "application/vnd.aristanetworks.swi", "swidtag": "application/swid+xml", "sxc": "application/vnd.sun.xml.calc", "sxd": "application/vnd.sun.xml.draw", "sxg": "application/vnd.sun.xml.writer.global", "sxi": "application/vnd.sun.xml.impress", "sxm": "application/vnd.sun.xml.math", "sxw": "application/vnd.sun.xml.writer", "t": "text/troff", "t3": "application/x-t3vm-image", "t38": "image/t38", "taglet": "application/vnd.mynfc", "tao": "application/vnd.tao.intent-module-archive", "tap": "image/vnd.tencent.tap", "tar": "application/x-tar", "tcap": "application/vnd.3gpp2.tcap", "tcl": "application/x-tcl", "td": "application/urc-targetdesc+xml", "teacher": "application/vnd.smart.teacher", "tei": "application/tei+xml", "teicorpus": "application/tei+xml", "tex": "application/x-tex", "texi": "application/x-texinfo", "texinfo": "application/x-texinfo", "text": "text/plain", "tfi": "application/thraud+xml", "tfm": "application/x-tex-tfm", "tfx": "image/tiff-fx", "tga": "image/x-tga", "thmx": "application/vnd.ms-officetheme", "tif": "image/tiff", "tiff": "image/tiff", "tk": "application/x-tcl", "tmo": "application/vnd.tmobile-livetv", "toml": "application/toml", "torrent": "application/x-bittorrent", "tpl": "application/vnd.groove-tool-template", "tpt": "application/vnd.trid.tpt", "tr": "text/troff", "tra": "application/vnd.trueapp", "trig": "application/trig", "trm": "application/x-msterminal", "ts": "video/mp2t", "tsd": "application/timestamped-data", "tsv": "text/tab-separated-values", "ttc": "font/collection", "ttf": "font/ttf", "ttl": "text/turtle", "ttml": "application/ttml+xml", "twd": "application/vnd.simtech-mindmapper", "twds": "application/vnd.simtech-mindmapper", "txd": "application/vnd.genomatix.tuxedo", "txf": "application/vnd.mobius.txf", "txt": "text/plain", "u32": "application/x-authorware-bin", "u3d": "model/u3d", "u8dsn": "message/global-delivery-status", "u8hdr": "message/global-headers", "u8mdn": "message/global-disposition-notification", "u8msg": "message/global", "ubj": "application/ubjson", "udeb": "application/x-debian-package", "ufd": "application/vnd.ufdl", "ufdl": "application/vnd.ufdl", "ulx": "application/x-glulx", "umj": "application/vnd.umajin", "unityweb": "application/vnd.unity", "uo": "application/vnd.uoml+xml", "uoml": "application/vnd.uoml+xml", "uri": "text/uri-list", "uris": "text/uri-list", "urls": "text/uri-list", "usda": "model/vnd.usda", "usdz": "model/vnd.usdz+zip", "ustar": "application/x-ustar", "utz": "application/vnd.uiq.theme", "uu": "text/x-uuencode", "uva": "audio/vnd.dece.audio", "uvd": "application/vnd.dece.data", "uvf": "application/vnd.dece.data", "uvg": "image/vnd.dece.graphic", "uvh": "video/vnd.dece.hd", "uvi": "image/vnd.dece.graphic", "uvm": "video/vnd.dece.mobile", "uvp": "video/vnd.dece.pd", "uvs": "video/vnd.dece.sd", "uvt": "application/vnd.dece.ttml+xml", "uvu": "video/vnd.uvvu.mp4", "uvv": "video/vnd.dece.video", "uvva": "audio/vnd.dece.audio", "uvvd": "application/vnd.dece.data", "uvvf": "application/vnd.dece.data", "uvvg": "image/vnd.dece.graphic", "uvvh": "video/vnd.dece.hd", "uvvi": "image/vnd.dece.graphic", "uvvm": "video/vnd.dece.mobile", "uvvp": "video/vnd.dece.pd", "uvvs": "video/vnd.dece.sd", "uvvt": "application/vnd.dece.ttml+xml", "uvvu": "video/vnd.uvvu.mp4", "uvvv": "video/vnd.dece.video", "uvvx": "application/vnd.dece.unspecified", "uvvz": "application/vnd.dece.zip", "uvx": "application/vnd.dece.unspecified", "uvz": "application/vnd.dece.zip", "vbox": "application/x-virtualbox-vbox", "vbox-extpack": "application/x-virtualbox-vbox-extpack", "vcard": "text/vcard", "vcd": "application/x-cdlink", "vcf": "text/x-vcard", "vcg": "application/vnd.groove-vcard", "vcs": "text/x-vcalendar", "vcx": "application/vnd.vcx", "vdi": "application/x-virtualbox-vdi", "vds": "model/vnd.sap.vds", "vdx": "application/vnd.ms-visio.viewer", "vhd": "application/x-virtualbox-vhd", "vis": "application/vnd.visionary", "viv": "video/vnd.vivo", "vmdk": "application/x-virtualbox-vmdk", "vob": "video/x-ms-vob", "vor": "application/vnd.stardivision.writer", "vox": "application/x-authorware-bin", "vrml": "model/vrml", "vsd": "application/vnd.visio", "vsdx": "application/vnd.visio", "vsf": "application/vnd.vsf", "vss": "application/vnd.visio", "vst": "application/vnd.visio", "vsw": "application/vnd.visio", "vtf": "image/vnd.valve.source.texture", "vtt": "text/vtt", "vtu": "model/vnd.vtu", "vtx": "application/vnd.visio", "vxml": "application/voicexml+xml", "w3d": "application/x-director", "wad": "application/x-doom", "wadl": "application/vnd.sun.wadl+xml", "war": "application/java-archive", "wasm": "application/wasm", "wav": "audio/x-wav", "wax": "audio/x-ms-wax", "wbmp": "image/vnd.wap.wbmp", "wbs": "application/vnd.criticaltools.wbs+xml", "wbxml": "application/vnd.wap.wbxml", "wcm": "application/vnd.ms-works", "wdb": "application/vnd.ms-works", "wdp": "image/vnd.ms-photo", "weba": "audio/webm", "webapp": "application/x-web-app-manifest+json", "webm": "video/webm", "webmanifest": "application/manifest+json", "webp": "image/webp", "wg": "application/vnd.pmi.widget", "wgsl": "text/wgsl", "wgt": "application/widget", "wif": "application/watcherinfo+xml", "wks": "application/vnd.ms-works", "wm": "video/x-ms-wm", "wma": "audio/x-ms-wma", "wmd": "application/x-ms-wmd", "wmf": "image/wmf", "wml": "text/vnd.wap.wml", "wmlc": "application/vnd.wap.wmlc", "wmls": "text/vnd.wap.wmlscript", "wmlsc": "application/vnd.wap.wmlscriptc", "wmv": "video/x-ms-wmv", "wmx": "video/x-ms-wmx", "wmz": "application/x-msmetafile", "woff": "font/woff", "woff2": "font/woff2", "wpd": "application/vnd.wordperfect", "wpl": "application/vnd.ms-wpl", "wps": "application/vnd.ms-works", "wqd": "application/vnd.wqd", "wri": "application/x-mswrite", "wrl": "model/vrml", "wsc": "message/vnd.wfa.wsc", "wsdl": "application/wsdl+xml", "wspolicy": "application/wspolicy+xml", "wtb": "application/vnd.webturbo", "wvx": "video/x-ms-wvx", "x32": "application/x-authorware-bin", "x3d": "model/x3d+xml", "x3db": "model/x3d+fastinfoset", "x3dbz": "model/x3d+binary", "x3dv": "model/x3d-vrml", "x3dvz": "model/x3d+vrml", "x3dz": "model/x3d+xml", "x_b": "model/vnd.parasolid.transmit.binary", "x_t": "model/vnd.parasolid.transmit.text", "xaml": "application/xaml+xml", "xap": "application/x-silverlight-app", "xar": "application/vnd.xara", "xav": "application/xcap-att+xml", "xbap": "application/x-ms-xbap", "xbd": "application/vnd.fujixerox.docuworks.binder", "xbm": "image/x-xbitmap", "xca": "application/xcap-caps+xml", "xcs": "application/calendar+xml", "xdcf": "application/vnd.gov.sk.xmldatacontainer+xml", "xdf": "application/xcap-diff+xml", "xdm": "application/vnd.syncml.dm+xml", "xdp": "application/vnd.adobe.xdp+xml", "xdssc": "application/dssc+xml", "xdw": "application/vnd.fujixerox.docuworks", "xel": "application/xcap-el+xml", "xenc": "application/xenc+xml", "xer": "application/patch-ops-error+xml", "xfdf": "application/xfdf", "xfdl": "application/vnd.xfdl", "xht": "application/xhtml+xml", "xhtm": "application/vnd.pwg-xhtml-print+xml", "xhtml": "application/xhtml+xml", "xhvml": "application/xv+xml", "xif": "image/vnd.xiff", "xla": "application/vnd.ms-excel", "xlam": "application/vnd.ms-excel.addin.macroenabled.12", "xlc": "application/vnd.ms-excel", "xlf": "application/xliff+xml", "xlm": "application/vnd.ms-excel", "xls": "application/vnd.ms-excel", "xlsb": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "xlsm": "application/vnd.ms-excel.sheet.macroenabled.12", "xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlt": "application/vnd.ms-excel", "xltm": "application/vnd.ms-excel.template.macroenabled.12", "xltx": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "xlw": "application/vnd.ms-excel", "xm": "audio/xm", "xml": "text/xml", "xns": "application/xcap-ns+xml", "xo": "application/vnd.olpc-sugar", "xop": "application/xop+xml", "xpi": "application/x-xpinstall", "xpl": "application/xproc+xml", "xpm": "image/x-xpixmap", "xpr": "application/vnd.is-xpr", "xps": "application/vnd.ms-xpsdocument", "xpw": "application/vnd.intercon.formnet", "xpx": "application/vnd.intercon.formnet", "xsd": "application/xml", "xsf": "application/prs.xsf+xml", "xsl": "application/xslt+xml", "xslt": "application/xslt+xml", "xsm": "application/vnd.syncml+xml", "xspf": "application/xspf+xml", "xul": "application/vnd.mozilla.xul+xml", "xvm": "application/xv+xml", "xvml": "application/xv+xml", "xwd": "image/x-xwindowdump", "xyz": "chemical/x-xyz", "xz": "application/x-xz", "yaml": "text/yaml", "yang": "application/yang", "yin": "application/yin+xml", "yml": "text/yaml", "ymp": "text/x-suse-ymp", "z1": "application/x-zmachine", "z2": "application/x-zmachine", "z3": "application/x-zmachine", "z4": "application/x-zmachine", "z5": "application/x-zmachine", "z6": "application/x-zmachine", "z7": "application/x-zmachine", "z8": "application/x-zmachine", "zaz": "application/vnd.zzazz.deck+xml", "zip": "application/zip", "zir": "application/vnd.zul", "zirz": "application/vnd.zul", "zmm": "application/vnd.handheld-entertainment+xml" };
|
|
@@ -7846,13 +9421,13 @@ var DEFAULT_HEADERS = {
|
|
|
7846
9421
|
function getBrowserUrl(protocol, address, port, basePath, pathname) {
|
|
7847
9422
|
address = address === `0.0.0.0` ? `localhost` : address;
|
|
7848
9423
|
const portSuffix = !port || port === 80 || port === 443 ? "" : ":" + port;
|
|
7849
|
-
let
|
|
9424
|
+
let path12 = basePath;
|
|
7850
9425
|
if (pathname.startsWith("/")) {
|
|
7851
9426
|
pathname = pathname.substring(1);
|
|
7852
9427
|
}
|
|
7853
|
-
|
|
9428
|
+
path12 += pathname;
|
|
7854
9429
|
protocol = protocol.replace(/\:/g, "");
|
|
7855
|
-
return `${protocol}://${address}${portSuffix}${
|
|
9430
|
+
return `${protocol}://${address}${portSuffix}${path12}`;
|
|
7856
9431
|
}
|
|
7857
9432
|
function getDevServerClientUrl(devServerConfig, host, protocol) {
|
|
7858
9433
|
let address = devServerConfig.address;
|
|
@@ -7865,10 +9440,10 @@ function getDevServerClientUrl(devServerConfig, host, protocol) {
|
|
|
7865
9440
|
}
|
|
7866
9441
|
function getContentType(filePath2) {
|
|
7867
9442
|
const last = filePath2.replace(/^.*[/\\]/, "").toLowerCase();
|
|
7868
|
-
const
|
|
9443
|
+
const ext2 = last.replace(/^.*\./, "").toLowerCase();
|
|
7869
9444
|
const hasPath = last.length < filePath2.length;
|
|
7870
|
-
const hasDot =
|
|
7871
|
-
return (hasDot || !hasPath) && content_types_db_default[
|
|
9445
|
+
const hasDot = ext2.length < last.length - 1;
|
|
9446
|
+
return (hasDot || !hasPath) && content_types_db_default[ext2] || "application/octet-stream";
|
|
7872
9447
|
}
|
|
7873
9448
|
function isHtmlFile(filePath2) {
|
|
7874
9449
|
filePath2 = filePath2.toLowerCase().trim();
|
|
@@ -7880,8 +9455,8 @@ function isCssFile(filePath2) {
|
|
|
7880
9455
|
}
|
|
7881
9456
|
var TXT_EXT = ["css", "html", "htm", "js", "json", "svg", "xml"];
|
|
7882
9457
|
function isSimpleText(filePath2) {
|
|
7883
|
-
const
|
|
7884
|
-
return TXT_EXT.includes(
|
|
9458
|
+
const ext2 = filePath2.toLowerCase().trim().split(".").pop();
|
|
9459
|
+
return TXT_EXT.includes(ext2);
|
|
7885
9460
|
}
|
|
7886
9461
|
function isExtensionLessPath(pathname) {
|
|
7887
9462
|
const parts = pathname.split("/");
|
|
@@ -9195,11 +10770,11 @@ async function defaultBrowser(_execa = execa2) {
|
|
|
9195
10770
|
"/v",
|
|
9196
10771
|
"ProgId"
|
|
9197
10772
|
]);
|
|
9198
|
-
const
|
|
9199
|
-
if (!
|
|
10773
|
+
const match2 = new RegExp("ProgId\\s*REG_SZ\\s*(?<id>\\S+)").exec(result.stdout);
|
|
10774
|
+
if (!match2) {
|
|
9200
10775
|
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(result.stdout)}`);
|
|
9201
10776
|
}
|
|
9202
|
-
const { id } =
|
|
10777
|
+
const { id } = match2.groups;
|
|
9203
10778
|
const browser = windowsBrowserProgIds[id];
|
|
9204
10779
|
if (!browser) {
|
|
9205
10780
|
throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
|