diff --git a/.bazelversion b/.bazelversion index e8be68404bc..e81e85b8104 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.6.1 +7.6.2 diff --git a/.github/actions/deploy-docs-site/main.js b/.github/actions/deploy-docs-site/main.js index 856dc52af8d..dab24730382 100644 --- a/.github/actions/deploy-docs-site/main.js +++ b/.github/actions/deploy-docs-site/main.js @@ -15576,13 +15576,13 @@ function F(A3, E6 = "@") { `, Q2.e() - 1)}`), { idx: Q2.e() }); const U3 = [], t3 = []; for (; Q2.ri(); ) { - const C4 = Q2.is(), I4 = Q2.ie(), D3 = Q2.it(), i6 = Q2.ai(), w4 = Q2.id(), J3 = Q2.ss(), K4 = Q2.se(); + const C4 = Q2.is(), I5 = Q2.ie(), D3 = Q2.it(), i6 = Q2.ai(), w4 = Q2.id(), J4 = Q2.ss(), K4 = Q2.se(); let o8; - Q2.ip() && (o8 = N2(A3.slice(w4 === -1 ? C4 - 1 : C4, w4 === -1 ? I4 + 1 : I4))), U3.push({ n: o8, t: D3, s: C4, e: I4, ss: J3, se: K4, d: w4, a: i6 }); + Q2.ip() && (o8 = N2(A3.slice(w4 === -1 ? C4 - 1 : C4, w4 === -1 ? I5 + 1 : I5))), U3.push({ n: o8, t: D3, s: C4, e: I5, ss: J4, se: K4, d: w4, a: i6 }); } for (; Q2.re(); ) { - const C4 = Q2.es(), I4 = Q2.ee(), D3 = Q2.els(), i6 = Q2.ele(), w4 = A3.slice(C4, I4), J3 = w4[0], K4 = D3 < 0 ? void 0 : A3.slice(D3, i6), o8 = K4 ? K4[0] : ""; - t3.push({ s: C4, e: I4, ls: D3, le: i6, n: J3 === '"' || J3 === "'" ? N2(w4) : w4, ln: o8 === '"' || o8 === "'" ? N2(K4) : K4 }); + const C4 = Q2.es(), I5 = Q2.ee(), D3 = Q2.els(), i6 = Q2.ele(), w4 = A3.slice(C4, I5), J4 = w4[0], K4 = D3 < 0 ? void 0 : A3.slice(D3, i6), o8 = K4 ? K4[0] : ""; + t3.push({ s: C4, e: I5, ls: D3, le: i6, n: J4 === '"' || J4 === "'" ? N2(w4) : w4, ln: o8 === '"' || o8 === "'" ? N2(K4) : K4 }); } function N2(C4) { try { @@ -15779,6 +15779,9 @@ var require_identifiers = __commonJS({ "use strict"; var numeric = /^[0-9]+$/; var compareIdentifiers = (a7, b3) => { + if (typeof a7 === "number" && typeof b3 === "number") { + return a7 === b3 ? 0 : a7 < b3 ? -1 : 1; + } const anum = numeric.test(a7); const bnum = numeric.test(b3); if (anum && bnum) { @@ -15885,7 +15888,25 @@ var require_semver = __commonJS({ if (!(other instanceof _SemVer)) { other = new _SemVer(other, this.options); } - return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + if (this.major < other.major) { + return -1; + } + if (this.major > other.major) { + return 1; + } + if (this.minor < other.minor) { + return -1; + } + if (this.minor > other.minor) { + return 1; + } + if (this.patch < other.patch) { + return -1; + } + if (this.patch > other.patch) { + return 1; + } + return 0; } comparePre(other) { if (!(other instanceof _SemVer)) { @@ -16642,6 +16663,7 @@ var require_range = __commonJS({ return result; }; var parseComparator = (comp, options) => { + comp = comp.replace(re3[t3.BUILD], ""); debug("comp", comp, options); comp = replaceCarets(comp, options); debug("caret", comp); @@ -17793,7 +17815,7 @@ var require_dist = __commonJS({ types3.constant = function(_c) { return scalarType(); }; - types3.oneOf = function(_e4) { + types3.oneOf = function(_e3) { return scalarType(); }; types3.custom = function() { @@ -20178,20 +20200,20 @@ var require_lockfile = __commonJS({ var IE8_DOM_DEFINE = __webpack_require__(184); var toPrimitive = __webpack_require__(201); var dP = Object.defineProperty; - exports2.f = __webpack_require__(33) ? Object.defineProperty : function defineProperty(O5, P3, Attributes) { - anObject(O5); + exports2.f = __webpack_require__(33) ? Object.defineProperty : function defineProperty(O4, P3, Attributes) { + anObject(O4); P3 = toPrimitive(P3, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { - return dP(O5, P3, Attributes); + return dP(O4, P3, Attributes); } catch (e5) { } if ("get" in Attributes || "set" in Attributes) throw TypeError("Accessors not supported!"); if ("value" in Attributes) - O5[P3] = Attributes.value; - return O5; + O4[P3] = Attributes.value; + return O4; }; }, , @@ -20470,13 +20492,13 @@ var require_lockfile = __commonJS({ const stream = new Transform({ transform(chunk, enc, cb) { streamSize += chunk.length; - hashes.forEach((h4) => h4.update(chunk, enc)); + hashes.forEach((h3) => h3.update(chunk, enc)); cb(null, chunk, enc); } }).on("end", () => { const optString = opts.options && opts.options.length ? `?${opts.options.join("?")}` : ""; - const newSri = parse2(hashes.map((h4, i6) => { - return `${algorithms[i6]}-${h4.digest("base64")}${optString}`; + const newSri = parse2(hashes.map((h3, i6) => { + return `${algorithms[i6]}-${h3.digest("base64")}${optString}`; }).join(" "), opts); const match = goodSri && newSri.match(sri, opts); if (typeof opts.size === "number" && streamSize !== opts.size) { @@ -20512,7 +20534,7 @@ var require_lockfile = __commonJS({ const hashes = algorithms.map(crypto.createHash); return { update: function(chunk, enc) { - hashes.forEach((h4) => h4.update(chunk, enc)); + hashes.forEach((h3) => h3.update(chunk, enc)); return this; }, digest: function(enc) { @@ -22359,8 +22381,8 @@ var require_lockfile = __commonJS({ } }; module3.exports = function(it2) { - var O5, T3, B3; - return it2 === void 0 ? "Undefined" : it2 === null ? "Null" : typeof (T3 = tryGet(O5 = Object(it2), TAG)) == "string" ? T3 : ARG ? cof(O5) : (B3 = cof(O5)) == "Object" && typeof O5.callee == "function" ? "Arguments" : B3; + var O4, T3, B3; + return it2 === void 0 ? "Undefined" : it2 === null ? "Null" : typeof (T3 = tryGet(O4 = Object(it2), TAG)) == "string" ? T3 : ARG ? cof(O4) : (B3 = cof(O4)) == "Object" && typeof O4.callee == "function" ? "Arguments" : B3; }; }, /* 101 */ @@ -22518,8 +22540,8 @@ var require_lockfile = __commonJS({ var anObject = __webpack_require__(27); var aFunction = __webpack_require__(46); var SPECIES = __webpack_require__(13)("species"); - module3.exports = function(O5, D3) { - var C4 = anObject(O5).constructor; + module3.exports = function(O4, D3) { + var C4 = anObject(O4).constructor; var S2; return C4 === void 0 || (S2 = anObject(C4)[SPECIES]) == void 0 ? D3 : aFunction(S2); }; @@ -23153,8 +23175,8 @@ var require_lockfile = __commonJS({ function(module3, exports2, __webpack_require__) { var $keys = __webpack_require__(195); var enumBugKeys = __webpack_require__(101); - module3.exports = Object.keys || function keys(O5) { - return $keys(O5, enumBugKeys); + module3.exports = Object.keys || function keys(O4) { + return $keys(O4, enumBugKeys); }; }, /* 133 */ @@ -23819,20 +23841,20 @@ ${indent}`); var toAbsoluteIndex = __webpack_require__(200); module3.exports = function(IS_INCLUDES) { return function($this, el, fromIndex) { - var O5 = toIObject($this); - var length = toLength(O5.length); + var O4 = toIObject($this); + var length = toLength(O4.length); var index = toAbsoluteIndex(fromIndex, length); var value; if (IS_INCLUDES && el != el) while (length > index) { - value = O5[index++]; + value = O4[index++]; if (value != value) return true; } else for (; length > index; index++) - if (IS_INCLUDES || index in O5) { - if (O5[index] === el) + if (IS_INCLUDES || index in O4) { + if (O4[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; @@ -24079,13 +24101,13 @@ ${indent}`); delete createDict[PROTOTYPE][enumBugKeys[i6]]; return createDict(); }; - module3.exports = Object.create || function create(O5, Properties) { + module3.exports = Object.create || function create(O4, Properties) { var result; - if (O5 !== null) { - Empty[PROTOTYPE] = anObject(O5); + if (O4 !== null) { + Empty[PROTOTYPE] = anObject(O4); result = new Empty(); Empty[PROTOTYPE] = null; - result[IE_PROTO] = O5; + result[IE_PROTO] = O4; } else result = createDict(); return Properties === void 0 ? result : dPs(result, Properties); @@ -24097,15 +24119,15 @@ ${indent}`); var dP = __webpack_require__(50); var anObject = __webpack_require__(27); var getKeys = __webpack_require__(132); - module3.exports = __webpack_require__(33) ? Object.defineProperties : function defineProperties(O5, Properties) { - anObject(O5); + module3.exports = __webpack_require__(33) ? Object.defineProperties : function defineProperties(O4, Properties) { + anObject(O4); var keys = getKeys(Properties); var length = keys.length; var i6 = 0; var P3; while (length > i6) - dP.f(O5, P3 = keys[i6++], Properties[P3]); - return O5; + dP.f(O4, P3 = keys[i6++], Properties[P3]); + return O4; }; }, /* 194 */ @@ -24115,14 +24137,14 @@ ${indent}`); var toObject = __webpack_require__(133); var IE_PROTO = __webpack_require__(72)("IE_PROTO"); var ObjectProto = Object.prototype; - module3.exports = Object.getPrototypeOf || function(O5) { - O5 = toObject(O5); - if (has(O5, IE_PROTO)) - return O5[IE_PROTO]; - if (typeof O5.constructor == "function" && O5 instanceof O5.constructor) { - return O5.constructor.prototype; - } - return O5 instanceof Object ? ObjectProto : null; + module3.exports = Object.getPrototypeOf || function(O4) { + O4 = toObject(O4); + if (has(O4, IE_PROTO)) + return O4[IE_PROTO]; + if (typeof O4.constructor == "function" && O4 instanceof O4.constructor) { + return O4.constructor.prototype; + } + return O4 instanceof Object ? ObjectProto : null; }; }, /* 195 */ @@ -24133,15 +24155,15 @@ ${indent}`); var arrayIndexOf = __webpack_require__(182)(false); var IE_PROTO = __webpack_require__(72)("IE_PROTO"); module3.exports = function(object, names) { - var O5 = toIObject(object); + var O4 = toIObject(object); var i6 = 0; var result = []; var key; - for (key in O5) + for (key in O4) if (key != IE_PROTO) - has(O5, key) && result.push(key); + has(O4, key) && result.push(key); while (names.length > i6) - if (has(O5, key = names[i6++])) { + if (has(O4, key = names[i6++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; @@ -24263,18 +24285,18 @@ ${indent}`); this._i = 0; this._k = kind; }, function() { - var O5 = this._t; + var O4 = this._t; var kind = this._k; var index = this._i++; - if (!O5 || index >= O5.length) { + if (!O4 || index >= O4.length) { this._t = void 0; return step(1); } if (kind == "keys") return step(0, index); if (kind == "values") - return step(0, O5[index]); - return step(0, [index, O5[index]]); + return step(0, O4[index]); + return step(0, [index, O4[index]]); }, "values"); Iterators.Arguments = Iterators.Array; addToUnscopables("keys"); @@ -24585,12 +24607,12 @@ ${indent}`); this._t = String(iterated); this._i = 0; }, function() { - var O5 = this._t; + var O4 = this._t; var index = this._i; var point; - if (index >= O5.length) + if (index >= O4.length) return { value: void 0, done: true }; - point = $at(O5, index); + point = $at(O4, index); this._i += point.length; return { value: point, done: false }; }); @@ -25652,8 +25674,8 @@ ${indent}`); function(module3, exports2) { var s5 = 1e3; var m8 = s5 * 60; - var h4 = m8 * 60; - var d5 = h4 * 24; + var h3 = m8 * 60; + var d5 = h3 * 24; var y3 = d5 * 365.25; module3.exports = function(val, options) { options = options || {}; @@ -25696,7 +25718,7 @@ ${indent}`); case "hrs": case "hr": case "h": - return n3 * h4; + return n3 * h3; case "minutes": case "minute": case "mins": @@ -25723,8 +25745,8 @@ ${indent}`); if (ms >= d5) { return Math.round(ms / d5) + "d"; } - if (ms >= h4) { - return Math.round(ms / h4) + "h"; + if (ms >= h3) { + return Math.round(ms / h3) + "h"; } if (ms >= m8) { return Math.round(ms / m8) + "m"; @@ -25735,7 +25757,7 @@ ${indent}`); return ms + "ms"; } function fmtLong(ms) { - return plural(ms, d5, "day") || plural(ms, h4, "hour") || plural(ms, m8, "minute") || plural(ms, s5, "second") || ms + " ms"; + return plural(ms, d5, "day") || plural(ms, h3, "hour") || plural(ms, m8, "minute") || plural(ms, s5, "second") || ms + " ms"; } function plural(ms, n3, name) { if (ms < n3) { @@ -33507,12 +33529,12 @@ var n = e2((t3) => { // import d3 from "node:module"; import p4 from "node:path"; -import { fileURLToPath as O4 } from "node:url"; +import { fileURLToPath as O3 } from "node:url"; // import m3 from "node:path"; -import te from "node:fs"; -import ve from "node:module"; +import le from "node:fs"; +import Fe from "node:module"; // var A = (r3) => r3 !== null && typeof r3 == "object"; @@ -33586,25 +33608,27 @@ var v = (r3, t3, e5) => { }; // -import Ae from "fs"; -var de = Object.defineProperty; -var o3 = (e5, t3) => de(e5, "name", { value: t3, configurable: true }); +import he from "fs"; +import Ee from "os"; +import Be from "path"; +var je = Object.defineProperty; +var o3 = (e5, t3) => je(e5, "name", { value: t3, configurable: true }); function E2(e5) { return e5.startsWith("\\\\?\\") ? e5 : e5.replace(/\\/g, "/"); } o3(E2, "slash"); -var O2 = o3((e5) => { - const t3 = te[e5]; +var z = o3((e5) => { + const t3 = le[e5]; return (s5, ...n3) => { const l3 = `${e5}:${n3.join(":")}`; let i6 = s5 == null ? void 0 : s5.get(l3); - return i6 === void 0 && (i6 = Reflect.apply(t3, te, n3), s5 == null || s5.set(l3, i6)), i6; + return i6 === void 0 && (i6 = Reflect.apply(t3, le, n3), s5 == null || s5.set(l3, i6)), i6; }; }, "cacheFs"); -var B = O2("existsSync"); -var _e = O2("readFileSync"); -var P = O2("statSync"); -var se = o3((e5, t3, s5) => { +var B = z("existsSync"); +var Le = z("readFileSync"); +var P = z("statSync"); +var ie = o3((e5, t3, s5) => { for (; ; ) { const n3 = m3.posix.join(e5, t3); if (B(s5, n3)) @@ -33615,73 +33639,73 @@ var se = o3((e5, t3, s5) => { e5 = l3; } }, "findUp"); -var z = /^\.{1,2}(\/.*)?$/; -var G = o3((e5) => { +var G = /^\.{1,2}(\/.*)?$/; +var Q = o3((e5) => { const t3 = E2(e5); - return z.test(t3) ? t3 : `./${t3}`; + return G.test(t3) ? t3 : `./${t3}`; }, "normalizeRelativePath"); -function je(e5, t3 = false) { +function $e(e5, t3 = false) { const s5 = e5.length; - let n3 = 0, l3 = "", i6 = 0, u5 = 16, f6 = 0, r3 = 0, g2 = 0, T3 = 0, b3 = 0; - function _4(c3, k3) { - let p5 = 0, F4 = 0; - for (; p5 < c3; ) { - let j2 = e5.charCodeAt(n3); - if (j2 >= 48 && j2 <= 57) - F4 = F4 * 16 + j2 - 48; - else if (j2 >= 65 && j2 <= 70) - F4 = F4 * 16 + j2 - 65 + 10; - else if (j2 >= 97 && j2 <= 102) - F4 = F4 * 16 + j2 - 97 + 10; + let n3 = 0, l3 = "", i6 = 0, r3 = 16, f6 = 0, u5 = 0, g2 = 0, w4 = 0, b3 = 0; + function _4(c3, y3) { + let D3 = 0, T3 = 0; + for (; D3 < c3; ) { + let p5 = e5.charCodeAt(n3); + if (p5 >= 48 && p5 <= 57) + T3 = T3 * 16 + p5 - 48; + else if (p5 >= 65 && p5 <= 70) + T3 = T3 * 16 + p5 - 65 + 10; + else if (p5 >= 97 && p5 <= 102) + T3 = T3 * 16 + p5 - 97 + 10; else break; - n3++, p5++; + n3++, D3++; } - return p5 < c3 && (F4 = -1), F4; + return D3 < c3 && (T3 = -1), T3; } o3(_4, "scanHexDigits"); function d5(c3) { - n3 = c3, l3 = "", i6 = 0, u5 = 16, b3 = 0; + n3 = c3, l3 = "", i6 = 0, r3 = 16, b3 = 0; } o3(d5, "setPosition"); - function A3() { + function j2() { let c3 = n3; if (e5.charCodeAt(n3) === 48) n3++; else - for (n3++; n3 < e5.length && U(e5.charCodeAt(n3)); ) + for (n3++; n3 < e5.length && I2(e5.charCodeAt(n3)); ) n3++; if (n3 < e5.length && e5.charCodeAt(n3) === 46) - if (n3++, n3 < e5.length && U(e5.charCodeAt(n3))) - for (n3++; n3 < e5.length && U(e5.charCodeAt(n3)); ) + if (n3++, n3 < e5.length && I2(e5.charCodeAt(n3))) + for (n3++; n3 < e5.length && I2(e5.charCodeAt(n3)); ) n3++; else return b3 = 3, e5.substring(c3, n3); - let k3 = n3; + let y3 = n3; if (n3 < e5.length && (e5.charCodeAt(n3) === 69 || e5.charCodeAt(n3) === 101)) - if (n3++, (n3 < e5.length && e5.charCodeAt(n3) === 43 || e5.charCodeAt(n3) === 45) && n3++, n3 < e5.length && U(e5.charCodeAt(n3))) { - for (n3++; n3 < e5.length && U(e5.charCodeAt(n3)); ) + if (n3++, (n3 < e5.length && e5.charCodeAt(n3) === 43 || e5.charCodeAt(n3) === 45) && n3++, n3 < e5.length && I2(e5.charCodeAt(n3))) { + for (n3++; n3 < e5.length && I2(e5.charCodeAt(n3)); ) n3++; - k3 = n3; + y3 = n3; } else b3 = 3; - return e5.substring(c3, k3); + return e5.substring(c3, y3); } - o3(A3, "scanNumber"); - function w4() { - let c3 = "", k3 = n3; + o3(j2, "scanNumber"); + function v4() { + let c3 = "", y3 = n3; for (; ; ) { if (n3 >= s5) { - c3 += e5.substring(k3, n3), b3 = 2; + c3 += e5.substring(y3, n3), b3 = 2; break; } - const p5 = e5.charCodeAt(n3); - if (p5 === 34) { - c3 += e5.substring(k3, n3), n3++; + const D3 = e5.charCodeAt(n3); + if (D3 === 34) { + c3 += e5.substring(y3, n3), n3++; break; } - if (p5 === 92) { - if (c3 += e5.substring(k3, n3), n3++, n3 >= s5) { + if (D3 === 92) { + if (c3 += e5.substring(y3, n3), n3++, n3 >= s5) { b3 = 2; break; } @@ -33712,18 +33736,18 @@ function je(e5, t3 = false) { c3 += " "; break; case 117: - const j2 = _4(4); - j2 >= 0 ? c3 += String.fromCharCode(j2) : b3 = 4; + const p5 = _4(4); + p5 >= 0 ? c3 += String.fromCharCode(p5) : b3 = 4; break; default: b3 = 5; } - k3 = n3; + y3 = n3; continue; } - if (p5 >= 0 && p5 <= 31) - if (x(p5)) { - c3 += e5.substring(k3, n3), b3 = 2; + if (D3 >= 0 && D3 <= 31) + if (x(D3)) { + c3 += e5.substring(y3, n3), b3 = 2; break; } else b3 = 6; @@ -33731,60 +33755,60 @@ function je(e5, t3 = false) { } return c3; } - o3(w4, "scanString"); - function y3() { - if (l3 = "", b3 = 0, i6 = n3, r3 = f6, T3 = g2, n3 >= s5) - return i6 = s5, u5 = 17; + o3(v4, "scanString"); + function A3() { + if (l3 = "", b3 = 0, i6 = n3, u5 = f6, w4 = g2, n3 >= s5) + return i6 = s5, r3 = 17; let c3 = e5.charCodeAt(n3); - if (Q(c3)) { + if (H(c3)) { do n3++, l3 += String.fromCharCode(c3), c3 = e5.charCodeAt(n3); - while (Q(c3)); - return u5 = 15; + while (H(c3)); + return r3 = 15; } if (x(c3)) return n3++, l3 += String.fromCharCode(c3), c3 === 13 && e5.charCodeAt(n3) === 10 && (n3++, l3 += ` -`), f6++, g2 = n3, u5 = 14; +`), f6++, g2 = n3, r3 = 14; switch (c3) { case 123: - return n3++, u5 = 1; + return n3++, r3 = 1; case 125: - return n3++, u5 = 2; + return n3++, r3 = 2; case 91: - return n3++, u5 = 3; + return n3++, r3 = 3; case 93: - return n3++, u5 = 4; + return n3++, r3 = 4; case 58: - return n3++, u5 = 6; + return n3++, r3 = 6; case 44: - return n3++, u5 = 5; + return n3++, r3 = 5; case 34: - return n3++, l3 = w4(), u5 = 10; + return n3++, l3 = v4(), r3 = 10; case 47: - const k3 = n3 - 1; + const y3 = n3 - 1; if (e5.charCodeAt(n3 + 1) === 47) { for (n3 += 2; n3 < s5 && !x(e5.charCodeAt(n3)); ) n3++; - return l3 = e5.substring(k3, n3), u5 = 12; + return l3 = e5.substring(y3, n3), r3 = 12; } if (e5.charCodeAt(n3 + 1) === 42) { n3 += 2; - const p5 = s5 - 1; - let F4 = false; - for (; n3 < p5; ) { - const j2 = e5.charCodeAt(n3); - if (j2 === 42 && e5.charCodeAt(n3 + 1) === 47) { - n3 += 2, F4 = true; + const D3 = s5 - 1; + let T3 = false; + for (; n3 < D3; ) { + const p5 = e5.charCodeAt(n3); + if (p5 === 42 && e5.charCodeAt(n3 + 1) === 47) { + n3 += 2, T3 = true; break; } - n3++, x(j2) && (j2 === 13 && e5.charCodeAt(n3) === 10 && n3++, f6++, g2 = n3); + n3++, x(p5) && (p5 === 13 && e5.charCodeAt(n3) === 10 && n3++, f6++, g2 = n3); } - return F4 || (n3++, b3 = 1), l3 = e5.substring(k3, n3), u5 = 13; + return T3 || (n3++, b3 = 1), l3 = e5.substring(y3, n3), r3 = 13; } - return l3 += String.fromCharCode(c3), n3++, u5 = 16; + return l3 += String.fromCharCode(c3), n3++, r3 = 16; case 45: - if (l3 += String.fromCharCode(c3), n3++, n3 === s5 || !U(e5.charCodeAt(n3))) - return u5 = 16; + if (l3 += String.fromCharCode(c3), n3++, n3 === s5 || !I2(e5.charCodeAt(n3))) + return r3 = 16; case 48: case 49: case 50: @@ -33795,27 +33819,27 @@ function je(e5, t3 = false) { case 55: case 56: case 57: - return l3 += A3(), u5 = 11; + return l3 += j2(), r3 = 11; default: - for (; n3 < s5 && I4(c3); ) + for (; n3 < s5 && h3(c3); ) n3++, c3 = e5.charCodeAt(n3); if (i6 !== n3) { switch (l3 = e5.substring(i6, n3), l3) { case "true": - return u5 = 8; + return r3 = 8; case "false": - return u5 = 9; + return r3 = 9; case "null": - return u5 = 7; + return r3 = 7; } - return u5 = 16; + return r3 = 16; } - return l3 += String.fromCharCode(c3), n3++, u5 = 16; + return l3 += String.fromCharCode(c3), n3++, r3 = 16; } } - o3(y3, "scanNext"); - function I4(c3) { - if (Q(c3) || x(c3)) + o3(A3, "scanNext"); + function h3(c3) { + if (H(c3) || x(c3)) return false; switch (c3) { case 125: @@ -33830,88 +33854,97 @@ function je(e5, t3 = false) { } return true; } - o3(I4, "isUnknownContentCharacter"); + o3(h3, "isUnknownContentCharacter"); function L3() { let c3; do - c3 = y3(); + c3 = A3(); while (c3 >= 12 && c3 <= 15); return c3; } - return o3(L3, "scanNextNonTrivia"), { setPosition: d5, getPosition: o3(() => n3, "getPosition"), scan: t3 ? L3 : y3, getToken: o3(() => u5, "getToken"), getTokenValue: o3(() => l3, "getTokenValue"), getTokenOffset: o3(() => i6, "getTokenOffset"), getTokenLength: o3(() => n3 - i6, "getTokenLength"), getTokenStartLine: o3(() => r3, "getTokenStartLine"), getTokenStartCharacter: o3(() => i6 - T3, "getTokenStartCharacter"), getTokenError: o3(() => b3, "getTokenError") }; + return o3(L3, "scanNextNonTrivia"), { setPosition: d5, getPosition: o3(() => n3, "getPosition"), scan: t3 ? L3 : A3, getToken: o3(() => r3, "getToken"), getTokenValue: o3(() => l3, "getTokenValue"), getTokenOffset: o3(() => i6, "getTokenOffset"), getTokenLength: o3(() => n3 - i6, "getTokenLength"), getTokenStartLine: o3(() => u5, "getTokenStartLine"), getTokenStartCharacter: o3(() => i6 - w4, "getTokenStartCharacter"), getTokenError: o3(() => b3, "getTokenError") }; } -o3(je, "createScanner"); -function Q(e5) { +o3($e, "createScanner"); +function H(e5) { return e5 === 32 || e5 === 9; } -o3(Q, "isWhiteSpace"); +o3(H, "isWhiteSpace"); function x(e5) { return e5 === 10 || e5 === 13; } o3(x, "isLineBreak"); -function U(e5) { +function I2(e5) { return e5 >= 48 && e5 <= 57; } -o3(U, "isDigit"); -var le; +o3(I2, "isDigit"); +var oe; (function(e5) { e5[e5.lineFeed = 10] = "lineFeed", e5[e5.carriageReturn = 13] = "carriageReturn", e5[e5.space = 32] = "space", e5[e5._0 = 48] = "_0", e5[e5._1 = 49] = "_1", e5[e5._2 = 50] = "_2", e5[e5._3 = 51] = "_3", e5[e5._4 = 52] = "_4", e5[e5._5 = 53] = "_5", e5[e5._6 = 54] = "_6", e5[e5._7 = 55] = "_7", e5[e5._8 = 56] = "_8", e5[e5._9 = 57] = "_9", e5[e5.a = 97] = "a", e5[e5.b = 98] = "b", e5[e5.c = 99] = "c", e5[e5.d = 100] = "d", e5[e5.e = 101] = "e", e5[e5.f = 102] = "f", e5[e5.g = 103] = "g", e5[e5.h = 104] = "h", e5[e5.i = 105] = "i", e5[e5.j = 106] = "j", e5[e5.k = 107] = "k", e5[e5.l = 108] = "l", e5[e5.m = 109] = "m", e5[e5.n = 110] = "n", e5[e5.o = 111] = "o", e5[e5.p = 112] = "p", e5[e5.q = 113] = "q", e5[e5.r = 114] = "r", e5[e5.s = 115] = "s", e5[e5.t = 116] = "t", e5[e5.u = 117] = "u", e5[e5.v = 118] = "v", e5[e5.w = 119] = "w", e5[e5.x = 120] = "x", e5[e5.y = 121] = "y", e5[e5.z = 122] = "z", e5[e5.A = 65] = "A", e5[e5.B = 66] = "B", e5[e5.C = 67] = "C", e5[e5.D = 68] = "D", e5[e5.E = 69] = "E", e5[e5.F = 70] = "F", e5[e5.G = 71] = "G", e5[e5.H = 72] = "H", e5[e5.I = 73] = "I", e5[e5.J = 74] = "J", e5[e5.K = 75] = "K", e5[e5.L = 76] = "L", e5[e5.M = 77] = "M", e5[e5.N = 78] = "N", e5[e5.O = 79] = "O", e5[e5.P = 80] = "P", e5[e5.Q = 81] = "Q", e5[e5.R = 82] = "R", e5[e5.S = 83] = "S", e5[e5.T = 84] = "T", e5[e5.U = 85] = "U", e5[e5.V = 86] = "V", e5[e5.W = 87] = "W", e5[e5.X = 88] = "X", e5[e5.Y = 89] = "Y", e5[e5.Z = 90] = "Z", e5[e5.asterisk = 42] = "asterisk", e5[e5.backslash = 92] = "backslash", e5[e5.closeBrace = 125] = "closeBrace", e5[e5.closeBracket = 93] = "closeBracket", e5[e5.colon = 58] = "colon", e5[e5.comma = 44] = "comma", e5[e5.dot = 46] = "dot", e5[e5.doubleQuote = 34] = "doubleQuote", e5[e5.minus = 45] = "minus", e5[e5.openBrace = 123] = "openBrace", e5[e5.openBracket = 91] = "openBracket", e5[e5.plus = 43] = "plus", e5[e5.slash = 47] = "slash", e5[e5.formFeed = 12] = "formFeed", e5[e5.tab = 9] = "tab"; -})(le || (le = {})), new Array(20).fill(0).map((e5, t3) => " ".repeat(t3)); -var h2 = 200; -new Array(h2).fill(0).map((e5, t3) => ` -` + " ".repeat(t3)), new Array(h2).fill(0).map((e5, t3) => "\r" + " ".repeat(t3)), new Array(h2).fill(0).map((e5, t3) => `\r -` + " ".repeat(t3)), new Array(h2).fill(0).map((e5, t3) => ` -` + " ".repeat(t3)), new Array(h2).fill(0).map((e5, t3) => "\r" + " ".repeat(t3)), new Array(h2).fill(0).map((e5, t3) => `\r +})(oe || (oe = {})), new Array(20).fill(0).map((e5, t3) => " ".repeat(t3)); +var U = 200; +new Array(U).fill(0).map((e5, t3) => ` +` + " ".repeat(t3)), new Array(U).fill(0).map((e5, t3) => "\r" + " ".repeat(t3)), new Array(U).fill(0).map((e5, t3) => `\r +` + " ".repeat(t3)), new Array(U).fill(0).map((e5, t3) => ` +` + " ".repeat(t3)), new Array(U).fill(0).map((e5, t3) => "\r" + " ".repeat(t3)), new Array(U).fill(0).map((e5, t3) => `\r ` + " ".repeat(t3)); var R2; (function(e5) { e5.DEFAULT = { allowTrailingComma: false }; })(R2 || (R2 = {})); -function ye(e5, t3 = [], s5 = R2.DEFAULT) { +function Ie(e5, t3 = [], s5 = R2.DEFAULT) { let n3 = null, l3 = []; const i6 = []; - function u5(r3) { - Array.isArray(l3) ? l3.push(r3) : n3 !== null && (l3[n3] = r3); - } - return o3(u5, "onValue"), Fe(e5, { onObjectBegin: o3(() => { - const r3 = {}; - u5(r3), i6.push(l3), l3 = r3, n3 = null; - }, "onObjectBegin"), onObjectProperty: o3((r3) => { - n3 = r3; + function r3(u5) { + Array.isArray(l3) ? l3.push(u5) : n3 !== null && (l3[n3] = u5); + } + return o3(r3, "onValue"), Ue(e5, { onObjectBegin: o3(() => { + const u5 = {}; + r3(u5), i6.push(l3), l3 = u5, n3 = null; + }, "onObjectBegin"), onObjectProperty: o3((u5) => { + n3 = u5; }, "onObjectProperty"), onObjectEnd: o3(() => { l3 = i6.pop(); }, "onObjectEnd"), onArrayBegin: o3(() => { - const r3 = []; - u5(r3), i6.push(l3), l3 = r3, n3 = null; + const u5 = []; + r3(u5), i6.push(l3), l3 = u5, n3 = null; }, "onArrayBegin"), onArrayEnd: o3(() => { l3 = i6.pop(); - }, "onArrayEnd"), onLiteralValue: u5, onError: o3((r3, g2, T3) => { - t3.push({ error: r3, offset: g2, length: T3 }); + }, "onArrayEnd"), onLiteralValue: r3, onError: o3((u5, g2, w4) => { + t3.push({ error: u5, offset: g2, length: w4 }); }, "onError") }, s5), l3[0]; } -o3(ye, "parse$1"); -function Fe(e5, t3, s5 = R2.DEFAULT) { - const n3 = je(e5, false), l3 = []; - function i6(v4) { - return v4 ? () => v4(n3.getTokenOffset(), n3.getTokenLength(), n3.getTokenStartLine(), n3.getTokenStartCharacter()) : () => true; - } - o3(i6, "toNoArgVisit"); - function u5(v4) { - return v4 ? () => v4(n3.getTokenOffset(), n3.getTokenLength(), n3.getTokenStartLine(), n3.getTokenStartCharacter(), () => l3.slice()) : () => true; +o3(Ie, "parse$1"); +function Ue(e5, t3, s5 = R2.DEFAULT) { + const n3 = $e(e5, false), l3 = []; + let i6 = 0; + function r3(k3) { + return k3 ? () => i6 === 0 && k3(n3.getTokenOffset(), n3.getTokenLength(), n3.getTokenStartLine(), n3.getTokenStartCharacter()) : () => true; } - o3(u5, "toNoArgVisitWithPath"); - function f6(v4) { - return v4 ? (D3) => v4(D3, n3.getTokenOffset(), n3.getTokenLength(), n3.getTokenStartLine(), n3.getTokenStartCharacter()) : () => true; + o3(r3, "toNoArgVisit"); + function f6(k3) { + return k3 ? (F4) => i6 === 0 && k3(F4, n3.getTokenOffset(), n3.getTokenLength(), n3.getTokenStartLine(), n3.getTokenStartCharacter()) : () => true; } o3(f6, "toOneArgVisit"); - function r3(v4) { - return v4 ? (D3) => v4(D3, n3.getTokenOffset(), n3.getTokenLength(), n3.getTokenStartLine(), n3.getTokenStartCharacter(), () => l3.slice()) : () => true; - } - o3(r3, "toOneArgVisitWithPath"); - const g2 = u5(t3.onObjectBegin), T3 = r3(t3.onObjectProperty), b3 = i6(t3.onObjectEnd), _4 = u5(t3.onArrayBegin), d5 = i6(t3.onArrayEnd), A3 = r3(t3.onLiteralValue), w4 = f6(t3.onSeparator), y3 = i6(t3.onComment), I4 = f6(t3.onError), L3 = s5 && s5.disallowComments, c3 = s5 && s5.allowTrailingComma; - function k3() { + function u5(k3) { + return k3 ? (F4) => i6 === 0 && k3(F4, n3.getTokenOffset(), n3.getTokenLength(), n3.getTokenStartLine(), n3.getTokenStartCharacter(), () => l3.slice()) : () => true; + } + o3(u5, "toOneArgVisitWithPath"); + function g2(k3) { + return k3 ? () => { + i6 > 0 ? i6++ : k3(n3.getTokenOffset(), n3.getTokenLength(), n3.getTokenStartLine(), n3.getTokenStartCharacter(), () => l3.slice()) === false && (i6 = 1); + } : () => true; + } + o3(g2, "toBeginVisit"); + function w4(k3) { + return k3 ? () => { + i6 > 0 && i6--, i6 === 0 && k3(n3.getTokenOffset(), n3.getTokenLength(), n3.getTokenStartLine(), n3.getTokenStartCharacter()); + } : () => true; + } + o3(w4, "toEndVisit"); + const b3 = g2(t3.onObjectBegin), _4 = u5(t3.onObjectProperty), d5 = w4(t3.onObjectEnd), j2 = g2(t3.onArrayBegin), v4 = w4(t3.onArrayEnd), A3 = u5(t3.onLiteralValue), h3 = f6(t3.onSeparator), L3 = r3(t3.onComment), c3 = f6(t3.onError), y3 = s5 && s5.disallowComments, D3 = s5 && s5.allowTrailingComma; + function T3() { for (; ; ) { - const v4 = n3.scan(); + const k3 = n3.scan(); switch (n3.getTokenError()) { case 4: p5(14); @@ -33923,7 +33956,7 @@ function Fe(e5, t3, s5 = R2.DEFAULT) { p5(13); break; case 1: - L3 || p5(11); + y3 || p5(11); break; case 2: p5(12); @@ -33932,10 +33965,10 @@ function Fe(e5, t3, s5 = R2.DEFAULT) { p5(16); break; } - switch (v4) { + switch (k3) { case 12: case 13: - L3 ? p5(10) : y3(); + y3 ? p5(10) : L3(); break; case 16: p5(1); @@ -33944,36 +33977,36 @@ function Fe(e5, t3, s5 = R2.DEFAULT) { case 14: break; default: - return v4; + return k3; } } } - o3(k3, "scanNext"); - function p5(v4, D3 = [], ne = []) { - if (I4(v4), D3.length + ne.length > 0) { - let S2 = n3.getToken(); - for (; S2 !== 17; ) { - if (D3.indexOf(S2) !== -1) { - k3(); + o3(T3, "scanNext"); + function p5(k3, F4 = [], se3 = []) { + if (c3(k3), F4.length + se3.length > 0) { + let N2 = n3.getToken(); + for (; N2 !== 17; ) { + if (F4.indexOf(N2) !== -1) { + T3(); break; - } else if (ne.indexOf(S2) !== -1) + } else if (se3.indexOf(N2) !== -1) break; - S2 = k3(); + N2 = T3(); } } } o3(p5, "handleError"); - function F4(v4) { - const D3 = n3.getTokenValue(); - return v4 ? A3(D3) : (T3(D3), l3.push(D3)), k3(), true; + function a7(k3) { + const F4 = n3.getTokenValue(); + return k3 ? A3(F4) : (_4(F4), l3.push(F4)), T3(), true; } - o3(F4, "parseString"); - function j2() { + o3(a7, "parseString"); + function S2() { switch (n3.getToken()) { case 11: - const v4 = n3.getTokenValue(); - let D3 = Number(v4); - isNaN(D3) && (p5(2), D3 = 0), A3(D3); + const k3 = n3.getTokenValue(); + let F4 = Number(k3); + isNaN(F4) && (p5(2), F4 = 0), A3(F4); break; case 7: A3(null); @@ -33987,100 +34020,100 @@ function Fe(e5, t3, s5 = R2.DEFAULT) { default: return false; } - return k3(), true; + return T3(), true; } - o3(j2, "parseLiteral"); - function a7() { - return n3.getToken() !== 10 ? (p5(3, [], [2, 5]), false) : (F4(false), n3.getToken() === 6 ? (w4(":"), k3(), J3() || p5(4, [], [2, 5])) : p5(5, [], [2, 5]), l3.pop(), true); + o3(S2, "parseLiteral"); + function Ae2() { + return n3.getToken() !== 10 ? (p5(3, [], [2, 5]), false) : (a7(false), n3.getToken() === 6 ? (h3(":"), T3(), O4() || p5(4, [], [2, 5])) : p5(5, [], [2, 5]), l3.pop(), true); } - o3(a7, "parseProperty"); - function N2() { - g2(), k3(); - let v4 = false; + o3(Ae2, "parseProperty"); + function ye3() { + b3(), T3(); + let k3 = false; for (; n3.getToken() !== 2 && n3.getToken() !== 17; ) { if (n3.getToken() === 5) { - if (v4 || p5(4, [], []), w4(","), k3(), n3.getToken() === 2 && c3) + if (k3 || p5(4, [], []), h3(","), T3(), n3.getToken() === 2 && D3) break; } else - v4 && p5(6, [], []); - a7() || p5(4, [], [2, 5]), v4 = true; + k3 && p5(6, [], []); + Ae2() || p5(4, [], [2, 5]), k3 = true; } - return b3(), n3.getToken() !== 2 ? p5(7, [2], []) : k3(), true; + return d5(), n3.getToken() !== 2 ? p5(7, [2], []) : T3(), true; } - o3(N2, "parseObject"); - function be2() { - _4(), k3(); - let v4 = true, D3 = false; + o3(ye3, "parseObject"); + function _e3() { + j2(), T3(); + let k3 = true, F4 = false; for (; n3.getToken() !== 4 && n3.getToken() !== 17; ) { if (n3.getToken() === 5) { - if (D3 || p5(4, [], []), w4(","), k3(), n3.getToken() === 4 && c3) + if (F4 || p5(4, [], []), h3(","), T3(), n3.getToken() === 4 && D3) break; } else - D3 && p5(6, [], []); - v4 ? (l3.push(0), v4 = false) : l3[l3.length - 1]++, J3() || p5(4, [], [4, 5]), D3 = true; + F4 && p5(6, [], []); + k3 ? (l3.push(0), k3 = false) : l3[l3.length - 1]++, O4() || p5(4, [], [4, 5]), F4 = true; } - return d5(), v4 || l3.pop(), n3.getToken() !== 4 ? p5(8, [4], []) : k3(), true; + return v4(), k3 || l3.pop(), n3.getToken() !== 4 ? p5(8, [4], []) : T3(), true; } - o3(be2, "parseArray"); - function J3() { + o3(_e3, "parseArray"); + function O4() { switch (n3.getToken()) { case 3: - return be2(); + return _e3(); case 1: - return N2(); + return ye3(); case 10: - return F4(true); + return a7(true); default: - return j2(); + return S2(); } } - return o3(J3, "parseValue"), k3(), n3.getToken() === 17 ? s5.allowEmptyContent ? true : (p5(4, [], []), false) : J3() ? (n3.getToken() !== 17 && p5(9, [], []), true) : (p5(4, [], []), false); + return o3(O4, "parseValue"), T3(), n3.getToken() === 17 ? s5.allowEmptyContent ? true : (p5(4, [], []), false) : O4() ? (n3.getToken() !== 17 && p5(9, [], []), true) : (p5(4, [], []), false); } -o3(Fe, "visit"); -var ie; +o3(Ue, "visit"); +var re; (function(e5) { e5[e5.None = 0] = "None", e5[e5.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment", e5[e5.UnexpectedEndOfString = 2] = "UnexpectedEndOfString", e5[e5.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber", e5[e5.InvalidUnicode = 4] = "InvalidUnicode", e5[e5.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter", e5[e5.InvalidCharacter = 6] = "InvalidCharacter"; -})(ie || (ie = {})); -var oe; +})(re || (re = {})); +var ue; (function(e5) { e5[e5.OpenBraceToken = 1] = "OpenBraceToken", e5[e5.CloseBraceToken = 2] = "CloseBraceToken", e5[e5.OpenBracketToken = 3] = "OpenBracketToken", e5[e5.CloseBracketToken = 4] = "CloseBracketToken", e5[e5.CommaToken = 5] = "CommaToken", e5[e5.ColonToken = 6] = "ColonToken", e5[e5.NullKeyword = 7] = "NullKeyword", e5[e5.TrueKeyword = 8] = "TrueKeyword", e5[e5.FalseKeyword = 9] = "FalseKeyword", e5[e5.StringLiteral = 10] = "StringLiteral", e5[e5.NumericLiteral = 11] = "NumericLiteral", e5[e5.LineCommentTrivia = 12] = "LineCommentTrivia", e5[e5.BlockCommentTrivia = 13] = "BlockCommentTrivia", e5[e5.LineBreakTrivia = 14] = "LineBreakTrivia", e5[e5.Trivia = 15] = "Trivia", e5[e5.Unknown = 16] = "Unknown", e5[e5.EOF = 17] = "EOF"; -})(oe || (oe = {})); -var De = ye; -var ue; +})(ue || (ue = {})); +var xe = Ie; +var fe; (function(e5) { e5[e5.InvalidSymbol = 1] = "InvalidSymbol", e5[e5.InvalidNumberFormat = 2] = "InvalidNumberFormat", e5[e5.PropertyNameExpected = 3] = "PropertyNameExpected", e5[e5.ValueExpected = 4] = "ValueExpected", e5[e5.ColonExpected = 5] = "ColonExpected", e5[e5.CommaExpected = 6] = "CommaExpected", e5[e5.CloseBraceExpected = 7] = "CloseBraceExpected", e5[e5.CloseBracketExpected = 8] = "CloseBracketExpected", e5[e5.EndOfFileExpected = 9] = "EndOfFileExpected", e5[e5.InvalidCommentToken = 10] = "InvalidCommentToken", e5[e5.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", e5[e5.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", e5[e5.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", e5[e5.InvalidUnicode = 14] = "InvalidUnicode", e5[e5.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", e5[e5.InvalidCharacter = 16] = "InvalidCharacter"; -})(ue || (ue = {})); -var re = o3((e5, t3) => De(_e(t3, e5, "utf8")), "readJsonc"); -var H = Symbol("implicitBaseUrl"); +})(fe || (fe = {})); +var ce = o3((e5, t3) => xe(Le(t3, e5, "utf8")), "readJsonc"); +var X = Symbol("implicitBaseUrl"); var $ = "${configDir}"; -var Ee = o3(() => { - const { findPnpApi: e5 } = ve; +var Se = o3(() => { + const { findPnpApi: e5 } = Fe; return e5 && e5(process.cwd()); }, "getPnpApi"); -var X = o3((e5, t3, s5, n3) => { +var Y = o3((e5, t3, s5, n3) => { const l3 = `resolveFromPackageJsonPath:${e5}:${t3}:${s5}`; if (n3 != null && n3.has(l3)) return n3.get(l3); - const i6 = re(e5, n3); + const i6 = ce(e5, n3); if (!i6) return; - let u5 = t3 || "tsconfig.json"; + let r3 = t3 || "tsconfig.json"; if (!s5 && i6.exports) try { const [f6] = v(i6.exports, t3, ["require", "types"]); - u5 = f6; + r3 = f6; } catch { return false; } else - !t3 && i6.tsconfig && (u5 = i6.tsconfig); - return u5 = m3.join(e5, "..", u5), n3 == null || n3.set(l3, u5), u5; + !t3 && i6.tsconfig && (r3 = i6.tsconfig); + return r3 = m3.join(e5, "..", r3), n3 == null || n3.set(l3, r3), r3; }, "resolveFromPackageJsonPath"); -var Y = "package.json"; -var Z = "tsconfig.json"; -var Be = o3((e5, t3, s5) => { +var Z = "package.json"; +var q = "tsconfig.json"; +var Ne = o3((e5, t3, s5) => { let n3 = e5; - if (e5 === ".." && (n3 = m3.join(n3, Z)), e5[0] === "." && (n3 = m3.resolve(t3, n3)), m3.isAbsolute(n3)) { + if (e5 === ".." && (n3 = m3.join(n3, q)), e5[0] === "." && (n3 = m3.resolve(t3, n3)), m3.isAbsolute(n3)) { if (B(s5, n3)) { if (P(s5, n3).isFile()) return n3; @@ -34091,36 +34124,36 @@ var Be = o3((e5, t3, s5) => { } return; } - const [l3, ...i6] = e5.split("/"), u5 = l3[0] === "@" ? `${l3}/${i6.shift()}` : l3, f6 = i6.join("/"), r3 = Ee(); - if (r3) { - const { resolveRequest: d5 } = r3; + const [l3, ...i6] = e5.split("/"), r3 = l3[0] === "@" ? `${l3}/${i6.shift()}` : l3, f6 = i6.join("/"), u5 = Se(); + if (u5) { + const { resolveRequest: d5 } = u5; try { - if (u5 === e5) { - const A3 = d5(m3.join(u5, Y), t3); - if (A3) { - const w4 = X(A3, f6, false, s5); - if (w4 && B(s5, w4)) - return w4; + if (r3 === e5) { + const j2 = d5(m3.join(r3, Z), t3); + if (j2) { + const v4 = Y(j2, f6, false, s5); + if (v4 && B(s5, v4)) + return v4; } } else { - let A3; + let j2; try { - A3 = d5(e5, t3, { extensions: [".json"] }); + j2 = d5(e5, t3, { extensions: [".json"] }); } catch { - A3 = d5(m3.join(e5, Z), t3); + j2 = d5(m3.join(e5, q), t3); } - if (A3) - return A3; + if (j2) + return j2; } } catch { } } - const g2 = se(m3.resolve(t3), m3.join("node_modules", u5), s5); + const g2 = ie(m3.resolve(t3), m3.join("node_modules", r3), s5); if (!g2 || !P(s5, g2).isDirectory()) return; - const T3 = m3.join(g2, Y); - if (B(s5, T3)) { - const d5 = X(T3, f6, false, s5); + const w4 = m3.join(g2, Z); + if (B(s5, w4)) { + const d5 = Y(w4, f6, false, s5); if (d5 === false) return; if (d5 && B(s5, d5) && P(s5, d5).isFile()) @@ -34134,48 +34167,59 @@ var Be = o3((e5, t3, s5) => { } if (B(s5, b3)) { if (P(s5, b3).isDirectory()) { - const d5 = m3.join(b3, Y); + const d5 = m3.join(b3, Z); if (B(s5, d5)) { - const w4 = X(d5, "", true, s5); - if (w4 && B(s5, w4)) - return w4; + const v4 = Y(d5, "", true, s5); + if (v4 && B(s5, v4)) + return v4; } - const A3 = m3.join(b3, Z); - if (B(s5, A3)) - return A3; + const j2 = m3.join(b3, q); + if (B(s5, j2)) + return j2; } else if (_4) return b3; } }, "resolveExtendsPath"); -var q = o3((e5, t3) => G(m3.relative(e5, t3)), "pathRelative"); -var fe = ["files", "include", "exclude"]; -var Ie = o3((e5, t3, s5, n3) => { - const l3 = Be(e5, t3, n3); +var K = o3((e5, t3) => Q(m3.relative(e5, t3)), "pathRelative"); +var ae = ["files", "include", "exclude"]; +var ge = o3((e5, t3, s5) => { + const n3 = m3.join(t3, s5), l3 = m3.relative(e5, n3); + return E2(l3) || "./"; +}, "resolveAndRelativize"); +var Pe = o3((e5, t3, s5) => { + const n3 = m3.relative(e5, t3); + if (!n3) + return s5; + const l3 = s5.startsWith("./") ? s5.slice(2) : s5; + return E2(`${n3}/${l3}`); +}, "prefixPattern"); +var Re = o3((e5, t3, s5, n3) => { + const l3 = Ne(e5, t3, n3); if (!l3) throw new Error(`File '${e5}' not found.`); if (s5.has(l3)) throw new Error(`Circularity detected while resolving configuration: ${l3}`); s5.add(l3); - const i6 = m3.dirname(l3), u5 = ce(l3, n3, s5); - delete u5.references; - const { compilerOptions: f6 } = u5; + const i6 = m3.dirname(l3), r3 = pe(l3, n3, s5); + delete r3.references; + const { compilerOptions: f6 } = r3; if (f6) { - const { baseUrl: r3 } = f6; - r3 && !r3.startsWith($) && (f6.baseUrl = E2(m3.relative(t3, m3.join(i6, r3))) || "./"); - let { outDir: g2 } = f6; - g2 && (g2.startsWith($) || (g2 = m3.relative(t3, m3.join(i6, g2))), f6.outDir = E2(g2) || "./"); + const { baseUrl: u5 } = f6; + u5 && !u5.startsWith($) && (f6.baseUrl = ge(t3, i6, u5)); + const { outDir: g2 } = f6; + g2 && !g2.startsWith($) && (f6.outDir = ge(t3, i6, g2)); } - for (const r3 of fe) { - const g2 = u5[r3]; - g2 && (u5[r3] = g2.map((T3) => T3.startsWith($) ? T3 : E2(m3.relative(t3, m3.join(i6, T3))))); + for (const u5 of ae) { + const g2 = r3[u5]; + g2 && (r3[u5] = g2.map((w4) => w4.startsWith($) ? w4 : Pe(t3, i6, w4))); } - return u5; + return r3; }, "resolveExtends"); -var Le = ["outDir", "declarationDir"]; -var ce = o3((e5, t3, s5 = /* @__PURE__ */ new Set()) => { +var We = ["outDir", "declarationDir"]; +var pe = o3((e5, t3, s5 = /* @__PURE__ */ new Set()) => { let n3; try { - n3 = re(e5, t3) || {}; + n3 = ce(e5, t3) || {}; } catch { throw new Error(`Cannot resolve tsconfig at path: ${e5}`); } @@ -34184,34 +34228,34 @@ var ce = o3((e5, t3, s5 = /* @__PURE__ */ new Set()) => { const l3 = m3.dirname(e5); if (n3.compilerOptions) { const { compilerOptions: i6 } = n3; - i6.paths && !i6.baseUrl && (i6[H] = l3); + i6.paths && !i6.baseUrl && (i6[X] = l3); } if (n3.extends) { const i6 = Array.isArray(n3.extends) ? n3.extends : [n3.extends]; delete n3.extends; - for (const u5 of i6.reverse()) { - const f6 = Ie(u5, l3, new Set(s5), t3), r3 = { ...f6, ...n3, compilerOptions: { ...f6.compilerOptions, ...n3.compilerOptions } }; - f6.watchOptions && (r3.watchOptions = { ...f6.watchOptions, ...n3.watchOptions }), n3 = r3; + for (const r3 of i6.reverse()) { + const f6 = Re(r3, l3, new Set(s5), t3), u5 = { ...f6, ...n3, compilerOptions: { ...f6.compilerOptions, ...n3.compilerOptions } }; + f6.watchOptions && (u5.watchOptions = { ...f6.watchOptions, ...n3.watchOptions }), n3 = u5; } } if (n3.compilerOptions) { - const { compilerOptions: i6 } = n3, u5 = ["baseUrl", "rootDir"]; - for (const f6 of u5) { - const r3 = i6[f6]; - if (r3 && !r3.startsWith($)) { - const g2 = m3.resolve(l3, r3), T3 = q(l3, g2); - i6[f6] = T3; + const { compilerOptions: i6 } = n3, r3 = ["baseUrl", "rootDir"]; + for (const f6 of r3) { + const u5 = i6[f6]; + if (u5 && !u5.startsWith($)) { + const g2 = m3.resolve(l3, u5), w4 = K(l3, g2); + i6[f6] = w4; } } - for (const f6 of Le) { - let r3 = i6[f6]; - r3 && (Array.isArray(n3.exclude) || (n3.exclude = []), n3.exclude.includes(r3) || n3.exclude.push(r3), r3.startsWith($) || (r3 = G(r3)), i6[f6] = r3); + for (const f6 of We) { + let u5 = i6[f6]; + u5 && (Array.isArray(n3.exclude) || (n3.exclude = []), n3.exclude.includes(u5) || n3.exclude.push(u5), u5.startsWith($) || (u5 = Q(u5)), i6[f6] = u5); } } else n3.compilerOptions = {}; - if (n3.include ? (n3.include = n3.include.map(E2), n3.files && delete n3.files) : n3.files && (n3.files = n3.files.map((i6) => i6.startsWith($) ? i6 : G(i6))), n3.watchOptions) { + if (n3.include ? (n3.include = n3.include.map(E2), n3.files && delete n3.files) : n3.files && (n3.files = n3.files.map((i6) => i6.startsWith($) ? i6 : Q(i6))), n3.watchOptions) { const { watchOptions: i6 } = n3; - i6.excludeDirectories && (i6.excludeDirectories = i6.excludeDirectories.map((u5) => E2(m3.resolve(l3, u5)))); + i6.excludeDirectories && (i6.excludeDirectories = i6.excludeDirectories.map((r3) => E2(m3.resolve(l3, r3)))); } return n3; }, "_parseTsconfig"); @@ -34219,13 +34263,13 @@ var W = o3((e5, t3) => { if (e5.startsWith($)) return E2(m3.join(t3, e5.slice($.length))); }, "interpolateConfigDir"); -var $e = ["outDir", "declarationDir", "outFile", "rootDir", "baseUrl", "tsBuildInfoFile"]; -var Ue = o3((e5) => { - var t3, s5, n3, l3, i6, u5, f6, r3, g2, T3, b3, _4, d5, A3, w4, y3, I4, L3, c3, k3, p5, F4, j2; +var Ve = ["outDir", "declarationDir", "outFile", "rootDir", "baseUrl", "tsBuildInfoFile"]; +var Me = o3((e5) => { + var t3, s5, n3, l3, i6, r3, f6, u5, g2, w4, b3, _4, d5, j2, v4, A3, h3, L3, c3, y3, D3, T3, p5; if (e5.strict) { const a7 = ["noImplicitAny", "noImplicitThis", "strictNullChecks", "strictFunctionTypes", "strictBindCallApply", "strictPropertyInitialization", "strictBuiltinIteratorReturn", "alwaysStrict", "useUnknownInCatchVariables"]; - for (const N2 of a7) - e5[N2] === void 0 && (e5[N2] = true); + for (const S2 of a7) + e5[S2] === void 0 && (e5[S2] = true); } if (e5.target) { let a7 = e5.target.toLowerCase(); @@ -34233,176 +34277,194 @@ var Ue = o3((e5) => { } if (e5.module) { let a7 = e5.module.toLowerCase(); - a7 === "es2015" && (a7 = "es6"), e5.module = a7, (a7 === "es6" || a7 === "es2020" || a7 === "es2022" || a7 === "esnext" || a7 === "none" || a7 === "system" || a7 === "umd" || a7 === "amd") && ((i6 = e5.moduleResolution) != null || (e5.moduleResolution = "classic")), a7 === "system" && ((u5 = e5.allowSyntheticDefaultImports) != null || (e5.allowSyntheticDefaultImports = true)), (a7 === "node16" || a7 === "nodenext" || a7 === "preserve") && ((f6 = e5.esModuleInterop) != null || (e5.esModuleInterop = true), (r3 = e5.allowSyntheticDefaultImports) != null || (e5.allowSyntheticDefaultImports = true)), (a7 === "node16" || a7 === "nodenext") && ((g2 = e5.moduleDetection) != null || (e5.moduleDetection = "force"), (T3 = e5.useDefineForClassFields) != null || (e5.useDefineForClassFields = true)), a7 === "node16" && ((b3 = e5.target) != null || (e5.target = "es2022"), (_4 = e5.moduleResolution) != null || (e5.moduleResolution = "node16")), a7 === "nodenext" && ((d5 = e5.target) != null || (e5.target = "esnext"), (A3 = e5.moduleResolution) != null || (e5.moduleResolution = "nodenext")), a7 === "preserve" && ((w4 = e5.moduleResolution) != null || (e5.moduleResolution = "bundler")); + a7 === "es2015" && (a7 = "es6"), e5.module = a7, (a7 === "es6" || a7 === "es2020" || a7 === "es2022" || a7 === "esnext" || a7 === "none" || a7 === "system" || a7 === "umd" || a7 === "amd") && ((i6 = e5.moduleResolution) != null || (e5.moduleResolution = "classic")), a7 === "system" && ((r3 = e5.allowSyntheticDefaultImports) != null || (e5.allowSyntheticDefaultImports = true)), (a7 === "node16" || a7 === "nodenext" || a7 === "preserve") && ((f6 = e5.esModuleInterop) != null || (e5.esModuleInterop = true), (u5 = e5.allowSyntheticDefaultImports) != null || (e5.allowSyntheticDefaultImports = true)), (a7 === "node16" || a7 === "nodenext") && ((g2 = e5.moduleDetection) != null || (e5.moduleDetection = "force"), (w4 = e5.useDefineForClassFields) != null || (e5.useDefineForClassFields = true)), a7 === "node16" && ((b3 = e5.target) != null || (e5.target = "es2022"), (_4 = e5.moduleResolution) != null || (e5.moduleResolution = "node16")), a7 === "nodenext" && ((d5 = e5.target) != null || (e5.target = "esnext"), (j2 = e5.moduleResolution) != null || (e5.moduleResolution = "nodenext")), a7 === "preserve" && ((v4 = e5.moduleResolution) != null || (e5.moduleResolution = "bundler")); } if (e5.moduleResolution) { let a7 = e5.moduleResolution.toLowerCase(); - a7 === "node" && (a7 = "node10"), e5.moduleResolution = a7, (a7 === "node16" || a7 === "nodenext" || a7 === "bundler") && ((y3 = e5.resolvePackageJsonExports) != null || (e5.resolvePackageJsonExports = true), (I4 = e5.resolvePackageJsonImports) != null || (e5.resolvePackageJsonImports = true)), a7 === "bundler" && ((L3 = e5.allowSyntheticDefaultImports) != null || (e5.allowSyntheticDefaultImports = true), (c3 = e5.resolveJsonModule) != null || (e5.resolveJsonModule = true)); + a7 === "node" && (a7 = "node10"), e5.moduleResolution = a7, (a7 === "node16" || a7 === "nodenext" || a7 === "bundler") && ((A3 = e5.resolvePackageJsonExports) != null || (e5.resolvePackageJsonExports = true), (h3 = e5.resolvePackageJsonImports) != null || (e5.resolvePackageJsonImports = true)), a7 === "bundler" && ((L3 = e5.allowSyntheticDefaultImports) != null || (e5.allowSyntheticDefaultImports = true), (c3 = e5.resolveJsonModule) != null || (e5.resolveJsonModule = true)); } - e5.esModuleInterop && ((k3 = e5.allowSyntheticDefaultImports) != null || (e5.allowSyntheticDefaultImports = true)), e5.verbatimModuleSyntax && ((p5 = e5.isolatedModules) != null || (e5.isolatedModules = true), (F4 = e5.preserveConstEnums) != null || (e5.preserveConstEnums = true)), e5.isolatedModules && ((j2 = e5.preserveConstEnums) != null || (e5.preserveConstEnums = true)); + e5.esModuleInterop && ((y3 = e5.allowSyntheticDefaultImports) != null || (e5.allowSyntheticDefaultImports = true)), e5.verbatimModuleSyntax && ((D3 = e5.isolatedModules) != null || (e5.isolatedModules = true), (T3 = e5.preserveConstEnums) != null || (e5.preserveConstEnums = true)), e5.isolatedModules && ((p5 = e5.preserveConstEnums) != null || (e5.preserveConstEnums = true)); }, "normalizeCompilerOptions"); -var ae = o3((e5, t3 = /* @__PURE__ */ new Map()) => { - const s5 = m3.resolve(e5), n3 = ce(s5, t3), l3 = m3.dirname(s5), { compilerOptions: i6 } = n3; +var me = o3((e5, t3 = /* @__PURE__ */ new Map()) => { + const s5 = m3.resolve(e5), n3 = pe(s5, t3), l3 = m3.dirname(s5), { compilerOptions: i6 } = n3; if (i6) { - for (const f6 of $e) { - const r3 = i6[f6]; - if (r3) { - const g2 = W(r3, l3); - i6[f6] = g2 ? q(l3, g2) : r3; + for (const f6 of Ve) { + const u5 = i6[f6]; + if (u5) { + const g2 = W(u5, l3); + i6[f6] = g2 ? K(l3, g2) : u5; } } for (const f6 of ["rootDirs", "typeRoots"]) { - const r3 = i6[f6]; - r3 && (i6[f6] = r3.map((g2) => { - const T3 = W(g2, l3); - return T3 ? q(l3, T3) : g2; + const u5 = i6[f6]; + u5 && (i6[f6] = u5.map((g2) => { + const w4 = W(g2, l3); + return w4 ? K(l3, w4) : g2; })); } - const { paths: u5 } = i6; - if (u5) - for (const f6 of Object.keys(u5)) - u5[f6] = u5[f6].map((r3) => { + const { paths: r3 } = i6; + if (r3) + for (const f6 of Object.keys(r3)) + r3[f6] = r3[f6].map((u5) => { var g2; - return (g2 = W(r3, l3)) != null ? g2 : r3; + return (g2 = W(u5, l3)) != null ? g2 : u5; }); - Ue(i6); + Me(i6); } - for (const u5 of fe) { - const f6 = n3[u5]; - f6 && (n3[u5] = f6.map((r3) => { + for (const r3 of ae) { + const f6 = n3[r3]; + f6 && (n3[r3] = f6.map((u5) => { var g2; - return (g2 = W(r3, l3)) != null ? g2 : r3; + return (g2 = W(u5, l3)) != null ? g2 : u5; })); } return n3; }, "parseTsconfig"); -var he = o3((e5 = process.cwd(), t3 = "tsconfig.json", s5 = /* @__PURE__ */ new Map()) => { - const n3 = se(E2(e5), t3, s5); +var Je = o3((e5 = process.cwd(), t3 = "tsconfig.json", s5 = /* @__PURE__ */ new Map()) => { + const n3 = ie(E2(e5), t3, s5); if (!n3) return null; - const l3 = ae(n3, s5); + const l3 = me(n3, s5); return { path: n3, config: l3 }; }, "getTsconfig"); -var xe = /\*/g; -var ge = o3((e5, t3) => { - const s5 = e5.match(xe); +var Oe = /\*/g; +var ke = o3((e5, t3) => { + const s5 = e5.match(Oe); if (s5 && s5.length > 1) throw new Error(t3); }, "assertStarCount"); -var Ne = o3((e5) => { +var ze = o3((e5) => { if (e5.includes("*")) { const [t3, s5] = e5.split("*"); return { prefix: t3, suffix: s5 }; } return e5; }, "parsePattern"); -var Se = o3(({ prefix: e5, suffix: t3 }, s5) => s5.startsWith(e5) && s5.endsWith(t3), "isPatternMatch"); -var Pe = o3((e5, t3, s5) => Object.entries(e5).map(([n3, l3]) => (ge(n3, `Pattern '${n3}' can have at most one '*' character.`), { pattern: Ne(n3), substitutions: l3.map((i6) => { - if (ge(i6, `Substitution '${i6}' in pattern '${n3}' can have at most one '*' character.`), !t3 && !z.test(i6)) +var Ge = o3(({ prefix: e5, suffix: t3 }, s5) => s5.startsWith(e5) && s5.endsWith(t3), "isPatternMatch"); +var Qe = o3((e5, t3, s5) => Object.entries(e5).map(([n3, l3]) => (ke(n3, `Pattern '${n3}' can have at most one '*' character.`), { pattern: ze(n3), substitutions: l3.map((i6) => { + if (ke(i6, `Substitution '${i6}' in pattern '${n3}' can have at most one '*' character.`), !t3 && !G.test(i6)) throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"); return m3.resolve(s5, i6); }) })), "parsePaths"); -var Re = o3((e5) => { +var He = o3((e5) => { const { compilerOptions: t3 } = e5.config; if (!t3) return null; const { baseUrl: s5, paths: n3 } = t3; if (!s5 && !n3) return null; - const l3 = H in t3 && t3[H], i6 = m3.resolve(m3.dirname(e5.path), s5 || l3 || "."), u5 = n3 ? Pe(n3, s5, i6) : []; + const l3 = X in t3 && t3[X], i6 = m3.resolve(m3.dirname(e5.path), s5 || l3 || "."), r3 = n3 ? Qe(n3, s5, i6) : []; return (f6) => { - if (z.test(f6)) + if (G.test(f6)) return []; - const r3 = []; - for (const _4 of u5) { + const u5 = []; + for (const _4 of r3) { if (_4.pattern === f6) return _4.substitutions.map(E2); - typeof _4.pattern != "string" && r3.push(_4); + typeof _4.pattern != "string" && u5.push(_4); } - let g2, T3 = -1; - for (const _4 of r3) - Se(_4.pattern, f6) && _4.pattern.prefix.length > T3 && (T3 = _4.pattern.prefix.length, g2 = _4); + let g2, w4 = -1; + for (const _4 of u5) + Ge(_4.pattern, f6) && _4.pattern.prefix.length > w4 && (w4 = _4.pattern.prefix.length, g2 = _4); if (!g2) return s5 ? [E2(m3.join(i6, f6))] : []; const b3 = f6.slice(g2.pattern.prefix.length, f6.length - g2.pattern.suffix.length); return g2.substitutions.map((_4) => E2(_4.replace("*", b3))); }; }, "createPathsMatcher"); -var pe = o3((e5) => { +var Xe = Object.defineProperty; +var V = o3((e5, t3) => Xe(e5, "name", { value: t3, configurable: true }), "s"); +var we = V((e5) => { let t3 = ""; for (let s5 = 0; s5 < e5.length; s5 += 1) { const n3 = e5[s5], l3 = n3.toUpperCase(); t3 += n3 === l3 ? n3.toLowerCase() : l3; } return t3; -}, "s"); -var We = 65; -var Me = 97; -var Ve = o3(() => Math.floor(Math.random() * 26), "m"); -var Je = o3((e5) => Array.from({ length: e5 }, () => String.fromCodePoint(Ve() + (Math.random() > 0.5 ? We : Me))).join(""), "S"); -var Oe = o3((e5 = Ae) => { - const t3 = process.execPath; - if (e5.existsSync(t3)) - return !e5.existsSync(pe(t3)); - const s5 = `/${Je(10)}`; - e5.writeFileSync(s5, ""); - const n3 = !e5.existsSync(pe(s5)); - return e5.unlinkSync(s5), n3; -}, "l"); +}, "invertCase"); +var C = /* @__PURE__ */ new Map(); +var be = V((e5, t3) => { + const s5 = Be.join(e5, `.is-fs-case-sensitive-test-${process.pid}`); + try { + return t3.writeFileSync(s5, ""), !t3.existsSync(we(s5)); + } finally { + try { + t3.unlinkSync(s5); + } catch { + } + } +}, "checkDirectoryCaseWithWrite"); +var Ye = V((e5, t3, s5) => { + try { + return be(e5, s5); + } catch (n3) { + if (t3 === void 0) + return be(Ee.tmpdir(), s5); + throw n3; + } +}, "checkDirectoryCaseWithFallback"); +var Ze = V((e5, t3 = he, s5 = true) => { + const n3 = e5 != null ? e5 : process.cwd(); + if (s5 && C.has(n3)) + return C.get(n3); + let l3; + const i6 = we(n3); + return i6 !== n3 && t3.existsSync(n3) ? l3 = !t3.existsSync(i6) : l3 = Ye(n3, e5, t3), s5 && C.set(n3, l3), l3; +}, "isFsCaseSensitive"); var { join: M } = m3.posix; -var K = { ts: [".ts", ".tsx", ".d.ts"], cts: [".cts", ".d.cts"], mts: [".mts", ".d.mts"] }; -var ze = o3((e5) => { - const t3 = [...K.ts], s5 = [...K.cts], n3 = [...K.mts]; +var ee = { ts: [".ts", ".tsx", ".d.ts"], cts: [".cts", ".d.cts"], mts: [".mts", ".d.mts"] }; +var qe = o3((e5) => { + const t3 = [...ee.ts], s5 = [...ee.cts], n3 = [...ee.mts]; return e5 != null && e5.allowJs && (t3.push(".js", ".jsx"), s5.push(".cjs"), n3.push(".mjs")), [...t3, ...s5, ...n3]; }, "getSupportedExtensions"); -var Ge = o3((e5) => { +var Ke = o3((e5) => { const t3 = []; if (!e5) return t3; const { outDir: s5, declarationDir: n3 } = e5; return s5 && t3.push(s5), n3 && t3.push(n3), t3; }, "getDefaultExcludeSpec"); -var me = o3((e5) => e5.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`), "escapeForRegexp"); -var Qe = ["node_modules", "bower_components", "jspm_packages"]; -var C = `(?!(${Qe.join("|")})(/|$))`; -var He = /(?:^|\/)[^.*?]+$/; -var ke = "**/*"; -var V = "[^/]"; -var ee = "[^./]"; -var we = process.platform === "win32"; -var Xe = o3(({ config: e5, path: t3 }, s5 = Oe()) => { +var de = o3((e5) => e5.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`), "escapeForRegexp"); +var Ce = ["node_modules", "bower_components", "jspm_packages"]; +var ne = `(?!(${Ce.join("|")})(/|$))`; +var en = /(?:^|\/)[^.*?]+$/; +var ve = "**/*"; +var J = "[^/]"; +var te = "[^./]"; +var Te = process.platform === "win32"; +var nn = o3(({ config: e5, path: t3 }, s5 = Ze()) => { if ("extends" in e5) throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it."); if (!m3.isAbsolute(t3)) throw new Error("The tsconfig path must be absolute"); - we && (t3 = E2(t3)); - const n3 = m3.dirname(t3), { files: l3, include: i6, exclude: u5, compilerOptions: f6 } = e5, r3 = l3 == null ? void 0 : l3.map((w4) => M(n3, w4)), g2 = ze(f6), T3 = s5 ? "" : "i", _4 = (u5 || Ge(f6)).map((w4) => { - const y3 = M(n3, w4), I4 = me(y3).replaceAll(String.raw`\*\*/`, "(.+/)?").replaceAll(String.raw`\*`, `${V}*`).replaceAll(String.raw`\?`, V); - return new RegExp(`^${I4}($|/)`, T3); - }), d5 = l3 || i6 ? i6 : [ke], A3 = d5 ? d5.map((w4) => { - let y3 = M(n3, w4); - He.test(y3) && (y3 = M(y3, ke)); - const I4 = me(y3).replaceAll(String.raw`/\*\*`, `(/${C}${ee}${V}*)*?`).replaceAll(/(\/)?\\\*/g, (L3, c3) => { - const k3 = `(${ee}|(\\.(?!min\\.js$))?)*`; - return c3 ? `/${C}${ee}${k3}` : k3; + Te && (t3 = E2(t3)); + const n3 = m3.dirname(t3), { files: l3, include: i6, exclude: r3, compilerOptions: f6 } = e5, u5 = l3 == null ? void 0 : l3.map((v4) => M(n3, v4)), g2 = qe(f6), w4 = s5 ? "" : "i", _4 = (r3 || Ke(f6)).map((v4) => { + const A3 = M(n3, v4), h3 = de(A3).replaceAll(String.raw`\*\*/`, "(.+/)?").replaceAll(String.raw`\*`, `${J}*`).replaceAll(String.raw`\?`, J); + return new RegExp(`^${h3}($|/)`, w4); + }), d5 = l3 || i6 ? i6 : [ve], j2 = d5 ? d5.map((v4) => { + let A3 = M(n3, v4); + en.test(A3) && (A3 = M(A3, ve)); + const h3 = de(A3).replaceAll(String.raw`/\*\*`, `(/${ne}${te}${J}*)*?`).replaceAll(/(\/)?\\\*/g, (L3, c3) => { + const y3 = `(${te}|(\\.(?!min\\.js$))?)*`; + return c3 ? `/${ne}${te}${y3}` : y3; }).replaceAll(/(\/)?\\\?/g, (L3, c3) => { - const k3 = V; - return c3 ? `/${C}${k3}` : k3; + const y3 = J; + return c3 ? `/${ne}${y3}` : y3; }); - return new RegExp(`^${I4}$`, T3); + return new RegExp(`^${h3}$`, w4); }) : void 0; - return (w4) => { - if (!m3.isAbsolute(w4)) + return (v4) => { + if (!m3.isAbsolute(v4)) throw new Error("filePath must be absolute"); - if (we && (w4 = E2(w4)), r3 != null && r3.includes(w4)) + if (Te && (v4 = E2(v4)), u5 != null && u5.includes(v4)) return e5; - if (!(!g2.some((y3) => w4.endsWith(y3)) || _4.some((y3) => y3.test(w4))) && A3 && A3.some((y3) => y3.test(w4))) + if (!(!g2.some((A3) => v4.endsWith(A3)) || _4.some((A3) => A3.test(v4))) && j2 && j2.some((A3) => A3.test(v4))) return e5; }; }, "createFilesMatcher"); // -import se3, { writeSync as te2 } from "node:fs"; +import se2, { writeSync as te2 } from "node:fs"; // var import_esbuild = __toESM(require_main(), 1); @@ -34469,14 +34531,14 @@ function je2(s5, e5, n3) { } f2(je2, "hasMoreVlq"); function Vt(s5) { - s5.sort(en); + s5.sort(en2); } f2(Vt, "sort"); -function en(s5, e5) { +function en2(s5, e5) { return s5[0] - e5[0]; } -f2(en, "sortComparator$1"); -function De2(s5) { +f2(en2, "sortComparator$1"); +function De(s5) { const e5 = new Int32Array(5), n3 = 1024 * 16, i6 = n3 - 36, o8 = new Uint8Array(n3), c3 = o8.subarray(0, i6); let u5 = 0, p5 = ""; for (let g2 = 0; g2 < s5.length; g2++) { @@ -34491,7 +34553,7 @@ function De2(s5) { } return p5 + me2.decode(o8.subarray(0, u5)); } -f2(De2, "encode"); +f2(De, "encode"); function Y3(s5, e5, n3, i6, o8) { const c3 = i6[o8]; let u5 = c3 - n3[o8]; @@ -34597,19 +34659,19 @@ function tn() { }; } f2(tn, "getBtoa"); -var nn = tn(); +var nn2 = tn(); var rn = class { static { f2(this, "SourceMap"); } constructor(e5) { - this.version = 3, this.file = e5.file, this.sources = e5.sources, this.sourcesContent = e5.sourcesContent, this.names = e5.names, this.mappings = De2(e5.mappings), typeof e5.x_google_ignoreList < "u" && (this.x_google_ignoreList = e5.x_google_ignoreList); + this.version = 3, this.file = e5.file, this.sources = e5.sources, this.sourcesContent = e5.sourcesContent, this.names = e5.names, this.mappings = De(e5.mappings), typeof e5.x_google_ignoreList < "u" && (this.x_google_ignoreList = e5.x_google_ignoreList); } toString() { return JSON.stringify(this); } toUrl() { - return "data:application/json;charset=utf-8;base64," + nn(this.toString()); + return "data:application/json;charset=utf-8;base64," + nn2(this.toString()); } }; function sn(s5) { @@ -34643,7 +34705,7 @@ function cn(s5) { return an.call(s5) === "[object Object]"; } f2(cn, "isObject"); -function Te(s5) { +function Te2(s5) { const e5 = s5.split(` `), n3 = []; for (let i6 = 0, o8 = 0; i6 < e5.length; i6++) @@ -34658,7 +34720,7 @@ function Te(s5) { return { line: p5, column: g2 }; }, "locate"); } -f2(Te, "getLocator"); +f2(Te2, "getLocator"); var un = /\w/; var ln = class { static { @@ -34710,8 +34772,8 @@ var ln = class { }; var Q3 = ` `; -var J = { insertLeft: false, insertRight: false, storeName: false }; -var _e2 = class __e2 { +var J2 = { insertLeft: false, insertRight: false, storeName: false }; +var _e = class __e2 { static { f2(this, "MagicString"); } @@ -34753,7 +34815,7 @@ var _e2 = class __e2 { } generateDecodedMap(e5) { e5 = e5 || {}; - const n3 = 0, i6 = Object.keys(this.storedNames), o8 = new ln(e5.hires), c3 = Te(this.original); + const n3 = 0, i6 = Object.keys(this.storedNames), o8 = new ln(e5.hires), c3 = Te2(this.original); return this.intro && o8.advance(this.intro), this.firstChunk.eachNext((u5) => { const p5 = c3(u5.start); u5.intro.length && o8.advance(u5.intro), u5.edited ? o8.addEdit(n3, u5.content, p5, u5.storeName ? i6.indexOf(u5.original) : -1) : o8.addUneditedChunk(n3, u5, this.original, p5, this.sourcemapLocations), u5.outro.length && o8.advance(u5.outro); @@ -34807,10 +34869,10 @@ var _e2 = class __e2 { throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)"); } insertLeft(e5, n3) { - return J.insertLeft || (console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"), J.insertLeft = true), this.appendLeft(e5, n3); + return J2.insertLeft || (console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"), J2.insertLeft = true), this.appendLeft(e5, n3); } insertRight(e5, n3) { - return J.insertRight || (console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"), J.insertRight = true), this.prependRight(e5, n3); + return J2.insertRight || (console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"), J2.insertRight = true), this.prependRight(e5, n3); } move(e5, n3, i6) { if (i6 >= e5 && i6 <= n3) @@ -34836,7 +34898,7 @@ var _e2 = class __e2 { throw new Error("end is out of bounds"); if (e5 === n3) throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead"); - this._split(e5), this._split(n3), o8 === true && (J.storeName || (console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"), J.storeName = true), o8 = { storeName: true }); + this._split(e5), this._split(n3), o8 === true && (J2.storeName || (console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"), J2.storeName = true), o8 = { storeName: true }); const c3 = o8 !== void 0 ? o8.storeName : false, u5 = o8 !== void 0 ? o8.overwrite : false; if (c3) { const b3 = this.original.slice(e5, n3); @@ -34991,7 +35053,7 @@ var _e2 = class __e2 { } _splitChunk(e5, n3) { if (e5.edited && e5.content.length) { - const o8 = Te(this.original)(n3); + const o8 = Te2(this.original)(n3); throw new Error(`Cannot split a chunk that has already been edited (${o8.line}:${o8.column} \u2013 "${e5.original}")`); } const i6 = e5.split(n3); @@ -35138,17 +35200,17 @@ function fn(s5, e5 = "@") { re2 = new ArrayBuffer(Z2), Fe2(hn, new Uint16Array(re2, 16, 110)), v2 = function(u5, p5, g2) { var b3 = new u5.Int8Array(g2), d5 = new u5.Int16Array(g2), r3 = new u5.Int32Array(g2), R6 = new u5.Uint8Array(g2), L3 = new u5.Uint16Array(g2), E6 = 1040; function N2() { - var t3 = 0, a7 = 0, h4 = 0, l3 = 0, w4 = 0, m8 = 0, C4 = 0; + var t3 = 0, a7 = 0, h3 = 0, l3 = 0, w4 = 0, m8 = 0, C4 = 0; C4 = E6, E6 = E6 + 10240 | 0, b3[804] = 1, b3[803] = 0, d5[399] = 0, d5[400] = 0, r3[69] = r3[2], b3[805] = 0, r3[68] = 0, b3[802] = 0, r3[70] = C4 + 2048, r3[71] = C4, b3[806] = 0, t3 = (r3[3] | 0) + -2 | 0, r3[72] = t3, a7 = t3 + (r3[66] << 1) | 0, r3[73] = a7; e: for (; ; ) { - if (h4 = t3 + 2 | 0, r3[72] = h4, t3 >>> 0 >= a7 >>> 0) { + if (h3 = t3 + 2 | 0, r3[72] = h3, t3 >>> 0 >= a7 >>> 0) { l3 = 18; break; } t: do - switch (d5[h4 >> 1] | 0) { + switch (d5[h3 >> 1] | 0) { case 9: case 10: case 11: @@ -35157,7 +35219,7 @@ function fn(s5, e5 = "@") { case 32: break; case 101: { - if (!(d5[400] | 0) && z3(h4) | 0 && !(A3(t3 + 4 | 0, 16, 10) | 0) && ($3(), (b3[804] | 0) == 0)) { + if (!(d5[400] | 0) && z3(h3) | 0 && !(A3(t3 + 4 | 0, 16, 10) | 0) && ($3(), (b3[804] | 0) == 0)) { l3 = 9; break e; } else @@ -35165,7 +35227,7 @@ function fn(s5, e5 = "@") { break; } case 105: { - z3(h4) | 0 && !(A3(t3 + 4 | 0, 26, 10) | 0) && W2(), l3 = 17; + z3(h3) | 0 && !(A3(t3 + 4 | 0, 26, 10) | 0) && W2(), l3 = 17; break; } case 59: { @@ -35195,7 +35257,7 @@ function fn(s5, e5 = "@") { while (false); (l3 | 0) == 17 && (l3 = 0, r3[69] = r3[72]), t3 = r3[72] | 0, a7 = r3[73] | 0; } - (l3 | 0) == 9 ? (t3 = r3[72] | 0, r3[69] = t3, l3 = 19) : (l3 | 0) == 16 ? (b3[804] = 0, r3[72] = t3, l3 = 19) : (l3 | 0) == 18 && (b3[802] | 0 ? t3 = 0 : (t3 = h4, l3 = 19)); + (l3 | 0) == 9 ? (t3 = r3[72] | 0, r3[69] = t3, l3 = 19) : (l3 | 0) == 16 ? (b3[804] = 0, r3[72] = t3, l3 = 19) : (l3 | 0) == 18 && (b3[802] | 0 ? t3 = 0 : (t3 = h3, l3 = 19)); do if ((l3 | 0) == 19) { e: @@ -35227,7 +35289,7 @@ function fn(s5, e5 = "@") { break; } case 40: { - h4 = r3[70] | 0, t3 = d5[400] | 0, l3 = t3 & 65535, r3[h4 + (l3 << 3) >> 2] = 1, a7 = r3[69] | 0, d5[400] = t3 + 1 << 16 >> 16, r3[h4 + (l3 << 3) + 4 >> 2] = a7, l3 = 91; + h3 = r3[70] | 0, t3 = d5[400] | 0, l3 = t3 & 65535, r3[h3 + (l3 << 3) >> 2] = 1, a7 = r3[69] | 0, d5[400] = t3 + 1 << 16 >> 16, r3[h3 + (l3 << 3) + 4 >> 2] = a7, l3 = 91; break; } case 41: { @@ -35235,13 +35297,13 @@ function fn(s5, e5 = "@") { l3 = 36; break e; } - h4 = a7 + -1 << 16 >> 16, d5[400] = h4, l3 = d5[399] | 0, a7 = l3 & 65535, l3 << 16 >> 16 && (r3[(r3[70] | 0) + ((h4 & 65535) << 3) >> 2] | 0) == 5 && (a7 = r3[(r3[71] | 0) + (a7 + -1 << 2) >> 2] | 0, h4 = a7 + 4 | 0, r3[h4 >> 2] | 0 || (r3[h4 >> 2] = (r3[69] | 0) + 2), r3[a7 + 12 >> 2] = t3 + 4, d5[399] = l3 + -1 << 16 >> 16), l3 = 91; + h3 = a7 + -1 << 16 >> 16, d5[400] = h3, l3 = d5[399] | 0, a7 = l3 & 65535, l3 << 16 >> 16 && (r3[(r3[70] | 0) + ((h3 & 65535) << 3) >> 2] | 0) == 5 && (a7 = r3[(r3[71] | 0) + (a7 + -1 << 2) >> 2] | 0, h3 = a7 + 4 | 0, r3[h3 >> 2] | 0 || (r3[h3 >> 2] = (r3[69] | 0) + 2), r3[a7 + 12 >> 2] = t3 + 4, d5[399] = l3 + -1 << 16 >> 16), l3 = 91; break; } case 123: { - l3 = r3[69] | 0, h4 = r3[63] | 0, t3 = l3; + l3 = r3[69] | 0, h3 = r3[63] | 0, t3 = l3; do - if ((d5[l3 >> 1] | 0) == 41 & (h4 | 0) != 0 && (r3[h4 + 4 >> 2] | 0) == (l3 | 0)) + if ((d5[l3 >> 1] | 0) == 41 & (h3 | 0) != 0 && (r3[h3 + 4 >> 2] | 0) == (l3 | 0)) if (a7 = r3[64] | 0, r3[63] = a7, a7) { r3[a7 + 32 >> 2] = 0; break; @@ -35250,7 +35312,7 @@ function fn(s5, e5 = "@") { break; } while (false); - h4 = r3[70] | 0, a7 = d5[400] | 0, l3 = a7 & 65535, r3[h4 + (l3 << 3) >> 2] = b3[806] | 0 ? 6 : 2, d5[400] = a7 + 1 << 16 >> 16, r3[h4 + (l3 << 3) + 4 >> 2] = t3, b3[806] = 0, l3 = 91; + h3 = r3[70] | 0, a7 = d5[400] | 0, l3 = a7 & 65535, r3[h3 + (l3 << 3) >> 2] = b3[806] | 0 ? 6 : 2, d5[400] = a7 + 1 << 16 >> 16, r3[h3 + (l3 << 3) + 4 >> 2] = t3, b3[806] = 0, l3 = 91; break; } case 125: { @@ -35258,15 +35320,15 @@ function fn(s5, e5 = "@") { l3 = 49; break e; } - h4 = r3[70] | 0, l3 = t3 + -1 << 16 >> 16, d5[400] = l3, (r3[h4 + ((l3 & 65535) << 3) >> 2] | 0) == 4 && Ee3(), l3 = 91; + h3 = r3[70] | 0, l3 = t3 + -1 << 16 >> 16, d5[400] = l3, (r3[h3 + ((l3 & 65535) << 3) >> 2] | 0) == 4 && Ee3(), l3 = 91; break; } case 39: { - I4(39), l3 = 91; + I5(39), l3 = 91; break; } case 34: { - I4(34), l3 = 91; + I5(34), l3 = 91; break; } case 47: @@ -35284,7 +35346,7 @@ function fn(s5, e5 = "@") { n: do if (!(kt(a7) | 0)) - a7 << 16 >> 16 == 41 ? (h4 = d5[400] | 0, xt(r3[(r3[70] | 0) + ((h4 & 65535) << 3) + 4 >> 2] | 0) | 0 || (l3 = 65)) : l3 = 64; + a7 << 16 >> 16 == 41 ? (h3 = d5[400] | 0, xt(r3[(r3[70] | 0) + ((h3 & 65535) << 3) + 4 >> 2] | 0) | 0 || (l3 = 65)) : l3 = 64; else switch (a7 << 16 >> 16) { case 46: @@ -35309,16 +35371,16 @@ function fn(s5, e5 = "@") { break n; } while (false); - (l3 | 0) == 64 && (h4 = d5[400] | 0, l3 = 65); + (l3 | 0) == 64 && (h3 = d5[400] | 0, l3 = 65); n: do if ((l3 | 0) == 65) { - if (l3 = 0, h4 << 16 >> 16 && (w4 = r3[70] | 0, m8 = (h4 & 65535) + -1 | 0, a7 << 16 >> 16 == 102 ? (r3[w4 + (m8 << 3) >> 2] | 0) == 1 : 0)) { - if ((d5[t3 + -2 >> 1] | 0) == 111 && O5(r3[w4 + (m8 << 3) + 4 >> 2] | 0, 44, 3) | 0) + if (l3 = 0, h3 << 16 >> 16 && (w4 = r3[70] | 0, m8 = (h3 & 65535) + -1 | 0, a7 << 16 >> 16 == 102 ? (r3[w4 + (m8 << 3) >> 2] | 0) == 1 : 0)) { + if ((d5[t3 + -2 >> 1] | 0) == 111 && O4(r3[w4 + (m8 << 3) + 4 >> 2] | 0, 44, 3) | 0) break; } else l3 = 69; - if ((l3 | 0) == 69 && a7 << 16 >> 16 == 125 && (l3 = r3[70] | 0, h4 = h4 & 65535, mt(r3[l3 + (h4 << 3) + 4 >> 2] | 0) | 0 || (r3[l3 + (h4 << 3) >> 2] | 0) == 6)) + if ((l3 | 0) == 69 && a7 << 16 >> 16 == 125 && (l3 = r3[70] | 0, h3 = h3 & 65535, mt(r3[l3 + (h3 << 3) + 4 >> 2] | 0) | 0 || (r3[l3 + (h3 << 3) >> 2] | 0) == 6)) break; if (!(pt(t3) | 0)) { switch (a7 << 16 >> 16) { @@ -35335,18 +35397,18 @@ function fn(s5, e5 = "@") { ue2(), b3[805] = 0, l3 = 91; break t; } - h4 = r3[3] | 0; + h3 = r3[3] | 0; do { - if (t3 >>> 0 <= h4 >>> 0) + if (t3 >>> 0 <= h3 >>> 0) break; t3 = t3 + -2 | 0, r3[69] = t3, a7 = d5[t3 >> 1] | 0; } while (!(he2(a7) | 0)); - if (ne(a7) | 0) { + if (ne2(a7) | 0) { do { - if (t3 >>> 0 <= h4 >>> 0) + if (t3 >>> 0 <= h3 >>> 0) break; t3 = t3 + -2 | 0, r3[69] = t3; - } while (ne(d5[t3 >> 1] | 0) | 0); + } while (ne2(d5[t3 >> 1] | 0) | 0); if (Ct(t3) | 0) { ue2(), b3[805] = 0, l3 = 91; break t; @@ -35362,7 +35424,7 @@ function fn(s5, e5 = "@") { } } case 96: { - h4 = r3[70] | 0, a7 = d5[400] | 0, l3 = a7 & 65535, r3[h4 + (l3 << 3) + 4 >> 2] = r3[69], d5[400] = a7 + 1 << 16 >> 16, r3[h4 + (l3 << 3) >> 2] = 3, Ee3(), l3 = 91; + h3 = r3[70] | 0, a7 = d5[400] | 0, l3 = a7 & 65535, r3[h3 + (l3 << 3) + 4 >> 2] = r3[69], d5[400] = a7 + 1 << 16 >> 16, r3[h3 + (l3 << 3) >> 2] = 3, Ee3(), l3 = 91; break; } default: @@ -35387,17 +35449,17 @@ function fn(s5, e5 = "@") { } f2(N2, "b"); function $3() { - var t3 = 0, a7 = 0, h4 = 0, l3 = 0, w4 = 0, m8 = 0, C4 = 0, T3 = 0, ge3 = 0, be2 = 0, pe3 = 0, we3 = 0, S2 = 0, x2 = 0; - T3 = r3[72] | 0, ge3 = r3[65] | 0, x2 = T3 + 12 | 0, r3[72] = x2, h4 = k3(1) | 0, t3 = r3[72] | 0, (t3 | 0) == (x2 | 0) && !(te3(h4) | 0) || (S2 = 3); + var t3 = 0, a7 = 0, h3 = 0, l3 = 0, w4 = 0, m8 = 0, C4 = 0, T3 = 0, ge3 = 0, be3 = 0, pe3 = 0, we3 = 0, S2 = 0, x2 = 0; + T3 = r3[72] | 0, ge3 = r3[65] | 0, x2 = T3 + 12 | 0, r3[72] = x2, h3 = k3(1) | 0, t3 = r3[72] | 0, (t3 | 0) == (x2 | 0) && !(te3(h3) | 0) || (S2 = 3); e: do if ((S2 | 0) == 3) { t: do - switch (h4 << 16 >> 16) { + switch (h3 << 16 >> 16) { case 123: { for (r3[72] = t3 + 2, t3 = k3(1) | 0, a7 = r3[72] | 0; ; ) { - if (H3(t3) | 0 ? (I4(t3), t3 = (r3[72] | 0) + 2 | 0, r3[72] = t3) : (j2(t3) | 0, t3 = r3[72] | 0), k3(1) | 0, t3 = Le2(a7, t3) | 0, t3 << 16 >> 16 == 44 && (r3[72] = (r3[72] | 0) + 2, t3 = k3(1) | 0), t3 << 16 >> 16 == 125) { + if (H3(t3) | 0 ? (I5(t3), t3 = (r3[72] | 0) + 2 | 0, r3[72] = t3) : (j2(t3) | 0, t3 = r3[72] | 0), k3(1) | 0, t3 = Le2(a7, t3) | 0, t3 << 16 >> 16 == 44 && (r3[72] = (r3[72] | 0) + 2, t3 = k3(1) | 0), t3 << 16 >> 16 == 125) { S2 = 15; break; } @@ -35427,11 +35489,11 @@ function fn(s5, e5 = "@") { break; } default: { - switch (b3[804] = 0, h4 << 16 >> 16) { + switch (b3[804] = 0, h3 << 16 >> 16) { case 100: { switch (T3 = t3 + 14 | 0, r3[72] = T3, (k3(1) | 0) << 16 >> 16) { case 97: { - a7 = r3[72] | 0, !(A3(a7 + 2 | 0, 72, 8) | 0) && (w4 = a7 + 10 | 0, ne(d5[w4 >> 1] | 0) | 0) && (r3[72] = w4, k3(0) | 0, S2 = 22); + a7 = r3[72] | 0, !(A3(a7 + 2 | 0, 72, 8) | 0) && (w4 = a7 + 10 | 0, ne2(d5[w4 >> 1] | 0) | 0) && (r3[72] = w4, k3(0) | 0, S2 = 22); break; } case 102: { @@ -35447,7 +35509,7 @@ function fn(s5, e5 = "@") { n: do if ((S2 | 0) == 22 && (C4 = r3[72] | 0, (A3(C4 + 2 | 0, 80, 14) | 0) == 0)) { - if (h4 = C4 + 16 | 0, a7 = d5[h4 >> 1] | 0, !(P3(a7) | 0)) + if (h3 = C4 + 16 | 0, a7 = d5[h3 >> 1] | 0, !(P3(a7) | 0)) switch (a7 << 16 >> 16) { case 40: case 42: @@ -35455,11 +35517,11 @@ function fn(s5, e5 = "@") { default: break n; } - r3[72] = h4, a7 = k3(1) | 0, a7 << 16 >> 16 == 42 && (r3[72] = (r3[72] | 0) + 2, a7 = k3(1) | 0), a7 << 16 >> 16 != 40 && (we3 = a7, S2 = 31); + r3[72] = h3, a7 = k3(1) | 0, a7 << 16 >> 16 == 42 && (r3[72] = (r3[72] | 0) + 2, a7 = k3(1) | 0), a7 << 16 >> 16 != 40 && (we3 = a7, S2 = 31); } while (false); - if ((S2 | 0) == 31 && (be2 = r3[72] | 0, j2(we3) | 0, pe3 = r3[72] | 0, pe3 >>> 0 > be2 >>> 0)) { - B3(t3, T3, be2, pe3), r3[72] = (r3[72] | 0) + -2; + if ((S2 | 0) == 31 && (be3 = r3[72] | 0, j2(we3) | 0, pe3 = r3[72] | 0, pe3 >>> 0 > be3 >>> 0)) { + B3(t3, T3, be3, pe3), r3[72] = (r3[72] | 0) + -2; break e; } B3(t3, T3, 0, 0), r3[72] = t3 + 12; @@ -35491,10 +35553,10 @@ function fn(s5, e5 = "@") { r3[72] = t3 + 16, t3 = k3(1) | 0, t3 << 16 >> 16 == 42 && (r3[72] = (r3[72] | 0) + 2, t3 = k3(1) | 0), S2 = r3[72] | 0, j2(t3) | 0, x2 = r3[72] | 0, B3(S2, x2, S2, x2), r3[72] = (r3[72] | 0) + -2; break e; } - r3[72] = t3 + 6, b3[804] = 0, h4 = k3(1) | 0, t3 = r3[72] | 0, h4 = (j2(h4) | 0 | 32) << 16 >> 16 == 123, l3 = r3[72] | 0, h4 && (r3[72] = l3 + 2, x2 = k3(1) | 0, t3 = r3[72] | 0, j2(x2) | 0); + r3[72] = t3 + 6, b3[804] = 0, h3 = k3(1) | 0, t3 = r3[72] | 0, h3 = (j2(h3) | 0 | 32) << 16 >> 16 == 123, l3 = r3[72] | 0, h3 && (r3[72] = l3 + 2, x2 = k3(1) | 0, t3 = r3[72] | 0, j2(x2) | 0); n: for (; a7 = r3[72] | 0, (a7 | 0) != (t3 | 0); ) { - if (B3(t3, a7, t3, a7), a7 = k3(1) | 0, h4) + if (B3(t3, a7, t3, a7), a7 = k3(1) | 0, h3) switch (a7 << 16 >> 16) { case 93: case 125: @@ -35515,7 +35577,7 @@ function fn(s5, e5 = "@") { } j2(a7) | 0; } - if ((S2 | 0) == 51 && (r3[72] = t3 + -2), !h4) + if ((S2 | 0) == 51 && (r3[72] = t3 + -2), !h3) break e; r3[72] = l3 + -2; break e; @@ -35534,12 +35596,12 @@ function fn(s5, e5 = "@") { } f2($3, "k"); function W2() { - var t3 = 0, a7 = 0, h4 = 0, l3 = 0, w4 = 0, m8 = 0, C4 = 0; - w4 = r3[72] | 0, h4 = w4 + 12 | 0, r3[72] = h4, l3 = k3(1) | 0, a7 = r3[72] | 0; + var t3 = 0, a7 = 0, h3 = 0, l3 = 0, w4 = 0, m8 = 0, C4 = 0; + w4 = r3[72] | 0, h3 = w4 + 12 | 0, r3[72] = h3, l3 = k3(1) | 0, a7 = r3[72] | 0; e: do if (l3 << 16 >> 16 != 46) - l3 << 16 >> 16 == 115 & a7 >>> 0 > h4 >>> 0 ? !(A3(a7 + 2 | 0, 56, 10) | 0) && (t3 = a7 + 12 | 0, P3(d5[t3 >> 1] | 0) | 0) ? m8 = 14 : (a7 = 6, h4 = 0, m8 = 46) : (t3 = l3, h4 = 0, m8 = 15); + l3 << 16 >> 16 == 115 & a7 >>> 0 > h3 >>> 0 ? !(A3(a7 + 2 | 0, 56, 10) | 0) && (t3 = a7 + 12 | 0, P3(d5[t3 >> 1] | 0) | 0) ? m8 = 14 : (a7 = 6, h3 = 0, m8 = 46) : (t3 = l3, h3 = 0, m8 = 15); else switch (r3[72] = a7 + 2, (k3(1) | 0) << 16 >> 16) { case 109: { @@ -35558,7 +35620,7 @@ function fn(s5, e5 = "@") { break e; } while (false); - (m8 | 0) == 14 && (r3[72] = t3, t3 = k3(1) | 0, h4 = 1, m8 = 15); + (m8 | 0) == 14 && (r3[72] = t3, t3 = k3(1) | 0, h3 = 1, m8 = 15); e: do if ((m8 | 0) == 15) @@ -35566,13 +35628,13 @@ function fn(s5, e5 = "@") { case 40: { if (a7 = r3[70] | 0, C4 = d5[400] | 0, l3 = C4 & 65535, r3[a7 + (l3 << 3) >> 2] = 5, t3 = r3[72] | 0, d5[400] = C4 + 1 << 16 >> 16, r3[a7 + (l3 << 3) + 4 >> 2] = t3, (d5[r3[69] >> 1] | 0) == 46) break e; - switch (r3[72] = t3 + 2, a7 = k3(1) | 0, ce2(w4, r3[72] | 0, 0, t3), h4 ? (t3 = r3[63] | 0, r3[t3 + 28 >> 2] = 5) : t3 = r3[63] | 0, w4 = r3[71] | 0, C4 = d5[399] | 0, d5[399] = C4 + 1 << 16 >> 16, r3[w4 + ((C4 & 65535) << 2) >> 2] = t3, a7 << 16 >> 16) { + switch (r3[72] = t3 + 2, a7 = k3(1) | 0, ce2(w4, r3[72] | 0, 0, t3), h3 ? (t3 = r3[63] | 0, r3[t3 + 28 >> 2] = 5) : t3 = r3[63] | 0, w4 = r3[71] | 0, C4 = d5[399] | 0, d5[399] = C4 + 1 << 16 >> 16, r3[w4 + ((C4 & 65535) << 2) >> 2] = t3, a7 << 16 >> 16) { case 39: { - I4(39); + I5(39); break; } case 34: { - I4(34); + I5(34); break; } default: { @@ -35596,8 +35658,8 @@ function fn(s5, e5 = "@") { } } case 123: { - if (h4) { - a7 = 12, h4 = 1, m8 = 46; + if (h3) { + a7 = 12, h3 = 1, m8 = 46; break e; } if (t3 = r3[72] | 0, d5[400] | 0) { @@ -35606,7 +35668,7 @@ function fn(s5, e5 = "@") { } for (; !(t3 >>> 0 >= (r3[73] | 0) >>> 0); ) { if (t3 = k3(1) | 0, H3(t3) | 0) - I4(t3); + I5(t3); else if (t3 << 16 >> 16 == 125) { m8 = 36; break; @@ -35626,19 +35688,19 @@ function fn(s5, e5 = "@") { } } default: { - if (h4) { - a7 = 12, h4 = 1, m8 = 46; + if (h3) { + a7 = 12, h3 = 1, m8 = 46; break e; } switch (t3 << 16 >> 16) { case 42: case 39: case 34: { - h4 = 0, m8 = 48; + h3 = 0, m8 = 48; break e; } default: { - a7 = 6, h4 = 0, m8 = 46; + a7 = 6, h3 = 0, m8 = 46; break e; } } @@ -35664,7 +35726,7 @@ function fn(s5, e5 = "@") { C4 = a7 + 2 | 0, r3[72] = C4, a7 = C4; } if ((m8 | 0) == 53) { - G4(w4, l3, h4); + G4(w4, l3, h3); break; } else if ((m8 | 0) == 55) { M3(); @@ -35674,16 +35736,16 @@ function fn(s5, e5 = "@") { while (false); } f2(W2, "l"); - function G4(t3, a7, h4) { - t3 = t3 | 0, a7 = a7 | 0, h4 = h4 | 0; + function G4(t3, a7, h3) { + t3 = t3 | 0, a7 = a7 | 0, h3 = h3 | 0; var l3 = 0, w4 = 0; switch (l3 = (r3[72] | 0) + 2 | 0, a7 << 16 >> 16) { case 39: { - I4(39), w4 = 5; + I5(39), w4 = 5; break; } case 34: { - I4(34), w4 = 5; + I5(34), w4 = 5; break; } default: @@ -35691,24 +35753,24 @@ function fn(s5, e5 = "@") { } do if ((w4 | 0) == 5) { - if (ce2(t3, l3, r3[72] | 0, 1), h4 && (r3[(r3[63] | 0) + 28 >> 2] = 4), r3[72] = (r3[72] | 0) + 2, a7 = k3(0) | 0, h4 = a7 << 16 >> 16 == 97, h4 ? (l3 = r3[72] | 0, A3(l3 + 2 | 0, 94, 10) | 0 && (w4 = 13)) : (l3 = r3[72] | 0, a7 << 16 >> 16 == 119 && (d5[l3 + 2 >> 1] | 0) == 105 && (d5[l3 + 4 >> 1] | 0) == 116 && (d5[l3 + 6 >> 1] | 0) == 104 || (w4 = 13)), (w4 | 0) == 13) { + if (ce2(t3, l3, r3[72] | 0, 1), h3 && (r3[(r3[63] | 0) + 28 >> 2] = 4), r3[72] = (r3[72] | 0) + 2, a7 = k3(0) | 0, h3 = a7 << 16 >> 16 == 97, h3 ? (l3 = r3[72] | 0, A3(l3 + 2 | 0, 94, 10) | 0 && (w4 = 13)) : (l3 = r3[72] | 0, a7 << 16 >> 16 == 119 && (d5[l3 + 2 >> 1] | 0) == 105 && (d5[l3 + 4 >> 1] | 0) == 116 && (d5[l3 + 6 >> 1] | 0) == 104 || (w4 = 13)), (w4 | 0) == 13) { r3[72] = l3 + -2; break; } - if (r3[72] = l3 + ((h4 ? 6 : 4) << 1), (k3(1) | 0) << 16 >> 16 != 123) { + if (r3[72] = l3 + ((h3 ? 6 : 4) << 1), (k3(1) | 0) << 16 >> 16 != 123) { r3[72] = l3; break; } - h4 = r3[72] | 0, a7 = h4; + h3 = r3[72] | 0, a7 = h3; e: for (; ; ) { switch (r3[72] = a7 + 2, a7 = k3(1) | 0, a7 << 16 >> 16) { case 39: { - I4(39), r3[72] = (r3[72] | 0) + 2, a7 = k3(1) | 0; + I5(39), r3[72] = (r3[72] | 0) + 2, a7 = k3(1) | 0; break; } case 34: { - I4(34), r3[72] = (r3[72] | 0) + 2, a7 = k3(1) | 0; + I5(34), r3[72] = (r3[72] | 0) + 2, a7 = k3(1) | 0; break; } default: @@ -35720,11 +35782,11 @@ function fn(s5, e5 = "@") { } switch (r3[72] = (r3[72] | 0) + 2, (k3(1) | 0) << 16 >> 16) { case 39: { - I4(39); + I5(39); break; } case 34: { - I4(34); + I5(34); break; } default: { @@ -35760,7 +35822,7 @@ function fn(s5, e5 = "@") { r3[72] = l3; break; } else if ((w4 | 0) == 31) { - w4 = r3[63] | 0, r3[w4 + 16 >> 2] = h4, r3[w4 + 12 >> 2] = (r3[72] | 0) + 2; + w4 = r3[63] | 0, r3[w4 + 16 >> 2] = h3, r3[w4 + 12 >> 2] = (r3[72] | 0) + 2; break; } } @@ -35775,11 +35837,11 @@ function fn(s5, e5 = "@") { case 100: switch (d5[t3 + -2 >> 1] | 0) { case 105: { - t3 = O5(t3 + -4 | 0, 104, 2) | 0; + t3 = O4(t3 + -4 | 0, 104, 2) | 0; break e; } case 108: { - t3 = O5(t3 + -4 | 0, 108, 3) | 0; + t3 = O4(t3 + -4 | 0, 108, 3) | 0; break e; } default: { @@ -35805,11 +35867,11 @@ function fn(s5, e5 = "@") { } } case 116: { - t3 = O5(t3 + -4 | 0, 114, 4) | 0; + t3 = O4(t3 + -4 | 0, 114, 4) | 0; break e; } case 117: { - t3 = O5(t3 + -4 | 0, 122, 6) | 0; + t3 = O4(t3 + -4 | 0, 122, 6) | 0; break e; } default: { @@ -35821,11 +35883,11 @@ function fn(s5, e5 = "@") { if ((d5[t3 + -2 >> 1] | 0) == 111 && (d5[t3 + -4 >> 1] | 0) == 101) switch (d5[t3 + -6 >> 1] | 0) { case 99: { - t3 = O5(t3 + -8 | 0, 134, 6) | 0; + t3 = O4(t3 + -8 | 0, 134, 6) | 0; break e; } case 112: { - t3 = O5(t3 + -8 | 0, 146, 2) | 0; + t3 = O4(t3 + -8 | 0, 146, 2) | 0; break e; } default: { @@ -35838,11 +35900,11 @@ function fn(s5, e5 = "@") { break; } case 107: { - t3 = O5(t3 + -2 | 0, 150, 4) | 0; + t3 = O4(t3 + -2 | 0, 150, 4) | 0; break; } case 110: { - t3 = t3 + -2 | 0, q2(t3, 105) | 0 ? t3 = 1 : t3 = O5(t3, 158, 5) | 0; + t3 = t3 + -2 | 0, q2(t3, 105) | 0 ? t3 = 1 : t3 = O4(t3, 158, 5) | 0; break; } case 111: { @@ -35850,11 +35912,11 @@ function fn(s5, e5 = "@") { break; } case 114: { - t3 = O5(t3 + -2 | 0, 168, 7) | 0; + t3 = O4(t3 + -2 | 0, 168, 7) | 0; break; } case 116: { - t3 = O5(t3 + -2 | 0, 182, 4) | 0; + t3 = O4(t3 + -2 | 0, 182, 4) | 0; break; } case 119: @@ -35864,7 +35926,7 @@ function fn(s5, e5 = "@") { break e; } case 111: { - t3 = O5(t3 + -4 | 0, 190, 3) | 0; + t3 = O4(t3 + -4 | 0, 190, 3) | 0; break e; } default: { @@ -35880,11 +35942,11 @@ function fn(s5, e5 = "@") { } f2(pt, "o"); function Ee3() { - var t3 = 0, a7 = 0, h4 = 0, l3 = 0; - a7 = r3[73] | 0, h4 = r3[72] | 0; + var t3 = 0, a7 = 0, h3 = 0, l3 = 0; + a7 = r3[73] | 0, h3 = r3[72] | 0; e: for (; ; ) { - if (t3 = h4 + 2 | 0, h4 >>> 0 >= a7 >>> 0) { + if (t3 = h3 + 2 | 0, h3 >>> 0 >= a7 >>> 0) { a7 = 10; break; } @@ -35894,30 +35956,30 @@ function fn(s5, e5 = "@") { break e; } case 36: { - if ((d5[h4 + 4 >> 1] | 0) == 123) { + if ((d5[h3 + 4 >> 1] | 0) == 123) { a7 = 6; break e; } break; } case 92: { - t3 = h4 + 4 | 0; + t3 = h3 + 4 | 0; break; } default: } - h4 = t3; + h3 = t3; } - (a7 | 0) == 6 ? (t3 = h4 + 4 | 0, r3[72] = t3, a7 = r3[70] | 0, l3 = d5[400] | 0, h4 = l3 & 65535, r3[a7 + (h4 << 3) >> 2] = 4, d5[400] = l3 + 1 << 16 >> 16, r3[a7 + (h4 << 3) + 4 >> 2] = t3) : (a7 | 0) == 7 ? (r3[72] = t3, h4 = r3[70] | 0, l3 = (d5[400] | 0) + -1 << 16 >> 16, d5[400] = l3, (r3[h4 + ((l3 & 65535) << 3) >> 2] | 0) != 3 && M3()) : (a7 | 0) == 10 && (r3[72] = t3, M3()); + (a7 | 0) == 6 ? (t3 = h3 + 4 | 0, r3[72] = t3, a7 = r3[70] | 0, l3 = d5[400] | 0, h3 = l3 & 65535, r3[a7 + (h3 << 3) >> 2] = 4, d5[400] = l3 + 1 << 16 >> 16, r3[a7 + (h3 << 3) + 4 >> 2] = t3) : (a7 | 0) == 7 ? (r3[72] = t3, h3 = r3[70] | 0, l3 = (d5[400] | 0) + -1 << 16 >> 16, d5[400] = l3, (r3[h3 + ((l3 & 65535) << 3) >> 2] | 0) != 3 && M3()) : (a7 | 0) == 10 && (r3[72] = t3, M3()); } f2(Ee3, "h"); function k3(t3) { t3 = t3 | 0; - var a7 = 0, h4 = 0, l3 = 0; - h4 = r3[72] | 0; + var a7 = 0, h3 = 0, l3 = 0; + h3 = r3[72] | 0; e: do { - a7 = d5[h4 >> 1] | 0; + a7 = d5[h3 >> 1] | 0; t: do if (a7 << 16 >> 16 != 47) @@ -35926,12 +35988,12 @@ function fn(s5, e5 = "@") { break; break e; } else { - if (ne(a7) | 0) + if (ne2(a7) | 0) break; break e; } else - switch (d5[h4 + 2 >> 1] | 0) { + switch (d5[h3 + 2 >> 1] | 0) { case 47: { fe2(); break t; @@ -35946,32 +36008,32 @@ function fn(s5, e5 = "@") { } } while (false); - l3 = r3[72] | 0, h4 = l3 + 2 | 0, r3[72] = h4; + l3 = r3[72] | 0, h3 = l3 + 2 | 0, r3[72] = h3; } while (l3 >>> 0 < (r3[73] | 0) >>> 0); return a7 | 0; } f2(k3, "w"); - function ce2(t3, a7, h4, l3) { - t3 = t3 | 0, a7 = a7 | 0, h4 = h4 | 0, l3 = l3 | 0; + function ce2(t3, a7, h3, l3) { + t3 = t3 | 0, a7 = a7 | 0, h3 = h3 | 0, l3 = l3 | 0; var w4 = 0, m8 = 0; - m8 = r3[67] | 0, r3[67] = m8 + 36, w4 = r3[63] | 0, r3[(w4 | 0 ? w4 + 32 | 0 : 236) >> 2] = m8, r3[64] = w4, r3[63] = m8, r3[m8 + 8 >> 2] = t3, (l3 | 0) == 2 ? (t3 = 3, w4 = h4) : (w4 = (l3 | 0) == 1, t3 = w4 ? 1 : 2, w4 = w4 ? h4 + 2 | 0 : 0), r3[m8 + 12 >> 2] = w4, r3[m8 + 28 >> 2] = t3, r3[m8 >> 2] = a7, r3[m8 + 4 >> 2] = h4, r3[m8 + 16 >> 2] = 0, r3[m8 + 20 >> 2] = l3, a7 = (l3 | 0) == 1, b3[m8 + 24 >> 0] = a7 & 1, r3[m8 + 32 >> 2] = 0, a7 | (l3 | 0) == 2 && (b3[803] = 1); + m8 = r3[67] | 0, r3[67] = m8 + 36, w4 = r3[63] | 0, r3[(w4 | 0 ? w4 + 32 | 0 : 236) >> 2] = m8, r3[64] = w4, r3[63] = m8, r3[m8 + 8 >> 2] = t3, (l3 | 0) == 2 ? (t3 = 3, w4 = h3) : (w4 = (l3 | 0) == 1, t3 = w4 ? 1 : 2, w4 = w4 ? h3 + 2 | 0 : 0), r3[m8 + 12 >> 2] = w4, r3[m8 + 28 >> 2] = t3, r3[m8 >> 2] = a7, r3[m8 + 4 >> 2] = h3, r3[m8 + 16 >> 2] = 0, r3[m8 + 20 >> 2] = l3, a7 = (l3 | 0) == 1, b3[m8 + 24 >> 0] = a7 & 1, r3[m8 + 32 >> 2] = 0, a7 | (l3 | 0) == 2 && (b3[803] = 1); } f2(ce2, "d"); - function I4(t3) { + function I5(t3) { t3 = t3 | 0; - var a7 = 0, h4 = 0, l3 = 0, w4 = 0; + var a7 = 0, h3 = 0, l3 = 0, w4 = 0; for (w4 = r3[73] | 0, a7 = r3[72] | 0; ; ) { if (l3 = a7 + 2 | 0, a7 >>> 0 >= w4 >>> 0) { a7 = 9; break; } - if (h4 = d5[l3 >> 1] | 0, h4 << 16 >> 16 == t3 << 16 >> 16) { + if (h3 = d5[l3 >> 1] | 0, h3 << 16 >> 16 == t3 << 16 >> 16) { a7 = 10; break; } - if (h4 << 16 >> 16 == 92) - h4 = a7 + 4 | 0, (d5[h4 >> 1] | 0) == 13 ? (a7 = a7 + 6 | 0, a7 = (d5[a7 >> 1] | 0) == 10 ? a7 : h4) : a7 = h4; - else if (Re2(h4) | 0) { + if (h3 << 16 >> 16 == 92) + h3 = a7 + 4 | 0, (d5[h3 >> 1] | 0) == 13 ? (a7 = a7 + 6 | 0, a7 = (d5[a7 >> 1] | 0) == 10 ? a7 : h3) : a7 = h3; + else if (Re2(h3) | 0) { a7 = 9; break; } else @@ -35979,19 +36041,19 @@ function fn(s5, e5 = "@") { } (a7 | 0) == 9 ? (r3[72] = l3, M3()) : (a7 | 0) == 10 && (r3[72] = l3); } - f2(I4, "v"); + f2(I5, "v"); function Le2(t3, a7) { t3 = t3 | 0, a7 = a7 | 0; - var h4 = 0, l3 = 0, w4 = 0, m8 = 0; - return h4 = r3[72] | 0, l3 = d5[h4 >> 1] | 0, m8 = (t3 | 0) == (a7 | 0), w4 = m8 ? 0 : t3, m8 = m8 ? 0 : a7, l3 << 16 >> 16 == 97 && (r3[72] = h4 + 4, h4 = k3(1) | 0, t3 = r3[72] | 0, H3(h4) | 0 ? (I4(h4), a7 = (r3[72] | 0) + 2 | 0, r3[72] = a7) : (j2(h4) | 0, a7 = r3[72] | 0), l3 = k3(1) | 0, h4 = r3[72] | 0), (h4 | 0) != (t3 | 0) && B3(t3, a7, w4, m8), l3 | 0; + var h3 = 0, l3 = 0, w4 = 0, m8 = 0; + return h3 = r3[72] | 0, l3 = d5[h3 >> 1] | 0, m8 = (t3 | 0) == (a7 | 0), w4 = m8 ? 0 : t3, m8 = m8 ? 0 : a7, l3 << 16 >> 16 == 97 && (r3[72] = h3 + 4, h3 = k3(1) | 0, t3 = r3[72] | 0, H3(h3) | 0 ? (I5(h3), a7 = (r3[72] | 0) + 2 | 0, r3[72] = a7) : (j2(h3) | 0, a7 = r3[72] | 0), l3 = k3(1) | 0, h3 = r3[72] | 0), (h3 | 0) != (t3 | 0) && B3(t3, a7, w4, m8), l3 | 0; } f2(Le2, "A"); function wt() { - var t3 = 0, a7 = 0, h4 = 0; - h4 = r3[73] | 0, a7 = r3[72] | 0; + var t3 = 0, a7 = 0, h3 = 0; + h3 = r3[73] | 0, a7 = r3[72] | 0; e: for (; ; ) { - if (t3 = a7 + 2 | 0, a7 >>> 0 >= h4 >>> 0) { + if (t3 = a7 + 2 | 0, a7 >>> 0 >= h3 >>> 0) { a7 = 6; break; } @@ -36017,17 +36079,17 @@ function fn(s5, e5 = "@") { } f2(wt, "C"); function ue2() { - var t3 = 0, a7 = 0, h4 = 0; + var t3 = 0, a7 = 0, h3 = 0; e: for (; ; ) { if (t3 = r3[72] | 0, a7 = t3 + 2 | 0, r3[72] = a7, t3 >>> 0 >= (r3[73] | 0) >>> 0) { - h4 = 7; + h3 = 7; break; } switch (d5[a7 >> 1] | 0) { case 13: case 10: { - h4 = 7; + h3 = 7; break e; } case 47: @@ -36043,7 +36105,7 @@ function fn(s5, e5 = "@") { default: } } - (h4 | 0) == 7 && M3(); + (h3 | 0) == 7 && M3(); } f2(ue2, "g"); function mt(t3) { @@ -36058,15 +36120,15 @@ function fn(s5, e5 = "@") { break; } case 104: { - t3 = O5(t3 + -2 | 0, 210, 4) | 0; + t3 = O4(t3 + -2 | 0, 210, 4) | 0; break; } case 121: { - t3 = O5(t3 + -2 | 0, 218, 6) | 0; + t3 = O4(t3 + -2 | 0, 218, 6) | 0; break; } case 101: { - t3 = O5(t3 + -2 | 0, 230, 3) | 0; + t3 = O4(t3 + -2 | 0, 230, 3) | 0; break; } default: @@ -36077,8 +36139,8 @@ function fn(s5, e5 = "@") { f2(mt, "p"); function le2(t3) { t3 = t3 | 0; - var a7 = 0, h4 = 0, l3 = 0, w4 = 0, m8 = 0; - for (w4 = (r3[72] | 0) + 2 | 0, r3[72] = w4, h4 = r3[73] | 0; a7 = w4 + 2 | 0, !(w4 >>> 0 >= h4 >>> 0 || (l3 = d5[a7 >> 1] | 0, !t3 && Re2(l3) | 0)); ) { + var a7 = 0, h3 = 0, l3 = 0, w4 = 0, m8 = 0; + for (w4 = (r3[72] | 0) + 2 | 0, r3[72] = w4, h3 = r3[73] | 0; a7 = w4 + 2 | 0, !(w4 >>> 0 >= h3 >>> 0 || (l3 = d5[a7 >> 1] | 0, !t3 && Re2(l3) | 0)); ) { if (l3 << 16 >> 16 == 42 && (d5[w4 + 4 >> 1] | 0) == 47) { m8 = 8; break; @@ -36088,16 +36150,16 @@ function fn(s5, e5 = "@") { (m8 | 0) == 8 && (r3[72] = a7, a7 = w4 + 4 | 0), r3[72] = a7; } f2(le2, "y"); - function A3(t3, a7, h4) { - t3 = t3 | 0, a7 = a7 | 0, h4 = h4 | 0; + function A3(t3, a7, h3) { + t3 = t3 | 0, a7 = a7 | 0, h3 = h3 | 0; var l3 = 0, w4 = 0; e: do - if (!h4) + if (!h3) t3 = 0; else { for (; l3 = b3[t3 >> 0] | 0, w4 = b3[a7 >> 0] | 0, l3 << 24 >> 24 == w4 << 24 >> 24; ) - if (h4 = h4 + -1 | 0, h4) + if (h3 = h3 + -1 | 0, h3) t3 = t3 + 1 | 0, a7 = a7 + 1 | 0; else { t3 = 0; @@ -36190,30 +36252,30 @@ function fn(s5, e5 = "@") { f2(Oe2, "x"); function yt(t3) { t3 = t3 | 0; - var a7 = 0, h4 = 0, l3 = 0, w4 = 0; - return h4 = E6, E6 = E6 + 16 | 0, l3 = h4, r3[l3 >> 2] = 0, r3[66] = t3, a7 = r3[3] | 0, w4 = a7 + (t3 << 1) | 0, t3 = w4 + 2 | 0, d5[w4 >> 1] = 0, r3[l3 >> 2] = t3, r3[67] = t3, r3[59] = 0, r3[63] = 0, r3[61] = 0, r3[60] = 0, r3[65] = 0, r3[62] = 0, E6 = h4, a7 | 0; + var a7 = 0, h3 = 0, l3 = 0, w4 = 0; + return h3 = E6, E6 = E6 + 16 | 0, l3 = h3, r3[l3 >> 2] = 0, r3[66] = t3, a7 = r3[3] | 0, w4 = a7 + (t3 << 1) | 0, t3 = w4 + 2 | 0, d5[w4 >> 1] = 0, r3[l3 >> 2] = t3, r3[67] = t3, r3[59] = 0, r3[63] = 0, r3[61] = 0, r3[60] = 0, r3[65] = 0, r3[62] = 0, E6 = h3, a7 | 0; } f2(yt, "S"); - function B3(t3, a7, h4, l3) { - t3 = t3 | 0, a7 = a7 | 0, h4 = h4 | 0, l3 = l3 | 0; + function B3(t3, a7, h3, l3) { + t3 = t3 | 0, a7 = a7 | 0, h3 = h3 | 0, l3 = l3 | 0; var w4 = 0, m8 = 0; - w4 = r3[67] | 0, r3[67] = w4 + 20, m8 = r3[65] | 0, r3[(m8 | 0 ? m8 + 16 | 0 : 240) >> 2] = w4, r3[65] = w4, r3[w4 >> 2] = t3, r3[w4 + 4 >> 2] = a7, r3[w4 + 8 >> 2] = h4, r3[w4 + 12 >> 2] = l3, r3[w4 + 16 >> 2] = 0, b3[803] = 1; + w4 = r3[67] | 0, r3[67] = w4 + 20, m8 = r3[65] | 0, r3[(m8 | 0 ? m8 + 16 | 0 : 240) >> 2] = w4, r3[65] = w4, r3[w4 >> 2] = t3, r3[w4 + 4 >> 2] = a7, r3[w4 + 8 >> 2] = h3, r3[w4 + 12 >> 2] = l3, r3[w4 + 16 >> 2] = 0, b3[803] = 1; } f2(B3, "O"); - function O5(t3, a7, h4) { - t3 = t3 | 0, a7 = a7 | 0, h4 = h4 | 0; + function O4(t3, a7, h3) { + t3 = t3 | 0, a7 = a7 | 0, h3 = h3 | 0; var l3 = 0, w4 = 0; - return l3 = t3 + (0 - h4 << 1) | 0, w4 = l3 + 2 | 0, t3 = r3[3] | 0, w4 >>> 0 >= t3 >>> 0 && !(A3(w4, a7, h4 << 1) | 0) ? (w4 | 0) == (t3 | 0) ? t3 = 1 : t3 = Oe2(l3) | 0 : t3 = 0, t3 | 0; + return l3 = t3 + (0 - h3 << 1) | 0, w4 = l3 + 2 | 0, t3 = r3[3] | 0, w4 >>> 0 >= t3 >>> 0 && !(A3(w4, a7, h3 << 1) | 0) ? (w4 | 0) == (t3 | 0) ? t3 = 1 : t3 = Oe2(l3) | 0 : t3 = 0, t3 | 0; } - f2(O5, "$"); + f2(O4, "$"); function Ct(t3) { switch (t3 = t3 | 0, d5[t3 >> 1] | 0) { case 107: { - t3 = O5(t3 + -2 | 0, 150, 4) | 0; + t3 = O4(t3 + -2 | 0, 150, 4) | 0; break; } case 101: { - (d5[t3 + -2 >> 1] | 0) == 117 ? t3 = O5(t3 + -4 | 0, 122, 6) | 0 : t3 = 0; + (d5[t3 + -2 >> 1] | 0) == 117 ? t3 = O4(t3 + -4 | 0, 122, 6) | 0 : t3 = 0; break; } default: @@ -36224,8 +36286,8 @@ function fn(s5, e5 = "@") { f2(Ct, "j"); function q2(t3, a7) { t3 = t3 | 0, a7 = a7 | 0; - var h4 = 0; - return h4 = r3[3] | 0, h4 >>> 0 <= t3 >>> 0 && (d5[t3 >> 1] | 0) == a7 << 16 >> 16 ? (h4 | 0) == (t3 | 0) ? h4 = 1 : h4 = he2(d5[t3 + -2 >> 1] | 0) | 0 : h4 = 0, h4 | 0; + var h3 = 0; + return h3 = r3[3] | 0, h3 >>> 0 <= t3 >>> 0 && (d5[t3 >> 1] | 0) == a7 << 16 >> 16 ? (h3 | 0) == (t3 | 0) ? h3 = 1 : h3 = he2(d5[t3 + -2 >> 1] | 0) | 0 : h3 = 0, h3 | 0; } f2(q2, "B"); function he2(t3) { @@ -36250,16 +36312,16 @@ function fn(s5, e5 = "@") { } f2(he2, "E"); function fe2() { - var t3 = 0, a7 = 0, h4 = 0; - t3 = r3[73] | 0, h4 = r3[72] | 0; + var t3 = 0, a7 = 0, h3 = 0; + t3 = r3[73] | 0, h3 = r3[72] | 0; e: - for (; a7 = h4 + 2 | 0, !(h4 >>> 0 >= t3 >>> 0); ) + for (; a7 = h3 + 2 | 0, !(h3 >>> 0 >= t3 >>> 0); ) switch (d5[a7 >> 1] | 0) { case 13: case 10: break e; default: - h4 = a7; + h3 = a7; } r3[72] = a7; } @@ -36291,10 +36353,10 @@ function fn(s5, e5 = "@") { } f2(St, "z"); function xt(t3) { - return t3 = t3 | 0, !(O5(t3, 196, 5) | 0) && !(O5(t3, 44, 3) | 0) ? t3 = O5(t3, 206, 2) | 0 : t3 = 1, t3 | 0; + return t3 = t3 | 0, !(O4(t3, 196, 5) | 0) && !(O4(t3, 44, 3) | 0) ? t3 = O4(t3, 206, 2) | 0 : t3 = 1, t3 | 0; } f2(xt, "D"); - function ne(t3) { + function ne2(t3) { switch (t3 = t3 | 0, t3 << 16 >> 16) { case 160: case 32: @@ -36309,7 +36371,7 @@ function fn(s5, e5 = "@") { } return t3 | 0; } - f2(ne, "F"); + f2(ne2, "F"); function de3(t3) { return t3 = t3 | 0, (d5[t3 >> 1] | 0) == 46 && (d5[t3 + -2 >> 1] | 0) == 46 ? t3 = (d5[t3 + -4 >> 1] | 0) == 46 : t3 = 0, t3 | 0; } @@ -36421,16 +36483,16 @@ function fn(s5, e5 = "@") { for (; v2.ri(); ) { const u5 = v2.is(), p5 = v2.ie(), g2 = v2.ai(), b3 = v2.id(), d5 = v2.ss(), r3 = v2.se(), R6 = v2.it(); let L3; - v2.ip() && (L3 = ye2(b3 === -1 ? u5 : u5 + 1, _2.charCodeAt(b3 === -1 ? u5 - 1 : u5))), o8.push({ t: R6, n: L3, s: u5, e: p5, ss: d5, se: r3, d: b3, a: g2 }); + v2.ip() && (L3 = ye(b3 === -1 ? u5 : u5 + 1, _2.charCodeAt(b3 === -1 ? u5 - 1 : u5))), o8.push({ t: R6, n: L3, s: u5, e: p5, ss: d5, se: r3, d: b3, a: g2 }); } for (; v2.re(); ) { const u5 = v2.es(), p5 = v2.ee(), g2 = v2.els(), b3 = v2.ele(), d5 = _2.charCodeAt(u5), r3 = g2 >= 0 ? _2.charCodeAt(g2) : -1; - c3.push({ s: u5, e: p5, ls: g2, le: b3, n: d5 === 34 || d5 === 39 ? ye2(u5 + 1, d5) : _2.slice(u5, p5), ln: g2 < 0 ? void 0 : r3 === 34 || r3 === 39 ? ye2(g2 + 1, r3) : _2.slice(g2, b3) }); + c3.push({ s: u5, e: p5, ls: g2, le: b3, n: d5 === 34 || d5 === 39 ? ye(u5 + 1, d5) : _2.slice(u5, p5), ln: g2 < 0 ? void 0 : r3 === 34 || r3 === 39 ? ye(g2 + 1, r3) : _2.slice(g2, b3) }); } return [o8, c3, !!v2.f(), !!v2.ms()]; } f2(fn, "parse"); -function ye2(s5, e5) { +function ye(s5, e5) { y = s5; let n3 = "", i6 = y; for (; ; ) { @@ -36442,7 +36504,7 @@ function ye2(s5, e5) { } return n3 += _2.slice(i6, y++), n3; } -f2(ye2, "b"); +f2(ye, "b"); function dn() { let s5 = _2.charCodeAt(++y); switch (++y, s5) { @@ -36452,12 +36514,12 @@ function dn() { case 114: return "\r"; case 120: - return String.fromCharCode(Ce(2)); + return String.fromCharCode(Ce2(2)); case 117: return function() { const e5 = _2.charCodeAt(y); let n3; - return e5 === 123 ? (++y, n3 = Ce(_2.indexOf("}", y) - y), ++y, n3 > 1114111 && D()) : n3 = Ce(4), n3 <= 65535 ? String.fromCharCode(n3) : (n3 -= 65536, String.fromCharCode(55296 + (n3 >> 10), 56320 + (1023 & n3))); + return e5 === 123 ? (++y, n3 = Ce2(_2.indexOf("}", y) - y), ++y, n3 > 1114111 && D()) : n3 = Ce2(4), n3 <= 65535 ? String.fromCharCode(n3) : (n3 -= 65536, String.fromCharCode(55296 + (n3 >> 10), 56320 + (1023 & n3))); }(); case 116: return " "; @@ -36483,7 +36545,7 @@ function dn() { } } f2(dn, "k"); -function Ce(s5) { +function Ce2(s5) { const e5 = y; let n3 = 0, i6 = 0; for (let o8 = 0; o8 < s5; ++o8, ++y) { @@ -36506,7 +36568,7 @@ function Ce(s5) { } return i6 !== 95 && y - e5 === s5 || D(), n3; } -f2(Ce, "l"); +f2(Ce2, "l"); function Be2(s5) { return s5 === 13 || s5 === 10; } @@ -36547,7 +36609,7 @@ var xe2 = f2((s5, e5, n3) => { const o8 = Pe2(e5, s5)[0].filter((g2) => g2.d > -1); if (o8.length === 0) return; - const c3 = new _e2(e5); + const c3 = new _e(e5); for (const g2 of o8) c3.appendRight(g2.se, pn); const u5 = c3.toString(), p5 = c3.generateMap({ source: s5, includeContent: false, hires: "boundary" }); @@ -36560,7 +36622,7 @@ var Ge2 = f2((s5) => { } catch { } }, "readJsonFile"); -var qe = f2(() => { +var qe2 = f2(() => { }, "noop"); var ze2 = f2(() => Math.floor(Date.now() / 1e8), "getTime"); var wn = class extends Map { @@ -36599,14 +36661,14 @@ var wn = class extends Map { set(e5, n3) { if (super.set(e5, n3), n3) { const i6 = ze2(); - U2.promises.writeFile(X2.join(this.cacheDirectory, `${i6}-${e5}`), JSON.stringify(n3)).catch(qe); + U2.promises.writeFile(X2.join(this.cacheDirectory, `${i6}-${e5}`), JSON.stringify(n3)).catch(qe2); } return this; } expireDiskCache() { const e5 = ze2(); for (const n3 of this.cacheFiles) - e5 - n3.time > 7 && U2.promises.unlink(X2.join(this.cacheDirectory, n3.fileName)).catch(qe); + e5 - n3.time > 7 && U2.promises.unlink(X2.join(this.cacheDirectory, n3.fileName)).catch(qe2); } async removeOldCacheDirectory() { try { @@ -36639,37 +36701,37 @@ function Xe2(s5) { return /^[.?#]/.test(s5); } f2(Xe2, "isRelative"); -function se2(s5) { +function se(s5) { const e5 = kn.exec(s5); - return Ke(e5[1], e5[2] || "", e5[3], e5[4] || "", e5[5] || "/", e5[6] || "", e5[7] || ""); + return Ke2(e5[1], e5[2] || "", e5[3], e5[4] || "", e5[5] || "/", e5[6] || "", e5[7] || ""); } -f2(se2, "parseAbsoluteUrl"); +f2(se, "parseAbsoluteUrl"); function vn(s5) { const e5 = yn.exec(s5), n3 = e5[2]; - return Ke("file:", "", e5[1] || "", "", He2(n3) ? n3 : "/" + n3, e5[3] || "", e5[4] || ""); + return Ke2("file:", "", e5[1] || "", "", He2(n3) ? n3 : "/" + n3, e5[3] || "", e5[4] || ""); } f2(vn, "parseFileUrl"); -function Ke(s5, e5, n3, i6, o8, c3, u5) { +function Ke2(s5, e5, n3, i6, o8, c3, u5) { return { scheme: s5, user: e5, host: n3, port: i6, path: o8, query: c3, hash: u5, type: 7 }; } -f2(Ke, "makeUrl"); -function Ye(s5) { +f2(Ke2, "makeUrl"); +function Ye2(s5) { if (Sn(s5)) { - const n3 = se2("http:" + s5); + const n3 = se("http:" + s5); return n3.scheme = "", n3.type = 6, n3; } if (He2(s5)) { - const n3 = se2("http://foo.com" + s5); + const n3 = se("http://foo.com" + s5); return n3.scheme = "", n3.host = "", n3.type = 5, n3; } if (xn(s5)) return vn(s5); if (Cn(s5)) - return se2(s5); - const e5 = se2("http://foo.com/" + s5); + return se(s5); + const e5 = se("http://foo.com/" + s5); return e5.scheme = "", e5.host = "", e5.type = s5 ? s5.startsWith("?") ? 3 : s5.startsWith("#") ? 2 : 4 : 1, e5; } -f2(Ye, "parseUrl"); +f2(Ye2, "parseUrl"); function _n(s5) { if (s5.endsWith("/..")) return s5; @@ -36707,10 +36769,10 @@ f2(Qe2, "normalizePath"); function Ln(s5, e5) { if (!s5 && !e5) return ""; - const n3 = Ye(s5); + const n3 = Ye2(s5); let i6 = n3.type; if (e5 && i6 !== 7) { - const c3 = Ye(e5), u5 = c3.type; + const c3 = Ye2(e5), u5 = c3.type; switch (i6) { case 1: n3.hash = c3.hash; @@ -36743,10 +36805,10 @@ function Ln(s5, e5) { } } f2(Ln, "resolve$1"); -function Ze(s5, e5) { +function Ze2(s5, e5) { return e5 && !e5.endsWith("/") && (e5 += "/"), Ln(s5, e5); } -f2(Ze, "resolve"); +f2(Ze2, "resolve"); function On(s5) { if (!s5) return ""; @@ -36829,8 +36891,8 @@ var et = class { return e5; const o8 = i6 ? JSON.parse(e5) : e5, { version: c3, file: u5, names: p5, sourceRoot: g2, sources: b3, sourcesContent: d5 } = o8; this.version = c3, this.file = u5, this.names = p5 || [], this.sourceRoot = g2, this.sources = b3, this.sourcesContent = d5, this.ignoreList = o8.ignoreList || o8.x_google_ignoreList || void 0; - const r3 = Ze(g2 || "", On(n3)); - this.resolvedSources = b3.map((L3) => Ze(L3 || "", r3)); + const r3 = Ze2(g2 || "", On(n3)); + this.resolvedSources = b3.map((L3) => Ze2(L3 || "", r3)); const { mappings: R6 } = o8; typeof R6 == "string" ? (this._encoded = R6, this._decoded = void 0) : (this._encoded = void 0, this._decoded = Rn(R6, i6)), this._decodedMemo = Un(), this._bySources = void 0, this._bySourceMemos = void 0; } @@ -36929,7 +36991,7 @@ function it(s5) { f2(it, "toDecodedMap"); function Kn(s5) { const e5 = it(s5); - return Object.assign(Object.assign({}, e5), { mappings: De2(e5.mappings) }); + return Object.assign(Object.assign({}, e5), { mappings: De(e5.mappings) }); } f2(Kn, "toEncodedMap"); function Yn(s5, e5, n3, i6, o8, c3, u5, p5, g2) { @@ -37182,10 +37244,10 @@ function e3(s5, n3, r3 = 1) { g(e3, "kolorist"); var b = e3(30, 39); var d2 = e3(33, 39); -var O3 = e3(90, 39); +var O2 = e3(90, 39); var C2 = e3(92, 39); var R4 = e3(95, 39); -var I2 = e3(96, 39); +var I3 = e3(96, 39); var L2 = e3(44, 49); var E3 = e3(100, 49); var T = e3(103, 49); @@ -37233,41 +37295,41 @@ var A2 = o5((s5) => { let e5 = null; if (s5) { const a7 = p4.resolve(s5); - e5 = { path: a7, config: ae(a7) }; + e5 = { path: a7, config: me(a7) }; } else { try { - e5 = he(); + e5 = Je(); } catch { } if (!e5) return; } - M2 = Xe(e5), _3 = Re(e5), S = e5?.config.compilerOptions?.allowJs ?? false; + M2 = nn(e5), _3 = He(e5), S = e5?.config.compilerOptions?.allowJs ?? false; }, "loadTsconfig"); var T2 = o5((s5) => Array.from(s5).length > 0 ? `?${s5.toString()}` : "", "urlSearchParamsStringify"); var Pe3 = ` //# sourceMappingURL=data:application/json;base64,`; -var I3 = o5(() => process.sourceMapsEnabled ?? true, "shouldApplySourceMap"); +var I4 = o5(() => process.sourceMapsEnabled ?? true, "shouldApplySourceMap"); var F3 = o5(({ code: s5, map: e5 }) => s5 + Pe3 + Buffer.from(JSON.stringify(e5), "utf8").toString("base64"), "inlineSourceMap"); var v3 = Number(process.env.TSX_DEBUG); v3 && (f4.enabled = true, f4.supportLevel = 3); -var J2 = o5((s5) => (e5, ...a7) => { +var J3 = o5((s5) => (e5, ...a7) => { if (!v3 || e5 > v3) return; const n3 = `${E3(` tsx P${process.pid} `)} ${s5}`, t3 = a7.map((r3) => typeof r3 == "string" ? r3 : oe3(r3, { colors: true })).join(" "); te2(1, `${n3} ${t3} `); }, "createLog"); -var P2 = J2(T(b(" CJS "))); -var je3 = J2(L2(" ESM ")); -var be = [".cts", ".mts", ".ts", ".tsx", ".jsx"]; +var P2 = J3(T(b(" CJS "))); +var je3 = J3(L2(" ESM ")); +var be2 = [".cts", ".mts", ".ts", ".tsx", ".jsx"]; var xe3 = [".js", ".cjs", ".mjs"]; var k2 = [".ts", ".tsx", ".jsx"]; var $2 = o5((s5, e5, a7, n3) => { const t3 = Object.getOwnPropertyDescriptor(s5, e5); t3?.set ? s5[e5] = a7 : (!t3 || t3.configurable) && Object.defineProperty(s5, e5, { value: a7, enumerable: t3?.enumerable || n3?.enumerable, writable: n3?.writable ?? (t3 ? t3.writable : true), configurable: n3?.configurable ?? (t3 ? t3.configurable : true) }); }, "safeSet"); -var ye3 = o5((s5, e5, a7) => { +var ye2 = o5((s5, e5, a7) => { const n3 = e5[".js"], t3 = o5((r3, c3) => { if (s5.enabled === false) return n3(r3, c3); @@ -37275,18 +37337,18 @@ var ye3 = o5((s5, e5, a7) => { if ((new URLSearchParams(f6).get("namespace") ?? void 0) !== a7) return n3(r3, c3); P2(2, "load", { filePath: c3 }), r3.id.startsWith("data:text/javascript,") && (r3.path = p4.dirname(i6)), c2?.send && c2.send({ type: "dependency", path: i6 }); - const u5 = be.some((m8) => i6.endsWith(m8)), g2 = xe3.some((m8) => i6.endsWith(m8)); + const u5 = be2.some((m8) => i6.endsWith(m8)), g2 = xe3.some((m8) => i6.endsWith(m8)); if (!u5 && !g2) return n3(r3, i6); - let h4 = se3.readFileSync(i6, "utf8"); + let h3 = se2.readFileSync(i6, "utf8"); if (i6.endsWith(".cjs")) { - const m8 = xe2(c3, h4); - m8 && (h4 = I3() ? F3(m8) : m8.code); - } else if (u5 || gn(h4)) { - const m8 = dr(h4, c3, { tsconfigRaw: M2?.(i6) }); - h4 = I3() ? F3(m8) : m8.code; + const m8 = xe2(c3, h3); + m8 && (h3 = I4() ? F3(m8) : m8.code); + } else if (u5 || gn(h3)) { + const m8 = dr(h3, c3, { tsconfigRaw: M2?.(i6) }); + h3 = I4() ? F3(m8) : m8.code; } - P2(1, "loaded", { filePath: i6 }), r3._compile(h4, i6); + P2(1, "loaded", { filePath: i6 }), r3._compile(h3, i6); }, "transformer"); $2(e5, ".js", t3); for (const r3 of k2) @@ -37320,7 +37382,7 @@ var Ee2 = o5((s5) => (e5) => { }, "createImplicitResolver"); var B2 = [".js", ".json"]; var G3 = [".ts", ".tsx", ".jsx"]; -var _e3 = [...G3, ...B2]; +var _e2 = [...G3, ...B2]; var Se3 = [...B2, ...G3]; var b2 = /* @__PURE__ */ Object.create(null); b2[".js"] = [".ts", ".tsx", ".js", ".jsx"], b2[".jsx"] = [".tsx", ".ts", ".jsx", ".js"], b2[".cjs"] = [".cts"], b2[".mjs"] = [".mts"]; @@ -37330,7 +37392,7 @@ var X3 = o5((s5) => { const f6 = n3.slice(0, -t3.length); r3.push(...c3.map((l3) => f6 + l3 + a7)); } - const i6 = !(s5.startsWith(y2) || j(n3)) || n3.includes(Q4) || n3.includes("/node_modules/") ? Se3 : _e3; + const i6 = !(s5.startsWith(y2) || j(n3)) || n3.includes(Q4) || n3.includes("/node_modules/") ? Se3 : _e2; return r3.push(...i6.map((f6) => n3 + f6 + a7)), r3; }, "mapTsExtensions"); var w2 = o5((s5, e5, a7) => { @@ -37400,8 +37462,8 @@ var Me3 = o5((s5, e5) => { } return [a7[0], n3, (t3, r3) => (p4.isAbsolute(t3) && !t3.endsWith(".json") && !t3.endsWith(".node") && !(r3 === 0 && we2(new Error())) && (t3 += T2(n3)), t3)]; }, "preserveQuery"); -var Te2 = o5((s5, e5, a7) => { - if (s5.startsWith(y2) && (s5 = O4(s5)), _3 && !j(s5) && !e5?.filename?.includes(Q4)) { +var Te3 = o5((s5, e5, a7) => { + if (s5.startsWith(y2) && (s5 = O3(s5)), _3 && !j(s5) && !e5?.filename?.includes(Q4)) { const n3 = _3(s5); for (const t3 of n3) try { @@ -37421,30 +37483,30 @@ var Fe3 = o5((s5, e5, a7) => (n3, t3, ...r3) => { P2(2, "resolve", { request: n3, parent: t3?.filename ?? t3, restOfArgs: r3 }); let l3 = o5((g2) => e5(g2, t3, ...r3), "nextResolveSimple"); l3 = ve3(l3, !!(a7 || t3?.filename && C3.test(t3.filename))), l3 = Ee2(l3); - const u5 = f6(Te2(c3, t3, l3), r3.length); + const u5 = f6(Te3(c3, t3, l3), r3.length); return P2(1, "resolved", { request: n3, parent: t3?.filename ?? t3, resolved: u5 }), u5; }, "createResolveFilename"); var H2 = o5((s5, e5) => { if (!e5) throw new Error("The current file path (__filename or import.meta.url) must be provided in the second argument of tsx.require()"); - return s5.startsWith(".") ? ((typeof e5 == "string" && e5.startsWith(y2) || e5 instanceof URL) && (e5 = O4(e5)), p4.resolve(p4.dirname(e5), s5)) : s5; + return s5.startsWith(".") ? ((typeof e5 == "string" && e5.startsWith(y2) || e5 instanceof URL) && (e5 = O3(e5)), p4.resolve(p4.dirname(e5), s5)) : s5; }, "resolveContext"); var $e3 = o5((s5) => { const { sourceMapsEnabled: e5 } = process, a7 = { enabled: true }; A2(process.env.TSX_TSCONFIG_PATH), process.setSourceMapsEnabled(true); const n3 = d3._resolveFilename, t3 = Fe3(a7, n3, s5?.namespace); d3._resolveFilename = t3; - const r3 = ye3(a7, d3._extensions, s5?.namespace), c3 = o5(() => { + const r3 = ye2(a7, d3._extensions, s5?.namespace), c3 = o5(() => { e5 === false && process.setSourceMapsEnabled(false), a7.enabled = false, d3._resolveFilename === t3 && (d3._resolveFilename = n3), r3(); }, "unregister"); if (s5?.namespace) { const i6 = o5((l3, u5) => { - const g2 = H2(l3, u5), [h4, m8] = g2.split("?"), x2 = new URLSearchParams(m8); - return s5.namespace && !h4.startsWith("node:") && x2.set("namespace", s5.namespace), m(h4 + T2(x2)); + const g2 = H2(l3, u5), [h3, m8] = g2.split("?"), x2 = new URLSearchParams(m8); + return s5.namespace && !h3.startsWith("node:") && x2.set("namespace", s5.namespace), m(h3 + T2(x2)); }, "scopedRequire"); c3.require = i6; const f6 = o5((l3, u5, g2) => { - const h4 = H2(l3, u5), [m8, x2] = h4.split("?"), L3 = new URLSearchParams(x2); + const h3 = H2(l3, u5), [m8, x2] = h3.split("?"), L3 = new URLSearchParams(x2); return s5.namespace && !m8.startsWith("node:") && L3.set("namespace", s5.namespace), t3(m8 + T2(L3), module, false, g2); }, "scopedResolve"); c3.resolve = f6, c3.unregister = c3; @@ -37453,13 +37515,13 @@ var $e3 = o5((s5) => { }, "register"); // -import { pathToFileURL as h3 } from "node:url"; +import { pathToFileURL as h2 } from "node:url"; var d4 = Object.defineProperty; var o6 = (r3, s5) => d4(r3, "name", { value: s5, configurable: true }); var w3 = o6((r3) => (s5, e5) => { if (!e5) throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()"); - const a7 = e5.startsWith(y2) ? e5 : h3(e5).toString(); + const a7 = e5.startsWith(y2) ? e5 : h2(e5).toString(); return import(`tsx://${JSON.stringify({ specifier: s5, parentURL: a7, namespace: r3 })}`); }, "createScopedImport"); var l2 = false; diff --git a/.github/actions/saucelabs-legacy/action.yml b/.github/actions/saucelabs-legacy/action.yml index f3f9e2b7b1b..8d353f987db 100644 --- a/.github/actions/saucelabs-legacy/action.yml +++ b/.github/actions/saucelabs-legacy/action.yml @@ -5,9 +5,9 @@ runs: using: 'composite' steps: - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Saucelabs Variables - uses: angular/dev-infra/github-actions/saucelabs@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/saucelabs@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Starting Saucelabs tunnel service shell: bash run: ./tools/saucelabs/sauce-service.sh run & diff --git a/.github/workflows/adev-preview-build.yml b/.github/workflows/adev-preview-build.yml index 17c53b2cff3..43fc27c8d1b 100644 --- a/.github/workflows/adev-preview-build.yml +++ b/.github/workflows/adev-preview-build.yml @@ -21,16 +21,16 @@ jobs: (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'adev: preview')) steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - name: Build adev run: pnpm bazel build //adev:build.production - - uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@18fece68983a6e0ecaed2456ffc4035d493688f3 + - uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: workflow-artifact-name: 'adev-preview' pull-number: '${{github.event.pull_request.number}}' diff --git a/.github/workflows/adev-preview-deploy.yml b/.github/workflows/adev-preview-deploy.yml index d6e8d4640ed..a6ab499741c 100644 --- a/.github/workflows/adev-preview-deploy.yml +++ b/.github/workflows/adev-preview-deploy.yml @@ -40,7 +40,7 @@ jobs: npx -y firebase-tools@latest target:clear --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs npx -y firebase-tools@latest target:apply --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs ${{env.PREVIEW_SITE}} - - uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@18fece68983a6e0ecaed2456ffc4035d493688f3 + - uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: github-token: '${{secrets.GITHUB_TOKEN}}' workflow-artifact-name: 'adev-preview' diff --git a/.github/workflows/assistant-to-the-branch-manager.yml b/.github/workflows/assistant-to-the-branch-manager.yml index ca375413eae..01419d15060 100644 --- a/.github/workflows/assistant-to-the-branch-manager.yml +++ b/.github/workflows/assistant-to-the-branch-manager.yml @@ -16,6 +16,6 @@ jobs: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false - - uses: angular/dev-infra/github-actions/branch-manager@18fece68983a6e0ecaed2456ffc4035d493688f3 + - uses: angular/dev-infra/github-actions/branch-manager@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/benchmark-compare.yml b/.github/workflows/benchmark-compare.yml index 082a577dc41..b73ef116083 100644 --- a/.github/workflows/benchmark-compare.yml +++ b/.github/workflows/benchmark-compare.yml @@ -38,7 +38,7 @@ jobs: - run: pnpm install --frozen-lockfile - - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + - uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: bazelrc: ./.bazelrc.user diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7499ae2be94..b65e6d52f5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - name: Check code lint @@ -39,13 +39,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: disable-package-manager-cache: true - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }} - name: Cache downloaded Cypress binary @@ -72,11 +72,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel Remote Caching - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }} - name: Install node modules @@ -88,11 +88,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel Remote Caching - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }} - name: Install node modules @@ -105,11 +105,11 @@ jobs: labels: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }} - name: Install node modules @@ -124,13 +124,11 @@ jobs: labels: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 - with: - cache-node-modules: true + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials @@ -142,11 +140,11 @@ jobs: labels: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }} - name: Install node modules @@ -196,11 +194,11 @@ jobs: runs-on: ubuntu-latest-8core steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - name: Build adev diff --git a/.github/workflows/dev-infra.yml b/.github/workflows/dev-infra.yml index 8dea45d5404..f80389f1125 100644 --- a/.github/workflows/dev-infra.yml +++ b/.github/workflows/dev-infra.yml @@ -13,13 +13,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - uses: angular/dev-infra/github-actions/pull-request-labeling@18fece68983a6e0ecaed2456ffc4035d493688f3 + - uses: angular/dev-infra/github-actions/pull-request-labeling@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} post_approval_changes: runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - uses: angular/dev-infra/github-actions/post-approval-changes@18fece68983a6e0ecaed2456ffc4035d493688f3 + - uses: angular/dev-infra/github-actions/post-approval-changes@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/google-internal-tests.yml b/.github/workflows/google-internal-tests.yml index 9ae09f85603..b2348f8460a 100644 --- a/.github/workflows/google-internal-tests.yml +++ b/.github/workflows/google-internal-tests.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - uses: angular/dev-infra/github-actions/google-internal-tests@18fece68983a6e0ecaed2456ffc4035d493688f3 + - uses: angular/dev-infra/github-actions/google-internal-tests@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: run-tests-guide-url: http://go/angular-g3sync-start github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index fe0952a433f..4af258078d5 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -13,17 +13,15 @@ jobs: JOBS: 2 steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 - with: - cache-node-modules: true + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel Remote Caching - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Saucelabs Variables - uses: angular/dev-infra/github-actions/saucelabs@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/saucelabs@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Set up Sauce Tunnel Daemon run: pnpm bazel run //tools/saucelabs-daemon/background-service -- $JOBS & env: diff --git a/.github/workflows/merge-ready-status.yml b/.github/workflows/merge-ready-status.yml index 5a89a5a4366..cf94beed11c 100644 --- a/.github/workflows/merge-ready-status.yml +++ b/.github/workflows/merge-ready-status.yml @@ -9,6 +9,6 @@ jobs: status: runs-on: ubuntu-latest steps: - - uses: angular/dev-infra/github-actions/unified-status-check@18fece68983a6e0ecaed2456ffc4035d493688f3 + - uses: angular/dev-infra/github-actions/unified-status-check@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index e48bf4d9f68..a1e39b0f83f 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -21,7 +21,7 @@ jobs: workflows: ${{ steps.workflows.outputs.workflows }} steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - id: workflows @@ -36,9 +36,9 @@ jobs: workflow: ${{ fromJSON(needs.list.outputs.workflows) }} steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile # We utilize the google-github-actions/auth action to allow us to get an active credential using workflow diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d02649892d5..440a48eee07 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - name: Check code lint @@ -37,7 +37,7 @@ jobs: - name: Check code format run: pnpm ng-dev format changed --check ${{ github.event.pull_request.base.sha }} - name: Check Package Licenses - uses: angular/dev-infra/github-actions/linting/licenses@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/linting/licenses@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: allow-dependencies-licenses: 'pkg:npm/google-protobuf@' @@ -45,13 +45,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 with: disable-package-manager-cache: true - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Cache downloaded Cypress binary uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: @@ -76,11 +76,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel Remote Caching - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - name: Run CI tests for framework @@ -100,11 +100,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel Remote Caching - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - name: Run integration CI tests for framework @@ -115,11 +115,11 @@ jobs: labels: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - name: Run tests @@ -132,11 +132,11 @@ jobs: labels: ubuntu-latest steps: - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/setup@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@18fece68983a6e0ecaed2456ffc4035d493688f3 + uses: angular/dev-infra/github-actions/bazel/configure-remote@9b8eb9494aa8ad5c9fab8e13de90d43160f66384 - name: Install node modules run: pnpm install --frozen-lockfile - run: | diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 188499309ae..0ad1f871dff 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -47,6 +47,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: 'Upload to code-scanning' - uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5 + uses: github/codeql-action/upload-sarif@755f44910c12a3d7ca0d8c6e42c048b3362f7cec # v3.30.8 with: sarif_file: results.sarif diff --git a/CHANGELOG.md b/CHANGELOG.md index 81dbbe84302..f440877e336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ + +# 20.3.5 (2025-10-15) +### compiler-cli +| Commit | Type | Description | +| -- | -- | -- | +| [8dec92ff9f](https://github.com/angular/angular/commit/8dec92ff9f1055c6b4fc4e767d8b1b408ac28e67) | fix | capture metadata for undecorated fields ([#63957](https://github.com/angular/angular/pull/63957)) ([#64317](https://github.com/angular/angular/pull/64317)) | +| [c2e817b0ef](https://github.com/angular/angular/commit/c2e817b0efb6f617312936b756ace2c85139d1fc) | perf | fix performance of "interpolated signal not invoked" check ([#64410](https://github.com/angular/angular/pull/64410)) | +### core +| Commit | Type | Description | +| -- | -- | -- | +| [f15cfa4cc4](https://github.com/angular/angular/commit/f15cfa4cc414f1d2f4b126bdfc26d74922732672) | fix | fixes regression in `animate.leave` function bindings ([#64413](https://github.com/angular/angular/pull/64413)) | +| [d54dd674ca](https://github.com/angular/angular/commit/d54dd674ca9db874c95027161b8080bd37250af6) | fix | Prevents early style pruning with leave animations ([#64335](https://github.com/angular/angular/pull/64335)) | +### migrations +| Commit | Type | Description | +| -- | -- | -- | +| [554573e524](https://github.com/angular/angular/commit/554573e5248a72f73df1468e992da08ce5f6112d) | fix | migrating input with more than 1 usage in a method ([#64367](https://github.com/angular/angular/pull/64367)) | +| [2c79ca0b57](https://github.com/angular/angular/commit/2c79ca0b579d99346c267e6b61789699e8656dc5) | fix | remove error for no matching files in control flow migration ([#64253](https://github.com/angular/angular/pull/64253)) ([#64314](https://github.com/angular/angular/pull/64314)) | +### router +| Commit | Type | Description | +| -- | -- | -- | +| [6e4bcc7d22](https://github.com/angular/angular/commit/6e4bcc7d22d4699a33d6648e628fb65a38d0ad8f) | fix | Scroll restoration should use instant scroll behavior for traversals ([#64299](https://github.com/angular/angular/pull/64299)) | + + + # 20.3.4 (2025-10-08) ### core diff --git a/MODULE.bazel b/MODULE.bazel index 1990c55a3d0..28e3bdd699c 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -7,13 +7,13 @@ module( bazel_dep(name = "rules_pkg", version = "1.1.0") bazel_dep(name = "rules_nodejs", version = "6.5.2") bazel_dep(name = "aspect_rules_ts", version = "3.7.0") -bazel_dep(name = "aspect_rules_js", version = "2.6.0") -bazel_dep(name = "aspect_rules_esbuild", version = "0.22.1") +bazel_dep(name = "aspect_rules_js", version = "2.6.2") +bazel_dep(name = "aspect_rules_esbuild", version = "0.23.0") bazel_dep(name = "aspect_rules_jasmine", version = "2.0.0") bazel_dep(name = "aspect_rules_rollup", version = "2.0.1") bazel_dep(name = "bazel_skylib", version = "1.8.2") bazel_dep(name = "aspect_bazel_lib", version = "2.21.2") -bazel_dep(name = "tar.bzl", version = "0.5.6") +bazel_dep(name = "tar.bzl", version = "0.6.0") bazel_dep(name = "yq.bzl", version = "0.3.1") bazel_dep(name = "rules_angular") git_override( @@ -25,21 +25,21 @@ git_override( bazel_dep(name = "devinfra") git_override( module_name = "devinfra", - commit = "18fece68983a6e0ecaed2456ffc4035d493688f3", + commit = "9b8eb9494aa8ad5c9fab8e13de90d43160f66384", remote = "https://github.com/angular/dev-infra.git", ) bazel_dep(name = "rules_sass") git_override( module_name = "rules_sass", - commit = "4a54e0e4e75fc6456ff874e53fb4a78bdfeb44b9", + commit = "1184a80751a21af8348f308abc5b38a41f26850e", remote = "https://github.com/devversion/rules_sass.git", ) bazel_dep(name = "rules_browsers") git_override( module_name = "rules_browsers", - commit = "6749ba4c0dc5e04536369fa91fdb2d827b6705ff", + commit = "0e04a5443e783ef983c84314e311e68410dd82e1", remote = "https://github.com/devversion/rules_browsers.git", ) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 1bab56a7ccb..d12ac3efaee 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -10,8 +10,8 @@ "https://bcr.bazel.build/modules/abseil-cpp/20230802.1/MODULE.bazel": "fa92e2eb41a04df73cdabeec37107316f7e5272650f81d6cc096418fe647b915", "https://bcr.bazel.build/modules/abseil-cpp/20240116.1/MODULE.bazel": "37bcdb4440fbb61df6a1c296ae01b327f19e9bb521f9b8e26ec854b6f97309ed", "https://bcr.bazel.build/modules/abseil-cpp/20240116.1/source.json": "9be551b8d4e3ef76875c0d744b5d6a504a27e3ae67bc6b28f46415fd2d2957da", - "https://bcr.bazel.build/modules/apple_support/1.5.0/MODULE.bazel": "50341a62efbc483e8a2a6aec30994a58749bd7b885e18dd96aa8c33031e558ef", - "https://bcr.bazel.build/modules/apple_support/1.5.0/source.json": "eb98a7627c0bc486b57f598ad8da50f6625d974c8f723e9ea71bd39f709c9862", + "https://bcr.bazel.build/modules/apple_support/1.23.1/MODULE.bazel": "53763fed456a968cf919b3240427cf3a9d5481ec5466abc9d5dc51bc70087442", + "https://bcr.bazel.build/modules/apple_support/1.23.1/source.json": "d888b44312eb0ad2c21a91d026753f330caa48a25c9b2102fae75eb2b0dcfdd2", "https://bcr.bazel.build/modules/aspect_bazel_lib/2.0.0/MODULE.bazel": "e118477db5c49419a88d78ebc7a2c2cea9d49600fe0f490c1903324a2c16ecd9", "https://bcr.bazel.build/modules/aspect_bazel_lib/2.11.0/MODULE.bazel": "cb1ba9f9999ed0bc08600c221f532c1ddd8d217686b32ba7d45b0713b5131452", "https://bcr.bazel.build/modules/aspect_bazel_lib/2.14.0/MODULE.bazel": "2b31ffcc9bdc8295b2167e07a757dbbc9ac8906e7028e5170a3708cecaac119f", @@ -21,14 +21,14 @@ "https://bcr.bazel.build/modules/aspect_bazel_lib/2.7.7/MODULE.bazel": "491f8681205e31bb57892d67442ce448cda4f472a8e6b3dc062865e29a64f89c", "https://bcr.bazel.build/modules/aspect_bazel_lib/2.8.1/MODULE.bazel": "812d2dd42f65dca362152101fbec418029cc8fd34cbad1a2fde905383d705838", "https://bcr.bazel.build/modules/aspect_bazel_lib/2.9.3/MODULE.bazel": "66baf724dbae7aff4787bf2245cc188d50cb08e07789769730151c0943587c14", - "https://bcr.bazel.build/modules/aspect_rules_esbuild/0.22.1/MODULE.bazel": "499ce65b6126f344f9a630040b9db91b36b20c6d1436026120067d922c2d69bd", - "https://bcr.bazel.build/modules/aspect_rules_esbuild/0.22.1/source.json": "84138a41a9e71655cb97d39fcb80f6e2ba7e754d5601fb14f5a7d14080dff409", + "https://bcr.bazel.build/modules/aspect_rules_esbuild/0.23.0/MODULE.bazel": "9b437a9ec25a619304940434fa03b8d41248213eb7009da2c898f3d6a4075ef3", + "https://bcr.bazel.build/modules/aspect_rules_esbuild/0.23.0/source.json": "7b4cac4e61bae4262e7f67f6bec0b200fcb9060044f12e84a3bc37e0be245de7", "https://bcr.bazel.build/modules/aspect_rules_jasmine/2.0.0/MODULE.bazel": "071d1952527721bf8b180e1299def24edaece9d7466e31a311981640da82c6be", "https://bcr.bazel.build/modules/aspect_rules_jasmine/2.0.0/source.json": "45fa9603cdfe100575a12d8b65fa425fe8713dd8c9f0cdf802168b670bc0e299", "https://bcr.bazel.build/modules/aspect_rules_js/2.0.0/MODULE.bazel": "b45b507574aa60a92796e3e13c195cd5744b3b8aff516a9c0cb5ae6a048161c5", "https://bcr.bazel.build/modules/aspect_rules_js/2.4.2/MODULE.bazel": "0d01db38b96d25df7ed952a5e96eac4b3802723d146961974bf020f6dd07591d", - "https://bcr.bazel.build/modules/aspect_rules_js/2.6.0/MODULE.bazel": "5a6f8dbc5b170769453f1819d469fe54b0e4b86a0e82e13fde8e5a45438a1890", - "https://bcr.bazel.build/modules/aspect_rules_js/2.6.0/source.json": "e1e20b259d4f1b0a5d8b99d57b418c96f306e1c77f96e9ea1c9f1068a628b211", + "https://bcr.bazel.build/modules/aspect_rules_js/2.6.2/MODULE.bazel": "ed2a871f4ab8fbde0cab67c425745069d84ea64b64313fa1a2954017326511f5", + "https://bcr.bazel.build/modules/aspect_rules_js/2.6.2/source.json": "59933fb8ddabd9740a3c12ff5552f06f2b8d68c3633883c681c757bf227c3763", "https://bcr.bazel.build/modules/aspect_rules_rollup/2.0.1/MODULE.bazel": "296e3a053658c2af989ba9bd62a205e6d1fa84bdd6dd5249196546e6b84770ec", "https://bcr.bazel.build/modules/aspect_rules_rollup/2.0.1/source.json": "2fe8ac1ccb4de74bf884761e070010280b272d94e3997205b361b91c75409726", "https://bcr.bazel.build/modules/aspect_rules_ts/3.6.3/MODULE.bazel": "d09db394970f076176ce7bab5b5fa7f0d560fd4f30b8432ea5e2c2570505b130", @@ -45,6 +45,7 @@ "https://bcr.bazel.build/modules/bazel_features/1.18.0/MODULE.bazel": "1be0ae2557ab3a72a57aeb31b29be347bcdc5d2b1eb1e70f39e3851a7e97041a", "https://bcr.bazel.build/modules/bazel_features/1.19.0/MODULE.bazel": "59adcdf28230d220f0067b1f435b8537dd033bfff8db21335ef9217919c7fb58", "https://bcr.bazel.build/modules/bazel_features/1.21.0/MODULE.bazel": "675642261665d8eea09989aa3b8afb5c37627f1be178382c320d1b46afba5e3b", + "https://bcr.bazel.build/modules/bazel_features/1.27.0/MODULE.bazel": "621eeee06c4458a9121d1f104efb80f39d34deff4984e778359c60eaf1a8cb65", "https://bcr.bazel.build/modules/bazel_features/1.34.0/MODULE.bazel": "e8475ad7c8965542e0c7aac8af68eb48c4af904be3d614b6aa6274c092c2ea1e", "https://bcr.bazel.build/modules/bazel_features/1.34.0/source.json": "dfa5c4b01110313153b484a735764d247fee5624bbab63d25289e43b151a657a", "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", @@ -108,6 +109,7 @@ "https://bcr.bazel.build/modules/rules_android/0.1.1/source.json": "e6986b41626ee10bdc864937ffb6d6bf275bb5b9c65120e6137d56e6331f089e", "https://bcr.bazel.build/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647", "https://bcr.bazel.build/modules/rules_cc/0.0.10/MODULE.bazel": "ec1705118f7eaedd6e118508d3d26deba2a4e76476ada7e0e3965211be012002", + "https://bcr.bazel.build/modules/rules_cc/0.0.11/MODULE.bazel": "9f249c5624a4788067b96b8b896be10c7e8b4375dc46f6d8e1e51100113e0992", "https://bcr.bazel.build/modules/rules_cc/0.0.13/MODULE.bazel": "0e8529ed7b323dad0775ff924d2ae5af7640b23553dfcd4d34344c7e7a867191", "https://bcr.bazel.build/modules/rules_cc/0.0.15/MODULE.bazel": "6704c35f7b4a72502ee81f61bf88706b54f06b3cbe5558ac17e2e14666cd5dcc", "https://bcr.bazel.build/modules/rules_cc/0.0.16/MODULE.bazel": "7661303b8fc1b4d7f532e54e9d6565771fea666fbdf839e0a86affcd02defe87", @@ -187,7 +189,6 @@ "https://bcr.bazel.build/modules/stardoc/0.7.2/source.json": "58b029e5e901d6802967754adf0a9056747e8176f017cfe3607c0851f4d42216", "https://bcr.bazel.build/modules/tar.bzl/0.2.1/MODULE.bazel": "52d1c00a80a8cc67acbd01649e83d8dd6a9dc426a6c0b754a04fe8c219c76468", "https://bcr.bazel.build/modules/tar.bzl/0.5.1/MODULE.bazel": "7c2eb3dcfc53b0f3d6f9acdfd911ca803eaf92aadf54f8ca6e4c1f3aee288351", - "https://bcr.bazel.build/modules/tar.bzl/0.5.6/MODULE.bazel": "c5b8bfa6bc7b640883d41bfec4a200fb45c16a2a7b2fb081323f499197cfcc09", "https://bcr.bazel.build/modules/tar.bzl/0.6.0/MODULE.bazel": "a3584b4edcfafcabd9b0ef9819808f05b372957bbdff41601429d5fd0aac2e7c", "https://bcr.bazel.build/modules/tar.bzl/0.6.0/source.json": "4a620381df075a16cb3a7ed57bd1d05f7480222394c64a20fa51bdb636fda658", "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43", @@ -203,38 +204,10 @@ }, "selectedYankedVersions": {}, "moduleExtensions": { - "@@apple_support~//crosstool:setup.bzl%apple_cc_configure_extension": { - "general": { - "bzlTransitiveDigest": "PjIds3feoYE8SGbbIq2SFTZy3zmxeO2tQevJZNDo7iY=", - "usagesDigest": "+hz7IHWN6A1oVJJWNDB6yZRG+RYhF76wAYItpAeIUIg=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, - "envVariables": {}, - "generatedRepoSpecs": { - "local_config_apple_cc_toolchains": { - "bzlFile": "@@apple_support~//crosstool:setup.bzl", - "ruleClassName": "_apple_cc_autoconf_toolchains", - "attributes": {} - }, - "local_config_apple_cc": { - "bzlFile": "@@apple_support~//crosstool:setup.bzl", - "ruleClassName": "_apple_cc_autoconf", - "attributes": {} - } - }, - "recordedRepoMappingEntries": [ - [ - "apple_support~", - "bazel_tools", - "bazel_tools" - ] - ] - } - }, "@@aspect_rules_esbuild~//esbuild:extensions.bzl%esbuild": { "general": { - "bzlTransitiveDigest": "kzZXVf0lIRQArtJstiytwibC6m5npERsjNfhP9yJJW4=", - "usagesDigest": "u8wMZJd6Ovxb3YTmhoM3sMbh11Qwrv5EHaggdNi5Wb8=", + "bzlTransitiveDigest": "W+cy7GU3S29h8PPWylmMlPB5Z16vuZzJX4k0jlXGFoc=", + "usagesDigest": "H070ZIHhSlR+Han009l+GdDSuT9AJssdyVHQ7xjstSo=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -363,6 +336,11 @@ "aspect_rules_js", "aspect_rules_js~" ], + [ + "aspect_rules_esbuild~", + "aspect_tools_telemetry_report", + "aspect_tools_telemetry~~telemetry~aspect_tools_telemetry_report" + ], [ "aspect_rules_esbuild~", "bazel_skylib", @@ -413,8 +391,8 @@ }, "@@aspect_rules_js~//npm:extensions.bzl%pnpm": { "general": { - "bzlTransitiveDigest": "KMsyoH5ShknUHVmkSHztDMIN0fXSzKZBut4ETq2s/Sw=", - "usagesDigest": "V9NEIvpQ7jCUoRijc01Vfpgy0m4nBZhW8UadmstKA04=", + "bzlTransitiveDigest": "kFo9dd9KDRPKtK0RkVyoouzNI0l+bqG8cEaw+4+ZnVw=", + "usagesDigest": "m4SV89mxIkyR0bOgofNXUCEoJ4ZxGFzjT+gMxAHiyy0=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -551,9 +529,9 @@ "@@aspect_rules_ts~//ts:extensions.bzl%ext": { "general": { "bzlTransitiveDigest": "9IJp6IlB/FMHFBJe4MX/DQM4zi3oArC8yqYE/+NyPwk=", - "usagesDigest": "abj7r4KPInRGXFmdtxnPZLdCW2ZiYfw9PFtrOzvZBos=", + "usagesDigest": "t6Zw3rR7pEOIJeK1XJrArtC+rVXzgwUM7ejo8WEMlVc=", "recordedFileInputs": { - "@@rules_browsers~//package.json": "45572077938c7a4916e4aaedf7db7ce8425854ab92f35348cff02a2134023bb8" + "@@rules_browsers~//package.json": "84dc1ba9b1c667a25894e97218bd8f247d54f24bb694efb397a881be3c06a4c5" }, "recordedDirentsInputs": {}, "envVariables": {}, @@ -626,7 +604,7 @@ "@@aspect_tools_telemetry~//:extension.bzl%telemetry": { "general": { "bzlTransitiveDigest": "gA7tPEdJXhskzPIEUxjX9IdDrM6+WjfbgXJ8Ez47umk=", - "usagesDigest": "GEL1puRyMuoDKpELV0EDVcA/hQ0OdxZ9UR/t2Vtj7a0=", + "usagesDigest": "dcrRW5I3xGNrhUUABIGxrJLCnXbmJYy1rq9dls9ZU+M=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -637,7 +615,8 @@ "attributes": { "deps": { "aspect_rules_ts": "3.7.0", - "aspect_rules_js": "2.6.0", + "aspect_rules_js": "2.6.2", + "aspect_rules_esbuild": "0.23.0", "aspect_tools_telemetry": "0.2.8" } } @@ -723,8 +702,8 @@ }, "@@rules_browsers~//browsers:extensions.bzl%browsers": { "general": { - "bzlTransitiveDigest": "ep2OrXzFai22oPOQwhS3aeTWxT9Jn6Us7ws4lRa4bU8=", - "usagesDigest": "78aLbl2cYObLkrJFomb3ZkfFUiUFbqzqZK8lnW+Y7Uk=", + "bzlTransitiveDigest": "wG3lfivSBp6/w6pp9XxmrFKs0j4BJ1G7oDv4DpFa62g=", + "usagesDigest": "1PlExi+b77pSr2tAxFCVbpCtFoA7oixHabaL3dmas4Y=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -733,9 +712,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "14086c6c0844122d4066a5e3a846b963259648945d7fb6c51b520f2105edd597", + "sha256": "79a3a4d3a5f9efae04dbb7c2164393ff8fee5f352ec73e36900848c75f4f906f", "urls": [ - "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/linux64/chrome-headless-shell-linux64.zip" + "https://storage.googleapis.com/chrome-for-testing-public/143.0.7459.0/linux64/chrome-headless-shell-linux64.zip" ], "named_files": { "CHROME-HEADLESS-SHELL": "chrome-headless-shell-linux64/chrome-headless-shell" @@ -752,9 +731,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "fa2ff20c870e289511cdde481d069f167e403d289b91b1d9d063dd7b2f77ed6e", + "sha256": "cdba96e69a423adc1f2647f35643a10e33260b4dfcc233977f3724f28bffd8f2", "urls": [ - "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/mac-x64/chrome-headless-shell-mac-x64.zip" + "https://storage.googleapis.com/chrome-for-testing-public/143.0.7459.0/mac-x64/chrome-headless-shell-mac-x64.zip" ], "named_files": { "CHROME-HEADLESS-SHELL": "chrome-headless-shell-mac-x64/chrome-headless-shell" @@ -771,9 +750,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "cbb938bd24ed648280e3654592c46f7eb8e2e184ca331f2138816bd59fcaed32", + "sha256": "56eb0c57958b50dc6c0de810ea9fcf1ff800baf2a4b14ae0fea536e633806098", "urls": [ - "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/mac-arm64/chrome-headless-shell-mac-arm64.zip" + "https://storage.googleapis.com/chrome-for-testing-public/143.0.7459.0/mac-arm64/chrome-headless-shell-mac-arm64.zip" ], "named_files": { "CHROME-HEADLESS-SHELL": "chrome-headless-shell-mac-arm64/chrome-headless-shell" @@ -790,9 +769,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "68bf73ab78647e697bf7b81e8329f23c1331d8792af6e2ab66553aeb9ede9cd3", + "sha256": "506b23250323f3eb4cdfe298cfd599571e428f6f3a64e86818ee975f4e585b75", "urls": [ - "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/win64/chrome-headless-shell-win64.zip" + "https://storage.googleapis.com/chrome-for-testing-public/143.0.7459.0/win64/chrome-headless-shell-win64.zip" ], "named_files": { "CHROME-HEADLESS-SHELL": "chrome-headless-shell-win64/chrome-headless-shell.exe" @@ -809,9 +788,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "ec29104132a6ff1ae5f2ffe7b27b7ff675a58ab9b1ef616badcbdd35577b31b3", + "sha256": "8bf018ed7c383dfd4a4a8f26702265e58b053e71583c4b7a6f8a3eaa6e9b9e6f", "urls": [ - "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/linux64/chromedriver-linux64.zip" + "https://storage.googleapis.com/chrome-for-testing-public/143.0.7459.0/linux64/chromedriver-linux64.zip" ], "named_files": { "CHROMEDRIVER": "chromedriver-linux64/chromedriver" @@ -826,9 +805,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "2b9787f5f758c9f3e3888ac23270f8de47b168679718a4440bd1cea2b3cc57e9", + "sha256": "4eb9cc848823444374bf2d3d388eaa949cee92114a611ce850024bf6b91352d1", "urls": [ - "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/mac-x64/chromedriver-mac-x64.zip" + "https://storage.googleapis.com/chrome-for-testing-public/143.0.7459.0/mac-x64/chromedriver-mac-x64.zip" ], "named_files": { "CHROMEDRIVER": "chromedriver-mac-x64/chromedriver" @@ -843,9 +822,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "6da850508d250c00c10b09dcac00c97a58d51346047972c2c47d3e3b850d4662", + "sha256": "13f142a6c53f38d26552ee21a874e3d11497bf6fb580b79a6b6b4b042875bef6", "urls": [ - "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/mac-arm64/chromedriver-mac-arm64.zip" + "https://storage.googleapis.com/chrome-for-testing-public/143.0.7459.0/mac-arm64/chromedriver-mac-arm64.zip" ], "named_files": { "CHROMEDRIVER": "chromedriver-mac-arm64/chromedriver" @@ -860,9 +839,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "d4af3e6c8f3a7ceb50ff298e43ff07efcad46c1d6ceb0d894eeb2d593db7e522", + "sha256": "65c25dfbe56801d342ae027f365194d0d5b31602ec94e644fe21b6edb876904a", "urls": [ - "https://storage.googleapis.com/chrome-for-testing-public/139.0.7258.68/win64/chromedriver-win64.zip" + "https://storage.googleapis.com/chrome-for-testing-public/143.0.7459.0/win64/chromedriver-win64.zip" ], "named_files": { "CHROMEDRIVER": "chromedriver-win64/chromedriver.exe" @@ -877,9 +856,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "6fcc1a2f95a6b232af82b4b7644566638c5df349e3095c65b7c18d1a63412d3d", + "sha256": "1c87a9de21941a15177384d4820a6aa3c7dacb38d34089c73a621734ebf1ea9a", "urls": [ - "https://archive.mozilla.org/pub/firefox/releases/135.0/linux-x86_64/en-US/firefox-135.0.tar.xz" + "https://archive.mozilla.org/pub/firefox/releases/143.0/linux-x86_64/en-US/firefox-143.0.tar.xz" ], "named_files": { "FIREFOX": "firefox/firefox" @@ -894,9 +873,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "e55e24e6b2a4980f4b9091900835977b282f599dcdd5e38b753d95bad8a11da9", + "sha256": "a5c570e277021b61df1295efe77446617ebd768d8ad36a20b309aa382685f6f2", "urls": [ - "https://archive.mozilla.org/pub/firefox/releases/135.0/mac/en-US/Firefox%20135.0.dmg" + "https://archive.mozilla.org/pub/firefox/releases/143.0/mac/en-US/Firefox%20143.0.dmg" ], "named_files": { "FIREFOX": "Firefox.app/Contents/MacOS/firefox" @@ -911,9 +890,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "e55e24e6b2a4980f4b9091900835977b282f599dcdd5e38b753d95bad8a11da9", + "sha256": "a5c570e277021b61df1295efe77446617ebd768d8ad36a20b309aa382685f6f2", "urls": [ - "https://archive.mozilla.org/pub/firefox/releases/135.0/mac/en-US/Firefox%20135.0.dmg" + "https://archive.mozilla.org/pub/firefox/releases/143.0/mac/en-US/Firefox%20143.0.dmg" ], "named_files": { "FIREFOX": "Firefox.app/Contents/MacOS/firefox" @@ -928,9 +907,9 @@ "bzlFile": "@@rules_browsers~//browsers/private:browser_repo.bzl", "ruleClassName": "browser_repo", "attributes": { - "sha256": "f46d3cb68caa4d4366b942c225d256e0fc15a189263cd9efe29eff0dbfe02685", + "sha256": "fbbadc9a6881aa90d266b572304a75e8814b91817a1db7fc01015d667f60318d", "urls": [ - "https://archive.mozilla.org/pub/firefox/releases/135.0/win64/en-US/Firefox%20Setup%20135.0.exe" + "https://archive.mozilla.org/pub/firefox/releases/143.0/win64/en-US/Firefox%20Setup%20143.0.exe" ], "named_files": { "FIREFOX": "core/firefox.exe" @@ -1131,7 +1110,7 @@ "@@rules_nodejs~//nodejs:extensions.bzl%node": { "general": { "bzlTransitiveDigest": "FmfMiNXAxRoLWw3NloQbssosE1egrSvzirbQnso7j7E=", - "usagesDigest": "xHkFztDWYtKJ37XnwOK4sKovvRwpnGtzZns6k+dDdyI=", + "usagesDigest": "gj5TARtK0gTGB1qjjp2jJe1Msc70mpF80SrnuX6OmHI=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1275,7 +1254,7 @@ }, "@@rules_python~//python/extensions:pip.bzl%pip": { "general": { - "bzlTransitiveDigest": "8USX8QvzWk9pjl0ion2dAqEqjB3yzkmi3d13o89Cchs=", + "bzlTransitiveDigest": "sQcIxpGBMBOMzUZK9ARAkAR7oUiEiGgKZhHLEf9Prfk=", "usagesDigest": "MKs5B778/fEkKhBaxuBt3oCCW+wPRuh2AxtITF8AMSU=", "recordedFileInputs": { "@@rules_python~//tools/publish/requirements_linux.txt": "8175b4c8df50ae2f22d1706961884beeb54e7da27bd2447018314a175981997d", diff --git a/adev/package.json b/adev/package.json index 21b569b41e4..d136abd3452 100644 --- a/adev/package.json +++ b/adev/package.json @@ -1,21 +1,21 @@ { "dependencies": { - "@angular-devkit/build-angular": "20.3.4", + "@angular-devkit/build-angular": "20.3.5", "@angular/animations": "workspace:*", - "@angular/build": "20.3.4", - "@angular/cdk": "20.2.7", - "@angular/cli": "20.3.4", + "@angular/build": "20.3.5", + "@angular/cdk": "20.2.8", + "@angular/cli": "20.3.5", "@angular/common": "workspace:*", "@angular/compiler-cli": "workspace:*", "@angular/compiler": "workspace:*", "@angular/core": "workspace:*", "@angular/docs": "workspace:*", "@angular/forms": "workspace:*", - "@angular/material": "20.2.7", + "@angular/material": "20.2.8", "@angular/platform-browser": "workspace:*", "@angular/platform-server": "workspace:*", "@angular/router": "workspace:*", - "@angular/ssr": "20.3.4", + "@angular/ssr": "20.3.5", "@codemirror/autocomplete": "6.18.6", "@codemirror/commands": "6.8.1", "@codemirror/lang-angular": "0.1.4", diff --git a/adev/shared-docs/directives/click-outside/click-outside.directive.ts b/adev/shared-docs/directives/click-outside/click-outside.directive.ts index 14fbcb889bc..b9486cba66e 100644 --- a/adev/shared-docs/directives/click-outside/click-outside.directive.ts +++ b/adev/shared-docs/directives/click-outside/click-outside.directive.ts @@ -7,7 +7,7 @@ */ import {DOCUMENT} from '@angular/common'; -import {Directive, ElementRef, Input, inject, output} from '@angular/core'; +import {Directive, ElementRef, inject, input, output} from '@angular/core'; @Directive({ selector: '[docsClickOutside]', @@ -16,8 +16,7 @@ import {Directive, ElementRef, Input, inject, output} from '@angular/core'; }, }) export class ClickOutside { - // TODO: Understand why replacing this @Input with a signal input breaks the tests - @Input('docsClickOutsideIgnore') public ignoredElementsIds: string[] = []; + readonly ignoredElementsIds = input([], {alias: 'docsClickOutsideIgnore'}); public readonly clickOutside = output({alias: 'docsClickOutside'}); private readonly document = inject(DOCUMENT); @@ -33,11 +32,11 @@ export class ClickOutside { } private wasClickedOnIgnoredElement(event: MouseEvent): boolean { - if (this.ignoredElementsIds.length === 0) { + if (this.ignoredElementsIds().length === 0) { return false; } - return this.ignoredElementsIds.some((elementId) => { + return this.ignoredElementsIds().some((elementId) => { const element = this.document.getElementById(elementId); const target = event.target as Node; const contains = element?.contains(target); diff --git a/adev/shared-docs/directives/external-link/external-link.directive.spec.ts b/adev/shared-docs/directives/external-link/external-link.directive.spec.ts index 110ab2fe9f6..954ad92ace9 100644 --- a/adev/shared-docs/directives/external-link/external-link.directive.spec.ts +++ b/adev/shared-docs/directives/external-link/external-link.directive.spec.ts @@ -41,11 +41,13 @@ describe('ExternalLink', () => { By.css('a[href="https://stackoverflow.com/questions/tagged/angular"]'), ); expect(externalLink.attributes['target']).toEqual('_blank'); + expect(externalLink.attributes['rel']).toEqual('noopener'); }); it('should not internal link have target=_blank attribute', () => { const internalLink = fixture.debugElement.query(By.css('a[href="/roadmap"]')); expect(internalLink.attributes['target']).toBeFalsy(); + expect(internalLink.attributes['rel']).toBeFalsy(); }); it('should not set target=_blank attribute external link when anchor has got noBlankForExternalLink attribute', () => { @@ -53,23 +55,28 @@ describe('ExternalLink', () => { By.css('a[href="https://github.com/angular/angular/issues"]'), ); expect(externalLink.attributes['target']).toBeFalsy(); + expect(externalLink.attributes['rel']).toBeFalsy(); }); }); @Component({ template: ` Stack Overflow - Roadmap + Roadmap + > + GitHub Issues + `, imports: [ExternalLink, RouterLink], }) diff --git a/adev/shared-docs/directives/external-link/external-link.directive.ts b/adev/shared-docs/directives/external-link/external-link.directive.ts index 0812c466e33..349befe123f 100644 --- a/adev/shared-docs/directives/external-link/external-link.directive.ts +++ b/adev/shared-docs/directives/external-link/external-link.directive.ts @@ -18,6 +18,7 @@ import {isExternalLink} from '../../utils/index'; selector: 'a[href]:not([noBlankForExternalLink])', host: { '[attr.target]': 'target', + '[attr.rel]': 'rel', }, }) export class ExternalLink { @@ -25,6 +26,7 @@ export class ExternalLink { private readonly platformId = inject(PLATFORM_ID); target?: '_blank' | '_self' | '_parent' | '_top' | ''; + rel?: string; constructor() { this.setAnchorTarget(); @@ -37,6 +39,7 @@ export class ExternalLink { if (isExternalLink(this.anchor.nativeElement.href)) { this.target = '_blank'; + this.rel = 'noopener'; } } } diff --git a/adev/shared-docs/styles/_typography.scss b/adev/shared-docs/styles/_typography.scss index 1c4e2ce0e7b..241b9050eb1 100644 --- a/adev/shared-docs/styles/_typography.scss +++ b/adev/shared-docs/styles/_typography.scss @@ -49,7 +49,6 @@ h6 { font-family: var(--inter-tight-font); font-weight: 500; - text-wrap: balance; } p { diff --git a/adev/src/app/features/home/home.component.html b/adev/src/app/features/home/home.component.html index 5267f2917b4..93c5b9502a0 100644 --- a/adev/src/app/features/home/home.component.html +++ b/adev/src/app/features/home/home.component.html @@ -1,9 +1,13 @@
diff --git a/adev/src/content/best-practices/error-handling.md b/adev/src/content/best-practices/error-handling.md index 36dbb051776..e2086b8390c 100644 --- a/adev/src/content/best-practices/error-handling.md +++ b/adev/src/content/best-practices/error-handling.md @@ -16,13 +16,33 @@ Angular does _not_ catch errors inside of APIs that are called directly by your Angular catches _asynchronous_ errors from user promises or observables only when: -* There is an explicit contract for Angular to wait for and use the result of the asynchronous operation, and -* When errors are not presented in the return value or state. +- There is an explicit contract for Angular to wait for and use the result of the asynchronous operation, and +- When errors are not presented in the return value or state. For example, `AsyncPipe` and `PendingTasks.run` forward errors to the `ErrorHandler`, whereas `resource` presents the error in the `status` and `error` properties. Errors that Angular reports to the `ErrorHandler` are _unexpected_ errors. These errors may be unrecoverable or an indication that the state of the application is corrupted. Applications should provide error handling using `try` blocks or appropriate error handling operators (like `catchError` in RxJS) where the error occurs whenever possible rather than relying on the `ErrorHandler`, which is most frequently and appropriately used only as a mechanism to report potentially fatal errors to the error tracking and logging infrastructure. +```ts +export class GlobalErrorHandler implements ErrorHandler { + private readonly analyticsService = inject(AnalyticsService); + private readonly router = inject(Router); + + handleError(error: any) { + const url = this.router.url; + const errorMessage = error?.message ?? 'unknown'; + + this.analyticsService.trackEvent({ + eventName: 'exception', + description: `Screen: ${url} | ${errorMessage}`, + }); + + console.error(GlobalErrorHandler.name, { error }); + } +} + +``` + ### `TestBed` rethrows errors by default In many cases, `ErrorHandler` may only log errors and otherwise allow the application to continue running. In tests, however, you almost always want to surface these errors. Angular's `TestBed` rethrows unexpected errors to ensure that errors caught by the framework cannot be unintentionally missed or ignored. In rare circumstances, a test may specifically attempt to ensure errors do not cause the application to be unresponsive or crash. In these situations, you can [configure `TestBed` to _not_ rethrow application errors](api/core/testing/TestModuleMetadata#rethrowApplicationErrors) with `TestBed.configureTestingModule({rethrowApplicationErrors: false})`. diff --git a/adev/src/content/ecosystem/rxjs-interop/signals-interop.md b/adev/src/content/ecosystem/rxjs-interop/signals-interop.md index e1bf6da5cb5..78b3758256e 100644 --- a/adev/src/content/ecosystem/rxjs-interop/signals-interop.md +++ b/adev/src/content/ecosystem/rxjs-interop/signals-interop.md @@ -146,7 +146,7 @@ export class UserProfile { protected userId = input(); private userResource = rxResource({ - params: () => this.userId(), + params: () => ({ userId: this.userId() }), // The `stream` property expects a factory function that returns // a data stream as an RxJS Observable. diff --git a/adev/src/content/examples/drag-drop/src/axis-lock/app/app.component.ts b/adev/src/content/examples/drag-drop/src/axis-lock/app/app.component.ts index 579ecbf34f0..0ebe9ff5ce3 100755 --- a/adev/src/content/examples/drag-drop/src/axis-lock/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/axis-lock/app/app.component.ts @@ -8,7 +8,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-axis-lock-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDrag], }) export class CdkDragDropAxisLockExample {} diff --git a/adev/src/content/examples/drag-drop/src/connected-sorting-group/app/app.component.ts b/adev/src/content/examples/drag-drop/src/connected-sorting-group/app/app.component.ts index 08cc08275cc..4da8ffddf37 100755 --- a/adev/src/content/examples/drag-drop/src/connected-sorting-group/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/connected-sorting-group/app/app.component.ts @@ -15,7 +15,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-connected-sorting-group-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropListGroup, CdkDropList, CdkDrag], }) export class CdkDragDropConnectedSortingGroupExample { diff --git a/adev/src/content/examples/drag-drop/src/connected-sorting/app/app.component.ts b/adev/src/content/examples/drag-drop/src/connected-sorting/app/app.component.ts index 68de4c7bfe4..4fbb6d51828 100755 --- a/adev/src/content/examples/drag-drop/src/connected-sorting/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/connected-sorting/app/app.component.ts @@ -14,7 +14,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-connected-sorting-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropList, CdkDrag], }) export class CdkDragDropConnectedSortingExample { diff --git a/adev/src/content/examples/drag-drop/src/custom-handle/app/app.component.ts b/adev/src/content/examples/drag-drop/src/custom-handle/app/app.component.ts index 2643d24f0a8..54f433aa3ab 100755 --- a/adev/src/content/examples/drag-drop/src/custom-handle/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/custom-handle/app/app.component.ts @@ -8,7 +8,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-handle-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDrag, CdkDragHandle], }) export class CdkDragDropHandleExample {} diff --git a/adev/src/content/examples/drag-drop/src/custom-placeholder/app/app.component.ts b/adev/src/content/examples/drag-drop/src/custom-placeholder/app/app.component.ts index 7be12021a6f..799069e23f5 100755 --- a/adev/src/content/examples/drag-drop/src/custom-placeholder/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/custom-placeholder/app/app.component.ts @@ -14,7 +14,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-custom-placeholder-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropList, CdkDrag, CdkDragPlaceholder], }) export class CdkDragDropCustomPlaceholderExample { diff --git a/adev/src/content/examples/drag-drop/src/custom-preview/app/app.component.ts b/adev/src/content/examples/drag-drop/src/custom-preview/app/app.component.ts index 015e65f20ae..adc079e5f16 100755 --- a/adev/src/content/examples/drag-drop/src/custom-preview/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/custom-preview/app/app.component.ts @@ -14,7 +14,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-custom-preview-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropList, CdkDrag, CdkDragPreview], }) export class CdkDragDropCustomPreviewExample { diff --git a/adev/src/content/examples/drag-drop/src/delay-drag/app/app.component.ts b/adev/src/content/examples/drag-drop/src/delay-drag/app/app.component.ts index 77396bc9c03..e634d53bfe2 100755 --- a/adev/src/content/examples/drag-drop/src/delay-drag/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/delay-drag/app/app.component.ts @@ -8,7 +8,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-delay-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDrag], }) export class CdkDragDropDelayExample {} diff --git a/adev/src/content/examples/drag-drop/src/disable-drag/app/app.component.ts b/adev/src/content/examples/drag-drop/src/disable-drag/app/app.component.ts index 6ea1a6e2a41..4d25d457466 100755 --- a/adev/src/content/examples/drag-drop/src/disable-drag/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/disable-drag/app/app.component.ts @@ -8,7 +8,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-disabled-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropList, CdkDrag], }) export class CdkDragDropDisabledExample { diff --git a/adev/src/content/examples/drag-drop/src/disable-sorting/app/app.component.ts b/adev/src/content/examples/drag-drop/src/disable-sorting/app/app.component.ts index b4e88d1bfee..5c91b047a40 100755 --- a/adev/src/content/examples/drag-drop/src/disable-sorting/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/disable-sorting/app/app.component.ts @@ -15,7 +15,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-disabled-sorting-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropListGroup, CdkDropList, CdkDrag], }) export class CdkDragDropDisabledSortingExample { diff --git a/adev/src/content/examples/drag-drop/src/enter-predicate/app/app.component.ts b/adev/src/content/examples/drag-drop/src/enter-predicate/app/app.component.ts index f00b36863c7..bf66690a44b 100755 --- a/adev/src/content/examples/drag-drop/src/enter-predicate/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/enter-predicate/app/app.component.ts @@ -14,7 +14,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-enter-predicate-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropList, CdkDrag], }) export class CdkDragDropEnterPredicateExample { diff --git a/adev/src/content/examples/drag-drop/src/free-drag-position/app/app.component.ts b/adev/src/content/examples/drag-drop/src/free-drag-position/app/app.component.ts index e022b667bd7..ddc93e7e045 100755 --- a/adev/src/content/examples/drag-drop/src/free-drag-position/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/free-drag-position/app/app.component.ts @@ -8,7 +8,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-free-drag-position-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDrag], }) export class CdkDragDropFreeDragPositionExample { diff --git a/adev/src/content/examples/drag-drop/src/horizontal-sorting/app/app.component.ts b/adev/src/content/examples/drag-drop/src/horizontal-sorting/app/app.component.ts index 1a0e81ca738..2192aa4a8ac 100755 --- a/adev/src/content/examples/drag-drop/src/horizontal-sorting/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/horizontal-sorting/app/app.component.ts @@ -8,7 +8,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-horizontal-sorting-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropList, CdkDrag], }) export class CdkDragDropHorizontalSortingExample { diff --git a/adev/src/content/examples/drag-drop/src/mixed-sorting/app/app.component.ts b/adev/src/content/examples/drag-drop/src/mixed-sorting/app/app.component.ts index 8d177182791..65f7d0ad443 100755 --- a/adev/src/content/examples/drag-drop/src/mixed-sorting/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/mixed-sorting/app/app.component.ts @@ -8,7 +8,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-mixed-sorting-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropList, CdkDrag], }) export class CdkDragDropMixedSortingExample { diff --git a/adev/src/content/examples/drag-drop/src/overview/app/app.component.ts b/adev/src/content/examples/drag-drop/src/overview/app/app.component.ts index ebee20d9ae4..398e0c61bf0 100755 --- a/adev/src/content/examples/drag-drop/src/overview/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/overview/app/app.component.ts @@ -8,7 +8,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-overview-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDrag], }) export class CdkDragDropOverviewExample {} diff --git a/adev/src/content/examples/drag-drop/src/root-element/app/app.component.ts b/adev/src/content/examples/drag-drop/src/root-element/app/app.component.ts index 58c3003b11d..f14961c06f5 100755 --- a/adev/src/content/examples/drag-drop/src/root-element/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/root-element/app/app.component.ts @@ -18,7 +18,6 @@ import { selector: 'cdk-drag-drop-root-element-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDrag], }) export class CdkDragDropRootElementExample implements AfterViewInit, OnDestroy { diff --git a/adev/src/content/examples/drag-drop/src/sort-predicate/app/app.component.ts b/adev/src/content/examples/drag-drop/src/sort-predicate/app/app.component.ts index 3077866d4e7..909c1102c9a 100755 --- a/adev/src/content/examples/drag-drop/src/sort-predicate/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/sort-predicate/app/app.component.ts @@ -8,7 +8,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-sort-predicate-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropList, CdkDrag], }) export class CdkDragDropSortPredicateExample { diff --git a/adev/src/content/examples/drag-drop/src/sorting/app/app.component.ts b/adev/src/content/examples/drag-drop/src/sorting/app/app.component.ts index 040abc89095..b1b77d85ffd 100755 --- a/adev/src/content/examples/drag-drop/src/sorting/app/app.component.ts +++ b/adev/src/content/examples/drag-drop/src/sorting/app/app.component.ts @@ -8,7 +8,6 @@ import {Component} from '@angular/core'; selector: 'cdk-drag-drop-sorting-example', templateUrl: 'app.component.html', styleUrl: 'app.component.css', - standalone: true, imports: [CdkDropList, CdkDrag], }) export class CdkDragDropSortingExample { diff --git a/adev/src/content/examples/elements/src/app/popup.service.ts b/adev/src/content/examples/elements/src/app/popup.service.ts index dbc58846bea..ca2a4029a8a 100644 --- a/adev/src/content/examples/elements/src/app/popup.service.ts +++ b/adev/src/content/examples/elements/src/app/popup.service.ts @@ -1,13 +1,17 @@ -import {ApplicationRef, createComponent, EnvironmentInjector, Injectable} from '@angular/core'; +import { + ApplicationRef, + createComponent, + EnvironmentInjector, + inject, + Injectable, +} from '@angular/core'; import {NgElement, WithProperties} from '@angular/elements'; import {PopupComponent} from './popup.component'; @Injectable() export class PopupService { - constructor( - private injector: EnvironmentInjector, - private applicationRef: ApplicationRef, - ) {} + private readonly injector = inject(EnvironmentInjector); + private readonly applicationRef = inject(ApplicationRef); // Previous dynamic-loading method required you to set up infrastructure // before adding the popup to the DOM. diff --git a/adev/src/content/guide/components/programmatic-rendering.md b/adev/src/content/guide/components/programmatic-rendering.md index 678d49dc219..51887ae3591 100644 --- a/adev/src/content/guide/components/programmatic-rendering.md +++ b/adev/src/content/guide/components/programmatic-rendering.md @@ -2,16 +2,16 @@ TIP: This guide assumes you've already read the [Essentials Guide](essentials). Read that first if you're new to Angular. -In addition to using a component directly in a template, you can also dynamically render components -programmatically. This is helpful for situations when a component is unknown initially (thus can not +In addition to using a component directly in a template, you can also dynamically render components +programmatically. This is helpful for situations when a component is unknown initially (thus can not be referenced in a template directly) and it depends on some conditions. There are two main ways to render a component programmatically: in a template using `NgComponentOutlet`, -or in your TypeScript code using `ViewContainerRef`. +or in your TypeScript code using `ViewContainerRef`. -HELPFUL: for lazy-loading use-cases (for example if you want to delay loading of a heavy component), consider -using the built-in [`@defer` feature](/guide/templates/defer) instead. The `@defer` feature allows the code -of any components, directives, and pipes inside the `@defer` block to be extracted into separate JavaScript +HELPFUL: for lazy-loading use-cases (for example if you want to delay loading of a heavy component), consider +using the built-in [`@defer` feature](/guide/templates/defer) instead. The `@defer` feature allows the code +of any components, directives, and pipes inside the `@defer` block to be extracted into separate JavaScript chunks automatically and loaded only when necessary, based on the configured triggers. ## Using NgComponentOutlet @@ -103,10 +103,10 @@ In the example above, clicking the "Load content" button results in the followin ## Lazy-loading components -HELPFUL: if you want to lazy-load some components, you may consider using the built-in [`@defer` feature](/guide/templates/defer) +HELPFUL: if you want to lazy-load some components, you may consider using the built-in [`@defer` feature](/guide/templates/defer) instead. -If your use-case is not covered by the `@defer` feature, you can use either `NgComponentOutlet` or +If your use-case is not covered by the `@defer` feature, you can use either `NgComponentOutlet` or `ViewContainerRef` with a standard JavaScript [dynamic import](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/import). ```angular-ts @@ -119,9 +119,11 @@ If your use-case is not covered by the `@defer` feature, you can use either `NgC

Advanced settings

- + @if(!advancedSettings) { + + }
` @@ -137,3 +139,117 @@ export class AdminSettings { ``` The example above loads and displays the `AdvancedSettings` upon receiving a button click. + +## Binding inputs, outputs and setting host directives at creation + +When dynamically creating components, manually setting inputs and subscribing to outputs can be error-prone. You often need to write extra code just to wire up bindings after the component is instantiated. + +To simplify this, both `createComponent` and `ViewContainerRef.createComponent` support passing a `bindings` array with helpers like `inputBinding()`, `outputBinding()`, and `twoWayBinding()` to configure inputs and outputs up front. You can also specify a `directives` array to apply any host directives. This enables creating components programmatically with template-like bindings in a single, declarative call. + +### Host view using `ViewContainerRef.createComponent` + +`ViewContainerRef.createComponent` creates a component and automatically inserts its host view and host element into the container’s view hierarchy at the container’s location. Use this when the dynamic component should become part of the container’s logical and visual structure (for example, adding list items or inline UI). + +By contrast, the standalone `createComponent` API does not attach the new component to any existing view or DOM location — it returns a `ComponentRef` and gives you explicit control over where to place the component’s host element. + +```angular-ts +import { Component, input, model, output } from "@angular/core"; + +@Component({ + selector: 'app-warning', + template: ` + @if(isExpanded()) { +
+

Warning: Action needed!

+ +
+ } + ` +}) +export class AppWarningComponent { + readonly canClose = input.required(); + readonly isExpanded = model(); + readonly close = output(); +} +``` + +```ts +import { Component, ViewContainerRef, signal, inputBinding, outputBinding, twoWayBinding, inject } from '@angular/core'; +import { FocusTrap } from "@angular/cdk/a11y"; +import { ThemeDirective } from '../theme.directive'; + +@Component({ + template: `` +}) +export class HostComponent { + private vcr = inject(ViewContainerRef); + readonly canClose = signal(true); + readonly isExpanded = signal(true); + + showWarning() { + const compRef = this.vcr.createComponent(AppWarningComponent, { + bindings: [ + inputBinding('canClose', this.canClose), + twoWayBinding('isExpanded', this.isExpanded), + outputBinding('close', (confirmed) => { + console.log('Closed with result:', confirmed); + }) + ], + directives: [ + FocusTrap, + { type: ThemeDirective, bindings: [inputBinding('theme', () => 'warning')] } + ] + }); + } +} +``` + +In the example above, the dynamic **AppWarningComponent** is created with its `canClose` input bound to a reactive signal, a two-way binding on its `isExpanded` state, and an output listener for `close`. The `FocusTrap` and `ThemeDirective` are attached to the host element via `directives`. + +### Popup attached to `document.body` with `createComponent` + `hostElement` + +Use this when rendering outside the current view hierarchy (e.g., overlays). The provided `hostElement` becomes the component’s host in the DOM, so Angular doesn’t create a new element matching the selector. Lets you configure **bindings** directly. + +```ts +import { + ApplicationRef, + createComponent, + EnvironmentInjector, + inject, + Injectable, + inputBinding, + outputBinding, +} from '@angular/core'; +import { PopupComponent } from './popup.component'; + +@Injectable({ providedIn: 'root' }) +export class PopupService { + private readonly injector = inject(EnvironmentInjector); + private readonly appRef = inject(ApplicationRef); + + show(message: string) { + // Create a host element for the popup + const host = document.createElement('popup-host'); + + // Create the component and bind in one call + const ref = createComponent(PopupComponent, { + environmentInjector: this.injector, + hostElement: host, + bindings: [ + inputBinding('message', () => message), + outputBinding('closed', () => { + document.body.removeChild(host); + this.appRef.detachView(ref.hostView); + ref.destroy(); + }), + ], + }); + + // Registers the component’s view so it participates in change detection cycle. + this.appRef.attachView(ref.hostView); + // Inserts the provided host element into the DOM (outside the normal Angular view hierarchy). + // This is what makes the popup visible on screen, typically used for overlays or modals. + document.body.appendChild(host); + } +} +``` diff --git a/adev/src/content/guide/di/dependency-injection-context.md b/adev/src/content/guide/di/dependency-injection-context.md index b242b87d2c8..c011766e5bb 100644 --- a/adev/src/content/guide/di/dependency-injection-context.md +++ b/adev/src/content/guide/di/dependency-injection-context.md @@ -5,11 +5,11 @@ This means that injectors can only work when code is executed in such a context. The injection context is available in these situations: -* During construction (via the `constructor`) of a class being instantiated by the DI system, such as an `@Injectable` or `@Component`. -* In the initializer for fields of such classes. -* In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`. -* In the `factory` function specified for an `InjectionToken`. -* Within a stack frame that runs in an injection context. +- During construction (via the `constructor`) of a class being instantiated by the DI system, such as an `@Injectable` or `@Component`. +- In the initializer for fields of such classes. +- In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`. +- In the `factory` function specified for an `InjectionToken`. +- Within a stack frame that runs in an injection context. Knowing when you are in an injection context will allow you to use the [`inject`](api/core/inject) function to inject instances. @@ -66,7 +66,32 @@ Note that `inject` will return an instance only if the injector can resolve the ## Asserts the context -Angular provides the `assertInInjectionContext` helper function to assert that the current context is an injection context. +Angular provides the `assertInInjectionContext` helper function to assert that the current context is an injection context and throws a clear error if not. Pass a reference to the calling function so the error message points to the correct API entry point. This produces a clearer, more actionable message than the default generic injection error. + +```ts +import { ElementRef, assertInInjectionContext, inject } from '@angular/core'; + +export function injectNativeElement(): T { + assertInInjectionContext(injectNativeElement); + return inject(ElementRef).nativeElement; +} +``` + +You can then call this helper **from an injection context** (constructor, field initializer, provider factory, or code executed via `runInInjectionContext`): + +```ts +import { Component, inject } from '@angular/core'; +import { injectNativeElement } from './dom-helpers'; + +@Component({ /* … */ }) +export class PreviewCard { + readonly hostEl = injectNativeElement(); // Field initializer runs in an injection context. + + onAction() { + const anotherRef = injectNativeElement(); // Fails: runs outside an injection context. + } +} +``` ## Using DI outside of a context diff --git a/adev/src/content/guide/drag-drop.md b/adev/src/content/guide/drag-drop.md index 50f89e33652..64d4fc4afec 100644 --- a/adev/src/content/guide/drag-drop.md +++ b/adev/src/content/guide/drag-drop.md @@ -34,7 +34,6 @@ import {CdkDrag} from '@angular/cdk/drag-drop'; @Component({ selector: 'my-custom-component', templateUrl: 'my-custom-component.html', - standalone: true, imports: [CdkDrag], }) export class DragDropExample {} diff --git a/adev/src/content/guide/elements.md b/adev/src/content/guide/elements.md index 9d2a298ff80..9cd53266574 100644 --- a/adev/src/content/guide/elements.md +++ b/adev/src/content/guide/elements.md @@ -18,22 +18,22 @@ Once a custom element is added to the DOM for any page, it looks and behaves lik To add the `@angular/elements` package to your workspace, run the following command: - +```shell npm install @angular/elements --save - +``` ### How it works The `createCustomElement()` function converts a component into a class that can be registered with the browser as a custom element. After you register your configured class with the browser's custom-element registry, use the new element just like a built-in HTML element in content that you add directly into the DOM: - +```html - +``` When your custom element is placed on a page, the browser creates an instance of the registered class and adds it to the DOM. The content is provided by the component's template, which uses Angular template syntax, and is rendered using the component and DOM data. @@ -58,14 +58,14 @@ One regular Angular component and a second one using the custom element. A custom element _hosts_ an Angular component, providing a bridge between the data and logic defined in the component and standard DOM APIs. Component properties and logic maps directly into HTML attributes and the browser's event system. -* The creation API parses the component looking for input properties, and defines corresponding attributes for the custom element. +- The creation API parses the component looking for input properties, and defines corresponding attributes for the custom element. It transforms the property names to make them compatible with custom elements, which do not recognize case distinctions. The resulting attribute names use dash-separated lowercase. For example, for a component with `inputProp = input({alias: 'myInputProp'})`, the corresponding custom element defines an attribute `my-input-prop`. -* Component outputs are dispatched as HTML [Custom Events](https://developer.mozilla.org/docs/Web/API/CustomEvent), with the name of the custom event matching the output name. - For example, for a component `with valueChanged = output()`, the corresponding custom element dispatches events with the name "valueChanged", and the emitted data is stored on the event's `detail` property. - If you provide an alias, that value is used; for example, `clicks = output({alias: 'myClick'});` results in dispatch events with the name "myClick". +- Component outputs are dispatched as HTML [Custom Events](https://developer.mozilla.org/docs/Web/API/CustomEvent), with the name of the custom event matching the output name. + For example, for a component `with valueChanged = output()`, the corresponding custom element dispatches events with the name "valueChanged", and the emitted data is stored on the event's `detail` property. + If you provide an alias, that value is used; for example, `clicks = output({alias: 'myClick'});` results in dispatch events with the name "myClick". For more information, see Web Component documentation for [Creating custom events](https://developer.mozilla.org/docs/Web/Guide/Events/Creating_and_triggering_events#Creating_custom_events). @@ -109,33 +109,33 @@ For example, our `popup-element` has a `message` property of type `string`. There are a few options if you want to get correct types for your custom elements. Assume you create a `my-dialog` custom element based on the following component: - +```ts @Component(…) class MyDialog { content = input(string); } - +``` The most straightforward way to get accurate typings is to cast the return value of the relevant DOM methods to the correct type. For that, use the `NgElement` and `WithProperties` types \(both exported from `@angular/elements`\): - +```ts const aDialog = document.createElement('my-dialog') as NgElement & WithProperties<{content: string}>; aDialog.content = 'Hello, world!'; -aDialog.content = 123; // <-- ERROR: TypeScript knows this should be a string. -aDialog.body = 'News'; // <-- ERROR: TypeScript knows there is no `body` property on `aDialog`. +aDialog.content = 123; // <-- ERROR: TypeScript knows this should be a string. +aDialog.body = 'News'; // <-- ERROR: TypeScript knows there is no `body` property on `aDialog`. - +``` This is a good way to quickly get TypeScript features, such as type checking and autocomplete support, for your custom element. But it can get cumbersome if you need it in several places, because you have to cast the return type on every occurrence. An alternative way, that only requires defining each custom element's type once, is augmenting the `HTMLElementTagNameMap`, which TypeScript uses to infer the type of a returned element based on its tag name \(for DOM methods such as `document.createElement()`, `document.querySelector()`, etc.\): - +```ts declare global { interface HTMLElementTagNameMap { @@ -145,18 +145,18 @@ declare global { } } - +``` Now, TypeScript can infer the correct type the same way it does for built-in elements: - +```ts document.createElement('div') //--> HTMLDivElement (built-in element) document.querySelector('foo') //--> Element (unknown element) document.createElement('my-dialog') //--> NgElement & WithProperties<{content: string}> (custom element) document.querySelector('my-other-element') //--> NgElement & WithProperties<{foo: 'bar'}> (custom element) - +``` ## Limitations diff --git a/adev/src/content/guide/forms/reactive-forms.md b/adev/src/content/guide/forms/reactive-forms.md index d1fd267e928..8c091c0174c 100644 --- a/adev/src/content/guide/forms/reactive-forms.md +++ b/adev/src/content/guide/forms/reactive-forms.md @@ -388,6 +388,135 @@ Initially, the form contains one `Alias` field. To add another field, click the +## Unified control state change events + +All form controls expose a single unified stream of **control state change events** through the `events` observable on `AbstractControl` (`FormControl`, `FormGroup`, `FormArray`, and `FormRecord`). +This unified stream lets you react to **value**, **status**, **pristine**, **touched** and **reset** state changes and also for **form-level actions** such as **submit** , allowing you to handle all updates with a one subscription instead of wiring multiple observables. + +### Event types + +Each item emitted by `events` is an instance of a specific event class: + +- **`ValueChangeEvent`** — when the control’s **value** changes. +- **`StatusChangeEvent`** — when the control’s **validation status** updates to one of the `FormControlStatus` values (`VALID`, `INVALID`, `PENDING`, or `DISABLED`). +- **`PristineChangeEvent`** — when the control’s **pristine/dirty** state changes. +- **`TouchedChangeEvent`** — when the control’s **touched/untouched** state changes. +- **`FormResetEvent`** — when a control or form is reset, either via the `reset()` API or a native action. +- **`FormSubmittedEvent`** — when the form is submitted. + +All event classes extend `ControlEvent` and include a `source` reference to the `AbstractControl` that originated the change, which is useful in large forms. + +```ts +import { Component } from '@angular/core'; +import { + FormControl, + ValueChangeEvent, + StatusChangeEvent, + PristineChangeEvent, + TouchedChangeEvent, + FormResetEvent, + FormSubmittedEvent, + ReactiveFormsModule, + FormGroup, +} from '@angular/forms'; + +@Component({/* ... */ }) +export class UnifiedEventsBasicComponent { + form = new FormGroup({ + username: new FormControl(''), + }); + + constructor() { + this.form.events.subscribe((e) => { + if (e instanceof ValueChangeEvent) { + console.log('Value changed to: ', e.value); + } + + if (e instanceof StatusChangeEvent) { + console.log('Status changed to: ', e.status); + } + + if (e instanceof PristineChangeEvent) { + console.log('Pristine status changed to: ', e.pristine); + } + + if (e instanceof TouchedChangeEvent) { + console.log('Touched status changed to: ', e.touched); + } + + if (e instanceof FormResetEvent) { + console.log('Form was reset'); + } + + if (e instanceof FormSubmittedEvent) { + console.log('Form was submitted'); + } + }); + } +} +``` + +### Filtering specific events + +Prefer RxJS operators when you only need a subset of event types. + +```ts +import { filter } from 'rxjs/operators'; +import { StatusChangeEvent } from '@angular/forms'; + +control.events + .pipe(filter((e) => e instanceof StatusChangeEvent)) + .subscribe((e) => console.log('Status:', e.status)); +``` + +### Unifying from multiple subscriptions + +**Before** + +```ts +import { combineLatest } from 'rxjs/operators'; + +combineLatest([control.valueChanges, control.statusChanges]) + .subscribe(([value, status]) => { /* ... */ }); +``` + +**After** + +```ts +control.events.subscribe((e) => { + // Handle ValueChangeEvent, StatusChangeEvent, etc. +}); +``` + +NOTE: On value change, the emit happens right after a value of this control is updated. The value of a parent control (for example if this FormControl is a part of a FormGroup) is updated later, so accessing a value of a parent control (using the `value` property) from the callback of this event might result in getting a value that has not been updated yet. Subscribe to the `events` of the parent control instead. + +## Utility functions for narrowing form control types + +Angular provides four utility functions that help determine the concrete type of an `AbstractControl`. These functions act as **type guards** and narrow the control type when they return `true`, which lets you safely access subtype-specific properties inside the same block. + +| Utility function | Details | +| :--------------- | :-------------------------------------------------- | +| `isFormControl` | Returns `true` when the control is a `FormControl`. | +| `isFormGroup` | Returns `true` when the control is a `FormGroup` | +| `isFormRecord` | Returns `true` when the control is a `FormRecord` | +| `isFormArray` | Returns `true` when the control is a `FormArray` | + +These helpers are particularly useful in **custom validators**, where the function signature receives an `AbstractControl`, but the logic is intended for a specific control kind. + +```ts +import { AbstractControl, isFormArray } from '@angular/forms'; + +export function positiveValues(control: AbstractControl) { + if (!isFormArray(control)) { + return null; // Not a FormArray: validator is not applicable. + } + + // Safe to access FormArray-specific API after narrowing. + const hasNegative = control.controls.some(c => c.value < 0); + return hasNegative ? { positiveValues: true } : null; +} +``` + ## Reactive forms API summary The following table lists the base classes and services used to create and manage reactive form controls. diff --git a/adev/src/content/guide/image-optimization.md b/adev/src/content/guide/image-optimization.md index 44abc3ae5fa..74696e59b63 100644 --- a/adev/src/content/guide/image-optimization.md +++ b/adev/src/content/guide/image-optimization.md @@ -4,18 +4,18 @@ The `NgOptimizedImage` directive makes it easy to adopt performance best practic The directive ensures that the loading of the [Largest Contentful Paint (LCP)](http://web.dev/lcp) image is prioritized by: -* Automatically setting the `fetchpriority` attribute on the `` tag -* Lazy loading other images by default -* Automatically generating a preconnect link tag in the document head -* Automatically generating a `srcset` attribute -* Generating a [preload hint](https://developer.mozilla.org/docs/Web/HTML/Link_types/preload) if app is using SSR +- Automatically setting the `fetchpriority` attribute on the `` tag +- Lazy loading other images by default +- Automatically generating a preconnect link tag in the document head +- Automatically generating a `srcset` attribute +- Generating a [preload hint](https://developer.mozilla.org/docs/Web/HTML/Link_types/preload) if app is using SSR In addition to optimizing the loading of the LCP image, `NgOptimizedImage` enforces a number of image best practices, such as: -* Using [image CDN URLs to apply image optimizations](https://web.dev/image-cdns/#how-image-cdns-use-urls-to-indicate-optimization-options) -* Preventing layout shift by requiring `width` and `height` -* Warning if `width` or `height` have been set incorrectly -* Warning if the image will be visually distorted when rendered +- Using [image CDN URLs to apply image optimizations](https://web.dev/image-cdns/#how-image-cdns-use-urls-to-indicate-optimization-options) +- Preventing layout shift by requiring `width` and `height` +- Warning if `width` or `height` have been set incorrectly +- Warning if the image will be visually distorted when rendered If you're using a background image in CSS, [start here](#how-to-migrate-your-background-image). @@ -27,20 +27,20 @@ If you're using a background image in CSS, [start here](#how-to-migrate-your-bac Import `NgOptimizedImage` directive from `@angular/common`: - +```ts import { NgOptimizedImage } from '@angular/common' - +``` and include it into the `imports` array of a standalone component or an NgModule: - - +```ts imports: [ NgOptimizedImage, // ... ], +``` @@ -52,39 +52,39 @@ A brief guide for setting up a loader can be found in the [Configuring an Image To activate the `NgOptimizedImage` directive, replace your image's `src` attribute with `ngSrc`. - +```html - +``` If you're using a [built-in third-party loader](#built-in-loaders), make sure to omit the base URL path from `src`, as that will be prepended automatically by the loader. Always mark the [LCP image](https://web.dev/lcp/#what-elements-are-considered) on your page as `priority` to prioritize its loading. - +```html - +``` Marking an image as `priority` applies the following optimizations: -* Sets `fetchpriority=high` (read more about priority hints [here](https://web.dev/priority-hints)) -* Sets `loading=eager` (read more about native lazy loading [here](https://web.dev/browser-level-image-lazy-loading)) -* Automatically generates a [preload link element](https://developer.mozilla.org/docs/Web/HTML/Link_types/preload) if [rendering on the server](guide/ssr). +- Sets `fetchpriority=high` (read more about priority hints [here](https://web.dev/priority-hints)) +- Sets `loading=eager` (read more about native lazy loading [here](https://web.dev/browser-level-image-lazy-loading)) +- Automatically generates a [preload link element](https://developer.mozilla.org/docs/Web/HTML/Link_types/preload) if [rendering on the server](guide/ssr). Angular displays a warning during development if the LCP element is an image that does not have the `priority` attribute. A page’s LCP element can vary based on a number of factors - such as the dimensions of a user's screen, so a page may have multiple images that should be marked `priority`. See [CSS for Web Vitals](https://web.dev/css-web-vitals/#images-and-largest-contentful-paint-lcp) for more details. In order to prevent [image-related layout shifts](https://web.dev/css-web-vitals/#images-and-layout-shifts), NgOptimizedImage requires that you specify a height and width for your image, as follows: - +```html - +``` For **responsive images** (images which you've styled to grow and shrink relative to the viewport), the `width` and `height` attributes should be the intrinsic size of the image file. For responsive images it's also important to [set a value for `sizes`.](#responsive-images) @@ -100,11 +100,11 @@ In cases where you want to have an image fill a containing element, you can use When you add the `fill` attribute to your image, you do not need and should not include a `width` and `height`, as in this example: - +```html - +``` You can use the [object-fit](https://developer.mozilla.org/docs/Web/CSS/object-fit) CSS property to change how the image will fill its container. If you style your image with `object-fit: "contain"`, the image will maintain its aspect ratio and be "letterboxed" to fit the element. If you set `object-fit: "cover"`, the element will retain its aspect ratio, fully fill the element, and some content may be "cropped" off. @@ -118,32 +118,31 @@ IMPORTANT: For the "fill" image to render properly, its parent element **must** Here's a simple step-by-step process for migrating from `background-image` to `NgOptimizedImage`. For these steps, we'll refer to the element that has an image background as the "containing element": -1) Remove the `background-image` style from the containing element. -2) Ensure that the containing element has `position: "relative"`, `position: "fixed"`, or `position: "absolute"`. -3) Create a new image element as a child of the containing element, using `ngSrc` to enable the `NgOptimizedImage` directive. -4) Give that element the `fill` attribute. Do not include a `height` and `width`. -5) If you believe this image might be your [LCP element](https://web.dev/lcp/), add the `priority` attribute to the image element. +1. Remove the `background-image` style from the containing element. +2. Ensure that the containing element has `position: "relative"`, `position: "fixed"`, or `position: "absolute"`. +3. Create a new image element as a child of the containing element, using `ngSrc` to enable the `NgOptimizedImage` directive. +4. Give that element the `fill` attribute. Do not include a `height` and `width`. +5. If you believe this image might be your [LCP element](https://web.dev/lcp/), add the `priority` attribute to the image element. You can adjust how the background image fills the container as described in the [Using fill mode](#using-fill-mode) section. - ## Using placeholders ### Automatic placeholders NgOptimizedImage can display an automatic low-resolution placeholder for your image if you're using a CDN or image host that provides automatic image resizing. Take advantage of this feature by adding the `placeholder` attribute to your image: - +```html - +``` Adding this attribute automatically requests a second, smaller version of the image using your specified image loader. This small image will be applied as a `background-image` style with a CSS blur while your image loads. If no image loader is provided, no placeholder image can be generated and an error will be thrown. The default size for generated placeholders is 30px wide. You can change this size by specifying a pixel value in the `IMAGE_CONFIG` provider, as seen below: - +```ts providers: [ { provide: IMAGE_CONFIG, @@ -152,7 +151,7 @@ providers: [ } }, ], - +``` If you want sharp edges around your blurred placeholder, you can wrap your image in a containing `
` with the `overflow: hidden` style. As long as the `
` is the same size as the image (such as by using the `width: fit-content` style), the "fuzzy edges" of the placeholder will be hidden. @@ -160,7 +159,7 @@ If you want sharp edges around your blurred placeholder, you can wrap your image You can also specify a placeholder using a base64 [data URL](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) without an image loader. The data url format is `data:image/[imagetype];[data]`, where `[imagetype]` is the image format, just as `png`, and `[data]` is a base64 encoding of the image. That encoding can be done using the command line or in JavaScript. For specific commands, see [the MDN documentation](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URLs#encoding_data_into_base64_format). An example of a data URL placeholder with truncated data is shown below: - +```html - +``` -However, large data URLs increase the size of your Angular bundles and slow down page load. If you cannot use an image loader, the Angular team recommends keeping base64 placeholder images smaller than 4KB and using them exclusively on critical images. In addition to decreasing placeholder dimensions, consider changing image formats or parameters used when saving images. At very low resolutions, these parameters can have a large effect on file size. +However, large data URLs increase the size of your Angular bundles and slow down page load. If you cannot use an image loader, the Angular team recommends keeping base64 placeholder images smaller than 4KB and using them exclusively on critical images. In addition to decreasing placeholder dimensions, consider changing image formats or parameters used when saving images. At very low resolutions, these parameters can have a large effect on file size. ### Non-blurred placeholders By default, NgOptimizedImage applies a CSS blur effect to image placeholders. To render a placeholder without blur, provide a `placeholderConfig` argument with an object that includes the `blur` property, set to false. For example: - - +```html - - +``` ## Adjusting image styling @@ -207,36 +204,35 @@ A [`preconnect` resource hint](https://web.dev/preconnect-and-dns-prefetch) for Preconnect links are automatically generated for domains provided as an argument to a [loader](#optional-set-up-a-loader). If an image origin cannot be automatically identified, and no preconnect link is detected for the LCP image, `NgOptimizedImage` will warn during development. In that case, you should manually add a resource hint to `index.html`. Within the `` of the document, add a `link` tag with `rel="preconnect"`, as shown below: - +```html - - +``` To disable preconnect warnings, inject the `PRECONNECT_CHECK_BLOCKLIST` token: - +```ts providers: [ - {provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'} +{provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'} ], - +``` See more information on automatic preconnect generation [here](#why-is-a-preconnect-element-not-being-generated-for-my-image-domain). - ### Request images at the correct size with automatic `srcset` Defining a [`srcset` attribute](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/srcset) ensures that the browser requests an image at the right size for your user's viewport, so it doesn't waste time downloading an image that's too large. `NgOptimizedImage` generates an appropriate `srcset` for the image, based on the presence and value of the [`sizes` attribute](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/sizes) on the image tag. #### Fixed-size images -If your image should be "fixed" in size (i.e. the same size across devices, except for [pixel density](https://web.dev/codelab-density-descriptors/)), there is no need to set a `sizes` attribute. A `srcset` can be generated automatically from the image's width and height attributes with no further input required. +If your image should be "fixed" in size (i.e. the same size across devices, except for [pixel density](https://web.dev/codelab-density-descriptors/)), there is no need to set a `sizes` attribute. A `srcset` can be generated automatically from the image's width and height attributes with no further input required. Example srcset generated: -```angular-html + +```html ``` @@ -256,7 +252,7 @@ By default, the responsive breakpoints are: If you would like to customize these breakpoints, you can do so using the `IMAGE_CONFIG` provider: - +```ts providers: [ { provide: IMAGE_CONFIG, @@ -265,53 +261,80 @@ providers: [ } }, ], - +``` If you would like to manually define a `srcset` attribute, you can provide your own using the `ngSrcset` attribute: - +```html - +``` If the `ngSrcset` attribute is present, `NgOptimizedImage` generates and sets the `srcset` based on the sizes included. Do not include image file names in `ngSrcset` - the directive infers this information from `ngSrc`. The directive supports both width descriptors (e.g. `100w`) and density descriptors (e.g. `1x`). - +```html - +``` ### Disabling automatic srcset generation To disable srcset generation for a single image, you can add the `disableOptimizedSrcset` attribute on the image: - +```html - +``` ### Disabling image lazy loading By default, `NgOptimizedImage` sets `loading=lazy` for all images that are not marked `priority`. You can disable this behavior for non-priority images by setting the `loading` attribute. This attribute accepts values: `eager`, `auto`, and `lazy`. [See the documentation for the standard image `loading` attribute for details](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/loading#value). - +```html - +``` + +### Controlling image decoding + +By default, `NgOptimizedImage` sets `decoding="auto"` for all images. This allows the browser to decide the optimal time to decode an image after it has been fetched. When an image is marked as `priority`, Angular automatically sets `decoding="sync"` to ensure the image is decoded and painted as early as possible helping improve **Largest Contentful Paint (LCP)** performance. + +You can still override this behavior by explicitly setting the `decoding` attribute. +[See the documentation for the standard image `decoding` attribute for details](https://developer.mozilla.org/docs/Web/HTML/Element/img#decoding). + +```html + + + + + + + + + + + +``` + +**Allowed values** + +- `auto` (default): lets the browser choose the optimal strategy. +- `async`: decodes the image asynchronously, avoiding main‑thread blocking where possible. +- `sync`: decodes the image immediately; can block rendering but ensures pixels are ready as soon as the image is available. ### Advanced 'sizes' values You may want to have images displayed at varying widths on differently-sized screens. A common example of this pattern is a grid- or column-based layout that renders a single column on mobile devices, and two columns on larger devices. You can capture this behavior in the `sizes` attribute, using a "media query" syntax, such as the following: - +```html - +``` The `sizes` attribute in the above example says "I expect this image to be 100 percent of the screen width on devices under 768px wide. Otherwise, I expect it to be 50 percent of the screen width. @@ -323,21 +346,21 @@ A "loader" is a function that generates an [image transformation URL](https://we `NgOptimizedImage` provides both a generic loader that applies no transformations, as well as loaders for various third-party image services. It also supports writing your own custom loader. -| Loader type| Behavior | -|:--- |:--- | -| Generic loader | The URL returned by the generic loader will always match the value of `src`. In other words, this loader applies no transformations. Sites that use Angular to serve images are the primary intended use case for this loader.| -| Loaders for third-party image services | The URL returned by the loaders for third-party image services will follow API conventions used by that particular image service. | -| Custom loaders | A custom loader's behavior is defined by its developer. You should use a custom loader if your image service isn't supported by the loaders that come preconfigured with `NgOptimizedImage`.| +| Loader type | Behavior | +| :------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Generic loader | The URL returned by the generic loader will always match the value of `src`. In other words, this loader applies no transformations. Sites that use Angular to serve images are the primary intended use case for this loader. | +| Loaders for third-party image services | The URL returned by the loaders for third-party image services will follow API conventions used by that particular image service. | +| Custom loaders | A custom loader's behavior is defined by its developer. You should use a custom loader if your image service isn't supported by the loaders that come preconfigured with `NgOptimizedImage`. | Based on the image services commonly used with Angular applications, `NgOptimizedImage` provides loaders preconfigured to work with the following image services: -| Image Service | Angular API | Documentation | -|:--- |:--- |:--- | -| Cloudflare Image Resizing | `provideCloudflareLoader` | [Documentation](https://developers.cloudflare.com/images/image-resizing/) | -| Cloudinary | `provideCloudinaryLoader` | [Documentation](https://cloudinary.com/documentation/resizing_and_cropping) | -| ImageKit | `provideImageKitLoader` | [Documentation](https://docs.imagekit.io/) | -| Imgix | `provideImgixLoader` | [Documentation](https://docs.imgix.com/) | -| Netlify | `provideNetlifyLoader` | [Documentation](https://docs.netlify.com/image-cdn/overview/) | +| Image Service | Angular API | Documentation | +| :------------------------ | :------------------------ | :-------------------------------------------------------------------------- | +| Cloudflare Image Resizing | `provideCloudflareLoader` | [Documentation](https://developers.cloudflare.com/images/image-resizing/) | +| Cloudinary | `provideCloudinaryLoader` | [Documentation](https://cloudinary.com/documentation/resizing_and_cropping) | +| ImageKit | `provideImageKitLoader` | [Documentation](https://docs.imagekit.io/) | +| Imgix | `provideImgixLoader` | [Documentation](https://docs.imgix.com/) | +| Netlify | `provideNetlifyLoader` | [Documentation](https://docs.netlify.com/image-cdn/overview/) | To use the **generic loader** no additional code changes are necessary. This is the default behavior. @@ -345,17 +368,17 @@ To use the **generic loader** no additional code changes are necessary. This is To use an existing loader for a **third-party image service**, add the provider factory for your chosen service to the `providers` array. In the example below, the Imgix loader is used: - +```ts providers: [ provideImgixLoader('https://my.base.url/'), ], - +``` The base URL for your image assets should be passed to the provider factory as an argument. For most sites, this base URL should match one of the following patterns: -* -* -* +- +- +- You can learn more about the base URL structure in the docs of a corresponding CDN provider. @@ -363,7 +386,7 @@ You can learn more about the base URL structure in the docs of a corresponding C To use a **custom loader**, provide your loader function as a value for the `IMAGE_LOADER` DI token. In the example below, the custom loader function returns a URL starting with `https://example.com` that includes `src` and `width` as URL parameters. - +```ts providers: [ { provide: IMAGE_LOADER, @@ -372,7 +395,7 @@ providers: [ }, }, ], - +``` A loader function for the `NgOptimizedImage` directive takes an object with the `ImageLoaderConfig` type (from `@angular/common`) as its argument and returns the absolute URL of the image asset. The `ImageLoaderConfig` object contains the `src` property, and optional `width` and `loaderParams` properties. @@ -388,7 +411,7 @@ A common use for `loaderParams` is controlling advanced image CDN features. The following shows an example of a custom loader function. This example function concatenates `src` and `width`, and uses `loaderParams` to control a custom CDN feature for rounded corners: - +```ts const myCustomLoader = (config: ImageLoaderConfig) => { let url = `https://example.com/images/${config.src}?`; let queryParams = []; @@ -400,15 +423,15 @@ const myCustomLoader = (config: ImageLoaderConfig) => { } return url + queryParams.join('&'); }; - +``` Note that in the above example, we've invented the 'roundedCorners' property name to control a feature of our custom loader. We could then use this feature when creating an image, as follows: - +```html - +``` ## Frequently Asked Questions @@ -423,17 +446,17 @@ For a step-by-step process for migration from `background-image` to `NgOptimized The `ngSrc` attribute was chosen as the trigger for NgOptimizedImage due to technical considerations around how images are loaded by the browser. NgOptimizedImage makes programmatic changes to the `loading` attribute -- if the browser sees the `src` attribute before those changes are made, it will begin eagerly downloading the image file, and the loading changes will be ignored. ### Why is a preconnect element not being generated for my image domain? + Preconnect generation is performed based on static analysis of your application. That means that the image domain must be directly included in the loader parameter, as in the following example: - +```ts providers: [ provideImgixLoader('https://my.base.url/'), ], - +``` If you use a variable to pass the domain string to the loader, or you're not using a loader, the static analysis will not be able to identify the domain, and no preconnect link will be generated. In this case you should manually add a preconnect link to the document head, as [described above](#add-resource-hints). - ### Can I use two different image domains in the same page? The [image loaders](#configuring-an-image-loader-for-ngoptimizedimage) provider pattern is designed to be as simple as possible for the common use case of having only a single image CDN used within a component. However, it's still very possible to manage multiple image CDNs using a single provider. @@ -458,7 +481,7 @@ If you're waiting on this feature, please upvote the Github issue [here](https:/ 3. Once the profiling result is available, select "LCP" in the timings section. -4. A summary entry should appear in the panel at the bottom. You can find the LCP element in the row for "related node". Clicking on it will reveal the element in the Elements panel. +4. A summary entry should appear in the panel at the bottom. You can find the LCP element in the row for "related node". Clicking on it will reveal the element in the Elements panel. LCP in the Chrome DevTools diff --git a/adev/src/content/guide/routing/customizing-route-behavior.md b/adev/src/content/guide/routing/customizing-route-behavior.md index 6ae475fc59d..94ac76f94d2 100644 --- a/adev/src/content/guide/routing/customizing-route-behavior.md +++ b/adev/src/content/guide/routing/customizing-route-behavior.md @@ -339,7 +339,7 @@ export const routes: Routes = [ The component receives the extracted parameters through route inputs: -```ts +```angular-ts import { Component, input, inject } from '@angular/core'; import { resource } from '@angular/core'; diff --git a/adev/src/content/guide/routing/route-guards.md b/adev/src/content/guide/routing/route-guards.md index b25e9eb480e..774e5f91296 100644 --- a/adev/src/content/guide/routing/route-guards.md +++ b/adev/src/content/guide/routing/route-guards.md @@ -187,7 +187,7 @@ const routes: Routes = [ children: [ // /users/list - PROTECTED { path: 'list', component: UserListComponent }, - // /useres/detail/:id - PROTECTED + // /users/detail/:id - PROTECTED { path: 'detail/:id', component: UserDetailComponent } ] }, diff --git a/adev/src/content/guide/security.md b/adev/src/content/guide/security.md index 6ad5dffac34..212aa4fac73 100644 --- a/adev/src/content/guide/security.md +++ b/adev/src/content/guide/security.md @@ -51,7 +51,7 @@ For this reason, it is strongly encouraged to take advantage of these features. ### Sanitization and security contexts -*Sanitization* is the inspection of an untrusted value, turning it into a value that's safe to insert into the DOM. +_Sanitization_ is the inspection of an untrusted value, turning it into a value that's safe to insert into the DOM. In many cases, sanitization doesn't change a value at all. Sanitization depends on a context. For example, a value that's harmless in CSS is potentially dangerous in a URL. @@ -107,11 +107,11 @@ If in doubt, find a professional security reviewer. To mark a value as trusted, inject `DomSanitizer` and call one of the following methods: -* `bypassSecurityTrustHtml` -* `bypassSecurityTrustScript` -* `bypassSecurityTrustStyle` -* `bypassSecurityTrustUrl` -* `bypassSecurityTrustResourceUrl` +- `bypassSecurityTrustHtml` +- `bypassSecurityTrustScript` +- `bypassSecurityTrustStyle` +- `bypassSecurityTrustUrl` +- `bypassSecurityTrustResourceUrl` Remember, whether a value is safe depends on context, so choose the right context for your intended use of the value. Imagine that the following template needs to bind a URL to a `javascript:alert(...)` call: @@ -142,21 +142,19 @@ Read more about content security policy at the [Web Fundamentals guide](https:// The minimal policy required for a brand-new Angular application is: - - +```txt default-src 'self'; style-src 'self' 'nonce-randomNonceGoesHere'; script-src 'self' 'nonce-randomNonceGoesHere'; +``` - - -When serving your Angular application, the server should include a randomly-generated nonce in the HTTP header for each request. +When serving your Angular application, the server should include a randomly-generated nonce in the HTTP header for each request. You must provide this nonce to Angular so that the framework can render `