@thibezer/ui-components-kit 2.30.0 → 2.31.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/camadas.cjs +1 -1
  3. package/dist/camadas.js +1 -1
  4. package/dist/canvas.cjs +67 -67
  5. package/dist/canvas.js +1788 -1381
  6. package/dist/components/ui-seletor-mapa-base/ui-seletor-mapa-base.d.ts +6 -0
  7. package/dist/custom-elements.json +29797 -29723
  8. package/dist/feature_caixa-DAyED81R.cjs +1 -0
  9. package/dist/feature_caixa-zoUAn0qg.js +877 -0
  10. package/dist/{feature_desenho-eq3MIZR9.cjs → feature_desenho-CESNXi8g.cjs} +1 -1
  11. package/dist/{feature_desenho-Cq3H27as.js → feature_desenho-fQfbVPvn.js} +2 -2
  12. package/dist/feature_metricas-CnSFE0at.cjs +1 -0
  13. package/dist/feature_metricas-hUren6kK.js +135 -0
  14. package/dist/geometria-px-C4xatxmY.cjs +1 -0
  15. package/dist/{geometria-px-BxTQKrZN.js → geometria-px-wXudjSxA.js} +224 -206
  16. package/dist/gerencigeo-canvas/motor/motor-formas.d.ts +37 -1
  17. package/dist/gerencigeo-canvas/motor/tipos.d.ts +8 -2
  18. package/dist/gerencigeo-canvas/renderers/agenda_fatias.d.ts +56 -0
  19. package/dist/gerencigeo-canvas/renderers/canvas_formas_leaflet.d.ts +76 -2
  20. package/dist/gerencigeo-canvas/renderers/feicoes_canvas_renderer.d.ts +20 -0
  21. package/dist/gerencigeo-canvas/renderers/renderizador_formas.d.ts +21 -11
  22. package/dist/motor.cjs +1 -1
  23. package/dist/motor.js +445 -342
  24. package/dist/prancha-nucleo.cjs +1 -1
  25. package/dist/prancha-nucleo.js +4 -4
  26. package/dist/prancha.cjs +1 -1
  27. package/dist/prancha.js +3 -3
  28. package/dist/seletor-mapa-base.cjs +7 -7
  29. package/dist/seletor-mapa-base.js +50 -38
  30. package/package.json +1 -1
  31. package/dist/feature_caixa-DOchASgS.js +0 -828
  32. package/dist/feature_caixa-MrJEfMol.cjs +0 -1
  33. package/dist/feature_metricas-CKQGG2nz.cjs +0 -1
  34. package/dist/feature_metricas-DGfd21VR.js +0 -130
  35. package/dist/geometria-px-BlB0OczX.cjs +0 -1
