oxfmt 0.44.0 → 0.45.0
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/configuration_schema.json +4 -4
- package/dist/{acorn-BnWlLI9w.js → acorn-DazAYFEC.js} +1 -1
- package/dist/{angular-BS7_jn7o.js → angular-Aph8b0ut.js} +1303 -1197
- package/dist/{apis-mHnrEtPz.js → apis-rMlkuPw1.js} +3 -3
- package/dist/{babel-Fkr5EfJ9.js → babel-9g4Z1xEA.js} +1 -1
- package/dist/{bindings-D8fqxEoQ.js → bindings-CBKV8AbA.js} +26 -26
- package/dist/{chunk-DSjvVL_1-BYdvZw3N.js → chunk-DSjvVL_1-CHQFAj82.js} +1 -1
- package/dist/cli-worker.d.ts +2 -2
- package/dist/cli-worker.js +1 -1
- package/dist/cli.js +33 -22
- package/dist/{dist-D4weCFEt.js → dist-CKaxC7ER.js} +16 -16
- package/dist/{estree-BdH1ynKb.js → estree-ClUlOUIs.js} +2 -2
- package/dist/{flow-JTvJzd2b.js → flow-QdRUnlQt.js} +1 -1
- package/dist/{glimmer-Dj-rhc3H.js → glimmer-C693tJkh.js} +1 -1
- package/dist/{graphql-BTqRh-7l.js → graphql-za2YLVGc.js} +1 -1
- package/dist/{html-cr_GTtzg.js → html-B2VMTsz7.js} +1113 -1011
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/dist/{jiti-Bb1dT6Cw-CnTrJOrf.js → jiti-Bb1dT6Cw-DzTewG1l.js} +2 -2
- package/dist/{markdown-4I9EsAQD.js → markdown-BOatMac3.js} +1 -1
- package/dist/{meriyah-Dyll-d_f.js → meriyah-zZMvz4-D.js} +1 -1
- package/dist/{migrate-prettier-CpiJRvlG.js → migrate-prettier-B19hw9Dn.js} +1 -1
- package/dist/{postcss-k2aCwkzC.js → postcss-CBTRJb4w.js} +1 -1
- package/dist/{prettier-Dwwk1Fyx.js → prettier-CU6WrYtk.js} +17 -17
- package/dist/{resolve-pWjAK-4f-ColMfOaZ.js → resolve-pWjAK-4f-Uu3Cl5SX.js} +2 -2
- package/dist/{sorter-BZkvDMjt-BJdi7rG8.js → sorter-BZkvDMjt-ChoLEMxn.js} +7 -7
- package/dist/{sorter-DNWmw8Iu.js → sorter-QhZPi-JI.js} +2 -2
- package/dist/{typescript-G7g7T3yt.js → typescript-4s6b9-t0.js} +1 -1
- package/dist/{utils-D8dQkKEd-BtAa7w-M.js → utils-D8dQkKEd-BAc2jbyI.js} +1 -1
- package/dist/{v3-D-mr2VVh-CisVsFM0.js → v3-D-mr2VVh-D0Hfzxl7.js} +5 -5
- package/dist/{v4-C-HWEQJm-CbHL6UrB.js → v4-C-HWEQJm-BMcGKt4s.js} +5 -5
- package/dist/{yaml-BID5Twob.js → yaml-DNtivWD8.js} +1 -1
- package/package.json +20 -20
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/prettier@3.8.
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
//#region ../../node_modules/.pnpm/prettier@3.8.2/node_modules/prettier/plugins/html.mjs
|
|
2
|
+
var Lr = Object.defineProperty;
|
|
3
|
+
var Pr = (e) => {
|
|
4
4
|
throw TypeError(e);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var Zi = (e, t, r) => t in e ? Lr(e, t, {
|
|
7
7
|
enumerable: !0,
|
|
8
8
|
configurable: !0,
|
|
9
9
|
writable: !0,
|
|
10
10
|
value: r
|
|
11
11
|
}) : e[t] = r;
|
|
12
|
-
var
|
|
13
|
-
for (var r in t)
|
|
12
|
+
var Or = (e, t) => {
|
|
13
|
+
for (var r in t) Lr(e, r, {
|
|
14
14
|
get: t[r],
|
|
15
15
|
enumerable: !0
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
languages: () =>
|
|
23
|
-
options: () =>
|
|
24
|
-
parsers: () =>
|
|
25
|
-
printers: () =>
|
|
18
|
+
var Ut = (e, t, r) => Zi(e, typeof t != "symbol" ? t + "" : t, r), es = (e, t, r) => t.has(e) || Pr("Cannot " + r);
|
|
19
|
+
var Fe = (e, t, r) => (es(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Dr = (e, t, r) => t.has(e) ? Pr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r);
|
|
20
|
+
var Ji = {};
|
|
21
|
+
Or(Ji, {
|
|
22
|
+
languages: () => Vi,
|
|
23
|
+
options: () => Wi,
|
|
24
|
+
parsers: () => Nr,
|
|
25
|
+
printers: () => qo
|
|
26
26
|
});
|
|
27
|
-
var
|
|
28
|
-
var
|
|
27
|
+
var ve = (e, t) => (r, n, ...i) => r | 1 && n == null ? void 0 : (t.call(n) ?? n[e]).apply(n, i);
|
|
28
|
+
var ts = String.prototype.replaceAll ?? function(e, t) {
|
|
29
29
|
return e.global ? this.replace(e, t) : this.split(e).join(t);
|
|
30
|
-
}, w =
|
|
31
|
-
if (typeof this == "string") return
|
|
30
|
+
}, w = ve("replaceAll", function() {
|
|
31
|
+
if (typeof this == "string") return ts;
|
|
32
32
|
});
|
|
33
|
-
function
|
|
33
|
+
function ns(e) {
|
|
34
34
|
return this[e < 0 ? this.length + e : e];
|
|
35
35
|
}
|
|
36
|
-
var
|
|
37
|
-
if (Array.isArray(this) || typeof this == "string") return
|
|
36
|
+
var M = ve("at", function() {
|
|
37
|
+
if (Array.isArray(this) || typeof this == "string") return ns;
|
|
38
38
|
});
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
var ss = () => {}, He = ss;
|
|
40
|
+
var Ve = "string", Ue = "array", lt = "cursor", Te = "indent", be = "align", ct = "trim", we = "group", ke = "fill", xe = "if-break", ye = "indent-if-break", ut = "line-suffix", pt = "line-suffix-boundary", $ = "line", ht = "label", Ae = "break-parent", mt = new Set([
|
|
41
|
+
lt,
|
|
42
|
+
Te,
|
|
43
|
+
be,
|
|
44
|
+
ct,
|
|
45
|
+
we,
|
|
46
|
+
ke,
|
|
47
|
+
xe,
|
|
43
48
|
ye,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Ct,
|
|
50
|
-
vt,
|
|
51
|
-
Y,
|
|
52
|
-
Tt,
|
|
53
|
-
De
|
|
49
|
+
ut,
|
|
50
|
+
pt,
|
|
51
|
+
$,
|
|
52
|
+
ht,
|
|
53
|
+
Ae
|
|
54
54
|
]);
|
|
55
|
-
function
|
|
56
|
-
if (typeof e == "string") return
|
|
57
|
-
if (Array.isArray(e)) return
|
|
55
|
+
function as(e) {
|
|
56
|
+
if (typeof e == "string") return Ve;
|
|
57
|
+
if (Array.isArray(e)) return Ue;
|
|
58
58
|
if (!e) return;
|
|
59
59
|
let { type: t } = e;
|
|
60
|
-
if (
|
|
60
|
+
if (mt.has(t)) return t;
|
|
61
61
|
}
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
function
|
|
62
|
+
var ft = as;
|
|
63
|
+
var os = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
|
|
64
|
+
function ls(e) {
|
|
65
65
|
let t = e === null ? "null" : typeof e;
|
|
66
66
|
if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
|
|
67
67
|
Expected it to be 'string' or 'object'.`;
|
|
68
|
-
if (
|
|
68
|
+
if (ft(e)) throw new Error("doc is valid.");
|
|
69
69
|
let r = Object.prototype.toString.call(e);
|
|
70
70
|
if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
|
|
71
|
-
let n =
|
|
71
|
+
let n = os([...mt].map((i) => `'${i}'`));
|
|
72
72
|
return `Unexpected doc.type '${e.type}'.
|
|
73
73
|
Expected it to be ${n}.`;
|
|
74
74
|
}
|
|
75
|
-
var
|
|
75
|
+
var Wt = class extends Error {
|
|
76
76
|
name = "InvalidDocError";
|
|
77
77
|
constructor(t) {
|
|
78
|
-
super(
|
|
78
|
+
super(ls(t)), this.doc = t;
|
|
79
79
|
}
|
|
80
|
-
},
|
|
81
|
-
function
|
|
80
|
+
}, Ir = Wt;
|
|
81
|
+
function Gt(e, t) {
|
|
82
82
|
if (typeof e == "string") return t(e);
|
|
83
83
|
let r = /* @__PURE__ */ new Map();
|
|
84
84
|
return n(e);
|
|
@@ -88,18 +88,18 @@ function ar(e, t) {
|
|
|
88
88
|
return r.set(s, a), a;
|
|
89
89
|
}
|
|
90
90
|
function i(s) {
|
|
91
|
-
switch (
|
|
92
|
-
case
|
|
93
|
-
case
|
|
91
|
+
switch (ft(s)) {
|
|
92
|
+
case Ue: return t(s.map(n));
|
|
93
|
+
case ke: return t({
|
|
94
94
|
...s,
|
|
95
95
|
parts: s.parts.map(n)
|
|
96
96
|
});
|
|
97
|
-
case
|
|
97
|
+
case xe: return t({
|
|
98
98
|
...s,
|
|
99
99
|
breakContents: n(s.breakContents),
|
|
100
100
|
flatContents: n(s.flatContents)
|
|
101
101
|
});
|
|
102
|
-
case
|
|
102
|
+
case we: {
|
|
103
103
|
let { expandedStates: a, contents: o } = s;
|
|
104
104
|
return a ? (a = a.map(n), o = a[0]) : o = n(o), t({
|
|
105
105
|
...s,
|
|
@@ -107,121 +107,121 @@ function ar(e, t) {
|
|
|
107
107
|
expandedStates: a
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
+
case be:
|
|
111
|
+
case Te:
|
|
110
112
|
case ye:
|
|
111
|
-
case
|
|
112
|
-
case
|
|
113
|
-
case Tt:
|
|
114
|
-
case Ct: return t({
|
|
113
|
+
case ht:
|
|
114
|
+
case ut: return t({
|
|
115
115
|
...s,
|
|
116
116
|
contents: n(s.contents)
|
|
117
117
|
});
|
|
118
|
-
case
|
|
119
|
-
case
|
|
120
|
-
case
|
|
121
|
-
case
|
|
122
|
-
case
|
|
123
|
-
case
|
|
124
|
-
default: throw new
|
|
118
|
+
case Ve:
|
|
119
|
+
case lt:
|
|
120
|
+
case ct:
|
|
121
|
+
case pt:
|
|
122
|
+
case $:
|
|
123
|
+
case Ae: return t(s);
|
|
124
|
+
default: throw new Ir(s);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
function L(e, t =
|
|
129
|
-
return
|
|
128
|
+
function L(e, t = Rr) {
|
|
129
|
+
return Gt(e, (r) => typeof r == "string" ? B(t, r.split(`
|
|
130
130
|
`)) : r);
|
|
131
131
|
}
|
|
132
|
-
var D =
|
|
132
|
+
var D = He, dt = He, Mr = He, Br = He;
|
|
133
133
|
function A(e) {
|
|
134
134
|
return D(e), {
|
|
135
|
-
type:
|
|
135
|
+
type: Te,
|
|
136
136
|
contents: e
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return
|
|
141
|
-
type:
|
|
139
|
+
function cs(e, t) {
|
|
140
|
+
return Br(e), D(t), {
|
|
141
|
+
type: be,
|
|
142
142
|
contents: t,
|
|
143
143
|
n: e
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
return
|
|
146
|
+
function qr(e) {
|
|
147
|
+
return cs(Number.NEGATIVE_INFINITY, e);
|
|
148
148
|
}
|
|
149
|
-
var
|
|
150
|
-
function
|
|
151
|
-
return
|
|
152
|
-
type:
|
|
149
|
+
var Y = { type: Ae };
|
|
150
|
+
function gt(e) {
|
|
151
|
+
return Mr(e), {
|
|
152
|
+
type: ke,
|
|
153
153
|
parts: e
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
return D(e),
|
|
158
|
-
type:
|
|
156
|
+
function E(e, t = {}) {
|
|
157
|
+
return D(e), dt(t.expandedStates, !0), {
|
|
158
|
+
type: we,
|
|
159
159
|
id: t.id,
|
|
160
160
|
contents: e,
|
|
161
161
|
break: !!t.shouldBreak,
|
|
162
162
|
expandedStates: t.expandedStates
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function j(e, t = "", r = {}) {
|
|
166
166
|
return D(e), t !== "" && D(t), {
|
|
167
|
-
type:
|
|
167
|
+
type: xe,
|
|
168
168
|
breakContents: e,
|
|
169
169
|
flatContents: t,
|
|
170
170
|
groupId: r.groupId
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function Fr(e, t) {
|
|
174
174
|
return D(e), {
|
|
175
|
-
type:
|
|
175
|
+
type: ye,
|
|
176
176
|
contents: e,
|
|
177
177
|
groupId: t.groupId,
|
|
178
178
|
negate: t.negate
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
D(e),
|
|
181
|
+
function B(e, t) {
|
|
182
|
+
D(e), dt(t);
|
|
183
183
|
let r = [];
|
|
184
184
|
for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
|
|
185
185
|
return r;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
188
|
-
type:
|
|
187
|
+
var S = { type: $ }, k = {
|
|
188
|
+
type: $,
|
|
189
189
|
soft: !0
|
|
190
|
-
},
|
|
191
|
-
type:
|
|
190
|
+
}, C = [{
|
|
191
|
+
type: $,
|
|
192
192
|
hard: !0
|
|
193
|
-
},
|
|
194
|
-
type:
|
|
193
|
+
}, Y], Rr = [{
|
|
194
|
+
type: $,
|
|
195
195
|
hard: !0,
|
|
196
196
|
literal: !0
|
|
197
|
-
},
|
|
198
|
-
var
|
|
197
|
+
}, Y];
|
|
198
|
+
var Hr = Object.freeze({
|
|
199
199
|
character: "'",
|
|
200
200
|
codePoint: 39
|
|
201
|
-
}),
|
|
201
|
+
}), Vr = Object.freeze({
|
|
202
202
|
character: "\"",
|
|
203
203
|
codePoint: 34
|
|
204
|
-
}),
|
|
205
|
-
preferred:
|
|
206
|
-
alternate:
|
|
207
|
-
}),
|
|
208
|
-
preferred:
|
|
209
|
-
alternate:
|
|
204
|
+
}), hs = Object.freeze({
|
|
205
|
+
preferred: Hr,
|
|
206
|
+
alternate: Vr
|
|
207
|
+
}), ms = Object.freeze({
|
|
208
|
+
preferred: Vr,
|
|
209
|
+
alternate: Hr
|
|
210
210
|
});
|
|
211
|
-
function
|
|
212
|
-
let { preferred: r, alternate: n } = t === !0 || t === "'" ?
|
|
211
|
+
function fs(e, t) {
|
|
212
|
+
let { preferred: r, alternate: n } = t === !0 || t === "'" ? hs : ms, { length: i } = e, s = 0, a = 0;
|
|
213
213
|
for (let o = 0; o < i; o++) {
|
|
214
214
|
let c = e.charCodeAt(o);
|
|
215
215
|
c === r.codePoint ? s++ : c === n.codePoint && a++;
|
|
216
216
|
}
|
|
217
217
|
return (s > a ? n : r).character;
|
|
218
218
|
}
|
|
219
|
-
var
|
|
220
|
-
function
|
|
219
|
+
var Ur = fs;
|
|
220
|
+
function zt(e) {
|
|
221
221
|
if (typeof e != "string") throw new TypeError("Expected a string");
|
|
222
222
|
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var $t = class {
|
|
225
225
|
#e;
|
|
226
226
|
constructor(t) {
|
|
227
227
|
this.#e = new Set(t);
|
|
@@ -248,7 +248,7 @@ var lr = class {
|
|
|
248
248
|
return this.#e.has(t.charAt(0));
|
|
249
249
|
}
|
|
250
250
|
hasTrailingWhitespace(t) {
|
|
251
|
-
return this.#e.has(
|
|
251
|
+
return this.#e.has(M(0, t, -1));
|
|
252
252
|
}
|
|
253
253
|
trimStart(t) {
|
|
254
254
|
let r = this.getLeadingWhitespaceCount(t);
|
|
@@ -262,7 +262,7 @@ var lr = class {
|
|
|
262
262
|
return this.trimEnd(this.trimStart(t));
|
|
263
263
|
}
|
|
264
264
|
split(t, r = !1) {
|
|
265
|
-
let n = `[${
|
|
265
|
+
let n = `[${zt([...this.#e].join(""))}]+`, i = new RegExp(r ? `(${n})` : n, "u");
|
|
266
266
|
return t.split(i);
|
|
267
267
|
}
|
|
268
268
|
hasWhitespaceCharacter(t) {
|
|
@@ -295,7 +295,7 @@ var lr = class {
|
|
|
295
295
|
`);
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
|
-
var
|
|
298
|
+
var N = new $t([
|
|
299
299
|
" ",
|
|
300
300
|
`
|
|
301
301
|
`,
|
|
@@ -303,13 +303,13 @@ var y = new lr([
|
|
|
303
303
|
"\r",
|
|
304
304
|
" "
|
|
305
305
|
]);
|
|
306
|
-
var
|
|
306
|
+
var Yt = class extends Error {
|
|
307
307
|
name = "UnexpectedNodeError";
|
|
308
308
|
constructor(t, r, n = "type") {
|
|
309
309
|
super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`), this.node = t;
|
|
310
310
|
}
|
|
311
|
-
},
|
|
312
|
-
var
|
|
311
|
+
}, Gr = Yt;
|
|
312
|
+
var _s = new Set([
|
|
313
313
|
"sourceSpan",
|
|
314
314
|
"startSourceSpan",
|
|
315
315
|
"endSourceSpan",
|
|
@@ -322,28 +322,28 @@ var Ws = new Set([
|
|
|
322
322
|
"switchValueSourceSpan",
|
|
323
323
|
"expSourceSpan",
|
|
324
324
|
"valueSourceSpan"
|
|
325
|
-
]),
|
|
325
|
+
]), Ss = new Set([
|
|
326
326
|
"if",
|
|
327
327
|
"else if",
|
|
328
328
|
"for",
|
|
329
329
|
"switch",
|
|
330
330
|
"case"
|
|
331
331
|
]);
|
|
332
|
-
function
|
|
332
|
+
function zr(e, t, r) {
|
|
333
333
|
if (e.kind === "text" || e.kind === "comment") return null;
|
|
334
334
|
if (e.kind === "yaml" && delete t.value, e.kind === "attribute") {
|
|
335
335
|
let { fullName: n, value: i } = e;
|
|
336
336
|
n === "style" || n === "class" || n === "srcset" && (r.fullName === "img" || r.fullName === "source") || n === "allow" && r.fullName === "iframe" || n.startsWith("on") || n.startsWith("@") || n.startsWith(":") || n.startsWith(".") || n.startsWith("#") || n.startsWith("v-") || n === "vars" && r.fullName === "style" || (n === "setup" || n === "generic") && r.fullName === "script" || n === "slot-scope" || n.startsWith("(") || n.startsWith("[") || n.startsWith("*") || n.startsWith("bind") || n.startsWith("i18n") || n.startsWith("on-") || n.startsWith("ng-") || i?.includes("{{") ? delete t.value : i && (t.value = w(0, i, /'|"|'/gu, "\""));
|
|
337
337
|
}
|
|
338
|
-
if (e.kind === "docType" && (t.value = w(0, e.value.toLowerCase(), /\s+/gu, " ")), e.kind === "angularControlFlowBlock" && e.parameters?.children) for (let n of t.parameters.children)
|
|
338
|
+
if (e.kind === "docType" && (t.value = w(0, e.value.toLowerCase(), /\s+/gu, " ")), e.kind === "angularControlFlowBlock" && e.parameters?.children) for (let n of t.parameters.children) Ss.has(e.name) ? delete n.expression : n.expression = n.expression.trim();
|
|
339
339
|
e.kind === "angularIcuExpression" && (t.switchValue = e.switchValue.trim()), e.kind === "angularLetDeclarationInitializer" && delete t.value, e.kind === "element" && e.isVoid && !e.isSelfClosing && (t.isSelfClosing = !0);
|
|
340
340
|
}
|
|
341
|
-
|
|
342
|
-
var
|
|
343
|
-
function
|
|
341
|
+
zr.ignoredProperties = _s;
|
|
342
|
+
var $r = zr;
|
|
343
|
+
function X(e, t = !0) {
|
|
344
344
|
return [A([k, e]), t ? k : ""];
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function V(e, t) {
|
|
347
347
|
let r = e.type === "NGRoot" ? e.node.type === "NGMicrosyntax" && e.node.body.length === 1 && e.node.body[0].type === "NGMicrosyntaxExpression" ? e.node.body[0].expression : e.node : e.type === "JsExpressionRoot" ? e.node : e;
|
|
348
348
|
return r && (r.type === "ObjectExpression" || r.type === "ArrayExpression" || (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression" || t.parser === "__ng_binding" || t.parser === "__ng_directive") && (r.type === "TemplateLiteral" || r.type === "StringLiteral"));
|
|
349
349
|
}
|
|
@@ -358,87 +358,87 @@ async function x(e, t, r, n) {
|
|
|
358
358
|
i = n(a, o);
|
|
359
359
|
});
|
|
360
360
|
let s = await t(e, r, t);
|
|
361
|
-
return i ?
|
|
361
|
+
return i ? E(s) : X(s);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Es(e, t, r, n) {
|
|
364
364
|
let { node: i } = r, s = n.originalText.slice(i.sourceSpan.start.offset, i.sourceSpan.end.offset);
|
|
365
365
|
return /^\s*$/u.test(s) ? "" : x(s, e, {
|
|
366
366
|
parser: "__ng_directive",
|
|
367
367
|
__isInHtmlAttribute: !1
|
|
368
|
-
},
|
|
368
|
+
}, V);
|
|
369
369
|
}
|
|
370
|
-
var
|
|
371
|
-
var
|
|
370
|
+
var Yr = Es;
|
|
371
|
+
var Cs = Array.prototype.toReversed ?? function() {
|
|
372
372
|
return [...this].reverse();
|
|
373
|
-
},
|
|
374
|
-
if (Array.isArray(this)) return
|
|
373
|
+
}, jr = ve("toReversed", function() {
|
|
374
|
+
if (Array.isArray(this)) return Cs;
|
|
375
375
|
});
|
|
376
|
-
function
|
|
376
|
+
function Ts() {
|
|
377
377
|
let e = globalThis, t = e.Deno?.build?.os;
|
|
378
378
|
return typeof t == "string" ? t === "windows" : e.navigator?.platform?.startsWith("Win") ?? e.process?.platform?.startsWith("win") ?? !1;
|
|
379
379
|
}
|
|
380
|
-
var
|
|
381
|
-
function
|
|
380
|
+
var bs = Ts();
|
|
381
|
+
function Xr(e) {
|
|
382
382
|
if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
|
|
383
383
|
return e;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
return e =
|
|
385
|
+
function ws(e) {
|
|
386
|
+
return e = Xr(e), decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
e =
|
|
388
|
+
function ks(e) {
|
|
389
|
+
e = Xr(e);
|
|
390
390
|
let t = decodeURIComponent(e.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
|
|
391
391
|
return e.hostname !== "" && (t = `\\\\${e.hostname}${t}`), t;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
return
|
|
393
|
+
function jt(e) {
|
|
394
|
+
return bs ? ks(e) : ws(e);
|
|
395
395
|
}
|
|
396
|
-
var
|
|
397
|
-
function
|
|
396
|
+
var Kr = (e) => String(e).split(/[/\\]/u).pop(), Qr = (e) => String(e).startsWith("file:");
|
|
397
|
+
function xs(e) {
|
|
398
398
|
return Array.isArray(e) && e.length > 0;
|
|
399
399
|
}
|
|
400
|
-
var
|
|
401
|
-
function
|
|
400
|
+
var Ne = xs;
|
|
401
|
+
function Jr(e, t) {
|
|
402
402
|
if (!t) return;
|
|
403
|
-
let r =
|
|
403
|
+
let r = Kr(t).toLowerCase();
|
|
404
404
|
return e.find(({ filenames: n }) => n?.some((i) => i.toLowerCase() === r)) ?? e.find(({ extensions: n }) => n?.some((i) => r.endsWith(i)));
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function ys(e, t) {
|
|
407
407
|
if (t) return e.find(({ name: r }) => r.toLowerCase() === t) ?? e.find(({ aliases: r }) => r?.includes(t)) ?? e.find(({ extensions: r }) => r?.includes(`.${t}`));
|
|
408
408
|
}
|
|
409
|
-
var
|
|
410
|
-
function
|
|
409
|
+
var As = void 0;
|
|
410
|
+
function Zr(e, t) {
|
|
411
411
|
if (t) {
|
|
412
|
-
if (
|
|
413
|
-
t =
|
|
412
|
+
if (Qr(t)) try {
|
|
413
|
+
t = jt(t);
|
|
414
414
|
} catch {
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
417
417
|
if (typeof t == "string") return e.find(({ isSupported: r }) => r?.({ filepath: t }));
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
let r =
|
|
422
|
-
return (
|
|
420
|
+
function Ns(e, t) {
|
|
421
|
+
let r = jr(0, e.plugins).flatMap((i) => i.languages ?? []);
|
|
422
|
+
return (ys(r, t.language) ?? Jr(r, t.physicalFile) ?? Jr(r, t.file) ?? Zr(r, t.physicalFile) ?? Zr(r, t.file) ?? As?.(r, t.physicalFile))?.parsers[0];
|
|
423
423
|
}
|
|
424
|
-
var
|
|
425
|
-
var
|
|
426
|
-
function
|
|
427
|
-
return !!e?.[
|
|
424
|
+
var _t = Ns;
|
|
425
|
+
var St = Symbol.for("PRETTIER_IS_FRONT_MATTER");
|
|
426
|
+
function Ls(e) {
|
|
427
|
+
return !!e?.[St];
|
|
428
428
|
}
|
|
429
|
-
var
|
|
430
|
-
var
|
|
431
|
-
function
|
|
432
|
-
let t = e.slice(0,
|
|
429
|
+
var ie = Ls;
|
|
430
|
+
var We = 3;
|
|
431
|
+
function Ps(e) {
|
|
432
|
+
let t = e.slice(0, We);
|
|
433
433
|
if (t !== "---" && t !== "+++") return;
|
|
434
434
|
let r = e.indexOf(`
|
|
435
|
-
`,
|
|
435
|
+
`, We);
|
|
436
436
|
if (r === -1) return;
|
|
437
|
-
let n = e.slice(
|
|
437
|
+
let n = e.slice(We, r).trim(), i = e.indexOf(`
|
|
438
438
|
${t}`, r), s = n;
|
|
439
439
|
if (s || (s = t === "+++" ? "toml" : "yaml"), i === -1 && t === "---" && s === "yaml" && (i = e.indexOf(`
|
|
440
440
|
...`, r)), i === -1) return;
|
|
441
|
-
let a = i + 1 +
|
|
441
|
+
let a = i + 1 + We, o = e.charAt(a + 1);
|
|
442
442
|
if (!/\s?/u.test(o)) return;
|
|
443
443
|
let c = e.slice(0, a), u;
|
|
444
444
|
return {
|
|
@@ -446,7 +446,7 @@ ${t}`, r), s = n;
|
|
|
446
446
|
explicitLanguage: n || null,
|
|
447
447
|
value: e.slice(r + 1, i),
|
|
448
448
|
startDelimiter: t,
|
|
449
|
-
endDelimiter: c.slice(-
|
|
449
|
+
endDelimiter: c.slice(-We),
|
|
450
450
|
raw: c,
|
|
451
451
|
start: {
|
|
452
452
|
line: 1,
|
|
@@ -461,14 +461,14 @@ ${t}`, r), s = n;
|
|
|
461
461
|
},
|
|
462
462
|
get column() {
|
|
463
463
|
return u ?? (u = c.split(`
|
|
464
|
-
`)),
|
|
464
|
+
`)), M(0, u, -1).length;
|
|
465
465
|
}
|
|
466
466
|
},
|
|
467
|
-
[
|
|
467
|
+
[St]: !0
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
let t =
|
|
470
|
+
function Os(e) {
|
|
471
|
+
let t = Ps(e);
|
|
472
472
|
return t ? {
|
|
473
473
|
frontMatter: t,
|
|
474
474
|
get content() {
|
|
@@ -477,8 +477,8 @@ function ia(e) {
|
|
|
477
477
|
}
|
|
478
478
|
} : { content: e };
|
|
479
479
|
}
|
|
480
|
-
var
|
|
481
|
-
var
|
|
480
|
+
var Xt = Os;
|
|
481
|
+
var en = "inline", Kt = {
|
|
482
482
|
area: "none",
|
|
483
483
|
base: "none",
|
|
484
484
|
basefont: "none",
|
|
@@ -563,7 +563,7 @@ var bn = "inline", hr = {
|
|
|
563
563
|
audio: "inline-block",
|
|
564
564
|
option: "block",
|
|
565
565
|
optgroup: "block"
|
|
566
|
-
},
|
|
566
|
+
}, tn = "normal", Qt = {
|
|
567
567
|
listing: "pre",
|
|
568
568
|
plaintext: "pre",
|
|
569
569
|
pre: "pre",
|
|
@@ -572,69 +572,69 @@ var bn = "inline", hr = {
|
|
|
572
572
|
table: "initial",
|
|
573
573
|
textarea: "pre-wrap"
|
|
574
574
|
};
|
|
575
|
-
function
|
|
575
|
+
function Ds(e) {
|
|
576
576
|
return e.kind === "element" && !e.hasExplicitNamespace && !["html", "svg"].includes(e.namespace);
|
|
577
577
|
}
|
|
578
|
-
var
|
|
579
|
-
var
|
|
580
|
-
let t = e, r =
|
|
578
|
+
var se = Ds;
|
|
579
|
+
var Is = (e) => w(0, e, /^[\t\f\r ]*\n/gu, ""), Jt = (e) => Is(N.trimEnd(e)), rn = (e) => {
|
|
580
|
+
let t = e, r = N.getLeadingWhitespace(t);
|
|
581
581
|
r && (t = t.slice(r.length));
|
|
582
|
-
let n =
|
|
582
|
+
let n = N.getTrailingWhitespace(t);
|
|
583
583
|
return n && (t = t.slice(0, -n.length)), {
|
|
584
584
|
leadingWhitespace: r,
|
|
585
585
|
trailingWhitespace: n,
|
|
586
586
|
text: t
|
|
587
587
|
};
|
|
588
588
|
};
|
|
589
|
-
function
|
|
590
|
-
return !!(e.kind === "ieConditionalComment" && e.lastChild && !e.lastChild.isSelfClosing && !e.lastChild.endSourceSpan || e.kind === "ieConditionalComment" && !e.complete ||
|
|
589
|
+
function Et(e, t) {
|
|
590
|
+
return !!(e.kind === "ieConditionalComment" && e.lastChild && !e.lastChild.isSelfClosing && !e.lastChild.endSourceSpan || e.kind === "ieConditionalComment" && !e.complete || ae(e) && e.children.some((r) => r.kind !== "text" && r.kind !== "interpolation") || Tt(e, t) && !q(e, t) && e.kind !== "interpolation");
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
return e.kind === "attribute" || !e.parent || !e.prev ? !1 :
|
|
592
|
+
function oe(e) {
|
|
593
|
+
return e.kind === "attribute" || !e.parent || !e.prev ? !1 : Rs(e.prev);
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Rs(e) {
|
|
596
596
|
return e.kind === "comment" && e.value.trim() === "prettier-ignore";
|
|
597
597
|
}
|
|
598
598
|
function O(e) {
|
|
599
599
|
return e.kind === "text" || e.kind === "comment";
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return e.kind === "element" && (e.fullName === "script" || e.fullName === "style" || e.fullName === "svg:style" || e.fullName === "svg:script" || e.fullName === "mj-style" && t.parser === "mjml" ||
|
|
601
|
+
function q(e, t) {
|
|
602
|
+
return e.kind === "element" && (e.fullName === "script" || e.fullName === "style" || e.fullName === "svg:style" || e.fullName === "svg:script" || e.fullName === "mj-style" && t.parser === "mjml" || se(e) && (e.name === "script" || e.name === "style"));
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
return e.children && !
|
|
604
|
+
function nn(e, t) {
|
|
605
|
+
return e.children && !q(e, t);
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
return
|
|
607
|
+
function sn(e, t) {
|
|
608
|
+
return q(e, t) || e.kind === "interpolation" || Zt(e);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
610
|
+
function Zt(e) {
|
|
611
|
+
return gn(e).startsWith("pre");
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function an(e, t) {
|
|
614
614
|
let r = n();
|
|
615
615
|
if (r && !e.prev && e.parent?.tagDefinition?.ignoreFirstLf) return e.kind === "interpolation";
|
|
616
616
|
return r;
|
|
617
617
|
function n() {
|
|
618
|
-
return
|
|
618
|
+
return ie(e) || e.kind === "angularControlFlowBlock" ? !1 : (e.kind === "text" || e.kind === "interpolation") && e.prev && (e.prev.kind === "text" || e.prev.kind === "interpolation") ? !0 : !e.parent || e.parent.cssDisplay === "none" ? !1 : ae(e.parent) ? !0 : !(!e.prev && (e.parent.kind === "root" || ae(e) && e.parent || q(e.parent, t) || $e(e.parent, t) || !Vs(e.parent.cssDisplay)) || e.prev && !Gs(e.prev.cssDisplay));
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
function
|
|
622
|
-
return
|
|
621
|
+
function on(e, t) {
|
|
622
|
+
return ie(e) || e.kind === "angularControlFlowBlock" ? !1 : (e.kind === "text" || e.kind === "interpolation") && e.next && (e.next.kind === "text" || e.next.kind === "interpolation") ? !0 : !e.parent || e.parent.cssDisplay === "none" ? !1 : ae(e.parent) ? !0 : !(!e.next && (e.parent.kind === "root" || ae(e) && e.parent || q(e.parent, t) || $e(e.parent, t) || !Us(e.parent.cssDisplay)) || e.next && !Ws(e.next.cssDisplay));
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
return
|
|
624
|
+
function ln(e, t) {
|
|
625
|
+
return zs(e.cssDisplay) && !q(e, t);
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
return
|
|
627
|
+
function Ge(e) {
|
|
628
|
+
return ie(e) || e.next && e.sourceSpan.end && e.sourceSpan.end.line + 1 < e.next.sourceSpan.start.line;
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
return
|
|
630
|
+
function cn(e) {
|
|
631
|
+
return er(e) || e.kind === "element" && e.children.length > 0 && ([
|
|
632
632
|
"body",
|
|
633
633
|
"script",
|
|
634
634
|
"style"
|
|
635
|
-
].includes(e.name) || e.children.some((t) =>
|
|
635
|
+
].includes(e.name) || e.children.some((t) => Bs(t))) || e.firstChild && e.firstChild === e.lastChild && e.firstChild.kind !== "text" && pn(e.firstChild) && (!e.lastChild.isTrailingSpaceSensitive || hn(e.lastChild));
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function er(e) {
|
|
638
638
|
return e.kind === "element" && e.children.length > 0 && ([
|
|
639
639
|
"html",
|
|
640
640
|
"head",
|
|
@@ -643,22 +643,22 @@ function gr(e) {
|
|
|
643
643
|
"select"
|
|
644
644
|
].includes(e.name) || e.cssDisplay.startsWith("table") && e.cssDisplay !== "table-cell");
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
return
|
|
646
|
+
function Ct(e) {
|
|
647
|
+
return mn(e) || e.prev && Ms(e.prev) || un(e);
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
return
|
|
649
|
+
function Ms(e) {
|
|
650
|
+
return mn(e) || e.kind === "element" && e.fullName === "br" || un(e);
|
|
651
651
|
}
|
|
652
|
-
function
|
|
653
|
-
return
|
|
652
|
+
function un(e) {
|
|
653
|
+
return pn(e) && hn(e);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function pn(e) {
|
|
656
656
|
return e.hasLeadingSpaces && (e.prev ? e.prev.sourceSpan.end.line < e.sourceSpan.start.line : e.parent.kind === "root" || e.parent.startSourceSpan.end.line < e.sourceSpan.start.line);
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function hn(e) {
|
|
659
659
|
return e.hasTrailingSpaces && (e.next ? e.next.sourceSpan.start.line > e.sourceSpan.end.line : e.parent.kind === "root" || e.parent.endSourceSpan && e.parent.endSourceSpan.start.line > e.sourceSpan.end.line);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function mn(e) {
|
|
662
662
|
switch (e.kind) {
|
|
663
663
|
case "ieConditionalComment":
|
|
664
664
|
case "comment":
|
|
@@ -667,13 +667,13 @@ function Rn(e) {
|
|
|
667
667
|
}
|
|
668
668
|
return !1;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
return e.lastChild ?
|
|
670
|
+
function vt(e) {
|
|
671
|
+
return e.lastChild ? vt(e.lastChild) : e;
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function Bs(e) {
|
|
674
674
|
return e.children?.some((t) => t.kind !== "text");
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function fn(e) {
|
|
677
677
|
if (e) switch (e) {
|
|
678
678
|
case "module":
|
|
679
679
|
case "text/javascript":
|
|
@@ -687,51 +687,51 @@ function Mn(e) {
|
|
|
687
687
|
default: if (e.endsWith("json") || e.endsWith("importmap") || e === "speculationrules") return "json";
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function qs(e, t) {
|
|
691
691
|
let { name: r, attrMap: n } = e;
|
|
692
692
|
if (r !== "script" || Object.prototype.hasOwnProperty.call(n, "src")) return;
|
|
693
693
|
let { type: i, lang: s } = e.attrMap;
|
|
694
|
-
return !s && !i ? "babel" :
|
|
694
|
+
return !s && !i ? "babel" : _t(t, { language: s }) ?? fn(i);
|
|
695
695
|
}
|
|
696
|
-
function
|
|
697
|
-
if (!
|
|
696
|
+
function Fs(e, t) {
|
|
697
|
+
if (!Tt(e, t)) return;
|
|
698
698
|
let { attrMap: r } = e;
|
|
699
699
|
if (Object.prototype.hasOwnProperty.call(r, "src")) return;
|
|
700
700
|
let { type: n, lang: i } = r;
|
|
701
|
-
return
|
|
701
|
+
return _t(t, { language: i }) ?? fn(n);
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Hs(e, t) {
|
|
704
704
|
if (e.name === "style") {
|
|
705
705
|
let { lang: r } = e.attrMap;
|
|
706
|
-
return r ?
|
|
706
|
+
return r ? _t(t, { language: r }) : "css";
|
|
707
707
|
}
|
|
708
708
|
if (e.name === "mj-style" && t.parser === "mjml") return "css";
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
return
|
|
710
|
+
function tr(e, t) {
|
|
711
|
+
return qs(e, t) ?? Hs(e, t) ?? Fs(e, t);
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function ze(e) {
|
|
714
714
|
return e === "block" || e === "list-item" || e.startsWith("table");
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
return !
|
|
716
|
+
function Vs(e) {
|
|
717
|
+
return !ze(e) && e !== "inline-block";
|
|
718
718
|
}
|
|
719
|
-
function
|
|
720
|
-
return !
|
|
719
|
+
function Us(e) {
|
|
720
|
+
return !ze(e) && e !== "inline-block";
|
|
721
721
|
}
|
|
722
|
-
function
|
|
723
|
-
return !
|
|
722
|
+
function Ws(e) {
|
|
723
|
+
return !ze(e);
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
return !
|
|
725
|
+
function Gs(e) {
|
|
726
|
+
return !ze(e);
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
return !
|
|
728
|
+
function zs(e) {
|
|
729
|
+
return !ze(e) && e !== "inline-block";
|
|
730
730
|
}
|
|
731
|
-
function
|
|
732
|
-
return
|
|
731
|
+
function ae(e) {
|
|
732
|
+
return gn(e).startsWith("pre");
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function $s(e, t) {
|
|
735
735
|
let r = e;
|
|
736
736
|
for (; r;) {
|
|
737
737
|
if (t(r)) return !0;
|
|
@@ -739,82 +739,82 @@ function Sa(e, t) {
|
|
|
739
739
|
}
|
|
740
740
|
return !1;
|
|
741
741
|
}
|
|
742
|
-
function
|
|
743
|
-
if (
|
|
742
|
+
function dn(e, t) {
|
|
743
|
+
if (le(e, t)) return "block";
|
|
744
744
|
if (e.prev?.kind === "comment") {
|
|
745
745
|
let n = e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);
|
|
746
746
|
if (n) return n[1];
|
|
747
747
|
}
|
|
748
748
|
let r = !1;
|
|
749
|
-
if (e.kind === "element" && e.namespace === "svg") if (
|
|
749
|
+
if (e.kind === "element" && e.namespace === "svg") if ($s(e, (n) => n.fullName === "svg:foreignObject")) r = !0;
|
|
750
750
|
else return e.name === "svg" ? "inline-block" : "block";
|
|
751
751
|
switch (t.htmlWhitespaceSensitivity) {
|
|
752
752
|
case "strict": return "inline";
|
|
753
753
|
case "ignore": return "block";
|
|
754
|
-
default: if (e.kind === "element" && (!e.namespace || r ||
|
|
754
|
+
default: if (e.kind === "element" && (!e.namespace || r || se(e)) && Object.prototype.hasOwnProperty.call(Kt, e.name)) return Kt[e.name];
|
|
755
755
|
}
|
|
756
|
-
return
|
|
756
|
+
return en;
|
|
757
757
|
}
|
|
758
|
-
function
|
|
759
|
-
return e.kind === "element" && (!e.namespace ||
|
|
758
|
+
function gn(e) {
|
|
759
|
+
return e.kind === "element" && (!e.namespace || se(e)) && Object.prototype.hasOwnProperty.call(Qt, e.name) ? Qt[e.name] : tn;
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function rr(e) {
|
|
762
762
|
return w(0, w(0, e, "'", "'"), """, "\"");
|
|
763
763
|
}
|
|
764
764
|
function b(e) {
|
|
765
|
-
return
|
|
765
|
+
return rr(e.value);
|
|
766
766
|
}
|
|
767
|
-
var
|
|
767
|
+
var Ys = new Set([
|
|
768
768
|
"template",
|
|
769
769
|
"style",
|
|
770
770
|
"script"
|
|
771
771
|
]);
|
|
772
|
-
function
|
|
773
|
-
return
|
|
772
|
+
function $e(e, t) {
|
|
773
|
+
return le(e, t) && !Ys.has(e.fullName);
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function le(e, t) {
|
|
776
776
|
return t.parser === "vue" && e.kind === "element" && e.parent.kind === "root" && e.fullName.toLowerCase() !== "html";
|
|
777
777
|
}
|
|
778
|
-
function
|
|
779
|
-
return
|
|
778
|
+
function Tt(e, t) {
|
|
779
|
+
return le(e, t) && ($e(e, t) || e.attrMap.lang && e.attrMap.lang !== "html");
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function _n(e) {
|
|
782
782
|
let t = e.fullName;
|
|
783
783
|
return t.charAt(0) === "#" || t === "slot-scope" || t === "v-slot" || t.startsWith("v-slot:");
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function Sn(e, t) {
|
|
786
786
|
let r = e.parent;
|
|
787
|
-
if (!
|
|
787
|
+
if (!le(r, t)) return !1;
|
|
788
788
|
let n = r.fullName, i = e.fullName;
|
|
789
789
|
return n === "script" && i === "setup" || n === "style" && i === "vars";
|
|
790
790
|
}
|
|
791
|
-
function
|
|
792
|
-
return e.parent.isWhitespaceSensitive ? e.parent.isIndentationSensitive ? L(t) : L(
|
|
791
|
+
function bt(e, t = e.value) {
|
|
792
|
+
return e.parent.isWhitespaceSensitive ? e.parent.isIndentationSensitive ? L(t) : L(N.dedentString(Jt(t)), C) : B(S, N.split(t));
|
|
793
793
|
}
|
|
794
|
-
function
|
|
795
|
-
return
|
|
794
|
+
function wt(e, t) {
|
|
795
|
+
return le(e, t) && e.name === "script";
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function js(e) {
|
|
798
798
|
let { valueSpan: t, value: r } = e;
|
|
799
799
|
return t.end.offset - t.start.offset === r.length + 2;
|
|
800
800
|
}
|
|
801
|
-
function
|
|
802
|
-
if (
|
|
801
|
+
function kt(e, t) {
|
|
802
|
+
if (js(e)) return !1;
|
|
803
803
|
let { value: r } = e;
|
|
804
804
|
return /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r) || t.parser === "lwc" && r.startsWith("{") && r.endsWith("}");
|
|
805
805
|
}
|
|
806
|
-
var
|
|
807
|
-
async function
|
|
806
|
+
var En = /\{\{(.+?)\}\}/su, Cn = ({ node: { value: e } }) => En.test(e);
|
|
807
|
+
async function vn(e, t, r) {
|
|
808
808
|
let n = b(r.node), i = [];
|
|
809
|
-
for (let [s, a] of n.split(
|
|
809
|
+
for (let [s, a] of n.split(En).entries()) if (s % 2 === 0) i.push(L(a));
|
|
810
810
|
else try {
|
|
811
|
-
i.push(
|
|
811
|
+
i.push(E([
|
|
812
812
|
"{{",
|
|
813
|
-
A([
|
|
813
|
+
A([S, await x(a, e, {
|
|
814
814
|
parser: "__ng_interpolation",
|
|
815
815
|
__isInHtmlInterpolation: !0
|
|
816
816
|
})]),
|
|
817
|
-
|
|
817
|
+
S,
|
|
818
818
|
"}}"
|
|
819
819
|
]));
|
|
820
820
|
} catch {
|
|
@@ -822,44 +822,44 @@ async function Wn(e, t, r) {
|
|
|
822
822
|
}
|
|
823
823
|
return i;
|
|
824
824
|
}
|
|
825
|
-
var
|
|
825
|
+
var nr = (e) => (t, r, n) => x(b(n.node), t, { parser: e }, V), Xs = [
|
|
826
826
|
{
|
|
827
827
|
test(e) {
|
|
828
828
|
let t = e.node.fullName;
|
|
829
829
|
return t.startsWith("(") && t.endsWith(")") || t.startsWith("on-");
|
|
830
830
|
},
|
|
831
|
-
print:
|
|
831
|
+
print: nr("__ng_action")
|
|
832
832
|
},
|
|
833
833
|
{
|
|
834
834
|
test(e) {
|
|
835
835
|
let t = e.node.fullName;
|
|
836
836
|
return t.startsWith("[") && t.endsWith("]") || /^bind(?:on)?-/u.test(t) || /^ng-(?:if|show|hide|class|style)$/u.test(t);
|
|
837
837
|
},
|
|
838
|
-
print:
|
|
838
|
+
print: nr("__ng_binding")
|
|
839
839
|
},
|
|
840
840
|
{
|
|
841
841
|
test: (e) => e.node.fullName.startsWith("*"),
|
|
842
|
-
print:
|
|
842
|
+
print: nr("__ng_directive")
|
|
843
843
|
},
|
|
844
844
|
{
|
|
845
845
|
test: (e) => /^i18n(?:-.+)?$/u.test(e.node.fullName),
|
|
846
|
-
print:
|
|
846
|
+
print: Ks
|
|
847
847
|
},
|
|
848
848
|
{
|
|
849
|
-
test:
|
|
850
|
-
print:
|
|
849
|
+
test: Cn,
|
|
850
|
+
print: vn
|
|
851
851
|
}
|
|
852
852
|
].map(({ test: e, print: t }) => ({
|
|
853
853
|
test: (r, n) => n.parser === "angular" && e(r),
|
|
854
854
|
print: t
|
|
855
855
|
}));
|
|
856
|
-
function
|
|
856
|
+
function Ks(e, t, { node: r }) {
|
|
857
857
|
let n = b(r);
|
|
858
|
-
return
|
|
858
|
+
return X(gt(bt(r, n.trim())), !n.includes("@@"));
|
|
859
859
|
}
|
|
860
|
-
var
|
|
861
|
-
var
|
|
862
|
-
var
|
|
860
|
+
var Tn = Xs;
|
|
861
|
+
var bn = ({ node: e }, t) => !t.parentParser && e.fullName === "class" && !e.value.includes("{{"), wn = (e, t, r) => b(r.node).trim().split(/\s+/u).join(" ");
|
|
862
|
+
var Js = new Set([
|
|
863
863
|
"onabort",
|
|
864
864
|
"onafterprint",
|
|
865
865
|
"onauxclick",
|
|
@@ -950,15 +950,15 @@ var wa = new Set([
|
|
|
950
950
|
"onvolumechange",
|
|
951
951
|
"onwaiting",
|
|
952
952
|
"onwheel"
|
|
953
|
-
]),
|
|
953
|
+
]), kn = ({ node: e }, t) => Js.has(e.fullName) && !t.parentParser && !e.value.includes("{{"), xn = (e, t, r) => x(b(r.node), e, {
|
|
954
954
|
parser: "babel",
|
|
955
955
|
__isHtmlInlineEventHandler: !0
|
|
956
956
|
}, () => !1);
|
|
957
|
-
function
|
|
957
|
+
function Zs(e) {
|
|
958
958
|
let t = [];
|
|
959
959
|
for (let r of e.split(";")) {
|
|
960
|
-
if (r =
|
|
961
|
-
let [n, ...i] =
|
|
960
|
+
if (r = N.trim(r), !r) continue;
|
|
961
|
+
let [n, ...i] = N.split(r);
|
|
962
962
|
t.push({
|
|
963
963
|
name: n,
|
|
964
964
|
value: i
|
|
@@ -966,113 +966,113 @@ function ka(e) {
|
|
|
966
966
|
}
|
|
967
967
|
return t;
|
|
968
968
|
}
|
|
969
|
-
var
|
|
970
|
-
var
|
|
971
|
-
function
|
|
972
|
-
let { node: n } = r, i =
|
|
973
|
-
return i.length === 0 ? [""] :
|
|
969
|
+
var yn = Zs;
|
|
970
|
+
var An = ({ node: e }, t) => e.fullName === "allow" && !t.parentParser && e.parent.fullName === "iframe" && !e.value.includes("{{");
|
|
971
|
+
function Nn(e, t, r) {
|
|
972
|
+
let { node: n } = r, i = yn(b(n));
|
|
973
|
+
return i.length === 0 ? [""] : X(i.map(({ name: s, value: a }, o) => [[s, ...a].join(" "), o === i.length - 1 ? j(";") : [";", S]]));
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function Ln(e) {
|
|
976
976
|
return e === " " || e === `
|
|
977
977
|
` || e === "\f" || e === "\r" || e === " ";
|
|
978
978
|
}
|
|
979
|
-
var
|
|
980
|
-
function
|
|
979
|
+
var ea = /^[ \t\n\r\u000c]+/, ta = /^[, \t\n\r\u000c]+/, ra = /^[^ \t\n\r\u000c]+/, na = /[,]+$/, Pn = /^\d+$/, ia = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;
|
|
980
|
+
function sa(e) {
|
|
981
981
|
let t = e.length, r, n, i, s, a, o = 0, c;
|
|
982
982
|
function u(m) {
|
|
983
|
-
let
|
|
984
|
-
if (
|
|
983
|
+
let _, T = m.exec(e.substring(o));
|
|
984
|
+
if (T) return [_] = T, o += _.length, _;
|
|
985
985
|
}
|
|
986
986
|
let p = [];
|
|
987
987
|
for (;;) {
|
|
988
|
-
if (u(
|
|
988
|
+
if (u(ta), o >= t) {
|
|
989
989
|
if (p.length === 0) throw new Error("Must contain one or more image candidate strings.");
|
|
990
990
|
return p;
|
|
991
991
|
}
|
|
992
|
-
c = o, r = u(
|
|
992
|
+
c = o, r = u(ra), n = [], r.slice(-1) === "," ? (r = r.replace(na, ""), g()) : d();
|
|
993
993
|
}
|
|
994
994
|
function d() {
|
|
995
|
-
for (u(
|
|
996
|
-
if (a = e.charAt(o), s === "in descriptor") if (
|
|
995
|
+
for (u(ea), i = "", s = "in descriptor";;) {
|
|
996
|
+
if (a = e.charAt(o), s === "in descriptor") if (Ln(a)) i && (n.push(i), i = "", s = "after descriptor");
|
|
997
997
|
else if (a === ",") {
|
|
998
|
-
o += 1, i && n.push(i),
|
|
998
|
+
o += 1, i && n.push(i), g();
|
|
999
999
|
return;
|
|
1000
1000
|
} else if (a === "(") i += a, s = "in parens";
|
|
1001
1001
|
else if (a === "") {
|
|
1002
|
-
i && n.push(i),
|
|
1002
|
+
i && n.push(i), g();
|
|
1003
1003
|
return;
|
|
1004
1004
|
} else i += a;
|
|
1005
1005
|
else if (s === "in parens") if (a === ")") i += a, s = "in descriptor";
|
|
1006
1006
|
else if (a === "") {
|
|
1007
|
-
n.push(i),
|
|
1007
|
+
n.push(i), g();
|
|
1008
1008
|
return;
|
|
1009
1009
|
} else i += a;
|
|
1010
|
-
else if (s === "after descriptor" && !
|
|
1011
|
-
|
|
1010
|
+
else if (s === "after descriptor" && !Ln(a)) if (a === "") {
|
|
1011
|
+
g();
|
|
1012
1012
|
return;
|
|
1013
1013
|
} else s = "in descriptor", o -= 1;
|
|
1014
1014
|
o += 1;
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
let m = !1,
|
|
1019
|
-
for (z = 0; z < n.length; z++)
|
|
1020
|
-
if (!m)
|
|
1017
|
+
function g() {
|
|
1018
|
+
let m = !1, _, T, P, z, ne = {}, Q, ot, Ce, qe, Vt;
|
|
1019
|
+
for (z = 0; z < n.length; z++) Q = n[z], ot = Q[Q.length - 1], Ce = Q.substring(0, Q.length - 1), qe = parseInt(Ce, 10), Vt = parseFloat(Ce), Pn.test(Ce) && ot === "w" ? ((_ || T) && (m = !0), qe === 0 ? m = !0 : _ = qe) : ia.test(Ce) && ot === "x" ? ((_ || T || P) && (m = !0), Vt < 0 ? m = !0 : T = Vt) : Pn.test(Ce) && ot === "h" ? ((P || T) && (m = !0), qe === 0 ? m = !0 : P = qe) : m = !0;
|
|
1020
|
+
if (!m) ne.source = {
|
|
1021
1021
|
value: r,
|
|
1022
1022
|
startOffset: c
|
|
1023
|
-
},
|
|
1024
|
-
else throw new Error(`Invalid srcset descriptor found in "${e}" at "${
|
|
1023
|
+
}, _ && (ne.width = { value: _ }), T && (ne.density = { value: T }), P && (ne.height = { value: P }), p.push(ne);
|
|
1024
|
+
else throw new Error(`Invalid srcset descriptor found in "${e}" at "${Q}".`);
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
|
-
var
|
|
1028
|
-
var
|
|
1027
|
+
var On = sa;
|
|
1028
|
+
var Dn = (e) => e.node.fullName === "srcset" && (e.parent.fullName === "img" || e.parent.fullName === "source"), In = {
|
|
1029
1029
|
width: "w",
|
|
1030
1030
|
height: "h",
|
|
1031
1031
|
density: "x"
|
|
1032
|
-
},
|
|
1033
|
-
function
|
|
1034
|
-
let i =
|
|
1032
|
+
}, aa = Object.keys(In);
|
|
1033
|
+
function Rn(e, t, r) {
|
|
1034
|
+
let i = On(b(r.node)), s = aa.filter((m) => i.some((_) => Object.prototype.hasOwnProperty.call(_, m)));
|
|
1035
1035
|
if (s.length > 1) throw new Error("Mixed descriptor in srcset is not supported");
|
|
1036
|
-
let [a] = s, o =
|
|
1037
|
-
let
|
|
1038
|
-
return
|
|
1039
|
-
}),
|
|
1040
|
-
return
|
|
1041
|
-
let
|
|
1036
|
+
let [a] = s, o = In[a], c = i.map((m) => m.source.value), u = Math.max(...c.map((m) => m.length)), p = i.map((m) => m[a] ? String(m[a].value) : ""), d = p.map((m) => {
|
|
1037
|
+
let _ = m.indexOf(".");
|
|
1038
|
+
return _ === -1 ? m.length : _;
|
|
1039
|
+
}), g = Math.max(...d);
|
|
1040
|
+
return X(B([",", S], c.map((m, _) => {
|
|
1041
|
+
let T = [m], P = p[_];
|
|
1042
1042
|
if (P) {
|
|
1043
|
-
let z = u - m.length + 1,
|
|
1044
|
-
|
|
1043
|
+
let z = u - m.length + 1, ne = g - d[_], Q = " ".repeat(z + ne);
|
|
1044
|
+
T.push(j(Q, " "), P + o);
|
|
1045
1045
|
}
|
|
1046
|
-
return
|
|
1046
|
+
return T;
|
|
1047
1047
|
})));
|
|
1048
1048
|
}
|
|
1049
|
-
var
|
|
1049
|
+
var Mn = ({ node: e }, t) => e.fullName === "style" && !t.parentParser && !e.value.includes("{{"), Bn = async (e, t, r) => X(await e(b(r.node), {
|
|
1050
1050
|
parser: "css",
|
|
1051
1051
|
__isHTMLStyleAttribute: !0
|
|
1052
1052
|
}));
|
|
1053
|
-
var
|
|
1054
|
-
function
|
|
1053
|
+
var sr = /* @__PURE__ */ new WeakMap();
|
|
1054
|
+
function oa(e, t) {
|
|
1055
1055
|
let { root: r } = e;
|
|
1056
|
-
return
|
|
1056
|
+
return sr.has(r) || sr.set(r, r.children.some((n) => wt(n, t) && ["ts", "typescript"].includes(n.attrMap.lang))), sr.get(r);
|
|
1057
1057
|
}
|
|
1058
|
-
var
|
|
1059
|
-
function
|
|
1058
|
+
var U = oa;
|
|
1059
|
+
function qn(e, t, r) {
|
|
1060
1060
|
return x(`type T<${b(r.node)}> = any`, e, {
|
|
1061
1061
|
parser: "babel-ts",
|
|
1062
1062
|
__isEmbeddedTypescriptGenericParameters: !0
|
|
1063
|
-
},
|
|
1063
|
+
}, V);
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
let i = b(r.node), s =
|
|
1065
|
+
function Fn(e, t, r, n) {
|
|
1066
|
+
let i = b(r.node), s = U(r, n) ? "babel-ts" : "babel";
|
|
1067
1067
|
return x(`function _(${i}) {}`, e, {
|
|
1068
1068
|
parser: s,
|
|
1069
1069
|
__isVueBindings: !0
|
|
1070
1070
|
});
|
|
1071
1071
|
}
|
|
1072
|
-
async function
|
|
1073
|
-
let { left: s, operator: a, right: o } =
|
|
1072
|
+
async function Hn(e, t, r, n) {
|
|
1073
|
+
let { left: s, operator: a, right: o } = la(b(r.node)), c = U(r, n);
|
|
1074
1074
|
return [
|
|
1075
|
-
|
|
1075
|
+
E(await x(`function _(${s}) {}`, e, {
|
|
1076
1076
|
parser: c ? "babel-ts" : "babel",
|
|
1077
1077
|
__isVueForBindingLeft: !0
|
|
1078
1078
|
})),
|
|
@@ -1082,7 +1082,7 @@ async function li(e, t, r, n) {
|
|
|
1082
1082
|
await x(o, e, { parser: c ? "__ts_expression" : "__js_expression" })
|
|
1083
1083
|
];
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function la(e) {
|
|
1086
1086
|
let t = /(.*?)\s+(in|of)\s+(.*)/su, r = /,([^,\]}]*)(?:,([^,\]}]*))?$/u, n = /^\(|\)$/gu, i = e.match(t);
|
|
1087
1087
|
if (!i) return;
|
|
1088
1088
|
let s = { for: i[3].trim() };
|
|
@@ -1100,128 +1100,128 @@ function Ia(e) {
|
|
|
1100
1100
|
right: s.for
|
|
1101
1101
|
};
|
|
1102
1102
|
}
|
|
1103
|
-
var
|
|
1103
|
+
var ca = [
|
|
1104
1104
|
{
|
|
1105
1105
|
test: (e) => e.node.fullName === "v-for",
|
|
1106
|
-
print:
|
|
1106
|
+
print: Hn
|
|
1107
1107
|
},
|
|
1108
1108
|
{
|
|
1109
|
-
test: (e, t) => e.node.fullName === "generic" &&
|
|
1110
|
-
print:
|
|
1109
|
+
test: (e, t) => e.node.fullName === "generic" && wt(e.parent, t),
|
|
1110
|
+
print: qn
|
|
1111
1111
|
},
|
|
1112
1112
|
{
|
|
1113
|
-
test: ({ node: e }, t) =>
|
|
1114
|
-
print:
|
|
1113
|
+
test: ({ node: e }, t) => _n(e) || Sn(e, t),
|
|
1114
|
+
print: Fn
|
|
1115
1115
|
},
|
|
1116
1116
|
{
|
|
1117
1117
|
test(e) {
|
|
1118
1118
|
let t = e.node.fullName;
|
|
1119
1119
|
return t.startsWith("@") || t.startsWith("v-on:");
|
|
1120
1120
|
},
|
|
1121
|
-
print:
|
|
1121
|
+
print: ua
|
|
1122
1122
|
},
|
|
1123
1123
|
{
|
|
1124
1124
|
test(e) {
|
|
1125
1125
|
let t = e.node.fullName;
|
|
1126
1126
|
return t.startsWith(":") || t.startsWith(".") || t.startsWith("v-bind:");
|
|
1127
1127
|
},
|
|
1128
|
-
print:
|
|
1128
|
+
print: pa
|
|
1129
1129
|
},
|
|
1130
1130
|
{
|
|
1131
1131
|
test: (e) => e.node.fullName.startsWith("v-"),
|
|
1132
|
-
print:
|
|
1132
|
+
print: Vn
|
|
1133
1133
|
}
|
|
1134
1134
|
].map(({ test: e, print: t }) => ({
|
|
1135
1135
|
test: (r, n) => n.parser === "vue" && e(r, n),
|
|
1136
1136
|
print: t
|
|
1137
1137
|
}));
|
|
1138
|
-
async function
|
|
1138
|
+
async function ua(e, t, r, n) {
|
|
1139
1139
|
try {
|
|
1140
|
-
return await
|
|
1140
|
+
return await Vn(e, t, r, n);
|
|
1141
1141
|
} catch (a) {
|
|
1142
1142
|
if (a.cause?.code !== "BABEL_PARSER_SYNTAX_ERROR") throw a;
|
|
1143
1143
|
}
|
|
1144
|
-
return x(b(r.node), e, { parser:
|
|
1144
|
+
return x(b(r.node), e, { parser: U(r, n) ? "__vue_ts_event_binding" : "__vue_event_binding" }, V);
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1147
|
-
return x(b(r.node), e, { parser:
|
|
1146
|
+
function pa(e, t, r, n) {
|
|
1147
|
+
return x(b(r.node), e, { parser: U(r, n) ? "__vue_ts_expression" : "__vue_expression" }, V);
|
|
1148
1148
|
}
|
|
1149
|
-
function
|
|
1150
|
-
return x(b(r.node), e, { parser:
|
|
1149
|
+
function Vn(e, t, r, n) {
|
|
1150
|
+
return x(b(r.node), e, { parser: U(r, n) ? "__ts_expression" : "__js_expression" }, V);
|
|
1151
1151
|
}
|
|
1152
|
-
var
|
|
1152
|
+
var ha = [
|
|
1153
1153
|
{
|
|
1154
|
-
test:
|
|
1155
|
-
print:
|
|
1154
|
+
test: Dn,
|
|
1155
|
+
print: Rn
|
|
1156
1156
|
},
|
|
1157
1157
|
{
|
|
1158
|
-
test:
|
|
1159
|
-
print:
|
|
1158
|
+
test: Mn,
|
|
1159
|
+
print: Bn
|
|
1160
1160
|
},
|
|
1161
1161
|
{
|
|
1162
|
-
test:
|
|
1163
|
-
print:
|
|
1162
|
+
test: kn,
|
|
1163
|
+
print: xn
|
|
1164
1164
|
},
|
|
1165
1165
|
{
|
|
1166
|
-
test:
|
|
1167
|
-
print:
|
|
1166
|
+
test: bn,
|
|
1167
|
+
print: wn
|
|
1168
1168
|
},
|
|
1169
1169
|
{
|
|
1170
|
-
test:
|
|
1171
|
-
print:
|
|
1170
|
+
test: An,
|
|
1171
|
+
print: Nn
|
|
1172
1172
|
},
|
|
1173
|
-
...
|
|
1174
|
-
...
|
|
1173
|
+
...ca,
|
|
1174
|
+
...Tn
|
|
1175
1175
|
].map(({ test: e, print: t }) => ({
|
|
1176
1176
|
test: e,
|
|
1177
|
-
print:
|
|
1177
|
+
print: fa(t)
|
|
1178
1178
|
}));
|
|
1179
|
-
function
|
|
1179
|
+
function ma(e, t) {
|
|
1180
1180
|
let { node: r } = e, { value: n } = r;
|
|
1181
|
-
if (n) return
|
|
1181
|
+
if (n) return kt(r, t) ? [
|
|
1182
1182
|
r.rawName,
|
|
1183
1183
|
"=",
|
|
1184
1184
|
n
|
|
1185
|
-
] :
|
|
1185
|
+
] : ha.find(({ test: i }) => i(e, t))?.print;
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function fa(e) {
|
|
1188
1188
|
return async (t, r, n, i) => {
|
|
1189
1189
|
let s = await e(t, r, n, i);
|
|
1190
|
-
if (s) return s =
|
|
1190
|
+
if (s) return s = Gt(s, (a) => typeof a == "string" ? w(0, a, "\"", """) : a), [
|
|
1191
1191
|
n.node.rawName,
|
|
1192
1192
|
"=\"",
|
|
1193
|
-
|
|
1193
|
+
E(s),
|
|
1194
1194
|
"\""
|
|
1195
1195
|
];
|
|
1196
1196
|
};
|
|
1197
1197
|
}
|
|
1198
|
-
var
|
|
1199
|
-
var
|
|
1200
|
-
function
|
|
1201
|
-
return [e.isSelfClosing ? "" :
|
|
1198
|
+
var Wn = ma;
|
|
1199
|
+
var K = (e) => e.sourceSpan.start.offset, J = (e) => e.sourceSpan.end.offset;
|
|
1200
|
+
function Ye(e, t) {
|
|
1201
|
+
return [e.isSelfClosing ? "" : da(e, t), ce(e, t)];
|
|
1202
1202
|
}
|
|
1203
|
-
function
|
|
1204
|
-
return e.lastChild &&
|
|
1203
|
+
function da(e, t) {
|
|
1204
|
+
return e.lastChild && he(e.lastChild) ? "" : [ga(e, t), xt(e, t)];
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1207
|
-
return (e.next ?
|
|
1206
|
+
function ce(e, t) {
|
|
1207
|
+
return (e.next ? W(e.next) : pe(e.parent)) ? "" : [ue(e, t), F(e, t)];
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1210
|
-
return
|
|
1209
|
+
function ga(e, t) {
|
|
1210
|
+
return pe(e) ? ue(e.lastChild, t) : "";
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1213
|
-
return
|
|
1212
|
+
function F(e, t) {
|
|
1213
|
+
return he(e) ? xt(e.parent, t) : je(e) ? yt(e.next, t) : "";
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1216
|
-
if (
|
|
1215
|
+
function xt(e, t) {
|
|
1216
|
+
if (zn(e, t)) return "";
|
|
1217
1217
|
switch (e.kind) {
|
|
1218
1218
|
case "ieConditionalComment": return "<!";
|
|
1219
1219
|
case "element": if (e.hasHtmComponentClosingTag) return "<//";
|
|
1220
1220
|
default: return `</${e.rawName}`;
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1224
|
-
if (
|
|
1223
|
+
function ue(e, t) {
|
|
1224
|
+
if (zn(e, t)) return "";
|
|
1225
1225
|
switch (e.kind) {
|
|
1226
1226
|
case "ieConditionalComment":
|
|
1227
1227
|
case "ieConditionalEndComment": return "[endif]-->";
|
|
@@ -1232,53 +1232,53 @@ function de(e, t) {
|
|
|
1232
1232
|
default: return ">";
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
return !e.isSelfClosing && !e.endSourceSpan && (
|
|
1235
|
+
function zn(e, t) {
|
|
1236
|
+
return !e.isSelfClosing && !e.endSourceSpan && (oe(e) || Et(e.parent, t));
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1238
|
+
function W(e) {
|
|
1239
1239
|
return e.prev && e.prev.kind !== "docType" && e.kind !== "angularControlFlowBlock" && !O(e.prev) && e.isLeadingSpaceSensitive && !e.hasLeadingSpaces;
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1242
|
-
return e.lastChild?.isTrailingSpaceSensitive && !e.lastChild.hasTrailingSpaces && !O(
|
|
1241
|
+
function pe(e) {
|
|
1242
|
+
return e.lastChild?.isTrailingSpaceSensitive && !e.lastChild.hasTrailingSpaces && !O(vt(e.lastChild)) && !ae(e);
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
return !e.next && !e.hasTrailingSpaces && e.isTrailingSpaceSensitive && O(
|
|
1244
|
+
function he(e) {
|
|
1245
|
+
return !e.next && !e.hasTrailingSpaces && e.isTrailingSpaceSensitive && O(vt(e));
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function je(e) {
|
|
1248
1248
|
return e.next && !O(e.next) && O(e) && e.isTrailingSpaceSensitive && !e.hasTrailingSpaces;
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function _a(e) {
|
|
1251
1251
|
let t = e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);
|
|
1252
1252
|
return t ? t[1] ? t[1].split(/\s+/u) : !0 : !1;
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function Xe(e) {
|
|
1255
1255
|
return !e.prev && e.isLeadingSpaceSensitive && !e.hasLeadingSpaces;
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function Sa(e, t, r) {
|
|
1258
1258
|
let { node: n } = e;
|
|
1259
|
-
if (!
|
|
1260
|
-
let i = n.prev?.kind === "comment" &&
|
|
1261
|
-
return n.firstChild &&
|
|
1259
|
+
if (!Ne(n.attrs)) return n.isSelfClosing ? " " : "";
|
|
1260
|
+
let i = n.prev?.kind === "comment" && _a(n.prev.value), s = typeof i == "boolean" ? () => i : Array.isArray(i) ? (d) => i.includes(d.rawName) : () => !1, a = e.map(({ node: d }) => s(d) ? L(t.originalText.slice(K(d), J(d))) : r(), "attrs"), o = n.kind === "element" && n.fullName === "script" && n.attrs.length === 1 && n.attrs[0].fullName === "src" && n.children.length === 0, u = t.singleAttributePerLine && n.attrs.length > 1 && !le(n, t) ? C : S, p = [A([o ? " " : S, B(u, a)])];
|
|
1261
|
+
return n.firstChild && Xe(n.firstChild) || n.isSelfClosing && pe(n.parent) || o ? p.push(n.isSelfClosing ? " " : "") : p.push(t.bracketSameLine ? n.isSelfClosing ? " " : "" : n.isSelfClosing ? S : k), p;
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return e.firstChild &&
|
|
1263
|
+
function Ea(e) {
|
|
1264
|
+
return e.firstChild && Xe(e.firstChild) ? "" : At(e);
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function Ke(e, t, r) {
|
|
1267
1267
|
let { node: n } = e;
|
|
1268
1268
|
return [
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
n.isSelfClosing ? "" :
|
|
1269
|
+
me(n, t),
|
|
1270
|
+
Sa(e, t, r),
|
|
1271
|
+
n.isSelfClosing ? "" : Ea(n)
|
|
1272
1272
|
];
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1275
|
-
return e.prev &&
|
|
1274
|
+
function me(e, t) {
|
|
1275
|
+
return e.prev && je(e.prev) ? "" : [H(e, t), yt(e, t)];
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1278
|
-
return
|
|
1277
|
+
function H(e, t) {
|
|
1278
|
+
return Xe(e) ? At(e.parent) : W(e) ? ue(e.prev, t) : "";
|
|
1279
1279
|
}
|
|
1280
|
-
var
|
|
1281
|
-
function
|
|
1280
|
+
var Gn = "<!doctype";
|
|
1281
|
+
function yt(e, t) {
|
|
1282
1282
|
switch (e.kind) {
|
|
1283
1283
|
case "ieConditionalComment":
|
|
1284
1284
|
case "ieConditionalStartComment": return `<!--[if ${e.condition}`;
|
|
@@ -1287,67 +1287,67 @@ function Bt(e, t) {
|
|
|
1287
1287
|
case "docType": {
|
|
1288
1288
|
if (e.value === "html") {
|
|
1289
1289
|
let { filepath: n } = t;
|
|
1290
|
-
if (n && /\.html?$/u.test(n)) return
|
|
1290
|
+
if (n && /\.html?$/u.test(n)) return Gn;
|
|
1291
1291
|
}
|
|
1292
|
-
let r =
|
|
1293
|
-
return t.originalText.slice(r, r +
|
|
1292
|
+
let r = K(e);
|
|
1293
|
+
return t.originalText.slice(r, r + Gn.length);
|
|
1294
1294
|
}
|
|
1295
1295
|
case "angularIcuExpression": return "{";
|
|
1296
1296
|
case "element": if (e.condition) return `<!--[if ${e.condition}]><!--><${e.rawName}`;
|
|
1297
1297
|
default: return `<${e.rawName}`;
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1300
|
+
function At(e) {
|
|
1301
1301
|
switch (e.kind) {
|
|
1302
1302
|
case "ieConditionalComment": return "]>";
|
|
1303
1303
|
case "element": if (e.condition) return "><!--<![endif]-->";
|
|
1304
1304
|
default: return ">";
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function Ca(e, t) {
|
|
1308
1308
|
if (!e.endSourceSpan) return "";
|
|
1309
1309
|
let r = e.startSourceSpan.end.offset;
|
|
1310
|
-
e.firstChild &&
|
|
1310
|
+
e.firstChild && Xe(e.firstChild) && (r -= At(e).length);
|
|
1311
1311
|
let n = e.endSourceSpan.start.offset;
|
|
1312
|
-
return e.lastChild &&
|
|
1312
|
+
return e.lastChild && he(e.lastChild) ? n += xt(e, t).length : pe(e) && (n -= ue(e.lastChild, t).length), t.originalText.slice(r, n);
|
|
1313
1313
|
}
|
|
1314
|
-
var
|
|
1315
|
-
var
|
|
1314
|
+
var Nt = Ca;
|
|
1315
|
+
var va = new Set([
|
|
1316
1316
|
"if",
|
|
1317
1317
|
"else if",
|
|
1318
1318
|
"for",
|
|
1319
1319
|
"switch",
|
|
1320
1320
|
"case"
|
|
1321
1321
|
]);
|
|
1322
|
-
function
|
|
1322
|
+
function Ta(e, t) {
|
|
1323
1323
|
let { node: r } = e;
|
|
1324
1324
|
switch (r.kind) {
|
|
1325
1325
|
case "element":
|
|
1326
|
-
if (
|
|
1327
|
-
if (!r.isSelfClosing &&
|
|
1328
|
-
let n =
|
|
1326
|
+
if (q(r, t) || r.kind === "interpolation") return;
|
|
1327
|
+
if (!r.isSelfClosing && Tt(r, t)) {
|
|
1328
|
+
let n = tr(r, t);
|
|
1329
1329
|
return n ? async (i, s) => {
|
|
1330
|
-
let a =
|
|
1331
|
-
return o || (c = await i(
|
|
1330
|
+
let a = Nt(r, t), o = /^\s*$/u.test(a), c = "";
|
|
1331
|
+
return o || (c = await i(Jt(a), {
|
|
1332
1332
|
parser: n,
|
|
1333
1333
|
__embeddedInHtml: !0
|
|
1334
1334
|
}), o = c === ""), [
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
o ? "" :
|
|
1335
|
+
H(r, t),
|
|
1336
|
+
E(Ke(e, t, s)),
|
|
1337
|
+
o ? "" : C,
|
|
1338
1338
|
c,
|
|
1339
|
-
o ? "" :
|
|
1340
|
-
|
|
1341
|
-
|
|
1339
|
+
o ? "" : C,
|
|
1340
|
+
Ye(r, t),
|
|
1341
|
+
F(r, t)
|
|
1342
1342
|
];
|
|
1343
1343
|
} : void 0;
|
|
1344
1344
|
}
|
|
1345
1345
|
break;
|
|
1346
1346
|
case "text":
|
|
1347
|
-
if (
|
|
1348
|
-
let n =
|
|
1347
|
+
if (q(r.parent, t)) {
|
|
1348
|
+
let n = tr(r.parent, t);
|
|
1349
1349
|
if (n) return async (i) => {
|
|
1350
|
-
let s = n === "markdown" ?
|
|
1350
|
+
let s = n === "markdown" ? N.dedentString(r.value.replace(/^[^\S\n]*\n/u, "")) : r.value, a = {
|
|
1351
1351
|
parser: n,
|
|
1352
1352
|
__embeddedInHtml: !0
|
|
1353
1353
|
};
|
|
@@ -1356,10 +1356,10 @@ function ja(e, t) {
|
|
|
1356
1356
|
c && (c.type === "module" || (c.type === "text/babel" || c.type === "text/jsx") && c["data-type"] === "module") && (o = "module"), a.__babelSourceType = o;
|
|
1357
1357
|
}
|
|
1358
1358
|
return [
|
|
1359
|
-
|
|
1360
|
-
|
|
1359
|
+
Y,
|
|
1360
|
+
H(r, t),
|
|
1361
1361
|
await i(s, a),
|
|
1362
|
-
|
|
1362
|
+
F(r, t)
|
|
1363
1363
|
];
|
|
1364
1364
|
};
|
|
1365
1365
|
} else if (r.parent.kind === "interpolation") return async (n) => {
|
|
@@ -1367,33 +1367,33 @@ function ja(e, t) {
|
|
|
1367
1367
|
__isInHtmlInterpolation: !0,
|
|
1368
1368
|
__embeddedInHtml: !0
|
|
1369
1369
|
};
|
|
1370
|
-
return t.parser === "angular" ? i.parser = "__ng_interpolation" : t.parser === "vue" ? i.parser =
|
|
1370
|
+
return t.parser === "angular" ? i.parser = "__ng_interpolation" : t.parser === "vue" ? i.parser = U(e, t) ? "__vue_ts_expression" : "__vue_expression" : i.parser = "__js_expression", [A([S, await n(r.value, i)]), r.parent.next && W(r.parent.next) ? " " : S];
|
|
1371
1371
|
};
|
|
1372
1372
|
break;
|
|
1373
|
-
case "attribute": return
|
|
1374
|
-
case "angularControlFlowBlockParameters": return
|
|
1373
|
+
case "attribute": return Wn(e, t);
|
|
1374
|
+
case "angularControlFlowBlockParameters": return va.has(e.parent.name) ? Yr : void 0;
|
|
1375
1375
|
case "angularLetDeclarationInitializer": return (n) => x(r.value, n, {
|
|
1376
1376
|
parser: "__ng_binding",
|
|
1377
1377
|
__isInHtmlAttribute: !1
|
|
1378
1378
|
});
|
|
1379
1379
|
}
|
|
1380
1380
|
}
|
|
1381
|
-
var
|
|
1382
|
-
var
|
|
1383
|
-
function
|
|
1384
|
-
if (
|
|
1385
|
-
let t =
|
|
1386
|
-
return
|
|
1381
|
+
var $n = Ta;
|
|
1382
|
+
var Qe = null;
|
|
1383
|
+
function Je(e) {
|
|
1384
|
+
if (Qe !== null && typeof Qe.property) {
|
|
1385
|
+
let t = Qe;
|
|
1386
|
+
return Qe = Je.prototype = null, t;
|
|
1387
1387
|
}
|
|
1388
|
-
return
|
|
1388
|
+
return Qe = Je.prototype = e ?? Object.create(null), new Je();
|
|
1389
1389
|
}
|
|
1390
|
-
var
|
|
1391
|
-
for (let e = 0; e <=
|
|
1392
|
-
function
|
|
1393
|
-
return
|
|
1390
|
+
var ba = 10;
|
|
1391
|
+
for (let e = 0; e <= ba; e++) Je();
|
|
1392
|
+
function ar(e) {
|
|
1393
|
+
return Je(e);
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1396
|
-
|
|
1395
|
+
function wa(e, t = "type") {
|
|
1396
|
+
ar(e);
|
|
1397
1397
|
function r(n) {
|
|
1398
1398
|
let i = n[t], s = e[i];
|
|
1399
1399
|
if (!Array.isArray(s)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${i}'.`), { node: n });
|
|
@@ -1401,9 +1401,9 @@ function Ka(e, t = "type") {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
return r;
|
|
1403
1403
|
}
|
|
1404
|
-
var
|
|
1404
|
+
var Yn = wa;
|
|
1405
1405
|
var I = [["children"], []];
|
|
1406
|
-
var
|
|
1406
|
+
var Xn = Yn({
|
|
1407
1407
|
root: I[0],
|
|
1408
1408
|
element: ["attrs", "children"],
|
|
1409
1409
|
ieConditionalComment: I[0],
|
|
@@ -1423,12 +1423,12 @@ var _i = di({
|
|
|
1423
1423
|
angularIcuExpression: ["cases"],
|
|
1424
1424
|
angularIcuCase: ["expression"]
|
|
1425
1425
|
}, "kind");
|
|
1426
|
-
var
|
|
1427
|
-
var
|
|
1428
|
-
var
|
|
1426
|
+
var Kn = "format";
|
|
1427
|
+
var Qn = /^\s*<!--\s*@(?:noformat|noprettier)\s*-->/u, Jn = /^\s*<!--\s*@(?:format|prettier)\s*-->/u;
|
|
1428
|
+
var Zn = (e) => Jn.test(e), ei = (e) => Qn.test(e), ti = (e) => `<!-- @${Kn} -->
|
|
1429
1429
|
|
|
1430
1430
|
${e}`;
|
|
1431
|
-
var
|
|
1431
|
+
var ri = new Map([
|
|
1432
1432
|
["if", new Set(["else if", "else"])],
|
|
1433
1433
|
["else if", new Set(["else if", "else"])],
|
|
1434
1434
|
["for", new Set(["empty"])],
|
|
@@ -1453,125 +1453,126 @@ var wi = new Map([
|
|
|
1453
1453
|
"loading"
|
|
1454
1454
|
])]
|
|
1455
1455
|
]);
|
|
1456
|
-
function
|
|
1457
|
-
let t =
|
|
1458
|
-
return e.kind === "element" && !e.endSourceSpan &&
|
|
1456
|
+
function ni(e) {
|
|
1457
|
+
let t = J(e);
|
|
1458
|
+
return e.kind === "element" && !e.endSourceSpan && Ne(e.children) ? Math.max(t, ni(M(0, e.children, -1))) : t;
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function Ze(e, t, r) {
|
|
1461
1461
|
let n = e.node;
|
|
1462
|
-
if (
|
|
1463
|
-
let i =
|
|
1462
|
+
if (oe(n)) {
|
|
1463
|
+
let i = ni(n);
|
|
1464
1464
|
return [
|
|
1465
|
-
|
|
1466
|
-
L(
|
|
1467
|
-
|
|
1465
|
+
H(n, t),
|
|
1466
|
+
L(N.trimEnd(t.originalText.slice(K(n) + (n.prev && je(n.prev) ? yt(n).length : 0), i - (n.next && W(n.next) ? ue(n, t).length : 0)))),
|
|
1467
|
+
F(n, t)
|
|
1468
1468
|
];
|
|
1469
1469
|
}
|
|
1470
1470
|
return r();
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1473
|
-
return O(e) && O(t) ? e.isTrailingSpaceSensitive ? e.hasTrailingSpaces ?
|
|
1472
|
+
function Lt(e, t) {
|
|
1473
|
+
return O(e) && O(t) ? e.isTrailingSpaceSensitive ? e.hasTrailingSpaces ? Ct(t) ? C : S : "" : Ct(t) ? C : k : je(e) && (oe(t) || t.firstChild || t.isSelfClosing || t.kind === "element" && t.attrs.length > 0) || e.kind === "element" && e.isSelfClosing && W(t) ? "" : !t.isLeadingSpaceSensitive || Ct(t) || W(t) && e.lastChild && he(e.lastChild) && e.lastChild.lastChild && he(e.lastChild.lastChild) ? C : t.hasLeadingSpaces ? S : k;
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1475
|
+
function Le(e, t, r) {
|
|
1476
1476
|
let { node: n } = e;
|
|
1477
|
-
if (
|
|
1478
|
-
let s = e.node, a = s.prev ?
|
|
1479
|
-
return [a ? [a,
|
|
1477
|
+
if (er(n)) return [Y, ...e.map(() => {
|
|
1478
|
+
let s = e.node, a = s.prev ? Lt(s.prev, s) : "";
|
|
1479
|
+
return [a ? [a, Ge(s.prev) ? C : ""] : "", Ze(e, t, r)];
|
|
1480
1480
|
}, "children")];
|
|
1481
1481
|
let i = n.children.map(() => Symbol(""));
|
|
1482
1482
|
return e.map(({ node: s, index: a }) => {
|
|
1483
1483
|
if (O(s)) {
|
|
1484
1484
|
if (s.prev && O(s.prev)) {
|
|
1485
|
-
let m =
|
|
1486
|
-
if (m) return
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
] : [m,
|
|
1485
|
+
let m = Lt(s.prev, s);
|
|
1486
|
+
if (m) return Ge(s.prev) ? [
|
|
1487
|
+
C,
|
|
1488
|
+
C,
|
|
1489
|
+
Ze(e, t, r)
|
|
1490
|
+
] : [m, Ze(e, t, r)];
|
|
1491
1491
|
}
|
|
1492
|
-
return
|
|
1492
|
+
return Ze(e, t, r);
|
|
1493
1493
|
}
|
|
1494
|
-
let o = [], c = [], u = [], p = [], d = s.prev ?
|
|
1495
|
-
return d && (
|
|
1494
|
+
let o = [], c = [], u = [], p = [], d = s.prev ? Lt(s.prev, s) : "", g = s.next ? Lt(s, s.next) : "";
|
|
1495
|
+
return d && (Ge(s.prev) ? o.push(C, C) : d === C ? o.push(C) : O(s.prev) ? c.push(d) : c.push(j("", k, { groupId: i[a - 1] }))), g && (Ge(s) ? O(s.next) && p.push(C, C) : g === C ? O(s.next) && p.push(C) : u.push(g)), [
|
|
1496
1496
|
...o,
|
|
1497
|
-
|
|
1497
|
+
E([...c, E([Ze(e, t, r), ...u], { id: i[a] })]),
|
|
1498
1498
|
...p
|
|
1499
1499
|
];
|
|
1500
1500
|
}, "children");
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function ii(e, t, r) {
|
|
1503
1503
|
let { node: n } = e, i = [];
|
|
1504
|
-
if (
|
|
1504
|
+
if (Na(e) && i.push("} "), i.push("@", n.name), ya(n)) return i.push(";"), i;
|
|
1505
|
+
if (n.parameters && i.push(" (", E(r("parameters")), ")"), !Aa(n)) {
|
|
1505
1506
|
i.push(" {");
|
|
1506
|
-
let s =
|
|
1507
|
-
n.children.length > 0 ? (n.firstChild.hasLeadingSpaces = !0, n.lastChild.hasTrailingSpaces = !0, i.push(A([
|
|
1507
|
+
let s = si(n);
|
|
1508
|
+
n.children.length > 0 ? (n.firstChild.hasLeadingSpaces = !0, n.lastChild.hasTrailingSpaces = !0, i.push(A([C, Le(e, t, r)])), s && i.push(C, "}")) : s && i.push("}");
|
|
1508
1509
|
}
|
|
1509
|
-
return
|
|
1510
|
+
return E(i, { shouldBreak: !0 });
|
|
1510
1511
|
}
|
|
1511
|
-
function
|
|
1512
|
-
return !(e.next?.kind === "angularControlFlowBlock" &&
|
|
1512
|
+
function si(e) {
|
|
1513
|
+
return !(e.next?.kind === "angularControlFlowBlock" && ri.get(e.name)?.has(e.next.name));
|
|
1513
1514
|
}
|
|
1514
|
-
var
|
|
1515
|
-
function
|
|
1516
|
-
return
|
|
1515
|
+
var xa = (e) => e?.kind === "angularControlFlowBlock" && (e.name === "case" || e.name === "default"), ya = (e) => e?.kind === "angularControlFlowBlock" && e.name === "default never";
|
|
1516
|
+
function Aa(e) {
|
|
1517
|
+
return xa(e) && e.endSourceSpan && e.endSourceSpan.start.offset === e.endSourceSpan.end.offset;
|
|
1517
1518
|
}
|
|
1518
|
-
function
|
|
1519
|
+
function Na(e) {
|
|
1519
1520
|
let { previous: t } = e;
|
|
1520
|
-
return t?.kind === "angularControlFlowBlock" && !
|
|
1521
|
+
return t?.kind === "angularControlFlowBlock" && !oe(t) && !si(t);
|
|
1521
1522
|
}
|
|
1522
|
-
function
|
|
1523
|
-
return [A([k,
|
|
1523
|
+
function ai(e, t, r) {
|
|
1524
|
+
return [A([k, B([";", S], e.map(r, "children"))]), k];
|
|
1524
1525
|
}
|
|
1525
|
-
function
|
|
1526
|
+
function oi(e, t, r) {
|
|
1526
1527
|
let { node: n } = e;
|
|
1527
1528
|
return [
|
|
1528
|
-
|
|
1529
|
-
|
|
1529
|
+
me(n, t),
|
|
1530
|
+
E([
|
|
1530
1531
|
n.switchValue.trim(),
|
|
1531
1532
|
", ",
|
|
1532
1533
|
n.type,
|
|
1533
|
-
n.cases.length > 0 ? [",", A([
|
|
1534
|
+
n.cases.length > 0 ? [",", A([S, B(S, e.map(r, "cases"))])] : "",
|
|
1534
1535
|
k
|
|
1535
1536
|
]),
|
|
1536
|
-
|
|
1537
|
+
ce(n, t)
|
|
1537
1538
|
];
|
|
1538
1539
|
}
|
|
1539
|
-
function
|
|
1540
|
+
function li(e, t, r) {
|
|
1540
1541
|
let { node: n } = e;
|
|
1541
1542
|
return [
|
|
1542
1543
|
n.value,
|
|
1543
1544
|
" {",
|
|
1544
|
-
|
|
1545
|
+
E([A([k, e.map(({ node: i, isLast: s }) => {
|
|
1545
1546
|
let a = [r()];
|
|
1546
|
-
return i.kind === "text" && (i.hasLeadingSpaces && a.unshift(
|
|
1547
|
+
return i.kind === "text" && (i.hasLeadingSpaces && a.unshift(S), i.hasTrailingSpaces && !s && a.push(S)), a;
|
|
1547
1548
|
}, "expression")]), k]),
|
|
1548
1549
|
"}"
|
|
1549
1550
|
];
|
|
1550
1551
|
}
|
|
1551
|
-
function
|
|
1552
|
+
function ci(e, t, r) {
|
|
1552
1553
|
let { node: n } = e;
|
|
1553
|
-
if (
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
L(
|
|
1557
|
-
...
|
|
1558
|
-
|
|
1554
|
+
if (Et(n, t)) return [
|
|
1555
|
+
H(n, t),
|
|
1556
|
+
E(Ke(e, t, r)),
|
|
1557
|
+
L(Nt(n, t)),
|
|
1558
|
+
...Ye(n, t),
|
|
1559
|
+
F(n, t)
|
|
1559
1560
|
];
|
|
1560
|
-
let i = n.children.length === 1 && (n.firstChild.kind === "interpolation" || n.firstChild.kind === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, s = Symbol("element-attr-group-id"), a = (p) =>
|
|
1561
|
-
|
|
1561
|
+
let i = n.children.length === 1 && (n.firstChild.kind === "interpolation" || n.firstChild.kind === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, s = Symbol("element-attr-group-id"), a = (p) => E([
|
|
1562
|
+
E(Ke(e, t, r), { id: s }),
|
|
1562
1563
|
p,
|
|
1563
|
-
|
|
1564
|
-
]), o = (p) => i ?
|
|
1565
|
-
return n.children.length === 0 ? a(n.hasDanglingSpaces && n.isDanglingSpaceSensitive ?
|
|
1566
|
-
|
|
1567
|
-
o([c(),
|
|
1564
|
+
Ye(n, t)
|
|
1565
|
+
]), o = (p) => i ? Fr(p, { groupId: s }) : (q(n, t) || $e(n, t)) && n.parent.kind === "root" && t.parser === "vue" && !t.vueIndentScriptAndStyle ? p : A(p), c = () => i ? j(k, "", { groupId: s }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? S : n.firstChild.kind === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? qr(k) : k, u = () => (n.next ? W(n.next) : pe(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : i ? j(k, "", { groupId: s }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? S : (n.lastChild.kind === "comment" || n.lastChild.kind === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${t.tabWidth * (e.ancestors.length - 1)}}$`, "u").test(n.lastChild.value) ? "" : k;
|
|
1566
|
+
return n.children.length === 0 ? a(n.hasDanglingSpaces && n.isDanglingSpaceSensitive ? S : "") : a([
|
|
1567
|
+
cn(n) ? Y : "",
|
|
1568
|
+
o([c(), Le(e, t, r)]),
|
|
1568
1569
|
u()
|
|
1569
1570
|
]);
|
|
1570
1571
|
}
|
|
1571
1572
|
var R = (function(e) {
|
|
1572
1573
|
return e[e.RAW_TEXT = 0] = "RAW_TEXT", e[e.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", e[e.PARSABLE_DATA = 2] = "PARSABLE_DATA", e;
|
|
1573
1574
|
})({});
|
|
1574
|
-
function
|
|
1575
|
+
function et(e, t = !0) {
|
|
1575
1576
|
if (e[0] != ":") return [null, e];
|
|
1576
1577
|
let r = e.indexOf(":", 1);
|
|
1577
1578
|
if (r === -1) {
|
|
@@ -1580,32 +1581,32 @@ function at(e, t = !0) {
|
|
|
1580
1581
|
}
|
|
1581
1582
|
return [e.slice(1, r), e.slice(r + 1)];
|
|
1582
1583
|
}
|
|
1583
|
-
function
|
|
1584
|
-
return
|
|
1584
|
+
function or(e) {
|
|
1585
|
+
return et(e)[1] === "ng-container";
|
|
1585
1586
|
}
|
|
1586
|
-
function
|
|
1587
|
-
return
|
|
1587
|
+
function lr(e) {
|
|
1588
|
+
return et(e)[1] === "ng-content";
|
|
1588
1589
|
}
|
|
1589
|
-
function
|
|
1590
|
-
return e === null ? null :
|
|
1590
|
+
function Pe(e) {
|
|
1591
|
+
return e === null ? null : et(e)[0];
|
|
1591
1592
|
}
|
|
1592
|
-
function
|
|
1593
|
+
function fe(e, t) {
|
|
1593
1594
|
return e ? `:${e}:${t}` : t;
|
|
1594
1595
|
}
|
|
1595
|
-
var
|
|
1596
|
+
var cr = { name: "custom-elements" }, ur = { name: "no-errors-schema" }, Z = (function(e) {
|
|
1596
1597
|
return e[e.NONE = 0] = "NONE", e[e.HTML = 1] = "HTML", e[e.STYLE = 2] = "STYLE", e[e.SCRIPT = 3] = "SCRIPT", e[e.URL = 4] = "URL", e[e.RESOURCE_URL = 5] = "RESOURCE_URL", e[e.ATTRIBUTE_NO_BINDING = 6] = "ATTRIBUTE_NO_BINDING", e;
|
|
1597
1598
|
})({});
|
|
1598
|
-
var
|
|
1599
|
-
function
|
|
1600
|
-
return e.replace(
|
|
1599
|
+
var La = /-+([a-z0-9])/g;
|
|
1600
|
+
function ui(e) {
|
|
1601
|
+
return e.replace(La, (...t) => t[1].toUpperCase());
|
|
1601
1602
|
}
|
|
1602
|
-
var
|
|
1603
|
-
function
|
|
1604
|
-
return
|
|
1603
|
+
var Pt;
|
|
1604
|
+
function pr() {
|
|
1605
|
+
return Pt || (Pt = {}, tt(Z.HTML, [
|
|
1605
1606
|
"iframe|srcdoc",
|
|
1606
1607
|
"*|innerHTML",
|
|
1607
1608
|
"*|outerHTML"
|
|
1608
|
-
]),
|
|
1609
|
+
]), tt(Z.STYLE, ["*|style"]), tt(Z.URL, [
|
|
1609
1610
|
"*|formAction",
|
|
1610
1611
|
"area|href",
|
|
1611
1612
|
"a|href",
|
|
@@ -1679,7 +1680,7 @@ function Ar() {
|
|
|
1679
1680
|
"none|xlink:href",
|
|
1680
1681
|
"img|src",
|
|
1681
1682
|
"video|src"
|
|
1682
|
-
]),
|
|
1683
|
+
]), tt(Z.RESOURCE_URL, [
|
|
1683
1684
|
"base|href",
|
|
1684
1685
|
"embed|src",
|
|
1685
1686
|
"frame|src",
|
|
@@ -1690,12 +1691,19 @@ function Ar() {
|
|
|
1690
1691
|
"script|src",
|
|
1691
1692
|
"script|href",
|
|
1692
1693
|
"script|xlink:href"
|
|
1693
|
-
]),
|
|
1694
|
+
]), tt(Z.ATTRIBUTE_NO_BINDING, [
|
|
1694
1695
|
"animate|attributeName",
|
|
1696
|
+
"animate|values",
|
|
1697
|
+
"animate|to",
|
|
1698
|
+
"animate|from",
|
|
1699
|
+
"set|to",
|
|
1695
1700
|
"set|attributeName",
|
|
1696
1701
|
"animateMotion|attributeName",
|
|
1697
1702
|
"animateTransform|attributeName",
|
|
1698
1703
|
"unknown|attributeName",
|
|
1704
|
+
"unknown|values",
|
|
1705
|
+
"unknown|to",
|
|
1706
|
+
"unknown|from",
|
|
1699
1707
|
"iframe|sandbox",
|
|
1700
1708
|
"iframe|allow",
|
|
1701
1709
|
"iframe|allowFullscreen",
|
|
@@ -1708,13 +1716,13 @@ function Ar() {
|
|
|
1708
1716
|
"unknown|referrerPolicy",
|
|
1709
1717
|
"unknown|csp",
|
|
1710
1718
|
"unknown|fetchPriority"
|
|
1711
|
-
])),
|
|
1719
|
+
])), Pt;
|
|
1712
1720
|
}
|
|
1713
|
-
function
|
|
1714
|
-
for (let r of t)
|
|
1721
|
+
function tt(e, t) {
|
|
1722
|
+
for (let r of t) Pt[r.toLowerCase()] = e;
|
|
1715
1723
|
}
|
|
1716
|
-
var
|
|
1717
|
-
var
|
|
1724
|
+
var pi = class {};
|
|
1725
|
+
var Pa = "boolean", Oa = "number", Da = "string", Ia = "object", Ra = [
|
|
1718
1726
|
"[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored",
|
|
1719
1727
|
"[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy",
|
|
1720
1728
|
"abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy",
|
|
@@ -1749,6 +1757,7 @@ var ro = "boolean", no = "number", io = "string", so = "object", ao = [
|
|
|
1749
1757
|
"form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target",
|
|
1750
1758
|
"frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src",
|
|
1751
1759
|
"frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows",
|
|
1760
|
+
"geolocation^[HTMLElement]|accuracymode,!autolocate,*location,*promptaction,*promptdismiss,*validationstatuschange,!watch",
|
|
1752
1761
|
"hr^[HTMLElement]|align,color,!noShade,size,width",
|
|
1753
1762
|
"head^[HTMLElement]|",
|
|
1754
1763
|
"h1,h2,h3,h4,h5,h6^[HTMLElement]|align",
|
|
@@ -1899,7 +1908,7 @@ var ro = "boolean", no = "number", io = "string", so = "object", ao = [
|
|
|
1899
1908
|
":math:munder^:math:|",
|
|
1900
1909
|
":math:munderover^:math:|",
|
|
1901
1910
|
":math:semantics^:math:|"
|
|
1902
|
-
],
|
|
1911
|
+
], hi = new Map(Object.entries({
|
|
1903
1912
|
class: "className",
|
|
1904
1913
|
for: "htmlFor",
|
|
1905
1914
|
formaction: "formAction",
|
|
@@ -1954,9 +1963,11 @@ var ro = "boolean", no = "number", io = "string", so = "object", ao = [
|
|
|
1954
1963
|
"aria-valuemin": "ariaValueMin",
|
|
1955
1964
|
"aria-valuenow": "ariaValueNow",
|
|
1956
1965
|
"aria-valuetext": "ariaValueText"
|
|
1957
|
-
})),
|
|
1966
|
+
})), Ma = Array.from(hi).reduce((e, [t, r]) => (e.set(t, r), e), /* @__PURE__ */ new Map()), mi = class extends pi {
|
|
1967
|
+
_schema = /* @__PURE__ */ new Map();
|
|
1968
|
+
_eventSchema = /* @__PURE__ */ new Map();
|
|
1958
1969
|
constructor() {
|
|
1959
|
-
super(),
|
|
1970
|
+
super(), Ra.forEach((e) => {
|
|
1960
1971
|
let t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), [n, i] = e.split("|"), s = i.split(","), [a, o] = n.split("^");
|
|
1961
1972
|
a.split(",").forEach((u) => {
|
|
1962
1973
|
this._schema.set(u.toLowerCase(), t), this._eventSchema.set(u.toLowerCase(), r);
|
|
@@ -1972,37 +1983,37 @@ var ro = "boolean", no = "number", io = "string", so = "object", ao = [
|
|
|
1972
1983
|
r.add(u.substring(1));
|
|
1973
1984
|
break;
|
|
1974
1985
|
case "!":
|
|
1975
|
-
t.set(u.substring(1),
|
|
1986
|
+
t.set(u.substring(1), Pa);
|
|
1976
1987
|
break;
|
|
1977
1988
|
case "#":
|
|
1978
|
-
t.set(u.substring(1),
|
|
1989
|
+
t.set(u.substring(1), Oa);
|
|
1979
1990
|
break;
|
|
1980
1991
|
case "%":
|
|
1981
|
-
t.set(u.substring(1),
|
|
1992
|
+
t.set(u.substring(1), Ia);
|
|
1982
1993
|
break;
|
|
1983
|
-
default: t.set(u,
|
|
1994
|
+
default: t.set(u, Da);
|
|
1984
1995
|
}
|
|
1985
1996
|
});
|
|
1986
1997
|
});
|
|
1987
1998
|
}
|
|
1988
1999
|
hasProperty(e, t, r) {
|
|
1989
|
-
if (r.some((n) => n.name ===
|
|
2000
|
+
if (r.some((n) => n.name === ur.name)) return !0;
|
|
1990
2001
|
if (e.indexOf("-") > -1) {
|
|
1991
|
-
if (
|
|
1992
|
-
if (r.some((n) => n.name ===
|
|
2002
|
+
if (or(e) || lr(e)) return !1;
|
|
2003
|
+
if (r.some((n) => n.name === cr.name)) return !0;
|
|
1993
2004
|
}
|
|
1994
2005
|
return (this._schema.get(e.toLowerCase()) || this._schema.get("unknown")).has(t);
|
|
1995
2006
|
}
|
|
1996
2007
|
hasElement(e, t) {
|
|
1997
|
-
return t.some((r) => r.name ===
|
|
2008
|
+
return t.some((r) => r.name === ur.name) || e.indexOf("-") > -1 && (or(e) || lr(e) || t.some((r) => r.name === cr.name)) ? !0 : this._schema.has(e.toLowerCase());
|
|
1998
2009
|
}
|
|
1999
2010
|
securityContext(e, t, r) {
|
|
2000
2011
|
r && (t = this.getMappedPropName(t)), e = e.toLowerCase(), t = t.toLowerCase();
|
|
2001
|
-
let n =
|
|
2002
|
-
return n || (n =
|
|
2012
|
+
let n = pr()[e + "|" + t];
|
|
2013
|
+
return n || (n = pr()["*|" + t], n || Z.NONE);
|
|
2003
2014
|
}
|
|
2004
2015
|
getMappedPropName(e) {
|
|
2005
|
-
return
|
|
2016
|
+
return hi.get(e) ?? e;
|
|
2006
2017
|
}
|
|
2007
2018
|
getDefaultComponentElementName() {
|
|
2008
2019
|
return "ng-component";
|
|
@@ -2025,17 +2036,17 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2025
2036
|
}
|
|
2026
2037
|
allKnownAttributesOfElement(e) {
|
|
2027
2038
|
let t = this._schema.get(e.toLowerCase()) || this._schema.get("unknown");
|
|
2028
|
-
return Array.from(t.keys()).map((r) =>
|
|
2039
|
+
return Array.from(t.keys()).map((r) => Ma.get(r) ?? r);
|
|
2029
2040
|
}
|
|
2030
2041
|
allKnownEventsOfElement(e) {
|
|
2031
2042
|
return Array.from(this._eventSchema.get(e.toLowerCase()) ?? []);
|
|
2032
2043
|
}
|
|
2033
2044
|
normalizeAnimationStyleProperty(e) {
|
|
2034
|
-
return
|
|
2045
|
+
return ui(e);
|
|
2035
2046
|
}
|
|
2036
2047
|
normalizeAnimationStyleValue(e, t, r) {
|
|
2037
2048
|
let n = "", i = r.toString().trim(), s = null;
|
|
2038
|
-
if (
|
|
2049
|
+
if (Ba(e) && r !== 0 && r !== "0") if (typeof r == "number") n = "px";
|
|
2039
2050
|
else {
|
|
2040
2051
|
let a = r.match(/^[+-]?[\d\.]+([a-z]*)$/);
|
|
2041
2052
|
a && a[1].length == 0 && (s = `Please provide a CSS unit value for ${t}:${r}`);
|
|
@@ -2046,7 +2057,7 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
2046
2057
|
};
|
|
2047
2058
|
}
|
|
2048
2059
|
};
|
|
2049
|
-
function
|
|
2060
|
+
function Ba(e) {
|
|
2050
2061
|
switch (e) {
|
|
2051
2062
|
case "width":
|
|
2052
2063
|
case "height":
|
|
@@ -2080,8 +2091,16 @@ function lo(e) {
|
|
|
2080
2091
|
}
|
|
2081
2092
|
}
|
|
2082
2093
|
var f = class {
|
|
2094
|
+
closedByChildren = {};
|
|
2095
|
+
contentType;
|
|
2096
|
+
closedByParent = !1;
|
|
2097
|
+
implicitNamespacePrefix;
|
|
2098
|
+
isVoid;
|
|
2099
|
+
ignoreFirstLf;
|
|
2100
|
+
canSelfClose;
|
|
2101
|
+
preventNamespaceInheritance;
|
|
2083
2102
|
constructor({ closedByChildren: e, implicitNamespacePrefix: t, contentType: r = R.PARSABLE_DATA, closedByParent: n = !1, isVoid: i = !1, ignoreFirstLf: s = !1, preventNamespaceInheritance: a = !1, canSelfClose: o = !1 } = {}) {
|
|
2084
|
-
|
|
2103
|
+
e && e.length > 0 && e.forEach((c) => this.closedByChildren[c] = !0), this.isVoid = i, this.closedByParent = n || i, this.implicitNamespacePrefix = t || null, this.contentType = r, this.ignoreFirstLf = s, this.preventNamespaceInheritance = a, this.canSelfClose = o ?? i;
|
|
2085
2104
|
}
|
|
2086
2105
|
isClosedByChild(e) {
|
|
2087
2106
|
return this.isVoid || e.toLowerCase() in this.closedByChildren;
|
|
@@ -2089,9 +2108,9 @@ var f = class {
|
|
|
2089
2108
|
getContentType(e) {
|
|
2090
2109
|
return typeof this.contentType == "object" ? (e === void 0 ? void 0 : this.contentType[e]) ?? this.contentType.default : this.contentType;
|
|
2091
2110
|
}
|
|
2092
|
-
},
|
|
2093
|
-
function
|
|
2094
|
-
return
|
|
2111
|
+
}, fi, rt;
|
|
2112
|
+
function Oe(e) {
|
|
2113
|
+
return rt || (fi = new f({ canSelfClose: !0 }), rt = Object.assign(Object.create(null), {
|
|
2095
2114
|
base: new f({ isVoid: !0 }),
|
|
2096
2115
|
meta: new f({ isVoid: !0 }),
|
|
2097
2116
|
area: new f({ isVoid: !0 }),
|
|
@@ -2228,32 +2247,11 @@ function Be(e) {
|
|
|
2228
2247
|
contentType: R.ESCAPABLE_RAW_TEXT,
|
|
2229
2248
|
ignoreFirstLf: !0
|
|
2230
2249
|
})
|
|
2231
|
-
}), new
|
|
2232
|
-
!
|
|
2233
|
-
})),
|
|
2234
|
-
}
|
|
2235
|
-
function ct(e) {
|
|
2236
|
-
return e >= 9 && e <= 32 || e == 160;
|
|
2237
|
-
}
|
|
2238
|
-
function ut(e) {
|
|
2239
|
-
return 48 <= e && e <= 57;
|
|
2250
|
+
}), new mi().allKnownElementNames().forEach((t) => {
|
|
2251
|
+
!rt[t] && Pe(t) === null && (rt[t] = new f({ canSelfClose: !1 }));
|
|
2252
|
+
})), rt[e] ?? fi;
|
|
2240
2253
|
}
|
|
2241
|
-
|
|
2242
|
-
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
2243
|
-
}
|
|
2244
|
-
function Bi(e) {
|
|
2245
|
-
return e >= 97 && e <= 102 || e >= 65 && e <= 70 || ut(e);
|
|
2246
|
-
}
|
|
2247
|
-
function pt(e) {
|
|
2248
|
-
return e === 10 || e === 13;
|
|
2249
|
-
}
|
|
2250
|
-
function yr(e) {
|
|
2251
|
-
return 48 <= e && e <= 55;
|
|
2252
|
-
}
|
|
2253
|
-
function Ut(e) {
|
|
2254
|
-
return e === 39 || e === 34 || e === 96;
|
|
2255
|
-
}
|
|
2256
|
-
var qe = class qi {
|
|
2254
|
+
var De = class gi {
|
|
2257
2255
|
constructor(t, r, n, i) {
|
|
2258
2256
|
this.file = t, this.offset = r, this.line = n, this.col = i;
|
|
2259
2257
|
}
|
|
@@ -2264,14 +2262,15 @@ var qe = class qi {
|
|
|
2264
2262
|
let r = this.file.content, n = r.length, i = this.offset, s = this.line, a = this.col;
|
|
2265
2263
|
for (; i > 0 && t < 0;) if (i--, t++, r.charCodeAt(i) == 10) {
|
|
2266
2264
|
s--;
|
|
2267
|
-
let o = r.substring(0, i - 1).lastIndexOf(
|
|
2265
|
+
let o = r.substring(0, i - 1).lastIndexOf(`
|
|
2266
|
+
`);
|
|
2268
2267
|
a = o > 0 ? i - o : i;
|
|
2269
2268
|
} else a--;
|
|
2270
2269
|
for (; i < n && t > 0;) {
|
|
2271
2270
|
let o = r.charCodeAt(i);
|
|
2272
2271
|
i++, t--, o == 10 ? (s++, a = 0) : a++;
|
|
2273
2272
|
}
|
|
2274
|
-
return new
|
|
2273
|
+
return new gi(this.file, i, s, a);
|
|
2275
2274
|
}
|
|
2276
2275
|
getContext(t, r) {
|
|
2277
2276
|
let n = this.file.content, i = this.offset;
|
|
@@ -2289,7 +2288,7 @@ var qe = class qi {
|
|
|
2289
2288
|
}
|
|
2290
2289
|
return null;
|
|
2291
2290
|
}
|
|
2292
|
-
},
|
|
2291
|
+
}, nt = class {
|
|
2293
2292
|
constructor(e, t) {
|
|
2294
2293
|
this.content = e, this.url = t;
|
|
2295
2294
|
}
|
|
@@ -2300,128 +2299,145 @@ var qe = class qi {
|
|
|
2300
2299
|
toString() {
|
|
2301
2300
|
return this.start.file.content.substring(this.start.offset, this.end.offset);
|
|
2302
2301
|
}
|
|
2303
|
-
},
|
|
2302
|
+
}, di = (function(e) {
|
|
2304
2303
|
return e[e.WARNING = 0] = "WARNING", e[e.ERROR = 1] = "ERROR", e;
|
|
2305
|
-
})({}),
|
|
2306
|
-
constructor(e, t, r =
|
|
2304
|
+
})({}), ee = class extends Error {
|
|
2305
|
+
constructor(e, t, r = di.ERROR, n) {
|
|
2307
2306
|
super(t), this.span = e, this.msg = t, this.level = r, this.relatedError = n, Object.setPrototypeOf(this, new.target.prototype);
|
|
2308
2307
|
}
|
|
2309
2308
|
contextualMessage() {
|
|
2310
2309
|
let e = this.span.start.getContext(100, 3);
|
|
2311
|
-
return e ? `${this.msg} ("${e.before}[${
|
|
2310
|
+
return e ? `${this.msg} ("${e.before}[${di[this.level]} ->]${e.after}")` : this.msg;
|
|
2312
2311
|
}
|
|
2313
2312
|
toString() {
|
|
2314
2313
|
let e = this.span.details ? `, ${this.span.details}` : "";
|
|
2315
2314
|
return `${this.contextualMessage()}: ${this.span.start}${e}`;
|
|
2316
2315
|
}
|
|
2317
2316
|
};
|
|
2318
|
-
var
|
|
2317
|
+
var de = class {
|
|
2319
2318
|
constructor(e, t) {
|
|
2320
2319
|
this.sourceSpan = e, this.i18n = t;
|
|
2321
2320
|
}
|
|
2322
|
-
},
|
|
2321
|
+
}, _i = class extends de {
|
|
2323
2322
|
constructor(e, t, r, n) {
|
|
2324
|
-
super(t, n), this.value = e, this.tokens = r
|
|
2323
|
+
super(t, n), this.value = e, this.tokens = r;
|
|
2325
2324
|
}
|
|
2326
2325
|
visit(e, t) {
|
|
2327
2326
|
return e.visitText(this, t);
|
|
2328
2327
|
}
|
|
2329
|
-
|
|
2328
|
+
kind = "text";
|
|
2329
|
+
}, Si = class extends de {
|
|
2330
2330
|
constructor(e, t, r, n) {
|
|
2331
|
-
super(t, n), this.value = e, this.tokens = r
|
|
2331
|
+
super(t, n), this.value = e, this.tokens = r;
|
|
2332
2332
|
}
|
|
2333
2333
|
visit(e, t) {
|
|
2334
2334
|
return e.visitCdata(this, t);
|
|
2335
2335
|
}
|
|
2336
|
-
|
|
2336
|
+
kind = "cdata";
|
|
2337
|
+
}, Ei = class extends de {
|
|
2337
2338
|
constructor(e, t, r, n, i, s) {
|
|
2338
|
-
super(n, s), this.switchValue = e, this.type = t, this.cases = r, this.switchValueSourceSpan = i
|
|
2339
|
+
super(n, s), this.switchValue = e, this.type = t, this.cases = r, this.switchValueSourceSpan = i;
|
|
2339
2340
|
}
|
|
2340
2341
|
visit(e, t) {
|
|
2341
2342
|
return e.visitExpansion(this, t);
|
|
2342
2343
|
}
|
|
2343
|
-
|
|
2344
|
+
kind = "expansion";
|
|
2345
|
+
}, Ci = class {
|
|
2344
2346
|
constructor(e, t, r, n, i) {
|
|
2345
|
-
this.value = e, this.expression = t, this.sourceSpan = r, this.valueSourceSpan = n, this.expSourceSpan = i
|
|
2347
|
+
this.value = e, this.expression = t, this.sourceSpan = r, this.valueSourceSpan = n, this.expSourceSpan = i;
|
|
2346
2348
|
}
|
|
2347
2349
|
visit(e, t) {
|
|
2348
2350
|
return e.visitExpansionCase(this, t);
|
|
2349
2351
|
}
|
|
2350
|
-
|
|
2352
|
+
kind = "expansionCase";
|
|
2353
|
+
}, vi = class extends de {
|
|
2351
2354
|
constructor(e, t, r, n, i, s, a) {
|
|
2352
|
-
super(r, a), this.name = e, this.value = t, this.keySpan = n, this.valueSpan = i, this.valueTokens = s
|
|
2355
|
+
super(r, a), this.name = e, this.value = t, this.keySpan = n, this.valueSpan = i, this.valueTokens = s;
|
|
2353
2356
|
}
|
|
2354
2357
|
visit(e, t) {
|
|
2355
2358
|
return e.visitAttribute(this, t);
|
|
2356
2359
|
}
|
|
2360
|
+
kind = "attribute";
|
|
2357
2361
|
get nameSpan() {
|
|
2358
2362
|
return this.keySpan;
|
|
2359
2363
|
}
|
|
2360
|
-
},
|
|
2364
|
+
}, te = class extends de {
|
|
2361
2365
|
constructor(e, t, r, n, i, s, a, o = null, c = null, u, p) {
|
|
2362
|
-
super(s, p), this.name = e, this.attrs = t, this.directives = r, this.children = n, this.isSelfClosing = i, this.startSourceSpan = a, this.endSourceSpan = o, this.nameSpan = c, this.isVoid = u
|
|
2366
|
+
super(s, p), this.name = e, this.attrs = t, this.directives = r, this.children = n, this.isSelfClosing = i, this.startSourceSpan = a, this.endSourceSpan = o, this.nameSpan = c, this.isVoid = u;
|
|
2363
2367
|
}
|
|
2364
2368
|
visit(e, t) {
|
|
2365
2369
|
return e.visitElement(this, t);
|
|
2366
2370
|
}
|
|
2367
|
-
|
|
2371
|
+
kind = "element";
|
|
2372
|
+
}, Ti = class {
|
|
2368
2373
|
constructor(e, t) {
|
|
2369
|
-
this.value = e, this.sourceSpan = t
|
|
2374
|
+
this.value = e, this.sourceSpan = t;
|
|
2370
2375
|
}
|
|
2371
2376
|
visit(e, t) {
|
|
2372
2377
|
return e.visitComment(this, t);
|
|
2373
2378
|
}
|
|
2374
|
-
|
|
2379
|
+
kind = "comment";
|
|
2380
|
+
}, bi = class {
|
|
2375
2381
|
constructor(e, t) {
|
|
2376
|
-
this.value = e, this.sourceSpan = t
|
|
2382
|
+
this.value = e, this.sourceSpan = t;
|
|
2377
2383
|
}
|
|
2378
2384
|
visit(e, t) {
|
|
2379
2385
|
return e.visitDocType(this, t);
|
|
2380
2386
|
}
|
|
2381
|
-
|
|
2387
|
+
kind = "docType";
|
|
2388
|
+
}, ge = class extends de {
|
|
2382
2389
|
constructor(e, t, r, n, i, s, a = null, o) {
|
|
2383
|
-
super(n, o), this.name = e, this.parameters = t, this.children = r, this.nameSpan = i, this.startSourceSpan = s, this.endSourceSpan = a
|
|
2390
|
+
super(n, o), this.name = e, this.parameters = t, this.children = r, this.nameSpan = i, this.startSourceSpan = s, this.endSourceSpan = a;
|
|
2384
2391
|
}
|
|
2385
2392
|
visit(e, t) {
|
|
2386
2393
|
return e.visitBlock(this, t);
|
|
2387
2394
|
}
|
|
2388
|
-
|
|
2395
|
+
kind = "block";
|
|
2396
|
+
}, G = class extends de {
|
|
2389
2397
|
constructor(e, t, r, n, i, s, a, o, c, u = null, p) {
|
|
2390
|
-
super(o, p), this.componentName = e, this.tagName = t, this.fullName = r, this.attrs = n, this.directives = i, this.children = s, this.isSelfClosing = a, this.startSourceSpan = c, this.endSourceSpan = u
|
|
2398
|
+
super(o, p), this.componentName = e, this.tagName = t, this.fullName = r, this.attrs = n, this.directives = i, this.children = s, this.isSelfClosing = a, this.startSourceSpan = c, this.endSourceSpan = u;
|
|
2391
2399
|
}
|
|
2392
2400
|
visit(e, t) {
|
|
2393
2401
|
return e.visitComponent(this, t);
|
|
2394
2402
|
}
|
|
2395
|
-
|
|
2403
|
+
kind = "component";
|
|
2404
|
+
}, wi = class {
|
|
2396
2405
|
constructor(e, t, r, n, i = null) {
|
|
2397
|
-
this.name = e, this.attrs = t, this.sourceSpan = r, this.startSourceSpan = n, this.endSourceSpan = i
|
|
2406
|
+
this.name = e, this.attrs = t, this.sourceSpan = r, this.startSourceSpan = n, this.endSourceSpan = i;
|
|
2398
2407
|
}
|
|
2399
2408
|
visit(e, t) {
|
|
2400
2409
|
return e.visitDirective(this, t);
|
|
2401
2410
|
}
|
|
2402
|
-
|
|
2411
|
+
kind = "directive";
|
|
2412
|
+
}, hr = class {
|
|
2403
2413
|
constructor(e, t) {
|
|
2404
|
-
this.expression = e, this.sourceSpan = t
|
|
2414
|
+
this.expression = e, this.sourceSpan = t;
|
|
2405
2415
|
}
|
|
2406
2416
|
visit(e, t) {
|
|
2407
2417
|
return e.visitBlockParameter(this, t);
|
|
2408
2418
|
}
|
|
2409
|
-
|
|
2419
|
+
kind = "blockParameter";
|
|
2420
|
+
startSourceSpan = null;
|
|
2421
|
+
endSourceSpan = null;
|
|
2422
|
+
}, mr = class {
|
|
2410
2423
|
constructor(e, t, r, n, i) {
|
|
2411
|
-
this.name = e, this.value = t, this.sourceSpan = r, this.nameSpan = n, this.valueSpan = i
|
|
2424
|
+
this.name = e, this.value = t, this.sourceSpan = r, this.nameSpan = n, this.valueSpan = i;
|
|
2412
2425
|
}
|
|
2413
2426
|
visit(e, t) {
|
|
2414
2427
|
return e.visitLetDeclaration(this, t);
|
|
2415
2428
|
}
|
|
2429
|
+
kind = "letDeclaration";
|
|
2430
|
+
startSourceSpan = null;
|
|
2431
|
+
endSourceSpan = null;
|
|
2416
2432
|
};
|
|
2417
|
-
function
|
|
2433
|
+
function Ot(e, t, r = null) {
|
|
2418
2434
|
let n = [], i = e.visit ? (s) => e.visit(s, r) || s.visit(e, r) : (s) => s.visit(e, r);
|
|
2419
2435
|
return t.forEach((s) => {
|
|
2420
2436
|
let a = i(s);
|
|
2421
2437
|
a && n.push(a);
|
|
2422
2438
|
}), n;
|
|
2423
2439
|
}
|
|
2424
|
-
var
|
|
2440
|
+
var fr = class {
|
|
2425
2441
|
constructor() {}
|
|
2426
2442
|
visitElement(e, t) {
|
|
2427
2443
|
this.visitChildren(t, (r) => {
|
|
@@ -2459,12 +2475,12 @@ var Pr = class {
|
|
|
2459
2475
|
visitChildren(e, t) {
|
|
2460
2476
|
let r = [], n = this;
|
|
2461
2477
|
function i(s) {
|
|
2462
|
-
s && r.push(
|
|
2478
|
+
s && r.push(Ot(n, s, e));
|
|
2463
2479
|
}
|
|
2464
2480
|
return t(i), Array.prototype.concat.apply([], r);
|
|
2465
2481
|
}
|
|
2466
2482
|
};
|
|
2467
|
-
var
|
|
2483
|
+
var _e = {
|
|
2468
2484
|
AElig: "Æ",
|
|
2469
2485
|
AMP: "&",
|
|
2470
2486
|
amp: "&",
|
|
@@ -4592,32 +4608,53 @@ var Te = {
|
|
|
4592
4608
|
zwj: "",
|
|
4593
4609
|
zwnj: ""
|
|
4594
4610
|
};
|
|
4595
|
-
|
|
4611
|
+
_e.ngsp = "";
|
|
4596
4612
|
var l = (function(e) {
|
|
4597
4613
|
return e[e.TAG_OPEN_START = 0] = "TAG_OPEN_START", e[e.TAG_OPEN_END = 1] = "TAG_OPEN_END", e[e.TAG_OPEN_END_VOID = 2] = "TAG_OPEN_END_VOID", e[e.TAG_CLOSE = 3] = "TAG_CLOSE", e[e.INCOMPLETE_TAG_OPEN = 4] = "INCOMPLETE_TAG_OPEN", e[e.TEXT = 5] = "TEXT", e[e.ESCAPABLE_RAW_TEXT = 6] = "ESCAPABLE_RAW_TEXT", e[e.RAW_TEXT = 7] = "RAW_TEXT", e[e.INTERPOLATION = 8] = "INTERPOLATION", e[e.ENCODED_ENTITY = 9] = "ENCODED_ENTITY", e[e.COMMENT_START = 10] = "COMMENT_START", e[e.COMMENT_END = 11] = "COMMENT_END", e[e.CDATA_START = 12] = "CDATA_START", e[e.CDATA_END = 13] = "CDATA_END", e[e.ATTR_NAME = 14] = "ATTR_NAME", e[e.ATTR_QUOTE = 15] = "ATTR_QUOTE", e[e.ATTR_VALUE_TEXT = 16] = "ATTR_VALUE_TEXT", e[e.ATTR_VALUE_INTERPOLATION = 17] = "ATTR_VALUE_INTERPOLATION", e[e.DOC_TYPE_START = 18] = "DOC_TYPE_START", e[e.DOC_TYPE_END = 19] = "DOC_TYPE_END", e[e.EXPANSION_FORM_START = 20] = "EXPANSION_FORM_START", e[e.EXPANSION_CASE_VALUE = 21] = "EXPANSION_CASE_VALUE", e[e.EXPANSION_CASE_EXP_START = 22] = "EXPANSION_CASE_EXP_START", e[e.EXPANSION_CASE_EXP_END = 23] = "EXPANSION_CASE_EXP_END", e[e.EXPANSION_FORM_END = 24] = "EXPANSION_FORM_END", e[e.BLOCK_OPEN_START = 25] = "BLOCK_OPEN_START", e[e.BLOCK_OPEN_END = 26] = "BLOCK_OPEN_END", e[e.BLOCK_CLOSE = 27] = "BLOCK_CLOSE", e[e.BLOCK_PARAMETER = 28] = "BLOCK_PARAMETER", e[e.INCOMPLETE_BLOCK_OPEN = 29] = "INCOMPLETE_BLOCK_OPEN", e[e.LET_START = 30] = "LET_START", e[e.LET_VALUE = 31] = "LET_VALUE", e[e.LET_END = 32] = "LET_END", e[e.INCOMPLETE_LET = 33] = "INCOMPLETE_LET", e[e.COMPONENT_OPEN_START = 34] = "COMPONENT_OPEN_START", e[e.COMPONENT_OPEN_END = 35] = "COMPONENT_OPEN_END", e[e.COMPONENT_OPEN_END_VOID = 36] = "COMPONENT_OPEN_END_VOID", e[e.COMPONENT_CLOSE = 37] = "COMPONENT_CLOSE", e[e.INCOMPLETE_COMPONENT_OPEN = 38] = "INCOMPLETE_COMPONENT_OPEN", e[e.DIRECTIVE_NAME = 39] = "DIRECTIVE_NAME", e[e.DIRECTIVE_OPEN = 40] = "DIRECTIVE_OPEN", e[e.DIRECTIVE_CLOSE = 41] = "DIRECTIVE_CLOSE", e[e.EOF = 42] = "EOF", e;
|
|
4598
4614
|
})({});
|
|
4599
|
-
|
|
4615
|
+
function it(e) {
|
|
4616
|
+
return e >= 9 && e <= 32 || e == 160;
|
|
4617
|
+
}
|
|
4618
|
+
function Ie(e) {
|
|
4619
|
+
return 48 <= e && e <= 57;
|
|
4620
|
+
}
|
|
4621
|
+
function Re(e) {
|
|
4622
|
+
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
4623
|
+
}
|
|
4624
|
+
function ki(e) {
|
|
4625
|
+
return e >= 97 && e <= 102 || e >= 65 && e <= 70 || Ie(e);
|
|
4626
|
+
}
|
|
4627
|
+
function Me(e) {
|
|
4628
|
+
return e === 10 || e === 13;
|
|
4629
|
+
}
|
|
4630
|
+
function dr(e) {
|
|
4631
|
+
return 48 <= e && e <= 55;
|
|
4632
|
+
}
|
|
4633
|
+
function Dt(e) {
|
|
4634
|
+
return e === 39 || e === 34 || e === 96;
|
|
4635
|
+
}
|
|
4636
|
+
var qa = class {
|
|
4600
4637
|
constructor(e, t, r) {
|
|
4601
4638
|
this.tokens = e, this.errors = t, this.nonNormalizedIcuExpressions = r;
|
|
4602
4639
|
}
|
|
4603
4640
|
};
|
|
4604
|
-
function
|
|
4605
|
-
let i = new
|
|
4606
|
-
return i.tokenize(), new
|
|
4641
|
+
function Pi(e, t, r, n = {}) {
|
|
4642
|
+
let i = new Ua(new nt(e, t), r, n);
|
|
4643
|
+
return i.tokenize(), new qa(Xa(i.tokens), i.errors, i.nonNormalizedIcuExpressions);
|
|
4607
4644
|
}
|
|
4608
|
-
var
|
|
4609
|
-
function
|
|
4645
|
+
var Fa = /\r\n?/g;
|
|
4646
|
+
function Se(e) {
|
|
4610
4647
|
return `Unexpected character "${e === 0 ? "EOF" : String.fromCharCode(e)}"`;
|
|
4611
4648
|
}
|
|
4612
|
-
function
|
|
4649
|
+
function xi(e) {
|
|
4613
4650
|
return `Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`;
|
|
4614
4651
|
}
|
|
4615
|
-
function
|
|
4652
|
+
function Ha(e, t) {
|
|
4616
4653
|
return `Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`;
|
|
4617
4654
|
}
|
|
4618
|
-
var
|
|
4655
|
+
var gr = (function(e) {
|
|
4619
4656
|
return e.HEX = "hexadecimal", e.DEC = "decimal", e;
|
|
4620
|
-
})(
|
|
4657
|
+
})(gr || {}), Va = [
|
|
4621
4658
|
"@if",
|
|
4622
4659
|
"@else",
|
|
4623
4660
|
"@for",
|
|
@@ -4629,19 +4666,38 @@ var Mr = (function(e) {
|
|
|
4629
4666
|
"@placeholder",
|
|
4630
4667
|
"@loading",
|
|
4631
4668
|
"@error"
|
|
4632
|
-
],
|
|
4669
|
+
], st = {
|
|
4633
4670
|
start: "{{",
|
|
4634
4671
|
end: "}}"
|
|
4635
|
-
},
|
|
4672
|
+
}, Ua = class {
|
|
4673
|
+
_cursor;
|
|
4674
|
+
_tokenizeIcu;
|
|
4675
|
+
_leadingTriviaCodePoints;
|
|
4676
|
+
_canSelfClose;
|
|
4677
|
+
_allowHtmComponentClosingTags;
|
|
4678
|
+
_currentTokenStart = null;
|
|
4679
|
+
_currentTokenType = null;
|
|
4680
|
+
_expansionCaseStack = [];
|
|
4681
|
+
_openDirectiveCount = 0;
|
|
4682
|
+
_inInterpolation = !1;
|
|
4683
|
+
_preserveLineEndings;
|
|
4684
|
+
_i18nNormalizeLineEndingsInICUs;
|
|
4685
|
+
_fullNameStack = [];
|
|
4686
|
+
_tokenizeBlocks;
|
|
4687
|
+
_tokenizeLet;
|
|
4688
|
+
_selectorlessEnabled;
|
|
4689
|
+
tokens = [];
|
|
4690
|
+
errors = [];
|
|
4691
|
+
nonNormalizedIcuExpressions = [];
|
|
4636
4692
|
constructor(e, t, r) {
|
|
4637
|
-
this._getTagContentType = t, this.
|
|
4693
|
+
this._getTagContentType = t, this._tokenizeIcu = r.tokenizeExpansionForms || !1, this._leadingTriviaCodePoints = r.leadingTriviaChars && r.leadingTriviaChars.map((i) => i.codePointAt(0) || 0), this._canSelfClose = r.canSelfClose || !1, this._allowHtmComponentClosingTags = r.allowHtmComponentClosingTags || !1;
|
|
4638
4694
|
let n = r.range || {
|
|
4639
4695
|
endPos: e.content.length,
|
|
4640
4696
|
startPos: 0,
|
|
4641
4697
|
startLine: 0,
|
|
4642
4698
|
startCol: 0
|
|
4643
4699
|
};
|
|
4644
|
-
this._cursor = r.escapedString ? new
|
|
4700
|
+
this._cursor = r.escapedString ? new Ka(e, n) : new Oi(e, n), this._preserveLineEndings = r.preserveLineEndings || !1, this._i18nNormalizeLineEndingsInICUs = r.i18nNormalizeLineEndingsInICUs || !1, this._tokenizeBlocks = r.tokenizeBlocks ?? !0, this._tokenizeLet = r.tokenizeLet ?? !0, this._selectorlessEnabled = r.selectorlessEnabled ?? !1;
|
|
4645
4701
|
try {
|
|
4646
4702
|
this._cursor.init();
|
|
4647
4703
|
} catch (i) {
|
|
@@ -4649,7 +4705,7 @@ var Mr = (function(e) {
|
|
|
4649
4705
|
}
|
|
4650
4706
|
}
|
|
4651
4707
|
_processCarriageReturns(e) {
|
|
4652
|
-
return this._preserveLineEndings ? e : e.replace(
|
|
4708
|
+
return this._preserveLineEndings ? e : e.replace(Fa, `
|
|
4653
4709
|
`);
|
|
4654
4710
|
}
|
|
4655
4711
|
tokenize() {
|
|
@@ -4671,30 +4727,34 @@ var Mr = (function(e) {
|
|
|
4671
4727
|
}
|
|
4672
4728
|
_getBlockName() {
|
|
4673
4729
|
let e = !1, t = this._cursor.clone();
|
|
4674
|
-
return this._attemptCharCodeUntilFn((r) =>
|
|
4730
|
+
return this._attemptCharCodeUntilFn((r) => it(r) ? !e : ja(r) ? (e = !0, !1) : !0), this._cursor.getChars(t).trim();
|
|
4675
4731
|
}
|
|
4676
4732
|
_consumeBlockStart(e) {
|
|
4677
4733
|
this._requireCharCode(64), this._beginToken(l.BLOCK_OPEN_START, e);
|
|
4678
4734
|
let t = this._endToken([this._getBlockName()]);
|
|
4679
|
-
if (this._cursor.peek() === 40) if (this._cursor.advance(), this._consumeBlockParameters(), this._attemptCharCodeUntilFn(
|
|
4735
|
+
if (this._cursor.peek() === 40) if (this._cursor.advance(), this._consumeBlockParameters(), this._attemptCharCodeUntilFn(v), this._attemptCharCode(41)) this._attemptCharCodeUntilFn(v);
|
|
4680
4736
|
else {
|
|
4681
4737
|
t.type = l.INCOMPLETE_BLOCK_OPEN;
|
|
4682
4738
|
return;
|
|
4683
4739
|
}
|
|
4740
|
+
if (t.parts[0] === "default never" && this._attemptCharCode(59)) {
|
|
4741
|
+
this._beginToken(l.BLOCK_OPEN_END), this._endToken([]), this._beginToken(l.BLOCK_CLOSE), this._endToken([]);
|
|
4742
|
+
return;
|
|
4743
|
+
}
|
|
4684
4744
|
this._attemptCharCode(123) ? (this._beginToken(l.BLOCK_OPEN_END), this._endToken([])) : this._isBlockStart() && (t.parts[0] === "case" || t.parts[0] === "default") ? (this._beginToken(l.BLOCK_OPEN_END), this._endToken([]), this._beginToken(l.BLOCK_CLOSE), this._endToken([])) : t.type = l.INCOMPLETE_BLOCK_OPEN;
|
|
4685
4745
|
}
|
|
4686
4746
|
_consumeBlockEnd(e) {
|
|
4687
4747
|
this._beginToken(l.BLOCK_CLOSE, e), this._endToken([]);
|
|
4688
4748
|
}
|
|
4689
4749
|
_consumeBlockParameters() {
|
|
4690
|
-
for (this._attemptCharCodeUntilFn(
|
|
4750
|
+
for (this._attemptCharCodeUntilFn(Ai); this._cursor.peek() !== 41 && this._cursor.peek() !== 0;) {
|
|
4691
4751
|
this._beginToken(l.BLOCK_PARAMETER);
|
|
4692
4752
|
let e = this._cursor.clone(), t = null, r = 0;
|
|
4693
4753
|
for (; this._cursor.peek() !== 59 && this._cursor.peek() !== 0 || t !== null;) {
|
|
4694
4754
|
let n = this._cursor.peek();
|
|
4695
4755
|
if (n === 92) this._cursor.advance();
|
|
4696
4756
|
else if (n === t) t = null;
|
|
4697
|
-
else if (t === null &&
|
|
4757
|
+
else if (t === null && Dt(n)) t = n;
|
|
4698
4758
|
else if (n === 40 && t === null) r++;
|
|
4699
4759
|
else if (n === 41 && t === null) {
|
|
4700
4760
|
if (r === 0) break;
|
|
@@ -4702,39 +4762,39 @@ var Mr = (function(e) {
|
|
|
4702
4762
|
}
|
|
4703
4763
|
this._cursor.advance();
|
|
4704
4764
|
}
|
|
4705
|
-
this._endToken([this._cursor.getChars(e)]), this._attemptCharCodeUntilFn(
|
|
4765
|
+
this._endToken([this._cursor.getChars(e)]), this._attemptCharCodeUntilFn(Ai);
|
|
4706
4766
|
}
|
|
4707
4767
|
}
|
|
4708
4768
|
_consumeLetDeclaration(e) {
|
|
4709
|
-
if (this._requireStr("@let"), this._beginToken(l.LET_START, e),
|
|
4769
|
+
if (this._requireStr("@let"), this._beginToken(l.LET_START, e), it(this._cursor.peek())) this._attemptCharCodeUntilFn(v);
|
|
4710
4770
|
else {
|
|
4711
4771
|
let r = this._endToken([this._cursor.getChars(e)]);
|
|
4712
4772
|
r.type = l.INCOMPLETE_LET;
|
|
4713
4773
|
return;
|
|
4714
4774
|
}
|
|
4715
4775
|
let t = this._endToken([this._getLetDeclarationName()]);
|
|
4716
|
-
if (this._attemptCharCodeUntilFn(
|
|
4776
|
+
if (this._attemptCharCodeUntilFn(v), !this._attemptCharCode(61)) {
|
|
4717
4777
|
t.type = l.INCOMPLETE_LET;
|
|
4718
4778
|
return;
|
|
4719
4779
|
}
|
|
4720
|
-
this._attemptCharCodeUntilFn((r) =>
|
|
4780
|
+
this._attemptCharCodeUntilFn((r) => v(r) && !Me(r)), this._consumeLetDeclarationValue(), this._cursor.peek() === 59 ? (this._beginToken(l.LET_END), this._endToken([]), this._cursor.advance()) : (t.type = l.INCOMPLETE_LET, t.sourceSpan = this._cursor.getSpan(e));
|
|
4721
4781
|
}
|
|
4722
4782
|
_getLetDeclarationName() {
|
|
4723
4783
|
let e = this._cursor.clone(), t = !1;
|
|
4724
|
-
return this._attemptCharCodeUntilFn((r) =>
|
|
4784
|
+
return this._attemptCharCodeUntilFn((r) => Re(r) || r === 36 || r === 95 || t && Ie(r) ? (t = !0, !1) : !0), this._cursor.getChars(e).trim();
|
|
4725
4785
|
}
|
|
4726
4786
|
_consumeLetDeclarationValue() {
|
|
4727
4787
|
let e = this._cursor.clone();
|
|
4728
4788
|
for (this._beginToken(l.LET_VALUE, e); this._cursor.peek() !== 0;) {
|
|
4729
4789
|
let t = this._cursor.peek();
|
|
4730
4790
|
if (t === 59) break;
|
|
4731
|
-
|
|
4791
|
+
Dt(t) && (this._cursor.advance(), this._attemptCharCodeUntilFn((r) => r === 92 ? (this._cursor.advance(), !1) : r === t)), this._cursor.advance();
|
|
4732
4792
|
}
|
|
4733
4793
|
this._endToken([this._cursor.getChars(e)]);
|
|
4734
4794
|
}
|
|
4735
4795
|
_tokenizeExpansionForm() {
|
|
4736
4796
|
if (this.isExpansionFormStart()) return this._consumeExpansionFormStart(), !0;
|
|
4737
|
-
if (
|
|
4797
|
+
if ($a(this._cursor.peek()) && this._isInExpansionForm()) return this._consumeExpansionCaseStart(), !0;
|
|
4738
4798
|
if (this._cursor.peek() === 125) {
|
|
4739
4799
|
if (this._isInExpansionCase()) return this._consumeExpansionCaseEnd(), !0;
|
|
4740
4800
|
if (this._isInExpansionForm()) return this._consumeExpansionFormEnd(), !0;
|
|
@@ -4745,8 +4805,8 @@ var Mr = (function(e) {
|
|
|
4745
4805
|
this._currentTokenStart = t, this._currentTokenType = e;
|
|
4746
4806
|
}
|
|
4747
4807
|
_endToken(e, t) {
|
|
4748
|
-
if (this._currentTokenStart === null) throw new
|
|
4749
|
-
if (this._currentTokenType === null) throw new
|
|
4808
|
+
if (this._currentTokenStart === null) throw new ee(this._cursor.getSpan(t), "Programming error - attempted to end a token when there was no start to the token");
|
|
4809
|
+
if (this._currentTokenType === null) throw new ee(this._cursor.getSpan(this._currentTokenStart), "Programming error - attempted to end a token which has no token type");
|
|
4750
4810
|
let r = {
|
|
4751
4811
|
type: this._currentTokenType,
|
|
4752
4812
|
parts: e,
|
|
@@ -4756,22 +4816,22 @@ var Mr = (function(e) {
|
|
|
4756
4816
|
}
|
|
4757
4817
|
_createError(e, t) {
|
|
4758
4818
|
this._isInExpansionForm() && (e += ` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);
|
|
4759
|
-
let r = new
|
|
4819
|
+
let r = new ee(t, e);
|
|
4760
4820
|
return this._currentTokenStart = null, this._currentTokenType = null, r;
|
|
4761
4821
|
}
|
|
4762
4822
|
handleError(e) {
|
|
4763
|
-
if (e instanceof
|
|
4823
|
+
if (e instanceof Er && (e = this._createError(e.msg, this._cursor.getSpan(e.cursor))), e instanceof ee) this.errors.push(e);
|
|
4764
4824
|
else throw e;
|
|
4765
4825
|
}
|
|
4766
4826
|
_attemptCharCode(e) {
|
|
4767
4827
|
return this._cursor.peek() === e ? (this._cursor.advance(), !0) : !1;
|
|
4768
4828
|
}
|
|
4769
4829
|
_attemptCharCodeCaseInsensitive(e) {
|
|
4770
|
-
return
|
|
4830
|
+
return Ya(this._cursor.peek(), e) ? (this._cursor.advance(), !0) : !1;
|
|
4771
4831
|
}
|
|
4772
4832
|
_requireCharCode(e) {
|
|
4773
4833
|
let t = this._cursor.clone();
|
|
4774
|
-
if (!this._attemptCharCode(e)) throw this._createError(
|
|
4834
|
+
if (!this._attemptCharCode(e)) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(t));
|
|
4775
4835
|
}
|
|
4776
4836
|
_attemptStr(e) {
|
|
4777
4837
|
let t = e.length;
|
|
@@ -4786,18 +4846,18 @@ var Mr = (function(e) {
|
|
|
4786
4846
|
}
|
|
4787
4847
|
_requireStr(e) {
|
|
4788
4848
|
let t = this._cursor.clone();
|
|
4789
|
-
if (!this._attemptStr(e)) throw this._createError(
|
|
4849
|
+
if (!this._attemptStr(e)) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(t));
|
|
4790
4850
|
}
|
|
4791
4851
|
_requireStrCaseInsensitive(e) {
|
|
4792
4852
|
let t = this._cursor.clone();
|
|
4793
|
-
if (!this._attemptStrCaseInsensitive(e)) throw this._createError(
|
|
4853
|
+
if (!this._attemptStrCaseInsensitive(e)) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(t));
|
|
4794
4854
|
}
|
|
4795
4855
|
_attemptCharCodeUntilFn(e) {
|
|
4796
4856
|
for (; !e(this._cursor.peek());) this._cursor.advance();
|
|
4797
4857
|
}
|
|
4798
4858
|
_requireCharCodeUntilFn(e, t) {
|
|
4799
4859
|
let r = this._cursor.clone();
|
|
4800
|
-
if (this._attemptCharCodeUntilFn(e), this._cursor.diff(r) < t) throw this._createError(
|
|
4860
|
+
if (this._attemptCharCodeUntilFn(e), this._cursor.diff(r) < t) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(r));
|
|
4801
4861
|
}
|
|
4802
4862
|
_attemptUntilChar(e) {
|
|
4803
4863
|
for (; this._cursor.peek() !== e;) this._cursor.advance();
|
|
@@ -4817,7 +4877,7 @@ var Mr = (function(e) {
|
|
|
4817
4877
|
return !0;
|
|
4818
4878
|
}
|
|
4819
4879
|
_isBlockStart() {
|
|
4820
|
-
return this._cursor.peek() === 64 &&
|
|
4880
|
+
return this._cursor.peek() === 64 && Va.some((e) => this._peekStr(e));
|
|
4821
4881
|
}
|
|
4822
4882
|
_isLetStart() {
|
|
4823
4883
|
return this._cursor.peek() === 64 && this._peekStr("@let");
|
|
@@ -4827,10 +4887,10 @@ var Mr = (function(e) {
|
|
|
4827
4887
|
let t = this._cursor.clone();
|
|
4828
4888
|
if (this._cursor.advance(), this._attemptCharCode(35)) {
|
|
4829
4889
|
let r = this._attemptCharCode(120) || this._attemptCharCode(88), n = this._cursor.clone();
|
|
4830
|
-
if (this._attemptCharCodeUntilFn(
|
|
4890
|
+
if (this._attemptCharCodeUntilFn(Ga), this._cursor.peek() != 59) {
|
|
4831
4891
|
this._cursor.advance();
|
|
4832
|
-
let s = r ?
|
|
4833
|
-
throw this._createError(
|
|
4892
|
+
let s = r ? gr.HEX : gr.DEC;
|
|
4893
|
+
throw this._createError(Ha(s, this._cursor.getChars(t)), this._cursor.getSpan());
|
|
4834
4894
|
}
|
|
4835
4895
|
let i = this._cursor.getChars(n);
|
|
4836
4896
|
this._cursor.advance();
|
|
@@ -4838,16 +4898,16 @@ var Mr = (function(e) {
|
|
|
4838
4898
|
let s = parseInt(i, r ? 16 : 10);
|
|
4839
4899
|
this._endToken([String.fromCodePoint(s), this._cursor.getChars(t)]);
|
|
4840
4900
|
} catch {
|
|
4841
|
-
throw this._createError(
|
|
4901
|
+
throw this._createError(xi(this._cursor.getChars(t)), this._cursor.getSpan());
|
|
4842
4902
|
}
|
|
4843
4903
|
} else {
|
|
4844
4904
|
let r = this._cursor.clone();
|
|
4845
|
-
if (this._attemptCharCodeUntilFn(
|
|
4905
|
+
if (this._attemptCharCodeUntilFn(za), this._cursor.peek() != 59) this._beginToken(e, t), this._cursor = r, this._endToken(["&"]);
|
|
4846
4906
|
else {
|
|
4847
4907
|
let n = this._cursor.getChars(r);
|
|
4848
4908
|
this._cursor.advance();
|
|
4849
|
-
let i =
|
|
4850
|
-
if (!i) throw this._createError(
|
|
4909
|
+
let i = _e.hasOwnProperty(n) && _e[n];
|
|
4910
|
+
if (!i) throw this._createError(xi(n), this._cursor.getSpan(t));
|
|
4851
4911
|
this._endToken([i, `&${n};`]);
|
|
4852
4912
|
}
|
|
4853
4913
|
}
|
|
@@ -4876,30 +4936,54 @@ var Mr = (function(e) {
|
|
|
4876
4936
|
}
|
|
4877
4937
|
_consumePrefixAndName(e) {
|
|
4878
4938
|
let t = this._cursor.clone(), r = "";
|
|
4879
|
-
for (; this._cursor.peek() !== 58 && !
|
|
4939
|
+
for (; this._cursor.peek() !== 58 && !Wa(this._cursor.peek());) this._cursor.advance();
|
|
4880
4940
|
let n;
|
|
4881
4941
|
this._cursor.peek() === 58 ? (r = this._cursor.getChars(t), this._cursor.advance(), n = this._cursor.clone()) : n = t, this._requireCharCodeUntilFn(e, r === "" ? 0 : 1);
|
|
4882
4942
|
let i = this._cursor.getChars(n);
|
|
4883
4943
|
return [r, i];
|
|
4884
4944
|
}
|
|
4945
|
+
_consumeSingleLineComment() {
|
|
4946
|
+
this._attemptCharCodeUntilFn((e) => Me(e) || e === 0), this._attemptCharCodeUntilFn(v);
|
|
4947
|
+
}
|
|
4948
|
+
_consumeMultiLineComment() {
|
|
4949
|
+
this._attemptCharCodeUntilFn((e) => {
|
|
4950
|
+
if (e === 0) return !0;
|
|
4951
|
+
if (e === 42) {
|
|
4952
|
+
let t = this._cursor.clone();
|
|
4953
|
+
return t.advance(), t.peek() === 47;
|
|
4954
|
+
}
|
|
4955
|
+
return !1;
|
|
4956
|
+
}), this._attemptStr("*/") && this._attemptCharCodeUntilFn(v);
|
|
4957
|
+
}
|
|
4885
4958
|
_consumeTagOpen(e) {
|
|
4886
4959
|
let t, r, n, i, s = [];
|
|
4887
4960
|
try {
|
|
4888
|
-
if (this._selectorlessEnabled &&
|
|
4961
|
+
if (this._selectorlessEnabled && It(this._cursor.peek())) i = this._consumeComponentOpenStart(e), [n, r, t] = i.parts, r && (n += `:${r}`), t && (n += `:${t}`), this._attemptCharCodeUntilFn(v);
|
|
4889
4962
|
else {
|
|
4890
|
-
if (!
|
|
4891
|
-
i = this._consumeTagOpenStart(e), r = i.parts[0], t = n = i.parts[1], this._attemptCharCodeUntilFn(
|
|
4963
|
+
if (!Re(this._cursor.peek())) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(e));
|
|
4964
|
+
i = this._consumeTagOpenStart(e), r = i.parts[0], t = n = i.parts[1], this._attemptCharCodeUntilFn(v);
|
|
4892
4965
|
}
|
|
4893
|
-
for (
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4966
|
+
for (;;) {
|
|
4967
|
+
if (this._attemptStr("//")) {
|
|
4968
|
+
this._consumeSingleLineComment();
|
|
4969
|
+
continue;
|
|
4970
|
+
}
|
|
4971
|
+
if (this._attemptStr("/*")) {
|
|
4972
|
+
this._consumeMultiLineComment();
|
|
4973
|
+
continue;
|
|
4974
|
+
}
|
|
4975
|
+
if (Li(this._cursor.peek())) break;
|
|
4976
|
+
if (this._selectorlessEnabled && this._cursor.peek() === 64) {
|
|
4977
|
+
let o = this._cursor.clone(), c = o.clone();
|
|
4978
|
+
c.advance(), It(c.peek()) && this._consumeDirective(o, c);
|
|
4979
|
+
} else {
|
|
4980
|
+
let o = this._consumeAttribute();
|
|
4981
|
+
s.push(o);
|
|
4982
|
+
}
|
|
4899
4983
|
}
|
|
4900
4984
|
i.type === l.COMPONENT_OPEN_START ? this._consumeComponentOpenEnd() : this._consumeTagOpenEnd();
|
|
4901
4985
|
} catch (o) {
|
|
4902
|
-
if (o instanceof
|
|
4986
|
+
if (o instanceof ee) {
|
|
4903
4987
|
i ? i.type = i.type === l.COMPONENT_OPEN_START ? l.INCOMPLETE_COMPONENT_OPEN : l.INCOMPLETE_TAG_OPEN : (this._beginToken(l.TEXT, e), this._endToken(["<"]));
|
|
4904
4988
|
return;
|
|
4905
4989
|
}
|
|
@@ -4910,11 +4994,11 @@ var Mr = (function(e) {
|
|
|
4910
4994
|
this._handleFullNameStackForTagOpen(r, t), a === R.RAW_TEXT ? this._consumeRawTextWithTagClose(r, i, n, !1) : a === R.ESCAPABLE_RAW_TEXT && this._consumeRawTextWithTagClose(r, i, n, !0);
|
|
4911
4995
|
}
|
|
4912
4996
|
_consumeRawTextWithTagClose(e, t, r, n) {
|
|
4913
|
-
this._consumeRawText(n, () => !this._attemptCharCode(60) || !this._attemptCharCode(47) || (this._attemptCharCodeUntilFn(
|
|
4997
|
+
this._consumeRawText(n, () => !this._attemptCharCode(60) || !this._attemptCharCode(47) || (this._attemptCharCodeUntilFn(v), !this._attemptStrCaseInsensitive(e && t.type !== l.COMPONENT_OPEN_START ? `${e}:${r}` : r)) ? !1 : (this._attemptCharCodeUntilFn(v), this._attemptCharCode(62))), this._beginToken(t.type === l.COMPONENT_OPEN_START ? l.COMPONENT_CLOSE : l.TAG_CLOSE), this._requireCharCodeUntilFn((i) => i === 62, 3), this._cursor.advance(), this._endToken(t.parts), this._handleFullNameStackForTagClose(e, r);
|
|
4914
4998
|
}
|
|
4915
4999
|
_consumeTagOpenStart(e) {
|
|
4916
5000
|
this._beginToken(l.TAG_OPEN_START, e);
|
|
4917
|
-
let t = this._consumePrefixAndName(
|
|
5001
|
+
let t = this._consumePrefixAndName(Ee);
|
|
4918
5002
|
return this._endToken(t);
|
|
4919
5003
|
}
|
|
4920
5004
|
_consumeComponentOpenStart(e) {
|
|
@@ -4924,9 +5008,9 @@ var Mr = (function(e) {
|
|
|
4924
5008
|
}
|
|
4925
5009
|
_consumeComponentName() {
|
|
4926
5010
|
let e = this._cursor.clone();
|
|
4927
|
-
for (;
|
|
5011
|
+
for (; Ni(this._cursor.peek());) this._cursor.advance();
|
|
4928
5012
|
let t = this._cursor.getChars(e), r = "", n = "";
|
|
4929
|
-
return this._cursor.peek() === 58 && (this._cursor.advance(), [r, n] = this._consumePrefixAndName(
|
|
5013
|
+
return this._cursor.peek() === 58 && (this._cursor.advance(), [r, n] = this._consumePrefixAndName(Ee)), [
|
|
4930
5014
|
t,
|
|
4931
5015
|
r,
|
|
4932
5016
|
n
|
|
@@ -4934,7 +5018,7 @@ var Mr = (function(e) {
|
|
|
4934
5018
|
}
|
|
4935
5019
|
_consumeAttribute() {
|
|
4936
5020
|
let [e, t] = this._consumeAttributeName(), r;
|
|
4937
|
-
return this._attemptCharCodeUntilFn(
|
|
5021
|
+
return this._attemptCharCodeUntilFn(v), this._attemptCharCode(61) && (this._attemptCharCodeUntilFn(v), r = this._consumeAttributeValue()), this._attemptCharCodeUntilFn(v), {
|
|
4938
5022
|
prefix: e,
|
|
4939
5023
|
name: t,
|
|
4940
5024
|
value: r
|
|
@@ -4942,7 +5026,7 @@ var Mr = (function(e) {
|
|
|
4942
5026
|
}
|
|
4943
5027
|
_consumeAttributeName() {
|
|
4944
5028
|
let e = this._cursor.peek();
|
|
4945
|
-
if (e === 39 || e === 34) throw this._createError(
|
|
5029
|
+
if (e === 39 || e === 34) throw this._createError(Se(e), this._cursor.getSpan());
|
|
4946
5030
|
this._beginToken(l.ATTR_NAME);
|
|
4947
5031
|
let t;
|
|
4948
5032
|
if (this._openDirectiveCount > 0) {
|
|
@@ -4955,12 +5039,12 @@ var Mr = (function(e) {
|
|
|
4955
5039
|
n--;
|
|
4956
5040
|
}
|
|
4957
5041
|
}
|
|
4958
|
-
return
|
|
5042
|
+
return Ee(i);
|
|
4959
5043
|
};
|
|
4960
5044
|
} else if (e === 91) {
|
|
4961
5045
|
let n = 0;
|
|
4962
|
-
t = (i) => (i === 91 ? n++ : i === 93 && n--, n <= 0 ?
|
|
4963
|
-
} else t =
|
|
5046
|
+
t = (i) => (i === 91 ? n++ : i === 93 && n--, n <= 0 ? Ee(i) : Me(i));
|
|
5047
|
+
} else t = Ee;
|
|
4964
5048
|
let r = this._consumePrefixAndName(t);
|
|
4965
5049
|
return this._endToken(r), r;
|
|
4966
5050
|
}
|
|
@@ -4972,7 +5056,7 @@ var Mr = (function(e) {
|
|
|
4972
5056
|
let r = () => this._cursor.peek() === t;
|
|
4973
5057
|
e = this._consumeWithInterpolation(l.ATTR_VALUE_TEXT, l.ATTR_VALUE_INTERPOLATION, r, r), this._consumeQuote(t);
|
|
4974
5058
|
} else {
|
|
4975
|
-
let t = () =>
|
|
5059
|
+
let t = () => Ee(this._cursor.peek());
|
|
4976
5060
|
e = this._consumeWithInterpolation(l.ATTR_VALUE_TEXT, l.ATTR_VALUE_INTERPOLATION, t, t);
|
|
4977
5061
|
}
|
|
4978
5062
|
return e;
|
|
@@ -4991,18 +5075,18 @@ var Mr = (function(e) {
|
|
|
4991
5075
|
_consumeTagClose(e) {
|
|
4992
5076
|
if (this._selectorlessEnabled) {
|
|
4993
5077
|
let t = e.clone();
|
|
4994
|
-
for (; t.peek() !== 62 && !
|
|
4995
|
-
if (
|
|
5078
|
+
for (; t.peek() !== 62 && !It(t.peek());) t.advance();
|
|
5079
|
+
if (It(t.peek())) {
|
|
4996
5080
|
this._beginToken(l.COMPONENT_CLOSE, e);
|
|
4997
5081
|
let r = this._consumeComponentName();
|
|
4998
|
-
this._attemptCharCodeUntilFn(
|
|
5082
|
+
this._attemptCharCodeUntilFn(v), this._requireCharCode(62), this._endToken(r);
|
|
4999
5083
|
return;
|
|
5000
5084
|
}
|
|
5001
5085
|
}
|
|
5002
|
-
if (this._beginToken(l.TAG_CLOSE, e), this._attemptCharCodeUntilFn(
|
|
5086
|
+
if (this._beginToken(l.TAG_CLOSE, e), this._attemptCharCodeUntilFn(v), this._allowHtmComponentClosingTags && this._attemptCharCode(47)) this._attemptCharCodeUntilFn(v), this._requireCharCode(62), this._endToken([]);
|
|
5003
5087
|
else {
|
|
5004
|
-
let [t, r] = this._consumePrefixAndName(
|
|
5005
|
-
this._attemptCharCodeUntilFn(
|
|
5088
|
+
let [t, r] = this._consumePrefixAndName(Ee);
|
|
5089
|
+
this._attemptCharCodeUntilFn(v), this._requireCharCode(62), this._endToken([t, r]), this._handleFullNameStackForTagClose(t, r);
|
|
5006
5090
|
}
|
|
5007
5091
|
}
|
|
5008
5092
|
_consumeExpansionFormStart() {
|
|
@@ -5013,17 +5097,17 @@ var Mr = (function(e) {
|
|
|
5013
5097
|
let n = this._endToken([e]);
|
|
5014
5098
|
t !== e && this.nonNormalizedIcuExpressions.push(n);
|
|
5015
5099
|
}
|
|
5016
|
-
this._requireCharCode(44), this._attemptCharCodeUntilFn(
|
|
5100
|
+
this._requireCharCode(44), this._attemptCharCodeUntilFn(v), this._beginToken(l.RAW_TEXT);
|
|
5017
5101
|
let r = this._readUntil(44);
|
|
5018
|
-
this._endToken([r]), this._requireCharCode(44), this._attemptCharCodeUntilFn(
|
|
5102
|
+
this._endToken([r]), this._requireCharCode(44), this._attemptCharCodeUntilFn(v);
|
|
5019
5103
|
}
|
|
5020
5104
|
_consumeExpansionCaseStart() {
|
|
5021
5105
|
this._beginToken(l.EXPANSION_CASE_VALUE);
|
|
5022
5106
|
let e = this._readUntil(123).trim();
|
|
5023
|
-
this._endToken([e]), this._attemptCharCodeUntilFn(
|
|
5107
|
+
this._endToken([e]), this._attemptCharCodeUntilFn(v), this._beginToken(l.EXPANSION_CASE_EXP_START), this._requireCharCode(123), this._endToken([]), this._attemptCharCodeUntilFn(v), this._expansionCaseStack.push(l.EXPANSION_CASE_EXP_START);
|
|
5024
5108
|
}
|
|
5025
5109
|
_consumeExpansionCaseEnd() {
|
|
5026
|
-
this._beginToken(l.EXPANSION_CASE_EXP_END), this._requireCharCode(125), this._endToken([]), this._attemptCharCodeUntilFn(
|
|
5110
|
+
this._beginToken(l.EXPANSION_CASE_EXP_END), this._requireCharCode(125), this._endToken([]), this._attemptCharCodeUntilFn(v), this._expansionCaseStack.pop();
|
|
5027
5111
|
}
|
|
5028
5112
|
_consumeExpansionFormEnd() {
|
|
5029
5113
|
this._beginToken(l.EXPANSION_FORM_END), this._requireCharCode(125), this._endToken([]), this._expansionCaseStack.pop();
|
|
@@ -5033,7 +5117,7 @@ var Mr = (function(e) {
|
|
|
5033
5117
|
let i = [];
|
|
5034
5118
|
for (; !r();) {
|
|
5035
5119
|
let a = this._cursor.clone();
|
|
5036
|
-
this._attemptStr(
|
|
5120
|
+
this._attemptStr(st.start) ? (this._endToken([this._processCarriageReturns(i.join(""))], a), i.length = 0, this._consumeInterpolation(t, a, n), this._beginToken(e)) : this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(i.join(""))]), i.length = 0, this._consumeEntity(e), this._beginToken(e)) : i.push(this._readChar());
|
|
5037
5121
|
}
|
|
5038
5122
|
this._inInterpolation = !1;
|
|
5039
5123
|
let s = this._processCarriageReturns(i.join(""));
|
|
@@ -5041,7 +5125,7 @@ var Mr = (function(e) {
|
|
|
5041
5125
|
}
|
|
5042
5126
|
_consumeInterpolation(e, t, r) {
|
|
5043
5127
|
let n = [];
|
|
5044
|
-
this._beginToken(e, t), n.push(
|
|
5128
|
+
this._beginToken(e, t), n.push(st.start);
|
|
5045
5129
|
let i = this._cursor.clone(), s = null, a = !1;
|
|
5046
5130
|
for (; this._cursor.peek() !== 0 && (r === null || !r());) {
|
|
5047
5131
|
let o = this._cursor.clone();
|
|
@@ -5049,26 +5133,26 @@ var Mr = (function(e) {
|
|
|
5049
5133
|
this._cursor = o, n.push(this._getProcessedChars(i, o)), this._endToken(n);
|
|
5050
5134
|
return;
|
|
5051
5135
|
}
|
|
5052
|
-
if (s === null) if (this._attemptStr(
|
|
5053
|
-
n.push(this._getProcessedChars(i, o)), n.push(
|
|
5136
|
+
if (s === null) if (this._attemptStr(st.end)) {
|
|
5137
|
+
n.push(this._getProcessedChars(i, o)), n.push(st.end), this._endToken(n);
|
|
5054
5138
|
return;
|
|
5055
5139
|
} else this._attemptStr("//") && (a = !0);
|
|
5056
5140
|
let c = this._cursor.peek();
|
|
5057
|
-
this._cursor.advance(), c === 92 ? this._cursor.advance() : c === s ? s = null : !a && s === null &&
|
|
5141
|
+
this._cursor.advance(), c === 92 ? this._cursor.advance() : c === s ? s = null : !a && s === null && Dt(c) && (s = c);
|
|
5058
5142
|
}
|
|
5059
5143
|
n.push(this._getProcessedChars(i, this._cursor)), this._endToken(n);
|
|
5060
5144
|
}
|
|
5061
5145
|
_consumeDirective(e, t) {
|
|
5062
|
-
for (this._requireCharCode(64), this._cursor.advance();
|
|
5146
|
+
for (this._requireCharCode(64), this._cursor.advance(); Ni(this._cursor.peek());) this._cursor.advance();
|
|
5063
5147
|
this._beginToken(l.DIRECTIVE_NAME, e);
|
|
5064
5148
|
let r = this._cursor.getChars(t);
|
|
5065
|
-
if (this._endToken([r]), this._attemptCharCodeUntilFn(
|
|
5066
|
-
for (this._openDirectiveCount++, this._beginToken(l.DIRECTIVE_OPEN), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(
|
|
5067
|
-
if (this._attemptCharCodeUntilFn(
|
|
5149
|
+
if (this._endToken([r]), this._attemptCharCodeUntilFn(v), this._cursor.peek() === 40) {
|
|
5150
|
+
for (this._openDirectiveCount++, this._beginToken(l.DIRECTIVE_OPEN), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(v); !Li(this._cursor.peek()) && this._cursor.peek() !== 41;) this._consumeAttribute();
|
|
5151
|
+
if (this._attemptCharCodeUntilFn(v), this._openDirectiveCount--, this._cursor.peek() !== 41) {
|
|
5068
5152
|
if (this._cursor.peek() === 62 || this._cursor.peek() === 47) return;
|
|
5069
|
-
throw this._createError(
|
|
5153
|
+
throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(e));
|
|
5070
5154
|
}
|
|
5071
|
-
this._beginToken(l.DIRECTIVE_CLOSE), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(
|
|
5155
|
+
this._beginToken(l.DIRECTIVE_CLOSE), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(v);
|
|
5072
5156
|
}
|
|
5073
5157
|
}
|
|
5074
5158
|
_getProcessedChars(e, t) {
|
|
@@ -5101,58 +5185,58 @@ var Mr = (function(e) {
|
|
|
5101
5185
|
}
|
|
5102
5186
|
isExpansionFormStart() {
|
|
5103
5187
|
if (this._cursor.peek() !== 123) return !1;
|
|
5104
|
-
let e = this._cursor.clone(), t = this._attemptStr(
|
|
5188
|
+
let e = this._cursor.clone(), t = this._attemptStr(st.start);
|
|
5105
5189
|
return this._cursor = e, !t;
|
|
5106
5190
|
}
|
|
5107
5191
|
_handleFullNameStackForTagOpen(e, t) {
|
|
5108
|
-
let r =
|
|
5192
|
+
let r = fe(e, t);
|
|
5109
5193
|
(this._fullNameStack.length === 0 || this._fullNameStack[this._fullNameStack.length - 1] === r) && this._fullNameStack.push(r);
|
|
5110
5194
|
}
|
|
5111
5195
|
_handleFullNameStackForTagClose(e, t) {
|
|
5112
|
-
let r =
|
|
5196
|
+
let r = fe(e, t);
|
|
5113
5197
|
this._fullNameStack.length !== 0 && this._fullNameStack[this._fullNameStack.length - 1] === r && this._fullNameStack.pop();
|
|
5114
5198
|
}
|
|
5115
5199
|
};
|
|
5116
|
-
function
|
|
5117
|
-
return !
|
|
5200
|
+
function v(e) {
|
|
5201
|
+
return !it(e) || e === 0;
|
|
5118
5202
|
}
|
|
5119
|
-
function
|
|
5120
|
-
return
|
|
5203
|
+
function Ee(e) {
|
|
5204
|
+
return it(e) || e === 62 || e === 60 || e === 47 || e === 39 || e === 34 || e === 61 || e === 0;
|
|
5121
5205
|
}
|
|
5122
|
-
function
|
|
5206
|
+
function Wa(e) {
|
|
5123
5207
|
return (e < 97 || 122 < e) && (e < 65 || 90 < e) && (e < 48 || e > 57);
|
|
5124
5208
|
}
|
|
5125
|
-
function
|
|
5126
|
-
return e === 59 || e === 0 || !
|
|
5209
|
+
function Ga(e) {
|
|
5210
|
+
return e === 59 || e === 0 || !ki(e);
|
|
5127
5211
|
}
|
|
5128
|
-
function
|
|
5129
|
-
return e === 59 || e === 0 || !
|
|
5212
|
+
function za(e) {
|
|
5213
|
+
return e === 59 || e === 0 || !(Re(e) || Ie(e));
|
|
5130
5214
|
}
|
|
5131
|
-
function
|
|
5215
|
+
function $a(e) {
|
|
5132
5216
|
return e !== 125;
|
|
5133
5217
|
}
|
|
5134
|
-
function
|
|
5135
|
-
return
|
|
5218
|
+
function Ya(e, t) {
|
|
5219
|
+
return yi(e) === yi(t);
|
|
5136
5220
|
}
|
|
5137
|
-
function
|
|
5221
|
+
function yi(e) {
|
|
5138
5222
|
return e >= 97 && e <= 122 ? e - 97 + 65 : e;
|
|
5139
5223
|
}
|
|
5140
|
-
function
|
|
5141
|
-
return
|
|
5224
|
+
function ja(e) {
|
|
5225
|
+
return Re(e) || Ie(e) || e === 95;
|
|
5142
5226
|
}
|
|
5143
|
-
function
|
|
5144
|
-
return e !== 59 &&
|
|
5227
|
+
function Ai(e) {
|
|
5228
|
+
return e !== 59 && v(e);
|
|
5145
5229
|
}
|
|
5146
|
-
function
|
|
5230
|
+
function It(e) {
|
|
5147
5231
|
return e === 95 || e >= 65 && e <= 90;
|
|
5148
5232
|
}
|
|
5149
|
-
function
|
|
5150
|
-
return
|
|
5233
|
+
function Ni(e) {
|
|
5234
|
+
return Re(e) || Ie(e) || e === 95;
|
|
5151
5235
|
}
|
|
5152
|
-
function
|
|
5236
|
+
function Li(e) {
|
|
5153
5237
|
return e === 47 || e === 62 || e === 60 || e === 0;
|
|
5154
5238
|
}
|
|
5155
|
-
function
|
|
5239
|
+
function Xa(e) {
|
|
5156
5240
|
let t = [], r;
|
|
5157
5241
|
for (let n = 0; n < e.length; n++) {
|
|
5158
5242
|
let i = e[n];
|
|
@@ -5160,9 +5244,13 @@ function Vo(e) {
|
|
|
5160
5244
|
}
|
|
5161
5245
|
return t;
|
|
5162
5246
|
}
|
|
5163
|
-
var
|
|
5247
|
+
var Oi = class _r {
|
|
5248
|
+
state;
|
|
5249
|
+
file;
|
|
5250
|
+
input;
|
|
5251
|
+
end;
|
|
5164
5252
|
constructor(t, r) {
|
|
5165
|
-
if (t instanceof
|
|
5253
|
+
if (t instanceof _r) {
|
|
5166
5254
|
this.file = t.file, this.input = t.input, this.end = t.end;
|
|
5167
5255
|
let n = t.state;
|
|
5168
5256
|
this.state = {
|
|
@@ -5182,7 +5270,7 @@ var is = class Br {
|
|
|
5182
5270
|
}
|
|
5183
5271
|
}
|
|
5184
5272
|
clone() {
|
|
5185
|
-
return new
|
|
5273
|
+
return new _r(this);
|
|
5186
5274
|
}
|
|
5187
5275
|
peek() {
|
|
5188
5276
|
return this.state.peek;
|
|
@@ -5213,19 +5301,20 @@ var is = class Br {
|
|
|
5213
5301
|
return this.input.charCodeAt(t);
|
|
5214
5302
|
}
|
|
5215
5303
|
advanceState(t) {
|
|
5216
|
-
if (t.offset >= this.end) throw this.state = t, new
|
|
5304
|
+
if (t.offset >= this.end) throw this.state = t, new Er("Unexpected character \"EOF\"", this);
|
|
5217
5305
|
let r = this.charAt(t.offset);
|
|
5218
|
-
r === 10 ? (t.line++, t.column = 0) :
|
|
5306
|
+
r === 10 ? (t.line++, t.column = 0) : Me(r) || t.column++, t.offset++, this.updatePeek(t);
|
|
5219
5307
|
}
|
|
5220
5308
|
updatePeek(t) {
|
|
5221
5309
|
t.peek = t.offset >= this.end ? 0 : this.charAt(t.offset);
|
|
5222
5310
|
}
|
|
5223
5311
|
locationFromCursor(t) {
|
|
5224
|
-
return new
|
|
5312
|
+
return new De(t.file, t.state.offset, t.state.line, t.state.column);
|
|
5225
5313
|
}
|
|
5226
|
-
},
|
|
5314
|
+
}, Ka = class Sr extends Oi {
|
|
5315
|
+
internalState;
|
|
5227
5316
|
constructor(t, r) {
|
|
5228
|
-
t instanceof
|
|
5317
|
+
t instanceof Sr ? (super(t), this.internalState = { ...t.internalState }) : (super(t, r), this.internalState = this.state);
|
|
5229
5318
|
}
|
|
5230
5319
|
advance() {
|
|
5231
5320
|
this.state = this.internalState, super.advance(), this.processEscapeSequence();
|
|
@@ -5234,7 +5323,7 @@ var is = class Br {
|
|
|
5234
5323
|
super.init(), this.processEscapeSequence();
|
|
5235
5324
|
}
|
|
5236
5325
|
clone() {
|
|
5237
|
-
return new
|
|
5326
|
+
return new Sr(this);
|
|
5238
5327
|
}
|
|
5239
5328
|
getChars(t) {
|
|
5240
5329
|
let r = t.clone(), n = "";
|
|
@@ -5262,51 +5351,56 @@ var is = class Br {
|
|
|
5262
5351
|
this.advanceState(this.internalState);
|
|
5263
5352
|
let r = this.clone();
|
|
5264
5353
|
this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 2);
|
|
5265
|
-
} else if (
|
|
5354
|
+
} else if (dr(t())) {
|
|
5266
5355
|
let r = "", n = 0, i = this.clone();
|
|
5267
|
-
for (;
|
|
5356
|
+
for (; dr(t()) && n < 3;) i = this.clone(), r += String.fromCodePoint(t()), this.advanceState(this.internalState), n++;
|
|
5268
5357
|
this.state.peek = parseInt(r, 8), this.internalState = i.internalState;
|
|
5269
|
-
} else
|
|
5358
|
+
} else Me(this.internalState.peek) ? (this.advanceState(this.internalState), this.state = this.internalState) : this.state.peek = this.internalState.peek;
|
|
5270
5359
|
}
|
|
5271
5360
|
decodeHexDigits(t, r) {
|
|
5272
5361
|
let n = this.input.slice(t.internalState.offset, t.internalState.offset + r), i = parseInt(n, 16);
|
|
5273
|
-
if (isNaN(i)) throw t.state = t.internalState, new
|
|
5362
|
+
if (isNaN(i)) throw t.state = t.internalState, new Er("Invalid hexadecimal escape sequence", t);
|
|
5274
5363
|
return i;
|
|
5275
5364
|
}
|
|
5276
|
-
},
|
|
5365
|
+
}, Er = class extends Error {
|
|
5277
5366
|
constructor(e, t) {
|
|
5278
5367
|
super(e), this.msg = e, this.cursor = t, Object.setPrototypeOf(this, new.target.prototype);
|
|
5279
5368
|
}
|
|
5280
5369
|
};
|
|
5281
|
-
var
|
|
5370
|
+
var y = class Ri extends ee {
|
|
5282
5371
|
static create(t, r, n) {
|
|
5283
|
-
return new
|
|
5372
|
+
return new Ri(t, r, n);
|
|
5284
5373
|
}
|
|
5285
5374
|
constructor(t, r, n) {
|
|
5286
5375
|
super(r, n), this.elementName = t;
|
|
5287
5376
|
}
|
|
5288
|
-
},
|
|
5377
|
+
}, Qa = class {
|
|
5289
5378
|
constructor(e, t) {
|
|
5290
5379
|
this.rootNodes = e, this.errors = t;
|
|
5291
5380
|
}
|
|
5292
|
-
},
|
|
5381
|
+
}, Mi = class {
|
|
5293
5382
|
constructor(e) {
|
|
5294
5383
|
this.getTagDefinition = e;
|
|
5295
5384
|
}
|
|
5296
5385
|
parse(e, t, r, n = !1, i) {
|
|
5297
|
-
let s = (m) => (
|
|
5298
|
-
let z = c(m,
|
|
5386
|
+
let s = (m) => (_, ...T) => m(_.toLowerCase(), ...T), a = n ? this.getTagDefinition : s(this.getTagDefinition), o = (m) => a(m).getContentType(), c = n ? i : s(i), u = Pi(e, t, i ? (m, _, T, P) => {
|
|
5387
|
+
let z = c(m, _, T, P);
|
|
5299
5388
|
return z !== void 0 ? z : o(m);
|
|
5300
|
-
} : o, r), p = r && r.canSelfClose || !1, d = r && r.allowHtmComponentClosingTags || !1,
|
|
5301
|
-
return
|
|
5302
|
-
}
|
|
5303
|
-
},
|
|
5389
|
+
} : o, r), p = r && r.canSelfClose || !1, d = r && r.allowHtmComponentClosingTags || !1, g = new Ja(u.tokens, a, p, d, n);
|
|
5390
|
+
return g.build(), new Qa(g.rootNodes, [...u.errors, ...g.errors]);
|
|
5391
|
+
}
|
|
5392
|
+
}, Ja = class Bi {
|
|
5393
|
+
_index = -1;
|
|
5394
|
+
_peek;
|
|
5395
|
+
_containerStack = [];
|
|
5396
|
+
rootNodes = [];
|
|
5397
|
+
errors = [];
|
|
5304
5398
|
constructor(t, r, n, i, s) {
|
|
5305
|
-
this.tokens = t, this.tagDefinitionResolver = r, this.canSelfClose = n, this.allowHtmComponentClosingTags = i, this.isTagNameCaseSensitive = s, this.
|
|
5399
|
+
this.tokens = t, this.tagDefinitionResolver = r, this.canSelfClose = n, this.allowHtmComponentClosingTags = i, this.isTagNameCaseSensitive = s, this._advance();
|
|
5306
5400
|
}
|
|
5307
5401
|
build() {
|
|
5308
5402
|
for (; this._peek.type !== l.EOF;) this._peek.type === l.TAG_OPEN_START || this._peek.type === l.INCOMPLETE_TAG_OPEN ? this._consumeElementStartTag(this._advance()) : this._peek.type === l.TAG_CLOSE ? (this._closeVoidElement(), this._consumeElementEndTag(this._advance())) : this._peek.type === l.CDATA_START ? (this._closeVoidElement(), this._consumeCdata(this._advance())) : this._peek.type === l.COMMENT_START ? (this._closeVoidElement(), this._consumeComment(this._advance())) : this._peek.type === l.TEXT || this._peek.type === l.RAW_TEXT || this._peek.type === l.ESCAPABLE_RAW_TEXT ? (this._closeVoidElement(), this._consumeText(this._advance())) : this._peek.type === l.EXPANSION_FORM_START ? this._consumeExpansion(this._advance()) : this._peek.type === l.BLOCK_OPEN_START ? (this._closeVoidElement(), this._consumeBlockOpen(this._advance())) : this._peek.type === l.BLOCK_CLOSE ? (this._closeVoidElement(), this._consumeBlockClose(this._advance())) : this._peek.type === l.INCOMPLETE_BLOCK_OPEN ? (this._closeVoidElement(), this._consumeIncompleteBlock(this._advance())) : this._peek.type === l.LET_START ? (this._closeVoidElement(), this._consumeLet(this._advance())) : this._peek.type === l.DOC_TYPE_START ? this._consumeDocType(this._advance()) : this._peek.type === l.INCOMPLETE_LET ? (this._closeVoidElement(), this._consumeIncompleteLet(this._advance())) : this._peek.type === l.COMPONENT_OPEN_START || this._peek.type === l.INCOMPLETE_COMPONENT_OPEN ? this._consumeComponentStartTag(this._advance()) : this._peek.type === l.COMPONENT_CLOSE ? this._consumeComponentEndTag(this._advance()) : this._advance();
|
|
5309
|
-
for (let t of this._containerStack) t instanceof
|
|
5403
|
+
for (let t of this._containerStack) t instanceof ge && this.errors.push(y.create(t.name, t.sourceSpan, `Unclosed block "${t.name}"`));
|
|
5310
5404
|
}
|
|
5311
5405
|
_advance() {
|
|
5312
5406
|
let t = this._peek;
|
|
@@ -5317,15 +5411,15 @@ var N = class os extends ne {
|
|
|
5317
5411
|
}
|
|
5318
5412
|
_consumeCdata(t) {
|
|
5319
5413
|
let r = this._advance(), n = this._getText(r), i = this._advanceIf(l.CDATA_END);
|
|
5320
|
-
this._addToParent(new
|
|
5414
|
+
this._addToParent(new Si(n, new h(t.sourceSpan.start, (i || r).sourceSpan.end), [r]));
|
|
5321
5415
|
}
|
|
5322
5416
|
_consumeComment(t) {
|
|
5323
5417
|
let r = this._advanceIf(l.RAW_TEXT), n = this._advanceIf(l.COMMENT_END), i = r != null ? r.parts[0].trim() : null, s = n == null ? t.sourceSpan : new h(t.sourceSpan.start, n.sourceSpan.end, t.sourceSpan.fullStart);
|
|
5324
|
-
this._addToParent(new
|
|
5418
|
+
this._addToParent(new Ti(i, s));
|
|
5325
5419
|
}
|
|
5326
5420
|
_consumeDocType(t) {
|
|
5327
5421
|
let r = this._advanceIf(l.RAW_TEXT), n = this._advanceIf(l.DOC_TYPE_END), i = r != null ? r.parts[0].trim() : null, s = new h(t.sourceSpan.start, (n || r || t).sourceSpan.end);
|
|
5328
|
-
this._addToParent(new
|
|
5422
|
+
this._addToParent(new bi(i, s));
|
|
5329
5423
|
}
|
|
5330
5424
|
_consumeExpansion(t) {
|
|
5331
5425
|
let r = this._advance(), n = this._advance(), i = [];
|
|
@@ -5335,15 +5429,15 @@ var N = class os extends ne {
|
|
|
5335
5429
|
i.push(a);
|
|
5336
5430
|
}
|
|
5337
5431
|
if (this._peek.type !== l.EXPANSION_FORM_END) {
|
|
5338
|
-
this.errors.push(
|
|
5432
|
+
this.errors.push(y.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '}'."));
|
|
5339
5433
|
return;
|
|
5340
5434
|
}
|
|
5341
5435
|
let s = new h(t.sourceSpan.start, this._peek.sourceSpan.end, t.sourceSpan.fullStart);
|
|
5342
|
-
this._addToParent(new
|
|
5436
|
+
this._addToParent(new Ei(r.parts[0], n.parts[0], i, s, r.sourceSpan)), this._advance();
|
|
5343
5437
|
}
|
|
5344
5438
|
_parseExpansionCase() {
|
|
5345
5439
|
let t = this._advance();
|
|
5346
|
-
if (this._peek.type !== l.EXPANSION_CASE_EXP_START) return this.errors.push(
|
|
5440
|
+
if (this._peek.type !== l.EXPANSION_CASE_EXP_START) return this.errors.push(y.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'.")), null;
|
|
5347
5441
|
let r = this._advance(), n = this._collectExpansionExpTokens(r);
|
|
5348
5442
|
if (!n) return null;
|
|
5349
5443
|
let i = this._advance();
|
|
@@ -5352,20 +5446,20 @@ var N = class os extends ne {
|
|
|
5352
5446
|
parts: [],
|
|
5353
5447
|
sourceSpan: i.sourceSpan
|
|
5354
5448
|
});
|
|
5355
|
-
let s = new
|
|
5449
|
+
let s = new Bi(n, this.tagDefinitionResolver, this.canSelfClose, this.allowHtmComponentClosingTags, this.isTagNameCaseSensitive);
|
|
5356
5450
|
if (s.build(), s.errors.length > 0) return this.errors = this.errors.concat(s.errors), null;
|
|
5357
5451
|
let a = new h(t.sourceSpan.start, i.sourceSpan.end, t.sourceSpan.fullStart), o = new h(r.sourceSpan.start, i.sourceSpan.end, r.sourceSpan.fullStart);
|
|
5358
|
-
return new
|
|
5452
|
+
return new Ci(t.parts[0], s.rootNodes, a, t.sourceSpan, o);
|
|
5359
5453
|
}
|
|
5360
5454
|
_collectExpansionExpTokens(t) {
|
|
5361
5455
|
let r = [], n = [l.EXPANSION_CASE_EXP_START];
|
|
5362
5456
|
for (;;) {
|
|
5363
|
-
if ((this._peek.type === l.EXPANSION_FORM_START || this._peek.type === l.EXPANSION_CASE_EXP_START) && n.push(this._peek.type), this._peek.type === l.EXPANSION_CASE_EXP_END) if (
|
|
5457
|
+
if ((this._peek.type === l.EXPANSION_FORM_START || this._peek.type === l.EXPANSION_CASE_EXP_START) && n.push(this._peek.type), this._peek.type === l.EXPANSION_CASE_EXP_END) if (Di(n, l.EXPANSION_CASE_EXP_START)) {
|
|
5364
5458
|
if (n.pop(), n.length === 0) return r;
|
|
5365
|
-
} else return this.errors.push(
|
|
5366
|
-
if (this._peek.type === l.EXPANSION_FORM_END) if (
|
|
5367
|
-
else return this.errors.push(
|
|
5368
|
-
if (this._peek.type === l.EOF) return this.errors.push(
|
|
5459
|
+
} else return this.errors.push(y.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
5460
|
+
if (this._peek.type === l.EXPANSION_FORM_END) if (Di(n, l.EXPANSION_FORM_START)) n.pop();
|
|
5461
|
+
else return this.errors.push(y.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
5462
|
+
if (this._peek.type === l.EOF) return this.errors.push(y.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
5369
5463
|
r.push(this._advance());
|
|
5370
5464
|
}
|
|
5371
5465
|
}
|
|
@@ -5391,10 +5485,10 @@ var N = class os extends ne {
|
|
|
5391
5485
|
parts: [i]
|
|
5392
5486
|
});
|
|
5393
5487
|
}
|
|
5394
|
-
for (; this._peek.type === l.INTERPOLATION || this._peek.type === l.TEXT || this._peek.type === l.ENCODED_ENTITY;) t = this._advance(), r.push(t), t.type === l.INTERPOLATION ? i += t.parts.join("").replace(/&([^;]+);/g,
|
|
5488
|
+
for (; this._peek.type === l.INTERPOLATION || this._peek.type === l.TEXT || this._peek.type === l.ENCODED_ENTITY;) t = this._advance(), r.push(t), t.type === l.INTERPOLATION ? i += t.parts.join("").replace(/&([^;]+);/g, Ii) : t.type === l.ENCODED_ENTITY ? i += t.parts[0] : i += t.parts.join("");
|
|
5395
5489
|
if (i.length > 0) {
|
|
5396
5490
|
let a = t.sourceSpan;
|
|
5397
|
-
this._addToParent(new
|
|
5491
|
+
this._addToParent(new _i(i, new h(n.start, a.end, n.fullStart, n.details), r));
|
|
5398
5492
|
}
|
|
5399
5493
|
}
|
|
5400
5494
|
_closeVoidElement() {
|
|
@@ -5409,11 +5503,11 @@ var N = class os extends ne {
|
|
|
5409
5503
|
let s = this._getElementFullName(t, this._getClosestElementLikeParent()), a = this._getTagDefinition(s), o = !1;
|
|
5410
5504
|
if (this._peek.type === l.TAG_OPEN_END_VOID) {
|
|
5411
5505
|
this._advance(), o = !0;
|
|
5412
|
-
let
|
|
5413
|
-
this.canSelfClose ||
|
|
5506
|
+
let T = this._getTagDefinition(s);
|
|
5507
|
+
this.canSelfClose || T?.canSelfClose || Pe(s) !== null || T?.isVoid || this.errors.push(y.create(s, t.sourceSpan, `Only void, custom and foreign elements can be self closed "${t.parts[1]}"`));
|
|
5414
5508
|
} else this._peek.type === l.TAG_OPEN_END && (this._advance(), o = !1);
|
|
5415
|
-
let c = this._peek.sourceSpan.fullStart, u = new h(t.sourceSpan.start, c, t.sourceSpan.fullStart), p = new h(t.sourceSpan.start, c, t.sourceSpan.fullStart), d = new h(t.sourceSpan.start.moveBy(1), t.sourceSpan.end),
|
|
5416
|
-
this._pushContainer(
|
|
5509
|
+
let c = this._peek.sourceSpan.fullStart, u = new h(t.sourceSpan.start, c, t.sourceSpan.fullStart), p = new h(t.sourceSpan.start, c, t.sourceSpan.fullStart), d = new h(t.sourceSpan.start.moveBy(1), t.sourceSpan.end), g = new te(s, n, i, [], o, u, p, void 0, d, a?.isVoid ?? !1), m = this._getContainer(), _ = m !== null && !!(!((r = this._getTagDefinition(m)) === null || r === void 0) && r.isClosedByChild(g.name));
|
|
5510
|
+
this._pushContainer(g, _), o ? this._popContainer(s, te, u) : t.type === l.INCOMPLETE_TAG_OPEN && (this._popContainer(s, te, null), this.errors.push(y.create(s, u, `Opening tag "${s}" not terminated.`)));
|
|
5417
5511
|
}
|
|
5418
5512
|
_consumeComponentStartTag(t) {
|
|
5419
5513
|
var r;
|
|
@@ -5421,23 +5515,23 @@ var N = class os extends ne {
|
|
|
5421
5515
|
this._consumeAttributesAndDirectives(i, s);
|
|
5422
5516
|
let a = this._getClosestElementLikeParent(), o = this._getComponentTagName(t, a), c = this._getComponentFullName(t, a), u = this._peek.type === l.COMPONENT_OPEN_END_VOID;
|
|
5423
5517
|
this._advance();
|
|
5424
|
-
let p = this._peek.sourceSpan.fullStart, d = new h(t.sourceSpan.start, p, t.sourceSpan.fullStart),
|
|
5425
|
-
this._pushContainer(
|
|
5518
|
+
let p = this._peek.sourceSpan.fullStart, d = new h(t.sourceSpan.start, p, t.sourceSpan.fullStart), g = new G(n, o, c, i, s, [], u, d, new h(t.sourceSpan.start, p, t.sourceSpan.fullStart), void 0), m = this._getContainer(), _ = m !== null && g.tagName !== null && !!(!((r = this._getTagDefinition(m)) === null || r === void 0) && r.isClosedByChild(g.tagName));
|
|
5519
|
+
this._pushContainer(g, _), u ? this._popContainer(c, G, d) : t.type === l.INCOMPLETE_COMPONENT_OPEN && (this._popContainer(c, G, null), this.errors.push(y.create(c, d, `Opening tag "${c}" not terminated.`)));
|
|
5426
5520
|
}
|
|
5427
5521
|
_consumeAttributesAndDirectives(t, r) {
|
|
5428
5522
|
for (; this._peek.type === l.ATTR_NAME || this._peek.type === l.DIRECTIVE_NAME;) this._peek.type === l.DIRECTIVE_NAME ? r.push(this._consumeDirective(this._peek)) : t.push(this._consumeAttr(this._advance()));
|
|
5429
5523
|
}
|
|
5430
5524
|
_consumeComponentEndTag(t) {
|
|
5431
5525
|
let r = this._getComponentFullName(t, this._getClosestElementLikeParent());
|
|
5432
|
-
if (!this._popContainer(r,
|
|
5526
|
+
if (!this._popContainer(r, G, t.sourceSpan)) {
|
|
5433
5527
|
let n = this._containerStack[this._containerStack.length - 1], i;
|
|
5434
|
-
n instanceof
|
|
5528
|
+
n instanceof G && n.componentName === t.parts[0] ? i = `, did you mean "${n.fullName}"?` : i = ". It may happen when the tag has already been closed by another tag.";
|
|
5435
5529
|
let s = `Unexpected closing tag "${r}"${i}`;
|
|
5436
|
-
this.errors.push(
|
|
5530
|
+
this.errors.push(y.create(r, t.sourceSpan, s));
|
|
5437
5531
|
}
|
|
5438
5532
|
}
|
|
5439
5533
|
_getTagDefinition(t) {
|
|
5440
|
-
return typeof t == "string" ? this.tagDefinitionResolver(t) : t instanceof
|
|
5534
|
+
return typeof t == "string" ? this.tagDefinitionResolver(t) : t instanceof te ? this.tagDefinitionResolver(t.name) : t instanceof G && t.tagName !== null ? this.tagDefinitionResolver(t.tagName) : null;
|
|
5441
5535
|
}
|
|
5442
5536
|
_pushContainer(t, r) {
|
|
5443
5537
|
r && this._containerStack.pop(), this._addToParent(t), this._containerStack.push(t);
|
|
@@ -5445,85 +5539,93 @@ var N = class os extends ne {
|
|
|
5445
5539
|
_consumeElementEndTag(t) {
|
|
5446
5540
|
var r;
|
|
5447
5541
|
let n = this.allowHtmComponentClosingTags && t.parts.length === 0 ? null : this._getElementFullName(t, this._getClosestElementLikeParent());
|
|
5448
|
-
if (n && !((r = this._getTagDefinition(n)) === null || r === void 0) && r.isVoid) this.errors.push(
|
|
5449
|
-
else if (!this._popContainer(n,
|
|
5542
|
+
if (n && !((r = this._getTagDefinition(n)) === null || r === void 0) && r.isVoid) this.errors.push(y.create(n, t.sourceSpan, `Void elements do not have end tags "${t.parts[1]}"`));
|
|
5543
|
+
else if (!this._popContainer(n, te, t.sourceSpan)) {
|
|
5450
5544
|
let i = `Unexpected closing tag "${n}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;
|
|
5451
|
-
this.errors.push(
|
|
5545
|
+
this.errors.push(y.create(n, t.sourceSpan, i));
|
|
5452
5546
|
}
|
|
5453
5547
|
}
|
|
5454
5548
|
_popContainer(t, r, n) {
|
|
5455
5549
|
let i = !1;
|
|
5456
5550
|
for (let a = this._containerStack.length - 1; a >= 0; a--) {
|
|
5457
5551
|
var s;
|
|
5458
|
-
let o = this._containerStack[a], c = o instanceof
|
|
5459
|
-
if (
|
|
5460
|
-
(o instanceof
|
|
5552
|
+
let o = this._containerStack[a], c = o instanceof G ? o.fullName : o.name;
|
|
5553
|
+
if (Pe(c) ? c === t : (c === t || t === null) && o instanceof r) return o.endSourceSpan = n, o.sourceSpan.end = n !== null ? n.end : o.sourceSpan.end, this._containerStack.splice(a, this._containerStack.length - a), !i;
|
|
5554
|
+
(o instanceof ge || !(!((s = this._getTagDefinition(o)) === null || s === void 0) && s.closedByParent)) && (i = !0);
|
|
5461
5555
|
}
|
|
5462
5556
|
return !1;
|
|
5463
5557
|
}
|
|
5464
5558
|
_consumeAttr(t) {
|
|
5465
|
-
let r =
|
|
5559
|
+
let r = fe(t.parts[0], t.parts[1]), n = t.sourceSpan.end, i;
|
|
5466
5560
|
this._peek.type === l.ATTR_QUOTE && (i = this._advance());
|
|
5467
5561
|
let s = "", a = [], o, c;
|
|
5468
5562
|
if (this._peek.type === l.ATTR_VALUE_TEXT) for (o = this._peek.sourceSpan, c = this._peek.sourceSpan.end; this._peek.type === l.ATTR_VALUE_TEXT || this._peek.type === l.ATTR_VALUE_INTERPOLATION || this._peek.type === l.ENCODED_ENTITY;) {
|
|
5469
5563
|
let p = this._advance();
|
|
5470
|
-
a.push(p), p.type === l.ATTR_VALUE_INTERPOLATION ? s += p.parts.join("").replace(/&([^;]+);/g,
|
|
5564
|
+
a.push(p), p.type === l.ATTR_VALUE_INTERPOLATION ? s += p.parts.join("").replace(/&([^;]+);/g, Ii) : p.type === l.ENCODED_ENTITY ? s += p.parts[0] : s += p.parts.join(""), c = n = p.sourceSpan.end;
|
|
5471
5565
|
}
|
|
5472
5566
|
this._peek.type === l.ATTR_QUOTE && (c = n = this._advance().sourceSpan.end);
|
|
5473
5567
|
let u = o && c && new h(i?.sourceSpan.start ?? o.start, c, i?.sourceSpan.fullStart ?? o.fullStart);
|
|
5474
|
-
return new
|
|
5568
|
+
return new vi(r, s, new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), t.sourceSpan, u, a.length > 0 ? a : void 0, void 0);
|
|
5475
5569
|
}
|
|
5476
5570
|
_consumeDirective(t) {
|
|
5477
5571
|
let r = [], n = t.sourceSpan.end, i = null;
|
|
5478
5572
|
if (this._advance(), this._peek.type === l.DIRECTIVE_OPEN) {
|
|
5479
5573
|
for (n = this._peek.sourceSpan.end, this._advance(); this._peek.type === l.ATTR_NAME;) r.push(this._consumeAttr(this._advance()));
|
|
5480
|
-
this._peek.type === l.DIRECTIVE_CLOSE ? (i = this._peek.sourceSpan, this._advance()) : this.errors.push(
|
|
5574
|
+
this._peek.type === l.DIRECTIVE_CLOSE ? (i = this._peek.sourceSpan, this._advance()) : this.errors.push(y.create(null, t.sourceSpan, "Unterminated directive definition"));
|
|
5481
5575
|
}
|
|
5482
5576
|
let s = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new h(s.start, i === null ? t.sourceSpan.end : i.end, s.fullStart);
|
|
5483
|
-
return new
|
|
5577
|
+
return new wi(t.parts[0], r, a, s, i);
|
|
5484
5578
|
}
|
|
5485
5579
|
_consumeBlockOpen(t) {
|
|
5486
5580
|
let r = [];
|
|
5487
5581
|
for (; this._peek.type === l.BLOCK_PARAMETER;) {
|
|
5488
5582
|
let o = this._advance();
|
|
5489
|
-
r.push(new
|
|
5583
|
+
r.push(new hr(o.parts[0], o.sourceSpan));
|
|
5490
5584
|
}
|
|
5491
5585
|
this._peek.type === l.BLOCK_OPEN_END && this._advance();
|
|
5492
|
-
let n = this._peek.sourceSpan.fullStart, i = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new
|
|
5586
|
+
let n = this._peek.sourceSpan.fullStart, i = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new ge(t.parts[0], r, [], i, t.sourceSpan, s);
|
|
5493
5587
|
this._pushContainer(a, !1);
|
|
5494
5588
|
}
|
|
5495
5589
|
_consumeBlockClose(t) {
|
|
5496
|
-
|
|
5590
|
+
let r = this._containerStack.length, n = this._containerStack[r - 1];
|
|
5591
|
+
if (!this._popContainer(null, ge, t.sourceSpan)) {
|
|
5592
|
+
if (this._containerStack.length < r) {
|
|
5593
|
+
let i = n instanceof G ? n.fullName : n.name;
|
|
5594
|
+
this.errors.push(y.create(null, t.sourceSpan, `Unexpected closing block. The block may have been closed earlier. Did you forget to close the <${i}> element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`));
|
|
5595
|
+
return;
|
|
5596
|
+
}
|
|
5597
|
+
this.errors.push(y.create(null, t.sourceSpan, "Unexpected closing block. The block may have been closed earlier. If you meant to write the `}` character, you should use the \"}\" HTML entity instead."));
|
|
5598
|
+
}
|
|
5497
5599
|
}
|
|
5498
5600
|
_consumeIncompleteBlock(t) {
|
|
5499
5601
|
let r = [];
|
|
5500
5602
|
for (; this._peek.type === l.BLOCK_PARAMETER;) {
|
|
5501
5603
|
let o = this._advance();
|
|
5502
|
-
r.push(new
|
|
5604
|
+
r.push(new hr(o.parts[0], o.sourceSpan));
|
|
5503
5605
|
}
|
|
5504
|
-
let n = this._peek.sourceSpan.fullStart, i = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new
|
|
5505
|
-
this._pushContainer(a, !1), this._popContainer(null,
|
|
5606
|
+
let n = this._peek.sourceSpan.fullStart, i = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new ge(t.parts[0], r, [], i, t.sourceSpan, s);
|
|
5607
|
+
this._pushContainer(a, !1), this._popContainer(null, ge, null), this.errors.push(y.create(t.parts[0], i, `Incomplete block "${t.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`));
|
|
5506
5608
|
}
|
|
5507
5609
|
_consumeLet(t) {
|
|
5508
5610
|
let r = t.parts[0], n, i;
|
|
5509
5611
|
if (this._peek.type !== l.LET_VALUE) {
|
|
5510
|
-
this.errors.push(
|
|
5612
|
+
this.errors.push(y.create(t.parts[0], t.sourceSpan, `Invalid @let declaration "${r}". Declaration must have a value.`));
|
|
5511
5613
|
return;
|
|
5512
5614
|
} else n = this._advance();
|
|
5513
5615
|
if (this._peek.type !== l.LET_END) {
|
|
5514
|
-
this.errors.push(
|
|
5616
|
+
this.errors.push(y.create(t.parts[0], t.sourceSpan, `Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));
|
|
5515
5617
|
return;
|
|
5516
5618
|
} else i = this._advance();
|
|
5517
|
-
let s = i.sourceSpan.fullStart, a = new h(t.sourceSpan.start, s, t.sourceSpan.fullStart), o = t.sourceSpan.toString().lastIndexOf(r), c = new h(t.sourceSpan.start.moveBy(o), t.sourceSpan.end), u = new
|
|
5619
|
+
let s = i.sourceSpan.fullStart, a = new h(t.sourceSpan.start, s, t.sourceSpan.fullStart), o = t.sourceSpan.toString().lastIndexOf(r), c = new h(t.sourceSpan.start.moveBy(o), t.sourceSpan.end), u = new mr(r, n.parts[0], a, c, n.sourceSpan);
|
|
5518
5620
|
this._addToParent(u);
|
|
5519
5621
|
}
|
|
5520
5622
|
_consumeIncompleteLet(t) {
|
|
5521
5623
|
let r = t.parts[0] ?? "", n = r ? ` "${r}"` : "";
|
|
5522
5624
|
if (r.length > 0) {
|
|
5523
|
-
let i = t.sourceSpan.toString().lastIndexOf(r), s = new h(t.sourceSpan.start.moveBy(i), t.sourceSpan.end), a = new h(t.sourceSpan.start, t.sourceSpan.start.moveBy(0)), o = new
|
|
5625
|
+
let i = t.sourceSpan.toString().lastIndexOf(r), s = new h(t.sourceSpan.start.moveBy(i), t.sourceSpan.end), a = new h(t.sourceSpan.start, t.sourceSpan.start.moveBy(0)), o = new mr(r, "", t.sourceSpan, s, a);
|
|
5524
5626
|
this._addToParent(o);
|
|
5525
5627
|
}
|
|
5526
|
-
this.errors.push(
|
|
5628
|
+
this.errors.push(y.create(t.parts[0], t.sourceSpan, `Incomplete @let declaration${n}. @let declarations must be written as \`@let <name> = <value>;\``));
|
|
5527
5629
|
}
|
|
5528
5630
|
_getContainer() {
|
|
5529
5631
|
return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null;
|
|
@@ -5531,7 +5633,7 @@ var N = class os extends ne {
|
|
|
5531
5633
|
_getClosestElementLikeParent() {
|
|
5532
5634
|
for (let t = this._containerStack.length - 1; t > -1; t--) {
|
|
5533
5635
|
let r = this._containerStack[t];
|
|
5534
|
-
if (r instanceof
|
|
5636
|
+
if (r instanceof te || r instanceof G) return r;
|
|
5535
5637
|
}
|
|
5536
5638
|
return null;
|
|
5537
5639
|
}
|
|
@@ -5540,7 +5642,7 @@ var N = class os extends ne {
|
|
|
5540
5642
|
r === null ? this.rootNodes.push(t) : r.children.push(t);
|
|
5541
5643
|
}
|
|
5542
5644
|
_getElementFullName(t, r) {
|
|
5543
|
-
return
|
|
5645
|
+
return fe(this._getPrefix(t, r), t.parts[1]);
|
|
5544
5646
|
}
|
|
5545
5647
|
_getComponentFullName(t, r) {
|
|
5546
5648
|
let n = t.parts[0], i = this._getComponentTagName(t, r);
|
|
@@ -5548,39 +5650,39 @@ var N = class os extends ne {
|
|
|
5548
5650
|
}
|
|
5549
5651
|
_getComponentTagName(t, r) {
|
|
5550
5652
|
let n = this._getPrefix(t, r), i = t.parts[2];
|
|
5551
|
-
return !n && !i ? null : !n && i ? i :
|
|
5653
|
+
return !n && !i ? null : !n && i ? i : fe(n, i || "ng-component");
|
|
5552
5654
|
}
|
|
5553
5655
|
_getPrefix(t, r) {
|
|
5554
5656
|
var n;
|
|
5555
5657
|
let i, s;
|
|
5556
5658
|
if (t.type === l.COMPONENT_OPEN_START || t.type === l.INCOMPLETE_COMPONENT_OPEN || t.type === l.COMPONENT_CLOSE ? (i = t.parts[1], s = t.parts[2]) : (i = t.parts[0], s = t.parts[1]), i = i || ((n = this._getTagDefinition(s)) === null || n === void 0 ? void 0 : n.implicitNamespacePrefix) || "", !i && r) {
|
|
5557
|
-
let a = r instanceof
|
|
5659
|
+
let a = r instanceof te ? r.name : r.tagName;
|
|
5558
5660
|
if (a !== null) {
|
|
5559
|
-
let o =
|
|
5560
|
-
c !== null && !c.preventNamespaceInheritance && (i =
|
|
5661
|
+
let o = et(a)[1], c = this._getTagDefinition(o);
|
|
5662
|
+
c !== null && !c.preventNamespaceInheritance && (i = Pe(a));
|
|
5561
5663
|
}
|
|
5562
5664
|
}
|
|
5563
5665
|
return i;
|
|
5564
5666
|
}
|
|
5565
5667
|
};
|
|
5566
|
-
function
|
|
5668
|
+
function Di(e, t) {
|
|
5567
5669
|
return e.length > 0 && e[e.length - 1] === t;
|
|
5568
5670
|
}
|
|
5569
|
-
function
|
|
5570
|
-
return
|
|
5671
|
+
function Ii(e, t) {
|
|
5672
|
+
return _e[t] !== void 0 ? _e[t] || e : /^#x[a-f0-9]+$/i.test(t) ? String.fromCodePoint(parseInt(t.slice(2), 16)) : /^#\d+$/.test(t) ? String.fromCodePoint(parseInt(t.slice(1), 10)) : e;
|
|
5571
5673
|
}
|
|
5572
|
-
var
|
|
5674
|
+
var qi = class extends Mi {
|
|
5573
5675
|
constructor() {
|
|
5574
|
-
super(
|
|
5676
|
+
super(Oe);
|
|
5575
5677
|
}
|
|
5576
5678
|
parse(e, t, r, n = !1, i) {
|
|
5577
5679
|
return super.parse(e, t, r, n, i);
|
|
5578
5680
|
}
|
|
5579
5681
|
};
|
|
5580
|
-
var
|
|
5581
|
-
function
|
|
5682
|
+
var Cr;
|
|
5683
|
+
function Rt(e, t = {}) {
|
|
5582
5684
|
let { canSelfClose: r = !1, allowHtmComponentClosingTags: n = !1, isTagNameCaseSensitive: i = !1, getTagContentType: s, tokenizeAngularBlocks: a = !1, tokenizeAngularLetDeclaration: o = !1, enableAngularSelectorlessSyntax: c = !1 } = t;
|
|
5583
|
-
return
|
|
5685
|
+
return Cr ?? (Cr = new qi()), Cr.parse(e, "angular-html-parser", {
|
|
5584
5686
|
tokenizeExpansionForms: a,
|
|
5585
5687
|
canSelfClose: r,
|
|
5586
5688
|
allowHtmComponentClosingTags: n,
|
|
@@ -5589,23 +5691,23 @@ function Qt(e, t = {}) {
|
|
|
5589
5691
|
selectorlessEnabled: c
|
|
5590
5692
|
}, i, s);
|
|
5591
5693
|
}
|
|
5592
|
-
var
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5694
|
+
var Za = [
|
|
5695
|
+
to,
|
|
5696
|
+
ro,
|
|
5697
|
+
io,
|
|
5698
|
+
ao,
|
|
5699
|
+
oo,
|
|
5700
|
+
uo,
|
|
5701
|
+
lo,
|
|
5702
|
+
co,
|
|
5703
|
+
po,
|
|
5704
|
+
so
|
|
5603
5705
|
];
|
|
5604
|
-
function
|
|
5605
|
-
for (let r of
|
|
5706
|
+
function eo(e, t) {
|
|
5707
|
+
for (let r of Za) r(e, t);
|
|
5606
5708
|
return e;
|
|
5607
5709
|
}
|
|
5608
|
-
function
|
|
5710
|
+
function to(e) {
|
|
5609
5711
|
e.walk((t) => {
|
|
5610
5712
|
if (t.kind === "element" && t.tagDefinition.ignoreFirstLf && t.children.length > 0 && t.children[0].kind === "text" && t.children[0].value[0] === `
|
|
5611
5713
|
`) {
|
|
@@ -5614,7 +5716,7 @@ function jo(e) {
|
|
|
5614
5716
|
}
|
|
5615
5717
|
});
|
|
5616
5718
|
}
|
|
5617
|
-
function
|
|
5719
|
+
function ro(e) {
|
|
5618
5720
|
let t = (r) => r.kind === "element" && r.prev?.kind === "ieConditionalStartComment" && r.prev.sourceSpan.end.offset === r.startSourceSpan.start.offset && r.firstChild?.kind === "ieConditionalEndComment" && r.firstChild.sourceSpan.start.offset === r.startSourceSpan.end.offset;
|
|
5619
5721
|
e.walk((r) => {
|
|
5620
5722
|
if (r.children) for (let n = 0; n < r.children.length; n++) {
|
|
@@ -5627,7 +5729,7 @@ function Xo(e) {
|
|
|
5627
5729
|
}
|
|
5628
5730
|
});
|
|
5629
5731
|
}
|
|
5630
|
-
function
|
|
5732
|
+
function no(e, t, r) {
|
|
5631
5733
|
e.walk((n) => {
|
|
5632
5734
|
if (n.children) for (let i = 0; i < n.children.length; i++) {
|
|
5633
5735
|
let s = n.children[i];
|
|
@@ -5638,11 +5740,11 @@ function Ko(e, t, r) {
|
|
|
5638
5740
|
}
|
|
5639
5741
|
});
|
|
5640
5742
|
}
|
|
5641
|
-
function
|
|
5642
|
-
return
|
|
5743
|
+
function io(e) {
|
|
5744
|
+
return no(e, (t) => t.kind === "cdata", (t) => `<![CDATA[${t.value}]]>`);
|
|
5643
5745
|
}
|
|
5644
|
-
function
|
|
5645
|
-
let t = (r) => r.kind === "element" && r.attrs.length === 0 && r.children.length === 1 && r.firstChild.kind === "text" && !
|
|
5746
|
+
function so(e) {
|
|
5747
|
+
let t = (r) => r.kind === "element" && r.attrs.length === 0 && r.children.length === 1 && r.firstChild.kind === "text" && !N.hasWhitespaceCharacter(r.children[0].value) && !r.firstChild.hasLeadingSpaces && !r.firstChild.hasTrailingSpaces && r.isLeadingSpaceSensitive && !r.hasLeadingSpaces && r.isTrailingSpaceSensitive && !r.hasTrailingSpaces && r.prev?.kind === "text" && r.next?.kind === "text";
|
|
5646
5748
|
e.walk((r) => {
|
|
5647
5749
|
if (r.children) for (let n = 0; n < r.children.length; n++) {
|
|
5648
5750
|
let i = r.children[n];
|
|
@@ -5652,11 +5754,11 @@ function Jo(e) {
|
|
|
5652
5754
|
}
|
|
5653
5755
|
});
|
|
5654
5756
|
}
|
|
5655
|
-
function
|
|
5757
|
+
function ao(e, t) {
|
|
5656
5758
|
if (t.parser === "html") return;
|
|
5657
5759
|
let r = /\{\{(.+?)\}\}/su;
|
|
5658
5760
|
e.walk((n) => {
|
|
5659
|
-
if (
|
|
5761
|
+
if (nn(n, t)) for (let i of n.children) {
|
|
5660
5762
|
if (i.kind !== "text") continue;
|
|
5661
5763
|
let s = i.sourceSpan.start, a = null, o = i.value.split(r);
|
|
5662
5764
|
for (let c = 0; c < o.length; c++, s = a) {
|
|
@@ -5683,48 +5785,48 @@ function Zo(e, t) {
|
|
|
5683
5785
|
}
|
|
5684
5786
|
});
|
|
5685
5787
|
}
|
|
5686
|
-
function
|
|
5788
|
+
function oo(e, t) {
|
|
5687
5789
|
e.walk((r) => {
|
|
5688
5790
|
let n = r.$children;
|
|
5689
5791
|
if (!n) return;
|
|
5690
|
-
if (n.length === 0 || n.length === 1 && n[0].kind === "text" &&
|
|
5792
|
+
if (n.length === 0 || n.length === 1 && n[0].kind === "text" && N.trim(n[0].value).length === 0) {
|
|
5691
5793
|
r.hasDanglingSpaces = n.length > 0, r.$children = [];
|
|
5692
5794
|
return;
|
|
5693
5795
|
}
|
|
5694
|
-
let i =
|
|
5796
|
+
let i = sn(r, t), s = Zt(r);
|
|
5695
5797
|
if (!i) for (let a = 0; a < n.length; a++) {
|
|
5696
5798
|
let o = n[a];
|
|
5697
5799
|
if (o.kind !== "text") continue;
|
|
5698
|
-
let { leadingWhitespace: c, text: u, trailingWhitespace: p } =
|
|
5699
|
-
u ? (o.value = u, o.sourceSpan = new h(o.sourceSpan.start.moveBy(c.length), o.sourceSpan.end.moveBy(-p.length)), c && (d && (d.hasTrailingSpaces = !0), o.hasLeadingSpaces = !0), p && (o.hasTrailingSpaces = !0,
|
|
5800
|
+
let { leadingWhitespace: c, text: u, trailingWhitespace: p } = rn(o.value), d = o.prev, g = o.next;
|
|
5801
|
+
u ? (o.value = u, o.sourceSpan = new h(o.sourceSpan.start.moveBy(c.length), o.sourceSpan.end.moveBy(-p.length)), c && (d && (d.hasTrailingSpaces = !0), o.hasLeadingSpaces = !0), p && (o.hasTrailingSpaces = !0, g && (g.hasLeadingSpaces = !0))) : (r.removeChild(o), a--, (c || p) && (d && (d.hasTrailingSpaces = !0), g && (g.hasLeadingSpaces = !0)));
|
|
5700
5802
|
}
|
|
5701
5803
|
r.isWhitespaceSensitive = i, r.isIndentationSensitive = s;
|
|
5702
5804
|
});
|
|
5703
5805
|
}
|
|
5704
|
-
function
|
|
5806
|
+
function lo(e) {
|
|
5705
5807
|
e.walk((t) => {
|
|
5706
5808
|
t.isSelfClosing = !t.children || t.kind === "element" && (t.tagDefinition.isVoid || t.endSourceSpan && t.startSourceSpan.start === t.endSourceSpan.start && t.startSourceSpan.end === t.endSourceSpan.end);
|
|
5707
5809
|
});
|
|
5708
5810
|
}
|
|
5709
|
-
function
|
|
5811
|
+
function co(e, t) {
|
|
5710
5812
|
e.walk((r) => {
|
|
5711
5813
|
r.kind === "element" && (r.hasHtmComponentClosingTag = r.endSourceSpan && /^<\s*\/\s*\/\s*>$/u.test(t.originalText.slice(r.endSourceSpan.start.offset, r.endSourceSpan.end.offset)));
|
|
5712
5814
|
});
|
|
5713
5815
|
}
|
|
5714
|
-
function
|
|
5816
|
+
function uo(e, t) {
|
|
5715
5817
|
e.walk((r) => {
|
|
5716
|
-
r.cssDisplay =
|
|
5818
|
+
r.cssDisplay = dn(r, t);
|
|
5717
5819
|
});
|
|
5718
5820
|
}
|
|
5719
|
-
function
|
|
5821
|
+
function po(e, t) {
|
|
5720
5822
|
e.walk((r) => {
|
|
5721
5823
|
let { children: n } = r;
|
|
5722
5824
|
if (n) {
|
|
5723
5825
|
if (n.length === 0) {
|
|
5724
|
-
r.isDanglingSpaceSensitive =
|
|
5826
|
+
r.isDanglingSpaceSensitive = ln(r, t);
|
|
5725
5827
|
return;
|
|
5726
5828
|
}
|
|
5727
|
-
for (let i of n) i.isLeadingSpaceSensitive =
|
|
5829
|
+
for (let i of n) i.isLeadingSpaceSensitive = an(i, t), i.isTrailingSpaceSensitive = on(i, t);
|
|
5728
5830
|
for (let i = 0; i < n.length; i++) {
|
|
5729
5831
|
let s = n[i];
|
|
5730
5832
|
s.isLeadingSpaceSensitive = (i === 0 || s.prev.isTrailingSpaceSensitive) && s.isLeadingSpaceSensitive, s.isTrailingSpaceSensitive = (i === n.length - 1 || s.next.isLeadingSpaceSensitive) && s.isTrailingSpaceSensitive;
|
|
@@ -5732,56 +5834,56 @@ function il(e, t) {
|
|
|
5732
5834
|
}
|
|
5733
5835
|
});
|
|
5734
5836
|
}
|
|
5735
|
-
var
|
|
5736
|
-
function
|
|
5837
|
+
var Fi = eo;
|
|
5838
|
+
function ho(e, t, r) {
|
|
5737
5839
|
let { node: n } = e;
|
|
5738
5840
|
switch (n.kind) {
|
|
5739
|
-
case "root": return t.__onHtmlRoot && t.__onHtmlRoot(n), [
|
|
5841
|
+
case "root": return t.__onHtmlRoot && t.__onHtmlRoot(n), [E(Le(e, t, r)), C];
|
|
5740
5842
|
case "element":
|
|
5741
|
-
case "ieConditionalComment": return
|
|
5742
|
-
case "angularControlFlowBlock": return
|
|
5743
|
-
case "angularControlFlowBlockParameters": return
|
|
5744
|
-
case "angularControlFlowBlockParameter": return
|
|
5745
|
-
case "angularLetDeclaration": return
|
|
5843
|
+
case "ieConditionalComment": return ci(e, t, r);
|
|
5844
|
+
case "angularControlFlowBlock": return ii(e, t, r);
|
|
5845
|
+
case "angularControlFlowBlockParameters": return ai(e, t, r);
|
|
5846
|
+
case "angularControlFlowBlockParameter": return N.trim(n.expression);
|
|
5847
|
+
case "angularLetDeclaration": return E([
|
|
5746
5848
|
"@let ",
|
|
5747
|
-
|
|
5849
|
+
E([
|
|
5748
5850
|
n.id,
|
|
5749
5851
|
" =",
|
|
5750
|
-
|
|
5852
|
+
E(A([S, r("init")]))
|
|
5751
5853
|
]),
|
|
5752
5854
|
";"
|
|
5753
5855
|
]);
|
|
5754
5856
|
case "angularLetDeclarationInitializer": return n.value;
|
|
5755
|
-
case "angularIcuExpression": return
|
|
5756
|
-
case "angularIcuCase": return
|
|
5857
|
+
case "angularIcuExpression": return oi(e, t, r);
|
|
5858
|
+
case "angularIcuCase": return li(e, t, r);
|
|
5757
5859
|
case "ieConditionalStartComment":
|
|
5758
|
-
case "ieConditionalEndComment": return [
|
|
5860
|
+
case "ieConditionalEndComment": return [me(n), ce(n)];
|
|
5759
5861
|
case "interpolation": return [
|
|
5760
|
-
|
|
5862
|
+
me(n, t),
|
|
5761
5863
|
...e.map(r, "children"),
|
|
5762
|
-
|
|
5864
|
+
ce(n, t)
|
|
5763
5865
|
];
|
|
5764
5866
|
case "text": {
|
|
5765
5867
|
if (n.parent.kind === "interpolation") {
|
|
5766
5868
|
let o = /\n[^\S\n]*$/u, c = o.test(n.value);
|
|
5767
|
-
return [L(c ? n.value.replace(o, "") : n.value), c ?
|
|
5869
|
+
return [L(c ? n.value.replace(o, "") : n.value), c ? C : ""];
|
|
5768
5870
|
}
|
|
5769
|
-
let i =
|
|
5770
|
-
return s[0] = [i, s[0]], s.push([s.pop(), a]),
|
|
5871
|
+
let i = H(n, t), s = bt(n), a = F(n, t);
|
|
5872
|
+
return s[0] = [i, s[0]], s.push([s.pop(), a]), gt(s);
|
|
5771
5873
|
}
|
|
5772
|
-
case "docType": return [
|
|
5773
|
-
|
|
5874
|
+
case "docType": return [E([
|
|
5875
|
+
me(n, t),
|
|
5774
5876
|
" ",
|
|
5775
5877
|
w(0, n.value.replace(/^html\b/iu, "html"), /\s+/gu, " ")
|
|
5776
|
-
]),
|
|
5878
|
+
]), ce(n, t)];
|
|
5777
5879
|
case "comment": return [
|
|
5778
|
-
|
|
5779
|
-
L(t.originalText.slice(
|
|
5780
|
-
|
|
5880
|
+
H(n, t),
|
|
5881
|
+
L(t.originalText.slice(K(n), J(n))),
|
|
5882
|
+
F(n, t)
|
|
5781
5883
|
];
|
|
5782
5884
|
case "attribute": {
|
|
5783
5885
|
if (n.value === null) return n.rawName;
|
|
5784
|
-
let i =
|
|
5886
|
+
let i = rr(n.value), s = kt(n, t) ? "" : Ur(i, "\"");
|
|
5785
5887
|
return [
|
|
5786
5888
|
n.rawName,
|
|
5787
5889
|
"=",
|
|
@@ -5790,23 +5892,23 @@ function sl(e, t, r) {
|
|
|
5790
5892
|
s
|
|
5791
5893
|
];
|
|
5792
5894
|
}
|
|
5793
|
-
default: throw new
|
|
5895
|
+
default: throw new Gr(n, "HTML");
|
|
5794
5896
|
}
|
|
5795
5897
|
}
|
|
5796
|
-
var
|
|
5898
|
+
var Hi = {
|
|
5797
5899
|
features: { experimental_frontMatterSupport: {
|
|
5798
5900
|
massageAstNode: !0,
|
|
5799
5901
|
embed: !0,
|
|
5800
5902
|
print: !0
|
|
5801
5903
|
} },
|
|
5802
|
-
preprocess:
|
|
5803
|
-
print:
|
|
5804
|
-
insertPragma:
|
|
5805
|
-
massageAstNode:
|
|
5806
|
-
embed:
|
|
5807
|
-
getVisitorKeys:
|
|
5904
|
+
preprocess: Fi,
|
|
5905
|
+
print: ho,
|
|
5906
|
+
insertPragma: ti,
|
|
5907
|
+
massageAstNode: $r,
|
|
5908
|
+
embed: $n,
|
|
5909
|
+
getVisitorKeys: Xn
|
|
5808
5910
|
};
|
|
5809
|
-
var
|
|
5911
|
+
var Vi = [
|
|
5810
5912
|
{
|
|
5811
5913
|
name: "Angular",
|
|
5812
5914
|
type: "markup",
|
|
@@ -5883,7 +5985,7 @@ var ms = [
|
|
|
5883
5985
|
linguistLanguageId: 391
|
|
5884
5986
|
}
|
|
5885
5987
|
];
|
|
5886
|
-
var
|
|
5988
|
+
var vr = {
|
|
5887
5989
|
bracketSpacing: {
|
|
5888
5990
|
category: "Common",
|
|
5889
5991
|
type: "boolean",
|
|
@@ -5943,10 +6045,10 @@ var Wr = {
|
|
|
5943
6045
|
description: "Enforce single attribute per line in HTML, Vue and JSX."
|
|
5944
6046
|
}
|
|
5945
6047
|
};
|
|
5946
|
-
var
|
|
5947
|
-
bracketSameLine:
|
|
6048
|
+
var Ui = "HTML", Wi = {
|
|
6049
|
+
bracketSameLine: vr.bracketSameLine,
|
|
5948
6050
|
htmlWhitespaceSensitivity: {
|
|
5949
|
-
category:
|
|
6051
|
+
category: Ui,
|
|
5950
6052
|
type: "choice",
|
|
5951
6053
|
default: "css",
|
|
5952
6054
|
description: "How to handle whitespaces in HTML.",
|
|
@@ -5965,28 +6067,28 @@ var fs = "HTML", ds = {
|
|
|
5965
6067
|
}
|
|
5966
6068
|
]
|
|
5967
6069
|
},
|
|
5968
|
-
singleAttributePerLine:
|
|
6070
|
+
singleAttributePerLine: vr.singleAttributePerLine,
|
|
5969
6071
|
vueIndentScriptAndStyle: {
|
|
5970
|
-
category:
|
|
6072
|
+
category: Ui,
|
|
5971
6073
|
type: "boolean",
|
|
5972
6074
|
default: !1,
|
|
5973
6075
|
description: "Indent script and style tags in Vue files."
|
|
5974
6076
|
}
|
|
5975
6077
|
};
|
|
5976
|
-
var
|
|
5977
|
-
|
|
5978
|
-
angular: () =>
|
|
5979
|
-
html: () =>
|
|
5980
|
-
lwc: () =>
|
|
5981
|
-
mjml: () =>
|
|
5982
|
-
vue: () =>
|
|
6078
|
+
var Nr = {};
|
|
6079
|
+
Or(Nr, {
|
|
6080
|
+
angular: () => Ro,
|
|
6081
|
+
html: () => Oo,
|
|
6082
|
+
lwc: () => Bo,
|
|
6083
|
+
mjml: () => Io,
|
|
6084
|
+
vue: () => Mo
|
|
5983
6085
|
});
|
|
5984
|
-
function
|
|
6086
|
+
function go(e, t) {
|
|
5985
6087
|
let r = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")");
|
|
5986
6088
|
return Object.assign(r, t);
|
|
5987
6089
|
}
|
|
5988
|
-
var
|
|
5989
|
-
var
|
|
6090
|
+
var Gi = go;
|
|
6091
|
+
var _o = {
|
|
5990
6092
|
canSelfClose: !0,
|
|
5991
6093
|
normalizeTagName: !1,
|
|
5992
6094
|
normalizeAttributeName: !1,
|
|
@@ -5994,13 +6096,13 @@ var cl = {
|
|
|
5994
6096
|
isTagNameCaseSensitive: !1,
|
|
5995
6097
|
shouldParseFrontMatter: !0
|
|
5996
6098
|
};
|
|
5997
|
-
function
|
|
6099
|
+
function Mt(e) {
|
|
5998
6100
|
return {
|
|
5999
|
-
...
|
|
6101
|
+
..._o,
|
|
6000
6102
|
...e
|
|
6001
6103
|
};
|
|
6002
6104
|
}
|
|
6003
|
-
function
|
|
6105
|
+
function Tr(e) {
|
|
6004
6106
|
let { canSelfClose: t, allowHtmComponentClosingTags: r, isTagNameCaseSensitive: n, shouldParseAsRawText: i, tokenizeAngularBlocks: s, tokenizeAngularLetDeclaration: a } = e;
|
|
6005
6107
|
return {
|
|
6006
6108
|
canSelfClose: t,
|
|
@@ -6011,7 +6113,7 @@ function Gr(e) {
|
|
|
6011
6113
|
tokenizeAngularLetDeclaration: a
|
|
6012
6114
|
};
|
|
6013
6115
|
}
|
|
6014
|
-
var
|
|
6116
|
+
var Bt = new Map([
|
|
6015
6117
|
["*", new Set([
|
|
6016
6118
|
"accesskey",
|
|
6017
6119
|
"autocapitalize",
|
|
@@ -6528,7 +6630,7 @@ var Zt = new Map([
|
|
|
6528
6630
|
"width"
|
|
6529
6631
|
])]
|
|
6530
6632
|
]);
|
|
6531
|
-
var
|
|
6633
|
+
var zi = new Set([
|
|
6532
6634
|
"a",
|
|
6533
6635
|
"abbr",
|
|
6534
6636
|
"acronym",
|
|
@@ -6680,22 +6782,22 @@ var _s = new Set([
|
|
|
6680
6782
|
"wbr",
|
|
6681
6783
|
"xmp"
|
|
6682
6784
|
]);
|
|
6683
|
-
var
|
|
6785
|
+
var qt = {
|
|
6684
6786
|
attrs: !0,
|
|
6685
6787
|
children: !0,
|
|
6686
6788
|
cases: !0,
|
|
6687
6789
|
expression: !0
|
|
6688
|
-
},
|
|
6790
|
+
}, $i = new Set(["parent"]), re, br, wr, Be = class Be {
|
|
6689
6791
|
constructor(t = {}) {
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
for (let r of new Set([
|
|
6694
|
-
if (
|
|
6792
|
+
Dr(this, re);
|
|
6793
|
+
Ut(this, "kind");
|
|
6794
|
+
Ut(this, "parent");
|
|
6795
|
+
for (let r of new Set([...$i, ...Object.keys(t)])) this.setProperty(r, t[r]);
|
|
6796
|
+
if (ie(t)) for (let r of Object.getOwnPropertySymbols(t)) this.setProperty(r, t[r]);
|
|
6695
6797
|
}
|
|
6696
6798
|
setProperty(t, r) {
|
|
6697
6799
|
if (this[t] !== r) {
|
|
6698
|
-
if (t in
|
|
6800
|
+
if (t in qt && (r = r.map((n) => this.createChild(n))), !$i.has(t)) {
|
|
6699
6801
|
this[t] = r;
|
|
6700
6802
|
return;
|
|
6701
6803
|
}
|
|
@@ -6708,25 +6810,25 @@ var er = {
|
|
|
6708
6810
|
}
|
|
6709
6811
|
map(t) {
|
|
6710
6812
|
let r;
|
|
6711
|
-
for (let n in
|
|
6813
|
+
for (let n in qt) {
|
|
6712
6814
|
let i = this[n];
|
|
6713
6815
|
if (i) {
|
|
6714
|
-
let s =
|
|
6715
|
-
r !== i && (r || (r = new
|
|
6816
|
+
let s = So(i, (a) => a.map(t));
|
|
6817
|
+
r !== i && (r || (r = new Be({ parent: this.parent })), r.setProperty(n, s));
|
|
6716
6818
|
}
|
|
6717
6819
|
}
|
|
6718
|
-
if (r) for (let n in this) n in
|
|
6820
|
+
if (r) for (let n in this) n in qt || (r[n] = this[n]);
|
|
6719
6821
|
return t(r || this);
|
|
6720
6822
|
}
|
|
6721
6823
|
walk(t) {
|
|
6722
|
-
for (let r in
|
|
6824
|
+
for (let r in qt) {
|
|
6723
6825
|
let n = this[r];
|
|
6724
6826
|
if (n) for (let i = 0; i < n.length; i++) n[i].walk(t);
|
|
6725
6827
|
}
|
|
6726
6828
|
t(this);
|
|
6727
6829
|
}
|
|
6728
6830
|
createChild(t) {
|
|
6729
|
-
let r = t instanceof
|
|
6831
|
+
let r = t instanceof Be ? t.clone() : new Be(t);
|
|
6730
6832
|
return r.setProperty("parent", this), r;
|
|
6731
6833
|
}
|
|
6732
6834
|
insertChildBefore(t, r) {
|
|
@@ -6742,26 +6844,26 @@ var er = {
|
|
|
6742
6844
|
n[n.indexOf(t)] = this.createChild(r);
|
|
6743
6845
|
}
|
|
6744
6846
|
clone() {
|
|
6745
|
-
return new
|
|
6847
|
+
return new Be(this);
|
|
6746
6848
|
}
|
|
6747
6849
|
get $children() {
|
|
6748
|
-
return this[
|
|
6850
|
+
return this[Fe(this, re, br)];
|
|
6749
6851
|
}
|
|
6750
6852
|
set $children(t) {
|
|
6751
|
-
this[
|
|
6853
|
+
this[Fe(this, re, br)] = t;
|
|
6752
6854
|
}
|
|
6753
6855
|
get firstChild() {
|
|
6754
6856
|
return this.$children?.[0];
|
|
6755
6857
|
}
|
|
6756
6858
|
get lastChild() {
|
|
6757
|
-
return
|
|
6859
|
+
return M(1, this.$children, -1);
|
|
6758
6860
|
}
|
|
6759
6861
|
get prev() {
|
|
6760
|
-
let t =
|
|
6862
|
+
let t = Fe(this, re, wr);
|
|
6761
6863
|
return t[t.indexOf(this) - 1];
|
|
6762
6864
|
}
|
|
6763
6865
|
get next() {
|
|
6764
|
-
let t =
|
|
6866
|
+
let t = Fe(this, re, wr);
|
|
6765
6867
|
return t[t.indexOf(this) + 1];
|
|
6766
6868
|
}
|
|
6767
6869
|
get rawName() {
|
|
@@ -6774,38 +6876,38 @@ var er = {
|
|
|
6774
6876
|
return Object.fromEntries(this.attrs.map((t) => [t.fullName, t.value]));
|
|
6775
6877
|
}
|
|
6776
6878
|
};
|
|
6777
|
-
|
|
6879
|
+
re = /* @__PURE__ */ new WeakSet(), br = function() {
|
|
6778
6880
|
return this.kind === "angularIcuCase" ? "expression" : this.kind === "angularIcuExpression" ? "cases" : "children";
|
|
6779
|
-
},
|
|
6881
|
+
}, wr = function() {
|
|
6780
6882
|
return this.parent?.$children ?? [];
|
|
6781
6883
|
};
|
|
6782
|
-
var
|
|
6783
|
-
function
|
|
6884
|
+
var Ft = Be;
|
|
6885
|
+
function So(e, t) {
|
|
6784
6886
|
let r = e.map(t);
|
|
6785
6887
|
return r.some((n, i) => n !== e[i]) ? r : e;
|
|
6786
6888
|
}
|
|
6787
|
-
var
|
|
6889
|
+
var Eo = [
|
|
6788
6890
|
{
|
|
6789
6891
|
regex: /^(?<openingTagSuffix>\[if(?<condition>[^\]]*)\]>)(?<data>.*?)<!\s*\[endif\]$/su,
|
|
6790
|
-
parse:
|
|
6892
|
+
parse: Co
|
|
6791
6893
|
},
|
|
6792
6894
|
{
|
|
6793
6895
|
regex: /^\[if(?<condition>[^\]]*)\]><!$/u,
|
|
6794
|
-
parse:
|
|
6896
|
+
parse: vo
|
|
6795
6897
|
},
|
|
6796
6898
|
{
|
|
6797
6899
|
regex: /^<!\s*\[endif\]$/u,
|
|
6798
|
-
parse:
|
|
6900
|
+
parse: To
|
|
6799
6901
|
}
|
|
6800
6902
|
];
|
|
6801
|
-
function
|
|
6802
|
-
if (e.value) for (let { regex: r, parse: n } of
|
|
6903
|
+
function Yi(e, t) {
|
|
6904
|
+
if (e.value) for (let { regex: r, parse: n } of Eo) {
|
|
6803
6905
|
let i = e.value.match(r);
|
|
6804
6906
|
if (i) return n(e, i, t);
|
|
6805
6907
|
}
|
|
6806
6908
|
return null;
|
|
6807
6909
|
}
|
|
6808
|
-
function
|
|
6910
|
+
function Co(e, t, r) {
|
|
6809
6911
|
let { openingTagSuffix: n, condition: i, data: s } = t.groups, a = 4 + n.length, o = e.sourceSpan.start.moveBy(a), c = o.moveBy(s.length), [u, p] = (() => {
|
|
6810
6912
|
try {
|
|
6811
6913
|
return [!0, r(s, o).children];
|
|
@@ -6827,7 +6929,7 @@ function hl(e, t, r) {
|
|
|
6827
6929
|
endSourceSpan: new h(c, e.sourceSpan.end)
|
|
6828
6930
|
};
|
|
6829
6931
|
}
|
|
6830
|
-
function
|
|
6932
|
+
function vo(e, t) {
|
|
6831
6933
|
let { condition: r } = t.groups;
|
|
6832
6934
|
return {
|
|
6833
6935
|
kind: "ieConditionalStartComment",
|
|
@@ -6835,36 +6937,36 @@ function ml(e, t) {
|
|
|
6835
6937
|
sourceSpan: e.sourceSpan
|
|
6836
6938
|
};
|
|
6837
6939
|
}
|
|
6838
|
-
function
|
|
6940
|
+
function To(e) {
|
|
6839
6941
|
return {
|
|
6840
6942
|
kind: "ieConditionalEndComment",
|
|
6841
6943
|
sourceSpan: e.sourceSpan
|
|
6842
6944
|
};
|
|
6843
6945
|
}
|
|
6844
|
-
var
|
|
6946
|
+
var kr = class extends fr {
|
|
6845
6947
|
visitExpansionCase(t, r) {
|
|
6846
6948
|
r.parseOptions.name === "angular" && this.visitChildren(r, (n) => {
|
|
6847
6949
|
n(t.expression);
|
|
6848
6950
|
});
|
|
6849
6951
|
}
|
|
6850
6952
|
visit(t, { parseOptions: r }) {
|
|
6851
|
-
|
|
6953
|
+
xo(t), yo(t, r), No(t, r), Ao(t);
|
|
6852
6954
|
}
|
|
6853
6955
|
};
|
|
6854
|
-
function
|
|
6855
|
-
|
|
6856
|
-
let i = new
|
|
6956
|
+
function Ki(e, t, r, n) {
|
|
6957
|
+
Ot(new kr(), e.children, { parseOptions: r }), t && e.children.unshift(t);
|
|
6958
|
+
let i = new Ft(e);
|
|
6857
6959
|
return i.walk((s) => {
|
|
6858
6960
|
if (s.kind === "comment") {
|
|
6859
|
-
let a =
|
|
6961
|
+
let a = Yi(s, n);
|
|
6860
6962
|
a && s.parent.replaceChild(s, a);
|
|
6861
6963
|
}
|
|
6862
|
-
|
|
6964
|
+
bo(s), wo(s), ko(s);
|
|
6863
6965
|
}), i;
|
|
6864
6966
|
}
|
|
6865
|
-
function
|
|
6967
|
+
function bo(e) {
|
|
6866
6968
|
if (e.kind === "block") {
|
|
6867
|
-
if (e.name = w(0, e.name.toLowerCase(), /\s+/gu, " ").trim(), e.kind = "angularControlFlowBlock", !
|
|
6969
|
+
if (e.name = w(0, e.name.toLowerCase(), /\s+/gu, " ").trim(), e.kind = "angularControlFlowBlock", !Ne(e.parameters)) {
|
|
6868
6970
|
delete e.parameters;
|
|
6869
6971
|
return;
|
|
6870
6972
|
}
|
|
@@ -6872,33 +6974,33 @@ function dl(e) {
|
|
|
6872
6974
|
e.parameters = {
|
|
6873
6975
|
kind: "angularControlFlowBlockParameters",
|
|
6874
6976
|
children: e.parameters,
|
|
6875
|
-
sourceSpan: new h(e.parameters[0].sourceSpan.start,
|
|
6977
|
+
sourceSpan: new h(e.parameters[0].sourceSpan.start, M(0, e.parameters, -1).sourceSpan.end)
|
|
6876
6978
|
};
|
|
6877
6979
|
}
|
|
6878
6980
|
}
|
|
6879
|
-
function
|
|
6981
|
+
function wo(e) {
|
|
6880
6982
|
e.kind === "letDeclaration" && (e.kind = "angularLetDeclaration", e.id = e.name, e.init = {
|
|
6881
6983
|
kind: "angularLetDeclarationInitializer",
|
|
6882
6984
|
sourceSpan: new h(e.valueSpan.start, e.valueSpan.end),
|
|
6883
6985
|
value: e.value
|
|
6884
6986
|
}, delete e.name, delete e.value);
|
|
6885
6987
|
}
|
|
6886
|
-
function
|
|
6988
|
+
function ko(e) {
|
|
6887
6989
|
e.kind === "expansion" && (e.kind = "angularIcuExpression"), e.kind === "expansionCase" && (e.kind = "angularIcuCase");
|
|
6888
6990
|
}
|
|
6889
|
-
function
|
|
6991
|
+
function ji(e, t) {
|
|
6890
6992
|
let r = e.toLowerCase();
|
|
6891
6993
|
return t(r) ? r : e;
|
|
6892
6994
|
}
|
|
6893
|
-
function
|
|
6995
|
+
function Xi(e) {
|
|
6894
6996
|
let t = e.name.startsWith(":") ? e.name.slice(1).split(":")[0] : null, r = e.nameSpan.toString(), n = t !== null && r.startsWith(`${t}:`);
|
|
6895
6997
|
e.name = n ? r.slice(t.length + 1) : r, e.namespace = t, e.hasExplicitNamespace = n;
|
|
6896
6998
|
}
|
|
6897
|
-
function
|
|
6999
|
+
function xo(e) {
|
|
6898
7000
|
switch (e.kind) {
|
|
6899
7001
|
case "element":
|
|
6900
|
-
|
|
6901
|
-
for (let t of e.attrs)
|
|
7002
|
+
Xi(e);
|
|
7003
|
+
for (let t of e.attrs) Xi(t), t.valueSpan ? (t.value = t.valueSpan.toString(), /["']/u.test(t.value[0]) && (t.value = t.value.slice(1, -1))) : t.value = null;
|
|
6902
7004
|
break;
|
|
6903
7005
|
case "comment":
|
|
6904
7006
|
e.value = e.sourceSpan.toString().slice(4, -3);
|
|
@@ -6908,29 +7010,29 @@ function Sl(e) {
|
|
|
6908
7010
|
break;
|
|
6909
7011
|
}
|
|
6910
7012
|
}
|
|
6911
|
-
function
|
|
7013
|
+
function yo(e, t) {
|
|
6912
7014
|
if (e.kind === "element") {
|
|
6913
|
-
let r =
|
|
6914
|
-
!e.namespace || e.namespace === r.implicitNamespacePrefix ||
|
|
7015
|
+
let r = Oe(t.isTagNameCaseSensitive ? e.name : e.name.toLowerCase());
|
|
7016
|
+
!e.namespace || e.namespace === r.implicitNamespacePrefix || se(e) ? e.tagDefinition = r : e.tagDefinition = Oe("");
|
|
6915
7017
|
}
|
|
6916
7018
|
}
|
|
6917
|
-
function
|
|
7019
|
+
function Ao(e) {
|
|
6918
7020
|
e.sourceSpan && e.endSourceSpan && (e.sourceSpan = new h(e.sourceSpan.start, e.endSourceSpan.end));
|
|
6919
7021
|
}
|
|
6920
|
-
function
|
|
6921
|
-
if (e.kind === "element" && (t.normalizeTagName && (!e.namespace || e.namespace === e.tagDefinition.implicitNamespacePrefix ||
|
|
7022
|
+
function No(e, t) {
|
|
7023
|
+
if (e.kind === "element" && (t.normalizeTagName && (!e.namespace || e.namespace === e.tagDefinition.implicitNamespacePrefix || se(e)) && (e.name = ji(e.name, (r) => zi.has(r))), t.normalizeAttributeName)) for (let r of e.attrs) r.namespace || (r.name = ji(r.name, (n) => Bt.has(e.name) && (Bt.get("*").has(n) || Bt.get(e.name).has(n))));
|
|
6922
7024
|
}
|
|
6923
|
-
function
|
|
6924
|
-
let { rootNodes: r, errors: n } =
|
|
6925
|
-
return n.length > 0 &&
|
|
7025
|
+
function yr(e, t) {
|
|
7026
|
+
let { rootNodes: r, errors: n } = Rt(e, Tr(t));
|
|
7027
|
+
return n.length > 0 && xr(n[0]), {
|
|
6926
7028
|
parseOptions: t,
|
|
6927
7029
|
rootNodes: r
|
|
6928
7030
|
};
|
|
6929
7031
|
}
|
|
6930
|
-
function
|
|
6931
|
-
let r =
|
|
6932
|
-
if (n.some((u) => u.kind === "docType" && u.value === "html" || u.kind === "element" && u.name.toLowerCase() === "html")) return
|
|
6933
|
-
let a, o = () => a ?? (a =
|
|
7032
|
+
function Qi(e, t) {
|
|
7033
|
+
let r = Tr(t), { rootNodes: n, errors: i } = Rt(e, r);
|
|
7034
|
+
if (n.some((u) => u.kind === "docType" && u.value === "html" || u.kind === "element" && u.name.toLowerCase() === "html")) return yr(e, Ht);
|
|
7035
|
+
let a, o = () => a ?? (a = Rt(e, {
|
|
6934
7036
|
...r,
|
|
6935
7037
|
getTagContentType: void 0
|
|
6936
7038
|
})), c = (u) => {
|
|
@@ -6939,24 +7041,24 @@ function bs(e, t) {
|
|
|
6939
7041
|
};
|
|
6940
7042
|
for (let [u, p] of n.entries()) if (p.kind === "element") {
|
|
6941
7043
|
if (p.isVoid) i = o().errors, n[u] = c(p);
|
|
6942
|
-
else if (
|
|
6943
|
-
let { endSourceSpan: d, startSourceSpan:
|
|
6944
|
-
m &&
|
|
7044
|
+
else if (Lo(p)) {
|
|
7045
|
+
let { endSourceSpan: d, startSourceSpan: g } = p, m = o().errors.find((_) => _.span.start.offset > g.start.offset && _.span.start.offset < d.end.offset);
|
|
7046
|
+
m && xr(m), n[u] = c(p);
|
|
6945
7047
|
}
|
|
6946
7048
|
}
|
|
6947
|
-
return i.length > 0 &&
|
|
7049
|
+
return i.length > 0 && xr(i[0]), {
|
|
6948
7050
|
parseOptions: t,
|
|
6949
7051
|
rootNodes: n
|
|
6950
7052
|
};
|
|
6951
7053
|
}
|
|
6952
|
-
function
|
|
7054
|
+
function Lo(e) {
|
|
6953
7055
|
if (e.kind !== "element" || e.name !== "template") return !1;
|
|
6954
7056
|
let t = e.attrs.find((r) => r.name === "lang")?.value;
|
|
6955
7057
|
return !t || t === "html";
|
|
6956
7058
|
}
|
|
6957
|
-
function
|
|
7059
|
+
function xr(e) {
|
|
6958
7060
|
let { msg: t, span: { start: r, end: n } } = e;
|
|
6959
|
-
throw
|
|
7061
|
+
throw Gi(t, {
|
|
6960
7062
|
loc: {
|
|
6961
7063
|
start: {
|
|
6962
7064
|
line: r.line + 1,
|
|
@@ -6970,66 +7072,66 @@ function jr(e) {
|
|
|
6970
7072
|
cause: e
|
|
6971
7073
|
});
|
|
6972
7074
|
}
|
|
6973
|
-
function
|
|
6974
|
-
let { offset: a } = n, c =
|
|
7075
|
+
function Po(e, t, r, n, i, s) {
|
|
7076
|
+
let { offset: a } = n, c = Ar(w(0, t.slice(0, a), /[^\n]/gu, " ") + r, e, {
|
|
6975
7077
|
...i,
|
|
6976
7078
|
shouldParseFrontMatter: !1
|
|
6977
7079
|
}, s);
|
|
6978
|
-
c.sourceSpan = new h(n,
|
|
7080
|
+
c.sourceSpan = new h(n, M(0, c.children, -1).sourceSpan.end);
|
|
6979
7081
|
let u = c.children[0];
|
|
6980
7082
|
return u.length === a ? c.children.shift() : (u.sourceSpan = new h(u.sourceSpan.start.moveBy(a), u.sourceSpan.end), u.value = u.value.slice(a)), c;
|
|
6981
7083
|
}
|
|
6982
|
-
function
|
|
6983
|
-
let { frontMatter: i, content: s } = r.shouldParseFrontMatter ?
|
|
7084
|
+
function Ar(e, t, r, n = {}) {
|
|
7085
|
+
let { frontMatter: i, content: s } = r.shouldParseFrontMatter ? Xt(e) : { content: e }, a = new nt(e, n.filepath), o = new De(a, 0, 0, 0), c = o.moveBy(e.length), { parseOptions: u, rootNodes: p } = t(s, r), d = {
|
|
6984
7086
|
kind: "root",
|
|
6985
7087
|
sourceSpan: new h(o, c),
|
|
6986
7088
|
children: p
|
|
6987
|
-
},
|
|
7089
|
+
}, g;
|
|
6988
7090
|
if (i) {
|
|
6989
|
-
let [
|
|
6990
|
-
|
|
7091
|
+
let [_, T] = [i.start, i.end].map((P) => new De(a, P.index, P.line - 1, P.column));
|
|
7092
|
+
g = {
|
|
6991
7093
|
...i,
|
|
6992
7094
|
kind: "frontMatter",
|
|
6993
|
-
sourceSpan: new h(
|
|
7095
|
+
sourceSpan: new h(_, T)
|
|
6994
7096
|
};
|
|
6995
7097
|
}
|
|
6996
|
-
return
|
|
7098
|
+
return Ki(d, g, u, (_, T) => Po(t, e, _, T, u, n));
|
|
6997
7099
|
}
|
|
6998
|
-
var
|
|
7100
|
+
var Ht = Mt({
|
|
6999
7101
|
name: "html",
|
|
7000
7102
|
normalizeTagName: !0,
|
|
7001
7103
|
normalizeAttributeName: !0,
|
|
7002
7104
|
allowHtmComponentClosingTags: !0
|
|
7003
7105
|
});
|
|
7004
|
-
function
|
|
7005
|
-
let t =
|
|
7106
|
+
function at(e) {
|
|
7107
|
+
let t = Mt(e), r = t.name === "vue" ? Qi : yr;
|
|
7006
7108
|
return {
|
|
7007
|
-
parse: (n, i) =>
|
|
7008
|
-
hasPragma:
|
|
7009
|
-
hasIgnorePragma:
|
|
7109
|
+
parse: (n, i) => Ar(n, r, t, i),
|
|
7110
|
+
hasPragma: Zn,
|
|
7111
|
+
hasIgnorePragma: ei,
|
|
7010
7112
|
astFormat: "html",
|
|
7011
|
-
locStart:
|
|
7012
|
-
locEnd:
|
|
7113
|
+
locStart: K,
|
|
7114
|
+
locEnd: J
|
|
7013
7115
|
};
|
|
7014
7116
|
}
|
|
7015
|
-
var
|
|
7016
|
-
...
|
|
7117
|
+
var Oo = at(Ht), Do = new Set(["mj-style", "mj-raw"]), Io = at({
|
|
7118
|
+
...Ht,
|
|
7017
7119
|
name: "mjml",
|
|
7018
|
-
shouldParseAsRawText: (e) =>
|
|
7019
|
-
}),
|
|
7120
|
+
shouldParseAsRawText: (e) => Do.has(e)
|
|
7121
|
+
}), Ro = at({
|
|
7020
7122
|
name: "angular",
|
|
7021
7123
|
tokenizeAngularBlocks: !0,
|
|
7022
7124
|
tokenizeAngularLetDeclaration: !0
|
|
7023
|
-
}),
|
|
7125
|
+
}), Mo = at({
|
|
7024
7126
|
name: "vue",
|
|
7025
7127
|
isTagNameCaseSensitive: !0,
|
|
7026
7128
|
shouldParseAsRawText(e, t, r, n) {
|
|
7027
7129
|
return e.toLowerCase() !== "html" && !r && (e !== "template" || n.some(({ name: i, value: s }) => i === "lang" && s !== "html" && s !== "" && s !== void 0));
|
|
7028
7130
|
}
|
|
7029
|
-
}),
|
|
7131
|
+
}), Bo = at({
|
|
7030
7132
|
name: "lwc",
|
|
7031
7133
|
canSelfClose: !1
|
|
7032
7134
|
});
|
|
7033
|
-
var
|
|
7135
|
+
var qo = { html: Hi };
|
|
7034
7136
|
//#endregion
|
|
7035
|
-
export {
|
|
7137
|
+
export { Ji as default, Vi as languages, Wi as options, Nr as parsers, qo as printers };
|