@thibezer/ui-components-kit 2.11.1 → 2.12.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.
- package/CHANGELOG.md +96 -21
- package/dist/alvo-digitavel-CzCvNVQ3.js +23 -0
- package/dist/alvo-digitavel-DbH0hYFf.cjs +1 -0
- package/dist/camadas.cjs +89 -106
- package/dist/camadas.js +1030 -935
- package/dist/canvas.cjs +27 -27
- package/dist/canvas.js +801 -819
- package/dist/components/ui-camadas/camadas-arvore-renderer.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-colecao.d.ts +1 -1
- package/dist/components/ui-camadas/camadas-drop-ops.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-eventos-camadas.d.ts +2 -0
- package/dist/components/ui-camadas/camadas-hierarquia.d.ts +12 -2
- package/dist/components/ui-camadas/camadas-host.d.ts +6 -0
- package/dist/components/ui-camadas/camadas-metricas.d.ts +2 -1
- package/dist/components/ui-camadas/camadas-rodape.d.ts +5 -0
- package/dist/components/ui-camadas/camadas-selecao.d.ts +2 -2
- package/dist/components/ui-camadas/tipos.d.ts +1 -0
- package/dist/components/ui-camadas/ui-camadas.d.ts +3 -0
- package/dist/components/ui-tabela-propriedades/editores-basicos.d.ts +4 -1
- package/dist/components/ui-tabela-propriedades/propriedades-dom-utils.d.ts +2 -0
- package/dist/components/ui-tabela-propriedades/propriedades-gerenciador-valores.d.ts +3 -0
- package/dist/components/ui-tabela-propriedades/propriedades-painel-controles.d.ts +1 -0
- package/dist/components/ui-tabela-propriedades/tipos.d.ts +14 -0
- package/dist/components/ui-tabela-propriedades/ui-tabela-propriedades.d.ts +20 -0
- package/dist/components/ui-texto-editavel/index.d.ts +2 -0
- package/dist/components/ui-texto-editavel/texto-editavel-teclado.d.ts +12 -0
- package/dist/components/ui-texto-editavel/texto-editavel-template.d.ts +2 -0
- package/dist/components/ui-texto-editavel/tipos.d.ts +14 -0
- package/dist/components/ui-texto-editavel/ui-texto-editavel.d.ts +82 -0
- package/dist/custom-elements.json +25342 -21856
- package/dist/data.cjs +1 -1
- package/dist/data.js +79 -72
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +198 -189
- package/dist/register.cjs +1 -1
- package/dist/register.js +2 -2
- package/dist/tabela.cjs +1 -1
- package/dist/tabela.js +71 -64
- package/dist/tipos-elementos.d.ts +137 -6
- package/dist/tipos-react.d.ts +6 -0
- package/dist/tipos-vue.d.ts +125 -6
- package/dist/ui-linha-BxhEBn27.js +749 -0
- package/dist/ui-linha-CcalUBDw.cjs +38 -0
- package/dist/ui-tabela-propriedades-CyPyKXtB.js +3013 -0
- package/dist/ui-tabela-propriedades-DqvPilK_.cjs +142 -0
- package/package.json +1 -1
package/dist/canvas.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var f = (a, t, e) =>
|
|
1
|
+
var gi = Object.defineProperty;
|
|
2
|
+
var vi = (a, t, e) => t in a ? gi(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var f = (a, t, e) => vi(a, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
/* empty css */
|
|
5
5
|
import y from "leaflet";
|
|
6
|
-
import { e as T, p as V, r as Et, b as kt, a as Zt, o as Xt, c as Je, l as
|
|
7
|
-
import { f as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { e as T, p as V, r as Et, b as kt, a as Zt, o as Xt, c as Je, l as yi } from "./leaflet-PPDKB6Dd.js";
|
|
7
|
+
import { f as $r } from "./leaflet-PPDKB6Dd.js";
|
|
8
|
+
import { f as Tt, a as Fo } from "./alvo-digitavel-CzCvNVQ3.js";
|
|
9
|
+
import { p as bi, c as xi, n as bt, e as Yt, m as Qe, a as Kt, b as it, d as je, f as xt, g as He, h as Oo, i as Ge, j as Pt, k as Pi, l as ot, C as Ue, o as Jt, I as Li, s as mt, q as ct, v as Si, M as Ci, Z as to, r as Mi, t as Ai, u as wi, w as eo, x as oo, A as zi, y as _t, z as ke, B as io, D as Ei, E as ki, F as ao, G as Ii, H as dt, J as ht, K as Lt, L as W, R as We, N as Ti, O as No, P as _i, Q as Di, S as qi, T as $i } from "./motor-CXjQjVba.js";
|
|
10
|
+
import { U as Or, V as Nr, W as Rr, X as Br, Y as Vr, _ as jr, $ as Hr, a0 as Gr, a1 as Ur, a2 as Wr, a3 as Zr, a4 as Xr, a5 as Yr, a6 as Kr, a7 as Jr, a8 as Qr, a9 as tc, aa as ec, ab as oc, ac as ic, ad as ac, ae as nc, af as sc, ag as rc, ah as cc, ai as lc, aj as dc, ak as hc, al as uc } from "./motor-CXjQjVba.js";
|
|
10
11
|
import { L as Qt } from "./listener-bag-DQgv7OON.js";
|
|
11
|
-
import { d as
|
|
12
|
+
import { d as Fi, S as Oi } from "./ssr-safe-5cWfJP-s.js";
|
|
12
13
|
const no = {
|
|
13
14
|
perimetroWeight: 1,
|
|
14
15
|
fechamentoWeight: 1,
|
|
@@ -53,13 +54,13 @@ const no = {
|
|
|
53
54
|
};
|
|
54
55
|
f(lt, "instance");
|
|
55
56
|
let Ie = lt;
|
|
56
|
-
const Ze = "sob-demanda",
|
|
57
|
+
const Ze = "sob-demanda", Ni = 700;
|
|
57
58
|
function te(a) {
|
|
58
59
|
const t = typeof a == "string" ? a.trim().toLowerCase() : "";
|
|
59
60
|
return t === "automatico" || t === "desligado" || t === "sob-demanda" ? t : Ze;
|
|
60
61
|
}
|
|
61
62
|
const Vt = /* @__PURE__ */ new WeakMap();
|
|
62
|
-
function
|
|
63
|
+
function Ri(a) {
|
|
63
64
|
const t = a && typeof a == "object" ? a.options : void 0;
|
|
64
65
|
return !!t && t.closeButton !== void 0 && t.autoPan !== void 0;
|
|
65
66
|
}
|
|
@@ -67,7 +68,7 @@ function Xe(a, t) {
|
|
|
67
68
|
const e = a ? Vt.get(a) : void 0;
|
|
68
69
|
return e ? e.liberar(t) : t();
|
|
69
70
|
}
|
|
70
|
-
class
|
|
71
|
+
class Bi {
|
|
71
72
|
constructor(t, e = Ze) {
|
|
72
73
|
f(this, "liberados", 0);
|
|
73
74
|
/** Verdadeiro durante o despacho síncrono de um clique no mapa (o Leaflet abre popups dentro dele). */
|
|
@@ -86,7 +87,7 @@ class Vi {
|
|
|
86
87
|
this.map = t, this.modoAtual = e, this.original = t.addLayer;
|
|
87
88
|
const o = this;
|
|
88
89
|
t.addLayer = function(n) {
|
|
89
|
-
return
|
|
90
|
+
return Ri(n) ? o.aoAbrir(this, n) : o.original.call(this, n);
|
|
90
91
|
}, this.container = typeof t.getContainer == "function" ? t.getContainer() : null, (i = this.container) == null || i.addEventListener("click", this.marcarClique, !0), Vt.set(t, this);
|
|
91
92
|
}
|
|
92
93
|
get modo() {
|
|
@@ -124,14 +125,14 @@ class Vi {
|
|
|
124
125
|
return (r = e.openPopup) == null ? void 0 : r.call(e, typeof e.getLatLng == "function" || s == null ? void 0 : s.latlng);
|
|
125
126
|
});
|
|
126
127
|
};
|
|
127
|
-
o = setTimeout(i,
|
|
128
|
+
o = setTimeout(i, Ni), e.on("dblclick", n), this.pendentes.set(e, i);
|
|
128
129
|
}
|
|
129
130
|
cancelarPendentes() {
|
|
130
131
|
for (const t of [...this.pendentes.values()]) t();
|
|
131
132
|
this.pendentes.clear();
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
async function
|
|
135
|
+
async function Vi(a, t, e, o) {
|
|
135
136
|
const i = a.getSize(), n = a.getBounds(), s = n.getSouthWest(), r = n.getNorthEast(), c = `${s.lng},${s.lat},${r.lng},${r.lat}`;
|
|
136
137
|
let l = 0, d = 0;
|
|
137
138
|
try {
|
|
@@ -165,19 +166,19 @@ async function ji(a, t, e, o) {
|
|
|
165
166
|
try {
|
|
166
167
|
const M = typeof window < "u" && (window.location.origin.includes("localhost") || window.location.origin.includes("127.0.0.1") || window.location.origin.includes("[::1]")) ? `${e}/proxy/sigef?url=${encodeURIComponent(h)}` : `${window.location.origin}/api.php?action=proxy_sigef&url=${encodeURIComponent(h)}`, z = await fetch(M, { signal: g });
|
|
167
168
|
clearTimeout(u);
|
|
168
|
-
let
|
|
169
|
+
let S = null;
|
|
169
170
|
if (z.ok) {
|
|
170
171
|
const L = await z.text();
|
|
171
172
|
try {
|
|
172
|
-
|
|
173
|
+
S = JSON.parse(L);
|
|
173
174
|
} catch {
|
|
174
|
-
|
|
175
|
+
S = null;
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
|
-
if (
|
|
178
|
-
const L =
|
|
178
|
+
if (S && S.features && S.features.length > 0) {
|
|
179
|
+
const L = S.features[0], b = L.properties || {}, x = String(L.id || b.parcela_codigo || b.co_parcela || b.id_parcela || ""), P = String(b.nome_area || b.nome_imovel || "Imóvel Sem Nome");
|
|
179
180
|
if (x) {
|
|
180
|
-
const A = encodeURIComponent(x), E = `https://sigef.incra.gov.br/geo/exportar/parcela/shp/${A}/`,
|
|
181
|
+
const A = encodeURIComponent(x), E = `https://sigef.incra.gov.br/geo/exportar/parcela/shp/${A}/`, C = `https://sigef.incra.gov.br/geo/parcela/detalhe/${A}/`, w = document.createElement("div");
|
|
181
182
|
w.style.cssText = "font-family:var(--ui-fonte-base, sans-serif); color:rgba(255, 255, 255, 0.9); line-height:1.4; min-width:180px;", w.innerHTML = `
|
|
182
183
|
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; padding-bottom:5px; border-bottom:1px solid rgba(255, 255, 255, 0.1);">
|
|
183
184
|
<span style="font-weight:700; font-size:11px; color:#10b981; text-transform:uppercase; letter-spacing:0.5px;">SIGEF</span>
|
|
@@ -198,7 +199,7 @@ async function ji(a, t, e, o) {
|
|
|
198
199
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
|
199
200
|
Importar Confrontante (CSV)
|
|
200
201
|
</button>
|
|
201
|
-
<a href="${
|
|
202
|
+
<a href="${C}" target="_blank" rel="noopener noreferrer" style="display:flex; align-items:center; justify-content:center; gap:4px; padding:4px 6px; background:rgba(255, 255, 255, 0.05); border:1px solid rgba(255, 255, 255, 0.1); color:rgba(255, 255, 255, 0.7); font-size:10px; font-weight:600; border-radius:5px; text-decoration:none; cursor:pointer;">
|
|
202
203
|
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>
|
|
203
204
|
Abrir no SIGEF
|
|
204
205
|
</a>
|
|
@@ -238,7 +239,7 @@ async function ji(a, t, e, o) {
|
|
|
238
239
|
p.style.cursor = "";
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
|
-
function
|
|
242
|
+
function ji(a, t) {
|
|
242
243
|
if (!a) return;
|
|
243
244
|
const e = Math.floor(a.getZoom()), o = Math.max(e, 12), i = Math.min(e + 1, 19), n = t.pad(0.2), s = ["mt0", "mt1", "mt2", "mt3"];
|
|
244
245
|
let r = 0;
|
|
@@ -247,8 +248,8 @@ function Hi(a, t) {
|
|
|
247
248
|
const d = n.getNorthWest(), h = n.getSouthEast(), p = so(d.lng, l), m = so(h.lng, l), g = ro(d.lat, l), u = ro(h.lat, l);
|
|
248
249
|
for (let v = p; v <= m && r < c; v++)
|
|
249
250
|
for (let M = g; M <= u && r < c; M++) {
|
|
250
|
-
const
|
|
251
|
-
L.src =
|
|
251
|
+
const S = `https://${s[(v + M) % s.length]}.google.com/vt/lyrs=s,h&x=${v}&y=${M}&z=${l}`, L = new Image();
|
|
252
|
+
L.src = S, r++;
|
|
252
253
|
}
|
|
253
254
|
}
|
|
254
255
|
}
|
|
@@ -261,21 +262,21 @@ function ro(a, t) {
|
|
|
261
262
|
(1 - Math.log(Math.tan(e) + 1 / Math.cos(e)) / Math.PI) / 2 * Math.pow(2, t)
|
|
262
263
|
);
|
|
263
264
|
}
|
|
264
|
-
const
|
|
265
|
+
const Hi = {
|
|
265
266
|
zoomSnap: 0.25,
|
|
266
267
|
zoomDelta: 0.5,
|
|
267
268
|
wheelPxPerZoomLevel: 90
|
|
268
269
|
};
|
|
269
|
-
function
|
|
270
|
+
function Gi(a, t) {
|
|
270
271
|
const e = a;
|
|
271
272
|
return !e || !t || e._popup !== t ? !1 : (e._popup = null, !0);
|
|
272
273
|
}
|
|
273
|
-
function
|
|
274
|
+
function Ui(a) {
|
|
274
275
|
a.on("popupclose", (t) => {
|
|
275
|
-
|
|
276
|
+
Gi(a, t.popup);
|
|
276
277
|
});
|
|
277
278
|
}
|
|
278
|
-
class
|
|
279
|
+
class Wi {
|
|
279
280
|
constructor(t) {
|
|
280
281
|
f(this, "map", null);
|
|
281
282
|
f(this, "configManager", Ie.getInstance());
|
|
@@ -321,8 +322,8 @@ class Zi {
|
|
|
321
322
|
scrollWheelZoom: !0,
|
|
322
323
|
preferCanvas: this.config.preferCanvas !== void 0 ? this.config.preferCanvas : !0,
|
|
323
324
|
zoomControl: !1,
|
|
324
|
-
...
|
|
325
|
-
}).setView([-23.7661, -53.3204], 14), this.popups = new
|
|
325
|
+
...Hi
|
|
326
|
+
}).setView([-23.7661, -53.3204], 14), this.popups = new Bi(this.map, this.modoPopups), this.listenConfigBroadcast(), this.applyMapStyles(), Ui(this.map), !this.map.getPane("sigefPane")) {
|
|
326
327
|
const i = this.map.createPane("sigefPane");
|
|
327
328
|
i.style.zIndex = "390";
|
|
328
329
|
}
|
|
@@ -397,32 +398,13 @@ class Zi {
|
|
|
397
398
|
}
|
|
398
399
|
}
|
|
399
400
|
preCarregarTilesRegiao(t) {
|
|
400
|
-
|
|
401
|
+
ji(this.map, t);
|
|
401
402
|
}
|
|
402
403
|
async consultarSigef(t) {
|
|
403
|
-
this.map && await
|
|
404
|
+
this.map && await Vi(this.map, t, this.apiBaseUrl, this.sigefState);
|
|
404
405
|
}
|
|
405
406
|
}
|
|
406
|
-
|
|
407
|
-
if (!a) return !1;
|
|
408
|
-
const t = a;
|
|
409
|
-
return t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT" || t.isContentEditable === !0;
|
|
410
|
-
}
|
|
411
|
-
const Xi = 'button, a[href], summary, [role="button"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"], [role="option"]';
|
|
412
|
-
function Ro(a) {
|
|
413
|
-
var e;
|
|
414
|
-
const t = ((e = a.composedPath) == null ? void 0 : e.call(a)[0]) ?? a.target;
|
|
415
|
-
return t instanceof Element ? t.closest(Xi) !== null : !1;
|
|
416
|
-
}
|
|
417
|
-
function Tt(a) {
|
|
418
|
-
var o, i;
|
|
419
|
-
const t = (o = a == null ? void 0 : a.composedPath) == null ? void 0 : o.call(a)[0];
|
|
420
|
-
if (t instanceof Element) return co(t);
|
|
421
|
-
let e = typeof document > "u" ? null : document.activeElement;
|
|
422
|
-
for (; (i = e == null ? void 0 : e.shadowRoot) != null && i.activeElement; ) e = e.shadowRoot.activeElement;
|
|
423
|
-
return co(e);
|
|
424
|
-
}
|
|
425
|
-
const Yi = [
|
|
407
|
+
const Zi = [
|
|
426
408
|
"verticesPane",
|
|
427
409
|
"perimetroPane",
|
|
428
410
|
"overlayPane",
|
|
@@ -433,7 +415,7 @@ const Yi = [
|
|
|
433
415
|
"pane-homologados",
|
|
434
416
|
"pane-homologados-pontos"
|
|
435
417
|
];
|
|
436
|
-
class
|
|
418
|
+
class Xi {
|
|
437
419
|
constructor(t, e, o) {
|
|
438
420
|
f(this, "map");
|
|
439
421
|
f(this, "mapContainer");
|
|
@@ -448,7 +430,7 @@ class Ki {
|
|
|
448
430
|
this.selectionDiv || (this.selectionDiv = document.createElement("div"), this.selectionDiv.className = "cad-selection-box", this.selectionDiv.style.position = "absolute", this.selectionDiv.style.zIndex = "9999", this.selectionDiv.style.pointerEvents = "none", this.selectionDiv.style.display = "none", this.selectionDiv.style.borderRadius = "2px", this.mapContainer.style.position = "relative", this.mapContainer.appendChild(this.selectionDiv));
|
|
449
431
|
}
|
|
450
432
|
setPanesPointerEvents(t) {
|
|
451
|
-
|
|
433
|
+
Zi.forEach((e) => {
|
|
452
434
|
const o = this.map.getPane(e);
|
|
453
435
|
o && (o.style.pointerEvents = t);
|
|
454
436
|
});
|
|
@@ -463,7 +445,7 @@ class Ki {
|
|
|
463
445
|
this.selectionDiv.style.left = `${Math.round(r)}px`, this.selectionDiv.style.top = `${Math.round(c)}px`, this.selectionDiv.style.width = `${Math.round(n)}px`, this.selectionDiv.style.height = `${Math.round(s)}px`, o >= this.selectStartPos.x ? (this.selectionDiv.style.background = "rgba(14, 116, 144, 0.22)", this.selectionDiv.style.border = "1px solid #06b6d4") : (this.selectionDiv.style.background = "rgba(16, 185, 129, 0.22)", this.selectionDiv.style.border = "1px dashed #10b981");
|
|
464
446
|
}
|
|
465
447
|
finalizarSelecao(t, e, o) {
|
|
466
|
-
var z,
|
|
448
|
+
var z, S, L, b, x, P, A, E, C;
|
|
467
449
|
if (!this.isSelecting) return !1;
|
|
468
450
|
this.isSelecting = !1, this.selectionDiv && (this.selectionDiv.style.display = "none"), this.map.closePopup();
|
|
469
451
|
try {
|
|
@@ -473,7 +455,7 @@ class Ki {
|
|
|
473
455
|
const i = this.mapContainer.getBoundingClientRect(), n = t.clientX - i.left, s = t.clientY - i.top, r = this.map.mouseEventToContainerPoint(t), c = Math.abs(n - this.selectStartPos.x), l = Math.abs(s - this.selectStartPos.y);
|
|
474
456
|
if (c < 4 && l < 4) {
|
|
475
457
|
const w = t.target;
|
|
476
|
-
if (w && ((
|
|
458
|
+
if (w && ((S = w.classList) != null && S.contains("leaflet-container") || w.id === "mapa-triagem" || (L = w.closest) != null && L.call(w, ".leaflet-pane"))) {
|
|
477
459
|
const k = ((b = w.closest) == null ? void 0 : b.call(w, ".custom-leaflet-marker")) || ((x = w.closest) == null ? void 0 : x.call(w, ".custom-div-icon")), I = t.ctrlKey || t.metaKey || t.shiftKey;
|
|
478
460
|
!k && !I && o();
|
|
479
461
|
}
|
|
@@ -487,7 +469,7 @@ class Ki {
|
|
|
487
469
|
y2: Math.max(this.selectStartPoint.y, r.y)
|
|
488
470
|
}, h = r.x >= this.selectStartPoint.x ? "window" : "crossing";
|
|
489
471
|
(A = (P = this.ctx).selecionarFeicoesNaCaixa) == null || A.call(P, d, h, t.ctrlKey || t.metaKey);
|
|
490
|
-
const p = ((E = this.ctx.mapaController) == null ? void 0 : E.getMarkers()) || [], m = ((
|
|
472
|
+
const p = ((E = this.ctx.mapaController) == null ? void 0 : E.getMarkers()) || [], m = ((C = this.ctx.mapaController) == null ? void 0 : C.getVizinhosMarkers()) || [], g = [], u = [], v = !this.ctx.layerManager || this.ctx.layerManager.isLayerActiveAndSelectable("vertices"), M = !this.ctx.layerManager || this.ctx.layerManager.isLayerActiveAndSelectable("vizinhos");
|
|
491
473
|
return v && p.forEach((w) => {
|
|
492
474
|
const k = w.pontoId;
|
|
493
475
|
if (!k) return;
|
|
@@ -514,32 +496,32 @@ class Ki {
|
|
|
514
496
|
function gt(a) {
|
|
515
497
|
return `pane-${a}`;
|
|
516
498
|
}
|
|
517
|
-
const
|
|
518
|
-
function
|
|
499
|
+
const Ro = ["poligono", "linha", "ponto", "texto"];
|
|
500
|
+
function Bo(a, t) {
|
|
519
501
|
return `${gt(a)}-${t}`;
|
|
520
502
|
}
|
|
521
503
|
function U(a, t, e) {
|
|
522
|
-
const o = a.getPane(gt(t)) ?? a.createPane(gt(t)), i =
|
|
504
|
+
const o = a.getPane(gt(t)) ?? a.createPane(gt(t)), i = Bo(t, e);
|
|
523
505
|
if (!a.getPane(i)) {
|
|
524
506
|
const n = a.createPane(i, o);
|
|
525
|
-
n.style.zIndex = String((
|
|
507
|
+
n.style.zIndex = String((Ro.indexOf(e) + 1) * 100);
|
|
526
508
|
}
|
|
527
509
|
return i;
|
|
528
510
|
}
|
|
529
|
-
const
|
|
530
|
-
function
|
|
511
|
+
const co = "ui-canvas-hit-test-estilo", he = 6, Yi = 4, Ki = 4, Dt = { poligono: 1, linha: 2, ponto: 3, texto: 3 };
|
|
512
|
+
function Ji(a) {
|
|
531
513
|
var i;
|
|
532
514
|
const t = a.getRootNode(), e = t instanceof ShadowRoot ? t : document.head;
|
|
533
|
-
if ((i = e.querySelector) != null && i.call(e, `#${
|
|
515
|
+
if ((i = e.querySelector) != null && i.call(e, `#${co}`)) return;
|
|
534
516
|
const o = document.createElement("style");
|
|
535
|
-
o.id =
|
|
517
|
+
o.id = co, o.textContent = ".leaflet-pane > canvas { pointer-events: none !important; }", e.appendChild(o);
|
|
536
518
|
}
|
|
537
519
|
const ee = /* @__PURE__ */ new WeakMap();
|
|
538
|
-
function
|
|
520
|
+
function Vo(a, t, e) {
|
|
539
521
|
let o = ee.get(a);
|
|
540
522
|
o || (o = /* @__PURE__ */ new Map(), ee.set(a, o)), o.set(t, e);
|
|
541
523
|
}
|
|
542
|
-
function
|
|
524
|
+
function jo(a, t, e) {
|
|
543
525
|
const o = ee.get(a);
|
|
544
526
|
(o == null ? void 0 : o.get(t)) === e && o.delete(t);
|
|
545
527
|
}
|
|
@@ -547,7 +529,7 @@ function ue(a, t) {
|
|
|
547
529
|
var e, o;
|
|
548
530
|
return t + (((e = a.options) == null ? void 0 : e.stroke) === !1 ? 0 : (((o = a.options) == null ? void 0 : o.weight) ?? 0) / 2);
|
|
549
531
|
}
|
|
550
|
-
function
|
|
532
|
+
function Qi(a, t, e) {
|
|
551
533
|
let o = 1 / 0;
|
|
552
534
|
for (const i of a) {
|
|
553
535
|
for (let n = 1; n < i.length; n++)
|
|
@@ -556,40 +538,40 @@ function ea(a, t, e) {
|
|
|
556
538
|
}
|
|
557
539
|
return o;
|
|
558
540
|
}
|
|
559
|
-
function
|
|
541
|
+
function ta(a) {
|
|
560
542
|
const t = a._pxBounds;
|
|
561
543
|
return t ? (t.max.x - t.min.x) * (t.max.y - t.min.y) : 0;
|
|
562
544
|
}
|
|
563
|
-
function
|
|
545
|
+
function ea(a, t, e) {
|
|
564
546
|
var o, i, n;
|
|
565
547
|
if (!((o = a.options) != null && o.interactive)) return null;
|
|
566
548
|
if (a._point && a._radius !== void 0) {
|
|
567
|
-
const s = a._radius, r = a._radiusY ?? a._radius, c = a._point.distanceTo(t), l = (s + r) / 2, d = e === "ponto" ?
|
|
549
|
+
const s = a._radius, r = a._radiusY ?? a._radius, c = a._point.distanceTo(t), l = (s + r) / 2, d = e === "ponto" ? Yi : ue(a, he);
|
|
568
550
|
return a.options.fill !== !1 && e === "poligono" ? c <= l + 1 ? 0 : null : e === "ponto" ? c <= l + d ? c : null : Math.abs(c - l) <= d ? Math.abs(c - l) : null;
|
|
569
551
|
}
|
|
570
552
|
if (a._parts) {
|
|
571
|
-
const s = a instanceof y.Polygon, r =
|
|
553
|
+
const s = a instanceof y.Polygon, r = Qi(a._parts, t, s);
|
|
572
554
|
return e === "linha" ? r <= ue(a, he) ? r : null : s && ((i = a._containsPoint) != null && i.call(a, t)) ? 0 : r <= ue(a, he) ? r : null;
|
|
573
555
|
}
|
|
574
556
|
return (n = a._containsPoint) != null && n.call(a, t) ? 0 : null;
|
|
575
557
|
}
|
|
576
|
-
function
|
|
558
|
+
function oa(a) {
|
|
577
559
|
const t = [];
|
|
578
560
|
for (let e = a._drawFirst; e; e = e.next) t.push(e.layer);
|
|
579
561
|
return t;
|
|
580
562
|
}
|
|
581
|
-
function
|
|
563
|
+
function Ho(a, t, e) {
|
|
582
564
|
var s;
|
|
583
565
|
const o = a._paneRenderers;
|
|
584
566
|
if (!o) return [];
|
|
585
567
|
const i = t.filter((r) => r.visivel && r.interativo && !r.bloqueada).sort((r, c) => c.zIndex - r.zIndex), n = [];
|
|
586
568
|
for (const r of i) {
|
|
587
|
-
for (const l of
|
|
588
|
-
const d = o[
|
|
569
|
+
for (const l of Ro) {
|
|
570
|
+
const d = o[Bo(r.id, l)];
|
|
589
571
|
if (d)
|
|
590
|
-
for (const h of
|
|
591
|
-
const p =
|
|
592
|
-
p !== null && n.push({ camada: r, tipo: l, alvo: h, distancia: p, area:
|
|
572
|
+
for (const h of oa(d).reverse()) {
|
|
573
|
+
const p = ea(h, e, l);
|
|
574
|
+
p !== null && n.push({ camada: r, tipo: l, alvo: h, distancia: p, area: ta(h) });
|
|
593
575
|
}
|
|
594
576
|
}
|
|
595
577
|
const c = (s = ee.get(a)) == null ? void 0 : s.get(r.id);
|
|
@@ -603,16 +585,16 @@ function Go(a, t, e) {
|
|
|
603
585
|
return n.sort((r, c) => Dt[r.tipo] !== Dt[c.tipo] ? Dt[c.tipo] - Dt[r.tipo] : r.camada.zIndex !== c.camada.zIndex ? c.camada.zIndex - r.camada.zIndex : r.tipo === "poligono" && r.area !== c.area ? r.area - c.area : 0);
|
|
604
586
|
}
|
|
605
587
|
const Te = /* @__PURE__ */ new WeakMap();
|
|
606
|
-
function
|
|
588
|
+
function ia(a, t, e) {
|
|
607
589
|
const o = e.map((s) => s.chave === void 0 ? String(y.Util.stamp(s.alvo)) : `${y.Util.stamp(s.alvo)}:${s.chave}`), i = Te.get(a);
|
|
608
590
|
let n = 0;
|
|
609
|
-
return i && Math.hypot(i.x - t.x, i.y - t.y) <=
|
|
591
|
+
return i && Math.hypot(i.x - t.x, i.y - t.y) <= Ki && i.ids.length === o.length && i.ids.every((s, r) => s === o[r]) && (n = (i.indice + 1) % e.length), Te.set(a, { x: t.x, y: t.y, ids: o, indice: n }), e[n];
|
|
610
592
|
}
|
|
611
|
-
function
|
|
612
|
-
const o = a.mouseEventToLayerPoint(e), i =
|
|
593
|
+
function aa(a, t, e) {
|
|
594
|
+
const o = a.mouseEventToLayerPoint(e), i = Ho(a, t, o);
|
|
613
595
|
if (i.length === 0)
|
|
614
596
|
return Te.delete(a), !1;
|
|
615
|
-
const n =
|
|
597
|
+
const n = ia(a, o, i);
|
|
616
598
|
return n.alvo.fire(
|
|
617
599
|
e.type,
|
|
618
600
|
{
|
|
@@ -625,11 +607,11 @@ function sa(a, t, e) {
|
|
|
625
607
|
!0
|
|
626
608
|
), !0;
|
|
627
609
|
}
|
|
628
|
-
function
|
|
629
|
-
return
|
|
610
|
+
function Pr(a, t, e) {
|
|
611
|
+
return Ho(a, t, a.mouseEventToLayerPoint(e))[0] ?? null;
|
|
630
612
|
}
|
|
631
|
-
const
|
|
632
|
-
class
|
|
613
|
+
const lo = ".cad-vertex-handle, .cad-vertex-ghost, .cad-bezier-handle, #cm-vertex-edit-hud, #cm-draw-hud";
|
|
614
|
+
class na {
|
|
633
615
|
constructor(t) {
|
|
634
616
|
f(this, "ctx");
|
|
635
617
|
f(this, "map", null);
|
|
@@ -649,7 +631,7 @@ class ra {
|
|
|
649
631
|
var e, o;
|
|
650
632
|
if (!(!this.map || !this.mapContainer))
|
|
651
633
|
if (t.touches.length === 1) {
|
|
652
|
-
if ((o = (e = t.target) == null ? void 0 : e.closest) != null && o.call(e,
|
|
634
|
+
if ((o = (e = t.target) == null ? void 0 : e.closest) != null && o.call(e, lo)) {
|
|
653
635
|
this.isTouchPanning = !1;
|
|
654
636
|
return;
|
|
655
637
|
}
|
|
@@ -675,7 +657,7 @@ class ra {
|
|
|
675
657
|
});
|
|
676
658
|
f(this, "handleClick", (t) => {
|
|
677
659
|
var e, o, i, n, s, r;
|
|
678
|
-
!this.map || !this.ctx.layerManager || (o = (e = this.ctx).ferramentaAtiva) != null && o.call(e) || (n = (i = this.ctx).edicaoAtiva) != null && n.call(i) || (r = (s = t.target) == null ? void 0 : s.closest) != null && r.call(s, ".leaflet-marker-icon") ||
|
|
660
|
+
!this.map || !this.ctx.layerManager || (o = (e = this.ctx).ferramentaAtiva) != null && o.call(e) || (n = (i = this.ctx).edicaoAtiva) != null && n.call(i) || (r = (s = t.target) == null ? void 0 : s.closest) != null && r.call(s, ".leaflet-marker-icon") || aa(this.map, this.ctx.layerManager.getLayers(), t);
|
|
679
661
|
});
|
|
680
662
|
f(this, "handleMouseDown", (t) => {
|
|
681
663
|
var e, o, i, n, s, r, c;
|
|
@@ -689,7 +671,7 @@ class ra {
|
|
|
689
671
|
return;
|
|
690
672
|
}
|
|
691
673
|
if (t.button === 0) {
|
|
692
|
-
if ((o = (e = t.target) == null ? void 0 : e.closest) != null && o.call(e,
|
|
674
|
+
if ((o = (e = t.target) == null ? void 0 : e.closest) != null && o.call(e, lo) || (n = (i = this.ctx).ferramentaAtiva) != null && n.call(i) || (r = (s = this.ctx).edicaoAtiva) != null && r.call(s) || (this.selectionHappened = !1, this.ctx.mapaController && this.ctx.mapaController.modoCliqueSequencialAtivo))
|
|
693
675
|
return;
|
|
694
676
|
(c = this.selecaoBox) == null || c.iniciarSelecao(t);
|
|
695
677
|
}
|
|
@@ -731,7 +713,7 @@ class ra {
|
|
|
731
713
|
};
|
|
732
714
|
}
|
|
733
715
|
ativar(t, e) {
|
|
734
|
-
this.ctx.mapaController = t, e && (this.ctx.containerHost = e), this.map = t.getMap(), this.map && (this.mapContainer = this.map.getContainer(), this.mapContainer && (this.map.dragging.disable(), this.map.doubleClickZoom.disable(), this.map.boxZoom.disable(), this.selecaoBox = new
|
|
716
|
+
this.ctx.mapaController = t, e && (this.ctx.containerHost = e), this.map = t.getMap(), this.map && (this.mapContainer = this.map.getContainer(), this.mapContainer && (this.map.dragging.disable(), this.map.doubleClickZoom.disable(), this.map.boxZoom.disable(), this.selecaoBox = new Xi(this.map, this.mapContainer, this.ctx), Ji(this.mapContainer), this.mapContainer.addEventListener("click", this.handleClick), this.mapContainer.addEventListener("mousedown", this.handleMouseDown), this.mapContainer.addEventListener("mousemove", this.handleMouseMove), window.addEventListener("mouseup", this.handleMouseUp), this.mapContainer.addEventListener("contextmenu", this.handleContextMenu), window.addEventListener("keydown", this.handleKeyDown), this.mapContainer.addEventListener("touchstart", this.handleTouchStart, { passive: !1 }), this.mapContainer.addEventListener("touchmove", this.handleTouchMove, { passive: !1 }), this.mapContainer.addEventListener("touchend", this.handleTouchEnd), this.mapContainer.addEventListener("touchcancel", this.handleTouchEnd)));
|
|
735
717
|
}
|
|
736
718
|
desativar() {
|
|
737
719
|
this.mapContainer && (this.mapContainer.removeEventListener("click", this.handleClick), this.mapContainer.removeEventListener("mousedown", this.handleMouseDown), this.mapContainer.removeEventListener("mousemove", this.handleMouseMove), this.mapContainer.removeEventListener("contextmenu", this.handleContextMenu), this.mapContainer.removeEventListener("touchstart", this.handleTouchStart), this.mapContainer.removeEventListener("touchmove", this.handleTouchMove), this.mapContainer.removeEventListener("touchend", this.handleTouchEnd), this.mapContainer.removeEventListener("touchcancel", this.handleTouchEnd)), window.removeEventListener("mouseup", this.handleMouseUp), window.removeEventListener("keydown", this.handleKeyDown), this.cancelarSupressaoClique(), this.selecaoBox && (this.selecaoBox.destruir(), this.selecaoBox = null), this.map && (this.map.dragging.enable(), this.map.doubleClickZoom.enable(), this.map.boxZoom.enable());
|
|
@@ -786,7 +768,7 @@ class O {
|
|
|
786
768
|
}
|
|
787
769
|
}
|
|
788
770
|
f(O, "renderers", /* @__PURE__ */ new Map());
|
|
789
|
-
class
|
|
771
|
+
class sa {
|
|
790
772
|
render(t, e, o) {
|
|
791
773
|
var c, l, d;
|
|
792
774
|
const i = ((c = t.dados) == null ? void 0 : c.url) || "https://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}", n = ((l = t.dados) == null ? void 0 : l.subdomains) || ["mt0", "mt1", "mt2", "mt3"], s = ((d = t.dados) == null ? void 0 : d.attribution) || "Google Satélite";
|
|
@@ -810,7 +792,7 @@ class ca {
|
|
|
810
792
|
e.hasLayer(t) && e.removeLayer(t);
|
|
811
793
|
}
|
|
812
794
|
}
|
|
813
|
-
class
|
|
795
|
+
class ra {
|
|
814
796
|
render(t, e, o) {
|
|
815
797
|
var l, d, h, p;
|
|
816
798
|
const i = ((l = t.dados) == null ? void 0 : l.url) || "https://acervofundiario.incra.gov.br/i3geo/ogc.php", n = ((d = t.dados) == null ? void 0 : d.layers) || "certificada_sigef_particular_pr", s = ((h = t.dados) == null ? void 0 : h.format) || "image/png", r = ((p = t.dados) == null ? void 0 : p.attribution) || "INCRA/SIGEF";
|
|
@@ -835,7 +817,7 @@ class la {
|
|
|
835
817
|
e.hasLayer(t) && e.removeLayer(t);
|
|
836
818
|
}
|
|
837
819
|
}
|
|
838
|
-
function
|
|
820
|
+
function Go(a, t, e) {
|
|
839
821
|
const o = a.estilo.espessuraLinha || e.config.perimetroWeight || 2, i = e.graphicScale.lineScaleMultiplier || 1;
|
|
840
822
|
if (a.estilo.scaleMode === "world") {
|
|
841
823
|
const n = a.estilo.dimensaoMetros || 0.3, s = t.getCenter(), r = t.getZoom(), c = 40075016686e-3 * Math.abs(Math.cos(s.lat * Math.PI / 180)) / Math.pow(2, r + 8), l = n / (c > 0 ? c : 1);
|
|
@@ -856,9 +838,9 @@ function ut(a, t, e, o, i) {
|
|
|
856
838
|
interactive: !1
|
|
857
839
|
}).addTo(a);
|
|
858
840
|
}
|
|
859
|
-
function
|
|
860
|
-
var g, u, v, M, z,
|
|
861
|
-
const n = a.id === "homologados", s = ((g = a.dados) == null ? void 0 : g.conexoes) ?? (Array.isArray(a.dados) && a.dados.length > 0 && "origemId" in a.dados[0] ? a.dados : null), r = ((u = a.dados) == null ? void 0 : u.segmentos) || o.segmentos || [], c = ((v = a.dados) == null ? void 0 : v.pontos) || (n ? o.bancoPontos || [] : o.pontos) || [], l =
|
|
841
|
+
function ho(a, t, e, o, i) {
|
|
842
|
+
var g, u, v, M, z, S, L, b;
|
|
843
|
+
const n = a.id === "homologados", s = ((g = a.dados) == null ? void 0 : g.conexoes) ?? (Array.isArray(a.dados) && a.dados.length > 0 && "origemId" in a.dados[0] ? a.dados : null), r = ((u = a.dados) == null ? void 0 : u.segmentos) || o.segmentos || [], c = ((v = a.dados) == null ? void 0 : v.pontos) || (n ? o.bancoPontos || [] : o.pontos) || [], l = Go(a, e, o), d = a.opacidade !== void 0 ? a.opacidade : 1, h = a.interativo && !a.bloqueada, p = [];
|
|
862
844
|
c.forEach((x) => {
|
|
863
845
|
const P = V(x.lat ?? x.latitude ?? x.y, x.lon ?? x.lng ?? x.longitude ?? x.x);
|
|
864
846
|
P && p.push({ ...x, lat: P.lat, lon: P.lon });
|
|
@@ -877,10 +859,10 @@ function uo(a, t, e, o, i) {
|
|
|
877
859
|
};
|
|
878
860
|
if (s && Array.isArray(s)) {
|
|
879
861
|
s.forEach((x) => {
|
|
880
|
-
var E,
|
|
862
|
+
var E, C, w, k, I, N, $;
|
|
881
863
|
const P = m(x.origemId), A = m(x.destinoId);
|
|
882
864
|
if (P && A && P.lat && P.lon && A.lat && A.lon) {
|
|
883
|
-
const R = x.tipoLinha === "tracejada" || ((E = x.estilo) == null ? void 0 : E.tipoLinha) === "tracejada", _ = ((
|
|
865
|
+
const R = x.tipoLinha === "tracejada" || ((E = x.estilo) == null ? void 0 : E.tipoLinha) === "tracejada", _ = ((C = x.estilo) == null ? void 0 : C.cor) || ((w = x.estilo) == null ? void 0 : w.color) || a.estilo.corPrimaria || "#00f5a0", F = ((k = x.estilo) == null ? void 0 : k.espessura) || ((I = x.estilo) == null ? void 0 : I.weight) || l, D = [[P.lat, P.lon], [A.lat, A.lon]], B = R ? "6, 6" : a.estilo.dashArray;
|
|
884
866
|
ut(t, D, F, i, B);
|
|
885
867
|
const q = y.polyline(D, {
|
|
886
868
|
color: _,
|
|
@@ -912,8 +894,8 @@ function uo(a, t, e, o, i) {
|
|
|
912
894
|
return;
|
|
913
895
|
}
|
|
914
896
|
if ((M = a.dados) != null && M.polilinhaSequencial || ((z = a.dados) == null ? void 0 : z.fechar) !== void 0 && p.length >= 2) {
|
|
915
|
-
const x = ((
|
|
916
|
-
Object.entries(P).forEach(([
|
|
897
|
+
const x = ((S = a.dados) == null ? void 0 : S.chaveGrupo) || o.chaveGrupo, P = Zt(p, x), A = ((L = a.dados) == null ? void 0 : L.fechar) !== !1, E = a.estilo.corPrimaria || "#00f5a0";
|
|
898
|
+
Object.entries(P).forEach(([C, w]) => {
|
|
917
899
|
const k = Xt(w);
|
|
918
900
|
if (k.length < 2) return;
|
|
919
901
|
const I = k.map(($) => [$.lat, $.lon]);
|
|
@@ -928,7 +910,7 @@ function uo(a, t, e, o, i) {
|
|
|
928
910
|
});
|
|
929
911
|
if (h && N.bindPopup(`
|
|
930
912
|
<div style="font-family:sans-serif; color:rgba(255, 255, 255, 0.9); line-height:1.3;">
|
|
931
|
-
<div style="font-weight:700; font-size:12px; margin-bottom:3px; color:#ffffff;">Polilinha: Grupo ${T(
|
|
913
|
+
<div style="font-weight:700; font-size:12px; margin-bottom:3px; color:#ffffff;">Polilinha: Grupo ${T(C)}</div>
|
|
932
914
|
<div style="font-size:11px; color:rgba(255, 255, 255, 0.65);">Vértices: ${k.length}</div>
|
|
933
915
|
</div>
|
|
934
916
|
`, { className: "compact-popup", maxWidth: 220 }), N.addTo(t), A && I.length >= 3) {
|
|
@@ -948,9 +930,9 @@ function uo(a, t, e, o, i) {
|
|
|
948
930
|
if (!n && r && r.length > 0)
|
|
949
931
|
r.forEach((x) => {
|
|
950
932
|
var E;
|
|
951
|
-
const P = p.find((
|
|
933
|
+
const P = p.find((C) => String(C.id) === String(x.ponto_inicio_id)), A = p.find((C) => String(C.id) === String(x.ponto_fim_id));
|
|
952
934
|
if (P && A && P.lat && P.lon && A.lat && A.lon) {
|
|
953
|
-
const
|
|
935
|
+
const C = x.tipo_limite_sigef || x.tipo_limite || "", w = x.metodo_posicionamento_sigef || x.metodo_posicionamento || "", k = C === "LA1" ? "#10b981" : C === "LN1" ? "#3b82f6" : "#00f5a0", I = x.id != null ? x.id : `${x.ponto_inicio_id}-${x.ponto_fim_id}`, N = o.selectedSegmentoId != null && (String(o.selectedSegmentoId) === String(x.id) || String(o.selectedSegmentoId) === String(I)), $ = N ? "#facc15" : a.estilo.corPrimaria || k, R = [[P.lat, P.lon], [A.lat, A.lon]], _ = N ? l + 3 : l, F = C === "LN1" ? "6, 6" : a.estilo.dashArray;
|
|
954
936
|
ut(t, R, N ? _ + 2 : _, i, F);
|
|
955
937
|
const D = y.polyline(R, {
|
|
956
938
|
color: $,
|
|
@@ -971,7 +953,7 @@ function uo(a, t, e, o, i) {
|
|
|
971
953
|
D.bindPopup(`
|
|
972
954
|
<div style="font-family:sans-serif; color:rgba(255, 255, 255, 0.9); line-height:1.3;">
|
|
973
955
|
<div style="font-weight:700; font-size:12px; margin-bottom:3px; color:#ffffff;">${T(P.nome_vertice)} ↔ ${T(A.nome_vertice)}</div>
|
|
974
|
-
<div style="font-size:11px; color:rgba(255, 255, 255, 0.65);">Limite: ${T(
|
|
956
|
+
<div style="font-size:11px; color:rgba(255, 255, 255, 0.65);">Limite: ${T(C || "N/A")} · ${T(w || "N/A")}</div>
|
|
975
957
|
${j}
|
|
976
958
|
</div>
|
|
977
959
|
`, { className: "compact-popup", maxWidth: 220 }), D.on("popupopen", (G) => {
|
|
@@ -988,16 +970,16 @@ function uo(a, t, e, o, i) {
|
|
|
988
970
|
else if (p && p.length >= 2) {
|
|
989
971
|
const x = p.filter(
|
|
990
972
|
(w) => w.lat && w.lon && w.tipo_ponto !== "B" && w.tipo !== "B" && w.ignorar_poligono !== 1
|
|
991
|
-
), P = ((b = a.dados) == null ? void 0 : b.chaveGrupo) || o.chaveGrupo, A = Zt(x, P), E = a.estilo.corPrimaria || (n ? "#f59e0b" : "#10b981"),
|
|
973
|
+
), P = ((b = a.dados) == null ? void 0 : b.chaveGrupo) || o.chaveGrupo, A = Zt(x, P), E = a.estilo.corPrimaria || (n ? "#f59e0b" : "#10b981"), C = a.estilo.dashArray || (n ? "6, 8" : void 0);
|
|
992
974
|
Object.values(A).forEach((w) => {
|
|
993
975
|
const k = Xt(w);
|
|
994
976
|
if (k.length < 2) return;
|
|
995
977
|
const I = k.map(($) => [$.lat, $.lon]);
|
|
996
|
-
if (ut(t, I, l, i,
|
|
978
|
+
if (ut(t, I, l, i, C), y.polyline(I, {
|
|
997
979
|
color: E,
|
|
998
980
|
weight: l,
|
|
999
981
|
opacity: d,
|
|
1000
|
-
dashArray:
|
|
982
|
+
dashArray: C,
|
|
1001
983
|
pane: i,
|
|
1002
984
|
interactive: h
|
|
1003
985
|
}).addTo(t), I.length >= 3) {
|
|
@@ -1014,16 +996,16 @@ function uo(a, t, e, o, i) {
|
|
|
1014
996
|
});
|
|
1015
997
|
}
|
|
1016
998
|
}
|
|
1017
|
-
class
|
|
999
|
+
class ca {
|
|
1018
1000
|
constructor() {
|
|
1019
1001
|
f(this, "zoomListenerMap", /* @__PURE__ */ new WeakMap());
|
|
1020
1002
|
}
|
|
1021
1003
|
render(t, e, o) {
|
|
1022
1004
|
const i = y.layerGroup(), n = U(e, t.id, "linha");
|
|
1023
|
-
|
|
1005
|
+
ho(t, i, e, o, n);
|
|
1024
1006
|
const s = () => {
|
|
1025
1007
|
if (t.estilo.scaleMode === "world") {
|
|
1026
|
-
const r =
|
|
1008
|
+
const r = Go(t, e, o);
|
|
1027
1009
|
i.eachLayer((c) => {
|
|
1028
1010
|
c.setStyle && c.setStyle({ weight: r });
|
|
1029
1011
|
});
|
|
@@ -1032,7 +1014,7 @@ class da {
|
|
|
1032
1014
|
return e.on("zoomend", s), this.zoomListenerMap.set(i, s), i;
|
|
1033
1015
|
}
|
|
1034
1016
|
update(t, e, o, i, n) {
|
|
1035
|
-
(o.opacidade !== void 0 || o.estilo !== void 0 || o.dados !== void 0 || o.interativo !== void 0 || o.bloqueada !== void 0) && (e.clearLayers(),
|
|
1017
|
+
(o.opacidade !== void 0 || o.estilo !== void 0 || o.dados !== void 0 || o.interativo !== void 0 || o.bloqueada !== void 0) && (e.clearLayers(), ho(t, e, n, i, U(n, t.id, "linha")));
|
|
1036
1018
|
}
|
|
1037
1019
|
destroy(t, e) {
|
|
1038
1020
|
const o = this.zoomListenerMap.get(t);
|
|
@@ -1043,12 +1025,12 @@ const _e = 300;
|
|
|
1043
1025
|
function De(a) {
|
|
1044
1026
|
return a > _e ? "compacta" : "normal";
|
|
1045
1027
|
}
|
|
1046
|
-
function
|
|
1028
|
+
function Uo(a, t) {
|
|
1047
1029
|
if (a <= _e) return 1;
|
|
1048
1030
|
const e = Math.max(0.7, 1 - 0.3 * Math.log10(a / _e)), o = t >= 18 ? 1 : t >= 16 ? 0.92 : t >= 14 ? 0.82 : 0.72;
|
|
1049
1031
|
return Math.max(0.6, e * o);
|
|
1050
1032
|
}
|
|
1051
|
-
function
|
|
1033
|
+
function la(a) {
|
|
1052
1034
|
if (!a) return "#00f5a0";
|
|
1053
1035
|
const t = a.trim();
|
|
1054
1036
|
if (t.startsWith("#") || t.startsWith("rgb") || t.startsWith("hsl") || t.startsWith("var("))
|
|
@@ -1071,7 +1053,7 @@ function ha(a) {
|
|
|
1071
1053
|
if (t.includes(o)) return i;
|
|
1072
1054
|
return "#00f5a0";
|
|
1073
1055
|
}
|
|
1074
|
-
function
|
|
1056
|
+
function uo(a) {
|
|
1075
1057
|
return a.replace(/[&<>"']/g, (t) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[t]);
|
|
1076
1058
|
}
|
|
1077
1059
|
const pe = {
|
|
@@ -1082,21 +1064,21 @@ const pe = {
|
|
|
1082
1064
|
x: ["M2 2L10 10", "M10 2L2 10"]
|
|
1083
1065
|
};
|
|
1084
1066
|
function oe(a, t, e, o = "", i = "", n = !1, s = {}) {
|
|
1085
|
-
const r = n || o.includes("ponto-selecionado") || o.includes("cad-marker-selected"), c = s.densidade === "compacta", l =
|
|
1067
|
+
const r = n || o.includes("ponto-selecionado") || o.includes("cad-marker-selected"), c = s.densidade === "compacta", l = uo(la(e)), d = t + 6, h = r ? `color-mix(in srgb, ${l} 38%, #000000)` : l, p = r ? 1 : c ? 0.72 : 0.9, m = r ? "rgba(255,255,255,0.95)" : c ? "rgba(0,0,0,0.55)" : "rgba(0,0,0,0.7)", g = r ? 1.3 : c ? 0.8 : 1, u = r ? "rgba(255,255,255,0.9)" : "rgba(0,0,0,0.6)", v = (P, A, E, C = "") => `class="${P}" stroke="${A}" stroke-width="${E}" vector-effect="non-scaling-stroke" ${C}`, M = a in pe ? `<polygon points="${pe[a]}" style="fill:${h}" fill-opacity="${p}" stroke-linejoin="round" ${v("cad-pt-contorno", m, g)} />` : a in fe ? fe[a].map(
|
|
1086
1068
|
(P) => (
|
|
1087
1069
|
// Traço = halo escuro (contraste sobre satélite) + traço colorido por cima
|
|
1088
1070
|
`<path d="${P}" fill="none" stroke-linecap="round" ${v("cad-pt-halo", u, c ? 2.6 : 3.4)} /><path d="${P}" fill="none" stroke-linecap="round" ${v("cad-pt-traco", r ? h : l, c ? 1.3 : 1.8, `stroke-opacity="${r ? 1 : c ? 0.9 : 1}"`)} />`
|
|
1089
1071
|
)
|
|
1090
|
-
).join("") : a === "square" ? `<rect x="1.2" y="1.2" width="9.6" height="9.6" rx="1.4" style="fill:${h}" fill-opacity="${p}" ${v("cad-pt-contorno", m, g)} />` : `<circle cx="6" cy="6" r="5.2" style="fill:${h}" fill-opacity="${p}" ${v("cad-pt-contorno", m, g)} />`, z = !c && !r && !(a in fe) ? a in pe ? "" : a === "square" ? '<rect x="2.2" y="2.2" width="7.6" height="7.6" rx="0.9" fill="none" stroke="rgba(255,255,255,0.45)" stroke-width="0.8" vector-effect="non-scaling-stroke" />' : '<circle cx="6" cy="6" r="4.3" fill="none" stroke="rgba(255,255,255,0.45)" stroke-width="0.8" vector-effect="non-scaling-stroke" />' : "",
|
|
1072
|
+
).join("") : a === "square" ? `<rect x="1.2" y="1.2" width="9.6" height="9.6" rx="1.4" style="fill:${h}" fill-opacity="${p}" ${v("cad-pt-contorno", m, g)} />` : `<circle cx="6" cy="6" r="5.2" style="fill:${h}" fill-opacity="${p}" ${v("cad-pt-contorno", m, g)} />`, z = !c && !r && !(a in fe) ? a in pe ? "" : a === "square" ? '<rect x="2.2" y="2.2" width="7.6" height="7.6" rx="0.9" fill="none" stroke="rgba(255,255,255,0.45)" stroke-width="0.8" vector-effect="non-scaling-stroke" />' : '<circle cx="6" cy="6" r="4.3" fill="none" stroke="rgba(255,255,255,0.45)" stroke-width="0.8" vector-effect="non-scaling-stroke" />' : "", S = a === "circle-dot" ? '<circle cx="6" cy="6" r="1.7" fill="#ffffff" stroke="rgba(0,0,0,0.45)" stroke-width="0.6" vector-effect="non-scaling-stroke" />' : "", L = `cad-pt ${c ? "cad-pt-compacto" : ""} ${e} ${o} ${r ? "ponto-selecionado" : ""}`.replace(/\s+/g, " ").trim(), b = t;
|
|
1091
1073
|
return `
|
|
1092
|
-
<div ${i ? `id="${
|
|
1074
|
+
<div ${i ? `id="${uo(i)}"` : ""} class="${L}" style="display:flex; align-items:center; justify-content:center; width:${d}px; height:${d}px; position:relative; pointer-events:auto; background:none !important;">
|
|
1093
1075
|
<svg width="${b}" height="${b}" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" style="overflow:visible; display:block;">
|
|
1094
|
-
${M}${z}${
|
|
1076
|
+
${M}${z}${S}
|
|
1095
1077
|
</svg>
|
|
1096
1078
|
</div>
|
|
1097
1079
|
`;
|
|
1098
1080
|
}
|
|
1099
|
-
class
|
|
1081
|
+
class da {
|
|
1100
1082
|
constructor() {
|
|
1101
1083
|
f(this, "zoomListenerMap", /* @__PURE__ */ new WeakMap());
|
|
1102
1084
|
}
|
|
@@ -1136,7 +1118,7 @@ class ua {
|
|
|
1136
1118
|
const c = t.estilo.dimensaoMetros || 0.25, l = e.getCenter(), d = e.getZoom(), h = 40075016686e-3 * Math.abs(Math.cos(l.lat * Math.PI / 180)) / Math.pow(2, d + 8), p = c / (h > 0 ? h : 1);
|
|
1137
1119
|
return Math.max(3, Math.round(p * s));
|
|
1138
1120
|
}
|
|
1139
|
-
const r =
|
|
1121
|
+
const r = Uo(n, e.getZoom());
|
|
1140
1122
|
return Math.max(r < 1 ? 5 : 4, Math.round(i * s * r));
|
|
1141
1123
|
}
|
|
1142
1124
|
rebuildPoints(t, e, o, i, n) {
|
|
@@ -1146,17 +1128,17 @@ class ua {
|
|
|
1146
1128
|
var M;
|
|
1147
1129
|
const u = g.lat ?? g.latitude, v = g.lon ?? g.lng ?? g.longitude;
|
|
1148
1130
|
if (u !== void 0 && v !== void 0 && u !== 0 && v !== 0 && !isNaN(Number(u)) && !isNaN(Number(v))) {
|
|
1149
|
-
const z = g.tipo_ponto === "B" || g.tipo === "B",
|
|
1131
|
+
const z = g.tipo_ponto === "B" || g.tipo === "B", S = g.tipo_ponto === "M" || g.tipo === "M";
|
|
1150
1132
|
let L = t.estilo.estiloMarcador || "x", b = t.estilo.corPrimaria || "bg-mint-vibrant", x = t.estilo.tamanhoMarcador || 7;
|
|
1151
|
-
d ? (L = "circle", b = t.estilo.corPrimaria || "#f59e0b", x = 8) : l ? (L =
|
|
1152
|
-
const P = !!(g.selecionado || h.length > 0 && (h.includes(g.id) || h.includes(String(g.id)) || h.includes(Number(g.id)))), A = this.calculateSize(t, o, i, x, p), E = this.criarIcone(t, i, L, A, b, g.id, P, p),
|
|
1133
|
+
d ? (L = "circle", b = t.estilo.corPrimaria || "#f59e0b", x = 8) : l ? (L = S ? "circle-dot" : t.estilo.estiloMarcador || "cross", b = t.estilo.corPrimaria || "#a855f7", x = S ? 10 : 8) : S ? (b = "#6366f1", L = "circle-dot", x = 10) : z && (b = "#f43f5e", L = "square", x = 9);
|
|
1134
|
+
const P = !!(g.selecionado || h.length > 0 && (h.includes(g.id) || h.includes(String(g.id)) || h.includes(Number(g.id)))), A = this.calculateSize(t, o, i, x, p), E = this.criarIcone(t, i, L, A, b, g.id, P, p), C = y.marker([Number(u), Number(v)], {
|
|
1153
1135
|
icon: E,
|
|
1154
1136
|
pane: n,
|
|
1155
1137
|
interactive: c
|
|
1156
1138
|
});
|
|
1157
|
-
if (P &&
|
|
1158
|
-
const w = d ? "Vértice Homologado SIGEF" : l ? "Confrontante (Importado)" :
|
|
1159
|
-
|
|
1139
|
+
if (P && C.setZIndexOffset(2e3), C.pontoId = g.id, C.layerId = t.id, C.isVizinho = l, C.baseSize = x, C.shapeStyle = L, C.markerBg = b, C.isSelected = P, C.densTotal = p, C.tamanhoPx = A, c) {
|
|
1140
|
+
const w = d ? "Vértice Homologado SIGEF" : l ? "Confrontante (Importado)" : S ? "Base Homologada PPP" : z ? "Base de Campo (Translação)" : "Vértice de Perímetro", k = g.acoes || t.acoes || ((M = t.dados) == null ? void 0 : M.acoes) || [], I = Et(k, g.id);
|
|
1141
|
+
C.bindPopup(`
|
|
1160
1142
|
<div style="font-family:var(--ui-fonte-base, sans-serif); color:rgba(255, 255, 255, 0.9); line-height:1.3;">
|
|
1161
1143
|
<div style="font-weight:700; font-size:13px; margin-bottom:4px; color:#ffffff;">${T(g.nome_vertice || String(g.id))}</div>
|
|
1162
1144
|
<div style="font-size:11px; color:rgba(255, 255, 255, 0.65);">${T(w)} · ${T(g.tipo_ponto || g.tipo || "Vértice")}</div>
|
|
@@ -1166,13 +1148,13 @@ class ua {
|
|
|
1166
1148
|
`, {
|
|
1167
1149
|
className: "compact-popup",
|
|
1168
1150
|
maxWidth: 240
|
|
1169
|
-
}), k && k.length > 0 &&
|
|
1170
|
-
kt(N.popup, g, i,
|
|
1171
|
-
}),
|
|
1151
|
+
}), k && k.length > 0 && C.on("popupopen", (N) => {
|
|
1152
|
+
kt(N.popup, g, i, C);
|
|
1153
|
+
}), C.on("click", () => {
|
|
1172
1154
|
i.onMarkerClick && i.onMarkerClick(g.id, l, g, { lat: Number(u), lon: Number(v) });
|
|
1173
1155
|
});
|
|
1174
1156
|
}
|
|
1175
|
-
|
|
1157
|
+
C.addTo(e);
|
|
1176
1158
|
}
|
|
1177
1159
|
});
|
|
1178
1160
|
}
|
|
@@ -1184,7 +1166,7 @@ class ua {
|
|
|
1184
1166
|
o && (e.off("zoomend", o), this.zoomListenerMap.delete(t)), t.clearLayers(), e.hasLayer(t) && e.removeLayer(t);
|
|
1185
1167
|
}
|
|
1186
1168
|
}
|
|
1187
|
-
class
|
|
1169
|
+
class ha {
|
|
1188
1170
|
render(t, e, o) {
|
|
1189
1171
|
const i = y.layerGroup();
|
|
1190
1172
|
return this.rebuildPolygons(t, i, o, e), i;
|
|
@@ -1193,9 +1175,9 @@ class pa {
|
|
|
1193
1175
|
var m, g;
|
|
1194
1176
|
const n = U(i, t.id, "poligono"), s = U(i, t.id, "ponto"), c = (((m = t.dados) == null ? void 0 : m.poligonos) ?? (Array.isArray(t.dados) ? t.dados : null)) || ((g = t.dados) == null ? void 0 : g.confrontantes) || o.confrontantes || [], l = t.interativo && !t.bloqueada, d = t.estilo.corPrimaria || "#a855f7", h = t.estilo.espessuraLinha || 1, p = t.opacidade !== void 0 ? t.opacidade : 0.8;
|
|
1195
1177
|
c.forEach((u) => {
|
|
1196
|
-
var P, A, E,
|
|
1178
|
+
var P, A, E, C, w, k, I, N, $, R;
|
|
1197
1179
|
if (!u) return;
|
|
1198
|
-
const v = ((P = u.estilo) == null ? void 0 : P.cor) || ((A = u.estilo) == null ? void 0 : A.color) || d, M = ((E = u.estilo) == null ? void 0 : E.espessura) || ((
|
|
1180
|
+
const v = ((P = u.estilo) == null ? void 0 : P.cor) || ((A = u.estilo) == null ? void 0 : A.color) || d, M = ((E = u.estilo) == null ? void 0 : E.espessura) || ((C = u.estilo) == null ? void 0 : C.weight) || h, z = ((w = u.estilo) == null ? void 0 : w.opacidade) ?? p, S = ((k = u.estilo) == null ? void 0 : k.fillColor) || v, L = ((I = u.estilo) == null ? void 0 : I.fillOpacity) ?? Math.min(0.14, z * 0.1), b = ((N = u.estilo) == null ? void 0 : N.dashArray) || t.estilo.dashArray || "4, 6";
|
|
1199
1181
|
if (u.coordenadas && Array.isArray(u.coordenadas) && u.coordenadas.length >= 3) {
|
|
1200
1182
|
const _ = Array.isArray(u.coordenadas[0]) && Array.isArray(u.coordenadas[0][0]);
|
|
1201
1183
|
let F;
|
|
@@ -1213,7 +1195,7 @@ class pa {
|
|
|
1213
1195
|
weight: M,
|
|
1214
1196
|
opacity: z,
|
|
1215
1197
|
dashArray: b,
|
|
1216
|
-
fillColor:
|
|
1198
|
+
fillColor: S,
|
|
1217
1199
|
fillOpacity: L,
|
|
1218
1200
|
lineJoin: "round",
|
|
1219
1201
|
pane: n,
|
|
@@ -1253,7 +1235,7 @@ class pa {
|
|
|
1253
1235
|
weight: M,
|
|
1254
1236
|
opacity: z,
|
|
1255
1237
|
dashArray: b,
|
|
1256
|
-
fillColor:
|
|
1238
|
+
fillColor: S,
|
|
1257
1239
|
fillOpacity: L,
|
|
1258
1240
|
lineJoin: "round",
|
|
1259
1241
|
pane: n,
|
|
@@ -1324,7 +1306,7 @@ class pa {
|
|
|
1324
1306
|
t.clearLayers(), e.hasLayer(t) && e.removeLayer(t);
|
|
1325
1307
|
}
|
|
1326
1308
|
}
|
|
1327
|
-
class
|
|
1309
|
+
class ua {
|
|
1328
1310
|
constructor() {
|
|
1329
1311
|
f(this, "moveListenerMap", /* @__PURE__ */ new WeakMap());
|
|
1330
1312
|
}
|
|
@@ -1334,8 +1316,8 @@ class fa {
|
|
|
1334
1316
|
if (e.getZoom() > 20) {
|
|
1335
1317
|
const c = e.getBounds(), l = c.getSouth(), d = c.getNorth(), h = c.getWest(), p = c.getEast(), m = e.getCenter(), g = 8999e-9, u = Math.cos(m.lat * Math.PI / 180), v = g / (u > 0.1 ? u : 1), M = Math.floor((d - l) / g), z = Math.floor((p - h) / v);
|
|
1336
1318
|
if (M < 200 && z < 200) {
|
|
1337
|
-
const
|
|
1338
|
-
for (let b =
|
|
1319
|
+
const S = Math.ceil(l / g) * g;
|
|
1320
|
+
for (let b = S; b <= d; b += g)
|
|
1339
1321
|
y.polyline([[b, h], [b, p]], {
|
|
1340
1322
|
color: t.estilo.corPrimaria || "rgba(0, 245, 160, 0.18)",
|
|
1341
1323
|
weight: t.estilo.espessuraLinha || 0.6,
|
|
@@ -1363,7 +1345,7 @@ class fa {
|
|
|
1363
1345
|
o && (e.off("zoomend moveend", o), this.moveListenerMap.delete(t)), t.clearLayers(), e.hasLayer(t) && e.removeLayer(t);
|
|
1364
1346
|
}
|
|
1365
1347
|
}
|
|
1366
|
-
function
|
|
1348
|
+
function Wo(a, t) {
|
|
1367
1349
|
var s, r;
|
|
1368
1350
|
const e = a._nosCurva, o = a._renderer, i = a._map;
|
|
1369
1351
|
if (!e || e.length < 2 || !o || !i) return !1;
|
|
@@ -1372,15 +1354,15 @@ function Zo(a, t) {
|
|
|
1372
1354
|
if (!o._drawing || !((s = a._parts) != null && s.length)) return !0;
|
|
1373
1355
|
const c = o._ctx;
|
|
1374
1356
|
c.beginPath();
|
|
1375
|
-
for (const l of
|
|
1357
|
+
for (const l of bi(e, t)) {
|
|
1376
1358
|
const d = l.pts.map(n);
|
|
1377
1359
|
l.cmd === "M" ? c.moveTo(d[0].x, d[0].y) : l.cmd === "L" ? c.lineTo(d[0].x, d[0].y) : c.bezierCurveTo(d[0].x, d[0].y, d[1].x, d[1].y, d[2].x, d[2].y);
|
|
1378
1360
|
}
|
|
1379
1361
|
return t && c.closePath(), o._fillStroke(c, a), !0;
|
|
1380
1362
|
}
|
|
1381
|
-
return o._setPath ? (o._setPath(a, (r = a._parts) != null && r.length ?
|
|
1363
|
+
return o._setPath ? (o._setPath(a, (r = a._parts) != null && r.length ? xi(e, t, n) : "M0 0"), !0) : !1;
|
|
1382
1364
|
}
|
|
1383
|
-
class
|
|
1365
|
+
class Zo extends y.Polyline {
|
|
1384
1366
|
constructor() {
|
|
1385
1367
|
super(...arguments);
|
|
1386
1368
|
f(this, "_nosCurva", null);
|
|
@@ -1390,10 +1372,10 @@ class Xo extends y.Polyline {
|
|
|
1390
1372
|
this._nosCurva = e;
|
|
1391
1373
|
}
|
|
1392
1374
|
_updatePath() {
|
|
1393
|
-
|
|
1375
|
+
Wo(this, !1) || y.Polyline.prototype._updatePath.call(this);
|
|
1394
1376
|
}
|
|
1395
1377
|
}
|
|
1396
|
-
class
|
|
1378
|
+
class Xo extends y.Polygon {
|
|
1397
1379
|
constructor() {
|
|
1398
1380
|
super(...arguments);
|
|
1399
1381
|
f(this, "_nosCurva", null);
|
|
@@ -1402,16 +1384,16 @@ class Yo extends y.Polygon {
|
|
|
1402
1384
|
this._nosCurva = e;
|
|
1403
1385
|
}
|
|
1404
1386
|
_updatePath() {
|
|
1405
|
-
|
|
1387
|
+
Wo(this, !0) || y.Polygon.prototype._updatePath.call(this);
|
|
1406
1388
|
}
|
|
1407
1389
|
}
|
|
1408
1390
|
function Ye(a, t) {
|
|
1409
1391
|
const e = bt(a);
|
|
1410
1392
|
if (!e) return null;
|
|
1411
|
-
const o = a.tipo === "Polygon" ? new
|
|
1393
|
+
const o = a.tipo === "Polygon" ? new Xo(a.aneis[0], t) : new Zo(a.coordenadas, t);
|
|
1412
1394
|
return o.definirCurva(e), o;
|
|
1413
1395
|
}
|
|
1414
|
-
function
|
|
1396
|
+
function Yo(a, t) {
|
|
1415
1397
|
a.definirCurva(bt(t)), a.setLatLngs(t.tipo === "Polygon" ? t.aneis[0] : t.coordenadas);
|
|
1416
1398
|
}
|
|
1417
1399
|
function vt(a) {
|
|
@@ -1424,7 +1406,7 @@ function qe(a, t) {
|
|
|
1424
1406
|
function yt(a, t) {
|
|
1425
1407
|
return [t.lat0 + a[1] / t.mLat, t.lon0 + a[0] / t.mLng];
|
|
1426
1408
|
}
|
|
1427
|
-
function
|
|
1409
|
+
function Ko(a, t) {
|
|
1428
1410
|
const e = (o) => {
|
|
1429
1411
|
let i = !1;
|
|
1430
1412
|
for (let n = 0, s = o.length - 1; n < o.length; s = n++) {
|
|
@@ -1435,7 +1417,7 @@ function Jo(a, t) {
|
|
|
1435
1417
|
};
|
|
1436
1418
|
return !t[0] || !e(t[0]) ? !1 : !t.slice(1).some(e);
|
|
1437
1419
|
}
|
|
1438
|
-
function
|
|
1420
|
+
function Jo(a, t, e, o) {
|
|
1439
1421
|
const i = t[0] - a[0], n = t[1] - a[1], s = o[0] - e[0], r = o[1] - e[1], c = i * r - n * s;
|
|
1440
1422
|
if (Math.abs(c) < 1e-12) return null;
|
|
1441
1423
|
const l = ((e[0] - a[0]) * r - (e[1] - a[1]) * s) / c, d = ((e[0] - a[0]) * n - (e[1] - a[1]) * i) / c;
|
|
@@ -1449,17 +1431,17 @@ function ie(a) {
|
|
|
1449
1431
|
}
|
|
1450
1432
|
return Math.abs(t) / 2;
|
|
1451
1433
|
}
|
|
1452
|
-
function
|
|
1434
|
+
function pa(a, t) {
|
|
1453
1435
|
if (a.length < 3 || t.length < 2) return null;
|
|
1454
|
-
const e = vt(a[0]), o = a.map((s) => qe(s, e)), i = t.map((s) => qe(s, e)), n =
|
|
1436
|
+
const e = vt(a[0]), o = a.map((s) => qe(s, e)), i = t.map((s) => qe(s, e)), n = Qo(o, i, 0);
|
|
1455
1437
|
return n && n.length >= 2 ? n.map((s) => s.map((r) => yt(r, e))) : null;
|
|
1456
1438
|
}
|
|
1457
|
-
function
|
|
1439
|
+
function Qo(a, t, e) {
|
|
1458
1440
|
if (e > 8) return null;
|
|
1459
1441
|
const o = a.length, i = [];
|
|
1460
1442
|
for (let b = 0; b < t.length - 1; b++)
|
|
1461
1443
|
for (let x = 0; x < o; x++) {
|
|
1462
|
-
const P =
|
|
1444
|
+
const P = Jo(t[b], t[b + 1], a[x], a[(x + 1) % o]);
|
|
1463
1445
|
P && i.push({
|
|
1464
1446
|
tLinha: b + P.t,
|
|
1465
1447
|
tAnel: x + P.u,
|
|
@@ -1479,27 +1461,27 @@ function ti(a, t, e) {
|
|
|
1479
1461
|
const v = [d.ponto];
|
|
1480
1462
|
for (let b = m + 1; b <= p + o; b++) v.push(a[b % o]);
|
|
1481
1463
|
v.push(l.ponto, ...g);
|
|
1482
|
-
const z = ie(a) * 1e-9,
|
|
1483
|
-
if (
|
|
1464
|
+
const z = ie(a) * 1e-9, S = [u, v].filter((b) => b.length >= 3 && ie(b) > z);
|
|
1465
|
+
if (S.length < 2) return null;
|
|
1484
1466
|
const L = [s.ponto, ...t.slice(Math.floor(s.tLinha) + 1)];
|
|
1485
1467
|
if (i.length > 2 && L.length >= 2) {
|
|
1486
1468
|
const b = [];
|
|
1487
|
-
for (const x of
|
|
1488
|
-
const P =
|
|
1469
|
+
for (const x of S) {
|
|
1470
|
+
const P = Qo(x, L, e + 1);
|
|
1489
1471
|
P ? b.push(...P) : b.push(x);
|
|
1490
1472
|
}
|
|
1491
1473
|
return b;
|
|
1492
1474
|
}
|
|
1493
|
-
return
|
|
1475
|
+
return S;
|
|
1494
1476
|
}
|
|
1495
|
-
function
|
|
1477
|
+
function St(a, t) {
|
|
1496
1478
|
return a.map((e) => qe(e, t));
|
|
1497
1479
|
}
|
|
1498
1480
|
const tt = (a, t) => Math.hypot(a[0] - t[0], a[1] - t[1]);
|
|
1499
|
-
function
|
|
1481
|
+
function fa(a, t = 0) {
|
|
1500
1482
|
if (a.length === 0 || a.some((n) => n.length < 2)) return null;
|
|
1501
|
-
const e = vt(a[0][0]), o = a.slice(1).map((n) =>
|
|
1502
|
-
let i =
|
|
1483
|
+
const e = vt(a[0][0]), o = a.slice(1).map((n) => St(n, e));
|
|
1484
|
+
let i = St(a[0], e);
|
|
1503
1485
|
for (; o.length > 0; ) {
|
|
1504
1486
|
let n = null;
|
|
1505
1487
|
if (o.forEach((d, h) => {
|
|
@@ -1517,20 +1499,20 @@ function ga(a, t = 0) {
|
|
|
1517
1499
|
}
|
|
1518
1500
|
return i.map((n) => yt(n, e));
|
|
1519
1501
|
}
|
|
1520
|
-
function
|
|
1521
|
-
const i =
|
|
1502
|
+
function ma(a, t, e, o) {
|
|
1503
|
+
const i = Jo(a, t, e, o);
|
|
1522
1504
|
return !!i && i.t > 1e-9 && i.t < 1 - 1e-9 && i.u > 1e-9;
|
|
1523
1505
|
}
|
|
1524
|
-
function
|
|
1506
|
+
function ga(a, t) {
|
|
1525
1507
|
for (let e = 0; e < a.length; e++)
|
|
1526
1508
|
for (let o = 0; o < t.length; o++)
|
|
1527
|
-
if (
|
|
1509
|
+
if (ma(a[e], a[(e + 1) % a.length], t[o], t[(o + 1) % t.length])) return !0;
|
|
1528
1510
|
return !1;
|
|
1529
1511
|
}
|
|
1530
|
-
function
|
|
1512
|
+
function va(a, t, e = 0) {
|
|
1531
1513
|
if (a.length < 3 || t.length < 3) return null;
|
|
1532
|
-
const o = vt(a[0]), i =
|
|
1533
|
-
if (
|
|
1514
|
+
const o = vt(a[0]), i = St(a, o), n = St(t, o);
|
|
1515
|
+
if (ga(i, n)) return null;
|
|
1534
1516
|
let s = { i: 0, j: 0, d: 1 / 0 };
|
|
1535
1517
|
for (let d = 0; d < i.length; d++)
|
|
1536
1518
|
for (let h = 0; h < n.length; h++) {
|
|
@@ -1543,11 +1525,11 @@ function ba(a, t, e = 0) {
|
|
|
1543
1525
|
for (let d = 0; d <= n.length; d++) l.push(n[(c + d) % n.length]);
|
|
1544
1526
|
return l.map((d) => yt(d, o));
|
|
1545
1527
|
}
|
|
1546
|
-
const
|
|
1547
|
-
function
|
|
1528
|
+
const po = 16;
|
|
1529
|
+
function fo(a, t, e, o) {
|
|
1548
1530
|
const i = [];
|
|
1549
|
-
for (let n = 0; n <=
|
|
1550
|
-
const s = e + (o - e) * n /
|
|
1531
|
+
for (let n = 0; n <= po; n++) {
|
|
1532
|
+
const s = e + (o - e) * n / po;
|
|
1551
1533
|
i.push([a[0] + t * Math.cos(s), a[1] + t * Math.sin(s)]);
|
|
1552
1534
|
}
|
|
1553
1535
|
return i;
|
|
@@ -1572,7 +1554,7 @@ function me(a, t, e) {
|
|
|
1572
1554
|
}
|
|
1573
1555
|
return i;
|
|
1574
1556
|
}
|
|
1575
|
-
function
|
|
1557
|
+
function ya(a) {
|
|
1576
1558
|
let t = 0;
|
|
1577
1559
|
for (let e = 0; e < a.length; e++) {
|
|
1578
1560
|
const [o, i] = a[e], [n, s] = a[(e + 1) % a.length];
|
|
@@ -1580,7 +1562,7 @@ function xa(a) {
|
|
|
1580
1562
|
}
|
|
1581
1563
|
return t > 0;
|
|
1582
1564
|
}
|
|
1583
|
-
function
|
|
1565
|
+
function ba(a, t) {
|
|
1584
1566
|
if (!Number.isFinite(t) || t === 0) return null;
|
|
1585
1567
|
if (a.tipo === "Point" || a.tipo === "Text" || a.tipo === "Circle") {
|
|
1586
1568
|
const e = a.tipo === "Circle" ? a.centro : a.coordenada, o = a.tipo === "Circle" ? a.raioMetros + t : t;
|
|
@@ -1590,21 +1572,21 @@ function Pa(a, t) {
|
|
|
1590
1572
|
}
|
|
1591
1573
|
if (a.tipo === "LineString") {
|
|
1592
1574
|
if (t < 0 || a.coordenadas.length < 2 || Yt(a)) return null;
|
|
1593
|
-
const e = vt(a.coordenadas[0]), o =
|
|
1575
|
+
const e = vt(a.coordenadas[0]), o = St(a.coordenadas, e), i = me(o, t, !1), n = me([...o].reverse(), t, !1), s = o[o.length - 1], r = o[0], c = Math.atan2(s[1] - o[o.length - 2][1], s[0] - o[o.length - 2][0]), l = Math.atan2(r[1] - o[1][1], r[0] - o[1][0]), d = fo(s, t, c + Math.PI / 2, c - Math.PI / 2), h = fo(r, t, l + Math.PI / 2, l - Math.PI / 2);
|
|
1594
1576
|
return [...i, ...d, ...n, ...h].map((p) => yt(p, e));
|
|
1595
1577
|
}
|
|
1596
1578
|
if (a.tipo === "Polygon") {
|
|
1597
1579
|
const e = a.aneis[0];
|
|
1598
1580
|
if (!e || e.length < 3) return null;
|
|
1599
1581
|
const o = vt(e[0]);
|
|
1600
|
-
let i =
|
|
1601
|
-
|
|
1582
|
+
let i = St(e, o);
|
|
1583
|
+
ya(i) && (i = [...i].reverse());
|
|
1602
1584
|
const s = me(i, -t, !0);
|
|
1603
1585
|
return s.length < 3 || t < 0 && ie(s) >= ie(i) ? null : s.map((r) => yt(r, o));
|
|
1604
1586
|
}
|
|
1605
1587
|
return null;
|
|
1606
1588
|
}
|
|
1607
|
-
function
|
|
1589
|
+
function xa(a, t, e) {
|
|
1608
1590
|
const o = (i) => {
|
|
1609
1591
|
const n = je(i[0]), s = e / n.lat, r = t / Math.max(n.lng, 1);
|
|
1610
1592
|
return [i[0] + s, i[1] + r];
|
|
@@ -1626,21 +1608,21 @@ function La(a, t, e) {
|
|
|
1626
1608
|
}
|
|
1627
1609
|
}
|
|
1628
1610
|
}
|
|
1629
|
-
const
|
|
1630
|
-
function
|
|
1631
|
-
return a *
|
|
1611
|
+
const mo = { m: 1, km: 1e3, ft: 0.3048, mi: 1609.344 }, go = { m2: 1, ha: 1e4, km2: 1e6, ac: 4046.8564224, alqueire: 24200 };
|
|
1612
|
+
function Lr(a, t, e) {
|
|
1613
|
+
return a * mo[t] / mo[e];
|
|
1632
1614
|
}
|
|
1633
1615
|
function Sr(a, t, e) {
|
|
1634
|
-
return a *
|
|
1616
|
+
return a * go[t] / go[e];
|
|
1635
1617
|
}
|
|
1636
|
-
function
|
|
1618
|
+
function Cr(a, t, e = 2) {
|
|
1637
1619
|
const o = t === "lat" ? a < 0 ? "S" : "N" : a < 0 ? "O" : "L", i = Math.abs(a);
|
|
1638
1620
|
let n = Math.floor(i), s = Math.floor((i - n) * 60), r = Number(((i - n - s / 60) * 3600).toFixed(e));
|
|
1639
1621
|
r >= 60 && (r = 0, s += 1), s >= 60 && (s = 0, n += 1);
|
|
1640
1622
|
const c = r.toFixed(e).padStart(e ? e + 3 : 2, "0");
|
|
1641
1623
|
return `${n}°${String(s).padStart(2, "0")}'${c}"${o}`;
|
|
1642
1624
|
}
|
|
1643
|
-
function
|
|
1625
|
+
function Mr(a) {
|
|
1644
1626
|
var p;
|
|
1645
1627
|
if (typeof a != "string") return null;
|
|
1646
1628
|
const t = a.trim().toUpperCase().replace(",", "."), e = (p = /[NSLEOW]$/.exec(t)) == null ? void 0 : p[0], o = t.replace(/[NSLEOW]$/, "").trim(), i = o.match(/-?\d+(?:\.\d+)?/g);
|
|
@@ -1650,7 +1632,7 @@ function Ar(a) {
|
|
|
1650
1632
|
let h = c + l / 60 + d / 3600;
|
|
1651
1633
|
return (n.startsWith("-") || e === "S" || e === "O" || e === "W") && (h = -h), h;
|
|
1652
1634
|
}
|
|
1653
|
-
function
|
|
1635
|
+
function Ar(a, t) {
|
|
1654
1636
|
return xt(a, t);
|
|
1655
1637
|
}
|
|
1656
1638
|
function ge(a, t, e) {
|
|
@@ -1662,14 +1644,14 @@ function ge(a, t, e) {
|
|
|
1662
1644
|
propriedades: { ...a.propriedades }
|
|
1663
1645
|
};
|
|
1664
1646
|
}
|
|
1665
|
-
const
|
|
1647
|
+
const Pa = 5e3;
|
|
1666
1648
|
function ce(a) {
|
|
1667
1649
|
return a.tipo === "Polygon" ? 3 : a.tipo === "LineString" ? 2 : 1;
|
|
1668
1650
|
}
|
|
1669
|
-
function
|
|
1651
|
+
function vo(a, t = !1) {
|
|
1670
1652
|
if (a.bloqueada || t) return "bloqueada";
|
|
1671
1653
|
const e = a.geometria;
|
|
1672
|
-
return e.tipo !== "Point" && e.tipo !== "LineString" && e.tipo !== "Polygon" && e.tipo !== "Circle" ? "tipo-nao-suportado" : e.tipo === "Polygon" && e.aneis.length !== 1 ? "poligono-com-furos" : Yt(e) ? "multiparte" : X(e).length >
|
|
1654
|
+
return e.tipo !== "Point" && e.tipo !== "LineString" && e.tipo !== "Polygon" && e.tipo !== "Circle" ? "tipo-nao-suportado" : e.tipo === "Polygon" && e.aneis.length !== 1 ? "poligono-com-furos" : Yt(e) ? "multiparte" : X(e).length > Pa ? "muitos-vertices" : null;
|
|
1673
1655
|
}
|
|
1674
1656
|
function X(a) {
|
|
1675
1657
|
return a.tipo === "Point" ? [a.coordenada] : a.tipo === "LineString" ? a.coordenadas : a.tipo === "Polygon" ? a.aneis[0] ?? [] : [];
|
|
@@ -1677,24 +1659,24 @@ function X(a) {
|
|
|
1677
1659
|
function le(a, t) {
|
|
1678
1660
|
return a.tipo === "Point" ? { tipo: "Point", coordenada: t[0] } : a.tipo === "LineString" ? { tipo: "LineString", coordenadas: t } : a.tipo === "Polygon" ? { tipo: "Polygon", aneis: [t] } : a;
|
|
1679
1661
|
}
|
|
1680
|
-
function
|
|
1662
|
+
function wr(a, t, e) {
|
|
1681
1663
|
const o = X(a).slice();
|
|
1682
1664
|
return t < 0 || t >= o.length ? a : (o[t] = e, le(a, o));
|
|
1683
1665
|
}
|
|
1684
|
-
function
|
|
1666
|
+
function La(a, t, e) {
|
|
1685
1667
|
if (a.tipo !== "LineString" && a.tipo !== "Polygon") return a;
|
|
1686
1668
|
const o = X(a).slice();
|
|
1687
1669
|
return t < 0 || t >= o.length ? a : (o.splice(t + 1, 0, e), le(a, o));
|
|
1688
1670
|
}
|
|
1689
|
-
function
|
|
1671
|
+
function Sa(a, t) {
|
|
1690
1672
|
if (a.tipo !== "LineString" && a.tipo !== "Polygon") return null;
|
|
1691
1673
|
const e = X(a);
|
|
1692
1674
|
return t < 0 || t >= e.length || e.length <= ce(a) ? null : le(a, e.filter((o, i) => i !== t));
|
|
1693
1675
|
}
|
|
1694
|
-
function
|
|
1676
|
+
function ti(a, t) {
|
|
1695
1677
|
return [(a[0] + t[0]) / 2, (a[1] + t[1]) / 2];
|
|
1696
1678
|
}
|
|
1697
|
-
function
|
|
1679
|
+
function ei(a) {
|
|
1698
1680
|
const t = X(a).length, e = [];
|
|
1699
1681
|
if (a.tipo !== "LineString" && a.tipo !== "Polygon") return e;
|
|
1700
1682
|
for (let o = 0; o < t - 1; o++) e.push([o, o + 1]);
|
|
@@ -1703,33 +1685,33 @@ function oi(a) {
|
|
|
1703
1685
|
function K(a) {
|
|
1704
1686
|
return (a.tipo === "LineString" || a.tipo === "Polygon") && a.curva && a.curva.length >= ce(a) ? a.curva : null;
|
|
1705
1687
|
}
|
|
1706
|
-
const
|
|
1707
|
-
function
|
|
1688
|
+
const Ca = 0.5;
|
|
1689
|
+
function Ma(a, t) {
|
|
1708
1690
|
return [a[0], a[1] + t / Math.max(je(a[0]).lng, 1)];
|
|
1709
1691
|
}
|
|
1710
1692
|
function pt(a) {
|
|
1711
1693
|
var t;
|
|
1712
|
-
return a.tipo === "Circle" ? [a.centro,
|
|
1694
|
+
return a.tipo === "Circle" ? [a.centro, Ma(a.centro, a.raioMetros)] : ((t = K(a)) == null ? void 0 : t.map((e) => e.ponto)) ?? X(a);
|
|
1713
1695
|
}
|
|
1714
|
-
function
|
|
1696
|
+
function Ct(a, t) {
|
|
1715
1697
|
const e = a.tipo === "Polygon", o = Pt(t, e);
|
|
1716
1698
|
return e ? { tipo: "Polygon", aneis: [o], curva: t } : { tipo: "LineString", coordenadas: o, curva: t };
|
|
1717
1699
|
}
|
|
1718
|
-
function
|
|
1700
|
+
function yo(a, t) {
|
|
1719
1701
|
if (a.tipo === "Circle")
|
|
1720
|
-
return t.length < 2 ? a : { ...a, centro: t[0], raioMetros: Math.max(
|
|
1702
|
+
return t.length < 2 ? a : { ...a, centro: t[0], raioMetros: Math.max(Ca, xt(t[0], t[1])) };
|
|
1721
1703
|
const e = K(a);
|
|
1722
1704
|
if (!e || e.length !== t.length) return le(a, t);
|
|
1723
1705
|
const o = e.map((i, n) => {
|
|
1724
1706
|
const s = t[n][0] - i.ponto[0], r = t[n][1] - i.ponto[1], c = (d) => [d[0] + s, d[1] + r], l = { ponto: t[n] };
|
|
1725
1707
|
return i.entrada && (l.entrada = c(i.entrada)), i.saida && (l.saida = c(i.saida)), l;
|
|
1726
1708
|
});
|
|
1727
|
-
return
|
|
1709
|
+
return Ct(a, o);
|
|
1728
1710
|
}
|
|
1729
1711
|
function ft(a, t, e) {
|
|
1730
1712
|
return [a[0] + (t[0] - a[0]) * e, a[1] + (t[1] - a[1]) * e];
|
|
1731
1713
|
}
|
|
1732
|
-
function
|
|
1714
|
+
function Aa(a, t, e) {
|
|
1733
1715
|
const [o, i] = He(a, t);
|
|
1734
1716
|
let n = 0.5, s = 1 / 0;
|
|
1735
1717
|
for (let r = 1; r < 64; r++) {
|
|
@@ -1742,42 +1724,42 @@ function zt(a, t, e) {
|
|
|
1742
1724
|
const o = K(a);
|
|
1743
1725
|
if (!o) {
|
|
1744
1726
|
const s = X(a);
|
|
1745
|
-
return
|
|
1727
|
+
return ti(s[t], s[e]);
|
|
1746
1728
|
}
|
|
1747
1729
|
const [i, n] = He(o[t], o[e]);
|
|
1748
1730
|
return Oo(o[t].ponto, i, n, o[e].ponto, 0.5);
|
|
1749
1731
|
}
|
|
1750
|
-
function
|
|
1732
|
+
function oi(a) {
|
|
1751
1733
|
const t = K(a);
|
|
1752
|
-
if (!t) return
|
|
1734
|
+
if (!t) return ei(a);
|
|
1753
1735
|
const e = [];
|
|
1754
1736
|
for (let o = 0; o < t.length - 1; o++) e.push([o, o + 1]);
|
|
1755
1737
|
return a.tipo === "Polygon" && t.length > 2 && e.push([t.length - 1, 0]), e;
|
|
1756
1738
|
}
|
|
1757
|
-
function
|
|
1739
|
+
function wa(a, t, e) {
|
|
1758
1740
|
const o = K(a);
|
|
1759
|
-
if (!o) return
|
|
1741
|
+
if (!o) return La(a, t, e);
|
|
1760
1742
|
if (t < 0 || t >= o.length) return a;
|
|
1761
1743
|
const i = (t + 1) % o.length, n = o[t], s = o[i], r = n.saida === void 0 && s.entrada === void 0;
|
|
1762
1744
|
let c, l = n, d = s;
|
|
1763
1745
|
if (r)
|
|
1764
1746
|
c = { ponto: e };
|
|
1765
1747
|
else {
|
|
1766
|
-
const p =
|
|
1767
|
-
c = { ponto: ft(z,
|
|
1748
|
+
const p = Aa(n, s, e), [m, g] = He(n, s), u = ft(n.ponto, m, p), v = ft(m, g, p), M = ft(g, s.ponto, p), z = ft(u, v, p), S = ft(v, M, p);
|
|
1749
|
+
c = { ponto: ft(z, S, p), entrada: z, saida: S }, l = { ...n, saida: u }, d = { ...s, entrada: M };
|
|
1768
1750
|
}
|
|
1769
1751
|
const h = o.slice();
|
|
1770
|
-
return h[t] = l, h[i] = d, h.splice(t + 1, 0, c),
|
|
1752
|
+
return h[t] = l, h[i] = d, h.splice(t + 1, 0, c), Ct(a, h);
|
|
1771
1753
|
}
|
|
1772
|
-
function
|
|
1754
|
+
function za(a, t) {
|
|
1773
1755
|
const e = K(a);
|
|
1774
|
-
return e ? t < 0 || t >= e.length || e.length <= ce(a) ? null :
|
|
1756
|
+
return e ? t < 0 || t >= e.length || e.length <= ce(a) ? null : Ct(a, e.filter((o, i) => i !== t)) : Sa(a, t);
|
|
1775
1757
|
}
|
|
1776
1758
|
function It(a) {
|
|
1777
1759
|
return a.tipo !== "LineString" && a.tipo !== "Polygon" ? null : K(a) ?? X(a).map((t) => ({ ponto: [t[0], t[1]] }));
|
|
1778
1760
|
}
|
|
1779
|
-
const
|
|
1780
|
-
function
|
|
1761
|
+
const Ea = 40;
|
|
1762
|
+
function ka(a, t, e) {
|
|
1781
1763
|
const o = It(a);
|
|
1782
1764
|
if (!o || t < 0 || t >= o.length) return null;
|
|
1783
1765
|
const i = a.tipo === "Polygon", n = o.length, s = e === "saida" ? t < n - 1 ? o[t + 1] : i ? o[0] : null : t > 0 ? o[t - 1] : i ? o[n - 1] : null;
|
|
@@ -1785,20 +1767,20 @@ function Ta(a, t, e) {
|
|
|
1785
1767
|
const r = o[t].ponto;
|
|
1786
1768
|
return [r[0] + (s.ponto[0] - r[0]) / 3, r[1] + (s.ponto[1] - r[1]) / 3];
|
|
1787
1769
|
}
|
|
1788
|
-
function
|
|
1770
|
+
function Ia(a, t, e, o, i = !0) {
|
|
1789
1771
|
const n = It(a);
|
|
1790
1772
|
if (!n || t < 0 || t >= n.length) return a;
|
|
1791
1773
|
const s = { ...n[t], [e]: o };
|
|
1792
1774
|
i && (s[e === "saida" ? "entrada" : "saida"] = Ge(s.ponto, o));
|
|
1793
1775
|
const r = n.slice();
|
|
1794
|
-
return r[t] = s,
|
|
1776
|
+
return r[t] = s, Ct(a, r);
|
|
1795
1777
|
}
|
|
1796
|
-
function
|
|
1778
|
+
function Ta(a, t) {
|
|
1797
1779
|
const e = It(a);
|
|
1798
1780
|
if (!e || t < 0 || t >= e.length) return a;
|
|
1799
1781
|
const o = e[t], i = e.slice();
|
|
1800
1782
|
if (o.entrada || o.saida)
|
|
1801
|
-
return i[t] = { ponto: o.ponto },
|
|
1783
|
+
return i[t] = { ponto: o.ponto }, Ct(a, i);
|
|
1802
1784
|
const n = a.tipo === "Polygon", s = e.length, r = t > 0 ? e[t - 1] : n ? e[s - 1] : null, c = t < s - 1 ? e[t + 1] : n ? e[0] : null;
|
|
1803
1785
|
if (!r && !c) return a;
|
|
1804
1786
|
const l = o.ponto;
|
|
@@ -1809,14 +1791,14 @@ function Da(a, t) {
|
|
|
1809
1791
|
const p = (c ?? r).ponto, m = c ? 1 : -1;
|
|
1810
1792
|
d = (p[0] - l[0]) / 3 * m, h = (p[1] - l[1]) / 3 * m;
|
|
1811
1793
|
}
|
|
1812
|
-
return i[t] = { ponto: l, saida: [l[0] + d, l[1] + h], entrada: [l[0] - d, l[1] - h] },
|
|
1794
|
+
return i[t] = { ponto: l, saida: [l[0] + d, l[1] + h], entrada: [l[0] - d, l[1] - h] }, Ct(a, i);
|
|
1813
1795
|
}
|
|
1814
|
-
const
|
|
1815
|
-
function
|
|
1796
|
+
const _a = 6, ve = (a, t) => Math.hypot(a.x - t.x, a.y - t.y);
|
|
1797
|
+
function bo(a, t, e) {
|
|
1816
1798
|
const o = e.x - t.x, i = e.y - t.y, n = o * o + i * i, s = n === 0 ? 0 : Math.max(0, Math.min(1, ((a.x - t.x) * o + (a.y - t.y) * i) / n));
|
|
1817
1799
|
return Math.hypot(a.x - (t.x + s * o), a.y - (t.y + s * i));
|
|
1818
1800
|
}
|
|
1819
|
-
function
|
|
1801
|
+
function Da(a, t) {
|
|
1820
1802
|
const e = a.geometria;
|
|
1821
1803
|
if (e.tipo !== "Polygon") return 0;
|
|
1822
1804
|
let o = 1 / 0, i = -1 / 0, n = 1 / 0, s = -1 / 0;
|
|
@@ -1826,7 +1808,7 @@ function $a(a, t) {
|
|
|
1826
1808
|
}
|
|
1827
1809
|
return (i - o) * (s - n);
|
|
1828
1810
|
}
|
|
1829
|
-
function de(a, t, e, o =
|
|
1811
|
+
function de(a, t, e, o = _a) {
|
|
1830
1812
|
let i = null, n = null, s = null;
|
|
1831
1813
|
for (const r of t) {
|
|
1832
1814
|
if (r.excluida || r.oculta) continue;
|
|
@@ -1838,7 +1820,7 @@ function de(a, t, e, o = qa) {
|
|
|
1838
1820
|
let l = 1 / 0;
|
|
1839
1821
|
for (const d of it(c)) {
|
|
1840
1822
|
const h = d.map(e);
|
|
1841
|
-
for (let p = 1; p < h.length; p++) l = Math.min(l,
|
|
1823
|
+
for (let p = 1; p < h.length; p++) l = Math.min(l, bo(a, h[p - 1], h[p]));
|
|
1842
1824
|
}
|
|
1843
1825
|
l <= o && (!n || l < n.d) && (n = { f: r, d: l });
|
|
1844
1826
|
} else if (c.tipo === "Circle") {
|
|
@@ -1850,21 +1832,21 @@ function de(a, t, e, o = qa) {
|
|
|
1850
1832
|
} else {
|
|
1851
1833
|
const l = c.aneis[0].map(e);
|
|
1852
1834
|
let d = 1 / 0;
|
|
1853
|
-
for (const [p, m] of
|
|
1854
|
-
if (
|
|
1855
|
-
const p =
|
|
1835
|
+
for (const [p, m] of ei(c)) d = Math.min(d, bo(a, l[p], l[m]));
|
|
1836
|
+
if (Ko([a.y, a.x], [l.map((p) => [p.y, p.x]), ...c.aneis.slice(1).map((p) => p.map(e).map((m) => [m.y, m.x]))]) || d <= o) {
|
|
1837
|
+
const p = Da(r, e);
|
|
1856
1838
|
(!s || p < s.a) && (s = { f: r, a: p });
|
|
1857
1839
|
}
|
|
1858
1840
|
}
|
|
1859
1841
|
}
|
|
1860
1842
|
return (i == null ? void 0 : i.f) ?? (n == null ? void 0 : n.f) ?? (s == null ? void 0 : s.f) ?? null;
|
|
1861
1843
|
}
|
|
1862
|
-
const $t = 0.1,
|
|
1844
|
+
const $t = 0.1, qa = 2, $a = typeof requestAnimationFrame == "function" ? (a) => {
|
|
1863
1845
|
requestAnimationFrame(a);
|
|
1864
1846
|
} : (a) => {
|
|
1865
1847
|
setTimeout(a, 16);
|
|
1866
1848
|
};
|
|
1867
|
-
class
|
|
1849
|
+
class Fa extends y.Layer {
|
|
1868
1850
|
constructor(e, o) {
|
|
1869
1851
|
super();
|
|
1870
1852
|
f(this, "canvas", null);
|
|
@@ -1888,7 +1870,7 @@ class Na extends y.Layer {
|
|
|
1888
1870
|
}
|
|
1889
1871
|
/** Pede um redesenho no próximo quadro (vários pedidos viram um só). */
|
|
1890
1872
|
solicitarRedesenho() {
|
|
1891
|
-
this.agendado || !this.vivo || (this.agendado = !0,
|
|
1873
|
+
this.agendado || !this.vivo || (this.agendado = !0, $a(() => {
|
|
1892
1874
|
this.agendado = !1, this.vivo && this.redesenhar();
|
|
1893
1875
|
}));
|
|
1894
1876
|
}
|
|
@@ -1902,18 +1884,18 @@ class Na extends y.Layer {
|
|
|
1902
1884
|
try {
|
|
1903
1885
|
const i = e.getSize(), n = Math.ceil(i.x * (1 + 2 * $t)), s = Math.ceil(i.y * (1 + 2 * $t));
|
|
1904
1886
|
if (!(n > 0 && s > 0)) return;
|
|
1905
|
-
const r = Math.min(
|
|
1887
|
+
const r = Math.min(qa, typeof window < "u" && window.devicePixelRatio || 1), c = e.containerPointToLayerPoint([-i.x * $t, -i.y * $t]).round();
|
|
1906
1888
|
(o.width !== Math.round(n * r) || o.height !== Math.round(s * r)) && (o.width = Math.round(n * r), o.height = Math.round(s * r)), o.style.width = `${n}px`, o.style.height = `${s}px`, y.DomUtil.setPosition(o, c), o.style.display = "";
|
|
1907
1889
|
const l = o.getContext("2d");
|
|
1908
1890
|
if (!l) return;
|
|
1909
1891
|
l.setTransform(r, 0, 0, r, 0, 0), l.clearRect(0, 0, n, s);
|
|
1910
1892
|
const d = e.getPixelOrigin().add(c);
|
|
1911
|
-
this.ultimaPintura =
|
|
1893
|
+
this.ultimaPintura = Pi(l, this.obterMarcas(), e.getZoom(), d.x, d.y, n, s);
|
|
1912
1894
|
} catch {
|
|
1913
1895
|
}
|
|
1914
1896
|
}
|
|
1915
1897
|
}
|
|
1916
|
-
const
|
|
1898
|
+
const ii = /* @__PURE__ */ new WeakMap(), $e = {
|
|
1917
1899
|
tower: '<path d="M12 2 L8 22 M12 2 L16 22 M9.5 12 H14.5 M8.7 17 H15.3 M12 2 L9.5 12 L14.5 12 Z" />',
|
|
1918
1900
|
tree: '<path d="M12 22 V14 M12 3 L5 14 H19 Z" />',
|
|
1919
1901
|
warning: '<path d="M12 3 L22 20 H2 Z M12 9 V14 M12 17 V17.5" />',
|
|
@@ -1945,7 +1927,7 @@ function Ht(a, t, e = !1) {
|
|
|
1945
1927
|
html: `<span style="${c}${d}">${T(i)}</span>`
|
|
1946
1928
|
});
|
|
1947
1929
|
}
|
|
1948
|
-
function
|
|
1930
|
+
function ai(a, t) {
|
|
1949
1931
|
const e = a < 10 ? 30 : a < 100 ? 38 : 46, o = ot(t.corPrimaria, Ue);
|
|
1950
1932
|
return y.divIcon({
|
|
1951
1933
|
className: "custom-leaflet-marker cad-feicao-cluster",
|
|
@@ -1969,16 +1951,16 @@ function Fe(a, t) {
|
|
|
1969
1951
|
interactive: t
|
|
1970
1952
|
};
|
|
1971
1953
|
}
|
|
1972
|
-
const
|
|
1954
|
+
const Oa = 150, Na = 100, ye = 300, be = 0.75, Ra = 20, Ba = 0.3, xe = typeof requestAnimationFrame == "function" ? (a) => {
|
|
1973
1955
|
requestAnimationFrame(a);
|
|
1974
1956
|
} : (a) => {
|
|
1975
1957
|
setTimeout(a, 16);
|
|
1976
1958
|
};
|
|
1977
|
-
class
|
|
1959
|
+
class Va {
|
|
1978
1960
|
constructor() {
|
|
1979
1961
|
f(this, "estados", /* @__PURE__ */ new WeakMap());
|
|
1980
1962
|
/** Por definição de camada (uma por componente), para a seleção sobreviver à recriação do grupo. */
|
|
1981
|
-
f(this, "selecionadas",
|
|
1963
|
+
f(this, "selecionadas", ii);
|
|
1982
1964
|
f(this, "tokenLote", /* @__PURE__ */ new WeakMap());
|
|
1983
1965
|
}
|
|
1984
1966
|
render(t, e, o) {
|
|
@@ -2049,7 +2031,7 @@ class Ha {
|
|
|
2049
2031
|
map: o,
|
|
2050
2032
|
context: i,
|
|
2051
2033
|
loja: /* @__PURE__ */ new Map(),
|
|
2052
|
-
indice: new
|
|
2034
|
+
indice: new Li(),
|
|
2053
2035
|
revisao: 0,
|
|
2054
2036
|
revisaoBase: 0,
|
|
2055
2037
|
listaSincronizada: null,
|
|
@@ -2091,7 +2073,7 @@ class Ha {
|
|
|
2091
2073
|
h.add(u.id), s.loja.get(u.id) !== u && d.add(u.id);
|
|
2092
2074
|
const p = [...s.loja.keys()].filter((u) => !h.has(u));
|
|
2093
2075
|
if (d.size > 0 || p.length > 0) {
|
|
2094
|
-
if (s.revisao++, s.revisaoBase++, s.lod.clear(), s.loja.size === 0 || d.size + p.length > l.length *
|
|
2076
|
+
if (s.revisao++, s.revisaoBase++, s.lod.clear(), s.loja.size === 0 || d.size + p.length > l.length * Ba)
|
|
2095
2077
|
s.indice.construir(l);
|
|
2096
2078
|
else {
|
|
2097
2079
|
for (const u of l) d.has(u.id) && s.indice.atualizar(u);
|
|
@@ -2152,10 +2134,10 @@ class Ha {
|
|
|
2152
2134
|
}
|
|
2153
2135
|
/** Há geometria grande demais para o zoom atual? Só então vale redesenhar ao mudar de zoom. */
|
|
2154
2136
|
ressimplificar(t, e) {
|
|
2155
|
-
return t.zoomDesenho === e || Si(t.feicao.geometria) <
|
|
2137
|
+
return t.zoomDesenho === e || Si(t.feicao.geometria) < Ci ? !1 : e < to || t.zoomDesenho < to;
|
|
2156
2138
|
}
|
|
2157
2139
|
paraDesenho(t, e) {
|
|
2158
|
-
const o =
|
|
2140
|
+
const o = Mi(t.geometria, e);
|
|
2159
2141
|
return o === t.geometria ? t : { ...t, geometria: o };
|
|
2160
2142
|
}
|
|
2161
2143
|
/** Vai para a tela? Não oculta e visível pela regra oficial × prévia. */
|
|
@@ -2189,7 +2171,7 @@ class Ha {
|
|
|
2189
2171
|
const s = t.lod.get(e.id);
|
|
2190
2172
|
if (s !== void 0) return s;
|
|
2191
2173
|
t.avaliacoesLOD++;
|
|
2192
|
-
const r =
|
|
2174
|
+
const r = Ai(t.indice.caixaDe(e.id), o);
|
|
2193
2175
|
return t.lod.set(e.id, r), r;
|
|
2194
2176
|
}
|
|
2195
2177
|
novaMarca(t, e, o) {
|
|
@@ -2201,7 +2183,7 @@ class Ha {
|
|
|
2201
2183
|
lat: (i.minLat + i.maxLat) / 2,
|
|
2202
2184
|
lon: (i.minLon + i.maxLon) / 2,
|
|
2203
2185
|
cor: s,
|
|
2204
|
-
lado:
|
|
2186
|
+
lado: wi(eo(i, o)),
|
|
2205
2187
|
fonte: e
|
|
2206
2188
|
};
|
|
2207
2189
|
}
|
|
@@ -2229,7 +2211,7 @@ class Ha {
|
|
|
2229
2211
|
return;
|
|
2230
2212
|
}
|
|
2231
2213
|
if (!t.camadaMarcas) {
|
|
2232
|
-
const e = U(t.map, t.layerDef.id, "poligono"), o = new
|
|
2214
|
+
const e = U(t.map, t.layerDef.id, "poligono"), o = new Fa(e, () => t.marcas.values());
|
|
2233
2215
|
t.camadaMarcas = o, o.addTo(t.map), o.on("click", (i) => {
|
|
2234
2216
|
var r, c;
|
|
2235
2217
|
const { feicaoHit: n, originalEvent: s } = i;
|
|
@@ -2238,7 +2220,7 @@ class Ha {
|
|
|
2238
2220
|
feicao: n,
|
|
2239
2221
|
aditivo: !!(s && (s.ctrlKey || s.metaKey || s.shiftKey))
|
|
2240
2222
|
});
|
|
2241
|
-
}), t.fonteHit = this.fonteDeMarcas(t, o),
|
|
2223
|
+
}), t.fonteHit = this.fonteDeMarcas(t, o), Vo(t.map, t.layerDef.id, t.fonteHit);
|
|
2242
2224
|
}
|
|
2243
2225
|
t.camadaMarcas.solicitarRedesenho();
|
|
2244
2226
|
}
|
|
@@ -2266,7 +2248,7 @@ class Ha {
|
|
|
2266
2248
|
const u = i.latLngToContainerPoint(g);
|
|
2267
2249
|
return { x: u.x, y: u.y };
|
|
2268
2250
|
}, p = i.getZoom(), m = [];
|
|
2269
|
-
for (let g = 0; g <
|
|
2251
|
+
for (let g = 0; g < Ra && d.length > 0; g++) {
|
|
2270
2252
|
const u = de({ x: n.x, y: n.y }, d, h);
|
|
2271
2253
|
if (!u) break;
|
|
2272
2254
|
d.splice(d.indexOf(u), 1);
|
|
@@ -2284,7 +2266,7 @@ class Ha {
|
|
|
2284
2266
|
};
|
|
2285
2267
|
}
|
|
2286
2268
|
descartarMarcas(t) {
|
|
2287
|
-
t.fonteHit &&
|
|
2269
|
+
t.fonteHit && jo(t.map, t.layerDef.id, t.fonteHit), t.fonteHit = null, t.camadaMarcas && (t.map.removeLayer(t.camadaMarcas), t.camadaMarcas = null), t.marcas.clear();
|
|
2288
2270
|
}
|
|
2289
2271
|
/**
|
|
2290
2272
|
* Cria a camada Leaflet da feição ou remenda a que existe (e só se algo mudou). `'estilo'` só troca o estilo.
|
|
@@ -2339,7 +2321,7 @@ class Ha {
|
|
|
2339
2321
|
return t.agrupador = null, null;
|
|
2340
2322
|
const i = t.agrupador;
|
|
2341
2323
|
if (i && i.zoom === e && t.agrupadorRev === t.revisaoBase) return i;
|
|
2342
|
-
const n = new
|
|
2324
|
+
const n = new zi(e, (s) => t.map.project(y.latLng(s[0], s[1]), e));
|
|
2343
2325
|
for (const s of t.loja.values())
|
|
2344
2326
|
s.geometria.tipo === "Point" && o(s) && n.inserir({ id: s.id, coordenada: s.geometria.coordenada });
|
|
2345
2327
|
return t.agrupador = n, t.agrupadorRev = t.revisaoBase, n;
|
|
@@ -2351,39 +2333,39 @@ class Ha {
|
|
|
2351
2333
|
e.culling = h !== null;
|
|
2352
2334
|
const m = p ? e.indice.consultar(p) : r.keys(), g = new Set(m);
|
|
2353
2335
|
if (c)
|
|
2354
|
-
for (const
|
|
2355
|
-
for (const
|
|
2356
|
-
const L = r.get(
|
|
2357
|
-
L && !this.desenhavel(e, L) && g.delete(
|
|
2336
|
+
for (const S of c) r.has(S) && g.add(S);
|
|
2337
|
+
for (const S of [...g]) {
|
|
2338
|
+
const L = r.get(S);
|
|
2339
|
+
L && !this.desenhavel(e, L) && g.delete(S);
|
|
2358
2340
|
}
|
|
2359
2341
|
const u = /* @__PURE__ */ new Map(), v = l ? this.agrupadorAtivo(e, d) : null;
|
|
2360
2342
|
if (v || (e.agrupador = null), v) {
|
|
2361
2343
|
for (const L of [...g]) v.emCluster(L) && g.delete(L);
|
|
2362
|
-
const
|
|
2344
|
+
const S = /* @__PURE__ */ new Map();
|
|
2363
2345
|
if (c)
|
|
2364
2346
|
for (const L of c) {
|
|
2365
2347
|
const b = v.chaveDoPonto(L), x = b === void 0 || (z = v.celula(b)) == null ? void 0 : z.membros.get(L);
|
|
2366
2348
|
if (b !== void 0 && x) {
|
|
2367
|
-
const P =
|
|
2368
|
-
P ? P.push(x) :
|
|
2349
|
+
const P = S.get(b);
|
|
2350
|
+
P ? P.push(x) : S.set(b, [x]);
|
|
2369
2351
|
}
|
|
2370
2352
|
}
|
|
2371
2353
|
for (const [L, b] of v.celulasAgrupadas()) {
|
|
2372
|
-
const x =
|
|
2354
|
+
const x = S.get(L);
|
|
2373
2355
|
if (x) for (const E of x) g.add(E.id);
|
|
2374
2356
|
const P = b.membros.size, A = P - ((x == null ? void 0 : x.length) ?? 0);
|
|
2375
2357
|
if (A === 1)
|
|
2376
2358
|
for (const E of b.membros.values()) {
|
|
2377
2359
|
if (c != null && c.has(E.id)) continue;
|
|
2378
|
-
const
|
|
2379
|
-
(!p ||
|
|
2360
|
+
const C = e.indice.caixaDe(E.id);
|
|
2361
|
+
(!p || C && _t(C, p)) && g.add(E.id);
|
|
2380
2362
|
break;
|
|
2381
2363
|
}
|
|
2382
2364
|
if (!(h && !h.contains([b.somaLat / P, b.somaLon / P])) && A >= 2) {
|
|
2383
|
-
let E = b.somaLat,
|
|
2365
|
+
let E = b.somaLat, C = b.somaLon;
|
|
2384
2366
|
if (x) for (const k of x)
|
|
2385
|
-
E -= k.coordenada[0],
|
|
2386
|
-
const w = [E / A,
|
|
2367
|
+
E -= k.coordenada[0], C -= k.coordenada[1];
|
|
2368
|
+
const w = [E / A, C / A];
|
|
2387
2369
|
u.set(L, {
|
|
2388
2370
|
coordenada: w,
|
|
2389
2371
|
total: P,
|
|
@@ -2393,18 +2375,18 @@ class Ha {
|
|
|
2393
2375
|
}
|
|
2394
2376
|
}
|
|
2395
2377
|
const M = l ? d : -1;
|
|
2396
|
-
for (const
|
|
2397
|
-
const L = r.get(
|
|
2398
|
-
L && this.colocarFeicao(t, e, L, d, M, !!(c != null && c.has(
|
|
2399
|
-
}
|
|
2400
|
-
for (const
|
|
2401
|
-
g.has(
|
|
2402
|
-
for (const
|
|
2403
|
-
(!g.has(
|
|
2378
|
+
for (const S of g) {
|
|
2379
|
+
const L = r.get(S);
|
|
2380
|
+
L && this.colocarFeicao(t, e, L, d, M, !!(c != null && c.has(S)), o || !!(i != null && i.has(S)));
|
|
2381
|
+
}
|
|
2382
|
+
for (const S of [...e.entradas.keys()])
|
|
2383
|
+
g.has(S) && r.has(S) || this.tirarEntrada(t, e, S);
|
|
2384
|
+
for (const S of [...e.marcas.keys()])
|
|
2385
|
+
(!g.has(S) || !r.has(S)) && e.marcas.delete(S);
|
|
2404
2386
|
this.sincronizarMarcas(e);
|
|
2405
|
-
for (const [
|
|
2406
|
-
for (const
|
|
2407
|
-
u.has(
|
|
2387
|
+
for (const [S, L] of u) this.colocarCluster(t, e, S, L);
|
|
2388
|
+
for (const S of [...e.clusters.keys()])
|
|
2389
|
+
u.has(S) || this.tirarCluster(t, e, S);
|
|
2408
2390
|
}
|
|
2409
2391
|
/**
|
|
2410
2392
|
* Reconcilia só o que o delta tocou (o custo não depende do tamanho da camada). Cai no reconcile completo quando
|
|
@@ -2419,21 +2401,21 @@ class Ha {
|
|
|
2419
2401
|
this.reconciliar(t, e, !1, new Set(o));
|
|
2420
2402
|
return;
|
|
2421
2403
|
}
|
|
2422
|
-
const g = this.selecionadas.get(r), u = (P) => this.desenhavel(e, P), v = h ? s.getBounds().pad(be) : null, M = v ? this.caixaDe(v) : null, z = l ? d : -1,
|
|
2404
|
+
const g = this.selecionadas.get(r), u = (P) => this.desenhavel(e, P), v = h ? s.getBounds().pad(be) : null, M = v ? this.caixaDe(v) : null, z = l ? d : -1, S = (P, A) => {
|
|
2423
2405
|
const E = c.get(P);
|
|
2424
2406
|
if (!E || !u(E)) {
|
|
2425
2407
|
this.tirarEntrada(t, e, P), e.marcas.delete(P);
|
|
2426
2408
|
return;
|
|
2427
2409
|
}
|
|
2428
|
-
const
|
|
2429
|
-
if (!
|
|
2410
|
+
const C = !!(g != null && g.has(P));
|
|
2411
|
+
if (!C && M) {
|
|
2430
2412
|
const w = e.indice.caixaDe(P);
|
|
2431
2413
|
if (!w || !_t(w, M)) {
|
|
2432
2414
|
this.tirarEntrada(t, e, P), e.marcas.delete(P);
|
|
2433
2415
|
return;
|
|
2434
2416
|
}
|
|
2435
2417
|
}
|
|
2436
|
-
this.colocarFeicao(t, e, E, d, z,
|
|
2418
|
+
this.colocarFeicao(t, e, E, d, z, C, A);
|
|
2437
2419
|
}, L = /* @__PURE__ */ new Set(), b = [];
|
|
2438
2420
|
for (const P of i) {
|
|
2439
2421
|
this.tirarEntrada(t, e, P), e.marcas.delete(P);
|
|
@@ -2447,28 +2429,28 @@ class Ha {
|
|
|
2447
2429
|
const E = m == null ? void 0 : m.remover(P);
|
|
2448
2430
|
E !== void 0 && L.add(E), m && A.geometria.tipo === "Point" && u(A) ? L.add(m.inserir({ id: P, coordenada: A.geometria.coordenada })) : b.push(P);
|
|
2449
2431
|
}
|
|
2450
|
-
for (const P of b)
|
|
2432
|
+
for (const P of b) S(P, !0);
|
|
2451
2433
|
if (!m) return;
|
|
2452
2434
|
const x = new Set(o);
|
|
2453
2435
|
for (const P of L) {
|
|
2454
2436
|
const A = m.celula(P);
|
|
2455
2437
|
if (!A || A.membros.size < 2) {
|
|
2456
|
-
if (this.tirarCluster(t, e, P), A) for (const R of A.membros.keys())
|
|
2438
|
+
if (this.tirarCluster(t, e, P), A) for (const R of A.membros.keys()) S(R, x.has(R));
|
|
2457
2439
|
continue;
|
|
2458
2440
|
}
|
|
2459
2441
|
const E = A.membros.size;
|
|
2460
|
-
let
|
|
2442
|
+
let C = A.somaLat, w = A.somaLon, k = 0;
|
|
2461
2443
|
for (const R of A.membros.values())
|
|
2462
|
-
g != null && g.has(R.id) && (k++,
|
|
2444
|
+
g != null && g.has(R.id) && (k++, C -= R.coordenada[0], w -= R.coordenada[1]);
|
|
2463
2445
|
const I = E - k;
|
|
2464
2446
|
for (const R of A.membros.values())
|
|
2465
|
-
g != null && g.has(R.id) || I === 1 ?
|
|
2447
|
+
g != null && g.has(R.id) || I === 1 ? S(R.id, x.has(R.id)) : this.tirarEntrada(t, e, R.id);
|
|
2466
2448
|
const N = [A.somaLat / E, A.somaLon / E];
|
|
2467
2449
|
if (v && !v.contains(N) || I < 2) {
|
|
2468
2450
|
this.tirarCluster(t, e, P);
|
|
2469
2451
|
continue;
|
|
2470
2452
|
}
|
|
2471
|
-
const $ = [
|
|
2453
|
+
const $ = [C / I, w / I];
|
|
2472
2454
|
this.colocarCluster(t, e, P, {
|
|
2473
2455
|
coordenada: $,
|
|
2474
2456
|
total: E,
|
|
@@ -2477,7 +2459,7 @@ class Ha {
|
|
|
2477
2459
|
}
|
|
2478
2460
|
}
|
|
2479
2461
|
criarMarcadorCluster(t, e, o, i) {
|
|
2480
|
-
const n =
|
|
2462
|
+
const n = ai(e, i.layerDef.estilo), s = y.marker(t, {
|
|
2481
2463
|
icon: n,
|
|
2482
2464
|
pane: U(i.map, i.layerDef.id, "ponto"),
|
|
2483
2465
|
keyboard: !1
|
|
@@ -2521,22 +2503,22 @@ class Ha {
|
|
|
2521
2503
|
}
|
|
2522
2504
|
}
|
|
2523
2505
|
this.colocarFeicao(t, o, M, d, h, z, "estilo");
|
|
2524
|
-
const
|
|
2525
|
-
|
|
2506
|
+
const S = z ? o.entradas.get(v) : void 0;
|
|
2507
|
+
S && "bringToFront" in S.layer && S.layer.bringToFront();
|
|
2526
2508
|
}, u = (this.tokenLote.get(t) ?? 0) + 1;
|
|
2527
|
-
if (this.tokenLote.set(t, u), s.length <=
|
|
2509
|
+
if (this.tokenLote.set(t, u), s.length <= Oa)
|
|
2528
2510
|
s.forEach(g);
|
|
2529
2511
|
else {
|
|
2530
2512
|
const v = l ? this.caixaDe(r.getBounds()) : null, M = (b) => {
|
|
2531
2513
|
if (!v) return !0;
|
|
2532
2514
|
const x = o.indice.caixaDe(b);
|
|
2533
2515
|
return !x || _t(x, v);
|
|
2534
|
-
}, z = s.filter(M),
|
|
2516
|
+
}, z = s.filter(M), S = s.filter((b) => !M(b));
|
|
2535
2517
|
z.forEach(g);
|
|
2536
2518
|
const L = () => {
|
|
2537
|
-
this.tokenLote.get(t) !== u || !o.vivo || (
|
|
2519
|
+
this.tokenLote.get(t) !== u || !o.vivo || (S.splice(0, Na).forEach(g), S.length > 0 ? xe(L) : this.sincronizarMarcas(o));
|
|
2538
2520
|
};
|
|
2539
|
-
|
|
2521
|
+
S.length > 0 && xe(L);
|
|
2540
2522
|
}
|
|
2541
2523
|
m ? this.reconciliar(t, o, !1, null) : this.sincronizarMarcas(o);
|
|
2542
2524
|
}
|
|
@@ -2592,7 +2574,7 @@ class Ha {
|
|
|
2592
2574
|
remendar(t, e, o, i, n) {
|
|
2593
2575
|
var c, l;
|
|
2594
2576
|
const s = e.geometria, r = this.estiloVetor(e, o, i, n);
|
|
2595
|
-
(t instanceof
|
|
2577
|
+
(t instanceof Zo || t instanceof Xo) && bt(s) ? (Yo(t, s), t.setStyle(r)) : s.tipo === "Polygon" ? (t.setLatLngs(s.aneis.length === 1 ? s.aneis[0] : s.aneis), t.setStyle(r)) : s.tipo === "LineString" ? (t.setLatLngs(s.partes && s.partes.length > 1 ? it(s) : s.coordenadas), t.setStyle(r)) : s.tipo === "Circle" ? (t.setLatLng(s.centro), t.setRadius(s.raioMetros), t.setStyle(r)) : s.tipo === "Point" && t instanceof y.CircleMarker ? (t.setLatLng(s.coordenada), t.setRadius(io(e, o.estilo)), t.setStyle(r)) : t instanceof y.Marker && (t.setLatLng(s.tipo === "Point" || s.tipo === "Text" ? s.coordenada : t.getLatLng()), t.setIcon(s.tipo === "Text" ? this.iconeTexto(e, o, n) : this.iconeSvg(e, o, n)), s.tipo === "Text" && (i && !e.bloqueada ? (c = t.dragging) == null || c.enable() : (l = t.dragging) == null || l.disable())), this.aplicarRotulo(t, e);
|
|
2596
2578
|
}
|
|
2597
2579
|
/** Só o estilo (seleção): sem `setLatLngs`, que reprojetaria e recalcularia limites da forma. */
|
|
2598
2580
|
restilizar(t, e, o, i, n) {
|
|
@@ -2610,7 +2592,7 @@ class Ha {
|
|
|
2610
2592
|
t.unbindTooltip();
|
|
2611
2593
|
return;
|
|
2612
2594
|
}
|
|
2613
|
-
const i =
|
|
2595
|
+
const i = Ei(e, o.campoRotulo);
|
|
2614
2596
|
if (!i) {
|
|
2615
2597
|
t.unbindTooltip();
|
|
2616
2598
|
return;
|
|
@@ -2641,20 +2623,20 @@ class Ha {
|
|
|
2641
2623
|
});
|
|
2642
2624
|
}
|
|
2643
2625
|
}
|
|
2644
|
-
const
|
|
2645
|
-
function
|
|
2626
|
+
const ja = "rgba(255,255,255,0.9)";
|
|
2627
|
+
function Ha(a) {
|
|
2646
2628
|
if (!a) return [];
|
|
2647
2629
|
const t = a.split(/[\s,]+/).map(Number).filter((e) => Number.isFinite(e) && e >= 0);
|
|
2648
2630
|
return t.length > 0 && t.some((e) => e > 0) ? t.length % 2 === 1 ? [...t, ...t] : t : [];
|
|
2649
2631
|
}
|
|
2650
|
-
const J = (a) => Number.isFinite(a),
|
|
2651
|
-
function
|
|
2632
|
+
const J = (a) => Number.isFinite(a), Ga = /* @__PURE__ */ new Set(["marca", "poligono", "circulo", "linha", "ponto"]);
|
|
2633
|
+
function xo(a) {
|
|
2652
2634
|
let t = 0;
|
|
2653
2635
|
if (a)
|
|
2654
|
-
for (const e of a.itens)
|
|
2636
|
+
for (const e of a.itens) Ga.has(e.forma) && t++;
|
|
2655
2637
|
return t;
|
|
2656
2638
|
}
|
|
2657
|
-
class
|
|
2639
|
+
class ni {
|
|
2658
2640
|
constructor(t) {
|
|
2659
2641
|
f(this, "destaques", /* @__PURE__ */ new Set());
|
|
2660
2642
|
f(this, "destruido", !1);
|
|
@@ -2771,7 +2753,7 @@ class si {
|
|
|
2771
2753
|
for (const [s, r] of this.agrupar(e)) {
|
|
2772
2754
|
const c = n && s.preencher && s.opacidadePreenchimento > 0, l = s.traco && s.peso > 0;
|
|
2773
2755
|
if (!(!c && !l)) {
|
|
2774
|
-
c && (t.fillStyle = s.corPreenchimento), l && (t.strokeStyle = s.cor, t.lineWidth = s.peso, t.setLineDash(
|
|
2756
|
+
c && (t.fillStyle = s.corPreenchimento), l && (t.strokeStyle = s.cor, t.lineWidth = s.peso, t.setLineDash(Ha(s.dash)), t.lineDashOffset = s.deslocamentoDash ?? 0, t.lineCap = s.terminacao ?? "round", t.lineJoin = s.juncao ?? "round"), i.chamadas += 3;
|
|
2775
2757
|
for (const d of r)
|
|
2776
2758
|
t.beginPath(), this.caminho(t, d, o), c && (t.globalAlpha = s.opacidadePreenchimento, t.fill(), i.preenchimentos++, i.chamadas++), l && (t.globalAlpha = s.opacidadeTraco ?? 1, t.stroke(), i.tracos++, i.chamadas++);
|
|
2777
2759
|
}
|
|
@@ -2779,10 +2761,10 @@ class si {
|
|
|
2779
2761
|
}
|
|
2780
2762
|
/** Halo de destaque (hover): traço claro, mais grosso, por baixo do desenho normal. */
|
|
2781
2763
|
halo(t, e, o, i) {
|
|
2782
|
-
t.strokeStyle =
|
|
2764
|
+
t.strokeStyle = ja, t.lineWidth = Math.max(e.estilo.peso, 1) + 4, t.globalAlpha = 0.9, t.setLineDash([]), t.lineCap = "round", t.lineJoin = "round", t.beginPath(), this.caminho(t, e, o), t.stroke(), i.tracos++, i.chamadas += 4;
|
|
2783
2765
|
}
|
|
2784
2766
|
}
|
|
2785
|
-
function
|
|
2767
|
+
function Ua(a, t, e, o) {
|
|
2786
2768
|
const i = [], n = Math.abs(e), s = Math.abs(o);
|
|
2787
2769
|
return n > 0 && i.push({ x: e > 0 ? a - n : 0, y: 0, largura: n, altura: t }), s > 0 && i.push({ x: e > 0 ? 0 : n, y: o > 0 ? t - s : 0, largura: a - n, altura: s }), i;
|
|
2788
2770
|
}
|
|
@@ -2836,7 +2818,7 @@ const re = class re extends y.Canvas {
|
|
|
2836
2818
|
let m = null, g = !1;
|
|
2837
2819
|
if (p && i && i.mundo) {
|
|
2838
2820
|
const u = r.x - i.mundo.x, v = r.y - i.mundo.y;
|
|
2839
|
-
!this.branco && this.itens <= this.limiteRepintar ? g = !0 : Math.abs(u) < d.x && Math.abs(v) < d.y && ((u !== 0 || v !== 0) && !this.branco && (l.save(), l.setTransform(1, 0, 0, 1, 0, 0), l.globalCompositeOperation = "copy", l.drawImage(c, -u * h, -v * h), l.restore()), m =
|
|
2821
|
+
!this.branco && this.itens <= this.limiteRepintar ? g = !0 : Math.abs(u) < d.x && Math.abs(v) < d.y && ((u !== 0 || v !== 0) && !this.branco && (l.save(), l.setTransform(1, 0, 0, 1, 0, 0), l.globalCompositeOperation = "copy", l.drawImage(c, -u * h, -v * h), l.restore()), m = Ua(d.x, d.y, u, v));
|
|
2840
2822
|
}
|
|
2841
2823
|
!m && !g && ((!this.branco || c.width !== h * d.x || c.height !== h * d.y) && (c.width = h * d.x, c.height = h * d.y), this.branco = !0, c.style.width = `${d.x}px`, c.style.height = `${d.y}px`, this.conteudoValido = !1), this.regioesDaVez = m, this.mundoMin = r, l.setTransform(1, 0, 0, 1, 0, 0), this.fire("update");
|
|
2842
2824
|
}
|
|
@@ -2887,20 +2869,20 @@ const re = class re extends y.Canvas {
|
|
|
2887
2869
|
*/
|
|
2888
2870
|
f(re, "limiteRepintar", 500);
|
|
2889
2871
|
let ae = re;
|
|
2890
|
-
const Oe = "cad-formas-sobreposicao",
|
|
2872
|
+
const Oe = "cad-formas-sobreposicao", Wa = "7000", Ft = 8, Za = 8, Xa = 20, Ne = typeof requestAnimationFrame == "function" ? (a) => {
|
|
2891
2873
|
requestAnimationFrame(a);
|
|
2892
2874
|
} : (a) => {
|
|
2893
2875
|
setTimeout(a, 16);
|
|
2894
|
-
},
|
|
2876
|
+
}, Ya = /* @__PURE__ */ new Set(["icone", "texto", "cluster", "rotulo", "curva"]), et = /* @__PURE__ */ new WeakMap();
|
|
2895
2877
|
function rt(a) {
|
|
2896
2878
|
return { caixa: a.caixa, zoom: a.zoom, larguraPx: a.larguraPx, alturaPx: a.alturaPx, dpr: a.dpr, origemPx: a.origemPx };
|
|
2897
2879
|
}
|
|
2898
|
-
const
|
|
2899
|
-
function
|
|
2880
|
+
const Ka = (a) => !!a._loaded;
|
|
2881
|
+
function Ja(a) {
|
|
2900
2882
|
const t = et.get(a);
|
|
2901
2883
|
if (t) return t;
|
|
2902
2884
|
const e = { estados: /* @__PURE__ */ new Set(), quadro: null, agendado: !1, noMapa: !1 };
|
|
2903
|
-
return e.pintor = new
|
|
2885
|
+
return e.pintor = new ni({
|
|
2904
2886
|
camada: () => null,
|
|
2905
2887
|
sobreposicao: () => e.quadro ? { ctx: e.quadro.ctx, largura: e.quadro.larguraPx, altura: e.quadro.alturaPx, dpr: e.quadro.dpr } : null
|
|
2906
2888
|
}), e.canvas = new ae({ pane: Oe, padding: 0.1 }, (o) => {
|
|
@@ -2914,11 +2896,11 @@ function tn(a) {
|
|
|
2914
2896
|
return o.branco && n.length === 0 ? !1 : (e.pintor.desenhar({ vista: i, origem: o.origemPx, camadas: n }, i, { alvo: "sobreposicao" }), n.length > 0);
|
|
2915
2897
|
}), et.set(a, e), e;
|
|
2916
2898
|
}
|
|
2917
|
-
function
|
|
2899
|
+
function Qa(a, t) {
|
|
2918
2900
|
t.noMapa || (t.noMapa = !0, a.whenReady(() => {
|
|
2919
2901
|
if (!a.getPane(Oe)) {
|
|
2920
2902
|
const e = a.createPane(Oe);
|
|
2921
|
-
e.style.zIndex =
|
|
2903
|
+
e.style.zIndex = Wa, e.style.pointerEvents = "none";
|
|
2922
2904
|
}
|
|
2923
2905
|
et.get(a) === t && a.addLayer(t.canvas);
|
|
2924
2906
|
}));
|
|
@@ -2928,27 +2910,27 @@ function Ot(a) {
|
|
|
2928
2910
|
a.agendado = !1, a.noMapa && a.canvas.pintar();
|
|
2929
2911
|
}));
|
|
2930
2912
|
}
|
|
2931
|
-
class
|
|
2913
|
+
class tn {
|
|
2932
2914
|
constructor() {
|
|
2933
2915
|
f(this, "estados", /* @__PURE__ */ new WeakMap());
|
|
2934
2916
|
/** Por definição de camada, para a seleção sobreviver à recriação do grupo (ocultar e exibir a camada). */
|
|
2935
|
-
f(this, "selecionadas",
|
|
2917
|
+
f(this, "selecionadas", ii);
|
|
2936
2918
|
}
|
|
2937
2919
|
// ---------------------------------------------------------------- ILayerRenderer
|
|
2938
2920
|
render(t, e, o) {
|
|
2939
|
-
const i = y.layerGroup(), n = new
|
|
2921
|
+
const i = y.layerGroup(), n = new ki(), s = o.regraVersoes;
|
|
2940
2922
|
s && n.definirRegra((d, h) => s.visivel(d, h)), n.definirCamada(this.defMotor(t)), n.definirFeicoes(t.id, this.feicoesDe(t));
|
|
2941
2923
|
const r = this.selecionadas.get(t);
|
|
2942
2924
|
r && n.selecionar(t.id, r);
|
|
2943
2925
|
const c = { layerDef: t, map: e, context: o, grupo: i, motor: n, interativo: t.interativo && !t.bloqueada, quadro: null, dom: /* @__PURE__ */ new Map(), fonteHit: null, agendado: !1, agendadoDom: !1, vivo: !0, ultima: null };
|
|
2944
|
-
c.pintor = new
|
|
2926
|
+
c.pintor = new ni({
|
|
2945
2927
|
camada: () => c.quadro ? { ctx: c.quadro.ctx, largura: c.quadro.larguraPx, altura: c.quadro.alturaPx, dpr: c.quadro.dpr } : null,
|
|
2946
2928
|
sobreposicao: () => null
|
|
2947
2929
|
}), e.getPane(gt(t.id)) || e.createPane(gt(t.id)), c.base = new ae({ pane: gt(t.id), padding: 0.1, incremental: !0 }, (d) => this.pintarBase(c, d)), this.estados.set(i, c), e.whenReady(() => {
|
|
2948
2930
|
c.vivo && i.addLayer(c.base);
|
|
2949
2931
|
});
|
|
2950
|
-
const l =
|
|
2951
|
-
return l.estados.add(c),
|
|
2932
|
+
const l = Ja(e);
|
|
2933
|
+
return l.estados.add(c), Qa(e, l), this.registrarHit(c), i;
|
|
2952
2934
|
}
|
|
2953
2935
|
update(t, e, o, i, n) {
|
|
2954
2936
|
var r;
|
|
@@ -2971,7 +2953,7 @@ class on {
|
|
|
2971
2953
|
destroy(t, e) {
|
|
2972
2954
|
const o = t, i = this.estados.get(o);
|
|
2973
2955
|
if (i) {
|
|
2974
|
-
i.vivo = !1, i.fonteHit &&
|
|
2956
|
+
i.vivo = !1, i.fonteHit && jo(i.map, i.layerDef.id, i.fonteHit), i.fonteHit = null;
|
|
2975
2957
|
const n = et.get(i.map);
|
|
2976
2958
|
n && (n.estados.delete(i), Ot(n)), i.pintor.destruir(), i.dom.clear();
|
|
2977
2959
|
}
|
|
@@ -3089,7 +3071,7 @@ class on {
|
|
|
3089
3071
|
}
|
|
3090
3072
|
/** A vista de uma faixa exposta no pan incremental (a origem continua sendo a do canvas inteiro). */
|
|
3091
3073
|
vistaDaFaixa(t, e) {
|
|
3092
|
-
const o =
|
|
3074
|
+
const o = Za, [i, n] = ao(t.origemPx.x + e.x - o, t.origemPx.y + e.y - o, t.zoom), [s, r] = ao(t.origemPx.x + e.x + e.largura + o, t.origemPx.y + e.y + e.altura + o, t.zoom);
|
|
3093
3075
|
return {
|
|
3094
3076
|
...rt(t),
|
|
3095
3077
|
larguraPx: e.largura,
|
|
@@ -3110,13 +3092,13 @@ class on {
|
|
|
3110
3092
|
if (e.regioes) {
|
|
3111
3093
|
i = 0;
|
|
3112
3094
|
for (const r of e.regioes) {
|
|
3113
|
-
const c = this.vistaDaFaixa(e, r), l = t.motor.listaDesenho(c, { camadas: [o], parte: "canvas" }), d =
|
|
3095
|
+
const c = this.vistaDaFaixa(e, r), l = t.motor.listaDesenho(c, { camadas: [o], parte: "canvas" }), d = xo(l.camadas[0]);
|
|
3114
3096
|
d !== 0 && (t.pintor.desenhar(l, c, { limpar: !1, recorte: r }), i += d);
|
|
3115
3097
|
}
|
|
3116
3098
|
const s = t.motor.listaDesenho(rt(e), { camadas: [o], parte: "dom" }).camadas[0];
|
|
3117
3099
|
s && this.sincronizarDom(t, s);
|
|
3118
3100
|
} else {
|
|
3119
|
-
const s = rt(e), r = t.motor.listaDesenho(s, { camadas: [o] }), c = r.camadas[0] ?? null, l =
|
|
3101
|
+
const s = rt(e), r = t.motor.listaDesenho(s, { camadas: [o] }), c = r.camadas[0] ?? null, l = xo(c);
|
|
3120
3102
|
c ? l === 0 && e.branco ? i = 0 : (t.pintor.desenhar(r, s), i = l) : i = !e.branco, t.ultima = c, c && this.sincronizarDom(t, c);
|
|
3121
3103
|
}
|
|
3122
3104
|
const n = et.get(t.map);
|
|
@@ -3136,7 +3118,7 @@ class on {
|
|
|
3136
3118
|
sincronizarDom(t, e) {
|
|
3137
3119
|
const o = /* @__PURE__ */ new Set();
|
|
3138
3120
|
for (const i of e.itens) {
|
|
3139
|
-
if (!
|
|
3121
|
+
if (!Ya.has(i.forma)) continue;
|
|
3140
3122
|
const n = `${i.forma}:${i.id}`;
|
|
3141
3123
|
o.add(n);
|
|
3142
3124
|
try {
|
|
@@ -3189,7 +3171,7 @@ class on {
|
|
|
3189
3171
|
const p = o.total ?? 0, m = `${o.id}:${p}:${o.restantes ?? 0}:${o.coordenada[0].toFixed(7)}:${o.coordenada[1].toFixed(7)}`;
|
|
3190
3172
|
if ((c == null ? void 0 : c.assinatura) === m) return;
|
|
3191
3173
|
c && s.removeLayer(c.layer);
|
|
3192
|
-
const g = y.marker(o.coordenada, { icon:
|
|
3174
|
+
const g = y.marker(o.coordenada, { icon: ai(p, l), pane: U(i, n.id, "ponto"), keyboard: !1 });
|
|
3193
3175
|
g.bindTooltip(`${p} feições agrupadas`, { direction: "top" }), g.on("click", () => {
|
|
3194
3176
|
const u = t.motor.membrosDoCluster(n.id, o.id);
|
|
3195
3177
|
u.length > 0 && i.fitBounds(y.latLngBounds(u.map((v) => v.coordenada)), { padding: [60, 60], maxZoom: 18 });
|
|
@@ -3215,7 +3197,7 @@ class on {
|
|
|
3215
3197
|
const p = r.geometria, m = (u) => Fe(ke(r, l, u), t.interativo);
|
|
3216
3198
|
if (c) {
|
|
3217
3199
|
const u = c.layer;
|
|
3218
|
-
c.fonte !== r ? (
|
|
3200
|
+
c.fonte !== r ? (Yo(u, p), u.setStyle(m(o.selecionada)), c.fonte = r, c.selecionada = o.selecionada) : c.selecionada !== o.selecionada && (u.setStyle(m(o.selecionada)), c.selecionada = o.selecionada);
|
|
3219
3201
|
return;
|
|
3220
3202
|
}
|
|
3221
3203
|
const g = Ye(p, { ...m(o.selecionada), pane: U(i, n.id, p.tipo === "Polygon" ? "poligono" : "linha") });
|
|
@@ -3249,7 +3231,7 @@ class on {
|
|
|
3249
3231
|
alvo: t.base,
|
|
3250
3232
|
consultar: (o) => {
|
|
3251
3233
|
const { map: i, layerDef: n, motor: s } = t;
|
|
3252
|
-
if (!t.vivo || !t.interativo || !n.visivel || !
|
|
3234
|
+
if (!t.vivo || !t.interativo || !n.visivel || !Ka(i)) return [];
|
|
3253
3235
|
const r = i.layerPointToContainerPoint(o), c = i.containerPointToLatLng([r.x - Ft, r.y + Ft]), l = i.containerPointToLatLng([r.x + Ft, r.y - Ft]), d = {
|
|
3254
3236
|
minLat: Math.min(c.lat, l.lat),
|
|
3255
3237
|
maxLat: Math.max(c.lat, l.lat),
|
|
@@ -3264,13 +3246,13 @@ class on {
|
|
|
3264
3246
|
const u = i.latLngToContainerPoint(g);
|
|
3265
3247
|
return { x: u.x, y: u.y };
|
|
3266
3248
|
}, m = [];
|
|
3267
|
-
for (let g = 0; g <
|
|
3249
|
+
for (let g = 0; g < Xa && h.length > 0; g++) {
|
|
3268
3250
|
const u = de({ x: r.x, y: r.y }, h, p);
|
|
3269
3251
|
if (!u) break;
|
|
3270
3252
|
h.splice(h.indexOf(u), 1);
|
|
3271
3253
|
const v = s.caixaDe(n.id, u.id), M = v ? (() => {
|
|
3272
|
-
const z = i.latLngToContainerPoint([v.minLat, v.minLon]),
|
|
3273
|
-
return Math.abs(
|
|
3254
|
+
const z = i.latLngToContainerPoint([v.minLat, v.minLon]), S = i.latLngToContainerPoint([v.maxLat, v.maxLon]);
|
|
3255
|
+
return Math.abs(S.x - z.x) * Math.abs(S.y - z.y);
|
|
3274
3256
|
})() : 0;
|
|
3275
3257
|
m.push({
|
|
3276
3258
|
feicao: u,
|
|
@@ -3283,7 +3265,7 @@ class on {
|
|
|
3283
3265
|
return m;
|
|
3284
3266
|
}
|
|
3285
3267
|
};
|
|
3286
|
-
t.fonteHit = e,
|
|
3268
|
+
t.fonteHit = e, Vo(t.map, t.layerDef.id, e), t.base.on("click", (o) => {
|
|
3287
3269
|
var r, c;
|
|
3288
3270
|
const { feicaoHit: i, originalEvent: n } = o;
|
|
3289
3271
|
if (!i || !t.vivo) return;
|
|
@@ -3299,8 +3281,8 @@ class on {
|
|
|
3299
3281
|
function Gt(a) {
|
|
3300
3282
|
return String(a ?? "").trim().toLowerCase() === "canvas" ? "canvas" : "leaflet";
|
|
3301
3283
|
}
|
|
3302
|
-
class
|
|
3303
|
-
constructor(t = new
|
|
3284
|
+
class en {
|
|
3285
|
+
constructor(t = new Va(), e = new tn()) {
|
|
3304
3286
|
f(this, "roteamento", /* @__PURE__ */ new WeakMap());
|
|
3305
3287
|
this.leaflet = t, this.canvas = e;
|
|
3306
3288
|
}
|
|
@@ -3352,14 +3334,14 @@ class an {
|
|
|
3352
3334
|
this.de(t).aplicarSelecao(t, e);
|
|
3353
3335
|
}
|
|
3354
3336
|
}
|
|
3355
|
-
O.register("tile", new
|
|
3356
|
-
O.register("wms", new
|
|
3357
|
-
O.register("vetorial-linhas", new
|
|
3358
|
-
O.register("vetorial-pontos", new
|
|
3359
|
-
O.register("vetorial-poligonos", new
|
|
3360
|
-
O.register("grid", new
|
|
3361
|
-
O.register("feicoes", new
|
|
3362
|
-
const
|
|
3337
|
+
O.register("tile", new sa());
|
|
3338
|
+
O.register("wms", new ra());
|
|
3339
|
+
O.register("vetorial-linhas", new ca());
|
|
3340
|
+
O.register("vetorial-pontos", new da());
|
|
3341
|
+
O.register("vetorial-poligonos", new ha());
|
|
3342
|
+
O.register("grid", new ua());
|
|
3343
|
+
O.register("feicoes", new en());
|
|
3344
|
+
const Po = [
|
|
3363
3345
|
{
|
|
3364
3346
|
id: "satelite",
|
|
3365
3347
|
nome: "Satélite Google Híbrido",
|
|
@@ -3483,8 +3465,8 @@ const Lo = [
|
|
|
3483
3465
|
scaleMode: "screen"
|
|
3484
3466
|
}
|
|
3485
3467
|
}
|
|
3486
|
-
],
|
|
3487
|
-
class
|
|
3468
|
+
], on = /* @__PURE__ */ new Set(["tile", "wms", "grid"]);
|
|
3469
|
+
class an {
|
|
3488
3470
|
constructor(t) {
|
|
3489
3471
|
f(this, "layers", []);
|
|
3490
3472
|
f(this, "layerInstances", /* @__PURE__ */ new Map());
|
|
@@ -3495,7 +3477,7 @@ class sn {
|
|
|
3495
3477
|
// cada um mudava o contexto e recriava todas as camadas. Agora as mudanças de contexto do mesmo tick
|
|
3496
3478
|
// viram um único render (em microtask), antecipado por qualquer leitura/alteração das instâncias.
|
|
3497
3479
|
f(this, "renderPendente", !1);
|
|
3498
|
-
this.layers = (t ||
|
|
3480
|
+
this.layers = (t || Po).map((e) => ({ ...e, estilo: { ...e.estilo } }));
|
|
3499
3481
|
}
|
|
3500
3482
|
/**
|
|
3501
3483
|
* Remove as camadas que o kit traz de fábrica (satélite, SIGEF, homologados, perímetro, vizinhos, vértices, grade).
|
|
@@ -3503,7 +3485,7 @@ class sn {
|
|
|
3503
3485
|
*/
|
|
3504
3486
|
descartarCamadasPadrao() {
|
|
3505
3487
|
if (this.map) return;
|
|
3506
|
-
const t = new Set(
|
|
3488
|
+
const t = new Set(Po.map((e) => e.id));
|
|
3507
3489
|
this.layers = this.layers.filter((e) => !t.has(e.id) || e.tipo === "feicoes");
|
|
3508
3490
|
}
|
|
3509
3491
|
attachMap(t, e) {
|
|
@@ -3518,7 +3500,7 @@ class sn {
|
|
|
3518
3500
|
}
|
|
3519
3501
|
renderAllLayers(t = !1) {
|
|
3520
3502
|
this.renderPendente = !1, !(!this.map || !this.context) && (this.layers.forEach((e) => {
|
|
3521
|
-
if (!(t &&
|
|
3503
|
+
if (!(t && on.has(e.tipo) && e.visivel && this.layerInstances.has(e.id))) {
|
|
3522
3504
|
if (this.layerInstances.has(e.id)) {
|
|
3523
3505
|
const o = this.layerInstances.get(e.id), i = O.get(e.tipo);
|
|
3524
3506
|
i && i.destroy(o, this.map), this.layerInstances.delete(e.id);
|
|
@@ -3738,7 +3720,7 @@ class sn {
|
|
|
3738
3720
|
}), this.layerInstances.clear()), this.listeners = [];
|
|
3739
3721
|
}
|
|
3740
3722
|
}
|
|
3741
|
-
function
|
|
3723
|
+
function si(a, t) {
|
|
3742
3724
|
var s, r;
|
|
3743
3725
|
if (t == null) return null;
|
|
3744
3726
|
const e = String(t).trim(), o = (c) => c ? (c.lon = c.lng, c) : null, n = a.getMarkers().find((c) => {
|
|
@@ -3841,12 +3823,12 @@ function ri(a, t) {
|
|
|
3841
3823
|
}
|
|
3842
3824
|
return null;
|
|
3843
3825
|
}
|
|
3844
|
-
function
|
|
3826
|
+
function nn(a, t, e, o) {
|
|
3845
3827
|
var m, g;
|
|
3846
3828
|
Re(t, a.getMap());
|
|
3847
3829
|
const i = a.getMap();
|
|
3848
3830
|
if (!i) return;
|
|
3849
|
-
const n =
|
|
3831
|
+
const n = si(a, e);
|
|
3850
3832
|
if (!n) {
|
|
3851
3833
|
console.warn(`[ui-canvas-cad] Elemento com identificador "${e}" não encontrado para destaque.`);
|
|
3852
3834
|
return;
|
|
@@ -3882,7 +3864,7 @@ function rn(a, t, e, o) {
|
|
|
3882
3864
|
function Re(a, t) {
|
|
3883
3865
|
a.destaqueTimeoutId !== null && (window.clearTimeout(a.destaqueTimeoutId), a.destaqueTimeoutId = null), a.destaqueMarker && (t && t.hasLayer(a.destaqueMarker) ? t.removeLayer(a.destaqueMarker) : typeof a.destaqueMarker.remove == "function" && a.destaqueMarker.remove(), a.destaqueMarker = null);
|
|
3884
3866
|
}
|
|
3885
|
-
function
|
|
3867
|
+
function sn(a, t) {
|
|
3886
3868
|
const e = /* @__PURE__ */ new Map();
|
|
3887
3869
|
a.forEach((i) => {
|
|
3888
3870
|
const n = i.lat ?? i.latitude ?? i.y, s = i.lon ?? i.lng ?? i.longitude ?? i.x, r = V(n, s);
|
|
@@ -3908,7 +3890,7 @@ function cn(a, t) {
|
|
|
3908
3890
|
});
|
|
3909
3891
|
}), Array.from(o.values()).filter((i) => i.pontos && i.pontos.length > 0 || !!i.poligono_wkt);
|
|
3910
3892
|
}
|
|
3911
|
-
function
|
|
3893
|
+
function rn(a, t) {
|
|
3912
3894
|
const e = /* @__PURE__ */ new Map();
|
|
3913
3895
|
return t.forEach((o) => {
|
|
3914
3896
|
o.id !== void 0 && o.id !== null && o.pontos && o.pontos.length > 0 && e.set(o.id, o.pontos);
|
|
@@ -3917,7 +3899,7 @@ function ln(a, t) {
|
|
|
3917
3899
|
return i !== void 0 && (!o.pontos || o.pontos.length === 0) && e.has(i) ? { ...o, pontos: e.get(i) } : { ...o };
|
|
3918
3900
|
});
|
|
3919
3901
|
}
|
|
3920
|
-
function
|
|
3902
|
+
function cn(a, t, e = !1) {
|
|
3921
3903
|
let o = [...a];
|
|
3922
3904
|
e && t && t.forEach((n) => {
|
|
3923
3905
|
n.pontos && o.push(...n.pontos);
|
|
@@ -3928,7 +3910,7 @@ function dn(a, t, e = !1) {
|
|
|
3928
3910
|
}).filter((n) => n !== null);
|
|
3929
3911
|
return i.length === 1 ? { single: i[0] } : i.length > 1 ? { bounds: y.latLngBounds(i) } : null;
|
|
3930
3912
|
}
|
|
3931
|
-
function
|
|
3913
|
+
function ln(a, t) {
|
|
3932
3914
|
var n;
|
|
3933
3915
|
(n = t == null ? void 0 : t.flushRender) == null || n.call(t);
|
|
3934
3916
|
const e = [], o = /* @__PURE__ */ new Set(), i = (s) => {
|
|
@@ -3940,14 +3922,14 @@ function hn(a, t) {
|
|
|
3940
3922
|
i(s), typeof s.eachLayer == "function" && s.eachLayer(i);
|
|
3941
3923
|
}), e;
|
|
3942
3924
|
}
|
|
3943
|
-
function
|
|
3925
|
+
function dn(a, t, e = "vertices", o) {
|
|
3944
3926
|
const i = t || [];
|
|
3945
3927
|
a.layerManager.getOrCreateLayer(e, "vetorial-pontos", "Pontos / Vértices"), e === "vertices" && (a.context.pontos = i, a.canvasInteracao.ctx.pontosList = i, o && (a.customMarkerClickCallback = (n) => {
|
|
3946
3928
|
const s = i.find((r) => String(r.id) === String(n)) || { id: n, lat: 0, lon: 0 };
|
|
3947
3929
|
o(s);
|
|
3948
3930
|
})), a.layerManager.setLayerData(e, { pontos: i, onClique: o }), a.layerManager.setLayerVisibility(e, !0);
|
|
3949
3931
|
}
|
|
3950
|
-
function
|
|
3932
|
+
function hn(a, t, e = "linhas") {
|
|
3951
3933
|
const o = t || [];
|
|
3952
3934
|
a.layerManager.getOrCreateLayer(e, "vetorial-linhas", "Conexões / Linhas"), (e === "linhas" || e === "perimetro") && (a.context.segmentos = o.map((i) => ({
|
|
3953
3935
|
ponto_inicio_id: Number(i.origemId) || 0,
|
|
@@ -3955,7 +3937,7 @@ function pn(a, t, e = "linhas") {
|
|
|
3955
3937
|
tipo_limite_sigef: i.tipoLinha === "tracejada" ? "LN1" : "LA1"
|
|
3956
3938
|
}))), a.layerManager.setLayerData(e, { conexoes: o }), a.layerManager.setLayerVisibility(e, !0);
|
|
3957
3939
|
}
|
|
3958
|
-
function
|
|
3940
|
+
function un(a, t, e = !0, o = "polilinha", i) {
|
|
3959
3941
|
const n = t || [];
|
|
3960
3942
|
a.layerManager.getOrCreateLayer(o, "vetorial-linhas", "Polilinhas"), (o === "polilinha" || o === "perimetro") && (a.context.pontos = n, a.context.segmentos = [], a.canvasInteracao.ctx.pontosList = n);
|
|
3961
3943
|
const s = i || a.chaveGrupo || a.context.chaveGrupo;
|
|
@@ -3966,11 +3948,11 @@ function fn(a, t, e = !0, o = "polilinha", i) {
|
|
|
3966
3948
|
chaveGrupo: s
|
|
3967
3949
|
}), a.layerManager.setLayerVisibility(o, !0);
|
|
3968
3950
|
}
|
|
3969
|
-
function
|
|
3951
|
+
function pn(a, t, e = "poligonos") {
|
|
3970
3952
|
const o = t || [];
|
|
3971
3953
|
a.layerManager.getOrCreateLayer(e, "vetorial-poligonos", "Polígonos"), a.layerManager.setLayerData(e, { poligonos: o }), a.layerManager.setLayerVisibility(e, !0);
|
|
3972
3954
|
}
|
|
3973
|
-
function
|
|
3955
|
+
function fn(a, t, e) {
|
|
3974
3956
|
const o = t || [];
|
|
3975
3957
|
if (e != null) {
|
|
3976
3958
|
const i = e || [];
|
|
@@ -3981,7 +3963,7 @@ function gn(a, t, e) {
|
|
|
3981
3963
|
...e != null ? { pontos: a.context.pontos } : {}
|
|
3982
3964
|
});
|
|
3983
3965
|
}
|
|
3984
|
-
function
|
|
3966
|
+
function mn(a, t = !1) {
|
|
3985
3967
|
a.context.pontos = [], a.context.segmentos = [], a.context.confrontantes = [], a.canvasInteracao.ctx.pontosList = [], a.canvasInteracao.limparSelecao();
|
|
3986
3968
|
const e = {
|
|
3987
3969
|
pontos: [],
|
|
@@ -3990,21 +3972,21 @@ function vn(a, t = !1) {
|
|
|
3990
3972
|
};
|
|
3991
3973
|
t || (a.context.bancoPontos = [], e.bancoPontos = []), a.layerManager.updateContext(e);
|
|
3992
3974
|
}
|
|
3993
|
-
function
|
|
3975
|
+
function Lo(a) {
|
|
3994
3976
|
return a != null && !isNaN(Number(a)) && String(a).trim() !== "" ? Number(a) : a;
|
|
3995
3977
|
}
|
|
3996
|
-
function
|
|
3978
|
+
function gn(a, t) {
|
|
3997
3979
|
var r, c;
|
|
3998
3980
|
const e = a.core.map, o = a.layerManager.getLayerDef(t.layerId), i = t.baseSize || 8, n = ((r = a.context.graphicScale) == null ? void 0 : r.markerScaleMultiplier) || 1;
|
|
3999
3981
|
if (e && ((c = o == null ? void 0 : o.estilo) == null ? void 0 : c.scaleMode) === "world") {
|
|
4000
3982
|
const l = o.estilo.dimensaoMetros || 0.25, d = e.getCenter(), h = e.getZoom(), p = 40075016686e-3 * Math.abs(Math.cos(d.lat * Math.PI / 180)) / Math.pow(2, h + 8), m = l / (p > 0 ? p : 1);
|
|
4001
3983
|
return Math.max(3, Math.round(m * n));
|
|
4002
3984
|
}
|
|
4003
|
-
const s =
|
|
3985
|
+
const s = Uo(t.densTotal || 0, (e == null ? void 0 : e.getZoom()) ?? 18);
|
|
4004
3986
|
return Math.max(s < 1 ? 5 : 4, Math.round(i * n * s));
|
|
4005
3987
|
}
|
|
4006
|
-
function
|
|
4007
|
-
const n =
|
|
3988
|
+
function vn(a, t, e, o, i) {
|
|
3989
|
+
const n = gn(a, e), s = a.context.config.enableAnimations ? "cad-pt-anim" : "", r = oe(
|
|
4008
3990
|
e.shapeStyle,
|
|
4009
3991
|
n,
|
|
4010
3992
|
e.markerBg,
|
|
@@ -4019,7 +4001,7 @@ function bn(a, t, e, o, i) {
|
|
|
4019
4001
|
iconSize: [n + 6, n + 6]
|
|
4020
4002
|
}));
|
|
4021
4003
|
}
|
|
4022
|
-
function
|
|
4004
|
+
function yn(a) {
|
|
4023
4005
|
const t = a.context.selectedPontoIds || [], e = a.canvasInteracao.ctx.selectedVizinhoPontoIds || [], o = /* @__PURE__ */ new Set([
|
|
4024
4006
|
...t.map(String),
|
|
4025
4007
|
...e.map(String)
|
|
@@ -4029,12 +4011,12 @@ function xn(a) {
|
|
|
4029
4011
|
if (s == null) continue;
|
|
4030
4012
|
const r = o.has(String(s));
|
|
4031
4013
|
if (n.isSelected === r) continue;
|
|
4032
|
-
n.isSelected = r, i.setZIndexOffset(r ? 2e3 : 0), n.shapeStyle && n.baseSize && n.markerBg &&
|
|
4014
|
+
n.isSelected = r, i.setZIndexOffset(r ? 2e3 : 0), n.shapeStyle && n.baseSize && n.markerBg && vn(a, i, n, s, r);
|
|
4033
4015
|
const c = i.getElement();
|
|
4034
4016
|
c && (r ? c.classList.add("cad-marker-selected", "ponto-selecionado") : c.classList.remove("cad-marker-selected", "ponto-selecionado"));
|
|
4035
4017
|
}
|
|
4036
4018
|
}
|
|
4037
|
-
class
|
|
4019
|
+
class bn {
|
|
4038
4020
|
constructor(t) {
|
|
4039
4021
|
f(this, "core");
|
|
4040
4022
|
f(this, "layerManager");
|
|
@@ -4050,7 +4032,7 @@ class Pn {
|
|
|
4050
4032
|
destaqueMarker: null,
|
|
4051
4033
|
destaqueTimeoutId: null
|
|
4052
4034
|
});
|
|
4053
|
-
this.core = new
|
|
4035
|
+
this.core = new Wi(this), this.layerManager = new an(t), this.canvasInteracao = new na({
|
|
4054
4036
|
mapaController: this,
|
|
4055
4037
|
layerManager: this.layerManager
|
|
4056
4038
|
}), this.context = {
|
|
@@ -4067,7 +4049,7 @@ class Pn {
|
|
|
4067
4049
|
},
|
|
4068
4050
|
onMarkerClick: (e, o) => {
|
|
4069
4051
|
if (this.modoCliqueSequencialAtivo || this.context.modoSequencial) return;
|
|
4070
|
-
const i =
|
|
4052
|
+
const i = Lo(e);
|
|
4071
4053
|
if (this.customMarkerClickCallback)
|
|
4072
4054
|
try {
|
|
4073
4055
|
this.customMarkerClickCallback(i, o);
|
|
@@ -4115,16 +4097,16 @@ class Pn {
|
|
|
4115
4097
|
this.context.confrontantes = e, this.layerManager.updateContext({ confrontantes: e });
|
|
4116
4098
|
}
|
|
4117
4099
|
plotarPontos(t, e = "vertices", o) {
|
|
4118
|
-
|
|
4100
|
+
dn(this, t, e, o);
|
|
4119
4101
|
}
|
|
4120
4102
|
plotarConexoes(t, e = "linhas") {
|
|
4121
|
-
|
|
4103
|
+
hn(this, t, e);
|
|
4122
4104
|
}
|
|
4123
4105
|
plotarPolilinhaSequencial(t, e = !0, o = "polilinha", i) {
|
|
4124
|
-
|
|
4106
|
+
un(this, t, e, o, i);
|
|
4125
4107
|
}
|
|
4126
4108
|
plotarPoligonos(t, e = "poligonos") {
|
|
4127
|
-
|
|
4109
|
+
pn(this, t, e);
|
|
4128
4110
|
}
|
|
4129
4111
|
limparCamadas(t) {
|
|
4130
4112
|
this.layerManager.clearLayers(t), (!t || t.length === 0) && this.canvasInteracao.limparSelecao();
|
|
@@ -4146,7 +4128,7 @@ class Pn {
|
|
|
4146
4128
|
e && (this.customMarkerClickCallback = e), this.setPontos(t || []);
|
|
4147
4129
|
}
|
|
4148
4130
|
plotSegmentos(t, e) {
|
|
4149
|
-
|
|
4131
|
+
fn(this, t, e);
|
|
4150
4132
|
}
|
|
4151
4133
|
plotPolilinhaTemporaria(t) {
|
|
4152
4134
|
const e = t || [];
|
|
@@ -4157,15 +4139,15 @@ class Pn {
|
|
|
4157
4139
|
this.setBancoPontos(e), this.layerManager.setLayerVisibility("homologados", !0), this.layerManager.setLayerVisibility("homologados-pontos", !0);
|
|
4158
4140
|
}
|
|
4159
4141
|
plotPontosVizinhos(t) {
|
|
4160
|
-
const e =
|
|
4142
|
+
const e = sn(t || [], this.context.confrontantes || []);
|
|
4161
4143
|
this.setConfrontantes(e), this.layerManager.setLayerVisibility("vizinhos", !0);
|
|
4162
4144
|
}
|
|
4163
4145
|
plotPoligonosVizinhos(t) {
|
|
4164
|
-
const e =
|
|
4146
|
+
const e = rn(t || [], this.context.confrontantes || []);
|
|
4165
4147
|
this.setConfrontantes(e), this.layerManager.setLayerVisibility("vizinhos", !0);
|
|
4166
4148
|
}
|
|
4167
4149
|
clearOverlays(t = !1) {
|
|
4168
|
-
|
|
4150
|
+
mn(this, t);
|
|
4169
4151
|
}
|
|
4170
4152
|
setGraphicScale(t) {
|
|
4171
4153
|
this.layerManager.setGraphicScale(t);
|
|
@@ -4183,11 +4165,11 @@ class Pn {
|
|
|
4183
4165
|
const s = this.core.map;
|
|
4184
4166
|
s.setView(i.getLatLng(), e), Xe(s, () => i.openPopup());
|
|
4185
4167
|
}
|
|
4186
|
-
const n =
|
|
4168
|
+
const n = Lo(t);
|
|
4187
4169
|
this.canvasInteracao.ctx.selectedPontoIds = [n], this.canvasInteracao.ctx.lastSelectedPontoId = n, this.context.selectedPontoIds = [n], this.atualizarDestaqueMarcadores();
|
|
4188
4170
|
}
|
|
4189
4171
|
atualizarDestaqueMarcadores() {
|
|
4190
|
-
|
|
4172
|
+
yn(this);
|
|
4191
4173
|
}
|
|
4192
4174
|
selectSegmento(t) {
|
|
4193
4175
|
const e = t != null ? String(t) : null;
|
|
@@ -4195,7 +4177,7 @@ class Pn {
|
|
|
4195
4177
|
}
|
|
4196
4178
|
fitBounds(t, e = [40, 40], o = !1) {
|
|
4197
4179
|
if (!this.core.map) return;
|
|
4198
|
-
const i =
|
|
4180
|
+
const i = cn(t || this.context.pontos || [], this.context.confrontantes, o);
|
|
4199
4181
|
if (i) {
|
|
4200
4182
|
i.single ? this.core.map.setView(i.single, 18) : i.bounds && (this.core.map.fitBounds(i.bounds, { padding: e }), this.core.map.once("moveend", () => {
|
|
4201
4183
|
this.core.preCarregarTilesRegiao(i.bounds);
|
|
@@ -4207,7 +4189,7 @@ class Pn {
|
|
|
4207
4189
|
}
|
|
4208
4190
|
}
|
|
4209
4191
|
getMarkers() {
|
|
4210
|
-
return
|
|
4192
|
+
return ln(this.core.map, this.layerManager);
|
|
4211
4193
|
}
|
|
4212
4194
|
getVizinhosMarkers() {
|
|
4213
4195
|
return this.getMarkers().filter((t) => !!t.isVizinho);
|
|
@@ -4216,10 +4198,10 @@ class Pn {
|
|
|
4216
4198
|
return this.destaqueState.destaqueMarker !== null;
|
|
4217
4199
|
}
|
|
4218
4200
|
localizarCoordenadasElemento(t) {
|
|
4219
|
-
return
|
|
4201
|
+
return si(this, t);
|
|
4220
4202
|
}
|
|
4221
4203
|
destacarElemento(t, e) {
|
|
4222
|
-
|
|
4204
|
+
nn(this, this.destaqueState, t, e);
|
|
4223
4205
|
}
|
|
4224
4206
|
limparDestaque() {
|
|
4225
4207
|
Re(this.destaqueState, this.getMap());
|
|
@@ -4237,7 +4219,7 @@ class Pn {
|
|
|
4237
4219
|
return this.core.map;
|
|
4238
4220
|
}
|
|
4239
4221
|
}
|
|
4240
|
-
function
|
|
4222
|
+
function xn(a, t, e, o) {
|
|
4241
4223
|
if (!a) return;
|
|
4242
4224
|
if (a.querySelectorAll(".layer-item").length === t.length) {
|
|
4243
4225
|
t.forEach((n) => {
|
|
@@ -4317,21 +4299,21 @@ function Ln(a, t, e, o) {
|
|
|
4317
4299
|
});
|
|
4318
4300
|
});
|
|
4319
4301
|
}
|
|
4320
|
-
function
|
|
4302
|
+
function Pn(a) {
|
|
4321
4303
|
return a.context.selectedPontoIds || a.canvasInteracao.ctx.selectedPontoIds || [];
|
|
4322
4304
|
}
|
|
4323
|
-
function
|
|
4305
|
+
function ri(a, t) {
|
|
4324
4306
|
a.canvasInteracao.ctx.selectedPontoIds = [...t], a.context.selectedPontoIds = [...t];
|
|
4325
4307
|
}
|
|
4326
4308
|
function Ke(a) {
|
|
4327
4309
|
const t = a;
|
|
4328
4310
|
return (t == null ? void 0 : t.originalEvent) || t || {};
|
|
4329
4311
|
}
|
|
4330
|
-
function
|
|
4312
|
+
function Ln(a) {
|
|
4331
4313
|
const t = a, e = Ke(a), o = typeof e.composedPath == "function" ? e.composedPath() : [];
|
|
4332
4314
|
return o.length > 0 ? o[0] : e.target || (t == null ? void 0 : t.target) || null;
|
|
4333
4315
|
}
|
|
4334
|
-
function
|
|
4316
|
+
function Sn(a, t, e) {
|
|
4335
4317
|
var n, s, r, c;
|
|
4336
4318
|
if (t) return { x: Math.round(t.x), y: Math.round(t.y) };
|
|
4337
4319
|
const o = a;
|
|
@@ -4346,21 +4328,21 @@ function Mn(a, t, e) {
|
|
|
4346
4328
|
y: Math.round((i.clientY ?? 0) - e.top)
|
|
4347
4329
|
};
|
|
4348
4330
|
}
|
|
4349
|
-
function
|
|
4331
|
+
function Cn(a, t) {
|
|
4350
4332
|
const e = t || (a == null ? void 0 : a.latlng);
|
|
4351
4333
|
return e && typeof e.lat == "number" ? { lat: e.lat, lng: e.lng ?? e.lon ?? 0 } : null;
|
|
4352
4334
|
}
|
|
4353
|
-
function
|
|
4335
|
+
function Mn(a, t, e, o) {
|
|
4354
4336
|
var g, u;
|
|
4355
4337
|
if (a.modoSequencial || a.controller.canvasInteracao.selectionHappened || a.controller.canvasInteracao.panHappened || a.mouseMovedSinceDown) return !1;
|
|
4356
|
-
const i = Ke(t), n =
|
|
4338
|
+
const i = Ke(t), n = Ln(t);
|
|
4357
4339
|
if (n) {
|
|
4358
4340
|
const v = '.custom-leaflet-marker, .leaflet-marker-icon, .leaflet-interactive, .compact-popup, .leaflet-popup, .ui-popup-btn, .cad-btn-tool, .qgis-layer-panel, [class*="leaflet-marker"], [class*="leaflet-popup"]';
|
|
4359
4341
|
if (((g = n.matches) == null ? void 0 : g.call(n, v)) || ((u = n.closest) == null ? void 0 : u.call(n, v))) return !1;
|
|
4360
4342
|
}
|
|
4361
4343
|
const s = a.controller.getMap();
|
|
4362
4344
|
if (!s || !a.mapContainer) return !1;
|
|
4363
|
-
const r =
|
|
4345
|
+
const r = Sn(t, o, a.mapContainer.getBoundingClientRect()), l = Cn(t, e) ?? s.containerPointToLatLng(y.point(r.x, r.y)), d = l.lat, h = l.lng, p = a.controller.layerManager ? a.controller.layerManager.getLayers().filter((v) => v.visivel).map((v) => v.id) : [], m = i;
|
|
4364
4346
|
return a.host.dispatchEvent(new CustomEvent("ui-canvas-clique", {
|
|
4365
4347
|
detail: {
|
|
4366
4348
|
coordenadas: {
|
|
@@ -4378,7 +4360,7 @@ function wn(a, t, e, o) {
|
|
|
4378
4360
|
composed: !0
|
|
4379
4361
|
})), !0;
|
|
4380
4362
|
}
|
|
4381
|
-
function
|
|
4363
|
+
function An(a, t, e, o) {
|
|
4382
4364
|
const i = o || a.obterElementoPorId(e);
|
|
4383
4365
|
a.host.dispatchEvent(new CustomEvent("ui-acao-popup", {
|
|
4384
4366
|
detail: {
|
|
@@ -4390,7 +4372,7 @@ function zn(a, t, e, o) {
|
|
|
4390
4372
|
composed: !0
|
|
4391
4373
|
})), a.fecharPopup();
|
|
4392
4374
|
}
|
|
4393
|
-
function
|
|
4375
|
+
function wn(a, t, e, o, i, n, s) {
|
|
4394
4376
|
let r = o || a.obterElementoPorId(t), c = i;
|
|
4395
4377
|
if (!c && r) {
|
|
4396
4378
|
const l = r, d = l.lat ?? l.latitude ?? 0, h = l.lon ?? l.lng ?? l.longitude ?? 0;
|
|
@@ -4431,12 +4413,12 @@ function En(a, t, e, o, i, n, s) {
|
|
|
4431
4413
|
composed: !0
|
|
4432
4414
|
}));
|
|
4433
4415
|
}
|
|
4434
|
-
function
|
|
4416
|
+
function zn(a, t, e, o, i) {
|
|
4435
4417
|
if (a.modoSequencial) {
|
|
4436
4418
|
a.fecharPopup();
|
|
4437
4419
|
return;
|
|
4438
4420
|
}
|
|
4439
|
-
if (a.controller.canvasInteracao.ctx.selectedPontoIds = [], a.controller.canvasInteracao.ctx.selectedVizinhoPontoIds = [], a.controller.canvasInteracao.ctx.lastSelectedPontoId = null,
|
|
4421
|
+
if (a.controller.canvasInteracao.ctx.selectedPontoIds = [], a.controller.canvasInteracao.ctx.selectedVizinhoPontoIds = [], a.controller.canvasInteracao.ctx.lastSelectedPontoId = null, ri(a.controller, []), a.controller.atualizarDestaqueMarcadores(), a.controller.selectSegmento(t), i)
|
|
4440
4422
|
try {
|
|
4441
4423
|
i(t, e);
|
|
4442
4424
|
} catch (n) {
|
|
@@ -4463,7 +4445,7 @@ function kn(a, t, e, o, i) {
|
|
|
4463
4445
|
composed: !0
|
|
4464
4446
|
}));
|
|
4465
4447
|
}
|
|
4466
|
-
function
|
|
4448
|
+
function En(a, t) {
|
|
4467
4449
|
let e = null, o = null, i = 0, n = 0;
|
|
4468
4450
|
function s() {
|
|
4469
4451
|
var d;
|
|
@@ -4499,7 +4481,7 @@ function In(a, t) {
|
|
|
4499
4481
|
invalidateSizeSafely: s
|
|
4500
4482
|
};
|
|
4501
4483
|
}
|
|
4502
|
-
class
|
|
4484
|
+
class kn {
|
|
4503
4485
|
constructor(t) {
|
|
4504
4486
|
f(this, "canal", null);
|
|
4505
4487
|
f(this, "contexto");
|
|
@@ -4560,7 +4542,7 @@ class Tn {
|
|
|
4560
4542
|
}
|
|
4561
4543
|
}
|
|
4562
4544
|
}
|
|
4563
|
-
class
|
|
4545
|
+
class In {
|
|
4564
4546
|
constructor(t) {
|
|
4565
4547
|
f(this, "contexto");
|
|
4566
4548
|
f(this, "uiListeners", new Qt());
|
|
@@ -4623,7 +4605,7 @@ class _n {
|
|
|
4623
4605
|
this.uiListeners.cleanup();
|
|
4624
4606
|
}
|
|
4625
4607
|
}
|
|
4626
|
-
class
|
|
4608
|
+
class Tn {
|
|
4627
4609
|
constructor(t) {
|
|
4628
4610
|
f(this, "contexto");
|
|
4629
4611
|
f(this, "_pontos", []);
|
|
@@ -4723,12 +4705,12 @@ class Dn {
|
|
|
4723
4705
|
return this.contexto.obterController().getVizinhosMarkers();
|
|
4724
4706
|
}
|
|
4725
4707
|
}
|
|
4726
|
-
const qn = ':host{display:block;width:100%;height:520px;position:relative;border-radius:var(--ui-raio-lg, 10px);overflow:hidden;box-shadow:0 10px 30px -5px #0009;border:1px solid rgba(255,255,255,.1);background:#080d0a;color:#fff;font-family:var(--ui-fonte-base, "Inter", sans-serif);user-select:none;-webkit-user-select:none}*,*:before,*:after{box-sizing:border-box}.cad-root{position:relative;width:100%;height:100%;display:flex;overflow:hidden}.cad-map-container{width:100%;height:100%;background:#080d0a;z-index:1}.qgis-layer-panel{position:absolute;top:12px;left:12px;z-index:var(--ui-z-workspace-hud, 500);width:290px;max-height:calc(100% - 24px);background:#0a120eeb;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.15);border-radius:8px;box-shadow:0 20px 40px #000000b3;display:flex;flex-direction:column;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .25s ease;overflow:hidden}.qgis-layer-panel.collapsed{transform:translate(-310px);opacity:0;pointer-events:none}.layer-panel-header{padding:10px 14px;background:#ffffff08;border-bottom:1px solid rgba(255,255,255,.08);display:flex;align-items:center;justify-content:space-between}.layer-panel-title{font-size:12px;font-weight:700;letter-spacing:.5px;color:#00f5a0;display:flex;align-items:center;gap:6px;text-transform:uppercase}.layer-panel-close{background:transparent;border:none;color:#ffffff80;cursor:pointer;padding:2px;border-radius:var(--ui-raio-sm, 4px);display:flex;align-items:center;justify-content:center;transition:all .15s}.layer-panel-close:hover{color:#fff;background:#ffffff1a}.layer-panel-body{padding:8px 10px;overflow-y:auto;display:flex;flex-direction:column;gap:2px;max-height:400px}.layer-panel-body::-webkit-scrollbar{width:5px}.layer-panel-body::-webkit-scrollbar-track{background:transparent}.layer-panel-body::-webkit-scrollbar-thumb{background:#fff3;border-radius:var(--ui-raio-sm, 4px)}.layer-panel-body::-webkit-scrollbar-thumb:hover{background:#00f5a066}.layer-item{background:transparent;border:none;border-bottom:1px solid rgba(255,255,255,.08);border-radius:0;padding:4px;display:flex;flex-direction:column;gap:3px;transition:background .15s ease}.layer-item:last-child{border-bottom:none}.layer-item:hover{background:#ffffff08;border-radius:var(--ui-raio-sm, 4px)}.layer-item-row{display:flex;align-items:center;justify-content:space-between;min-height:18px}.layer-item-label{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:600;line-height:1.2;color:#ffffffe6;cursor:pointer;-webkit-user-select:none;user-select:none}.layer-chk-visibility{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:14px;height:14px;border:1px solid rgba(255,255,255,.4);border-radius:3px;background:#0006;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;position:relative;transition:all .15s ease;flex-shrink:0;margin:0}.layer-chk-visibility:hover{border-color:#00f5a0}.layer-chk-visibility:checked{background:#00f5a0;border-color:#00f5a0}.layer-chk-visibility:checked:after{content:"";width:3.5px;height:7px;border:solid #04150c;border-width:0 1.5px 1.5px 0;transform:rotate(45deg) translateY(-.5px);display:block}.layer-item-actions{display:flex;align-items:center;gap:4px}.btn-layer-action{background:transparent;border:none;color:#fff6;cursor:pointer;padding:2px;border-radius:3px;display:flex;align-items:center;justify-content:center;transition:all .15s}.btn-layer-action:hover{color:#00f5a0;background:#ffffff14}.btn-layer-action.active{color:#f43f5e;background:#f43f5e26}.layer-controls-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:9.5px;line-height:1;color:#ffffff80;padding-left:21px}.layer-opacity-slider{flex:1;height:3px;margin:0;border-radius:2px;background:#ffffff26;accent-color:#00f5a0;cursor:pointer}.scale-mode-pill{font-size:8.5px;font-weight:600;padding:1px 6px;border-radius:6px;background:#ffffff0f;color:#ffffffb3;cursor:pointer;border:1px solid rgba(255,255,255,.1);transition:all .15s;line-height:1.2}.scale-mode-pill:hover{border-color:#00f5a0;color:#00f5a0;background:#00f5a01a}:host([sem-painel-camadas]) .qgis-layer-panel,:host([sem-painel-camadas]) #btn-toggle-layers,:host([sem-barra-rapida]) .cad-quick-toolbar{display:none!important}.cad-quick-toolbar{position:absolute;top:12px;right:12px;z-index:var(--ui-z-workspace-hud, 500);display:flex;flex-direction:column;gap:6px;background:#0c1510eb;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.15);border-radius:8px;padding:5px;box-shadow:0 10px 25px -5px #0009}.cad-btn-tool{background:transparent;border:none;color:#fff9;cursor:pointer;padding:7px;border-radius:5px;display:flex;align-items:center;justify-content:center;transition:all .15s}.cad-btn-tool:hover{background:#ffffff1a;color:#fff}.cad-btn-tool.active{background:#00f5a026;color:#00f5a0;border:1px solid rgba(0,245,160,.3)}.cad-selection-box{pointer-events:none;box-sizing:border-box}.custom-leaflet-marker{cursor:pointer}.custom-leaflet-marker:hover{z-index:1800!important}.custom-leaflet-marker .cad-pt svg{transition:transform .12s ease-out}.custom-leaflet-marker:hover .cad-pt svg{transform:scale(1.3)}.leaflet-popup-content-wrapper{background:#0f1712!important;color:#f8fafc!important;border:1px solid rgba(255,255,255,.15)!important;border-radius:8px!important;box-shadow:0 10px 25px #0009!important;padding:0!important;backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important}.leaflet-popup-tip{background:#0f1712!important;border:1px solid rgba(255,255,255,.15)!important;box-shadow:none!important}.leaflet-popup-close-button{color:#fff9!important;padding:6px!important;transition:color .15s ease}.leaflet-popup-close-button:hover{color:#fff!important}.leaflet-popup-content{margin:12px 14px!important;line-height:1.4;font-family:inherit;color:#f8fafc}.compact-popup .leaflet-popup-content{margin:10px 12px!important}.ui-popup-actions-footer{display:flex;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1);justify-content:flex-end;align-items:center;flex-wrap:wrap}.ui-popup-btn{display:inline-flex;align-items:center;justify-content:center;font-family:inherit;font-size:11px;font-weight:500;padding:4px 9px;border-radius:var(--ui-raio-borda, 6px);cursor:pointer;transition:all .15s ease;border:1px solid transparent;outline:none;line-height:1.25;-webkit-user-select:none;user-select:none}.ui-popup-btn-primary{background:var(--ui-cor-primaria, #00f5a0);color:#080d0a;font-weight:600;border-color:var(--ui-cor-primaria, #00f5a0)}.ui-popup-btn-primary:hover{filter:brightness(1.1);box-shadow:0 0 10px #00f5a059}.ui-popup-btn-secondary{background:#ffffff14;color:#fff;border-color:#ffffff2e}.ui-popup-btn-secondary:hover{background:#ffffff29;border-color:#ffffff4d}.ui-popup-btn-destrutivo{background:#ef444426;color:#f87171;border-color:#ef444459}.ui-popup-btn-destrutivo:hover{background:#ef444440;border-color:#ef444499;color:#fff}@media (max-width: 520px){.qgis-layer-panel{top:8px;left:8px;right:8px;width:auto;max-height:calc(100% - 16px)}.qgis-layer-panel.collapsed{transform:translateY(-115%)}.layer-panel-close{min-width:36px;min-height:36px;font-size:16px}.layer-action-btn{min-width:32px;min-height:32px}}.cad-destaque-marker-container{pointer-events:none!important;background:transparent!important;border:none!important;overflow:visible!important}.cad-destaque-marker-container *{pointer-events:none!important}.cad-pulse-highlight{position:relative;width:52px;height:52px;display:flex;align-items:center;justify-content:center;pointer-events:none!important;user-select:none;-webkit-user-select:none}.cad-pulse-core{position:absolute;width:12px;height:12px;border-radius:50%;background-color:var(--cad-pulse-cor, #00f5a0);border:2px solid #ffffff;box-sizing:border-box;pointer-events:none!important}.cad-pulse-ring{position:absolute;width:100%;height:100%;border-radius:50%;border:2px solid var(--cad-pulse-cor, #00f5a0);background-color:color-mix(in srgb,var(--cad-pulse-cor, #00f5a0) 14%,transparent);box-sizing:border-box;pointer-events:none!important;opacity:0;animation:cad-pulse-ping 1.8s cubic-bezier(0,0,.2,1) infinite}.cad-pulse-ring.ring-2{animation-delay:.9s}@keyframes cad-pulse-ping{0%{transform:scale(.3);opacity:.9}70%{opacity:.35}to{transform:scale(1);opacity:0}}@media (prefers-reduced-motion: reduce){.cad-pulse-ring{animation:none;opacity:.6;transform:scale(.6)}}.cad-marker-selected,.ponto-selecionado{z-index:2000!important}@media (prefers-reduced-motion: reduce){.custom-leaflet-marker .cad-pt svg{transition:none}}.ui-popup-actions-footer{margin-top:8px;padding-top:6px;border-top:1px solid rgba(255,255,255,.12);display:flex;gap:6px;flex-wrap:wrap}.ui-popup-btn{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;font-size:11px;font-weight:600;border-radius:var(--ui-raio-sm, 4px);border:1px solid rgba(255,255,255,.15);background:#ffffff14;color:#fff;cursor:pointer;line-height:1.2;transition:all .15s ease;-webkit-user-select:none;user-select:none}.ui-popup-btn:hover{background:#ffffff2e;border-color:#ffffff4d}.ui-popup-btn-primary{background:#00f5a0;color:#06130b;border-color:#00f5a0}.ui-popup-btn-primary:hover{background:#10ffad;box-shadow:0 0 8px #00f5a066}.ui-popup-btn-danger{background:#f43f5e33;color:#f43f5e;border-color:#f43f5e66}.ui-popup-btn-danger:hover{background:#f43f5e59;color:#fff}.cad-draw-toolbar{right:auto;left:12px;max-height:calc(100% - 24px);overflow-y:auto}.cad-draw-btn{font:600 11px var(--ui-fonte-base, sans-serif);padding:5px 9px;white-space:nowrap;justify-content:flex-start}.cad-ferramenta-ativa .leaflet-marker-icon{pointer-events:none!important}.cad-aviso{position:absolute;top:12px;left:50%;transform:translate(-50%);z-index:calc(var(--ui-z-workspace-hud, 500) + 1);box-sizing:border-box;max-width:min(calc(100% - 200px),460px);padding:8px 14px;border-radius:var(--ui-raio-borda, 6px);border:1px solid var(--ui-cor-aviso, #f59e0b);background:#0c1510f2;color:var(--ui-cor-texto, #ffffff);font:600 12px var(--ui-fonte-base, sans-serif);line-height:1.35;box-shadow:0 10px 25px -5px #0009;pointer-events:none}.cad-aviso[hidden]{display:none}.cad-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}';
|
|
4727
|
-
function
|
|
4708
|
+
const _n = ':host{display:block;width:100%;height:520px;position:relative;border-radius:var(--ui-raio-lg, 10px);overflow:hidden;box-shadow:0 10px 30px -5px #0009;border:1px solid rgba(255,255,255,.1);background:#080d0a;color:#fff;font-family:var(--ui-fonte-base, "Inter", sans-serif);user-select:none;-webkit-user-select:none}*,*:before,*:after{box-sizing:border-box}.cad-root{position:relative;width:100%;height:100%;display:flex;overflow:hidden}.cad-map-container{width:100%;height:100%;background:#080d0a;z-index:1}.qgis-layer-panel{position:absolute;top:12px;left:12px;z-index:var(--ui-z-workspace-hud, 500);width:290px;max-height:calc(100% - 24px);background:#0a120eeb;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.15);border-radius:8px;box-shadow:0 20px 40px #000000b3;display:flex;flex-direction:column;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .25s ease;overflow:hidden}.qgis-layer-panel.collapsed{transform:translate(-310px);opacity:0;pointer-events:none}.layer-panel-header{padding:10px 14px;background:#ffffff08;border-bottom:1px solid rgba(255,255,255,.08);display:flex;align-items:center;justify-content:space-between}.layer-panel-title{font-size:12px;font-weight:700;letter-spacing:.5px;color:#00f5a0;display:flex;align-items:center;gap:6px;text-transform:uppercase}.layer-panel-close{background:transparent;border:none;color:#ffffff80;cursor:pointer;padding:2px;border-radius:var(--ui-raio-sm, 4px);display:flex;align-items:center;justify-content:center;transition:all .15s}.layer-panel-close:hover{color:#fff;background:#ffffff1a}.layer-panel-body{padding:8px 10px;overflow-y:auto;display:flex;flex-direction:column;gap:2px;max-height:400px}.layer-panel-body::-webkit-scrollbar{width:5px}.layer-panel-body::-webkit-scrollbar-track{background:transparent}.layer-panel-body::-webkit-scrollbar-thumb{background:#fff3;border-radius:var(--ui-raio-sm, 4px)}.layer-panel-body::-webkit-scrollbar-thumb:hover{background:#00f5a066}.layer-item{background:transparent;border:none;border-bottom:1px solid rgba(255,255,255,.08);border-radius:0;padding:4px;display:flex;flex-direction:column;gap:3px;transition:background .15s ease}.layer-item:last-child{border-bottom:none}.layer-item:hover{background:#ffffff08;border-radius:var(--ui-raio-sm, 4px)}.layer-item-row{display:flex;align-items:center;justify-content:space-between;min-height:18px}.layer-item-label{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:600;line-height:1.2;color:#ffffffe6;cursor:pointer;-webkit-user-select:none;user-select:none}.layer-chk-visibility{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:14px;height:14px;border:1px solid rgba(255,255,255,.4);border-radius:3px;background:#0006;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;position:relative;transition:all .15s ease;flex-shrink:0;margin:0}.layer-chk-visibility:hover{border-color:#00f5a0}.layer-chk-visibility:checked{background:#00f5a0;border-color:#00f5a0}.layer-chk-visibility:checked:after{content:"";width:3.5px;height:7px;border:solid #04150c;border-width:0 1.5px 1.5px 0;transform:rotate(45deg) translateY(-.5px);display:block}.layer-item-actions{display:flex;align-items:center;gap:4px}.btn-layer-action{background:transparent;border:none;color:#fff6;cursor:pointer;padding:2px;border-radius:3px;display:flex;align-items:center;justify-content:center;transition:all .15s}.btn-layer-action:hover{color:#00f5a0;background:#ffffff14}.btn-layer-action.active{color:#f43f5e;background:#f43f5e26}.layer-controls-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:9.5px;line-height:1;color:#ffffff80;padding-left:21px}.layer-opacity-slider{flex:1;height:3px;margin:0;border-radius:2px;background:#ffffff26;accent-color:#00f5a0;cursor:pointer}.scale-mode-pill{font-size:8.5px;font-weight:600;padding:1px 6px;border-radius:6px;background:#ffffff0f;color:#ffffffb3;cursor:pointer;border:1px solid rgba(255,255,255,.1);transition:all .15s;line-height:1.2}.scale-mode-pill:hover{border-color:#00f5a0;color:#00f5a0;background:#00f5a01a}:host([sem-painel-camadas]) .qgis-layer-panel,:host([sem-painel-camadas]) #btn-toggle-layers,:host([sem-barra-rapida]) .cad-quick-toolbar{display:none!important}.cad-quick-toolbar{position:absolute;top:12px;right:12px;z-index:var(--ui-z-workspace-hud, 500);display:flex;flex-direction:column;gap:6px;background:#0c1510eb;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.15);border-radius:8px;padding:5px;box-shadow:0 10px 25px -5px #0009}.cad-btn-tool{background:transparent;border:none;color:#fff9;cursor:pointer;padding:7px;border-radius:5px;display:flex;align-items:center;justify-content:center;transition:all .15s}.cad-btn-tool:hover{background:#ffffff1a;color:#fff}.cad-btn-tool.active{background:#00f5a026;color:#00f5a0;border:1px solid rgba(0,245,160,.3)}.cad-selection-box{pointer-events:none;box-sizing:border-box}.custom-leaflet-marker{cursor:pointer}.custom-leaflet-marker:hover{z-index:1800!important}.custom-leaflet-marker .cad-pt svg{transition:transform .12s ease-out}.custom-leaflet-marker:hover .cad-pt svg{transform:scale(1.3)}.leaflet-popup-content-wrapper{background:#0f1712!important;color:#f8fafc!important;border:1px solid rgba(255,255,255,.15)!important;border-radius:8px!important;box-shadow:0 10px 25px #0009!important;padding:0!important;backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important}.leaflet-popup-tip{background:#0f1712!important;border:1px solid rgba(255,255,255,.15)!important;box-shadow:none!important}.leaflet-popup-close-button{color:#fff9!important;padding:6px!important;transition:color .15s ease}.leaflet-popup-close-button:hover{color:#fff!important}.leaflet-popup-content{margin:12px 14px!important;line-height:1.4;font-family:inherit;color:#f8fafc}.compact-popup .leaflet-popup-content{margin:10px 12px!important}.ui-popup-actions-footer{display:flex;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1);justify-content:flex-end;align-items:center;flex-wrap:wrap}.ui-popup-btn{display:inline-flex;align-items:center;justify-content:center;font-family:inherit;font-size:11px;font-weight:500;padding:4px 9px;border-radius:var(--ui-raio-borda, 6px);cursor:pointer;transition:all .15s ease;border:1px solid transparent;outline:none;line-height:1.25;-webkit-user-select:none;user-select:none}.ui-popup-btn-primary{background:var(--ui-cor-primaria, #00f5a0);color:#080d0a;font-weight:600;border-color:var(--ui-cor-primaria, #00f5a0)}.ui-popup-btn-primary:hover{filter:brightness(1.1);box-shadow:0 0 10px #00f5a059}.ui-popup-btn-secondary{background:#ffffff14;color:#fff;border-color:#ffffff2e}.ui-popup-btn-secondary:hover{background:#ffffff29;border-color:#ffffff4d}.ui-popup-btn-destrutivo{background:#ef444426;color:#f87171;border-color:#ef444459}.ui-popup-btn-destrutivo:hover{background:#ef444440;border-color:#ef444499;color:#fff}@media (max-width: 520px){.qgis-layer-panel{top:8px;left:8px;right:8px;width:auto;max-height:calc(100% - 16px)}.qgis-layer-panel.collapsed{transform:translateY(-115%)}.layer-panel-close{min-width:36px;min-height:36px;font-size:16px}.layer-action-btn{min-width:32px;min-height:32px}}.cad-destaque-marker-container{pointer-events:none!important;background:transparent!important;border:none!important;overflow:visible!important}.cad-destaque-marker-container *{pointer-events:none!important}.cad-pulse-highlight{position:relative;width:52px;height:52px;display:flex;align-items:center;justify-content:center;pointer-events:none!important;user-select:none;-webkit-user-select:none}.cad-pulse-core{position:absolute;width:12px;height:12px;border-radius:50%;background-color:var(--cad-pulse-cor, #00f5a0);border:2px solid #ffffff;box-sizing:border-box;pointer-events:none!important}.cad-pulse-ring{position:absolute;width:100%;height:100%;border-radius:50%;border:2px solid var(--cad-pulse-cor, #00f5a0);background-color:color-mix(in srgb,var(--cad-pulse-cor, #00f5a0) 14%,transparent);box-sizing:border-box;pointer-events:none!important;opacity:0;animation:cad-pulse-ping 1.8s cubic-bezier(0,0,.2,1) infinite}.cad-pulse-ring.ring-2{animation-delay:.9s}@keyframes cad-pulse-ping{0%{transform:scale(.3);opacity:.9}70%{opacity:.35}to{transform:scale(1);opacity:0}}@media (prefers-reduced-motion: reduce){.cad-pulse-ring{animation:none;opacity:.6;transform:scale(.6)}}.cad-marker-selected,.ponto-selecionado{z-index:2000!important}@media (prefers-reduced-motion: reduce){.custom-leaflet-marker .cad-pt svg{transition:none}}.ui-popup-actions-footer{margin-top:8px;padding-top:6px;border-top:1px solid rgba(255,255,255,.12);display:flex;gap:6px;flex-wrap:wrap}.ui-popup-btn{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;font-size:11px;font-weight:600;border-radius:var(--ui-raio-sm, 4px);border:1px solid rgba(255,255,255,.15);background:#ffffff14;color:#fff;cursor:pointer;line-height:1.2;transition:all .15s ease;-webkit-user-select:none;user-select:none}.ui-popup-btn:hover{background:#ffffff2e;border-color:#ffffff4d}.ui-popup-btn-primary{background:#00f5a0;color:#06130b;border-color:#00f5a0}.ui-popup-btn-primary:hover{background:#10ffad;box-shadow:0 0 8px #00f5a066}.ui-popup-btn-danger{background:#f43f5e33;color:#f43f5e;border-color:#f43f5e66}.ui-popup-btn-danger:hover{background:#f43f5e59;color:#fff}.cad-draw-toolbar{right:auto;left:12px;max-height:calc(100% - 24px);overflow-y:auto}.cad-draw-btn{font:600 11px var(--ui-fonte-base, sans-serif);padding:5px 9px;white-space:nowrap;justify-content:flex-start}.cad-ferramenta-ativa .leaflet-marker-icon{pointer-events:none!important}.cad-aviso{position:absolute;top:12px;left:50%;transform:translate(-50%);z-index:calc(var(--ui-z-workspace-hud, 500) + 1);box-sizing:border-box;max-width:min(calc(100% - 200px),460px);padding:8px 14px;border-radius:var(--ui-raio-borda, 6px);border:1px solid var(--ui-cor-aviso, #f59e0b);background:#0c1510f2;color:var(--ui-cor-texto, #ffffff);font:600 12px var(--ui-fonte-base, sans-serif);line-height:1.35;box-shadow:0 10px 25px -5px #0009;pointer-events:none}.cad-aviso[hidden]{display:none}.cad-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}';
|
|
4709
|
+
function Dn() {
|
|
4728
4710
|
return `
|
|
4729
4711
|
<style>
|
|
4730
|
-
${
|
|
4731
|
-
${
|
|
4712
|
+
${yi}
|
|
4713
|
+
${_n}
|
|
4732
4714
|
</style>
|
|
4733
4715
|
<div class="cad-root" id="cad-root" role="region" aria-label="Mapa CAD">
|
|
4734
4716
|
<div class="cad-map-container" id="cad-map-container"></div>
|
|
@@ -4763,7 +4745,7 @@ function $n() {
|
|
|
4763
4745
|
</div>
|
|
4764
4746
|
`;
|
|
4765
4747
|
}
|
|
4766
|
-
function
|
|
4748
|
+
function qn(a, t, e, o) {
|
|
4767
4749
|
if (e !== o) {
|
|
4768
4750
|
if (t === "sat-opacity") {
|
|
4769
4751
|
const i = parseFloat(o);
|
|
@@ -4791,7 +4773,7 @@ function Fn(a, t, e, o) {
|
|
|
4791
4773
|
}
|
|
4792
4774
|
}
|
|
4793
4775
|
}
|
|
4794
|
-
function
|
|
4776
|
+
function ci(a) {
|
|
4795
4777
|
const t = a;
|
|
4796
4778
|
if (!t || !t._leaflet_id) return !1;
|
|
4797
4779
|
try {
|
|
@@ -4801,9 +4783,9 @@ function li(a) {
|
|
|
4801
4783
|
}
|
|
4802
4784
|
return !0;
|
|
4803
4785
|
}
|
|
4804
|
-
function
|
|
4786
|
+
function $n(a) {
|
|
4805
4787
|
if (!a.mapContainer) return;
|
|
4806
|
-
if (a.controller.getMap() ||
|
|
4788
|
+
if (a.controller.getMap() || ci(a.mapContainer), a.controller.init(a.mapContainer, a.shadow), a.toolbarPainel.vincularEventos(), a.renderLayersUI(), a.host.hasAttribute("modo-sequencial") && (a.controller.modoCliqueSequencialAtivo = !0, a.controller.context.modoSequencial = !0), a.host.hasAttribute("chave-grupo")) {
|
|
4807
4789
|
const o = a.host.getAttribute("chave-grupo");
|
|
4808
4790
|
o && (a.host.chaveGrupo = o);
|
|
4809
4791
|
}
|
|
@@ -4824,7 +4806,7 @@ function On(a) {
|
|
|
4824
4806
|
});
|
|
4825
4807
|
const t = a.controller.context.onMarkerClick;
|
|
4826
4808
|
a.controller.context.onMarkerClick = (o, i, n, s) => {
|
|
4827
|
-
|
|
4809
|
+
wn(
|
|
4828
4810
|
a.obterContextoEventos(),
|
|
4829
4811
|
o,
|
|
4830
4812
|
i,
|
|
@@ -4834,7 +4816,7 @@ function On(a) {
|
|
|
4834
4816
|
a.colecoesDados.customMarkerClickHandler
|
|
4835
4817
|
);
|
|
4836
4818
|
}, a.controller.context.onSegmentoClick = (o, i, n) => {
|
|
4837
|
-
|
|
4819
|
+
zn(
|
|
4838
4820
|
a.obterContextoEventos(),
|
|
4839
4821
|
o,
|
|
4840
4822
|
i,
|
|
@@ -4850,12 +4832,12 @@ function On(a) {
|
|
|
4850
4832
|
a.invalidateSizeSafely();
|
|
4851
4833
|
}, 150);
|
|
4852
4834
|
}
|
|
4853
|
-
const
|
|
4835
|
+
const Fn = {
|
|
4854
4836
|
"sem-camada": "Escolha uma camada de desenho antes de usar esta ferramenta.",
|
|
4855
4837
|
"camada-invalida": "A camada de desenho não é uma camada de feições.",
|
|
4856
4838
|
"camada-bloqueada": "A camada de desenho está bloqueada.",
|
|
4857
4839
|
"geometria-invalida": "Não foi possível criar a figura: a geometria é inválida."
|
|
4858
|
-
},
|
|
4840
|
+
}, On = {
|
|
4859
4841
|
bloqueada: "Esta feição (ou a camada dela) está bloqueada e não pode ser editada.",
|
|
4860
4842
|
"poligono-com-furos": "Polígono com furos não pode ser editado no mapa.",
|
|
4861
4843
|
multiparte: "Feição com várias partes não pode ser editada no mapa.",
|
|
@@ -4864,16 +4846,16 @@ const Nn = {
|
|
|
4864
4846
|
inexistente: "A feição não existe mais.",
|
|
4865
4847
|
"sem-selecao": "Selecione uma feição para editar os vértices."
|
|
4866
4848
|
};
|
|
4867
|
-
function
|
|
4849
|
+
function li(a, t, e) {
|
|
4868
4850
|
return typeof t == "string" && Object.prototype.hasOwnProperty.call(a, t) ? a[t] : e;
|
|
4869
4851
|
}
|
|
4870
|
-
function
|
|
4871
|
-
return
|
|
4852
|
+
function Nn(a) {
|
|
4853
|
+
return li(Fn, a, "Não foi possível ativar a ferramenta de desenho.");
|
|
4872
4854
|
}
|
|
4873
|
-
function
|
|
4874
|
-
return
|
|
4855
|
+
function Rn(a) {
|
|
4856
|
+
return li(On, a, "Não foi possível editar os vértices desta feição.");
|
|
4875
4857
|
}
|
|
4876
|
-
function
|
|
4858
|
+
function Bn(a) {
|
|
4877
4859
|
a.querySelectorAll(".cad-quick-toolbar .cad-btn-tool, .layer-panel-close").forEach((t) => {
|
|
4878
4860
|
const e = t.getAttribute("title");
|
|
4879
4861
|
e && !t.hasAttribute("aria-label") && t.setAttribute("aria-label", e);
|
|
@@ -4883,38 +4865,38 @@ function So(a, t) {
|
|
|
4883
4865
|
const e = a.getElementById("btn-toggle-snap");
|
|
4884
4866
|
e == null || e.classList.toggle("active", t), e == null || e.setAttribute("aria-pressed", String(t));
|
|
4885
4867
|
}
|
|
4886
|
-
function
|
|
4868
|
+
function Vn(a) {
|
|
4887
4869
|
return a <= 0 ? "Nenhuma feição selecionada" : a === 1 ? "1 feição selecionada" : `${a} feições selecionadas`;
|
|
4888
4870
|
}
|
|
4889
|
-
function
|
|
4871
|
+
function jn(a) {
|
|
4890
4872
|
return a ? `Ferramenta ${a} ativa` : "Ferramenta desativada";
|
|
4891
4873
|
}
|
|
4892
4874
|
function Pe(a, t) {
|
|
4893
4875
|
const e = a.getElementById("cad-status");
|
|
4894
4876
|
e && e.textContent !== t && (e.textContent = t);
|
|
4895
4877
|
}
|
|
4896
|
-
const
|
|
4897
|
-
function
|
|
4878
|
+
const Hn = 5e3;
|
|
4879
|
+
function Gn(a, t, e) {
|
|
4898
4880
|
const o = a.getElementById("cad-aviso");
|
|
4899
4881
|
return o ? (e !== void 0 && window.clearTimeout(e), o.textContent = t, o.hidden = !1, window.setTimeout(() => {
|
|
4900
4882
|
o.hidden = !0, o.textContent = "";
|
|
4901
|
-
},
|
|
4883
|
+
}, Hn)) : e;
|
|
4902
4884
|
}
|
|
4903
|
-
function
|
|
4885
|
+
function Un(a, t) {
|
|
4904
4886
|
let e;
|
|
4905
4887
|
const o = (c) => (l) => {
|
|
4906
4888
|
var h;
|
|
4907
4889
|
if (a.hasAttribute("sem-avisos")) return;
|
|
4908
4890
|
const d = c((h = l.detail) == null ? void 0 : h.motivo);
|
|
4909
|
-
Pe(t, d), e =
|
|
4910
|
-
}, i = o(
|
|
4891
|
+
Pe(t, d), e = Gn(t, d, e);
|
|
4892
|
+
}, i = o(Nn), n = o(Rn), s = (c) => {
|
|
4911
4893
|
var d;
|
|
4912
4894
|
const l = (d = c.detail) == null ? void 0 : d.feicoes;
|
|
4913
|
-
Pe(t,
|
|
4895
|
+
Pe(t, Vn(Array.isArray(l) ? l.length : 0));
|
|
4914
4896
|
}, r = (c) => {
|
|
4915
4897
|
var d;
|
|
4916
4898
|
const l = ((d = c.detail) == null ? void 0 : d.ferramenta) ?? null;
|
|
4917
|
-
Pe(t,
|
|
4899
|
+
Pe(t, jn(l));
|
|
4918
4900
|
};
|
|
4919
4901
|
return a.addEventListener("cad-selecao", s), a.addEventListener("cad-ferramenta", r), a.addEventListener("cad-desenho-recusado", i), a.addEventListener("cad-edicao-recusada", n), () => {
|
|
4920
4902
|
a.removeEventListener("cad-selecao", s), a.removeEventListener("cad-ferramenta", r), a.removeEventListener("cad-desenho-recusado", i), a.removeEventListener("cad-edicao-recusada", n), e !== void 0 && window.clearTimeout(e), e = void 0;
|
|
@@ -4934,23 +4916,23 @@ function Z(a, t) {
|
|
|
4934
4916
|
const i = V(e, o, t);
|
|
4935
4917
|
return !i || !Number.isFinite(i.lat) || !Number.isFinite(i.lon) ? null : [i.lat, i.lon];
|
|
4936
4918
|
}
|
|
4937
|
-
function
|
|
4919
|
+
function Wn(a, t) {
|
|
4938
4920
|
return a[0] === t[0] && a[1] === t[1];
|
|
4939
4921
|
}
|
|
4940
|
-
function
|
|
4922
|
+
function di(a, t) {
|
|
4941
4923
|
const e = a.map((o) => Z(o, t)).filter((o) => o !== null);
|
|
4942
|
-
return e.length > 1 &&
|
|
4924
|
+
return e.length > 1 && Wn(e[0], e[e.length - 1]) && e.pop(), e.length >= 3 ? e : null;
|
|
4943
4925
|
}
|
|
4944
|
-
function
|
|
4926
|
+
function Co(a, t) {
|
|
4945
4927
|
const e = a.map((o) => Z(o, t)).filter((o) => o !== null);
|
|
4946
4928
|
return e.length >= 2 ? e : null;
|
|
4947
4929
|
}
|
|
4948
|
-
function
|
|
4930
|
+
function Zn(a, t) {
|
|
4949
4931
|
if (!Array.isArray(a) || a.length === 0) return null;
|
|
4950
|
-
const o = (Array.isArray(a[0]) && Array.isArray(a[0][0]) ? a : [a]).map((i) =>
|
|
4932
|
+
const o = (Array.isArray(a[0]) && Array.isArray(a[0][0]) ? a : [a]).map((i) => di(i, t));
|
|
4951
4933
|
return o.some((i) => i === null) ? null : o;
|
|
4952
4934
|
}
|
|
4953
|
-
function
|
|
4935
|
+
function zr(a, t) {
|
|
4954
4936
|
const e = V(a.lat, a.lon);
|
|
4955
4937
|
return e ? {
|
|
4956
4938
|
id: String(a.id),
|
|
@@ -4959,7 +4941,7 @@ function Er(a, t) {
|
|
|
4959
4941
|
propriedades: { ...a }
|
|
4960
4942
|
} : null;
|
|
4961
4943
|
}
|
|
4962
|
-
function
|
|
4944
|
+
function Er(a, t, e) {
|
|
4963
4945
|
const o = t.get(String(a.ponto_inicio_id)), i = t.get(String(a.ponto_fim_id));
|
|
4964
4946
|
if (!o || !i) return null;
|
|
4965
4947
|
const n = V(o.lat, o.lon), s = V(i.lat, i.lon);
|
|
@@ -4973,14 +4955,14 @@ function kr(a, t, e) {
|
|
|
4973
4955
|
propriedades: { ...a }
|
|
4974
4956
|
};
|
|
4975
4957
|
}
|
|
4976
|
-
function
|
|
4958
|
+
function kr(a, t) {
|
|
4977
4959
|
if (!a.poligono_wkt) return null;
|
|
4978
4960
|
const e = /POLYGON\s*\(\s*\(\s*(.*?)\s*\)\s*\)/i.exec(a.poligono_wkt);
|
|
4979
4961
|
if (!e) return null;
|
|
4980
4962
|
const o = e[1].split(",").map((n) => {
|
|
4981
4963
|
const [s, r] = n.trim().split(/\s+/);
|
|
4982
4964
|
return [r, s];
|
|
4983
|
-
}), i =
|
|
4965
|
+
}), i = di(o);
|
|
4984
4966
|
return i ? {
|
|
4985
4967
|
id: String(a.id ?? a.nome ?? ""),
|
|
4986
4968
|
camadaId: t,
|
|
@@ -4988,8 +4970,8 @@ function Ir(a, t) {
|
|
|
4988
4970
|
propriedades: { nome: a.nome, nome_propriedade: a.nome_propriedade }
|
|
4989
4971
|
} : null;
|
|
4990
4972
|
}
|
|
4991
|
-
function
|
|
4992
|
-
const e =
|
|
4973
|
+
function Mo(a, t) {
|
|
4974
|
+
const e = Ii(a);
|
|
4993
4975
|
if (!e) return null;
|
|
4994
4976
|
const o = [];
|
|
4995
4977
|
for (const i of e) {
|
|
@@ -5000,11 +4982,11 @@ function Ao(a, t) {
|
|
|
5000
4982
|
}
|
|
5001
4983
|
return o;
|
|
5002
4984
|
}
|
|
5003
|
-
const
|
|
4985
|
+
const Xn = /* @__PURE__ */ new Set(["Point", "LineString", "Polygon", "Circle", "Text"]);
|
|
5004
4986
|
function Le(a, t, e) {
|
|
5005
4987
|
if (!a || typeof a != "object") return null;
|
|
5006
4988
|
const o = a, i = o.geometria;
|
|
5007
|
-
if (!i || !
|
|
4989
|
+
if (!i || !Xn.has(i.tipo) || o.id === void 0 || o.id === null || o.id === "") return null;
|
|
5008
4990
|
let n = null;
|
|
5009
4991
|
switch (i.tipo) {
|
|
5010
4992
|
case "Point": {
|
|
@@ -5018,21 +5000,21 @@ function Le(a, t, e) {
|
|
|
5018
5000
|
break;
|
|
5019
5001
|
}
|
|
5020
5002
|
case "LineString": {
|
|
5021
|
-
const r = Array.isArray(i.partes) ? i.partes.map((l) => Array.isArray(l) ?
|
|
5003
|
+
const r = Array.isArray(i.partes) ? i.partes.map((l) => Array.isArray(l) ? Co(l, e) : null).filter((l) => l !== null) : [];
|
|
5022
5004
|
if (r.length > 0)
|
|
5023
5005
|
n = Kt(r);
|
|
5024
5006
|
else {
|
|
5025
|
-
const l = Array.isArray(i.coordenadas) ?
|
|
5007
|
+
const l = Array.isArray(i.coordenadas) ? Co(i.coordenadas, e) : null;
|
|
5026
5008
|
l && (n = Kt([l]));
|
|
5027
5009
|
}
|
|
5028
|
-
const c = r.length <= 1 ?
|
|
5010
|
+
const c = r.length <= 1 ? Mo(i.curva, e) : null;
|
|
5029
5011
|
n && n.tipo === "LineString" && c && c.length >= 2 && (n = { tipo: "LineString", coordenadas: Pt(c, !1), curva: c });
|
|
5030
5012
|
break;
|
|
5031
5013
|
}
|
|
5032
5014
|
case "Polygon": {
|
|
5033
|
-
const r = Array.isArray(i.aneis) ?
|
|
5015
|
+
const r = Array.isArray(i.aneis) ? Zn(i.aneis, e) : null;
|
|
5034
5016
|
r && (n = { tipo: "Polygon", aneis: r });
|
|
5035
|
-
const c = r && r.length === 1 ?
|
|
5017
|
+
const c = r && r.length === 1 ? Mo(i.curva, e) : null;
|
|
5036
5018
|
n && c && c.length >= 3 && (n = { tipo: "Polygon", aneis: [Pt(c, !0)], curva: c });
|
|
5037
5019
|
break;
|
|
5038
5020
|
}
|
|
@@ -5055,18 +5037,18 @@ function Le(a, t, e) {
|
|
|
5055
5037
|
};
|
|
5056
5038
|
return o.oculta && (s.oculta = !0), (typeof o.entidadeId == "string" || typeof o.entidadeId == "number") && (s.entidadeId = String(o.entidadeId)), s.status = mt({ ...s, status: o.status }), s;
|
|
5057
5039
|
}
|
|
5058
|
-
const
|
|
5040
|
+
const Se = "cad-cursores", Yn = /^#[0-9a-f]{3,8}$/i, Kn = "#94a3b8";
|
|
5059
5041
|
function Be(a) {
|
|
5060
|
-
return typeof a == "string" &&
|
|
5042
|
+
return typeof a == "string" && Yn.test(a.trim()) ? a.trim() : Kn;
|
|
5061
5043
|
}
|
|
5062
|
-
const
|
|
5063
|
-
function
|
|
5044
|
+
const Jn = '<svg width="18" height="18" viewBox="0 0 24 24" style="display:block;filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))"><path d="M3 2 L3 19 L8 14.5 L11.5 22 L14.5 20.5 L11 13.5 L18 13 Z" fill="currentColor" stroke="#fff" stroke-width="1.2" stroke-linejoin="round"/></svg>';
|
|
5045
|
+
function Ao(a) {
|
|
5064
5046
|
const t = document.createElement("div");
|
|
5065
|
-
t.style.cssText = `color:${Be(a.cor)};position:relative;pointer-events:none`, t.innerHTML =
|
|
5047
|
+
t.style.cssText = `color:${Be(a.cor)};position:relative;pointer-events:none`, t.innerHTML = Jn;
|
|
5066
5048
|
const e = document.createElement("span");
|
|
5067
5049
|
return e.textContent = String(a.nome ?? a.id), e.style.cssText = `position:absolute;left:16px;top:14px;white-space:nowrap;font:600 11px sans-serif;color:#fff;background:${Be(a.cor)};padding:1px 5px;border-radius:3px;max-width:160px;overflow:hidden;text-overflow:ellipsis`, t.appendChild(e), y.divIcon({ className: "custom-leaflet-marker cad-cursor-remoto", iconSize: [18, 18], iconAnchor: [3, 2], html: t });
|
|
5068
5050
|
}
|
|
5069
|
-
class
|
|
5051
|
+
class Qn {
|
|
5070
5052
|
constructor(t) {
|
|
5071
5053
|
f(this, "marcadores", /* @__PURE__ */ new Map());
|
|
5072
5054
|
this.obterMapa = t;
|
|
@@ -5079,9 +5061,9 @@ class es {
|
|
|
5079
5061
|
if (!o || !t || t.id === void 0 || t.id === null || t.id === "" || !Number.isFinite(e == null ? void 0 : e[0]) || !Number.isFinite(e == null ? void 0 : e[1])) return !1;
|
|
5080
5062
|
const i = String(t.id), n = `${t.nome ?? ""}\0${Be(t.cor)}`, s = this.marcadores.get(i);
|
|
5081
5063
|
if (s)
|
|
5082
|
-
return s.marker.setLatLng(e), s.assinatura !== n && (s.marker.setIcon(
|
|
5083
|
-
o.getPane(
|
|
5084
|
-
const r = y.marker(e, { icon:
|
|
5064
|
+
return s.marker.setLatLng(e), s.assinatura !== n && (s.marker.setIcon(Ao(t)), s.assinatura = n), !0;
|
|
5065
|
+
o.getPane(Se) || (o.createPane(Se).style.zIndex = "9500");
|
|
5066
|
+
const r = y.marker(e, { icon: Ao(t), pane: Se, interactive: !1, keyboard: !1 }).addTo(o);
|
|
5085
5067
|
return this.marcadores.set(i, { marker: r, assinatura: n }), !0;
|
|
5086
5068
|
}
|
|
5087
5069
|
remover(t) {
|
|
@@ -5094,7 +5076,7 @@ class es {
|
|
|
5094
5076
|
}
|
|
5095
5077
|
}
|
|
5096
5078
|
const Nt = (a) => `${a.camadaId}\0${a.id}`;
|
|
5097
|
-
class
|
|
5079
|
+
class ts {
|
|
5098
5080
|
constructor(t) {
|
|
5099
5081
|
f(this, "itens", /* @__PURE__ */ new Map());
|
|
5100
5082
|
this.dep = t;
|
|
@@ -5168,13 +5150,13 @@ class os {
|
|
|
5168
5150
|
this.dep.aoSelecionar(o), o.length <= 1 && this.dep.aoSelecionarUma(o[0] ?? null);
|
|
5169
5151
|
}
|
|
5170
5152
|
}
|
|
5171
|
-
const
|
|
5153
|
+
const es = {
|
|
5172
5154
|
Point: "Ponto",
|
|
5173
5155
|
LineString: "Linha",
|
|
5174
5156
|
Polygon: "Polígono",
|
|
5175
5157
|
Circle: "Círculo",
|
|
5176
5158
|
Text: "Texto"
|
|
5177
|
-
},
|
|
5159
|
+
}, os = /* @__PURE__ */ new Set([
|
|
5178
5160
|
"name",
|
|
5179
5161
|
"nome",
|
|
5180
5162
|
"category",
|
|
@@ -5187,7 +5169,7 @@ const is = {
|
|
|
5187
5169
|
"data",
|
|
5188
5170
|
"created_at",
|
|
5189
5171
|
"criadoEm"
|
|
5190
|
-
]),
|
|
5172
|
+
]), wo = 6;
|
|
5191
5173
|
function Mt(a, t) {
|
|
5192
5174
|
var e;
|
|
5193
5175
|
for (const o of t) {
|
|
@@ -5196,11 +5178,11 @@ function Mt(a, t) {
|
|
|
5196
5178
|
}
|
|
5197
5179
|
return "";
|
|
5198
5180
|
}
|
|
5199
|
-
function
|
|
5181
|
+
function is(a) {
|
|
5200
5182
|
const t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(a), e = t ? new Date(Number(t[1]), Number(t[2]) - 1, Number(t[3])) : new Date(a);
|
|
5201
5183
|
return Number.isNaN(e.getTime()) ? a : e.toLocaleDateString("pt-BR");
|
|
5202
5184
|
}
|
|
5203
|
-
function
|
|
5185
|
+
function as(a) {
|
|
5204
5186
|
const t = typeof a == "object" ? JSON.stringify(a) : String(a);
|
|
5205
5187
|
return t.length > 80 ? `${t.slice(0, 77)}...` : t;
|
|
5206
5188
|
}
|
|
@@ -5220,7 +5202,7 @@ function ne(a) {
|
|
|
5220
5202
|
}
|
|
5221
5203
|
}
|
|
5222
5204
|
}
|
|
5223
|
-
function
|
|
5205
|
+
function ns(a) {
|
|
5224
5206
|
const t = a.geometria, e = [], o = dt(t), i = ht(t);
|
|
5225
5207
|
if (t.tipo === "Polygon")
|
|
5226
5208
|
e.push(["Área", Lt(o ?? 0)], ["Perímetro", W(i ?? 0)]), e.push(["Vértices", String(t.aneis.reduce((r, c) => r + c.length, 0))]);
|
|
@@ -5231,7 +5213,7 @@ function rs(a) {
|
|
|
5231
5213
|
const [n, s] = ne(a);
|
|
5232
5214
|
return e.push(["Coordenadas", `${n.toFixed(6)}, ${s.toFixed(6)}`]), e;
|
|
5233
5215
|
}
|
|
5234
|
-
class
|
|
5216
|
+
class ss {
|
|
5235
5217
|
constructor(t) {
|
|
5236
5218
|
f(this, "popup", null);
|
|
5237
5219
|
f(this, "feicaoAtual", null);
|
|
@@ -5271,42 +5253,42 @@ class cs {
|
|
|
5271
5253
|
montar(t) {
|
|
5272
5254
|
var u;
|
|
5273
5255
|
const e = this.dep.obterCamada(t.camadaId), o = ot(((u = t.estilo) == null ? void 0 : u.corTraco) ?? (e == null ? void 0 : e.estilo.corPrimaria), "#38bdf8"), i = (v, M = "", z) => {
|
|
5274
|
-
const
|
|
5275
|
-
return M && (
|
|
5256
|
+
const S = document.createElement(v);
|
|
5257
|
+
return M && (S.style.cssText = M), z !== void 0 && (S.textContent = z), S;
|
|
5276
5258
|
}, n = i("div", "font-family:var(--ui-fonte-base,sans-serif);color:rgba(255,255,255,.9);line-height:1.35;min-width:200px;border-left:3px solid " + o + ";padding-left:8px");
|
|
5277
5259
|
n.className = "cad-feicao-popup", n.appendChild(i("div", "font-weight:700;font-size:13px;margin-bottom:1px", Mt(t, ["name", "nome"]) || t.id));
|
|
5278
|
-
const s = Mt(t, ["category", "categoria"]), r = [
|
|
5260
|
+
const s = Mt(t, ["category", "categoria"]), r = [es[t.geometria.tipo], (e == null ? void 0 : e.nome) ?? t.camadaId, s].filter(Boolean).join(" · ");
|
|
5279
5261
|
n.appendChild(i("div", "font-size:11px;color:rgba(255,255,255,.6);margin-bottom:4px", r));
|
|
5280
5262
|
const c = Mt(t, ["description", "descricao"]);
|
|
5281
5263
|
c && n.appendChild(i("div", "font-size:11px;margin-bottom:4px", c));
|
|
5282
5264
|
const l = (v) => {
|
|
5283
5265
|
const M = i("div", "font-size:11px;margin-bottom:4px");
|
|
5284
|
-
for (const [z,
|
|
5266
|
+
for (const [z, S] of v) {
|
|
5285
5267
|
const L = i("div");
|
|
5286
|
-
L.appendChild(i("strong", "", `${z}: `)), L.appendChild(document.createTextNode(
|
|
5268
|
+
L.appendChild(i("strong", "", `${z}: `)), L.appendChild(document.createTextNode(S)), M.appendChild(L);
|
|
5287
5269
|
}
|
|
5288
5270
|
return M;
|
|
5289
5271
|
};
|
|
5290
|
-
n.appendChild(l(
|
|
5291
|
-
const d = Object.entries(t.propriedades ?? {}).filter(([v, M]) => !
|
|
5292
|
-
d.length > 0 && (n.appendChild(l(d.slice(0,
|
|
5272
|
+
n.appendChild(l(ns(t)));
|
|
5273
|
+
const d = Object.entries(t.propriedades ?? {}).filter(([v, M]) => !os.has(v) && M !== void 0 && M !== null && M !== "");
|
|
5274
|
+
d.length > 0 && (n.appendChild(l(d.slice(0, wo).map(([v, M]) => [v, as(M)]))), d.length > wo && n.appendChild(i("div", "font-size:10px;color:rgba(255,255,255,.55);margin-bottom:4px", `${d.length} atributos`)));
|
|
5293
5275
|
const h = Mt(t, ["author", "autor"]), p = Mt(t, ["date", "data", "created_at", "criadoEm"]);
|
|
5294
5276
|
if (h || p) {
|
|
5295
|
-
const v = [h, p ?
|
|
5277
|
+
const v = [h, p ? is(p) : ""].filter(Boolean).join(" · ");
|
|
5296
5278
|
n.appendChild(i("div", "font-size:10px;color:rgba(255,255,255,.55);margin-bottom:4px", v));
|
|
5297
5279
|
}
|
|
5298
5280
|
const m = i("div", "display:flex;gap:4px;flex-wrap:wrap;margin-top:6px"), g = [["inspecionar", "Inspecionar"], ["zoom", "Zoom"]];
|
|
5299
5281
|
t.geometria.tipo === "LineString" || t.geometria.tipo === "Polygon" || t.geometria.tipo === "Point" ? g.push(["vertices", "Vértices"]) : t.geometria.tipo === "Circle" && g.push(["vertices", "Editar"]), t.geometria.tipo === "Point" && g.push(["copiar", "Copiar"]);
|
|
5300
5282
|
for (const [v, M] of g) {
|
|
5301
5283
|
const z = i("button", "font-size:11px;padding:2px 8px;border-radius:4px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:inherit;cursor:pointer", M);
|
|
5302
|
-
z.type = "button", z.dataset.acao = v, z.addEventListener("click", (
|
|
5303
|
-
|
|
5284
|
+
z.type = "button", z.dataset.acao = v, z.addEventListener("click", (S) => {
|
|
5285
|
+
S.stopPropagation(), this.dep.aoAcao(v, this.feicaoAtual ?? t);
|
|
5304
5286
|
}), m.appendChild(z);
|
|
5305
5287
|
}
|
|
5306
5288
|
return n.appendChild(m), n;
|
|
5307
5289
|
}
|
|
5308
5290
|
}
|
|
5309
|
-
class
|
|
5291
|
+
class rs {
|
|
5310
5292
|
constructor(t) {
|
|
5311
5293
|
f(this, "_ligado", !0);
|
|
5312
5294
|
f(this, "_altSegurado", !1);
|
|
@@ -5363,7 +5345,7 @@ class ls {
|
|
|
5363
5345
|
}
|
|
5364
5346
|
}
|
|
5365
5347
|
const H = "feicoes";
|
|
5366
|
-
class
|
|
5348
|
+
class cs {
|
|
5367
5349
|
constructor(t) {
|
|
5368
5350
|
this.p = t;
|
|
5369
5351
|
}
|
|
@@ -5388,7 +5370,7 @@ class ds {
|
|
|
5388
5370
|
let c = !1;
|
|
5389
5371
|
for (const l of r) {
|
|
5390
5372
|
if (l.geometria.tipo !== "Polygon") continue;
|
|
5391
|
-
const d =
|
|
5373
|
+
const d = pa(l.geometria.aneis[0], t);
|
|
5392
5374
|
if (!d) continue;
|
|
5393
5375
|
this.p.divisaoAtiva() && this.p.estaSelecionada({ camadaId: l.camadaId, id: l.id }) && this.p.encerrarDesenho(), this.p.removerFeicao(l.camadaId, l.id);
|
|
5394
5376
|
const h = [];
|
|
@@ -5408,7 +5390,7 @@ class ds {
|
|
|
5408
5390
|
gerarBuffer(t, e, o, i = {}) {
|
|
5409
5391
|
const n = this.p.buscar(t, e);
|
|
5410
5392
|
if (!n) return null;
|
|
5411
|
-
const s =
|
|
5393
|
+
const s = ba(n.geometria, o);
|
|
5412
5394
|
if (!s) return null;
|
|
5413
5395
|
const r = i.camadaDestino ?? t, c = this.p.adicionarFeicao(r, {
|
|
5414
5396
|
id: i.id ?? this.p.idLivre(r, `${e}-buffer`),
|
|
@@ -5422,7 +5404,7 @@ class ds {
|
|
|
5422
5404
|
duplicarFeicao(t, e, o = {}, i = {}) {
|
|
5423
5405
|
const n = this.p.buscar(t, e);
|
|
5424
5406
|
if (!n) return null;
|
|
5425
|
-
const s =
|
|
5407
|
+
const s = xa(n.geometria, o.lesteM ?? 0, o.norteM ?? 0), r = this.p.adicionarFeicao(t, ge(n, i.id ?? this.p.idLivre(t, `${e}-copia`), s));
|
|
5426
5408
|
return r && this.p.emitir("cad-feicao-criada", { camadaId: t, feicao: r }), r;
|
|
5427
5409
|
}
|
|
5428
5410
|
/**
|
|
@@ -5444,12 +5426,12 @@ class ds {
|
|
|
5444
5426
|
let l = null;
|
|
5445
5427
|
if (s.every((h) => h.geometria.tipo === "LineString")) {
|
|
5446
5428
|
if (s.some((m) => Yt(m.geometria))) return i("multiparte");
|
|
5447
|
-
const h = s.map((m) => m.geometria.coordenadas), p =
|
|
5429
|
+
const h = s.map((m) => m.geometria.coordenadas), p = fa(h, c);
|
|
5448
5430
|
p && (l = Kt([p]));
|
|
5449
5431
|
} else if (s.every((h) => h.geometria.tipo === "Polygon" && h.geometria.aneis.length === 1)) {
|
|
5450
5432
|
let h = s[0].geometria.aneis[0];
|
|
5451
5433
|
for (const p of s.slice(1))
|
|
5452
|
-
h = h ?
|
|
5434
|
+
h = h ? va(h, p.geometria.aneis[0], c) : null;
|
|
5453
5435
|
h && (l = { tipo: "Polygon", aneis: [h] });
|
|
5454
5436
|
} else
|
|
5455
5437
|
return i("tipos-incompativeis");
|
|
@@ -5463,7 +5445,7 @@ class ds {
|
|
|
5463
5445
|
return this.p.emitir("cad-feicao-unida", { origens: s, resultado: d }), d;
|
|
5464
5446
|
}
|
|
5465
5447
|
}
|
|
5466
|
-
class
|
|
5448
|
+
class ls {
|
|
5467
5449
|
constructor(t, e) {
|
|
5468
5450
|
f(this, "cacheOficiais", /* @__PURE__ */ new WeakMap());
|
|
5469
5451
|
this.p = t, this.regra = e;
|
|
@@ -5523,14 +5505,14 @@ class hs {
|
|
|
5523
5505
|
}
|
|
5524
5506
|
}
|
|
5525
5507
|
}
|
|
5526
|
-
class
|
|
5508
|
+
class ds {
|
|
5527
5509
|
constructor(t) {
|
|
5528
5510
|
this.p = t;
|
|
5529
5511
|
}
|
|
5530
5512
|
limitesDe(t) {
|
|
5531
5513
|
let e = 1 / 0, o = 1 / 0, i = -1 / 0, n = -1 / 0;
|
|
5532
5514
|
for (const s of t) {
|
|
5533
|
-
const [[r, c], [l, d]] =
|
|
5515
|
+
const [[r, c], [l, d]] = Ti(s.geometria);
|
|
5534
5516
|
r < e && (e = r), c < o && (o = c), l > i && (i = l), d > n && (n = d);
|
|
5535
5517
|
}
|
|
5536
5518
|
return Number.isFinite(e) ? [[e, o], [i, n]] : null;
|
|
@@ -5565,23 +5547,23 @@ class us {
|
|
|
5565
5547
|
return !o || o.tipo !== H ? !1 : (o.visivel || e.setLayerVisibility(t, !0), this.enquadrar(this.p.lista(t).filter((i) => this.p.desenhada(i))));
|
|
5566
5548
|
}
|
|
5567
5549
|
}
|
|
5568
|
-
const
|
|
5569
|
-
function
|
|
5550
|
+
const zo = 36, hs = 0.45;
|
|
5551
|
+
function us(a, t) {
|
|
5570
5552
|
const e = Math.abs(t[0] - a[0]), o = Math.abs(t[1] - a[1]);
|
|
5571
5553
|
if (e === 0 && o === 0) return null;
|
|
5572
5554
|
const i = [];
|
|
5573
|
-
for (let n = 0; n <
|
|
5574
|
-
const s = n * 2 * Math.PI /
|
|
5555
|
+
for (let n = 0; n < zo; n++) {
|
|
5556
|
+
const s = n * 2 * Math.PI / zo;
|
|
5575
5557
|
i.push([a[0] + e * Math.sin(s), a[1] + o * Math.cos(s)]);
|
|
5576
5558
|
}
|
|
5577
5559
|
return i;
|
|
5578
5560
|
}
|
|
5579
|
-
function
|
|
5561
|
+
function hi(a, t) {
|
|
5580
5562
|
const e = Math.cos(a[0] * Math.PI / 180) || 1, o = t[0] - a[0], i = (t[1] - a[1]) * e, n = Math.hypot(o, i);
|
|
5581
5563
|
return n === 0 ? null : { raio: n, inicio: Math.atan2(o, i), cosLat: e };
|
|
5582
5564
|
}
|
|
5583
|
-
function
|
|
5584
|
-
const o =
|
|
5565
|
+
function ps(a, t, e = 6) {
|
|
5566
|
+
const o = hi(a, t);
|
|
5585
5567
|
if (!o || e < 3) return null;
|
|
5586
5568
|
const i = [];
|
|
5587
5569
|
for (let n = 0; n < e; n++) {
|
|
@@ -5590,12 +5572,12 @@ function ms(a, t, e = 6) {
|
|
|
5590
5572
|
}
|
|
5591
5573
|
return i;
|
|
5592
5574
|
}
|
|
5593
|
-
function
|
|
5594
|
-
const o =
|
|
5575
|
+
function fs(a, t, e = 5) {
|
|
5576
|
+
const o = hi(a, t);
|
|
5595
5577
|
if (!o || e < 3) return null;
|
|
5596
5578
|
const i = e * 2, n = [];
|
|
5597
5579
|
for (let s = 0; s < i; s++) {
|
|
5598
|
-
const r = s % 2 === 0 ? o.raio : o.raio *
|
|
5580
|
+
const r = s % 2 === 0 ? o.raio : o.raio * hs, c = o.inicio + s * 2 * Math.PI / i;
|
|
5599
5581
|
n.push([a[0] + r * Math.sin(c), a[1] + r * Math.cos(c) / o.cosLat]);
|
|
5600
5582
|
}
|
|
5601
5583
|
return n;
|
|
@@ -5616,8 +5598,8 @@ const Ve = [
|
|
|
5616
5598
|
"dividir",
|
|
5617
5599
|
"selecao-laco",
|
|
5618
5600
|
"conta-gotas"
|
|
5619
|
-
],
|
|
5620
|
-
function
|
|
5601
|
+
], Ce = 2;
|
|
5602
|
+
function ui(a) {
|
|
5621
5603
|
return typeof a == "string" && Ve.includes(a);
|
|
5622
5604
|
}
|
|
5623
5605
|
function se(a) {
|
|
@@ -5629,11 +5611,11 @@ function Ut(a) {
|
|
|
5629
5611
|
return t.alca ? (e.saida = t.alca, e.entrada = se(t)) : t.entrada && (e.entrada = t.entrada), e;
|
|
5630
5612
|
});
|
|
5631
5613
|
}
|
|
5632
|
-
function
|
|
5614
|
+
function ms(a) {
|
|
5633
5615
|
return Pt(Ut(a), !1);
|
|
5634
5616
|
}
|
|
5635
5617
|
function Me(a, t) {
|
|
5636
|
-
const e =
|
|
5618
|
+
const e = _i(a);
|
|
5637
5619
|
if (t) {
|
|
5638
5620
|
const i = e ? Pt(a, !0) : a.map((n) => n.ponto);
|
|
5639
5621
|
return e ? { tipo: "Polygon", aneis: [i], curva: a } : { tipo: "Polygon", aneis: [i] };
|
|
@@ -5641,10 +5623,10 @@ function Me(a, t) {
|
|
|
5641
5623
|
const o = e ? Pt(a, !1) : a.map((i) => i.ponto);
|
|
5642
5624
|
return e ? { tipo: "LineString", coordenadas: o, curva: a } : { tipo: "LineString", coordenadas: o };
|
|
5643
5625
|
}
|
|
5644
|
-
const
|
|
5645
|
-
elipse:
|
|
5646
|
-
"poligono-regular": (a, t) =>
|
|
5647
|
-
estrela: (a, t) =>
|
|
5626
|
+
const gs = (a, t) => a[0] === t[0] && a[1] === t[1], Eo = {
|
|
5627
|
+
elipse: us,
|
|
5628
|
+
"poligono-regular": (a, t) => ps(a, t, 6),
|
|
5629
|
+
estrela: (a, t) => fs(a, t, 5)
|
|
5648
5630
|
};
|
|
5649
5631
|
class Ae {
|
|
5650
5632
|
constructor(t, e = !1) {
|
|
@@ -5700,14 +5682,14 @@ class Ae {
|
|
|
5700
5682
|
return this.pontos.push(t), {};
|
|
5701
5683
|
{
|
|
5702
5684
|
const e = xt(this.pontos[0], t);
|
|
5703
|
-
return e >=
|
|
5685
|
+
return e >= Ce ? { concluida: { tipo: "Circle", centro: this.pontos[0], raioMetros: e } } : { aviso: `Raio mínimo de ${Ce} m: clique mais longe do centro.` };
|
|
5704
5686
|
}
|
|
5705
5687
|
case "elipse":
|
|
5706
5688
|
case "poligono-regular":
|
|
5707
5689
|
case "estrela": {
|
|
5708
5690
|
if (this.pontos.length === 0)
|
|
5709
5691
|
return this.pontos.push(t), {};
|
|
5710
|
-
const e =
|
|
5692
|
+
const e = Eo[this.ferramenta](this.pontos[0], t);
|
|
5711
5693
|
return e ? { concluida: { tipo: "Polygon", aneis: [e] } } : { aviso: "Clique num ponto diferente do centro." };
|
|
5712
5694
|
}
|
|
5713
5695
|
case "caneta":
|
|
@@ -5715,7 +5697,7 @@ class Ae {
|
|
|
5715
5697
|
case "conta-gotas":
|
|
5716
5698
|
return {};
|
|
5717
5699
|
default:
|
|
5718
|
-
return this.pontos.length > 0 &&
|
|
5700
|
+
return this.pontos.length > 0 && gs(this.pontos[this.pontos.length - 1], t) ? {} : (this.pontos.push(t), {});
|
|
5719
5701
|
}
|
|
5720
5702
|
}
|
|
5721
5703
|
/** Caneta: arrastar logo após colocar a âncora define a alça de saída (a de entrada é o espelho). */
|
|
@@ -5744,7 +5726,7 @@ class Ae {
|
|
|
5744
5726
|
}
|
|
5745
5727
|
/** Vértices da linha/anel em construção, incluindo a curva da caneta. */
|
|
5746
5728
|
vertices() {
|
|
5747
|
-
return this.ferramenta === "caneta" ?
|
|
5729
|
+
return this.ferramenta === "caneta" ? ms(this.ancoras) : this.pontos;
|
|
5748
5730
|
}
|
|
5749
5731
|
retangulo(t, e) {
|
|
5750
5732
|
return t[0] === e[0] || t[1] === e[1] ? null : { tipo: "Polygon", aneis: [[[t[0], t[1]], [t[0], e[1]], [e[0], e[1]], [e[0], t[1]]]] };
|
|
@@ -5758,7 +5740,7 @@ class Ae {
|
|
|
5758
5740
|
case "circulo": {
|
|
5759
5741
|
if (this.pontos.length !== 1 || !t) return null;
|
|
5760
5742
|
const e = xt(this.pontos[0], t);
|
|
5761
|
-
return e >=
|
|
5743
|
+
return e >= Ce ? { tipo: "Circle", centro: this.pontos[0], raioMetros: e } : null;
|
|
5762
5744
|
}
|
|
5763
5745
|
case "caneta": {
|
|
5764
5746
|
if (this.ancoras.length === 0) return null;
|
|
@@ -5769,7 +5751,7 @@ class Ae {
|
|
|
5769
5751
|
case "poligono-regular":
|
|
5770
5752
|
case "estrela": {
|
|
5771
5753
|
if (this.pontos.length !== 1 || !t) return null;
|
|
5772
|
-
const e =
|
|
5754
|
+
const e = Eo[this.ferramenta](this.pontos[0], t);
|
|
5773
5755
|
return e ? { tipo: "Polygon", aneis: [e] } : null;
|
|
5774
5756
|
}
|
|
5775
5757
|
case "ponto":
|
|
@@ -5799,28 +5781,28 @@ class Ae {
|
|
|
5799
5781
|
return No(t, !1);
|
|
5800
5782
|
}
|
|
5801
5783
|
}
|
|
5802
|
-
const
|
|
5784
|
+
const vs = { topo: 0, base: 16, esquerda: 0, direita: 0 }, ys = 16, bs = 0.92, we = {
|
|
5803
5785
|
topo: "--cad-hud-topo",
|
|
5804
5786
|
base: "--cad-hud-base",
|
|
5805
5787
|
esquerda: "--cad-hud-esquerda",
|
|
5806
5788
|
direita: "--cad-hud-direita"
|
|
5807
|
-
},
|
|
5808
|
-
function
|
|
5809
|
-
const o = { ...
|
|
5789
|
+
}, pi = "position:absolute;box-sizing:border-box;z-index:10000;left:calc(var(--cad-hud-esquerda,0px) + (100% - var(--cad-hud-esquerda,0px) - var(--cad-hud-direita,0px)) / 2);bottom:var(--cad-hud-base,16px);transform:translateX(-50%);width:max-content;max-width:min(92%, calc(100% - var(--cad-hud-esquerda,0px) - var(--cad-hud-direita,0px) - 16px));max-height:calc(100% - var(--cad-hud-topo,0px) - var(--cad-hud-base,16px) - 8px);overflow:hidden;display:flex;flex-wrap:wrap;";
|
|
5790
|
+
function Ir(a, t, e = {}) {
|
|
5791
|
+
const o = { ...vs, ...e }, i = Math.max(0, a - o.esquerda - o.direita);
|
|
5810
5792
|
return {
|
|
5811
5793
|
centroX: o.esquerda + i / 2,
|
|
5812
5794
|
base: o.base,
|
|
5813
|
-
larguraMax: Math.max(0, Math.min(a *
|
|
5795
|
+
larguraMax: Math.max(0, Math.min(a * bs, i - ys)),
|
|
5814
5796
|
alturaMax: Math.max(0, t - o.topo - o.base - 8)
|
|
5815
5797
|
};
|
|
5816
5798
|
}
|
|
5817
|
-
function
|
|
5799
|
+
function xs(a, t) {
|
|
5818
5800
|
for (const e of Object.keys(we)) {
|
|
5819
5801
|
const o = t[e];
|
|
5820
5802
|
typeof o == "number" && Number.isFinite(o) && o >= 0 ? a.style.setProperty(we[e], `${o}px`) : a.style.removeProperty(we[e]);
|
|
5821
5803
|
}
|
|
5822
5804
|
}
|
|
5823
|
-
const
|
|
5805
|
+
const Ps = "cm-draw-hud", ko = "cad-ferramenta-ativa", Q = "cad-desenho", nt = "#22d3ee", Ls = 4, Ss = 450, Cs = 10, Ms = 8, As = 2500, ws = {
|
|
5824
5806
|
ponto: "Ponto",
|
|
5825
5807
|
linha: "Linha",
|
|
5826
5808
|
poligono: "Polígono",
|
|
@@ -5836,7 +5818,7 @@ const Cs = "cm-draw-hud", Io = "cad-ferramenta-ativa", Q = "cad-desenho", nt = "
|
|
|
5836
5818
|
dividir: "Dividir polígono",
|
|
5837
5819
|
"selecao-laco": "Seleção por laço",
|
|
5838
5820
|
"conta-gotas": "Conta-gotas"
|
|
5839
|
-
},
|
|
5821
|
+
}, zs = {
|
|
5840
5822
|
ponto: "Clique para colocar",
|
|
5841
5823
|
linha: "Clique nos vértices · Enter ou duplo clique conclui",
|
|
5842
5824
|
poligono: "Clique nos vértices · Enter ou duplo clique conclui",
|
|
@@ -5853,7 +5835,7 @@ const Cs = "cm-draw-hud", Io = "cad-ferramenta-ativa", Q = "cad-desenho", nt = "
|
|
|
5853
5835
|
"selecao-laco": "Desenhe o laço · Enter ou 1º ponto fecha e seleciona",
|
|
5854
5836
|
"conta-gotas": "Clique numa feição para copiar o estilo"
|
|
5855
5837
|
};
|
|
5856
|
-
class
|
|
5838
|
+
class Es {
|
|
5857
5839
|
constructor(t) {
|
|
5858
5840
|
f(this, "sessao", null);
|
|
5859
5841
|
f(this, "fechar", !1);
|
|
@@ -5920,7 +5902,7 @@ class Is {
|
|
|
5920
5902
|
}
|
|
5921
5903
|
if (!o)
|
|
5922
5904
|
if (t.key === "Enter") {
|
|
5923
|
-
if (
|
|
5905
|
+
if (Fo(t)) return;
|
|
5924
5906
|
this.concluir(), t.preventDefault();
|
|
5925
5907
|
} else (t.key === "Backspace" || (t.ctrlKey || t.metaKey) && t.key.toLowerCase() === "z") && (e.desfazer() && this.atualizar(), t.preventDefault());
|
|
5926
5908
|
});
|
|
@@ -5951,7 +5933,7 @@ class Is {
|
|
|
5951
5933
|
const i = this.dep.map;
|
|
5952
5934
|
this.fechar = !!e.fechar, this.sessao = new Ae(t, this.fechar), i.getPane(Q) || (i.createPane(Q).style.zIndex = "8500"), this.grupo = y.layerGroup().addTo(i), this.marcas = y.layerGroup().addTo(this.grupo);
|
|
5953
5935
|
const n = i.getContainer();
|
|
5954
|
-
n.classList.add(
|
|
5936
|
+
n.classList.add(ko), n.style.cursor = t === "conta-gotas" ? "copy" : "crosshair", i.on("click", this.aoClicar), i.on("dblclick", this.aoDuploClique), i.on("mousemove", this.aoMover), i.on("mousedown", this.aoPressionar), window.addEventListener("mouseup", this.aoSoltar), window.addEventListener("keydown", this.aoTecla), this.montarHud(), this.atualizar();
|
|
5955
5937
|
}
|
|
5956
5938
|
/** Desliga a ferramenta ativa (idempotente). A medição pronta continua na tela. */
|
|
5957
5939
|
desativar() {
|
|
@@ -5968,7 +5950,7 @@ class Is {
|
|
|
5968
5950
|
const t = this.dep.map;
|
|
5969
5951
|
t.off("click", this.aoClicar), t.off("dblclick", this.aoDuploClique), t.off("mousemove", this.aoMover), t.off("mousedown", this.aoPressionar), window.removeEventListener("mouseup", this.aoSoltar), window.removeEventListener("keydown", this.aoTecla);
|
|
5970
5952
|
const e = t.getContainer();
|
|
5971
|
-
e.classList.remove(
|
|
5953
|
+
e.classList.remove(ko), e.style.cursor = "", (o = this.grupo) == null || o.remove(), this.grupo = null, this.previa = null, this.marcas = null, this.marcadorSnap = null, this.avisoTimer && clearTimeout(this.avisoTimer), this.avisoTimer = null, (i = this.hud) == null || i.remove(), this.hud = null, this.campoTexto = null, this.sessao = null, this.arrastando = null, this.ultimoClique = null;
|
|
5972
5954
|
}
|
|
5973
5955
|
// ---- entrada ----
|
|
5974
5956
|
coordenada(t) {
|
|
@@ -5979,7 +5961,7 @@ class Is {
|
|
|
5979
5961
|
return o ? (this.mostrarSnap(o.coordenada), o.coordenada) : (this.esconderSnap(), e);
|
|
5980
5962
|
}
|
|
5981
5963
|
repetido(t) {
|
|
5982
|
-
const e = this.ultimoClique, o = Date.now(), i = t.containerPoint, n = !!e && Math.hypot(e.x - i.x, e.y - i.y) <=
|
|
5964
|
+
const e = this.ultimoClique, o = Date.now(), i = t.containerPoint, n = !!e && Math.hypot(e.x - i.x, e.y - i.y) <= Ls && o - e.t <= Ss;
|
|
5983
5965
|
return this.ultimoClique = { x: i.x, y: i.y, t: o }, n;
|
|
5984
5966
|
}
|
|
5985
5967
|
/** Com 3+ vértices, um clique perto do primeiro fecha a figura em polígono. */
|
|
@@ -5987,7 +5969,7 @@ class Is {
|
|
|
5987
5969
|
const e = this.sessao, o = e == null ? void 0 : e.primeiro;
|
|
5988
5970
|
if (!e || !o || !e.fechaNoPrimeiro) return !1;
|
|
5989
5971
|
const i = this.dep.map.latLngToContainerPoint(o);
|
|
5990
|
-
if (Math.hypot(i.x - t.containerPoint.x, i.y - t.containerPoint.y) >
|
|
5972
|
+
if (Math.hypot(i.x - t.containerPoint.x, i.y - t.containerPoint.y) > Cs) return !1;
|
|
5991
5973
|
const n = e.concluirFechando();
|
|
5992
5974
|
return n && this.finalizar(n), !!n;
|
|
5993
5975
|
}
|
|
@@ -5997,7 +5979,7 @@ class Is {
|
|
|
5997
5979
|
if (!e) return null;
|
|
5998
5980
|
const o = this.dep.map, i = (n) => {
|
|
5999
5981
|
const s = o.latLngToContainerPoint(n);
|
|
6000
|
-
return Math.hypot(s.x - t.containerPoint.x, s.y - t.containerPoint.y) <=
|
|
5982
|
+
return Math.hypot(s.x - t.containerPoint.x, s.y - t.containerPoint.y) <= Ms;
|
|
6001
5983
|
};
|
|
6002
5984
|
for (let n = e.ancoras.length - 1; n >= 0; n--) {
|
|
6003
5985
|
const s = e.ancoras[n];
|
|
@@ -6023,7 +6005,7 @@ class Is {
|
|
|
6023
6005
|
const e = (o = this.hud) == null ? void 0 : o.querySelector('[data-campo="aviso"]');
|
|
6024
6006
|
e && (e.textContent = t, this.avisoTimer && clearTimeout(this.avisoTimer), this.avisoTimer = setTimeout(() => {
|
|
6025
6007
|
e.textContent = "", this.avisoTimer = null;
|
|
6026
|
-
},
|
|
6008
|
+
}, As));
|
|
6027
6009
|
}
|
|
6028
6010
|
/**
|
|
6029
6011
|
* Botão direito com a ferramenta ativa: conclui se já dá figura; senão desfaz o último vértice;
|
|
@@ -6156,14 +6138,14 @@ class Is {
|
|
|
6156
6138
|
const t = this.sessao;
|
|
6157
6139
|
if (!t) return;
|
|
6158
6140
|
const e = document.createElement("div");
|
|
6159
|
-
e.id =
|
|
6141
|
+
e.id = Ps, e.style.cssText = pi + "gap:10px;align-items:center;padding:6px 12px;border-radius:8px;background:rgba(15,23,42,.92);color:#fff;font:12px var(--ui-fonte-base,sans-serif);border:1px solid rgba(255,255,255,.2);pointer-events:auto";
|
|
6160
6142
|
const o = (c) => {
|
|
6161
6143
|
const l = document.createElement("span");
|
|
6162
6144
|
return l.dataset.campo = c, l;
|
|
6163
6145
|
}, i = document.createElement("strong");
|
|
6164
|
-
i.textContent =
|
|
6146
|
+
i.textContent = ws[t.ferramenta];
|
|
6165
6147
|
const n = o("dica");
|
|
6166
|
-
n.style.opacity = ".7", n.textContent =
|
|
6148
|
+
n.style.opacity = ".7", n.textContent = zs[t.ferramenta];
|
|
6167
6149
|
const s = (c, l, d = !1) => {
|
|
6168
6150
|
const h = document.createElement("button");
|
|
6169
6151
|
return h.type = "button", h.textContent = c, h.style.cssText = `padding:3px 10px;border-radius:4px;border:1px solid ${d ? nt : "rgba(255,255,255,.3)"};background:${d ? nt : "transparent"};color:${d ? "#111" : "#fff"};cursor:pointer;font-weight:600`, h.addEventListener("click", l), h;
|
|
@@ -6197,8 +6179,8 @@ class Is {
|
|
|
6197
6179
|
(e = this.sessao) == null || e.mover(t), this.atualizar();
|
|
6198
6180
|
}
|
|
6199
6181
|
}
|
|
6200
|
-
const
|
|
6201
|
-
class
|
|
6182
|
+
const ks = ["tipoLinha", "escalaTipoLinha", "deslocamentoTracejado", "opacidadeTraco", "terminacaoTraco", "juncaoTraco"], Is = /* @__PURE__ */ new Set(["ponto", "linha", "poligono", "retangulo", "elipse", "poligono-regular", "estrela", "circulo", "texto", "caneta"]);
|
|
6183
|
+
class Ts {
|
|
6202
6184
|
constructor(t) {
|
|
6203
6185
|
f(this, "desenho", null);
|
|
6204
6186
|
f(this, "camadaDesenho", null);
|
|
@@ -6249,15 +6231,15 @@ class Ds {
|
|
|
6249
6231
|
}
|
|
6250
6232
|
ativarFerramenta(t, e = {}) {
|
|
6251
6233
|
var n, s;
|
|
6252
|
-
if (!
|
|
6234
|
+
if (!ui(t)) return { ok: !1, motivo: "ferramenta-invalida" };
|
|
6253
6235
|
const o = this.p.obterMapa();
|
|
6254
6236
|
if (!o) return { ok: !1, motivo: "sem-mapa" };
|
|
6255
|
-
if (
|
|
6237
|
+
if (Is.has(t)) {
|
|
6256
6238
|
const r = this.motivoCamadaDesenhoInvalida();
|
|
6257
6239
|
if (r)
|
|
6258
6240
|
return this.p.emitir("cad-desenho-recusado", { ferramenta: t, motivo: r }), { ok: !1, motivo: r };
|
|
6259
6241
|
}
|
|
6260
|
-
this.p.prepararDesenho(), this.desenho || (this.desenho = new
|
|
6242
|
+
this.p.prepararDesenho(), this.desenho || (this.desenho = new Es({
|
|
6261
6243
|
map: o,
|
|
6262
6244
|
buscarSnap: (r) => this.p.buscarSnapEm(r),
|
|
6263
6245
|
snapAtivo: () => this.p.snapAtivo(),
|
|
@@ -6346,11 +6328,11 @@ class Ds {
|
|
|
6346
6328
|
}
|
|
6347
6329
|
const s = this.p.obterLayerManager().getLayerDef(n.camadaId), r = n.estilo ?? {}, c = {}, l = r.corTraco ?? (s == null ? void 0 : s.estilo.corPrimaria);
|
|
6348
6330
|
l && (c.corTraco = l), r.corPreenchimento && (c.corPreenchimento = r.corPreenchimento), r.espessuraTraco !== void 0 && (c.espessuraTraco = r.espessuraTraco), r.opacidadePreenchimento !== void 0 && (c.opacidadePreenchimento = r.opacidadePreenchimento), r.dashArray && (c.dashArray = r.dashArray);
|
|
6349
|
-
for (const d of
|
|
6331
|
+
for (const d of ks) r[d] !== void 0 && (c[d] = r[d]);
|
|
6350
6332
|
this.estiloDesenho = { ...this.estiloDesenho, ...c }, this.p.emitir("cad-conta-gotas", { cor: l ?? r.corPreenchimento ?? "", feicao: n, estilo: c });
|
|
6351
6333
|
}
|
|
6352
6334
|
}
|
|
6353
|
-
class
|
|
6335
|
+
class _s {
|
|
6354
6336
|
constructor(t) {
|
|
6355
6337
|
/** id -> posição na lista da camada (válido enquanto `lista` for a lista atual); evita varrer a camada a cada consulta. */
|
|
6356
6338
|
f(this, "posicoes", /* @__PURE__ */ new Map());
|
|
@@ -6427,41 +6409,41 @@ class qs {
|
|
|
6427
6409
|
}, o, this.p.opcoesNormalizacao());
|
|
6428
6410
|
}
|
|
6429
6411
|
aplicar(t, e, o = {}) {
|
|
6430
|
-
const i = { adicionadas: 0, atualizadas: 0, removidas: 0, recusadas: [] }, n = [], s = [], r = Array.isArray(e == null ? void 0 : e.adicionar) ? e.adicionar : [], c = Array.isArray(e == null ? void 0 : e.atualizar) ? e.atualizar : [], l = Array.isArray(e == null ? void 0 : e.remover) ? e.remover : [], d = (
|
|
6431
|
-
r.forEach((
|
|
6432
|
-
const k = Le(
|
|
6433
|
-
k ? m.push(k) : h.push(d(
|
|
6412
|
+
const i = { adicionadas: 0, atualizadas: 0, removidas: 0, recusadas: [] }, n = [], s = [], r = Array.isArray(e == null ? void 0 : e.adicionar) ? e.adicionar : [], c = Array.isArray(e == null ? void 0 : e.atualizar) ? e.atualizar : [], l = Array.isArray(e == null ? void 0 : e.remover) ? e.remover : [], d = (C, w) => String((C == null ? void 0 : C.id) ?? `#${w}`), h = [], p = (C) => (i.recusadas.push(...h), C), m = [];
|
|
6413
|
+
r.forEach((C, w) => {
|
|
6414
|
+
const k = Le(C, t, this.p.opcoesNormalizacao());
|
|
6415
|
+
k ? m.push(k) : h.push(d(C, w));
|
|
6434
6416
|
});
|
|
6435
6417
|
const g = this.p.obterLayerManager(), u = g.getLayerDef(t);
|
|
6436
6418
|
if (!(!u || u.tipo === H) || !u && m.length === 0)
|
|
6437
|
-
return c.forEach((
|
|
6419
|
+
return c.forEach((C, w) => i.recusadas.push(d(C, w))), m.forEach((C) => h.push(C.id)), p({ resultado: i, adicionadas: n, atualizadas: s });
|
|
6438
6420
|
if ((m.length > 0 || u) && !this.garantirCamada(t, o))
|
|
6439
|
-
return m.forEach((
|
|
6440
|
-
const M = this.lista(t), z = this.posicaoDe(t),
|
|
6421
|
+
return m.forEach((C) => h.push(C.id)), p({ resultado: i, adicionadas: n, atualizadas: s });
|
|
6422
|
+
const M = this.lista(t), z = this.posicaoDe(t), S = M.slice(), L = [], b = [];
|
|
6441
6423
|
let x = !1;
|
|
6442
|
-
for (const
|
|
6443
|
-
const w = String(
|
|
6444
|
-
k === void 0 ||
|
|
6424
|
+
for (const C of l) {
|
|
6425
|
+
const w = String(C), k = z.get(w);
|
|
6426
|
+
k === void 0 || S[k] === null || (S[k] = null, L.push(w), i.removidas++, x = !0);
|
|
6445
6427
|
}
|
|
6446
|
-
c.forEach((
|
|
6447
|
-
const k =
|
|
6428
|
+
c.forEach((C, w) => {
|
|
6429
|
+
const k = C && typeof C == "object" && C.id !== void 0 && C.id !== null ? String(C.id) : "", I = z.get(k), N = I === void 0 ? null : S[I], $ = N ? this.mesclar(N, C, t, !!o.substituirPropriedades) : null;
|
|
6448
6430
|
if (!$ || I === void 0) {
|
|
6449
|
-
i.recusadas.push(k || d(
|
|
6431
|
+
i.recusadas.push(k || d(C, w));
|
|
6450
6432
|
return;
|
|
6451
6433
|
}
|
|
6452
|
-
|
|
6434
|
+
S[I] = $, b.push($), s.push($), i.atualizadas++;
|
|
6453
6435
|
});
|
|
6454
|
-
for (const
|
|
6455
|
-
const w = z.get(
|
|
6456
|
-
w !== void 0 &&
|
|
6436
|
+
for (const C of m) {
|
|
6437
|
+
const w = z.get(C.id);
|
|
6438
|
+
w !== void 0 && S[w] !== null ? S[w] = C : (z.set(C.id, S.length), S.push(C)), b.push(C), n.push(C), i.adicionadas++;
|
|
6457
6439
|
}
|
|
6458
6440
|
if (b.length === 0 && L.length === 0) return p({ resultado: i, adicionadas: n, atualizadas: s });
|
|
6459
|
-
const P = x ?
|
|
6441
|
+
const P = x ? S.filter((C) => C !== null) : S, E = { feicoes: P, delta: { base: M, mudadas: b, removidas: L } };
|
|
6460
6442
|
return g.setLayerData(t, E), delete E.delta, x ? this.posicoes.delete(t) : this.posicoes.set(t, { lista: P, pos: z }), this.p.aposDados(), p({ resultado: i, adicionadas: n, atualizadas: s });
|
|
6461
6443
|
}
|
|
6462
6444
|
}
|
|
6463
|
-
const
|
|
6464
|
-
class
|
|
6445
|
+
const Ds = "cm-vertex-edit-hud", st = "cad-edicao-vertices", Rt = "#facc15", ze = "#f472b6", qs = "#22d3ee", $s = 600, Fs = 100, Os = 24, Ns = 2500, Ee = (a, t) => a === t || JSON.stringify(a) === JSON.stringify(t);
|
|
6446
|
+
class Rs {
|
|
6465
6447
|
constructor(t) {
|
|
6466
6448
|
f(this, "feicaoAtual", null);
|
|
6467
6449
|
/** Feição como foi gravada pela última vez (base do histórico). */
|
|
@@ -6585,7 +6567,7 @@ class Vs {
|
|
|
6585
6567
|
}
|
|
6586
6568
|
// ---- construção ----
|
|
6587
6569
|
geometriaAtual() {
|
|
6588
|
-
return
|
|
6570
|
+
return yo(this.feicaoAtual.geometria, this.pts);
|
|
6589
6571
|
}
|
|
6590
6572
|
feicaoComPontos() {
|
|
6591
6573
|
return { ...this.feicaoAtual, geometria: this.geometriaAtual() };
|
|
@@ -6606,7 +6588,7 @@ class Vs {
|
|
|
6606
6588
|
const n = this.criarAlca(o, i);
|
|
6607
6589
|
this.alcas.push(n), this.grupo.addLayer(n);
|
|
6608
6590
|
}), this.criarAlcasBezier(), t.tipo !== "Point")
|
|
6609
|
-
for (const [o, i] of
|
|
6591
|
+
for (const [o, i] of oi(this.geometriaAtual())) {
|
|
6610
6592
|
if (!this.segmentoLongoNaTela(o, i)) continue;
|
|
6611
6593
|
const n = this.criarFantasma(o, i);
|
|
6612
6594
|
this.fantasmas.push(n), this.grupo.addLayer(n.marker);
|
|
@@ -6618,7 +6600,7 @@ class Vs {
|
|
|
6618
6600
|
const o = this.pts[t], i = this.pts[e];
|
|
6619
6601
|
if (!o || !i) return !1;
|
|
6620
6602
|
const n = this.dep.map.latLngToContainerPoint(o), s = this.dep.map.latLngToContainerPoint(i);
|
|
6621
|
-
return Math.hypot(n.x - s.x, n.y - s.y) >=
|
|
6603
|
+
return Math.hypot(n.x - s.x, n.y - s.y) >= Os;
|
|
6622
6604
|
}
|
|
6623
6605
|
icone(t, e, o) {
|
|
6624
6606
|
return y.divIcon({
|
|
@@ -6628,7 +6610,7 @@ class Vs {
|
|
|
6628
6610
|
});
|
|
6629
6611
|
}
|
|
6630
6612
|
iconeAlca(t) {
|
|
6631
|
-
const e = this.ehCirculo && t === 1, o = this.selecionado === t, i = o ?
|
|
6613
|
+
const e = this.ehCirculo && t === 1, o = this.selecionado === t, i = o ? qs : Rt, n = o ? "2px solid #fff;box-shadow:0 0 0 2px #0e7490" : "2px solid #111";
|
|
6632
6614
|
return this.icone("cad-vertex-handle", 12, `background:${i};border:${n};border-radius:${e ? "50%" : "2px"};cursor:${e ? "ew-resize" : "move"}`);
|
|
6633
6615
|
}
|
|
6634
6616
|
criarAlca(t, e) {
|
|
@@ -6650,7 +6632,7 @@ class Vs {
|
|
|
6650
6632
|
}), o.on("contextmenu", (i) => {
|
|
6651
6633
|
y.DomEvent.preventDefault(i.originalEvent), y.DomEvent.stopPropagation(i.originalEvent), this.excluir(e);
|
|
6652
6634
|
}), o.on("dblclick", (i) => {
|
|
6653
|
-
y.DomEvent.stopPropagation(i.originalEvent), !(Date.now() - this.ultimaInsercao <
|
|
6635
|
+
y.DomEvent.stopPropagation(i.originalEvent), !(Date.now() - this.ultimaInsercao < $s) && this.alternarSuave(e);
|
|
6654
6636
|
}), o;
|
|
6655
6637
|
}
|
|
6656
6638
|
detectarRetanguloDe(t) {
|
|
@@ -6681,8 +6663,8 @@ class Vs {
|
|
|
6681
6663
|
var s, r;
|
|
6682
6664
|
const i = (r = (s = K(t)) == null ? void 0 : s[e]) == null ? void 0 : r[o];
|
|
6683
6665
|
if (i) return { pos: i, latente: !1 };
|
|
6684
|
-
if (this.pts.length >
|
|
6685
|
-
const n =
|
|
6666
|
+
if (this.pts.length > Ea) return null;
|
|
6667
|
+
const n = ka(t, e, o);
|
|
6686
6668
|
return n ? { pos: n, latente: !0 } : null;
|
|
6687
6669
|
}
|
|
6688
6670
|
iconeDaAlca(t) {
|
|
@@ -6732,13 +6714,13 @@ class Vs {
|
|
|
6732
6714
|
aoArrastarAlca(t, e) {
|
|
6733
6715
|
const o = this.feicaoAtual;
|
|
6734
6716
|
if (!o) return;
|
|
6735
|
-
const { lat: i, lng: n } = t.marker.getLatLng(), s =
|
|
6717
|
+
const { lat: i, lng: n } = t.marker.getLatLng(), s = Ia(o.geometria, t.i, t.qual, [i, n], e);
|
|
6736
6718
|
this.feicaoAtual = { ...o, geometria: s }, this.completarAlcasDoNo(t.i), this.sincronizarAlcasBezier(), this.dep.previsualizar(this.feicaoAtual), this.atualizarHud();
|
|
6737
6719
|
}
|
|
6738
6720
|
alternarSuave(t) {
|
|
6739
6721
|
const e = this.feicaoAtual;
|
|
6740
6722
|
if (!e) return;
|
|
6741
|
-
const o =
|
|
6723
|
+
const o = Ta(e.geometria, t);
|
|
6742
6724
|
o !== e.geometria && (this.feicaoAtual = { ...e, geometria: o }, this.reconstruir(), this.dep.previsualizar(this.feicaoAtual), this.confirmar(this.feicaoAtual));
|
|
6743
6725
|
}
|
|
6744
6726
|
criarFantasma(t, e) {
|
|
@@ -6799,10 +6781,10 @@ class Vs {
|
|
|
6799
6781
|
comInsercao(t, e) {
|
|
6800
6782
|
const o = this.feicaoAtual;
|
|
6801
6783
|
if (!o || this.pts.length === 0) return null;
|
|
6802
|
-
const i = this.geometriaAtual(), n = zt(i, t, (t + 1) % this.pts.length), s =
|
|
6784
|
+
const i = this.geometriaAtual(), n = zt(i, t, (t + 1) % this.pts.length), s = wa(i, t, n);
|
|
6803
6785
|
if (s === i) return null;
|
|
6804
6786
|
const r = pt(s).map((c) => [c[0], c[1]]);
|
|
6805
|
-
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && (r[t + 1] = e), { feicao: { ...o, geometria:
|
|
6787
|
+
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && (r[t + 1] = e), { feicao: { ...o, geometria: yo(s, r) }, pts: r };
|
|
6806
6788
|
}
|
|
6807
6789
|
inserir(t, e) {
|
|
6808
6790
|
const o = this.comInsercao(t, e);
|
|
@@ -6815,7 +6797,7 @@ class Vs {
|
|
|
6815
6797
|
/** Grava o gesto: guarda a geometria anterior no histórico (se mudou) e avisa quem escuta. */
|
|
6816
6798
|
confirmar(t) {
|
|
6817
6799
|
const e = this.base;
|
|
6818
|
-
e && !Ee(e.geometria, t.geometria) && (this.historico.push(e), this.historico.length >
|
|
6800
|
+
e && !Ee(e.geometria, t.geometria) && (this.historico.push(e), this.historico.length > Fs && this.historico.shift(), this.refeitos = []), this.feicaoAtual = t, this.base = t, this.gravar(t), this.atualizarBotoes();
|
|
6819
6801
|
}
|
|
6820
6802
|
gravar(t) {
|
|
6821
6803
|
this.gravando = !0;
|
|
@@ -6827,7 +6809,7 @@ class Vs {
|
|
|
6827
6809
|
}
|
|
6828
6810
|
excluir(t) {
|
|
6829
6811
|
if (!this.feicaoAtual) return !1;
|
|
6830
|
-
const o = this.geometriaAtual(), i =
|
|
6812
|
+
const o = this.geometriaAtual(), i = za(o, t);
|
|
6831
6813
|
if (!i)
|
|
6832
6814
|
return o.tipo === "Circle" ? this.avisar("Círculo: mova o centro ou a borda (não há nós para excluir).") : o.tipo === "Point" ? this.avisar("Um ponto tem um único nó.") : this.avisar(`Mínimo de ${ce(o)} nós: não dá para excluir mais.`), !1;
|
|
6833
6815
|
this.pts = pt(i).map((s) => [s[0], s[1]]), this.retangulo = !1, this.selecionado = null, this.reconstruir();
|
|
@@ -6883,7 +6865,7 @@ class Vs {
|
|
|
6883
6865
|
montarHud() {
|
|
6884
6866
|
var d;
|
|
6885
6867
|
const t = this.dep.map.getContainer(), e = document.createElement("div");
|
|
6886
|
-
e.id =
|
|
6868
|
+
e.id = Ds, e.style.cssText = pi + "gap:8px;align-items:center;padding:4px 10px;border-radius:8px;background:rgba(15,23,42,.92);color:#fff;font:11px var(--ui-fonte-base,sans-serif);border:1px solid rgba(255,255,255,.2);pointer-events:auto";
|
|
6887
6869
|
const o = (h) => {
|
|
6888
6870
|
const p = document.createElement("span");
|
|
6889
6871
|
return p.dataset.campo = h, p;
|
|
@@ -6917,7 +6899,7 @@ class Vs {
|
|
|
6917
6899
|
const e = (o = this.hud) == null ? void 0 : o.querySelector('[data-campo="aviso"]');
|
|
6918
6900
|
e && (e.textContent = t, this.avisoTimer && clearTimeout(this.avisoTimer), this.avisoTimer = setTimeout(() => {
|
|
6919
6901
|
e.textContent = "", this.avisoTimer = null;
|
|
6920
|
-
},
|
|
6902
|
+
}, Ns));
|
|
6921
6903
|
}
|
|
6922
6904
|
atualizarHud(t) {
|
|
6923
6905
|
if (!this.hud || !this.feicaoAtual) return;
|
|
@@ -6947,7 +6929,7 @@ class Vs {
|
|
|
6947
6929
|
i && (i.setLatLng(e), this.aoArrastar(i, t, o), i.fire("dragend"));
|
|
6948
6930
|
}
|
|
6949
6931
|
}
|
|
6950
|
-
class
|
|
6932
|
+
class Bs {
|
|
6951
6933
|
constructor(t) {
|
|
6952
6934
|
f(this, "editor", null);
|
|
6953
6935
|
f(this, "pararDeVigiarCamada", null);
|
|
@@ -6978,13 +6960,13 @@ class js {
|
|
|
6978
6960
|
var d, h, p;
|
|
6979
6961
|
const o = this.p.buscar(t, e);
|
|
6980
6962
|
if (!o || o.excluida) return { ok: !1, motivo: "inexistente" };
|
|
6981
|
-
const i = this.p.obterLayerManager().getLayerDef(t), n =
|
|
6963
|
+
const i = this.p.obterLayerManager().getLayerDef(t), n = vo(o, !!(i != null && i.bloqueada));
|
|
6982
6964
|
if (n)
|
|
6983
6965
|
return this.p.emitir("cad-edicao-recusada", { motivo: n, feicao: o }), { ok: !1, motivo: n };
|
|
6984
6966
|
const s = this.p.obterMapa();
|
|
6985
6967
|
if (!s) return { ok: !1, motivo: "sem-mapa" };
|
|
6986
6968
|
this.p.desativarFerramenta(), (d = this.editor) == null || d.parar(), this.p.aplicarMargensHud(), this.p.selecionarUma({ camadaId: t, id: e }), this.p.fecharPopup();
|
|
6987
|
-
const r = this.p.obterLayerManager(), c = O.get(H), l = new
|
|
6969
|
+
const r = this.p.obterLayerManager(), c = O.get(H), l = new Rs({
|
|
6988
6970
|
map: s,
|
|
6989
6971
|
snapLigado: () => this.p.snapAtivo(),
|
|
6990
6972
|
alternarSnap: () => this.p.alternarSnap(),
|
|
@@ -7020,7 +7002,7 @@ class js {
|
|
|
7020
7002
|
const t = this.p.selecionadas();
|
|
7021
7003
|
if (t.length !== 1) return null;
|
|
7022
7004
|
const e = this.p.obterLayerManager().getLayerDef(t[0].camadaId);
|
|
7023
|
-
return
|
|
7005
|
+
return vo(t[0], !!(e != null && e.bloqueada)) === null ? t[0] : null;
|
|
7024
7006
|
}
|
|
7025
7007
|
/** Enter: edita a única feição selecionada, se ela for editável. Devolve se a edição começou. */
|
|
7026
7008
|
editarSelecionada() {
|
|
@@ -7040,13 +7022,13 @@ class js {
|
|
|
7040
7022
|
(t = this.editor) == null || t.parar();
|
|
7041
7023
|
}
|
|
7042
7024
|
}
|
|
7043
|
-
const
|
|
7044
|
-
function
|
|
7025
|
+
const fi = 10, At = (a, t) => Math.hypot(a.x - t.x, a.y - t.y);
|
|
7026
|
+
function Io(a, t, e) {
|
|
7045
7027
|
const o = e.x - t.x, i = e.y - t.y, n = o * o + i * i, s = n === 0 ? 0 : Math.max(0, Math.min(1, ((a.x - t.x) * o + (a.y - t.y) * i) / n));
|
|
7046
7028
|
return { t: s, d: Math.hypot(a.x - (t.x + s * o), a.y - (t.y + s * i)) };
|
|
7047
7029
|
}
|
|
7048
|
-
function
|
|
7049
|
-
const n = o.toleranciaPx ??
|
|
7030
|
+
function Vs(a, t, e, o = {}, i) {
|
|
7031
|
+
const n = o.toleranciaPx ?? fi, s = o.vertice !== !1, r = o.meio !== !1, c = o.aresta !== !1;
|
|
7050
7032
|
let l = null, d = null, h = null;
|
|
7051
7033
|
const p = (m, g) => !m || g.distanciaPx < m.distanciaPx ? g : m;
|
|
7052
7034
|
for (const m of t) {
|
|
@@ -7067,7 +7049,7 @@ function Hs(a, t, e, o = {}, i) {
|
|
|
7067
7049
|
b <= n && (l = p(l, { tipo: "vertice", coordenada: L.ponto, distanciaPx: b, ...v }));
|
|
7068
7050
|
}
|
|
7069
7051
|
if (r)
|
|
7070
|
-
for (const [L, b] of
|
|
7052
|
+
for (const [L, b] of oi(u)) {
|
|
7071
7053
|
const x = zt(u, L, b), P = At(a, e(x));
|
|
7072
7054
|
P <= n && (d = p(d, { tipo: "meio", coordenada: x, distanciaPx: P, ...v }));
|
|
7073
7055
|
}
|
|
@@ -7076,21 +7058,21 @@ function Hs(a, t, e, o = {}, i) {
|
|
|
7076
7058
|
for (let P = 0; P < L.length - 1; P++) x.push([P, P + 1]);
|
|
7077
7059
|
u.tipo === "Polygon" && L.length > 2 && x.push([L.length - 1, 0]);
|
|
7078
7060
|
for (const [P, A] of x) {
|
|
7079
|
-
const { t: E, d:
|
|
7080
|
-
if (
|
|
7061
|
+
const { t: E, d: C } = Io(a, b[P], b[A]);
|
|
7062
|
+
if (C <= n) {
|
|
7081
7063
|
const w = [L[P][0] + E * (L[A][0] - L[P][0]), L[P][1] + E * (L[A][1] - L[P][1])];
|
|
7082
|
-
h = p(h, { tipo: "aresta", coordenada: w, distanciaPx:
|
|
7064
|
+
h = p(h, { tipo: "aresta", coordenada: w, distanciaPx: C, ...v });
|
|
7083
7065
|
}
|
|
7084
7066
|
}
|
|
7085
7067
|
}
|
|
7086
7068
|
continue;
|
|
7087
7069
|
}
|
|
7088
|
-
const z = u.tipo === "LineString" ? it(u).map((L) => ({ pts: L, fechado: !1 })) : [{ pts: X(u), fechado: u.tipo === "Polygon" }],
|
|
7070
|
+
const z = u.tipo === "LineString" ? it(u).map((L) => ({ pts: L, fechado: !1 })) : [{ pts: X(u), fechado: u.tipo === "Polygon" }], S = g ? i.vertice : void 0;
|
|
7089
7071
|
for (const { pts: L, fechado: b } of z) {
|
|
7090
7072
|
const x = L.map(e);
|
|
7091
7073
|
if (s)
|
|
7092
7074
|
for (let A = 0; A < L.length; A++) {
|
|
7093
|
-
if (A ===
|
|
7075
|
+
if (A === S) continue;
|
|
7094
7076
|
const E = At(a, x[A]);
|
|
7095
7077
|
E <= n && (l = p(l, { tipo: "vertice", coordenada: L[A], distanciaPx: E, ...v }));
|
|
7096
7078
|
}
|
|
@@ -7099,15 +7081,15 @@ function Hs(a, t, e, o = {}, i) {
|
|
|
7099
7081
|
for (let A = 0; A < L.length - 1; A++) P.push([A, A + 1]);
|
|
7100
7082
|
b && L.length > 2 && P.push([L.length - 1, 0]);
|
|
7101
7083
|
for (const [A, E] of P)
|
|
7102
|
-
if (!(
|
|
7084
|
+
if (!(S !== void 0 && (A === S || E === S)) && !(g && S === void 0)) {
|
|
7103
7085
|
if (r) {
|
|
7104
|
-
const
|
|
7105
|
-
w <= n && (d = p(d, { tipo: "meio", coordenada:
|
|
7086
|
+
const C = ti(L[A], L[E]), w = At(a, e(C));
|
|
7087
|
+
w <= n && (d = p(d, { tipo: "meio", coordenada: C, distanciaPx: w, ...v }));
|
|
7106
7088
|
}
|
|
7107
7089
|
if (c) {
|
|
7108
|
-
const { t:
|
|
7090
|
+
const { t: C, d: w } = Io(a, x[A], x[E]);
|
|
7109
7091
|
if (w <= n) {
|
|
7110
|
-
const k = [L[A][0] +
|
|
7092
|
+
const k = [L[A][0] + C * (L[E][0] - L[A][0]), L[A][1] + C * (L[E][1] - L[A][1])];
|
|
7111
7093
|
h = p(h, { tipo: "aresta", coordenada: k, distanciaPx: w, ...v });
|
|
7112
7094
|
}
|
|
7113
7095
|
}
|
|
@@ -7116,7 +7098,7 @@ function Hs(a, t, e, o = {}, i) {
|
|
|
7116
7098
|
}
|
|
7117
7099
|
return l ?? d ?? h;
|
|
7118
7100
|
}
|
|
7119
|
-
class
|
|
7101
|
+
class js {
|
|
7120
7102
|
constructor(t) {
|
|
7121
7103
|
this.p = t;
|
|
7122
7104
|
}
|
|
@@ -7141,8 +7123,8 @@ class Gs {
|
|
|
7141
7123
|
buscarSnapEm(t, e) {
|
|
7142
7124
|
const o = this.p.obterMapa();
|
|
7143
7125
|
if (!o) return null;
|
|
7144
|
-
const i = o.latLngToContainerPoint(t), n = this.candidatasEm(t,
|
|
7145
|
-
return
|
|
7126
|
+
const i = o.latLngToContainerPoint(t), n = this.candidatasEm(t, fi);
|
|
7127
|
+
return Vs({ x: i.x, y: i.y }, n, (s) => o.latLngToContainerPoint(s), {}, e);
|
|
7146
7128
|
}
|
|
7147
7129
|
feicaoSob(t, e) {
|
|
7148
7130
|
const o = this.p.obterMapa();
|
|
@@ -7151,7 +7133,7 @@ class Gs {
|
|
|
7151
7133
|
return { feicao: de({ x: n.x, y: n.y }, this.candidatasEm(r, 8), (l) => o.latLngToContainerPoint(l)), coordenada: r };
|
|
7152
7134
|
}
|
|
7153
7135
|
}
|
|
7154
|
-
class
|
|
7136
|
+
class Hs {
|
|
7155
7137
|
constructor(t) {
|
|
7156
7138
|
f(this, "hoverId", null);
|
|
7157
7139
|
f(this, "hoverAgendado", !1);
|
|
@@ -7196,11 +7178,11 @@ class Us {
|
|
|
7196
7178
|
this.hoverId = null;
|
|
7197
7179
|
}
|
|
7198
7180
|
}
|
|
7199
|
-
const
|
|
7181
|
+
const Gs = 111320;
|
|
7200
7182
|
function wt(a, t) {
|
|
7201
7183
|
return a.x >= t.x1 && a.x <= t.x2 && a.y >= t.y1 && a.y <= t.y2;
|
|
7202
7184
|
}
|
|
7203
|
-
function
|
|
7185
|
+
function To(a, t, e) {
|
|
7204
7186
|
let o = 0, i = 1;
|
|
7205
7187
|
const n = t.x - a.x, s = t.y - a.y, r = [-n, n, -s, s], c = [a.x - e.x1, e.x2 - a.x, a.y - e.y1, e.y2 - a.y];
|
|
7206
7188
|
for (let l = 0; l < 4; l++)
|
|
@@ -7218,7 +7200,7 @@ function _o(a, t, e) {
|
|
|
7218
7200
|
}
|
|
7219
7201
|
return !0;
|
|
7220
7202
|
}
|
|
7221
|
-
function
|
|
7203
|
+
function _o(a, t) {
|
|
7222
7204
|
let e = !1;
|
|
7223
7205
|
for (let o = 0, i = t.length - 1; o < t.length; i = o++) {
|
|
7224
7206
|
const n = t[o], s = t[i];
|
|
@@ -7226,15 +7208,15 @@ function Do(a, t) {
|
|
|
7226
7208
|
}
|
|
7227
7209
|
return e;
|
|
7228
7210
|
}
|
|
7229
|
-
function
|
|
7230
|
-
for (let o = 1; o < a.length; o++) if (
|
|
7231
|
-
return e && a.length > 2 &&
|
|
7211
|
+
function Do(a, t, e) {
|
|
7212
|
+
for (let o = 1; o < a.length; o++) if (To(a[o - 1], a[o], t)) return !0;
|
|
7213
|
+
return e && a.length > 2 && To(a[a.length - 1], a[0], t);
|
|
7232
7214
|
}
|
|
7233
|
-
function
|
|
7234
|
-
const o = e(a), i = e([a[0] + t /
|
|
7215
|
+
function Us(a, t, e) {
|
|
7216
|
+
const o = e(a), i = e([a[0] + t / Gs, a[1]]);
|
|
7235
7217
|
return Math.hypot(i.x - o.x, i.y - o.y);
|
|
7236
7218
|
}
|
|
7237
|
-
function
|
|
7219
|
+
function Ws(a, t, e, o) {
|
|
7238
7220
|
if (a.oculta) return !1;
|
|
7239
7221
|
const i = a.geometria, n = o === "window";
|
|
7240
7222
|
switch (i.tipo) {
|
|
@@ -7243,18 +7225,18 @@ function Xs(a, t, e, o) {
|
|
|
7243
7225
|
return wt(e(i.coordenada), t);
|
|
7244
7226
|
case "LineString": {
|
|
7245
7227
|
const s = it(i).map((r) => r.map(e));
|
|
7246
|
-
return n ? s.every((r) => r.every((c) => wt(c, t))) : s.some((r) => r.some((c) => wt(c, t)) ||
|
|
7228
|
+
return n ? s.every((r) => r.every((c) => wt(c, t))) : s.some((r) => r.some((c) => wt(c, t)) || Do(r, t, !1));
|
|
7247
7229
|
}
|
|
7248
7230
|
case "Polygon": {
|
|
7249
7231
|
const s = i.aneis.map((l) => l.map(e)), r = s[0];
|
|
7250
7232
|
if (!r) return !1;
|
|
7251
7233
|
if (n) return r.every((l) => wt(l, t));
|
|
7252
|
-
if (s.some((l) => l.some((d) => wt(d, t)) ||
|
|
7234
|
+
if (s.some((l) => l.some((d) => wt(d, t)) || Do(l, t, !0))) return !0;
|
|
7253
7235
|
const c = { x: t.x1, y: t.y1 };
|
|
7254
|
-
return
|
|
7236
|
+
return _o(c, r) && !s.slice(1).some((l) => _o(c, l));
|
|
7255
7237
|
}
|
|
7256
7238
|
case "Circle": {
|
|
7257
|
-
const s = e(i.centro), r =
|
|
7239
|
+
const s = e(i.centro), r = Us(i.centro, i.raioMetros, e);
|
|
7258
7240
|
if (n)
|
|
7259
7241
|
return s.x - r >= t.x1 && s.x + r <= t.x2 && s.y - r >= t.y1 && s.y + r <= t.y2;
|
|
7260
7242
|
const c = Math.max(t.x1, Math.min(s.x, t.x2)), l = Math.max(t.y1, Math.min(s.y, t.y2));
|
|
@@ -7262,9 +7244,9 @@ function Xs(a, t, e, o) {
|
|
|
7262
7244
|
}
|
|
7263
7245
|
}
|
|
7264
7246
|
}
|
|
7265
|
-
function
|
|
7247
|
+
function Zs(a, t) {
|
|
7266
7248
|
if (t.length < 3 || a.oculta) return !1;
|
|
7267
|
-
const e = (i) =>
|
|
7249
|
+
const e = (i) => Ko(i, [t]), o = a.geometria;
|
|
7268
7250
|
switch (o.tipo) {
|
|
7269
7251
|
case "Point":
|
|
7270
7252
|
case "Text":
|
|
@@ -7282,7 +7264,7 @@ function Ys(a, t) {
|
|
|
7282
7264
|
}
|
|
7283
7265
|
}
|
|
7284
7266
|
}
|
|
7285
|
-
class
|
|
7267
|
+
class Xs {
|
|
7286
7268
|
constructor(t) {
|
|
7287
7269
|
this.p = t;
|
|
7288
7270
|
}
|
|
@@ -7292,7 +7274,7 @@ class Ks {
|
|
|
7292
7274
|
for (const o of this.p.obterLayerManager().getActiveSelectableLayers())
|
|
7293
7275
|
if (o.tipo === H)
|
|
7294
7276
|
for (const i of this.p.lista(o.id))
|
|
7295
|
-
this.p.desenhada(i) &&
|
|
7277
|
+
this.p.desenhada(i) && Zs(i, t) && e.push({ camadaId: o.id, id: i.id });
|
|
7296
7278
|
this.p.desativarFerramenta(), this.p.selecionar(e);
|
|
7297
7279
|
}
|
|
7298
7280
|
/** Caixa de seleção: só feições de camadas visíveis, interativas e desbloqueadas, com toque geométrico real. */
|
|
@@ -7303,19 +7285,19 @@ class Ks {
|
|
|
7303
7285
|
for (const r of this.p.obterLayerManager().getActiveSelectableLayers())
|
|
7304
7286
|
if (r.tipo === H)
|
|
7305
7287
|
for (const c of this.p.lista(r.id))
|
|
7306
|
-
this.p.desenhada(c) &&
|
|
7288
|
+
this.p.desenhada(c) && Ws(c, t, n, e) && s.push({ camadaId: r.id, id: c.id });
|
|
7307
7289
|
o ? this.p.alternarVarias(s) : this.p.selecionar(s);
|
|
7308
7290
|
}
|
|
7309
7291
|
}
|
|
7310
|
-
function
|
|
7311
|
-
return a.key !== "Enter" || a.defaultPrevented || a.ctrlKey || a.metaKey || a.altKey || a.shiftKey ? !1 : !Tt(a) && !
|
|
7292
|
+
function Ys(a) {
|
|
7293
|
+
return a.key !== "Enter" || a.defaultPrevented || a.ctrlKey || a.metaKey || a.altKey || a.shiftKey ? !1 : !Tt(a) && !Fo(a);
|
|
7312
7294
|
}
|
|
7313
|
-
class
|
|
7295
|
+
class Ks {
|
|
7314
7296
|
constructor(t) {
|
|
7315
7297
|
f(this, "ouvintes", new Qt());
|
|
7316
7298
|
f(this, "aoTecla", (t) => {
|
|
7317
7299
|
try {
|
|
7318
|
-
if (!
|
|
7300
|
+
if (!Ys(t) || this.p.ocupado() || !this.p.atalhosValem()) return;
|
|
7319
7301
|
this.p.editarSelecionada() && t.preventDefault();
|
|
7320
7302
|
} catch (e) {
|
|
7321
7303
|
console.error("[ui-canvas-cad] falha no atalho Enter da edição", e);
|
|
@@ -7331,7 +7313,7 @@ class Qs {
|
|
|
7331
7313
|
this.ouvintes.cleanup();
|
|
7332
7314
|
}
|
|
7333
7315
|
}
|
|
7334
|
-
class
|
|
7316
|
+
class Js {
|
|
7335
7317
|
constructor(t) {
|
|
7336
7318
|
f(this, "operacoes");
|
|
7337
7319
|
f(this, "selecao");
|
|
@@ -7351,22 +7333,22 @@ class tr {
|
|
|
7351
7333
|
/** Aceita a coordenada (0, 0) exata nas feições de entrada (atributo `aceitar-origem`). */
|
|
7352
7334
|
f(this, "aceitarOrigem", !1);
|
|
7353
7335
|
f(this, "opcoesPopup", { copiarParaAreaDeTransferencia: !0 });
|
|
7354
|
-
this.contexto = t, this.repositorio = new
|
|
7336
|
+
this.contexto = t, this.repositorio = new _s({
|
|
7355
7337
|
obterLayerManager: () => this.contexto.obterLayerManager(),
|
|
7356
7338
|
opcoesNormalizacao: () => this.opcoesNormalizacao(),
|
|
7357
7339
|
aposDados: () => this.aposDados()
|
|
7358
|
-
}), this.consulta = new
|
|
7340
|
+
}), this.consulta = new js({
|
|
7359
7341
|
obterMapa: () => this.contexto.obterMapa(),
|
|
7360
7342
|
obterLayerManager: () => this.contexto.obterLayerManager(),
|
|
7361
7343
|
desenhada: (e) => this.desenhada(e)
|
|
7362
|
-
}), this.ponteiro = new
|
|
7344
|
+
}), this.ponteiro = new Hs({
|
|
7363
7345
|
emitir: (e, o, i) => this.contexto.emitir(e, o, i),
|
|
7364
7346
|
feicaoSob: (e, o) => this.consulta.feicaoSob(e, o),
|
|
7365
7347
|
interacaoAtiva: () => this.ferramentas.ativo || this.edicao.editando,
|
|
7366
7348
|
popupNoDuploClique: () => this.modoPopups() !== "desligado",
|
|
7367
7349
|
botaoDireitoDaFerramenta: () => this.ferramentas.ativo ? (this.ferramentas.botaoDireito(), !0) : !1,
|
|
7368
7350
|
abrirPopup: (e) => this.popup.abrir(e)
|
|
7369
|
-
}), this.regiao = new
|
|
7351
|
+
}), this.regiao = new Xs({
|
|
7370
7352
|
obterMapa: () => this.contexto.obterMapa(),
|
|
7371
7353
|
obterLayerManager: () => this.contexto.obterLayerManager(),
|
|
7372
7354
|
lista: (e) => this.lista(e),
|
|
@@ -7374,7 +7356,7 @@ class tr {
|
|
|
7374
7356
|
desativarFerramenta: () => this.ferramentas.desativarFerramenta(),
|
|
7375
7357
|
selecionar: (e) => this.selecao.selecionar(e),
|
|
7376
7358
|
alternarVarias: (e) => this.selecao.alternarVarias(e)
|
|
7377
|
-
}), this.edicao = new
|
|
7359
|
+
}), this.edicao = new Bs({
|
|
7378
7360
|
obterMapa: () => this.contexto.obterMapa(),
|
|
7379
7361
|
obterLayerManager: () => this.contexto.obterLayerManager(),
|
|
7380
7362
|
emitir: (e, o) => this.contexto.emitir(e, o),
|
|
@@ -7397,17 +7379,17 @@ class tr {
|
|
|
7397
7379
|
snapAtivo: () => this.snap.ativo,
|
|
7398
7380
|
alternarSnap: () => this.snap.alternar(),
|
|
7399
7381
|
buscarSnapEm: (e, o) => this.buscarSnapEm(e, o)
|
|
7400
|
-
}), this.teclado = new
|
|
7382
|
+
}), this.teclado = new Ks({
|
|
7401
7383
|
ocupado: () => this.edicao.editando || this.ferramentas.ativo,
|
|
7402
7384
|
atalhosValem: () => this.atalhosValem(),
|
|
7403
7385
|
editarSelecionada: () => this.edicao.editarSelecionada()
|
|
7404
|
-
}), this.versoes = new
|
|
7386
|
+
}), this.versoes = new ls({
|
|
7405
7387
|
obterLayerManager: () => this.contexto.obterLayerManager(),
|
|
7406
7388
|
emitir: (e, o) => this.contexto.emitir(e, o),
|
|
7407
7389
|
buscar: (e, o) => this.buscar(e, o),
|
|
7408
7390
|
lista: (e) => this.lista(e),
|
|
7409
7391
|
aposDados: () => this.aposDados()
|
|
7410
|
-
}, t.regra ?? new We()), this.ferramentas = new
|
|
7392
|
+
}, t.regra ?? new We()), this.ferramentas = new Ts({
|
|
7411
7393
|
obterMapa: () => this.contexto.obterMapa(),
|
|
7412
7394
|
obterLayerManager: () => this.contexto.obterLayerManager(),
|
|
7413
7395
|
emitir: (e, o, i) => this.contexto.emitir(e, o, i),
|
|
@@ -7426,14 +7408,14 @@ class tr {
|
|
|
7426
7408
|
dividirComLinha: (e) => this.dividirComLinha(e),
|
|
7427
7409
|
selecionarNoLaco: (e) => this.selecionarNoLaco(e),
|
|
7428
7410
|
candidatasEm: (e, o) => this.candidatasEm(e, o)
|
|
7429
|
-
}), this.camera = new
|
|
7411
|
+
}), this.camera = new ds({
|
|
7430
7412
|
obterMapa: () => this.contexto.obterMapa(),
|
|
7431
7413
|
obterLayerManager: () => this.contexto.obterLayerManager(),
|
|
7432
7414
|
buscar: (e, o) => this.buscar(e, o),
|
|
7433
7415
|
lista: (e) => this.lista(e),
|
|
7434
7416
|
desenhada: (e) => this.desenhada(e),
|
|
7435
7417
|
garantirVisivel: (e) => this.versoes.garantirVisivel(e)
|
|
7436
|
-
}), this.operacoes = new
|
|
7418
|
+
}), this.operacoes = new cs({
|
|
7437
7419
|
emitir: (e, o) => this.contexto.emitir(e, o),
|
|
7438
7420
|
obterLayerManager: () => this.contexto.obterLayerManager(),
|
|
7439
7421
|
buscar: (e, o) => this.buscar(e, o),
|
|
@@ -7446,18 +7428,18 @@ class tr {
|
|
|
7446
7428
|
estaSelecionada: (e) => this.selecao.contem(e),
|
|
7447
7429
|
divisaoAtiva: () => this.ferramentas.ferramentaAtiva === "dividir",
|
|
7448
7430
|
encerrarDesenho: () => this.ferramentas.desativarFerramenta()
|
|
7449
|
-
}), this.cursores = new
|
|
7431
|
+
}), this.cursores = new Qn(() => this.contexto.obterMapa()), this.snap = new rs({
|
|
7450
7432
|
aplica: () => this.atalhosValem(),
|
|
7451
7433
|
aoMudar: (e) => {
|
|
7452
7434
|
var o, i;
|
|
7453
7435
|
this.contexto.emitir("cad-snap", e), this.edicao.atualizarSnapNoHud(), (i = (o = this.contexto).aoSnapMudar) == null || i.call(o, e.ligado);
|
|
7454
7436
|
}
|
|
7455
|
-
}), this.popup = new
|
|
7437
|
+
}), this.popup = new ss({
|
|
7456
7438
|
obterMapa: () => this.contexto.obterMapa(),
|
|
7457
7439
|
obterCamada: (e) => this.contexto.obterLayerManager().getLayerDef(e),
|
|
7458
7440
|
aoAcao: (e, o) => this.tratarAcaoPopup(e, o),
|
|
7459
7441
|
liberar: (e) => this.contexto.liberarPopups ? this.contexto.liberarPopups(e) : e()
|
|
7460
|
-
}), this.selecao = new
|
|
7442
|
+
}), this.selecao = new ts({
|
|
7461
7443
|
obterFeicao: (e) => this.buscar(e.camadaId, e.id),
|
|
7462
7444
|
aplicarVisual: (e, o) => {
|
|
7463
7445
|
const i = this.contexto.obterLayerManager().getLayerInstance(e), n = O.get(H);
|
|
@@ -7594,7 +7576,7 @@ class tr {
|
|
|
7594
7576
|
}
|
|
7595
7577
|
aplicarMargensHud() {
|
|
7596
7578
|
const t = this.contexto.obterMapa();
|
|
7597
|
-
t &&
|
|
7579
|
+
t && xs(t.getContainer(), this.margensHud);
|
|
7598
7580
|
}
|
|
7599
7581
|
// ---- versões (oficial × prévia) ----
|
|
7600
7582
|
// ---- versões (oficial × prévia) ----
|
|
@@ -7806,7 +7788,7 @@ class tr {
|
|
|
7806
7788
|
return this.operacoes.juntarFeicoes(t, e, o);
|
|
7807
7789
|
}
|
|
7808
7790
|
}
|
|
7809
|
-
const
|
|
7791
|
+
const qo = {
|
|
7810
7792
|
ponto: "Ponto",
|
|
7811
7793
|
linha: "Linha",
|
|
7812
7794
|
poligono: "Polígono",
|
|
@@ -7823,19 +7805,19 @@ const $o = {
|
|
|
7823
7805
|
"selecao-laco": "Laço",
|
|
7824
7806
|
"conta-gotas": "Cor"
|
|
7825
7807
|
};
|
|
7826
|
-
function
|
|
7808
|
+
function Qs(a) {
|
|
7827
7809
|
if (!a) return [];
|
|
7828
7810
|
const t = a.split(/[\s,]+/).map((o) => o.trim().toLowerCase()).filter(Boolean);
|
|
7829
7811
|
if (t.includes("todas")) return [...Ve];
|
|
7830
|
-
const e = new Set(t.filter(
|
|
7812
|
+
const e = new Set(t.filter(ui));
|
|
7831
7813
|
return Ve.filter((o) => e.has(o));
|
|
7832
7814
|
}
|
|
7833
|
-
function
|
|
7815
|
+
function tr(a) {
|
|
7834
7816
|
if (!a) return !1;
|
|
7835
7817
|
const t = a.split(/[\s,]+/).map((e) => e.trim().toLowerCase());
|
|
7836
7818
|
return t.includes("todas") || t.includes("editar");
|
|
7837
7819
|
}
|
|
7838
|
-
class
|
|
7820
|
+
class er {
|
|
7839
7821
|
constructor(t) {
|
|
7840
7822
|
f(this, "barra", null);
|
|
7841
7823
|
f(this, "editando", !1);
|
|
@@ -7850,7 +7832,7 @@ class ir {
|
|
|
7850
7832
|
i.className = "cad-quick-toolbar cad-draw-toolbar", i.setAttribute("role", "toolbar"), i.setAttribute("aria-label", "Ferramentas de desenho");
|
|
7851
7833
|
for (const s of t) {
|
|
7852
7834
|
const r = document.createElement("button");
|
|
7853
|
-
r.type = "button", r.className = "cad-btn-tool cad-draw-btn", r.dataset.ferramenta = s, r.textContent =
|
|
7835
|
+
r.type = "button", r.className = "cad-btn-tool cad-draw-btn", r.dataset.ferramenta = s, r.textContent = qo[s], r.title = qo[s], r.setAttribute("aria-pressed", "false"), r.addEventListener("click", () => this.ctx.aoEscolher(s)), i.appendChild(r);
|
|
7854
7836
|
}
|
|
7855
7837
|
if (o) {
|
|
7856
7838
|
const s = document.createElement("button");
|
|
@@ -7877,8 +7859,8 @@ class ir {
|
|
|
7877
7859
|
(t = this.barra) == null || t.remove(), this.barra = null;
|
|
7878
7860
|
}
|
|
7879
7861
|
}
|
|
7880
|
-
const
|
|
7881
|
-
function
|
|
7862
|
+
const or = "data-cad-estilos-externos";
|
|
7863
|
+
function ir(a) {
|
|
7882
7864
|
try {
|
|
7883
7865
|
return Array.from(a.cssRules, (t) => t.cssText).join(`
|
|
7884
7866
|
`);
|
|
@@ -7886,10 +7868,10 @@ function nr(a) {
|
|
|
7886
7868
|
return "";
|
|
7887
7869
|
}
|
|
7888
7870
|
}
|
|
7889
|
-
function
|
|
7890
|
-
return typeof a == "string" ? a.trim() ? [a] : [] : Array.isArray(a) ? a.map((t) => typeof t == "string" ? t :
|
|
7871
|
+
function ar(a) {
|
|
7872
|
+
return typeof a == "string" ? a.trim() ? [a] : [] : Array.isArray(a) ? a.map((t) => typeof t == "string" ? t : ir(t)).filter((t) => t.trim() !== "") : [];
|
|
7891
7873
|
}
|
|
7892
|
-
class
|
|
7874
|
+
class nr {
|
|
7893
7875
|
constructor(t) {
|
|
7894
7876
|
f(this, "textos", []);
|
|
7895
7877
|
f(this, "adotadas", []);
|
|
@@ -7901,7 +7883,7 @@ class rr {
|
|
|
7901
7883
|
return this.textos;
|
|
7902
7884
|
}
|
|
7903
7885
|
definir(t) {
|
|
7904
|
-
this.textos =
|
|
7886
|
+
this.textos = ar(t), this.aplicar();
|
|
7905
7887
|
}
|
|
7906
7888
|
/** Tira as folhas do shadow root, mantendo o pedido para `aplicar()` depois. */
|
|
7907
7889
|
limpar() {
|
|
@@ -7921,7 +7903,7 @@ class rr {
|
|
|
7921
7903
|
this.adotadas = [];
|
|
7922
7904
|
}
|
|
7923
7905
|
const e = document.createElement("style");
|
|
7924
|
-
e.setAttribute(
|
|
7906
|
+
e.setAttribute(or, ""), e.textContent = this.textos.join(`
|
|
7925
7907
|
`), this.shadow.appendChild(e), this.fallback = e;
|
|
7926
7908
|
}
|
|
7927
7909
|
remover() {
|
|
@@ -7930,7 +7912,7 @@ class rr {
|
|
|
7930
7912
|
this.adotadas.length > 0 && Array.isArray(t.adoptedStyleSheets) && (t.adoptedStyleSheets = t.adoptedStyleSheets.filter((o) => !this.adotadas.includes(o))), this.adotadas = [], (e = this.fallback) == null || e.remove(), this.fallback = null;
|
|
7931
7913
|
}
|
|
7932
7914
|
}
|
|
7933
|
-
const
|
|
7915
|
+
const mi = {
|
|
7934
7916
|
"linha-cor": "cor",
|
|
7935
7917
|
"linha-espessura": "espessura",
|
|
7936
7918
|
"linha-tipo": "tipo",
|
|
@@ -7950,22 +7932,22 @@ const gi = {
|
|
|
7950
7932
|
opacidade: "opacidadeTraco",
|
|
7951
7933
|
terminacao: "terminacaoTraco",
|
|
7952
7934
|
juncao: "juncaoTraco"
|
|
7953
|
-
},
|
|
7954
|
-
function
|
|
7955
|
-
return Object.prototype.hasOwnProperty.call(
|
|
7935
|
+
}, sr = 100, rr = /^\s*\d+(\.\d+)?([\s,]+\d+(\.\d+)?)*\s*$/;
|
|
7936
|
+
function cr(a) {
|
|
7937
|
+
return Object.prototype.hasOwnProperty.call(mi, a);
|
|
7956
7938
|
}
|
|
7957
7939
|
const Bt = (a) => {
|
|
7958
7940
|
const t = typeof a == "number" ? a : typeof a == "string" && a.trim() !== "" ? Number(a) : NaN;
|
|
7959
7941
|
return Number.isFinite(t) ? t : void 0;
|
|
7960
7942
|
};
|
|
7961
|
-
function
|
|
7943
|
+
function lr(a, t) {
|
|
7962
7944
|
if (t != null)
|
|
7963
7945
|
switch (a) {
|
|
7964
7946
|
case "cor":
|
|
7965
7947
|
return (typeof t == "string" ? ot(t, "") : "") || void 0;
|
|
7966
7948
|
case "espessura": {
|
|
7967
7949
|
const e = Bt(t);
|
|
7968
|
-
return e !== void 0 && e >= 0 ? Math.min(
|
|
7950
|
+
return e !== void 0 && e >= 0 ? Math.min(sr, e) : void 0;
|
|
7969
7951
|
}
|
|
7970
7952
|
case "escala": {
|
|
7971
7953
|
const e = Bt(t);
|
|
@@ -7978,28 +7960,28 @@ function hr(a, t) {
|
|
|
7978
7960
|
return e !== void 0 ? Math.min(1, Math.max(0, e)) : void 0;
|
|
7979
7961
|
}
|
|
7980
7962
|
case "tipo":
|
|
7981
|
-
return
|
|
7963
|
+
return $i(t);
|
|
7982
7964
|
case "tracejado":
|
|
7983
|
-
return typeof t == "string" &&
|
|
7965
|
+
return typeof t == "string" && rr.test(t) ? t.trim() : void 0;
|
|
7984
7966
|
case "terminacao":
|
|
7985
|
-
return $i(t) ? t : void 0;
|
|
7986
|
-
case "juncao":
|
|
7987
7967
|
return qi(t) ? t : void 0;
|
|
7968
|
+
case "juncao":
|
|
7969
|
+
return Di(t) ? t : void 0;
|
|
7988
7970
|
default:
|
|
7989
7971
|
return;
|
|
7990
7972
|
}
|
|
7991
7973
|
}
|
|
7992
|
-
function
|
|
7974
|
+
function $o(a, t) {
|
|
7993
7975
|
const e = { ...a };
|
|
7994
7976
|
if (!t || typeof t != "object") return e;
|
|
7995
7977
|
for (const o of Object.keys(Wt)) {
|
|
7996
7978
|
if (!Object.prototype.hasOwnProperty.call(t, o)) continue;
|
|
7997
|
-
const i =
|
|
7979
|
+
const i = lr(o, t[o]);
|
|
7998
7980
|
i === void 0 ? delete e[Wt[o]] : e[Wt[o]] = i;
|
|
7999
7981
|
}
|
|
8000
7982
|
return e;
|
|
8001
7983
|
}
|
|
8002
|
-
function
|
|
7984
|
+
function dr(a) {
|
|
8003
7985
|
const t = {};
|
|
8004
7986
|
for (const [e, o] of Object.entries(Wt)) {
|
|
8005
7987
|
const i = a[o];
|
|
@@ -8007,10 +7989,10 @@ function ur(a) {
|
|
|
8007
7989
|
}
|
|
8008
7990
|
return t;
|
|
8009
7991
|
}
|
|
8010
|
-
function
|
|
8011
|
-
return { [
|
|
7992
|
+
function hr(a, t) {
|
|
7993
|
+
return { [mi[a]]: t };
|
|
8012
7994
|
}
|
|
8013
|
-
class
|
|
7995
|
+
class ur extends Oi {
|
|
8014
7996
|
constructor() {
|
|
8015
7997
|
super();
|
|
8016
7998
|
f(this, "shadow");
|
|
@@ -8034,7 +8016,7 @@ class fr extends Ni {
|
|
|
8034
8016
|
f(this, "ponteiroSobre", !1);
|
|
8035
8017
|
f(this, "_chaveGrupo");
|
|
8036
8018
|
f(this, "_zonaProjecao", 22);
|
|
8037
|
-
this.shadow = this.attachShadow({ mode: "open" }), this.controller = new
|
|
8019
|
+
this.shadow = this.attachShadow({ mode: "open" }), this.controller = new bn(), this.controladorTamanho = En(this, this.controller), this.shadow.innerHTML = Dn(), this.estilosExternos = new nr(this.shadow), this.mapContainer = this.shadow.getElementById("cad-map-container"), this.layersPanel = this.shadow.getElementById("qgis-layer-panel"), this.toolbarPainel = new In({
|
|
8038
8020
|
shadow: this.shadow,
|
|
8039
8021
|
mapContainer: this.mapContainer,
|
|
8040
8022
|
layersPanel: this.layersPanel,
|
|
@@ -8045,18 +8027,18 @@ class fr extends Ni {
|
|
|
8045
8027
|
onToggleSnap: () => this.feicoes.alternarSnap(),
|
|
8046
8028
|
onTratarCliqueCanvas: (n) => this.tratarCliqueLivreCanvas(n),
|
|
8047
8029
|
onDispararAcaoPopup: (n, s) => this.dispararAcaoPopup(n, s)
|
|
8048
|
-
}), this.broadcastConfig = new
|
|
8030
|
+
}), this.broadcastConfig = new kn({
|
|
8049
8031
|
host: this,
|
|
8050
8032
|
controller: this.controller,
|
|
8051
8033
|
mapContainer: this.mapContainer,
|
|
8052
8034
|
setLayerOpacity: (n, s) => this.setLayerOpacity(n, s)
|
|
8053
|
-
}), this.colecoesDados = new
|
|
8035
|
+
}), this.colecoesDados = new Tn({
|
|
8054
8036
|
obterController: () => this.controller,
|
|
8055
8037
|
obterChaveGrupo: () => this.chaveGrupo,
|
|
8056
8038
|
setLayerVisibility: (n, s) => this.setLayerVisibility(n, s)
|
|
8057
8039
|
});
|
|
8058
8040
|
const e = new We(), o = this.controller.context, i = this.controller.canvasInteracao.ctx;
|
|
8059
|
-
Object.assign(o, { regraVersoes: e, renderizador: () => this.renderizador }), this.feicoes = new
|
|
8041
|
+
Object.assign(o, { regraVersoes: e, renderizador: () => this.renderizador }), this.feicoes = new Js({
|
|
8060
8042
|
obterLayerManager: () => this.controller.layerManager,
|
|
8061
8043
|
obterMapa: () => this.controller.getMap(),
|
|
8062
8044
|
regra: e,
|
|
@@ -8081,7 +8063,7 @@ class fr extends Ni {
|
|
|
8081
8063
|
const r = this.feicoes.tratarAcaoCamada(n, s);
|
|
8082
8064
|
r && this.dispatchEvent(new CustomEvent(r, { detail: s, bubbles: !0, composed: !0 }));
|
|
8083
8065
|
}
|
|
8084
|
-
}), this.barraFerramentas = new
|
|
8066
|
+
}), this.barraFerramentas = new er({
|
|
8085
8067
|
raiz: this.shadow.getElementById("cad-root"),
|
|
8086
8068
|
aoEscolher: (n) => {
|
|
8087
8069
|
this.feicoes.alternarFerramenta(n);
|
|
@@ -8095,7 +8077,7 @@ class fr extends Ni {
|
|
|
8095
8077
|
edicaoAtiva: () => this.feicoes.editando,
|
|
8096
8078
|
aoLimparSelecao: () => this.feicoes.aoPedirLimpeza(),
|
|
8097
8079
|
selecionarFeicoesNaCaixa: (n, s, r) => this.feicoes.selecionarNaCaixa(n, s, r)
|
|
8098
|
-
}),
|
|
8080
|
+
}), Bn(this.shadow), So(this.shadow, !0);
|
|
8099
8081
|
}
|
|
8100
8082
|
static get observedAttributes() {
|
|
8101
8083
|
return [
|
|
@@ -8139,13 +8121,13 @@ class fr extends Ni {
|
|
|
8139
8121
|
this.ponteiroSobre = !0;
|
|
8140
8122
|
}), this.hoverListeners.add(this, "mouseleave", () => {
|
|
8141
8123
|
this.ponteiroSobre = !1;
|
|
8142
|
-
}), this.montarBarra(this.getAttribute("ferramentas")), this.broadcastConfig.conectar(), (o = this.desligarAnuncios) == null || o.call(this), this.desligarAnuncios =
|
|
8124
|
+
}), this.montarBarra(this.getAttribute("ferramentas")), this.broadcastConfig.conectar(), (o = this.desligarAnuncios) == null || o.call(this), this.desligarAnuncios = Un(this, this.shadow), this.estilosExternos.aplicar(), this.initTimeout = window.setTimeout(() => {
|
|
8143
8125
|
this.initTimeout = void 0, this.inicializarAgora();
|
|
8144
8126
|
}, 0);
|
|
8145
8127
|
}
|
|
8146
8128
|
montarBarra(e) {
|
|
8147
8129
|
var o;
|
|
8148
|
-
(o = this.barraFerramentas) == null || o.montar(
|
|
8130
|
+
(o = this.barraFerramentas) == null || o.montar(Qs(e), tr(e));
|
|
8149
8131
|
}
|
|
8150
8132
|
/** Único canvas da página: os atalhos valem em qualquer lugar (comportamento de sempre). Com vários, só no que está sob o mouse ou com foco. */
|
|
8151
8133
|
ehUnicoCanvas() {
|
|
@@ -8163,7 +8145,7 @@ class fr extends Ni {
|
|
|
8163
8145
|
}
|
|
8164
8146
|
destroy() {
|
|
8165
8147
|
var e;
|
|
8166
|
-
this.initTimeout && (window.clearTimeout(this.initTimeout), this.initTimeout = void 0), this.controladorTamanho.disconnect(), this.estilosExternos.limpar(), this.feicoes.pararEdicao(), this.feicoes.desativarFerramenta(), this.feicoes.limparMedicao(), this.feicoes.desconectarTeclado(), this.feicoes.destruir(), this.hoverListeners.cleanup(), (e = this.desligarAnuncios) == null || e.call(this), this.desligarAnuncios = null, this.broadcastConfig.desconectar(), this.limparDestaque(), this.toolbarPainel.limpar(), this.layerItemListeners.cleanup(), this.controller.destroy(),
|
|
8148
|
+
this.initTimeout && (window.clearTimeout(this.initTimeout), this.initTimeout = void 0), this.controladorTamanho.disconnect(), this.estilosExternos.limpar(), this.feicoes.pararEdicao(), this.feicoes.desativarFerramenta(), this.feicoes.limparMedicao(), this.feicoes.desconectarTeclado(), this.feicoes.destruir(), this.hoverListeners.cleanup(), (e = this.desligarAnuncios) == null || e.call(this), this.desligarAnuncios = null, this.broadcastConfig.desconectar(), this.limparDestaque(), this.toolbarPainel.limpar(), this.layerItemListeners.cleanup(), this.controller.destroy(), ci(this.mapContainer);
|
|
8167
8149
|
}
|
|
8168
8150
|
disconnectedCallback() {
|
|
8169
8151
|
this.destroy();
|
|
@@ -8190,8 +8172,8 @@ class fr extends Ni {
|
|
|
8190
8172
|
Gt(o) !== Gt(i) && ((c = this.controller) == null || c.layerManager.recriarCamadasDoTipo("feicoes"));
|
|
8191
8173
|
return;
|
|
8192
8174
|
}
|
|
8193
|
-
if (
|
|
8194
|
-
(l = this.feicoes) == null || l.definirEstiloDesenho(
|
|
8175
|
+
if (cr(e)) {
|
|
8176
|
+
(l = this.feicoes) == null || l.definirEstiloDesenho($o(this.feicoes.obterEstiloDesenho(), hr(e, i)));
|
|
8195
8177
|
return;
|
|
8196
8178
|
}
|
|
8197
8179
|
if (e === "aceitar-origem") {
|
|
@@ -8202,7 +8184,7 @@ class fr extends Ni {
|
|
|
8202
8184
|
this.montarBarra(i), (h = this.barraFerramentas) == null || h.marcar(((d = this.feicoes) == null ? void 0 : d.ferramentaAtiva) ?? null), (m = this.barraFerramentas) == null || m.marcarEdicao(!!((p = this.feicoes) != null && p.editando));
|
|
8203
8185
|
return;
|
|
8204
8186
|
}
|
|
8205
|
-
|
|
8187
|
+
qn(
|
|
8206
8188
|
{
|
|
8207
8189
|
host: this,
|
|
8208
8190
|
controller: this.controller,
|
|
@@ -8238,7 +8220,7 @@ class fr extends Ni {
|
|
|
8238
8220
|
this.estilosExternos.definir(e);
|
|
8239
8221
|
}
|
|
8240
8222
|
initCAD() {
|
|
8241
|
-
|
|
8223
|
+
$n({
|
|
8242
8224
|
host: this,
|
|
8243
8225
|
shadow: this.shadow,
|
|
8244
8226
|
mapContainer: this.mapContainer,
|
|
@@ -8268,11 +8250,11 @@ class fr extends Ni {
|
|
|
8268
8250
|
}
|
|
8269
8251
|
tratarCliqueLivreCanvas(e, o, i) {
|
|
8270
8252
|
const n = Date.now();
|
|
8271
|
-
n - this.lastCanvasClickTime < 50 || (this.lastCanvasClickTime = n,
|
|
8253
|
+
n - this.lastCanvasClickTime < 50 || (this.lastCanvasClickTime = n, Mn(this.obterContextoEventos(), e, o, i));
|
|
8272
8254
|
}
|
|
8273
8255
|
dispararAcaoPopup(e, o, i) {
|
|
8274
8256
|
const n = Date.now();
|
|
8275
|
-
this.lastPopupActionEmit && this.lastPopupActionEmit.acaoId === e && this.lastPopupActionEmit.elementoId === o && n - this.lastPopupActionEmit.time < 50 || (this.lastPopupActionEmit = { acaoId: e, elementoId: o, time: n },
|
|
8257
|
+
this.lastPopupActionEmit && this.lastPopupActionEmit.acaoId === e && this.lastPopupActionEmit.elementoId === o && n - this.lastPopupActionEmit.time < 50 || (this.lastPopupActionEmit = { acaoId: e, elementoId: o, time: n }, An(this.obterContextoEventos(), e, o, i));
|
|
8276
8258
|
}
|
|
8277
8259
|
toggleLayersPanel() {
|
|
8278
8260
|
this.hasAttribute("sem-painel-camadas") || this.toolbarPainel.toggleLayersPanel();
|
|
@@ -8282,7 +8264,7 @@ class fr extends Ni {
|
|
|
8282
8264
|
}
|
|
8283
8265
|
renderLayersUI() {
|
|
8284
8266
|
const e = this.shadow.getElementById("layers-list-container");
|
|
8285
|
-
|
|
8267
|
+
xn(e, this.controller.layerManager.getLayers(), this.layerItemListeners, {
|
|
8286
8268
|
setLayerVisibility: (o, i) => this.setLayerVisibility(o, i),
|
|
8287
8269
|
setLayerOpacity: (o, i) => this.setLayerOpacity(o, i),
|
|
8288
8270
|
setLayerBlocked: (o, i) => this.controller.layerManager.setLayerBlocked(o, i),
|
|
@@ -8411,11 +8393,11 @@ class fr extends Ni {
|
|
|
8411
8393
|
this.controller.selectPonto(e, o);
|
|
8412
8394
|
}
|
|
8413
8395
|
get pontosSelecionados() {
|
|
8414
|
-
return
|
|
8396
|
+
return Pn(this.controller);
|
|
8415
8397
|
}
|
|
8416
8398
|
set pontosSelecionados(e) {
|
|
8417
8399
|
const o = Array.isArray(e) ? e : [];
|
|
8418
|
-
|
|
8400
|
+
ri(this.controller, o), this.controller.atualizarDestaqueMarcadores();
|
|
8419
8401
|
}
|
|
8420
8402
|
atualizarDestaqueMarcadores() {
|
|
8421
8403
|
this.controller.atualizarDestaqueMarcadores();
|
|
@@ -8588,10 +8570,10 @@ class fr extends Ni {
|
|
|
8588
8570
|
* inválido é ignorado (a opção volta ao padrão). Os atributos `linha-*` fazem o mesmo.
|
|
8589
8571
|
*/
|
|
8590
8572
|
definirLinhaPadrao(e) {
|
|
8591
|
-
this.feicoes.definirEstiloDesenho(
|
|
8573
|
+
this.feicoes.definirEstiloDesenho($o(this.feicoes.obterEstiloDesenho(), e));
|
|
8592
8574
|
}
|
|
8593
8575
|
obterLinhaPadrao() {
|
|
8594
|
-
return
|
|
8576
|
+
return dr(this.feicoes.obterEstiloDesenho());
|
|
8595
8577
|
}
|
|
8596
8578
|
/**
|
|
8597
8579
|
* Ferramentas: ponto, linha, poligono, retangulo, elipse, poligono-regular, estrela, circulo, texto, caneta,
|
|
@@ -8704,8 +8686,8 @@ class fr extends Ni {
|
|
|
8704
8686
|
return this.controller.layerManager;
|
|
8705
8687
|
}
|
|
8706
8688
|
}
|
|
8707
|
-
|
|
8708
|
-
class
|
|
8689
|
+
Fi("ui-canvas-cad", ur);
|
|
8690
|
+
class Tr {
|
|
8709
8691
|
constructor(t, e) {
|
|
8710
8692
|
f(this, "polylines", []);
|
|
8711
8693
|
f(this, "bancoPontosAtivo", !1);
|
|
@@ -8761,7 +8743,7 @@ class _r {
|
|
|
8761
8743
|
const p = Xt(h);
|
|
8762
8744
|
if (p.length < 2) return;
|
|
8763
8745
|
for (let z = 0; z < p.length - 1; z++) {
|
|
8764
|
-
const
|
|
8746
|
+
const S = p[z], L = p[z + 1], b = [[S.lat, S.lon], [L.lat, L.lon]], x = y.polyline(b, {
|
|
8765
8747
|
color: "#080d0a",
|
|
8766
8748
|
weight: s + 3,
|
|
8767
8749
|
opacity: 0.85,
|
|
@@ -8848,7 +8830,7 @@ class _r {
|
|
|
8848
8830
|
this.core.map && this.polylines.forEach((t) => this.core.map.removeLayer(t)), this.core.bancoPontosGroup && this.core.bancoPontosGroup.clearLayers(), this.polylines = [];
|
|
8849
8831
|
}
|
|
8850
8832
|
}
|
|
8851
|
-
class
|
|
8833
|
+
class _r {
|
|
8852
8834
|
constructor(t, e) {
|
|
8853
8835
|
f(this, "markers", []);
|
|
8854
8836
|
f(this, "vizinhosMarkers", []);
|
|
@@ -8987,203 +8969,203 @@ class Dr {
|
|
|
8987
8969
|
}
|
|
8988
8970
|
}
|
|
8989
8971
|
export {
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8972
|
+
mi as ATRIBUTOS_LINHA_PADRAO,
|
|
8973
|
+
zi as AgrupadorCluster,
|
|
8974
|
+
bn as CADMapaController,
|
|
8975
|
+
Zi as CAD_INTERACTIVE_PANES,
|
|
8976
|
+
Or as CELULA_CLUSTER_PX,
|
|
8977
|
+
ko as CLASSE_FERRAMENTA_ATIVA,
|
|
8996
8978
|
Ue as COR_PADRAO,
|
|
8997
8979
|
Jt as COR_SELECAO,
|
|
8998
|
-
|
|
8999
|
-
|
|
8980
|
+
pi as CSS_POSICAO_HUD,
|
|
8981
|
+
bn as CanvasCADController,
|
|
9000
8982
|
ae as CanvasFormas,
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
8983
|
+
na as CanvasInteracao,
|
|
8984
|
+
an as CanvasLayerManager,
|
|
8985
|
+
Es as ControleDesenho,
|
|
8986
|
+
Qn as CursoresRemotos,
|
|
9005
8987
|
no as DEFAULT_CONFIG,
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
8988
|
+
Po as DEFAULT_LAYERS,
|
|
8989
|
+
Nr as DadosCamada,
|
|
8990
|
+
en as DespachanteFeicoes,
|
|
8991
|
+
Rs as EditorVertices,
|
|
9010
8992
|
Ve as FERRAMENTAS,
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
8993
|
+
ys as FOLGA_HUD,
|
|
8994
|
+
bs as FRACAO_LARGURA_HUD,
|
|
8995
|
+
ss as FeicaoPopup,
|
|
8996
|
+
tn as FeicoesCanvasRenderer,
|
|
8997
|
+
Va as FeicoesLayerRenderer,
|
|
8998
|
+
bn as GerenciGeoMapaController,
|
|
8999
|
+
ua as GridLayerRenderer,
|
|
9018
9000
|
$e as ICONES_FEICAO,
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9001
|
+
Ps as ID_HUD_DESENHO,
|
|
9002
|
+
Ds as ID_HUD_EDICAO,
|
|
9003
|
+
Li as IndiceEspacial,
|
|
9004
|
+
Rr as InternadorEstilos,
|
|
9023
9005
|
_e as LIMIAR_DENSIDADE_ALTA,
|
|
9024
9006
|
ye as LIMITE_CULLING,
|
|
9025
|
-
|
|
9007
|
+
Br as LIMITE_MARCA_PX,
|
|
9026
9008
|
O as LayerRendererFactory,
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9009
|
+
vs as MARGEM_HUD_PADRAO,
|
|
9010
|
+
Ea as MAX_NOS_COM_ALCA_LATENTE,
|
|
9011
|
+
Vr as MAX_PONTOS_SEM_CLUSTER,
|
|
9012
|
+
Pa as MAX_VERTICES_EDICAO,
|
|
9013
|
+
Ci as MIN_VERTICES_SIMPLIFICAR,
|
|
9032
9014
|
Ie as MapaConfigManager,
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9015
|
+
Wi as MapaCore,
|
|
9016
|
+
Tr as MapaLinhas,
|
|
9017
|
+
_r as MapaMarcadores,
|
|
9018
|
+
ki as MotorFormas,
|
|
9019
|
+
jr as OPACIDADE_MARCA,
|
|
9038
9020
|
we as PROPRIEDADES_HUD,
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9021
|
+
ni as PintorCanvas2D,
|
|
9022
|
+
Ce as RAIO_MINIMO_CIRCULO_M,
|
|
9023
|
+
Ca as RAIO_MINIMO_EDICAO_CIRCULO_M,
|
|
9042
9024
|
We as RegraVersoes,
|
|
9043
|
-
|
|
9025
|
+
ts as SelecaoFeicoes,
|
|
9044
9026
|
Ae as SessaoDesenho,
|
|
9045
|
-
|
|
9046
|
-
|
|
9027
|
+
Hr as TIPOS_LINHA,
|
|
9028
|
+
_a as TOLERANCIA_AMOSTRA_PX,
|
|
9047
9029
|
he as TOLERANCIA_LINHA_PX,
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9030
|
+
Yi as TOLERANCIA_PONTO_PX,
|
|
9031
|
+
fi as TOLERANCIA_SNAP_PX,
|
|
9032
|
+
sa as TileLayerRenderer,
|
|
9033
|
+
ur as UICanvasCAD,
|
|
9034
|
+
ca as VectorLinesLayerRenderer,
|
|
9035
|
+
da as VectorPointsLayerRenderer,
|
|
9036
|
+
ha as VectorPolygonsLayerRenderer,
|
|
9037
|
+
ra as WmsLayerRenderer,
|
|
9038
|
+
Gr as ZOOM_DESMEMBRAR,
|
|
9057
9039
|
to as ZOOM_SEM_SIMPLIFICACAO,
|
|
9058
|
-
|
|
9059
|
-
|
|
9040
|
+
Ur as agruparMarcasPorCor,
|
|
9041
|
+
Wr as agruparPontos,
|
|
9060
9042
|
Zt as agruparPontosPorChave,
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9043
|
+
ka as alcaLatente,
|
|
9044
|
+
Ta as alternarSuavidade,
|
|
9045
|
+
ms as amostrarBezier,
|
|
9046
|
+
xs as aplicarMargensHud,
|
|
9065
9047
|
dt as areaDaGeometria,
|
|
9066
|
-
|
|
9048
|
+
Zr as areaMetros2,
|
|
9067
9049
|
kt as bindPopupAcoesEvents,
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9050
|
+
Vs as buscarSnap,
|
|
9051
|
+
Xr as caixaDaFeicao,
|
|
9052
|
+
Yr as caixaPx,
|
|
9071
9053
|
_t as caixasSeTocam,
|
|
9072
|
-
|
|
9054
|
+
Kr as centroDe,
|
|
9073
9055
|
ge as clonarFeicao,
|
|
9074
|
-
|
|
9056
|
+
yo as comPontos,
|
|
9075
9057
|
le as comVertices,
|
|
9076
9058
|
No as comprimentoMetros,
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9059
|
+
kr as confrontanteParaFeicao,
|
|
9060
|
+
Ho as consultarFeicoesNoPonto,
|
|
9061
|
+
xo as contarItensCanvas,
|
|
9080
9062
|
Sr as converterArea,
|
|
9081
|
-
|
|
9063
|
+
Lr as converterComprimento,
|
|
9082
9064
|
ne as coordenadaDeReferencia,
|
|
9083
9065
|
Be as corHexSegura,
|
|
9084
9066
|
ot as corSegura,
|
|
9085
|
-
|
|
9067
|
+
En as criarControladorTamanho,
|
|
9086
9068
|
Kt as criarLinha,
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9069
|
+
Jr as dashTipoLinha,
|
|
9070
|
+
Cr as ddParaDms,
|
|
9071
|
+
xa as deslocarGeometria,
|
|
9090
9072
|
oo as deveAgrupar,
|
|
9091
9073
|
eo as diagonalPx,
|
|
9092
|
-
|
|
9074
|
+
Ar as distanciaEntre,
|
|
9093
9075
|
xt as distanciaMetros,
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9076
|
+
pa as dividirPoligonoComLinha,
|
|
9077
|
+
Mr as dmsParaDd,
|
|
9078
|
+
ui as ehFerramenta,
|
|
9079
|
+
Ai as ehMarca,
|
|
9098
9080
|
Yt as ehMultilinha,
|
|
9099
|
-
|
|
9081
|
+
Qr as ehTipoLinha,
|
|
9100
9082
|
ct as entidadeDe,
|
|
9101
9083
|
se as entradaDaAncora,
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9084
|
+
tc as escalaDoZoom,
|
|
9085
|
+
ec as escalaLatitude,
|
|
9086
|
+
oc as escalaTipoLinhaSegura,
|
|
9105
9087
|
T as escapeHtml,
|
|
9106
9088
|
ke as estiloVetorDe,
|
|
9107
9089
|
ht as extensaoDaGeometria,
|
|
9108
9090
|
Je as extrairCentroDeWkt,
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9091
|
+
la as extrairCorPonto,
|
|
9092
|
+
Uo as fatorDensidade,
|
|
9093
|
+
Ws as feicaoNaCaixa,
|
|
9094
|
+
Zs as feicaoNoLaco,
|
|
9113
9095
|
de as feicaoNoPonto,
|
|
9114
|
-
|
|
9115
|
-
|
|
9096
|
+
Pr as feicaoNoTopo,
|
|
9097
|
+
$r as formatUTM,
|
|
9116
9098
|
Lt as formatarArea,
|
|
9117
9099
|
W as formatarExtensao,
|
|
9118
|
-
|
|
9119
|
-
|
|
9100
|
+
Ji as garantirCanvasSemEventos,
|
|
9101
|
+
ba as gerarBuffer,
|
|
9120
9102
|
oe as getPointShapeHtml,
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9103
|
+
wa as inserirPonto,
|
|
9104
|
+
La as inserirVertice,
|
|
9105
|
+
Di as juncaoCanvas,
|
|
9106
|
+
fa as juntarLinhas,
|
|
9107
|
+
va as juntarPoligonos,
|
|
9108
|
+
wi as ladoMarca,
|
|
9127
9109
|
ao as latLonDoMundo,
|
|
9128
9110
|
Gt as lerModoRenderizador,
|
|
9129
|
-
|
|
9111
|
+
Ti as limitesDaGeometria,
|
|
9130
9112
|
je as metrosPorGrau,
|
|
9131
|
-
|
|
9113
|
+
ic as metrosPorPixel,
|
|
9132
9114
|
ce as minimoVertices,
|
|
9133
9115
|
De as modoDensidade,
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9116
|
+
Ia as moverAlca,
|
|
9117
|
+
wr as moverVertice,
|
|
9118
|
+
di as normalizarAnel,
|
|
9137
9119
|
Z as normalizarCoordenada,
|
|
9138
9120
|
Le as normalizarFeicaoEntrada,
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9121
|
+
Co as normalizarLinha,
|
|
9122
|
+
Zn as normalizarPoligono,
|
|
9123
|
+
$i as normalizarTipoLinha,
|
|
9142
9124
|
K as nosDe,
|
|
9143
9125
|
Ut as nosDeAncoras,
|
|
9144
9126
|
It as nosOuVertices,
|
|
9145
9127
|
Xt as ordenarPontosPorSequencia,
|
|
9146
9128
|
V as parseCoordenada,
|
|
9147
|
-
|
|
9129
|
+
Ha as parseDash,
|
|
9148
9130
|
it as partesDaLinha,
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9131
|
+
Pi as pintarMarcas,
|
|
9132
|
+
Ma as pontoDaBordaDoCirculo,
|
|
9133
|
+
ti as pontoMedio,
|
|
9152
9134
|
zt as pontoMedioDoSegmento,
|
|
9153
|
-
|
|
9154
|
-
|
|
9135
|
+
Ko as pontoNoPoligono,
|
|
9136
|
+
zr as pontoParaFeicao,
|
|
9155
9137
|
pt as pontosDe,
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9138
|
+
Ir as posicaoHud,
|
|
9139
|
+
An as processarAcaoPopup,
|
|
9140
|
+
Mn as processarCliqueLivreCanvas,
|
|
9141
|
+
ac as projetarCentro,
|
|
9142
|
+
nc as projetarEm,
|
|
9143
|
+
sc as projetarMercator,
|
|
9144
|
+
rc as projetarVertices,
|
|
9145
|
+
cc as raioCirculoPx,
|
|
9164
9146
|
io as raioPontoPx,
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9147
|
+
Ua as regioesExpostas,
|
|
9148
|
+
Vo as registrarFonteHit,
|
|
9149
|
+
jo as removerFonteHit,
|
|
9150
|
+
za as removerPonto,
|
|
9151
|
+
Sa as removerVertice,
|
|
9170
9152
|
Et as renderPopupAcoesHtml,
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9153
|
+
xn as renderizarPainelCamadas,
|
|
9154
|
+
aa as resolverCliqueCentral,
|
|
9155
|
+
Er as segmentoParaFeicao,
|
|
9156
|
+
ei as segmentosDe,
|
|
9157
|
+
oi as segmentosDoEditor,
|
|
9158
|
+
lc as simplificarAnel,
|
|
9159
|
+
Mi as simplificarGeometria,
|
|
9160
|
+
dc as simplificarLinha,
|
|
9161
|
+
hc as simplificarPx,
|
|
9180
9162
|
mt as statusDe,
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9163
|
+
qi as terminacaoCanvas,
|
|
9164
|
+
Ei as textoRotulo,
|
|
9165
|
+
uc as toleranciaPorZoom,
|
|
9166
|
+
wn as tratarCliqueMarcador,
|
|
9167
|
+
zn as tratarCliqueSegmento,
|
|
9168
|
+
vo as verificarEditavel,
|
|
9187
9169
|
Si as vertices,
|
|
9188
9170
|
X as verticesDe
|
|
9189
9171
|
};
|