@@ -1,37 +1,55 @@
1
- var ct = Object.defineProperty;
2
- var ut = (t, n, o) => n in t ? ct(t, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[n] = o;
3
- var y = (t, n, o) => ut(t, typeof n != "symbol" ? n + "" : n, o);
4
- import { l as lt, p as K, b as ht } from "./feature_metricas-DGfd21VR.js";
5
- const S = 16, dt = 256;
6
- function U(t, n) {
7
- const [[o, i], [a, e]] = lt(t.geometria, n);
1
+ var ht = Object.defineProperty;
2
+ var dt = (t, n, o) => n in t ? ht(t, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[n] = o;
3
+ var y = (t, n, o) => dt(t, typeof n != "symbol" ? n + "" : n, o);
4
+ import { l as W, p as tt, b as ft } from "./feature_metricas-hUren6kK.js";
5
+ const S = 16, pt = 256;
6
+ function Xt(t, n) {
7
+ const [[o, i], [a, e]] = W(t.geometria, n);
8
8
  return { minLon: i, minLat: o, maxLon: e, maxLat: a };
9
9
  }
10
10
  function N(t, n) {
11
11
  return t.minLon <= n.maxLon && t.maxLon >= n.minLon && t.minLat <= n.maxLat && t.maxLat >= n.minLat;
12
12
  }
13
- function D(t) {
13
+ function nt(t) {
14
14
  let n = 1 / 0, o = 1 / 0, i = -1 / 0, a = -1 / 0;
15
15
  for (const e of t)
16
16
  e.minLon < n && (n = e.minLon), e.minLat < o && (o = e.minLat), e.maxLon > i && (i = e.maxLon), e.maxLat > a && (a = e.maxLat);
17
17
  return { minLon: n, minLat: o, maxLon: i, maxLat: a };
18
18
  }
19
- function z(t) {
20
- const n = t.length, o = Math.ceil(n / S), a = Math.ceil(Math.sqrt(o)) * S, e = [...t].sort((c, s) => c.minLon + c.maxLon - (s.minLon + s.maxLon)), r = [];
19
+ function $(t, n, o, i) {
20
+ const a = o - n, e = new Float64Array(a), r = new Uint32Array(a);
21
+ for (let s = 0; s < a; s++)
22
+ e[s] = i(t[n + s]), r[s] = s;
23
+ r.sort((s, u) => e[s] - e[u] || s - u);
24
+ const c = new Array(a);
25
+ for (let s = 0; s < a; s++) c[s] = t[n + r[s]];
26
+ return c;
27
+ }
28
+ const mt = (t) => t.minLon + t.maxLon, Lt = (t) => t.minLat + t.maxLat;
29
+ function U(t) {
30
+ const n = t.length, o = Math.ceil(n / S), a = Math.ceil(Math.sqrt(o)) * S, e = $(t, 0, n, mt), r = [];
21
31
  for (let c = 0; c < n; c += a) {
22
- const s = e.slice(c, c + a).sort((u, l) => u.minLat + u.maxLat - (l.minLat + l.maxLat));
32
+ const s = $(e, c, Math.min(n, c + a), Lt);
23
33
  for (let u = 0; u < s.length; u += S) r.push(s.slice(u, u + S));
24
34
  }
25
35
  return r;
26
36
  }
27
- function ft(t) {
37
+ function z(t, n) {
38
+ const o = nt(t);
39
+ return n ? { minLon: o.minLon, minLat: o.minLat, maxLon: o.maxLon, maxLat: o.maxLat, folhas: t } : { minLon: o.minLon, minLat: o.minLat, maxLon: o.maxLon, maxLat: o.maxLat, filhos: t };
40
+ }
41
+ function vt(t) {
28
42
  if (t.length === 0) return null;
29
- let n = z(t).map((o) => ({ ...D(o), folhas: o }));
43
+ let n = U(t).map((o) => z(o, !0));
30
44
  for (; n.length > 1; )
31
- n = z(n).map((o) => ({ ...D(o), filhos: o }));
45
+ n = U(n).map((o) => z(o, !1));
32
46
  return n[0];
33
47
  }
34
- class Vt {
48
+ function k(t, n) {
49
+ const [[o, i], [a, e]] = W(t.geometria, n);
50
+ return { id: t.id, minLon: i, minLat: o, maxLon: e, maxLat: a };
51
+ }
52
+ class Zt {
35
53
  /** `espaco` define o envelope do círculo (sem ele, o geográfico de sempre). */
36
54
  constructor(n) {
37
55
  y(this, "raiz", null);
@@ -51,7 +69,7 @@ class Vt {
51
69
  construir(n) {
52
70
  this.itens.clear();
53
71
  for (const o of n)
54
- o.excluida || this.itens.set(o.id, { id: o.id, ...U(o, this.espaco) });
72
+ o.excluida || this.itens.set(o.id, k(o, this.espaco));
55
73
  this.remontar();
56
74
  }
57
75
  inserir(n) {
@@ -63,7 +81,7 @@ class Vt {
63
81
  this.remover(n.id);
64
82
  return;
65
83
  }
66
- const o = { id: n.id, ...U(n, this.espaco) };
84
+ const o = k(n, this.espaco);
67
85
  this.itens.has(n.id) && this.obsoletos.add(n.id), this.itens.set(n.id, o), this.delta.set(n.id, o), this.envelopeCache = void 0, this.compactarSeNecessario();
68
86
  }
69
87
  remover(n) {
@@ -95,7 +113,7 @@ class Vt {
95
113
  const n = [];
96
114
  this.raiz && n.push(this.raiz);
97
115
  for (const i of this.delta.values()) n.push(i);
98
- const o = n.length > 0 ? D(n) : null;
116
+ const o = n.length > 0 ? nt(n) : null;
99
117
  return this.envelopeCache = o && Number.isFinite(o.minLat) && Number.isFinite(o.maxLat) && Number.isFinite(o.minLon) && Number.isFinite(o.maxLon) ? o : null, this.envelopeCache;
100
118
  }
101
119
  intersecta(n) {
@@ -106,25 +124,25 @@ class Vt {
106
124
  return this.itens.get(n);
107
125
  }
108
126
  compactarSeNecessario() {
109
- this.delta.size + this.obsoletos.size > Math.max(dt, this.itens.size * 0.1) && this.remontar();
127
+ this.delta.size + this.obsoletos.size > Math.max(pt, this.itens.size * 0.1) && this.remontar();
110
128
  }
111
129
  remontar() {
112
- this.envelopeCache = void 0, this.raiz = ft([...this.itens.values()]), this.delta.clear(), this.obsoletos.clear();
130
+ this.envelopeCache = void 0, this.raiz = vt([...this.itens.values()]), this.delta.clear(), this.obsoletos.clear();
113
131
  }
114
132
  }
115
- const pt = 17, mt = 9, Lt = 1.2;
116
- function vt(t) {
117
- return !Number.isFinite(t) || t >= pt ? 0 : 360 / (256 * 2 ** t) * Lt;
133
+ const yt = 17, At = 9, Mt = 1.2;
134
+ function xt(t) {
135
+ return !Number.isFinite(t) || t >= yt ? 0 : 360 / (256 * 2 ** t) * Mt;
118
136
  }
119
- function k(t) {
137
+ function V(t) {
120
138
  return Number.isFinite(t) ? 1 / Math.max(0.05, Math.cos(Math.max(-85, Math.min(85, t)) * Math.PI / 180)) : 1;
121
139
  }
122
- function yt(t, n, o, i) {
140
+ function gt(t, n, o, i) {
123
141
  const a = o[1] - n[1], e = (o[0] - n[0]) * i, r = a * a + e * e, c = (t[0] - n[0]) * i;
124
142
  let s = r === 0 ? 0 : ((t[1] - n[1]) * a + c * e) / r;
125
143
  return s = Math.max(0, Math.min(1, s)), Math.hypot(t[1] - (n[1] + s * a), c - s * e);
126
144
  }
127
- function W(t, n, o = 1) {
145
+ function ot(t, n, o = 1) {
128
146
  if (!(n > 0) || t.length < 3) return t;
129
147
  const i = Number.isFinite(o) && o > 0 ? o : 1, a = new Uint8Array(t.length);
130
148
  a[0] = 1, a[t.length - 1] = 1;
@@ -132,42 +150,42 @@ function W(t, n, o = 1) {
132
150
  for (; e.length > 0; ) {
133
151
  const [r, c] = e.pop();
134
152
  let s = 0, u = -1;
135
- for (let l = r + 1; l < c; l++) {
136
- const d = yt(t[l], t[r], t[c], i);
137
- d > s && (s = d, u = l);
153
+ for (let h = r + 1; h < c; h++) {
154
+ const d = gt(t[h], t[r], t[c], i);
155
+ d > s && (s = d, u = h);
138
156
  }
139
157
  u !== -1 && s > n && (a[u] = 1, e.push([r, u], [u, c]));
140
158
  }
141
159
  return t.filter((r, c) => a[c] === 1);
142
160
  }
143
- function At(t, n, o = 1) {
161
+ function Ct(t, n, o = 1) {
144
162
  if (!(n > 0) || t.length < 4) return t;
145
- const i = [...t, t[0]], a = W(i, n, o);
163
+ const i = [...t, t[0]], a = ot(i, n, o);
146
164
  return a.pop(), a.length >= 3 ? a : t;
147
165
  }
148
- function Mt(t) {
149
- return (t.tipo === "LineString" || t.tipo === "Polygon") && t.curva ? 0 : t.tipo === "LineString" ? K(t).reduce((n, o) => n + o.length, 0) : t.tipo === "Polygon" ? t.aneis.reduce((n, o) => n + o.length, 0) : 0;
166
+ function It(t) {
167
+ return (t.tipo === "LineString" || t.tipo === "Polygon") && t.curva ? 0 : t.tipo === "LineString" ? tt(t).reduce((n, o) => n + o.length, 0) : t.tipo === "Polygon" ? t.aneis.reduce((n, o) => n + o.length, 0) : 0;
150
168
  }
151
- function qt(t, n) {
169
+ function Bt(t, n) {
152
170
  var i, a, e, r;
153
- const o = vt(n);
154
- if (o === 0 || Mt(t) < mt) return t;
171
+ const o = xt(n);
172
+ if (o === 0 || It(t) < At) return t;
155
173
  if (t.tipo === "LineString") {
156
- const c = K(t), s = k(((a = (i = c[0]) == null ? void 0 : i[0]) == null ? void 0 : a[0]) ?? NaN);
157
- return ht(c.map((u) => W(u, o, s)));
174
+ const c = tt(t), s = V(((a = (i = c[0]) == null ? void 0 : i[0]) == null ? void 0 : a[0]) ?? NaN);
175
+ return ft(c.map((u) => ot(u, o, s)));
158
176
  }
159
177
  if (t.tipo === "Polygon") {
160
- const c = k(((r = (e = t.aneis[0]) == null ? void 0 : e[0]) == null ? void 0 : r[0]) ?? NaN);
161
- return { tipo: "Polygon", aneis: t.aneis.map((s) => At(s, o, c)) };
178
+ const c = V(((r = (e = t.aneis[0]) == null ? void 0 : e[0]) == null ? void 0 : r[0]) ?? NaN);
179
+ return { tipo: "Polygon", aneis: t.aneis.map((s) => Ct(s, o, c)) };
162
180
  }
163
181
  return t;
164
182
  }
165
- const gt = /* @__PURE__ */ new Set(["previa", "prévia", "preview", "rascunho", "draft", "proposta"]);
166
- function _(t) {
183
+ const Pt = /* @__PURE__ */ new Set(["previa", "prévia", "preview", "rascunho", "draft", "proposta"]);
184
+ function E(t) {
167
185
  var o, i;
168
186
  const n = [t.status, (o = t.propriedades) == null ? void 0 : o.status, (i = t.propriedades) == null ? void 0 : i.tipo_geometria];
169
187
  for (const a of n)
170
- if (typeof a == "string" && gt.has(a.trim().toLowerCase())) return "previa";
188
+ if (typeof a == "string" && Pt.has(a.trim().toLowerCase())) return "previa";
171
189
  return "oficial";
172
190
  }
173
191
  function T(t) {
@@ -175,33 +193,33 @@ function T(t) {
175
193
  const n = t.entidadeId ?? ((o = t.propriedades) == null ? void 0 : o.entidadeId);
176
194
  return typeof n == "string" || typeof n == "number" ? String(n) : t.id;
177
195
  }
178
- const j = (t, n) => `${t}\0${n}`;
179
- class Gt {
196
+ const w = (t, n) => `${t}\0${n}`;
197
+ class Jt {
180
198
  constructor() {
181
199
  /** Mostra as prévias de todas as entidades. */
182
200
  y(this, "global", !1);
183
201
  y(this, "individuais", /* @__PURE__ */ new Set());
184
202
  }
185
203
  alternarIndividual(n, o) {
186
- const i = j(n, o);
204
+ const i = w(n, o);
187
205
  return this.individuais.has(i) ? this.individuais.delete(i) : this.individuais.add(i), this.individuais.has(i);
188
206
  }
189
207
  definirIndividual(n, o, i) {
190
- const a = j(n, o);
208
+ const a = w(n, o);
191
209
  i ? this.individuais.add(a) : this.individuais.delete(a);
192
210
  }
193
211
  individualAtiva(n, o) {
194
- return this.individuais.has(j(n, o));
212
+ return this.individuais.has(w(n, o));
195
213
  }
196
214
  /** Entidades da camada que têm geometria oficial. */
197
215
  static oficiais(n) {
198
216
  const o = /* @__PURE__ */ new Set();
199
- for (const i of n) !i.excluida && _(i) === "oficial" && o.add(T(i));
217
+ for (const i of n) !i.excluida && E(i) === "oficial" && o.add(T(i));
200
218
  return o;
201
219
  }
202
220
  /** A feição aparece? `comOficial` = entidades da camada com geometria oficial (ver `oficiais`). */
203
221
  visivel(n, o) {
204
- if (_(n) === "oficial") return !0;
222
+ if (E(n) === "oficial") return !0;
205
223
  const i = T(n);
206
224
  return this.global || !o.has(i) || this.individualAtiva(n.camadaId, i);
207
225
  }
@@ -210,87 +228,87 @@ class Gt {
210
228
  return this.global || this.individualAtiva(n.camadaId, T(n));
211
229
  }
212
230
  }
213
- const tt = /* @__PURE__ */ new Set(["simetrico", "suave", "livre"]), V = 1e-6;
214
- function Ht(t) {
231
+ const it = /* @__PURE__ */ new Set(["simetrico", "suave", "livre"]), q = 1e-6;
232
+ function Qt(t) {
215
233
  if (!t.entrada && !t.saida) return "canto";
216
- if (t.modo && tt.has(t.modo)) return t.modo;
234
+ if (t.modo && it.has(t.modo)) return t.modo;
217
235
  if (!t.entrada || !t.saida) return "simetrico";
218
236
  const n = t.ponto[0] - t.entrada[0], o = t.ponto[1] - t.entrada[1], i = t.saida[0] - t.ponto[0], a = t.saida[1] - t.ponto[1], e = Math.hypot(n, o), r = Math.hypot(i, a);
219
- return e === 0 || r === 0 || !(Math.abs(n * a - o * i) <= V * e * r && n * i + o * a > 0) ? "livre" : Math.abs(e - r) <= V * Math.max(e, r) ? "simetrico" : "suave";
237
+ return e === 0 || r === 0 || !(Math.abs(n * a - o * i) <= q * e * r && n * i + o * a > 0) ? "livre" : Math.abs(e - r) <= q * Math.max(e, r) ? "simetrico" : "suave";
220
238
  }
221
- const xt = 24, Ct = 2, q = (t) => typeof t == "number" && Number.isFinite(t), O = (t) => Array.isArray(t) && t.length === 2 && q(t[0]) && q(t[1]);
222
- function Xt(t, n) {
239
+ const bt = 24, St = 2, G = (t) => typeof t == "number" && Number.isFinite(t), j = (t) => Array.isArray(t) && t.length === 2 && G(t[0]) && G(t[1]);
240
+ function Yt(t, n) {
223
241
  return [2 * t[0] - n[0], 2 * t[1] - n[1]];
224
242
  }
225
- function It(t) {
243
+ function Nt(t) {
226
244
  return t.some((n) => n.entrada !== void 0 || n.saida !== void 0);
227
245
  }
228
- function nt(t, n) {
246
+ function at(t, n) {
229
247
  return [t.saida ?? t.ponto, n.entrada ?? n.ponto];
230
248
  }
231
- function ot(t, n) {
249
+ function et(t, n) {
232
250
  const o = [];
233
251
  for (let i = 0; i < t - 1; i++) o.push([i, i + 1]);
234
252
  return n && t > 2 && o.push([t - 1, 0]), o;
235
253
  }
236
- function Pt(t, n, o, i, a) {
254
+ function Tt(t, n, o, i, a) {
237
255
  const e = 1 - a, r = e * e * e, c = 3 * e * e * a, s = 3 * e * a * a, u = a * a * a;
238
256
  return [r * t[0] + c * n[0] + s * o[0] + u * i[0], r * t[1] + c * n[1] + s * o[1] + u * i[1]];
239
257
  }
240
- function Zt(t, n = !1, o = xt) {
258
+ function Kt(t, n = !1, o = bt) {
241
259
  if (t.length === 0) return [];
242
260
  const i = [[t[0].ponto[0], t[0].ponto[1]]];
243
- for (const [a, e] of ot(t.length, n)) {
261
+ for (const [a, e] of et(t.length, n)) {
244
262
  const r = t[a], c = t[e];
245
263
  if (!(r.saida === void 0 && c.entrada === void 0)) {
246
- const [u, l] = nt(r, c);
247
- for (let d = 1; d < o; d++) i.push(Pt(r.ponto, u, l, c.ponto, d / o));
264
+ const [u, h] = at(r, c);
265
+ for (let d = 1; d < o; d++) i.push(Tt(r.ponto, u, h, c.ponto, d / o));
248
266
  }
249
267
  e !== 0 && i.push([c.ponto[0], c.ponto[1]]);
250
268
  }
251
269
  return i;
252
270
  }
253
- function bt(t, n) {
271
+ function wt(t, n) {
254
272
  if (t.length === 0) return [];
255
273
  const o = [{ cmd: "M", pts: [t[0].ponto] }];
256
- for (const [i, a] of ot(t.length, n)) {
274
+ for (const [i, a] of et(t.length, n)) {
257
275
  const e = t[i], r = t[a];
258
276
  if (e.saida === void 0 && r.entrada === void 0)
259
277
  o.push({ cmd: "L", pts: [r.ponto] });
260
278
  else {
261
- const [c, s] = nt(e, r);
279
+ const [c, s] = at(e, r);
262
280
  o.push({ cmd: "C", pts: [c, s, r.ponto] });
263
281
  }
264
282
  }
265
283
  return o;
266
284
  }
267
- function Bt(t, n, o) {
268
- const i = (e) => String(Math.round(e * 100) / 100), a = bt(t, n).map((e) => e.cmd + e.pts.map((r) => {
285
+ function Wt(t, n, o) {
286
+ const i = (e) => String(Math.round(e * 100) / 100), a = wt(t, n).map((e) => e.cmd + e.pts.map((r) => {
269
287
  const c = o(r);
270
288
  return `${i(c.x)} ${i(c.y)}`;
271
289
  }).join(" ")).join("");
272
290
  return a && n ? `${a}Z` : a;
273
291
  }
274
- function Jt(t, n = Ct) {
292
+ function tn(t, n = St) {
275
293
  if (!Array.isArray(t) || t.length < n) return null;
276
294
  const o = [];
277
295
  for (const i of t) {
278
- if (!i || typeof i != "object" || !O(i.ponto)) return null;
296
+ if (!i || typeof i != "object" || !j(i.ponto)) return null;
279
297
  const a = i, e = { ponto: [a.ponto[0], a.ponto[1]] };
280
- O(a.entrada) && (e.entrada = [a.entrada[0], a.entrada[1]]), O(a.saida) && (e.saida = [a.saida[0], a.saida[1]]), typeof a.modo == "string" && tt.has(a.modo) && (e.entrada || e.saida) && (e.modo = a.modo), o.push(e);
298
+ j(a.entrada) && (e.entrada = [a.entrada[0], a.entrada[1]]), j(a.saida) && (e.saida = [a.saida[0], a.saida[1]]), typeof a.modo == "string" && it.has(a.modo) && (e.entrada || e.saida) && (e.modo = a.modo), o.push(e);
281
299
  }
282
- return It(o) ? o : null;
300
+ return Nt(o) ? o : null;
283
301
  }
284
- function Qt(t, n) {
302
+ function nn(t, n) {
285
303
  return t.map((o) => {
286
304
  const i = { ponto: n(o.ponto) };
287
305
  return o.entrada && (i.entrada = n(o.entrada)), o.saida && (i.saida = n(o.saida)), o.modo && (i.modo = o.modo), i;
288
306
  });
289
307
  }
290
- function Yt(t) {
308
+ function on(t) {
291
309
  return t.tipo === "LineString" ? t.curva && t.curva.length >= 2 && !(t.partes && t.partes.length > 1) ? t.curva : null : t.tipo === "Polygon" && t.curva && t.curva.length >= 3 && t.aneis.length === 1 ? t.curva : null;
292
310
  }
293
- const St = [
311
+ const jt = [
294
312
  "continua",
295
313
  "tracejada",
296
314
  "tracejada-curta",
@@ -302,7 +320,7 @@ const St = [
302
320
  "centro",
303
321
  "fantasma",
304
322
  "divisa"
305
- ], Nt = {
323
+ ], Ot = {
306
324
  tracejada: [12, 6],
307
325
  "tracejada-curta": [6, 4],
308
326
  "tracejada-longa": [24, 8],
@@ -313,7 +331,7 @@ const St = [
313
331
  centro: [24, 4, 6, 4],
314
332
  fantasma: [24, 4, 6, 4, 6, 4],
315
333
  divisa: [12, 4, 12, 4, 0, 4]
316
- }, G = { arredondada: "round", reta: "butt", quadrada: "square" }, H = { arredondada: "round", chanfrada: "bevel", angular: "miter" }, Tt = 0.05, jt = 100, X = {
334
+ }, H = { arredondada: "round", reta: "butt", quadrada: "square" }, X = { arredondada: "round", chanfrada: "bevel", angular: "miter" }, Ft = 0.05, Dt = 100, Z = {
317
335
  continuous: "continua",
318
336
  dashed: "tracejada",
319
337
  dashed2: "tracejada-curta",
@@ -327,70 +345,70 @@ const St = [
327
345
  phantom: "fantasma",
328
346
  border: "divisa"
329
347
  };
330
- function Z(t) {
331
- return typeof t == "string" && St.includes(t);
348
+ function B(t) {
349
+ return typeof t == "string" && jt.includes(t);
332
350
  }
333
- function it(t) {
334
- if (Z(t)) return t;
351
+ function rt(t) {
352
+ if (B(t)) return t;
335
353
  if (typeof t != "string") return;
336
354
  const n = t.trim().toLowerCase();
337
- return Z(n) ? n : Object.prototype.hasOwnProperty.call(X, n) ? X[n] : void 0;
338
- }
339
- function B(t) {
340
- return typeof t == "string" && Object.prototype.hasOwnProperty.call(G, t) ? G[t] : void 0;
355
+ return B(n) ? n : Object.prototype.hasOwnProperty.call(Z, n) ? Z[n] : void 0;
341
356
  }
342
357
  function J(t) {
343
358
  return typeof t == "string" && Object.prototype.hasOwnProperty.call(H, t) ? H[t] : void 0;
344
359
  }
345
- function Ot(t) {
346
- return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? 1 : Math.min(jt, Math.max(Tt, t));
360
+ function Q(t) {
361
+ return typeof t == "string" && Object.prototype.hasOwnProperty.call(X, t) ? X[t] : void 0;
347
362
  }
348
- function Q(t, n, o = 1, i = "round") {
349
- const a = it(t);
363
+ function Et(t) {
364
+ return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? 1 : Math.min(Dt, Math.max(Ft, t));
365
+ }
366
+ function Y(t, n, o = 1, i = "round") {
367
+ const a = rt(t);
350
368
  if (!a || a === "continua") return;
351
- const e = Number.isFinite(n) && n > 0 ? n : 1, r = Ot(o) * Math.max(1, e / 2), c = i === "butt" ? e : 0, s = i === "butt" ? 0 : e;
352
- return Nt[a].map((u, l) => {
353
- const d = l % 2 === 0 ? u === 0 ? c : u * r : u * r + s;
369
+ const e = Number.isFinite(n) && n > 0 ? n : 1, r = Et(o) * Math.max(1, e / 2), c = i === "butt" ? e : 0, s = i === "butt" ? 0 : e;
370
+ return Ot[a].map((u, h) => {
371
+ const d = h % 2 === 0 ? u === 0 ? c : u * r : u * r + s;
354
372
  return Math.round(d * 100) / 100;
355
373
  }).join(" ");
356
374
  }
357
- const wt = "#38bdf8", Et = "#38bdf8", Ft = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\([0-9.,%\s\/-]+\)|[a-z]{3,20})$/i;
358
- function w(t, n) {
359
- return typeof t == "string" && Ft.test(t.trim()) ? t.trim() : n;
375
+ const _t = "#38bdf8", Rt = "#38bdf8", $t = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\([0-9.,%\s\/-]+\)|[a-z]{3,20})$/i;
376
+ function O(t, n) {
377
+ return typeof t == "string" && $t.test(t.trim()) ? t.trim() : n;
360
378
  }
361
- const g = (t) => typeof t == "number" && Number.isFinite(t);
362
- function Kt(t, n, o = !1) {
363
- const i = t.estilo ?? {}, a = w(i.corTraco ?? n.corPrimaria, wt), e = t.geometria.tipo, r = e === "Polygon" || e === "Circle", c = e === "Point", s = c && w(i.corContorno, "") || a, u = c && g(i.espessuraContorno) && i.espessuraContorno >= 0 ? i.espessuraContorno : void 0, l = u ?? (g(i.espessuraTraco) ? i.espessuraTraco : void 0) ?? (g(n.espessuraLinha) ? n.espessuraLinha : 2), d = g(i.opacidadePreenchimento) ? i.opacidadePreenchimento : r ? 0.2 : 0.85, f = o ? l + 2 : l, L = B(i.terminacaoTraco) ?? B(n.terminacaoLinha) ?? "round", A = g(i.opacidadeTraco) ? i.opacidadeTraco : g(n.opacidadeLinha) ? n.opacidadeLinha : 1;
379
+ const x = (t) => typeof t == "number" && Number.isFinite(t);
380
+ function an(t, n, o = !1) {
381
+ const i = t.estilo ?? {}, a = O(i.corTraco ?? n.corPrimaria, _t), e = t.geometria.tipo, r = e === "Polygon" || e === "Circle", c = e === "Point", s = c && O(i.corContorno, "") || a, u = c && x(i.espessuraContorno) && i.espessuraContorno >= 0 ? i.espessuraContorno : void 0, h = u ?? (x(i.espessuraTraco) ? i.espessuraTraco : void 0) ?? (x(n.espessuraLinha) ? n.espessuraLinha : 2), d = x(i.opacidadePreenchimento) ? i.opacidadePreenchimento : r ? 0.2 : 0.85, f = o ? h + 2 : h, L = J(i.terminacaoTraco) ?? J(n.terminacaoLinha) ?? "round", A = x(i.opacidadeTraco) ? i.opacidadeTraco : x(n.opacidadeLinha) ? n.opacidadeLinha : 1;
364
382
  return {
365
- cor: o ? Et : s,
383
+ cor: o ? Rt : s,
366
384
  traco: !(u === 0 && !o),
367
385
  peso: f,
368
- dash: Dt(t, n, f, L),
386
+ dash: Ut(t, n, f, L),
369
387
  // selecionada fica opaca: a seleção precisa aparecer mesmo numa linha quase transparente
370
388
  opacidadeTraco: o ? 1 : Math.min(1, Math.max(0, A)),
371
389
  terminacao: L,
372
- juncao: J(i.juncaoTraco) ?? J(n.juncaoLinha) ?? "round",
373
- deslocamentoDash: g(i.deslocamentoTracejado) ? i.deslocamentoTracejado : 0,
390
+ juncao: Q(i.juncaoTraco) ?? Q(n.juncaoLinha) ?? "round",
391
+ deslocamentoDash: x(i.deslocamentoTracejado) ? i.deslocamentoTracejado : 0,
374
392
  preencher: r || c,
375
- corPreenchimento: w(i.corPreenchimento, a),
393
+ corPreenchimento: O(i.corPreenchimento, a),
376
394
  opacidadePreenchimento: o ? Math.min(1, d + 0.18) : d
377
395
  };
378
396
  }
379
- function Dt(t, n, o, i) {
397
+ function Ut(t, n, o, i) {
380
398
  const a = t.estilo ?? {};
381
399
  if (a.dashArray) return a.dashArray;
382
400
  if (a.tipoLinha !== void 0 && a.tipoLinha !== null) {
383
- const e = Q(a.tipoLinha, o, a.escalaTipoLinha ?? n.escalaTipoLinha, i);
384
- if (e || it(a.tipoLinha) === "continua") return e;
401
+ const e = Y(a.tipoLinha, o, a.escalaTipoLinha ?? n.escalaTipoLinha, i);
402
+ if (e || rt(a.tipoLinha) === "continua") return e;
385
403
  }
386
- return _(t) === "previa" ? "6 4" : n.dashArray ? n.dashArray : Q(n.tipoLinha, o, n.escalaTipoLinha, i);
404
+ return E(t) === "previa" ? "6 4" : n.dashArray ? n.dashArray : Y(n.tipoLinha, o, n.escalaTipoLinha, i);
387
405
  }
388
- function Wt(t, n) {
406
+ function en(t, n) {
389
407
  var i;
390
408
  const o = ((i = t.estilo) == null ? void 0 : i.tamanhoIcone) ?? n.tamanhoMarcador ?? 8;
391
- return (g(o) && o > 0 ? o : 8) / 2;
409
+ return (x(o) && o > 0 ? o : 8) / 2;
392
410
  }
393
- class tn {
411
+ class rn {
394
412
  constructor() {
395
413
  y(this, "porChave", /* @__PURE__ */ new Map());
396
414
  }
@@ -402,37 +420,37 @@ class tn {
402
420
  this.porChave.clear();
403
421
  }
404
422
  }
405
- const _t = 256, C = 85.0511287798, Rt = 4007501668557849e-8;
406
- function R(t, n, o, i, a) {
423
+ const zt = 256, C = 85.0511287798, kt = 4007501668557849e-8;
424
+ function _(t, n, o, i, a) {
407
425
  const e = o > C ? C : o < -C ? -C : o, r = Math.sin(e * Math.PI / 180);
408
426
  t[n] = (i + 180) / 360 * a, t[n + 1] = (0.5 - Math.log((1 + r) / (1 - r)) / (4 * Math.PI)) * a;
409
427
  }
410
- const P = (t) => _t * 2 ** t;
411
- function nn(t, n, o) {
428
+ const P = (t) => zt * 2 ** t;
429
+ function sn(t, n, o) {
412
430
  const i = P(o);
413
431
  return [Math.atan(Math.sinh(Math.PI * (1 - 2 * n / i))) * 180 / Math.PI, t / i * 360 - 180];
414
432
  }
415
- function Y(t, n) {
433
+ function K(t, n) {
416
434
  const o = P(n), i = new Float64Array(t.length * 2);
417
435
  for (let a = 0; a < t.length; a++) {
418
436
  const e = t[a];
419
- R(i, a * 2, e[0], e[1], o);
437
+ _(i, a * 2, e[0], e[1], o);
420
438
  }
421
439
  return i;
422
440
  }
423
- function on(t, n, o) {
441
+ function cn(t, n, o) {
424
442
  const i = new Float64Array(2);
425
- return R(i, 0, t, n, P(o)), i;
443
+ return _(i, 0, t, n, P(o)), i;
426
444
  }
427
- function $t(t, n) {
445
+ function Vt(t, n) {
428
446
  const o = Math.max(-C, Math.min(C, t));
429
- return Rt * Math.cos(o * Math.PI / 180) / P(n);
447
+ return kt * Math.cos(o * Math.PI / 180) / P(n);
430
448
  }
431
- function an(t, n, o) {
432
- const i = $t(t, o), a = n / i;
449
+ function un(t, n, o) {
450
+ const i = Vt(t, o), a = n / i;
433
451
  return Number.isFinite(a) && a >= 0 ? a : 0;
434
452
  }
435
- function en(t) {
453
+ function ln(t) {
436
454
  let n = 1 / 0, o = 1 / 0, i = -1 / 0, a = -1 / 0;
437
455
  for (const e of t)
438
456
  for (let r = 0; r + 1 < e.length; r += 2) {
@@ -441,26 +459,26 @@ function en(t) {
441
459
  }
442
460
  return n <= i && o <= a ? { minX: n, minY: o, maxX: i, maxY: a } : null;
443
461
  }
444
- function at(t, n, o, i, a, e) {
462
+ function st(t, n, o, i, a, e) {
445
463
  const r = a - o, c = e - i, s = r * r + c * c;
446
464
  let u = s === 0 ? 0 : ((t - o) * r + (n - i) * c) / s;
447
465
  return u = u < 0 ? 0 : u > 1 ? 1 : u, Math.hypot(t - (o + u * r), n - (i + u * c));
448
466
  }
449
- let E = new Float64Array(64), F = new Uint8Array(32);
450
- const Ut = [];
451
- function rn(t, n, o, i) {
467
+ let F = new Float64Array(64), D = new Uint8Array(32);
468
+ const qt = [];
469
+ function hn(t, n, o, i) {
452
470
  const a = t.length;
453
- if (!(o > 0) || a < 3) return Y(t, n);
471
+ if (!(o > 0) || a < 3) return K(t, n);
454
472
  const e = P(n);
455
- E.length < (a + 1) * 2 && (E = new Float64Array((a + 1) * 2));
456
- const r = E, c = o * o;
473
+ F.length < (a + 1) * 2 && (F = new Float64Array((a + 1) * 2));
474
+ const r = F, c = o * o;
457
475
  let s = 0;
458
- for (let h = 0; h < a; h++) {
459
- const m = t[h];
460
- if (R(r, s * 2, m[0], m[1], e), s > 0) {
461
- const M = r[s * 2] - r[(s - 1) * 2], p = r[s * 2 + 1] - r[(s - 1) * 2 + 1], x = M * M + p * p < c;
462
- if (x && !(!i && h === a - 1)) continue;
463
- if (x && s > 1) {
476
+ for (let l = 0; l < a; l++) {
477
+ const m = t[l];
478
+ if (_(r, s * 2, m[0], m[1], e), s > 0) {
479
+ const M = r[s * 2] - r[(s - 1) * 2], p = r[s * 2 + 1] - r[(s - 1) * 2 + 1], g = M * M + p * p < c;
480
+ if (g && !(!i && l === a - 1)) continue;
481
+ if (g && s > 1) {
464
482
  r[(s - 1) * 2] = r[s * 2], r[(s - 1) * 2 + 1] = r[s * 2 + 1];
465
483
  continue;
466
484
  }
@@ -468,35 +486,35 @@ function rn(t, n, o, i) {
468
486
  s++;
469
487
  }
470
488
  if (i && s > 3) {
471
- const h = r[(s - 1) * 2] - r[0], m = r[(s - 1) * 2 + 1] - r[1];
472
- h * h + m * m < c && s--;
489
+ const l = r[(s - 1) * 2] - r[0], m = r[(s - 1) * 2 + 1] - r[1];
490
+ l * l + m * m < c && s--;
473
491
  }
474
- if (i && s < 3) return Y(t, n);
492
+ if (i && s < 3) return K(t, n);
475
493
  let u = s;
476
- i && (r[s * 2] = r[0], r[s * 2 + 1] = r[1], u = s + 1), F.length < u && (F = new Uint8Array(u * 2));
477
- const l = F;
478
- l.fill(0, 0, u), l[0] = 1, l[u - 1] = 1;
479
- const d = Ut;
494
+ i && (r[s * 2] = r[0], r[s * 2 + 1] = r[1], u = s + 1), D.length < u && (D = new Uint8Array(u * 2));
495
+ const h = D;
496
+ h.fill(0, 0, u), h[0] = 1, h[u - 1] = 1;
497
+ const d = qt;
480
498
  for (d.length = 0, d.push(0, u - 1); d.length > 0; ) {
481
- const h = d.pop(), m = d.pop();
499
+ const l = d.pop(), m = d.pop();
482
500
  let M = 0, p = -1;
483
- const x = r[m * 2], et = r[m * 2 + 1], rt = r[h * 2], st = r[h * 2 + 1];
484
- for (let I = m + 1; I < h; I++) {
485
- const $ = at(r[I * 2], r[I * 2 + 1], x, et, rt, st);
486
- $ > M && (M = $, p = I);
501
+ const g = r[m * 2], ct = r[m * 2 + 1], ut = r[l * 2], lt = r[l * 2 + 1];
502
+ for (let I = m + 1; I < l; I++) {
503
+ const R = st(r[I * 2], r[I * 2 + 1], g, ct, ut, lt);
504
+ R > M && (M = R, p = I);
487
505
  }
488
- p !== -1 && M > o && (l[p] = 1, d.push(m, p, p, h));
506
+ p !== -1 && M > o && (h[p] = 1, d.push(m, p, p, l));
489
507
  }
490
508
  const f = i ? u - 1 : u;
491
509
  let L = 0;
492
- for (let h = 0; h < f; h++) l[h] && L++;
510
+ for (let l = 0; l < f; l++) h[l] && L++;
493
511
  const A = i && L < 3, v = new Float64Array((A ? f : L) * 2);
494
512
  let b = 0;
495
- for (let h = 0; h < f; h++)
496
- !A && !l[h] || (v[b++] = r[h * 2], v[b++] = r[h * 2 + 1]);
513
+ for (let l = 0; l < f; l++)
514
+ !A && !h[l] || (v[b++] = r[l * 2], v[b++] = r[l * 2 + 1]);
497
515
  return v;
498
516
  }
499
- function sn(t, n, o) {
517
+ function dn(t, n, o) {
500
518
  const i = t.length >> 1;
501
519
  if (!(n > 0) || i < 3) return t;
502
520
  let a = t, e = i;
@@ -507,10 +525,10 @@ function sn(t, n, o) {
507
525
  for (; c.length > 0; ) {
508
526
  const f = c.pop(), L = c.pop();
509
527
  let A = 0, v = -1;
510
- const b = a[L * 2], h = a[L * 2 + 1], m = a[f * 2], M = a[f * 2 + 1];
528
+ const b = a[L * 2], l = a[L * 2 + 1], m = a[f * 2], M = a[f * 2 + 1];
511
529
  for (let p = L + 1; p < f; p++) {
512
- const x = at(a[p * 2], a[p * 2 + 1], b, h, m, M);
513
- x > A && (A = x, v = p);
530
+ const g = st(a[p * 2], a[p * 2 + 1], b, l, m, M);
531
+ g > A && (A = g, v = p);
514
532
  }
515
533
  v !== -1 && A > n && (r[v] = 1, c.push(L, v, v, f));
516
534
  }
@@ -518,60 +536,60 @@ function sn(t, n, o) {
518
536
  let u = 0;
519
537
  for (let f = 0; f < s; f++) r[f] && u++;
520
538
  if (o && u < 3 || u === s) return t;
521
- const l = new Float64Array(u * 2);
539
+ const h = new Float64Array(u * 2);
522
540
  let d = 0;
523
541
  for (let f = 0; f < s; f++)
524
- r[f] && (l[d++] = a[f * 2], l[d++] = a[f * 2 + 1]);
525
- return l;
542
+ r[f] && (h[d++] = a[f * 2], h[d++] = a[f * 2 + 1]);
543
+ return h;
526
544
  }
527
545
  export {
528
- en as A,
529
- Q as B,
530
- Et as C,
531
- at as D,
532
- Z as E,
546
+ ln as A,
547
+ Y as B,
548
+ Rt as C,
549
+ st as D,
550
+ B as E,
533
551
  P as F,
534
- k as G,
535
- Ot as H,
536
- Vt as I,
537
- $t as J,
538
- on as K,
539
- R as L,
540
- mt as M,
541
- rn as N,
542
- Y as O,
543
- an as P,
544
- At as Q,
545
- Gt as R,
546
- W as S,
547
- St as T,
548
- sn as U,
549
- vt as V,
550
- pt as Z,
551
- Zt as a,
552
- Ht as b,
553
- nt as c,
554
- w as d,
555
- Xt as e,
556
- bt as f,
557
- Bt as g,
558
- wt as h,
552
+ V as G,
553
+ Et as H,
554
+ Zt as I,
555
+ Vt as J,
556
+ cn as K,
557
+ _ as L,
558
+ At as M,
559
+ hn as N,
560
+ K as O,
561
+ un as P,
562
+ Ct as Q,
563
+ Jt as R,
564
+ ot as S,
565
+ jt as T,
566
+ dn as U,
567
+ xt as V,
568
+ yt as Z,
569
+ Kt as a,
570
+ Qt as b,
571
+ at as c,
572
+ O as d,
573
+ Yt as e,
574
+ wt as f,
575
+ Wt as g,
576
+ _t as h,
559
577
  T as i,
560
- qt as j,
578
+ Bt as j,
561
579
  N as k,
562
- Kt as l,
563
- Qt as m,
564
- Yt as n,
565
- nn as o,
566
- Pt as p,
567
- Jt as q,
568
- Wt as r,
569
- _ as s,
570
- It as t,
571
- J as u,
572
- Mt as v,
573
- B as w,
574
- it as x,
575
- tn as y,
576
- U as z
580
+ an as l,
581
+ nn as m,
582
+ on as n,
583
+ sn as o,
584
+ Tt as p,
585
+ tn as q,
586
+ en as r,
587
+ E as s,
588
+ Nt as t,
589
+ Q as u,
590
+ It as v,
591
+ J as w,
592
+ rt as x,
593
+ rn as y,
594
+ Xt as z
577
595
  };