' + d.name + "
", { minWidth: 500 }), g.addTo(this.map); - } - } -} -var xw = {}; -Object.defineProperty(xw, "__esModule", { value: !0 }); -class Ju { - constructor(a, d) { - this.styles = a || Ju.DEFAULT_STYLES; - const g = typeof d == "string" ? d : d ? d.defaultStyle : void 0; - this.defaultStyle = g || Ju.DEFAULT_STYLE, this.onDocumentClick = this.onDocumentClick.bind(this), this.events = typeof d != "string" && d ? d.eventListeners : void 0; - } - getDefaultPosition() { - return "top-right"; - } - onAdd(a) { - this.map = a, this.controlContainer = document.createElement("div"), this.controlContainer.classList.add("mapboxgl-ctrl"), this.controlContainer.classList.add("mapboxgl-ctrl-group"), this.mapStyleContainer = document.createElement("div"), this.styleButton = document.createElement("button"), this.styleButton.type = "button", this.mapStyleContainer.classList.add("mapboxgl-style-list"); - for (const d of this.styles) { - const g = document.createElement("button"); - g.type = "button", g.innerText = d.title, g.classList.add(d.title.replace(/[^a-z0-9-]/gi, "_")), g.dataset.uri = JSON.stringify(d.uri), g.addEventListener("click", (w) => { - const b = w.srcElement; - if (this.closeModal(), b.classList.contains("active") || this.events && this.events.onOpen && this.events.onOpen(w)) - return; - const E = JSON.parse(b.dataset.uri); - this.map.setStyle(E); - const i = this.mapStyleContainer.getElementsByClassName("active"); - for (; i[0]; ) - i[0].classList.remove("active"); - b.classList.add("active"), this.events && this.events.onChange && this.events.onChange(w, E); - }), d.title === this.defaultStyle && g.classList.add("active"), this.mapStyleContainer.appendChild(g); - } - return this.styleButton.classList.add("mapboxgl-ctrl-icon"), this.styleButton.classList.add("mapboxgl-style-switcher"), this.styleButton.addEventListener("click", (d) => { - this.events && this.events.onSelect && this.events.onSelect(d) || this.openModal(); - }), document.addEventListener("click", this.onDocumentClick), this.controlContainer.appendChild(this.styleButton), this.controlContainer.appendChild(this.mapStyleContainer), this.controlContainer; - } - onRemove() { - !this.controlContainer || !this.controlContainer.parentNode || !this.map || !this.styleButton || (this.styleButton.removeEventListener("click", this.onDocumentClick), this.controlContainer.parentNode.removeChild(this.controlContainer), document.removeEventListener("click", this.onDocumentClick), this.map = void 0); - } - closeModal() { - this.mapStyleContainer && this.styleButton && (this.mapStyleContainer.style.display = "none", this.styleButton.style.display = "block"); - } - openModal() { - this.mapStyleContainer && this.styleButton && (this.mapStyleContainer.style.display = "block", this.styleButton.style.display = "none"); - } - onDocumentClick(a) { - this.controlContainer && !this.controlContainer.contains(a.target) && this.closeModal(); - } -} -Ju.DEFAULT_STYLE = "Streets"; -Ju.DEFAULT_STYLES = [ - { title: "Dark", uri: "mapbox://styles/mapbox/dark-v10" }, - { title: "Light", uri: "mapbox://styles/mapbox/light-v10" }, - { title: "Outdoors", uri: "mapbox://styles/mapbox/outdoors-v11" }, - { title: "Satellite", uri: "mapbox://styles/mapbox/satellite-streets-v11" }, - { title: "Streets", uri: "mapbox://styles/mapbox/streets-v11" } -]; -var IC = xw.MapboxStyleSwitcherControl = Ju, vw = { exports: {} }; -(function(m, a) { - (function(d, g) { - m.exports = g(); - })(Km, function() { - var d, g, w; - function b(i, O) { - if (!d) - d = O; - else if (!g) - g = O; - else { - var j = "self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; (" + d + ")(sharedChunk); (" + g + ")(sharedChunk); self.onerror = null;", Y = {}; - d(Y), w = O(Y), typeof window < "u" && window && window.URL && window.URL.createObjectURL && (w.workerUrl = window.URL.createObjectURL(new Blob([j], { type: "text/javascript" }))); - } - } - b(["exports"], function(i) { - function O(r) { - return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r; - } - var j, Y = {}, J = {}; - function ae() { - if (j) - return J; - j = 1, Object.defineProperty(J, "__esModule", { value: !0 }), J.setMatrixArrayType = function(u) { - J.ARRAY_TYPE = e = u; - }, J.toRadian = function(u) { - return u * o; - }, J.equals = function(u, l) { - return Math.abs(u - l) <= r * Math.max(1, Math.abs(u), Math.abs(l)); - }, J.RANDOM = J.ARRAY_TYPE = J.EPSILON = void 0; - var r = 1e-6; - J.EPSILON = r; - var e = typeof Float32Array < "u" ? Float32Array : Array; - J.ARRAY_TYPE = e; - var n = Math.random; - J.RANDOM = n; - var o = Math.PI / 180; - return Math.hypot || (Math.hypot = function() { - for (var u = 0, l = arguments.length; l--; ) - u += arguments[l] * arguments[l]; - return Math.sqrt(u); - }), J; - } - var ce, Te = {}; - function be() { - if (ce) - return Te; - function r(l) { - return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(f) { - return typeof f; - } : function(f) { - return f && typeof Symbol == "function" && f.constructor === Symbol && f !== Symbol.prototype ? "symbol" : typeof f; - }, r(l); - } - ce = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.create = function() { - var l = new e.ARRAY_TYPE(4); - return e.ARRAY_TYPE != Float32Array && (l[1] = 0, l[2] = 0), l[0] = 1, l[3] = 1, l; - }, Te.clone = function(l) { - var f = new e.ARRAY_TYPE(4); - return f[0] = l[0], f[1] = l[1], f[2] = l[2], f[3] = l[3], f; - }, Te.copy = function(l, f) { - return l[0] = f[0], l[1] = f[1], l[2] = f[2], l[3] = f[3], l; - }, Te.identity = function(l) { - return l[0] = 1, l[1] = 0, l[2] = 0, l[3] = 1, l; - }, Te.fromValues = function(l, f, v, S) { - var D = new e.ARRAY_TYPE(4); - return D[0] = l, D[1] = f, D[2] = v, D[3] = S, D; - }, Te.set = function(l, f, v, S, D) { - return l[0] = f, l[1] = v, l[2] = S, l[3] = D, l; - }, Te.transpose = function(l, f) { - if (l === f) { - var v = f[1]; - l[1] = f[2], l[2] = v; - } else - l[0] = f[0], l[1] = f[2], l[2] = f[1], l[3] = f[3]; - return l; - }, Te.invert = function(l, f) { - var v = f[0], S = f[1], D = f[2], x = f[3], P = v * x - D * S; - return P ? (l[0] = x * (P = 1 / P), l[1] = -S * P, l[2] = -D * P, l[3] = v * P, l) : null; - }, Te.adjoint = function(l, f) { - var v = f[0]; - return l[0] = f[3], l[1] = -f[1], l[2] = -f[2], l[3] = v, l; - }, Te.determinant = function(l) { - return l[0] * l[3] - l[2] * l[1]; - }, Te.multiply = o, Te.rotate = function(l, f, v) { - var S = f[0], D = f[1], x = f[2], P = f[3], I = Math.sin(v), M = Math.cos(v); - return l[0] = S * M + x * I, l[1] = D * M + P * I, l[2] = S * -I + x * M, l[3] = D * -I + P * M, l; - }, Te.scale = function(l, f, v) { - var S = f[1], D = f[2], x = f[3], P = v[0], I = v[1]; - return l[0] = f[0] * P, l[1] = S * P, l[2] = D * I, l[3] = x * I, l; - }, Te.fromRotation = function(l, f) { - var v = Math.sin(f), S = Math.cos(f); - return l[0] = S, l[1] = v, l[2] = -v, l[3] = S, l; - }, Te.fromScaling = function(l, f) { - return l[0] = f[0], l[1] = 0, l[2] = 0, l[3] = f[1], l; - }, Te.str = function(l) { - return "mat2(" + l[0] + ", " + l[1] + ", " + l[2] + ", " + l[3] + ")"; - }, Te.frob = function(l) { - return Math.hypot(l[0], l[1], l[2], l[3]); - }, Te.LDU = function(l, f, v, S) { - return l[2] = S[2] / S[0], v[0] = S[0], v[1] = S[1], v[3] = S[3] - l[2] * v[1], [l, f, v]; - }, Te.add = function(l, f, v) { - return l[0] = f[0] + v[0], l[1] = f[1] + v[1], l[2] = f[2] + v[2], l[3] = f[3] + v[3], l; - }, Te.subtract = u, Te.exactEquals = function(l, f) { - return l[0] === f[0] && l[1] === f[1] && l[2] === f[2] && l[3] === f[3]; - }, Te.equals = function(l, f) { - var v = l[0], S = l[1], D = l[2], x = l[3], P = f[0], I = f[1], M = f[2], C = f[3]; - return Math.abs(v - P) <= e.EPSILON * Math.max(1, Math.abs(v), Math.abs(P)) && Math.abs(S - I) <= e.EPSILON * Math.max(1, Math.abs(S), Math.abs(I)) && Math.abs(D - M) <= e.EPSILON * Math.max(1, Math.abs(D), Math.abs(M)) && Math.abs(x - C) <= e.EPSILON * Math.max(1, Math.abs(x), Math.abs(C)); - }, Te.multiplyScalar = function(l, f, v) { - return l[0] = f[0] * v, l[1] = f[1] * v, l[2] = f[2] * v, l[3] = f[3] * v, l; - }, Te.multiplyScalarAndAdd = function(l, f, v, S) { - return l[0] = f[0] + v[0] * S, l[1] = f[1] + v[1] * S, l[2] = f[2] + v[2] * S, l[3] = f[3] + v[3] * S, l; - }, Te.sub = Te.mul = void 0; - var e = function(l, f) { - if (l && l.__esModule) - return l; - if (l === null || r(l) !== "object" && typeof l != "function") - return { default: l }; - var v = n(void 0); - if (v && v.has(l)) - return v.get(l); - var S = {}, D = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var x in l) - if (x !== "default" && Object.prototype.hasOwnProperty.call(l, x)) { - var P = D ? Object.getOwnPropertyDescriptor(l, x) : null; - P && (P.get || P.set) ? Object.defineProperty(S, x, P) : S[x] = l[x]; - } - return S.default = l, v && v.set(l, S), S; - }(ae()); - function n(l) { - if (typeof WeakMap != "function") - return null; - var f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(); - return (n = function(S) { - return S ? v : f; - })(l); - } - function o(l, f, v) { - var S = f[0], D = f[1], x = f[2], P = f[3], I = v[0], M = v[1], C = v[2], k = v[3]; - return l[0] = S * I + x * M, l[1] = D * I + P * M, l[2] = S * C + x * k, l[3] = D * C + P * k, l; - } - function u(l, f, v) { - return l[0] = f[0] - v[0], l[1] = f[1] - v[1], l[2] = f[2] - v[2], l[3] = f[3] - v[3], l; - } - return Te.mul = o, Te.sub = u, Te; - } - var Ze, je = {}; - function ot() { - if (Ze) - return je; - function r(l) { - return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(f) { - return typeof f; - } : function(f) { - return f && typeof Symbol == "function" && f.constructor === Symbol && f !== Symbol.prototype ? "symbol" : typeof f; - }, r(l); - } - Ze = 1, Object.defineProperty(je, "__esModule", { value: !0 }), je.create = function() { - var l = new e.ARRAY_TYPE(6); - return e.ARRAY_TYPE != Float32Array && (l[1] = 0, l[2] = 0, l[4] = 0, l[5] = 0), l[0] = 1, l[3] = 1, l; - }, je.clone = function(l) { - var f = new e.ARRAY_TYPE(6); - return f[0] = l[0], f[1] = l[1], f[2] = l[2], f[3] = l[3], f[4] = l[4], f[5] = l[5], f; - }, je.copy = function(l, f) { - return l[0] = f[0], l[1] = f[1], l[2] = f[2], l[3] = f[3], l[4] = f[4], l[5] = f[5], l; - }, je.identity = function(l) { - return l[0] = 1, l[1] = 0, l[2] = 0, l[3] = 1, l[4] = 0, l[5] = 0, l; - }, je.fromValues = function(l, f, v, S, D, x) { - var P = new e.ARRAY_TYPE(6); - return P[0] = l, P[1] = f, P[2] = v, P[3] = S, P[4] = D, P[5] = x, P; - }, je.set = function(l, f, v, S, D, x, P) { - return l[0] = f, l[1] = v, l[2] = S, l[3] = D, l[4] = x, l[5] = P, l; - }, je.invert = function(l, f) { - var v = f[0], S = f[1], D = f[2], x = f[3], P = f[4], I = f[5], M = v * x - S * D; - return M ? (l[0] = x * (M = 1 / M), l[1] = -S * M, l[2] = -D * M, l[3] = v * M, l[4] = (D * I - x * P) * M, l[5] = (S * P - v * I) * M, l) : null; - }, je.determinant = function(l) { - return l[0] * l[3] - l[1] * l[2]; - }, je.multiply = o, je.rotate = function(l, f, v) { - var S = f[0], D = f[1], x = f[2], P = f[3], I = f[4], M = f[5], C = Math.sin(v), k = Math.cos(v); - return l[0] = S * k + x * C, l[1] = D * k + P * C, l[2] = S * -C + x * k, l[3] = D * -C + P * k, l[4] = I, l[5] = M, l; - }, je.scale = function(l, f, v) { - var S = f[1], D = f[2], x = f[3], P = f[4], I = f[5], M = v[0], C = v[1]; - return l[0] = f[0] * M, l[1] = S * M, l[2] = D * C, l[3] = x * C, l[4] = P, l[5] = I, l; - }, je.translate = function(l, f, v) { - var S = f[0], D = f[1], x = f[2], P = f[3], I = f[4], M = f[5], C = v[0], k = v[1]; - return l[0] = S, l[1] = D, l[2] = x, l[3] = P, l[4] = S * C + x * k + I, l[5] = D * C + P * k + M, l; - }, je.fromRotation = function(l, f) { - var v = Math.sin(f), S = Math.cos(f); - return l[0] = S, l[1] = v, l[2] = -v, l[3] = S, l[4] = 0, l[5] = 0, l; - }, je.fromScaling = function(l, f) { - return l[0] = f[0], l[1] = 0, l[2] = 0, l[3] = f[1], l[4] = 0, l[5] = 0, l; - }, je.fromTranslation = function(l, f) { - return l[0] = 1, l[1] = 0, l[2] = 0, l[3] = 1, l[4] = f[0], l[5] = f[1], l; - }, je.str = function(l) { - return "mat2d(" + l[0] + ", " + l[1] + ", " + l[2] + ", " + l[3] + ", " + l[4] + ", " + l[5] + ")"; - }, je.frob = function(l) { - return Math.hypot(l[0], l[1], l[2], l[3], l[4], l[5], 1); - }, je.add = function(l, f, v) { - return l[0] = f[0] + v[0], l[1] = f[1] + v[1], l[2] = f[2] + v[2], l[3] = f[3] + v[3], l[4] = f[4] + v[4], l[5] = f[5] + v[5], l; - }, je.subtract = u, je.multiplyScalar = function(l, f, v) { - return l[0] = f[0] * v, l[1] = f[1] * v, l[2] = f[2] * v, l[3] = f[3] * v, l[4] = f[4] * v, l[5] = f[5] * v, l; - }, je.multiplyScalarAndAdd = function(l, f, v, S) { - return l[0] = f[0] + v[0] * S, l[1] = f[1] + v[1] * S, l[2] = f[2] + v[2] * S, l[3] = f[3] + v[3] * S, l[4] = f[4] + v[4] * S, l[5] = f[5] + v[5] * S, l; - }, je.exactEquals = function(l, f) { - return l[0] === f[0] && l[1] === f[1] && l[2] === f[2] && l[3] === f[3] && l[4] === f[4] && l[5] === f[5]; - }, je.equals = function(l, f) { - var v = l[0], S = l[1], D = l[2], x = l[3], P = l[4], I = l[5], M = f[0], C = f[1], k = f[2], V = f[3], U = f[4], q = f[5]; - return Math.abs(v - M) <= e.EPSILON * Math.max(1, Math.abs(v), Math.abs(M)) && Math.abs(S - C) <= e.EPSILON * Math.max(1, Math.abs(S), Math.abs(C)) && Math.abs(D - k) <= e.EPSILON * Math.max(1, Math.abs(D), Math.abs(k)) && Math.abs(x - V) <= e.EPSILON * Math.max(1, Math.abs(x), Math.abs(V)) && Math.abs(P - U) <= e.EPSILON * Math.max(1, Math.abs(P), Math.abs(U)) && Math.abs(I - q) <= e.EPSILON * Math.max(1, Math.abs(I), Math.abs(q)); - }, je.sub = je.mul = void 0; - var e = function(l, f) { - if (l && l.__esModule) - return l; - if (l === null || r(l) !== "object" && typeof l != "function") - return { default: l }; - var v = n(void 0); - if (v && v.has(l)) - return v.get(l); - var S = {}, D = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var x in l) - if (x !== "default" && Object.prototype.hasOwnProperty.call(l, x)) { - var P = D ? Object.getOwnPropertyDescriptor(l, x) : null; - P && (P.get || P.set) ? Object.defineProperty(S, x, P) : S[x] = l[x]; - } - return S.default = l, v && v.set(l, S), S; - }(ae()); - function n(l) { - if (typeof WeakMap != "function") - return null; - var f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(); - return (n = function(S) { - return S ? v : f; - })(l); - } - function o(l, f, v) { - var S = f[0], D = f[1], x = f[2], P = f[3], I = f[4], M = f[5], C = v[0], k = v[1], V = v[2], U = v[3], q = v[4], $ = v[5]; - return l[0] = S * C + x * k, l[1] = D * C + P * k, l[2] = S * V + x * U, l[3] = D * V + P * U, l[4] = S * q + x * $ + I, l[5] = D * q + P * $ + M, l; - } - function u(l, f, v) { - return l[0] = f[0] - v[0], l[1] = f[1] - v[1], l[2] = f[2] - v[2], l[3] = f[3] - v[3], l[4] = f[4] - v[4], l[5] = f[5] - v[5], l; - } - return je.mul = o, je.sub = u, je; - } - var vt, ht = {}; - function gt() { - if (vt) - return ht; - function r(l) { - return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(f) { - return typeof f; - } : function(f) { - return f && typeof Symbol == "function" && f.constructor === Symbol && f !== Symbol.prototype ? "symbol" : typeof f; - }, r(l); - } - vt = 1, Object.defineProperty(ht, "__esModule", { value: !0 }), ht.create = function() { - var l = new e.ARRAY_TYPE(9); - return e.ARRAY_TYPE != Float32Array && (l[1] = 0, l[2] = 0, l[3] = 0, l[5] = 0, l[6] = 0, l[7] = 0), l[0] = 1, l[4] = 1, l[8] = 1, l; - }, ht.fromMat4 = function(l, f) { - return l[0] = f[0], l[1] = f[1], l[2] = f[2], l[3] = f[4], l[4] = f[5], l[5] = f[6], l[6] = f[8], l[7] = f[9], l[8] = f[10], l; - }, ht.clone = function(l) { - var f = new e.ARRAY_TYPE(9); - return f[0] = l[0], f[1] = l[1], f[2] = l[2], f[3] = l[3], f[4] = l[4], f[5] = l[5], f[6] = l[6], f[7] = l[7], f[8] = l[8], f; - }, ht.copy = function(l, f) { - return l[0] = f[0], l[1] = f[1], l[2] = f[2], l[3] = f[3], l[4] = f[4], l[5] = f[5], l[6] = f[6], l[7] = f[7], l[8] = f[8], l; - }, ht.fromValues = function(l, f, v, S, D, x, P, I, M) { - var C = new e.ARRAY_TYPE(9); - return C[0] = l, C[1] = f, C[2] = v, C[3] = S, C[4] = D, C[5] = x, C[6] = P, C[7] = I, C[8] = M, C; - }, ht.set = function(l, f, v, S, D, x, P, I, M, C) { - return l[0] = f, l[1] = v, l[2] = S, l[3] = D, l[4] = x, l[5] = P, l[6] = I, l[7] = M, l[8] = C, l; - }, ht.identity = function(l) { - return l[0] = 1, l[1] = 0, l[2] = 0, l[3] = 0, l[4] = 1, l[5] = 0, l[6] = 0, l[7] = 0, l[8] = 1, l; - }, ht.transpose = function(l, f) { - if (l === f) { - var v = f[1], S = f[2], D = f[5]; - l[1] = f[3], l[2] = f[6], l[3] = v, l[5] = f[7], l[6] = S, l[7] = D; - } else - l[0] = f[0], l[1] = f[3], l[2] = f[6], l[3] = f[1], l[4] = f[4], l[5] = f[7], l[6] = f[2], l[7] = f[5], l[8] = f[8]; - return l; - }, ht.invert = function(l, f) { - var v = f[0], S = f[1], D = f[2], x = f[3], P = f[4], I = f[5], M = f[6], C = f[7], k = f[8], V = k * P - I * C, U = -k * x + I * M, q = C * x - P * M, $ = v * V + S * U + D * q; - return $ ? (l[0] = V * ($ = 1 / $), l[1] = (-k * S + D * C) * $, l[2] = (I * S - D * P) * $, l[3] = U * $, l[4] = (k * v - D * M) * $, l[5] = (-I * v + D * x) * $, l[6] = q * $, l[7] = (-C * v + S * M) * $, l[8] = (P * v - S * x) * $, l) : null; - }, ht.adjoint = function(l, f) { - var v = f[0], S = f[1], D = f[2], x = f[3], P = f[4], I = f[5], M = f[6], C = f[7], k = f[8]; - return l[0] = P * k - I * C, l[1] = D * C - S * k, l[2] = S * I - D * P, l[3] = I * M - x * k, l[4] = v * k - D * M, l[5] = D * x - v * I, l[6] = x * C - P * M, l[7] = S * M - v * C, l[8] = v * P - S * x, l; - }, ht.determinant = function(l) { - var f = l[3], v = l[4], S = l[5], D = l[6], x = l[7], P = l[8]; - return l[0] * (P * v - S * x) + l[1] * (-P * f + S * D) + l[2] * (x * f - v * D); - }, ht.multiply = o, ht.translate = function(l, f, v) { - var S = f[0], D = f[1], x = f[2], P = f[3], I = f[4], M = f[5], C = f[6], k = f[7], V = f[8], U = v[0], q = v[1]; - return l[0] = S, l[1] = D, l[2] = x, l[3] = P, l[4] = I, l[5] = M, l[6] = U * S + q * P + C, l[7] = U * D + q * I + k, l[8] = U * x + q * M + V, l; - }, ht.rotate = function(l, f, v) { - var S = f[0], D = f[1], x = f[2], P = f[3], I = f[4], M = f[5], C = f[6], k = f[7], V = f[8], U = Math.sin(v), q = Math.cos(v); - return l[0] = q * S + U * P, l[1] = q * D + U * I, l[2] = q * x + U * M, l[3] = q * P - U * S, l[4] = q * I - U * D, l[5] = q * M - U * x, l[6] = C, l[7] = k, l[8] = V, l; - }, ht.scale = function(l, f, v) { - var S = v[0], D = v[1]; - return l[0] = S * f[0], l[1] = S * f[1], l[2] = S * f[2], l[3] = D * f[3], l[4] = D * f[4], l[5] = D * f[5], l[6] = f[6], l[7] = f[7], l[8] = f[8], l; - }, ht.fromTranslation = function(l, f) { - return l[0] = 1, l[1] = 0, l[2] = 0, l[3] = 0, l[4] = 1, l[5] = 0, l[6] = f[0], l[7] = f[1], l[8] = 1, l; - }, ht.fromRotation = function(l, f) { - var v = Math.sin(f), S = Math.cos(f); - return l[0] = S, l[1] = v, l[2] = 0, l[3] = -v, l[4] = S, l[5] = 0, l[6] = 0, l[7] = 0, l[8] = 1, l; - }, ht.fromScaling = function(l, f) { - return l[0] = f[0], l[1] = 0, l[2] = 0, l[3] = 0, l[4] = f[1], l[5] = 0, l[6] = 0, l[7] = 0, l[8] = 1, l; - }, ht.fromMat2d = function(l, f) { - return l[0] = f[0], l[1] = f[1], l[2] = 0, l[3] = f[2], l[4] = f[3], l[5] = 0, l[6] = f[4], l[7] = f[5], l[8] = 1, l; - }, ht.fromQuat = function(l, f) { - var v = f[0], S = f[1], D = f[2], x = f[3], P = v + v, I = S + S, M = D + D, C = v * P, k = S * P, V = S * I, U = D * P, q = D * I, $ = D * M, H = x * P, K = x * I, Q = x * M; - return l[0] = 1 - V - $, l[3] = k - Q, l[6] = U + K, l[1] = k + Q, l[4] = 1 - C - $, l[7] = q - H, l[2] = U - K, l[5] = q + H, l[8] = 1 - C - V, l; - }, ht.normalFromMat4 = function(l, f) { - var v = f[0], S = f[1], D = f[2], x = f[3], P = f[4], I = f[5], M = f[6], C = f[7], k = f[8], V = f[9], U = f[10], q = f[11], $ = f[12], H = f[13], K = f[14], Q = f[15], ie = v * I - S * P, fe = v * M - D * P, de = v * C - x * P, ue = S * M - D * I, Se = S * C - x * I, me = D * C - x * M, Ee = k * H - V * $, ze = k * K - U * $, Ie = k * Q - q * $, Re = V * K - U * H, Ve = V * Q - q * H, Ue = U * Q - q * K, Fe = ie * Ue - fe * Ve + de * Re + ue * Ie - Se * ze + me * Ee; - return Fe ? (l[0] = (I * Ue - M * Ve + C * Re) * (Fe = 1 / Fe), l[1] = (M * Ie - P * Ue - C * ze) * Fe, l[2] = (P * Ve - I * Ie + C * Ee) * Fe, l[3] = (D * Ve - S * Ue - x * Re) * Fe, l[4] = (v * Ue - D * Ie + x * ze) * Fe, l[5] = (S * Ie - v * Ve - x * Ee) * Fe, l[6] = (H * me - K * Se + Q * ue) * Fe, l[7] = (K * de - $ * me - Q * fe) * Fe, l[8] = ($ * Se - H * de + Q * ie) * Fe, l) : null; - }, ht.projection = function(l, f, v) { - return l[0] = 2 / f, l[1] = 0, l[2] = 0, l[3] = 0, l[4] = -2 / v, l[5] = 0, l[6] = -1, l[7] = 1, l[8] = 1, l; - }, ht.str = function(l) { - return "mat3(" + l[0] + ", " + l[1] + ", " + l[2] + ", " + l[3] + ", " + l[4] + ", " + l[5] + ", " + l[6] + ", " + l[7] + ", " + l[8] + ")"; - }, ht.frob = function(l) { - return Math.hypot(l[0], l[1], l[2], l[3], l[4], l[5], l[6], l[7], l[8]); - }, ht.add = function(l, f, v) { - return l[0] = f[0] + v[0], l[1] = f[1] + v[1], l[2] = f[2] + v[2], l[3] = f[3] + v[3], l[4] = f[4] + v[4], l[5] = f[5] + v[5], l[6] = f[6] + v[6], l[7] = f[7] + v[7], l[8] = f[8] + v[8], l; - }, ht.subtract = u, ht.multiplyScalar = function(l, f, v) { - return l[0] = f[0] * v, l[1] = f[1] * v, l[2] = f[2] * v, l[3] = f[3] * v, l[4] = f[4] * v, l[5] = f[5] * v, l[6] = f[6] * v, l[7] = f[7] * v, l[8] = f[8] * v, l; - }, ht.multiplyScalarAndAdd = function(l, f, v, S) { - return l[0] = f[0] + v[0] * S, l[1] = f[1] + v[1] * S, l[2] = f[2] + v[2] * S, l[3] = f[3] + v[3] * S, l[4] = f[4] + v[4] * S, l[5] = f[5] + v[5] * S, l[6] = f[6] + v[6] * S, l[7] = f[7] + v[7] * S, l[8] = f[8] + v[8] * S, l; - }, ht.exactEquals = function(l, f) { - return l[0] === f[0] && l[1] === f[1] && l[2] === f[2] && l[3] === f[3] && l[4] === f[4] && l[5] === f[5] && l[6] === f[6] && l[7] === f[7] && l[8] === f[8]; - }, ht.equals = function(l, f) { - var v = l[0], S = l[1], D = l[2], x = l[3], P = l[4], I = l[5], M = l[6], C = l[7], k = l[8], V = f[0], U = f[1], q = f[2], $ = f[3], H = f[4], K = f[5], Q = f[6], ie = f[7], fe = f[8]; - return Math.abs(v - V) <= e.EPSILON * Math.max(1, Math.abs(v), Math.abs(V)) && Math.abs(S - U) <= e.EPSILON * Math.max(1, Math.abs(S), Math.abs(U)) && Math.abs(D - q) <= e.EPSILON * Math.max(1, Math.abs(D), Math.abs(q)) && Math.abs(x - $) <= e.EPSILON * Math.max(1, Math.abs(x), Math.abs($)) && Math.abs(P - H) <= e.EPSILON * Math.max(1, Math.abs(P), Math.abs(H)) && Math.abs(I - K) <= e.EPSILON * Math.max(1, Math.abs(I), Math.abs(K)) && Math.abs(M - Q) <= e.EPSILON * Math.max(1, Math.abs(M), Math.abs(Q)) && Math.abs(C - ie) <= e.EPSILON * Math.max(1, Math.abs(C), Math.abs(ie)) && Math.abs(k - fe) <= e.EPSILON * Math.max(1, Math.abs(k), Math.abs(fe)); - }, ht.sub = ht.mul = void 0; - var e = function(l, f) { - if (l && l.__esModule) - return l; - if (l === null || r(l) !== "object" && typeof l != "function") - return { default: l }; - var v = n(void 0); - if (v && v.has(l)) - return v.get(l); - var S = {}, D = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var x in l) - if (x !== "default" && Object.prototype.hasOwnProperty.call(l, x)) { - var P = D ? Object.getOwnPropertyDescriptor(l, x) : null; - P && (P.get || P.set) ? Object.defineProperty(S, x, P) : S[x] = l[x]; - } - return S.default = l, v && v.set(l, S), S; - }(ae()); - function n(l) { - if (typeof WeakMap != "function") - return null; - var f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(); - return (n = function(S) { - return S ? v : f; - })(l); - } - function o(l, f, v) { - var S = f[0], D = f[1], x = f[2], P = f[3], I = f[4], M = f[5], C = f[6], k = f[7], V = f[8], U = v[0], q = v[1], $ = v[2], H = v[3], K = v[4], Q = v[5], ie = v[6], fe = v[7], de = v[8]; - return l[0] = U * S + q * P + $ * C, l[1] = U * D + q * I + $ * k, l[2] = U * x + q * M + $ * V, l[3] = H * S + K * P + Q * C, l[4] = H * D + K * I + Q * k, l[5] = H * x + K * M + Q * V, l[6] = ie * S + fe * P + de * C, l[7] = ie * D + fe * I + de * k, l[8] = ie * x + fe * M + de * V, l; - } - function u(l, f, v) { - return l[0] = f[0] - v[0], l[1] = f[1] - v[1], l[2] = f[2] - v[2], l[3] = f[3] - v[3], l[4] = f[4] - v[4], l[5] = f[5] - v[5], l[6] = f[6] - v[6], l[7] = f[7] - v[7], l[8] = f[8] - v[8], l; - } - return ht.mul = o, ht.sub = u, ht; - } - var Vt, pt = {}; - function Gt() { - if (Vt) - return pt; - function r(x) { - return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(P) { - return typeof P; - } : function(P) { - return P && typeof Symbol == "function" && P.constructor === Symbol && P !== Symbol.prototype ? "symbol" : typeof P; - }, r(x); - } - Vt = 1, Object.defineProperty(pt, "__esModule", { value: !0 }), pt.create = function() { - var x = new e.ARRAY_TYPE(16); - return e.ARRAY_TYPE != Float32Array && (x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[6] = 0, x[7] = 0, x[8] = 0, x[9] = 0, x[11] = 0, x[12] = 0, x[13] = 0, x[14] = 0), x[0] = 1, x[5] = 1, x[10] = 1, x[15] = 1, x; - }, pt.clone = function(x) { - var P = new e.ARRAY_TYPE(16); - return P[0] = x[0], P[1] = x[1], P[2] = x[2], P[3] = x[3], P[4] = x[4], P[5] = x[5], P[6] = x[6], P[7] = x[7], P[8] = x[8], P[9] = x[9], P[10] = x[10], P[11] = x[11], P[12] = x[12], P[13] = x[13], P[14] = x[14], P[15] = x[15], P; - }, pt.copy = function(x, P) { - return x[0] = P[0], x[1] = P[1], x[2] = P[2], x[3] = P[3], x[4] = P[4], x[5] = P[5], x[6] = P[6], x[7] = P[7], x[8] = P[8], x[9] = P[9], x[10] = P[10], x[11] = P[11], x[12] = P[12], x[13] = P[13], x[14] = P[14], x[15] = P[15], x; - }, pt.fromValues = function(x, P, I, M, C, k, V, U, q, $, H, K, Q, ie, fe, de) { - var ue = new e.ARRAY_TYPE(16); - return ue[0] = x, ue[1] = P, ue[2] = I, ue[3] = M, ue[4] = C, ue[5] = k, ue[6] = V, ue[7] = U, ue[8] = q, ue[9] = $, ue[10] = H, ue[11] = K, ue[12] = Q, ue[13] = ie, ue[14] = fe, ue[15] = de, ue; - }, pt.set = function(x, P, I, M, C, k, V, U, q, $, H, K, Q, ie, fe, de, ue) { - return x[0] = P, x[1] = I, x[2] = M, x[3] = C, x[4] = k, x[5] = V, x[6] = U, x[7] = q, x[8] = $, x[9] = H, x[10] = K, x[11] = Q, x[12] = ie, x[13] = fe, x[14] = de, x[15] = ue, x; - }, pt.identity = o, pt.transpose = function(x, P) { - if (x === P) { - var I = P[1], M = P[2], C = P[3], k = P[6], V = P[7], U = P[11]; - x[1] = P[4], x[2] = P[8], x[3] = P[12], x[4] = I, x[6] = P[9], x[7] = P[13], x[8] = M, x[9] = k, x[11] = P[14], x[12] = C, x[13] = V, x[14] = U; - } else - x[0] = P[0], x[1] = P[4], x[2] = P[8], x[3] = P[12], x[4] = P[1], x[5] = P[5], x[6] = P[9], x[7] = P[13], x[8] = P[2], x[9] = P[6], x[10] = P[10], x[11] = P[14], x[12] = P[3], x[13] = P[7], x[14] = P[11], x[15] = P[15]; - return x; - }, pt.invert = function(x, P) { - var I = P[0], M = P[1], C = P[2], k = P[3], V = P[4], U = P[5], q = P[6], $ = P[7], H = P[8], K = P[9], Q = P[10], ie = P[11], fe = P[12], de = P[13], ue = P[14], Se = P[15], me = I * U - M * V, Ee = I * q - C * V, ze = I * $ - k * V, Ie = M * q - C * U, Re = M * $ - k * U, Ve = C * $ - k * q, Ue = H * de - K * fe, Fe = H * ue - Q * fe, et = H * Se - ie * fe, dt = K * ue - Q * de, tt = K * Se - ie * de, Mt = Q * Se - ie * ue, wt = me * Mt - Ee * tt + ze * dt + Ie * et - Re * Fe + Ve * Ue; - return wt ? (x[0] = (U * Mt - q * tt + $ * dt) * (wt = 1 / wt), x[1] = (C * tt - M * Mt - k * dt) * wt, x[2] = (de * Ve - ue * Re + Se * Ie) * wt, x[3] = (Q * Re - K * Ve - ie * Ie) * wt, x[4] = (q * et - V * Mt - $ * Fe) * wt, x[5] = (I * Mt - C * et + k * Fe) * wt, x[6] = (ue * ze - fe * Ve - Se * Ee) * wt, x[7] = (H * Ve - Q * ze + ie * Ee) * wt, x[8] = (V * tt - U * et + $ * Ue) * wt, x[9] = (M * et - I * tt - k * Ue) * wt, x[10] = (fe * Re - de * ze + Se * me) * wt, x[11] = (K * ze - H * Re - ie * me) * wt, x[12] = (U * Fe - V * dt - q * Ue) * wt, x[13] = (I * dt - M * Fe + C * Ue) * wt, x[14] = (de * Ee - fe * Ie - ue * me) * wt, x[15] = (H * Ie - K * Ee + Q * me) * wt, x) : null; - }, pt.adjoint = function(x, P) { - var I = P[0], M = P[1], C = P[2], k = P[3], V = P[4], U = P[5], q = P[6], $ = P[7], H = P[8], K = P[9], Q = P[10], ie = P[11], fe = P[12], de = P[13], ue = P[14], Se = P[15]; - return x[0] = U * (Q * Se - ie * ue) - K * (q * Se - $ * ue) + de * (q * ie - $ * Q), x[1] = -(M * (Q * Se - ie * ue) - K * (C * Se - k * ue) + de * (C * ie - k * Q)), x[2] = M * (q * Se - $ * ue) - U * (C * Se - k * ue) + de * (C * $ - k * q), x[3] = -(M * (q * ie - $ * Q) - U * (C * ie - k * Q) + K * (C * $ - k * q)), x[4] = -(V * (Q * Se - ie * ue) - H * (q * Se - $ * ue) + fe * (q * ie - $ * Q)), x[5] = I * (Q * Se - ie * ue) - H * (C * Se - k * ue) + fe * (C * ie - k * Q), x[6] = -(I * (q * Se - $ * ue) - V * (C * Se - k * ue) + fe * (C * $ - k * q)), x[7] = I * (q * ie - $ * Q) - V * (C * ie - k * Q) + H * (C * $ - k * q), x[8] = V * (K * Se - ie * de) - H * (U * Se - $ * de) + fe * (U * ie - $ * K), x[9] = -(I * (K * Se - ie * de) - H * (M * Se - k * de) + fe * (M * ie - k * K)), x[10] = I * (U * Se - $ * de) - V * (M * Se - k * de) + fe * (M * $ - k * U), x[11] = -(I * (U * ie - $ * K) - V * (M * ie - k * K) + H * (M * $ - k * U)), x[12] = -(V * (K * ue - Q * de) - H * (U * ue - q * de) + fe * (U * Q - q * K)), x[13] = I * (K * ue - Q * de) - H * (M * ue - C * de) + fe * (M * Q - C * K), x[14] = -(I * (U * ue - q * de) - V * (M * ue - C * de) + fe * (M * q - C * U)), x[15] = I * (U * Q - q * K) - V * (M * Q - C * K) + H * (M * q - C * U), x; - }, pt.determinant = function(x) { - var P = x[0], I = x[1], M = x[2], C = x[3], k = x[4], V = x[5], U = x[6], q = x[7], $ = x[8], H = x[9], K = x[10], Q = x[11], ie = x[12], fe = x[13], de = x[14], ue = x[15]; - return (P * V - I * k) * (K * ue - Q * de) - (P * U - M * k) * (H * ue - Q * fe) + (P * q - C * k) * (H * de - K * fe) + (I * U - M * V) * ($ * ue - Q * ie) - (I * q - C * V) * ($ * de - K * ie) + (M * q - C * U) * ($ * fe - H * ie); - }, pt.multiply = u, pt.translate = function(x, P, I) { - var M, C, k, V, U, q, $, H, K, Q, ie, fe, de = I[0], ue = I[1], Se = I[2]; - return P === x ? (x[12] = P[0] * de + P[4] * ue + P[8] * Se + P[12], x[13] = P[1] * de + P[5] * ue + P[9] * Se + P[13], x[14] = P[2] * de + P[6] * ue + P[10] * Se + P[14], x[15] = P[3] * de + P[7] * ue + P[11] * Se + P[15]) : (C = P[1], k = P[2], V = P[3], U = P[4], q = P[5], $ = P[6], H = P[7], K = P[8], Q = P[9], ie = P[10], fe = P[11], x[0] = M = P[0], x[1] = C, x[2] = k, x[3] = V, x[4] = U, x[5] = q, x[6] = $, x[7] = H, x[8] = K, x[9] = Q, x[10] = ie, x[11] = fe, x[12] = M * de + U * ue + K * Se + P[12], x[13] = C * de + q * ue + Q * Se + P[13], x[14] = k * de + $ * ue + ie * Se + P[14], x[15] = V * de + H * ue + fe * Se + P[15]), x; - }, pt.scale = function(x, P, I) { - var M = I[0], C = I[1], k = I[2]; - return x[0] = P[0] * M, x[1] = P[1] * M, x[2] = P[2] * M, x[3] = P[3] * M, x[4] = P[4] * C, x[5] = P[5] * C, x[6] = P[6] * C, x[7] = P[7] * C, x[8] = P[8] * k, x[9] = P[9] * k, x[10] = P[10] * k, x[11] = P[11] * k, x[12] = P[12], x[13] = P[13], x[14] = P[14], x[15] = P[15], x; - }, pt.rotate = function(x, P, I, M) { - var C, k, V, U, q, $, H, K, Q, ie, fe, de, ue, Se, me, Ee, ze, Ie, Re, Ve, Ue, Fe, et, dt, tt = M[0], Mt = M[1], wt = M[2], At = Math.hypot(tt, Mt, wt); - return At < e.EPSILON ? null : (tt *= At = 1 / At, Mt *= At, wt *= At, C = Math.sin(I), k = Math.cos(I), q = P[1], $ = P[2], H = P[3], Q = P[5], ie = P[6], fe = P[7], ue = P[9], Se = P[10], me = P[11], Ee = tt * tt * (V = 1 - k) + k, Re = tt * Mt * V - wt * C, Ve = Mt * Mt * V + k, Ue = wt * Mt * V + tt * C, Fe = tt * wt * V + Mt * C, et = Mt * wt * V - tt * C, dt = wt * wt * V + k, x[0] = (U = P[0]) * Ee + (K = P[4]) * (ze = Mt * tt * V + wt * C) + (de = P[8]) * (Ie = wt * tt * V - Mt * C), x[1] = q * Ee + Q * ze + ue * Ie, x[2] = $ * Ee + ie * ze + Se * Ie, x[3] = H * Ee + fe * ze + me * Ie, x[4] = U * Re + K * Ve + de * Ue, x[5] = q * Re + Q * Ve + ue * Ue, x[6] = $ * Re + ie * Ve + Se * Ue, x[7] = H * Re + fe * Ve + me * Ue, x[8] = U * Fe + K * et + de * dt, x[9] = q * Fe + Q * et + ue * dt, x[10] = $ * Fe + ie * et + Se * dt, x[11] = H * Fe + fe * et + me * dt, P !== x && (x[12] = P[12], x[13] = P[13], x[14] = P[14], x[15] = P[15]), x); - }, pt.rotateX = function(x, P, I) { - var M = Math.sin(I), C = Math.cos(I), k = P[4], V = P[5], U = P[6], q = P[7], $ = P[8], H = P[9], K = P[10], Q = P[11]; - return P !== x && (x[0] = P[0], x[1] = P[1], x[2] = P[2], x[3] = P[3], x[12] = P[12], x[13] = P[13], x[14] = P[14], x[15] = P[15]), x[4] = k * C + $ * M, x[5] = V * C + H * M, x[6] = U * C + K * M, x[7] = q * C + Q * M, x[8] = $ * C - k * M, x[9] = H * C - V * M, x[10] = K * C - U * M, x[11] = Q * C - q * M, x; - }, pt.rotateY = function(x, P, I) { - var M = Math.sin(I), C = Math.cos(I), k = P[0], V = P[1], U = P[2], q = P[3], $ = P[8], H = P[9], K = P[10], Q = P[11]; - return P !== x && (x[4] = P[4], x[5] = P[5], x[6] = P[6], x[7] = P[7], x[12] = P[12], x[13] = P[13], x[14] = P[14], x[15] = P[15]), x[0] = k * C - $ * M, x[1] = V * C - H * M, x[2] = U * C - K * M, x[3] = q * C - Q * M, x[8] = k * M + $ * C, x[9] = V * M + H * C, x[10] = U * M + K * C, x[11] = q * M + Q * C, x; - }, pt.rotateZ = function(x, P, I) { - var M = Math.sin(I), C = Math.cos(I), k = P[0], V = P[1], U = P[2], q = P[3], $ = P[4], H = P[5], K = P[6], Q = P[7]; - return P !== x && (x[8] = P[8], x[9] = P[9], x[10] = P[10], x[11] = P[11], x[12] = P[12], x[13] = P[13], x[14] = P[14], x[15] = P[15]), x[0] = k * C + $ * M, x[1] = V * C + H * M, x[2] = U * C + K * M, x[3] = q * C + Q * M, x[4] = $ * C - k * M, x[5] = H * C - V * M, x[6] = K * C - U * M, x[7] = Q * C - q * M, x; - }, pt.fromTranslation = function(x, P) { - return x[0] = 1, x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[5] = 1, x[6] = 0, x[7] = 0, x[8] = 0, x[9] = 0, x[10] = 1, x[11] = 0, x[12] = P[0], x[13] = P[1], x[14] = P[2], x[15] = 1, x; - }, pt.fromScaling = function(x, P) { - return x[0] = P[0], x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[5] = P[1], x[6] = 0, x[7] = 0, x[8] = 0, x[9] = 0, x[10] = P[2], x[11] = 0, x[12] = 0, x[13] = 0, x[14] = 0, x[15] = 1, x; - }, pt.fromRotation = function(x, P, I) { - var M, C, k, V = I[0], U = I[1], q = I[2], $ = Math.hypot(V, U, q); - return $ < e.EPSILON ? null : (V *= $ = 1 / $, U *= $, q *= $, M = Math.sin(P), C = Math.cos(P), x[0] = V * V * (k = 1 - C) + C, x[1] = U * V * k + q * M, x[2] = q * V * k - U * M, x[3] = 0, x[4] = V * U * k - q * M, x[5] = U * U * k + C, x[6] = q * U * k + V * M, x[7] = 0, x[8] = V * q * k + U * M, x[9] = U * q * k - V * M, x[10] = q * q * k + C, x[11] = 0, x[12] = 0, x[13] = 0, x[14] = 0, x[15] = 1, x); - }, pt.fromXRotation = function(x, P) { - var I = Math.sin(P), M = Math.cos(P); - return x[0] = 1, x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[5] = M, x[6] = I, x[7] = 0, x[8] = 0, x[9] = -I, x[10] = M, x[11] = 0, x[12] = 0, x[13] = 0, x[14] = 0, x[15] = 1, x; - }, pt.fromYRotation = function(x, P) { - var I = Math.sin(P), M = Math.cos(P); - return x[0] = M, x[1] = 0, x[2] = -I, x[3] = 0, x[4] = 0, x[5] = 1, x[6] = 0, x[7] = 0, x[8] = I, x[9] = 0, x[10] = M, x[11] = 0, x[12] = 0, x[13] = 0, x[14] = 0, x[15] = 1, x; - }, pt.fromZRotation = function(x, P) { - var I = Math.sin(P), M = Math.cos(P); - return x[0] = M, x[1] = I, x[2] = 0, x[3] = 0, x[4] = -I, x[5] = M, x[6] = 0, x[7] = 0, x[8] = 0, x[9] = 0, x[10] = 1, x[11] = 0, x[12] = 0, x[13] = 0, x[14] = 0, x[15] = 1, x; - }, pt.fromRotationTranslation = l, pt.fromQuat2 = function(x, P) { - var I = new e.ARRAY_TYPE(3), M = -P[0], C = -P[1], k = -P[2], V = P[3], U = P[4], q = P[5], $ = P[6], H = P[7], K = M * M + C * C + k * k + V * V; - return K > 0 ? (I[0] = 2 * (U * V + H * M + q * k - $ * C) / K, I[1] = 2 * (q * V + H * C + $ * M - U * k) / K, I[2] = 2 * ($ * V + H * k + U * C - q * M) / K) : (I[0] = 2 * (U * V + H * M + q * k - $ * C), I[1] = 2 * (q * V + H * C + $ * M - U * k), I[2] = 2 * ($ * V + H * k + U * C - q * M)), l(x, P, I), x; - }, pt.getTranslation = function(x, P) { - return x[0] = P[12], x[1] = P[13], x[2] = P[14], x; - }, pt.getScaling = f, pt.getRotation = function(x, P) { - var I = new e.ARRAY_TYPE(3); - f(I, P); - var M = 1 / I[0], C = 1 / I[1], k = 1 / I[2], V = P[0] * M, U = P[1] * C, q = P[2] * k, $ = P[4] * M, H = P[5] * C, K = P[6] * k, Q = P[8] * M, ie = P[9] * C, fe = P[10] * k, de = V + H + fe, ue = 0; - return de > 0 ? (ue = 2 * Math.sqrt(de + 1), x[3] = 0.25 * ue, x[0] = (K - ie) / ue, x[1] = (Q - q) / ue, x[2] = (U - $) / ue) : V > H && V > fe ? (ue = 2 * Math.sqrt(1 + V - H - fe), x[3] = (K - ie) / ue, x[0] = 0.25 * ue, x[1] = (U + $) / ue, x[2] = (Q + q) / ue) : H > fe ? (ue = 2 * Math.sqrt(1 + H - V - fe), x[3] = (Q - q) / ue, x[0] = (U + $) / ue, x[1] = 0.25 * ue, x[2] = (K + ie) / ue) : (ue = 2 * Math.sqrt(1 + fe - V - H), x[3] = (U - $) / ue, x[0] = (Q + q) / ue, x[1] = (K + ie) / ue, x[2] = 0.25 * ue), x; - }, pt.fromRotationTranslationScale = function(x, P, I, M) { - var C = P[0], k = P[1], V = P[2], U = P[3], q = C + C, $ = k + k, H = V + V, K = C * q, Q = C * $, ie = C * H, fe = k * $, de = k * H, ue = V * H, Se = U * q, me = U * $, Ee = U * H, ze = M[0], Ie = M[1], Re = M[2]; - return x[0] = (1 - (fe + ue)) * ze, x[1] = (Q + Ee) * ze, x[2] = (ie - me) * ze, x[3] = 0, x[4] = (Q - Ee) * Ie, x[5] = (1 - (K + ue)) * Ie, x[6] = (de + Se) * Ie, x[7] = 0, x[8] = (ie + me) * Re, x[9] = (de - Se) * Re, x[10] = (1 - (K + fe)) * Re, x[11] = 0, x[12] = I[0], x[13] = I[1], x[14] = I[2], x[15] = 1, x; - }, pt.fromRotationTranslationScaleOrigin = function(x, P, I, M, C) { - var k = P[0], V = P[1], U = P[2], q = P[3], $ = k + k, H = V + V, K = U + U, Q = k * $, ie = k * H, fe = k * K, de = V * H, ue = V * K, Se = U * K, me = q * $, Ee = q * H, ze = q * K, Ie = M[0], Re = M[1], Ve = M[2], Ue = C[0], Fe = C[1], et = C[2], dt = (1 - (de + Se)) * Ie, tt = (ie + ze) * Ie, Mt = (fe - Ee) * Ie, wt = (ie - ze) * Re, At = (1 - (Q + Se)) * Re, rt = (ue + me) * Re, Ut = (fe + Ee) * Ve, St = (ue - me) * Ve, Nt = (1 - (Q + de)) * Ve; - return x[0] = dt, x[1] = tt, x[2] = Mt, x[3] = 0, x[4] = wt, x[5] = At, x[6] = rt, x[7] = 0, x[8] = Ut, x[9] = St, x[10] = Nt, x[11] = 0, x[12] = I[0] + Ue - (dt * Ue + wt * Fe + Ut * et), x[13] = I[1] + Fe - (tt * Ue + At * Fe + St * et), x[14] = I[2] + et - (Mt * Ue + rt * Fe + Nt * et), x[15] = 1, x; - }, pt.fromQuat = function(x, P) { - var I = P[0], M = P[1], C = P[2], k = P[3], V = I + I, U = M + M, q = C + C, $ = I * V, H = M * V, K = M * U, Q = C * V, ie = C * U, fe = C * q, de = k * V, ue = k * U, Se = k * q; - return x[0] = 1 - K - fe, x[1] = H + Se, x[2] = Q - ue, x[3] = 0, x[4] = H - Se, x[5] = 1 - $ - fe, x[6] = ie + de, x[7] = 0, x[8] = Q + ue, x[9] = ie - de, x[10] = 1 - $ - K, x[11] = 0, x[12] = 0, x[13] = 0, x[14] = 0, x[15] = 1, x; - }, pt.frustum = function(x, P, I, M, C, k, V) { - var U = 1 / (I - P), q = 1 / (C - M), $ = 1 / (k - V); - return x[0] = 2 * k * U, x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[5] = 2 * k * q, x[6] = 0, x[7] = 0, x[8] = (I + P) * U, x[9] = (C + M) * q, x[10] = (V + k) * $, x[11] = -1, x[12] = 0, x[13] = 0, x[14] = V * k * 2 * $, x[15] = 0, x; - }, pt.perspectiveNO = v, pt.perspectiveZO = function(x, P, I, M, C) { - var k, V = 1 / Math.tan(P / 2); - return x[0] = V / I, x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[5] = V, x[6] = 0, x[7] = 0, x[8] = 0, x[9] = 0, x[11] = -1, x[12] = 0, x[13] = 0, x[15] = 0, C != null && C !== 1 / 0 ? (x[10] = C * (k = 1 / (M - C)), x[14] = C * M * k) : (x[10] = -1, x[14] = -M), x; - }, pt.perspectiveFromFieldOfView = function(x, P, I, M) { - var C = Math.tan(P.upDegrees * Math.PI / 180), k = Math.tan(P.downDegrees * Math.PI / 180), V = Math.tan(P.leftDegrees * Math.PI / 180), U = Math.tan(P.rightDegrees * Math.PI / 180), q = 2 / (V + U), $ = 2 / (C + k); - return x[0] = q, x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[5] = $, x[6] = 0, x[7] = 0, x[8] = -(V - U) * q * 0.5, x[9] = (C - k) * $ * 0.5, x[10] = M / (I - M), x[11] = -1, x[12] = 0, x[13] = 0, x[14] = M * I / (I - M), x[15] = 0, x; - }, pt.orthoNO = S, pt.orthoZO = function(x, P, I, M, C, k, V) { - var U = 1 / (P - I), q = 1 / (M - C), $ = 1 / (k - V); - return x[0] = -2 * U, x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[5] = -2 * q, x[6] = 0, x[7] = 0, x[8] = 0, x[9] = 0, x[10] = $, x[11] = 0, x[12] = (P + I) * U, x[13] = (C + M) * q, x[14] = k * $, x[15] = 1, x; - }, pt.lookAt = function(x, P, I, M) { - var C, k, V, U, q, $, H, K, Q, ie, fe = P[0], de = P[1], ue = P[2], Se = M[0], me = M[1], Ee = M[2], ze = I[0], Ie = I[1], Re = I[2]; - return Math.abs(fe - ze) < e.EPSILON && Math.abs(de - Ie) < e.EPSILON && Math.abs(ue - Re) < e.EPSILON ? o(x) : (H = fe - ze, K = de - Ie, Q = ue - Re, C = me * (Q *= ie = 1 / Math.hypot(H, K, Q)) - Ee * (K *= ie), k = Ee * (H *= ie) - Se * Q, V = Se * K - me * H, (ie = Math.hypot(C, k, V)) ? (C *= ie = 1 / ie, k *= ie, V *= ie) : (C = 0, k = 0, V = 0), U = K * V - Q * k, q = Q * C - H * V, $ = H * k - K * C, (ie = Math.hypot(U, q, $)) ? (U *= ie = 1 / ie, q *= ie, $ *= ie) : (U = 0, q = 0, $ = 0), x[0] = C, x[1] = U, x[2] = H, x[3] = 0, x[4] = k, x[5] = q, x[6] = K, x[7] = 0, x[8] = V, x[9] = $, x[10] = Q, x[11] = 0, x[12] = -(C * fe + k * de + V * ue), x[13] = -(U * fe + q * de + $ * ue), x[14] = -(H * fe + K * de + Q * ue), x[15] = 1, x); - }, pt.targetTo = function(x, P, I, M) { - var C = P[0], k = P[1], V = P[2], U = M[0], q = M[1], $ = M[2], H = C - I[0], K = k - I[1], Q = V - I[2], ie = H * H + K * K + Q * Q; - ie > 0 && (H *= ie = 1 / Math.sqrt(ie), K *= ie, Q *= ie); - var fe = q * Q - $ * K, de = $ * H - U * Q, ue = U * K - q * H; - return (ie = fe * fe + de * de + ue * ue) > 0 && (fe *= ie = 1 / Math.sqrt(ie), de *= ie, ue *= ie), x[0] = fe, x[1] = de, x[2] = ue, x[3] = 0, x[4] = K * ue - Q * de, x[5] = Q * fe - H * ue, x[6] = H * de - K * fe, x[7] = 0, x[8] = H, x[9] = K, x[10] = Q, x[11] = 0, x[12] = C, x[13] = k, x[14] = V, x[15] = 1, x; - }, pt.str = function(x) { - return "mat4(" + x[0] + ", " + x[1] + ", " + x[2] + ", " + x[3] + ", " + x[4] + ", " + x[5] + ", " + x[6] + ", " + x[7] + ", " + x[8] + ", " + x[9] + ", " + x[10] + ", " + x[11] + ", " + x[12] + ", " + x[13] + ", " + x[14] + ", " + x[15] + ")"; - }, pt.frob = function(x) { - return Math.hypot(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10], x[11], x[12], x[13], x[14], x[15]); - }, pt.add = function(x, P, I) { - return x[0] = P[0] + I[0], x[1] = P[1] + I[1], x[2] = P[2] + I[2], x[3] = P[3] + I[3], x[4] = P[4] + I[4], x[5] = P[5] + I[5], x[6] = P[6] + I[6], x[7] = P[7] + I[7], x[8] = P[8] + I[8], x[9] = P[9] + I[9], x[10] = P[10] + I[10], x[11] = P[11] + I[11], x[12] = P[12] + I[12], x[13] = P[13] + I[13], x[14] = P[14] + I[14], x[15] = P[15] + I[15], x; - }, pt.subtract = D, pt.multiplyScalar = function(x, P, I) { - return x[0] = P[0] * I, x[1] = P[1] * I, x[2] = P[2] * I, x[3] = P[3] * I, x[4] = P[4] * I, x[5] = P[5] * I, x[6] = P[6] * I, x[7] = P[7] * I, x[8] = P[8] * I, x[9] = P[9] * I, x[10] = P[10] * I, x[11] = P[11] * I, x[12] = P[12] * I, x[13] = P[13] * I, x[14] = P[14] * I, x[15] = P[15] * I, x; - }, pt.multiplyScalarAndAdd = function(x, P, I, M) { - return x[0] = P[0] + I[0] * M, x[1] = P[1] + I[1] * M, x[2] = P[2] + I[2] * M, x[3] = P[3] + I[3] * M, x[4] = P[4] + I[4] * M, x[5] = P[5] + I[5] * M, x[6] = P[6] + I[6] * M, x[7] = P[7] + I[7] * M, x[8] = P[8] + I[8] * M, x[9] = P[9] + I[9] * M, x[10] = P[10] + I[10] * M, x[11] = P[11] + I[11] * M, x[12] = P[12] + I[12] * M, x[13] = P[13] + I[13] * M, x[14] = P[14] + I[14] * M, x[15] = P[15] + I[15] * M, x; - }, pt.exactEquals = function(x, P) { - return x[0] === P[0] && x[1] === P[1] && x[2] === P[2] && x[3] === P[3] && x[4] === P[4] && x[5] === P[5] && x[6] === P[6] && x[7] === P[7] && x[8] === P[8] && x[9] === P[9] && x[10] === P[10] && x[11] === P[11] && x[12] === P[12] && x[13] === P[13] && x[14] === P[14] && x[15] === P[15]; - }, pt.equals = function(x, P) { - var I = x[0], M = x[1], C = x[2], k = x[3], V = x[4], U = x[5], q = x[6], $ = x[7], H = x[8], K = x[9], Q = x[10], ie = x[11], fe = x[12], de = x[13], ue = x[14], Se = x[15], me = P[0], Ee = P[1], ze = P[2], Ie = P[3], Re = P[4], Ve = P[5], Ue = P[6], Fe = P[7], et = P[8], dt = P[9], tt = P[10], Mt = P[11], wt = P[12], At = P[13], rt = P[14], Ut = P[15]; - return Math.abs(I - me) <= e.EPSILON * Math.max(1, Math.abs(I), Math.abs(me)) && Math.abs(M - Ee) <= e.EPSILON * Math.max(1, Math.abs(M), Math.abs(Ee)) && Math.abs(C - ze) <= e.EPSILON * Math.max(1, Math.abs(C), Math.abs(ze)) && Math.abs(k - Ie) <= e.EPSILON * Math.max(1, Math.abs(k), Math.abs(Ie)) && Math.abs(V - Re) <= e.EPSILON * Math.max(1, Math.abs(V), Math.abs(Re)) && Math.abs(U - Ve) <= e.EPSILON * Math.max(1, Math.abs(U), Math.abs(Ve)) && Math.abs(q - Ue) <= e.EPSILON * Math.max(1, Math.abs(q), Math.abs(Ue)) && Math.abs($ - Fe) <= e.EPSILON * Math.max(1, Math.abs($), Math.abs(Fe)) && Math.abs(H - et) <= e.EPSILON * Math.max(1, Math.abs(H), Math.abs(et)) && Math.abs(K - dt) <= e.EPSILON * Math.max(1, Math.abs(K), Math.abs(dt)) && Math.abs(Q - tt) <= e.EPSILON * Math.max(1, Math.abs(Q), Math.abs(tt)) && Math.abs(ie - Mt) <= e.EPSILON * Math.max(1, Math.abs(ie), Math.abs(Mt)) && Math.abs(fe - wt) <= e.EPSILON * Math.max(1, Math.abs(fe), Math.abs(wt)) && Math.abs(de - At) <= e.EPSILON * Math.max(1, Math.abs(de), Math.abs(At)) && Math.abs(ue - rt) <= e.EPSILON * Math.max(1, Math.abs(ue), Math.abs(rt)) && Math.abs(Se - Ut) <= e.EPSILON * Math.max(1, Math.abs(Se), Math.abs(Ut)); - }, pt.sub = pt.mul = pt.ortho = pt.perspective = void 0; - var e = function(x, P) { - if (x && x.__esModule) - return x; - if (x === null || r(x) !== "object" && typeof x != "function") - return { default: x }; - var I = n(void 0); - if (I && I.has(x)) - return I.get(x); - var M = {}, C = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var k in x) - if (k !== "default" && Object.prototype.hasOwnProperty.call(x, k)) { - var V = C ? Object.getOwnPropertyDescriptor(x, k) : null; - V && (V.get || V.set) ? Object.defineProperty(M, k, V) : M[k] = x[k]; - } - return M.default = x, I && I.set(x, M), M; - }(ae()); - function n(x) { - if (typeof WeakMap != "function") - return null; - var P = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(); - return (n = function(M) { - return M ? I : P; - })(x); - } - function o(x) { - return x[0] = 1, x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[5] = 1, x[6] = 0, x[7] = 0, x[8] = 0, x[9] = 0, x[10] = 1, x[11] = 0, x[12] = 0, x[13] = 0, x[14] = 0, x[15] = 1, x; - } - function u(x, P, I) { - var M = P[0], C = P[1], k = P[2], V = P[3], U = P[4], q = P[5], $ = P[6], H = P[7], K = P[8], Q = P[9], ie = P[10], fe = P[11], de = P[12], ue = P[13], Se = P[14], me = P[15], Ee = I[0], ze = I[1], Ie = I[2], Re = I[3]; - return x[0] = Ee * M + ze * U + Ie * K + Re * de, x[1] = Ee * C + ze * q + Ie * Q + Re * ue, x[2] = Ee * k + ze * $ + Ie * ie + Re * Se, x[3] = Ee * V + ze * H + Ie * fe + Re * me, x[4] = (Ee = I[4]) * M + (ze = I[5]) * U + (Ie = I[6]) * K + (Re = I[7]) * de, x[5] = Ee * C + ze * q + Ie * Q + Re * ue, x[6] = Ee * k + ze * $ + Ie * ie + Re * Se, x[7] = Ee * V + ze * H + Ie * fe + Re * me, x[8] = (Ee = I[8]) * M + (ze = I[9]) * U + (Ie = I[10]) * K + (Re = I[11]) * de, x[9] = Ee * C + ze * q + Ie * Q + Re * ue, x[10] = Ee * k + ze * $ + Ie * ie + Re * Se, x[11] = Ee * V + ze * H + Ie * fe + Re * me, x[12] = (Ee = I[12]) * M + (ze = I[13]) * U + (Ie = I[14]) * K + (Re = I[15]) * de, x[13] = Ee * C + ze * q + Ie * Q + Re * ue, x[14] = Ee * k + ze * $ + Ie * ie + Re * Se, x[15] = Ee * V + ze * H + Ie * fe + Re * me, x; - } - function l(x, P, I) { - var M = P[0], C = P[1], k = P[2], V = P[3], U = M + M, q = C + C, $ = k + k, H = M * U, K = M * q, Q = M * $, ie = C * q, fe = C * $, de = k * $, ue = V * U, Se = V * q, me = V * $; - return x[0] = 1 - (ie + de), x[1] = K + me, x[2] = Q - Se, x[3] = 0, x[4] = K - me, x[5] = 1 - (H + de), x[6] = fe + ue, x[7] = 0, x[8] = Q + Se, x[9] = fe - ue, x[10] = 1 - (H + ie), x[11] = 0, x[12] = I[0], x[13] = I[1], x[14] = I[2], x[15] = 1, x; - } - function f(x, P) { - var I = P[4], M = P[5], C = P[6], k = P[8], V = P[9], U = P[10]; - return x[0] = Math.hypot(P[0], P[1], P[2]), x[1] = Math.hypot(I, M, C), x[2] = Math.hypot(k, V, U), x; - } - function v(x, P, I, M, C) { - var k, V = 1 / Math.tan(P / 2); - return x[0] = V / I, x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[5] = V, x[6] = 0, x[7] = 0, x[8] = 0, x[9] = 0, x[11] = -1, x[12] = 0, x[13] = 0, x[15] = 0, C != null && C !== 1 / 0 ? (x[10] = (C + M) * (k = 1 / (M - C)), x[14] = 2 * C * M * k) : (x[10] = -1, x[14] = -2 * M), x; - } - function S(x, P, I, M, C, k, V) { - var U = 1 / (P - I), q = 1 / (M - C), $ = 1 / (k - V); - return x[0] = -2 * U, x[1] = 0, x[2] = 0, x[3] = 0, x[4] = 0, x[5] = -2 * q, x[6] = 0, x[7] = 0, x[8] = 0, x[9] = 0, x[10] = 2 * $, x[11] = 0, x[12] = (P + I) * U, x[13] = (C + M) * q, x[14] = (V + k) * $, x[15] = 1, x; - } - function D(x, P, I) { - return x[0] = P[0] - I[0], x[1] = P[1] - I[1], x[2] = P[2] - I[2], x[3] = P[3] - I[3], x[4] = P[4] - I[4], x[5] = P[5] - I[5], x[6] = P[6] - I[6], x[7] = P[7] - I[7], x[8] = P[8] - I[8], x[9] = P[9] - I[9], x[10] = P[10] - I[10], x[11] = P[11] - I[11], x[12] = P[12] - I[12], x[13] = P[13] - I[13], x[14] = P[14] - I[14], x[15] = P[15] - I[15], x; - } - return pt.perspective = v, pt.ortho = S, pt.mul = u, pt.sub = D, pt; - } - var ui, kt = {}, Pt = {}; - function Mi() { - if (ui) - return Pt; - function r(C) { - return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(k) { - return typeof k; - } : function(k) { - return k && typeof Symbol == "function" && k.constructor === Symbol && k !== Symbol.prototype ? "symbol" : typeof k; - }, r(C); - } - ui = 1, Object.defineProperty(Pt, "__esModule", { value: !0 }), Pt.create = o, Pt.clone = function(C) { - var k = new e.ARRAY_TYPE(3); - return k[0] = C[0], k[1] = C[1], k[2] = C[2], k; - }, Pt.length = u, Pt.fromValues = function(C, k, V) { - var U = new e.ARRAY_TYPE(3); - return U[0] = C, U[1] = k, U[2] = V, U; - }, Pt.copy = function(C, k) { - return C[0] = k[0], C[1] = k[1], C[2] = k[2], C; - }, Pt.set = function(C, k, V, U) { - return C[0] = k, C[1] = V, C[2] = U, C; - }, Pt.add = function(C, k, V) { - return C[0] = k[0] + V[0], C[1] = k[1] + V[1], C[2] = k[2] + V[2], C; - }, Pt.subtract = l, Pt.multiply = f, Pt.divide = v, Pt.ceil = function(C, k) { - return C[0] = Math.ceil(k[0]), C[1] = Math.ceil(k[1]), C[2] = Math.ceil(k[2]), C; - }, Pt.floor = function(C, k) { - return C[0] = Math.floor(k[0]), C[1] = Math.floor(k[1]), C[2] = Math.floor(k[2]), C; - }, Pt.min = function(C, k, V) { - return C[0] = Math.min(k[0], V[0]), C[1] = Math.min(k[1], V[1]), C[2] = Math.min(k[2], V[2]), C; - }, Pt.max = function(C, k, V) { - return C[0] = Math.max(k[0], V[0]), C[1] = Math.max(k[1], V[1]), C[2] = Math.max(k[2], V[2]), C; - }, Pt.round = function(C, k) { - return C[0] = Math.round(k[0]), C[1] = Math.round(k[1]), C[2] = Math.round(k[2]), C; - }, Pt.scale = function(C, k, V) { - return C[0] = k[0] * V, C[1] = k[1] * V, C[2] = k[2] * V, C; - }, Pt.scaleAndAdd = function(C, k, V, U) { - return C[0] = k[0] + V[0] * U, C[1] = k[1] + V[1] * U, C[2] = k[2] + V[2] * U, C; - }, Pt.distance = S, Pt.squaredDistance = D, Pt.squaredLength = x, Pt.negate = function(C, k) { - return C[0] = -k[0], C[1] = -k[1], C[2] = -k[2], C; - }, Pt.inverse = function(C, k) { - return C[0] = 1 / k[0], C[1] = 1 / k[1], C[2] = 1 / k[2], C; - }, Pt.normalize = function(C, k) { - var V = k[0], U = k[1], q = k[2], $ = V * V + U * U + q * q; - return $ > 0 && ($ = 1 / Math.sqrt($)), C[0] = k[0] * $, C[1] = k[1] * $, C[2] = k[2] * $, C; - }, Pt.dot = P, Pt.cross = function(C, k, V) { - var U = k[0], q = k[1], $ = k[2], H = V[0], K = V[1], Q = V[2]; - return C[0] = q * Q - $ * K, C[1] = $ * H - U * Q, C[2] = U * K - q * H, C; - }, Pt.lerp = function(C, k, V, U) { - var q = k[0], $ = k[1], H = k[2]; - return C[0] = q + U * (V[0] - q), C[1] = $ + U * (V[1] - $), C[2] = H + U * (V[2] - H), C; - }, Pt.hermite = function(C, k, V, U, q, $) { - var H = $ * $, K = H * (2 * $ - 3) + 1, Q = H * ($ - 2) + $, ie = H * ($ - 1), fe = H * (3 - 2 * $); - return C[0] = k[0] * K + V[0] * Q + U[0] * ie + q[0] * fe, C[1] = k[1] * K + V[1] * Q + U[1] * ie + q[1] * fe, C[2] = k[2] * K + V[2] * Q + U[2] * ie + q[2] * fe, C; - }, Pt.bezier = function(C, k, V, U, q, $) { - var H = 1 - $, K = H * H, Q = $ * $, ie = K * H, fe = 3 * $ * K, de = 3 * Q * H, ue = Q * $; - return C[0] = k[0] * ie + V[0] * fe + U[0] * de + q[0] * ue, C[1] = k[1] * ie + V[1] * fe + U[1] * de + q[1] * ue, C[2] = k[2] * ie + V[2] * fe + U[2] * de + q[2] * ue, C; - }, Pt.random = function(C, k) { - k = k || 1; - var V = 2 * e.RANDOM() * Math.PI, U = 2 * e.RANDOM() - 1, q = Math.sqrt(1 - U * U) * k; - return C[0] = Math.cos(V) * q, C[1] = Math.sin(V) * q, C[2] = U * k, C; - }, Pt.transformMat4 = function(C, k, V) { - var U = k[0], q = k[1], $ = k[2], H = V[3] * U + V[7] * q + V[11] * $ + V[15]; - return C[0] = (V[0] * U + V[4] * q + V[8] * $ + V[12]) / (H = H || 1), C[1] = (V[1] * U + V[5] * q + V[9] * $ + V[13]) / H, C[2] = (V[2] * U + V[6] * q + V[10] * $ + V[14]) / H, C; - }, Pt.transformMat3 = function(C, k, V) { - var U = k[0], q = k[1], $ = k[2]; - return C[0] = U * V[0] + q * V[3] + $ * V[6], C[1] = U * V[1] + q * V[4] + $ * V[7], C[2] = U * V[2] + q * V[5] + $ * V[8], C; - }, Pt.transformQuat = function(C, k, V) { - var U = V[0], q = V[1], $ = V[2], H = k[0], K = k[1], Q = k[2], ie = q * Q - $ * K, fe = $ * H - U * Q, de = U * K - q * H, ue = q * de - $ * fe, Se = $ * ie - U * de, me = U * fe - q * ie, Ee = 2 * V[3]; - return fe *= Ee, de *= Ee, Se *= 2, me *= 2, C[0] = H + (ie *= Ee) + (ue *= 2), C[1] = K + fe + Se, C[2] = Q + de + me, C; - }, Pt.rotateX = function(C, k, V, U) { - var q = [], $ = []; - return q[0] = k[0] - V[0], q[1] = k[1] - V[1], q[2] = k[2] - V[2], $[0] = q[0], $[1] = q[1] * Math.cos(U) - q[2] * Math.sin(U), $[2] = q[1] * Math.sin(U) + q[2] * Math.cos(U), C[0] = $[0] + V[0], C[1] = $[1] + V[1], C[2] = $[2] + V[2], C; - }, Pt.rotateY = function(C, k, V, U) { - var q = [], $ = []; - return q[0] = k[0] - V[0], q[1] = k[1] - V[1], q[2] = k[2] - V[2], $[0] = q[2] * Math.sin(U) + q[0] * Math.cos(U), $[1] = q[1], $[2] = q[2] * Math.cos(U) - q[0] * Math.sin(U), C[0] = $[0] + V[0], C[1] = $[1] + V[1], C[2] = $[2] + V[2], C; - }, Pt.rotateZ = function(C, k, V, U) { - var q = [], $ = []; - return q[0] = k[0] - V[0], q[1] = k[1] - V[1], q[2] = k[2] - V[2], $[0] = q[0] * Math.cos(U) - q[1] * Math.sin(U), $[1] = q[0] * Math.sin(U) + q[1] * Math.cos(U), $[2] = q[2], C[0] = $[0] + V[0], C[1] = $[1] + V[1], C[2] = $[2] + V[2], C; - }, Pt.angle = function(C, k) { - var V = C[0], U = C[1], q = C[2], $ = k[0], H = k[1], K = k[2], Q = Math.sqrt(V * V + U * U + q * q) * Math.sqrt($ * $ + H * H + K * K), ie = Q && P(C, k) / Q; - return Math.acos(Math.min(Math.max(ie, -1), 1)); - }, Pt.zero = function(C) { - return C[0] = 0, C[1] = 0, C[2] = 0, C; - }, Pt.str = function(C) { - return "vec3(" + C[0] + ", " + C[1] + ", " + C[2] + ")"; - }, Pt.exactEquals = function(C, k) { - return C[0] === k[0] && C[1] === k[1] && C[2] === k[2]; - }, Pt.equals = function(C, k) { - var V = C[0], U = C[1], q = C[2], $ = k[0], H = k[1], K = k[2]; - return Math.abs(V - $) <= e.EPSILON * Math.max(1, Math.abs(V), Math.abs($)) && Math.abs(U - H) <= e.EPSILON * Math.max(1, Math.abs(U), Math.abs(H)) && Math.abs(q - K) <= e.EPSILON * Math.max(1, Math.abs(q), Math.abs(K)); - }, Pt.forEach = Pt.sqrLen = Pt.len = Pt.sqrDist = Pt.dist = Pt.div = Pt.mul = Pt.sub = void 0; - var e = function(C, k) { - if (C && C.__esModule) - return C; - if (C === null || r(C) !== "object" && typeof C != "function") - return { default: C }; - var V = n(void 0); - if (V && V.has(C)) - return V.get(C); - var U = {}, q = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var $ in C) - if ($ !== "default" && Object.prototype.hasOwnProperty.call(C, $)) { - var H = q ? Object.getOwnPropertyDescriptor(C, $) : null; - H && (H.get || H.set) ? Object.defineProperty(U, $, H) : U[$] = C[$]; - } - return U.default = C, V && V.set(C, U), U; - }(ae()); - function n(C) { - if (typeof WeakMap != "function") - return null; - var k = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(); - return (n = function(U) { - return U ? V : k; - })(C); - } - function o() { - var C = new e.ARRAY_TYPE(3); - return e.ARRAY_TYPE != Float32Array && (C[0] = 0, C[1] = 0, C[2] = 0), C; - } - function u(C) { - return Math.hypot(C[0], C[1], C[2]); - } - function l(C, k, V) { - return C[0] = k[0] - V[0], C[1] = k[1] - V[1], C[2] = k[2] - V[2], C; - } - function f(C, k, V) { - return C[0] = k[0] * V[0], C[1] = k[1] * V[1], C[2] = k[2] * V[2], C; - } - function v(C, k, V) { - return C[0] = k[0] / V[0], C[1] = k[1] / V[1], C[2] = k[2] / V[2], C; - } - function S(C, k) { - return Math.hypot(k[0] - C[0], k[1] - C[1], k[2] - C[2]); - } - function D(C, k) { - var V = k[0] - C[0], U = k[1] - C[1], q = k[2] - C[2]; - return V * V + U * U + q * q; - } - function x(C) { - var k = C[0], V = C[1], U = C[2]; - return k * k + V * V + U * U; - } - function P(C, k) { - return C[0] * k[0] + C[1] * k[1] + C[2] * k[2]; - } - Pt.sub = l, Pt.mul = f, Pt.div = v, Pt.dist = S, Pt.sqrDist = D, Pt.len = u, Pt.sqrLen = x; - var I, M = (I = o(), function(C, k, V, U, q, $) { - var H, K; - for (k || (k = 3), V || (V = 0), K = U ? Math.min(U * k + V, C.length) : C.length, H = V; H < K; H += k) - I[0] = C[H], I[1] = C[H + 1], I[2] = C[H + 2], q(I, I, $), C[H] = I[0], C[H + 1] = I[1], C[H + 2] = I[2]; - return C; - }); - return Pt.forEach = M, Pt; - } - var Pn, hn, Ht = {}; - function Si() { - if (Pn) - return Ht; - function r(M) { - return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(C) { - return typeof C; - } : function(C) { - return C && typeof Symbol == "function" && C.constructor === Symbol && C !== Symbol.prototype ? "symbol" : typeof C; - }, r(M); - } - Pn = 1, Object.defineProperty(Ht, "__esModule", { value: !0 }), Ht.create = o, Ht.clone = function(M) { - var C = new e.ARRAY_TYPE(4); - return C[0] = M[0], C[1] = M[1], C[2] = M[2], C[3] = M[3], C; - }, Ht.fromValues = function(M, C, k, V) { - var U = new e.ARRAY_TYPE(4); - return U[0] = M, U[1] = C, U[2] = k, U[3] = V, U; - }, Ht.copy = function(M, C) { - return M[0] = C[0], M[1] = C[1], M[2] = C[2], M[3] = C[3], M; - }, Ht.set = function(M, C, k, V, U) { - return M[0] = C, M[1] = k, M[2] = V, M[3] = U, M; - }, Ht.add = function(M, C, k) { - return M[0] = C[0] + k[0], M[1] = C[1] + k[1], M[2] = C[2] + k[2], M[3] = C[3] + k[3], M; - }, Ht.subtract = u, Ht.multiply = l, Ht.divide = f, Ht.ceil = function(M, C) { - return M[0] = Math.ceil(C[0]), M[1] = Math.ceil(C[1]), M[2] = Math.ceil(C[2]), M[3] = Math.ceil(C[3]), M; - }, Ht.floor = function(M, C) { - return M[0] = Math.floor(C[0]), M[1] = Math.floor(C[1]), M[2] = Math.floor(C[2]), M[3] = Math.floor(C[3]), M; - }, Ht.min = function(M, C, k) { - return M[0] = Math.min(C[0], k[0]), M[1] = Math.min(C[1], k[1]), M[2] = Math.min(C[2], k[2]), M[3] = Math.min(C[3], k[3]), M; - }, Ht.max = function(M, C, k) { - return M[0] = Math.max(C[0], k[0]), M[1] = Math.max(C[1], k[1]), M[2] = Math.max(C[2], k[2]), M[3] = Math.max(C[3], k[3]), M; - }, Ht.round = function(M, C) { - return M[0] = Math.round(C[0]), M[1] = Math.round(C[1]), M[2] = Math.round(C[2]), M[3] = Math.round(C[3]), M; - }, Ht.scale = function(M, C, k) { - return M[0] = C[0] * k, M[1] = C[1] * k, M[2] = C[2] * k, M[3] = C[3] * k, M; - }, Ht.scaleAndAdd = function(M, C, k, V) { - return M[0] = C[0] + k[0] * V, M[1] = C[1] + k[1] * V, M[2] = C[2] + k[2] * V, M[3] = C[3] + k[3] * V, M; - }, Ht.distance = v, Ht.squaredDistance = S, Ht.length = D, Ht.squaredLength = x, Ht.negate = function(M, C) { - return M[0] = -C[0], M[1] = -C[1], M[2] = -C[2], M[3] = -C[3], M; - }, Ht.inverse = function(M, C) { - return M[0] = 1 / C[0], M[1] = 1 / C[1], M[2] = 1 / C[2], M[3] = 1 / C[3], M; - }, Ht.normalize = function(M, C) { - var k = C[0], V = C[1], U = C[2], q = C[3], $ = k * k + V * V + U * U + q * q; - return $ > 0 && ($ = 1 / Math.sqrt($)), M[0] = k * $, M[1] = V * $, M[2] = U * $, M[3] = q * $, M; - }, Ht.dot = function(M, C) { - return M[0] * C[0] + M[1] * C[1] + M[2] * C[2] + M[3] * C[3]; - }, Ht.cross = function(M, C, k, V) { - var U = k[0] * V[1] - k[1] * V[0], q = k[0] * V[2] - k[2] * V[0], $ = k[0] * V[3] - k[3] * V[0], H = k[1] * V[2] - k[2] * V[1], K = k[1] * V[3] - k[3] * V[1], Q = k[2] * V[3] - k[3] * V[2], ie = C[0], fe = C[1], de = C[2], ue = C[3]; - return M[0] = fe * Q - de * K + ue * H, M[1] = -ie * Q + de * $ - ue * q, M[2] = ie * K - fe * $ + ue * U, M[3] = -ie * H + fe * q - de * U, M; - }, Ht.lerp = function(M, C, k, V) { - var U = C[0], q = C[1], $ = C[2], H = C[3]; - return M[0] = U + V * (k[0] - U), M[1] = q + V * (k[1] - q), M[2] = $ + V * (k[2] - $), M[3] = H + V * (k[3] - H), M; - }, Ht.random = function(M, C) { - var k, V, U, q, $, H; - C = C || 1; - do - $ = (k = 2 * e.RANDOM() - 1) * k + (V = 2 * e.RANDOM() - 1) * V; - while ($ >= 1); - do - H = (U = 2 * e.RANDOM() - 1) * U + (q = 2 * e.RANDOM() - 1) * q; - while (H >= 1); - var K = Math.sqrt((1 - $) / H); - return M[0] = C * k, M[1] = C * V, M[2] = C * U * K, M[3] = C * q * K, M; - }, Ht.transformMat4 = function(M, C, k) { - var V = C[0], U = C[1], q = C[2], $ = C[3]; - return M[0] = k[0] * V + k[4] * U + k[8] * q + k[12] * $, M[1] = k[1] * V + k[5] * U + k[9] * q + k[13] * $, M[2] = k[2] * V + k[6] * U + k[10] * q + k[14] * $, M[3] = k[3] * V + k[7] * U + k[11] * q + k[15] * $, M; - }, Ht.transformQuat = function(M, C, k) { - var V = C[0], U = C[1], q = C[2], $ = k[0], H = k[1], K = k[2], Q = k[3], ie = Q * V + H * q - K * U, fe = Q * U + K * V - $ * q, de = Q * q + $ * U - H * V, ue = -$ * V - H * U - K * q; - return M[0] = ie * Q + ue * -$ + fe * -K - de * -H, M[1] = fe * Q + ue * -H + de * -$ - ie * -K, M[2] = de * Q + ue * -K + ie * -H - fe * -$, M[3] = C[3], M; - }, Ht.zero = function(M) { - return M[0] = 0, M[1] = 0, M[2] = 0, M[3] = 0, M; - }, Ht.str = function(M) { - return "vec4(" + M[0] + ", " + M[1] + ", " + M[2] + ", " + M[3] + ")"; - }, Ht.exactEquals = function(M, C) { - return M[0] === C[0] && M[1] === C[1] && M[2] === C[2] && M[3] === C[3]; - }, Ht.equals = function(M, C) { - var k = M[0], V = M[1], U = M[2], q = M[3], $ = C[0], H = C[1], K = C[2], Q = C[3]; - return Math.abs(k - $) <= e.EPSILON * Math.max(1, Math.abs(k), Math.abs($)) && Math.abs(V - H) <= e.EPSILON * Math.max(1, Math.abs(V), Math.abs(H)) && Math.abs(U - K) <= e.EPSILON * Math.max(1, Math.abs(U), Math.abs(K)) && Math.abs(q - Q) <= e.EPSILON * Math.max(1, Math.abs(q), Math.abs(Q)); - }, Ht.forEach = Ht.sqrLen = Ht.len = Ht.sqrDist = Ht.dist = Ht.div = Ht.mul = Ht.sub = void 0; - var e = function(M, C) { - if (M && M.__esModule) - return M; - if (M === null || r(M) !== "object" && typeof M != "function") - return { default: M }; - var k = n(void 0); - if (k && k.has(M)) - return k.get(M); - var V = {}, U = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var q in M) - if (q !== "default" && Object.prototype.hasOwnProperty.call(M, q)) { - var $ = U ? Object.getOwnPropertyDescriptor(M, q) : null; - $ && ($.get || $.set) ? Object.defineProperty(V, q, $) : V[q] = M[q]; - } - return V.default = M, k && k.set(M, V), V; - }(ae()); - function n(M) { - if (typeof WeakMap != "function") - return null; - var C = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(); - return (n = function(V) { - return V ? k : C; - })(M); - } - function o() { - var M = new e.ARRAY_TYPE(4); - return e.ARRAY_TYPE != Float32Array && (M[0] = 0, M[1] = 0, M[2] = 0, M[3] = 0), M; - } - function u(M, C, k) { - return M[0] = C[0] - k[0], M[1] = C[1] - k[1], M[2] = C[2] - k[2], M[3] = C[3] - k[3], M; - } - function l(M, C, k) { - return M[0] = C[0] * k[0], M[1] = C[1] * k[1], M[2] = C[2] * k[2], M[3] = C[3] * k[3], M; - } - function f(M, C, k) { - return M[0] = C[0] / k[0], M[1] = C[1] / k[1], M[2] = C[2] / k[2], M[3] = C[3] / k[3], M; - } - function v(M, C) { - return Math.hypot(C[0] - M[0], C[1] - M[1], C[2] - M[2], C[3] - M[3]); - } - function S(M, C) { - var k = C[0] - M[0], V = C[1] - M[1], U = C[2] - M[2], q = C[3] - M[3]; - return k * k + V * V + U * U + q * q; - } - function D(M) { - return Math.hypot(M[0], M[1], M[2], M[3]); - } - function x(M) { - var C = M[0], k = M[1], V = M[2], U = M[3]; - return C * C + k * k + V * V + U * U; - } - Ht.sub = u, Ht.mul = l, Ht.div = f, Ht.dist = v, Ht.sqrDist = S, Ht.len = D, Ht.sqrLen = x; - var P, I = (P = o(), function(M, C, k, V, U, q) { - var $, H; - for (C || (C = 4), k || (k = 0), H = V ? Math.min(V * C + k, M.length) : M.length, $ = k; $ < H; $ += C) - P[0] = M[$], P[1] = M[$ + 1], P[2] = M[$ + 2], P[3] = M[$ + 3], U(P, P, q), M[$] = P[0], M[$ + 1] = P[1], M[$ + 2] = P[2], M[$ + 3] = P[3]; - return M; - }); - return Ht.forEach = I, Ht; - } - function Ji() { - if (hn) - return kt; - function r(me) { - return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(Ee) { - return typeof Ee; - } : function(Ee) { - return Ee && typeof Symbol == "function" && Ee.constructor === Symbol && Ee !== Symbol.prototype ? "symbol" : typeof Ee; - }, r(me); - } - hn = 1, Object.defineProperty(kt, "__esModule", { value: !0 }), kt.create = v, kt.identity = function(me) { - return me[0] = 0, me[1] = 0, me[2] = 0, me[3] = 1, me; - }, kt.setAxisAngle = S, kt.getAxisAngle = function(me, Ee) { - var ze = 2 * Math.acos(Ee[3]), Ie = Math.sin(ze / 2); - return Ie > e.EPSILON ? (me[0] = Ee[0] / Ie, me[1] = Ee[1] / Ie, me[2] = Ee[2] / Ie) : (me[0] = 1, me[1] = 0, me[2] = 0), ze; - }, kt.getAngle = function(me, Ee) { - var ze = k(me, Ee); - return Math.acos(2 * ze * ze - 1); - }, kt.multiply = D, kt.rotateX = function(me, Ee, ze) { - ze *= 0.5; - var Ie = Ee[0], Re = Ee[1], Ve = Ee[2], Ue = Ee[3], Fe = Math.sin(ze), et = Math.cos(ze); - return me[0] = Ie * et + Ue * Fe, me[1] = Re * et + Ve * Fe, me[2] = Ve * et - Re * Fe, me[3] = Ue * et - Ie * Fe, me; - }, kt.rotateY = function(me, Ee, ze) { - ze *= 0.5; - var Ie = Ee[0], Re = Ee[1], Ve = Ee[2], Ue = Ee[3], Fe = Math.sin(ze), et = Math.cos(ze); - return me[0] = Ie * et - Ve * Fe, me[1] = Re * et + Ue * Fe, me[2] = Ve * et + Ie * Fe, me[3] = Ue * et - Re * Fe, me; - }, kt.rotateZ = function(me, Ee, ze) { - ze *= 0.5; - var Ie = Ee[0], Re = Ee[1], Ve = Ee[2], Ue = Ee[3], Fe = Math.sin(ze), et = Math.cos(ze); - return me[0] = Ie * et + Re * Fe, me[1] = Re * et - Ie * Fe, me[2] = Ve * et + Ue * Fe, me[3] = Ue * et - Ve * Fe, me; - }, kt.calculateW = function(me, Ee) { - var ze = Ee[0], Ie = Ee[1], Re = Ee[2]; - return me[0] = ze, me[1] = Ie, me[2] = Re, me[3] = Math.sqrt(Math.abs(1 - ze * ze - Ie * Ie - Re * Re)), me; - }, kt.exp = x, kt.ln = P, kt.pow = function(me, Ee, ze) { - return P(me, Ee), C(me, me, ze), x(me, me), me; - }, kt.slerp = I, kt.random = function(me) { - var Ee = e.RANDOM(), ze = e.RANDOM(), Ie = e.RANDOM(), Re = Math.sqrt(1 - Ee), Ve = Math.sqrt(Ee); - return me[0] = Re * Math.sin(2 * Math.PI * ze), me[1] = Re * Math.cos(2 * Math.PI * ze), me[2] = Ve * Math.sin(2 * Math.PI * Ie), me[3] = Ve * Math.cos(2 * Math.PI * Ie), me; - }, kt.invert = function(me, Ee) { - var ze = Ee[0], Ie = Ee[1], Re = Ee[2], Ve = Ee[3], Ue = ze * ze + Ie * Ie + Re * Re + Ve * Ve, Fe = Ue ? 1 / Ue : 0; - return me[0] = -ze * Fe, me[1] = -Ie * Fe, me[2] = -Re * Fe, me[3] = Ve * Fe, me; - }, kt.conjugate = function(me, Ee) { - return me[0] = -Ee[0], me[1] = -Ee[1], me[2] = -Ee[2], me[3] = Ee[3], me; - }, kt.fromMat3 = M, kt.fromEuler = function(me, Ee, ze, Ie) { - var Re = 0.5 * Math.PI / 180; - Ee *= Re, ze *= Re, Ie *= Re; - var Ve = Math.sin(Ee), Ue = Math.cos(Ee), Fe = Math.sin(ze), et = Math.cos(ze), dt = Math.sin(Ie), tt = Math.cos(Ie); - return me[0] = Ve * et * tt - Ue * Fe * dt, me[1] = Ue * Fe * tt + Ve * et * dt, me[2] = Ue * et * dt - Ve * Fe * tt, me[3] = Ue * et * tt + Ve * Fe * dt, me; - }, kt.str = function(me) { - return "quat(" + me[0] + ", " + me[1] + ", " + me[2] + ", " + me[3] + ")"; - }, kt.setAxes = kt.sqlerp = kt.rotationTo = kt.equals = kt.exactEquals = kt.normalize = kt.sqrLen = kt.squaredLength = kt.len = kt.length = kt.lerp = kt.dot = kt.scale = kt.mul = kt.add = kt.set = kt.copy = kt.fromValues = kt.clone = void 0; - var e = f(ae()), n = f(gt()), o = f(Mi()), u = f(Si()); - function l(me) { - if (typeof WeakMap != "function") - return null; - var Ee = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(); - return (l = function(Ie) { - return Ie ? ze : Ee; - })(me); - } - function f(me, Ee) { - if (me && me.__esModule) - return me; - if (me === null || r(me) !== "object" && typeof me != "function") - return { default: me }; - var ze = l(Ee); - if (ze && ze.has(me)) - return ze.get(me); - var Ie = {}, Re = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var Ve in me) - if (Ve !== "default" && Object.prototype.hasOwnProperty.call(me, Ve)) { - var Ue = Re ? Object.getOwnPropertyDescriptor(me, Ve) : null; - Ue && (Ue.get || Ue.set) ? Object.defineProperty(Ie, Ve, Ue) : Ie[Ve] = me[Ve]; - } - return Ie.default = me, ze && ze.set(me, Ie), Ie; - } - function v() { - var me = new e.ARRAY_TYPE(4); - return e.ARRAY_TYPE != Float32Array && (me[0] = 0, me[1] = 0, me[2] = 0), me[3] = 1, me; - } - function S(me, Ee, ze) { - ze *= 0.5; - var Ie = Math.sin(ze); - return me[0] = Ie * Ee[0], me[1] = Ie * Ee[1], me[2] = Ie * Ee[2], me[3] = Math.cos(ze), me; - } - function D(me, Ee, ze) { - var Ie = Ee[0], Re = Ee[1], Ve = Ee[2], Ue = Ee[3], Fe = ze[0], et = ze[1], dt = ze[2], tt = ze[3]; - return me[0] = Ie * tt + Ue * Fe + Re * dt - Ve * et, me[1] = Re * tt + Ue * et + Ve * Fe - Ie * dt, me[2] = Ve * tt + Ue * dt + Ie * et - Re * Fe, me[3] = Ue * tt - Ie * Fe - Re * et - Ve * dt, me; - } - function x(me, Ee) { - var ze = Ee[0], Ie = Ee[1], Re = Ee[2], Ve = Ee[3], Ue = Math.sqrt(ze * ze + Ie * Ie + Re * Re), Fe = Math.exp(Ve), et = Ue > 0 ? Fe * Math.sin(Ue) / Ue : 0; - return me[0] = ze * et, me[1] = Ie * et, me[2] = Re * et, me[3] = Fe * Math.cos(Ue), me; - } - function P(me, Ee) { - var ze = Ee[0], Ie = Ee[1], Re = Ee[2], Ve = Ee[3], Ue = Math.sqrt(ze * ze + Ie * Ie + Re * Re), Fe = Ue > 0 ? Math.atan2(Ue, Ve) / Ue : 0; - return me[0] = ze * Fe, me[1] = Ie * Fe, me[2] = Re * Fe, me[3] = 0.5 * Math.log(ze * ze + Ie * Ie + Re * Re + Ve * Ve), me; - } - function I(me, Ee, ze, Ie) { - var Re, Ve, Ue, Fe, et, dt = Ee[0], tt = Ee[1], Mt = Ee[2], wt = Ee[3], At = ze[0], rt = ze[1], Ut = ze[2], St = ze[3]; - return (Ve = dt * At + tt * rt + Mt * Ut + wt * St) < 0 && (Ve = -Ve, At = -At, rt = -rt, Ut = -Ut, St = -St), 1 - Ve > e.EPSILON ? (Re = Math.acos(Ve), Ue = Math.sin(Re), Fe = Math.sin((1 - Ie) * Re) / Ue, et = Math.sin(Ie * Re) / Ue) : (Fe = 1 - Ie, et = Ie), me[0] = Fe * dt + et * At, me[1] = Fe * tt + et * rt, me[2] = Fe * Mt + et * Ut, me[3] = Fe * wt + et * St, me; - } - function M(me, Ee) { - var ze, Ie = Ee[0] + Ee[4] + Ee[8]; - if (Ie > 0) - ze = Math.sqrt(Ie + 1), me[3] = 0.5 * ze, me[0] = (Ee[5] - Ee[7]) * (ze = 0.5 / ze), me[1] = (Ee[6] - Ee[2]) * ze, me[2] = (Ee[1] - Ee[3]) * ze; - else { - var Re = 0; - Ee[4] > Ee[0] && (Re = 1), Ee[8] > Ee[3 * Re + Re] && (Re = 2); - var Ve = (Re + 1) % 3, Ue = (Re + 2) % 3; - ze = Math.sqrt(Ee[3 * Re + Re] - Ee[3 * Ve + Ve] - Ee[3 * Ue + Ue] + 1), me[Re] = 0.5 * ze, me[3] = (Ee[3 * Ve + Ue] - Ee[3 * Ue + Ve]) * (ze = 0.5 / ze), me[Ve] = (Ee[3 * Ve + Re] + Ee[3 * Re + Ve]) * ze, me[Ue] = (Ee[3 * Ue + Re] + Ee[3 * Re + Ue]) * ze; - } - return me; - } - kt.clone = u.clone, kt.fromValues = u.fromValues, kt.copy = u.copy, kt.set = u.set, kt.add = u.add, kt.mul = D; - var C = u.scale; - kt.scale = C; - var k = u.dot; - kt.dot = k, kt.lerp = u.lerp; - var V = u.length; - kt.length = V, kt.len = V; - var U = u.squaredLength; - kt.squaredLength = U, kt.sqrLen = U; - var q = u.normalize; - kt.normalize = q, kt.exactEquals = u.exactEquals, kt.equals = u.equals; - var $, H, K, Q = ($ = o.create(), H = o.fromValues(1, 0, 0), K = o.fromValues(0, 1, 0), function(me, Ee, ze) { - var Ie = o.dot(Ee, ze); - return Ie < -0.999999 ? (o.cross($, H, Ee), o.len($) < 1e-6 && o.cross($, K, Ee), o.normalize($, $), S(me, $, Math.PI), me) : Ie > 0.999999 ? (me[0] = 0, me[1] = 0, me[2] = 0, me[3] = 1, me) : (o.cross($, Ee, ze), me[0] = $[0], me[1] = $[1], me[2] = $[2], me[3] = 1 + Ie, q(me, me)); - }); - kt.rotationTo = Q; - var ie, fe, de = (ie = v(), fe = v(), function(me, Ee, ze, Ie, Re, Ve) { - return I(ie, Ee, Re, Ve), I(fe, ze, Ie, Ve), I(me, ie, fe, 2 * Ve * (1 - Ve)), me; - }); - kt.sqlerp = de; - var ue, Se = (ue = n.create(), function(me, Ee, ze, Ie) { - return ue[0] = ze[0], ue[3] = ze[1], ue[6] = ze[2], ue[1] = Ie[0], ue[4] = Ie[1], ue[7] = Ie[2], ue[2] = -Ee[0], ue[5] = -Ee[1], ue[8] = -Ee[2], q(me, M(me, ue)); - }); - return kt.setAxes = Se, kt; - } - var fi, jt = {}; - function ni() { - if (fi) - return jt; - function r(I) { - return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(M) { - return typeof M; - } : function(M) { - return M && typeof Symbol == "function" && M.constructor === Symbol && M !== Symbol.prototype ? "symbol" : typeof M; - }, r(I); - } - fi = 1, Object.defineProperty(jt, "__esModule", { value: !0 }), jt.create = function() { - var I = new e.ARRAY_TYPE(8); - return e.ARRAY_TYPE != Float32Array && (I[0] = 0, I[1] = 0, I[2] = 0, I[4] = 0, I[5] = 0, I[6] = 0, I[7] = 0), I[3] = 1, I; - }, jt.clone = function(I) { - var M = new e.ARRAY_TYPE(8); - return M[0] = I[0], M[1] = I[1], M[2] = I[2], M[3] = I[3], M[4] = I[4], M[5] = I[5], M[6] = I[6], M[7] = I[7], M; - }, jt.fromValues = function(I, M, C, k, V, U, q, $) { - var H = new e.ARRAY_TYPE(8); - return H[0] = I, H[1] = M, H[2] = C, H[3] = k, H[4] = V, H[5] = U, H[6] = q, H[7] = $, H; - }, jt.fromRotationTranslationValues = function(I, M, C, k, V, U, q) { - var $ = new e.ARRAY_TYPE(8); - $[0] = I, $[1] = M, $[2] = C, $[3] = k; - var H = 0.5 * V, K = 0.5 * U, Q = 0.5 * q; - return $[4] = H * k + K * C - Q * M, $[5] = K * k + Q * I - H * C, $[6] = Q * k + H * M - K * I, $[7] = -H * I - K * M - Q * C, $; - }, jt.fromRotationTranslation = f, jt.fromTranslation = function(I, M) { - return I[0] = 0, I[1] = 0, I[2] = 0, I[3] = 1, I[4] = 0.5 * M[0], I[5] = 0.5 * M[1], I[6] = 0.5 * M[2], I[7] = 0, I; - }, jt.fromRotation = function(I, M) { - return I[0] = M[0], I[1] = M[1], I[2] = M[2], I[3] = M[3], I[4] = 0, I[5] = 0, I[6] = 0, I[7] = 0, I; - }, jt.fromMat4 = function(I, M) { - var C = n.create(); - o.getRotation(C, M); - var k = new e.ARRAY_TYPE(3); - return o.getTranslation(k, M), f(I, C, k), I; - }, jt.copy = v, jt.identity = function(I) { - return I[0] = 0, I[1] = 0, I[2] = 0, I[3] = 1, I[4] = 0, I[5] = 0, I[6] = 0, I[7] = 0, I; - }, jt.set = function(I, M, C, k, V, U, q, $, H) { - return I[0] = M, I[1] = C, I[2] = k, I[3] = V, I[4] = U, I[5] = q, I[6] = $, I[7] = H, I; - }, jt.getDual = function(I, M) { - return I[0] = M[4], I[1] = M[5], I[2] = M[6], I[3] = M[7], I; - }, jt.setDual = function(I, M) { - return I[4] = M[0], I[5] = M[1], I[6] = M[2], I[7] = M[3], I; - }, jt.getTranslation = function(I, M) { - var C = M[4], k = M[5], V = M[6], U = M[7], q = -M[0], $ = -M[1], H = -M[2], K = M[3]; - return I[0] = 2 * (C * K + U * q + k * H - V * $), I[1] = 2 * (k * K + U * $ + V * q - C * H), I[2] = 2 * (V * K + U * H + C * $ - k * q), I; - }, jt.translate = function(I, M, C) { - var k = M[0], V = M[1], U = M[2], q = M[3], $ = 0.5 * C[0], H = 0.5 * C[1], K = 0.5 * C[2], Q = M[4], ie = M[5], fe = M[6], de = M[7]; - return I[0] = k, I[1] = V, I[2] = U, I[3] = q, I[4] = q * $ + V * K - U * H + Q, I[5] = q * H + U * $ - k * K + ie, I[6] = q * K + k * H - V * $ + fe, I[7] = -k * $ - V * H - U * K + de, I; - }, jt.rotateX = function(I, M, C) { - var k = -M[0], V = -M[1], U = -M[2], q = M[3], $ = M[4], H = M[5], K = M[6], Q = M[7], ie = $ * q + Q * k + H * U - K * V, fe = H * q + Q * V + K * k - $ * U, de = K * q + Q * U + $ * V - H * k, ue = Q * q - $ * k - H * V - K * U; - return n.rotateX(I, M, C), I[4] = ie * (q = I[3]) + ue * (k = I[0]) + fe * (U = I[2]) - de * (V = I[1]), I[5] = fe * q + ue * V + de * k - ie * U, I[6] = de * q + ue * U + ie * V - fe * k, I[7] = ue * q - ie * k - fe * V - de * U, I; - }, jt.rotateY = function(I, M, C) { - var k = -M[0], V = -M[1], U = -M[2], q = M[3], $ = M[4], H = M[5], K = M[6], Q = M[7], ie = $ * q + Q * k + H * U - K * V, fe = H * q + Q * V + K * k - $ * U, de = K * q + Q * U + $ * V - H * k, ue = Q * q - $ * k - H * V - K * U; - return n.rotateY(I, M, C), I[4] = ie * (q = I[3]) + ue * (k = I[0]) + fe * (U = I[2]) - de * (V = I[1]), I[5] = fe * q + ue * V + de * k - ie * U, I[6] = de * q + ue * U + ie * V - fe * k, I[7] = ue * q - ie * k - fe * V - de * U, I; - }, jt.rotateZ = function(I, M, C) { - var k = -M[0], V = -M[1], U = -M[2], q = M[3], $ = M[4], H = M[5], K = M[6], Q = M[7], ie = $ * q + Q * k + H * U - K * V, fe = H * q + Q * V + K * k - $ * U, de = K * q + Q * U + $ * V - H * k, ue = Q * q - $ * k - H * V - K * U; - return n.rotateZ(I, M, C), I[4] = ie * (q = I[3]) + ue * (k = I[0]) + fe * (U = I[2]) - de * (V = I[1]), I[5] = fe * q + ue * V + de * k - ie * U, I[6] = de * q + ue * U + ie * V - fe * k, I[7] = ue * q - ie * k - fe * V - de * U, I; - }, jt.rotateByQuatAppend = function(I, M, C) { - var k = C[0], V = C[1], U = C[2], q = C[3], $ = M[0], H = M[1], K = M[2], Q = M[3]; - return I[0] = $ * q + Q * k + H * U - K * V, I[1] = H * q + Q * V + K * k - $ * U, I[2] = K * q + Q * U + $ * V - H * k, I[3] = Q * q - $ * k - H * V - K * U, I[4] = ($ = M[4]) * q + (Q = M[7]) * k + (H = M[5]) * U - (K = M[6]) * V, I[5] = H * q + Q * V + K * k - $ * U, I[6] = K * q + Q * U + $ * V - H * k, I[7] = Q * q - $ * k - H * V - K * U, I; - }, jt.rotateByQuatPrepend = function(I, M, C) { - var k = M[0], V = M[1], U = M[2], q = M[3], $ = C[0], H = C[1], K = C[2], Q = C[3]; - return I[0] = k * Q + q * $ + V * K - U * H, I[1] = V * Q + q * H + U * $ - k * K, I[2] = U * Q + q * K + k * H - V * $, I[3] = q * Q - k * $ - V * H - U * K, I[4] = k * (Q = C[7]) + q * ($ = C[4]) + V * (K = C[6]) - U * (H = C[5]), I[5] = V * Q + q * H + U * $ - k * K, I[6] = U * Q + q * K + k * H - V * $, I[7] = q * Q - k * $ - V * H - U * K, I; - }, jt.rotateAroundAxis = function(I, M, C, k) { - if (Math.abs(k) < e.EPSILON) - return v(I, M); - var V = Math.hypot(C[0], C[1], C[2]); - k *= 0.5; - var U = Math.sin(k), q = U * C[0] / V, $ = U * C[1] / V, H = U * C[2] / V, K = Math.cos(k), Q = M[0], ie = M[1], fe = M[2], de = M[3]; - I[0] = Q * K + de * q + ie * H - fe * $, I[1] = ie * K + de * $ + fe * q - Q * H, I[2] = fe * K + de * H + Q * $ - ie * q, I[3] = de * K - Q * q - ie * $ - fe * H; - var ue = M[4], Se = M[5], me = M[6], Ee = M[7]; - return I[4] = ue * K + Ee * q + Se * H - me * $, I[5] = Se * K + Ee * $ + me * q - ue * H, I[6] = me * K + Ee * H + ue * $ - Se * q, I[7] = Ee * K - ue * q - Se * $ - me * H, I; - }, jt.add = function(I, M, C) { - return I[0] = M[0] + C[0], I[1] = M[1] + C[1], I[2] = M[2] + C[2], I[3] = M[3] + C[3], I[4] = M[4] + C[4], I[5] = M[5] + C[5], I[6] = M[6] + C[6], I[7] = M[7] + C[7], I; - }, jt.multiply = S, jt.scale = function(I, M, C) { - return I[0] = M[0] * C, I[1] = M[1] * C, I[2] = M[2] * C, I[3] = M[3] * C, I[4] = M[4] * C, I[5] = M[5] * C, I[6] = M[6] * C, I[7] = M[7] * C, I; - }, jt.lerp = function(I, M, C, k) { - var V = 1 - k; - return D(M, C) < 0 && (k = -k), I[0] = M[0] * V + C[0] * k, I[1] = M[1] * V + C[1] * k, I[2] = M[2] * V + C[2] * k, I[3] = M[3] * V + C[3] * k, I[4] = M[4] * V + C[4] * k, I[5] = M[5] * V + C[5] * k, I[6] = M[6] * V + C[6] * k, I[7] = M[7] * V + C[7] * k, I; - }, jt.invert = function(I, M) { - var C = P(M); - return I[0] = -M[0] / C, I[1] = -M[1] / C, I[2] = -M[2] / C, I[3] = M[3] / C, I[4] = -M[4] / C, I[5] = -M[5] / C, I[6] = -M[6] / C, I[7] = M[7] / C, I; - }, jt.conjugate = function(I, M) { - return I[0] = -M[0], I[1] = -M[1], I[2] = -M[2], I[3] = M[3], I[4] = -M[4], I[5] = -M[5], I[6] = -M[6], I[7] = M[7], I; - }, jt.normalize = function(I, M) { - var C = P(M); - if (C > 0) { - C = Math.sqrt(C); - var k = M[0] / C, V = M[1] / C, U = M[2] / C, q = M[3] / C, $ = M[4], H = M[5], K = M[6], Q = M[7], ie = k * $ + V * H + U * K + q * Q; - I[0] = k, I[1] = V, I[2] = U, I[3] = q, I[4] = ($ - k * ie) / C, I[5] = (H - V * ie) / C, I[6] = (K - U * ie) / C, I[7] = (Q - q * ie) / C; - } - return I; - }, jt.str = function(I) { - return "quat2(" + I[0] + ", " + I[1] + ", " + I[2] + ", " + I[3] + ", " + I[4] + ", " + I[5] + ", " + I[6] + ", " + I[7] + ")"; - }, jt.exactEquals = function(I, M) { - return I[0] === M[0] && I[1] === M[1] && I[2] === M[2] && I[3] === M[3] && I[4] === M[4] && I[5] === M[5] && I[6] === M[6] && I[7] === M[7]; - }, jt.equals = function(I, M) { - var C = I[0], k = I[1], V = I[2], U = I[3], q = I[4], $ = I[5], H = I[6], K = I[7], Q = M[0], ie = M[1], fe = M[2], de = M[3], ue = M[4], Se = M[5], me = M[6], Ee = M[7]; - return Math.abs(C - Q) <= e.EPSILON * Math.max(1, Math.abs(C), Math.abs(Q)) && Math.abs(k - ie) <= e.EPSILON * Math.max(1, Math.abs(k), Math.abs(ie)) && Math.abs(V - fe) <= e.EPSILON * Math.max(1, Math.abs(V), Math.abs(fe)) && Math.abs(U - de) <= e.EPSILON * Math.max(1, Math.abs(U), Math.abs(de)) && Math.abs(q - ue) <= e.EPSILON * Math.max(1, Math.abs(q), Math.abs(ue)) && Math.abs($ - Se) <= e.EPSILON * Math.max(1, Math.abs($), Math.abs(Se)) && Math.abs(H - me) <= e.EPSILON * Math.max(1, Math.abs(H), Math.abs(me)) && Math.abs(K - Ee) <= e.EPSILON * Math.max(1, Math.abs(K), Math.abs(Ee)); - }, jt.sqrLen = jt.squaredLength = jt.len = jt.length = jt.dot = jt.mul = jt.setReal = jt.getReal = void 0; - var e = l(ae()), n = l(Ji()), o = l(Gt()); - function u(I) { - if (typeof WeakMap != "function") - return null; - var M = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(); - return (u = function(k) { - return k ? C : M; - })(I); - } - function l(I, M) { - if (I && I.__esModule) - return I; - if (I === null || r(I) !== "object" && typeof I != "function") - return { default: I }; - var C = u(M); - if (C && C.has(I)) - return C.get(I); - var k = {}, V = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var U in I) - if (U !== "default" && Object.prototype.hasOwnProperty.call(I, U)) { - var q = V ? Object.getOwnPropertyDescriptor(I, U) : null; - q && (q.get || q.set) ? Object.defineProperty(k, U, q) : k[U] = I[U]; - } - return k.default = I, C && C.set(I, k), k; - } - function f(I, M, C) { - var k = 0.5 * C[0], V = 0.5 * C[1], U = 0.5 * C[2], q = M[0], $ = M[1], H = M[2], K = M[3]; - return I[0] = q, I[1] = $, I[2] = H, I[3] = K, I[4] = k * K + V * H - U * $, I[5] = V * K + U * q - k * H, I[6] = U * K + k * $ - V * q, I[7] = -k * q - V * $ - U * H, I; - } - function v(I, M) { - return I[0] = M[0], I[1] = M[1], I[2] = M[2], I[3] = M[3], I[4] = M[4], I[5] = M[5], I[6] = M[6], I[7] = M[7], I; - } - function S(I, M, C) { - var k = M[0], V = M[1], U = M[2], q = M[3], $ = C[4], H = C[5], K = C[6], Q = C[7], ie = M[4], fe = M[5], de = M[6], ue = M[7], Se = C[0], me = C[1], Ee = C[2], ze = C[3]; - return I[0] = k * ze + q * Se + V * Ee - U * me, I[1] = V * ze + q * me + U * Se - k * Ee, I[2] = U * ze + q * Ee + k * me - V * Se, I[3] = q * ze - k * Se - V * me - U * Ee, I[4] = k * Q + q * $ + V * K - U * H + ie * ze + ue * Se + fe * Ee - de * me, I[5] = V * Q + q * H + U * $ - k * K + fe * ze + ue * me + de * Se - ie * Ee, I[6] = U * Q + q * K + k * H - V * $ + de * ze + ue * Ee + ie * me - fe * Se, I[7] = q * Q - k * $ - V * H - U * K + ue * ze - ie * Se - fe * me - de * Ee, I; - } - jt.getReal = n.copy, jt.setReal = n.copy, jt.mul = S; - var D = n.dot; - jt.dot = D; - var x = n.length; - jt.length = x, jt.len = x; - var P = n.squaredLength; - return jt.squaredLength = P, jt.sqrLen = P, jt; - } - var Gi, an, qt = {}; - function ln() { - if (Gi) - return qt; - function r(M) { - return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(C) { - return typeof C; - } : function(C) { - return C && typeof Symbol == "function" && C.constructor === Symbol && C !== Symbol.prototype ? "symbol" : typeof C; - }, r(M); - } - Gi = 1, Object.defineProperty(qt, "__esModule", { value: !0 }), qt.create = o, qt.clone = function(M) { - var C = new e.ARRAY_TYPE(2); - return C[0] = M[0], C[1] = M[1], C; - }, qt.fromValues = function(M, C) { - var k = new e.ARRAY_TYPE(2); - return k[0] = M, k[1] = C, k; - }, qt.copy = function(M, C) { - return M[0] = C[0], M[1] = C[1], M; - }, qt.set = function(M, C, k) { - return M[0] = C, M[1] = k, M; - }, qt.add = function(M, C, k) { - return M[0] = C[0] + k[0], M[1] = C[1] + k[1], M; - }, qt.subtract = u, qt.multiply = l, qt.divide = f, qt.ceil = function(M, C) { - return M[0] = Math.ceil(C[0]), M[1] = Math.ceil(C[1]), M; - }, qt.floor = function(M, C) { - return M[0] = Math.floor(C[0]), M[1] = Math.floor(C[1]), M; - }, qt.min = function(M, C, k) { - return M[0] = Math.min(C[0], k[0]), M[1] = Math.min(C[1], k[1]), M; - }, qt.max = function(M, C, k) { - return M[0] = Math.max(C[0], k[0]), M[1] = Math.max(C[1], k[1]), M; - }, qt.round = function(M, C) { - return M[0] = Math.round(C[0]), M[1] = Math.round(C[1]), M; - }, qt.scale = function(M, C, k) { - return M[0] = C[0] * k, M[1] = C[1] * k, M; - }, qt.scaleAndAdd = function(M, C, k, V) { - return M[0] = C[0] + k[0] * V, M[1] = C[1] + k[1] * V, M; - }, qt.distance = v, qt.squaredDistance = S, qt.length = D, qt.squaredLength = x, qt.negate = function(M, C) { - return M[0] = -C[0], M[1] = -C[1], M; - }, qt.inverse = function(M, C) { - return M[0] = 1 / C[0], M[1] = 1 / C[1], M; - }, qt.normalize = function(M, C) { - var k = C[0], V = C[1], U = k * k + V * V; - return U > 0 && (U = 1 / Math.sqrt(U)), M[0] = C[0] * U, M[1] = C[1] * U, M; - }, qt.dot = function(M, C) { - return M[0] * C[0] + M[1] * C[1]; - }, qt.cross = function(M, C, k) { - var V = C[0] * k[1] - C[1] * k[0]; - return M[0] = M[1] = 0, M[2] = V, M; - }, qt.lerp = function(M, C, k, V) { - var U = C[0], q = C[1]; - return M[0] = U + V * (k[0] - U), M[1] = q + V * (k[1] - q), M; - }, qt.random = function(M, C) { - C = C || 1; - var k = 2 * e.RANDOM() * Math.PI; - return M[0] = Math.cos(k) * C, M[1] = Math.sin(k) * C, M; - }, qt.transformMat2 = function(M, C, k) { - var V = C[0], U = C[1]; - return M[0] = k[0] * V + k[2] * U, M[1] = k[1] * V + k[3] * U, M; - }, qt.transformMat2d = function(M, C, k) { - var V = C[0], U = C[1]; - return M[0] = k[0] * V + k[2] * U + k[4], M[1] = k[1] * V + k[3] * U + k[5], M; - }, qt.transformMat3 = function(M, C, k) { - var V = C[0], U = C[1]; - return M[0] = k[0] * V + k[3] * U + k[6], M[1] = k[1] * V + k[4] * U + k[7], M; - }, qt.transformMat4 = function(M, C, k) { - var V = C[0], U = C[1]; - return M[0] = k[0] * V + k[4] * U + k[12], M[1] = k[1] * V + k[5] * U + k[13], M; - }, qt.rotate = function(M, C, k, V) { - var U = C[0] - k[0], q = C[1] - k[1], $ = Math.sin(V), H = Math.cos(V); - return M[0] = U * H - q * $ + k[0], M[1] = U * $ + q * H + k[1], M; - }, qt.angle = function(M, C) { - var k = M[0], V = M[1], U = C[0], q = C[1], $ = Math.sqrt(k * k + V * V) * Math.sqrt(U * U + q * q); - return Math.acos(Math.min(Math.max($ && (k * U + V * q) / $, -1), 1)); - }, qt.zero = function(M) { - return M[0] = 0, M[1] = 0, M; - }, qt.str = function(M) { - return "vec2(" + M[0] + ", " + M[1] + ")"; - }, qt.exactEquals = function(M, C) { - return M[0] === C[0] && M[1] === C[1]; - }, qt.equals = function(M, C) { - var k = M[0], V = M[1], U = C[0], q = C[1]; - return Math.abs(k - U) <= e.EPSILON * Math.max(1, Math.abs(k), Math.abs(U)) && Math.abs(V - q) <= e.EPSILON * Math.max(1, Math.abs(V), Math.abs(q)); - }, qt.forEach = qt.sqrLen = qt.sqrDist = qt.dist = qt.div = qt.mul = qt.sub = qt.len = void 0; - var e = function(M, C) { - if (M && M.__esModule) - return M; - if (M === null || r(M) !== "object" && typeof M != "function") - return { default: M }; - var k = n(void 0); - if (k && k.has(M)) - return k.get(M); - var V = {}, U = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var q in M) - if (q !== "default" && Object.prototype.hasOwnProperty.call(M, q)) { - var $ = U ? Object.getOwnPropertyDescriptor(M, q) : null; - $ && ($.get || $.set) ? Object.defineProperty(V, q, $) : V[q] = M[q]; - } - return V.default = M, k && k.set(M, V), V; - }(ae()); - function n(M) { - if (typeof WeakMap != "function") - return null; - var C = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(); - return (n = function(V) { - return V ? k : C; - })(M); - } - function o() { - var M = new e.ARRAY_TYPE(2); - return e.ARRAY_TYPE != Float32Array && (M[0] = 0, M[1] = 0), M; - } - function u(M, C, k) { - return M[0] = C[0] - k[0], M[1] = C[1] - k[1], M; - } - function l(M, C, k) { - return M[0] = C[0] * k[0], M[1] = C[1] * k[1], M; - } - function f(M, C, k) { - return M[0] = C[0] / k[0], M[1] = C[1] / k[1], M; - } - function v(M, C) { - return Math.hypot(C[0] - M[0], C[1] - M[1]); - } - function S(M, C) { - var k = C[0] - M[0], V = C[1] - M[1]; - return k * k + V * V; - } - function D(M) { - return Math.hypot(M[0], M[1]); - } - function x(M) { - var C = M[0], k = M[1]; - return C * C + k * k; - } - qt.len = D, qt.sub = u, qt.mul = l, qt.div = f, qt.dist = v, qt.sqrDist = S, qt.sqrLen = x; - var P, I = (P = o(), function(M, C, k, V, U, q) { - var $, H; - for (C || (C = 2), k || (k = 0), H = V ? Math.min(V * C + k, M.length) : M.length, $ = k; $ < H; $ += C) - P[0] = M[$], P[1] = M[$ + 1], U(P, P, q), M[$] = P[0], M[$ + 1] = P[1]; - return M; - }); - return qt.forEach = I, qt; - } - function Di() { - if (an) - return Y; - function r(M) { - return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(C) { - return typeof C; - } : function(C) { - return C && typeof Symbol == "function" && C.constructor === Symbol && C !== Symbol.prototype ? "symbol" : typeof C; - }, r(M); - } - an = 1, Object.defineProperty(Y, "__esModule", { value: !0 }), Y.vec4 = Y.vec3 = Y.vec2 = Y.quat2 = Y.quat = Y.mat4 = Y.mat3 = Y.mat2d = Y.mat2 = Y.glMatrix = void 0; - var e = I(ae()); - Y.glMatrix = e; - var n = I(be()); - Y.mat2 = n; - var o = I(ot()); - Y.mat2d = o; - var u = I(gt()); - Y.mat3 = u; - var l = I(Gt()); - Y.mat4 = l; - var f = I(Ji()); - Y.quat = f; - var v = I(ni()); - Y.quat2 = v; - var S = I(ln()); - Y.vec2 = S; - var D = I(Mi()); - Y.vec3 = D; - var x = I(Si()); - function P(M) { - if (typeof WeakMap != "function") - return null; - var C = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(); - return (P = function(V) { - return V ? k : C; - })(M); - } - function I(M, C) { - if (M && M.__esModule) - return M; - if (M === null || r(M) !== "object" && typeof M != "function") - return { default: M }; - var k = P(C); - if (k && k.has(M)) - return k.get(M); - var V = {}, U = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var q in M) - if (q !== "default" && Object.prototype.hasOwnProperty.call(M, q)) { - var $ = U ? Object.getOwnPropertyDescriptor(M, q) : null; - $ && ($.get || $.set) ? Object.defineProperty(V, q, $) : V[q] = M[q]; - } - return V.default = M, k && k.set(M, V), V; - } - return Y.vec4 = x, Y; - } - var xi, Cs, xs, Is, De = Di(), Vs = function() { - if (Cs) - return xi; - function r(e, n, o, u) { - this.cx = 3 * e, this.bx = 3 * (o - e) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * n, this.by = 3 * (u - n) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = e, this.p1y = n, this.p2x = o, this.p2y = u; - } - return Cs = 1, xi = r, r.prototype = { sampleCurveX: function(e) { - return ((this.ax * e + this.bx) * e + this.cx) * e; - }, sampleCurveY: function(e) { - return ((this.ay * e + this.by) * e + this.cy) * e; - }, sampleCurveDerivativeX: function(e) { - return (3 * this.ax * e + 2 * this.bx) * e + this.cx; - }, solveCurveX: function(e, n) { - if (n === void 0 && (n = 1e-6), e < 0) - return 0; - if (e > 1) - return 1; - for (var o = e, u = 0; u < 8; u++) { - var l = this.sampleCurveX(o) - e; - if (Math.abs(l) < n) - return o; - var f = this.sampleCurveDerivativeX(o); - if (Math.abs(f) < 1e-6) - break; - o -= l / f; - } - var v = 0, S = 1; - for (o = e, u = 0; u < 20 && (l = this.sampleCurveX(o), !(Math.abs(l - e) < n)); u++) - e > l ? v = o : S = o, o = 0.5 * (S - v) + v; - return o; - }, solve: function(e, n) { - return this.sampleCurveY(this.solveCurveX(e, n)); - } }, xi; - }(), Us = O(Vs); - function Zr() { - if (Is) - return xs; - function r(e, n) { - this.x = e, this.y = n; - } - return Is = 1, xs = r, r.prototype = { clone: function() { - return new r(this.x, this.y); - }, add: function(e) { - return this.clone()._add(e); - }, sub: function(e) { - return this.clone()._sub(e); - }, multByPoint: function(e) { - return this.clone()._multByPoint(e); - }, divByPoint: function(e) { - return this.clone()._divByPoint(e); - }, mult: function(e) { - return this.clone()._mult(e); - }, div: function(e) { - return this.clone()._div(e); - }, rotate: function(e) { - return this.clone()._rotate(e); - }, rotateAround: function(e, n) { - return this.clone()._rotateAround(e, n); - }, matMult: function(e) { - return this.clone()._matMult(e); - }, unit: function() { - return this.clone()._unit(); - }, perp: function() { - return this.clone()._perp(); - }, round: function() { - return this.clone()._round(); - }, mag: function() { - return Math.sqrt(this.x * this.x + this.y * this.y); - }, equals: function(e) { - return this.x === e.x && this.y === e.y; - }, dist: function(e) { - return Math.sqrt(this.distSqr(e)); - }, distSqr: function(e) { - var n = e.x - this.x, o = e.y - this.y; - return n * n + o * o; - }, angle: function() { - return Math.atan2(this.y, this.x); - }, angleTo: function(e) { - return Math.atan2(this.y - e.y, this.x - e.x); - }, angleWith: function(e) { - return this.angleWithSep(e.x, e.y); - }, angleWithSep: function(e, n) { - return Math.atan2(this.x * n - this.y * e, this.x * e + this.y * n); - }, _matMult: function(e) { - var n = e[2] * this.x + e[3] * this.y; - return this.x = e[0] * this.x + e[1] * this.y, this.y = n, this; - }, _add: function(e) { - return this.x += e.x, this.y += e.y, this; - }, _sub: function(e) { - return this.x -= e.x, this.y -= e.y, this; - }, _mult: function(e) { - return this.x *= e, this.y *= e, this; - }, _div: function(e) { - return this.x /= e, this.y /= e, this; - }, _multByPoint: function(e) { - return this.x *= e.x, this.y *= e.y, this; - }, _divByPoint: function(e) { - return this.x /= e.x, this.y /= e.y, this; - }, _unit: function() { - return this._div(this.mag()), this; - }, _perp: function() { - var e = this.y; - return this.y = this.x, this.x = -e, this; - }, _rotate: function(e) { - var n = Math.cos(e), o = Math.sin(e), u = o * this.x + n * this.y; - return this.x = n * this.x - o * this.y, this.y = u, this; - }, _rotateAround: function(e, n) { - var o = Math.cos(e), u = Math.sin(e), l = n.y + u * (this.x - n.x) + o * (this.y - n.y); - return this.x = n.x + o * (this.x - n.x) - u * (this.y - n.y), this.y = l, this; - }, _round: function() { - return this.x = Math.round(this.x), this.y = Math.round(this.y), this; - } }, r.convert = function(e) { - return e instanceof r ? e : Array.isArray(e) ? new r(e[0], e[1]) : e; - }, xs; - } - var Et = O(Zr()); - function Ws(r, e) { - if (Array.isArray(r)) { - if (!Array.isArray(e) || r.length !== e.length) - return !1; - for (let n = 0; n < r.length; n++) - if (!Ws(r[n], e[n])) - return !1; - return !0; - } - if (typeof r == "object" && r !== null && e !== null) { - if (typeof e != "object" || Object.keys(r).length !== Object.keys(e).length) - return !1; - for (const n in r) - if (!Ws(r[n], e[n])) - return !1; - return !0; - } - return r === e; - } - const $n = Math.PI / 180, $s = 180 / Math.PI; - function vi(r) { - return r * $n; - } - function kn(r) { - return r * $s; - } - const Xs = [[0, 0], [1, 0], [1, 1], [0, 1]]; - function Hr(r) { - if (r <= 0) - return 0; - if (r >= 1) - return 1; - const e = r * r, n = e * r; - return 4 * (r < 0.5 ? n : 3 * (r - e) + n - 0.75); - } - function qr(r, e, n, o) { - const u = new Us(r, e, n, o); - return function(l) { - return u.solve(l); - }; - } - const Wr = qr(0.25, 0.1, 0.25, 1); - function si(r, e, n) { - return Math.min(n, Math.max(e, r)); - } - function fs(r, e, n) { - return (n = si((n - r) / (e - r), 0, 1)) * n * (3 - 2 * n); - } - function zn(r, e, n) { - const o = n - e, u = ((r - e) % o + o) % o + e; - return u === e ? n : u; - } - function Rn(r, e, n) { - if (!r.length) - return n(null, []); - let o = r.length; - const u = new Array(r.length); - let l = null; - r.forEach((f, v) => { - e(f, (S, D) => { - S && (l = S), u[v] = D, --o == 0 && n(l, u); - }); - }); - } - function An(r, ...e) { - for (const n of e) - for (const o in n) - r[o] = n[o]; - return r; - } - let js = 1; - function yo() { - return js++; - } - function xo(r) { - return r <= 1 ? 1 : Math.pow(2, Math.ceil(Math.log(r) / Math.LN2)); - } - function vo(r, e) { - r.forEach((n) => { - e[n] && (e[n] = e[n].bind(e)); - }); - } - function yr(r, e) { - return r.indexOf(e, r.length - e.length) !== -1; - } - function Mr(r, e, n) { - const o = {}; - for (const u in r) - o[u] = e.call(this, r[u], u, r); - return o; - } - function io(r, e, n) { - const o = {}; - for (const u in r) - e.call(this, r[u], u, r) && (o[u] = r[u]); - return o; - } - function Ys(r) { - return Array.isArray(r) ? r.map(Ys) : typeof r == "object" && r ? Mr(r, Ys) : r; - } - const Sr = {}; - function mi(r) { - Sr[r] || (typeof console < "u" && console.warn(r), Sr[r] = !0); - } - function On(r, e, n) { - return (n.y - r.y) * (e.x - r.x) > (e.y - r.y) * (n.x - r.x); - } - function Vn(r) { - let e = 0; - for (let n, o, u = 0, l = r.length, f = l - 1; u < l; f = u++) - n = r[u], o = r[f], e += (o.x - n.x) * (n.y + o.y); - return e; - } - function Zi([r, e, n]) { - const o = vi(e + 90), u = vi(n); - return { x: r * Math.cos(o) * Math.sin(u), y: r * Math.sin(o) * Math.sin(u), z: r * Math.cos(u), azimuthal: e, polar: n }; - } - function Jn() { - return typeof WorkerGlobalScope < "u" && typeof self < "u" && self instanceof WorkerGlobalScope; - } - function Fn(r) { - const e = {}; - if (r.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, (n, o, u, l) => { - const f = u || l; - return e[o] = !f || f.toLowerCase(), ""; - }), e["max-age"]) { - const n = parseInt(e["max-age"], 10); - isNaN(n) ? delete e["max-age"] : e["max-age"] = n; - } - return e; - } - let Ls = null; - function zs(r, e) { - return [r[4 * e], r[4 * e + 1], r[4 * e + 2], r[4 * e + 3]]; - } - function Vo(r, e, n, o) { - for (; e < n; ) { - const u = e + n >> 1; - r[u] < o ? e = u + 1 : n = u; - } - return e; - } - function Ke(r, e, n, o) { - for (; e < n; ) { - const u = e + n >> 1; - r[u] <= o ? e = u + 1 : n = u; - } - return e; - } - function re(r) { - return r > 0 ? 1 / (1.001 - r) : 1 + r; - } - function le(r) { - return r > 0 ? 1 - 1 / (1.001 - r) : -r; - } - const ge = { API_URL: "https://api.mapbox.com", get API_URL_REGEX() { - return /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i; - }, get API_TILEJSON_REGEX() { - return /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i; - }, get API_SPRITE_REGEX() { - return /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i; - }, get API_FONTS_REGEX() { - return /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i; - }, get API_STYLE_REGEX() { - return /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i; - }, get API_CDN_URL_REGEX() { - return /^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i; - }, get EVENTS_URL() { - if (!ge.API_URL) - return null; - try { - const r = new URL(ge.API_URL); - return r.hostname === "api.mapbox.cn" ? "https://events.mapbox.cn/events/v2" : r.hostname === "api.mapbox.com" ? "https://events.mapbox.com/events/v2" : null; - } catch { - return null; - } - }, SESSION_PATH: "/map-sessions/v1", FEEDBACK_URL: "https://apps.mapbox.com/feedback", TILE_URL_VERSION: "v4", RASTER_URL_PREFIX: "raster/v1", RASTERARRAYS_URL_PREFIX: "rasterarrays/v1", REQUIRE_ACCESS_TOKEN: !0, ACCESS_TOKEN: null, DEFAULT_STYLE: "mapbox://styles/mapbox/standard", MAX_PARALLEL_IMAGE_REQUESTS: 16, DRACO_URL: "https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm", MESHOPT_URL: "https://api.mapbox.com/mapbox-gl-js/meshopt_base_v0.20.wasm", MESHOPT_SIMD_URL: "https://api.mapbox.com/mapbox-gl-js/meshopt_simd_v0.20.wasm", GLYPHS_URL: "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", TILES3D_URL_PREFIX: "3dtiles/v1" }; - function Le(r) { - return ge.API_URL_REGEX.test(r); - } - function Ce(r) { - return ge.API_SPRITE_REGEX.test(r); - } - let Be, qe, Pe, Ye, Qe, it; - function mt() { - return Be == null && (Be = self.OffscreenCanvas && new OffscreenCanvas(1, 1).getContext("2d") && typeof self.createImageBitmap == "function"), Be; - } - const Ct = { now: () => Ye !== void 0 ? Ye : performance.now(), setNow(r) { - Ye = r; - }, restoreNow() { - Ye = void 0; - }, frame(r) { - const e = requestAnimationFrame(r); - return { cancel: () => cancelAnimationFrame(e) }; - }, getImageData(r, e = 0) { - const { width: n, height: o } = r; - Qe || (Qe = document.createElement("canvas")); - const u = Qe.getContext("2d", { willReadFrequently: !0 }); - if (!u) - throw new Error("failed to create canvas 2d context"); - return (n > Qe.width || o > Qe.height) && (Qe.width = n, Qe.height = o), u.clearRect(-e, -e, n + 2 * e, o + 2 * e), u.drawImage(r, 0, 0, n, o), u.getImageData(-e, -e, n + 2 * e, o + 2 * e); - }, resolveURL: (r) => (qe || (qe = document.createElement("a")), qe.href = r, qe.href), get devicePixelRatio() { - return window.devicePixelRatio; - }, get prefersReducedMotion() { - return !!window.matchMedia && (Pe == null && (Pe = window.matchMedia("(prefers-reduced-motion: reduce)")), Pe.matches); - }, hasCanvasFingerprintNoise() { - if (it !== void 0) - return it; - if (!mt()) - return it = !1, !1; - const r = new OffscreenCanvas(85, 1), e = r.getContext("2d", { willReadFrequently: !0 }); - let n = 0; - for (let u = 0; u < r.width; ++u) - e.fillStyle = `rgba(${n++},${n++},${n++}, 255)`, e.fillRect(u, 0, 1, 1); - const o = e.getImageData(0, 0, r.width, r.height); - n = 0; - for (let u = 0; u < o.data.length; ++u) - if (u % 4 != 3 && n++ !== o.data[u]) - return it = !0, !0; - return it = !1, !1; - } }; - function It(r, e) { - const n = r.indexOf("?"); - if (n < 0) - return `${r}?${new URLSearchParams(e).toString()}`; - const o = new URLSearchParams(r.slice(n)); - for (const u in e) - o.set(u, e[u]); - return `${r.slice(0, n)}?${o.toString()}`; - } - function Kt(r, e = { persistentParams: [] }) { - const n = r.indexOf("?"); - if (n < 0) - return r; - const o = new URLSearchParams(), u = new URLSearchParams(r.slice(n)); - for (const f of e.persistentParams) { - const v = u.get(f); - v && o.set(f, v); - } - const l = o.toString(); - return `${r.slice(0, n)}${l.length > 0 ? `?${l}` : ""}`; - } - const di = "mapbox-tiles"; - let li = 500, ri = 50; - const Ki = ["language", "worldview", "jobid"]; - let Ni, Ei; - function $i() { - try { - return caches; - } catch { - } - } - function Hi() { - const r = $i(); - r && Ni == null && (Ni = r.open(di)); - } - let Xn = 1 / 0; - const Gs = { supported: !1, testSupport: function(r) { - !ra && vs && (Er ? cl(r) : ps = r); - } }; - let ps, vs, ra = !1, Er = !1; - const oa = typeof self < "u" ? self : {}; - function cl(r) { - const e = r.createTexture(); - r.bindTexture(r.TEXTURE_2D, e); - try { - if (r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, r.RGBA, r.UNSIGNED_BYTE, vs), r.isContextLost()) - return; - Gs.supported = !0; - } catch { - } - r.deleteTexture(e), ra = !0; - } - oa.document && (vs = oa.document.createElement("img"), vs.onload = function() { - ps && cl(ps), ps = null, Er = !0; - }, vs.onerror = function() { - ra = !0, ps = null; - }, vs.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="); - const Uo = { Unknown: "Unknown", Style: "Style", Source: "Source", Tile: "Tile", Glyphs: "Glyphs", SpriteImage: "SpriteImage", SpriteJSON: "SpriteJSON", Iconset: "Iconset", Image: "Image", Model: "Model" }; - typeof Object.freeze == "function" && Object.freeze(Uo); - class jo extends Error { - constructor(e, n, o) { - n === 401 && Le(o) && (e += ": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"), super(e), this.status = n, this.url = o; - } - toString() { - return `${this.name}: ${this.message} (${this.status}): ${this.url}`; - } - } - const tn = Jn() ? () => self.worker && self.worker.referrer : () => (location.protocol === "blob:" ? parent : self).location.href, xn = function(r, e) { - if (!(/^file:/.test(n = r.url) || /^file:/.test(tn()) && !/^\w+:/.test(n))) { - if (self.fetch && self.Request && self.AbortController && Request.prototype.hasOwnProperty("signal")) - return function(o, u) { - const l = new AbortController(), f = new Request(o.url, { method: o.method || "GET", body: o.body, credentials: o.credentials, headers: o.headers, referrer: tn(), referrerPolicy: o.referrerPolicy, signal: l.signal }); - let v = !1, S = !1; - const D = (x = f.url).indexOf("sku=") > 0 && Le(x); - var x; - o.type === "json" && f.headers.set("Accept", "application/json"); - const P = (M, C, k) => { - if (S) - return; - if (M && M.message !== "SecurityError" && mi(M.toString()), C && k) - return I(C); - const V = Date.now(); - fetch(f).then((U) => { - if (U.ok) { - const q = D ? U.clone() : null; - return I(U, q, V); - } - return u(new jo(U.statusText, U.status, o.url)); - }).catch((U) => { - U.name !== "AbortError" && u(new Error(`${U.message} ${o.url}`)); - }); - }, I = (M, C, k) => { - (o.type === "arrayBuffer" ? M.arrayBuffer() : o.type === "json" ? M.json() : M.text()).then((V) => { - S || (C && k && function(U, q, $) { - if (Hi(), Ni == null) - return; - const H = Fn(q.headers.get("Cache-Control") || ""); - if (H["no-store"]) - return; - const K = { status: q.status, statusText: q.statusText, headers: new Headers() }; - q.headers.forEach((fe, de) => K.headers.set(de, fe)), H["max-age"] && K.headers.set("Expires", new Date($ + 1e3 * H["max-age"]).toUTCString()); - const Q = K.headers.get("Expires"); - if (!Q || new Date(Q).getTime() - $ < 42e4) - return; - let ie = Kt(U.url, { persistentParams: Ki }); - if (q.status === 206) { - const fe = U.headers.get("Range"); - if (!fe) - return; - K.status = 200, ie = It(ie, { range: fe }); - } - (function(fe, de) { - if (Ei === void 0) - try { - new Response(new ReadableStream()), Ei = !0; - } catch { - Ei = !1; - } - Ei ? de(fe.body) : fe.blob().then(de); - })(q, (fe) => { - const de = new Response((ue = q.status) !== 200 && ue !== 404 && [101, 103, 204, 205, 304].includes(ue) ? null : fe, K); - var ue; - Hi(), Ni != null && Ni.then((Se) => Se.put(ie, de)).catch((Se) => mi(Se.message)); - }); - }(f, C, k), v = !0, u(null, V, M.headers.get("Cache-Control"), M.headers.get("Expires"))); - }).catch((V) => { - S || u(new Error(V.message)); - }); - }; - return D ? function(M, C) { - if (Hi(), Ni == null) - return C(null); - Ni.then((k) => { - let V = Kt(M.url, { persistentParams: Ki }); - const U = M.headers.get("Range"); - U && (V = It(V, { range: U })), k.match(V).then((q) => { - const $ = function(H) { - if (!H) - return !1; - const K = new Date(H.headers.get("Expires") || 0), Q = Fn(H.headers.get("Cache-Control") || ""); - return K > Date.now() && !Q["no-cache"]; - }(q); - k.delete(V), $ && k.put(V, q.clone()), C(null, q, $); - }).catch(C); - }).catch(C); - }(f, P) : P(null, null), { cancel: () => { - S = !0, v || l.abort(); - } }; - }(r, e); - if (Jn() && self.worker && self.worker.actor) - return self.worker.actor.send("getResource", r, e, void 0, !0); - } - var n; - return function(o, u) { - const l = new XMLHttpRequest(); - l.open(o.method || "GET", o.url, !0), o.type === "arrayBuffer" && (l.responseType = "arraybuffer"); - for (const f in o.headers) - l.setRequestHeader(f, o.headers[f]); - return o.type === "json" && (l.responseType = "text", l.setRequestHeader("Accept", "application/json")), l.withCredentials = o.credentials === "include", l.onerror = () => { - u(new Error(l.statusText)); - }, l.onload = () => { - if ((l.status >= 200 && l.status < 300 || l.status === 0) && l.response !== null) { - let f = l.response; - if (o.type === "json") - try { - f = JSON.parse(l.response); - } catch (v) { - return u(v); - } - u(null, f, l.getResponseHeader("Cache-Control"), l.getResponseHeader("Expires")); - } else - u(new jo(l.statusText, l.status, o.url)); - }, l.send(o.body), { cancel: () => l.abort() }; - }(r, e); - }, no = function(r, e) { - return xn(An(r, { type: "arrayBuffer" }), e); - }; - function Go(r) { - const e = document.createElement("a"); - return e.href = r, e.protocol === location.protocol && e.host === location.host; - } - const aa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="; - let Da, Vi; - Da = [], Vi = 0; - const Hn = function(r, e) { - if (Gs.supported && (r.headers || (r.headers = {}), r.headers.accept = "image/webp,*/*"), Vi >= ge.MAX_PARALLEL_IMAGE_REQUESTS) { - const l = { requestParameters: r, callback: e, cancelled: !1, cancel() { - this.cancelled = !0; - } }; - return Da.push(l), l; - } - Vi++; - let n = !1; - const o = () => { - if (!n) - for (n = !0, Vi--; Da.length && Vi < ge.MAX_PARALLEL_IMAGE_REQUESTS; ) { - const l = Da.shift(), { requestParameters: f, callback: v, cancelled: S } = l; - S || (l.cancel = Hn(f, v).cancel); - } - }, u = no(r, (l, f, v, S) => { - o(), l ? e(l) : f && (self.createImageBitmap ? function(D, x) { - const P = new Blob([new Uint8Array(D)], { type: "image/png" }); - createImageBitmap(P).then((I) => { - x(null, I); - }).catch((I) => { - x(new Error(`Could not load image because of ${I.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)); - }); - }(f, (D, x) => e(D, x, v, S)) : function(D, x) { - const P = new Image(); - P.onload = () => { - x(null, P), URL.revokeObjectURL(P.src), P.onload = null, requestAnimationFrame(() => { - P.src = aa; - }); - }, P.onerror = () => x(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")); - const I = new Blob([new Uint8Array(D)], { type: "image/png" }); - P.src = D.byteLength ? URL.createObjectURL(I) : aa; - }(f, (D, x) => e(D, x, v, S))); - }); - return { cancel: () => { - u.cancel(), o(); - } }; - }; - var hl, Zs, Qn, Pr = { exports: {} }, nr = { exports: {} }, Ks = { exports: {} }, Yn = function() { - if (Qn) - return Pr.exports; - Qn = 1; - var r = (hl || (hl = 1, nr.exports = function(n, o) { - var u, l, f, v, S, D, x, P; - for (l = n.length - (u = 3 & n.length), f = o, S = 3432918353, D = 461845907, P = 0; P < l; ) - x = 255 & n.charCodeAt(P) | (255 & n.charCodeAt(++P)) << 8 | (255 & n.charCodeAt(++P)) << 16 | (255 & n.charCodeAt(++P)) << 24, ++P, f = 27492 + (65535 & (v = 5 * (65535 & (f = (f ^= x = (65535 & (x = (x = (65535 & x) * S + (((x >>> 16) * S & 65535) << 16) & 4294967295) << 15 | x >>> 17)) * D + (((x >>> 16) * D & 65535) << 16) & 4294967295) << 13 | f >>> 19)) + ((5 * (f >>> 16) & 65535) << 16) & 4294967295)) + ((58964 + (v >>> 16) & 65535) << 16); - switch (x = 0, u) { - case 3: - x ^= (255 & n.charCodeAt(P + 2)) << 16; - case 2: - x ^= (255 & n.charCodeAt(P + 1)) << 8; - case 1: - f ^= x = (65535 & (x = (x = (65535 & (x ^= 255 & n.charCodeAt(P))) * S + (((x >>> 16) * S & 65535) << 16) & 4294967295) << 15 | x >>> 17)) * D + (((x >>> 16) * D & 65535) << 16) & 4294967295; - } - return f ^= n.length, f = 2246822507 * (65535 & (f ^= f >>> 16)) + ((2246822507 * (f >>> 16) & 65535) << 16) & 4294967295, f = 3266489909 * (65535 & (f ^= f >>> 13)) + ((3266489909 * (f >>> 16) & 65535) << 16) & 4294967295, (f ^= f >>> 16) >>> 0; - }), nr.exports), e = (Zs || (Zs = 1, Ks.exports = function(n, o) { - for (var u, l = n.length, f = o ^ l, v = 0; l >= 4; ) - u = 1540483477 * (65535 & (u = 255 & n.charCodeAt(v) | (255 & n.charCodeAt(++v)) << 8 | (255 & n.charCodeAt(++v)) << 16 | (255 & n.charCodeAt(++v)) << 24)) + ((1540483477 * (u >>> 16) & 65535) << 16), f = 1540483477 * (65535 & f) + ((1540483477 * (f >>> 16) & 65535) << 16) ^ (u = 1540483477 * (65535 & (u ^= u >>> 24)) + ((1540483477 * (u >>> 16) & 65535) << 16)), l -= 4, ++v; - switch (l) { - case 3: - f ^= (255 & n.charCodeAt(v + 2)) << 16; - case 2: - f ^= (255 & n.charCodeAt(v + 1)) << 8; - case 1: - f = 1540483477 * (65535 & (f ^= 255 & n.charCodeAt(v))) + ((1540483477 * (f >>> 16) & 65535) << 16); - } - return f = 1540483477 * (65535 & (f ^= f >>> 13)) + ((1540483477 * (f >>> 16) & 65535) << 16), (f ^= f >>> 15) >>> 0; - }), Ks.exports); - return Pr.exports = r, Pr.exports.murmur3 = r, Pr.exports.murmur2 = e, Pr.exports; - }(), $r = O(Yn); - class Ar { - constructor(e, ...n) { - An(this, n[0] || {}), this.type = e; - } - } - class Cr extends Ar { - constructor(e, n = {}) { - super("error", An({ error: e }, n)); - } - } - function ka(r, e, n) { - n[r] && n[r].indexOf(e) !== -1 || (n[r] = n[r] || [], n[r].push(e)); - } - function la(r, e, n) { - if (n && n[r]) { - const o = n[r].indexOf(e); - o !== -1 && n[r].splice(o, 1); - } - } - class Zo { - on(e, n) { - return this._listeners = this._listeners || {}, ka(e, n, this._listeners), this; - } - off(e, n) { - return la(e, n, this._listeners), la(e, n, this._oneTimeListeners), this; - } - once(e, n) { - return n ? (this._oneTimeListeners = this._oneTimeListeners || {}, ka(e, n, this._oneTimeListeners), this) : new Promise((o) => this.once(e, o)); - } - fire(e, n) { - const o = typeof e == "string" ? new Ar(e, n) : e, u = o.type; - if (this.listens(u)) { - o.target = this; - const l = this._listeners && this._listeners[u] ? this._listeners[u].slice() : []; - for (const S of l) - S.call(this, o); - const f = this._oneTimeListeners && this._oneTimeListeners[u] ? this._oneTimeListeners[u].slice() : []; - for (const S of f) - la(u, S, this._oneTimeListeners), S.call(this, o); - const v = this._eventedParent; - v && (An(o, typeof this._eventedParentData == "function" ? this._eventedParentData() : this._eventedParentData), v.fire(o)); - } else - o instanceof Cr && console.error(o.error); - return this; - } - listens(e) { - return !!(this._listeners && this._listeners[e] && this._listeners[e].length > 0 || this._oneTimeListeners && this._oneTimeListeners[e] && this._oneTimeListeners[e].length > 0 || this._eventedParent && this._eventedParent.listens(e)); - } - setEventedParent(e, n) { - return this._eventedParent = e, this._eventedParentData = n, this; - } - } - var sr, ca = {}, Ra = function() { - if (sr) - return ca; - sr = 1; - var r = { transparent: [0, 0, 0, 0], aliceblue: [240, 248, 255, 1], antiquewhite: [250, 235, 215, 1], aqua: [0, 255, 255, 1], aquamarine: [127, 255, 212, 1], azure: [240, 255, 255, 1], beige: [245, 245, 220, 1], bisque: [255, 228, 196, 1], black: [0, 0, 0, 1], blanchedalmond: [255, 235, 205, 1], blue: [0, 0, 255, 1], blueviolet: [138, 43, 226, 1], brown: [165, 42, 42, 1], burlywood: [222, 184, 135, 1], cadetblue: [95, 158, 160, 1], chartreuse: [127, 255, 0, 1], chocolate: [210, 105, 30, 1], coral: [255, 127, 80, 1], cornflowerblue: [100, 149, 237, 1], cornsilk: [255, 248, 220, 1], crimson: [220, 20, 60, 1], cyan: [0, 255, 255, 1], darkblue: [0, 0, 139, 1], darkcyan: [0, 139, 139, 1], darkgoldenrod: [184, 134, 11, 1], darkgray: [169, 169, 169, 1], darkgreen: [0, 100, 0, 1], darkgrey: [169, 169, 169, 1], darkkhaki: [189, 183, 107, 1], darkmagenta: [139, 0, 139, 1], darkolivegreen: [85, 107, 47, 1], darkorange: [255, 140, 0, 1], darkorchid: [153, 50, 204, 1], darkred: [139, 0, 0, 1], darksalmon: [233, 150, 122, 1], darkseagreen: [143, 188, 143, 1], darkslateblue: [72, 61, 139, 1], darkslategray: [47, 79, 79, 1], darkslategrey: [47, 79, 79, 1], darkturquoise: [0, 206, 209, 1], darkviolet: [148, 0, 211, 1], deeppink: [255, 20, 147, 1], deepskyblue: [0, 191, 255, 1], dimgray: [105, 105, 105, 1], dimgrey: [105, 105, 105, 1], dodgerblue: [30, 144, 255, 1], firebrick: [178, 34, 34, 1], floralwhite: [255, 250, 240, 1], forestgreen: [34, 139, 34, 1], fuchsia: [255, 0, 255, 1], gainsboro: [220, 220, 220, 1], ghostwhite: [248, 248, 255, 1], gold: [255, 215, 0, 1], goldenrod: [218, 165, 32, 1], gray: [128, 128, 128, 1], green: [0, 128, 0, 1], greenyellow: [173, 255, 47, 1], grey: [128, 128, 128, 1], honeydew: [240, 255, 240, 1], hotpink: [255, 105, 180, 1], indianred: [205, 92, 92, 1], indigo: [75, 0, 130, 1], ivory: [255, 255, 240, 1], khaki: [240, 230, 140, 1], lavender: [230, 230, 250, 1], lavenderblush: [255, 240, 245, 1], lawngreen: [124, 252, 0, 1], lemonchiffon: [255, 250, 205, 1], lightblue: [173, 216, 230, 1], lightcoral: [240, 128, 128, 1], lightcyan: [224, 255, 255, 1], lightgoldenrodyellow: [250, 250, 210, 1], lightgray: [211, 211, 211, 1], lightgreen: [144, 238, 144, 1], lightgrey: [211, 211, 211, 1], lightpink: [255, 182, 193, 1], lightsalmon: [255, 160, 122, 1], lightseagreen: [32, 178, 170, 1], lightskyblue: [135, 206, 250, 1], lightslategray: [119, 136, 153, 1], lightslategrey: [119, 136, 153, 1], lightsteelblue: [176, 196, 222, 1], lightyellow: [255, 255, 224, 1], lime: [0, 255, 0, 1], limegreen: [50, 205, 50, 1], linen: [250, 240, 230, 1], magenta: [255, 0, 255, 1], maroon: [128, 0, 0, 1], mediumaquamarine: [102, 205, 170, 1], mediumblue: [0, 0, 205, 1], mediumorchid: [186, 85, 211, 1], mediumpurple: [147, 112, 219, 1], mediumseagreen: [60, 179, 113, 1], mediumslateblue: [123, 104, 238, 1], mediumspringgreen: [0, 250, 154, 1], mediumturquoise: [72, 209, 204, 1], mediumvioletred: [199, 21, 133, 1], midnightblue: [25, 25, 112, 1], mintcream: [245, 255, 250, 1], mistyrose: [255, 228, 225, 1], moccasin: [255, 228, 181, 1], navajowhite: [255, 222, 173, 1], navy: [0, 0, 128, 1], oldlace: [253, 245, 230, 1], olive: [128, 128, 0, 1], olivedrab: [107, 142, 35, 1], orange: [255, 165, 0, 1], orangered: [255, 69, 0, 1], orchid: [218, 112, 214, 1], palegoldenrod: [238, 232, 170, 1], palegreen: [152, 251, 152, 1], paleturquoise: [175, 238, 238, 1], palevioletred: [219, 112, 147, 1], papayawhip: [255, 239, 213, 1], peachpuff: [255, 218, 185, 1], peru: [205, 133, 63, 1], pink: [255, 192, 203, 1], plum: [221, 160, 221, 1], powderblue: [176, 224, 230, 1], purple: [128, 0, 128, 1], rebeccapurple: [102, 51, 153, 1], red: [255, 0, 0, 1], rosybrown: [188, 143, 143, 1], royalblue: [65, 105, 225, 1], saddlebrown: [139, 69, 19, 1], salmon: [250, 128, 114, 1], sandybrown: [244, 164, 96, 1], seagreen: [46, 139, 87, 1], seashell: [255, 245, 238, 1], sienna: [160, 82, 45, 1], silver: [192, 192, 192, 1], skyblue: [135, 206, 235, 1], slateblue: [106, 90, 205, 1], slategray: [112, 128, 144, 1], slategrey: [112, 128, 144, 1], snow: [255, 250, 250, 1], springgreen: [0, 255, 127, 1], steelblue: [70, 130, 180, 1], tan: [210, 180, 140, 1], teal: [0, 128, 128, 1], thistle: [216, 191, 216, 1], tomato: [255, 99, 71, 1], turquoise: [64, 224, 208, 1], violet: [238, 130, 238, 1], wheat: [245, 222, 179, 1], white: [255, 255, 255, 1], whitesmoke: [245, 245, 245, 1], yellow: [255, 255, 0, 1], yellowgreen: [154, 205, 50, 1] }; - function e(l) { - return (l = Math.round(l)) < 0 ? 0 : l > 255 ? 255 : l; - } - function n(l) { - return e(l[l.length - 1] === "%" ? parseFloat(l) / 100 * 255 : parseInt(l)); - } - function o(l) { - return (f = l[l.length - 1] === "%" ? parseFloat(l) / 100 : parseFloat(l)) < 0 ? 0 : f > 1 ? 1 : f; - var f; - } - function u(l, f, v) { - return v < 0 ? v += 1 : v > 1 && (v -= 1), 6 * v < 1 ? l + (f - l) * v * 6 : 2 * v < 1 ? f : 3 * v < 2 ? l + (f - l) * (2 / 3 - v) * 6 : l; - } - try { - ca.parseCSSColor = function(l) { - var f, v = l.replace(/ /g, "").toLowerCase(); - if (v in r) - return r[v].slice(); - if (v[0] === "#") - return v.length === 4 ? (f = parseInt(v.substr(1), 16)) >= 0 && f <= 4095 ? [(3840 & f) >> 4 | (3840 & f) >> 8, 240 & f | (240 & f) >> 4, 15 & f | (15 & f) << 4, 1] : null : v.length === 7 && (f = parseInt(v.substr(1), 16)) >= 0 && f <= 16777215 ? [(16711680 & f) >> 16, (65280 & f) >> 8, 255 & f, 1] : null; - var S = v.indexOf("("), D = v.indexOf(")"); - if (S !== -1 && D + 1 === v.length) { - var x = v.substr(0, S), P = v.substr(S + 1, D - (S + 1)).split(","), I = 1; - switch (x) { - case "rgba": - if (P.length !== 4) - return null; - I = o(P.pop()); - case "rgb": - return P.length !== 3 ? null : [n(P[0]), n(P[1]), n(P[2]), I]; - case "hsla": - if (P.length !== 4) - return null; - I = o(P.pop()); - case "hsl": - if (P.length !== 3) - return null; - var M = (parseFloat(P[0]) % 360 + 360) % 360 / 360, C = o(P[1]), k = o(P[2]), V = k <= 0.5 ? k * (C + 1) : k + C - k * C, U = 2 * k - V; - return [e(255 * u(U, V, M + 1 / 3)), e(255 * u(U, V, M)), e(255 * u(U, V, M - 1 / 3)), I]; - default: - return null; - } - } - return null; - }; - } catch { - } - return ca; - }(); - class ki { - constructor(e, n, o, u = 1) { - this.r = e, this.g = n, this.b = o, this.a = u; - } - static parse(e) { - if (!e) - return; - if (e instanceof ki) - return e; - if (typeof e != "string") - return; - const n = Ra.parseCSSColor(e); - return n ? new ki(n[0] / 255 * n[3], n[1] / 255 * n[3], n[2] / 255 * n[3], n[3]) : void 0; - } - toStringPremultipliedAlpha() { - const [e, n, o, u] = this.a === 0 ? [0, 0, 0, 0] : [255 * this.r / this.a, 255 * this.g / this.a, 255 * this.b / this.a, this.a]; - return `rgba(${Math.round(e)},${Math.round(n)},${Math.round(o)},${u})`; - } - toString() { - const [e, n, o, u] = [this.r, this.g, this.b, this.a]; - return `rgba(${Math.round(255 * e)},${Math.round(255 * n)},${Math.round(255 * o)},${u})`; - } - toRenderColor(e) { - const { r: n, g: o, b: u, a: l } = this; - return new Gl(e, n, o, u, l); - } - clone() { - return new ki(this.r, this.g, this.b, this.a); - } - } - class Gl { - constructor(e, n, o, u, l) { - if (e) { - const f = e.image.height, v = f * f; - n = l === 0 ? 0 : n / l * (f - 1), o = l === 0 ? 0 : o / l * (f - 1), u = l === 0 ? 0 : u / l * (f - 1); - const S = Math.floor(n), D = Math.floor(o), x = Math.floor(u), P = Math.ceil(n), I = Math.ceil(o), M = Math.ceil(u), C = n - S, k = o - D, V = u - x, U = e.image.data, q = 4 * (S + D * v + x * f), $ = 4 * (S + D * v + M * f), H = 4 * (S + I * v + x * f), K = 4 * (S + I * v + M * f), Q = 4 * (P + D * v + x * f), ie = 4 * (P + D * v + M * f), fe = 4 * (P + I * v + x * f), de = 4 * (P + I * v + M * f); - if (q < 0 || de >= U.length) - throw new Error("out of range"); - this.r = ei(ei(ei(U[q], U[$], V), ei(U[H], U[K], V), k), ei(ei(U[Q], U[ie], V), ei(U[fe], U[de], V), k), C) / 255 * l, this.g = ei(ei(ei(U[q + 1], U[$ + 1], V), ei(U[H + 1], U[K + 1], V), k), ei(ei(U[Q + 1], U[ie + 1], V), ei(U[fe + 1], U[de + 1], V), k), C) / 255 * l, this.b = ei(ei(ei(U[q + 2], U[$ + 2], V), ei(U[H + 2], U[K + 2], V), k), ei(ei(U[Q + 2], U[ie + 2], V), ei(U[fe + 2], U[de + 2], V), k), C) / 255 * l, this.a = l; - } else - this.r = n, this.g = o, this.b = u, this.a = l; - } - toArray() { - const { r: e, g: n, b: o, a: u } = this; - return u === 0 ? [0, 0, 0, 0] : [255 * e / u, 255 * n / u, 255 * o / u, u]; - } - toHslaArray() { - if (this.a === 0) - return [0, 0, 0, 0]; - const { r: e, g: n, b: o, a: u } = this, l = Math.min(Math.max(e / u, 0), 1), f = Math.min(Math.max(n / u, 0), 1), v = Math.min(Math.max(o / u, 0), 1), S = Math.min(l, f, v), D = Math.max(l, f, v), x = (S + D) / 2; - if (S === D) - return [0, 0, 100 * x, u]; - const P = D - S, I = x > 0.5 ? P / (2 - D - S) : P / (D + S); - let M = 0; - return D === l ? M = (f - v) / P + (f < v ? 6 : 0) : D === f ? M = (v - l) / P + 2 : D === v && (M = (l - f) / P + 4), M *= 60, [Math.min(Math.max(M, 0), 360), Math.min(Math.max(100 * I, 0), 100), Math.min(Math.max(100 * x, 0), 100), u]; - } - toArray01() { - const { r: e, g: n, b: o, a: u } = this; - return u === 0 ? [0, 0, 0, 0] : [e / u, n / u, o / u, u]; - } - toArray01Scaled(e) { - const { r: n, g: o, b: u, a: l } = this; - return l === 0 ? [0, 0, 0] : [n / l * e, o / l * e, u / l * e]; - } - toArray01PremultipliedAlpha() { - const { r: e, g: n, b: o, a: u } = this; - return [e, n, o, u]; - } - toArray01Linear() { - const { r: e, g: n, b: o, a: u } = this; - return u === 0 ? [0, 0, 0, 0] : [Math.pow(e / u, 2.2), Math.pow(n / u, 2.2), Math.pow(o / u, 2.2), u]; - } - } - function ei(r, e, n) { - return r * (1 - n) + e * n; - } - function ul(r, e, n) { - return r.map((o, u) => ei(o, e[u], n)); - } - ki.black = new ki(0, 0, 0, 1), ki.white = new ki(1, 1, 1, 1), ki.transparent = new ki(0, 0, 0, 0), ki.red = new ki(1, 0, 0, 1), ki.blue = new ki(0, 0, 1, 1); - var Oi = Object.freeze({ __proto__: null, array: ul, color: function(r, e, n) { - return new ki(ei(r.r, e.r, n), ei(r.g, e.g, n), ei(r.b, e.b, n), ei(r.a, e.a, n)); - }, number: ei }); - function Bi(r, ...e) { - for (const n of e) - for (const o in n) - r[o] = n[o]; - return r; - } - class ns extends Error { - constructor(e, n) { - super(n), this.message = n, this.key = e; - } - } - class Cn { - constructor(e, n = []) { - this.parent = e, this.bindings = {}; - for (const [o, u] of n) - this.bindings[o] = u; - } - concat(e) { - return new Cn(this, e); - } - get(e) { - if (this.bindings[e]) - return this.bindings[e]; - if (this.parent) - return this.parent.get(e); - throw new Error(`${e} not found in scope.`); - } - has(e) { - return !!this.bindings[e] || !!this.parent && this.parent.has(e); - } - } - const ha = { kind: "null" }, Ot = { kind: "number" }, Fi = { kind: "string" }, Li = { kind: "boolean" }, ms = { kind: "color" }, bo = { kind: "object" }, Pi = { kind: "value" }, _s = { kind: "collator" }, Js = { kind: "formatted" }, Ho = { kind: "resolvedImage" }; - function Ss(r, e) { - return { kind: "array", itemType: r, N: e }; - } - function un(r) { - if (r.kind === "array") { - const e = un(r.itemType); - return typeof r.N == "number" ? `array<${e}, ${r.N}>` : r.itemType.kind === "value" ? "array" : `array<${e}>`; - } - return r.kind; - } - const Bc = [ha, Ot, Fi, Li, ms, Js, bo, Ss(Pi), Ho]; - function ua(r, e) { - if (e.kind === "error") - return null; - if (r.kind === "array") { - if (e.kind === "array" && (e.N === 0 && e.itemType.kind === "value" || !ua(r.itemType, e.itemType)) && (typeof r.N != "number" || r.N === e.N)) - return null; - } else { - if (r.kind === e.kind) - return null; - if (r.kind === "value") { - for (const n of Bc) - if (!ua(n, e)) - return null; - } - } - return `Expected ${un(r)} but found ${un(e)} instead.`; - } - function Zl(r, e) { - return e.some((n) => n.kind === r.kind); - } - function da(r, e) { - return e.some((n) => n === "null" ? r === null : n === "array" ? Array.isArray(r) : n === "object" ? r && !Array.isArray(r) && typeof r == "object" : n === typeof r); - } - class nn { - constructor(e, n, o) { - this.sensitivity = e ? n ? "variant" : "case" : n ? "accent" : "base", this.locale = o, this.collator = new Intl.Collator(this.locale ? this.locale : [], { sensitivity: this.sensitivity, usage: "search" }); - } - compare(e, n) { - return this.collator.compare(e, n); - } - resolvedLocale() { - return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale; - } - } - class dl { - constructor(e, n, o, u, l) { - this.text = e.normalize ? e.normalize() : e, this.image = n, this.scale = o, this.fontStack = u, this.textColor = l; - } - } - class Dn { - constructor(e) { - this.sections = e; - } - static fromString(e) { - return new Dn([new dl(e, null, null, null, null)]); - } - isEmpty() { - return this.sections.length === 0 || !this.sections.some((e) => e.text.length !== 0 || e.image && e.image.namePrimary); - } - static factory(e) { - return e instanceof Dn ? e : Dn.fromString(e); - } - toString() { - return this.sections.length === 0 ? "" : this.sections.map((e) => e.text).join(""); - } - serialize() { - const e = ["format"]; - for (const n of this.sections) { - if (n.image) { - e.push(["image", n.image.namePrimary]); - continue; - } - e.push(n.text); - const o = {}; - n.fontStack && (o["text-font"] = ["literal", n.fontStack.split(",")]), n.scale && (o["font-scale"] = n.scale), n.textColor && (o["text-color"] = ["rgba"].concat(n.textColor.toRenderColor(null).toArray())), e.push(o); - } - return e; - } - } - class rr { - constructor(e, n) { - if (this.id = e, this.options = n || { params: {} }, this.options.transform) { - const { a: o, b: u, c: l, d: f, e: v, f: S } = this.options.transform; - this.options.transform = new DOMMatrix([o, u, l, f, v, S]); - } else - this.options.transform = new DOMMatrix([1, 0, 0, 1, 0, 0]); - } - static deserializeId(e) { - return JSON.parse(e).id; - } - static deserializeFromString(e) { - const n = JSON.parse(e), { a: o, b: u, c: l, d: f, e: v, f: S } = n.options.transform; - return new DOMMatrix([o, u, l, f, v, S]), new rr(n.id, n.options); - } - scaleSelf(e) { - return this.options.transform = this.options.transform.scale(e), this; - } - serialize() { - const e = { id: this.id }; - this.options && (e.options = this.options); - const { a: n, b: o, c: u, d: l, e: f, f: v } = this.options.transform; - return e.options.transform = { a: n, b: o, c: u, d: l, e: f, f: v }, JSON.stringify(e); - } - } - class ss { - constructor(e) { - this.namePrimary = e.namePrimary, e.nameSecondary && (this.nameSecondary = e.nameSecondary), e.optionsPrimary && (this.optionsPrimary = e.optionsPrimary), e.optionsSecondary && (this.optionsSecondary = e.optionsSecondary), this.available = e.available; - } - toString() { - return this.namePrimary && this.nameSecondary ? `[${this.namePrimary},${this.nameSecondary}]` : this.namePrimary; - } - getPrimary() { - return new rr(this.namePrimary, { params: this.optionsPrimary && this.optionsPrimary.params || {} }); - } - getSerializedPrimary() { - return this.getPrimary().serialize(); - } - getSecondary() { - return this.nameSecondary ? new rr(this.nameSecondary, { params: this.optionsSecondary && this.optionsSecondary.params || {} }) : null; - } - static from(e) { - return typeof e == "string" ? ss.build(e) : e; - } - static build(e, n, o, u) { - return e ? new ss({ namePrimary: e, nameSecondary: n, optionsPrimary: o, optionsSecondary: u, available: !1 }) : null; - } - } - function fa(r, e, n, o) { - return typeof r == "number" && r >= 0 && r <= 255 && typeof e == "number" && e >= 0 && e <= 255 && typeof n == "number" && n >= 0 && n <= 255 ? o === void 0 || typeof o == "number" && o >= 0 && o <= 1 ? null : `Invalid rgba value [${[r, e, n, o].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(typeof o == "number" ? [r, e, n, o] : [r, e, n]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`; - } - function wo(r) { - if (r === null || typeof r == "string" || typeof r == "boolean" || typeof r == "number" || r instanceof ki || r instanceof nn || r instanceof Dn || r instanceof ss) - return !0; - if (Array.isArray(r)) { - for (const e of r) - if (!wo(e)) - return !1; - return !0; - } - if (typeof r == "object") { - for (const e in r) - if (!wo(r[e])) - return !1; - return !0; - } - return !1; - } - function vn(r) { - if (r === null) - return ha; - if (typeof r == "string") - return Fi; - if (typeof r == "boolean") - return Li; - if (typeof r == "number") - return Ot; - if (r instanceof ki) - return ms; - if (r instanceof nn) - return _s; - if (r instanceof Dn) - return Js; - if (r instanceof ss) - return Ho; - if (Array.isArray(r)) { - const e = r.length; - let n; - for (const o of r) { - const u = vn(o); - if (n) { - if (n === u) - continue; - n = Pi; - break; - } - n = u; - } - return Ss(n || Pi, e); - } - return bo; - } - function Ir(r) { - const e = typeof r; - return r === null ? "" : e === "string" || e === "number" || e === "boolean" ? String(r) : r instanceof ki ? r.toStringPremultipliedAlpha() : r instanceof Dn || r instanceof ss ? r.toString() : JSON.stringify(r); - } - class Lr { - constructor(e, n) { - this.type = e, this.value = n; - } - static parse(e, n) { - if (e.length !== 2) - return n.error(`'literal' expression requires exactly one argument, but found ${e.length - 1} instead.`); - if (!wo(e[1])) - return n.error("invalid value"); - const o = e[1]; - let u = vn(o); - const l = n.expectedType; - return u.kind !== "array" || u.N !== 0 || !l || l.kind !== "array" || typeof l.N == "number" && l.N !== 0 || (u = l), new Lr(u, o); - } - evaluate() { - return this.value; - } - eachChild() { - } - outputDefined() { - return !0; - } - serialize() { - return this.type.kind === "array" || this.type.kind === "object" ? ["literal", this.value] : this.value instanceof ki ? ["rgba"].concat(this.value.toRenderColor(null).toArray()) : this.value instanceof Dn ? this.value.serialize() : this.value; - } - } - class qn { - constructor(e) { - this.name = "ExpressionEvaluationError", this.message = e; - } - toJSON() { - return this.message; - } - } - const pa = { string: Fi, number: Ot, boolean: Li, object: bo }; - class zr { - constructor(e, n) { - this.type = e, this.args = n; - } - static parse(e, n) { - if (e.length < 2) - return n.error("Expected at least one argument."); - let o, u = 1; - const l = e[0]; - if (l === "array") { - let v, S; - if (e.length > 2) { - const D = e[1]; - if (typeof D != "string" || !(D in pa) || D === "object") - return n.error('The item type argument of "array" must be one of string, number, boolean', 1); - v = pa[D], u++; - } else - v = Pi; - if (e.length > 3) { - if (e[2] !== null && (typeof e[2] != "number" || e[2] < 0 || e[2] !== Math.floor(e[2]))) - return n.error('The length argument to "array" must be a positive integer literal', 2); - S = e[2], u++; - } - o = Ss(v, S); - } else - o = pa[l]; - const f = []; - for (; u < e.length; u++) { - const v = n.parse(e[u], u, Pi); - if (!v) - return null; - f.push(v); - } - return new zr(o, f); - } - evaluate(e) { - for (let n = 0; n < this.args.length; n++) { - const o = this.args[n].evaluate(e); - if (!ua(this.type, vn(o))) - return o; - if (n === this.args.length - 1) - throw new qn(`The expression ${JSON.stringify(this.args[n].serialize())} evaluated to ${un(vn(o))} but was expected to be of type ${un(this.type)}.`); - } - return null; - } - eachChild(e) { - this.args.forEach(e); - } - outputDefined() { - return this.args.every((e) => e.outputDefined()); - } - serialize() { - const e = this.type, n = [e.kind]; - if (e.kind === "array") { - const o = e.itemType; - if (o.kind === "string" || o.kind === "number" || o.kind === "boolean") { - n.push(o.kind); - const u = e.N; - (typeof u == "number" || this.args.length > 1) && n.push(u); - } - } - return n.concat(this.args.map((o) => o.serialize())); - } - } - class Es { - constructor(e) { - this.type = Js, this.sections = e; - } - static parse(e, n) { - if (e.length < 2) - return n.error("Expected at least one argument."); - const o = e[1]; - if (!Array.isArray(o) && typeof o == "object") - return n.error("First argument must be an image or text section."); - const u = []; - let l = !1; - for (let f = 1; f <= e.length - 1; ++f) { - const v = e[f]; - if (l && typeof v == "object" && !Array.isArray(v)) { - l = !1; - let S = null; - if (v["font-scale"] && (S = n.parseObjectValue(v["font-scale"], f, "font-scale", Ot), !S)) - return null; - let D = null; - if (v["text-font"] && (D = n.parseObjectValue(v["text-font"], f, "text-font", Ss(Fi)), !D)) - return null; - let x = null; - if (v["text-color"] && (x = n.parseObjectValue(v["text-color"], f, "text-color", ms), !x)) - return null; - const P = u[u.length - 1]; - P.scale = S, P.font = D, P.textColor = x; - } else { - const S = n.parse(e[f], f, Pi); - if (!S) - return null; - const D = S.type.kind; - if (D !== "string" && D !== "value" && D !== "null" && D !== "resolvedImage") - return n.error("Formatted text type must be 'string', 'value', 'image' or 'null'."); - l = !0, u.push({ content: S, scale: null, font: null, textColor: null }); - } - } - return new Es(u); - } - evaluate(e) { - return new Dn(this.sections.map((n) => { - const o = n.content.evaluate(e); - return vn(o) === Ho ? new dl("", o, null, null, null) : new dl(Ir(o), null, n.scale ? n.scale.evaluate(e) : null, n.font ? n.font.evaluate(e).join(",") : null, n.textColor ? n.textColor.evaluate(e) : null); - })); - } - eachChild(e) { - for (const n of this.sections) - e(n.content), n.scale && e(n.scale), n.font && e(n.font), n.textColor && e(n.textColor); - } - outputDefined() { - return !1; - } - serialize() { - const e = ["format"]; - for (const n of this.sections) { - e.push(n.content.serialize()); - const o = {}; - n.scale && (o["font-scale"] = n.scale.serialize()), n.font && (o["text-font"] = n.font.serialize()), n.textColor && (o["text-color"] = n.textColor.serialize()), e.push(o); - } - return e; - } - } - class Oa { - constructor(e, n, o, u) { - this._imageWarnHistory = {}, this.type = Ho, this.inputPrimary = e, this.inputSecondary = n, this.inputPrimaryParams = o, this.inputSecondaryParams = u; - } - static parse(e, n) { - if (e.length < 2) - return n.error("Expected two or more arguments."); - let o = 1; - const u = []; - function l() { - if (o < e.length) { - const v = n.parse(e[o], o++, Fi); - return v ? (u.push({ image: v, options: void 0 }), !0) : (n.error(u.length ? "Secondary image variant is not a string." : "No image name provided."), !1); - } - return !0; - } - function f() { - if (o < e.length) { - if ((v = e[o]) === null || typeof v != "object" || Array.isArray(v)) - return !0; - const S = e[o].params, D = n.concat(o); - if (!S) - return o++, !0; - if (typeof S != "object" || S.constructor !== Object) - return D.error('Image options "params" should be an object'), !1; - const x = {}, P = D.concat(void 0, "params"); - for (const I in S) { - if (!I) - return P.error("Image parameter name should be non-empty"), !1; - const M = P.concat(void 0, I).parse(S[I], void 0, ms, void 0, { typeAnnotation: "coerce" }); - if (!M) - return !1; - x[I] = M; - } - return u[u.length - 1].options = x, o++, !0; - } - var v; - return !0; - } - for (let v = 0; v < 2; v++) - if (!l() || !f()) - return; - return new Oa(u[0].image, u[1] ? u[1].image : void 0, u[0].options, u[1] ? u[1].options : void 0); - } - evaluateParams(e, n) { - const o = {}; - if (n) { - for (const u in n) - if (n[u]) - try { - const l = n[u].evaluate(e), f = `Ignoring image parameter "${u}" with semi-transparent color ${l.toString()}`; - if (l.a !== 1) { - this._imageWarnHistory[f] || (console.warn(f), this._imageWarnHistory[f] = !0); - continue; - } - o[u] = l; - } catch { - continue; - } - if (Object.keys(o).length !== 0) - return { params: o }; - } - } - evaluate(e) { - const n = ss.build(this.inputPrimary.evaluate(e), this.inputSecondary ? this.inputSecondary.evaluate(e) : void 0, this.inputPrimaryParams ? this.evaluateParams(e, this.inputPrimaryParams) : void 0, this.inputSecondaryParams ? this.evaluateParams(e, this.inputSecondaryParams) : void 0); - return n && e.availableImages && (n.available = e.availableImages.indexOf(n.namePrimary) > -1, n.nameSecondary && n.available && e.availableImages && (n.available = e.availableImages.indexOf(n.nameSecondary) > -1)), n; - } - eachChild(e) { - if (e(this.inputPrimary), this.inputPrimaryParams) - for (const n in this.inputPrimaryParams) - this.inputPrimaryParams[n] && e(this.inputPrimaryParams[n]); - if (this.inputSecondary && (e(this.inputSecondary), this.inputSecondaryParams)) - for (const n in this.inputSecondaryParams) - this.inputSecondaryParams[n] && e(this.inputSecondaryParams[n]); - } - outputDefined() { - return !1; - } - serializeParams(e) { - const n = {}; - if (e) { - for (const o in e) - e[o] && (n[o] = e[o].serialize()); - return { params: n }; - } - } - serialize() { - const e = ["image", this.inputPrimary.serialize()]; - return this.inputPrimaryParams && e.push(this.serializeParams(this.inputPrimaryParams)), this.inputSecondary && (e.push(this.inputSecondary.serialize()), this.inputSecondaryParams && e.push(this.serializeParams(this.inputSecondaryParams))), e; - } - } - function qo(r) { - return r instanceof Number ? "number" : r instanceof String ? "string" : r instanceof Boolean ? "boolean" : Array.isArray(r) ? "array" : r === null ? "null" : typeof r; - } - const Wo = { "to-boolean": Li, "to-color": ms, "to-number": Ot, "to-string": Fi }; - class so { - constructor(e, n) { - this.type = e, this.args = n; - } - static parse(e, n) { - if (e.length < 2) - return n.error("Expected at least one argument."); - const o = e[0], u = []; - let l = ha; - if (o === "to-array") { - if (!Array.isArray(e[1])) - return null; - const f = e[1].length; - if (n.expectedType) { - if (n.expectedType.kind !== "array") - return n.error(`Expected ${n.expectedType.kind} but found array.`); - l = Ss(n.expectedType.itemType, f); - } else { - if (!(f > 0 && wo(e[1][0]))) - return null; - l = Ss(vn(e[1][0]), f); - } - for (let v = 0; v < f; v++) { - const S = e[1][v]; - let D; - if (qo(S) === "array") - D = n.parse(S, void 0, l.itemType); - else { - const x = qo(S); - if (x !== l.itemType.kind) - return n.error(`Expected ${l.itemType.kind} but found ${x}.`); - D = n.registry.literal.parse(["literal", S === void 0 ? null : S], n); - } - if (!D) - return null; - u.push(D); - } - } else { - if ((o === "to-boolean" || o === "to-string") && e.length !== 2) - return n.error("Expected one argument."); - l = Wo[o]; - for (let f = 1; f < e.length; f++) { - const v = n.parse(e[f], f, Pi); - if (!v) - return null; - u.push(v); - } - } - return new so(l, u); - } - evaluate(e) { - if (this.type.kind === "boolean") - return !!this.args[0].evaluate(e); - if (this.type.kind === "color") { - let n, o; - for (const u of this.args) { - if (n = u.evaluate(e), o = null, n instanceof ki) - return n; - if (typeof n == "string") { - const l = e.parseColor(n); - if (l) - return l; - } else if (Array.isArray(n) && (o = n.length < 3 || n.length > 4 ? `Invalid rbga value ${JSON.stringify(n)}: expected an array containing either three or four numeric values.` : fa(n[0], n[1], n[2], n[3]), !o)) - return new ki(n[0] / 255, n[1] / 255, n[2] / 255, n[3]); - } - throw new qn(o || `Could not parse color from value '${typeof n == "string" ? n : String(JSON.stringify(n))}'`); - } - if (this.type.kind === "number") { - let n = null; - for (const o of this.args) { - if (n = o.evaluate(e), n === null) - return 0; - const u = Number(n); - if (!isNaN(u)) - return u; - } - throw new qn(`Could not convert ${JSON.stringify(n)} to number.`); - } - return this.type.kind === "formatted" ? Dn.fromString(Ir(this.args[0].evaluate(e))) : this.type.kind === "resolvedImage" ? ss.build(Ir(this.args[0].evaluate(e))) : this.type.kind === "array" ? this.args.map((n) => n.evaluate(e)) : Ir(this.args[0].evaluate(e)); - } - eachChild(e) { - this.args.forEach(e); - } - outputDefined() { - return this.args.every((e) => e.outputDefined()); - } - serialize() { - if (this.type.kind === "formatted") - return new Es([{ content: this.args[0], scale: null, font: null, textColor: null }]).serialize(); - if (this.type.kind === "resolvedImage") - return new Oa(this.args[0]).serialize(); - const e = this.type.kind === "array" ? [] : [`to-${this.type.kind}`]; - return this.eachChild((n) => { - e.push(n.serialize()); - }), e; - } - } - const Nc = ["Unknown", "Point", "LineString", "Polygon"]; - class Fa { - constructor(e, n) { - this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null, this.featureTileCoord = null, this.featureDistanceData = null, this.scope = e, this.options = n; - } - id() { - return this.feature && this.feature.id !== void 0 ? this.feature.id : null; - } - geometryType() { - return this.feature ? typeof this.feature.type == "number" ? Nc[this.feature.type] : this.feature.type : null; - } - geometry() { - return this.feature && "geometry" in this.feature ? this.feature.geometry : null; - } - canonicalID() { - return this.canonical; - } - properties() { - return this.feature && this.feature.properties || {}; - } - measureLight(e) { - return this.globals.brightness || 0; - } - distanceFromCenter() { - if (this.featureTileCoord && this.featureDistanceData) { - const e = this.featureDistanceData.center, n = this.featureDistanceData.scale, { x: o, y: u } = this.featureTileCoord; - return this.featureDistanceData.bearing[0] * (o * n - e[0]) + this.featureDistanceData.bearing[1] * (u * n - e[1]); - } - return 0; - } - parseColor(e) { - let n = this._parseColorCache[e]; - return n || (n = this._parseColorCache[e] = ki.parse(e)), n; - } - getConfig(e) { - return this.options ? this.options.get(e) : null; - } - } - class or { - constructor(e, n, o, u, l) { - this.name = e, this.type = n, this._evaluate = o, this.args = u, this._overloadIndex = l; - } - evaluate(e) { - if (!this._evaluate) { - const n = or.definitions[this.name]; - this._evaluate = Array.isArray(n) ? n[2] : n.overloads[this._overloadIndex][1]; - } - return this._evaluate(e, this.args); - } - eachChild(e) { - this.args.forEach(e); - } - outputDefined() { - return !1; - } - serialize() { - return [this.name].concat(this.args.map((e) => e.serialize())); - } - static parse(e, n) { - const o = e[0], u = or.definitions[o]; - if (!u) - return n.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`, 0); - const l = Array.isArray(u) ? u[0] : u.type, f = Array.isArray(u) ? [[u[1], u[2]]] : u.overloads, v = []; - let S = null, D = -1; - for (const [x, P] of f) { - if (Array.isArray(x) && x.length !== e.length - 1) - continue; - v.push(x), D++, S = new Qr(n.registry, n.path, null, n.scope, void 0, n._scope, n.options); - const I = []; - let M = !1; - for (let C = 1; C < e.length; C++) { - const k = e[C], V = Array.isArray(x) ? x[C - 1] : x.type, U = S.parse(k, 1 + I.length, V); - if (!U) { - M = !0; - break; - } - I.push(U); - } - if (!M) - if (Array.isArray(x) && x.length !== I.length) - S.error(`Expected ${x.length} arguments, but found ${I.length} instead.`); - else { - for (let C = 0; C < I.length; C++) { - const k = Array.isArray(x) ? x[C] : x.type, V = I[C]; - S.concat(C + 1).checkSubtype(k, V.type); - } - if (S.errors.length === 0) - return new or(o, l, P, I, D); - } - } - if (v.length === 1) - n.errors.push(...S.errors); - else { - const x = (v.length ? v : f.map(([I]) => I)).map(fl).join(" | "), P = []; - for (let I = 1; I < e.length; I++) { - const M = n.parse(e[I], 1 + P.length); - if (!M) - return null; - P.push(un(M.type)); - } - n.error(`Expected arguments of type ${x}, but found (${P.join(", ")}) instead.`); - } - return null; - } - static register(e, n) { - or.definitions = n; - for (const o in n) - e[o] = or; - } - } - function fl(r) { - return Array.isArray(r) ? `(${r.map(un).join(", ")})` : `(${un(r.type)}...)`; - } - class pl { - constructor(e, n, o) { - this.type = _s, this.locale = o, this.caseSensitive = e, this.diacriticSensitive = n; - } - static parse(e, n) { - if (e.length !== 2) - return n.error("Expected one argument."); - const o = e[1]; - if (typeof o != "object" || Array.isArray(o)) - return n.error("Collator options argument must be an object."); - const u = o["case-sensitive"] === void 0 ? n.parse(!1, 1, Li) : n.parseObjectValue(o["case-sensitive"], 1, "case-sensitive", Li); - if (!u) - return null; - const l = o["diacritic-sensitive"] === void 0 ? n.parse(!1, 1, Li) : n.parseObjectValue(o["diacritic-sensitive"], 1, "diacritic-sensitive", Li); - if (!l) - return null; - let f = null; - return o.locale && (f = n.parseObjectValue(o.locale, 1, "locale", Fi), !f) ? null : new pl(u, l, f); - } - evaluate(e) { - return new nn(this.caseSensitive.evaluate(e), this.diacriticSensitive.evaluate(e), this.locale ? this.locale.evaluate(e) : null); - } - eachChild(e) { - e(this.caseSensitive), e(this.diacriticSensitive), this.locale && e(this.locale); - } - outputDefined() { - return !1; - } - serialize() { - const e = {}; - return e["case-sensitive"] = this.caseSensitive.serialize(), e["diacritic-sensitive"] = this.diacriticSensitive.serialize(), this.locale && (e.locale = this.locale.serialize()), ["collator", e]; - } - } - function Nh(r, e, n = 0, o = r.length - 1, u = Vc) { - for (; o > n; ) { - if (o - n > 600) { - const S = o - n + 1, D = e - n + 1, x = Math.log(S), P = 0.5 * Math.exp(2 * x / 3), I = 0.5 * Math.sqrt(x * P * (S - P) / S) * (D - S / 2 < 0 ? -1 : 1); - Nh(r, e, Math.max(n, Math.floor(e - D * P / S + I)), Math.min(o, Math.floor(e + (S - D) * P / S + I)), u); - } - const l = r[e]; - let f = n, v = o; - for (ml(r, n, e), u(r[o], l) > 0 && ml(r, n, o); f < v; ) { - for (ml(r, f, v), f++, v--; u(r[f], l) < 0; ) - f++; - for (; u(r[v], l) > 0; ) - v--; - } - u(r[n], l) === 0 ? ml(r, n, v) : (v++, ml(r, v, o)), v <= e && (n = v + 1), e <= v && (o = v - 1); - } - } - function ml(r, e, n) { - const o = r[e]; - r[e] = r[n], r[n] = o; - } - function Vc(r, e) { - return r < e ? -1 : r > e ? 1 : 0; - } - function Qu(r) { - let e = 0; - for (let n, o, u = 0, l = r.length, f = l - 1; u < l; f = u++) - n = r[u], o = r[f], e += (o.x - n.x) * (n.y + o.y); - return e; - } - function Ba(r, e) { - r[0] = Math.min(r[0], e[0]), r[1] = Math.min(r[1], e[1]), r[2] = Math.max(r[2], e[0]), r[3] = Math.max(r[3], e[1]); - } - function Na(r, e) { - return !(r[0] <= e[0] || r[2] >= e[2] || r[1] <= e[1] || r[3] >= e[3]); - } - function _l(r, e, n) { - const o = r[0] - e[0], u = r[1] - e[1], l = r[0] - n[0], f = r[1] - n[1]; - return o * f - l * u == 0 && o * l <= 0 && u * f <= 0; - } - function Ds(r, e, n = !1) { - let o = !1; - for (let v = 0, S = e.length; v < S; v++) { - const D = e[v]; - for (let x = 0, P = D.length, I = P - 1; x < P; I = x++) { - const M = D[I], C = D[x]; - if (_l(r, M, C)) - return n; - (l = M)[1] > (u = r)[1] != (f = C)[1] > u[1] && u[0] < (f[0] - l[0]) * (u[1] - l[1]) / (f[1] - l[1]) + l[0] && (o = !o); - } - } - var u, l, f; - return o; - } - function Vh(r, e, n, o) { - const u = o[0] - n[0], l = o[1] - n[1], f = (r[0] - n[0]) * l - u * (r[1] - n[1]), v = (e[0] - n[0]) * l - u * (e[1] - n[1]); - return f > 0 && v < 0 || f < 0 && v > 0; - } - function $o(r, e, n, o) { - return (u = [o[0] - n[0], o[1] - n[1]])[0] * (l = [e[0] - r[0], e[1] - r[1]])[1] - u[1] * l[0] != 0 && !(!Vh(r, e, n, o) || !Vh(n, o, r, e)); - var u, l; - } - const rs = 8192; - function Uh(r, e) { - const n = (180 + r[0]) / 360, o = (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r[1] * Math.PI / 360))) / 360, u = Math.pow(2, e.z); - return [Math.round(n * u * rs), Math.round(o * u * rs)]; - } - function jh(r, e) { - for (let n = 0; n < e.length; n++) - if (Ds(r, e[n])) - return !0; - return !1; - } - function ed(r, e, n) { - for (const o of n) - for (let u = 0, l = o.length, f = l - 1; u < l; f = u++) - if ($o(r, e, o[f], o[u])) - return !0; - return !1; - } - function Hl(r, e) { - for (let n = 0; n < r.length; ++n) - if (!Ds(r[n], e)) - return !1; - for (let n = 0; n < r.length - 1; ++n) - if (ed(r[n], r[n + 1], e)) - return !1; - return !0; - } - function Xo(r, e) { - for (let n = 0; n < e.length; n++) - if (Hl(r, e[n])) - return !0; - return !1; - } - function bi(r, e, n) { - const o = []; - for (let u = 0; u < r.length; u++) { - const l = []; - for (let f = 0; f < r[u].length; f++) { - const v = Uh(r[u][f], n); - Ba(e, v), l.push(v); - } - o.push(l); - } - return o; - } - function Wt(r, e, n) { - const o = []; - for (let u = 0; u < r.length; u++) { - const l = bi(r[u], e, n); - o.push(l); - } - return o; - } - function gl(r, e, n, o) { - if (r[0] < n[0] || r[0] > n[2]) { - const u = 0.5 * o; - let l = r[0] - n[0] > u ? -o : n[0] - r[0] > u ? o : 0; - l === 0 && (l = r[0] - n[2] > u ? -o : n[2] - r[0] > u ? o : 0), r[0] += l; - } - Ba(e, r); - } - function ci(r, e, n, o) { - const u = Math.pow(2, o.z) * rs, l = [o.x * rs, o.y * rs], f = []; - if (!r) - return f; - for (const v of r) - for (const S of v) { - const D = [S.x + l[0], S.y + l[1]]; - gl(D, e, n, u), f.push(D); - } - return f; - } - function ar(r, e, n, o) { - const u = Math.pow(2, o.z) * rs, l = [o.x * rs, o.y * rs], f = []; - if (!r) - return f; - for (const S of r) { - const D = []; - for (const x of S) { - const P = [x.x + l[0], x.y + l[1]]; - Ba(e, P), D.push(P); - } - f.push(D); - } - if (e[2] - e[0] <= u / 2) { - (v = e)[0] = v[1] = 1 / 0, v[2] = v[3] = -1 / 0; - for (const S of f) - for (const D of S) - gl(D, e, n, u); - } - var v; - return f; - } - class lr { - constructor(e, n) { - this.type = Li, this.geojson = e, this.geometries = n; - } - static parse(e, n) { - if (e.length !== 2) - return n.error(`'within' expression requires exactly one argument, but found ${e.length - 1} instead.`); - if (wo(e[1])) { - const o = e[1]; - if (o.type === "FeatureCollection") - for (let u = 0; u < o.features.length; ++u) { - const l = o.features[u].geometry.type; - if (l === "Polygon" || l === "MultiPolygon") - return new lr(o, o.features[u].geometry); - } - else if (o.type === "Feature") { - const u = o.geometry.type; - if (u === "Polygon" || u === "MultiPolygon") - return new lr(o, o.geometry); - } else if (o.type === "Polygon" || o.type === "MultiPolygon") - return new lr(o, o); - } - return n.error("'within' expression requires valid geojson object that contains polygon geometry type."); - } - evaluate(e) { - if (e.geometry() != null && e.canonicalID() != null) { - if (e.geometryType() === "Point") - return function(n, o) { - const u = [1 / 0, 1 / 0, -1 / 0, -1 / 0], l = [1 / 0, 1 / 0, -1 / 0, -1 / 0], f = n.canonicalID(); - if (!f) - return !1; - if (o.type === "Polygon") { - const v = bi(o.coordinates, l, f), S = ci(n.geometry(), u, l, f); - if (!Na(u, l)) - return !1; - for (const D of S) - if (!Ds(D, v)) - return !1; - } - if (o.type === "MultiPolygon") { - const v = Wt(o.coordinates, l, f), S = ci(n.geometry(), u, l, f); - if (!Na(u, l)) - return !1; - for (const D of S) - if (!jh(D, v)) - return !1; - } - return !0; - }(e, this.geometries); - if (e.geometryType() === "LineString") - return function(n, o) { - const u = [1 / 0, 1 / 0, -1 / 0, -1 / 0], l = [1 / 0, 1 / 0, -1 / 0, -1 / 0], f = n.canonicalID(); - if (!f) - return !1; - if (o.type === "Polygon") { - const v = bi(o.coordinates, l, f), S = ar(n.geometry(), u, l, f); - if (!Na(u, l)) - return !1; - for (const D of S) - if (!Hl(D, v)) - return !1; - } - if (o.type === "MultiPolygon") { - const v = Wt(o.coordinates, l, f), S = ar(n.geometry(), u, l, f); - if (!Na(u, l)) - return !1; - for (const D of S) - if (!Xo(D, v)) - return !1; - } - return !0; - }(e, this.geometries); - } - return !1; - } - eachChild() { - } - outputDefined() { - return !0; - } - serialize() { - return ["within", this.geojson]; - } - } - const ti = { kilometers: 1, miles: 1e3 / 1609.344, nauticalmiles: 1e3 / 1852, meters: 1e3, metres: 1e3, yards: 1e3 / 0.9144, feet: 1e3 / 0.3048, inches: 1e3 / 0.0254 }, Xr = 1 / 298.257223563, ql = Xr * (2 - Xr), Yr = Math.PI / 180; - class Va { - static fromTile(e, n, o) { - const u = Math.PI * (1 - 2 * (e + 0.5) / Math.pow(2, n)), l = Math.atan(0.5 * (Math.exp(u) - Math.exp(-u))) / Yr; - return new Va(l, o); - } - static get units() { - return ti; - } - constructor(e, n) { - if (e === void 0) - throw new Error("No latitude given."); - if (n && !ti[n]) - throw new Error(`Unknown unit ${n}. Use one of: ${Object.keys(ti).join(", ")}`); - const o = 6378.137 * Yr * (n ? ti[n] : 1), u = Math.cos(e * Yr), l = 1 / (1 - ql * (1 - u * u)), f = Math.sqrt(l); - this.kx = o * f * u, this.ky = o * f * l * (1 - ql); - } - distance(e, n) { - const o = ks(e[0] - n[0]) * this.kx, u = (e[1] - n[1]) * this.ky; - return Math.sqrt(o * o + u * u); - } - bearing(e, n) { - const o = ks(n[0] - e[0]) * this.kx; - return Math.atan2(o, (n[1] - e[1]) * this.ky) / Yr; - } - destination(e, n, o) { - const u = o * Yr; - return this.offset(e, Math.sin(u) * n, Math.cos(u) * n); - } - offset(e, n, o) { - return [e[0] + n / this.kx, e[1] + o / this.ky]; - } - lineDistance(e) { - let n = 0; - for (let o = 0; o < e.length - 1; o++) - n += this.distance(e[o], e[o + 1]); - return n; - } - area(e) { - let n = 0; - for (let o = 0; o < e.length; o++) { - const u = e[o]; - for (let l = 0, f = u.length, v = f - 1; l < f; v = l++) - n += ks(u[l][0] - u[v][0]) * (u[l][1] + u[v][1]) * (o ? -1 : 1); - } - return Math.abs(n) / 2 * this.kx * this.ky; - } - along(e, n) { - let o = 0; - if (n <= 0) - return e[0]; - for (let u = 0; u < e.length - 1; u++) { - const l = e[u], f = e[u + 1], v = this.distance(l, f); - if (o += v, o > n) - return bs(l, f, (n - (o - v)) / v); - } - return e[e.length - 1]; - } - pointToSegmentDistance(e, n, o) { - let [u, l] = n, f = ks(o[0] - u) * this.kx, v = (o[1] - l) * this.ky; - if (f !== 0 || v !== 0) { - const S = (ks(e[0] - u) * this.kx * f + (e[1] - l) * this.ky * v) / (f * f + v * v); - S > 1 ? (u = o[0], l = o[1]) : S > 0 && (u += f / this.kx * S, l += v / this.ky * S); - } - return f = ks(e[0] - u) * this.kx, v = (e[1] - l) * this.ky, Math.sqrt(f * f + v * v); - } - pointOnLine(e, n) { - let o = 1 / 0, u = e[0][0], l = e[0][1], f = 0, v = 0; - for (let S = 0; S < e.length - 1; S++) { - let D = e[S][0], x = e[S][1], P = ks(e[S + 1][0] - D) * this.kx, I = (e[S + 1][1] - x) * this.ky, M = 0; - P === 0 && I === 0 || (M = (ks(n[0] - D) * this.kx * P + (n[1] - x) * this.ky * I) / (P * P + I * I), M > 1 ? (D = e[S + 1][0], x = e[S + 1][1]) : M > 0 && (D += P / this.kx * M, x += I / this.ky * M)), P = ks(n[0] - D) * this.kx, I = (n[1] - x) * this.ky; - const C = P * P + I * I; - C < o && (o = C, u = D, l = x, f = S, v = M); - } - return { point: [u, l], index: f, t: Math.max(0, Math.min(1, v)) }; - } - lineSlice(e, n, o) { - let u = this.pointOnLine(o, e), l = this.pointOnLine(o, n); - if (u.index > l.index || u.index === l.index && u.t > l.t) { - const D = u; - u = l, l = D; - } - const f = [u.point], v = u.index + 1, S = l.index; - !To(o[v], f[0]) && v <= S && f.push(o[v]); - for (let D = v + 1; D <= S; D++) - f.push(o[D]); - return To(o[S], l.point) || f.push(l.point), f; - } - lineSliceAlong(e, n, o) { - let u = 0; - const l = []; - for (let f = 0; f < o.length - 1; f++) { - const v = o[f], S = o[f + 1], D = this.distance(v, S); - if (u += D, u > e && l.length === 0 && l.push(bs(v, S, (e - (u - D)) / D)), u >= n) - return l.push(bs(v, S, (n - (u - D)) / D)), l; - u > e && l.push(S); - } - return l; - } - bufferPoint(e, n) { - const o = n / this.ky, u = n / this.kx; - return [e[0] - u, e[1] - o, e[0] + u, e[1] + o]; - } - bufferBBox(e, n) { - const o = n / this.ky, u = n / this.kx; - return [e[0] - u, e[1] - o, e[2] + u, e[3] + o]; - } - insideBBox(e, n) { - return ks(e[0] - n[0]) >= 0 && ks(e[0] - n[2]) <= 0 && e[1] >= n[1] && e[1] <= n[3]; - } - } - function To(r, e) { - return r[0] === e[0] && r[1] === e[1]; - } - function bs(r, e, n) { - const o = ks(e[0] - r[0]); - return [r[0] + o * n, r[1] + (e[1] - r[1]) * n]; - } - function ks(r) { - for (; r < -180; ) - r += 360; - for (; r > 180; ) - r -= 360; - return r; - } - class Wl { - constructor(e = [], n = (o, u) => o < u ? -1 : o > u ? 1 : 0) { - if (this.data = e, this.length = this.data.length, this.compare = n, this.length > 0) - for (let o = (this.length >> 1) - 1; o >= 0; o--) - this._down(o); - } - push(e) { - this.data.push(e), this._up(this.length++); - } - pop() { - if (this.length === 0) - return; - const e = this.data[0], n = this.data.pop(); - return --this.length > 0 && (this.data[0] = n, this._down(0)), e; - } - peek() { - return this.data[0]; - } - _up(e) { - const { data: n, compare: o } = this, u = n[e]; - for (; e > 0; ) { - const l = e - 1 >> 1, f = n[l]; - if (o(u, f) >= 0) - break; - n[e] = f, e = l; - } - n[e] = u; - } - _down(e) { - const { data: n, compare: o } = this, u = this.length >> 1, l = n[e]; - for (; e < u; ) { - let f = 1 + (e << 1); - const v = f + 1; - if (v < this.length && o(n[v], n[f]) < 0 && (f = v), o(n[f], l) >= 0) - break; - n[e] = n[f], e = f; - } - n[e] = l; - } - } - var Tt = 8192; - function ma(r, e) { - return e.dist - r.dist; - } - const Mo = 100, gs = 50; - function Gh(r) { - const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - if (e.length !== r.length) - return !1; - for (let n = 0; n < e.length; n++) - if (e[n] !== r[n]) - return !1; - return !0; - } - function Dr(r) { - return r[1] - r[0] + 1; - } - function So(r, e) { - const n = r[1] >= r[0] && r[1] < e; - return n || console.warn("Distance Expression: Index is out of range"), n; - } - function Kr(r, e) { - if (r[0] > r[1]) - return [null, null]; - const n = Dr(r); - if (e) { - if (n === 2) - return [r, null]; - const o = Math.floor(n / 2); - return [[r[0], r[0] + o], [r[0] + o, r[1]]]; - } - { - if (n === 1) - return [r, null]; - const o = Math.floor(n / 2) - 1; - return [[r[0], r[0] + o], [r[0] + o + 1, r[1]]]; - } - } - function Yo(r, e) { - const n = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - if (!So(e, r.length)) - return n; - for (let o = e[0]; o <= e[1]; ++o) - Ba(n, r[o]); - return n; - } - function cr(r) { - const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - for (let n = 0; n < r.length; ++n) - for (let o = 0; o < r[n].length; ++o) - Ba(e, r[n][o]); - return e; - } - function Eo(r, e, n) { - if (Gh(r) || Gh(e)) - return NaN; - let o = 0, u = 0; - return r[2] < e[0] && (o = e[0] - r[2]), r[0] > e[2] && (o = r[0] - e[2]), r[1] > e[3] && (u = r[1] - e[3]), r[3] < e[1] && (u = e[1] - r[3]), n.distance([0, 0], [o, u]); - } - function Zh(r) { - return 360 * r - 180; - } - function Uc(r) { - return 360 / Math.PI * Math.atan(Math.exp((180 - 360 * r) * Math.PI / 180)) - 90; - } - function Ua(r, e) { - const n = Math.pow(2, e.z), o = (r.y / Tt + e.y) / n; - return [Zh((r.x / Tt + e.x) / n), Uc(o)]; - } - function $l(r, e) { - const n = []; - for (let o = 0; o < r.length; ++o) - n.push(Ua(r[o], e)); - return n; - } - function yl(r, e, n) { - const o = n.pointOnLine(e, r).point; - return n.distance(r, o); - } - function _a(r, e, n, o, u) { - const l = n.slice(o[0], o[1] + 1); - let f = 1 / 0; - for (let v = e[0]; v <= e[1]; ++v) - if ((f = Math.min(f, yl(r[v], l, u))) === 0) - return 0; - return f; - } - function ga(r, e, n, o, u) { - const l = Math.min(u.pointToSegmentDistance(r, n, o), u.pointToSegmentDistance(e, n, o)), f = Math.min(u.pointToSegmentDistance(n, r, e), u.pointToSegmentDistance(o, r, e)); - return Math.min(l, f); - } - function Po(r, e, n, o, u) { - if (!So(e, r.length) || !So(o, n.length)) - return NaN; - let l = 1 / 0; - for (let f = e[0]; f < e[1]; ++f) - for (let v = o[0]; v < o[1]; ++v) { - if ($o(r[f], r[f + 1], n[v], n[v + 1])) - return 0; - l = Math.min(l, ga(r[f], r[f + 1], n[v], n[v + 1], u)); - } - return l; - } - function Hh(r, e, n, o, u) { - if (!So(e, r.length) || !So(o, n.length)) - return NaN; - let l = 1 / 0; - for (let f = e[0]; f <= e[1]; ++f) - for (let v = o[0]; v <= o[1]; ++v) - if ((l = Math.min(l, u.distance(r[f], n[v]))) === 0) - return l; - return l; - } - function td(r, e, n) { - if (Ds(r, e, !0)) - return 0; - let o = 1 / 0; - for (const u of e) { - const l = u.length; - if (l < 2) - return console.warn("Distance Expression: Invalid polygon!"), NaN; - if (u[0] !== u[l - 1] && (o = Math.min(o, n.pointToSegmentDistance(r, u[l - 1], u[0]))) === 0 || (o = Math.min(o, yl(r, u, n))) === 0) - return o; - } - return o; - } - function ja(r, e, n, o) { - if (!So(e, r.length)) - return NaN; - for (let l = e[0]; l <= e[1]; ++l) - if (Ds(r[l], n, !0)) - return 0; - let u = 1 / 0; - for (let l = e[0]; l < e[1]; ++l) - for (const f of n) - for (let v = 0, S = f.length, D = S - 1; v < S; D = v++) { - if ($o(r[l], r[l + 1], f[D], f[v])) - return 0; - u = Math.min(u, ga(r[l], r[l + 1], f[D], f[v], o)); - } - return u; - } - function jc(r, e) { - for (const n of r) - for (let o = 0; o <= n.length - 1; ++o) - if (Ds(n[o], e, !0)) - return !0; - return !1; - } - function Gc(r, e, n, o = 1 / 0) { - const u = cr(r), l = cr(e); - if (o !== 1 / 0 && Eo(u, l, n) >= o) - return o; - if (Na(u, l)) { - if (jc(r, e)) - return 0; - } else if (jc(e, r)) - return 0; - let f = o; - for (const v of r) - for (let S = 0, D = v.length, x = D - 1; S < D; x = S++) - for (const P of e) - for (let I = 0, M = P.length, C = M - 1; I < M; C = I++) { - if ($o(v[x], v[S], P[C], P[I])) - return 0; - f = Math.min(f, ga(v[x], v[S], P[C], P[I], n)); - } - return f; - } - function hr(r, e, n, o, u, l, f) { - if (l === null || f === null) - return; - const v = Eo(Yo(o, l), Yo(u, f), n); - v < e && r.push({ dist: v, range1: l, range2: f }); - } - function Zc(r, e, n, o, u = 1 / 0) { - let l = Math.min(o.distance(r[0], n[0][0]), u); - if (l === 0) - return l; - const f = new Wl([{ dist: 0, range1: [0, r.length - 1], range2: [0, 0] }], ma), v = e ? gs : Mo, S = cr(n); - for (; f.length; ) { - const D = f.pop(); - if (D.dist >= l) - continue; - const x = D.range1; - if (Dr(x) <= v) { - if (!So(x, r.length)) - return NaN; - if (e) { - const P = ja(r, x, n, o); - if ((l = Math.min(l, P)) === 0) - return l; - } else - for (let P = x[0]; P <= x[1]; ++P) { - const I = td(r[P], n, o); - if ((l = Math.min(l, I)) === 0) - return l; - } - } else { - const P = Kr(x, e); - if (P[0] !== null) { - const I = Eo(Yo(r, P[0]), S, o); - I < l && f.push({ dist: I, range1: P[0], range2: [0, 0] }); - } - if (P[1] !== null) { - const I = Eo(Yo(r, P[1]), S, o); - I < l && f.push({ dist: I, range1: P[1], range2: [0, 0] }); - } - } - } - return l; - } - function Hc(r, e, n, o, u, l = 1 / 0) { - let f = Math.min(l, u.distance(r[0], n[0])); - if (f === 0) - return f; - const v = new Wl([{ dist: 0, range1: [0, r.length - 1], range2: [0, n.length - 1] }], ma), S = e ? gs : Mo, D = o ? gs : Mo; - for (; v.length; ) { - const x = v.pop(); - if (x.dist >= f) - continue; - const P = x.range1, I = x.range2; - if (Dr(P) <= S && Dr(I) <= D) { - if (!So(P, r.length) || !So(I, n.length)) - return NaN; - if (e && o ? f = Math.min(f, Po(r, P, n, I, u)) : e || o ? e && !o ? f = Math.min(f, _a(n, I, r, P, u)) : !e && o && (f = Math.min(f, _a(r, P, n, I, u))) : f = Math.min(f, Hh(r, P, n, I, u)), f === 0) - return f; - } else { - const M = Kr(P, e), C = Kr(I, o); - hr(v, f, u, r, n, M[0], C[0]), hr(v, f, u, r, n, M[0], C[1]), hr(v, f, u, r, n, M[1], C[0]), hr(v, f, u, r, n, M[1], C[1]); - } - } - return f; - } - function xr(r, e, n, o, u = 1 / 0) { - let l = u; - const f = Yo(r, [0, r.length - 1]); - for (const v of n) - if (!(l !== 1 / 0 && Eo(f, Yo(v, [0, v.length - 1]), o) >= l) && (l = Math.min(l, Hc(r, e, v, !0, o, l)), l === 0)) - return l; - return l; - } - function Ko(r, e, n, o, u = 1 / 0) { - let l = u; - const f = Yo(r, [0, r.length - 1]); - for (const v of n) { - if (l !== 1 / 0 && Eo(f, cr(v), o) >= l) - continue; - const S = Zc(r, e, v, o, l); - if (isNaN(S)) - return S; - if ((l = Math.min(l, S)) === 0) - return l; - } - return l; - } - function Xl(r) { - return r === "Point" || r === "MultiPoint" || r === "LineString" || r === "MultiLineString" || r === "Polygon" || r === "MultiPolygon"; - } - class Jr { - constructor(e, n) { - this.type = Ot, this.geojson = e, this.geometries = n; - } - static parse(e, n) { - if (e.length !== 2) - return n.error(`'distance' expression requires either one argument, but found ' ${e.length - 1} instead.`); - if (wo(e[1])) { - const o = e[1]; - if (o.type === "FeatureCollection") { - for (let u = 0; u < o.features.length; ++u) - if (Xl(o.features[u].geometry.type)) - return new Jr(o, o.features[u].geometry); - } else if (o.type === "Feature") { - if (Xl(o.geometry.type)) - return new Jr(o, o.geometry); - } else if (Xl(o.type)) - return new Jr(o, o); - } - return n.error("'distance' expression needs to be an array with format ['Distance', GeoJSONObj]."); - } - evaluate(e) { - const n = e.geometry(), o = e.canonicalID(); - if (n != null && o != null) { - if (e.geometryType() === "Point") - return function(u, l, f) { - const v = []; - for (const D of u) - for (const x of D) - v.push(Ua(x, l)); - const S = new Va(v[0][1], "meters"); - return f.type === "Point" || f.type === "MultiPoint" || f.type === "LineString" ? Hc(v, !1, f.type === "Point" ? [f.coordinates] : f.coordinates, f.type === "LineString", S) : f.type === "MultiLineString" ? xr(v, !1, f.coordinates, S) : f.type === "Polygon" || f.type === "MultiPolygon" ? Ko(v, !1, f.type === "Polygon" ? [f.coordinates] : f.coordinates, S) : null; - }(n, o, this.geometries); - if (e.geometryType() === "LineString") - return function(u, l, f) { - const v = []; - for (const D of u) { - const x = []; - for (const P of D) - x.push(Ua(P, l)); - v.push(x); - } - const S = new Va(v[0][0][1], "meters"); - if (f.type === "Point" || f.type === "MultiPoint" || f.type === "LineString") - return xr(f.type === "Point" ? [f.coordinates] : f.coordinates, f.type === "LineString", v, S); - if (f.type === "MultiLineString") { - let D = 1 / 0; - for (let x = 0; x < f.coordinates.length; x++) { - const P = xr(f.coordinates[x], !0, v, S, D); - if (isNaN(P)) - return P; - if ((D = Math.min(D, P)) === 0) - return D; - } - return D; - } - if (f.type === "Polygon" || f.type === "MultiPolygon") { - let D = 1 / 0; - for (let x = 0; x < v.length; x++) { - const P = Ko(v[x], !0, f.type === "Polygon" ? [f.coordinates] : f.coordinates, S, D); - if (isNaN(P)) - return P; - if ((D = Math.min(D, P)) === 0) - return D; - } - return D; - } - return null; - }(n, o, this.geometries); - if (e.geometryType() === "Polygon") - return function(u, l, f) { - const v = []; - for (const D of function(x, P) { - const I = x.length; - if (I <= 1) - return [x]; - const M = []; - let C, k; - for (let V = 0; V < I; V++) { - const U = Qu(x[V]); - U !== 0 && (x[V].area = Math.abs(U), k === void 0 && (k = U < 0), k === U < 0 ? (C && M.push(C), C = [x[V]]) : C.push(x[V])); - } - return C && M.push(C), M; - }(u)) { - const x = []; - for (let P = 0; P < D.length; ++P) - x.push($l(D[P], l)); - v.push(x); - } - const S = new Va(v[0][0][0][1], "meters"); - if (f.type === "Point" || f.type === "MultiPoint" || f.type === "LineString") - return Ko(f.type === "Point" ? [f.coordinates] : f.coordinates, f.type === "LineString", v, S); - if (f.type === "MultiLineString") { - let D = 1 / 0; - for (let x = 0; x < f.coordinates.length; x++) { - const P = Ko(f.coordinates[x], !0, v, S, D); - if (isNaN(P)) - return P; - if ((D = Math.min(D, P)) === 0) - return D; - } - return D; - } - return f.type === "Polygon" || f.type === "MultiPolygon" ? function(D, x, P) { - let I = 1 / 0; - for (const M of D) - for (const C of x) { - const k = Gc(M, C, P, I); - if (isNaN(k)) - return k; - if ((I = Math.min(I, k)) === 0) - return I; - } - return I; - }(f.type === "Polygon" ? [f.coordinates] : f.coordinates, v, S) : null; - }(n, o, this.geometries); - console.warn("Distance Expression: currently only evaluates valid Point/LineString/Polygon geometries."); - } else - console.warn("Distance Expression: requirs valid feature and canonical information."); - return null; - } - eachChild() { - } - outputDefined() { - return !0; - } - serialize() { - return ["distance", this.geojson]; - } - } - function Yl(r, e) { - switch (r) { - case "string": - return Ir(e); - case "number": - return +e; - case "boolean": - return !!e; - case "color": - return ki.parse(e); - case "formatted": - return Dn.fromString(Ir(e)); - case "resolvedImage": - return ss.build(Ir(e)); - } - return e; - } - function Kl(r, e, n, o) { - return o !== void 0 && (r = o * Math.round(r / o)), e !== void 0 && r < e && (r = e), n !== void 0 && r > n && (r = n), r; - } - class ya { - constructor(e, n, o) { - this.type = e, this.key = n, this.scope = o; - } - static parse(e, n) { - let o = n.expectedType; - if (o == null && (o = Pi), e.length < 2 || e.length > 3) - return n.error("Invalid number of arguments for 'config' expression."); - const u = n.parse(e[1], 1); - if (!(u instanceof Lr)) - return n.error("Key name of 'config' expression must be a string literal."); - if (e.length >= 3) { - const l = n.parse(e[2], 2); - return l instanceof Lr ? new ya(o, Ir(u.value), Ir(l.value)) : n.error("Scope of 'config' expression must be a string literal."); - } - return new ya(o, Ir(u.value)); - } - evaluate(e) { - const n = [this.key, this.scope, e.scope].filter(Boolean).join(""), o = e.getConfig(n); - if (!o) - return null; - const { type: u, value: l, values: f, minValue: v, maxValue: S, stepValue: D } = o, x = o.default.evaluate(e); - let P = x; - if (l) { - const I = e.scope; - e.scope = (I || "").split("").slice(1).join(""), P = l.evaluate(e), e.scope = I; - } - return u && (P = Yl(u, P)), P === void 0 || v === void 0 && S === void 0 && D === void 0 || (typeof P == "number" ? P = Kl(P, v, S, D) : Array.isArray(P) && (P = P.map((I) => typeof I == "number" ? Kl(I, v, S, D) : I))), l !== void 0 && P !== void 0 && f && !f.includes(P) && (P = x, u && (P = Yl(u, P))), (u && u !== this.type || P !== void 0 && vn(P) !== this.type) && (P = Yl(this.type.kind, P)), P; - } - eachChild() { - } - outputDefined() { - return !1; - } - serialize() { - const e = ["config", this.key]; - return this.scope && e.concat(this.key), e; - } - } - function ro(r) { - if (r instanceof or && (r.name === "get" && r.args.length === 1 || r.name === "feature-state" || r.name === "has" && r.args.length === 1 || r.name === "properties" || r.name === "geometry-type" || r.name === "id" || /^filter-/.test(r.name)) || r instanceof lr || r instanceof Jr) - return !1; - let e = !0; - return r.eachChild((n) => { - e && !ro(n) && (e = !1); - }), e; - } - function xl(r) { - if (r instanceof or && r.name === "feature-state") - return !1; - let e = !0; - return r.eachChild((n) => { - e && !xl(n) && (e = !1); - }), e; - } - function kr(r) { - if (r instanceof ya) - return /* @__PURE__ */ new Set([r.key]); - let e = /* @__PURE__ */ new Set(); - return r.eachChild((n) => { - e = /* @__PURE__ */ new Set([...e, ...kr(n)]); - }), e; - } - function oo(r, e) { - if (r instanceof or && e.indexOf(r.name) >= 0) - return !1; - let n = !0; - return r.eachChild((o) => { - n && !oo(o, e) && (n = !1); - }), n; - } - class Jo { - constructor(e, n) { - this.type = n.type, this.name = e, this.boundExpression = n; - } - static parse(e, n) { - if (e.length !== 2 || typeof e[1] != "string") - return n.error("'var' expression requires exactly one string literal argument."); - const o = e[1]; - return n.scope.has(o) ? new Jo(o, n.scope.get(o)) : n.error(`Unknown variable "${o}". Make sure "${o}" has been bound in an enclosing "let" expression before using it.`, 1); - } - evaluate(e) { - return this.boundExpression.evaluate(e); - } - eachChild() { - } - outputDefined() { - return !1; - } - serialize() { - return ["var", this.name]; - } - } - class Jl { - constructor(e, n = [], o, u = new Cn(), l = [], f, v) { - this.registry = e, this.path = n, this.key = n.map((S) => typeof S == "string" ? `['${S}']` : `[${S}]`).join(""), this.scope = u, this.errors = l, this.expectedType = o, this._scope = f, this.options = v; - } - parse(e, n, o, u, l = {}) { - return n || o ? this.concat(n, null, o, u)._parse(e, l) : this._parse(e, l); - } - parseObjectValue(e, n, o, u, l, f = {}) { - return this.concat(n, o, u, l)._parse(e, f); - } - _parse(e, n) { - function o(u, l, f) { - return f === "assert" ? new zr(l, [u]) : f === "coerce" ? new so(l, [u]) : u; - } - if (e !== null && typeof e != "string" && typeof e != "boolean" && typeof e != "number" || (e = ["literal", e]), Array.isArray(e)) { - if (e.length === 0) - return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].'); - const u = typeof e[0] == "string" ? this.registry[e[0]] : void 0; - if (u) { - let l = u.parse(e, this); - if (!l) - return null; - if (this.expectedType) { - const f = this.expectedType, v = l.type; - if (f.kind !== "string" && f.kind !== "number" && f.kind !== "boolean" && f.kind !== "object" && f.kind !== "array" || v.kind !== "value") - if (f.kind !== "color" && f.kind !== "formatted" && f.kind !== "resolvedImage" || v.kind !== "value" && v.kind !== "string") { - if (this.checkSubtype(f, v)) - return null; - } else - l = o(l, f, n.typeAnnotation || "coerce"); - else - l = o(l, f, n.typeAnnotation || "assert"); - } - if (!(l instanceof Lr) && l.type.kind !== "resolvedImage" && vl(l)) { - const f = new Fa(this._scope, this.options); - try { - l = new Lr(l.type, l.evaluate(f)); - } catch (v) { - return this.error(v.message), null; - } - } - return l; - } - return so.parse(["to-array", e], this); - } - return this.error(e === void 0 ? "'undefined' value invalid. Use null instead." : typeof e == "object" ? 'Bare objects invalid. Use ["literal", {...}] instead.' : `Expected an array, but found ${typeof e} instead.`); - } - concat(e, n, o, u) { - let l = typeof e == "number" ? this.path.concat(e) : this.path; - l = typeof n == "string" ? l.concat(n) : l; - const f = u ? this.scope.concat(u) : this.scope; - return new Jl(this.registry, l, o || null, f, this.errors, this._scope, this.options); - } - error(e, ...n) { - const o = `${this.key}${n.map((u) => `[${u}]`).join("")}`; - this.errors.push(new ns(o, e)); - } - checkSubtype(e, n) { - const o = ua(e, n); - return o && this.error(o), o; - } - } - var Qr = Jl; - function vl(r) { - if (r instanceof Jo) - return vl(r.boundExpression); - if (r instanceof or && r.name === "error" || r instanceof pl || r instanceof lr || r instanceof Jr || r instanceof ya) - return !1; - const e = r instanceof so || r instanceof zr; - let n = !0; - return r.eachChild((o) => { - n = e ? n && vl(o) : n && o instanceof Lr; - }), !!n && ro(r) && oo(r, ["zoom", "heatmap-density", "line-progress", "raster-value", "sky-radial-progress", "accumulated", "is-supported-script", "pitch", "distance-from-center", "measure-light", "raster-particle-speed"]); - } - function ao(r, e) { - const n = r.length - 1; - let o, u, l = 0, f = n, v = 0; - for (; l <= f; ) - if (v = Math.floor((l + f) / 2), o = r[v], u = r[v + 1], o <= e) { - if (v === n || e < u) - return v; - l = v + 1; - } else { - if (!(o > e)) - throw new qn("Input is not a number."); - f = v - 1; - } - return 0; - } - class Ti { - constructor(e, n, o) { - this.type = e, this.input = n, this.labels = [], this.outputs = []; - for (const [u, l] of o) - this.labels.push(u), this.outputs.push(l); - } - static parse(e, n) { - if (e.length - 1 < 4) - return n.error(`Expected at least 4 arguments, but found only ${e.length - 1}.`); - if ((e.length - 1) % 2 != 0) - return n.error("Expected an even number of arguments."); - const o = n.parse(e[1], 1, Ot); - if (!o) - return null; - const u = []; - let l = null; - n.expectedType && n.expectedType.kind !== "value" && (l = n.expectedType); - for (let f = 1; f < e.length; f += 2) { - const v = f === 1 ? -1 / 0 : e[f], S = e[f + 1], D = f, x = f + 1; - if (typeof v != "number") - return n.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.', D); - if (u.length && u[u.length - 1][0] >= v) - return n.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.', D); - const P = n.parse(S, x, l); - if (!P) - return null; - l = l || P.type, u.push([v, P]); - } - return new Ti(l, o, u); - } - evaluate(e) { - const n = this.labels, o = this.outputs; - if (n.length === 1) - return o[0].evaluate(e); - const u = this.input.evaluate(e); - if (u <= n[0]) - return o[0].evaluate(e); - const l = n.length; - return u >= n[l - 1] ? o[l - 1].evaluate(e) : o[ao(n, u)].evaluate(e); - } - eachChild(e) { - e(this.input); - for (const n of this.outputs) - e(n); - } - outputDefined() { - return this.outputs.every((e) => e.outputDefined()); - } - serialize() { - const e = ["step", this.input.serialize()]; - for (let n = 0; n < this.labels.length; n++) - n > 0 && e.push(this.labels[n]), e.push(this.outputs[n].serialize()); - return e; - } - } - const qh = 0.95047, bl = 1.08883, Ga = 4 / 29, Qo = 6 / 29, qc = 3 * Qo * Qo, gn = Qo * Qo * Qo, Wh = Math.PI / 180, $h = 180 / Math.PI; - function Ql(r) { - return r > gn ? Math.pow(r, 1 / 3) : r / qc + Ga; - } - function ec(r) { - return r > Qo ? r * r * r : qc * (r - Ga); - } - function tc(r) { - return 255 * (r <= 31308e-7 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055); - } - function Wc(r) { - return (r /= 255) <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4); - } - function $c(r) { - const e = Wc(r.r), n = Wc(r.g), o = Wc(r.b), u = Ql((0.4124564 * e + 0.3575761 * n + 0.1804375 * o) / qh), l = Ql((0.2126729 * e + 0.7151522 * n + 0.072175 * o) / 1); - return { l: 116 * l - 16, a: 500 * (u - l), b: 200 * (l - Ql((0.0193339 * e + 0.119192 * n + 0.9503041 * o) / bl)), alpha: r.a }; - } - function Xc(r) { - let e = (r.l + 16) / 116, n = isNaN(r.a) ? e : e + r.a / 500, o = isNaN(r.b) ? e : e - r.b / 200; - return e = 1 * ec(e), n = qh * ec(n), o = bl * ec(o), new ki(tc(3.2404542 * n - 1.5371385 * e - 0.4985314 * o), tc(-0.969266 * n + 1.8760108 * e + 0.041556 * o), tc(0.0556434 * n - 0.2040259 * e + 1.0572252 * o), r.alpha); - } - function id(r, e, n) { - const o = e - r; - return r + n * (o > 180 || o < -180 ? o - 360 * Math.round(o / 360) : o); - } - const p = { forward: $c, reverse: Xc, interpolate: function(r, e, n) { - return { l: ei(r.l, e.l, n), a: ei(r.a, e.a, n), b: ei(r.b, e.b, n), alpha: ei(r.alpha, e.alpha, n) }; - } }, A = { forward: function(r) { - const { l: e, a: n, b: o } = $c(r), u = Math.atan2(o, n) * $h; - return { h: u < 0 ? u + 360 : u, c: Math.sqrt(n * n + o * o), l: e, alpha: r.a }; - }, reverse: function(r) { - const e = r.h * Wh, n = r.c; - return Xc({ l: r.l, a: Math.cos(e) * n, b: Math.sin(e) * n, alpha: r.alpha }); - }, interpolate: function(r, e, n) { - return { h: id(r.h, e.h, n), c: ei(r.c, e.c, n), l: ei(r.l, e.l, n), alpha: ei(r.alpha, e.alpha, n) }; - } }; - var B = Object.freeze({ __proto__: null, hcl: A, lab: p }); - class X { - constructor(e, n, o, u, l, f) { - this.type = e, this.operator = n, this.interpolation = o, this.input = u, this.dynamicStops = l, this.labels = [], this.outputs = []; - for (const [v, S] of f) - this.labels.push(v), this.outputs.push(S); - } - static interpolationFactor(e, n, o, u) { - let l = 0; - if (e.name === "exponential") - l = ne(n, e.base, o, u); - else if (e.name === "linear") - l = ne(n, 1, o, u); - else if (e.name === "cubic-bezier") { - const f = e.controlPoints; - l = new Us(f[0], f[1], f[2], f[3]).solve(ne(n, 1, o, u)); - } - return l; - } - static parse(e, n) { - let [o, u, l, ...f] = e; - if (!Array.isArray(u) || u.length === 0) - return n.error("Expected an interpolation type expression.", 1); - if (u[0] === "linear") - u = { name: "linear" }; - else if (u[0] === "exponential") { - const D = u[1]; - if (typeof D != "number") - return n.error("Exponential interpolation requires a numeric base.", 1, 1); - u = { name: "exponential", base: D }; - } else { - if (u[0] !== "cubic-bezier") - return n.error(`Unknown interpolation type ${String(u[0])}`, 1, 0); - { - const D = u.slice(1); - if (D.length !== 4 || D.some((x) => typeof x != "number" || x < 0 || x > 1)) - return n.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.", 1); - u = { name: "cubic-bezier", controlPoints: D }; - } - } - if (e.length - 1 < 3) - return n.error(`Expected at least 3 arguments, but found only ${e.length - 1}.`); - if (e.length - 1 > 3 && (e.length - 1) % 2 != 0) - return n.error("Expected an even number of arguments."); - if (l = n.parse(l, 2, Ot), !l) - return null; - const v = []; - let S = null; - if (o === "interpolate-hcl" || o === "interpolate-lab" ? S = ms : n.expectedType && n.expectedType.kind !== "value" && (S = n.expectedType), e.length - 1 == 3) { - const D = n.parse(f[0], 3, Pi); - return D ? new X(S, o, u, l, D, v) : null; - } - for (let D = 0; D < f.length; D += 2) { - const x = f[D], P = f[D + 1], I = D + 3, M = D + 4; - if (typeof x != "number") - return n.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', I); - if (v.length && v[v.length - 1][0] >= x) - return n.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', I); - const C = n.parse(P, M, S); - if (!C) - return null; - S = S || C.type, v.push([x, C]); - } - return S.kind === "number" || S.kind === "color" || S.kind === "array" && S.itemType.kind === "number" && typeof S.N == "number" ? new X(S, o, u, l, null, v) : n.error(`Type ${un(S)} is not interpolatable.`); - } - evaluate(e) { - let n = this.labels, o = this.outputs; - if (this.dynamicStops) { - const x = this.dynamicStops.evaluate(e); - if (x.length % 2 != 0) - throw new qn("Expected an even number of arguments."); - n = [], o = []; - for (let P = 0; P < x.length; P += 2) { - const I = x[P], M = new Lr(Ot, x[P + 1]); - if (typeof I != "number") - throw new qn('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.'); - if (n.length && n[n.length - 1] >= I) - throw new qn('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.'); - n.push(I), o.push(M); - } - if (n.length === 0) - throw new qn("Expected at least one input/output pair."); - } - if (n.length === 1) - return o[0].evaluate(e); - const u = this.input.evaluate(e); - if (u <= n[0]) - return o[0].evaluate(e); - const l = n.length; - if (u >= n[l - 1]) - return o[l - 1].evaluate(e); - const f = ao(n, u), v = X.interpolationFactor(this.interpolation, u, n[f], n[f + 1]), S = o[f].evaluate(e), D = o[f + 1].evaluate(e); - return this.operator === "interpolate" ? Oi[this.type.kind.toLowerCase()](S, D, v) : this.operator === "interpolate-hcl" ? A.reverse(A.interpolate(A.forward(S), A.forward(D), v)) : p.reverse(p.interpolate(p.forward(S), p.forward(D), v)); - } - eachChild(e) { - e(this.input); - for (const n of this.outputs) - e(n); - } - outputDefined() { - return this.outputs.every((e) => e.outputDefined()); - } - serialize() { - let e; - e = this.interpolation.name === "linear" ? ["linear"] : this.interpolation.name === "exponential" ? this.interpolation.base === 1 ? ["linear"] : ["exponential", this.interpolation.base] : ["cubic-bezier"].concat(this.interpolation.controlPoints); - const n = [this.operator, e, this.input.serialize()]; - if (this.dynamicStops) - n.push(this.dynamicStops.serialize()); - else - for (let o = 0; o < this.labels.length; o++) - n.push(this.labels[o], this.outputs[o].serialize()); - return n; - } - } - function ne(r, e, n, o) { - const u = o - n, l = r - n; - return u === 0 ? 0 : e === 1 ? l / u : (Math.pow(e, l) - 1) / (Math.pow(e, u) - 1); - } - class ye { - constructor(e, n) { - this.type = e, this.args = n; - } - static parse(e, n) { - if (e.length < 2) - return n.error("Expectected at least one argument."); - let o = null; - const u = n.expectedType; - u && u.kind !== "value" && (o = u); - const l = []; - for (const v of e.slice(1)) { - const S = n.parse(v, 1 + l.length, o, void 0, { typeAnnotation: "omit" }); - if (!S) - return null; - o = o || S.type, l.push(S); - } - const f = u && l.some((v) => ua(u, v.type)); - return new ye(f ? Pi : o, l); - } - evaluate(e) { - let n, o = null, u = 0; - for (const l of this.args) { - if (u++, o = l.evaluate(e), o && o instanceof ss && !o.available && (n || (n = o), o = null, u === this.args.length)) - return n; - if (o !== null) - break; - } - return o; - } - eachChild(e) { - this.args.forEach(e); - } - outputDefined() { - return this.args.every((e) => e.outputDefined()); - } - serialize() { - const e = ["coalesce"]; - return this.eachChild((n) => { - e.push(n.serialize()); - }), e; - } - } - class We { - constructor(e, n) { - this.type = n.type, this.bindings = [].concat(e), this.result = n; - } - evaluate(e) { - return this.result.evaluate(e); - } - eachChild(e) { - for (const n of this.bindings) - e(n[1]); - e(this.result); - } - static parse(e, n) { - if (e.length < 4) - return n.error(`Expected at least 3 arguments, but found ${e.length - 1} instead.`); - const o = []; - for (let l = 1; l < e.length - 1; l += 2) { - const f = e[l]; - if (typeof f != "string") - return n.error(`Expected string, but found ${typeof f} instead.`, l); - if (/[^a-zA-Z0-9_]/.test(f)) - return n.error("Variable names must contain only alphanumeric characters or '_'.", l); - const v = n.parse(e[l + 1], l + 1); - if (!v) - return null; - o.push([f, v]); - } - const u = n.parse(e[e.length - 1], e.length - 1, n.expectedType, o); - return u ? new We(o, u) : null; - } - outputDefined() { - return this.result.outputDefined(); - } - serialize() { - const e = ["let"]; - for (const [n, o] of this.bindings) - e.push(n, o.serialize()); - return e.push(this.result.serialize()), e; - } - } - class at { - constructor(e, n, o) { - this.type = e, this.index = n, this.input = o; - } - static parse(e, n) { - if (e.length !== 3) - return n.error(`Expected 2 arguments, but found ${e.length - 1} instead.`); - const o = n.parse(e[1], 1, Ot), u = n.parse(e[2], 2, Ss(n.expectedType || Pi)); - return o && u ? new at(u.type.itemType, o, u) : null; - } - evaluate(e) { - const n = this.index.evaluate(e), o = this.input.evaluate(e); - if (n < 0) - throw new qn(`Array index out of bounds: ${n} < 0.`); - if (n > o.length - 1) - throw new qn(`Array index out of bounds: ${n} > ${o.length - 1}.`); - if (n === Math.floor(n)) - return o[n]; - const u = Math.floor(n), l = Math.ceil(n), f = o[u], v = o[l]; - if (typeof f != "number" || typeof v != "number") - throw new qn(`Cannot interpolate between non-number values at index ${n}.`); - const S = n - u; - return f * (1 - S) + v * S; - } - eachChild(e) { - e(this.index), e(this.input); - } - outputDefined() { - return !1; - } - serialize() { - return ["at", this.index.serialize(), this.input.serialize()]; - } - } - class ft { - constructor(e, n) { - this.type = Li, this.needle = e, this.haystack = n; - } - static parse(e, n) { - if (e.length !== 3) - return n.error(`Expected 2 arguments, but found ${e.length - 1} instead.`); - const o = n.parse(e[1], 1, Pi), u = n.parse(e[2], 2, Pi); - return o && u ? Zl(o.type, [Li, Fi, Ot, ha, Pi]) ? new ft(o, u) : n.error(`Expected first argument to be of type boolean, string, number or null, but found ${un(o.type)} instead`) : null; - } - evaluate(e) { - const n = this.needle.evaluate(e), o = this.haystack.evaluate(e); - if (o == null) - return !1; - if (!da(n, ["boolean", "string", "number", "null"])) - throw new qn(`Expected first argument to be of type boolean, string, number or null, but found ${un(vn(n))} instead.`); - if (!da(o, ["string", "array"])) - throw new qn(`Expected second argument to be of type array or string, but found ${un(vn(o))} instead.`); - return o.indexOf(n) >= 0; - } - eachChild(e) { - e(this.needle), e(this.haystack); - } - outputDefined() { - return !0; - } - serialize() { - return ["in", this.needle.serialize(), this.haystack.serialize()]; - } - } - class Rt { - constructor(e, n, o) { - this.type = Ot, this.needle = e, this.haystack = n, this.fromIndex = o; - } - static parse(e, n) { - if (e.length <= 2 || e.length >= 5) - return n.error(`Expected 3 or 4 arguments, but found ${e.length - 1} instead.`); - const o = n.parse(e[1], 1, Pi), u = n.parse(e[2], 2, Pi); - if (!o || !u) - return null; - if (!Zl(o.type, [Li, Fi, Ot, ha, Pi])) - return n.error(`Expected first argument to be of type boolean, string, number or null, but found ${un(o.type)} instead`); - if (e.length === 4) { - const l = n.parse(e[3], 3, Ot); - return l ? new Rt(o, u, l) : null; - } - return new Rt(o, u); - } - evaluate(e) { - const n = this.needle.evaluate(e), o = this.haystack.evaluate(e); - if (!da(n, ["boolean", "string", "number", "null"])) - throw new qn(`Expected first argument to be of type boolean, string, number or null, but found ${un(vn(n))} instead.`); - if (!da(o, ["string", "array"])) - throw new qn(`Expected second argument to be of type array or string, but found ${un(vn(o))} instead.`); - if (this.fromIndex) { - const u = this.fromIndex.evaluate(e); - return o.indexOf(n, u); - } - return o.indexOf(n); - } - eachChild(e) { - e(this.needle), e(this.haystack), this.fromIndex && e(this.fromIndex); - } - outputDefined() { - return !1; - } - serialize() { - if (this.fromIndex != null && this.fromIndex !== void 0) { - const e = this.fromIndex.serialize(); - return ["index-of", this.needle.serialize(), this.haystack.serialize(), e]; - } - return ["index-of", this.needle.serialize(), this.haystack.serialize()]; - } - } - class ii { - constructor(e, n, o, u, l, f) { - this.inputType = e, this.type = n, this.input = o, this.cases = u, this.outputs = l, this.otherwise = f; - } - static parse(e, n) { - if (e.length < 5) - return n.error(`Expected at least 4 arguments, but found only ${e.length - 1}.`); - if (e.length % 2 != 1) - return n.error("Expected an even number of arguments."); - let o, u; - n.expectedType && n.expectedType.kind !== "value" && (u = n.expectedType); - const l = {}, f = []; - for (let D = 2; D < e.length - 1; D += 2) { - let x = e[D]; - const P = e[D + 1]; - Array.isArray(x) || (x = [x]); - const I = n.concat(D); - if (x.length === 0) - return I.error("Expected at least one branch label."); - for (const C of x) { - if (typeof C != "number" && typeof C != "string") - return I.error("Branch labels must be numbers or strings."); - if (typeof C == "number" && Math.abs(C) > Number.MAX_SAFE_INTEGER) - return I.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`); - if (typeof C == "number" && Math.floor(C) !== C) - return I.error("Numeric branch labels must be integer values."); - if (o) { - if (I.checkSubtype(o, vn(C))) - return null; - } else - o = vn(C); - if (l[String(C)] !== void 0) - return I.error("Branch labels must be unique."); - l[String(C)] = f.length; - } - const M = n.parse(P, D, u); - if (!M) - return null; - u = u || M.type, f.push(M); - } - const v = n.parse(e[1], 1, Pi); - if (!v) - return null; - const S = n.parse(e[e.length - 1], e.length - 1, u); - return S ? v.type.kind !== "value" && n.concat(1).checkSubtype(o, v.type) ? null : new ii(o, u, v, l, f, S) : null; - } - evaluate(e) { - const n = this.input.evaluate(e); - return (vn(n) === this.inputType && this.outputs[this.cases[n]] || this.otherwise).evaluate(e); - } - eachChild(e) { - e(this.input), this.outputs.forEach(e), e(this.otherwise); - } - outputDefined() { - return this.outputs.every((e) => e.outputDefined()) && this.otherwise.outputDefined(); - } - serialize() { - const e = ["match", this.input.serialize()], n = Object.keys(this.cases).sort(), o = [], u = {}; - for (const f of n) { - const v = u[this.cases[f]]; - v === void 0 ? (u[this.cases[f]] = o.length, o.push([this.cases[f], [f]])) : o[v][1].push(f); - } - const l = (f) => this.inputType.kind === "number" ? Number(f) : f; - for (const [f, v] of o) - e.push(v.length === 1 ? l(v[0]) : v.map(l)), e.push(this.outputs[f].serialize()); - return e.push(this.otherwise.serialize()), e; - } - } - class Ci { - constructor(e, n, o) { - this.type = e, this.branches = n, this.otherwise = o; - } - static parse(e, n) { - if (e.length < 4) - return n.error(`Expected at least 3 arguments, but found only ${e.length - 1}.`); - if (e.length % 2 != 0) - return n.error("Expected an odd number of arguments."); - let o; - n.expectedType && n.expectedType.kind !== "value" && (o = n.expectedType); - const u = []; - for (let f = 1; f < e.length - 1; f += 2) { - const v = n.parse(e[f], f, Li); - if (!v) - return null; - const S = n.parse(e[f + 1], f + 1, o); - if (!S) - return null; - u.push([v, S]), o = o || S.type; - } - const l = n.parse(e[e.length - 1], e.length - 1, o); - return l ? new Ci(o, u, l) : null; - } - evaluate(e) { - for (const [n, o] of this.branches) - if (n.evaluate(e)) - return o.evaluate(e); - return this.otherwise.evaluate(e); - } - eachChild(e) { - for (const [n, o] of this.branches) - e(n), e(o); - e(this.otherwise); - } - outputDefined() { - return this.branches.every(([e, n]) => n.outputDefined()) && this.otherwise.outputDefined(); - } - serialize() { - const e = ["case"]; - return this.eachChild((n) => { - e.push(n.serialize()); - }), e; - } - } - class Wi { - constructor(e, n, o, u) { - this.type = e, this.input = n, this.beginIndex = o, this.endIndex = u; - } - static parse(e, n) { - if (e.length <= 2 || e.length >= 5) - return n.error(`Expected 3 or 4 arguments, but found ${e.length - 1} instead.`); - const o = n.parse(e[1], 1, Pi), u = n.parse(e[2], 2, Ot); - if (!o || !u) - return null; - if (!Zl(o.type, [Ss(Pi), Fi, Pi])) - return n.error(`Expected first argument to be of type array or string, but found ${un(o.type)} instead`); - if (e.length === 4) { - const l = n.parse(e[3], 3, Ot); - return l ? new Wi(o.type, o, u, l) : null; - } - return new Wi(o.type, o, u); - } - evaluate(e) { - const n = this.input.evaluate(e), o = this.beginIndex.evaluate(e); - if (!da(n, ["string", "array"])) - throw new qn(`Expected first argument to be of type array or string, but found ${un(vn(n))} instead.`); - if (this.endIndex) { - const u = this.endIndex.evaluate(e); - return n.slice(o, u); - } - return n.slice(o); - } - eachChild(e) { - e(this.input), e(this.beginIndex), this.endIndex && e(this.endIndex); - } - outputDefined() { - return !1; - } - serialize() { - if (this.endIndex != null && this.endIndex !== void 0) { - const e = this.endIndex.serialize(); - return ["slice", this.input.serialize(), this.beginIndex.serialize(), e]; - } - return ["slice", this.input.serialize(), this.beginIndex.serialize()]; - } - } - function Hs(r, e) { - return r === "==" || r === "!=" ? e.kind === "boolean" || e.kind === "string" || e.kind === "number" || e.kind === "null" || e.kind === "value" : e.kind === "string" || e.kind === "number" || e.kind === "value"; - } - function ws(r, e, n, o) { - return o.compare(e, n) === 0; - } - function Rs(r, e, n) { - const o = r !== "==" && r !== "!="; - return class bw { - constructor(l, f, v) { - this.type = Li, this.lhs = l, this.rhs = f, this.collator = v, this.hasUntypedArgument = l.type.kind === "value" || f.type.kind === "value"; - } - static parse(l, f) { - if (l.length !== 3 && l.length !== 4) - return f.error("Expected two or three arguments."); - const v = l[0]; - let S = f.parse(l[1], 1, Pi); - if (!S) - return null; - if (!Hs(v, S.type)) - return f.concat(1).error(`"${v}" comparisons are not supported for type '${un(S.type)}'.`); - let D = f.parse(l[2], 2, Pi); - if (!D) - return null; - if (!Hs(v, D.type)) - return f.concat(2).error(`"${v}" comparisons are not supported for type '${un(D.type)}'.`); - if (S.type.kind !== D.type.kind && S.type.kind !== "value" && D.type.kind !== "value") - return f.error(`Cannot compare types '${un(S.type)}' and '${un(D.type)}'.`); - o && (S.type.kind === "value" && D.type.kind !== "value" ? S = new zr(D.type, [S]) : S.type.kind !== "value" && D.type.kind === "value" && (D = new zr(S.type, [D]))); - let x = null; - if (l.length === 4) { - if (S.type.kind !== "string" && D.type.kind !== "string" && S.type.kind !== "value" && D.type.kind !== "value") - return f.error("Cannot use collator to compare non-string types."); - if (x = f.parse(l[3], 3, _s), !x) - return null; - } - return new bw(S, D, x); - } - evaluate(l) { - const f = this.lhs.evaluate(l), v = this.rhs.evaluate(l); - if (o && this.hasUntypedArgument) { - const S = vn(f), D = vn(v); - if (S.kind !== D.kind || S.kind !== "string" && S.kind !== "number") - throw new qn(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${S.kind}, ${D.kind}) instead.`); - } - if (this.collator && !o && this.hasUntypedArgument) { - const S = vn(f), D = vn(v); - if (S.kind !== "string" || D.kind !== "string") - return e(l, f, v); - } - return this.collator ? n(l, f, v, this.collator.evaluate(l)) : e(l, f, v); - } - eachChild(l) { - l(this.lhs), l(this.rhs), this.collator && l(this.collator); - } - outputDefined() { - return !0; - } - serialize() { - const l = [r]; - return this.eachChild((f) => { - l.push(f.serialize()); - }), l; - } - }; - } - const ur = Rs("==", function(r, e, n) { - return e === n; - }, ws), Za = Rs("!=", function(r, e, n) { - return e !== n; - }, function(r, e, n, o) { - return !ws(0, e, n, o); - }), nd = Rs("<", function(r, e, n) { - return e < n; - }, function(r, e, n, o) { - return o.compare(e, n) < 0; - }), sd = Rs(">", function(r, e, n) { - return e > n; - }, function(r, e, n, o) { - return o.compare(e, n) > 0; - }), rd = Rs("<=", function(r, e, n) { - return e <= n; - }, function(r, e, n, o) { - return o.compare(e, n) <= 0; - }), Xh = Rs(">=", function(r, e, n) { - return e >= n; - }, function(r, e, n, o) { - return o.compare(e, n) >= 0; - }); - class wl { - constructor(e, n, o, u, l, f) { - this.type = Fi, this.number = e, this.locale = n, this.currency = o, this.unit = u, this.minFractionDigits = l, this.maxFractionDigits = f; - } - static parse(e, n) { - if (e.length !== 3) - return n.error("Expected two arguments."); - const o = n.parse(e[1], 1, Ot); - if (!o) - return null; - const u = e[2]; - if (typeof u != "object" || Array.isArray(u)) - return n.error("NumberFormat options argument must be an object."); - let l = null; - if (u.locale && (l = n.parseObjectValue(u.locale, 2, "locale", Fi), !l)) - return null; - let f = null; - if (u.currency && (f = n.parseObjectValue(u.currency, 2, "currency", Fi), !f)) - return null; - let v = null; - if (u.unit && (v = n.parseObjectValue(u.unit, 2, "unit", Fi), !v)) - return null; - let S = null; - if (u["min-fraction-digits"] && (S = n.parseObjectValue(u["min-fraction-digits"], 2, "min-fraction-digits", Ot), !S)) - return null; - let D = null; - return u["max-fraction-digits"] && (D = n.parseObjectValue(u["max-fraction-digits"], 2, "max-fraction-digits", Ot), !D) ? null : new wl(o, l, f, v, S, D); - } - evaluate(e) { - return new Intl.NumberFormat(this.locale ? this.locale.evaluate(e) : [], { style: (this.currency ? "currency" : this.unit && "unit") || "decimal", currency: this.currency ? this.currency.evaluate(e) : void 0, unit: this.unit ? this.unit.evaluate(e) : void 0, minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(e) : void 0, maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(e) : void 0 }).format(this.number.evaluate(e)); - } - eachChild(e) { - e(this.number), this.locale && e(this.locale), this.currency && e(this.currency), this.unit && e(this.unit), this.minFractionDigits && e(this.minFractionDigits), this.maxFractionDigits && e(this.maxFractionDigits); - } - outputDefined() { - return !1; - } - serialize() { - const e = {}; - return this.locale && (e.locale = this.locale.serialize()), this.currency && (e.currency = this.currency.serialize()), this.unit && (e.unit = this.unit.serialize()), this.minFractionDigits && (e["min-fraction-digits"] = this.minFractionDigits.serialize()), this.maxFractionDigits && (e["max-fraction-digits"] = this.maxFractionDigits.serialize()), ["number-format", this.number.serialize(), e]; - } - } - class ic { - constructor(e) { - this.type = Ot, this.input = e; - } - static parse(e, n) { - if (e.length !== 2) - return n.error(`Expected 1 argument, but found ${e.length - 1} instead.`); - const o = n.parse(e[1], 1); - return o ? o.type.kind !== "array" && o.type.kind !== "string" && o.type.kind !== "value" ? n.error(`Expected argument of type string or array, but found ${un(o.type)} instead.`) : new ic(o) : null; - } - evaluate(e) { - const n = this.input.evaluate(e); - if (typeof n == "string" || Array.isArray(n)) - return n.length; - throw new qn(`Expected value to be of type string or array, but found ${un(vn(n))} instead.`); - } - eachChild(e) { - e(this.input); - } - outputDefined() { - return !1; - } - serialize() { - const e = ["length"]; - return this.eachChild((n) => { - e.push(n.serialize()); - }), e; - } - } - function es(r) { - return function() { - r = 1831565813 + (r |= 0) | 0; - let e = Math.imul(r ^ r >>> 15, 1 | r); - return e = e + Math.imul(e ^ e >>> 7, 61 | e) ^ e, ((e ^ e >>> 14) >>> 0) / 4294967296; - }; - } - const Ao = { "==": ur, "!=": Za, ">": sd, "<": nd, ">=": Xh, "<=": rd, array: zr, at, boolean: zr, case: Ci, coalesce: ye, collator: pl, format: Es, image: Oa, in: ft, "index-of": Rt, interpolate: X, "interpolate-hcl": X, "interpolate-lab": X, length: ic, let: We, literal: Lr, match: ii, number: zr, "number-format": wl, object: zr, slice: Wi, step: Ti, string: zr, "to-boolean": so, "to-color": so, "to-number": so, "to-string": so, var: Jo, within: lr, distance: Jr, config: ya }; - function Yh(r, [e, n, o, u]) { - e = e.evaluate(r), n = n.evaluate(r), o = o.evaluate(r); - const l = u ? u.evaluate(r) : 1, f = fa(e, n, o, l); - if (f) - throw new qn(f); - return new ki(e / 255 * l, n / 255 * l, o / 255 * l, l); - } - function Kh(r, [e, n, o, u]) { - e = e.evaluate(r), n = n.evaluate(r), o = o.evaluate(r); - const l = u ? u.evaluate(r) : 1, f = function(D, x, P, I) { - return typeof D == "number" && D >= 0 && D <= 360 ? typeof x == "number" && x >= 0 && x <= 100 && typeof P == "number" && P >= 0 && P <= 100 ? I === void 0 || typeof I == "number" && I >= 0 && I <= 1 ? null : `Invalid hsla value [${[D, x, P, I].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid hsla value [${(typeof I == "number" ? [D, x, P, I] : [D, x, P]).join(", ")}]: 's', and 'l' must be between 0 and 100.` : `Invalid hsla value [${(typeof I == "number" ? [D, x, P, I] : [D, x, P]).join(", ")}]: 'h' must be between 0 and 360.`; - }(e, n, o, l); - if (f) - throw new qn(f); - const v = `hsla(${e}, ${n}%, ${o}%, ${l})`, S = ki.parse(v); - if (!S) - throw new qn(`Failed to parse HSLA color: ${v}`); - return S; - } - function Yc(r, e) { - return r in e; - } - function Ha(r, e) { - const n = e[r]; - return n === void 0 ? null : n; - } - function vr(r) { - return { type: r }; - } - function Kc(r) { - return { result: "success", value: r }; - } - function xa(r) { - return { result: "error", value: r }; - } - function od(r, e) { - return !!r && !!r.parameters && r.parameters.indexOf(e) > -1; - } - function nc(r) { - return r["property-type"] === "data-driven"; - } - function Jh(r) { - return od(r.expression, "measure-light"); - } - function qf(r) { - return od(r.expression, "zoom"); - } - function ad(r) { - return !!r.expression && r.expression.interpolated; - } - function Qh(r) { - return typeof r == "object" && r !== null && !Array.isArray(r); - } - function Wf(r) { - return r; - } - function $f(r, e) { - const n = e.type === "color", o = r.stops && typeof r.stops[0][0] == "object", u = o || !(o || r.property !== void 0), l = r.type || (ad(e) ? "exponential" : "interval"); - if (n && ((r = Bi({}, r)).stops && (r.stops = r.stops.map((D) => [D[0], ki.parse(D[1])])), r.default = ki.parse(r.default ? r.default : e.default)), r.colorSpace && r.colorSpace !== "rgb" && !B[r.colorSpace]) - throw new Error(`Unknown color space: ${r.colorSpace}`); - let f, v, S; - if (l === "exponential") - f = ld; - else if (l === "interval") - f = Xf; - else if (l === "categorical") { - f = Jm, v = /* @__PURE__ */ Object.create(null); - for (const D of r.stops) - v[D[0]] = D[1]; - S = typeof r.stops[0][0]; - } else { - if (l !== "identity") - throw new Error(`Unknown function type "${l}"`); - f = eu; - } - if (o) { - const D = {}, x = []; - for (let M = 0; M < r.stops.length; M++) { - const C = r.stops[M], k = C[0].zoom; - D[k] === void 0 && (D[k] = { zoom: k, type: r.type, property: r.property, default: r.default, stops: [] }, x.push(k)), D[k].stops.push([C[0].value, C[1]]); - } - const P = []; - for (const M of x) - P.push([D[M].zoom, $f(D[M], e)]); - const I = { name: "linear" }; - return { kind: "composite", interpolationType: I, interpolationFactor: X.interpolationFactor.bind(void 0, I), zoomStops: P.map((M) => M[0]), evaluate: ({ zoom: M }, C) => ld({ stops: P, base: r.base }, e, M).evaluate(M, C) }; - } - if (u) { - const D = l === "exponential" ? { name: "exponential", base: r.base !== void 0 ? r.base : 1 } : null; - return { kind: "camera", interpolationType: D, interpolationFactor: X.interpolationFactor.bind(void 0, D), zoomStops: r.stops.map((x) => x[0]), evaluate: ({ zoom: x }) => f(r, e, x, v, S) }; - } - return { kind: "source", evaluate(D, x) { - const P = x && x.properties ? x.properties[r.property] : void 0; - return P === void 0 ? Jc(r.default, e.default) : f(r, e, P, v, S); - } }; - } - function Jc(r, e, n) { - return r !== void 0 ? r : e !== void 0 ? e : n !== void 0 ? n : void 0; - } - function Jm(r, e, n, o, u) { - return Jc(typeof n === u ? o[n] : void 0, r.default, e.default); - } - function Xf(r, e, n) { - if (qo(n) !== "number") - return Jc(r.default, e.default); - const o = r.stops.length; - if (o === 1 || n <= r.stops[0][0]) - return r.stops[0][1]; - if (n >= r.stops[o - 1][0]) - return r.stops[o - 1][1]; - const u = ao(r.stops.map((l) => l[0]), n); - return r.stops[u][1]; - } - function ld(r, e, n) { - const o = r.base !== void 0 ? r.base : 1; - if (qo(n) !== "number") - return Jc(r.default, e.default); - const u = r.stops.length; - if (u === 1 || n <= r.stops[0][0]) - return r.stops[0][1]; - if (n >= r.stops[u - 1][0]) - return r.stops[u - 1][1]; - const l = ao(r.stops.map((x) => x[0]), n), f = function(x, P, I, M) { - const C = M - I, k = x - I; - return C === 0 ? 0 : P === 1 ? k / C : (Math.pow(P, k) - 1) / (Math.pow(P, C) - 1); - }(n, o, r.stops[l][0], r.stops[l + 1][0]), v = r.stops[l][1], S = r.stops[l + 1][1]; - let D = Oi[e.type] || Wf; - if (r.colorSpace && r.colorSpace !== "rgb") { - const x = B[r.colorSpace]; - D = (P, I) => x.reverse(x.interpolate(x.forward(P), x.forward(I), f)); - } - return typeof v.evaluate == "function" ? { evaluate(...x) { - const P = v.evaluate.apply(void 0, x), I = S.evaluate.apply(void 0, x); - if (P !== void 0 && I !== void 0) - return D(P, I, f); - } } : D(v, S, f); - } - function eu(r, e, n) { - return e.type === "color" ? n = ki.parse(n) : e.type === "formatted" ? n = Dn.fromString(n.toString()) : e.type === "resolvedImage" ? n = ss.build(n.toString()) : qo(n) === e.type || e.type === "enum" && e.values[n] || (n = void 0), Jc(n, r.default, e.default); - } - or.register(Ao, { error: [{ kind: "error" }, [Fi], (r, [e]) => { - throw new qn(e.evaluate(r)); - }], typeof: [Fi, [Pi], (r, [e]) => un(vn(e.evaluate(r)))], "to-rgba": [Ss(Ot, 4), [ms], (r, [e]) => e.evaluate(r).toRenderColor(null).toArray()], "to-hsla": [Ss(Ot, 4), [ms], (r, [e]) => e.evaluate(r).toRenderColor(null).toHslaArray()], rgb: [ms, [Ot, Ot, Ot], Yh], rgba: [ms, [Ot, Ot, Ot, Ot], Yh], hsl: [ms, [Ot, Ot, Ot], Kh], hsla: [ms, [Ot, Ot, Ot, Ot], Kh], has: { type: Li, overloads: [[[Fi], (r, [e]) => Yc(e.evaluate(r), r.properties())], [[Fi, bo], (r, [e, n]) => Yc(e.evaluate(r), n.evaluate(r))]] }, get: { type: Pi, overloads: [[[Fi], (r, [e]) => Ha(e.evaluate(r), r.properties())], [[Fi, bo], (r, [e, n]) => Ha(e.evaluate(r), n.evaluate(r))]] }, "feature-state": [Pi, [Fi], (r, [e]) => Ha(e.evaluate(r), r.featureState || {})], properties: [bo, [], (r) => r.properties()], "geometry-type": [Fi, [], (r) => r.geometryType()], id: [Pi, [], (r) => r.id()], zoom: [Ot, [], (r) => r.globals.zoom], pitch: [Ot, [], (r) => r.globals.pitch || 0], "distance-from-center": [Ot, [], (r) => r.distanceFromCenter()], "measure-light": [Ot, [Fi], (r, [e]) => r.measureLight(e.evaluate(r))], "heatmap-density": [Ot, [], (r) => r.globals.heatmapDensity || 0], "line-progress": [Ot, [], (r) => r.globals.lineProgress || 0], "raster-value": [Ot, [], (r) => r.globals.rasterValue || 0], "raster-particle-speed": [Ot, [], (r) => r.globals.rasterParticleSpeed || 0], "sky-radial-progress": [Ot, [], (r) => r.globals.skyRadialProgress || 0], accumulated: [Pi, [], (r) => r.globals.accumulated === void 0 ? null : r.globals.accumulated], "+": [Ot, vr(Ot), (r, e) => { - let n = 0; - for (const o of e) - n += o.evaluate(r); - return n; - }], "*": [Ot, vr(Ot), (r, e) => { - let n = 1; - for (const o of e) - n *= o.evaluate(r); - return n; - }], "-": { type: Ot, overloads: [[[Ot, Ot], (r, [e, n]) => e.evaluate(r) - n.evaluate(r)], [[Ot], (r, [e]) => -e.evaluate(r)]] }, "/": [Ot, [Ot, Ot], (r, [e, n]) => e.evaluate(r) / n.evaluate(r)], "%": [Ot, [Ot, Ot], (r, [e, n]) => e.evaluate(r) % n.evaluate(r)], ln2: [Ot, [], () => Math.LN2], pi: [Ot, [], () => Math.PI], e: [Ot, [], () => Math.E], "^": [Ot, [Ot, Ot], (r, [e, n]) => Math.pow(e.evaluate(r), n.evaluate(r))], sqrt: [Ot, [Ot], (r, [e]) => Math.sqrt(e.evaluate(r))], log10: [Ot, [Ot], (r, [e]) => Math.log(e.evaluate(r)) / Math.LN10], ln: [Ot, [Ot], (r, [e]) => Math.log(e.evaluate(r))], log2: [Ot, [Ot], (r, [e]) => Math.log(e.evaluate(r)) / Math.LN2], sin: [Ot, [Ot], (r, [e]) => Math.sin(e.evaluate(r))], cos: [Ot, [Ot], (r, [e]) => Math.cos(e.evaluate(r))], tan: [Ot, [Ot], (r, [e]) => Math.tan(e.evaluate(r))], asin: [Ot, [Ot], (r, [e]) => Math.asin(e.evaluate(r))], acos: [Ot, [Ot], (r, [e]) => Math.acos(e.evaluate(r))], atan: [Ot, [Ot], (r, [e]) => Math.atan(e.evaluate(r))], min: [Ot, vr(Ot), (r, e) => Math.min(...e.map((n) => n.evaluate(r)))], max: [Ot, vr(Ot), (r, e) => Math.max(...e.map((n) => n.evaluate(r)))], abs: [Ot, [Ot], (r, [e]) => Math.abs(e.evaluate(r))], round: [Ot, [Ot], (r, [e]) => { - const n = e.evaluate(r); - return n < 0 ? -Math.round(-n) : Math.round(n); - }], floor: [Ot, [Ot], (r, [e]) => Math.floor(e.evaluate(r))], ceil: [Ot, [Ot], (r, [e]) => Math.ceil(e.evaluate(r))], "filter-==": [Li, [Fi, Pi], (r, [e, n]) => r.properties()[e.value] === n.value], "filter-id-==": [Li, [Pi], (r, [e]) => r.id() === e.value], "filter-type-==": [Li, [Fi], (r, [e]) => r.geometryType() === e.value], "filter-<": [Li, [Fi, Pi], (r, [e, n]) => { - const o = r.properties()[e.value], u = n.value; - return typeof o == typeof u && o < u; - }], "filter-id-<": [Li, [Pi], (r, [e]) => { - const n = r.id(), o = e.value; - return typeof n == typeof o && n < o; - }], "filter->": [Li, [Fi, Pi], (r, [e, n]) => { - const o = r.properties()[e.value], u = n.value; - return typeof o == typeof u && o > u; - }], "filter-id->": [Li, [Pi], (r, [e]) => { - const n = r.id(), o = e.value; - return typeof n == typeof o && n > o; - }], "filter-<=": [Li, [Fi, Pi], (r, [e, n]) => { - const o = r.properties()[e.value], u = n.value; - return typeof o == typeof u && o <= u; - }], "filter-id-<=": [Li, [Pi], (r, [e]) => { - const n = r.id(), o = e.value; - return typeof n == typeof o && n <= o; - }], "filter->=": [Li, [Fi, Pi], (r, [e, n]) => { - const o = r.properties()[e.value], u = n.value; - return typeof o == typeof u && o >= u; - }], "filter-id->=": [Li, [Pi], (r, [e]) => { - const n = r.id(), o = e.value; - return typeof n == typeof o && n >= o; - }], "filter-has": [Li, [Pi], (r, [e]) => e.value in r.properties()], "filter-has-id": [Li, [], (r) => r.id() !== null && r.id() !== void 0], "filter-type-in": [Li, [Ss(Fi)], (r, [e]) => e.value.indexOf(r.geometryType()) >= 0], "filter-id-in": [Li, [Ss(Pi)], (r, [e]) => e.value.indexOf(r.id()) >= 0], "filter-in-small": [Li, [Fi, Ss(Pi)], (r, [e, n]) => n.value.indexOf(r.properties()[e.value]) >= 0], "filter-in-large": [Li, [Fi, Ss(Pi)], (r, [e, n]) => function(o, u, l, f) { - for (; l <= f; ) { - const v = l + f >> 1; - if (u[v] === o) - return !0; - u[v] > o ? f = v - 1 : l = v + 1; - } - return !1; - }(r.properties()[e.value], n.value, 0, n.value.length - 1)], all: { type: Li, overloads: [[[Li, Li], (r, [e, n]) => e.evaluate(r) && n.evaluate(r)], [vr(Li), (r, e) => { - for (const n of e) - if (!n.evaluate(r)) - return !1; - return !0; - }]] }, any: { type: Li, overloads: [[[Li, Li], (r, [e, n]) => e.evaluate(r) || n.evaluate(r)], [vr(Li), (r, e) => { - for (const n of e) - if (n.evaluate(r)) - return !0; - return !1; - }]] }, "!": [Li, [Li], (r, [e]) => !e.evaluate(r)], "is-supported-script": [Li, [Fi], (r, [e]) => { - const n = r.globals && r.globals.isSupportedScript; - return !n || n(e.evaluate(r)); - }], upcase: [Fi, [Fi], (r, [e]) => e.evaluate(r).toUpperCase()], downcase: [Fi, [Fi], (r, [e]) => e.evaluate(r).toLowerCase()], concat: [Fi, vr(Pi), (r, e) => e.map((n) => Ir(n.evaluate(r))).join("")], "resolved-locale": [Fi, [_s], (r, [e]) => e.evaluate(r).resolvedLocale()], random: [Ot, [Ot, Ot, Pi], (r, e) => { - const [n, o, u] = e.map((f) => f.evaluate(r)); - if (n > o || n === o) - return n; - let l; - if (typeof u == "string") - l = function(f) { - let v = 0; - if (f.length === 0) - return v; - for (let S = 0; S < f.length; S++) - v = (v << 5) - v + f.charCodeAt(S), v |= 0; - return v; - }(u); - else { - if (typeof u != "number") - throw new qn(`Invalid seed input: ${u}`); - l = u; - } - return n + es(l)() * (o - n); - }] }); - class cd { - constructor(e, n, o, u) { - this.expression = e, this._warningHistory = {}, this._evaluator = new Fa(o, u), this._defaultValue = n ? function(l) { - return l.type === "color" && (Qh(l.default) || Array.isArray(l.default)) ? new ki(0, 0, 0, 0) : l.type === "color" ? ki.parse(l.default) || null : l.default === void 0 ? null : l.default; - }(n) : null, this._enumValues = n && n.type === "enum" ? n.values : null, this.configDependencies = kr(e); - } - evaluateWithoutErrorHandling(e, n, o, u, l, f, v, S) { - return this._evaluator.globals = e, this._evaluator.feature = n, this._evaluator.featureState = o, this._evaluator.canonical = u || null, this._evaluator.availableImages = l || null, this._evaluator.formattedSection = f, this._evaluator.featureTileCoord = v || null, this._evaluator.featureDistanceData = S || null, this.expression.evaluate(this._evaluator); - } - evaluate(e, n, o, u, l, f, v, S) { - this._evaluator.globals = e, this._evaluator.feature = n || null, this._evaluator.featureState = o || null, this._evaluator.canonical = u || null, this._evaluator.availableImages = l || null, this._evaluator.formattedSection = f || null, this._evaluator.featureTileCoord = v || null, this._evaluator.featureDistanceData = S || null; - try { - const D = this.expression.evaluate(this._evaluator); - if (D == null || typeof D == "number" && D != D) - return this._defaultValue; - if (this._enumValues && !(D in this._enumValues)) - throw new qn(`Expected value to be one of ${Object.keys(this._enumValues).map((x) => JSON.stringify(x)).join(", ")}, but found ${JSON.stringify(D)} instead.`); - return D; - } catch (D) { - return this._warningHistory[D.message] || (this._warningHistory[D.message] = !0, typeof console < "u" && console.warn(`Failed to evaluate expression "${JSON.stringify(this.expression.serialize())}". ${D.message}`)), this._defaultValue; - } - } - } - function tu(r) { - return Array.isArray(r) && r.length > 0 && typeof r[0] == "string" && r[0] in Ao; - } - function Qc(r, e, n, o) { - const u = new Qr(Ao, [], e ? function(f) { - const v = { color: ms, string: Fi, number: Ot, enum: Fi, boolean: Li, formatted: Js, resolvedImage: Ho }; - return f.type === "array" ? Ss(v[f.value] || Pi, f.length) : v[f.type]; - }(e) : void 0, void 0, void 0, n, o), l = u.parse(r, void 0, void 0, void 0, e && e.type === "string" ? { typeAnnotation: "coerce" } : void 0); - return l ? Kc(new cd(l, e, n, o)) : xa(u.errors); - } - class hd { - constructor(e, n, o, u) { - this.kind = e, this._styleExpression = n, this.isLightConstant = o, this.isLineProgressConstant = u, this.isStateDependent = e !== "constant" && !xl(n.expression), this.configDependencies = kr(n.expression); - } - evaluateWithoutErrorHandling(e, n, o, u, l, f) { - return this._styleExpression.evaluateWithoutErrorHandling(e, n, o, u, l, f); - } - evaluate(e, n, o, u, l, f) { - return this._styleExpression.evaluate(e, n, o, u, l, f); - } - } - class sc { - constructor(e, n, o, u, l, f) { - this.kind = e, this.zoomStops = o, this._styleExpression = n, this.isStateDependent = e !== "camera" && !xl(n.expression), this.isLightConstant = l, this.isLineProgressConstant = f, this.configDependencies = kr(n.expression), this.interpolationType = u; - } - evaluateWithoutErrorHandling(e, n, o, u, l, f) { - return this._styleExpression.evaluateWithoutErrorHandling(e, n, o, u, l, f); - } - evaluate(e, n, o, u, l, f) { - return this._styleExpression.evaluate(e, n, o, u, l, f); - } - interpolationFactor(e, n, o) { - return this.interpolationType ? X.interpolationFactor(this.interpolationType, e, n, o) : 0; - } - } - function ud(r, e, n, o) { - if ((r = Qc(r, e, n, o)).result === "error") - return r; - const u = r.value.expression, l = ro(u); - if (!l && !nc(e)) - return xa([new ns("", "data expressions not supported")]); - const f = oo(u, ["zoom", "pitch", "distance-from-center"]); - if (!f && !qf(e)) - return xa([new ns("", "zoom expressions not supported")]); - const v = oo(u, ["measure-light"]); - if (!v && !Jh(e)) - return xa([new ns("", "measure-light expression not supported")]); - const S = oo(u, ["line-progress"]); - if (!S && !function(P) { - return od(P.expression, "line-progress"); - }(e)) - return xa([new ns("", "line-progress expression not supported")]); - const D = e.expression && e.expression.relaxZoomRestriction, x = nu(u); - return x || f || D ? x instanceof ns ? xa([x]) : x instanceof X && !ad(e) ? xa([new ns("", '"interpolate" expressions cannot be used with this property')]) : Kc(x ? new sc(l && S ? "camera" : "composite", r.value, x.labels, x instanceof X ? x.interpolation : void 0, v, S) : new hd(l && S ? "constant" : "source", r.value, v, S)) : xa([new ns("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')]); - } - class iu { - constructor(e, n) { - this._parameters = e, this._specification = n, Bi(this, $f(this._parameters, this._specification)); - } - static deserialize(e) { - return new iu(e._parameters, e._specification); - } - static serialize(e) { - return { _parameters: e._parameters, _specification: e._specification }; - } - } - function nu(r) { - let e = null; - if (r instanceof We) - e = nu(r.result); - else if (r instanceof ye) { - for (const n of r.args) - if (e = nu(n), e) - break; - } else - (r instanceof Ti || r instanceof X) && r.input instanceof or && r.input.name === "zoom" && (e = r); - return e instanceof ns || r.eachChild((n) => { - const o = nu(n); - o instanceof ns ? e = o : e && o && e !== o && (e = new ns("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.')); - }), e; - } - var dd, fd, Qm = function() { - if (fd) - return dd; - fd = 1, dd = e; - var r = 3; - function e(n, o, u) { - var l = this.cells = []; - if (n instanceof ArrayBuffer) { - this.arrayBuffer = n; - var f = new Int32Array(this.arrayBuffer); - n = f[0], this.d = (o = f[1]) + 2 * (u = f[2]); - for (var v = 0; v < this.d * this.d; v++) { - var S = f[r + v], D = f[r + v + 1]; - l.push(S === D ? null : f.subarray(S, D)); - } - var x = f[r + l.length + 1]; - this.keys = f.subarray(f[r + l.length], x), this.bboxes = f.subarray(x), this.insert = this._insertReadonly; - } else { - this.d = o + 2 * u; - for (var P = 0; P < this.d * this.d; P++) - l.push([]); - this.keys = [], this.bboxes = []; - } - this.n = o, this.extent = n, this.padding = u, this.scale = o / n, this.uid = 0; - var I = u / o * n; - this.min = -I, this.max = n + I; - } - return e.prototype.insert = function(n, o, u, l, f) { - this._forEachCell(o, u, l, f, this._insertCell, this.uid++), this.keys.push(n), this.bboxes.push(o), this.bboxes.push(u), this.bboxes.push(l), this.bboxes.push(f); - }, e.prototype._insertReadonly = function() { - throw "Cannot insert into a GridIndex created from an ArrayBuffer."; - }, e.prototype._insertCell = function(n, o, u, l, f, v) { - this.cells[f].push(v); - }, e.prototype.query = function(n, o, u, l, f) { - var v = this.min, S = this.max; - if (n <= v && o <= v && S <= u && S <= l && !f) - return Array.prototype.slice.call(this.keys); - var D = []; - return this._forEachCell(n, o, u, l, this._queryCell, D, {}, f), D; - }, e.prototype._queryCell = function(n, o, u, l, f, v, S, D) { - var x = this.cells[f]; - if (x !== null) - for (var P = this.keys, I = this.bboxes, M = 0; M < x.length; M++) { - var C = x[M]; - if (S[C] === void 0) { - var k = 4 * C; - (D ? D(I[k + 0], I[k + 1], I[k + 2], I[k + 3]) : n <= I[k + 2] && o <= I[k + 3] && u >= I[k + 0] && l >= I[k + 1]) ? (S[C] = !0, v.push(P[C])) : S[C] = !1; - } - } - }, e.prototype._forEachCell = function(n, o, u, l, f, v, S, D) { - for (var x = this._convertToCellCoord(n), P = this._convertToCellCoord(o), I = this._convertToCellCoord(u), M = this._convertToCellCoord(l), C = x; C <= I; C++) - for (var k = P; k <= M; k++) { - var V = this.d * k + C; - if ((!D || D(this._convertFromCellCoord(C), this._convertFromCellCoord(k), this._convertFromCellCoord(C + 1), this._convertFromCellCoord(k + 1))) && f.call(this, n, o, u, l, V, v, S, D)) - return; - } - }, e.prototype._convertFromCellCoord = function(n) { - return (n - this.padding) / this.scale; - }, e.prototype._convertToCellCoord = function(n) { - return Math.max(0, Math.min(this.d - 1, Math.floor(n * this.scale) + this.padding)); - }, e.prototype.toArrayBuffer = function() { - if (this.arrayBuffer) - return this.arrayBuffer; - for (var n = this.cells, o = r + this.cells.length + 1 + 1, u = 0, l = 0; l < this.cells.length; l++) - u += this.cells[l].length; - var f = new Int32Array(o + u + this.keys.length + this.bboxes.length); - f[0] = this.extent, f[1] = this.n, f[2] = this.padding; - for (var v = o, S = 0; S < n.length; S++) { - var D = n[S]; - f[r + S] = v, f.set(D, v), v += D.length; - } - return f[r + n.length] = v, f.set(this.keys, v), f[r + n.length + 1] = v += this.keys.length, f.set(this.bboxes, v), v += this.bboxes.length, f.buffer; - }, dd; - }(), rc = O(Qm); - const eh = {}; - function Ft(r, e, n = {}) { - Object.defineProperty(r, "_classRegistryKey", { value: e, writable: !1 }), eh[e] = { klass: r, omit: n.omit || [] }; - } - Ft(Object, "Object"), rc.serialize = function(r, e) { - const n = r.toArrayBuffer(); - return e && e.add(n), { buffer: n }; - }, rc.deserialize = function(r) { - return new rc(r.buffer); - }, Object.defineProperty(rc, "name", { value: "Grid" }), Ft(rc, "Grid"), typeof DOMMatrix < "u" && Ft(DOMMatrix, "DOMMatrix"), Ft(ki, "Color"), Ft(Error, "Error"), Ft(Dn, "Formatted"), Ft(dl, "FormattedSection"), Ft(jo, "AJAXError"), Ft(ss, "ResolvedImage"), Ft(iu, "StylePropertyFunction"), Ft(cd, "StyleExpression", { omit: ["_evaluator"] }), Ft(rr, "ImageIdWithOptions"), Ft(sc, "ZoomDependentExpression"), Ft(hd, "ZoomConstantExpression"), Ft(or, "CompoundExpression", { omit: ["_evaluate"] }); - for (const r in Ao) - eh[Ao[r]._classRegistryKey] || Ft(Ao[r], `Expression${r}`); - function pd(r) { - return r && typeof ArrayBuffer < "u" && (r instanceof ArrayBuffer || r.constructor && r.constructor.name === "ArrayBuffer"); - } - function Yf(r) { - return self.ImageBitmap && r instanceof ImageBitmap; - } - function lo(r, e) { - if (r == null || typeof r == "boolean" || typeof r == "number" || typeof r == "string" || r instanceof Boolean || r instanceof Number || r instanceof String || r instanceof Date || r instanceof RegExp) - return r; - if (pd(r) || Yf(r)) - return e && e.add(r), r; - if (ArrayBuffer.isView(r)) - return e && e.add(r.buffer), r; - if (r instanceof ImageData) - return e && e.add(r.data.buffer), r; - if (Array.isArray(r)) { - const n = []; - for (const o of r) - n.push(lo(o, e)); - return n; - } - if (r instanceof Map) { - const n = { $name: "Map" }; - for (const [o, u] of r.entries()) - n[o] = lo(u); - return n; - } - if (r instanceof Set) { - const n = { $name: "Set" }; - let o = 0; - for (const u of r.values()) - n[++o] = lo(u); - return n; - } - if (typeof r == "object") { - const n = r.constructor, o = n._classRegistryKey; - if (!o) - throw new Error(`Can't serialize object of unregistered class "${o}".`); - const u = n.serialize ? n.serialize(r, e) : {}; - if (!n.serialize) { - for (const l in r) - r.hasOwnProperty(l) && (eh[o].omit.indexOf(l) >= 0 || (u[l] = lo(r[l], e))); - r instanceof Error && (u.message = r.message); - } - if (u.$name) - throw new Error("$name property is reserved for worker serialization logic."); - return o !== "Object" && (u.$name = o), u; - } - throw new Error("can't serialize object of type " + typeof r); - } - function Tl(r) { - if (r == null || typeof r == "boolean" || typeof r == "number" || typeof r == "string" || r instanceof Boolean || r instanceof Number || r instanceof String || r instanceof Date || r instanceof RegExp || pd(r) || Yf(r) || ArrayBuffer.isView(r) || r instanceof ImageData) - return r; - if (Array.isArray(r)) - return r.map(Tl); - if (typeof r == "object") { - const e = r.$name || "Object"; - if (e === "Map") { - const u = /* @__PURE__ */ new Map(); - for (const l of Object.keys(r)) - l !== "$name" && u.set(l, Tl(r[l])); - return u; - } - if (e === "Set") { - const u = /* @__PURE__ */ new Set(); - for (const l of Object.keys(r)) - l !== "$name" && u.add(Tl(r[l])); - return u; - } - const { klass: n } = eh[e]; - if (!n) - throw new Error(`Can't deserialize unregistered class "${e}".`); - if (n.deserialize) - return n.deserialize(r); - const o = Object.create(n.prototype); - for (const u of Object.keys(r)) - u !== "$name" && (o[u] = Tl(r[u])); - return o; - } - throw new Error("can't deserialize object of type " + typeof r); - } - const Zt = { "Latin-1 Supplement": (r) => r >= 128 && r <= 255, Arabic: (r) => r >= 1536 && r <= 1791, "Arabic Supplement": (r) => r >= 1872 && r <= 1919, "Arabic Extended-A": (r) => r >= 2208 && r <= 2303, "Hangul Jamo": (r) => r >= 4352 && r <= 4607, "Unified Canadian Aboriginal Syllabics": (r) => r >= 5120 && r <= 5759, Khmer: (r) => r >= 6016 && r <= 6143, "Unified Canadian Aboriginal Syllabics Extended": (r) => r >= 6320 && r <= 6399, "General Punctuation": (r) => r >= 8192 && r <= 8303, "Letterlike Symbols": (r) => r >= 8448 && r <= 8527, "Number Forms": (r) => r >= 8528 && r <= 8591, "Miscellaneous Technical": (r) => r >= 8960 && r <= 9215, "Control Pictures": (r) => r >= 9216 && r <= 9279, "Optical Character Recognition": (r) => r >= 9280 && r <= 9311, "Enclosed Alphanumerics": (r) => r >= 9312 && r <= 9471, "Geometric Shapes": (r) => r >= 9632 && r <= 9727, "Miscellaneous Symbols": (r) => r >= 9728 && r <= 9983, "Miscellaneous Symbols and Arrows": (r) => r >= 11008 && r <= 11263, "CJK Radicals Supplement": (r) => r >= 11904 && r <= 12031, "Kangxi Radicals": (r) => r >= 12032 && r <= 12255, "Ideographic Description Characters": (r) => r >= 12272 && r <= 12287, "CJK Symbols and Punctuation": (r) => r >= 12288 && r <= 12351, Hiragana: (r) => r >= 12352 && r <= 12447, Katakana: (r) => r >= 12448 && r <= 12543, Bopomofo: (r) => r >= 12544 && r <= 12591, "Hangul Compatibility Jamo": (r) => r >= 12592 && r <= 12687, Kanbun: (r) => r >= 12688 && r <= 12703, "Bopomofo Extended": (r) => r >= 12704 && r <= 12735, "CJK Strokes": (r) => r >= 12736 && r <= 12783, "Katakana Phonetic Extensions": (r) => r >= 12784 && r <= 12799, "Enclosed CJK Letters and Months": (r) => r >= 12800 && r <= 13055, "CJK Compatibility": (r) => r >= 13056 && r <= 13311, "CJK Unified Ideographs Extension A": (r) => r >= 13312 && r <= 19903, "Yijing Hexagram Symbols": (r) => r >= 19904 && r <= 19967, "CJK Unified Ideographs": (r) => r >= 19968 && r <= 40959, "Yi Syllables": (r) => r >= 40960 && r <= 42127, "Yi Radicals": (r) => r >= 42128 && r <= 42191, "Hangul Jamo Extended-A": (r) => r >= 43360 && r <= 43391, "Hangul Syllables": (r) => r >= 44032 && r <= 55215, "Hangul Jamo Extended-B": (r) => r >= 55216 && r <= 55295, "Private Use Area": (r) => r >= 57344 && r <= 63743, "CJK Compatibility Ideographs": (r) => r >= 63744 && r <= 64255, "Arabic Presentation Forms-A": (r) => r >= 64336 && r <= 65023, "Vertical Forms": (r) => r >= 65040 && r <= 65055, "CJK Compatibility Forms": (r) => r >= 65072 && r <= 65103, "Small Form Variants": (r) => r >= 65104 && r <= 65135, "Arabic Presentation Forms-B": (r) => r >= 65136 && r <= 65279, "Halfwidth and Fullwidth Forms": (r) => r >= 65280 && r <= 65519, Osage: (r) => r >= 66736 && r <= 66815, "CJK Unified Ideographs Extension B": (r) => r >= 131072 && r <= 173791 }; - function md(r) { - for (const e of r) - if (su(e.charCodeAt(0))) - return !0; - return !1; - } - function Kf(r) { - for (const e of r) - if (!Jf(e.charCodeAt(0))) - return !1; - return !0; - } - function Jf(r) { - return !(Zt.Arabic(r) || Zt["Arabic Supplement"](r) || Zt["Arabic Extended-A"](r) || Zt["Arabic Presentation Forms-A"](r) || Zt["Arabic Presentation Forms-B"](r)); - } - function su(r) { - return !(r !== 746 && r !== 747 && (r < 4352 || !(Zt["Bopomofo Extended"](r) || Zt.Bopomofo(r) || Zt["CJK Compatibility Forms"](r) && !(r >= 65097 && r <= 65103) || Zt["CJK Compatibility Ideographs"](r) || Zt["CJK Compatibility"](r) || Zt["CJK Radicals Supplement"](r) || Zt["CJK Strokes"](r) || !(!Zt["CJK Symbols and Punctuation"](r) || r >= 12296 && r <= 12305 || r >= 12308 && r <= 12319 || r === 12336) || Zt["CJK Unified Ideographs Extension A"](r) || Zt["CJK Unified Ideographs"](r) || Zt["Enclosed CJK Letters and Months"](r) || Zt["Hangul Compatibility Jamo"](r) || Zt["Hangul Jamo Extended-A"](r) || Zt["Hangul Jamo Extended-B"](r) || Zt["Hangul Jamo"](r) || Zt["Hangul Syllables"](r) || Zt.Hiragana(r) || Zt["Ideographic Description Characters"](r) || Zt.Kanbun(r) || Zt["Kangxi Radicals"](r) || Zt["Katakana Phonetic Extensions"](r) || Zt.Katakana(r) && r !== 12540 || !(!Zt["Halfwidth and Fullwidth Forms"](r) || r === 65288 || r === 65289 || r === 65293 || r >= 65306 && r <= 65310 || r === 65339 || r === 65341 || r === 65343 || r >= 65371 && r <= 65503 || r === 65507 || r >= 65512 && r <= 65519) || !(!Zt["Small Form Variants"](r) || r >= 65112 && r <= 65118 || r >= 65123 && r <= 65126) || Zt["Unified Canadian Aboriginal Syllabics"](r) || Zt["Unified Canadian Aboriginal Syllabics Extended"](r) || Zt["Vertical Forms"](r) || Zt["Yijing Hexagram Symbols"](r) || Zt["Yi Syllables"](r) || Zt["Yi Radicals"](r)))); - } - function _d(r) { - return !(su(r) || function(e) { - return !!(Zt["Latin-1 Supplement"](e) && (e === 167 || e === 169 || e === 174 || e === 177 || e === 188 || e === 189 || e === 190 || e === 215 || e === 247) || Zt["General Punctuation"](e) && (e === 8214 || e === 8224 || e === 8225 || e === 8240 || e === 8241 || e === 8251 || e === 8252 || e === 8258 || e === 8263 || e === 8264 || e === 8265 || e === 8273) || Zt["Letterlike Symbols"](e) || Zt["Number Forms"](e) || Zt["Miscellaneous Technical"](e) && (e >= 8960 && e <= 8967 || e >= 8972 && e <= 8991 || e >= 8996 && e <= 9e3 || e === 9003 || e >= 9085 && e <= 9114 || e >= 9150 && e <= 9165 || e === 9167 || e >= 9169 && e <= 9179 || e >= 9186 && e <= 9215) || Zt["Control Pictures"](e) && e !== 9251 || Zt["Optical Character Recognition"](e) || Zt["Enclosed Alphanumerics"](e) || Zt["Geometric Shapes"](e) || Zt["Miscellaneous Symbols"](e) && !(e >= 9754 && e <= 9759) || Zt["Miscellaneous Symbols and Arrows"](e) && (e >= 11026 && e <= 11055 || e >= 11088 && e <= 11097 || e >= 11192 && e <= 11243) || Zt["CJK Symbols and Punctuation"](e) || Zt.Katakana(e) || Zt["Private Use Area"](e) || Zt["CJK Compatibility Forms"](e) || Zt["Small Form Variants"](e) || Zt["Halfwidth and Fullwidth Forms"](e) || e === 8734 || e === 8756 || e === 8757 || e >= 9984 && e <= 10087 || e >= 10102 && e <= 10131 || e === 65532 || e === 65533); - }(r)); - } - function ru(r) { - return r >= 1424 && r <= 2303 || Zt["Arabic Presentation Forms-A"](r) || Zt["Arabic Presentation Forms-B"](r); - } - function gd(r, e) { - return !(!e && ru(r) || r >= 2304 && r <= 3583 || r >= 3840 && r <= 4255 || Zt.Khmer(r)); - } - function Qf(r) { - for (const e of r) - if (ru(e.charCodeAt(0))) - return !0; - return !1; - } - const yd = "deferred", ea = "loading", xd = "loaded"; - let vd = null, br = "unavailable", qa = null; - const th = function(r) { - r && typeof r == "string" && r.indexOf("NetworkError") > -1 && (br = "error"), vd && vd(r); - }; - function ou() { - oc.fire(new Ar("pluginStateChange", { pluginStatus: br, pluginURL: qa })); - } - const oc = new Zo(), au = function() { - return br; - }, ep = function() { - if (br !== yd || !qa) - throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified"); - br = ea, ou(), qa && no({ url: qa }, (r) => { - r ? th(r) : (br = xd, ou()); - }); - }, co = { applyArabicShaping: null, processBidirectionalText: null, processStyledBidirectionalText: null, isLoaded: () => br === xd || co.applyArabicShaping != null, isLoading: () => br === ea, setState(r) { - br = r.pluginStatus, qa = r.pluginURL; - }, isParsed: () => co.applyArabicShaping != null && co.processBidirectionalText != null && co.processStyledBidirectionalText != null, getPluginURL: () => qa }; - class Tn { - constructor(e, n) { - this.zoom = e, n ? (this.now = n.now, this.fadeDuration = n.fadeDuration, this.transition = n.transition, this.pitch = n.pitch, this.brightness = n.brightness) : (this.now = 0, this.fadeDuration = 0, this.transition = {}, this.pitch = 0, this.brightness = 0); - } - isSupportedScript(e) { - return function(n, o) { - for (const u of n) - if (!gd(u.charCodeAt(0), o)) - return !1; - return !0; - }(e, co.isLoaded()); - } - } - class ac { - constructor(e, n, o, u) { - this.property = e, this.value = n, this.expression = function(l, f, v, S) { - if (Qh(l)) - return new iu(l, f); - if (tu(l) || Array.isArray(l) && l.length > 0) { - const D = ud(l, f, v, S); - if (D.result === "error") - throw new Error(D.value.map((x) => `${x.key}: ${x.message}`).join(", ")); - return D.value; - } - { - let D = l; - return typeof l == "string" && f.type === "color" && (D = ki.parse(l)), { kind: "constant", configDependencies: /* @__PURE__ */ new Set(), evaluate: () => D }; - } - }(n === void 0 ? e.specification.default : n, e.specification, o, u); - } - isDataDriven() { - return this.expression.kind === "source" || this.expression.kind === "composite"; - } - possiblyEvaluate(e, n, o) { - return this.property.possiblyEvaluate(this, e, n, o); - } - } - class lu { - constructor(e, n, o) { - this.property = e, this.value = new ac(e, void 0, n, o); - } - transitioned(e, n) { - return new Ml(this.property, this.value, n, An({}, e.transition, this.transition), e.now); - } - untransitioned() { - return new Ml(this.property, this.value, null, {}, 0); - } - } - class ih { - constructor(e, n, o) { - this._properties = e, this._values = Object.create(e.defaultTransitionablePropertyValues), this._scope = n, this._options = o, this.configDependencies = /* @__PURE__ */ new Set(); - } - getValue(e) { - return Ys(this._values[e].value.value); - } - setValue(e, n) { - this._values.hasOwnProperty(e) || (this._values[e] = new lu(this._values[e].property, this._scope, this._options)), this._values[e].value = new ac(this._values[e].property, n === null ? void 0 : Ys(n), this._scope, this._options), this._values[e].value.expression.configDependencies && (this.configDependencies = /* @__PURE__ */ new Set([...this.configDependencies, ...this._values[e].value.expression.configDependencies])); - } - setTransitionOrValue(e, n) { - n && (this._options = n); - const o = this._properties.properties; - if (e) - for (const u in e) { - const l = e[u]; - if (yr(u, "-transition")) { - const f = u.slice(0, -11); - o[f] && this.setTransition(f, l); - } else - o.hasOwnProperty(u) && this.setValue(u, l); - } - } - getTransition(e) { - return Ys(this._values[e].transition); - } - setTransition(e, n) { - this._values.hasOwnProperty(e) || (this._values[e] = new lu(this._values[e].property)), this._values[e].transition = Ys(n) || void 0; - } - serialize() { - const e = {}; - for (const n of Object.keys(this._values)) { - const o = this.getValue(n); - o !== void 0 && (e[n] = o); - const u = this.getTransition(n); - u !== void 0 && (e[`${n}-transition`] = u); - } - return e; - } - transitioned(e, n) { - const o = new tp(this._properties); - for (const u of Object.keys(this._values)) - o._values[u] = this._values[u].transitioned(e, n._values[u]); - return o; - } - untransitioned() { - const e = new tp(this._properties); - for (const n of Object.keys(this._values)) - e._values[n] = this._values[n].untransitioned(); - return e; - } - } - class Ml { - constructor(e, n, o, u, l) { - const f = u.delay || 0, v = u.duration || 0; - l = l || 0, this.property = e, this.value = n, this.begin = l + f, this.end = this.begin + v, e.specification.transition && (u.delay || u.duration) && (this.prior = o); - } - possiblyEvaluate(e, n, o) { - const u = e.now || 0, l = this.value.possiblyEvaluate(e, n, o), f = this.prior; - if (f) { - if (u > this.end) - return this.prior = null, l; - if (this.value.isDataDriven()) - return this.prior = null, l; - if (u < this.begin) - return f.possiblyEvaluate(e, n, o); - { - const v = (u - this.begin) / (this.end - this.begin); - return this.property.interpolate(f.possiblyEvaluate(e, n, o), l, Hr(v)); - } - } - return l; - } - } - class tp { - constructor(e) { - this._properties = e, this._values = Object.create(e.defaultTransitioningPropertyValues); - } - possiblyEvaluate(e, n, o) { - const u = new cc(this._properties); - for (const l of Object.keys(this._values)) - u._values[l] = this._values[l].possiblyEvaluate(e, n, o); - return u; - } - hasTransition() { - for (const e of Object.keys(this._values)) - if (this._values[e].prior) - return !0; - return !1; - } - } - class e_ { - constructor(e, n, o) { - this._properties = e, this._values = Object.create(e.defaultPropertyValues), this._scope = n, this._options = o, this.configDependencies = /* @__PURE__ */ new Set(); - } - getValue(e) { - return Ys(this._values[e].value); - } - setValue(e, n) { - this._values[e] = new ac(this._values[e].property, n === null ? void 0 : Ys(n), this._scope, this._options), this._values[e].expression.configDependencies && (this.configDependencies = /* @__PURE__ */ new Set([...this.configDependencies, ...this._values[e].expression.configDependencies])); - } - serialize() { - const e = {}; - for (const n of Object.keys(this._values)) { - const o = this.getValue(n); - o !== void 0 && (e[n] = o); - } - return e; - } - possiblyEvaluate(e, n, o) { - const u = new cc(this._properties); - for (const l of Object.keys(this._values)) - u._values[l] = this._values[l].possiblyEvaluate(e, n, o); - return u; - } - } - class lc { - constructor(e, n, o) { - this.property = e, this.value = n, this.parameters = o; - } - isConstant() { - return this.value.kind === "constant"; - } - constantOr(e) { - return this.value.kind === "constant" ? this.value.value : e; - } - evaluate(e, n, o, u) { - return this.property.evaluate(this.value, this.parameters, e, n, o, u); - } - } - class cc { - constructor(e) { - this._properties = e, this._values = Object.create(e.defaultPossiblyEvaluatedValues); - } - get(e) { - return this._values[e]; - } - } - class yt { - constructor(e) { - this.specification = e; - } - possiblyEvaluate(e, n) { - return e.expression.evaluate(n); - } - interpolate(e, n, o) { - const u = Oi[this.specification.type]; - return u ? u(e, n, o) : e; - } - } - class Dt { - constructor(e, n) { - this.specification = e, this.overrides = n; - } - possiblyEvaluate(e, n, o, u) { - return new lc(this, e.expression.kind === "constant" || e.expression.kind === "camera" ? { kind: "constant", value: e.expression.evaluate(n, null, {}, o, u) } : e.expression, n); - } - interpolate(e, n, o) { - if (e.value.kind !== "constant" || n.value.kind !== "constant") - return e; - if (e.value.value === void 0 || n.value.value === void 0) - return new lc(this, { kind: "constant", value: void 0 }, e.parameters); - const u = Oi[this.specification.type]; - return u ? new lc(this, { kind: "constant", value: u(e.value.value, n.value.value, o) }, e.parameters) : e; - } - evaluate(e, n, o, u, l, f) { - return e.kind === "constant" ? e.value : e.evaluate(n, o, u, l, f); - } - } - class Wa { - constructor(e) { - this.specification = e; - } - possiblyEvaluate(e, n, o, u) { - return !!e.expression.evaluate(n, null, {}, o, u); - } - interpolate() { - return !1; - } - } - class Bn { - constructor(e) { - this.properties = e, this.defaultPropertyValues = {}, this.defaultTransitionablePropertyValues = {}, this.defaultTransitioningPropertyValues = {}, this.defaultPossiblyEvaluatedValues = {}, this.overridableProperties = []; - const n = new Tn(0, {}); - for (const o in e) { - const u = e[o]; - u.specification.overridable && this.overridableProperties.push(o); - const l = this.defaultPropertyValues[o] = new ac(u, void 0), f = this.defaultTransitionablePropertyValues[o] = new lu(u); - this.defaultTransitioningPropertyValues[o] = f.untransitioned(), this.defaultPossiblyEvaluatedValues[o] = l.possiblyEvaluate(n); - } - } - } - Ft(Dt, "DataDrivenProperty"), Ft(yt, "DataConstantProperty"), Ft(Wa, "ColorRampProperty"); - var $e = JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"fragment":{"type":"boolean"},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360},"pitch":{"type":"number","default":0},"light":{"type":"light"},"lights":{"required":false,"type":"array","value":"light-3d"},"terrain":{"type":"terrain","optional":true},"fog":{"type":"fog"},"snow":{"type":"snow","experimental":true},"rain":{"type":"rain","experimental":true},"camera":{"type":"camera"},"color-theme":{"type":"colorTheme"},"indoor":{"type":"indoor","experimental":true},"imports":{"type":"array","value":"import"},"schema":{"type":"schema"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string","default":"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"},"models":{"type":"models"},"featuresets":{"experimental":true,"type":"featuresets"}},"featuresets":{"experimental":true,"*":{"type":"featureset"}},"featureset":{"experimental":true,"metadata":{"type":"*"},"selectors":{"type":"array","value":"selector"}},"selector":{"experimental":true,"layer":{"type":"string","required":true},"properties":{"type":"selectorProperty","required":false},"featureNamespace":{"type":"string","required":false}},"selectorProperty":{"experimental":true,"*":{"type":"*"}},"model":{"type":"string","required":true},"import":{"id":{"type":"string","required":true},"url":{"type":"string","required":true},"config":{"type":"config"},"data":{"type":"$root"},"color-theme":{"type":"colorTheme","optional":true}},"config":{"*":{"type":"*"}},"schema":{"*":{"type":"option"}},"option":{"default":{"type":"*","property-type":"data-constant","expression":{},"required":true},"type":{"type":"enum","values":{"string":1,"number":1,"boolean":1,"color":1}},"array":{"type":"boolean"},"minValue":{"type":"number"},"maxValue":{"type":"number"},"stepValue":{"type":"number"},"values":{"type":"array","value":"*"},"metadata":{"type":"*"}},"models":{"*":{"type":"model"}},"light-3d":{"id":{"type":"string","required":true},"properties":{"type":"properties"},"type":{"type":"enum","values":{"ambient":{},"directional":{},"flat":{}}}},"properties":["properties_light_directional","properties_light_ambient","properties_light_flat"],"properties_light_directional":{"direction":{"type":"array","default":[210,30],"minimum":[0,0],"maximum":[360,90],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"cast-shadows":{"type":"boolean","default":false,"property-type":"data-constant"},"shadow-quality":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1,"expression":{"parameters":["zoom"]},"experimental":true},"shadow-intensity":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_ambient":{"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_flat":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_raster_array","source_geojson","source_video","source_image","source_model"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":1,"mapbox":1},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_array":{"experimental":true,"type":{"required":true,"type":"enum","values":{"raster-array":1}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512},"attribution":{"type":"string"},"rasterLayers":{"type":"*"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":1}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"},"dynamic":{"type":"boolean","default":false}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":1}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":1}},"url":{"required":false,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_model":{"type":{"required":true,"type":"enum","values":{"model":1,"batched-model":1}},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"tiles":{"type":"array","value":"string"}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"raster-particle":{"experimental":true},"hillshade":{},"model":{"experimental":true},"background":{},"sky":{},"slot":{},"clip":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"slot":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_clip","layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_raster-particle","layout_hillshade","layout_background","layout_sky","layout_model"],"layout_background":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_model":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"model-id":{"type":"string","default":"","property-type":"data-driven","expression":{"parameters":["zoom","feature"]}}},"layout_clip":{"clip-layer-types":{"type":"array","value":"enum","values":{"model":1,"symbol":1},"default":[],"expression":{},"property-type":"data-constant"},"clip-layer-scope":{"type":"array","value":"string","default":[],"expression":{},"property-type":"data-constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"fill-elevation-reference":{"type":"enum","values":{"none":1,"hd-road-base":1,"hd-road-markup":1},"default":"none","experimental":true,"private":true,"expression":{},"property-type":"data-constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","experimental":true,"default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":1,"round":1,"square":1},"default":"butt","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":1,"round":1,"miter":1,"none":1},"default":"miter","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-z-offset":{"type":"number","experimental":true,"default":0,"expression":{"parameters":["zoom","feature","line-progress"]},"property-type":"data-driven"},"line-elevation-reference":{"type":"enum","values":{"none":1,"sea":1,"ground":1,"hd-road-markup":1},"default":"none","experimental":true,"expression":{},"property-type":"data-constant"},"line-cross-slope":{"type":"number","experimental":true,"expression":{},"property-type":"constant"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"line-width-unit":{"type":"enum","values":{"pixels":1,"meters":1},"default":"pixels","experimental":true,"private":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":1,"line":1,"line-center":1},"default":"point","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":1,"viewport-y":1,"source":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-z-elevate":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-elevation-reference":{"type":"enum","values":{"sea":1,"ground":1,"hd-road-markup":1},"default":"ground","experimental":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-size-scale-range":{"type":"array","value":"number","length":2,"default":[0.8,2],"minimum":0.1,"maximum":10,"experimental":true,"private":true,"expression":{},"property-type":"data-constant"},"icon-text-fit":{"type":"enum","values":{"none":1,"width":1,"height":1,"both":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size-scale-range":{"type":"array","value":"number","length":2,"default":[0.8,2],"minimum":0.1,"maximum":10,"experimental":true,"private":true,"expression":{},"property-type":"data-constant"},"text-max-width":{"type":"number","default":10,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":1,"left":1,"center":1,"right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","default":0,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":1,"vertical":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":1,"uppercase":1,"lowercase":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_raster-particle":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_hillshade":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_raster":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_raster-particle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_clip":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_model":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":1,"!=":1,">":1,">=":1,"<":1,"<=":1,"in":1,"!in":1,"all":1,"any":1,"none":1,"has":1,"!has":1}},"geometry_type":{"type":"enum","values":{"Point":1,"LineString":1,"Polygon":1}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":1,"exponential":1,"interval":1,"categorical":1},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":1,"lab":1,"hcl":1},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vertical-range":{"type":"array","default":[0,0],"minimum":0,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}}},"snow":{"density":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],11,0,13,0.85],"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"opacity":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],11,0,13,0.3],"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette-color":{"type":"color","property-type":"data-constant","default":"#ffffff","experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"center-thinning":{"type":"number","property-type":"data-constant","default":0.4,"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"direction":{"type":"array","default":[0,50],"minimum":0,"maximum":360,"length":2,"value":"number","property-type":"data-constant","transition":true,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"flake-size":{"type":"number","property-type":"data-constant","default":0.71,"minimum":0,"maximum":5,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true}},"rain":{"density":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],11,0,13,0.5],"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["measure-light","brightness"],0,"#03113d",0.3,"#a8adbc"],"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"opacity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["measure-light","brightness"],0,0.88,1,0.7],"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],11,0,13,1],"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vignette-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["measure-light","brightness"],0,"#001736",0.3,"#464646"],"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"center-thinning":{"type":"number","property-type":"data-constant","default":0.57,"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"direction":{"type":"array","default":[0,80],"minimum":0,"maximum":360,"length":2,"value":"number","property-type":"data-constant","transition":true,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"droplet-size":{"type":"array","default":[2.6,18.2],"minimum":0,"maximum":50,"length":2,"value":"number","property-type":"data-constant","transition":true,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"distortion-strength":{"type":"number","property-type":"data-constant","default":0.7,"minimum":0,"maximum":1,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true}},"camera":{"camera-projection":{"type":"enum","values":{"perspective":1,"orthographic":1},"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"default":"perspective","property-type":"data-constant"}},"colorTheme":{"data":{"type":"string","property-type":"data-constant","expression":{}}},"indoor":{"floorplanFeaturesetId":{"type":"string","experimental":true,"property-type":"data-constant","expression":{}},"buildingFeaturesetId":{"type":"string","experimental":true,"property-type":"data-constant","expression":{}}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":1,"equalEarth":1,"equirectangular":1,"lambertConformalConic":1,"mercator":1,"naturalEarth":1,"winkelTripel":1,"globe":1},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_raster-particle","paint_hillshade","paint_background","paint_sky","paint_model"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"fill-z-offset":{"type":"number","default":0,"minimum":0,"transition":true,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-height-alignment":{"type":"enum","experimental":true,"values":{"terrain":1,"flat":1},"default":"flat","property-type":"data-constant"},"fill-extrusion-base-alignment":{"type":"enum","experimental":true,"values":{"terrain":1,"flat":1},"default":"terrain","property-type":"data-constant"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-wall-radius":{"property-type":"data-constant","type":"number","experimental":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-radius":{"property-type":"data-constant","type":"number","experimental":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-attenuation":{"property-type":"data-constant","type":"number","experimental":true,"default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-flood-light-color":{"property-type":"data-constant","type":"color","experimental":true,"default":"#ffffff","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-intensity":{"property-type":"data-constant","type":"number","experimental":true,"default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-wall-radius":{"property-type":"data-driven","type":"number","experimental":true,"default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-radius":{"property-type":"data-driven","type":"number","experimental":true,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-attenuation":{"property-type":"data-constant","type":"number","experimental":true,"default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-vertical-scale":{"property-type":"data-constant","type":"number","experimental":true,"default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-rounded-roof":{"property-type":"data-constant","type":"boolean","default":true,"experimental":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"fill-extrusion-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"fill-extrusion-line-width":{"type":"number","default":0,"minimum":0,"transition":true,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-cast-shadows":{"type":"boolean","default":true,"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light","line-progress"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"property-type":"constant"},"line-trim-fade-range":{"type":"array","value":"number","experimental":true,"length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-trim-color":{"type":"color","experimental":true,"default":"transparent","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-border-width":{"type":"number","private":true,"default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-border-color":{"type":"color","private":true,"default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-occlusion-opacity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"property-type":"data-constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-occlusion-opacity":{"type":"number","minimum":0,"maximum":1,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"text-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-image-cross-fade":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"transition":true},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-occlusion-opacity":{"type":"number","minimum":0,"maximum":1,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-color-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"expression":{},"property-type":"data-constant"},"icon-color-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"expression":{},"property-type":"data-constant"},"icon-color-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"icon-color-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"symbol-z-offset":{"type":"number","default":0,"minimum":0,"transition":true,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-value"]},"property-type":"color-ramp"},"raster-color-mix":{"type":"array","default":[0.2126,0.7152,0.0722,0],"length":4,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color-range":{"type":"array","length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":1,"nearest":1},"default":"linear","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"raster-array-band":{"type":"string","required":false,"experimental":true,"property-type":"data-constant"},"raster-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster-particle":{"raster-particle-array-band":{"type":"string","required":false,"property-type":"data-constant"},"raster-particle-count":{"type":"number","default":512,"minimum":1,"property-type":"data-constant"},"raster-particle-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-particle-speed"]},"property-type":"color-ramp"},"raster-particle-max-speed":{"type":"number","default":1,"minimum":1,"property-type":"data-constant"},"raster-particle-speed-factor":{"type":"number","default":0.2,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-particle-fade-opacity-factor":{"type":"number","default":0.98,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-particle-reset-rate-factor":{"type":"number","default":0.8,"minimum":0,"maximum":1,"property-type":"data-constant"},"raster-particle-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_background":{"background-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":[]},"experimental":true,"property-type":"data-constant"},"background-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":1,"atmosphere":1},"default":"atmosphere","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","default":10,"minimum":0,"maximum":100,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","value":"number","default":[0,0],"length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","default":90,"minimum":0,"maximum":180,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_model":{"model-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"property-type":"data-driven"},"model-rotation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-scale":{"type":"array","value":"number","length":3,"default":[1,1,1],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-translation":{"type":"array","value":"number","length":3,"default":[0,0,0],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-color":{"type":"color","default":"#ffffff","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light","zoom"]},"transition":true},"model-color-mix-intensity":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-type":{"type":"enum","values":{"common-3d":1,"location-indicator":1},"default":"common-3d","property-type":"data-constant"},"model-cast-shadows":{"type":"boolean","default":true,"property-type":"data-constant"},"model-receive-shadows":{"type":"boolean","default":true,"property-type":"data-constant"},"model-ambient-occlusion-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant","transition":true},"model-emissive-strength":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-roughness":{"type":"number","default":1,"minimum":0,"maximum":1,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"transition":true},"model-height-based-emissive-strength-multiplier":{"type":"array","default":[1,1,1,1,0],"length":5,"value":"number","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"model-front-cutoff":{"type":"array","private":true,"value":"number","property-type":"data-constant","expression":{"interpolated":true,"parameters":["zoom"]},"length":3,"default":[0,0,1],"minimum":[0,0,0],"maximum":[1,1,1]}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}'); - function ip(r) { - return r instanceof Number || r instanceof String || r instanceof Boolean ? r.valueOf() : r; - } - function cu(r) { - if (Array.isArray(r)) - return r.map(cu); - if (r instanceof Object && !(r instanceof Number || r instanceof String || r instanceof Boolean)) { - const e = {}; - for (const n in r) - e[n] = cu(r[n]); - return e; - } - return ip(r); - } - function bd(r) { - if (r === !0 || r === !1) - return !0; - if (!Array.isArray(r) || r.length === 0) - return !1; - switch (r[0]) { - case "has": - return r.length >= 2 && r[1] !== "$id" && r[1] !== "$type"; - case "in": - return r.length >= 3 && (typeof r[1] != "string" || Array.isArray(r[2])); - case "!in": - case "!has": - case "none": - return !1; - case "==": - case "!=": - case ">": - case ">=": - case "<": - case "<=": - return r.length !== 3 || Array.isArray(r[1]) || Array.isArray(r[2]); - case "any": - case "all": - for (const e of r.slice(1)) - if (!bd(e) && typeof e != "boolean") - return !1; - return !0; - default: - return !0; - } - } - function np(r, e = "", n = null, o = "fill") { - if (r == null) - return { filter: () => !0, needGeometry: !1, needFeature: !1 }; - bd(r) || (r = nh(r)); - const u = r; - let l = !0; - try { - l = function(x) { - if (!hc(x)) - return x; - let P = cu(x); - return rp(P), P = sp(P), P; - }(u); - } catch { - console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate. -This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md -and paste the contents of this message in the report. -Thank you! -Filter Expression: -${JSON.stringify(u, null, 2)} - `); - } - let f = null, v = null; - if (o !== "background" && o !== "sky" && o !== "slot") { - v = $e[`filter_${o}`]; - const x = Qc(l, v, e, n); - if (x.result === "error") - throw new Error(x.value.map((P) => `${P.key}: ${P.message}`).join(", ")); - f = (P, I, M) => x.value.evaluate(P, I, {}, M); - } - let S = null, D = null; - if (l !== u) { - const x = Qc(u, v, e, n); - if (x.result === "error") - throw new Error(x.value.map((P) => `${P.key}: ${P.message}`).join(", ")); - S = (P, I, M, C, k) => x.value.evaluate(P, I, {}, M, void 0, void 0, C, k), D = !ro(x.value.expression); - } - return { filter: f, dynamicFilter: S || void 0, needGeometry: Sl(l), needFeature: !!D }; - } - function sp(r) { - if (!Array.isArray(r)) - return r; - const e = function(n) { - if (t_.has(n[0])) { - for (let o = 1; o < n.length; o++) - if (hc(n[o])) - return !0; - } - return n; - }(r); - return e === !0 ? e : e.map((n) => sp(n)); - } - function rp(r) { - let e = !1; - const n = []; - if (r[0] === "case") { - for (let o = 1; o < r.length - 1; o += 2) - e = e || hc(r[o]), n.push(r[o + 1]); - n.push(r[r.length - 1]); - } else if (r[0] === "match") { - e = e || hc(r[1]); - for (let o = 2; o < r.length - 1; o += 2) - n.push(r[o + 1]); - n.push(r[r.length - 1]); - } else if (r[0] === "step") { - e = e || hc(r[1]); - for (let o = 1; o < r.length - 1; o += 2) - n.push(r[o + 1]); - } - e && (r.length = 0, r.push("any", ...n)); - for (let o = 1; o < r.length; o++) - rp(r[o]); - } - function hc(r) { - if (!Array.isArray(r)) - return !1; - if ((e = r[0]) === "pitch" || e === "distance-from-center") - return !0; - var e; - for (let n = 1; n < r.length; n++) - if (hc(r[n])) - return !0; - return !1; - } - const t_ = /* @__PURE__ */ new Set(["in", "==", "!=", ">", ">=", "<", "<=", "to-boolean"]); - function i_(r, e) { - return r < e ? -1 : r > e ? 1 : 0; - } - function Sl(r) { - if (!Array.isArray(r)) - return !1; - if (r[0] === "within" || r[0] === "distance") - return !0; - for (let e = 1; e < r.length; e++) - if (Sl(r[e])) - return !0; - return !1; - } - function nh(r) { - if (!r) - return !0; - const e = r[0]; - return r.length <= 1 ? e !== "any" : e === "==" ? hu(r[1], r[2], "==") : e === "!=" ? uu(hu(r[1], r[2], "==")) : e === "<" || e === ">" || e === "<=" || e === ">=" ? hu(r[1], r[2], e) : e === "any" ? (n = r.slice(1), ["any"].concat(n.map(nh))) : e === "all" ? ["all"].concat(r.slice(1).map(nh)) : e === "none" ? ["all"].concat(r.slice(1).map(nh).map(uu)) : e === "in" ? sh(r[1], r.slice(2)) : e === "!in" ? uu(sh(r[1], r.slice(2))) : e === "has" ? op(r[1]) : e !== "!has" || uu(op(r[1])); - var n; - } - function hu(r, e, n) { - switch (r) { - case "$type": - return [`filter-type-${n}`, e]; - case "$id": - return [`filter-id-${n}`, e]; - default: - return [`filter-${n}`, r, e]; - } - } - function sh(r, e) { - if (e.length === 0) - return !1; - switch (r) { - case "$type": - return ["filter-type-in", ["literal", e]]; - case "$id": - return ["filter-id-in", ["literal", e]]; - default: - return e.length > 200 && !e.some((n) => typeof n != typeof e[0]) ? ["filter-in-large", r, ["literal", e.sort(i_)]] : ["filter-in-small", r, ["literal", e]]; - } - } - function op(r) { - switch (r) { - case "$type": - return !0; - case "$id": - return ["filter-has-id"]; - default: - return ["filter-has", r]; - } - } - function uu(r) { - return ["!", r]; - } - const Co = ""; - function Io(r, e) { - return e ? `${r}${Co}${e}` : r; - } - const El = "-transition", n_ = /* @__PURE__ */ new Set(["fill", "line", "background", "hillshade", "raster"]); - class wr extends Zo { - constructor(e, n, o, u, l) { - if (super(), this.id = e.id, this.fqid = Io(this.id, o), this.type = e.type, this.scope = o, this.lut = u, this.options = l, this._featureFilter = { filter: () => !0, needGeometry: !1, needFeature: !1 }, this._filterCompiled = !1, this.configDependencies = /* @__PURE__ */ new Set(), e.type !== "custom") { - if (this.metadata = e.metadata, this.minzoom = e.minzoom, this.maxzoom = e.maxzoom, e.type && e.type !== "background" && e.type !== "sky" && e.type !== "slot") { - this.source = e.source, this.sourceLayer = e["source-layer"], this.filter = e.filter; - const f = Qc(this.filter, $e[`filter_${e.type}`]); - f.result !== "error" && (this.configDependencies = /* @__PURE__ */ new Set([...this.configDependencies, ...f.value.configDependencies])); - } - if (e.slot && (this.slot = e.slot), n.layout && (this._unevaluatedLayout = new e_(n.layout, this.scope, l), this.configDependencies = /* @__PURE__ */ new Set([...this.configDependencies, ...this._unevaluatedLayout.configDependencies])), n.paint) { - this._transitionablePaint = new ih(n.paint, this.scope, l); - for (const f in e.paint) - this.setPaintProperty(f, e.paint[f]); - for (const f in e.layout) - this.setLayoutProperty(f, e.layout[f]); - this.configDependencies = /* @__PURE__ */ new Set([...this.configDependencies, ...this._transitionablePaint.configDependencies]), this._transitioningPaint = this._transitionablePaint.untransitioned(), this.paint = new cc(n.paint); - } - } - } - onAdd(e) { - } - onRemove(e) { - } - isDraped(e) { - return !this.is3D() && n_.has(this.type); - } - getLayoutProperty(e) { - return e === "visibility" ? this.visibility : this._unevaluatedLayout.getValue(e); - } - setLayoutProperty(e, n) { - if (this.type === "custom" && e === "visibility") - return void (this.visibility = n); - const o = this._unevaluatedLayout; - o._properties.properties[e] && (o.setValue(e, n), this.configDependencies = /* @__PURE__ */ new Set([...this.configDependencies, ...o.configDependencies]), e === "visibility" && this.possiblyEvaluateVisibility()); - } - possiblyEvaluateVisibility() { - this._unevaluatedLayout._values.visibility && (this.visibility = this._unevaluatedLayout._values.visibility.possiblyEvaluate({ zoom: 0 })); - } - getPaintProperty(e) { - return yr(e, El) ? this._transitionablePaint.getTransition(e.slice(0, -11)) : this._transitionablePaint.getValue(e); - } - setPaintProperty(e, n) { - const o = this._transitionablePaint, u = o._properties.properties; - if (yr(e, El)) { - const P = e.slice(0, -11); - return u[P] && o.setTransition(P, n || void 0), !1; - } - if (!u[e]) - return !1; - const l = o._values[e], f = l.value.isDataDriven(), v = l.value; - o.setValue(e, n), this.configDependencies = /* @__PURE__ */ new Set([...this.configDependencies, ...o.configDependencies]), this._handleSpecialPaintPropertyUpdate(e); - const S = o._values[e].value, D = S.isDataDriven(), x = yr(e, "pattern") || e === "line-dasharray"; - return D || f || x || this._handleOverridablePaintPropertyUpdate(e, v, S); - } - _handleSpecialPaintPropertyUpdate(e) { - } - getProgramIds() { - return null; - } - getDefaultProgramParams(e, n, o) { - return null; - } - _handleOverridablePaintPropertyUpdate(e, n, o) { - return !1; - } - isHidden(e) { - return !!(this.minzoom && e < this.minzoom) || !!(this.maxzoom && e >= this.maxzoom) || this.visibility === "none"; - } - updateTransitions(e) { - this._transitioningPaint = this._transitionablePaint.transitioned(e, this._transitioningPaint); - } - hasTransition() { - return this._transitioningPaint.hasTransition(); - } - recalculate(e, n) { - this._unevaluatedLayout && (this.layout = this._unevaluatedLayout.possiblyEvaluate(e, void 0, n)), this.paint = this._transitioningPaint.possiblyEvaluate(e, void 0, n); - } - serialize() { - return io({ id: this.id, type: this.type, slot: this.slot, source: this.source, "source-layer": this.sourceLayer, metadata: this.metadata, minzoom: this.minzoom, maxzoom: this.maxzoom, filter: this.filter, layout: this._unevaluatedLayout && this._unevaluatedLayout.serialize(), paint: this._transitionablePaint && this._transitionablePaint.serialize() }, (e, n) => !(e === void 0 || n === "layout" && !Object.keys(e).length || n === "paint" && !Object.keys(e).length)); - } - is3D() { - return !1; - } - isSky() { - return !1; - } - isTileClipped() { - return !1; - } - hasOffscreenPass() { - return !1; - } - hasShadowPass() { - return !1; - } - canCastShadows() { - return !1; - } - hasLightBeamPass() { - return !1; - } - cutoffRange() { - return 0; - } - tileCoverLift() { - return 0; - } - resize() { - } - isStateDependent() { - for (const e in this.paint._values) { - const n = this.paint.get(e); - if (n instanceof lc && nc(n.property.specification) && (n.value.kind === "source" || n.value.kind === "composite") && n.value.isStateDependent) - return !0; - } - return !1; - } - compileFilter(e) { - this._filterCompiled || (this._featureFilter = np(this.filter, this.scope, e), this._filterCompiled = !0); - } - invalidateCompiledFilter() { - this._filterCompiled = !1; - } - dynamicFilter() { - return this._featureFilter.dynamicFilter; - } - dynamicFilterNeedsFeature() { - return this._featureFilter.needFeature; - } - getLayerRenderingStats() { - return this._stats; - } - resetLayerRenderingStats(e) { - this._stats && (e.renderPass === "shadow" ? this._stats.numRenderedVerticesInShadowPass = 0 : this._stats.numRenderedVerticesInTransparentPass = 0); - } - queryRadius(e) { - } - queryIntersectsFeature(e, n, o, u, l, f, v, S, D) { - } - } - const s_ = { Int8: Int8Array, Uint8: Uint8Array, Int16: Int16Array, Uint16: Uint16Array, Int32: Int32Array, Uint32: Uint32Array, Float32: Float32Array }; - class rh { - constructor(e, n) { - this._structArray = e, this._pos1 = n * this.size, this._pos2 = this._pos1 / 2, this._pos4 = this._pos1 / 4, this._pos8 = this._pos1 / 8; - } - } - class bn { - constructor() { - this.isTransferred = !1, this.capacity = -1, this.resize(0); - } - static serialize(e, n) { - return e._trim(), n && (e.isTransferred = !0, n.add(e.arrayBuffer)), { length: e.length, arrayBuffer: e.arrayBuffer }; - } - static deserialize(e) { - const n = Object.create(this.prototype); - return n.arrayBuffer = e.arrayBuffer, n.length = e.length, n.capacity = e.arrayBuffer.byteLength / n.bytesPerElement, n._refreshViews(), n; - } - _trim() { - this.length !== this.capacity && (this.capacity = this.length, this.arrayBuffer = this.arrayBuffer.slice(0, this.length * this.bytesPerElement), this._refreshViews()); - } - clear() { - this.length = 0; - } - resize(e) { - this.reserve(e), this.length = e; - } - reserve(e) { - if (e > this.capacity) { - this.capacity = Math.max(e, Math.floor(5 * this.capacity), 128), this.arrayBuffer = new ArrayBuffer(this.capacity * this.bytesPerElement); - const n = this.uint8; - this._refreshViews(), n && this.uint8.set(n); - } - } - _refreshViews() { - throw new Error("StructArray#_refreshViews() must be implemented by each concrete StructArray layout"); - } - emplace(...e) { - throw new Error("StructArray#emplace() must be implemented by each concrete StructArray layout"); - } - emplaceBack(...e) { - throw new Error("StructArray#emplaceBack() must be implemented by each concrete StructArray layout"); - } - destroy() { - this.int8 = this.uint8 = this.int16 = this.uint16 = this.int32 = this.uint32 = this.float32 = null, this.arrayBuffer = null; - } - } - function qi(r, e = 1) { - let n = 0, o = 0; - return { members: r.map((u) => { - const l = s_[u.type].BYTES_PER_ELEMENT, f = n = du(n, Math.max(e, l)), v = u.components || 1; - return o = Math.max(o, l), n += l * v, { name: u.name, type: u.type, components: v, offset: f }; - }), size: du(n, Math.max(o, e)), alignment: e }; - } - function du(r, e) { - return Math.ceil(r / e) * e; - } - class Lo extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer); - } - emplaceBack(e, n) { - const o = this.length; - return this.resize(o + 1), this.emplace(o, e, n); - } - emplace(e, n, o) { - const u = 2 * e; - return this.int16[u + 0] = n, this.int16[u + 1] = o, e; - } - } - Lo.prototype.bytesPerElement = 4, Ft(Lo, "StructArrayLayout2i4"); - class oh extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer); - } - emplaceBack(e, n, o) { - const u = this.length; - return this.resize(u + 1), this.emplace(u, e, n, o); - } - emplace(e, n, o, u) { - const l = 3 * e; - return this.int16[l + 0] = n, this.int16[l + 1] = o, this.int16[l + 2] = u, e; - } - } - oh.prototype.bytesPerElement = 6, Ft(oh, "StructArrayLayout3i6"); - class $a extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u) { - const l = this.length; - return this.resize(l + 1), this.emplace(l, e, n, o, u); - } - emplace(e, n, o, u, l) { - const f = 4 * e; - return this.int16[f + 0] = n, this.int16[f + 1] = o, this.int16[f + 2] = u, this.int16[f + 3] = l, e; - } - } - $a.prototype.bytesPerElement = 8, Ft($a, "StructArrayLayout4i8"); - class wd extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l) { - const f = this.length; - return this.resize(f + 1), this.emplace(f, e, n, o, u, l); - } - emplace(e, n, o, u, l, f) { - const v = 5 * e; - return this.int16[v + 0] = n, this.int16[v + 1] = o, this.int16[v + 2] = u, this.int16[v + 3] = l, this.int16[v + 4] = f, e; - } - } - wd.prototype.bytesPerElement = 10, Ft(wd, "StructArrayLayout5i10"); - class ho extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v) { - const S = this.length; - return this.resize(S + 1), this.emplace(S, e, n, o, u, l, f, v); - } - emplace(e, n, o, u, l, f, v, S) { - const D = 6 * e, x = 12 * e, P = 3 * e; - return this.int16[D + 0] = n, this.int16[D + 1] = o, this.uint8[x + 4] = u, this.uint8[x + 5] = l, this.uint8[x + 6] = f, this.uint8[x + 7] = v, this.float32[P + 2] = S, e; - } - } - ho.prototype.bytesPerElement = 12, Ft(ho, "StructArrayLayout2i4ub1f12"); - class Xa extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u) { - const l = this.length; - return this.resize(l + 1), this.emplace(l, e, n, o, u); - } - emplace(e, n, o, u, l) { - const f = 4 * e; - return this.float32[f + 0] = n, this.float32[f + 1] = o, this.float32[f + 2] = u, this.float32[f + 3] = l, e; - } - } - Xa.prototype.bytesPerElement = 16, Ft(Xa, "StructArrayLayout4f16"); - class va extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o) { - const u = this.length; - return this.resize(u + 1), this.emplace(u, e, n, o); - } - emplace(e, n, o, u) { - const l = 3 * e; - return this.float32[l + 0] = n, this.float32[l + 1] = o, this.float32[l + 2] = u, e; - } - } - va.prototype.bytesPerElement = 12, Ft(va, "StructArrayLayout3f12"); - class Ya extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l) { - const f = this.length; - return this.resize(f + 1), this.emplace(f, e, n, o, u, l); - } - emplace(e, n, o, u, l, f) { - const v = 6 * e, S = 3 * e; - return this.uint16[v + 0] = n, this.uint16[v + 1] = o, this.uint16[v + 2] = u, this.uint16[v + 3] = l, this.float32[S + 2] = f, e; - } - } - Ya.prototype.bytesPerElement = 12, Ft(Ya, "StructArrayLayout4ui1f12"); - class fu extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u) { - const l = this.length; - return this.resize(l + 1), this.emplace(l, e, n, o, u); - } - emplace(e, n, o, u, l) { - const f = 4 * e; - return this.uint16[f + 0] = n, this.uint16[f + 1] = o, this.uint16[f + 2] = u, this.uint16[f + 3] = l, e; - } - } - fu.prototype.bytesPerElement = 8, Ft(fu, "StructArrayLayout4ui8"); - class pu extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f) { - const v = this.length; - return this.resize(v + 1), this.emplace(v, e, n, o, u, l, f); - } - emplace(e, n, o, u, l, f, v) { - const S = 6 * e; - return this.int16[S + 0] = n, this.int16[S + 1] = o, this.int16[S + 2] = u, this.int16[S + 3] = l, this.int16[S + 4] = f, this.int16[S + 5] = v, e; - } - } - pu.prototype.bytesPerElement = 12, Ft(pu, "StructArrayLayout6i12"); - class Td extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v, S, D, x, P, I) { - const M = this.length; - return this.resize(M + 1), this.emplace(M, e, n, o, u, l, f, v, S, D, x, P, I); - } - emplace(e, n, o, u, l, f, v, S, D, x, P, I, M) { - const C = 12 * e; - return this.int16[C + 0] = n, this.int16[C + 1] = o, this.int16[C + 2] = u, this.int16[C + 3] = l, this.uint16[C + 4] = f, this.uint16[C + 5] = v, this.uint16[C + 6] = S, this.uint16[C + 7] = D, this.int16[C + 8] = x, this.int16[C + 9] = P, this.int16[C + 10] = I, this.int16[C + 11] = M, e; - } - } - Td.prototype.bytesPerElement = 24, Ft(Td, "StructArrayLayout4i4ui4i24"); - class Md extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f) { - const v = this.length; - return this.resize(v + 1), this.emplace(v, e, n, o, u, l, f); - } - emplace(e, n, o, u, l, f, v) { - const S = 10 * e, D = 5 * e; - return this.int16[S + 0] = n, this.int16[S + 1] = o, this.int16[S + 2] = u, this.float32[D + 2] = l, this.float32[D + 3] = f, this.float32[D + 4] = v, e; - } - } - Md.prototype.bytesPerElement = 20, Ft(Md, "StructArrayLayout3i3f20"); - class Sd extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer); - } - emplaceBack(e) { - const n = this.length; - return this.resize(n + 1), this.emplace(n, e); - } - emplace(e, n) { - return this.uint32[1 * e + 0] = n, e; - } - } - Sd.prototype.bytesPerElement = 4, Ft(Sd, "StructArrayLayout1ul4"); - class Ka extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer); - } - emplaceBack(e, n) { - const o = this.length; - return this.resize(o + 1), this.emplace(o, e, n); - } - emplace(e, n, o) { - const u = 2 * e; - return this.uint16[u + 0] = n, this.uint16[u + 1] = o, e; - } - } - Ka.prototype.bytesPerElement = 4, Ft(Ka, "StructArrayLayout2ui4"); - class Ed extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v, S, D, x, P, I, M) { - const C = this.length; - return this.resize(C + 1), this.emplace(C, e, n, o, u, l, f, v, S, D, x, P, I, M); - } - emplace(e, n, o, u, l, f, v, S, D, x, P, I, M, C) { - const k = 20 * e, V = 10 * e; - return this.int16[k + 0] = n, this.int16[k + 1] = o, this.int16[k + 2] = u, this.int16[k + 3] = l, this.int16[k + 4] = f, this.float32[V + 3] = v, this.float32[V + 4] = S, this.float32[V + 5] = D, this.float32[V + 6] = x, this.int16[k + 14] = P, this.uint32[V + 8] = I, this.uint16[k + 18] = M, this.uint16[k + 19] = C, e; - } - } - Ed.prototype.bytesPerElement = 40, Ft(Ed, "StructArrayLayout5i4f1i1ul2ui40"); - class mu extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v) { - const S = this.length; - return this.resize(S + 1), this.emplace(S, e, n, o, u, l, f, v); - } - emplace(e, n, o, u, l, f, v, S) { - const D = 8 * e; - return this.int16[D + 0] = n, this.int16[D + 1] = o, this.int16[D + 2] = u, this.int16[D + 4] = l, this.int16[D + 5] = f, this.int16[D + 6] = v, this.int16[D + 7] = S, e; - } - } - mu.prototype.bytesPerElement = 16, Ft(mu, "StructArrayLayout3i2i2i16"); - class _u extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l) { - const f = this.length; - return this.resize(f + 1), this.emplace(f, e, n, o, u, l); - } - emplace(e, n, o, u, l, f) { - const v = 4 * e, S = 8 * e; - return this.float32[v + 0] = n, this.float32[v + 1] = o, this.float32[v + 2] = u, this.int16[S + 6] = l, this.int16[S + 7] = f, e; - } - } - _u.prototype.bytesPerElement = 16, Ft(_u, "StructArrayLayout2f1f2i16"); - class Pd extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f) { - const v = this.length; - return this.resize(v + 1), this.emplace(v, e, n, o, u, l, f); - } - emplace(e, n, o, u, l, f, v) { - const S = 20 * e, D = 5 * e; - return this.uint8[S + 0] = n, this.uint8[S + 1] = o, this.float32[D + 1] = u, this.float32[D + 2] = l, this.float32[D + 3] = f, this.float32[D + 4] = v, e; - } - } - Pd.prototype.bytesPerElement = 20, Ft(Pd, "StructArrayLayout2ub4f20"); - class qs extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer); - } - emplaceBack(e, n, o) { - const u = this.length; - return this.resize(u + 1), this.emplace(u, e, n, o); - } - emplace(e, n, o, u) { - const l = 3 * e; - return this.uint16[l + 0] = n, this.uint16[l + 1] = o, this.uint16[l + 2] = u, e; - } - } - qs.prototype.bytesPerElement = 6, Ft(qs, "StructArrayLayout3ui6"); - class Ad extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v, S, D, x, P, I, M, C, k, V, U, q, $, H, K) { - const Q = this.length; - return this.resize(Q + 1), this.emplace(Q, e, n, o, u, l, f, v, S, D, x, P, I, M, C, k, V, U, q, $, H, K); - } - emplace(e, n, o, u, l, f, v, S, D, x, P, I, M, C, k, V, U, q, $, H, K, Q) { - const ie = 30 * e, fe = 15 * e, de = 60 * e; - return this.int16[ie + 0] = n, this.int16[ie + 1] = o, this.int16[ie + 2] = u, this.float32[fe + 2] = l, this.float32[fe + 3] = f, this.uint16[ie + 8] = v, this.uint16[ie + 9] = S, this.uint32[fe + 5] = D, this.uint32[fe + 6] = x, this.uint32[fe + 7] = P, this.uint16[ie + 16] = I, this.uint16[ie + 17] = M, this.uint16[ie + 18] = C, this.float32[fe + 10] = k, this.float32[fe + 11] = V, this.uint8[de + 48] = U, this.uint8[de + 49] = q, this.uint8[de + 50] = $, this.uint32[fe + 13] = H, this.int16[ie + 28] = K, this.uint8[de + 58] = Q, e; - } - } - Ad.prototype.bytesPerElement = 60, Ft(Ad, "StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60"); - class gu extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v, S, D, x, P, I, M, C, k, V, U, q, $, H, K, Q, ie, fe, de, ue, Se, me, Ee, ze, Ie, Re) { - const Ve = this.length; - return this.resize(Ve + 1), this.emplace(Ve, e, n, o, u, l, f, v, S, D, x, P, I, M, C, k, V, U, q, $, H, K, Q, ie, fe, de, ue, Se, me, Ee, ze, Ie, Re); - } - emplace(e, n, o, u, l, f, v, S, D, x, P, I, M, C, k, V, U, q, $, H, K, Q, ie, fe, de, ue, Se, me, Ee, ze, Ie, Re, Ve) { - const Ue = 20 * e, Fe = 40 * e, et = 80 * e; - return this.float32[Ue + 0] = n, this.float32[Ue + 1] = o, this.int16[Fe + 4] = u, this.int16[Fe + 5] = l, this.int16[Fe + 6] = f, this.int16[Fe + 7] = v, this.int16[Fe + 8] = S, this.int16[Fe + 9] = D, this.int16[Fe + 10] = x, this.int16[Fe + 11] = P, this.int16[Fe + 12] = I, this.uint16[Fe + 13] = M, this.uint16[Fe + 14] = C, this.uint16[Fe + 15] = k, this.uint16[Fe + 16] = V, this.uint16[Fe + 17] = U, this.uint16[Fe + 18] = q, this.uint16[Fe + 19] = $, this.uint16[Fe + 20] = H, this.uint16[Fe + 21] = K, this.uint16[Fe + 22] = Q, this.uint16[Fe + 23] = ie, this.uint16[Fe + 24] = fe, this.uint16[Fe + 25] = de, this.uint16[Fe + 26] = ue, this.uint16[Fe + 27] = Se, this.uint32[Ue + 14] = me, this.float32[Ue + 15] = Ee, this.float32[Ue + 16] = ze, this.float32[Ue + 17] = Ie, this.float32[Ue + 18] = Re, this.uint8[et + 76] = Ve, e; - } - } - gu.prototype.bytesPerElement = 80, Ft(gu, "StructArrayLayout2f9i15ui1ul4f1ub80"); - class uc extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e) { - const n = this.length; - return this.resize(n + 1), this.emplace(n, e); - } - emplace(e, n) { - return this.float32[1 * e + 0] = n, e; - } - } - uc.prototype.bytesPerElement = 4, Ft(uc, "StructArrayLayout1f4"); - class Rr extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l) { - const f = this.length; - return this.resize(f + 1), this.emplace(f, e, n, o, u, l); - } - emplace(e, n, o, u, l, f) { - const v = 5 * e; - return this.float32[v + 0] = n, this.float32[v + 1] = o, this.float32[v + 2] = u, this.float32[v + 3] = l, this.float32[v + 4] = f, e; - } - } - Rr.prototype.bytesPerElement = 20, Ft(Rr, "StructArrayLayout5f20"); - class yu extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v) { - const S = this.length; - return this.resize(S + 1), this.emplace(S, e, n, o, u, l, f, v); - } - emplace(e, n, o, u, l, f, v, S) { - const D = 7 * e; - return this.float32[D + 0] = n, this.float32[D + 1] = o, this.float32[D + 2] = u, this.float32[D + 3] = l, this.float32[D + 4] = f, this.float32[D + 5] = v, this.float32[D + 6] = S, e; - } - } - yu.prototype.bytesPerElement = 28, Ft(yu, "StructArrayLayout7f28"); - class Cd extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v, S, D, x, P) { - const I = this.length; - return this.resize(I + 1), this.emplace(I, e, n, o, u, l, f, v, S, D, x, P); - } - emplace(e, n, o, u, l, f, v, S, D, x, P, I) { - const M = 11 * e; - return this.float32[M + 0] = n, this.float32[M + 1] = o, this.float32[M + 2] = u, this.float32[M + 3] = l, this.float32[M + 4] = f, this.float32[M + 5] = v, this.float32[M + 6] = S, this.float32[M + 7] = D, this.float32[M + 8] = x, this.float32[M + 9] = P, this.float32[M + 10] = I, e; - } - } - Cd.prototype.bytesPerElement = 44, Ft(Cd, "StructArrayLayout11f44"); - class Id extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v, S, D) { - const x = this.length; - return this.resize(x + 1), this.emplace(x, e, n, o, u, l, f, v, S, D); - } - emplace(e, n, o, u, l, f, v, S, D, x) { - const P = 9 * e; - return this.float32[P + 0] = n, this.float32[P + 1] = o, this.float32[P + 2] = u, this.float32[P + 3] = l, this.float32[P + 4] = f, this.float32[P + 5] = v, this.float32[P + 6] = S, this.float32[P + 7] = D, this.float32[P + 8] = x, e; - } - } - Id.prototype.bytesPerElement = 36, Ft(Id, "StructArrayLayout9f36"); - class Pl extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n) { - const o = this.length; - return this.resize(o + 1), this.emplace(o, e, n); - } - emplace(e, n, o) { - const u = 2 * e; - return this.float32[u + 0] = n, this.float32[u + 1] = o, e; - } - } - Pl.prototype.bytesPerElement = 8, Ft(Pl, "StructArrayLayout2f8"); - class ah extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u) { - const l = this.length; - return this.resize(l + 1), this.emplace(l, e, n, o, u); - } - emplace(e, n, o, u, l) { - const f = 6 * e; - return this.uint32[3 * e + 0] = n, this.uint16[f + 2] = o, this.uint16[f + 3] = u, this.uint16[f + 4] = l, e; - } - } - ah.prototype.bytesPerElement = 12, Ft(ah, "StructArrayLayout1ul3ui12"); - class xu extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer); - } - emplaceBack(e) { - const n = this.length; - return this.resize(n + 1), this.emplace(n, e); - } - emplace(e, n) { - return this.uint16[1 * e + 0] = n, e; - } - } - xu.prototype.bytesPerElement = 2, Ft(xu, "StructArrayLayout1ui2"); - class Ld extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v, S, D, x, P, I, M, C, k, V) { - const U = this.length; - return this.resize(U + 1), this.emplace(U, e, n, o, u, l, f, v, S, D, x, P, I, M, C, k, V); - } - emplace(e, n, o, u, l, f, v, S, D, x, P, I, M, C, k, V, U) { - const q = 16 * e; - return this.float32[q + 0] = n, this.float32[q + 1] = o, this.float32[q + 2] = u, this.float32[q + 3] = l, this.float32[q + 4] = f, this.float32[q + 5] = v, this.float32[q + 6] = S, this.float32[q + 7] = D, this.float32[q + 8] = x, this.float32[q + 9] = P, this.float32[q + 10] = I, this.float32[q + 11] = M, this.float32[q + 12] = C, this.float32[q + 13] = k, this.float32[q + 14] = V, this.float32[q + 15] = U, e; - } - } - Ld.prototype.bytesPerElement = 64, Ft(Ld, "StructArrayLayout16f64"); - class lh extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer); - } - emplaceBack(e, n, o, u, l, f, v) { - const S = this.length; - return this.resize(S + 1), this.emplace(S, e, n, o, u, l, f, v); - } - emplace(e, n, o, u, l, f, v, S) { - const D = 10 * e, x = 5 * e; - return this.uint16[D + 0] = n, this.uint16[D + 1] = o, this.uint16[D + 2] = u, this.uint16[D + 3] = l, this.float32[x + 2] = f, this.float32[x + 3] = v, this.float32[x + 4] = S, e; - } - } - lh.prototype.bytesPerElement = 20, Ft(lh, "StructArrayLayout4ui3f20"); - class zd extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer); - } - emplaceBack(e) { - const n = this.length; - return this.resize(n + 1), this.emplace(n, e); - } - emplace(e, n) { - return this.int16[1 * e + 0] = n, e; - } - } - zd.prototype.bytesPerElement = 2, Ft(zd, "StructArrayLayout1i2"); - class vu extends bn { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer); - } - emplaceBack(e) { - const n = this.length; - return this.resize(n + 1), this.emplace(n, e); - } - emplace(e, n) { - return this.uint8[1 * e + 0] = n, e; - } - } - vu.prototype.bytesPerElement = 1, Ft(vu, "StructArrayLayout1ub1"); - class ch extends rh { - get projectedAnchorX() { - return this._structArray.int16[this._pos2 + 0]; - } - get projectedAnchorY() { - return this._structArray.int16[this._pos2 + 1]; - } - get projectedAnchorZ() { - return this._structArray.int16[this._pos2 + 2]; - } - get tileAnchorX() { - return this._structArray.int16[this._pos2 + 3]; - } - get tileAnchorY() { - return this._structArray.int16[this._pos2 + 4]; - } - get x1() { - return this._structArray.float32[this._pos4 + 3]; - } - get y1() { - return this._structArray.float32[this._pos4 + 4]; - } - get x2() { - return this._structArray.float32[this._pos4 + 5]; - } - get y2() { - return this._structArray.float32[this._pos4 + 6]; - } - get padding() { - return this._structArray.int16[this._pos2 + 14]; - } - get featureIndex() { - return this._structArray.uint32[this._pos4 + 8]; - } - get sourceLayerIndex() { - return this._structArray.uint16[this._pos2 + 18]; - } - get bucketIndex() { - return this._structArray.uint16[this._pos2 + 19]; - } - } - ch.prototype.size = 40; - class ap extends Ed { - get(e) { - return new ch(this, e); - } - } - Ft(ap, "CollisionBoxArray"); - class lp extends rh { - get projectedAnchorX() { - return this._structArray.int16[this._pos2 + 0]; - } - get projectedAnchorY() { - return this._structArray.int16[this._pos2 + 1]; - } - get projectedAnchorZ() { - return this._structArray.int16[this._pos2 + 2]; - } - get tileAnchorX() { - return this._structArray.float32[this._pos4 + 2]; - } - get tileAnchorY() { - return this._structArray.float32[this._pos4 + 3]; - } - get glyphStartIndex() { - return this._structArray.uint16[this._pos2 + 8]; - } - get numGlyphs() { - return this._structArray.uint16[this._pos2 + 9]; - } - get vertexStartIndex() { - return this._structArray.uint32[this._pos4 + 5]; - } - get lineStartIndex() { - return this._structArray.uint32[this._pos4 + 6]; - } - get lineLength() { - return this._structArray.uint32[this._pos4 + 7]; - } - get segment() { - return this._structArray.uint16[this._pos2 + 16]; - } - get lowerSize() { - return this._structArray.uint16[this._pos2 + 17]; - } - get upperSize() { - return this._structArray.uint16[this._pos2 + 18]; - } - get lineOffsetX() { - return this._structArray.float32[this._pos4 + 10]; - } - get lineOffsetY() { - return this._structArray.float32[this._pos4 + 11]; - } - get writingMode() { - return this._structArray.uint8[this._pos1 + 48]; - } - get placedOrientation() { - return this._structArray.uint8[this._pos1 + 49]; - } - set placedOrientation(e) { - this._structArray.uint8[this._pos1 + 49] = e; - } - get hidden() { - return this._structArray.uint8[this._pos1 + 50]; - } - set hidden(e) { - this._structArray.uint8[this._pos1 + 50] = e; - } - get crossTileID() { - return this._structArray.uint32[this._pos4 + 13]; - } - set crossTileID(e) { - this._structArray.uint32[this._pos4 + 13] = e; - } - get associatedIconIndex() { - return this._structArray.int16[this._pos2 + 28]; - } - get flipState() { - return this._structArray.uint8[this._pos1 + 58]; - } - set flipState(e) { - this._structArray.uint8[this._pos1 + 58] = e; - } - } - lp.prototype.size = 60; - class cp extends Ad { - get(e) { - return new lp(this, e); - } - } - Ft(cp, "PlacedSymbolArray"); - class hp extends rh { - get tileAnchorX() { - return this._structArray.float32[this._pos4 + 0]; - } - get tileAnchorY() { - return this._structArray.float32[this._pos4 + 1]; - } - get projectedAnchorX() { - return this._structArray.int16[this._pos2 + 4]; - } - get projectedAnchorY() { - return this._structArray.int16[this._pos2 + 5]; - } - get projectedAnchorZ() { - return this._structArray.int16[this._pos2 + 6]; - } - get rightJustifiedTextSymbolIndex() { - return this._structArray.int16[this._pos2 + 7]; - } - get centerJustifiedTextSymbolIndex() { - return this._structArray.int16[this._pos2 + 8]; - } - get leftJustifiedTextSymbolIndex() { - return this._structArray.int16[this._pos2 + 9]; - } - get verticalPlacedTextSymbolIndex() { - return this._structArray.int16[this._pos2 + 10]; - } - get placedIconSymbolIndex() { - return this._structArray.int16[this._pos2 + 11]; - } - get verticalPlacedIconSymbolIndex() { - return this._structArray.int16[this._pos2 + 12]; - } - get key() { - return this._structArray.uint16[this._pos2 + 13]; - } - get textBoxStartIndex() { - return this._structArray.uint16[this._pos2 + 14]; - } - get textBoxEndIndex() { - return this._structArray.uint16[this._pos2 + 15]; - } - get verticalTextBoxStartIndex() { - return this._structArray.uint16[this._pos2 + 16]; - } - get verticalTextBoxEndIndex() { - return this._structArray.uint16[this._pos2 + 17]; - } - get iconBoxStartIndex() { - return this._structArray.uint16[this._pos2 + 18]; - } - get iconBoxEndIndex() { - return this._structArray.uint16[this._pos2 + 19]; - } - get verticalIconBoxStartIndex() { - return this._structArray.uint16[this._pos2 + 20]; - } - get verticalIconBoxEndIndex() { - return this._structArray.uint16[this._pos2 + 21]; - } - get featureIndex() { - return this._structArray.uint16[this._pos2 + 22]; - } - get numHorizontalGlyphVertices() { - return this._structArray.uint16[this._pos2 + 23]; - } - get numVerticalGlyphVertices() { - return this._structArray.uint16[this._pos2 + 24]; - } - get numIconVertices() { - return this._structArray.uint16[this._pos2 + 25]; - } - get numVerticalIconVertices() { - return this._structArray.uint16[this._pos2 + 26]; - } - get useRuntimeCollisionCircles() { - return this._structArray.uint16[this._pos2 + 27]; - } - get crossTileID() { - return this._structArray.uint32[this._pos4 + 14]; - } - set crossTileID(e) { - this._structArray.uint32[this._pos4 + 14] = e; - } - get textOffset0() { - return this._structArray.float32[this._pos4 + 15]; - } - get textOffset1() { - return this._structArray.float32[this._pos4 + 16]; - } - get collisionCircleDiameter() { - return this._structArray.float32[this._pos4 + 17]; - } - get zOffset() { - return this._structArray.float32[this._pos4 + 18]; - } - set zOffset(e) { - this._structArray.float32[this._pos4 + 18] = e; - } - get hasIconTextFit() { - return this._structArray.uint8[this._pos1 + 76]; - } - } - hp.prototype.size = 80; - class up extends gu { - get(e) { - return new hp(this, e); - } - } - Ft(up, "SymbolInstanceArray"); - class hh extends uc { - getoffsetX(e) { - return this.float32[1 * e + 0]; - } - } - Ft(hh, "GlyphOffsetArray"); - class uh extends Lo { - getx(e) { - return this.int16[2 * e + 0]; - } - gety(e) { - return this.int16[2 * e + 1]; - } - } - Ft(uh, "SymbolLineVertexArray"); - class Or extends rh { - get featureIndex() { - return this._structArray.uint32[this._pos4 + 0]; - } - get sourceLayerIndex() { - return this._structArray.uint16[this._pos2 + 2]; - } - get bucketIndex() { - return this._structArray.uint16[this._pos2 + 3]; - } - get layoutVertexArrayOffset() { - return this._structArray.uint16[this._pos2 + 4]; - } - } - Or.prototype.size = 12; - class dh extends ah { - get(e) { - return new Or(this, e); - } - } - Ft(dh, "FeatureIndexArray"); - class dp extends Ka { - geta_centroid_pos0(e) { - return this.uint16[2 * e + 0]; - } - geta_centroid_pos1(e) { - return this.uint16[2 * e + 1]; - } - } - Ft(dp, "FillExtrusionCentroidArray"); - class fp extends rh { - get a_join_normal_inside0() { - return this._structArray.int16[this._pos2 + 0]; - } - get a_join_normal_inside1() { - return this._structArray.int16[this._pos2 + 1]; - } - get a_join_normal_inside2() { - return this._structArray.int16[this._pos2 + 2]; - } - } - fp.prototype.size = 6; - class pp extends oh { - get(e) { - return new fp(this, e); - } - } - Ft(pp, "FillExtrusionWallArray"); - const r_ = qi([{ name: "a_pos", components: 2, type: "Int16" }], 4), Dd = qi([{ name: "a_pos_3", components: 3, type: "Int16" }, { name: "a_pos_normal_3", components: 3, type: "Int16" }]); - class Wn { - constructor(e = []) { - this.segments = e; - } - _prepareSegment(e, n, o, u) { - let l = this.segments[this.segments.length - 1]; - return e > Wn.MAX_VERTEX_ARRAY_LENGTH && mi(`Max vertices per segment is ${Wn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`), (!l || l.vertexLength + e > Wn.MAX_VERTEX_ARRAY_LENGTH || l.sortKey !== u) && (l = { vertexOffset: n, primitiveOffset: o, vertexLength: 0, primitiveLength: 0 }, u !== void 0 && (l.sortKey = u), this.segments.push(l)), l; - } - prepareSegment(e, n, o, u) { - return this._prepareSegment(e, n.length, o.length, u); - } - get() { - return this.segments; - } - destroy() { - for (const e of this.segments) - for (const n in e.vaos) - e.vaos[n].destroy(); - } - static simpleSegment(e, n, o, u) { - return new Wn([{ vertexOffset: e, primitiveOffset: n, vertexLength: o, primitiveLength: u, vaos: {}, sortKey: 0 }]); - } - } - function bu(r, e) { - return 256 * (r = si(Math.floor(r), 0, 255)) + si(Math.floor(e), 0, 255); - } - Wn.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, Ft(Wn, "SegmentVector"); - const o_ = qi([{ name: "a_pattern", components: 4, type: "Uint16" }, { name: "a_pixel_ratio", components: 1, type: "Float32" }]), a_ = qi([{ name: "a_dash", components: 4, type: "Uint16" }]); - class Al { - constructor() { - this.ids = [], this.uniqueIds = [], this.positions = [], this.indexed = !1; - } - add(e, n, o, u) { - this.ids.push(mp(e)), this.positions.push(n, o, u); - } - eachPosition(e, n) { - const o = mp(e); - let u = 0, l = this.ids.length - 1; - for (; u < l; ) { - const f = u + l >> 1; - this.ids[f] >= o ? l = f : u = f + 1; - } - for (; this.ids[u] === o; ) - n(this.positions[3 * u], this.positions[3 * u + 1], this.positions[3 * u + 2]), u++; - } - static serialize(e, n) { - const o = new Float64Array(e.ids), u = new Uint32Array(e.positions); - return wu(o, u, 0, o.length - 1), n && (n.add(o.buffer), n.add(u.buffer)), { ids: o, positions: u }; - } - static deserialize(e) { - const n = new Al(); - let o; - n.ids = e.ids, n.positions = e.positions; - for (const u of n.ids) - u !== o && n.uniqueIds.push(u), o = u; - return n.indexed = !0, n; - } - } - function mp(r) { - const e = +r; - return !isNaN(e) && Number.MIN_SAFE_INTEGER <= e && e <= Number.MAX_SAFE_INTEGER ? e : $r(String(r)); - } - function wu(r, e, n, o) { - for (; n < o; ) { - const u = r[n + o >> 1]; - let l = n - 1, f = o + 1; - for (; ; ) { - do - l++; - while (r[l] < u); - do - f--; - while (r[f] > u); - if (l >= f) - break; - fh(r, l, f), fh(e, 3 * l, 3 * f), fh(e, 3 * l + 1, 3 * f + 1), fh(e, 3 * l + 2, 3 * f + 2); - } - f - n < o - f ? (wu(r, e, n, f), n = f + 1) : (wu(r, e, f + 1, o), o = f); - } - } - function fh(r, e, n) { - const o = r[e]; - r[e] = r[n], r[n] = o; - } - Ft(Al, "FeaturePositionMap"); - class ba { - constructor(e) { - this.gl = e.gl, this.initialized = !1; - } - fetchUniformLocation(e, n) { - return this.location || this.initialized || (this.location = this.gl.getUniformLocation(e, n), this.initialized = !0), !!this.location; - } - set(e, n, o) { - throw new Error("Uniform#set() must be implemented by each concrete Uniform"); - } - } - class dc extends ba { - constructor(e) { - super(e), this.current = 0; - } - set(e, n, o) { - this.fetchUniformLocation(e, n) && this.current !== o && (this.current = o, this.gl.uniform1i(this.location, o)); - } - } - class Nn extends ba { - constructor(e) { - super(e), this.current = 0; - } - set(e, n, o) { - this.fetchUniformLocation(e, n) && this.current !== o && (this.current = o, this.gl.uniform1f(this.location, o)); - } - } - class zo extends ba { - constructor(e) { - super(e), this.current = [0, 0]; - } - set(e, n, o) { - this.fetchUniformLocation(e, n) && (o[0] === this.current[0] && o[1] === this.current[1] || (this.current = o, this.gl.uniform2f(this.location, o[0], o[1]))); - } - } - class kd extends ba { - constructor(e) { - super(e), this.current = [0, 0, 0]; - } - set(e, n, o) { - this.fetchUniformLocation(e, n) && (o[0] === this.current[0] && o[1] === this.current[1] && o[2] === this.current[2] || (this.current = o, this.gl.uniform3f(this.location, o[0], o[1], o[2]))); - } - } - class ph extends ba { - constructor(e) { - super(e), this.current = [0, 0, 0, 0]; - } - set(e, n, o) { - this.fetchUniformLocation(e, n) && (o[0] === this.current[0] && o[1] === this.current[1] && o[2] === this.current[2] && o[3] === this.current[3] || (this.current = o, this.gl.uniform4f(this.location, o[0], o[1], o[2], o[3]))); - } - } - class _p extends ba { - constructor(e) { - super(e), this.current = ki.transparent.toRenderColor(null); - } - set(e, n, o) { - this.fetchUniformLocation(e, n) && (o.r === this.current.r && o.g === this.current.g && o.b === this.current.b && o.a === this.current.a || (this.current = o, this.gl.uniform4f(this.location, o.r, o.g, o.b, o.a))); - } - } - const Rd = new Float32Array(16); - class mh extends ba { - constructor(e) { - super(e), this.current = Rd; - } - set(e, n, o) { - if (this.fetchUniformLocation(e, n)) { - if (o[12] !== this.current[12] || o[0] !== this.current[0]) - return this.current = o, void this.gl.uniformMatrix4fv(this.location, !1, o); - for (let u = 1; u < 16; u++) - if (o[u] !== this.current[u]) { - this.current = o, this.gl.uniformMatrix4fv(this.location, !1, o); - break; - } - } - } - } - const l_ = new Float32Array(9), c_ = new Float32Array(4); - class Od extends ba { - constructor(e) { - super(e), this.current = c_; - } - set(e, n, o) { - if (this.fetchUniformLocation(e, n)) { - for (let u = 0; u < 4; u++) - if (o[u] !== this.current[u]) { - this.current = o, this.gl.uniformMatrix2fv(this.location, !1, o); - break; - } - } - } - } - function Tu(r) { - return [bu(255 * r.r, 255 * r.g), bu(255 * r.b, 255 * r.a)]; - } - class fc { - constructor(e, n, o, u) { - this.value = e, this.uniformNames = n.map((l) => `u_${l}`), this.type = o, this.context = u; - } - setUniform(e, n, o, u, l) { - const f = u.constantOr(this.value); - n.set(e, l, f instanceof ki ? f.toRenderColor(this.ignoreLut ? null : this.context.lut) : f); - } - getBinding(e, n) { - return this.type === "color" ? new _p(e) : new Nn(e); - } - } - class pc { - constructor(e, n) { - this.uniformNames = n.map((o) => `u_${o}`), this.pattern = null, this.pixelRatio = 1; - } - setConstantPatternPositions(e) { - this.pixelRatio = e.pixelRatio || 1, this.pattern = e.tl.concat(e.br); - } - setUniform(e, n, o, u, l) { - const f = l === "u_pattern" || l === "u_dash" ? this.pattern : l === "u_pixel_ratio" ? this.pixelRatio : null; - f && n.set(e, l, f); - } - getBinding(e, n) { - return n === "u_pattern" || n === "u_dash" ? new ph(e) : new Nn(e); - } - } - class wa { - constructor(e, n, o, u) { - this.expression = e, this.type = o, this.maxValue = 0, this.paintVertexAttributes = n.map((l) => ({ name: `a_${l}`, type: "Float32", components: o === "color" ? 2 : 1, offset: 0 })), this.paintVertexArray = new u(); - } - populatePaintArray(e, n, o, u, l, f, v) { - const S = this.paintVertexArray.length, D = this.expression.evaluate(new Tn(0, { brightness: f }), n, {}, l, u, v); - this.paintVertexArray.resize(e), this._setPaintValue(S, e, D, this.context); - } - updatePaintArray(e, n, o, u, l, f, v) { - const S = this.expression.evaluate({ zoom: 0, brightness: v }, o, u, void 0, l); - this._setPaintValue(e, n, S, this.context); - } - _setPaintValue(e, n, o, u) { - if (this.type === "color") { - const l = Tu(o.toRenderColor(this.ignoreLut ? null : u.lut)); - for (let f = e; f < n; f++) - this.paintVertexArray.emplace(f, l[0], l[1]); - } else { - for (let l = e; l < n; l++) - this.paintVertexArray.emplace(l, o); - this.maxValue = Math.max(this.maxValue, Math.abs(o)); - } - } - upload(e) { - this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = e.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent || !this.expression.isLightConstant)); - } - destroy() { - this.paintVertexBuffer && this.paintVertexBuffer.destroy(); - } - } - class Do { - constructor(e, n, o, u, l, f) { - this.expression = e, this.uniformNames = n.map((v) => `u_${v}_t`), this.type = o, this.useIntegerZoom = u, this.context = l, this.maxValue = 0, this.paintVertexAttributes = n.map((v) => ({ name: `a_${v}`, type: "Float32", components: o === "color" ? 4 : 2, offset: 0 })), this.paintVertexArray = new f(); - } - populatePaintArray(e, n, o, u, l, f, v) { - const S = this.expression.evaluate(new Tn(this.context.zoom, { brightness: f }), n, {}, l, u, v), D = this.expression.evaluate(new Tn(this.context.zoom + 1, { brightness: f }), n, {}, l, u, v), x = this.paintVertexArray.length; - this.paintVertexArray.resize(e), this._setPaintValue(x, e, S, D, this.context); - } - updatePaintArray(e, n, o, u, l, f, v) { - const S = this.expression.evaluate({ zoom: this.context.zoom, brightness: v }, o, u, void 0, l), D = this.expression.evaluate({ zoom: this.context.zoom + 1, brightness: v }, o, u, void 0, l); - this._setPaintValue(e, n, S, D, this.context); - } - _setPaintValue(e, n, o, u, l) { - if (this.type === "color") { - const f = Tu(o.toRenderColor(this.ignoreLut ? null : l.lut)), v = Tu(o.toRenderColor(this.ignoreLut ? null : l.lut)); - for (let S = e; S < n; S++) - this.paintVertexArray.emplace(S, f[0], f[1], v[0], v[1]); - } else { - for (let f = e; f < n; f++) - this.paintVertexArray.emplace(f, o, u); - this.maxValue = Math.max(this.maxValue, Math.abs(o), Math.abs(u)); - } - } - upload(e) { - this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = e.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent || !this.expression.isLightConstant)); - } - destroy() { - this.paintVertexBuffer && this.paintVertexBuffer.destroy(); - } - setUniform(e, n, o, u, l) { - const f = this.useIntegerZoom ? Math.floor(o.zoom) : o.zoom, v = si(this.expression.interpolationFactor(f, this.context.zoom, this.context.zoom + 1), 0, 1); - n.set(e, l, v); - } - getBinding(e, n) { - return new Nn(e); - } - } - class Ja { - constructor(e, n, o, u, l) { - this.expression = e, this.layerId = l, this.paintVertexAttributes = (o === "array" ? a_ : o_).members; - for (let f = 0; f < n.length; ++f) - ; - this.paintVertexArray = new u(); - } - populatePaintArray(e, n, o, u) { - const l = this.paintVertexArray.length; - this.paintVertexArray.resize(e), this._setPaintValues(l, e, n.patterns && n.patterns[this.layerId], o); - } - updatePaintArray(e, n, o, u, l, f, v) { - this._setPaintValues(e, n, o.patterns && o.patterns[this.layerId], f); - } - _setPaintValues(e, n, o, u) { - if (!u || !o) - return; - const l = u[o]; - if (!l) - return; - const { tl: f, br: v, pixelRatio: S } = l; - for (let D = e; D < n; D++) - this.paintVertexArray.emplace(D, f[0], f[1], v[0], v[1], S); - } - upload(e) { - this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer = e.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent || !this.expression.isLightConstant)); - } - destroy() { - this.paintVertexBuffer && this.paintVertexBuffer.destroy(); - } - } - class Cl { - constructor(e, n, o = () => !0) { - this.binders = {}, this._buffers = [], this.context = n; - const u = []; - for (const l in e.paint._values) { - const f = e.paint.get(l), v = e.paint.get(`${l}-use-theme`); - if (l.endsWith("-use-theme") || !o(l) || !(f instanceof lc && nc(f.property.specification))) - continue; - const S = Mu(l, e.type), D = f.value, x = f.property.specification.type, P = !!f.property.useIntegerZoom, I = l === "line-dasharray" || l.endsWith("pattern"), M = l === "line-dasharray" && e.layout.get("line-cap").value.kind !== "constant"; - if (D.kind !== "constant" || M) - if (D.kind === "source" || M || I) { - const C = _h(l, x, "source"); - this.binders[l] = I ? new Ja(D, S, x, C, e.id) : new wa(D, S, x, C), u.push(`/a_${l}`); - } else { - const C = _h(l, x, "composite"); - this.binders[l] = new Do(D, S, x, P, n, C), u.push(`/z_${l}`); - } - else - this.binders[l] = I ? new pc(D.value, S) : new fc(D.value, S, x, n), u.push(`/u_${l}`); - v && (this.binders[l].ignoreLut = v.constantOr("default") === "none", this.binders[l].checkUseTheme = !0); - } - this.cacheKey = u.sort().join(""); - } - getMaxValue(e) { - const n = this.binders[e]; - return n instanceof wa || n instanceof Do ? n.maxValue : 0; - } - populatePaintArrays(e, n, o, u, l, f, v) { - for (const S in this.binders) { - const D = this.binders[S]; - D.context = this.context, (D instanceof wa || D instanceof Do || D instanceof Ja) && D.populatePaintArray(e, n, o, u, l, f, v); - } - } - setConstantPatternPositions(e) { - for (const n in this.binders) { - const o = this.binders[n]; - o instanceof pc && o.setConstantPatternPositions(e); - } - } - updatePaintArrays(e, n, o, u, l, f, v, S, D) { - let x = !1; - const P = Object.keys(e), I = P.length !== 0 && !S, M = I ? P : n.uniqueIds; - this.context.lut = l.lut; - for (const C in this.binders) { - const k = this.binders[C]; - if (k.context = this.context, (k instanceof wa || k instanceof Do || k instanceof Ja) && (k.expression.isStateDependent === !0 || k.expression.isLightConstant === !1)) { - const V = l.paint.get(C); - k.expression = V.value; - for (const U of M) { - const q = e[U.toString()]; - n.eachPosition(U, ($, H, K) => { - const Q = u.feature($); - k.updatePaintArray(H, K, Q, q, f, v, D); - }); - } - if (!I) - for (const U of o.uniqueIds) { - const q = e[U.toString()]; - o.eachPosition(U, ($, H, K) => { - const Q = u.feature($); - k.updatePaintArray(H, K, Q, q, f, v, D); - }); - } - x = !0; - } - } - return x; - } - defines() { - const e = []; - for (const n in this.binders) { - const o = this.binders[n]; - (o instanceof fc || o instanceof pc) && e.push(...o.uniformNames.map((u) => `#define HAS_UNIFORM_${u}`)); - } - return e; - } - getBinderAttributes() { - const e = []; - for (const n in this.binders) { - const o = this.binders[n]; - if (o instanceof wa || o instanceof Do || o instanceof Ja) - for (let u = 0; u < o.paintVertexAttributes.length; u++) - e.push(o.paintVertexAttributes[u].name); - } - return e; - } - getBinderUniforms() { - const e = []; - for (const n in this.binders) { - const o = this.binders[n]; - if (o instanceof fc || o instanceof pc || o instanceof Do) - for (const u of o.uniformNames) - e.push(u); - } - return e; - } - getPaintVertexBuffers() { - return this._buffers; - } - getUniforms(e) { - const n = []; - for (const o in this.binders) { - const u = this.binders[o]; - if (u instanceof fc || u instanceof pc || u instanceof Do) - for (const l of u.uniformNames) - n.push({ name: l, property: o, binding: u.getBinding(e, l) }); - } - return n; - } - setUniforms(e, n, o, u, l) { - for (const { name: f, property: v, binding: S } of o) { - if (this.binders[v].checkUseTheme && this.binders[v] instanceof fc) { - const D = u.get(`${v}-use-theme`); - D.isConstant() && (this.binders[v].ignoreLut = D.constantOr("default") === "none"); - } - this.binders[v].setUniform(e, S, l, u.get(v), f); - } - } - updatePaintBuffers() { - this._buffers = []; - for (const e in this.binders) { - const n = this.binders[e]; - (n instanceof wa || n instanceof Do || n instanceof Ja) && n.paintVertexBuffer && this._buffers.push(n.paintVertexBuffer); - } - } - upload(e) { - for (const n in this.binders) { - const o = this.binders[n]; - (o instanceof wa || o instanceof Do || o instanceof Ja) && o.upload(e); - } - this.updatePaintBuffers(); - } - destroy() { - for (const e in this.binders) { - const n = this.binders[e]; - (n instanceof wa || n instanceof Do || n instanceof Ja) && n.destroy(); - } - } - } - class Qa { - constructor(e, n, o = () => !0) { - this.programConfigurations = {}; - for (const u of e) - this.programConfigurations[u.id] = new Cl(u, n, o); - this.needsUpload = !1, this._featureMap = new Al(), this._featureMapWithoutIds = new Al(), this._bufferOffset = 0, this._idlessCounter = 0; - } - populatePaintArrays(e, n, o, u, l, f, v, S) { - for (const D in this.programConfigurations) - this.programConfigurations[D].populatePaintArrays(e, n, u, l, f, v, S); - n.id !== void 0 ? this._featureMap.add(n.id, o, this._bufferOffset, e) : (this._featureMapWithoutIds.add(this._idlessCounter, o, this._bufferOffset, e), this._idlessCounter += 1), this._bufferOffset = e, this.needsUpload = !0; - } - updatePaintArrays(e, n, o, u, l, f, v) { - for (const S of o) - this.needsUpload = this.programConfigurations[S.id].updatePaintArrays(e, this._featureMap, this._featureMapWithoutIds, n, S, u, l, f, v || 0) || this.needsUpload; - } - get(e) { - return this.programConfigurations[e]; - } - upload(e) { - if (this.needsUpload) { - for (const n in this.programConfigurations) - this.programConfigurations[n].upload(e); - this.needsUpload = !1; - } - } - destroy() { - for (const e in this.programConfigurations) - this.programConfigurations[e].destroy(); - } - } - const h_ = { "text-opacity": ["opacity"], "icon-opacity": ["opacity"], "text-occlusion-opacity": ["occlusion_opacity"], "icon-occlusion-opacity": ["occlusion_opacity"], "text-color": ["fill_color"], "icon-color": ["fill_color"], "text-emissive-strength": ["emissive_strength"], "icon-emissive-strength": ["emissive_strength"], "text-halo-color": ["halo_color"], "icon-halo-color": ["halo_color"], "text-halo-blur": ["halo_blur"], "icon-halo-blur": ["halo_blur"], "text-halo-width": ["halo_width"], "icon-halo-width": ["halo_width"], "symbol-z-offset": ["z_offset"], "line-gap-width": ["gapwidth"], "line-pattern": ["pattern", "pixel_ratio"], "fill-pattern": ["pattern", "pixel_ratio"], "fill-extrusion-pattern": ["pattern", "pixel_ratio"], "line-dasharray": ["dash"] }; - function Mu(r, e) { - return h_[r] || [r.replace(`${e}-`, "").replace(/-/g, "_")]; - } - const u_ = { "line-pattern": { source: Ya, composite: Ya }, "fill-pattern": { source: Ya, composite: Ya }, "fill-extrusion-pattern": { source: Ya, composite: Ya }, "line-dasharray": { source: fu, composite: fu } }, d_ = { color: { source: Pl, composite: Xa }, number: { source: uc, composite: Pl } }; - function _h(r, e, n) { - const o = u_[r]; - return o && o[n] || d_[e][n]; - } - Ft(fc, "ConstantBinder"), Ft(pc, "PatternConstantBinder"), Ft(wa, "SourceExpressionBinder"), Ft(Ja, "PatternCompositeBinder"), Ft(Do, "CompositeExpressionBinder"), Ft(Cl, "ProgramConfiguration", { omit: ["_buffers"] }), Ft(Qa, "ProgramConfigurationSet"); - const dr = Tt / Math.PI / 2, Su = 5, gp = 6, yp = 16383, Il = 64, Eu = [Il, 32, 16], uo = -dr, fo = dr; - function mc(r, e, n, o = dr) { - return n = vi(n), [r * Math.sin(n) * o, -e * o, r * Math.cos(n) * o]; - } - function el(r, e, n) { - return mc(Math.cos(vi(r)), Math.sin(vi(r)), e, n); - } - const _c = 63710088e-1, Fd = 2 * Math.PI * _c; - class Ui { - constructor(e, n) { - if (isNaN(e) || isNaN(n)) - throw new Error(`Invalid LngLat object: (${e}, ${n})`); - if (this.lng = +e, this.lat = +n, this.lat > 90 || this.lat < -90) - throw new Error("Invalid LngLat latitude value: must be between -90 and 90"); - } - wrap() { - return new Ui(zn(this.lng, -180, 180), this.lat); - } - toArray() { - return [this.lng, this.lat]; - } - toString() { - return `LngLat(${this.lng}, ${this.lat})`; - } - distanceTo(e) { - const n = Math.PI / 180, o = this.lat * n, u = e.lat * n, l = Math.sin(o) * Math.sin(u) + Math.cos(o) * Math.cos(u) * Math.cos((e.lng - this.lng) * n); - return _c * Math.acos(Math.min(l, 1)); - } - toBounds(e = 0) { - const n = 360 * e / 40075017, o = n / Math.cos(Math.PI / 180 * this.lat); - return new tl({ lng: this.lng - o, lat: this.lat - n }, { lng: this.lng + o, lat: this.lat + n }); - } - toEcef(e) { - return el(this.lat, this.lng, dr + e * dr / _c); - } - static convert(e) { - if (e instanceof Ui) - return e; - if (Array.isArray(e) && (e.length === 2 || e.length === 3)) - return new Ui(Number(e[0]), Number(e[1])); - if (!Array.isArray(e) && typeof e == "object" && e !== null) - return new Ui(Number("lng" in e ? e.lng : e.lon), Number(e.lat)); - throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: