@ticketlayer/elements 0.3.1 → 0.3.3
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/README.md +15 -15
- package/dist/cjs/{index-DfzcrE9-.js → index-BpfoKd9Q.js} +276 -1797
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ticketlayer-elements.cjs.js +2 -2
- package/dist/cjs/tl-buy-modal.cjs.entry.js +2 -2
- package/dist/cjs/tl-buy-tickets-button.cjs.entry.js +1 -1
- package/dist/cjs/tl-buy-tickets-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/tl-cart-badge.cjs.entry.js +1 -1
- package/dist/cjs/tl-cart-drawer.cjs.entry.js +1 -1
- package/dist/cjs/tl-cart.cjs.entry.js +1 -1
- package/dist/cjs/tl-checkout-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/tl-event-card.cjs.entry.js +1 -1
- package/dist/cjs/tl-event-list.cjs.entry.js +1 -1
- package/dist/cjs/tl-login.cjs.entry.js +1 -1
- package/dist/cjs/tl-my-orders.cjs.entry.js +1 -1
- package/dist/cjs/tl-occurrence-selector_2.cjs.entry.js +1 -1
- package/dist/cjs/tl-order-confirmation.cjs.entry.js +1 -1
- package/dist/cjs/tl-order-tickets_2.cjs.entry.js +1 -1
- package/dist/cjs/tl-promo-code.cjs.entry.js +1 -1
- package/dist/cjs/tl-seat-map.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/tl-buy-modal/tl-buy-modal.js +1 -1
- package/dist/collection/components/tl-buy-tickets-button/tl-buy-tickets-button.js +3 -3
- package/dist/collection/components/tl-cart/tl-cart.js +2 -2
- package/dist/collection/components/tl-event-card/tl-event-card.js +1 -1
- package/dist/collection/components/tl-login/tl-login.js +1 -1
- package/dist/collection/components/tl-occurrence-selector/tl-occurrence-selector.js +2 -2
- package/dist/collection/components/tl-promo-code/tl-promo-code.js +1 -1
- package/dist/collection/components/tl-ticket/tl-ticket.js +1 -1
- package/dist/collection/components/tl-ticket-selector/tl-ticket-selector.js +1 -1
- package/dist/components/tl-buy-modal.js +1 -1
- package/dist/elements.docs.d.ts +26 -0
- package/dist/elements.docs.json +32 -14
- package/dist/esm/{index-Ba-RZTFI.js → index-CNX8hZa8.js} +276 -1797
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/ticketlayer-elements.js +3 -3
- package/dist/esm/tl-buy-modal.entry.js +2 -2
- package/dist/esm/tl-buy-tickets-button.entry.js +1 -1
- package/dist/esm/tl-buy-tickets-wrapper.entry.js +1 -1
- package/dist/esm/tl-cart-badge.entry.js +1 -1
- package/dist/esm/tl-cart-drawer.entry.js +1 -1
- package/dist/esm/tl-cart.entry.js +1 -1
- package/dist/esm/tl-checkout-wrapper.entry.js +1 -1
- package/dist/esm/tl-event-card.entry.js +1 -1
- package/dist/esm/tl-event-list.entry.js +1 -1
- package/dist/esm/tl-login.entry.js +1 -1
- package/dist/esm/tl-my-orders.entry.js +1 -1
- package/dist/esm/tl-occurrence-selector_2.entry.js +1 -1
- package/dist/esm/tl-order-confirmation.entry.js +1 -1
- package/dist/esm/tl-order-tickets_2.entry.js +1 -1
- package/dist/esm/tl-promo-code.entry.js +1 -1
- package/dist/esm/tl-seat-map.entry.js +1 -1
- package/dist/ticketlayer-elements/index.esm.js +1 -1
- package/dist/ticketlayer-elements/{p-340ab4f5.entry.js → p-0b1d16f8.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-9a903ff6.entry.js → p-1471f6d8.entry.js} +1 -1
- package/dist/ticketlayer-elements/p-1c51cbc1.entry.js +1 -0
- package/dist/ticketlayer-elements/{p-fb9444c4.entry.js → p-5169f68b.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-82752e3b.entry.js → p-895ba1f3.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-b6d479ad.entry.js → p-8d5722e1.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-976770f3.entry.js → p-917d8e09.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-9372ff1f.entry.js → p-9629029a.entry.js} +1 -1
- package/dist/ticketlayer-elements/p-CNX8hZa8.js +3 -0
- package/dist/ticketlayer-elements/{p-0291df4c.entry.js → p-a22714d0.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-11273f8f.entry.js → p-bf73044b.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-41d22d7c.entry.js → p-e02079fa.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-f5846f61.entry.js → p-e04ace15.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-a5c90b68.entry.js → p-e6fab1d5.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-eb640760.entry.js → p-f826b753.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-9c9072c8.entry.js → p-fa639d88.entry.js} +1 -1
- package/dist/ticketlayer-elements/{p-9cb3ab24.entry.js → p-fbaca948.entry.js} +1 -1
- package/dist/ticketlayer-elements/ticketlayer-elements.esm.js +1 -1
- package/dist/types/components.d.ts +133 -36
- package/dist/types/stencil-public-runtime.d.ts +97 -57
- package/elements.catalogue.json +2 -2
- package/loader/index.d.ts +1 -1
- package/package.json +23 -30
- package/dist/ticketlayer-elements/p-Ba-RZTFI.js +0 -2
- package/dist/ticketlayer-elements/p-f6314d1e.entry.js +0 -1
|
@@ -5,258 +5,26 @@ const globalScripts = () => {};
|
|
|
5
5
|
const globalStyles = ":root{--tl-font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;--tl-font-family-mono:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;--tl-primary:#6366f1;--tl-primary-foreground:#ffffff;--tl-secondary:#f3f4f6;--tl-secondary-foreground:#111827;--tl-background:#ffffff;--tl-foreground:#111827;--tl-muted:#f9fafb;--tl-muted-foreground:#6b7280;--tl-border:#e5e7eb;--tl-success:#10b981;--tl-success-foreground:#ffffff;--tl-warning:#f59e0b;--tl-warning-foreground:#ffffff;--tl-error:#ef4444;--tl-error-foreground:#ffffff;--tl-radius-sm:0.25rem;--tl-radius-md:0.5rem;--tl-radius-lg:0.75rem;--tl-spacing-1:0.25rem;--tl-spacing-2:0.5rem;--tl-spacing-3:0.75rem;--tl-spacing-4:1rem;--tl-spacing-6:1.5rem;--tl-spacing-8:2rem}";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Platform v4.
|
|
8
|
+
Stencil Client Platform v4.45.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __typeError = (msg) => {
|
|
17
|
-
throw TypeError(msg);
|
|
18
|
-
};
|
|
19
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
21
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
22
|
-
};
|
|
23
|
-
var __export = (target, all) => {
|
|
24
|
-
for (var name in all)
|
|
25
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
-
};
|
|
27
|
-
var __copyProps = (to, from, except, desc) => {
|
|
28
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
-
for (let key of __getOwnPropNames(from))
|
|
30
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
-
}
|
|
33
|
-
return to;
|
|
34
|
-
};
|
|
35
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
36
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
37
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
38
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
39
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
40
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
41
|
-
mod
|
|
42
|
-
));
|
|
43
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
44
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
45
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
46
|
-
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);
|
|
47
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
48
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
49
10
|
|
|
50
|
-
// node_modules/balanced-match/index.js
|
|
51
|
-
var require_balanced_match = __commonJS({
|
|
52
|
-
"node_modules/balanced-match/index.js"(exports, module) {
|
|
53
|
-
module.exports = balanced;
|
|
54
|
-
function balanced(a, b, str) {
|
|
55
|
-
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
56
|
-
if (b instanceof RegExp) b = maybeMatch(b, str);
|
|
57
|
-
var r = range(a, b, str);
|
|
58
|
-
return r && {
|
|
59
|
-
start: r[0],
|
|
60
|
-
end: r[1],
|
|
61
|
-
pre: str.slice(0, r[0]),
|
|
62
|
-
body: str.slice(r[0] + a.length, r[1]),
|
|
63
|
-
post: str.slice(r[1] + b.length)
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function maybeMatch(reg, str) {
|
|
67
|
-
var m = str.match(reg);
|
|
68
|
-
return m ? m[0] : null;
|
|
69
|
-
}
|
|
70
|
-
balanced.range = range;
|
|
71
|
-
function range(a, b, str) {
|
|
72
|
-
var begs, beg, left, right, result;
|
|
73
|
-
var ai = str.indexOf(a);
|
|
74
|
-
var bi = str.indexOf(b, ai + 1);
|
|
75
|
-
var i2 = ai;
|
|
76
|
-
if (ai >= 0 && bi > 0) {
|
|
77
|
-
if (a === b) {
|
|
78
|
-
return [ai, bi];
|
|
79
|
-
}
|
|
80
|
-
begs = [];
|
|
81
|
-
left = str.length;
|
|
82
|
-
while (i2 >= 0 && !result) {
|
|
83
|
-
if (i2 == ai) {
|
|
84
|
-
begs.push(i2);
|
|
85
|
-
ai = str.indexOf(a, i2 + 1);
|
|
86
|
-
} else if (begs.length == 1) {
|
|
87
|
-
result = [begs.pop(), bi];
|
|
88
|
-
} else {
|
|
89
|
-
beg = begs.pop();
|
|
90
|
-
if (beg < left) {
|
|
91
|
-
left = beg;
|
|
92
|
-
right = bi;
|
|
93
|
-
}
|
|
94
|
-
bi = str.indexOf(b, i2 + 1);
|
|
95
|
-
}
|
|
96
|
-
i2 = ai < bi && ai >= 0 ? ai : bi;
|
|
97
|
-
}
|
|
98
|
-
if (begs.length) {
|
|
99
|
-
result = [left, right];
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return result;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
// node_modules/brace-expansion/index.js
|
|
108
|
-
var require_brace_expansion = __commonJS({
|
|
109
|
-
"node_modules/brace-expansion/index.js"(exports, module) {
|
|
110
|
-
var balanced = require_balanced_match();
|
|
111
|
-
module.exports = expandTop;
|
|
112
|
-
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
113
|
-
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
114
|
-
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
115
|
-
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
116
|
-
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
117
|
-
function numeric(str) {
|
|
118
|
-
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
119
|
-
}
|
|
120
|
-
function escapeBraces(str) {
|
|
121
|
-
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
122
|
-
}
|
|
123
|
-
function unescapeBraces(str) {
|
|
124
|
-
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
125
|
-
}
|
|
126
|
-
function parseCommaParts(str) {
|
|
127
|
-
if (!str)
|
|
128
|
-
return [""];
|
|
129
|
-
var parts = [];
|
|
130
|
-
var m = balanced("{", "}", str);
|
|
131
|
-
if (!m)
|
|
132
|
-
return str.split(",");
|
|
133
|
-
var pre = m.pre;
|
|
134
|
-
var body = m.body;
|
|
135
|
-
var post = m.post;
|
|
136
|
-
var p = pre.split(",");
|
|
137
|
-
p[p.length - 1] += "{" + body + "}";
|
|
138
|
-
var postParts = parseCommaParts(post);
|
|
139
|
-
if (post.length) {
|
|
140
|
-
p[p.length - 1] += postParts.shift();
|
|
141
|
-
p.push.apply(p, postParts);
|
|
142
|
-
}
|
|
143
|
-
parts.push.apply(parts, p);
|
|
144
|
-
return parts;
|
|
145
|
-
}
|
|
146
|
-
function expandTop(str) {
|
|
147
|
-
if (!str)
|
|
148
|
-
return [];
|
|
149
|
-
if (str.substr(0, 2) === "{}") {
|
|
150
|
-
str = "\\{\\}" + str.substr(2);
|
|
151
|
-
}
|
|
152
|
-
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
153
|
-
}
|
|
154
|
-
function embrace(str) {
|
|
155
|
-
return "{" + str + "}";
|
|
156
|
-
}
|
|
157
|
-
function isPadded(el) {
|
|
158
|
-
return /^-?0\d/.test(el);
|
|
159
|
-
}
|
|
160
|
-
function lte(i2, y) {
|
|
161
|
-
return i2 <= y;
|
|
162
|
-
}
|
|
163
|
-
function gte(i2, y) {
|
|
164
|
-
return i2 >= y;
|
|
165
|
-
}
|
|
166
|
-
function expand2(str, isTop) {
|
|
167
|
-
var expansions = [];
|
|
168
|
-
var m = balanced("{", "}", str);
|
|
169
|
-
if (!m) return [str];
|
|
170
|
-
var pre = m.pre;
|
|
171
|
-
var post = m.post.length ? expand2(m.post, false) : [""];
|
|
172
|
-
if (/\$$/.test(m.pre)) {
|
|
173
|
-
for (var k = 0; k < post.length; k++) {
|
|
174
|
-
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
175
|
-
expansions.push(expansion);
|
|
176
|
-
}
|
|
177
|
-
} else {
|
|
178
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
179
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
180
|
-
var isSequence = isNumericSequence || isAlphaSequence;
|
|
181
|
-
var isOptions = m.body.indexOf(",") >= 0;
|
|
182
|
-
if (!isSequence && !isOptions) {
|
|
183
|
-
if (m.post.match(/,(?!,).*\}/)) {
|
|
184
|
-
str = m.pre + "{" + m.body + escClose + m.post;
|
|
185
|
-
return expand2(str);
|
|
186
|
-
}
|
|
187
|
-
return [str];
|
|
188
|
-
}
|
|
189
|
-
var n;
|
|
190
|
-
if (isSequence) {
|
|
191
|
-
n = m.body.split(/\.\./);
|
|
192
|
-
} else {
|
|
193
|
-
n = parseCommaParts(m.body);
|
|
194
|
-
if (n.length === 1) {
|
|
195
|
-
n = expand2(n[0], false).map(embrace);
|
|
196
|
-
if (n.length === 1) {
|
|
197
|
-
return post.map(function(p) {
|
|
198
|
-
return m.pre + n[0] + p;
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
var N;
|
|
204
|
-
if (isSequence) {
|
|
205
|
-
var x = numeric(n[0]);
|
|
206
|
-
var y = numeric(n[1]);
|
|
207
|
-
var width = Math.max(n[0].length, n[1].length);
|
|
208
|
-
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
209
|
-
var test = lte;
|
|
210
|
-
var reverse = y < x;
|
|
211
|
-
if (reverse) {
|
|
212
|
-
incr *= -1;
|
|
213
|
-
test = gte;
|
|
214
|
-
}
|
|
215
|
-
var pad = n.some(isPadded);
|
|
216
|
-
N = [];
|
|
217
|
-
for (var i2 = x; test(i2, y); i2 += incr) {
|
|
218
|
-
var c;
|
|
219
|
-
if (isAlphaSequence) {
|
|
220
|
-
c = String.fromCharCode(i2);
|
|
221
|
-
if (c === "\\")
|
|
222
|
-
c = "";
|
|
223
|
-
} else {
|
|
224
|
-
c = String(i2);
|
|
225
|
-
if (pad) {
|
|
226
|
-
var need = width - c.length;
|
|
227
|
-
if (need > 0) {
|
|
228
|
-
var z = new Array(need + 1).join("0");
|
|
229
|
-
if (i2 < 0)
|
|
230
|
-
c = "-" + z + c.slice(1);
|
|
231
|
-
else
|
|
232
|
-
c = z + c;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
N.push(c);
|
|
237
|
-
}
|
|
238
|
-
} else {
|
|
239
|
-
N = [];
|
|
240
|
-
for (var j = 0; j < n.length; j++) {
|
|
241
|
-
N.push.apply(N, expand2(n[j], false));
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
for (var j = 0; j < N.length; j++) {
|
|
245
|
-
for (var k = 0; k < post.length; k++) {
|
|
246
|
-
var expansion = pre + N[j] + post[k];
|
|
247
|
-
if (!isTop || isSequence || expansion)
|
|
248
|
-
expansions.push(expansion);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return expansions;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
11
|
|
|
257
12
|
// src/utils/constants.ts
|
|
258
13
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
259
14
|
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
15
|
+
|
|
16
|
+
// src/utils/get-prop-descriptor.ts
|
|
17
|
+
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
18
|
+
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
19
|
+
while (obj && obj !== stopAt) {
|
|
20
|
+
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
21
|
+
if (desc && (!getOnly || desc.get)) return desc;
|
|
22
|
+
obj = Object.getPrototypeOf(obj);
|
|
23
|
+
}
|
|
24
|
+
return void 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// src/utils/es2022-rewire-class-members.ts
|
|
260
28
|
var reWireGetterSetter = (instance, hostRef) => {
|
|
261
29
|
var _a;
|
|
262
30
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -264,7 +32,7 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
264
32
|
members.map(([memberName, [memberFlags]]) => {
|
|
265
33
|
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
266
34
|
const ogValue = instance[memberName];
|
|
267
|
-
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
35
|
+
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
268
36
|
if (ogDescriptor) {
|
|
269
37
|
Object.defineProperty(instance, memberName, {
|
|
270
38
|
get() {
|
|
@@ -277,18 +45,14 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
277
45
|
enumerable: true
|
|
278
46
|
});
|
|
279
47
|
}
|
|
280
|
-
|
|
48
|
+
if (hostRef.$instanceValues$.has(memberName)) {
|
|
49
|
+
instance[memberName] = hostRef.$instanceValues$.get(memberName);
|
|
50
|
+
} else if (ogValue !== void 0) {
|
|
51
|
+
instance[memberName] = ogValue;
|
|
52
|
+
}
|
|
281
53
|
}
|
|
282
54
|
});
|
|
283
55
|
};
|
|
284
|
-
function getPropertyDescriptor(obj, memberName) {
|
|
285
|
-
while (obj) {
|
|
286
|
-
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
287
|
-
if (desc == null ? void 0 : desc.get) return desc;
|
|
288
|
-
obj = Object.getPrototypeOf(obj);
|
|
289
|
-
}
|
|
290
|
-
return void 0;
|
|
291
|
-
}
|
|
292
56
|
|
|
293
57
|
// src/client/client-host-ref.ts
|
|
294
58
|
var getHostRef = (ref) => {
|
|
@@ -330,7 +94,9 @@ var consoleError = (e, el) => (0, console.error)(e, el);
|
|
|
330
94
|
|
|
331
95
|
// src/client/client-load-module.ts
|
|
332
96
|
var cmpModules = /* @__PURE__ */ new Map();
|
|
97
|
+
var failedLoadAttempts = /* @__PURE__ */ new Map();
|
|
333
98
|
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
99
|
+
var _a;
|
|
334
100
|
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
335
101
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
336
102
|
if (!bundleId) {
|
|
@@ -340,21 +106,28 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
340
106
|
if (module) {
|
|
341
107
|
return module[exportName];
|
|
342
108
|
}
|
|
109
|
+
const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
|
|
110
|
+
const cacheBustParams = [
|
|
111
|
+
retryCount > 0 ? `s-retry=${retryCount}` : "",
|
|
112
|
+
""
|
|
113
|
+
].filter(Boolean).join("&");
|
|
343
114
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
344
115
|
return import(
|
|
345
116
|
/* @vite-ignore */
|
|
346
117
|
/* webpackInclude: /\.entry\.js$/ */
|
|
347
118
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
348
119
|
/* webpackMode: "lazy" */
|
|
349
|
-
`./${bundleId}.entry.js${""}`
|
|
120
|
+
`./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
|
|
350
121
|
).then(
|
|
351
122
|
(importedModule) => {
|
|
352
123
|
{
|
|
124
|
+
failedLoadAttempts.delete(bundleId);
|
|
353
125
|
cmpModules.set(bundleId, importedModule);
|
|
354
126
|
}
|
|
355
127
|
return importedModule[exportName];
|
|
356
128
|
},
|
|
357
129
|
(e) => {
|
|
130
|
+
failedLoadAttempts.set(bundleId, retryCount + 1);
|
|
358
131
|
consoleError(e, hostRef.$hostElement$);
|
|
359
132
|
}
|
|
360
133
|
);
|
|
@@ -364,6 +137,8 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
364
137
|
var styles = /* @__PURE__ */ new Map();
|
|
365
138
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
366
139
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
140
|
+
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
141
|
+
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
367
142
|
var win = typeof window !== "undefined" ? window : {};
|
|
368
143
|
var plt = {
|
|
369
144
|
$flags$: 0,
|
|
@@ -390,6 +165,10 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
|
|
|
390
165
|
var queuePending = false;
|
|
391
166
|
var queueDomReads = [];
|
|
392
167
|
var queueDomWrites = [];
|
|
168
|
+
var scheduleFlush = () => {
|
|
169
|
+
var _a;
|
|
170
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
|
|
171
|
+
};
|
|
393
172
|
var queueTask = (queue, write) => (cb) => {
|
|
394
173
|
queue.push(cb);
|
|
395
174
|
if (!queuePending) {
|
|
@@ -397,7 +176,7 @@ var queueTask = (queue, write) => (cb) => {
|
|
|
397
176
|
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
398
177
|
nextTick(flush);
|
|
399
178
|
} else {
|
|
400
|
-
|
|
179
|
+
scheduleFlush();
|
|
401
180
|
}
|
|
402
181
|
}
|
|
403
182
|
};
|
|
@@ -416,1429 +195,12 @@ var flush = () => {
|
|
|
416
195
|
{
|
|
417
196
|
consume(queueDomWrites);
|
|
418
197
|
if (queuePending = queueDomReads.length > 0) {
|
|
419
|
-
|
|
198
|
+
scheduleFlush();
|
|
420
199
|
}
|
|
421
200
|
}
|
|
422
201
|
};
|
|
423
202
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
424
203
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
425
|
-
var isComplexType = (o) => {
|
|
426
|
-
o = typeof o;
|
|
427
|
-
return o === "object" || o === "function";
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
431
|
-
var import_brace_expansion = __toESM(require_brace_expansion());
|
|
432
|
-
|
|
433
|
-
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
434
|
-
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
435
|
-
var assertValidPattern = (pattern) => {
|
|
436
|
-
if (typeof pattern !== "string") {
|
|
437
|
-
throw new TypeError("invalid pattern");
|
|
438
|
-
}
|
|
439
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
440
|
-
throw new TypeError("pattern is too long");
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
445
|
-
var posixClasses = {
|
|
446
|
-
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
447
|
-
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
448
|
-
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
449
|
-
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
450
|
-
"[:cntrl:]": ["\\p{Cc}", true],
|
|
451
|
-
"[:digit:]": ["\\p{Nd}", true],
|
|
452
|
-
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
453
|
-
"[:lower:]": ["\\p{Ll}", true],
|
|
454
|
-
"[:print:]": ["\\p{C}", true],
|
|
455
|
-
"[:punct:]": ["\\p{P}", true],
|
|
456
|
-
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
457
|
-
"[:upper:]": ["\\p{Lu}", true],
|
|
458
|
-
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
459
|
-
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
460
|
-
};
|
|
461
|
-
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
462
|
-
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
463
|
-
var rangesToString = (ranges) => ranges.join("");
|
|
464
|
-
var parseClass = (glob, position) => {
|
|
465
|
-
const pos = position;
|
|
466
|
-
if (glob.charAt(pos) !== "[") {
|
|
467
|
-
throw new Error("not in a brace expression");
|
|
468
|
-
}
|
|
469
|
-
const ranges = [];
|
|
470
|
-
const negs = [];
|
|
471
|
-
let i2 = pos + 1;
|
|
472
|
-
let sawStart = false;
|
|
473
|
-
let uflag = false;
|
|
474
|
-
let escaping = false;
|
|
475
|
-
let negate = false;
|
|
476
|
-
let endPos = pos;
|
|
477
|
-
let rangeStart = "";
|
|
478
|
-
WHILE: while (i2 < glob.length) {
|
|
479
|
-
const c = glob.charAt(i2);
|
|
480
|
-
if ((c === "!" || c === "^") && i2 === pos + 1) {
|
|
481
|
-
negate = true;
|
|
482
|
-
i2++;
|
|
483
|
-
continue;
|
|
484
|
-
}
|
|
485
|
-
if (c === "]" && sawStart && !escaping) {
|
|
486
|
-
endPos = i2 + 1;
|
|
487
|
-
break;
|
|
488
|
-
}
|
|
489
|
-
sawStart = true;
|
|
490
|
-
if (c === "\\") {
|
|
491
|
-
if (!escaping) {
|
|
492
|
-
escaping = true;
|
|
493
|
-
i2++;
|
|
494
|
-
continue;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
if (c === "[" && !escaping) {
|
|
498
|
-
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
499
|
-
if (glob.startsWith(cls, i2)) {
|
|
500
|
-
if (rangeStart) {
|
|
501
|
-
return ["$.", false, glob.length - pos, true];
|
|
502
|
-
}
|
|
503
|
-
i2 += cls.length;
|
|
504
|
-
if (neg)
|
|
505
|
-
negs.push(unip);
|
|
506
|
-
else
|
|
507
|
-
ranges.push(unip);
|
|
508
|
-
uflag = uflag || u;
|
|
509
|
-
continue WHILE;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
escaping = false;
|
|
514
|
-
if (rangeStart) {
|
|
515
|
-
if (c > rangeStart) {
|
|
516
|
-
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
517
|
-
} else if (c === rangeStart) {
|
|
518
|
-
ranges.push(braceEscape(c));
|
|
519
|
-
}
|
|
520
|
-
rangeStart = "";
|
|
521
|
-
i2++;
|
|
522
|
-
continue;
|
|
523
|
-
}
|
|
524
|
-
if (glob.startsWith("-]", i2 + 1)) {
|
|
525
|
-
ranges.push(braceEscape(c + "-"));
|
|
526
|
-
i2 += 2;
|
|
527
|
-
continue;
|
|
528
|
-
}
|
|
529
|
-
if (glob.startsWith("-", i2 + 1)) {
|
|
530
|
-
rangeStart = c;
|
|
531
|
-
i2 += 2;
|
|
532
|
-
continue;
|
|
533
|
-
}
|
|
534
|
-
ranges.push(braceEscape(c));
|
|
535
|
-
i2++;
|
|
536
|
-
}
|
|
537
|
-
if (endPos < i2) {
|
|
538
|
-
return ["", false, 0, false];
|
|
539
|
-
}
|
|
540
|
-
if (!ranges.length && !negs.length) {
|
|
541
|
-
return ["$.", false, glob.length - pos, true];
|
|
542
|
-
}
|
|
543
|
-
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
|
|
544
|
-
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
|
|
545
|
-
return [regexpEscape(r), false, endPos - pos, false];
|
|
546
|
-
}
|
|
547
|
-
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
|
|
548
|
-
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
|
|
549
|
-
const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
|
|
550
|
-
return [comb, uflag, endPos - pos, true];
|
|
551
|
-
};
|
|
552
|
-
|
|
553
|
-
// node_modules/minimatch/dist/esm/unescape.js
|
|
554
|
-
var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
555
|
-
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
556
|
-
};
|
|
557
|
-
|
|
558
|
-
// node_modules/minimatch/dist/esm/ast.js
|
|
559
|
-
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
560
|
-
var isExtglobType = (c) => types.has(c);
|
|
561
|
-
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
562
|
-
var startNoDot = "(?!\\.)";
|
|
563
|
-
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
564
|
-
var justDots = /* @__PURE__ */ new Set(["..", "."]);
|
|
565
|
-
var reSpecials = new Set("().*{}+?[]^$\\!");
|
|
566
|
-
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
567
|
-
var qmark = "[^/]";
|
|
568
|
-
var star = qmark + "*?";
|
|
569
|
-
var starNoEmpty = qmark + "+?";
|
|
570
|
-
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
|
|
571
|
-
var _AST = class _AST {
|
|
572
|
-
constructor(type, parent, options = {}) {
|
|
573
|
-
__privateAdd(this, _AST_instances);
|
|
574
|
-
__publicField(this, "type");
|
|
575
|
-
__privateAdd(this, _root);
|
|
576
|
-
__privateAdd(this, _hasMagic);
|
|
577
|
-
__privateAdd(this, _uflag, false);
|
|
578
|
-
__privateAdd(this, _parts, []);
|
|
579
|
-
__privateAdd(this, _parent);
|
|
580
|
-
__privateAdd(this, _parentIndex);
|
|
581
|
-
__privateAdd(this, _negs);
|
|
582
|
-
__privateAdd(this, _filledNegs, false);
|
|
583
|
-
__privateAdd(this, _options);
|
|
584
|
-
__privateAdd(this, _toString);
|
|
585
|
-
// set to true if it's an extglob with no children
|
|
586
|
-
// (which really means one child of '')
|
|
587
|
-
__privateAdd(this, _emptyExt, false);
|
|
588
|
-
this.type = type;
|
|
589
|
-
if (type)
|
|
590
|
-
__privateSet(this, _hasMagic, true);
|
|
591
|
-
__privateSet(this, _parent, parent);
|
|
592
|
-
__privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
|
|
593
|
-
__privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
|
|
594
|
-
__privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
|
|
595
|
-
if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
|
|
596
|
-
__privateGet(this, _negs).push(this);
|
|
597
|
-
__privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
|
|
598
|
-
}
|
|
599
|
-
get hasMagic() {
|
|
600
|
-
if (__privateGet(this, _hasMagic) !== void 0)
|
|
601
|
-
return __privateGet(this, _hasMagic);
|
|
602
|
-
for (const p of __privateGet(this, _parts)) {
|
|
603
|
-
if (typeof p === "string")
|
|
604
|
-
continue;
|
|
605
|
-
if (p.type || p.hasMagic)
|
|
606
|
-
return __privateSet(this, _hasMagic, true);
|
|
607
|
-
}
|
|
608
|
-
return __privateGet(this, _hasMagic);
|
|
609
|
-
}
|
|
610
|
-
// reconstructs the pattern
|
|
611
|
-
toString() {
|
|
612
|
-
if (__privateGet(this, _toString) !== void 0)
|
|
613
|
-
return __privateGet(this, _toString);
|
|
614
|
-
if (!this.type) {
|
|
615
|
-
return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
|
|
616
|
-
} else {
|
|
617
|
-
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
push(...parts) {
|
|
621
|
-
for (const p of parts) {
|
|
622
|
-
if (p === "")
|
|
623
|
-
continue;
|
|
624
|
-
if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
|
|
625
|
-
throw new Error("invalid part: " + p);
|
|
626
|
-
}
|
|
627
|
-
__privateGet(this, _parts).push(p);
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
toJSON() {
|
|
631
|
-
var _a;
|
|
632
|
-
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())];
|
|
633
|
-
if (this.isStart() && !this.type)
|
|
634
|
-
ret.unshift([]);
|
|
635
|
-
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
|
|
636
|
-
ret.push({});
|
|
637
|
-
}
|
|
638
|
-
return ret;
|
|
639
|
-
}
|
|
640
|
-
isStart() {
|
|
641
|
-
var _a;
|
|
642
|
-
if (__privateGet(this, _root) === this)
|
|
643
|
-
return true;
|
|
644
|
-
if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
|
|
645
|
-
return false;
|
|
646
|
-
if (__privateGet(this, _parentIndex) === 0)
|
|
647
|
-
return true;
|
|
648
|
-
const p = __privateGet(this, _parent);
|
|
649
|
-
for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
|
|
650
|
-
const pp = __privateGet(p, _parts)[i2];
|
|
651
|
-
if (!(pp instanceof _AST && pp.type === "!")) {
|
|
652
|
-
return false;
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
return true;
|
|
656
|
-
}
|
|
657
|
-
isEnd() {
|
|
658
|
-
var _a, _b, _c;
|
|
659
|
-
if (__privateGet(this, _root) === this)
|
|
660
|
-
return true;
|
|
661
|
-
if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
|
|
662
|
-
return true;
|
|
663
|
-
if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
|
|
664
|
-
return false;
|
|
665
|
-
if (!this.type)
|
|
666
|
-
return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
|
|
667
|
-
const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
|
|
668
|
-
return __privateGet(this, _parentIndex) === pl - 1;
|
|
669
|
-
}
|
|
670
|
-
copyIn(part) {
|
|
671
|
-
if (typeof part === "string")
|
|
672
|
-
this.push(part);
|
|
673
|
-
else
|
|
674
|
-
this.push(part.clone(this));
|
|
675
|
-
}
|
|
676
|
-
clone(parent) {
|
|
677
|
-
const c = new _AST(this.type, parent);
|
|
678
|
-
for (const p of __privateGet(this, _parts)) {
|
|
679
|
-
c.copyIn(p);
|
|
680
|
-
}
|
|
681
|
-
return c;
|
|
682
|
-
}
|
|
683
|
-
static fromGlob(pattern, options = {}) {
|
|
684
|
-
var _a;
|
|
685
|
-
const ast = new _AST(null, void 0, options);
|
|
686
|
-
__privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
|
|
687
|
-
return ast;
|
|
688
|
-
}
|
|
689
|
-
// returns the regular expression if there's magic, or the unescaped
|
|
690
|
-
// string if not.
|
|
691
|
-
toMMPattern() {
|
|
692
|
-
if (this !== __privateGet(this, _root))
|
|
693
|
-
return __privateGet(this, _root).toMMPattern();
|
|
694
|
-
const glob = this.toString();
|
|
695
|
-
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
696
|
-
const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
|
|
697
|
-
if (!anyMagic) {
|
|
698
|
-
return body;
|
|
699
|
-
}
|
|
700
|
-
const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
|
|
701
|
-
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
702
|
-
_src: re,
|
|
703
|
-
_glob: glob
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
get options() {
|
|
707
|
-
return __privateGet(this, _options);
|
|
708
|
-
}
|
|
709
|
-
// returns the string match, the regexp source, whether there's magic
|
|
710
|
-
// in the regexp (so a regular expression is required) and whether or
|
|
711
|
-
// not the uflag is needed for the regular expression (for posix classes)
|
|
712
|
-
// TODO: instead of injecting the start/end at this point, just return
|
|
713
|
-
// the BODY of the regexp, along with the start/end portions suitable
|
|
714
|
-
// for binding the start/end in either a joined full-path makeRe context
|
|
715
|
-
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
716
|
-
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
717
|
-
//
|
|
718
|
-
// In part-matching mode, the start is:
|
|
719
|
-
// - if not isStart: nothing
|
|
720
|
-
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
721
|
-
// - if dots allowed or not possible: ^
|
|
722
|
-
// - if dots possible and not allowed: ^(?!\.)
|
|
723
|
-
// end is:
|
|
724
|
-
// - if not isEnd(): nothing
|
|
725
|
-
// - else: $
|
|
726
|
-
//
|
|
727
|
-
// In full-path matching mode, we put the slash at the START of the
|
|
728
|
-
// pattern, so start is:
|
|
729
|
-
// - if first pattern: same as part-matching mode
|
|
730
|
-
// - if not isStart(): nothing
|
|
731
|
-
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
732
|
-
// - if dots allowed or not possible: /
|
|
733
|
-
// - if dots possible and not allowed: /(?!\.)
|
|
734
|
-
// end is:
|
|
735
|
-
// - if last pattern, same as part-matching mode
|
|
736
|
-
// - else nothing
|
|
737
|
-
//
|
|
738
|
-
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
739
|
-
// there to bind the end of the negated pattern portion, and it's easier to
|
|
740
|
-
// just stick it in now rather than try to inject it later in the middle of
|
|
741
|
-
// the pattern.
|
|
742
|
-
//
|
|
743
|
-
// We can just always return the same end, and leave it up to the caller
|
|
744
|
-
// to know whether it's going to be used joined or in parts.
|
|
745
|
-
// And, if the start is adjusted slightly, can do the same there:
|
|
746
|
-
// - if not isStart: nothing
|
|
747
|
-
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
748
|
-
// - if dots allowed or not possible: (?:/|^)
|
|
749
|
-
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
750
|
-
//
|
|
751
|
-
// But it's better to have a simpler binding without a conditional, for
|
|
752
|
-
// performance, so probably better to return both start options.
|
|
753
|
-
//
|
|
754
|
-
// Then the caller just ignores the end if it's not the first pattern,
|
|
755
|
-
// and the start always gets applied.
|
|
756
|
-
//
|
|
757
|
-
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
758
|
-
// so the caller can just attach $ at the end of the pattern when building.
|
|
759
|
-
//
|
|
760
|
-
// So the todo is:
|
|
761
|
-
// - better detect what kind of start is needed
|
|
762
|
-
// - return both flavors of starting pattern
|
|
763
|
-
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
764
|
-
//
|
|
765
|
-
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
766
|
-
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
767
|
-
// that dot prevention biz to live in the extglob portions, because eg
|
|
768
|
-
// +(*|.x*) can match .xy but not .yx.
|
|
769
|
-
//
|
|
770
|
-
// So, return the two flavors if it's #root and the first child is not an
|
|
771
|
-
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
772
|
-
// use the (?:^|/) style of start binding.
|
|
773
|
-
//
|
|
774
|
-
// Even simplified further:
|
|
775
|
-
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
776
|
-
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
777
|
-
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
778
|
-
toRegExpSource(allowDot) {
|
|
779
|
-
var _a;
|
|
780
|
-
const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
|
|
781
|
-
if (__privateGet(this, _root) === this)
|
|
782
|
-
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
783
|
-
if (!this.type) {
|
|
784
|
-
const noEmpty = this.isStart() && this.isEnd();
|
|
785
|
-
const src = __privateGet(this, _parts).map((p) => {
|
|
786
|
-
var _a2;
|
|
787
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
788
|
-
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
789
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
790
|
-
return re;
|
|
791
|
-
}).join("");
|
|
792
|
-
let start2 = "";
|
|
793
|
-
if (this.isStart()) {
|
|
794
|
-
if (typeof __privateGet(this, _parts)[0] === "string") {
|
|
795
|
-
const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
|
|
796
|
-
if (!dotTravAllowed) {
|
|
797
|
-
const aps = addPatternStart;
|
|
798
|
-
const needNoTrav = (
|
|
799
|
-
// dots are allowed, and the pattern starts with [ or .
|
|
800
|
-
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
801
|
-
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
802
|
-
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
|
|
803
|
-
);
|
|
804
|
-
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
805
|
-
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
let end = "";
|
|
810
|
-
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
|
|
811
|
-
end = "(?:$|\\/)";
|
|
812
|
-
}
|
|
813
|
-
const final2 = start2 + src + end;
|
|
814
|
-
return [
|
|
815
|
-
final2,
|
|
816
|
-
unescape(src),
|
|
817
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
818
|
-
__privateGet(this, _uflag)
|
|
819
|
-
];
|
|
820
|
-
}
|
|
821
|
-
const repeated = this.type === "*" || this.type === "+";
|
|
822
|
-
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
823
|
-
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
824
|
-
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
825
|
-
const s = this.toString();
|
|
826
|
-
__privateSet(this, _parts, [s]);
|
|
827
|
-
this.type = null;
|
|
828
|
-
__privateSet(this, _hasMagic, void 0);
|
|
829
|
-
return [s, unescape(this.toString()), false, false];
|
|
830
|
-
}
|
|
831
|
-
let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
832
|
-
if (bodyDotAllowed === body) {
|
|
833
|
-
bodyDotAllowed = "";
|
|
834
|
-
}
|
|
835
|
-
if (bodyDotAllowed) {
|
|
836
|
-
body = `(?:${body})(?:${bodyDotAllowed})*?`;
|
|
837
|
-
}
|
|
838
|
-
let final = "";
|
|
839
|
-
if (this.type === "!" && __privateGet(this, _emptyExt)) {
|
|
840
|
-
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
|
|
841
|
-
} else {
|
|
842
|
-
const close = this.type === "!" ? (
|
|
843
|
-
// !() must match something,but !(x) can match ''
|
|
844
|
-
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
|
|
845
|
-
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
|
|
846
|
-
final = start + body + close;
|
|
847
|
-
}
|
|
848
|
-
return [
|
|
849
|
-
final,
|
|
850
|
-
unescape(body),
|
|
851
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
852
|
-
__privateGet(this, _uflag)
|
|
853
|
-
];
|
|
854
|
-
}
|
|
855
|
-
};
|
|
856
|
-
_root = new WeakMap();
|
|
857
|
-
_hasMagic = new WeakMap();
|
|
858
|
-
_uflag = new WeakMap();
|
|
859
|
-
_parts = new WeakMap();
|
|
860
|
-
_parent = new WeakMap();
|
|
861
|
-
_parentIndex = new WeakMap();
|
|
862
|
-
_negs = new WeakMap();
|
|
863
|
-
_filledNegs = new WeakMap();
|
|
864
|
-
_options = new WeakMap();
|
|
865
|
-
_toString = new WeakMap();
|
|
866
|
-
_emptyExt = new WeakMap();
|
|
867
|
-
_AST_instances = new WeakSet();
|
|
868
|
-
fillNegs_fn = function() {
|
|
869
|
-
if (this !== __privateGet(this, _root))
|
|
870
|
-
throw new Error("should only call on root");
|
|
871
|
-
if (__privateGet(this, _filledNegs))
|
|
872
|
-
return this;
|
|
873
|
-
this.toString();
|
|
874
|
-
__privateSet(this, _filledNegs, true);
|
|
875
|
-
let n;
|
|
876
|
-
while (n = __privateGet(this, _negs).pop()) {
|
|
877
|
-
if (n.type !== "!")
|
|
878
|
-
continue;
|
|
879
|
-
let p = n;
|
|
880
|
-
let pp = __privateGet(p, _parent);
|
|
881
|
-
while (pp) {
|
|
882
|
-
for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
|
|
883
|
-
for (const part of __privateGet(n, _parts)) {
|
|
884
|
-
if (typeof part === "string") {
|
|
885
|
-
throw new Error("string part in extglob AST??");
|
|
886
|
-
}
|
|
887
|
-
part.copyIn(__privateGet(pp, _parts)[i2]);
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
p = pp;
|
|
891
|
-
pp = __privateGet(p, _parent);
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
return this;
|
|
895
|
-
};
|
|
896
|
-
_AST_static = new WeakSet();
|
|
897
|
-
parseAST_fn = function(str, ast, pos, opt) {
|
|
898
|
-
var _a, _b;
|
|
899
|
-
let escaping = false;
|
|
900
|
-
let inBrace = false;
|
|
901
|
-
let braceStart = -1;
|
|
902
|
-
let braceNeg = false;
|
|
903
|
-
if (ast.type === null) {
|
|
904
|
-
let i3 = pos;
|
|
905
|
-
let acc2 = "";
|
|
906
|
-
while (i3 < str.length) {
|
|
907
|
-
const c = str.charAt(i3++);
|
|
908
|
-
if (escaping || c === "\\") {
|
|
909
|
-
escaping = !escaping;
|
|
910
|
-
acc2 += c;
|
|
911
|
-
continue;
|
|
912
|
-
}
|
|
913
|
-
if (inBrace) {
|
|
914
|
-
if (i3 === braceStart + 1) {
|
|
915
|
-
if (c === "^" || c === "!") {
|
|
916
|
-
braceNeg = true;
|
|
917
|
-
}
|
|
918
|
-
} else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
|
|
919
|
-
inBrace = false;
|
|
920
|
-
}
|
|
921
|
-
acc2 += c;
|
|
922
|
-
continue;
|
|
923
|
-
} else if (c === "[") {
|
|
924
|
-
inBrace = true;
|
|
925
|
-
braceStart = i3;
|
|
926
|
-
braceNeg = false;
|
|
927
|
-
acc2 += c;
|
|
928
|
-
continue;
|
|
929
|
-
}
|
|
930
|
-
if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
|
|
931
|
-
ast.push(acc2);
|
|
932
|
-
acc2 = "";
|
|
933
|
-
const ext2 = new _AST(c, ast);
|
|
934
|
-
i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
|
|
935
|
-
ast.push(ext2);
|
|
936
|
-
continue;
|
|
937
|
-
}
|
|
938
|
-
acc2 += c;
|
|
939
|
-
}
|
|
940
|
-
ast.push(acc2);
|
|
941
|
-
return i3;
|
|
942
|
-
}
|
|
943
|
-
let i2 = pos + 1;
|
|
944
|
-
let part = new _AST(null, ast);
|
|
945
|
-
const parts = [];
|
|
946
|
-
let acc = "";
|
|
947
|
-
while (i2 < str.length) {
|
|
948
|
-
const c = str.charAt(i2++);
|
|
949
|
-
if (escaping || c === "\\") {
|
|
950
|
-
escaping = !escaping;
|
|
951
|
-
acc += c;
|
|
952
|
-
continue;
|
|
953
|
-
}
|
|
954
|
-
if (inBrace) {
|
|
955
|
-
if (i2 === braceStart + 1) {
|
|
956
|
-
if (c === "^" || c === "!") {
|
|
957
|
-
braceNeg = true;
|
|
958
|
-
}
|
|
959
|
-
} else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
|
|
960
|
-
inBrace = false;
|
|
961
|
-
}
|
|
962
|
-
acc += c;
|
|
963
|
-
continue;
|
|
964
|
-
} else if (c === "[") {
|
|
965
|
-
inBrace = true;
|
|
966
|
-
braceStart = i2;
|
|
967
|
-
braceNeg = false;
|
|
968
|
-
acc += c;
|
|
969
|
-
continue;
|
|
970
|
-
}
|
|
971
|
-
if (isExtglobType(c) && str.charAt(i2) === "(") {
|
|
972
|
-
part.push(acc);
|
|
973
|
-
acc = "";
|
|
974
|
-
const ext2 = new _AST(c, part);
|
|
975
|
-
part.push(ext2);
|
|
976
|
-
i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
|
|
977
|
-
continue;
|
|
978
|
-
}
|
|
979
|
-
if (c === "|") {
|
|
980
|
-
part.push(acc);
|
|
981
|
-
acc = "";
|
|
982
|
-
parts.push(part);
|
|
983
|
-
part = new _AST(null, ast);
|
|
984
|
-
continue;
|
|
985
|
-
}
|
|
986
|
-
if (c === ")") {
|
|
987
|
-
if (acc === "" && __privateGet(ast, _parts).length === 0) {
|
|
988
|
-
__privateSet(ast, _emptyExt, true);
|
|
989
|
-
}
|
|
990
|
-
part.push(acc);
|
|
991
|
-
acc = "";
|
|
992
|
-
ast.push(...parts, part);
|
|
993
|
-
return i2;
|
|
994
|
-
}
|
|
995
|
-
acc += c;
|
|
996
|
-
}
|
|
997
|
-
ast.type = null;
|
|
998
|
-
__privateSet(ast, _hasMagic, void 0);
|
|
999
|
-
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
1000
|
-
return i2;
|
|
1001
|
-
};
|
|
1002
|
-
partsToRegExp_fn = function(dot) {
|
|
1003
|
-
return __privateGet(this, _parts).map((p) => {
|
|
1004
|
-
if (typeof p === "string") {
|
|
1005
|
-
throw new Error("string type in extglob ast??");
|
|
1006
|
-
}
|
|
1007
|
-
const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
|
|
1008
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
1009
|
-
return re;
|
|
1010
|
-
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
|
|
1011
|
-
};
|
|
1012
|
-
parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
1013
|
-
let escaping = false;
|
|
1014
|
-
let re = "";
|
|
1015
|
-
let uflag = false;
|
|
1016
|
-
for (let i2 = 0; i2 < glob.length; i2++) {
|
|
1017
|
-
const c = glob.charAt(i2);
|
|
1018
|
-
if (escaping) {
|
|
1019
|
-
escaping = false;
|
|
1020
|
-
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
1021
|
-
continue;
|
|
1022
|
-
}
|
|
1023
|
-
if (c === "\\") {
|
|
1024
|
-
if (i2 === glob.length - 1) {
|
|
1025
|
-
re += "\\\\";
|
|
1026
|
-
} else {
|
|
1027
|
-
escaping = true;
|
|
1028
|
-
}
|
|
1029
|
-
continue;
|
|
1030
|
-
}
|
|
1031
|
-
if (c === "[") {
|
|
1032
|
-
const [src, needUflag, consumed, magic] = parseClass(glob, i2);
|
|
1033
|
-
if (consumed) {
|
|
1034
|
-
re += src;
|
|
1035
|
-
uflag = uflag || needUflag;
|
|
1036
|
-
i2 += consumed - 1;
|
|
1037
|
-
hasMagic = hasMagic || magic;
|
|
1038
|
-
continue;
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
if (c === "*") {
|
|
1042
|
-
if (noEmpty && glob === "*")
|
|
1043
|
-
re += starNoEmpty;
|
|
1044
|
-
else
|
|
1045
|
-
re += star;
|
|
1046
|
-
hasMagic = true;
|
|
1047
|
-
continue;
|
|
1048
|
-
}
|
|
1049
|
-
if (c === "?") {
|
|
1050
|
-
re += qmark;
|
|
1051
|
-
hasMagic = true;
|
|
1052
|
-
continue;
|
|
1053
|
-
}
|
|
1054
|
-
re += regExpEscape(c);
|
|
1055
|
-
}
|
|
1056
|
-
return [re, unescape(glob), !!hasMagic, uflag];
|
|
1057
|
-
};
|
|
1058
|
-
__privateAdd(_AST, _AST_static);
|
|
1059
|
-
var AST = _AST;
|
|
1060
|
-
|
|
1061
|
-
// node_modules/minimatch/dist/esm/escape.js
|
|
1062
|
-
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
1063
|
-
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
1064
|
-
};
|
|
1065
|
-
|
|
1066
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
1067
|
-
var minimatch = (p, pattern, options = {}) => {
|
|
1068
|
-
assertValidPattern(pattern);
|
|
1069
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1070
|
-
return false;
|
|
1071
|
-
}
|
|
1072
|
-
return new Minimatch(pattern, options).match(p);
|
|
1073
|
-
};
|
|
1074
|
-
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
1075
|
-
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
|
|
1076
|
-
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
|
|
1077
|
-
var starDotExtTestNocase = (ext2) => {
|
|
1078
|
-
ext2 = ext2.toLowerCase();
|
|
1079
|
-
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
|
|
1080
|
-
};
|
|
1081
|
-
var starDotExtTestNocaseDot = (ext2) => {
|
|
1082
|
-
ext2 = ext2.toLowerCase();
|
|
1083
|
-
return (f) => f.toLowerCase().endsWith(ext2);
|
|
1084
|
-
};
|
|
1085
|
-
var starDotStarRE = /^\*+\.\*+$/;
|
|
1086
|
-
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
1087
|
-
var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
|
|
1088
|
-
var dotStarRE = /^\.\*+$/;
|
|
1089
|
-
var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
1090
|
-
var starRE = /^\*+$/;
|
|
1091
|
-
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
1092
|
-
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
1093
|
-
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
1094
|
-
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
1095
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1096
|
-
if (!ext2)
|
|
1097
|
-
return noext;
|
|
1098
|
-
ext2 = ext2.toLowerCase();
|
|
1099
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1100
|
-
};
|
|
1101
|
-
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
|
|
1102
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1103
|
-
if (!ext2)
|
|
1104
|
-
return noext;
|
|
1105
|
-
ext2 = ext2.toLowerCase();
|
|
1106
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1107
|
-
};
|
|
1108
|
-
var qmarksTestDot = ([$0, ext2 = ""]) => {
|
|
1109
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1110
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1111
|
-
};
|
|
1112
|
-
var qmarksTest = ([$0, ext2 = ""]) => {
|
|
1113
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1114
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1115
|
-
};
|
|
1116
|
-
var qmarksTestNoExt = ([$0]) => {
|
|
1117
|
-
const len = $0.length;
|
|
1118
|
-
return (f) => f.length === len && !f.startsWith(".");
|
|
1119
|
-
};
|
|
1120
|
-
var qmarksTestNoExtDot = ([$0]) => {
|
|
1121
|
-
const len = $0.length;
|
|
1122
|
-
return (f) => f.length === len && f !== "." && f !== "..";
|
|
1123
|
-
};
|
|
1124
|
-
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
1125
|
-
var path = {
|
|
1126
|
-
win32: { sep: "\\" },
|
|
1127
|
-
posix: { sep: "/" }
|
|
1128
|
-
};
|
|
1129
|
-
var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
1130
|
-
minimatch.sep = sep;
|
|
1131
|
-
var GLOBSTAR = Symbol("globstar **");
|
|
1132
|
-
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1133
|
-
var qmark2 = "[^/]";
|
|
1134
|
-
var star2 = qmark2 + "*?";
|
|
1135
|
-
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1136
|
-
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1137
|
-
var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
1138
|
-
minimatch.filter = filter;
|
|
1139
|
-
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
1140
|
-
var defaults = (def) => {
|
|
1141
|
-
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
1142
|
-
return minimatch;
|
|
1143
|
-
}
|
|
1144
|
-
const orig = minimatch;
|
|
1145
|
-
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
|
|
1146
|
-
return Object.assign(m, {
|
|
1147
|
-
Minimatch: class Minimatch extends orig.Minimatch {
|
|
1148
|
-
constructor(pattern, options = {}) {
|
|
1149
|
-
super(pattern, ext(def, options));
|
|
1150
|
-
}
|
|
1151
|
-
static defaults(options) {
|
|
1152
|
-
return orig.defaults(ext(def, options)).Minimatch;
|
|
1153
|
-
}
|
|
1154
|
-
},
|
|
1155
|
-
AST: class AST extends orig.AST {
|
|
1156
|
-
/* c8 ignore start */
|
|
1157
|
-
constructor(type, parent, options = {}) {
|
|
1158
|
-
super(type, parent, ext(def, options));
|
|
1159
|
-
}
|
|
1160
|
-
/* c8 ignore stop */
|
|
1161
|
-
static fromGlob(pattern, options = {}) {
|
|
1162
|
-
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
1163
|
-
}
|
|
1164
|
-
},
|
|
1165
|
-
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
1166
|
-
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
1167
|
-
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
1168
|
-
defaults: (options) => orig.defaults(ext(def, options)),
|
|
1169
|
-
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
1170
|
-
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
1171
|
-
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
1172
|
-
sep: orig.sep,
|
|
1173
|
-
GLOBSTAR
|
|
1174
|
-
});
|
|
1175
|
-
};
|
|
1176
|
-
minimatch.defaults = defaults;
|
|
1177
|
-
var braceExpand = (pattern, options = {}) => {
|
|
1178
|
-
assertValidPattern(pattern);
|
|
1179
|
-
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
1180
|
-
return [pattern];
|
|
1181
|
-
}
|
|
1182
|
-
return (0, import_brace_expansion.default)(pattern);
|
|
1183
|
-
};
|
|
1184
|
-
minimatch.braceExpand = braceExpand;
|
|
1185
|
-
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
1186
|
-
minimatch.makeRe = makeRe;
|
|
1187
|
-
var match = (list, pattern, options = {}) => {
|
|
1188
|
-
const mm = new Minimatch(pattern, options);
|
|
1189
|
-
list = list.filter((f) => mm.match(f));
|
|
1190
|
-
if (mm.options.nonull && !list.length) {
|
|
1191
|
-
list.push(pattern);
|
|
1192
|
-
}
|
|
1193
|
-
return list;
|
|
1194
|
-
};
|
|
1195
|
-
minimatch.match = match;
|
|
1196
|
-
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
1197
|
-
var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1198
|
-
var Minimatch = class {
|
|
1199
|
-
options;
|
|
1200
|
-
set;
|
|
1201
|
-
pattern;
|
|
1202
|
-
windowsPathsNoEscape;
|
|
1203
|
-
nonegate;
|
|
1204
|
-
negate;
|
|
1205
|
-
comment;
|
|
1206
|
-
empty;
|
|
1207
|
-
preserveMultipleSlashes;
|
|
1208
|
-
partial;
|
|
1209
|
-
globSet;
|
|
1210
|
-
globParts;
|
|
1211
|
-
nocase;
|
|
1212
|
-
isWindows;
|
|
1213
|
-
platform;
|
|
1214
|
-
windowsNoMagicRoot;
|
|
1215
|
-
regexp;
|
|
1216
|
-
constructor(pattern, options = {}) {
|
|
1217
|
-
assertValidPattern(pattern);
|
|
1218
|
-
options = options || {};
|
|
1219
|
-
this.options = options;
|
|
1220
|
-
this.pattern = pattern;
|
|
1221
|
-
this.platform = options.platform || defaultPlatform;
|
|
1222
|
-
this.isWindows = this.platform === "win32";
|
|
1223
|
-
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
1224
|
-
if (this.windowsPathsNoEscape) {
|
|
1225
|
-
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
1226
|
-
}
|
|
1227
|
-
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
1228
|
-
this.regexp = null;
|
|
1229
|
-
this.negate = false;
|
|
1230
|
-
this.nonegate = !!options.nonegate;
|
|
1231
|
-
this.comment = false;
|
|
1232
|
-
this.empty = false;
|
|
1233
|
-
this.partial = !!options.partial;
|
|
1234
|
-
this.nocase = !!this.options.nocase;
|
|
1235
|
-
this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
|
|
1236
|
-
this.globSet = [];
|
|
1237
|
-
this.globParts = [];
|
|
1238
|
-
this.set = [];
|
|
1239
|
-
this.make();
|
|
1240
|
-
}
|
|
1241
|
-
hasMagic() {
|
|
1242
|
-
if (this.options.magicalBraces && this.set.length > 1) {
|
|
1243
|
-
return true;
|
|
1244
|
-
}
|
|
1245
|
-
for (const pattern of this.set) {
|
|
1246
|
-
for (const part of pattern) {
|
|
1247
|
-
if (typeof part !== "string")
|
|
1248
|
-
return true;
|
|
1249
|
-
}
|
|
1250
|
-
}
|
|
1251
|
-
return false;
|
|
1252
|
-
}
|
|
1253
|
-
debug(..._) {
|
|
1254
|
-
}
|
|
1255
|
-
make() {
|
|
1256
|
-
const pattern = this.pattern;
|
|
1257
|
-
const options = this.options;
|
|
1258
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1259
|
-
this.comment = true;
|
|
1260
|
-
return;
|
|
1261
|
-
}
|
|
1262
|
-
if (!pattern) {
|
|
1263
|
-
this.empty = true;
|
|
1264
|
-
return;
|
|
1265
|
-
}
|
|
1266
|
-
this.parseNegate();
|
|
1267
|
-
this.globSet = [...new Set(this.braceExpand())];
|
|
1268
|
-
if (options.debug) {
|
|
1269
|
-
this.debug = (...args) => console.error(...args);
|
|
1270
|
-
}
|
|
1271
|
-
this.debug(this.pattern, this.globSet);
|
|
1272
|
-
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
1273
|
-
this.globParts = this.preprocess(rawGlobParts);
|
|
1274
|
-
this.debug(this.pattern, this.globParts);
|
|
1275
|
-
let set = this.globParts.map((s, _, __) => {
|
|
1276
|
-
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
1277
|
-
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
1278
|
-
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
1279
|
-
if (isUNC) {
|
|
1280
|
-
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
1281
|
-
} else if (isDrive) {
|
|
1282
|
-
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
return s.map((ss) => this.parse(ss));
|
|
1286
|
-
});
|
|
1287
|
-
this.debug(this.pattern, set);
|
|
1288
|
-
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
1289
|
-
if (this.isWindows) {
|
|
1290
|
-
for (let i2 = 0; i2 < this.set.length; i2++) {
|
|
1291
|
-
const p = this.set[i2];
|
|
1292
|
-
if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
|
|
1293
|
-
p[2] = "?";
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
this.debug(this.pattern, this.set);
|
|
1298
|
-
}
|
|
1299
|
-
// various transforms to equivalent pattern sets that are
|
|
1300
|
-
// faster to process in a filesystem walk. The goal is to
|
|
1301
|
-
// eliminate what we can, and push all ** patterns as far
|
|
1302
|
-
// to the right as possible, even if it increases the number
|
|
1303
|
-
// of patterns that we have to process.
|
|
1304
|
-
preprocess(globParts) {
|
|
1305
|
-
if (this.options.noglobstar) {
|
|
1306
|
-
for (let i2 = 0; i2 < globParts.length; i2++) {
|
|
1307
|
-
for (let j = 0; j < globParts[i2].length; j++) {
|
|
1308
|
-
if (globParts[i2][j] === "**") {
|
|
1309
|
-
globParts[i2][j] = "*";
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1315
|
-
if (optimizationLevel >= 2) {
|
|
1316
|
-
globParts = this.firstPhasePreProcess(globParts);
|
|
1317
|
-
globParts = this.secondPhasePreProcess(globParts);
|
|
1318
|
-
} else if (optimizationLevel >= 1) {
|
|
1319
|
-
globParts = this.levelOneOptimize(globParts);
|
|
1320
|
-
} else {
|
|
1321
|
-
globParts = this.adjascentGlobstarOptimize(globParts);
|
|
1322
|
-
}
|
|
1323
|
-
return globParts;
|
|
1324
|
-
}
|
|
1325
|
-
// just get rid of adjascent ** portions
|
|
1326
|
-
adjascentGlobstarOptimize(globParts) {
|
|
1327
|
-
return globParts.map((parts) => {
|
|
1328
|
-
let gs = -1;
|
|
1329
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1330
|
-
let i2 = gs;
|
|
1331
|
-
while (parts[i2 + 1] === "**") {
|
|
1332
|
-
i2++;
|
|
1333
|
-
}
|
|
1334
|
-
if (i2 !== gs) {
|
|
1335
|
-
parts.splice(gs, i2 - gs);
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
return parts;
|
|
1339
|
-
});
|
|
1340
|
-
}
|
|
1341
|
-
// get rid of adjascent ** and resolve .. portions
|
|
1342
|
-
levelOneOptimize(globParts) {
|
|
1343
|
-
return globParts.map((parts) => {
|
|
1344
|
-
parts = parts.reduce((set, part) => {
|
|
1345
|
-
const prev = set[set.length - 1];
|
|
1346
|
-
if (part === "**" && prev === "**") {
|
|
1347
|
-
return set;
|
|
1348
|
-
}
|
|
1349
|
-
if (part === "..") {
|
|
1350
|
-
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
1351
|
-
set.pop();
|
|
1352
|
-
return set;
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
set.push(part);
|
|
1356
|
-
return set;
|
|
1357
|
-
}, []);
|
|
1358
|
-
return parts.length === 0 ? [""] : parts;
|
|
1359
|
-
});
|
|
1360
|
-
}
|
|
1361
|
-
levelTwoFileOptimize(parts) {
|
|
1362
|
-
if (!Array.isArray(parts)) {
|
|
1363
|
-
parts = this.slashSplit(parts);
|
|
1364
|
-
}
|
|
1365
|
-
let didSomething = false;
|
|
1366
|
-
do {
|
|
1367
|
-
didSomething = false;
|
|
1368
|
-
if (!this.preserveMultipleSlashes) {
|
|
1369
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1370
|
-
const p = parts[i2];
|
|
1371
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1372
|
-
continue;
|
|
1373
|
-
if (p === "." || p === "") {
|
|
1374
|
-
didSomething = true;
|
|
1375
|
-
parts.splice(i2, 1);
|
|
1376
|
-
i2--;
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1380
|
-
didSomething = true;
|
|
1381
|
-
parts.pop();
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
let dd = 0;
|
|
1385
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1386
|
-
const p = parts[dd - 1];
|
|
1387
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1388
|
-
didSomething = true;
|
|
1389
|
-
parts.splice(dd - 1, 2);
|
|
1390
|
-
dd -= 2;
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
} while (didSomething);
|
|
1394
|
-
return parts.length === 0 ? [""] : parts;
|
|
1395
|
-
}
|
|
1396
|
-
// First phase: single-pattern processing
|
|
1397
|
-
// <pre> is 1 or more portions
|
|
1398
|
-
// <rest> is 1 or more portions
|
|
1399
|
-
// <p> is any portion other than ., .., '', or **
|
|
1400
|
-
// <e> is . or ''
|
|
1401
|
-
//
|
|
1402
|
-
// **/.. is *brutal* for filesystem walking performance, because
|
|
1403
|
-
// it effectively resets the recursive walk each time it occurs,
|
|
1404
|
-
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
1405
|
-
// or most strings (other than .., ., and '') can be.
|
|
1406
|
-
//
|
|
1407
|
-
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
1408
|
-
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
1409
|
-
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
1410
|
-
// **/**/<rest> -> **/<rest>
|
|
1411
|
-
//
|
|
1412
|
-
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
1413
|
-
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
1414
|
-
firstPhasePreProcess(globParts) {
|
|
1415
|
-
let didSomething = false;
|
|
1416
|
-
do {
|
|
1417
|
-
didSomething = false;
|
|
1418
|
-
for (let parts of globParts) {
|
|
1419
|
-
let gs = -1;
|
|
1420
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1421
|
-
let gss = gs;
|
|
1422
|
-
while (parts[gss + 1] === "**") {
|
|
1423
|
-
gss++;
|
|
1424
|
-
}
|
|
1425
|
-
if (gss > gs) {
|
|
1426
|
-
parts.splice(gs + 1, gss - gs);
|
|
1427
|
-
}
|
|
1428
|
-
let next = parts[gs + 1];
|
|
1429
|
-
const p = parts[gs + 2];
|
|
1430
|
-
const p2 = parts[gs + 3];
|
|
1431
|
-
if (next !== "..")
|
|
1432
|
-
continue;
|
|
1433
|
-
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
|
|
1434
|
-
continue;
|
|
1435
|
-
}
|
|
1436
|
-
didSomething = true;
|
|
1437
|
-
parts.splice(gs, 1);
|
|
1438
|
-
const other = parts.slice(0);
|
|
1439
|
-
other[gs] = "**";
|
|
1440
|
-
globParts.push(other);
|
|
1441
|
-
gs--;
|
|
1442
|
-
}
|
|
1443
|
-
if (!this.preserveMultipleSlashes) {
|
|
1444
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1445
|
-
const p = parts[i2];
|
|
1446
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1447
|
-
continue;
|
|
1448
|
-
if (p === "." || p === "") {
|
|
1449
|
-
didSomething = true;
|
|
1450
|
-
parts.splice(i2, 1);
|
|
1451
|
-
i2--;
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1455
|
-
didSomething = true;
|
|
1456
|
-
parts.pop();
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
let dd = 0;
|
|
1460
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1461
|
-
const p = parts[dd - 1];
|
|
1462
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1463
|
-
didSomething = true;
|
|
1464
|
-
const needDot = dd === 1 && parts[dd + 1] === "**";
|
|
1465
|
-
const splin = needDot ? ["."] : [];
|
|
1466
|
-
parts.splice(dd - 1, 2, ...splin);
|
|
1467
|
-
if (parts.length === 0)
|
|
1468
|
-
parts.push("");
|
|
1469
|
-
dd -= 2;
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
} while (didSomething);
|
|
1474
|
-
return globParts;
|
|
1475
|
-
}
|
|
1476
|
-
// second phase: multi-pattern dedupes
|
|
1477
|
-
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
1478
|
-
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
1479
|
-
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
1480
|
-
//
|
|
1481
|
-
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
1482
|
-
// ^-- not valid because ** doens't follow symlinks
|
|
1483
|
-
secondPhasePreProcess(globParts) {
|
|
1484
|
-
for (let i2 = 0; i2 < globParts.length - 1; i2++) {
|
|
1485
|
-
for (let j = i2 + 1; j < globParts.length; j++) {
|
|
1486
|
-
const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
|
|
1487
|
-
if (!matched)
|
|
1488
|
-
continue;
|
|
1489
|
-
globParts[i2] = matched;
|
|
1490
|
-
globParts[j] = [];
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
return globParts.filter((gs) => gs.length);
|
|
1494
|
-
}
|
|
1495
|
-
partsMatch(a, b, emptyGSMatch = false) {
|
|
1496
|
-
let ai = 0;
|
|
1497
|
-
let bi = 0;
|
|
1498
|
-
let result = [];
|
|
1499
|
-
let which = "";
|
|
1500
|
-
while (ai < a.length && bi < b.length) {
|
|
1501
|
-
if (a[ai] === b[bi]) {
|
|
1502
|
-
result.push(which === "b" ? b[bi] : a[ai]);
|
|
1503
|
-
ai++;
|
|
1504
|
-
bi++;
|
|
1505
|
-
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
|
|
1506
|
-
result.push(a[ai]);
|
|
1507
|
-
ai++;
|
|
1508
|
-
} else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
|
|
1509
|
-
result.push(b[bi]);
|
|
1510
|
-
bi++;
|
|
1511
|
-
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
|
|
1512
|
-
if (which === "b")
|
|
1513
|
-
return false;
|
|
1514
|
-
which = "a";
|
|
1515
|
-
result.push(a[ai]);
|
|
1516
|
-
ai++;
|
|
1517
|
-
bi++;
|
|
1518
|
-
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
|
|
1519
|
-
if (which === "a")
|
|
1520
|
-
return false;
|
|
1521
|
-
which = "b";
|
|
1522
|
-
result.push(b[bi]);
|
|
1523
|
-
ai++;
|
|
1524
|
-
bi++;
|
|
1525
|
-
} else {
|
|
1526
|
-
return false;
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
return a.length === b.length && result;
|
|
1530
|
-
}
|
|
1531
|
-
parseNegate() {
|
|
1532
|
-
if (this.nonegate)
|
|
1533
|
-
return;
|
|
1534
|
-
const pattern = this.pattern;
|
|
1535
|
-
let negate = false;
|
|
1536
|
-
let negateOffset = 0;
|
|
1537
|
-
for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
|
|
1538
|
-
negate = !negate;
|
|
1539
|
-
negateOffset++;
|
|
1540
|
-
}
|
|
1541
|
-
if (negateOffset)
|
|
1542
|
-
this.pattern = pattern.slice(negateOffset);
|
|
1543
|
-
this.negate = negate;
|
|
1544
|
-
}
|
|
1545
|
-
// set partial to true to test if, for example,
|
|
1546
|
-
// "/a/b" matches the start of "/*/b/*/d"
|
|
1547
|
-
// Partial means, if you run out of file before you run
|
|
1548
|
-
// out of pattern, then that's fine, as long as all
|
|
1549
|
-
// the parts match.
|
|
1550
|
-
matchOne(file, pattern, partial = false) {
|
|
1551
|
-
const options = this.options;
|
|
1552
|
-
if (this.isWindows) {
|
|
1553
|
-
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
1554
|
-
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
1555
|
-
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
|
|
1556
|
-
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
|
|
1557
|
-
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
1558
|
-
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
1559
|
-
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
1560
|
-
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
1561
|
-
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
1562
|
-
pattern[pdi] = fd;
|
|
1563
|
-
if (pdi > fdi) {
|
|
1564
|
-
pattern = pattern.slice(pdi);
|
|
1565
|
-
} else if (fdi > pdi) {
|
|
1566
|
-
file = file.slice(fdi);
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1572
|
-
if (optimizationLevel >= 2) {
|
|
1573
|
-
file = this.levelTwoFileOptimize(file);
|
|
1574
|
-
}
|
|
1575
|
-
this.debug("matchOne", this, { file, pattern });
|
|
1576
|
-
this.debug("matchOne", file.length, pattern.length);
|
|
1577
|
-
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
1578
|
-
this.debug("matchOne loop");
|
|
1579
|
-
var p = pattern[pi];
|
|
1580
|
-
var f = file[fi];
|
|
1581
|
-
this.debug(pattern, p, f);
|
|
1582
|
-
if (p === false) {
|
|
1583
|
-
return false;
|
|
1584
|
-
}
|
|
1585
|
-
if (p === GLOBSTAR) {
|
|
1586
|
-
this.debug("GLOBSTAR", [pattern, p, f]);
|
|
1587
|
-
var fr = fi;
|
|
1588
|
-
var pr = pi + 1;
|
|
1589
|
-
if (pr === pl) {
|
|
1590
|
-
this.debug("** at the end");
|
|
1591
|
-
for (; fi < fl; fi++) {
|
|
1592
|
-
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
|
|
1593
|
-
return false;
|
|
1594
|
-
}
|
|
1595
|
-
return true;
|
|
1596
|
-
}
|
|
1597
|
-
while (fr < fl) {
|
|
1598
|
-
var swallowee = file[fr];
|
|
1599
|
-
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
1600
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
1601
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
1602
|
-
return true;
|
|
1603
|
-
} else {
|
|
1604
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
1605
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
1606
|
-
break;
|
|
1607
|
-
}
|
|
1608
|
-
this.debug("globstar swallow a segment, and continue");
|
|
1609
|
-
fr++;
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
if (partial) {
|
|
1613
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
1614
|
-
if (fr === fl) {
|
|
1615
|
-
return true;
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
return false;
|
|
1619
|
-
}
|
|
1620
|
-
let hit;
|
|
1621
|
-
if (typeof p === "string") {
|
|
1622
|
-
hit = f === p;
|
|
1623
|
-
this.debug("string match", p, f, hit);
|
|
1624
|
-
} else {
|
|
1625
|
-
hit = p.test(f);
|
|
1626
|
-
this.debug("pattern match", p, f, hit);
|
|
1627
|
-
}
|
|
1628
|
-
if (!hit)
|
|
1629
|
-
return false;
|
|
1630
|
-
}
|
|
1631
|
-
if (fi === fl && pi === pl) {
|
|
1632
|
-
return true;
|
|
1633
|
-
} else if (fi === fl) {
|
|
1634
|
-
return partial;
|
|
1635
|
-
} else if (pi === pl) {
|
|
1636
|
-
return fi === fl - 1 && file[fi] === "";
|
|
1637
|
-
} else {
|
|
1638
|
-
throw new Error("wtf?");
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
braceExpand() {
|
|
1642
|
-
return braceExpand(this.pattern, this.options);
|
|
1643
|
-
}
|
|
1644
|
-
parse(pattern) {
|
|
1645
|
-
assertValidPattern(pattern);
|
|
1646
|
-
const options = this.options;
|
|
1647
|
-
if (pattern === "**")
|
|
1648
|
-
return GLOBSTAR;
|
|
1649
|
-
if (pattern === "")
|
|
1650
|
-
return "";
|
|
1651
|
-
let m;
|
|
1652
|
-
let fastTest = null;
|
|
1653
|
-
if (m = pattern.match(starRE)) {
|
|
1654
|
-
fastTest = options.dot ? starTestDot : starTest;
|
|
1655
|
-
} else if (m = pattern.match(starDotExtRE)) {
|
|
1656
|
-
fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
|
|
1657
|
-
} else if (m = pattern.match(qmarksRE)) {
|
|
1658
|
-
fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
|
|
1659
|
-
} else if (m = pattern.match(starDotStarRE)) {
|
|
1660
|
-
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
1661
|
-
} else if (m = pattern.match(dotStarRE)) {
|
|
1662
|
-
fastTest = dotStarTest;
|
|
1663
|
-
}
|
|
1664
|
-
const re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
1665
|
-
if (fastTest && typeof re === "object") {
|
|
1666
|
-
Reflect.defineProperty(re, "test", { value: fastTest });
|
|
1667
|
-
}
|
|
1668
|
-
return re;
|
|
1669
|
-
}
|
|
1670
|
-
makeRe() {
|
|
1671
|
-
if (this.regexp || this.regexp === false)
|
|
1672
|
-
return this.regexp;
|
|
1673
|
-
const set = this.set;
|
|
1674
|
-
if (!set.length) {
|
|
1675
|
-
this.regexp = false;
|
|
1676
|
-
return this.regexp;
|
|
1677
|
-
}
|
|
1678
|
-
const options = this.options;
|
|
1679
|
-
const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
|
|
1680
|
-
const flags = new Set(options.nocase ? ["i"] : []);
|
|
1681
|
-
let re = set.map((pattern) => {
|
|
1682
|
-
const pp = pattern.map((p) => {
|
|
1683
|
-
if (p instanceof RegExp) {
|
|
1684
|
-
for (const f of p.flags.split(""))
|
|
1685
|
-
flags.add(f);
|
|
1686
|
-
}
|
|
1687
|
-
return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
|
|
1688
|
-
});
|
|
1689
|
-
pp.forEach((p, i2) => {
|
|
1690
|
-
const next = pp[i2 + 1];
|
|
1691
|
-
const prev = pp[i2 - 1];
|
|
1692
|
-
if (p !== GLOBSTAR || prev === GLOBSTAR) {
|
|
1693
|
-
return;
|
|
1694
|
-
}
|
|
1695
|
-
if (prev === void 0) {
|
|
1696
|
-
if (next !== void 0 && next !== GLOBSTAR) {
|
|
1697
|
-
pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
1698
|
-
} else {
|
|
1699
|
-
pp[i2] = twoStar;
|
|
1700
|
-
}
|
|
1701
|
-
} else if (next === void 0) {
|
|
1702
|
-
pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
|
|
1703
|
-
} else if (next !== GLOBSTAR) {
|
|
1704
|
-
pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
1705
|
-
pp[i2 + 1] = GLOBSTAR;
|
|
1706
|
-
}
|
|
1707
|
-
});
|
|
1708
|
-
return pp.filter((p) => p !== GLOBSTAR).join("/");
|
|
1709
|
-
}).join("|");
|
|
1710
|
-
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1711
|
-
re = "^" + open + re + close + "$";
|
|
1712
|
-
if (this.negate)
|
|
1713
|
-
re = "^(?!" + re + ").+$";
|
|
1714
|
-
try {
|
|
1715
|
-
this.regexp = new RegExp(re, [...flags].join(""));
|
|
1716
|
-
} catch (ex) {
|
|
1717
|
-
this.regexp = false;
|
|
1718
|
-
}
|
|
1719
|
-
return this.regexp;
|
|
1720
|
-
}
|
|
1721
|
-
slashSplit(p) {
|
|
1722
|
-
if (this.preserveMultipleSlashes) {
|
|
1723
|
-
return p.split("/");
|
|
1724
|
-
} else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
|
|
1725
|
-
return ["", ...p.split(/\/+/)];
|
|
1726
|
-
} else {
|
|
1727
|
-
return p.split(/\/+/);
|
|
1728
|
-
}
|
|
1729
|
-
}
|
|
1730
|
-
match(f, partial = this.partial) {
|
|
1731
|
-
this.debug("match", f, this.pattern);
|
|
1732
|
-
if (this.comment) {
|
|
1733
|
-
return false;
|
|
1734
|
-
}
|
|
1735
|
-
if (this.empty) {
|
|
1736
|
-
return f === "";
|
|
1737
|
-
}
|
|
1738
|
-
if (f === "/" && partial) {
|
|
1739
|
-
return true;
|
|
1740
|
-
}
|
|
1741
|
-
const options = this.options;
|
|
1742
|
-
if (this.isWindows) {
|
|
1743
|
-
f = f.split("\\").join("/");
|
|
1744
|
-
}
|
|
1745
|
-
const ff = this.slashSplit(f);
|
|
1746
|
-
this.debug(this.pattern, "split", ff);
|
|
1747
|
-
const set = this.set;
|
|
1748
|
-
this.debug(this.pattern, "set", set);
|
|
1749
|
-
let filename = ff[ff.length - 1];
|
|
1750
|
-
if (!filename) {
|
|
1751
|
-
for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
|
|
1752
|
-
filename = ff[i2];
|
|
1753
|
-
}
|
|
1754
|
-
}
|
|
1755
|
-
for (let i2 = 0; i2 < set.length; i2++) {
|
|
1756
|
-
const pattern = set[i2];
|
|
1757
|
-
let file = ff;
|
|
1758
|
-
if (options.matchBase && pattern.length === 1) {
|
|
1759
|
-
file = [filename];
|
|
1760
|
-
}
|
|
1761
|
-
const hit = this.matchOne(file, pattern, partial);
|
|
1762
|
-
if (hit) {
|
|
1763
|
-
if (options.flipNegate) {
|
|
1764
|
-
return true;
|
|
1765
|
-
}
|
|
1766
|
-
return !this.negate;
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
if (options.flipNegate) {
|
|
1770
|
-
return false;
|
|
1771
|
-
}
|
|
1772
|
-
return this.negate;
|
|
1773
|
-
}
|
|
1774
|
-
static defaults(def) {
|
|
1775
|
-
return minimatch.defaults(def).Minimatch;
|
|
1776
|
-
}
|
|
1777
|
-
};
|
|
1778
|
-
minimatch.AST = AST;
|
|
1779
|
-
minimatch.Minimatch = Minimatch;
|
|
1780
|
-
minimatch.escape = escape;
|
|
1781
|
-
minimatch.unescape = unescape;
|
|
1782
|
-
|
|
1783
|
-
// src/utils/query-nonce-meta-tag-content.ts
|
|
1784
|
-
function queryNonceMetaTagContent(doc) {
|
|
1785
|
-
var _a, _b, _c;
|
|
1786
|
-
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
// src/utils/regular-expression.ts
|
|
1790
|
-
var escapeRegExpSpecialCharacters = (text) => {
|
|
1791
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1792
|
-
};
|
|
1793
|
-
|
|
1794
|
-
// src/utils/result.ts
|
|
1795
|
-
var result_exports = {};
|
|
1796
|
-
__export(result_exports, {
|
|
1797
|
-
err: () => err,
|
|
1798
|
-
map: () => map,
|
|
1799
|
-
ok: () => ok,
|
|
1800
|
-
unwrap: () => unwrap,
|
|
1801
|
-
unwrapErr: () => unwrapErr
|
|
1802
|
-
});
|
|
1803
|
-
var ok = (value) => ({
|
|
1804
|
-
isOk: true,
|
|
1805
|
-
isErr: false,
|
|
1806
|
-
value
|
|
1807
|
-
});
|
|
1808
|
-
var err = (value) => ({
|
|
1809
|
-
isOk: false,
|
|
1810
|
-
isErr: true,
|
|
1811
|
-
value
|
|
1812
|
-
});
|
|
1813
|
-
function map(result, fn) {
|
|
1814
|
-
if (result.isOk) {
|
|
1815
|
-
const val = fn(result.value);
|
|
1816
|
-
if (val instanceof Promise) {
|
|
1817
|
-
return val.then((newVal) => ok(newVal));
|
|
1818
|
-
} else {
|
|
1819
|
-
return ok(val);
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
if (result.isErr) {
|
|
1823
|
-
const value = result.value;
|
|
1824
|
-
return err(value);
|
|
1825
|
-
}
|
|
1826
|
-
throw "should never get here";
|
|
1827
|
-
}
|
|
1828
|
-
var unwrap = (result) => {
|
|
1829
|
-
if (result.isOk) {
|
|
1830
|
-
return result.value;
|
|
1831
|
-
} else {
|
|
1832
|
-
throw result.value;
|
|
1833
|
-
}
|
|
1834
|
-
};
|
|
1835
|
-
var unwrapErr = (result) => {
|
|
1836
|
-
if (result.isErr) {
|
|
1837
|
-
return result.value;
|
|
1838
|
-
} else {
|
|
1839
|
-
throw result.value;
|
|
1840
|
-
}
|
|
1841
|
-
};
|
|
1842
204
|
|
|
1843
205
|
// src/utils/style.ts
|
|
1844
206
|
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
@@ -1908,7 +270,7 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
|
1908
270
|
slottedNodes.push(childNode);
|
|
1909
271
|
if (typeof slotName !== "undefined") return slottedNodes;
|
|
1910
272
|
}
|
|
1911
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode
|
|
273
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(internalCall(childNode, "childNodes"), hostName, slotName)];
|
|
1912
274
|
}
|
|
1913
275
|
return slottedNodes;
|
|
1914
276
|
}
|
|
@@ -2000,6 +362,14 @@ var uniqueTime = (key, measureText) => {
|
|
|
2000
362
|
};
|
|
2001
363
|
}
|
|
2002
364
|
};
|
|
365
|
+
|
|
366
|
+
// src/utils/query-nonce-meta-tag-content.ts
|
|
367
|
+
function queryNonceMetaTagContent(doc) {
|
|
368
|
+
var _a, _b, _c;
|
|
369
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// src/runtime/styles.ts
|
|
2003
373
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
2004
374
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
2005
375
|
let style = styles.get(scopeId2);
|
|
@@ -2033,7 +403,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2033
403
|
}
|
|
2034
404
|
if (!appliedStyles.has(scopeId2)) {
|
|
2035
405
|
styleElm = win.document.createElement("style");
|
|
2036
|
-
styleElm.
|
|
406
|
+
styleElm.textContent = style;
|
|
2037
407
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2038
408
|
if (nonce != null) {
|
|
2039
409
|
styleElm.setAttribute("nonce", nonce);
|
|
@@ -2058,8 +428,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2058
428
|
}
|
|
2059
429
|
} else {
|
|
2060
430
|
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
2061
|
-
if (existingStyleContainer) {
|
|
2062
|
-
existingStyleContainer.
|
|
431
|
+
if (existingStyleContainer && true) {
|
|
432
|
+
existingStyleContainer.textContent = style + existingStyleContainer.textContent;
|
|
2063
433
|
} else {
|
|
2064
434
|
styleContainerNode.prepend(styleElm);
|
|
2065
435
|
}
|
|
@@ -2072,7 +442,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2072
442
|
styleContainerNode.insertBefore(styleElm, null);
|
|
2073
443
|
}
|
|
2074
444
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
2075
|
-
styleElm.
|
|
445
|
+
styleElm.textContent += SLOT_FB_CSS;
|
|
2076
446
|
}
|
|
2077
447
|
if (appliedStyles) {
|
|
2078
448
|
appliedStyles.add(scopeId2);
|
|
@@ -2120,6 +490,12 @@ var attachStyles = (hostRef) => {
|
|
|
2120
490
|
endAttachStyles();
|
|
2121
491
|
};
|
|
2122
492
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
493
|
+
var isComplexType = (o) => {
|
|
494
|
+
o = typeof o;
|
|
495
|
+
return o === "object" || o === "function";
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
// src/runtime/vdom/h.ts
|
|
2123
499
|
var h = (nodeName, vnodeData, ...children) => {
|
|
2124
500
|
if (typeof nodeName === "string") {
|
|
2125
501
|
nodeName = transformTag(nodeName);
|
|
@@ -2138,6 +514,11 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
2138
514
|
} else if (child != null && typeof child !== "boolean") {
|
|
2139
515
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
2140
516
|
child = String(child);
|
|
517
|
+
} else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
518
|
+
{
|
|
519
|
+
consoleError("Invalid vNode child");
|
|
520
|
+
}
|
|
521
|
+
continue;
|
|
2141
522
|
}
|
|
2142
523
|
if (simple && lastSimple) {
|
|
2143
524
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -2180,7 +561,8 @@ var newVNode = (tag, text) => {
|
|
|
2180
561
|
const vnode = {
|
|
2181
562
|
$flags$: 0,
|
|
2182
563
|
$tag$: tag,
|
|
2183
|
-
|
|
564
|
+
// Normalize undefined to null to prevent rendering "undefined" as text
|
|
565
|
+
$text$: text != null ? text : null,
|
|
2184
566
|
$elm$: null,
|
|
2185
567
|
$children$: null
|
|
2186
568
|
};
|
|
@@ -2197,18 +579,33 @@ var newVNode = (tag, text) => {
|
|
|
2197
579
|
};
|
|
2198
580
|
var Host = {};
|
|
2199
581
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
)
|
|
582
|
+
|
|
583
|
+
// src/runtime/normalize-watchers.ts
|
|
584
|
+
var normalizeWatchers = (raw) => {
|
|
585
|
+
if (!raw) return void 0;
|
|
586
|
+
const keys = Object.keys(raw);
|
|
587
|
+
if (keys.length === 0) return void 0;
|
|
588
|
+
let hasLegacy = false;
|
|
589
|
+
for (const propName of keys) {
|
|
590
|
+
if (hasLegacy) break;
|
|
591
|
+
for (const h2 of raw[propName]) {
|
|
592
|
+
if (typeof h2 === "string") {
|
|
593
|
+
hasLegacy = true;
|
|
594
|
+
break;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
if (!hasLegacy) return raw;
|
|
599
|
+
const out = {};
|
|
600
|
+
for (const propName of keys) {
|
|
601
|
+
out[propName] = raw[propName].map(
|
|
602
|
+
(h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
return out;
|
|
2208
606
|
};
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
createSupportsRuleRe(":host-context");
|
|
607
|
+
|
|
608
|
+
// src/runtime/parse-property-value.ts
|
|
2212
609
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
2213
610
|
if (propValue != null && !isComplexType(propValue)) {
|
|
2214
611
|
if (propType & 4 /* Boolean */) {
|
|
@@ -2287,7 +684,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2287
684
|
}
|
|
2288
685
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
2289
686
|
if (newValue) {
|
|
2290
|
-
newValue
|
|
687
|
+
queueRefAttachment(newValue, elm);
|
|
2291
688
|
}
|
|
2292
689
|
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2293
690
|
if (memberName[2] === "-") {
|
|
@@ -2307,6 +704,36 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2307
704
|
plt.ael(elm, memberName, newValue, capture);
|
|
2308
705
|
}
|
|
2309
706
|
}
|
|
707
|
+
} else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
|
|
708
|
+
const propName = memberName.slice(5);
|
|
709
|
+
let attrName;
|
|
710
|
+
{
|
|
711
|
+
const hostRef = getHostRef(elm);
|
|
712
|
+
if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
|
|
713
|
+
const memberMeta = hostRef.$cmpMeta$.$members$[propName];
|
|
714
|
+
if (memberMeta && memberMeta[1]) {
|
|
715
|
+
attrName = memberMeta[1];
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
if (!attrName) {
|
|
720
|
+
attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
721
|
+
}
|
|
722
|
+
if (newValue == null || newValue === false) {
|
|
723
|
+
if (newValue !== false || elm.getAttribute(attrName) === "") {
|
|
724
|
+
elm.removeAttribute(attrName);
|
|
725
|
+
}
|
|
726
|
+
} else {
|
|
727
|
+
elm.setAttribute(attrName, newValue === true ? "" : newValue);
|
|
728
|
+
}
|
|
729
|
+
return;
|
|
730
|
+
} else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
|
|
731
|
+
const propName = memberName.slice(5);
|
|
732
|
+
try {
|
|
733
|
+
elm[propName] = newValue;
|
|
734
|
+
} catch (e) {
|
|
735
|
+
}
|
|
736
|
+
return;
|
|
2310
737
|
} else {
|
|
2311
738
|
const isComplex = isComplexType(newValue);
|
|
2312
739
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
@@ -2315,7 +742,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2315
742
|
const n = newValue == null ? "" : newValue;
|
|
2316
743
|
if (memberName === "list") {
|
|
2317
744
|
isProp = false;
|
|
2318
|
-
} else if (oldValue == null || elm[memberName]
|
|
745
|
+
} else if (oldValue == null || elm[memberName] !== n) {
|
|
2319
746
|
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
2320
747
|
elm[memberName] = n;
|
|
2321
748
|
} else {
|
|
@@ -2329,7 +756,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2329
756
|
}
|
|
2330
757
|
}
|
|
2331
758
|
if (newValue == null || newValue === false) {
|
|
2332
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
759
|
+
if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
|
|
2333
760
|
{
|
|
2334
761
|
elm.removeAttribute(memberName);
|
|
2335
762
|
}
|
|
@@ -2342,6 +769,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2342
769
|
}
|
|
2343
770
|
}
|
|
2344
771
|
};
|
|
772
|
+
var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
|
|
773
|
+
var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
|
|
2345
774
|
var parseClassListRegex = /\s/;
|
|
2346
775
|
var parseClassList = (value) => {
|
|
2347
776
|
if (typeof value === "object" && value && "baseVal" in value) {
|
|
@@ -2398,6 +827,8 @@ var useNativeShadowDom = false;
|
|
|
2398
827
|
var checkSlotFallbackVisibility = false;
|
|
2399
828
|
var checkSlotRelocate = false;
|
|
2400
829
|
var isSvgMode = false;
|
|
830
|
+
var refCallbacksToRemove = [];
|
|
831
|
+
var refCallbacksToAttach = [];
|
|
2401
832
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
2402
833
|
var _a;
|
|
2403
834
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -2420,7 +851,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2420
851
|
);
|
|
2421
852
|
}
|
|
2422
853
|
}
|
|
2423
|
-
if (newVNode2.$text$
|
|
854
|
+
if (newVNode2.$text$ != null) {
|
|
2424
855
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2425
856
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2426
857
|
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
@@ -2432,9 +863,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2432
863
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
2433
864
|
}
|
|
2434
865
|
if (!win.document) {
|
|
2435
|
-
throw new Error(
|
|
2436
|
-
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
2437
|
-
);
|
|
866
|
+
throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
|
|
2438
867
|
}
|
|
2439
868
|
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
2440
869
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
@@ -2624,7 +1053,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2624
1053
|
if (idxInOld >= 0) {
|
|
2625
1054
|
elmToMove = oldCh[idxInOld];
|
|
2626
1055
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
2627
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2,
|
|
1056
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
2628
1057
|
} else {
|
|
2629
1058
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
2630
1059
|
oldCh[idxInOld] = void 0;
|
|
@@ -2682,7 +1111,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
2682
1111
|
const tag = newVNode2.$tag$;
|
|
2683
1112
|
const text = newVNode2.$text$;
|
|
2684
1113
|
let defaultHolder;
|
|
2685
|
-
if (text
|
|
1114
|
+
if (text == null) {
|
|
2686
1115
|
{
|
|
2687
1116
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
2688
1117
|
}
|
|
@@ -2729,7 +1158,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2729
1158
|
const slotName = childNode["s-sn"];
|
|
2730
1159
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
2731
1160
|
node = hostContentNodes[j];
|
|
2732
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] &&
|
|
1161
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && // let an exact named-slot match override a stale default-slot claim. Skip this for
|
|
1162
|
+
// `slotName === ''` itself - a matched default node's cached `s-sn` is `''` too, which
|
|
1163
|
+
// would trivially "match" on every re-render and force pointless re-insertion.
|
|
1164
|
+
(!node["s-sh"] || node["s-sh"] !== childNode["s-hn"] || slotName !== "" && getSlotName(node) === slotName)) {
|
|
2733
1165
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
2734
1166
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2735
1167
|
checkSlotFallbackVisibility = true;
|
|
@@ -2769,18 +1201,35 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2769
1201
|
};
|
|
2770
1202
|
var nullifyVNodeRefs = (vNode) => {
|
|
2771
1203
|
{
|
|
2772
|
-
vNode.$attrs$ && vNode.$attrs$.ref
|
|
1204
|
+
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
1205
|
+
refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
|
|
1206
|
+
}
|
|
2773
1207
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2774
1208
|
}
|
|
2775
1209
|
};
|
|
1210
|
+
var queueRefAttachment = (refCallback, elm) => {
|
|
1211
|
+
{
|
|
1212
|
+
refCallbacksToAttach.push(() => refCallback(elm));
|
|
1213
|
+
}
|
|
1214
|
+
};
|
|
1215
|
+
var flushQueuedRefCallbacks = () => {
|
|
1216
|
+
{
|
|
1217
|
+
refCallbacksToRemove.forEach((cb) => cb());
|
|
1218
|
+
refCallbacksToRemove.length = 0;
|
|
1219
|
+
refCallbacksToAttach.forEach((cb) => cb());
|
|
1220
|
+
refCallbacksToAttach.length = 0;
|
|
1221
|
+
}
|
|
1222
|
+
};
|
|
2776
1223
|
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
1224
|
+
{
|
|
1225
|
+
if (typeof newNode["s-sn"] === "string") {
|
|
1226
|
+
parent.insertBefore(newNode, reference);
|
|
1227
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
1228
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
1229
|
+
return newNode;
|
|
1230
|
+
}
|
|
2782
1231
|
}
|
|
2783
|
-
if (parent.__insertBefore) {
|
|
1232
|
+
if ((parent == null ? void 0 : parent.__insertBefore)) {
|
|
2784
1233
|
return parent.__insertBefore(newNode, reference);
|
|
2785
1234
|
} else {
|
|
2786
1235
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
@@ -2906,6 +1355,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2906
1355
|
}
|
|
2907
1356
|
}
|
|
2908
1357
|
contentRef = void 0;
|
|
1358
|
+
flushQueuedRefCallbacks();
|
|
2909
1359
|
};
|
|
2910
1360
|
|
|
2911
1361
|
// src/runtime/update-component.ts
|
|
@@ -2967,8 +1417,8 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
2967
1417
|
endSchedule();
|
|
2968
1418
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
2969
1419
|
};
|
|
2970
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((
|
|
2971
|
-
console.error(
|
|
1420
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
|
|
1421
|
+
console.error(err);
|
|
2972
1422
|
fn();
|
|
2973
1423
|
}) : fn();
|
|
2974
1424
|
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
@@ -2996,7 +1446,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
2996
1446
|
if (childrenPromises.length === 0) {
|
|
2997
1447
|
postUpdate();
|
|
2998
1448
|
} else {
|
|
2999
|
-
Promise.all(childrenPromises).then(postUpdate);
|
|
1449
|
+
Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
|
|
3000
1450
|
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
3001
1451
|
childrenPromises.length = 0;
|
|
3002
1452
|
}
|
|
@@ -3120,25 +1570,26 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3120
1570
|
});
|
|
3121
1571
|
}
|
|
3122
1572
|
}
|
|
3123
|
-
if (
|
|
1573
|
+
if (flags & 2 /* hasRendered */) {
|
|
3124
1574
|
if (instance.componentShouldUpdate) {
|
|
3125
|
-
|
|
1575
|
+
const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
|
|
1576
|
+
if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
|
|
3126
1577
|
return;
|
|
3127
1578
|
}
|
|
3128
1579
|
}
|
|
3129
|
-
|
|
1580
|
+
if (!(flags & 16 /* isQueuedForUpdate */)) {
|
|
1581
|
+
scheduleUpdate(hostRef, false);
|
|
1582
|
+
}
|
|
3130
1583
|
}
|
|
3131
1584
|
}
|
|
3132
1585
|
};
|
|
3133
|
-
|
|
3134
|
-
// src/runtime/proxy-component.ts
|
|
3135
1586
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
3136
1587
|
var _a, _b;
|
|
3137
1588
|
const prototype = Cstr.prototype;
|
|
3138
1589
|
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
3139
1590
|
{
|
|
3140
1591
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
3141
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1592
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
3142
1593
|
}
|
|
3143
1594
|
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
3144
1595
|
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
@@ -3150,7 +1601,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3150
1601
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
3151
1602
|
members.map(([memberName, [memberFlags]]) => {
|
|
3152
1603
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
3153
|
-
const { get: origGetter, set: origSetter } =
|
|
1604
|
+
const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
|
|
3154
1605
|
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
3155
1606
|
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
3156
1607
|
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
@@ -3202,21 +1653,26 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3202
1653
|
}
|
|
3203
1654
|
return;
|
|
3204
1655
|
}
|
|
3205
|
-
const
|
|
1656
|
+
const parsedValue = parsePropertyValue(
|
|
1657
|
+
newValue,
|
|
1658
|
+
memberFlags);
|
|
1659
|
+
const setterSetVal = (val) => {
|
|
3206
1660
|
const currentValue = ref.$lazyInstance$[memberName];
|
|
3207
1661
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3208
1662
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
3209
1663
|
}
|
|
3210
|
-
ref.$lazyInstance$[memberName] =
|
|
3211
|
-
newValue,
|
|
3212
|
-
memberFlags);
|
|
1664
|
+
ref.$lazyInstance$[memberName] = val;
|
|
3213
1665
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
3214
1666
|
};
|
|
3215
1667
|
if (ref.$lazyInstance$) {
|
|
3216
|
-
setterSetVal();
|
|
1668
|
+
setterSetVal(parsedValue);
|
|
3217
1669
|
} else {
|
|
1670
|
+
ref.$instanceValues$.set(memberName, parsedValue);
|
|
3218
1671
|
ref.$fetchedCbList$.push(() => {
|
|
3219
|
-
|
|
1672
|
+
const pendingValue = ref.$instanceValues$.get(memberName);
|
|
1673
|
+
if (ref.$lazyInstance$[memberName] !== pendingValue) {
|
|
1674
|
+
setterSetVal(pendingValue);
|
|
1675
|
+
}
|
|
3220
1676
|
});
|
|
3221
1677
|
}
|
|
3222
1678
|
}
|
|
@@ -3253,11 +1709,14 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3253
1709
|
return;
|
|
3254
1710
|
}
|
|
3255
1711
|
const propFlags = members.find(([m]) => m === propName);
|
|
3256
|
-
|
|
1712
|
+
const propMemberFlags = propFlags ? propFlags[1][0] : 0;
|
|
1713
|
+
const isBooleanTarget = propMemberFlags & 4 /* Boolean */;
|
|
1714
|
+
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1715
|
+
if (isBooleanTarget) {
|
|
3257
1716
|
newValue = newValue === null || newValue === "false" ? false : true;
|
|
3258
1717
|
}
|
|
3259
1718
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
3260
|
-
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1719
|
+
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3261
1720
|
this[propName] = newValue;
|
|
3262
1721
|
}
|
|
3263
1722
|
});
|
|
@@ -3279,77 +1738,95 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3279
1738
|
|
|
3280
1739
|
// src/runtime/initialize-component.ts
|
|
3281
1740
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1741
|
+
var _a;
|
|
3282
1742
|
let Cstr;
|
|
3283
|
-
|
|
3284
|
-
hostRef.$flags$
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
const
|
|
3288
|
-
if (
|
|
3289
|
-
const
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
1743
|
+
try {
|
|
1744
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1745
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1746
|
+
hostRef.$flags$ &= -1025 /* hasFailedLoad */;
|
|
1747
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1748
|
+
if (bundleId) {
|
|
1749
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1750
|
+
if (CstrImport && "then" in CstrImport) {
|
|
1751
|
+
const endLoad = uniqueTime();
|
|
1752
|
+
Cstr = await CstrImport;
|
|
1753
|
+
endLoad();
|
|
1754
|
+
} else {
|
|
1755
|
+
Cstr = CstrImport;
|
|
1756
|
+
}
|
|
1757
|
+
if (!Cstr) {
|
|
1758
|
+
hostRef.$flags$ &= -33 /* hasInitializedComponent */;
|
|
1759
|
+
hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
|
|
1760
|
+
if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
|
|
1761
|
+
hostRef.$flags$ |= 1024 /* hasFailedLoad */;
|
|
1762
|
+
}
|
|
1763
|
+
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1764
|
+
}
|
|
1765
|
+
if (!Cstr.isProxied) {
|
|
1766
|
+
{
|
|
1767
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
1768
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
1769
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1770
|
+
}
|
|
1771
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1772
|
+
Cstr.isProxied = true;
|
|
1773
|
+
}
|
|
1774
|
+
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3299
1775
|
{
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
1776
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1777
|
+
}
|
|
1778
|
+
try {
|
|
1779
|
+
new Cstr(hostRef);
|
|
1780
|
+
} catch (e) {
|
|
1781
|
+
consoleError(e, elm);
|
|
1782
|
+
}
|
|
1783
|
+
{
|
|
1784
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1785
|
+
}
|
|
1786
|
+
{
|
|
1787
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1788
|
+
}
|
|
1789
|
+
endNewInstance();
|
|
1790
|
+
const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
1791
|
+
if (!needsDeferredCallback) {
|
|
1792
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1793
|
+
} else {
|
|
1794
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
3303
1795
|
}
|
|
3304
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
3305
|
-
Cstr.isProxied = true;
|
|
3306
|
-
}
|
|
3307
|
-
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3308
|
-
{
|
|
3309
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
3310
|
-
}
|
|
3311
|
-
try {
|
|
3312
|
-
new Cstr(hostRef);
|
|
3313
|
-
} catch (e) {
|
|
3314
|
-
consoleError(e, elm);
|
|
3315
|
-
}
|
|
3316
|
-
{
|
|
3317
|
-
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
3318
|
-
}
|
|
3319
|
-
{
|
|
3320
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
3321
|
-
}
|
|
3322
|
-
endNewInstance();
|
|
3323
|
-
const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
3324
|
-
if (!needsDeferredCallback) {
|
|
3325
|
-
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
3326
1796
|
} else {
|
|
3327
|
-
|
|
1797
|
+
Cstr = elm.constructor;
|
|
1798
|
+
const cmpTag = elm.localName;
|
|
1799
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1800
|
+
}
|
|
1801
|
+
if (Cstr && Cstr.style) {
|
|
1802
|
+
let style;
|
|
1803
|
+
if (typeof Cstr.style === "string") {
|
|
1804
|
+
style = Cstr.style;
|
|
1805
|
+
}
|
|
1806
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1807
|
+
if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
|
|
1808
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
1809
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1810
|
+
endRegisterStyles();
|
|
1811
|
+
}
|
|
3328
1812
|
}
|
|
1813
|
+
}
|
|
1814
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1815
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1816
|
+
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
1817
|
+
ancestorComponent["s-rc"].push(schedule);
|
|
3329
1818
|
} else {
|
|
3330
|
-
|
|
3331
|
-
const cmpTag = elm.localName;
|
|
3332
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1819
|
+
schedule();
|
|
3333
1820
|
}
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3343
|
-
endRegisterStyles();
|
|
3344
|
-
}
|
|
1821
|
+
} catch (e) {
|
|
1822
|
+
consoleError(e, elm);
|
|
1823
|
+
if (hostRef.$onRenderResolve$) {
|
|
1824
|
+
hostRef.$onRenderResolve$();
|
|
1825
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
1826
|
+
}
|
|
1827
|
+
if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
|
|
1828
|
+
hostRef.$onReadyResolve$(elm);
|
|
3345
1829
|
}
|
|
3346
|
-
}
|
|
3347
|
-
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3348
|
-
const schedule = () => scheduleUpdate(hostRef, true);
|
|
3349
|
-
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
3350
|
-
ancestorComponent["s-rc"].push(schedule);
|
|
3351
|
-
} else {
|
|
3352
|
-
schedule();
|
|
3353
1830
|
}
|
|
3354
1831
|
};
|
|
3355
1832
|
var fireConnectedCallback = (instance, elm) => {
|
|
@@ -3386,7 +1863,7 @@ var connectedCallback = (elm) => {
|
|
|
3386
1863
|
}
|
|
3387
1864
|
if (cmpMeta.$members$) {
|
|
3388
1865
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
3389
|
-
if (memberFlags & 31 /* Prop */ &&
|
|
1866
|
+
if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
|
|
3390
1867
|
const value = elm[memberName];
|
|
3391
1868
|
delete elm[memberName];
|
|
3392
1869
|
elm[memberName] = value;
|
|
@@ -3399,6 +1876,8 @@ var connectedCallback = (elm) => {
|
|
|
3399
1876
|
} else {
|
|
3400
1877
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
3401
1878
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1879
|
+
} else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
|
|
1880
|
+
setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
|
|
3402
1881
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
3403
1882
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
3404
1883
|
}
|
|
@@ -3460,7 +1939,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3460
1939
|
let hasSlotRelocation = false;
|
|
3461
1940
|
lazyBundles.map((lazyBundle) => {
|
|
3462
1941
|
lazyBundle[1].map((compactMeta) => {
|
|
3463
|
-
var _a2, _b
|
|
1942
|
+
var _a2, _b;
|
|
3464
1943
|
const cmpMeta = {
|
|
3465
1944
|
$flags$: compactMeta[0],
|
|
3466
1945
|
$tagName$: compactMeta[1],
|
|
@@ -3474,9 +1953,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3474
1953
|
cmpMeta.$members$ = compactMeta[2];
|
|
3475
1954
|
}
|
|
3476
1955
|
{
|
|
3477
|
-
cmpMeta.$watchers$ = (
|
|
3478
|
-
cmpMeta.$serializers$ = (
|
|
3479
|
-
cmpMeta.$deserializers$ = (
|
|
1956
|
+
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
1957
|
+
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
|
1958
|
+
cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
|
|
3480
1959
|
}
|
|
3481
1960
|
const tagName = transformTag(cmpMeta.$tagName$);
|
|
3482
1961
|
const HostElement = class extends HTMLElement {
|
|
@@ -3522,7 +2001,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3522
2001
|
}
|
|
3523
2002
|
disconnectedCallback() {
|
|
3524
2003
|
plt.jmp(() => disconnectedCallback(this));
|
|
3525
|
-
|
|
2004
|
+
nextTick(() => {
|
|
3526
2005
|
var _a3;
|
|
3527
2006
|
const hostRef = getHostRef(this);
|
|
3528
2007
|
if (!hostRef) {
|