import { e as e2 } from "./chunk-FZQZIM7U.js"; import { o as o2, s as s2 } from "./chunk-VGWC3IKZ.js"; import { e } from "./chunk-UVVU4UUO.js"; import { a, i, l, o, r } from "./chunk-ZYRIJWLX.js"; import { s3 as s } from "./chunk-E5O6P5I2.js"; // node_modules/@arcgis/core/layers/effects/colorMatrixFunctions.js var r2 = (r3, s4) => { const o4 = s2(r3, s4, 0, 0, 0, 0, s4, 0, 0, 0, 0, s4, 0, 0, 0, 0, 1); return o2(o4, o4); }; var s3 = (r3, s4) => { const o4 = s2(r3, s4, 0, 0, 0.5 - 0.5 * s4, 0, s4, 0, 0.5 - 0.5 * s4, 0, 0, s4, 0.5 - 0.5 * s4, 0, 0, 0, 1); return o2(o4, o4); }; var o3 = (r3, s4) => { const o4 = 1 - s4, c3 = s2(r3, 0.2126 + 0.7874 * o4, 0.7152 - 0.7152 * o4, 0.0722 - 0.0722 * o4, 0, 0.2126 - 0.2126 * o4, 0.7152 + 0.2848 * o4, 0.0722 - 0.0722 * o4, 0, 0.2126 - 0.2126 * o4, 0.7152 - 0.7152 * o4, 0.0722 + 0.9278 * o4, 0, 0, 0, 0, 1); return o2(c3, c3); }; var c = (r3, s4) => { const o4 = Math.sin(s4 * Math.PI / 180), c3 = Math.cos(s4 * Math.PI / 180), e6 = s2(r3, 0.213 + 0.787 * c3 - 0.213 * o4, 0.715 - 0.715 * c3 - 0.715 * o4, 0.072 - 0.072 * c3 + 0.928 * o4, 0, 0.213 - 0.213 * c3 + 0.143 * o4, 0.715 + 0.285 * c3 + 0.14 * o4, 0.072 - 0.072 * c3 - 0.283 * o4, 0, 0.213 - 0.213 * c3 - 0.787 * o4, 0.715 - 0.715 * c3 + 0.715 * o4, 0.072 + 0.928 * c3 + 0.072 * o4, 0, 0, 0, 0, 1); return o2(e6, e6); }; var e3 = (r3, s4) => { const o4 = 1 - 2 * s4, c3 = s2(r3, o4, 0, 0, s4, 0, o4, 0, s4, 0, 0, o4, s4, 0, 0, 0, 1); return o2(c3, c3); }; var u = (r3, s4) => { const o4 = s2(r3, 0.213 + 0.787 * s4, 0.715 - 0.715 * s4, 0.072 - 0.072 * s4, 0, 0.213 - 0.213 * s4, 0.715 + 0.285 * s4, 0.072 - 0.072 * s4, 0, 0.213 - 0.213 * s4, 0.715 - 0.715 * s4, 0.072 + 0.928 * s4, 0, 0, 0, 0, 1); return o2(o4, o4); }; var a2 = (r3, s4) => { const o4 = 1 - s4, c3 = s2(r3, 0.393 + 0.607 * o4, 0.769 - 0.769 * o4, 0.189 - 0.189 * o4, 0, 0.349 - 0.349 * o4, 0.686 + 0.314 * o4, 0.168 - 0.168 * o4, 0, 0.272 - 0.272 * o4, 0.534 - 0.534 * o4, 0.131 + 0.869 * o4, 0, 0, 0, 0, 1); return o2(c3, c3); }; // node_modules/@arcgis/core/layers/effects/effects.js var c2 = class { constructor(t, s4, r3) { this.strength = t, this.radius = s4, this.threshold = r3, this.type = "bloom"; } interpolate(t, s4, r3) { this.strength = M(t.strength, s4.strength, r3), this.radius = M(t.radius, s4.radius, r3), this.threshold = M(t.threshold, s4.threshold, r3); } clone() { return new c2(this.strength, this.radius, this.threshold); } toJSON() { return { type: "bloom", radius: y(this.radius), strength: this.strength, threshold: this.threshold }; } }; var l2 = class { constructor(t) { this.radius = t, this.type = "blur"; } interpolate(t, s4, r3) { this.radius = Math.round(M(t.radius, s4.radius, r3)); } clone() { return new l2(this.radius); } toJSON() { return { type: "blur", radius: y(this.radius) }; } }; var p = class { constructor(t, s4) { this.type = t, this.amount = s4, "invert" !== this.type && "grayscale" !== this.type && "sepia" !== this.type || (this.amount = Math.min(this.amount, 1)); } get colorMatrix() { return this._colorMatrix || this._updateMatrix(), this._colorMatrix; } interpolate(t, s4, r3) { this.amount = M(t.amount, s4.amount, r3), this._updateMatrix(); } clone() { return new p(this.type, this.amount); } toJSON() { return { type: this.type, amount: this.amount }; } _updateMatrix() { const t = this._colorMatrix || e2(); switch (this.type) { case "brightness": this._colorMatrix = r2(t, this.amount); break; case "contrast": this._colorMatrix = s3(t, this.amount); break; case "grayscale": this._colorMatrix = o3(t, this.amount); break; case "invert": this._colorMatrix = e3(t, this.amount); break; case "saturate": this._colorMatrix = u(t, this.amount); break; case "sepia": this._colorMatrix = a2(t, this.amount); } } }; var d = class { constructor(t, s4, r3, o4) { this.offsetX = t, this.offsetY = s4, this.blurRadius = r3, this.color = o4, this.type = "drop-shadow"; } interpolate(t, s4, r3) { this.offsetX = M(t.offsetX, s4.offsetX, r3), this.offsetY = M(t.offsetY, s4.offsetY, r3), this.blurRadius = M(t.blurRadius, s4.blurRadius, r3), this.color[0] = Math.round(M(t.color[0], s4.color[0], r3)), this.color[1] = Math.round(M(t.color[1], s4.color[1], r3)), this.color[2] = Math.round(M(t.color[2], s4.color[2], r3)), this.color[3] = M(t.color[3], s4.color[3], r3); } clone() { return new d(this.offsetX, this.offsetY, this.blurRadius, [...this.color]); } toJSON() { const t = [...this.color]; return t[3] *= 255, { type: "drop-shadow", xoffset: y(this.offsetX), yoffset: y(this.offsetY), blurRadius: y(this.blurRadius), color: t }; } }; var m = class { constructor(t) { this.angle = t, this.type = "hue-rotate"; } get colorMatrix() { return this._colorMatrix || this._updateMatrix(), this._colorMatrix; } interpolate(t, s4, r3) { this.angle = M(t.angle, s4.angle, r3), this._updateMatrix(); } clone() { return new m(this.angle); } toJSON() { return { type: "hue-rotate", angle: this.angle }; } _updateMatrix() { const t = this._colorMatrix || e2(); this._colorMatrix = c(t, this.angle); } }; var f = class { constructor(t) { this.amount = t, this.type = "opacity", this.amount = Math.min(this.amount, 1); } interpolate(t, s4, r3) { this.amount = M(t.amount, s4.amount, r3); } clone() { return new f(this.amount); } toJSON() { return { type: "opacity", amount: this.amount }; } }; function M(t, s4, r3) { return t + (s4 - t) * r3; } function y(t) { return Math.round(1e3 * e(t)) / 1e3; } function x(s4) { switch (s4.type) { case "grayscale": case "sepia": case "invert": return new p(s4.type, 0); case "saturate": case "brightness": case "contrast": return new p(s4.type, 1); case "opacity": return new f(1); case "hue-rotate": return new m(0); case "blur": return new l2(0); case "drop-shadow": return new d(0, 0, 0, [...l("transparent")]); case "bloom": return new c2(0, 0, 1); } } // node_modules/@arcgis/core/layers/effects/utils.js function n(t, n2) { const e6 = t.length > n2.length ? t : n2; return (t.length > n2.length ? n2 : t).every((t2, n3) => t2.type === e6[n3].type); } function e4(n2, e6) { const h2 = n2.length > e6.length ? n2 : e6, l3 = n2.length > e6.length ? e6 : n2; for (let g2 = l3.length; g2 < h2.length; g2++) l3.push(x(h2[g2])); } function h(t) { const n2 = t[0]; return !!n2 && "type" in n2; } // node_modules/@arcgis/core/layers/effects/parser.js var m2; var g; var v = { exports: {} }; function d2(t) { if (!t || 0 === t.length) return null; if ("string" == typeof t) { const e7 = y2(t); return e7 && 0 !== e7.length ? e7 : null; } const e6 = t.map((t2) => { if (!Number.isFinite(t2.scale) || t2.scale <= 0) throw new s("effect:invalid-scale", "scale must be finite and greater than 0", { stop: t2 }); return { scale: t2.scale, effects: y2(t2.value) }; }); e6.sort((t2, e7) => e7.effects.length - t2.effects.length); for (let r3 = 0; r3 < e6.length - 1; r3++) { if (!n(e6[r3].effects, e6[r3 + 1].effects)) throw new s("effect:interpolation-impossible", "Cannot interpolate by scale between 2 lists of mixed effects", { a: e6[r3].effects, b: e6[r3 + 1].effects }); e4(e6[r3].effects, e6[r3 + 1].effects); } return e6.sort((t2, e7) => e7.scale - t2.scale), e6; } function y2(t) { let e6; if (!t) return []; try { e6 = v.exports.parse(t); } catch (r3) { throw new s("effect:invalid-syntax", "Invalid effect syntax", { value: t, error: r3 }); } return e6.map((t2) => A(t2)); } function A(t) { try { switch (t.name) { case "grayscale": case "sepia": case "saturate": case "invert": case "brightness": case "contrast": return w(t); case "opacity": return x2(t); case "hue-rotate": return b(t); case "blur": return C(t); case "drop-shadow": return F(t); case "bloom": return E(t); } } catch (e6) { throw e6.details.filter = t, e6; } throw new s("effect:unknown-effect", `Effect '${t.name}' is not supported`, { effect: t }); } function w(t) { let e6 = 1; return j(t.parameters, 1), 1 === t.parameters.length && (e6 = M2(t.parameters[0])), new p(t.name, e6); } function x2(t) { let e6 = 1; return j(t.parameters, 1), 1 === t.parameters.length && (e6 = M2(t.parameters[0])), new f(e6); } function b(t) { let e6 = 0; return j(t.parameters, 1), 1 === t.parameters.length && (e6 = N(t.parameters[0])), new m(e6); } function C(t) { let e6 = 0; return j(t.parameters, 1), 1 === t.parameters.length && (e6 = T(t.parameters[0]), O(e6, t.parameters[0])), new l2(e6); } function F(t) { const e6 = []; let r3 = null; for (const n2 of t.parameters) if ("color" === n2.type) { if (e6.length && Object.freeze(e6), r3) throw new s("effect:type-error", "Accepts only one color", {}); r3 = U(n2); } else { const t2 = T(n2); if (Object.isFrozen(e6)) throw new s("effect:type-error", " parameters not consecutive", { lengths: e6 }); e6.push(t2), 3 === e6.length && O(t2, n2); } if (e6.length < 2 || e6.length > 3) throw new s("effect:type-error", `Expected {2,3}, Actual: {${e6.length}}`, { lengths: e6 }); return new d(e6[0], e6[1], e6[2] || 0, r3 || H("black")); } function E(t) { let e6 = 1, r3 = 0, n2 = 0; return j(t.parameters, 3), t.parameters[0] && (e6 = M2(t.parameters[0])), t.parameters[1] && (r3 = T(t.parameters[1]), O(r3, t.parameters[1])), t.parameters[2] && (n2 = M2(t.parameters[2])), new c2(e6, r3, n2); } function j(t, e6) { if (t.length > e6) throw new s("effect:type-error", `Function supports up to ${e6} parameters, Actual: ${t.length}`, { parameters: t }); } function $(t) { if ("color" === t.type) return ""; if (t.unit) { if (R[t.unit]) return ""; if (S[t.unit]) return ""; if ("%" === t.unit) return ""; } return ""; } function O(t, e6) { if (t < 0) throw new s("effect:type-error", `Negative values are not allowed, Actual: ${t}`, { term: e6 }); } function k(t) { if ("quantity" !== t.type || null !== t.unit) throw new s("effect:type-error", `Expected , Actual: ${$(t)}`, { term: t }); } function q(t) { if ("quantity" !== t.type || null !== t.unit && "%" !== t.unit) throw new s("effect:type-error", `Expected or , Actual: ${$(t)}`, { term: t }); } g = function() { function t(t2, e7) { function r4() { this.constructor = t2; } r4.prototype = e7.prototype, t2.prototype = new r4(); } function e6(t2, r4, n3, u2) { var a3 = Error.call(this, t2); return Object.setPrototypeOf && Object.setPrototypeOf(a3, e6.prototype), a3.expected = r4, a3.found = n3, a3.location = u2, a3.name = "SyntaxError", a3; } function r3(t2, e7, r4) { return r4 = r4 || " ", t2.length > e7 ? t2 : (e7 -= t2.length, t2 + (r4 += r4.repeat(e7)).slice(0, e7)); } function n2(t2, r4) { var n3, u2 = {}, a3 = (r4 = void 0 !== r4 ? r4 : {}).grammarSource, o4 = { start: Lt }, c3 = Lt, i2 = "none", l3 = ")", s4 = ",", f2 = "(", p2 = "%", h2 = "px", m3 = "cm", g2 = "mm", v2 = "in", d3 = "pt", y3 = "pc", A2 = "deg", w2 = "rad", x3 = "grad", b2 = "turn", C2 = "#", F2 = ".", E2 = "e", j2 = /^[ \t\n\r]/, $2 = /^[a-z\-]/, O2 = /^[0-9a-fA-F]/, k2 = /^[+\-]/, q2 = /^[0-9]/, S2 = Bt("none"), z2 = Ut("none", false), R2 = Ut(")", false), I2 = Ut(",", false), M3 = Bt("whitespace"), P2 = Ht([" ", " ", "\n", "\r"], false, false), N2 = Bt("function"), T2 = Ut("(", false), U2 = Bt("identifier"), H2 = Ht([["a", "z"], "-"], false, false), _2 = Bt("percentage"), B2 = Ut("%", false), D2 = Bt("length"), G = Ut("px", false), J = Ut("cm", false), K = Ut("mm", false), L = Ut("in", false), Q = Ut("pt", false), V = Ut("pc", false), W = Bt("angle"), X = Ut("deg", false), Y = Ut("rad", false), Z = Ut("grad", false), tt = Ut("turn", false), et = Bt("number"), rt = Bt("color"), nt = Ut("#", false), ut = Ht([["0", "9"], ["a", "f"], ["A", "F"]], false, false), at = Ht(["+", "-"], false, false), ot = Ht([["0", "9"]], false, false), ct = Ut(".", false), it = Ut("e", false), lt = function() { return []; }, st = function(t3, e7) { return { type: "function", name: t3, parameters: e7 || [] }; }, ft = function(t3, e7) { return e7.length > 0 ? le(t3, e7, 3) : [t3]; }, pt = function(t3) { return { type: "quantity", value: t3.value, unit: t3.unit }; }, ht = function(t3) { return { type: "color", colorType: t3.type, value: t3.value }; }, mt = function(t3) { return t3; }, gt = function() { return Tt(); }, vt = function(t3) { return { value: t3, unit: "%" }; }, dt = function(t3) { return { value: t3, unit: "px" }; }, yt = function(t3) { return { value: t3, unit: "cm" }; }, At = function(t3) { return { value: t3, unit: "mm" }; }, wt = function(t3) { return { value: t3, unit: "in" }; }, xt = function(t3) { return { value: t3, unit: "pt" }; }, bt = function(t3) { return { value: t3, unit: "pc" }; }, Ct = function(t3) { return { value: t3, unit: "deg" }; }, Ft = function(t3) { return { value: t3, unit: "rad" }; }, Et = function(t3) { return { value: t3, unit: "grad" }; }, jt = function(t3) { return { value: t3, unit: "turn" }; }, $t = function(t3) { return { value: t3, unit: null }; }, Ot = function() { return { type: "hex", value: Tt() }; }, kt = function(t3) { return { type: "function", value: t3 }; }, qt = function() { return { type: "named", value: Tt() }; }, St = function() { return parseFloat(Tt()); }, zt = 0, Rt = 0, It = [{ line: 1, column: 1 }], Mt = 0, Pt = [], Nt = 0; if ("startRule" in r4) { if (!(r4.startRule in o4)) throw new Error(`Can't start parsing from rule "` + r4.startRule + '".'); c3 = o4[r4.startRule]; } function Tt() { return t2.substring(Rt, zt); } function Ut(t3, e7) { return { type: "literal", text: t3, ignoreCase: e7 }; } function Ht(t3, e7, r5) { return { type: "class", parts: t3, inverted: e7, ignoreCase: r5 }; } function _t() { return { type: "end" }; } function Bt(t3) { return { type: "other", description: t3 }; } function Dt(e7) { var r5, n4 = It[e7]; if (n4) return n4; for (r5 = e7 - 1; !It[r5]; ) r5--; for (n4 = { line: (n4 = It[r5]).line, column: n4.column }; r5 < e7; ) 10 === t2.charCodeAt(r5) ? (n4.line++, n4.column = 1) : n4.column++, r5++; return It[e7] = n4, n4; } function Gt(t3, e7) { var r5 = Dt(t3), n4 = Dt(e7); return { source: a3, start: { offset: t3, line: r5.line, column: r5.column }, end: { offset: e7, line: n4.line, column: n4.column } }; } function Jt(t3) { zt < Mt || (zt > Mt && (Mt = zt, Pt = []), Pt.push(t3)); } function Kt(t3, r5, n4) { return new e6(e6.buildMessage(t3, r5), t3, r5, n4); } function Lt() { var t3; return (t3 = Qt()) === u2 && (t3 = Vt()), t3; } function Qt() { var e7, r5; return Nt++, e7 = zt, Zt(), t2.substr(zt, 4) === i2 ? (r5 = i2, zt += 4) : (r5 = u2, 0 === Nt && Jt(z2)), r5 !== u2 ? (Zt(), Rt = e7, e7 = lt()) : (zt = e7, e7 = u2), Nt--, e7 === u2 && 0 === Nt && Jt(S2), e7; } function Vt() { var t3, e7; if (t3 = [], (e7 = Wt()) !== u2) for (; e7 !== u2; ) t3.push(e7), e7 = Wt(); else t3 = u2; return t3; } function Wt() { var e7, r5, n4, a4; return e7 = zt, Zt(), (r5 = te()) !== u2 ? (Zt(), (n4 = Xt()) === u2 && (n4 = null), Zt(), 41 === t2.charCodeAt(zt) ? (a4 = l3, zt++) : (a4 = u2, 0 === Nt && Jt(R2)), a4 !== u2 ? (Zt(), Rt = e7, e7 = st(r5, n4)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), e7; } function Xt() { var e7, r5, n4, a4, o5, c4, i3, l4; if (e7 = zt, (r5 = Yt()) !== u2) { for (n4 = [], a4 = zt, o5 = Zt(), 44 === t2.charCodeAt(zt) ? (c4 = s4, zt++) : (c4 = u2, 0 === Nt && Jt(I2)), c4 === u2 && (c4 = null), i3 = Zt(), (l4 = Yt()) !== u2 ? a4 = o5 = [o5, c4, i3, l4] : (zt = a4, a4 = u2); a4 !== u2; ) n4.push(a4), a4 = zt, o5 = Zt(), 44 === t2.charCodeAt(zt) ? (c4 = s4, zt++) : (c4 = u2, 0 === Nt && Jt(I2)), c4 === u2 && (c4 = null), i3 = Zt(), (l4 = Yt()) !== u2 ? a4 = o5 = [o5, c4, i3, l4] : (zt = a4, a4 = u2); Rt = e7, e7 = ft(r5, n4); } else zt = e7, e7 = u2; return e7; } function Yt() { var t3, e7; return t3 = zt, (e7 = re()) === u2 && (e7 = ne()) === u2 && (e7 = ue()) === u2 && (e7 = ae()), e7 !== u2 && (Rt = t3, e7 = pt(e7)), (t3 = e7) === u2 && (t3 = zt, (e7 = oe()) !== u2 && (Rt = t3, e7 = ht(e7)), t3 = e7), t3; } function Zt() { var e7, r5; for (Nt++, e7 = [], j2.test(t2.charAt(zt)) ? (r5 = t2.charAt(zt), zt++) : (r5 = u2, 0 === Nt && Jt(P2)); r5 !== u2; ) e7.push(r5), j2.test(t2.charAt(zt)) ? (r5 = t2.charAt(zt), zt++) : (r5 = u2, 0 === Nt && Jt(P2)); return Nt--, r5 = u2, 0 === Nt && Jt(M3), e7; } function te() { var e7, r5, n4; return Nt++, e7 = zt, (r5 = ee()) !== u2 ? (40 === t2.charCodeAt(zt) ? (n4 = f2, zt++) : (n4 = u2, 0 === Nt && Jt(T2)), n4 !== u2 ? (Rt = e7, e7 = mt(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), Nt--, e7 === u2 && (r5 = u2, 0 === Nt && Jt(N2)), e7; } function ee() { var e7, r5, n4; if (Nt++, e7 = zt, r5 = [], $2.test(t2.charAt(zt)) ? (n4 = t2.charAt(zt), zt++) : (n4 = u2, 0 === Nt && Jt(H2)), n4 !== u2) for (; n4 !== u2; ) r5.push(n4), $2.test(t2.charAt(zt)) ? (n4 = t2.charAt(zt), zt++) : (n4 = u2, 0 === Nt && Jt(H2)); else r5 = u2; return r5 !== u2 && (Rt = e7, r5 = gt()), Nt--, (e7 = r5) === u2 && (r5 = u2, 0 === Nt && Jt(U2)), e7; } function re() { var e7, r5, n4; return Nt++, e7 = zt, Zt(), (r5 = ce()) !== u2 ? (37 === t2.charCodeAt(zt) ? (n4 = p2, zt++) : (n4 = u2, 0 === Nt && Jt(B2)), n4 !== u2 ? (Rt = e7, e7 = vt(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), Nt--, e7 === u2 && 0 === Nt && Jt(_2), e7; } function ne() { var e7, r5, n4; return Nt++, e7 = zt, Zt(), (r5 = ce()) !== u2 ? (t2.substr(zt, 2) === h2 ? (n4 = h2, zt += 2) : (n4 = u2, 0 === Nt && Jt(G)), n4 !== u2 ? (Rt = e7, e7 = dt(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), e7 === u2 && (e7 = zt, Zt(), (r5 = ce()) !== u2 ? (t2.substr(zt, 2) === m3 ? (n4 = m3, zt += 2) : (n4 = u2, 0 === Nt && Jt(J)), n4 !== u2 ? (Rt = e7, e7 = yt(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), e7 === u2 && (e7 = zt, Zt(), (r5 = ce()) !== u2 ? (t2.substr(zt, 2) === g2 ? (n4 = g2, zt += 2) : (n4 = u2, 0 === Nt && Jt(K)), n4 !== u2 ? (Rt = e7, e7 = At(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), e7 === u2 && (e7 = zt, Zt(), (r5 = ce()) !== u2 ? (t2.substr(zt, 2) === v2 ? (n4 = v2, zt += 2) : (n4 = u2, 0 === Nt && Jt(L)), n4 !== u2 ? (Rt = e7, e7 = wt(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), e7 === u2 && (e7 = zt, Zt(), (r5 = ce()) !== u2 ? (t2.substr(zt, 2) === d3 ? (n4 = d3, zt += 2) : (n4 = u2, 0 === Nt && Jt(Q)), n4 !== u2 ? (Rt = e7, e7 = xt(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), e7 === u2 && (e7 = zt, Zt(), (r5 = ce()) !== u2 ? (t2.substr(zt, 2) === y3 ? (n4 = y3, zt += 2) : (n4 = u2, 0 === Nt && Jt(V)), n4 !== u2 ? (Rt = e7, e7 = bt(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2)))))), Nt--, e7 === u2 && 0 === Nt && Jt(D2), e7; } function ue() { var e7, r5, n4; return Nt++, e7 = zt, (r5 = ce()) !== u2 ? (t2.substr(zt, 3) === A2 ? (n4 = A2, zt += 3) : (n4 = u2, 0 === Nt && Jt(X)), n4 !== u2 ? (Rt = e7, e7 = Ct(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), e7 === u2 && (e7 = zt, (r5 = ce()) !== u2 ? (t2.substr(zt, 3) === w2 ? (n4 = w2, zt += 3) : (n4 = u2, 0 === Nt && Jt(Y)), n4 !== u2 ? (Rt = e7, e7 = Ft(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), e7 === u2 && (e7 = zt, (r5 = ce()) !== u2 ? (t2.substr(zt, 4) === x3 ? (n4 = x3, zt += 4) : (n4 = u2, 0 === Nt && Jt(Z)), n4 !== u2 ? (Rt = e7, e7 = Et(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2), e7 === u2 && (e7 = zt, (r5 = ce()) !== u2 ? (t2.substr(zt, 4) === b2 ? (n4 = b2, zt += 4) : (n4 = u2, 0 === Nt && Jt(tt)), n4 !== u2 ? (Rt = e7, e7 = jt(r5)) : (zt = e7, e7 = u2)) : (zt = e7, e7 = u2)))), Nt--, e7 === u2 && (r5 = u2, 0 === Nt && Jt(W)), e7; } function ae() { var t3, e7; return Nt++, t3 = zt, Zt(), (e7 = ce()) !== u2 ? (Rt = t3, t3 = $t(e7)) : (zt = t3, t3 = u2), Nt--, t3 === u2 && 0 === Nt && Jt(et), t3; } function oe() { var e7, r5, n4, a4; if (Nt++, e7 = zt, 35 === t2.charCodeAt(zt) ? (r5 = C2, zt++) : (r5 = u2, 0 === Nt && Jt(nt)), r5 !== u2) { if (n4 = [], O2.test(t2.charAt(zt)) ? (a4 = t2.charAt(zt), zt++) : (a4 = u2, 0 === Nt && Jt(ut)), a4 !== u2) for (; a4 !== u2; ) n4.push(a4), O2.test(t2.charAt(zt)) ? (a4 = t2.charAt(zt), zt++) : (a4 = u2, 0 === Nt && Jt(ut)); else n4 = u2; n4 !== u2 ? (Rt = e7, e7 = Ot()) : (zt = e7, e7 = u2); } else zt = e7, e7 = u2; return e7 === u2 && (e7 = zt, (r5 = Wt()) !== u2 && (Rt = e7, r5 = kt(r5)), (e7 = r5) === u2 && (e7 = zt, (r5 = ee()) !== u2 && (Rt = e7, r5 = qt()), e7 = r5)), Nt--, e7 === u2 && (r5 = u2, 0 === Nt && Jt(rt)), e7; } function ce() { var e7, r5, n4, a4, o5, c4, i3; for (e7 = zt, k2.test(t2.charAt(zt)) ? (t2.charAt(zt), zt++) : 0 === Nt && Jt(at), r5 = zt, n4 = [], q2.test(t2.charAt(zt)) ? (a4 = t2.charAt(zt), zt++) : (a4 = u2, 0 === Nt && Jt(ot)); a4 !== u2; ) n4.push(a4), q2.test(t2.charAt(zt)) ? (a4 = t2.charAt(zt), zt++) : (a4 = u2, 0 === Nt && Jt(ot)); if (46 === t2.charCodeAt(zt) ? (a4 = F2, zt++) : (a4 = u2, 0 === Nt && Jt(ct)), a4 !== u2) { if (o5 = [], q2.test(t2.charAt(zt)) ? (c4 = t2.charAt(zt), zt++) : (c4 = u2, 0 === Nt && Jt(ot)), c4 !== u2) for (; c4 !== u2; ) o5.push(c4), q2.test(t2.charAt(zt)) ? (c4 = t2.charAt(zt), zt++) : (c4 = u2, 0 === Nt && Jt(ot)); else o5 = u2; o5 !== u2 ? r5 = n4 = [n4, a4, o5] : (zt = r5, r5 = u2); } else zt = r5, r5 = u2; if (r5 === u2) if (r5 = [], q2.test(t2.charAt(zt)) ? (n4 = t2.charAt(zt), zt++) : (n4 = u2, 0 === Nt && Jt(ot)), n4 !== u2) for (; n4 !== u2; ) r5.push(n4), q2.test(t2.charAt(zt)) ? (n4 = t2.charAt(zt), zt++) : (n4 = u2, 0 === Nt && Jt(ot)); else r5 = u2; if (r5 !== u2) { if (n4 = zt, 101 === t2.charCodeAt(zt) ? (a4 = E2, zt++) : (a4 = u2, 0 === Nt && Jt(it)), a4 !== u2) { if (k2.test(t2.charAt(zt)) ? (o5 = t2.charAt(zt), zt++) : (o5 = u2, 0 === Nt && Jt(at)), o5 === u2 && (o5 = null), c4 = [], q2.test(t2.charAt(zt)) ? (i3 = t2.charAt(zt), zt++) : (i3 = u2, 0 === Nt && Jt(ot)), i3 !== u2) for (; i3 !== u2; ) c4.push(i3), q2.test(t2.charAt(zt)) ? (i3 = t2.charAt(zt), zt++) : (i3 = u2, 0 === Nt && Jt(ot)); else c4 = u2; c4 !== u2 ? n4 = a4 = [a4, o5, c4] : (zt = n4, n4 = u2); } else zt = n4, n4 = u2; n4 === u2 && (n4 = null), Rt = e7, e7 = St(); } else zt = e7, e7 = u2; return e7; } function ie(t3, e7) { return t3.map(function(t4) { return t4[e7]; }); } function le(t3, e7, r5) { return [t3].concat(ie(e7, r5)); } if ((n3 = c3()) !== u2 && zt === t2.length) return n3; throw n3 !== u2 && zt < t2.length && Jt(_t()), Kt(Pt, Mt < t2.length ? t2.charAt(Mt) : null, Mt < t2.length ? Gt(Mt, Mt + 1) : Gt(Mt, Mt)); } return t(e6, Error), e6.prototype.format = function(t2) { var e7 = "Error: " + this.message; if (this.location) { var n3, u2 = null; for (n3 = 0; n3 < t2.length; n3++) if (t2[n3].source === this.location.source) { u2 = t2[n3].text.split(/\r\n|\n|\r/g); break; } var a3 = this.location.start, o4 = this.location.source + ":" + a3.line + ":" + a3.column; if (u2) { var c3 = this.location.end, i2 = r3("", a3.line.toString().length, " "), l3 = u2[a3.line - 1], s4 = (a3.line === c3.line ? c3.column : l3.length + 1) - a3.column || 1; e7 += "\n --> " + o4 + "\n" + i2 + " |\n" + a3.line + " | " + l3 + "\n" + i2 + " | " + r3("", a3.column - 1, " ") + r3("", s4, "^"); } else e7 += "\n at " + o4; } return e7; }, e6.buildMessage = function(t2, e7) { var r4 = { literal: function(t3) { return '"' + u2(t3.text) + '"'; }, class: function(t3) { var e8 = t3.parts.map(function(t4) { return Array.isArray(t4) ? a3(t4[0]) + "-" + a3(t4[1]) : a3(t4); }); return "[" + (t3.inverted ? "^" : "") + e8.join("") + "]"; }, any: function() { return "any character"; }, end: function() { return "end of input"; }, other: function(t3) { return t3.description; } }; function n3(t3) { return t3.charCodeAt(0).toString(16).toUpperCase(); } function u2(t3) { return t3.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(t4) { return "\\x0" + n3(t4); }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(t4) { return "\\x" + n3(t4); }); } function a3(t3) { return t3.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(t4) { return "\\x0" + n3(t4); }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(t4) { return "\\x" + n3(t4); }); } function o4(t3) { return r4[t3.type](t3); } function c3(t3) { var e8, r5, n4 = t3.map(o4); if (n4.sort(), n4.length > 0) { for (e8 = 1, r5 = 1; e8 < n4.length; e8++) n4[e8 - 1] !== n4[e8] && (n4[r5] = n4[e8], r5++); n4.length = r5; } switch (n4.length) { case 1: return n4[0]; case 2: return n4[0] + " or " + n4[1]; default: return n4.slice(0, -1).join(", ") + ", or " + n4[n4.length - 1]; } } function i2(t3) { return t3 ? '"' + u2(t3) + '"' : "end of input"; } return "Expected " + c3(t2) + " but " + i2(e7) + " found."; }, { SyntaxError: e6, parse: n2 }; }, (m2 = v).exports && (m2.exports = g()); var S = { deg: 1, grad: 0.9, rad: 180 / Math.PI, turn: 360 }; function z(t) { if ("quantity" !== t.type || !(0 === t.value && null === t.unit || t.unit && null != S[t.unit])) throw new s("effect:type-error", `Expected , Actual: ${$(t)}`, { term: t }); } var R = { px: 1, cm: 96 / 2.54, mm: 96 / 2.54 / 10, in: 96, pc: 16, pt: 96 / 72 }; function I(t) { if ("quantity" !== t.type || !(0 === t.value && null === t.unit || t.unit && null != R[t.unit])) throw new s("effect:type-error", `Expected , Actual: ${$(t)}`, { term: t }); } function M2(t) { q(t); const e6 = t.value; return O(e6, t), "%" === t.unit ? 0.01 * e6 : e6; } function P(t) { return k(t), O(t.value, t), t.value; } function N(t) { return z(t), t.value * S[t.unit] || 0; } function T(t) { return I(t), t.value * R[t.unit] || 0; } function U(e6) { switch (e6.colorType) { case "hex": return i(e6.value); case "named": return H(e6.value); case "function": return D(e6.value); } } function H(t) { if (!r(t)) throw new s("effect:unknown-color", `color '${t}' isn't valid`, { namedColor: t }); return a(t); } var _ = /^rgba?/i; var B = /^hsla?/i; function D(t) { if (j(t.parameters, 4), _.test(t.name)) return [M2(t.parameters[0]), M2(t.parameters[1]), M2(t.parameters[2]), t.parameters[3] ? M2(t.parameters[3]) : 1]; if (B.test(t.name)) return o(P(t.parameters[0]), M2(t.parameters[1]), M2(t.parameters[2]), t.parameters[3] ? M2(t.parameters[3]) : 1); throw new s("effect:syntax-error", `Invalid color function '${t.name}'`, { colorFunction: t }); } export { n, e4 as e, h, d2 as d }; //# sourceMappingURL=chunk-3WQOA5CB.js.map