@thibezer/ui-components-kit 2.28.0 → 2.28.1
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 +23 -0
- package/dist/camadas.cjs +85 -85
- package/dist/camadas.js +1167 -1055
- package/dist/campo-texto.cjs +2 -2
- package/dist/campo-texto.js +29 -29
- package/dist/components/ui-area-texto/ui-area-texto.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-selecao-api.d.ts +1 -0
- package/dist/components/ui-camadas/camadas-selecao.d.ts +17 -2
- package/dist/components/ui-camadas/camadas-sincronizacao-dom.d.ts +2 -0
- package/dist/components/ui-camadas/tipos.d.ts +2 -0
- package/dist/components/ui-camadas/ui-camadas.d.ts +2 -0
- package/dist/components/ui-campo-texto/ui-campo-texto.d.ts +3 -0
- package/dist/components/ui-tabela/tabela-corpo.d.ts +10 -0
- package/dist/components/ui-tabela/tabela-declarativa.d.ts +11 -0
- package/dist/components/ui-tabela/tabela-dom.d.ts +1 -0
- package/dist/components/ui-tabela/tabela-header.d.ts +1 -0
- package/dist/components/ui-tabela/tabela-renderizador.d.ts +4 -0
- package/dist/components/ui-tabela/tipos.d.ts +11 -0
- package/dist/components/ui-tabela/ui-tabela.d.ts +22 -2
- package/dist/components/ui-tabela-propriedades/editores-basicos.d.ts +6 -6
- package/dist/components/ui-tabela-propriedades/editores-cad.d.ts +5 -5
- package/dist/components/ui-tabela-propriedades/propriedades-dom-utils.d.ts +6 -4
- package/dist/components/ui-tabela-propriedades/propriedades-editores.d.ts +2 -2
- package/dist/components/ui-tabela-propriedades/propriedades-flutuante.d.ts +1 -1
- package/dist/components/ui-tabela-propriedades/propriedades-gerenciador-valores.d.ts +11 -11
- package/dist/components/ui-tabela-propriedades/propriedades-render-arvore.d.ts +4 -4
- package/dist/components/ui-tabela-propriedades/propriedades-splitter.d.ts +1 -0
- package/dist/components/ui-tabela-propriedades/propriedades-valor-misto.d.ts +9 -5
- package/dist/components/ui-tabela-propriedades/tipos.d.ts +10 -8
- package/dist/components/ui-tabela-propriedades/ui-tabela-propriedades.d.ts +9 -7
- package/dist/custom-elements.json +28721 -28106
- package/dist/data.cjs +1 -1
- package/dist/data.js +107 -100
- package/dist/forms.cjs +7 -7
- package/dist/forms.js +24 -24
- package/dist/index.cjs +7 -7
- package/dist/index.js +228 -219
- package/dist/tabela.cjs +8 -8
- package/dist/tabela.js +1367 -1136
- package/dist/tipos-elementos.d.ts +28 -8
- package/dist/tipos-vue.d.ts +30 -12
- package/package.json +1 -1
package/dist/camadas.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var Ga = Object.defineProperty;
|
|
2
|
+
var _a = (e, t, a) => t in e ? Ga(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
|
+
var E = (e, t, a) => _a(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { h as
|
|
6
|
-
import { a as
|
|
7
|
-
import { UIMapaBase as
|
|
8
|
-
const
|
|
5
|
+
import { h as Ze, K as Va, S as Ua, A as Ya, L as Ne, g as He, s as Ka, d as Pe } from "./kit-base-CBXA66aM.js";
|
|
6
|
+
import { a as Qa } from "./ui-seletor-cor-CPjA9vhZ.js";
|
|
7
|
+
import { UIMapaBase as Br, UISeletorMapaBase as qr } from "./seletor-mapa-base.js";
|
|
8
|
+
const y = {
|
|
9
9
|
camadas: `<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
10
10
|
<polygon points="12 2 2 7 12 12 22 7 12 2"></polygon>
|
|
11
11
|
<polyline points="2 17 12 22 22 17"></polyline>
|
|
@@ -103,27 +103,28 @@ const b = {
|
|
|
103
103
|
<line x1="9" y1="3" x2="9" y2="21"></line>
|
|
104
104
|
<line x1="15" y1="3" x2="15" y2="21"></line>
|
|
105
105
|
</svg>`
|
|
106
|
-
},
|
|
107
|
-
function
|
|
106
|
+
}, ae = 6378137;
|
|
107
|
+
function Xa(e, t) {
|
|
108
108
|
if (!Array.isArray(e) || !Array.isArray(t) || e.length < 2 || t.length < 2 || !Number.isFinite(e[0]) || !Number.isFinite(e[1]) || !Number.isFinite(t[0]) || !Number.isFinite(t[1]))
|
|
109
109
|
return 0;
|
|
110
|
-
const a = e[0] * Math.PI / 180, r = e[1] * Math.PI / 180, i = t[0] * Math.PI / 180, o = t[1] * Math.PI / 180, n = i - a, s = o - r,
|
|
110
|
+
const a = e[0] * Math.PI / 180, r = e[1] * Math.PI / 180, i = t[0] * Math.PI / 180, o = t[1] * Math.PI / 180, n = i - a, s = o - r, c = Math.min(
|
|
111
111
|
1,
|
|
112
112
|
Math.max(
|
|
113
113
|
0,
|
|
114
114
|
Math.sin(n / 2) * Math.sin(n / 2) + Math.cos(a) * Math.cos(i) * Math.sin(s / 2) * Math.sin(s / 2)
|
|
115
115
|
)
|
|
116
|
-
), l =
|
|
116
|
+
), l = ae * 2 * Math.atan2(Math.sqrt(c), Math.sqrt(1 - c));
|
|
117
117
|
return Number.isFinite(l) ? l : 0;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
if (!Array.isArray(e) || e.length
|
|
119
|
+
function ea(e) {
|
|
120
|
+
if (!Array.isArray(e) || e.length === 0) return 0;
|
|
121
121
|
if (Array.isArray(e[0]) && Array.isArray(e[0][0]))
|
|
122
|
-
return e.reduce((a, r) => a +
|
|
122
|
+
return e.reduce((a, r) => a + ea(r), 0);
|
|
123
|
+
if (e.length < 2) return 0;
|
|
123
124
|
let t = 0;
|
|
124
125
|
for (let a = 0; a < e.length - 1; a++) {
|
|
125
126
|
const r = e[a], i = e[a + 1];
|
|
126
|
-
Array.isArray(r) && Array.isArray(i) && r.length >= 2 && i.length >= 2 && (t +=
|
|
127
|
+
Array.isArray(r) && Array.isArray(i) && r.length >= 2 && i.length >= 2 && (t += Xa([r[0], r[1]], [i[0], i[1]]));
|
|
127
128
|
}
|
|
128
129
|
return t;
|
|
129
130
|
}
|
|
@@ -131,8 +132,8 @@ function Ae(e) {
|
|
|
131
132
|
if (!Array.isArray(e)) return 0;
|
|
132
133
|
const t = [];
|
|
133
134
|
for (let p = 0; p < e.length; p++) {
|
|
134
|
-
const
|
|
135
|
-
Array.isArray(
|
|
135
|
+
const u = e[p];
|
|
136
|
+
Array.isArray(u) && u.length >= 2 && Number.isFinite(u[0]) && Number.isFinite(u[1]) && t.push([u[0], u[1]]);
|
|
136
137
|
}
|
|
137
138
|
t.length > 3 && t[0][0] === t[t.length - 1][0] && t[0][1] === t[t.length - 1][1] && t.pop();
|
|
138
139
|
const a = t.length;
|
|
@@ -140,22 +141,22 @@ function Ae(e) {
|
|
|
140
141
|
let r = 0;
|
|
141
142
|
for (let p = 0; p < a; p++)
|
|
142
143
|
r += t[p][0];
|
|
143
|
-
const i = r / a * Math.PI / 180, o = Math.cos(i), n = Math.PI / 180, s = t[0][0],
|
|
144
|
+
const i = r / a * Math.PI / 180, o = Math.cos(i), n = Math.PI / 180, s = t[0][0], c = t[0][1];
|
|
144
145
|
let l = 0;
|
|
145
146
|
for (let p = 0; p < a; p++) {
|
|
146
|
-
const
|
|
147
|
-
l += m *
|
|
147
|
+
const u = t[p], f = t[(p + 1) % a], m = (u[1] - c) * n * ae * o, g = (u[0] - s) * n * ae, b = (f[1] - c) * n * ae * o, h = (f[0] - s) * n * ae;
|
|
148
|
+
l += m * h - b * g;
|
|
148
149
|
}
|
|
149
|
-
const
|
|
150
|
-
return Number.isFinite(
|
|
150
|
+
const d = Math.abs(l) / 2;
|
|
151
|
+
return Number.isFinite(d) ? d : 0;
|
|
151
152
|
}
|
|
152
|
-
function
|
|
153
|
+
function aa(e) {
|
|
153
154
|
if (!Array.isArray(e) || e.length === 0) return 0;
|
|
154
155
|
if (Array.isArray(e[0]) && typeof e[0][0] == "number")
|
|
155
156
|
return Ae(e);
|
|
156
157
|
if (Array.isArray(e[0]) && Array.isArray(e[0][0])) {
|
|
157
158
|
if (Array.isArray(e[0][0][0]))
|
|
158
|
-
return e.reduce((r, i) => r +
|
|
159
|
+
return e.reduce((r, i) => r + aa(i), 0);
|
|
159
160
|
const t = Ae(e[0]);
|
|
160
161
|
let a = 0;
|
|
161
162
|
for (let r = 1; r < e.length; r++)
|
|
@@ -164,53 +165,55 @@ function Je(e) {
|
|
|
164
165
|
}
|
|
165
166
|
return 0;
|
|
166
167
|
}
|
|
167
|
-
function
|
|
168
|
+
function Sr(e) {
|
|
168
169
|
if (!e || e.length === 0) return "";
|
|
169
|
-
const t = e.filter(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
const t = (i) => i.type || i.geometryType, a = e.filter((i) => {
|
|
171
|
+
const o = t(i);
|
|
172
|
+
return o === "Polygon" || o === "MultiPolygon";
|
|
173
|
+
});
|
|
174
|
+
if (a.length > 0) {
|
|
175
|
+
const i = a.reduce(
|
|
176
|
+
(o, n) => o + (aa(n.coordinates) || 0),
|
|
175
177
|
0
|
|
176
178
|
);
|
|
177
|
-
return
|
|
179
|
+
return i >= 1e4 ? `${(i / 1e4).toLocaleString("pt-BR", {
|
|
178
180
|
minimumFractionDigits: 1,
|
|
179
181
|
maximumFractionDigits: 2
|
|
180
|
-
})} ha` : `${Math.round(
|
|
182
|
+
})} ha` : `${Math.round(i).toLocaleString("pt-BR")} m²`;
|
|
181
183
|
}
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
const r = e.filter((i) => {
|
|
185
|
+
const o = t(i);
|
|
186
|
+
return o === "LineString" || o === "MultiLineString";
|
|
187
|
+
});
|
|
188
|
+
if (r.length > 0) {
|
|
189
|
+
const i = r.reduce(
|
|
190
|
+
(o, n) => o + (ea(n.coordinates) || 0),
|
|
188
191
|
0
|
|
189
192
|
);
|
|
190
|
-
return
|
|
193
|
+
return i >= 1e3 ? `${(i / 1e3).toLocaleString("pt-BR", {
|
|
191
194
|
minimumFractionDigits: 1,
|
|
192
195
|
maximumFractionDigits: 2
|
|
193
|
-
})} km` : `${Math.round(
|
|
196
|
+
})} km` : `${Math.round(i).toLocaleString("pt-BR")} m`;
|
|
194
197
|
}
|
|
195
198
|
return "";
|
|
196
199
|
}
|
|
197
|
-
function
|
|
200
|
+
function M(e) {
|
|
198
201
|
return e == null ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
199
202
|
}
|
|
200
|
-
const
|
|
201
|
-
function
|
|
203
|
+
const Wa = /^(#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|(?:rgb|hsl)a?\(\s*[\w.%\s,/+-]+\)|[a-z]{3,30})$/i;
|
|
204
|
+
function J(e, t = "#00E08A") {
|
|
202
205
|
if (!e || typeof e != "string") return t;
|
|
203
206
|
const a = e.trim();
|
|
204
|
-
return
|
|
207
|
+
return Wa.test(a) ? a : t;
|
|
205
208
|
}
|
|
206
209
|
function Ee(e) {
|
|
207
210
|
return Math.max(0, Math.min(255, Math.round(e))).toString(16).padStart(2, "0");
|
|
208
211
|
}
|
|
209
|
-
function
|
|
210
|
-
const r = t / 100, i = a / 100, o = (
|
|
212
|
+
function Ja(e, t, a) {
|
|
213
|
+
const r = t / 100, i = a / 100, o = (c) => (c + e / 30) % 12, n = r * Math.min(i, 1 - i), s = (c) => i - n * Math.max(-1, Math.min(o(c) - 3, Math.min(9 - o(c), 1)));
|
|
211
214
|
return [s(0) * 255, s(8) * 255, s(4) * 255];
|
|
212
215
|
}
|
|
213
|
-
function
|
|
216
|
+
function Za(e, t = "#000000") {
|
|
214
217
|
if (!e || typeof e != "string") return t;
|
|
215
218
|
const a = e.trim().toLowerCase(), r = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(a);
|
|
216
219
|
if (r) {
|
|
@@ -221,19 +224,19 @@ function Ua(e, t = "#000000") {
|
|
|
221
224
|
if (i) {
|
|
222
225
|
const o = i[2].split(/[\s,/]+/).filter(Boolean).map((n) => parseFloat(n));
|
|
223
226
|
if (o.length >= 3 && o.slice(0, 3).every((n) => !isNaN(n))) {
|
|
224
|
-
const [n, s,
|
|
225
|
-
return `#${Ee(l)}${Ee(
|
|
227
|
+
const [n, s, c] = o, [l, d, p] = i[1] === "rgb" ? [n, s, c] : Ja(n, s, c);
|
|
228
|
+
return `#${Ee(l)}${Ee(d)}${Ee(p)}`;
|
|
226
229
|
}
|
|
227
230
|
}
|
|
228
231
|
return t;
|
|
229
232
|
}
|
|
230
|
-
function
|
|
233
|
+
function D(e, t, a) {
|
|
231
234
|
const r = e.querySelectorAll(`[${t}]`);
|
|
232
235
|
for (let i = 0; i < r.length; i++)
|
|
233
236
|
if (r[i].getAttribute(t) === a) return r[i];
|
|
234
237
|
return null;
|
|
235
238
|
}
|
|
236
|
-
function
|
|
239
|
+
function ta(e, t = 80) {
|
|
237
240
|
let a = null;
|
|
238
241
|
return (...r) => {
|
|
239
242
|
a && clearTimeout(a), a = setTimeout(() => {
|
|
@@ -241,10 +244,10 @@ function Ze(e, t = 80) {
|
|
|
241
244
|
}, t);
|
|
242
245
|
};
|
|
243
246
|
}
|
|
244
|
-
function
|
|
247
|
+
function j(e, t) {
|
|
245
248
|
e.setAttribute("title", t), e.setAttribute("aria-label", t);
|
|
246
249
|
}
|
|
247
|
-
const
|
|
250
|
+
const ra = [
|
|
248
251
|
{
|
|
249
252
|
id: "none",
|
|
250
253
|
nome: "Sem Mapa",
|
|
@@ -287,17 +290,17 @@ const ea = [
|
|
|
287
290
|
thumbnailUrl: "https://images.unsplash.com/photo-1518709268805-4e9042af9f23?w=160&auto=format&fit=crop&q=80"
|
|
288
291
|
}
|
|
289
292
|
];
|
|
290
|
-
function
|
|
293
|
+
function ia(e, t) {
|
|
291
294
|
const a = Array.isArray(e) ? e.find((r) => r.id === t) : void 0;
|
|
292
295
|
return a && typeof a.nome == "string" ? a.nome : "";
|
|
293
296
|
}
|
|
294
|
-
function
|
|
297
|
+
function et(e = ra, t = "satelite", a = !1) {
|
|
295
298
|
if (!e || e.length === 0) return "";
|
|
296
299
|
const r = e.map((i) => {
|
|
297
|
-
const o = t === i.id, n =
|
|
300
|
+
const o = t === i.id, n = M(i.id), s = M(i.nome), c = M(i.descricao || i.nome);
|
|
298
301
|
let l = "";
|
|
299
|
-
return i.thumbnailUrl ? l = `<img class="ui-basemap-preview" src="${
|
|
300
|
-
<div class="ui-basemap-card ${o ? "active" : ""}" data-basemap-id="${n}" role="button" tabindex="0" aria-pressed="${o}" title="${
|
|
302
|
+
return i.thumbnailUrl ? l = `<img class="ui-basemap-preview" src="${M(i.thumbnailUrl)}" alt="" loading="lazy" referrerpolicy="no-referrer" data-basemap-thumb />` : l = `<div class="ui-basemap-preview-none">${y.gradeCad}</div>`, `
|
|
303
|
+
<div class="ui-basemap-card ${o ? "active" : ""}" data-basemap-id="${n}" role="button" tabindex="0" aria-pressed="${o}" title="${c}">
|
|
301
304
|
${l}
|
|
302
305
|
<span>${s}</span>
|
|
303
306
|
</div>
|
|
@@ -307,8 +310,8 @@ function Ya(e = ea, t = "satelite", a = !1) {
|
|
|
307
310
|
<div class="ui-basemap-section ${a ? "recolhido" : ""}" part="mapas-base">
|
|
308
311
|
<button type="button" class="ui-basemap-toggle" data-basemap-toggle="alternar" aria-expanded="${!a}" aria-controls="ui-basemap-grid" title="${a ? "Mostrar mapas base" : "Recolher mapas base"}">
|
|
309
312
|
<span class="ui-basemap-title">Mapa Base</span>
|
|
310
|
-
<span class="ui-basemap-atual" data-basemap-atual>${
|
|
311
|
-
<span class="ui-chevron-icon ${a ? "" : "open"}">${
|
|
313
|
+
<span class="ui-basemap-atual" data-basemap-atual>${M(ia(e, t))}</span>
|
|
314
|
+
<span class="ui-chevron-icon ${a ? "" : "open"}">${y.chevronDir}</span>
|
|
312
315
|
</button>
|
|
313
316
|
${a ? "" : `<div class="ui-basemap-grid" id="ui-basemap-grid">
|
|
314
317
|
${r}
|
|
@@ -316,50 +319,50 @@ function Ya(e = ea, t = "satelite", a = !1) {
|
|
|
316
319
|
</div>
|
|
317
320
|
`;
|
|
318
321
|
}
|
|
319
|
-
function
|
|
322
|
+
function oe(e) {
|
|
320
323
|
if (!Array.isArray(e) || e.length === 0) return [];
|
|
321
324
|
const t = e.filter((l) => !!(l && typeof l == "object" && l.id)), a = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
322
|
-
t.forEach((l,
|
|
323
|
-
a.set(l.id, l), r.set(l.id,
|
|
325
|
+
t.forEach((l, d) => {
|
|
326
|
+
a.set(l.id, l), r.set(l.id, d);
|
|
324
327
|
});
|
|
325
328
|
const i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
326
329
|
for (const l of t) {
|
|
327
330
|
if (o.has(l.id)) continue;
|
|
328
|
-
const
|
|
329
|
-
let
|
|
330
|
-
for (;
|
|
331
|
-
if (p.has(
|
|
332
|
-
const f = p.get(
|
|
333
|
-
let
|
|
334
|
-
for (const
|
|
335
|
-
(r.get(
|
|
336
|
-
i.add(
|
|
331
|
+
const d = [], p = /* @__PURE__ */ new Map();
|
|
332
|
+
let u = l;
|
|
333
|
+
for (; u && u.parentId && a.has(u.parentId) && u.parentId !== u.id; ) {
|
|
334
|
+
if (p.has(u.id)) {
|
|
335
|
+
const f = p.get(u.id), m = d.slice(f);
|
|
336
|
+
let g = m[0];
|
|
337
|
+
for (const b of m)
|
|
338
|
+
(r.get(b) ?? 1 / 0) < (r.get(g) ?? 1 / 0) && (g = b);
|
|
339
|
+
i.add(g);
|
|
337
340
|
break;
|
|
338
341
|
}
|
|
339
|
-
if (o.has(
|
|
340
|
-
p.set(
|
|
342
|
+
if (o.has(u.id)) break;
|
|
343
|
+
p.set(u.id, d.length), d.push(u.id), u = a.get(u.parentId);
|
|
341
344
|
}
|
|
342
|
-
for (const f of
|
|
345
|
+
for (const f of d) o.add(f);
|
|
343
346
|
}
|
|
344
347
|
const n = /* @__PURE__ */ new Map(), s = [];
|
|
345
348
|
t.forEach((l) => {
|
|
346
349
|
!i.has(l.id) && !!(l.parentId && a.has(l.parentId) && l.parentId !== l.id) && l.parentId ? (n.has(l.parentId) || n.set(l.parentId, []), n.get(l.parentId).push(l)) : s.push(l);
|
|
347
350
|
});
|
|
348
|
-
function
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
+
function c(l, d, p) {
|
|
352
|
+
const u = new Set(p);
|
|
353
|
+
u.add(l.id);
|
|
351
354
|
const m = (n.get(l.id) || (Array.isArray(l.children) ? l.children : [])).filter(
|
|
352
|
-
(
|
|
355
|
+
(g) => !!(g && typeof g == "object" && g.id && !u.has(g.id))
|
|
353
356
|
);
|
|
354
357
|
return {
|
|
355
358
|
camada: l,
|
|
356
|
-
depth:
|
|
357
|
-
subcamadas: m.map((
|
|
359
|
+
depth: d,
|
|
360
|
+
subcamadas: m.map((g) => c(g, d + 1, u))
|
|
358
361
|
};
|
|
359
362
|
}
|
|
360
|
-
return s.map((l) =>
|
|
363
|
+
return s.map((l) => c(l, 0, /* @__PURE__ */ new Set()));
|
|
361
364
|
}
|
|
362
|
-
function
|
|
365
|
+
function Be(e, t) {
|
|
363
366
|
const a = /* @__PURE__ */ new Set();
|
|
364
367
|
if (!t || !Array.isArray(e)) return a;
|
|
365
368
|
const r = /* @__PURE__ */ new Map();
|
|
@@ -377,9 +380,9 @@ function Ka(e, t) {
|
|
|
377
380
|
}
|
|
378
381
|
return a;
|
|
379
382
|
}
|
|
380
|
-
function
|
|
383
|
+
function at(e, t, a) {
|
|
381
384
|
if (!a || !Array.isArray(t) || t.length === 0) return [];
|
|
382
|
-
const r =
|
|
385
|
+
const r = Be(e, a);
|
|
383
386
|
return t.filter((i) => !!(i && i.layerId && r.has(i.layerId)));
|
|
384
387
|
}
|
|
385
388
|
function he(e) {
|
|
@@ -396,7 +399,7 @@ function he(e) {
|
|
|
396
399
|
}
|
|
397
400
|
return a;
|
|
398
401
|
}
|
|
399
|
-
function
|
|
402
|
+
function fe(e) {
|
|
400
403
|
const t = he(e);
|
|
401
404
|
return new Set(
|
|
402
405
|
e.filter((a) => {
|
|
@@ -405,24 +408,24 @@ function pe(e) {
|
|
|
405
408
|
}).map((a) => a.id)
|
|
406
409
|
);
|
|
407
410
|
}
|
|
408
|
-
function
|
|
409
|
-
const t =
|
|
410
|
-
const o = i.camada, n = i.depth, s = i.subcamadas,
|
|
411
|
-
return
|
|
411
|
+
function oa(e) {
|
|
412
|
+
const t = oe(e), a = fe(e), r = (i) => {
|
|
413
|
+
const o = i.camada, n = i.depth, s = i.subcamadas, c = n > 0 ? " ".repeat(n) + "↳ " : s.length > 0 || o.isGroup ? "📁 " : "", l = a.has(o.id), d = `<option value="${M(o.id)}"${l ? " disabled" : ""}>${c}${M(o.name)}${l ? " 🔒" : ""}</option>`, p = s.map((u) => r(u)).join("");
|
|
414
|
+
return d + p;
|
|
412
415
|
};
|
|
413
416
|
return t.map((i) => r(i)).join("");
|
|
414
417
|
}
|
|
415
|
-
function
|
|
418
|
+
function na(e, t) {
|
|
416
419
|
return t > 0 ? {
|
|
417
|
-
icone:
|
|
420
|
+
icone: y.alvoEnquadrar,
|
|
418
421
|
texto: `${t} ${t > 1 ? "selecionados" : "selecionado"}`
|
|
419
422
|
} : {
|
|
420
|
-
icone:
|
|
423
|
+
icone: y.camadas,
|
|
421
424
|
texto: `${e} ${e > 1 ? "camadas" : "camada"}`
|
|
422
425
|
};
|
|
423
426
|
}
|
|
424
|
-
function
|
|
425
|
-
const r = t.filter((
|
|
427
|
+
function tt(e, t, a) {
|
|
428
|
+
const r = t.filter((c) => a.has(c.id)), i = r.length > 0, o = i ? r.length : e.length, n = na(e.length, r.length), s = oa(e);
|
|
426
429
|
return `
|
|
427
430
|
<div class="ui-tree-footer ${i ? "tem-selecao" : "sem-selecao"}" part="rodape">
|
|
428
431
|
<div class="ui-footer-left">
|
|
@@ -432,12 +435,12 @@ function Qa(e, t, a) {
|
|
|
432
435
|
|
|
433
436
|
<!-- Criação de camadas/grupos quando não há nada selecionado -->
|
|
434
437
|
<div class="ui-footer-actions-gerais" style="display: ${i ? "none" : "flex"};">
|
|
435
|
-
<button class="ui-footer-chip-btn" id="btn-footer-new-group" title="Criar Nova Pasta/Grupo de Camadas" aria-label="Criar Grupo de Camadas">
|
|
436
|
-
${
|
|
438
|
+
<button type="button" class="ui-footer-chip-btn" id="btn-footer-new-group" title="Criar Nova Pasta/Grupo de Camadas" aria-label="Criar Grupo de Camadas">
|
|
439
|
+
${y.moverPasta}
|
|
437
440
|
<span>Grupo</span>
|
|
438
441
|
</button>
|
|
439
|
-
<button class="ui-footer-chip-btn primario" id="btn-footer-new-layer" title="Criar Nova Camada Vetorial" aria-label="Criar Nova Camada">
|
|
440
|
-
${
|
|
442
|
+
<button type="button" class="ui-footer-chip-btn primario" id="btn-footer-new-layer" title="Criar Nova Camada Vetorial" aria-label="Criar Nova Camada">
|
|
443
|
+
${y.mais}
|
|
441
444
|
<span>Camada</span>
|
|
442
445
|
</button>
|
|
443
446
|
</div>
|
|
@@ -451,112 +454,112 @@ function Qa(e, t, a) {
|
|
|
451
454
|
</select>
|
|
452
455
|
</div>
|
|
453
456
|
|
|
454
|
-
<button class="ui-footer-btn btn-danger-footer ${i ? "" : "disabled"}" id="btn-footer-del" title="Excluir selecionados" aria-label="Excluir selecionados" ${i ? "" : "disabled"}>
|
|
455
|
-
${
|
|
457
|
+
<button type="button" class="ui-footer-btn btn-danger-footer ${i ? "" : "disabled"}" id="btn-footer-del" title="Excluir selecionados" aria-label="Excluir selecionados" ${i ? "" : "disabled"}>
|
|
458
|
+
${y.lixeira}
|
|
456
459
|
</button>
|
|
457
460
|
</div>
|
|
458
461
|
</div>
|
|
459
462
|
`;
|
|
460
463
|
}
|
|
461
464
|
const Ie = 64;
|
|
462
|
-
function
|
|
465
|
+
function Ge(e) {
|
|
463
466
|
return Array.isArray(e) && e.length >= 2 && Number.isFinite(e[0]) && Number.isFinite(e[1]);
|
|
464
467
|
}
|
|
465
|
-
function
|
|
466
|
-
return !Array.isArray(e) || e.length === 0 ? [] :
|
|
468
|
+
function sa(e) {
|
|
469
|
+
return !Array.isArray(e) || e.length === 0 ? [] : Ge(e[0]) ? [e.filter(Ge)] : e.flatMap(sa);
|
|
467
470
|
}
|
|
468
|
-
function
|
|
471
|
+
function _e(e) {
|
|
469
472
|
if (e.length <= Ie) return e;
|
|
470
473
|
const t = e.length / Ie, a = [];
|
|
471
474
|
for (let r = 0; r < Ie; r++) a.push(e[Math.floor(r * t)]);
|
|
472
475
|
return a.push(e[e.length - 1]), a;
|
|
473
476
|
}
|
|
474
|
-
function
|
|
475
|
-
const r =
|
|
477
|
+
function rt(e, t, a) {
|
|
478
|
+
const r = sa(t).filter((L) => L.length > 0);
|
|
476
479
|
if (r.length === 0) return "";
|
|
477
480
|
let i = 1 / 0, o = -1 / 0, n = 1 / 0, s = -1 / 0;
|
|
478
|
-
for (const
|
|
479
|
-
for (const [
|
|
480
|
-
|
|
481
|
-
const
|
|
482
|
-
if (
|
|
483
|
-
const
|
|
484
|
-
return
|
|
485
|
-
`<path d="${
|
|
481
|
+
for (const L of r)
|
|
482
|
+
for (const [S, x] of L)
|
|
483
|
+
x < i && (i = x), x > o && (o = x), -S < n && (n = -S), -S > s && (s = -S);
|
|
484
|
+
const c = 16, l = 2, d = c - l * 2, p = o - i, u = s - n, f = Math.max(p, u), m = f > 0 ? d / f : 0, g = l + (d - p * m) / 2, b = l + (d - u * m) / 2, h = (L) => Math.round(L * 100) / 100, v = ([L, S]) => `${h(g + (S - i) * m)},${h(b + (-L - n) * m)}`, A = e === "polygon" || e === "multipolygon", I = e === "linestring" || e === "multilinestring", w = (L) => `<svg viewBox="0 0 ${c} ${c}" width="100%" height="100%" aria-hidden="true">${L}</svg>`;
|
|
485
|
+
if (A) {
|
|
486
|
+
const L = r.filter((S) => S.length >= 3).map((S) => `M${_e(S).map(v).join("L")}Z`).join("");
|
|
487
|
+
return L ? w(
|
|
488
|
+
`<path d="${L}" fill="${a}" fill-opacity="0.45" fill-rule="evenodd" stroke="${a}" stroke-width="1.2" stroke-linejoin="round"/>`
|
|
486
489
|
) : "";
|
|
487
490
|
}
|
|
488
|
-
if (
|
|
489
|
-
const
|
|
490
|
-
return
|
|
491
|
-
`<path d="${
|
|
491
|
+
if (I) {
|
|
492
|
+
const L = r.filter((S) => S.length >= 2).map((S) => `M${_e(S).map(v).join("L")}`).join("");
|
|
493
|
+
return L ? w(
|
|
494
|
+
`<path d="${L}" fill="none" stroke="${a}" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>`
|
|
492
495
|
) : "";
|
|
493
496
|
}
|
|
494
497
|
return "";
|
|
495
498
|
}
|
|
496
|
-
function
|
|
497
|
-
const r =
|
|
499
|
+
function la(e, t, a) {
|
|
500
|
+
const r = J(t, "#00E08A"), i = (e || "").toLowerCase(), o = a !== void 0 ? rt(i, a, r) : "";
|
|
498
501
|
return o || (i === "polygon" || i === "multipolygon" ? `<svg viewBox="0 0 16 16" width="11" height="11"><polygon points="2,14 14,14 12,2 4,4" fill="${r}" fill-opacity="0.45" stroke="${r}" stroke-width="1.5"/></svg>` : i === "linestring" || i === "multilinestring" ? `<svg viewBox="0 0 16 16" width="11" height="11"><polyline points="2,13 8,3 14,10" fill="none" stroke="${r}" stroke-width="2"/></svg>` : i === "text" ? `<svg viewBox="0 0 16 16" width="11" height="11"><text x="8" y="12" font-size="12" font-weight="bold" fill="${r}" text-anchor="middle" font-family="sans-serif">T</text></svg>` : `<svg viewBox="0 0 16 16" width="11" height="11"><circle cx="8" cy="8" r="4.2" fill="${r}" stroke="#ffffff" stroke-width="1.2"/></svg>`);
|
|
499
502
|
}
|
|
500
503
|
function Se(e, t, a) {
|
|
501
504
|
return {
|
|
502
|
-
camadaIdSeguro:
|
|
503
|
-
corCamada:
|
|
505
|
+
camadaIdSeguro: M(e.id),
|
|
506
|
+
corCamada: J(e.color, "#00E08A"),
|
|
504
507
|
profundidade: t,
|
|
505
508
|
esmaecida: e.visible === !1 || (a == null ? void 0 : a.ocultaPorAncestral) === !0,
|
|
506
509
|
travadaPelaCamada: e.locked === !0 || (a == null ? void 0 : a.travadaPorAncestral) === !0
|
|
507
510
|
};
|
|
508
511
|
}
|
|
509
512
|
const ke = (e, t, a) => `${e} ${e === 1 ? t : a}`;
|
|
510
|
-
function
|
|
513
|
+
function ca(e, t, a) {
|
|
511
514
|
return a === 0 ? ke(e, "feição", "feições") : `${ke(e, "feição", "feições")} no grupo (${t} nesta camada) · ${ke(a, "subcamada", "subcamadas")}`;
|
|
512
515
|
}
|
|
513
|
-
function
|
|
514
|
-
return e === 0 && r ? "" : `<span class="ui-count-chip" title="${
|
|
516
|
+
function da(e, t, a, r) {
|
|
517
|
+
return e === 0 && r ? "" : `<span class="ui-count-chip" title="${ca(e, t, a)}">${e}</span>`;
|
|
515
518
|
}
|
|
516
|
-
function
|
|
519
|
+
function ua(e, t) {
|
|
517
520
|
const a = t - e;
|
|
518
521
|
return {
|
|
519
522
|
resumo: `Exibindo ${e} de ${t} feições. Use a busca acima para filtrar.`,
|
|
520
523
|
botao: `Mostrar mais (+${Math.min(80, a)})`
|
|
521
524
|
};
|
|
522
525
|
}
|
|
523
|
-
function
|
|
524
|
-
const r =
|
|
526
|
+
function pa(e, t, a) {
|
|
527
|
+
const r = ua(t, a);
|
|
525
528
|
return `<div class="ui-truncate-notice" role="note">
|
|
526
529
|
<span>${r.resumo}</span>
|
|
527
530
|
<button type="button" class="ui-truncate-more-btn" data-layer-show-more="${e}">${r.botao}</button>
|
|
528
531
|
</div>`;
|
|
529
532
|
}
|
|
530
|
-
function
|
|
533
|
+
function fa(e) {
|
|
531
534
|
return `<div class="ui-empty-row"><span>${e ? "Grupo vazio (adicione subcamadas ou feições)" : "Camada vazia"}</span></div>`;
|
|
532
535
|
}
|
|
533
|
-
const
|
|
534
|
-
function
|
|
535
|
-
return
|
|
536
|
+
const it = ["name", "color", "visible", "locked", "status", "type", "geometryType", "coordinates", "layerId"];
|
|
537
|
+
function ot(e, t) {
|
|
538
|
+
return it.every((a) => e[a] === t[a]);
|
|
536
539
|
}
|
|
537
540
|
function Fe(e, t, a, r) {
|
|
538
|
-
const { camadaIdSeguro: i, corCamada: o, profundidade: n } = t, s =
|
|
541
|
+
const { camadaIdSeguro: i, corCamada: o, profundidade: n } = t, s = M(e.id), c = M(e.name || "Feição"), l = J(e.color, o), d = e.visible !== !1, p = t.travadaPelaCamada, u = e.locked === !0 || p, f = p ? "Bloqueada pela camada" : u ? "Desbloquear Feição" : "Bloquear Feição", m = e.status === "previa" ? '<span class="ui-previa-dot" title="Geometria prévia" aria-label="Geometria prévia"></span>' : "";
|
|
539
542
|
return `
|
|
540
|
-
<div class="ui-feat-row ${a ? "selected-row" : ""} ${
|
|
541
|
-
<div class="ui-col ui-col-eye" data-feat-eye="${s}" role="button" tabindex="0" aria-label="${
|
|
542
|
-
${
|
|
543
|
+
<div class="ui-feat-row ${a ? "selected-row" : ""} ${d ? "" : "hidden-row"} ${t.esmaecida ? "herdado-oculto" : ""}" data-feat-row="${s}" data-feat-select="${s}" data-feat-layer="${i}" role="treeitem" aria-level="${n + 2}" aria-selected="${a}" tabindex="-1" draggable="true" part="${a ? "feicao feicao-selecionada" : "feicao"}" style="--layer-depth: ${n + 1};" title="Clique para selecionar | Arraste para reordenar">
|
|
544
|
+
<div class="ui-col ui-col-eye" data-feat-eye="${s}" role="button" tabindex="0" aria-label="${d ? "Ocultar Feição" : "Exibir Feição"}" title="${d ? "Ocultar Feição" : "Exibir Feição"}">
|
|
545
|
+
${d ? y.olhoAberto : y.olhoFechado}
|
|
543
546
|
</div>
|
|
544
547
|
|
|
545
|
-
<div class="ui-col ui-col-lock ${
|
|
546
|
-
${
|
|
548
|
+
<div class="ui-col ui-col-lock ${u ? "" : "ui-lock-open"}" data-feat-lock="${s}" ${p ? 'data-locked-by-layer="true"' : ""} role="button" tabindex="0" aria-label="${f}" title="${f}">
|
|
549
|
+
${u ? y.cadeadoTrancado : y.cadeadoAberto}
|
|
547
550
|
</div>
|
|
548
551
|
|
|
549
552
|
<div class="ui-col ui-col-colorbar" style="background: ${o};"></div>
|
|
550
553
|
<div class="ui-col ui-col-thumb">
|
|
551
|
-
<div class="ui-thumb-box">${
|
|
554
|
+
<div class="ui-thumb-box">${la(e.type || e.geometryType, l, e.coordinates)}</div>
|
|
552
555
|
</div>
|
|
553
556
|
|
|
554
557
|
<div class="ui-col ui-col-name" data-feat-name-trigger="${s}" title="Duplo clique para renomear">
|
|
555
|
-
${r ? `<input type="text" class="ui-inline-rename-input" data-inline-feat-input="${s}" value="${
|
|
558
|
+
${r ? `<input type="text" class="ui-inline-rename-input" data-inline-feat-input="${s}" value="${c}" />` : `<span class="ui-name-text">${c}</span>${m}`}
|
|
556
559
|
</div>
|
|
557
560
|
|
|
558
561
|
<div class="ui-col ui-col-actions">
|
|
559
|
-
<button class="ui-micro-btn" data-feat-fit="${s}" title="Enquadrar no mapa" aria-label="Enquadrar feição no mapa">${
|
|
562
|
+
<button type="button" class="ui-micro-btn" data-feat-fit="${s}" title="Enquadrar no mapa" aria-label="Enquadrar feição no mapa">${y.alvoEnquadrar}</button>
|
|
560
563
|
</div>
|
|
561
564
|
|
|
562
565
|
<div class="ui-col ui-col-target" data-feat-target="${s}" role="button" tabindex="0" aria-label="Selecionar feição" title="Selecionar feição">
|
|
@@ -565,89 +568,7 @@ function Fe(e, t, a, r) {
|
|
|
565
568
|
</div>
|
|
566
569
|
`;
|
|
567
570
|
}
|
|
568
|
-
|
|
569
|
-
function ee(e, t) {
|
|
570
|
-
const a = (t || "").trim().toLowerCase();
|
|
571
|
-
return a ? e.filter(
|
|
572
|
-
(r) => (r.name || "").toLowerCase().includes(a) || (r.category || "").toLowerCase().includes(a) || (r.type || "").toLowerCase().includes(a)
|
|
573
|
-
) : e;
|
|
574
|
-
}
|
|
575
|
-
function ua(e, t, a) {
|
|
576
|
-
var c, f;
|
|
577
|
-
const r = (a || "").trim().toLowerCase();
|
|
578
|
-
if (!r) return null;
|
|
579
|
-
const i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
580
|
-
for (const m of e)
|
|
581
|
-
i.set(m.id, m), m.parentId && m.parentId !== m.id && (o.has(m.parentId) || o.set(m.parentId, []), o.get(m.parentId).push(m.id));
|
|
582
|
-
const n = /* @__PURE__ */ new Map();
|
|
583
|
-
for (const m of t) {
|
|
584
|
-
const h = m.layerId || "";
|
|
585
|
-
n.has(h) || n.set(h, []), n.get(h).push(m);
|
|
586
|
-
}
|
|
587
|
-
const s = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
|
|
588
|
-
for (const m of e)
|
|
589
|
-
(typeof m.name == "string" ? m.name.toLowerCase() : "").includes(r) ? (s.add(m.id), d.add(m.id)) : ee(n.get(m.id) || [], r).length > 0 && d.add(m.id);
|
|
590
|
-
const l = new Set(d);
|
|
591
|
-
for (const m of d) {
|
|
592
|
-
const h = /* @__PURE__ */ new Set([m]);
|
|
593
|
-
let v = (c = i.get(m)) == null ? void 0 : c.parentId;
|
|
594
|
-
for (; v && i.has(v) && !h.has(v); )
|
|
595
|
-
h.add(v), l.add(v), v = (f = i.get(v)) == null ? void 0 : f.parentId;
|
|
596
|
-
}
|
|
597
|
-
const u = [...s];
|
|
598
|
-
for (; u.length > 0; ) {
|
|
599
|
-
const m = u.pop();
|
|
600
|
-
for (const h of o.get(m) || [])
|
|
601
|
-
l.has(h) || (l.add(h), u.push(h));
|
|
602
|
-
}
|
|
603
|
-
const p = /* @__PURE__ */ new Map();
|
|
604
|
-
for (const m of l) {
|
|
605
|
-
const h = n.get(m) || [];
|
|
606
|
-
p.set(m, s.has(m) ? h : ee(h, r));
|
|
607
|
-
}
|
|
608
|
-
return { camadasVisiveis: l, feicoesPorCamada: p };
|
|
609
|
-
}
|
|
610
|
-
function pa(e, t, a, r = "", i = Pe, o) {
|
|
611
|
-
const n = ua(e, t, r), s = [], d = /* @__PURE__ */ new Map();
|
|
612
|
-
for (let p = 0; p < t.length; p++) {
|
|
613
|
-
const c = t[p];
|
|
614
|
-
if (!c || !c.id) continue;
|
|
615
|
-
const f = c.layerId || "";
|
|
616
|
-
d.has(f) || d.set(f, []), d.get(f).push(c);
|
|
617
|
-
}
|
|
618
|
-
const l = ge(e);
|
|
619
|
-
function u(p) {
|
|
620
|
-
const c = p.camada;
|
|
621
|
-
if (n && !n.camadasVisiveis.has(c.id) || !(n ? !0 : a.has(c.id))) return;
|
|
622
|
-
for (const g of p.subcamadas)
|
|
623
|
-
u(g);
|
|
624
|
-
const m = n ? n.feicoesPorCamada.get(c.id) || [] : d.get(c.id) || [], h = (o == null ? void 0 : o.get(c.id)) ?? i, v = m.slice(0, h);
|
|
625
|
-
for (let g = 0; g < v.length; g++)
|
|
626
|
-
s.push(v[g].id);
|
|
627
|
-
}
|
|
628
|
-
for (const p of l)
|
|
629
|
-
u(p);
|
|
630
|
-
return s;
|
|
631
|
-
}
|
|
632
|
-
function Za(e, t, a, r, i, o) {
|
|
633
|
-
if (!e.includes(r)) return null;
|
|
634
|
-
const n = new Set(t);
|
|
635
|
-
let s = a;
|
|
636
|
-
if (o && a && e.includes(a)) {
|
|
637
|
-
const d = e.indexOf(a), l = e.indexOf(r), u = Math.min(d, l), p = Math.max(d, l);
|
|
638
|
-
i || n.clear();
|
|
639
|
-
for (let c = u; c <= p; c++)
|
|
640
|
-
n.add(e[c]);
|
|
641
|
-
} else i ? (n.has(r) ? n.delete(r) : n.add(r), s = r) : (n.clear(), n.add(r), s = r);
|
|
642
|
-
return { selecionados: n, ultimoClicadoId: s };
|
|
643
|
-
}
|
|
644
|
-
function Be(e, t) {
|
|
645
|
-
if (e.size === 0) return;
|
|
646
|
-
const a = new Set(t.map((r) => r.id));
|
|
647
|
-
for (const r of e)
|
|
648
|
-
a.has(r) || e.delete(r);
|
|
649
|
-
}
|
|
650
|
-
function G(e, t, a) {
|
|
571
|
+
function N(e, t, a) {
|
|
651
572
|
const r = /* @__PURE__ */ new Set();
|
|
652
573
|
let i = e.find((o) => o.id === t);
|
|
653
574
|
for (; i && i.parentId; ) {
|
|
@@ -656,46 +577,46 @@ function G(e, t, a) {
|
|
|
656
577
|
}
|
|
657
578
|
return !1;
|
|
658
579
|
}
|
|
659
|
-
function
|
|
580
|
+
function Ce(e) {
|
|
660
581
|
return Number.isFinite(e) ? e < 0.25 ? "acima" : e > 0.75 ? "abaixo" : "dentro" : "dentro";
|
|
661
582
|
}
|
|
662
|
-
function
|
|
583
|
+
function Ve(e, t, a, r) {
|
|
663
584
|
if (!t || !a || t === a) return null;
|
|
664
585
|
const i = e.find((l) => l.id === t), o = e.find((l) => l.id === a);
|
|
665
586
|
if (!i || !o) return null;
|
|
666
587
|
const n = i.parentId !== void 0 ? i.parentId : null;
|
|
667
588
|
if (r === "dentro")
|
|
668
|
-
return
|
|
669
|
-
if (
|
|
589
|
+
return N(e, o.id, i.id) ? null : (i.parentId = o.id, { tipo: "hierarquia", camada: i, novoParentId: o.id, parentAnteriorId: n });
|
|
590
|
+
if (N(e, o.id, i.id)) return null;
|
|
670
591
|
const s = e.findIndex((l) => l.id === t);
|
|
671
592
|
e.splice(s, 1);
|
|
672
|
-
const
|
|
673
|
-
return
|
|
593
|
+
const c = e.findIndex((l) => l.id === a);
|
|
594
|
+
return c === -1 ? e.push(i) : e.splice(r === "acima" ? c : c + 1, 0, i), i.parentId = o.parentId ?? null, { tipo: "ordem", camada: i, parentAnteriorId: n, novoParentId: i.parentId };
|
|
674
595
|
}
|
|
675
|
-
function
|
|
596
|
+
function nt(e, t, a, r) {
|
|
676
597
|
const i = e.find((s) => s.id === a), o = t.find((s) => s.id === r);
|
|
677
598
|
if (!i || !o || i.layerId === r) return null;
|
|
678
599
|
const n = i.layerId;
|
|
679
600
|
return i.layerId = r, { feicao: i, camadaOrigemId: n, camadaDestinoId: r, mudouDeCamada: !0 };
|
|
680
601
|
}
|
|
681
|
-
function
|
|
602
|
+
function st(e, t, a, r) {
|
|
682
603
|
if (!t || !a || t === a) return null;
|
|
683
604
|
const i = e.findIndex((p) => p.id === t);
|
|
684
605
|
if (i === -1) return null;
|
|
685
606
|
const o = e.find((p) => p.id === a);
|
|
686
607
|
if (!o) return null;
|
|
687
|
-
const [n] = e.splice(i, 1), s = n.layerId,
|
|
688
|
-
l && (n.layerId =
|
|
689
|
-
const
|
|
690
|
-
return
|
|
608
|
+
const [n] = e.splice(i, 1), s = n.layerId, c = o.layerId, l = s !== c;
|
|
609
|
+
l && (n.layerId = c);
|
|
610
|
+
const d = e.findIndex((p) => p.id === a);
|
|
611
|
+
return d === -1 ? e.push(n) : e.splice(r ? d : d + 1, 0, n), { feicao: n, camadaOrigemId: s, camadaDestinoId: c, mudouDeCamada: l };
|
|
691
612
|
}
|
|
692
|
-
function
|
|
613
|
+
function H(e) {
|
|
693
614
|
return `L:${e}`;
|
|
694
615
|
}
|
|
695
|
-
function
|
|
616
|
+
function O(e) {
|
|
696
617
|
return `F:${e}`;
|
|
697
618
|
}
|
|
698
|
-
function
|
|
619
|
+
function ma(e, t, a) {
|
|
699
620
|
if (!a || a.length === 0)
|
|
700
621
|
return [
|
|
701
622
|
...e.map((s) => ({ tipo: "layer", nodo: s })),
|
|
@@ -705,53 +626,53 @@ function tt(e, t, a) {
|
|
|
705
626
|
for (const s of a)
|
|
706
627
|
if (!o.has(s)) {
|
|
707
628
|
if (s.startsWith("L:")) {
|
|
708
|
-
const
|
|
629
|
+
const c = s.slice(2), l = r.get(c);
|
|
709
630
|
l && (o.add(s), n.push({ tipo: "layer", nodo: l }));
|
|
710
631
|
} else if (s.startsWith("F:")) {
|
|
711
|
-
const
|
|
632
|
+
const c = s.slice(2), l = i.get(c);
|
|
712
633
|
l && (o.add(s), n.push({ tipo: "feature", feicao: l }));
|
|
713
634
|
}
|
|
714
635
|
}
|
|
715
636
|
for (const s of e) {
|
|
716
|
-
const
|
|
717
|
-
o.has(
|
|
637
|
+
const c = H(s.camada.id);
|
|
638
|
+
o.has(c) || (o.add(c), n.push({ tipo: "layer", nodo: s }));
|
|
718
639
|
}
|
|
719
640
|
for (const s of t) {
|
|
720
|
-
const
|
|
721
|
-
o.has(
|
|
641
|
+
const c = O(s.id);
|
|
642
|
+
o.has(c) || (o.add(c), n.push({ tipo: "feature", feicao: s }));
|
|
722
643
|
}
|
|
723
644
|
return n;
|
|
724
645
|
}
|
|
725
646
|
function ve(e, t, a, r) {
|
|
726
|
-
const i = a.filter((
|
|
727
|
-
...i.map(
|
|
728
|
-
...o.map(
|
|
729
|
-
]), s = e.get(t),
|
|
647
|
+
const i = a.filter((d) => d.parentId === t).map((d) => d.id), o = r.filter((d) => d.layerId === t).map((d) => d.id), n = /* @__PURE__ */ new Set([
|
|
648
|
+
...i.map(H),
|
|
649
|
+
...o.map(O)
|
|
650
|
+
]), s = e.get(t), c = [], l = /* @__PURE__ */ new Set();
|
|
730
651
|
if (s)
|
|
731
|
-
for (const
|
|
732
|
-
n.has(
|
|
733
|
-
for (const
|
|
734
|
-
const p =
|
|
735
|
-
l.has(p) || (l.add(p),
|
|
652
|
+
for (const d of s)
|
|
653
|
+
n.has(d) && !l.has(d) && (l.add(d), c.push(d));
|
|
654
|
+
for (const d of i) {
|
|
655
|
+
const p = H(d);
|
|
656
|
+
l.has(p) || (l.add(p), c.push(p));
|
|
736
657
|
}
|
|
737
|
-
for (const
|
|
738
|
-
const p =
|
|
739
|
-
l.has(p) || (l.add(p),
|
|
658
|
+
for (const d of o) {
|
|
659
|
+
const p = O(d);
|
|
660
|
+
l.has(p) || (l.add(p), c.push(p));
|
|
740
661
|
}
|
|
741
|
-
return
|
|
662
|
+
return c;
|
|
742
663
|
}
|
|
743
664
|
function be(e, t, a, r) {
|
|
744
665
|
const i = e.filter((n) => n !== t), o = i.indexOf(a);
|
|
745
666
|
o === -1 ? i.push(t) : i.splice(r ? o : o + 1, 0, t), e.length = 0, e.push(...i);
|
|
746
667
|
}
|
|
747
|
-
function
|
|
668
|
+
function G(e, t, a) {
|
|
748
669
|
if (!t) return;
|
|
749
670
|
const r = e.get(t);
|
|
750
671
|
if (!r) return;
|
|
751
672
|
const i = r.filter((o) => o !== a);
|
|
752
673
|
i.length === 0 ? e.delete(t) : e.set(t, i);
|
|
753
674
|
}
|
|
754
|
-
function
|
|
675
|
+
function lt(e, t) {
|
|
755
676
|
const a = t.filter((n) => n.startsWith("L:")).map((n) => n.slice(2));
|
|
756
677
|
if (a.length < 2) return;
|
|
757
678
|
const r = new Set(a), i = [], o = /* @__PURE__ */ new Map();
|
|
@@ -763,7 +684,7 @@ function rt(e, t) {
|
|
|
763
684
|
s && (e[i[n]] = s);
|
|
764
685
|
}
|
|
765
686
|
}
|
|
766
|
-
function
|
|
687
|
+
function ct(e, t) {
|
|
767
688
|
const a = t.filter((n) => n.startsWith("F:")).map((n) => n.slice(2));
|
|
768
689
|
if (a.length < 2) return;
|
|
769
690
|
const r = new Set(a), i = [], o = /* @__PURE__ */ new Map();
|
|
@@ -775,53 +696,168 @@ function it(e, t) {
|
|
|
775
696
|
s && (e[i[n]] = s);
|
|
776
697
|
}
|
|
777
698
|
}
|
|
778
|
-
function
|
|
699
|
+
function Ue(e, t, a, r, i, o) {
|
|
779
700
|
if (!r || !i) return null;
|
|
780
701
|
const n = e.find((p) => p.id === r), s = t.find((p) => p.id === i);
|
|
781
702
|
if (!n || !s || !s.layerId) return null;
|
|
782
|
-
const
|
|
783
|
-
if (
|
|
703
|
+
const c = s.layerId;
|
|
704
|
+
if (c === r || N(e, c, r)) return null;
|
|
784
705
|
const l = n.parentId !== void 0 ? n.parentId : null;
|
|
785
|
-
l && l !==
|
|
786
|
-
const
|
|
787
|
-
return be(
|
|
788
|
-
tipo: l !==
|
|
706
|
+
l && l !== c && G(a, l, H(r)), n.parentId = c;
|
|
707
|
+
const d = ve(a, c, e, t);
|
|
708
|
+
return be(d, H(r), O(i), o), a.set(c, d), lt(e, d), {
|
|
709
|
+
tipo: l !== c ? "hierarquia" : "ordem",
|
|
789
710
|
camada: n,
|
|
790
711
|
parentAnteriorId: l,
|
|
791
|
-
novoParentId:
|
|
712
|
+
novoParentId: c
|
|
792
713
|
};
|
|
793
714
|
}
|
|
794
|
-
function
|
|
715
|
+
function dt(e, t, a, r, i, o) {
|
|
795
716
|
if (!r || !i) return null;
|
|
796
|
-
const n = t.find((
|
|
717
|
+
const n = t.find((u) => u.id === r), s = e.find((u) => u.id === i);
|
|
797
718
|
if (!n || !s || !s.parentId) return null;
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
const p = ve(a,
|
|
801
|
-
return be(p,
|
|
802
|
-
}
|
|
803
|
-
function
|
|
804
|
-
const
|
|
805
|
-
if (n && (n !== s || o === "dentro") &&
|
|
719
|
+
const c = s.parentId, l = n.layerId, d = l !== c;
|
|
720
|
+
d && (G(a, l, O(r)), n.layerId = c);
|
|
721
|
+
const p = ve(a, c, e, t);
|
|
722
|
+
return be(p, O(r), H(i), o), a.set(c, p), ct(t, p), { feicao: n, camadaOrigemId: l, camadaDestinoId: c, mudouDeCamada: d };
|
|
723
|
+
}
|
|
724
|
+
function Ye(e, t, a, r, i, o, n, s) {
|
|
725
|
+
const c = H(r);
|
|
726
|
+
if (n && (n !== s || o === "dentro") && G(a, n, c), o !== "dentro" && s && a.has(s)) {
|
|
806
727
|
const l = ve(a, s, e, t);
|
|
807
|
-
be(l,
|
|
728
|
+
be(l, c, H(i), o === "acima"), a.set(s, l);
|
|
808
729
|
}
|
|
809
730
|
}
|
|
810
|
-
function
|
|
811
|
-
const
|
|
812
|
-
if (n && n !== s &&
|
|
731
|
+
function ut(e, t, a, r, i, o, n, s) {
|
|
732
|
+
const c = O(r);
|
|
733
|
+
if (n && n !== s && G(a, n, c), s && a.has(s)) {
|
|
813
734
|
const l = ve(a, s, e, t);
|
|
814
|
-
be(l,
|
|
735
|
+
be(l, c, O(i), o), a.set(s, l);
|
|
815
736
|
}
|
|
816
737
|
}
|
|
817
|
-
function
|
|
818
|
-
const i =
|
|
819
|
-
if (
|
|
738
|
+
function ga(e, t, a, r) {
|
|
739
|
+
const i = O(t);
|
|
740
|
+
if (G(e, a, i), r && e.has(r)) {
|
|
820
741
|
const o = e.get(r);
|
|
821
742
|
o.includes(i) || o.push(i);
|
|
822
743
|
}
|
|
823
744
|
}
|
|
824
|
-
|
|
745
|
+
const qe = 80;
|
|
746
|
+
function $e(e, t) {
|
|
747
|
+
const a = (t || "").trim().toLowerCase();
|
|
748
|
+
return a ? e.filter(
|
|
749
|
+
(r) => (r.name || "").toLowerCase().includes(a) || (r.category || "").toLowerCase().includes(a) || (r.type || "").toLowerCase().includes(a)
|
|
750
|
+
) : e;
|
|
751
|
+
}
|
|
752
|
+
function ye(e, t, a) {
|
|
753
|
+
var u, f;
|
|
754
|
+
const r = (a || "").trim().toLowerCase();
|
|
755
|
+
if (!r) return null;
|
|
756
|
+
const i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
757
|
+
for (const m of e)
|
|
758
|
+
i.set(m.id, m), m.parentId && m.parentId !== m.id && (o.has(m.parentId) || o.set(m.parentId, []), o.get(m.parentId).push(m.id));
|
|
759
|
+
const n = /* @__PURE__ */ new Map();
|
|
760
|
+
for (const m of t) {
|
|
761
|
+
const g = m.layerId || "";
|
|
762
|
+
n.has(g) || n.set(g, []), n.get(g).push(m);
|
|
763
|
+
}
|
|
764
|
+
const s = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
|
|
765
|
+
for (const m of e)
|
|
766
|
+
(typeof m.name == "string" ? m.name.toLowerCase() : "").includes(r) ? (s.add(m.id), c.add(m.id)) : $e(n.get(m.id) || [], r).length > 0 && c.add(m.id);
|
|
767
|
+
const l = new Set(c);
|
|
768
|
+
for (const m of c) {
|
|
769
|
+
const g = /* @__PURE__ */ new Set([m]);
|
|
770
|
+
let b = (u = i.get(m)) == null ? void 0 : u.parentId;
|
|
771
|
+
for (; b && i.has(b) && !g.has(b); )
|
|
772
|
+
g.add(b), l.add(b), b = (f = i.get(b)) == null ? void 0 : f.parentId;
|
|
773
|
+
}
|
|
774
|
+
const d = [...s];
|
|
775
|
+
for (; d.length > 0; ) {
|
|
776
|
+
const m = d.pop();
|
|
777
|
+
for (const g of o.get(m) || [])
|
|
778
|
+
l.has(g) || (l.add(g), d.push(g));
|
|
779
|
+
}
|
|
780
|
+
const p = /* @__PURE__ */ new Map();
|
|
781
|
+
for (const m of l) {
|
|
782
|
+
const g = n.get(m) || [];
|
|
783
|
+
p.set(m, s.has(m) ? g : $e(g, r));
|
|
784
|
+
}
|
|
785
|
+
return { camadasVisiveis: l, feicoesPorCamada: p };
|
|
786
|
+
}
|
|
787
|
+
function ha(e, t, a, r) {
|
|
788
|
+
const i = /* @__PURE__ */ new Map(), o = (n) => {
|
|
789
|
+
const s = n.camada.id, l = !r || r.has(s) ? t.get(s) ?? [] : [];
|
|
790
|
+
let d = l.length, p = 0;
|
|
791
|
+
for (let f = 0; f < l.length; f++)
|
|
792
|
+
a.has(l[f].id) && p++;
|
|
793
|
+
for (const f of n.subcamadas) {
|
|
794
|
+
if (r && !r.has(f.camada.id)) continue;
|
|
795
|
+
const m = o(f);
|
|
796
|
+
d += m.total, p += m.selecionadas;
|
|
797
|
+
}
|
|
798
|
+
const u = { total: d, selecionadas: p };
|
|
799
|
+
return i.set(s, u), u;
|
|
800
|
+
};
|
|
801
|
+
for (const n of e)
|
|
802
|
+
(!r || r.has(n.camada.id)) && o(n);
|
|
803
|
+
return i;
|
|
804
|
+
}
|
|
805
|
+
function pt(e, t, a, r = "") {
|
|
806
|
+
if (!a || !Array.isArray(t) || t.length === 0) return [];
|
|
807
|
+
const i = Be(e, a), o = ye(e, t, r);
|
|
808
|
+
if (!o)
|
|
809
|
+
return t.filter((s) => !!(s && s.layerId && i.has(s.layerId)));
|
|
810
|
+
const n = [];
|
|
811
|
+
for (const s of i) {
|
|
812
|
+
if (!o.camadasVisiveis.has(s)) continue;
|
|
813
|
+
const c = o.feicoesPorCamada.get(s);
|
|
814
|
+
c && c.length > 0 && n.push(...c);
|
|
815
|
+
}
|
|
816
|
+
return n;
|
|
817
|
+
}
|
|
818
|
+
function va(e, t, a, r = "", i = qe, o, n) {
|
|
819
|
+
const s = ye(e, t, r), c = [], l = /* @__PURE__ */ new Map();
|
|
820
|
+
for (let u = 0; u < t.length; u++) {
|
|
821
|
+
const f = t[u];
|
|
822
|
+
if (!f || !f.id) continue;
|
|
823
|
+
const m = f.layerId || "";
|
|
824
|
+
l.has(m) || l.set(m, []), l.get(m).push(f);
|
|
825
|
+
}
|
|
826
|
+
if (e.length === 0) {
|
|
827
|
+
const u = (r || "").trim().toLowerCase();
|
|
828
|
+
return (l.get("") ?? []).filter((m) => !u || String(m.name ?? "").toLowerCase().includes(u)).slice(0, i).map((m) => m.id);
|
|
829
|
+
}
|
|
830
|
+
const d = oe(e);
|
|
831
|
+
function p(u) {
|
|
832
|
+
const f = u.camada;
|
|
833
|
+
if (s && !s.camadasVisiveis.has(f.id) || !(s ? !0 : a.has(f.id))) return;
|
|
834
|
+
const g = s ? s.feicoesPorCamada.get(f.id) || [] : l.get(f.id) || [], b = (o == null ? void 0 : o.get(f.id)) ?? i, h = g.slice(0, b), v = s ? u.subcamadas.filter((I) => s.camadasVisiveis.has(I.camada.id)) : u.subcamadas, A = ma(v, h, n == null ? void 0 : n.get(f.id));
|
|
835
|
+
for (const I of A)
|
|
836
|
+
I.tipo === "layer" ? p(I.nodo) : c.push(I.feicao.id);
|
|
837
|
+
}
|
|
838
|
+
for (const u of d)
|
|
839
|
+
p(u);
|
|
840
|
+
return c;
|
|
841
|
+
}
|
|
842
|
+
function ft(e, t, a, r, i, o) {
|
|
843
|
+
if (!e.includes(r)) return null;
|
|
844
|
+
const n = new Set(t);
|
|
845
|
+
let s = a;
|
|
846
|
+
if (o && a && e.includes(a)) {
|
|
847
|
+
const c = e.indexOf(a), l = e.indexOf(r), d = Math.min(c, l), p = Math.max(c, l);
|
|
848
|
+
i || n.clear();
|
|
849
|
+
for (let u = d; u <= p; u++)
|
|
850
|
+
n.add(e[u]);
|
|
851
|
+
} else i ? (n.has(r) ? n.delete(r) : n.add(r), s = r) : (n.clear(), n.add(r), s = r);
|
|
852
|
+
return { selecionados: n, ultimoClicadoId: s };
|
|
853
|
+
}
|
|
854
|
+
function De(e, t) {
|
|
855
|
+
if (e.size === 0) return;
|
|
856
|
+
const a = new Set(t.map((r) => r.id));
|
|
857
|
+
for (const r of e)
|
|
858
|
+
a.has(r) || e.delete(r);
|
|
859
|
+
}
|
|
860
|
+
function mt(e) {
|
|
825
861
|
const {
|
|
826
862
|
camadas: t,
|
|
827
863
|
feicoes: a,
|
|
@@ -830,61 +866,69 @@ function lt(e) {
|
|
|
830
866
|
selectedFeatureIds: o,
|
|
831
867
|
activeSettingsLayerId: n,
|
|
832
868
|
editingLayerId: s,
|
|
833
|
-
editingFeatureId:
|
|
869
|
+
editingFeatureId: c,
|
|
834
870
|
searchQuery: l,
|
|
835
|
-
titulo:
|
|
871
|
+
titulo: d = "CAMADAS",
|
|
836
872
|
mostrarBusca: p = !0,
|
|
837
|
-
limitesPorCamada:
|
|
838
|
-
limiteFeicoesPorCamada: f =
|
|
873
|
+
limitesPorCamada: u,
|
|
874
|
+
limiteFeicoesPorCamada: f = qe,
|
|
839
875
|
mostrarBotaoColapsar: m = !1,
|
|
840
|
-
ordemFilhosPorPai:
|
|
841
|
-
} = e,
|
|
842
|
-
for (let
|
|
843
|
-
const
|
|
844
|
-
if (!
|
|
845
|
-
const
|
|
846
|
-
|
|
847
|
-
}
|
|
848
|
-
const
|
|
876
|
+
ordemFilhosPorPai: g
|
|
877
|
+
} = e, b = (l || "").trim().toLowerCase(), h = ye(t, a, b), v = /* @__PURE__ */ new Map();
|
|
878
|
+
for (let $ = 0; $ < a.length; $++) {
|
|
879
|
+
const k = a[$];
|
|
880
|
+
if (!k || !k.id) continue;
|
|
881
|
+
const B = k.layerId || "";
|
|
882
|
+
v.has(B) || v.set(B, []), v.get(B).push(k);
|
|
883
|
+
}
|
|
884
|
+
const A = he(t), I = oe(t), w = ha(
|
|
885
|
+
I,
|
|
886
|
+
h ? h.feicoesPorCamada : v,
|
|
887
|
+
o,
|
|
888
|
+
h == null ? void 0 : h.camadasVisiveis
|
|
889
|
+
), L = t.every(($) => $.visible !== !1), S = t.length > 0 && t.every(($) => i.has($.id)), x = p ? `
|
|
849
890
|
<div class="ui-tree-search-wrapper" part="busca">
|
|
850
|
-
<span class="ui-tree-search-icon">${
|
|
851
|
-
<input type="text" class="ui-tree-search-input" id="input-layer-search" aria-label="Buscar camada ou feição" placeholder="Buscar camada ou feição..." value="${
|
|
891
|
+
<span class="ui-tree-search-icon">${y.busca}</span>
|
|
892
|
+
<input type="text" class="ui-tree-search-input" id="input-layer-search" aria-label="Buscar camada ou feição" placeholder="Buscar camada ou feição..." value="${M(
|
|
852
893
|
l
|
|
853
894
|
)}" />
|
|
854
|
-
${l ? `<button class="ui-tree-search-clear" id="btn-clear-layer-search" title="Limpar busca" aria-label="Limpar busca">${
|
|
895
|
+
${l ? `<button type="button" class="ui-tree-search-clear" id="btn-clear-layer-search" title="Limpar busca" aria-label="Limpar busca">${y.fechar}</button>` : ""}
|
|
855
896
|
</div>
|
|
856
|
-
` : "",
|
|
897
|
+
` : "", P = `
|
|
857
898
|
<div class="ui-tree-toolbar" part="toolbar">
|
|
858
899
|
<div class="ui-tree-title-group">
|
|
859
|
-
<span class="ui-tree-section-title">${
|
|
900
|
+
<span class="ui-tree-section-title">${M(d || "CAMADAS")}</span>
|
|
860
901
|
<span class="ui-tree-count-badge">${t.length}</span>
|
|
861
902
|
</div>
|
|
862
903
|
<div class="ui-tree-actions">
|
|
863
|
-
<button id="btn-toggle-all-vis" class="ui-tree-action-btn" title="${L ? "Ocultar Todas as Camadas" : "Exibir Todas as Camadas"}" aria-label="${L ? "Ocultar Todas as Camadas" : "Exibir Todas as Camadas"}">
|
|
864
|
-
${L ?
|
|
904
|
+
<button type="button" id="btn-toggle-all-vis" class="ui-tree-action-btn" title="${L ? "Ocultar Todas as Camadas" : "Exibir Todas as Camadas"}" aria-label="${L ? "Ocultar Todas as Camadas" : "Exibir Todas as Camadas"}">
|
|
905
|
+
${L ? y.olhoAberto : y.olhoFechado}
|
|
865
906
|
</button>
|
|
866
|
-
<button id="btn-toggle-all-expand" class="ui-tree-action-btn" aria-label="${
|
|
867
|
-
<span class="ui-chevron-icon ${
|
|
907
|
+
<button type="button" id="btn-toggle-all-expand" class="ui-tree-action-btn" aria-label="${S ? "Recolher Todos os Grupos" : "Expandir Todos os Grupos"}" title="${S ? "Recolher Todos os Grupos" : "Expandir Todos os Grupos"}">
|
|
908
|
+
<span class="ui-chevron-icon ${S ? "open" : ""}">${y.chevronDir}</span>
|
|
868
909
|
</button>
|
|
869
|
-
${m ? `<button id="btn-colapsar" class="ui-camadas-btn-colapsar" title="Recolher painel" aria-label="Recolher painel">${
|
|
910
|
+
${m ? `<button type="button" id="btn-colapsar" class="ui-camadas-btn-colapsar" title="Recolher painel" aria-label="Recolher painel">${y.recolherPainel}</button>` : ""}
|
|
870
911
|
</div>
|
|
871
912
|
</div>
|
|
872
|
-
${
|
|
873
|
-
`,
|
|
874
|
-
const
|
|
875
|
-
if (
|
|
876
|
-
const
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
913
|
+
${x}
|
|
914
|
+
`, C = ($) => {
|
|
915
|
+
const k = $.camada;
|
|
916
|
+
if (h && !h.camadasVisiveis.has(k.id)) return "";
|
|
917
|
+
const B = $.depth, Q = $.subcamadas, Re = h ? Q.filter((R) => h.camadasVisiveis.has(R.camada.id)) : Q, ne = !!(k.isGroup || Q.length > 0), F = M(k.id), se = M(k.name || (ne ? "Novo Grupo" : "Camada")), _ = J(k.color, "#00E08A"), le = k.visible !== !1, ce = k.locked === !0, de = b ? !0 : i.has(k.id), ue = n === k.id, xe = r === k.id, V = A.get(k.id), $a = (V == null ? void 0 : V.ocultaPorAncestral) === !0, Ma = (V == null ? void 0 : V.travadaPorAncestral) === !0, U = h ? h.feicoesPorCamada.get(k.id) || [] : v.get(k.id) || [], Y = w.get(k.id) ?? { total: 0, selecionadas: 0 }, za = Y.total > 0 && Y.selecionadas === Y.total, Pa = Y.selecionadas > 0 && Y.selecionadas < Y.total, we = (u == null ? void 0 : u.get(k.id)) ?? f, Ba = U.slice(0, we), qa = U.length > we, Da = Se(k, B, V), Ta = (R) => Fe(R, Da, o.has(R.id), c === R.id), Ra = qa ? pa(F, we, U.length) : "", Oe = Number(k.opacity ?? 1), je = Number.isFinite(Oe) ? Math.min(1, Math.max(0, Oe)) : 1, Oa = Math.round(je * 100), ja = ue ? (() => {
|
|
918
|
+
const R = Be(t, k.id);
|
|
919
|
+
return t.filter((X) => !R.has(X.id)).map(
|
|
920
|
+
(X) => `<option value="${M(X.id)}" ${k.parentId === X.id ? "selected" : ""}>${X.isGroup ? "📁 " : ""}${M(X.name)}</option>`
|
|
921
|
+
).join("");
|
|
922
|
+
})() : "", Na = ue ? `
|
|
923
|
+
<div class="ui-layer-settings-drawer" id="settings-drawer-${F}" part="drawer" style="--drawer-cor-camada: ${_};">
|
|
880
924
|
<div class="ui-drawer-header">
|
|
881
925
|
<div class="ui-drawer-header-left">
|
|
882
|
-
<span class="ui-drawer-icon">${
|
|
926
|
+
<span class="ui-drawer-icon">${y.engrenagem}</span>
|
|
883
927
|
<span class="ui-drawer-title">Configurações da Camada</span>
|
|
884
|
-
<span class="ui-drawer-layer-chip" title="${
|
|
928
|
+
<span class="ui-drawer-layer-chip" title="${se}">${se}</span>
|
|
885
929
|
</div>
|
|
886
|
-
<button type="button" class="ui-drawer-btn-fechar" data-layer-settings-close="${
|
|
887
|
-
${
|
|
930
|
+
<button type="button" class="ui-drawer-btn-fechar" data-layer-settings-close="${F}" title="Fechar configurações (Esc)" aria-label="Fechar configurações">
|
|
931
|
+
${y.fechar}
|
|
888
932
|
</button>
|
|
889
933
|
</div>
|
|
890
934
|
|
|
@@ -896,9 +940,9 @@ function lt(e) {
|
|
|
896
940
|
</div>
|
|
897
941
|
<div class="ui-drawer-color-group">
|
|
898
942
|
<label class="ui-drawer-color-pill" title="Clique para alterar a cor da camada">
|
|
899
|
-
<span class="ui-drawer-color-sample" id="sample-color-${
|
|
900
|
-
<span class="ui-drawer-color-hex" id="hex-color-${
|
|
901
|
-
<input type="color" aria-label="Cor da camada" data-layer-color-picker="${
|
|
943
|
+
<span class="ui-drawer-color-sample" id="sample-color-${F}" style="background-color: ${_};"></span>
|
|
944
|
+
<span class="ui-drawer-color-hex" id="hex-color-${F}">${_.toUpperCase()}</span>
|
|
945
|
+
<input type="color" aria-label="Cor da camada" data-layer-color-picker="${F}" value="${Za(_, "#00e08a")}" class="ui-drawer-color-native" />
|
|
902
946
|
</label>
|
|
903
947
|
</div>
|
|
904
948
|
</div>
|
|
@@ -907,10 +951,10 @@ function lt(e) {
|
|
|
907
951
|
<div class="ui-drawer-row">
|
|
908
952
|
<div class="ui-drawer-row-label">
|
|
909
953
|
<span>Opacidade</span>
|
|
910
|
-
<span class="ui-drawer-badge" id="badge-op-${
|
|
954
|
+
<span class="ui-drawer-badge" id="badge-op-${F}">${Oa}%</span>
|
|
911
955
|
</div>
|
|
912
956
|
<div class="ui-drawer-slider-container">
|
|
913
|
-
<input type="range" aria-label="Opacidade da camada" min="0.05" max="1" step="0.05" value="${Number(
|
|
957
|
+
<input type="range" aria-label="Opacidade da camada" min="0.05" max="1" step="0.05" value="${Number(je) || 0}" data-layer-opacity-slider="${F}" class="ui-drawer-slider" />
|
|
914
958
|
</div>
|
|
915
959
|
</div>
|
|
916
960
|
|
|
@@ -920,9 +964,9 @@ function lt(e) {
|
|
|
920
964
|
<span>Pertence ao Grupo</span>
|
|
921
965
|
</div>
|
|
922
966
|
<div class="ui-drawer-select-wrapper">
|
|
923
|
-
<select class="ui-drawer-select" data-layer-parent-select="${
|
|
924
|
-
<option value="" ${
|
|
925
|
-
${
|
|
967
|
+
<select class="ui-drawer-select" data-layer-parent-select="${F}" aria-label="Grupo pai da camada">
|
|
968
|
+
<option value="" ${k.parentId ? "" : "selected"}>(Nenhum - Nível Principal)</option>
|
|
969
|
+
${ja}
|
|
926
970
|
</select>
|
|
927
971
|
</div>
|
|
928
972
|
</div>
|
|
@@ -930,78 +974,78 @@ function lt(e) {
|
|
|
930
974
|
|
|
931
975
|
<div class="ui-drawer-footer">
|
|
932
976
|
<div class="ui-drawer-meta-info">
|
|
933
|
-
<span>${Q.length > 0 ? `${Q.length} subcamadas · ` : ""}${
|
|
977
|
+
<span>${Q.length > 0 ? `${Q.length} subcamadas · ` : ""}${U.length} ${U.length === 1 ? "feição" : "feições"}</span>
|
|
934
978
|
</div>
|
|
935
979
|
<div class="ui-drawer-actions">
|
|
936
|
-
<button type="button" class="ui-drawer-btn-sublayer" data-add-sublayer="${
|
|
937
|
-
${
|
|
980
|
+
<button type="button" class="ui-drawer-btn-sublayer" data-add-sublayer="${F}" title="Adicionar nova camada dentro desta">
|
|
981
|
+
${y.mais} Subcamada
|
|
938
982
|
</button>
|
|
939
|
-
<button type="button" class="ui-drawer-btn-danger" data-delete-layer="${
|
|
940
|
-
${
|
|
983
|
+
<button type="button" class="ui-drawer-btn-danger" data-delete-layer="${F}" title="Excluir esta camada e suas feições">
|
|
984
|
+
${y.lixeira}
|
|
941
985
|
<span class="ui-btn-label">Excluir</span>
|
|
942
986
|
</button>
|
|
943
987
|
</div>
|
|
944
988
|
</div>
|
|
945
989
|
</div>
|
|
946
|
-
` : "",
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
).map((
|
|
990
|
+
` : "", Ha = ma(
|
|
991
|
+
Re,
|
|
992
|
+
Ba,
|
|
993
|
+
g == null ? void 0 : g.get(k.id)
|
|
994
|
+
).map((R) => R.tipo === "layer" ? C(R.nodo) : Ta(R.feicao)).join("");
|
|
951
995
|
return `
|
|
952
|
-
<div class="ui-layer-group ${
|
|
953
|
-
<div class="ui-layer-row ${
|
|
954
|
-
<div class="ui-col ui-col-drag" title="Arrastar para reordenar Z-Index">${
|
|
996
|
+
<div class="ui-layer-group ${B > 0 ? "is-sublayer-group" : ""}" data-layer-id="${F}" data-layer-depth="${B}" role="treeitem" aria-level="${B + 1}" aria-expanded="${de}" part="grupo" style="--layer-active-color: ${_};">
|
|
997
|
+
<div class="ui-layer-row ${le ? "" : "hidden-layer"} ${xe ? "active-drawing-layer" : ""} ${B > 0 ? "is-sublayer" : ""} ${ne ? "is-group-row" : ""} ${$a ? "herdado-oculto" : ""} ${Ma ? "herdado-travado" : ""}" data-layer-row="${F}" data-layer-id="${F}" tabindex="-1" draggable="true" part="${xe ? "camada camada-ativa" : "camada"}" ${xe ? 'aria-current="true"' : ""} style="--layer-depth: ${B};">
|
|
998
|
+
<div class="ui-col ui-col-drag" title="Arrastar para reordenar Z-Index">${y.dragHandle}</div>
|
|
955
999
|
|
|
956
|
-
<div class="ui-col ui-col-eye" data-layer-eye="${
|
|
957
|
-
${
|
|
1000
|
+
<div class="ui-col ui-col-eye" data-layer-eye="${F}" role="button" tabindex="0" aria-label="${le ? "Ocultar Camada" : "Exibir Camada"}" title="${le ? "Ocultar Camada" : "Exibir Camada"}">
|
|
1001
|
+
${le ? y.olhoAberto : y.olhoFechado}
|
|
958
1002
|
</div>
|
|
959
1003
|
|
|
960
|
-
<div class="ui-col ui-col-lock ${
|
|
961
|
-
${
|
|
1004
|
+
<div class="ui-col ui-col-lock ${ce ? "" : "ui-lock-open"}" data-layer-lock="${F}" role="button" tabindex="0" aria-label="${ce ? "Desbloquear Camada" : "Bloquear Camada"}" title="${ce ? "Desbloquear Camada" : "Bloquear Camada"}">
|
|
1005
|
+
${ce ? y.cadeadoTrancado : y.cadeadoAberto}
|
|
962
1006
|
</div>
|
|
963
1007
|
|
|
964
|
-
<div class="ui-col ui-col-colorbar ui-col-colorbar-editavel" data-layer-color="${
|
|
1008
|
+
<div class="ui-col ui-col-colorbar ui-col-colorbar-editavel" data-layer-color="${F}" role="button" tabindex="0" style="background: ${_};" aria-label="Alterar cor da camada" title="Alterar cor da camada (usada no destaque de seleção)"></div>
|
|
965
1009
|
|
|
966
|
-
<div class="ui-col ui-col-chevron" data-layer-expand="${
|
|
967
|
-
<span class="ui-chevron-icon ${de ? "open" : ""}">${
|
|
1010
|
+
<div class="ui-col ui-col-chevron" data-layer-expand="${F}" role="button" tabindex="0" aria-label="${de ? "Recolher grupo" : "Expandir grupo"}">
|
|
1011
|
+
<span class="ui-chevron-icon ${de ? "open" : ""}">${y.chevronDir}</span>
|
|
968
1012
|
</div>
|
|
969
1013
|
|
|
970
|
-
<div class="ui-col ui-col-name" data-layer-name-trigger="${
|
|
971
|
-
${s ===
|
|
972
|
-
${
|
|
1014
|
+
<div class="ui-col ui-col-name" data-layer-name-trigger="${F}" title="Clique para ativar camada de desenho | Duplo clique para renomear">
|
|
1015
|
+
${s === k.id ? `<input type="text" class="ui-inline-rename-input" data-inline-layer-input="${F}" value="${se}" />` : `<span class="ui-name-text">${se}</span>
|
|
1016
|
+
${da(Y.total, U.length, Q.length, ne)}`}
|
|
973
1017
|
</div>
|
|
974
1018
|
|
|
975
1019
|
<div class="ui-col ui-col-actions">
|
|
976
|
-
<button class="ui-micro-btn" data-layer-fit="${
|
|
977
|
-
<button class="ui-micro-btn ${
|
|
1020
|
+
<button type="button" class="ui-micro-btn" data-layer-fit="${F}" title="Enquadrar camada no mapa" aria-label="Enquadrar camada no mapa">${y.alvoEnquadrar}</button>
|
|
1021
|
+
<button type="button" class="ui-micro-btn ${ue ? "active" : ""}" data-layer-settings="${F}" title="Ajustar cor, hierarquia, opacidade e excluir" aria-label="Configurações da camada" aria-expanded="${ue}">${y.engrenagem}</button>
|
|
978
1022
|
</div>
|
|
979
1023
|
|
|
980
|
-
<div class="ui-col ui-col-target" data-layer-target="${
|
|
981
|
-
<div class="ui-target-circle ${
|
|
1024
|
+
<div class="ui-col ui-col-target" data-layer-target="${F}" role="button" tabindex="0" aria-label="Selecionar todas as feições deste grupo" title="Selecionar todas as feições deste grupo">
|
|
1025
|
+
<div class="ui-target-circle ${za ? "selected" : Pa ? "partial" : ""}"></div>
|
|
982
1026
|
</div>
|
|
983
1027
|
</div>
|
|
984
1028
|
|
|
985
|
-
${
|
|
1029
|
+
${Na}
|
|
986
1030
|
|
|
987
|
-
<div class="ui-children-container ${
|
|
988
|
-
${
|
|
989
|
-
${
|
|
990
|
-
${
|
|
1031
|
+
<div class="ui-children-container ${B > 0 ? "is-subchildren" : ""}" role="group" style="--parent-depth: ${B}; --parent-layer-color: ${_}; display: ${de ? "block" : "none"};">
|
|
1032
|
+
${Ha}
|
|
1033
|
+
${Ra}
|
|
1034
|
+
${Re.length === 0 && U.length === 0 ? fa(ne) : ""}
|
|
991
1035
|
</div>
|
|
992
1036
|
</div>
|
|
993
1037
|
`;
|
|
994
|
-
},
|
|
1038
|
+
}, z = t.length === 0 ? (v.get("") ?? []).filter(($) => !b || String($.name ?? "").toLowerCase().includes(b)) : [], T = Se({ id: "" }, 0, void 0), Z = z.slice(0, f).map(($) => Fe($, T, o.has($.id), c === $.id)).join(""), Fa = h && h.camadasVisiveis.size === 0 && !Z ? `<div class="ui-search-empty" role="status">Nenhum resultado para “${M((l || "").trim())}”</div>` : Z || I.map(($) => C($)).join("");
|
|
995
1039
|
return `
|
|
996
|
-
${
|
|
1040
|
+
${P}
|
|
997
1041
|
<div class="ui-panel-box">
|
|
998
1042
|
<div class="ui-layer-tree" id="ui-layer-tree-mount" role="tree" aria-label="Camadas e feições" aria-multiselectable="true" part="arvore">
|
|
999
|
-
${
|
|
1043
|
+
${Fa}
|
|
1000
1044
|
</div>
|
|
1001
1045
|
</div>
|
|
1002
1046
|
`;
|
|
1003
1047
|
}
|
|
1004
|
-
function
|
|
1048
|
+
function gt(e) {
|
|
1005
1049
|
return [
|
|
1006
1050
|
{
|
|
1007
1051
|
gatilho: "data-layer-name-trigger",
|
|
@@ -1031,46 +1075,46 @@ function dt(e) {
|
|
|
1031
1075
|
}
|
|
1032
1076
|
];
|
|
1033
1077
|
}
|
|
1034
|
-
function
|
|
1035
|
-
for (const r of
|
|
1078
|
+
function Ke(e, t, a = t) {
|
|
1079
|
+
for (const r of gt(e))
|
|
1036
1080
|
a.querySelectorAll(`[${r.gatilho}]`).forEach((i) => {
|
|
1037
1081
|
i.addEventListener("dblclick", (o) => {
|
|
1038
1082
|
o.stopPropagation();
|
|
1039
1083
|
const n = i.getAttribute(r.gatilho);
|
|
1040
1084
|
if (!n) return;
|
|
1041
1085
|
r.marcarEditando(n), e.solicitarRenderizacao();
|
|
1042
|
-
const s =
|
|
1086
|
+
const s = D(t, r.input, n);
|
|
1043
1087
|
if (!s) return;
|
|
1044
1088
|
s.focus(), s.select();
|
|
1045
|
-
let
|
|
1046
|
-
const l = (
|
|
1047
|
-
var
|
|
1048
|
-
if (!
|
|
1049
|
-
if (
|
|
1089
|
+
let c = !1;
|
|
1090
|
+
const l = (d, p = !1) => {
|
|
1091
|
+
var u, f;
|
|
1092
|
+
if (!c) {
|
|
1093
|
+
if (c = !0, r.marcarEditando(null), d) {
|
|
1050
1094
|
const m = r.aplicar(n, s.value.trim());
|
|
1051
|
-
m && (m.salvar && ((
|
|
1095
|
+
m && (m.salvar && ((u = e.salvarLembrancaEstado) == null || u.call(e)), r.emitir(m.detalhe));
|
|
1052
1096
|
}
|
|
1053
|
-
e.solicitarRenderizacao(), p && ((f =
|
|
1097
|
+
e.solicitarRenderizacao(), p && ((f = D(t, r.linha, n)) == null || f.focus());
|
|
1054
1098
|
}
|
|
1055
1099
|
};
|
|
1056
|
-
s.addEventListener("keydown", (
|
|
1057
|
-
|
|
1100
|
+
s.addEventListener("keydown", (d) => {
|
|
1101
|
+
d.key === "Enter" ? (d.preventDefault(), l(!0, !0)) : d.key === "Escape" && (d.preventDefault(), l(!1, !0));
|
|
1058
1102
|
}), s.addEventListener("blur", () => l(!0));
|
|
1059
1103
|
});
|
|
1060
1104
|
});
|
|
1061
1105
|
}
|
|
1062
|
-
const
|
|
1063
|
-
class
|
|
1106
|
+
const ht = ["dragging", "drop-above", "drop-below", "drop-into"];
|
|
1107
|
+
class vt {
|
|
1064
1108
|
constructor(t, a) {
|
|
1065
|
-
|
|
1066
|
-
|
|
1109
|
+
E(this, "host");
|
|
1110
|
+
E(this, "shadow");
|
|
1067
1111
|
/** Cancela um arraste por toque em andamento (remove os ouvintes de `window`). */
|
|
1068
|
-
|
|
1112
|
+
E(this, "cancelarToque", null);
|
|
1069
1113
|
/**
|
|
1070
1114
|
* Arraste HTML5 em andamento. Fica no gerenciador (e não numa closure de `bindDragAndDrop`) para que linhas
|
|
1071
1115
|
* ligadas depois, na atualização incremental, enxerguem o arraste iniciado numa linha mais antiga.
|
|
1072
1116
|
*/
|
|
1073
|
-
|
|
1117
|
+
E(this, "arraste", {
|
|
1074
1118
|
tipo: null,
|
|
1075
1119
|
camadaId: null,
|
|
1076
1120
|
feicaoId: null
|
|
@@ -1086,11 +1130,11 @@ class ut {
|
|
|
1086
1130
|
(t = this.cancelarToque) == null || t.call(this), this.cancelarToque = null;
|
|
1087
1131
|
}
|
|
1088
1132
|
bindInlineRename() {
|
|
1089
|
-
|
|
1133
|
+
Ke(this.host, this.shadow);
|
|
1090
1134
|
}
|
|
1091
1135
|
limparClassesDeArraste() {
|
|
1092
1136
|
this.shadow.querySelectorAll(".ui-layer-row, .ui-feat-row, .ui-layer-group").forEach((t) => {
|
|
1093
|
-
t.classList.remove(...
|
|
1137
|
+
t.classList.remove(...ht);
|
|
1094
1138
|
});
|
|
1095
1139
|
}
|
|
1096
1140
|
/** Depois de qualquer mudança na ordem/hierarquia de camadas. */
|
|
@@ -1112,7 +1156,7 @@ class ut {
|
|
|
1112
1156
|
const r = this.host.feicoes.find((n) => n.id === t), i = r == null ? void 0 : r.layerId;
|
|
1113
1157
|
if (!a || i === a) return !1;
|
|
1114
1158
|
if ((r == null ? void 0 : r.locked) === !0) return !0;
|
|
1115
|
-
const o =
|
|
1159
|
+
const o = fe(this.host.camadas);
|
|
1116
1160
|
return o.has(a) || !!i && o.has(i);
|
|
1117
1161
|
}
|
|
1118
1162
|
arrasteBloqueado(t) {
|
|
@@ -1124,7 +1168,7 @@ class ut {
|
|
|
1124
1168
|
}
|
|
1125
1169
|
/** Atualização incremental: liga renomear e arraste só nas linhas de feição novas dentro de `raiz`. */
|
|
1126
1170
|
bindLinhasFeicao(t) {
|
|
1127
|
-
|
|
1171
|
+
Ke(this.host, this.shadow, t), this.vincularArrasteFeicoes(t);
|
|
1128
1172
|
}
|
|
1129
1173
|
vincularArrasteCamadas(t) {
|
|
1130
1174
|
t.querySelectorAll('.ui-layer-row[draggable="true"]').forEach((a) => {
|
|
@@ -1139,14 +1183,15 @@ class ut {
|
|
|
1139
1183
|
}), a.addEventListener("dragover", (i) => {
|
|
1140
1184
|
const o = i;
|
|
1141
1185
|
if (o.preventDefault(), o.stopPropagation(), o.dataTransfer && (o.dataTransfer.dropEffect = "move"), this.arraste.tipo === "layer") {
|
|
1142
|
-
if (this.arraste.camadaId === r)
|
|
1143
|
-
|
|
1186
|
+
if (this.arraste.camadaId === r || this.arraste.camadaId && N(this.host.camadas, r, this.arraste.camadaId))
|
|
1187
|
+
return;
|
|
1188
|
+
const n = a.getBoundingClientRect(), s = n.height > 0 ? Ce((o.clientY - n.top) / n.height) : "dentro";
|
|
1144
1189
|
a.classList.toggle("drop-above", s === "acima"), a.classList.toggle("drop-below", s === "abaixo"), a.classList.toggle("drop-into", s === "dentro");
|
|
1145
1190
|
} else if (this.arraste.tipo === "feature") {
|
|
1146
1191
|
const n = this.host.camadas.find((s) => s.id === r);
|
|
1147
1192
|
if (n != null && n.parentId) {
|
|
1148
|
-
const s = a.getBoundingClientRect(),
|
|
1149
|
-
a.classList.toggle("drop-above",
|
|
1193
|
+
const s = a.getBoundingClientRect(), c = s.height > 0 ? Ce((o.clientY - s.top) / s.height) : "dentro";
|
|
1194
|
+
a.classList.toggle("drop-above", c === "acima"), a.classList.toggle("drop-below", c === "abaixo"), a.classList.toggle("drop-into", c === "dentro");
|
|
1150
1195
|
} else
|
|
1151
1196
|
a.classList.remove("drop-above", "drop-below"), a.classList.add("drop-into");
|
|
1152
1197
|
}
|
|
@@ -1154,39 +1199,39 @@ class ut {
|
|
|
1154
1199
|
const o = i.relatedTarget;
|
|
1155
1200
|
o && a.contains(o) || a.classList.remove("drop-above", "drop-below", "drop-into");
|
|
1156
1201
|
}), a.addEventListener("drop", (i) => {
|
|
1157
|
-
var s,
|
|
1202
|
+
var s, c, l, d, p;
|
|
1158
1203
|
const o = i;
|
|
1159
1204
|
o.preventDefault(), o.stopPropagation();
|
|
1160
1205
|
const n = a.classList.contains("drop-into") ? "dentro" : a.classList.contains("drop-above") ? "acima" : "abaixo";
|
|
1161
1206
|
if (this.limparClassesDeArraste(), this.arraste.tipo === "layer") {
|
|
1162
1207
|
if (!this.arraste.camadaId || this.arraste.camadaId === r || !this.host.camadas.some((f) => f.id === this.arraste.camadaId) || !this.host.camadas.some((f) => f.id === r)) return;
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1208
|
+
const u = Ve(this.host.camadas, this.arraste.camadaId, r, n);
|
|
1209
|
+
u && this.host.ordemFilhosPorPai && Ye(
|
|
1165
1210
|
this.host.camadas,
|
|
1166
1211
|
this.host.feicoes,
|
|
1167
1212
|
this.host.ordemFilhosPorPai,
|
|
1168
1213
|
this.arraste.camadaId,
|
|
1169
1214
|
r,
|
|
1170
1215
|
n,
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
), (
|
|
1174
|
-
camadaId:
|
|
1175
|
-
novoParentId:
|
|
1176
|
-
parentAnteriorId:
|
|
1177
|
-
camada:
|
|
1178
|
-
})) :
|
|
1179
|
-
camadaId:
|
|
1180
|
-
novoParentId:
|
|
1181
|
-
parentAnteriorId:
|
|
1182
|
-
camada:
|
|
1216
|
+
u.parentAnteriorId,
|
|
1217
|
+
u.novoParentId
|
|
1218
|
+
), (u == null ? void 0 : u.tipo) === "hierarquia" ? ((s = this.host.expandedLayers) == null || s.add(u.novoParentId), this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1219
|
+
camadaId: u.camada.id,
|
|
1220
|
+
novoParentId: u.novoParentId,
|
|
1221
|
+
parentAnteriorId: u.parentAnteriorId,
|
|
1222
|
+
camada: u.camada
|
|
1223
|
+
})) : u && u.parentAnteriorId !== u.novoParentId && this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1224
|
+
camadaId: u.camada.id,
|
|
1225
|
+
novoParentId: u.novoParentId,
|
|
1226
|
+
parentAnteriorId: u.parentAnteriorId,
|
|
1227
|
+
camada: u.camada
|
|
1183
1228
|
}), this.aposReordenarCamadas();
|
|
1184
1229
|
} else if (this.arraste.tipo === "feature") {
|
|
1185
1230
|
if (!this.arraste.feicaoId) return;
|
|
1186
|
-
const
|
|
1187
|
-
if (
|
|
1188
|
-
if (this.trocaEntreCamadasTravada(this.arraste.feicaoId,
|
|
1189
|
-
const f =
|
|
1231
|
+
const u = this.host.camadas.find((f) => f.id === r);
|
|
1232
|
+
if (u != null && u.parentId && (n === "acima" || n === "abaixo")) {
|
|
1233
|
+
if (this.trocaEntreCamadasTravada(this.arraste.feicaoId, u.parentId) || !this.host.ordemFilhosPorPai) return;
|
|
1234
|
+
const f = dt(
|
|
1190
1235
|
this.host.camadas,
|
|
1191
1236
|
this.host.feicoes,
|
|
1192
1237
|
this.host.ordemFilhosPorPai,
|
|
@@ -1195,16 +1240,16 @@ class ut {
|
|
|
1195
1240
|
n === "acima"
|
|
1196
1241
|
);
|
|
1197
1242
|
if (!f) return;
|
|
1198
|
-
this.host.dispararEvento("ui-feicoes-reordenadas", { feicoes: [...this.host.feicoes] }), f.mudouDeCamada && this.emitirFeicaoMovida(f), (l = (
|
|
1243
|
+
this.host.dispararEvento("ui-feicoes-reordenadas", { feicoes: [...this.host.feicoes] }), f.mudouDeCamada && this.emitirFeicaoMovida(f), (l = (c = this.host).salvarLembrancaEstado) == null || l.call(c), this.host.solicitarRenderizacao();
|
|
1199
1244
|
} else {
|
|
1200
1245
|
if (this.trocaEntreCamadasTravada(this.arraste.feicaoId, r)) return;
|
|
1201
|
-
const f =
|
|
1202
|
-
f && (this.host.ordemFilhosPorPai &&
|
|
1246
|
+
const f = nt(this.host.feicoes, this.host.camadas, this.arraste.feicaoId, r);
|
|
1247
|
+
f && (this.host.ordemFilhosPorPai && ga(
|
|
1203
1248
|
this.host.ordemFilhosPorPai,
|
|
1204
1249
|
f.feicao.id,
|
|
1205
1250
|
f.camadaOrigemId,
|
|
1206
1251
|
f.camadaDestinoId
|
|
1207
|
-
), this.emitirFeicaoMovida(f), (p = (
|
|
1252
|
+
), this.emitirFeicaoMovida(f), (p = (d = this.host).salvarLembrancaEstado) == null || p.call(d), this.host.solicitarRenderizacao());
|
|
1208
1253
|
}
|
|
1209
1254
|
}
|
|
1210
1255
|
}), a.addEventListener("dragend", () => {
|
|
@@ -1223,48 +1268,48 @@ class ut {
|
|
|
1223
1268
|
}
|
|
1224
1269
|
n.stopPropagation(), this.arraste.tipo = "feature", this.arraste.feicaoId = r, this.arraste.camadaId = i, n.dataTransfer && (n.dataTransfer.setData("text/plain", JSON.stringify({ type: "feature", id: r, layerId: i })), n.dataTransfer.effectAllowed = "move"), a.classList.add("dragging");
|
|
1225
1270
|
}), a.addEventListener("dragover", (o) => {
|
|
1226
|
-
const n = o, s = this.arraste.tipo === "feature" && this.arraste.feicaoId !== r,
|
|
1227
|
-
if (!s && !
|
|
1271
|
+
const n = o, s = this.arraste.tipo === "feature" && this.arraste.feicaoId !== r, c = this.arraste.tipo === "layer" && !!this.arraste.camadaId && !!i && this.arraste.camadaId !== i && !N(this.host.camadas, i, this.arraste.camadaId);
|
|
1272
|
+
if (!s && !c) return;
|
|
1228
1273
|
n.preventDefault(), n.stopPropagation(), n.dataTransfer && (n.dataTransfer.dropEffect = "move");
|
|
1229
|
-
const l = a.getBoundingClientRect(),
|
|
1230
|
-
a.classList.toggle("drop-above",
|
|
1274
|
+
const l = a.getBoundingClientRect(), d = n.clientY - l.top < l.height / 2;
|
|
1275
|
+
a.classList.toggle("drop-above", d), a.classList.toggle("drop-below", !d);
|
|
1231
1276
|
}), a.addEventListener("dragleave", (o) => {
|
|
1232
1277
|
const n = o.relatedTarget;
|
|
1233
1278
|
n && a.contains(n) || a.classList.remove("drop-above", "drop-below");
|
|
1234
1279
|
}), a.addEventListener("drop", (o) => {
|
|
1235
|
-
var l,
|
|
1236
|
-
const n = o, s = a.getBoundingClientRect(),
|
|
1280
|
+
var l, d, p;
|
|
1281
|
+
const n = o, s = a.getBoundingClientRect(), c = a.classList.contains("drop-above") ? !0 : a.classList.contains("drop-below") ? !1 : s.height > 0 && n.clientY - s.top < s.height / 2;
|
|
1237
1282
|
if (this.arraste.tipo === "feature") {
|
|
1238
1283
|
if (!this.arraste.feicaoId || this.arraste.feicaoId === r || (n.preventDefault(), n.stopPropagation(), this.limparClassesDeArraste(), this.trocaEntreCamadasTravada(this.arraste.feicaoId, i))) return;
|
|
1239
|
-
const
|
|
1240
|
-
if (!
|
|
1241
|
-
this.host.ordemFilhosPorPai &&
|
|
1284
|
+
const u = st(this.host.feicoes, this.arraste.feicaoId, r, c);
|
|
1285
|
+
if (!u) return;
|
|
1286
|
+
this.host.ordemFilhosPorPai && ut(
|
|
1242
1287
|
this.host.camadas,
|
|
1243
1288
|
this.host.feicoes,
|
|
1244
1289
|
this.host.ordemFilhosPorPai,
|
|
1245
1290
|
this.arraste.feicaoId,
|
|
1246
1291
|
r,
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
), this.host.dispararEvento("ui-feicoes-reordenadas", { feicoes: [...this.host.feicoes] }),
|
|
1292
|
+
c,
|
|
1293
|
+
u.camadaOrigemId,
|
|
1294
|
+
u.camadaDestinoId
|
|
1295
|
+
), this.host.dispararEvento("ui-feicoes-reordenadas", { feicoes: [...this.host.feicoes] }), u.mudouDeCamada && this.emitirFeicaoMovida(u), (d = (l = this.host).salvarLembrancaEstado) == null || d.call(l), this.host.solicitarRenderizacao();
|
|
1251
1296
|
} else if (this.arraste.tipo === "layer") {
|
|
1252
1297
|
if (!this.arraste.camadaId || !i || !this.host.ordemFilhosPorPai) return;
|
|
1253
1298
|
n.preventDefault(), n.stopPropagation(), this.limparClassesDeArraste();
|
|
1254
|
-
const
|
|
1299
|
+
const u = Ue(
|
|
1255
1300
|
this.host.camadas,
|
|
1256
1301
|
this.host.feicoes,
|
|
1257
1302
|
this.host.ordemFilhosPorPai,
|
|
1258
1303
|
this.arraste.camadaId,
|
|
1259
1304
|
r,
|
|
1260
|
-
|
|
1305
|
+
c
|
|
1261
1306
|
);
|
|
1262
|
-
if (!
|
|
1263
|
-
|
|
1264
|
-
camadaId:
|
|
1265
|
-
novoParentId:
|
|
1266
|
-
parentAnteriorId:
|
|
1267
|
-
camada:
|
|
1307
|
+
if (!u) return;
|
|
1308
|
+
u.parentAnteriorId !== u.novoParentId && u.novoParentId && ((p = this.host.expandedLayers) == null || p.add(u.novoParentId), this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1309
|
+
camadaId: u.camada.id,
|
|
1310
|
+
novoParentId: u.novoParentId,
|
|
1311
|
+
parentAnteriorId: u.parentAnteriorId,
|
|
1312
|
+
camada: u.camada
|
|
1268
1313
|
})), this.aposReordenarCamadas();
|
|
1269
1314
|
}
|
|
1270
1315
|
}), a.addEventListener("dragend", (o) => {
|
|
@@ -1284,125 +1329,135 @@ class ut {
|
|
|
1284
1329
|
if (!a) return;
|
|
1285
1330
|
const r = a.getAttribute("data-layer-id");
|
|
1286
1331
|
r && t.addEventListener("pointerdown", (i) => {
|
|
1287
|
-
var
|
|
1332
|
+
var u;
|
|
1288
1333
|
const o = i;
|
|
1289
1334
|
if (o.pointerType === "mouse" && o.button !== 0 || this.host.editingLayerId || this.host.editingFeatureId) return;
|
|
1290
|
-
(
|
|
1335
|
+
(u = this.cancelarToque) == null || u.call(this);
|
|
1291
1336
|
let n = null, s = "abaixo";
|
|
1292
|
-
const
|
|
1293
|
-
|
|
1294
|
-
const
|
|
1295
|
-
if (n && n !==
|
|
1296
|
-
if (
|
|
1297
|
-
const
|
|
1298
|
-
if (!
|
|
1337
|
+
const c = (f) => {
|
|
1338
|
+
f.preventDefault(), a.classList.add("dragging");
|
|
1339
|
+
const m = this.shadow.elementFromPoint(f.clientX, f.clientY), g = m ? m.closest(".ui-layer-row, .ui-feat-row") : null;
|
|
1340
|
+
if (n && n !== g && n.classList.remove("drop-above", "drop-below", "drop-into"), g && g !== a)
|
|
1341
|
+
if (g.classList.contains("ui-feat-row")) {
|
|
1342
|
+
const h = g.getAttribute("data-feat-layer");
|
|
1343
|
+
if (!h || h === r || N(this.host.camadas, h, r)) {
|
|
1299
1344
|
n = null;
|
|
1300
1345
|
return;
|
|
1301
1346
|
}
|
|
1302
|
-
n =
|
|
1303
|
-
const
|
|
1304
|
-
s =
|
|
1347
|
+
n = g;
|
|
1348
|
+
const v = g.getBoundingClientRect(), A = v.height > 0 && f.clientY - v.top < v.height / 2;
|
|
1349
|
+
s = A ? "acima" : "abaixo", g.classList.toggle("drop-above", A), g.classList.toggle("drop-below", !A), g.classList.remove("drop-into");
|
|
1305
1350
|
} else {
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1351
|
+
const h = g.getAttribute("data-layer-id");
|
|
1352
|
+
if (h && N(this.host.camadas, h, r)) {
|
|
1353
|
+
n = null;
|
|
1354
|
+
return;
|
|
1355
|
+
}
|
|
1356
|
+
n = g;
|
|
1357
|
+
const v = g.getBoundingClientRect();
|
|
1358
|
+
s = v.height > 0 ? Ce((f.clientY - v.top) / v.height) : "abaixo", g.classList.toggle("drop-above", s === "acima"), g.classList.toggle("drop-below", s === "abaixo"), g.classList.toggle("drop-into", s === "dentro");
|
|
1309
1359
|
}
|
|
1310
1360
|
else
|
|
1311
1361
|
n = null;
|
|
1312
1362
|
}, l = () => {
|
|
1313
|
-
window.removeEventListener("pointermove",
|
|
1314
|
-
},
|
|
1315
|
-
|
|
1363
|
+
window.removeEventListener("pointermove", c), window.removeEventListener("pointerup", p), window.removeEventListener("pointercancel", d), this.cancelarToque = null;
|
|
1364
|
+
}, d = () => {
|
|
1365
|
+
l(), this.limparClassesDeArraste();
|
|
1366
|
+
}, p = () => {
|
|
1367
|
+
var b, h;
|
|
1316
1368
|
l();
|
|
1317
|
-
const
|
|
1318
|
-
if (this.limparClassesDeArraste(),
|
|
1319
|
-
const
|
|
1369
|
+
const f = n == null ? void 0 : n.getAttribute("data-layer-id"), m = n == null ? void 0 : n.getAttribute("data-feat-row");
|
|
1370
|
+
if (this.limparClassesDeArraste(), m && this.host.ordemFilhosPorPai) {
|
|
1371
|
+
const v = Ue(
|
|
1320
1372
|
this.host.camadas,
|
|
1321
1373
|
this.host.feicoes,
|
|
1322
1374
|
this.host.ordemFilhosPorPai,
|
|
1323
1375
|
r,
|
|
1324
|
-
|
|
1376
|
+
m,
|
|
1325
1377
|
s === "acima"
|
|
1326
1378
|
);
|
|
1327
|
-
if (!
|
|
1328
|
-
|
|
1329
|
-
camadaId:
|
|
1330
|
-
novoParentId:
|
|
1331
|
-
parentAnteriorId:
|
|
1332
|
-
camada:
|
|
1379
|
+
if (!v) return;
|
|
1380
|
+
v.parentAnteriorId !== v.novoParentId && v.novoParentId && ((b = this.host.expandedLayers) == null || b.add(v.novoParentId), this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1381
|
+
camadaId: v.camada.id,
|
|
1382
|
+
novoParentId: v.novoParentId,
|
|
1383
|
+
parentAnteriorId: v.parentAnteriorId,
|
|
1384
|
+
camada: v.camada
|
|
1333
1385
|
})), this.aposReordenarCamadas();
|
|
1334
1386
|
return;
|
|
1335
1387
|
}
|
|
1336
|
-
if (!
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1388
|
+
if (!f || f === r) return;
|
|
1389
|
+
const g = Ve(this.host.camadas, r, f, s);
|
|
1390
|
+
g && (this.host.ordemFilhosPorPai && Ye(
|
|
1339
1391
|
this.host.camadas,
|
|
1340
1392
|
this.host.feicoes,
|
|
1341
1393
|
this.host.ordemFilhosPorPai,
|
|
1342
1394
|
r,
|
|
1343
|
-
|
|
1395
|
+
f,
|
|
1344
1396
|
s,
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
),
|
|
1348
|
-
camadaId:
|
|
1349
|
-
novoParentId:
|
|
1350
|
-
parentAnteriorId:
|
|
1351
|
-
camada:
|
|
1352
|
-
})) :
|
|
1353
|
-
camadaId:
|
|
1354
|
-
novoParentId:
|
|
1355
|
-
parentAnteriorId:
|
|
1356
|
-
camada:
|
|
1397
|
+
g.parentAnteriorId,
|
|
1398
|
+
g.novoParentId
|
|
1399
|
+
), g.tipo === "hierarquia" ? ((h = this.host.expandedLayers) == null || h.add(g.novoParentId), this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1400
|
+
camadaId: g.camada.id,
|
|
1401
|
+
novoParentId: g.novoParentId,
|
|
1402
|
+
parentAnteriorId: g.parentAnteriorId,
|
|
1403
|
+
camada: g.camada
|
|
1404
|
+
})) : g.parentAnteriorId !== g.novoParentId && this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1405
|
+
camadaId: g.camada.id,
|
|
1406
|
+
novoParentId: g.novoParentId,
|
|
1407
|
+
parentAnteriorId: g.parentAnteriorId,
|
|
1408
|
+
camada: g.camada
|
|
1357
1409
|
}), this.aposReordenarCamadas());
|
|
1358
1410
|
};
|
|
1359
|
-
this.cancelarToque = ()
|
|
1360
|
-
l(), this.limparClassesDeArraste();
|
|
1361
|
-
}, window.addEventListener("pointermove", d, { passive: !1 }), window.addEventListener("pointerup", u), window.addEventListener("pointercancel", u);
|
|
1411
|
+
this.cancelarToque = d, window.addEventListener("pointermove", c, { passive: !1 }), window.addEventListener("pointerup", p), window.addEventListener("pointercancel", d);
|
|
1362
1412
|
});
|
|
1363
1413
|
});
|
|
1364
1414
|
}
|
|
1365
1415
|
}
|
|
1366
|
-
const
|
|
1367
|
-
function
|
|
1416
|
+
const bt = "ui_camadas_estado_";
|
|
1417
|
+
function yt(e, t) {
|
|
1368
1418
|
const a = (e || t || "default").trim();
|
|
1369
|
-
return `${
|
|
1419
|
+
return `${bt}${a}`;
|
|
1370
1420
|
}
|
|
1371
|
-
function
|
|
1421
|
+
function pe(e) {
|
|
1372
1422
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
1373
1423
|
}
|
|
1374
|
-
function
|
|
1424
|
+
function Qe(e) {
|
|
1425
|
+
return e !== "__proto__" && e !== "constructor" && e !== "prototype";
|
|
1426
|
+
}
|
|
1427
|
+
function ee(e) {
|
|
1375
1428
|
return Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
|
|
1376
1429
|
}
|
|
1377
|
-
function
|
|
1378
|
-
if (!
|
|
1430
|
+
function Xe(e) {
|
|
1431
|
+
if (!pe(e)) return;
|
|
1379
1432
|
const t = {};
|
|
1380
1433
|
return typeof e.name == "string" && (t.name = e.name), typeof e.visible == "boolean" && (t.visible = e.visible), typeof e.locked == "boolean" && (t.locked = e.locked), typeof e.opacity == "number" && Number.isFinite(e.opacity) && e.opacity >= 0 && e.opacity <= 1 && (t.opacity = e.opacity), typeof e.color == "string" && (t.color = e.color), (typeof e.parentId == "string" || e.parentId === null) && (t.parentId = e.parentId), t;
|
|
1381
1434
|
}
|
|
1382
|
-
function
|
|
1383
|
-
if (!
|
|
1435
|
+
function xt(e) {
|
|
1436
|
+
if (!pe(e)) return null;
|
|
1384
1437
|
const t = {};
|
|
1385
|
-
if (
|
|
1438
|
+
if (pe(e.camadasOverrides))
|
|
1386
1439
|
for (const [r, i] of Object.entries(e.camadasOverrides)) {
|
|
1387
|
-
|
|
1440
|
+
if (!Qe(r)) continue;
|
|
1441
|
+
const o = Xe(i);
|
|
1388
1442
|
if (!o) continue;
|
|
1389
|
-
const n =
|
|
1443
|
+
const n = Xe(i.origem);
|
|
1390
1444
|
t[r] = n ? { ...o, origem: n } : o;
|
|
1391
1445
|
}
|
|
1392
1446
|
const a = e.altura;
|
|
1393
1447
|
return {
|
|
1394
1448
|
versao: typeof e.versao == "number" ? e.versao : 1,
|
|
1395
|
-
expandedLayerIds:
|
|
1396
|
-
collapsedLayerIds:
|
|
1449
|
+
expandedLayerIds: ee(e.expandedLayerIds),
|
|
1450
|
+
collapsedLayerIds: ee(e.collapsedLayerIds),
|
|
1397
1451
|
camadaAtivaId: typeof e.camadaAtivaId == "string" ? e.camadaAtivaId : null,
|
|
1398
1452
|
painelColapsado: typeof e.painelColapsado == "boolean" ? e.painelColapsado : void 0,
|
|
1399
|
-
ordemCamadasIds:
|
|
1400
|
-
ordemOrigemIds: Array.isArray(e.ordemOrigemIds) ?
|
|
1453
|
+
ordemCamadasIds: ee(e.ordemCamadasIds),
|
|
1454
|
+
ordemOrigemIds: Array.isArray(e.ordemOrigemIds) ? ee(e.ordemOrigemIds) : void 0,
|
|
1401
1455
|
ordemFilhosPorPai: (() => {
|
|
1402
|
-
if (!
|
|
1456
|
+
if (!pe(e.ordemFilhosPorPai)) return;
|
|
1403
1457
|
const r = {};
|
|
1404
1458
|
for (const [i, o] of Object.entries(e.ordemFilhosPorPai)) {
|
|
1405
|
-
|
|
1459
|
+
if (!Qe(i)) continue;
|
|
1460
|
+
const n = ee(o);
|
|
1406
1461
|
n.length > 0 && (r[i] = n);
|
|
1407
1462
|
}
|
|
1408
1463
|
return Object.keys(r).length > 0 ? r : void 0;
|
|
@@ -1414,18 +1469,18 @@ function mt(e) {
|
|
|
1414
1469
|
ultimaAtualizacao: typeof e.ultimaAtualizacao == "number" ? e.ultimaAtualizacao : void 0
|
|
1415
1470
|
};
|
|
1416
1471
|
}
|
|
1417
|
-
function
|
|
1472
|
+
function Me(e) {
|
|
1418
1473
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
1419
1474
|
return null;
|
|
1420
1475
|
try {
|
|
1421
1476
|
const t = localStorage.getItem(e);
|
|
1422
|
-
return t ?
|
|
1477
|
+
return t ? xt(JSON.parse(t)) : null;
|
|
1423
1478
|
} catch (t) {
|
|
1424
1479
|
console.warn(`[UI-Camadas] Não foi possível carregar o estado persistido (${e}):`, t);
|
|
1425
1480
|
}
|
|
1426
1481
|
return null;
|
|
1427
1482
|
}
|
|
1428
|
-
function
|
|
1483
|
+
function wt(e, t) {
|
|
1429
1484
|
if (!(typeof window > "u" || typeof localStorage > "u"))
|
|
1430
1485
|
try {
|
|
1431
1486
|
localStorage.setItem(e, JSON.stringify(t));
|
|
@@ -1433,14 +1488,14 @@ function gt(e, t) {
|
|
|
1433
1488
|
console.warn(`[UI-Camadas] Não foi possível salvar o estado persistido (${e}):`, a);
|
|
1434
1489
|
}
|
|
1435
1490
|
}
|
|
1436
|
-
function
|
|
1491
|
+
function At(e) {
|
|
1437
1492
|
if (!(typeof window > "u" || typeof localStorage > "u"))
|
|
1438
1493
|
try {
|
|
1439
1494
|
localStorage.removeItem(e);
|
|
1440
1495
|
} catch {
|
|
1441
1496
|
}
|
|
1442
1497
|
}
|
|
1443
|
-
function
|
|
1498
|
+
function ba(e) {
|
|
1444
1499
|
return {
|
|
1445
1500
|
name: e.name,
|
|
1446
1501
|
visible: e.visible !== !1,
|
|
@@ -1450,60 +1505,60 @@ function fa(e) {
|
|
|
1450
1505
|
parentId: e.parentId !== void 0 ? e.parentId : null
|
|
1451
1506
|
};
|
|
1452
1507
|
}
|
|
1453
|
-
function
|
|
1508
|
+
function Et(e, t, a, r) {
|
|
1454
1509
|
var p;
|
|
1455
1510
|
if (!Array.isArray(e)) return;
|
|
1456
1511
|
const i = (t == null ? void 0 : t.camadasOverrides) || {}, o = new Set((t == null ? void 0 : t.expandedLayerIds) || []), n = new Set((t == null ? void 0 : t.collapsedLayerIds) || []), s = o.size > 0 || n.size > 0;
|
|
1457
|
-
for (let
|
|
1458
|
-
const f = e[
|
|
1459
|
-
if (r == null || r.set(f.id,
|
|
1460
|
-
const
|
|
1461
|
-
var
|
|
1462
|
-
const
|
|
1463
|
-
return
|
|
1512
|
+
for (let u = 0; u < e.length; u++) {
|
|
1513
|
+
const f = e[u], m = i[f.id];
|
|
1514
|
+
if (r == null || r.set(f.id, ba(f)), m) {
|
|
1515
|
+
const g = m.origem, b = (h) => {
|
|
1516
|
+
var A;
|
|
1517
|
+
const v = (A = r == null ? void 0 : r.get(f.id)) == null ? void 0 : A[h];
|
|
1518
|
+
return g !== void 0 && g[h] !== v;
|
|
1464
1519
|
};
|
|
1465
|
-
typeof m.name == "string" && m.name.trim() && !
|
|
1520
|
+
typeof m.name == "string" && m.name.trim() && !b("name") && (f.name = m.name), typeof m.visible == "boolean" && !b("visible") && (f.visible = m.visible), typeof m.locked == "boolean" && !b("locked") && (f.locked = m.locked), typeof m.opacity == "number" && !b("opacity") && (f.opacity = m.opacity), typeof m.color == "string" && !b("color") && (f.color = m.color), m.parentId !== void 0 && !b("parentId") && (f.parentId = m.parentId);
|
|
1466
1521
|
}
|
|
1467
1522
|
s ? o.has(f.id) ? a.add(f.id) : n.has(f.id) ? a.delete(f.id) : a.add(f.id) : a.add(f.id);
|
|
1468
1523
|
}
|
|
1469
|
-
for (let
|
|
1470
|
-
const f = e[
|
|
1471
|
-
f.parentId && (f.parentId === f.id ||
|
|
1524
|
+
for (let u = 0; u < e.length; u++) {
|
|
1525
|
+
const f = e[u];
|
|
1526
|
+
f.parentId && (f.parentId === f.id || N(e, f.parentId, f.id)) && (f.parentId = ((p = r == null ? void 0 : r.get(f.id)) == null ? void 0 : p.parentId) ?? null);
|
|
1472
1527
|
}
|
|
1473
|
-
const
|
|
1528
|
+
const c = new Set(e.map((u) => u.id)), l = t == null ? void 0 : t.ordemOrigemIds;
|
|
1474
1529
|
if (!(Array.isArray(l) && (() => {
|
|
1475
|
-
const
|
|
1530
|
+
const u = new Set(l), f = (m) => m.filter((g) => c.has(g) && u.has(g)).join("|");
|
|
1476
1531
|
return f(l) !== f(e.map((m) => m.id));
|
|
1477
1532
|
})()) && Array.isArray(t == null ? void 0 : t.ordemCamadasIds) && t.ordemCamadasIds.length > 0) {
|
|
1478
|
-
const
|
|
1479
|
-
t.ordemCamadasIds.forEach((f, m) =>
|
|
1480
|
-
const
|
|
1481
|
-
return
|
|
1533
|
+
const u = /* @__PURE__ */ new Map();
|
|
1534
|
+
t.ordemCamadasIds.forEach((f, m) => u.set(f, m)), e.sort((f, m) => {
|
|
1535
|
+
const g = u.has(f.id) ? u.get(f.id) : 1 / 0, b = u.has(m.id) ? u.get(m.id) : 1 / 0;
|
|
1536
|
+
return g - b;
|
|
1482
1537
|
});
|
|
1483
1538
|
}
|
|
1484
1539
|
}
|
|
1485
|
-
function
|
|
1540
|
+
function It(e) {
|
|
1486
1541
|
const { estadoAnterior: t, camadas: a, expandedLayers: r } = e;
|
|
1487
1542
|
let i = (t == null ? void 0 : t.expandedLayerIds) || [], o = (t == null ? void 0 : t.collapsedLayerIds) || [], n = (t == null ? void 0 : t.ordemCamadasIds) || [], s = t == null ? void 0 : t.ordemOrigemIds;
|
|
1488
|
-
const
|
|
1543
|
+
const c = {
|
|
1489
1544
|
...(t == null ? void 0 : t.camadasOverrides) || {}
|
|
1490
1545
|
};
|
|
1491
|
-
a.length > 0 && (i = [], o = [], n = a.map((
|
|
1492
|
-
var p,
|
|
1493
|
-
r.has(
|
|
1494
|
-
name:
|
|
1495
|
-
visible:
|
|
1496
|
-
locked: !!
|
|
1497
|
-
opacity: typeof
|
|
1498
|
-
color:
|
|
1499
|
-
parentId:
|
|
1500
|
-
origem: ((p = e.origensCamadas) == null ? void 0 : p.get(
|
|
1546
|
+
a.length > 0 && (i = [], o = [], n = a.map((d) => d.id), s = e.origensCamadas ? [...e.origensCamadas.keys()] : n, a.forEach((d) => {
|
|
1547
|
+
var p, u;
|
|
1548
|
+
r.has(d.id) ? i.push(d.id) : o.push(d.id), c[d.id] = {
|
|
1549
|
+
name: d.name,
|
|
1550
|
+
visible: d.visible !== !1,
|
|
1551
|
+
locked: !!d.locked,
|
|
1552
|
+
opacity: typeof d.opacity == "number" ? d.opacity : 1,
|
|
1553
|
+
color: d.color || "#00E08A",
|
|
1554
|
+
parentId: d.parentId !== void 0 ? d.parentId : null,
|
|
1555
|
+
origem: ((p = e.origensCamadas) == null ? void 0 : p.get(d.id)) ?? ((u = c[d.id]) == null ? void 0 : u.origem)
|
|
1501
1556
|
};
|
|
1502
1557
|
}));
|
|
1503
|
-
for (const
|
|
1558
|
+
for (const d of e.camadasRemovidas ?? []) delete c[d];
|
|
1504
1559
|
let l;
|
|
1505
|
-
return e.ordemFilhosPorPai && e.ordemFilhosPorPai.size > 0 ? (l = {}, e.ordemFilhosPorPai.forEach((
|
|
1506
|
-
|
|
1560
|
+
return e.ordemFilhosPorPai && e.ordemFilhosPorPai.size > 0 ? (l = {}, e.ordemFilhosPorPai.forEach((d, p) => {
|
|
1561
|
+
d.length > 0 && (l[p] = [...d]);
|
|
1507
1562
|
}), Object.keys(l).length === 0 && (l = void 0)) : !a.length && (t != null && t.ordemFilhosPorPai) && (l = t.ordemFilhosPorPai), {
|
|
1508
1563
|
versao: 1,
|
|
1509
1564
|
expandedLayerIds: i,
|
|
@@ -1516,58 +1571,79 @@ function bt(e) {
|
|
|
1516
1571
|
mapaBaseAtivo: e.mapaBaseAtivo,
|
|
1517
1572
|
densidade: e.densidade,
|
|
1518
1573
|
altura: e.altura,
|
|
1519
|
-
camadasOverrides:
|
|
1574
|
+
camadasOverrides: c,
|
|
1520
1575
|
ultimaAtualizacao: Date.now()
|
|
1521
1576
|
};
|
|
1522
1577
|
}
|
|
1523
|
-
const yt = `:host{display:flex;flex-direction:column;box-sizing:border-box;font-family:inherit;font-size:11px;color:var(--ui-cor-texto, #e1e1e6);-webkit-user-select:none;user-select:none;width:100%;height:var(--ui-camadas-altura, 100%);min-height:var(--ui-camadas-min-altura, 140px);position:relative;--camada-respiro: 8px;--camada-barra-altura: 28px;--camada-linha-altura: 25px;--camada-thumb-tamanho: 20px;--camada-indent-nivel: 16px;--camada-transicao: .16s cubic-bezier(.16, 1, .3, 1)}:host([densidade="compacto"]){--camada-linha-altura: 22px;--camada-thumb-tamanho: 17px;font-size:10px}:host([flutuante]){position:absolute;top:10px;right:10px;bottom:46px;z-index:var(--ui-z-workspace-hud, 500);width:auto;height:var(--ui-camadas-altura, auto)}*,*:before,*:after{box-sizing:border-box}:host(:not([flutuante])) .ui-camadas-container{max-width:100%;min-width:0;border:none;box-shadow:none;border-radius:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=esquerda]{border-left:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=direita]{border-right:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=ambas]{border-left:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent));border-right:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}.ui-camadas-container{display:flex;flex-direction:column;flex:1 1 auto;height:100%;min-height:0;width:100%;max-width:380px;min-width:270px;background:var(--ui-degrade-interno, var(--ui-camadas-fundo, var(--ui-fundo-superficie, var(--ui-cor-superficie, #141417))));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);box-shadow:var(--ui-sombra-lg, 0 10px 30px -4px rgba(0, 0, 0, .5)),0 0 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);overflow:hidden;position:relative;transition:transform .24s cubic-bezier(.16,1,.3,1),opacity .2s ease;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}:host([colapsado]) .ui-camadas-container{transform:translate(calc(100% + 24px));opacity:0;pointer-events:none}.ui-camadas-toggle-flutuante{display:none;position:absolute;top:10px;right:10px;z-index:calc(var(--ui-z-workspace-hud, 500) - 1);background:var(--ui-camadas-toggle-fundo, var(--ui-fundo-superficie, var(--ui-cor-superficie, #141417)));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .18));border-radius:var(--ui-raio-borda, 6px);color:var(--ui-cor-texto, #ffffff);width:34px;height:34px;cursor:pointer;align-items:center;justify-content:center;box-shadow:var(--ui-sombra-md, 0 8px 20px rgba(0, 0, 0, .45));transition:all var(--camada-transicao)}:host([colapsado][flutuante]) .ui-camadas-toggle-flutuante{display:flex}.ui-camadas-toggle-flutuante:hover{border-color:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-primaria, #00E08A);transform:scale(1.08);box-shadow:0 0 14px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-camadas-btn-colapsar{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:22px;height:22px;cursor:pointer;border-radius:var(--ui-raio-sm, 4px);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all var(--camada-transicao)}.ui-camadas-btn-colapsar:hover{color:var(--ui-cor-texto, #ffffff);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .09))}.ui-camadas-corpo{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 var(--camada-respiro) var(--camada-respiro);display:flex;flex-direction:column;gap:6px;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 16%,transparent) transparent}.ui-camadas-corpo::-webkit-scrollbar{width:4px}.ui-camadas-corpo::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent);border-radius:var(--ui-raio-sm, 4px)}.ui-camadas-corpo::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 32%,transparent)}.ui-tree-toolbar{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:var(--camada-barra-altura);min-height:var(--camada-barra-altura);flex-shrink:0;margin:0 calc(-1 * var(--camada-respiro));padding:0 var(--camada-respiro);gap:8px;border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .06))}.ui-tree-title-group{display:flex;align-items:center;gap:5px}.ui-tree-section-title{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-tree-count-badge{font-size:9px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent);color:var(--ui-cor-texto-secundario, #888899);padding:1px 5px;border-radius:8px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent)}.ui-tree-actions{display:flex;align-items:center;gap:3px}.ui-tree-action-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);border-radius:var(--ui-raio-sm, 4px);width:24px;height:24px;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-tree-action-btn:hover{color:var(--ui-cor-texto, #ffffff);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .09))}.ui-tree-btn-new{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 14%,transparent);border:none;color:var(--ui-cor-primaria, #00E08A);border-radius:var(--ui-raio-sm, 4px);height:24px;padding:0 8px;font-size:10px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-tree-btn-new:hover{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-tree-search-wrapper{position:relative;display:flex;align-items:center;margin:1px 0}.ui-tree-search-icon{position:absolute;left:8px;color:var(--ui-cor-texto-secundario, #888899);pointer-events:none;display:flex;align-items:center}.ui-tree-search-input{width:100%;height:25px;background:var(--ui-cor-fundo, #0a0a0c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1));border-radius:var(--ui-raio-borda, 5px);padding:0 24px 0 26px;color:var(--ui-cor-texto, #ffffff);font-size:10.5px;outline:none;transition:border-color var(--camada-transicao),box-shadow var(--camada-transicao)}.ui-tree-search-input:focus{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)}.ui-tree-search-clear{position:absolute;right:5px;background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;width:18px;height:18px;display:flex;align-items:center;justify-content:center;border-radius:3px;transition:all var(--camada-transicao)}.ui-tree-search-clear:hover{color:var(--ui-cor-texto, #ffffff);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent)}.ui-panel-box{background:var(--ui-cor-fundo, #0c0c0f);border:none;border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));border-radius:0;margin:0 calc(-1 * var(--camada-respiro)) calc(-1 * var(--camada-respiro));overflow:hidden;display:flex;flex-direction:column;flex:1 1 0%;min-height:140px}.ui-search-empty{padding:14px 10px;text-align:center;font-size:11px;color:var(--ui-cor-texto-secundario, #888899);overflow-wrap:anywhere}.ui-layer-tree{flex:1 1 0%;min-height:40px;overflow-y:auto;overflow-x:hidden}.ui-layer-group{border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .04));transition:background var(--camada-transicao)}.ui-layer-group.drop-into{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 9%,transparent)!important;outline:1.5px dashed var(--ui-cor-primaria, #00E08A);outline-offset:-1.5px}.ui-layer-row,.ui-feat-row{display:flex;align-items:center;height:var(--camada-linha-altura);min-height:var(--camada-linha-altura);max-height:var(--camada-linha-altura);padding:0 4px;-webkit-user-select:none;user-select:none;cursor:default;transition:background .1s ease;position:relative}.ui-layer-row{background:var(--ui-cor-fundo-elevado, #18181d);font-weight:600;cursor:pointer;border-left:3px solid transparent}.ui-layer-row:hover{background:var(--ui-cor-hover-menu, #22222a)}.ui-layer-row.active-drawing-layer{background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-primaria, #00E08A)) 18%,var(--ui-cor-fundo-elevado, #18181d))!important;border-left:3px solid var(--layer-active-color, var(--ui-cor-primaria, #00E08A))!important;box-shadow:inset 0 0 12px color-mix(in srgb,var(--layer-active-color, var(--ui-cor-primaria, #00E08A)) 10%,transparent)}.ui-layer-row.active-drawing-layer .ui-name-text{color:var(--ui-cor-texto, #e1e1e6);font-weight:700}.ui-feat-row{border-left:3px solid transparent;padding-left:13px;background:var(--ui-cor-fundo, #101014);font-weight:400;cursor:pointer}.ui-feat-row:hover{background:var(--ui-cor-hover-menu, #19191f)}.ui-feat-row.selected-row{background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 20%,var(--ui-cor-fundo, #101014))!important;outline:1px solid color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 55%,transparent)!important;outline-offset:-1px}.ui-layer-row.hidden-layer,.ui-feat-row.hidden-row{opacity:.52}.ui-layer-row.hidden-layer .ui-col-eye,.ui-feat-row.hidden-row .ui-col-eye{color:var(--ui-cor-texto-alerta, #ffb86c);opacity:.95}.ui-layer-row.dragging,.ui-feat-row.dragging{opacity:.35;background:color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 16%,transparent)!important}.ui-layer-row.drop-above:before,.ui-feat-row.drop-above:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:var(--ui-cor-texto-info, #33b5ff);box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 100%,transparent);z-index:20;pointer-events:none}.ui-layer-row.drop-below:after,.ui-feat-row.drop-below:after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--ui-cor-texto-info, #33b5ff);box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 100%,transparent);z-index:20;pointer-events:none}.ui-layer-row.drop-into{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 16%,transparent)!important;outline:1.5px dashed var(--ui-cor-primaria, #00E08A)!important;outline-offset:-2px;border-radius:var(--ui-raio-sm, 4px)}.ui-layer-row.is-sublayer{background:color-mix(in srgb,var(--ui-cor-fundo-elevado, #18181d) 70%,transparent)}.ui-group-folder-icon{display:inline-flex;align-items:center;justify-content:center;color:var(--ui-cor-texto-alerta, #ffb86c);margin-right:4px;flex-shrink:0}.ui-col{display:flex;align-items:center;justify-content:center;flex-shrink:0;height:var(--camada-linha-altura)}.ui-col-drag{width:8px;margin-right:1px;cursor:grab;color:var(--ui-cor-texto-secundario, #888899);opacity:.35;touch-action:none;transition:opacity var(--camada-transicao),color var(--camada-transicao)}.ui-layer-row:hover .ui-col-drag,.ui-feat-row:hover .ui-col-drag{opacity:.9;color:var(--ui-cor-primaria, #00E08A)}.ui-col-drag:active{cursor:grabbing}.ui-col-eye{width:20px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);transition:color var(--camada-transicao)}.ui-col-eye:hover{color:var(--ui-cor-primaria, #00E08A)}.ui-col-lock{width:18px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);transition:color var(--camada-transicao)}.ui-col-lock:hover{color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-col-colorbar{width:5px;height:16px;margin:0 3px 0 2px;border-radius:1.5px;flex-shrink:0}.ui-col-colorbar-editavel{position:relative;width:5px;height:18px;cursor:pointer}.ui-col-colorbar-editavel:before{content:"";position:absolute;top:-3px;right:-4px;bottom:-3px;left:-4px}.ui-col-colorbar-editavel:hover,.ui-col-colorbar-editavel:focus-visible{filter:brightness(1.3);outline:none}.ui-col-chevron,.ui-feat-row .ui-col-thumb{margin-left:calc(var(--layer-depth, 0) * var(--camada-indent-nivel, 16px))}.ui-col-chevron{width:14px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);display:flex;align-items:center;justify-content:center}.ui-chevron-icon{display:inline-flex;align-items:center;justify-content:center;transition:transform var(--camada-transicao)}.ui-chevron-icon.open{transform:rotate(90deg)}.ui-col-thumb{width:calc(var(--camada-thumb-tamanho) + 3px);margin-right:4px;display:flex;align-items:center;justify-content:center}.ui-thumb-box{width:var(--camada-thumb-tamanho);height:var(--camada-thumb-tamanho);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-radius:3px;background:var(--ui-cor-fundo, #0d0d10);box-sizing:border-box;overflow:hidden;display:flex;align-items:center;justify-content:center}.ui-col-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;color:var(--ui-cor-texto, #e1e1e6);padding-left:2px;padding-right:4px;cursor:pointer;display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:4px}.ui-name-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-count-chip{font-size:9px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;color:var(--ui-cor-texto-secundario, #888899);font-weight:400;padding:0 2px;flex-shrink:0}.ui-col-actions{display:flex;align-items:center;gap:2px;opacity:0;transition:opacity var(--camada-transicao)}.ui-layer-row:hover .ui-col-actions,.ui-feat-row:hover .ui-col-actions,.ui-layer-row:focus-within .ui-col-actions,.ui-feat-row:focus-within .ui-col-actions,.ui-col-actions:has(.ui-micro-btn.active){opacity:1}.ui-micro-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:18px;height:18px;padding:0;border-radius:3px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-micro-btn:hover{color:var(--ui-cor-primaria, #00E08A);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-micro-btn.active{color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)}.ui-col-target{width:22px;cursor:pointer}.ui-target-circle{width:11px;height:11px;border-radius:50%;border:1.5px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 32%,transparent);background:transparent;transition:all .12s ease}.ui-col-target:hover .ui-target-circle{border-color:var(--ui-cor-texto-info, #33b5ff);transform:scale(1.18)}.ui-target-circle.selected{border:2px solid var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));background:var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));box-shadow:inset 0 0 0 2px var(--ui-cor-superficie, #141418)}.ui-target-circle.partial{border:2px solid var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 40%,transparent)}.ui-inline-rename-input{width:100%;height:20px;background:var(--ui-cor-fundo, #0d0d10);color:var(--ui-cor-texto, #e1e1e6);border:1px solid var(--ui-cor-primaria, #00E08A);border-radius:3px;font-size:10.5px;padding:0 4px;outline:none;box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 40%,transparent)}.ui-layer-settings-drawer{background:linear-gradient(180deg,var(--ui-cor-fundo-elevado, #17171e) 0%,var(--ui-cor-superficie, #0f0f13) 100%);padding:10px 14px 12px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent);border-left:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));display:flex;flex-direction:column;gap:10px;box-shadow:inset 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent),0 6px 16px #00000073;animation:drawerSlideDown .18s cubic-bezier(.16,1,.3,1);position:relative;z-index:10}@keyframes drawerSlideDown{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.ui-drawer-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:6px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent)}.ui-drawer-header-left{display:flex;align-items:center;gap:7px;min-width:0}.ui-drawer-icon{color:var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));display:flex;align-items:center;flex-shrink:0}.ui-drawer-title{font-size:10.5px;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);text-transform:uppercase;letter-spacing:.6px;white-space:nowrap}.ui-drawer-layer-chip{font-size:9.5px;font-weight:500;color:var(--ui-cor-texto-secundario, #888899);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent);padding:1px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-drawer-btn-fechar{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:20px;height:20px;padding:0;border-radius:var(--ui-raio-sm, 4px);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-drawer-btn-fechar:hover{color:var(--ui-cor-texto, #e1e1e6);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-body{display:flex;flex-direction:column;gap:10px}.ui-drawer-row{display:flex;flex-direction:column;gap:5px}.ui-drawer-row-label{display:flex;justify-content:space-between;align-items:center;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--ui-cor-texto-secundario, #888899)}.ui-drawer-color-group{display:flex;align-items:center;justify-content:space-between;gap:8px}.ui-drawer-color-pill{position:relative;display:inline-flex;align-items:center;gap:6px;padding:3px 8px 3px 5px;background:var(--ui-cor-fundo, #0b0b0d);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 16%,transparent);border-radius:var(--ui-raio-sm, 4px);cursor:pointer;transition:all var(--camada-transicao);-webkit-user-select:none;user-select:none}.ui-drawer-color-pill:hover{border-color:var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);box-shadow:0 0 10px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-drawer-color-sample{width:14px;height:14px;border-radius:3px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 35%,transparent);box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .5));flex-shrink:0;transition:background-color .1s ease}.ui-drawer-color-hex{font-size:10px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);letter-spacing:.5px}.ui-drawer-color-native{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.ui-drawer-badge{font-size:9.5px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);padding:1px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-slider-container{display:flex;flex-direction:column;gap:4px}.ui-drawer-slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:5px;background:linear-gradient(90deg,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent) 0%,var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A)) 100%);border-radius:3px;outline:none;margin:3px 0;cursor:pointer;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:#fff;border:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));box-shadow:0 0 6px #0009,0 0 10px var(--drawer-cor-camada, rgba(0, 224, 138, .6));cursor:pointer;transition:transform .12s ease}.ui-drawer-slider::-webkit-slider-thumb:hover{transform:scale(1.22)}.ui-drawer-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#fff;border:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));box-shadow:0 0 6px #0009,0 0 10px var(--drawer-cor-camada, rgba(0, 224, 138, .6));cursor:pointer}.ui-drawer-footer{display:flex;align-items:center;justify-content:space-between;padding-top:8px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent)}.ui-drawer-meta-info{font-size:9.5px;color:var(--ui-cor-texto-secundario, #888899);font-style:italic}.ui-drawer-actions{display:flex;align-items:center;gap:6px}.ui-drawer-btn-danger{background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 10%,transparent);border:1px solid color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 35%,transparent);color:var(--ui-cor-texto-erro, #ff5555);border-radius:var(--ui-raio-sm, 4px);height:24px;padding:0 10px;font-size:10px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:5px;transition:all var(--camada-transicao)}.ui-drawer-btn-danger:hover{background:var(--ui-cor-botao-destrutivo-fundo, #d32f2f);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:var(--ui-cor-botao-destrutivo-fundo, #d32f2f);box-shadow:0 0 10px color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 45%,transparent);transform:translateY(-.5px)}.ui-drawer-btn-danger.confirming{background:var(--ui-cor-botao-destrutivo-hover, #b71c1c);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:var(--ui-cor-botao-destrutivo-hover, #b71c1c);animation:pulseDanger 1.2s infinite}@keyframes pulseDanger{0%{transform:scale(1)}50%{transform:scale(1.02)}to{transform:scale(1)}}.ui-previa-dot{width:6px;height:6px;margin-left:4px;border-radius:50%;flex-shrink:0;background:var(--ui-cor-texto-alerta, #ffb86c);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-texto-alerta, #ffb86c) 25%,transparent)}.ui-tree-footer{height:var(--camada-barra-altura);min-height:var(--camada-barra-altura);background:var(--ui-cor-fundo-elevado, #121216);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));display:flex;align-items:center;justify-content:space-between;padding:0 var(--camada-respiro);gap:6px;box-sizing:border-box;overflow:hidden;position:relative;flex-shrink:0;margin:0 calc(-1 * var(--camada-respiro))}.ui-footer-left{display:flex;align-items:center;gap:5px;white-space:nowrap;min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis}.ui-footer-count{font-size:11px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-primaria, #00E08A);flex-shrink:0}.ui-footer-label{display:inline-flex;align-items:center;color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0}.ui-footer-actions-gerais{display:flex;align-items:center;gap:4px;flex-shrink:0}.ui-footer-chip-btn{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:none;color:var(--ui-cor-texto-secundario, #a0a0b0);font-size:10px;font-weight:600;height:22px;padding:0 8px;border-radius:var(--ui-raio-sm, 4px);cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-footer-chip-btn:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #ffffff)}.ui-footer-chip-btn.primario{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 14%,transparent);color:var(--ui-cor-primaria, #00E08A)}.ui-footer-chip-btn.primario:hover{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-footer-right{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0}.ui-footer-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:22px;height:22px;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all var(--camada-transicao);flex-shrink:0}.ui-footer-btn:hover:not(.disabled){color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-footer-btn.disabled{opacity:.25;cursor:not-allowed}.ui-footer-btn.btn-danger-footer:hover:not(.disabled){color:var(--ui-cor-texto-erro, #ff5555);background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 15%,transparent)}.ui-footer-btn.confirming{background:var(--ui-cor-botao-destrutivo-hover, #b71c1c)!important;color:var(--ui-cor-botao-destrutivo-texto, #ffffff)!important}.ui-footer-move-wrapper{position:relative;display:flex;align-items:center;flex:1 1 auto;min-width:0}.ui-footer-select{-moz-appearance:none;appearance:none;-webkit-appearance:none;--_chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888899' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background:var(--_chevron) right 6px center / 10px no-repeat,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:none;color:var(--ui-cor-texto, #e1e1e6);border-radius:var(--ui-raio-sm, 4px);font:inherit;font-size:10px;font-weight:500;height:22px;padding:0 22px 0 8px;cursor:pointer;width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-footer-select:hover:not(:disabled){background:var(--_chevron) right 6px center / 10px no-repeat,var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-footer-select:focus-visible{outline:1px solid var(--ui-cor-primaria, #00E08A)}.ui-drawer-btn-sublayer{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #e1e1e6);font-size:10.5px;font-weight:500;padding:4px 8px;border-radius:4px;cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-drawer-btn-sublayer:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12));color:var(--ui-cor-primaria, #00E08A);border-color:var(--ui-cor-primaria, #00E08A)}.ui-drawer-select-wrapper{display:flex;align-items:center}.ui-drawer-select{background:var(--ui-cor-fundo, #16161c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .15));color:var(--ui-cor-texto, #e1e1e6);border-radius:4px;font-size:10.5px;height:24px;padding:0 6px;cursor:pointer;max-width:140px}.ui-basemap-section{display:flex;flex-direction:column;gap:4px;flex-shrink:0}.ui-basemap-toggle{display:flex;align-items:center;gap:6px;width:100%;padding:2px;background:transparent;border:0;border-radius:var(--ui-raio-sm, 4px);font:inherit;color:inherit;cursor:pointer;text-align:left}.ui-basemap-toggle:hover .ui-basemap-title{color:var(--ui-cor-texto, #e1e1e6)}.ui-basemap-toggle:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:1px}.ui-basemap-atual{flex:1 1 auto;min-width:0;font-size:10px;color:var(--ui-cor-primaria, #00E08A);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}.ui-basemap-title{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:4px}.ui-basemap-section{container-type:inline-size}@container (min-width: 260px){.ui-basemap-grid{grid-template-columns:repeat(3,1fr)}}@container (min-width: 340px){.ui-basemap-grid{grid-template-columns:repeat(4,1fr)}}.ui-basemap-card{display:flex;flex-direction:column;align-items:center;gap:2px;padding:3px;border-radius:var(--ui-raio-borda, 5px);background:var(--ui-cor-fundo, #101014);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));cursor:pointer;transition:all var(--camada-transicao);text-align:center;overflow:hidden}.ui-basemap-card:hover{border-color:var(--ui-cor-primaria, #00E08A);background:var(--ui-cor-fundo-elevado, #17171c)}.ui-basemap-card.active{border-color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 12%,transparent);color:var(--ui-cor-primaria, #00E08A);font-weight:600;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-basemap-preview{width:100%;height:22px;border-radius:3px;object-fit:cover;opacity:.85;transition:opacity var(--camada-transicao)}.ui-basemap-preview-none{width:100%;height:22px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);border-radius:3px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-card:hover .ui-basemap-preview,.ui-basemap-card.active .ui-basemap-preview{opacity:1}.ui-basemap-card span{font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.ui-layer-row.herdado-oculto,.ui-feat-row.herdado-oculto{opacity:.52}.ui-layer-row.herdado-travado .ui-col-lock.ui-lock-open{color:var(--ui-cor-texto-secundario, #888899);opacity:.7}.ui-search-hidden{display:none!important}.ui-empty-row{height:22px;display:flex;align-items:center;padding-left:36px;font-size:10px;color:var(--ui-cor-texto-secundario, #666677);font-style:italic;background:var(--ui-cor-fundo-recuado, rgba(0, 0, 0, .15))}.ui-camadas-resizer-altura{display:none;flex-shrink:0;width:100%;height:9px;background:var(--ui-cor-superficie, #141417);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));cursor:ns-resize;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;touch-action:none;transition:background .15s ease,border-color .15s ease;position:relative;z-index:10}:host([redimensionavel]) .ui-camadas-resizer-altura,:host([redimensionavel-altura]) .ui-camadas-resizer-altura{display:flex}.ui-camadas-resizer-altura:hover,.ui-camadas-resizer-altura.ui-camadas-resizer--ativo{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 9%,transparent);border-top-color:var(--ui-cor-primaria, #00E08A)}.ui-camadas-resizer-grip{width:32px;height:3px;border-radius:2px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 22%,transparent);transition:all .15s ease}.ui-camadas-resizer-altura:hover .ui-camadas-resizer-grip,.ui-camadas-resizer-altura.ui-camadas-resizer--ativo .ui-camadas-resizer-grip{background:var(--ui-cor-primaria, #00E08A);width:46px;box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 45%,transparent)}:host(.ui-camadas--redimensionando){-webkit-user-select:none!important;user-select:none!important;cursor:ns-resize!important}:host(.ui-camadas--redimensionando) *{-webkit-user-select:none!important;user-select:none!important}.ui-col-lock.ui-lock-open{opacity:.28}.ui-col-lock.ui-lock-open:hover,.ui-col-lock.ui-lock-open:focus-visible{opacity:.8}.ui-col-lock[data-locked-by-layer]{cursor:not-allowed}.ui-col[role=button]:focus-visible,.ui-basemap-card:focus-visible,.ui-feat-row:focus-visible,.ui-layer-row:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px}.ui-footer-btn.confirming{color:var(--ui-cor-botao-destrutivo-texto, #ffffff);background:var(--ui-cor-botao-destrutivo-hover, #b71c1c);width:auto;padding:0 6px}.ui-truncate-notice{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 12px;margin:4px 8px 6px;background:color-mix(in srgb,var(--ui-cor-fundo-elevado, #1a1a1e) 70%,transparent);border:1px dashed var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 4px);font-size:10px;color:var(--ui-cor-texto-secundario, #9696a6)}.ui-truncate-notice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-truncate-more-btn{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:var(--ui-cor-superficie, #141417);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .18));border-radius:var(--ui-raio-borda, 4px);color:var(--ui-cor-primaria, #00E08A);font-size:10px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all var(--camada-transicao)}.ui-truncate-more-btn:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));border-color:var(--ui-cor-primaria, #00E08A)}.ui-truncate-more-btn:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:1px}:host(.degrade),:host(.gradiente),:host([data-degrade]:not([data-degrade="false"])),.ui-camadas-container[data-degrade]:not([data-degrade=false]){--ui-camadas-fundo: var(--ui-gradiente-superficie);--ui-camadas-toggle-fundo: var(--ui-gradiente-superficie)}`;
|
|
1524
|
-
function
|
|
1578
|
+
const kt = `:host{display:flex;flex-direction:column;box-sizing:border-box;font-family:inherit;font-size:11px;color:var(--ui-cor-texto, #e1e1e6);-webkit-user-select:none;user-select:none;width:100%;height:var(--ui-camadas-altura, 100%);min-height:var(--ui-camadas-min-altura, 140px);position:relative;--camada-respiro: 8px;--camada-barra-altura: 28px;--camada-linha-altura: 25px;--camada-thumb-tamanho: 20px;--camada-indent-nivel: 16px;--camada-transicao: .16s cubic-bezier(.16, 1, .3, 1)}:host([densidade="compacto"]){--camada-linha-altura: 22px;--camada-thumb-tamanho: 17px;font-size:10px}:host([flutuante]){position:absolute;top:10px;right:10px;bottom:46px;z-index:var(--ui-z-workspace-hud, 500);width:auto;height:var(--ui-camadas-altura, auto)}*,*:before,*:after{box-sizing:border-box}:host(:not([flutuante])) .ui-camadas-container{max-width:100%;min-width:0;border:none;box-shadow:none;border-radius:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=esquerda]{border-left:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=direita]{border-right:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=ambas]{border-left:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent));border-right:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}.ui-camadas-container{display:flex;flex-direction:column;flex:1 1 auto;height:100%;min-height:0;width:100%;max-width:380px;min-width:270px;background:var(--ui-degrade-interno, var(--ui-camadas-fundo, var(--ui-fundo-superficie, var(--ui-cor-superficie, #141417))));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);box-shadow:var(--ui-sombra-lg, 0 10px 30px -4px rgba(0, 0, 0, .5)),0 0 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);overflow:hidden;position:relative;transition:transform .24s cubic-bezier(.16,1,.3,1),opacity .2s ease;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}:host([colapsado]) .ui-camadas-container{transform:translate(calc(100% + 24px));opacity:0;pointer-events:none}.ui-camadas-toggle-flutuante{display:none;position:absolute;top:10px;right:10px;z-index:calc(var(--ui-z-workspace-hud, 500) - 1);background:var(--ui-camadas-toggle-fundo, var(--ui-fundo-superficie, var(--ui-cor-superficie, #141417)));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .18));border-radius:var(--ui-raio-borda, 6px);color:var(--ui-cor-texto, #ffffff);width:34px;height:34px;cursor:pointer;align-items:center;justify-content:center;box-shadow:var(--ui-sombra-md, 0 8px 20px rgba(0, 0, 0, .45));transition:all var(--camada-transicao)}:host([colapsado][flutuante]) .ui-camadas-toggle-flutuante{display:flex}.ui-camadas-toggle-flutuante:hover{border-color:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-primaria, #00E08A);transform:scale(1.08);box-shadow:0 0 14px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-camadas-btn-colapsar{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:22px;height:22px;cursor:pointer;border-radius:var(--ui-raio-sm, 4px);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all var(--camada-transicao)}.ui-camadas-btn-colapsar:hover{color:var(--ui-cor-texto, #ffffff);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .09))}.ui-camadas-corpo{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 var(--camada-respiro) var(--camada-respiro);display:flex;flex-direction:column;gap:6px;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 16%,transparent) transparent}.ui-camadas-corpo::-webkit-scrollbar{width:4px}.ui-camadas-corpo::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent);border-radius:var(--ui-raio-sm, 4px)}.ui-camadas-corpo::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 32%,transparent)}.ui-tree-toolbar{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:var(--camada-barra-altura);min-height:var(--camada-barra-altura);flex-shrink:0;margin:0 calc(-1 * var(--camada-respiro));padding:0 var(--camada-respiro);gap:8px;border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .06))}.ui-tree-title-group{display:flex;align-items:center;gap:5px}.ui-tree-section-title{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-tree-count-badge{font-size:9px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent);color:var(--ui-cor-texto-secundario, #888899);padding:1px 5px;border-radius:8px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent)}.ui-tree-actions{display:flex;align-items:center;gap:3px}.ui-tree-action-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);border-radius:var(--ui-raio-sm, 4px);width:24px;height:24px;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-tree-action-btn:hover{color:var(--ui-cor-texto, #ffffff);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .09))}.ui-tree-btn-new{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 14%,transparent);border:none;color:var(--ui-cor-primaria, #00E08A);border-radius:var(--ui-raio-sm, 4px);height:24px;padding:0 8px;font-size:10px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-tree-btn-new:hover{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-tree-search-wrapper{position:relative;display:flex;align-items:center;margin:1px 0}.ui-tree-search-icon{position:absolute;left:8px;color:var(--ui-cor-texto-secundario, #888899);pointer-events:none;display:flex;align-items:center}.ui-tree-search-input{width:100%;height:25px;background:var(--ui-cor-fundo, #0a0a0c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1));border-radius:var(--ui-raio-borda, 5px);padding:0 24px 0 26px;color:var(--ui-cor-texto, #ffffff);font-size:10.5px;outline:none;transition:border-color var(--camada-transicao),box-shadow var(--camada-transicao)}.ui-tree-search-input:focus{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)}.ui-tree-search-clear{position:absolute;right:5px;background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;width:18px;height:18px;display:flex;align-items:center;justify-content:center;border-radius:3px;transition:all var(--camada-transicao)}.ui-tree-search-clear:hover{color:var(--ui-cor-texto, #ffffff);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent)}.ui-panel-box{background:var(--ui-cor-fundo, #0c0c0f);border:none;border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));border-radius:0;margin:0 calc(-1 * var(--camada-respiro)) calc(-1 * var(--camada-respiro));overflow:hidden;display:flex;flex-direction:column;flex:1 1 0%;min-height:140px}.ui-search-empty{padding:14px 10px;text-align:center;font-size:11px;color:var(--ui-cor-texto-secundario, #888899);overflow-wrap:anywhere}.ui-layer-tree{flex:1 1 0%;min-height:40px;overflow-y:auto;overflow-x:hidden}.ui-layer-group{border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .04));transition:background var(--camada-transicao)}.ui-layer-group.drop-into{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 9%,transparent)!important;outline:1.5px dashed var(--ui-cor-primaria, #00E08A);outline-offset:-1.5px}.ui-layer-row,.ui-feat-row{display:flex;align-items:center;height:var(--camada-linha-altura);min-height:var(--camada-linha-altura);max-height:var(--camada-linha-altura);padding:0 4px;-webkit-user-select:none;user-select:none;cursor:default;transition:background .1s ease;position:relative}.ui-layer-row{background:var(--ui-cor-fundo-elevado, #18181d);font-weight:600;cursor:pointer;border-left:3px solid transparent}.ui-layer-row:hover{background:var(--ui-cor-hover-menu, #22222a)}.ui-layer-row.active-drawing-layer{background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-primaria, #00E08A)) 18%,var(--ui-cor-fundo-elevado, #18181d))!important;border-left:3px solid var(--layer-active-color, var(--ui-cor-primaria, #00E08A))!important;box-shadow:inset 0 0 12px color-mix(in srgb,var(--layer-active-color, var(--ui-cor-primaria, #00E08A)) 10%,transparent)}.ui-layer-row.active-drawing-layer .ui-name-text{color:var(--ui-cor-texto, #e1e1e6);font-weight:700}.ui-feat-row{border-left:3px solid transparent;padding-left:13px;background:var(--ui-cor-fundo, #101014);font-weight:400;cursor:pointer}.ui-feat-row:hover{background:var(--ui-cor-hover-menu, #19191f)}.ui-feat-row.selected-row{background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 20%,var(--ui-cor-fundo, #101014))!important;outline:1px solid color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 55%,transparent)!important;outline-offset:-1px}.ui-layer-row.hidden-layer,.ui-feat-row.hidden-row{opacity:.52}.ui-layer-row.hidden-layer .ui-col-eye,.ui-feat-row.hidden-row .ui-col-eye{color:var(--ui-cor-texto-alerta, #ffb86c);opacity:.95}.ui-layer-row.dragging,.ui-feat-row.dragging{opacity:.35;background:color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 16%,transparent)!important}.ui-layer-row.drop-above:before,.ui-feat-row.drop-above:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:var(--ui-cor-texto-info, #33b5ff);box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 100%,transparent);z-index:20;pointer-events:none}.ui-layer-row.drop-below:after,.ui-feat-row.drop-below:after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--ui-cor-texto-info, #33b5ff);box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 100%,transparent);z-index:20;pointer-events:none}.ui-layer-row.drop-into{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 16%,transparent)!important;outline:1.5px dashed var(--ui-cor-primaria, #00E08A)!important;outline-offset:-2px;border-radius:var(--ui-raio-sm, 4px)}.ui-layer-row.is-sublayer{background:color-mix(in srgb,var(--ui-cor-fundo-elevado, #18181d) 70%,transparent)}.ui-group-folder-icon{display:inline-flex;align-items:center;justify-content:center;color:var(--ui-cor-texto-alerta, #ffb86c);margin-right:4px;flex-shrink:0}.ui-col{display:flex;align-items:center;justify-content:center;flex-shrink:0;height:var(--camada-linha-altura)}.ui-col-drag{width:8px;margin-right:1px;cursor:grab;color:var(--ui-cor-texto-secundario, #888899);opacity:.35;touch-action:none;transition:opacity var(--camada-transicao),color var(--camada-transicao)}.ui-layer-row:hover .ui-col-drag,.ui-feat-row:hover .ui-col-drag{opacity:.9;color:var(--ui-cor-primaria, #00E08A)}.ui-col-drag:active{cursor:grabbing}.ui-col-eye{width:20px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);transition:color var(--camada-transicao)}.ui-col-eye:hover{color:var(--ui-cor-primaria, #00E08A)}.ui-col-lock{width:18px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);transition:color var(--camada-transicao)}.ui-col-lock:hover{color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-col-colorbar{width:5px;height:16px;margin:0 3px 0 2px;border-radius:1.5px;flex-shrink:0}.ui-col-colorbar-editavel{position:relative;width:5px;height:18px;cursor:pointer}.ui-col-colorbar-editavel:before{content:"";position:absolute;top:-3px;right:-4px;bottom:-3px;left:-4px}.ui-col-colorbar-editavel:hover,.ui-col-colorbar-editavel:focus-visible{filter:brightness(1.3);outline:none}.ui-col-chevron,.ui-feat-row .ui-col-thumb{margin-left:calc(var(--layer-depth, 0) * var(--camada-indent-nivel, 16px))}.ui-col-chevron{width:14px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);display:flex;align-items:center;justify-content:center}.ui-chevron-icon{display:inline-flex;align-items:center;justify-content:center;transition:transform var(--camada-transicao)}.ui-chevron-icon.open{transform:rotate(90deg)}.ui-col-thumb{width:calc(var(--camada-thumb-tamanho) + 3px);margin-right:4px;display:flex;align-items:center;justify-content:center}.ui-thumb-box{width:var(--camada-thumb-tamanho);height:var(--camada-thumb-tamanho);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-radius:3px;background:var(--ui-cor-fundo, #0d0d10);box-sizing:border-box;overflow:hidden;display:flex;align-items:center;justify-content:center}.ui-col-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;color:var(--ui-cor-texto, #e1e1e6);padding-left:2px;padding-right:4px;cursor:pointer;display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:4px}.ui-name-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-count-chip{font-size:9px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;color:var(--ui-cor-texto-secundario, #888899);font-weight:400;padding:0 2px;flex-shrink:0}.ui-col-actions{display:flex;align-items:center;gap:2px;opacity:0;transition:opacity var(--camada-transicao)}.ui-layer-row:hover .ui-col-actions,.ui-feat-row:hover .ui-col-actions,.ui-layer-row:focus-within .ui-col-actions,.ui-feat-row:focus-within .ui-col-actions,.ui-col-actions:has(.ui-micro-btn.active){opacity:1}.ui-micro-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:18px;height:18px;padding:0;border-radius:3px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-micro-btn:hover{color:var(--ui-cor-primaria, #00E08A);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-micro-btn.active{color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)}.ui-col-target{width:22px;cursor:pointer}.ui-target-circle{width:11px;height:11px;border-radius:50%;border:1.5px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 32%,transparent);background:transparent;transition:all .12s ease}.ui-col-target:hover .ui-target-circle{border-color:var(--ui-cor-texto-info, #33b5ff);transform:scale(1.18)}.ui-target-circle.selected{border:2px solid var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));background:var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));box-shadow:inset 0 0 0 2px var(--ui-cor-superficie, #141418)}.ui-target-circle.partial{border:2px solid var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 40%,transparent)}.ui-inline-rename-input{width:100%;height:20px;background:var(--ui-cor-fundo, #0d0d10);color:var(--ui-cor-texto, #e1e1e6);border:1px solid var(--ui-cor-primaria, #00E08A);border-radius:3px;font-size:10.5px;padding:0 4px;outline:none;box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 40%,transparent)}.ui-layer-settings-drawer{background:linear-gradient(180deg,var(--ui-cor-fundo-elevado, #17171e) 0%,var(--ui-cor-superficie, #0f0f13) 100%);padding:10px 14px 12px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent);border-left:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));display:flex;flex-direction:column;gap:10px;box-shadow:inset 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent),0 6px 16px #00000073;animation:drawerSlideDown .18s cubic-bezier(.16,1,.3,1);position:relative;z-index:10}@keyframes drawerSlideDown{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.ui-drawer-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:6px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent)}.ui-drawer-header-left{display:flex;align-items:center;gap:7px;min-width:0}.ui-drawer-icon{color:var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));display:flex;align-items:center;flex-shrink:0}.ui-drawer-title{font-size:10.5px;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);text-transform:uppercase;letter-spacing:.6px;white-space:nowrap}.ui-drawer-layer-chip{font-size:9.5px;font-weight:500;color:var(--ui-cor-texto-secundario, #888899);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent);padding:1px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-drawer-btn-fechar{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:20px;height:20px;padding:0;border-radius:var(--ui-raio-sm, 4px);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-drawer-btn-fechar:hover{color:var(--ui-cor-texto, #e1e1e6);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-body{display:flex;flex-direction:column;gap:10px}.ui-drawer-row{display:flex;flex-direction:column;gap:5px}.ui-drawer-row-label{display:flex;justify-content:space-between;align-items:center;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--ui-cor-texto-secundario, #888899)}.ui-drawer-color-group{display:flex;align-items:center;justify-content:space-between;gap:8px}.ui-drawer-color-pill{position:relative;display:inline-flex;align-items:center;gap:6px;padding:3px 8px 3px 5px;background:var(--ui-cor-fundo, #0b0b0d);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 16%,transparent);border-radius:var(--ui-raio-sm, 4px);cursor:pointer;transition:all var(--camada-transicao);-webkit-user-select:none;user-select:none}.ui-drawer-color-pill:hover{border-color:var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);box-shadow:0 0 10px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-drawer-color-sample{width:14px;height:14px;border-radius:3px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 35%,transparent);box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .5));flex-shrink:0;transition:background-color .1s ease}.ui-drawer-color-hex{font-size:10px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);letter-spacing:.5px}.ui-drawer-color-native{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.ui-drawer-badge{font-size:9.5px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);padding:1px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-slider-container{display:flex;flex-direction:column;gap:4px}.ui-drawer-slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:5px;background:linear-gradient(90deg,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent) 0%,var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A)) 100%);border-radius:3px;outline:none;margin:3px 0;cursor:pointer;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--ui-camadas-slider-thumb, #ffffff);border:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));box-shadow:0 0 6px #0009,0 0 10px var(--drawer-cor-camada, rgba(0, 224, 138, .6));cursor:pointer;transition:transform .12s ease}.ui-drawer-slider::-webkit-slider-thumb:hover{transform:scale(1.22)}.ui-drawer-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--ui-camadas-slider-thumb, #ffffff);border:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));box-shadow:0 0 6px #0009,0 0 10px var(--drawer-cor-camada, rgba(0, 224, 138, .6));cursor:pointer}.ui-drawer-footer{display:flex;align-items:center;justify-content:space-between;padding-top:8px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent)}.ui-drawer-meta-info{font-size:9.5px;color:var(--ui-cor-texto-secundario, #888899);font-style:italic}.ui-drawer-actions{display:flex;align-items:center;gap:6px}.ui-drawer-btn-danger{background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 10%,transparent);border:1px solid color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 35%,transparent);color:var(--ui-cor-texto-erro, #ff5555);border-radius:var(--ui-raio-sm, 4px);height:24px;padding:0 10px;font-size:10px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:5px;transition:all var(--camada-transicao)}.ui-drawer-btn-danger:hover{background:var(--ui-cor-botao-destrutivo-fundo, #d32f2f);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:var(--ui-cor-botao-destrutivo-fundo, #d32f2f);box-shadow:0 0 10px color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 45%,transparent);transform:translateY(-.5px)}.ui-drawer-btn-danger.confirming{background:var(--ui-cor-botao-destrutivo-hover, #b71c1c);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:var(--ui-cor-botao-destrutivo-hover, #b71c1c);animation:pulseDanger 1.2s infinite}@keyframes pulseDanger{0%{transform:scale(1)}50%{transform:scale(1.02)}to{transform:scale(1)}}.ui-previa-dot{width:6px;height:6px;margin-left:4px;border-radius:50%;flex-shrink:0;background:var(--ui-cor-texto-alerta, #ffb86c);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-texto-alerta, #ffb86c) 25%,transparent)}.ui-tree-footer{height:var(--camada-barra-altura);min-height:var(--camada-barra-altura);background:var(--ui-cor-fundo-elevado, #121216);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));display:flex;align-items:center;justify-content:space-between;padding:0 var(--camada-respiro);gap:6px;box-sizing:border-box;overflow:hidden;position:relative;flex-shrink:0;margin:0 calc(-1 * var(--camada-respiro))}.ui-footer-left{display:flex;align-items:center;gap:5px;white-space:nowrap;min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis}.ui-footer-count{font-size:11px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-primaria, #00E08A);flex-shrink:0}.ui-footer-label{display:inline-flex;align-items:center;color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0}.ui-footer-actions-gerais{display:flex;align-items:center;gap:4px;flex-shrink:0}.ui-footer-chip-btn{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:none;color:var(--ui-cor-texto-secundario, #a0a0b0);font-size:10px;font-weight:600;height:22px;padding:0 8px;border-radius:var(--ui-raio-sm, 4px);cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-footer-chip-btn:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #ffffff)}.ui-footer-chip-btn.primario{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 14%,transparent);color:var(--ui-cor-primaria, #00E08A)}.ui-footer-chip-btn.primario:hover{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-footer-right{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0}.ui-footer-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:22px;height:22px;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all var(--camada-transicao);flex-shrink:0}.ui-footer-btn:hover:not(.disabled){color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-footer-btn.disabled{opacity:.25;cursor:not-allowed}.ui-footer-btn.btn-danger-footer:hover:not(.disabled){color:var(--ui-cor-texto-erro, #ff5555);background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 15%,transparent)}.ui-footer-btn.confirming{background:var(--ui-cor-botao-destrutivo-hover, #b71c1c)!important;color:var(--ui-cor-botao-destrutivo-texto, #ffffff)!important}.ui-footer-move-wrapper{position:relative;display:flex;align-items:center;flex:1 1 auto;min-width:0}.ui-footer-select{-moz-appearance:none;appearance:none;-webkit-appearance:none;--_chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888899' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background:var(--_chevron) right 6px center / 10px no-repeat,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:none;color:var(--ui-cor-texto, #e1e1e6);border-radius:var(--ui-raio-sm, 4px);font:inherit;font-size:10px;font-weight:500;height:22px;padding:0 22px 0 8px;cursor:pointer;width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-footer-select:hover:not(:disabled){background:var(--_chevron) right 6px center / 10px no-repeat,var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-footer-select:focus-visible{outline:1px solid var(--ui-cor-primaria, #00E08A)}.ui-drawer-btn-sublayer{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #e1e1e6);font-size:10.5px;font-weight:500;padding:4px 8px;border-radius:4px;cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-drawer-btn-sublayer:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12));color:var(--ui-cor-primaria, #00E08A);border-color:var(--ui-cor-primaria, #00E08A)}.ui-drawer-select-wrapper{display:flex;align-items:center}.ui-drawer-select{background:var(--ui-cor-fundo, #16161c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .15));color:var(--ui-cor-texto, #e1e1e6);border-radius:4px;font-size:10.5px;height:24px;padding:0 6px;cursor:pointer;max-width:140px}.ui-basemap-section{display:flex;flex-direction:column;gap:4px;flex-shrink:0}.ui-basemap-toggle{display:flex;align-items:center;gap:6px;width:100%;padding:2px;background:transparent;border:0;border-radius:var(--ui-raio-sm, 4px);font:inherit;color:inherit;cursor:pointer;text-align:left}.ui-basemap-toggle:hover .ui-basemap-title{color:var(--ui-cor-texto, #e1e1e6)}.ui-basemap-toggle:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:1px}.ui-basemap-atual{flex:1 1 auto;min-width:0;font-size:10px;color:var(--ui-cor-primaria, #00E08A);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}.ui-basemap-title{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:4px}.ui-basemap-section{container-type:inline-size}@container (min-width: 260px){.ui-basemap-grid{grid-template-columns:repeat(3,1fr)}}@container (min-width: 340px){.ui-basemap-grid{grid-template-columns:repeat(4,1fr)}}.ui-basemap-card{display:flex;flex-direction:column;align-items:center;gap:2px;padding:3px;border-radius:var(--ui-raio-borda, 5px);background:var(--ui-cor-fundo, #101014);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));cursor:pointer;transition:all var(--camada-transicao);text-align:center;overflow:hidden}.ui-basemap-card:hover{border-color:var(--ui-cor-primaria, #00E08A);background:var(--ui-cor-fundo-elevado, #17171c)}.ui-basemap-card.active{border-color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 12%,transparent);color:var(--ui-cor-primaria, #00E08A);font-weight:600;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-basemap-preview{width:100%;height:22px;border-radius:3px;object-fit:cover;opacity:.85;transition:opacity var(--camada-transicao)}.ui-basemap-preview-none{width:100%;height:22px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);border-radius:3px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-card:hover .ui-basemap-preview,.ui-basemap-card.active .ui-basemap-preview{opacity:1}.ui-basemap-card span{font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.ui-layer-row.herdado-oculto,.ui-feat-row.herdado-oculto{opacity:.52}.ui-layer-row.herdado-travado .ui-col-lock.ui-lock-open{color:var(--ui-cor-texto-secundario, #888899);opacity:.7}.ui-search-hidden{display:none!important}.ui-empty-row{height:22px;display:flex;align-items:center;padding-left:36px;font-size:10px;color:var(--ui-cor-texto-secundario, #666677);font-style:italic;background:var(--ui-cor-fundo-recuado, rgba(0, 0, 0, .15))}.ui-camadas-resizer-altura{display:none;flex-shrink:0;width:100%;height:9px;background:var(--ui-cor-superficie, #141417);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));cursor:ns-resize;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;touch-action:none;transition:background .15s ease,border-color .15s ease;position:relative;z-index:10}:host([redimensionavel]) .ui-camadas-resizer-altura,:host([redimensionavel-altura]) .ui-camadas-resizer-altura{display:flex}.ui-camadas-resizer-altura:hover,.ui-camadas-resizer-altura.ui-camadas-resizer--ativo{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 9%,transparent);border-top-color:var(--ui-cor-primaria, #00E08A)}.ui-camadas-resizer-grip{width:32px;height:3px;border-radius:2px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 22%,transparent);transition:all .15s ease}.ui-camadas-resizer-altura:hover .ui-camadas-resizer-grip,.ui-camadas-resizer-altura.ui-camadas-resizer--ativo .ui-camadas-resizer-grip{background:var(--ui-cor-primaria, #00E08A);width:46px;box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 45%,transparent)}:host(.ui-camadas--redimensionando){-webkit-user-select:none!important;user-select:none!important;cursor:ns-resize!important}:host(.ui-camadas--redimensionando) *{-webkit-user-select:none!important;user-select:none!important}.ui-col-lock.ui-lock-open{opacity:.28}.ui-col-lock.ui-lock-open:hover,.ui-col-lock.ui-lock-open:focus-visible{opacity:.8}.ui-col-lock[data-locked-by-layer]{cursor:not-allowed}.ui-col[role=button]:focus-visible,.ui-basemap-card:focus-visible,.ui-feat-row:focus-visible,.ui-layer-row:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px}.ui-footer-btn.confirming{color:var(--ui-cor-botao-destrutivo-texto, #ffffff);background:var(--ui-cor-botao-destrutivo-hover, #b71c1c);width:auto;padding:0 6px}.ui-truncate-notice{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 12px;margin:4px 8px 6px;background:color-mix(in srgb,var(--ui-cor-fundo-elevado, #1a1a1e) 70%,transparent);border:1px dashed var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 4px);font-size:10px;color:var(--ui-cor-texto-secundario, #9696a6)}.ui-truncate-notice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-truncate-more-btn{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:var(--ui-cor-superficie, #141417);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .18));border-radius:var(--ui-raio-borda, 4px);color:var(--ui-cor-primaria, #00E08A);font-size:10px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all var(--camada-transicao)}.ui-truncate-more-btn:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));border-color:var(--ui-cor-primaria, #00E08A)}.ui-truncate-more-btn:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:1px}:host(.degrade),:host(.gradiente),:host([data-degrade]:not([data-degrade="false"])),.ui-camadas-container[data-degrade]:not([data-degrade=false]){--ui-camadas-fundo: var(--ui-gradiente-superficie);--ui-camadas-toggle-fundo: var(--ui-gradiente-superficie)}`;
|
|
1579
|
+
function Ct(e, t) {
|
|
1525
1580
|
t.querySelectorAll("[data-layer-row]").forEach((r) => {
|
|
1526
1581
|
const o = r.getAttribute("data-layer-row") === e.camadaAtivaId;
|
|
1527
|
-
r.classList.toggle("active-drawing-layer", o),
|
|
1582
|
+
r.classList.toggle("active-drawing-layer", o), Ze(r, "camada-ativa", o), o ? r.setAttribute("aria-current", "true") : r.removeAttribute("aria-current");
|
|
1528
1583
|
});
|
|
1529
1584
|
}
|
|
1530
|
-
function
|
|
1531
|
-
t.querySelectorAll(".ui-feat-row").forEach((
|
|
1532
|
-
const
|
|
1533
|
-
|
|
1534
|
-
const
|
|
1535
|
-
|
|
1536
|
-
})
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1585
|
+
function Lt(e, t) {
|
|
1586
|
+
t.querySelectorAll(".ui-feat-row").forEach((o) => {
|
|
1587
|
+
const n = o.getAttribute("data-feat-row"), s = n ? e.selectedFeatureIds.has(n) : !1;
|
|
1588
|
+
o.classList.toggle("selected-row", s), Ze(o, "feicao-selecionada", s), o.setAttribute("aria-selected", String(s));
|
|
1589
|
+
const c = o.querySelector(".ui-target-circle");
|
|
1590
|
+
c && c.classList.toggle("selected", s);
|
|
1591
|
+
});
|
|
1592
|
+
const a = ye(e.camadas, e.feicoes, e.searchQuery);
|
|
1593
|
+
let r;
|
|
1594
|
+
if (a)
|
|
1595
|
+
r = a.feicoesPorCamada;
|
|
1596
|
+
else {
|
|
1597
|
+
const o = /* @__PURE__ */ new Map();
|
|
1598
|
+
for (let n = 0; n < e.feicoes.length; n++) {
|
|
1599
|
+
const s = e.feicoes[n];
|
|
1600
|
+
if (!s || !s.id) continue;
|
|
1601
|
+
const c = s.layerId || "", l = o.get(c);
|
|
1602
|
+
l ? l.push(s) : o.set(c, [s]);
|
|
1603
|
+
}
|
|
1604
|
+
r = o;
|
|
1605
|
+
}
|
|
1606
|
+
const i = ha(
|
|
1607
|
+
oe(e.camadas),
|
|
1608
|
+
r,
|
|
1609
|
+
e.selectedFeatureIds,
|
|
1610
|
+
a == null ? void 0 : a.camadasVisiveis
|
|
1611
|
+
);
|
|
1612
|
+
t.querySelectorAll(".ui-layer-group").forEach((o) => {
|
|
1613
|
+
const n = o.getAttribute("data-layer-id") ?? "", s = i.get(n);
|
|
1614
|
+
ya(o.querySelector(".ui-layer-row .ui-target-circle"), (s == null ? void 0 : s.total) ?? 0, (s == null ? void 0 : s.selecionadas) ?? 0);
|
|
1615
|
+
}), xa(e, t);
|
|
1540
1616
|
}
|
|
1541
|
-
function
|
|
1617
|
+
function ya(e, t, a) {
|
|
1542
1618
|
if (!e) return;
|
|
1543
|
-
if (t
|
|
1619
|
+
if (t === 0) {
|
|
1544
1620
|
e.classList.remove("selected", "partial");
|
|
1545
1621
|
return;
|
|
1546
1622
|
}
|
|
1547
|
-
const r =
|
|
1623
|
+
const r = a === t, i = a > 0 && !r;
|
|
1548
1624
|
e.classList.toggle("selected", r), e.classList.toggle("partial", i);
|
|
1549
1625
|
}
|
|
1550
|
-
function
|
|
1626
|
+
function xa(e, t) {
|
|
1551
1627
|
const a = e.feicoes.filter((p) => e.selectedFeatureIds.has(p.id)), r = a.length > 0, i = t.getElementById("footer-count"), o = t.getElementById("footer-label");
|
|
1552
1628
|
if (i && (i.textContent = String(r ? a.length : e.camadas.length)), o) {
|
|
1553
|
-
const p =
|
|
1629
|
+
const p = na(e.camadas.length, a.length);
|
|
1554
1630
|
o.innerHTML = p.icone, o.title = p.texto, o.setAttribute("aria-label", p.texto);
|
|
1555
1631
|
}
|
|
1556
1632
|
const n = t.querySelector(".ui-tree-footer");
|
|
1557
1633
|
n && (n.classList.toggle("tem-selecao", r), n.classList.toggle("sem-selecao", !r));
|
|
1558
1634
|
const s = t.querySelector(".ui-footer-actions-gerais");
|
|
1559
1635
|
s && (s.style.display = r ? "none" : "flex");
|
|
1560
|
-
const
|
|
1561
|
-
|
|
1562
|
-
const
|
|
1563
|
-
|
|
1636
|
+
const c = t.querySelector(".ui-footer-bulk-actions");
|
|
1637
|
+
c && (c.style.display = r ? "flex" : "none"), ["btn-footer-del"].forEach((p) => {
|
|
1638
|
+
const u = t.getElementById(p);
|
|
1639
|
+
u && (u.disabled = !r, u.classList.toggle("disabled", !r));
|
|
1564
1640
|
});
|
|
1565
1641
|
const l = t.querySelector(".ui-footer-move-wrapper");
|
|
1566
1642
|
l && l.classList.toggle("disabled", !r);
|
|
1567
|
-
const
|
|
1568
|
-
|
|
1643
|
+
const d = t.getElementById("select-footer-move");
|
|
1644
|
+
d && (d.disabled = !r);
|
|
1569
1645
|
}
|
|
1570
|
-
function
|
|
1646
|
+
function We(e, t) {
|
|
1571
1647
|
const a = he(e.camadas), r = new Map(e.camadas.map((n) => [n.id, n]));
|
|
1572
1648
|
t.querySelectorAll(".ui-layer-row").forEach((n) => {
|
|
1573
1649
|
const s = a.get(n.getAttribute("data-layer-row") || "");
|
|
@@ -1575,20 +1651,20 @@ function Ke(e, t) {
|
|
|
1575
1651
|
});
|
|
1576
1652
|
const i = new Map(e.feicoes.map((n) => [n.id, n]));
|
|
1577
1653
|
t.querySelectorAll(".ui-feat-row").forEach((n) => {
|
|
1578
|
-
const s = n.getAttribute("data-feat-layer") || "",
|
|
1579
|
-
n.classList.toggle("herdado-oculto", (
|
|
1580
|
-
const
|
|
1581
|
-
if (!
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1654
|
+
const s = n.getAttribute("data-feat-layer") || "", c = r.get(s), l = a.get(s);
|
|
1655
|
+
n.classList.toggle("herdado-oculto", (c == null ? void 0 : c.visible) === !1 || (l == null ? void 0 : l.ocultaPorAncestral) === !0);
|
|
1656
|
+
const d = n.querySelector("[data-feat-lock]"), p = i.get(n.getAttribute("data-feat-row") || "");
|
|
1657
|
+
if (!d || !p) return;
|
|
1658
|
+
const u = (c == null ? void 0 : c.locked) === !0 || (l == null ? void 0 : l.travadaPorAncestral) === !0, f = p.locked === !0 || u;
|
|
1659
|
+
d.innerHTML = f ? y.cadeadoTrancado : y.cadeadoAberto, d.classList.toggle("ui-lock-open", !f), u ? d.setAttribute("data-locked-by-layer", "true") : d.removeAttribute("data-locked-by-layer"), j(
|
|
1660
|
+
d,
|
|
1661
|
+
u ? "Bloqueada pela camada" : f ? "Desbloquear Feição" : "Bloquear Feição"
|
|
1586
1662
|
);
|
|
1587
1663
|
});
|
|
1588
1664
|
const o = t.getElementById("select-footer-move");
|
|
1589
|
-
o && (o.innerHTML = `<option value="" disabled selected>Mover para...</option>${
|
|
1665
|
+
o && (o.innerHTML = `<option value="" disabled selected>Mover para...</option>${oa(e.camadas)}`);
|
|
1590
1666
|
}
|
|
1591
|
-
function
|
|
1667
|
+
function St(e, t) {
|
|
1592
1668
|
t.querySelectorAll("[data-layer-row]").forEach((i) => {
|
|
1593
1669
|
i.addEventListener("click", (o) => {
|
|
1594
1670
|
if (o.target.closest(
|
|
@@ -1604,34 +1680,34 @@ function At(e, t) {
|
|
|
1604
1680
|
const n = i.getAttribute("data-layer-expand");
|
|
1605
1681
|
if (!n) return;
|
|
1606
1682
|
e.expandedLayers.has(n) ? e.expandedLayers.delete(n) : e.expandedLayers.add(n);
|
|
1607
|
-
const s = i.closest(".ui-layer-group"),
|
|
1608
|
-
if (
|
|
1683
|
+
const s = i.closest(".ui-layer-group"), c = i.querySelector(".ui-chevron-icon"), l = e.expandedLayers.has(n);
|
|
1684
|
+
if (c && c.classList.toggle("open", l), s) {
|
|
1609
1685
|
s.setAttribute("aria-expanded", String(l));
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1686
|
+
const d = s.querySelector(".ui-children-container");
|
|
1687
|
+
d && (d.style.display = l ? "block" : "none");
|
|
1612
1688
|
}
|
|
1613
|
-
|
|
1689
|
+
j(i, l ? "Recolher grupo" : "Expandir grupo"), Ft(e, t), e.salvarLembrancaEstado();
|
|
1614
1690
|
});
|
|
1615
1691
|
}), t.querySelectorAll("[data-layer-eye]").forEach((i) => {
|
|
1616
1692
|
i.addEventListener("click", (o) => {
|
|
1617
1693
|
o.stopPropagation();
|
|
1618
|
-
const n = i.getAttribute("data-layer-eye"), s = e.camadas.find((
|
|
1694
|
+
const n = i.getAttribute("data-layer-eye"), s = e.camadas.find((c) => c.id === n);
|
|
1619
1695
|
if (s) {
|
|
1620
1696
|
s.visible = s.visible === !1;
|
|
1621
|
-
const
|
|
1622
|
-
i.innerHTML =
|
|
1697
|
+
const c = s.visible !== !1;
|
|
1698
|
+
i.innerHTML = c ? y.olhoAberto : y.olhoFechado, j(i, c ? "Ocultar Camada" : "Exibir Camada");
|
|
1623
1699
|
const l = i.closest(".ui-layer-row");
|
|
1624
|
-
l && l.classList.toggle("hidden-layer", !
|
|
1700
|
+
l && l.classList.toggle("hidden-layer", !c), $t(e, t), We(e, t), e.salvarLembrancaEstado(), e.dispararEvento("ui-camada-visibilidade", {
|
|
1625
1701
|
camadaId: s.id,
|
|
1626
|
-
visivel:
|
|
1702
|
+
visivel: c
|
|
1627
1703
|
});
|
|
1628
1704
|
}
|
|
1629
1705
|
});
|
|
1630
1706
|
}), t.querySelectorAll("[data-layer-lock]").forEach((i) => {
|
|
1631
1707
|
i.addEventListener("click", (o) => {
|
|
1632
1708
|
o.stopPropagation();
|
|
1633
|
-
const n = i.getAttribute("data-layer-lock"), s = e.camadas.find((
|
|
1634
|
-
s && (s.locked = !s.locked, i.innerHTML = s.locked ?
|
|
1709
|
+
const n = i.getAttribute("data-layer-lock"), s = e.camadas.find((c) => c.id === n);
|
|
1710
|
+
s && (s.locked = !s.locked, i.innerHTML = s.locked ? y.cadeadoTrancado : y.cadeadoAberto, i.classList.toggle("ui-lock-open", !s.locked), j(i, s.locked ? "Desbloquear Camada" : "Bloquear Camada"), We(e, t), e.salvarLembrancaEstado(), e.dispararEvento("ui-camada-bloqueio", {
|
|
1635
1711
|
camadaId: s.id,
|
|
1636
1712
|
bloqueado: s.locked
|
|
1637
1713
|
}));
|
|
@@ -1656,52 +1732,59 @@ function At(e, t) {
|
|
|
1656
1732
|
const a = (i, o, n) => {
|
|
1657
1733
|
const s = e.camadas.find((f) => f.id === i);
|
|
1658
1734
|
if (!s) return;
|
|
1659
|
-
const
|
|
1660
|
-
s.color =
|
|
1735
|
+
const c = J(o, s.color || "#00E08A");
|
|
1736
|
+
s.color = c;
|
|
1661
1737
|
const l = t.getElementById(`sample-color-${i}`);
|
|
1662
|
-
l && (l.style.backgroundColor =
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1738
|
+
l && (l.style.backgroundColor = c);
|
|
1739
|
+
const d = t.getElementById(`hex-color-${i}`);
|
|
1740
|
+
d && (d.textContent = c.toUpperCase());
|
|
1665
1741
|
const p = t.getElementById(`settings-drawer-${i}`);
|
|
1666
|
-
p && p.style.setProperty("--drawer-cor-camada",
|
|
1667
|
-
const
|
|
1668
|
-
if (
|
|
1669
|
-
const f =
|
|
1670
|
-
f == null || f.style.setProperty("--layer-active-color",
|
|
1742
|
+
p && p.style.setProperty("--drawer-cor-camada", c);
|
|
1743
|
+
const u = D(t, "data-layer-row", i);
|
|
1744
|
+
if (u) {
|
|
1745
|
+
const f = u.closest(".ui-layer-group");
|
|
1746
|
+
f == null || f.style.setProperty("--layer-active-color", c);
|
|
1671
1747
|
const m = f == null ? void 0 : f.querySelector(":scope > .ui-children-container");
|
|
1672
|
-
m == null || m.style.setProperty("--parent-layer-color",
|
|
1673
|
-
const
|
|
1674
|
-
|
|
1675
|
-
const
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1748
|
+
m == null || m.style.setProperty("--parent-layer-color", c);
|
|
1749
|
+
const g = u.querySelector(".ui-col-colorbar");
|
|
1750
|
+
g && (g.style.backgroundColor = c);
|
|
1751
|
+
const b = f == null ? void 0 : f.querySelectorAll(".ui-feat-row");
|
|
1752
|
+
if (b && b.length > 0) {
|
|
1753
|
+
const h = /* @__PURE__ */ new Map();
|
|
1754
|
+
for (let v = 0; v < e.feicoes.length; v++) {
|
|
1755
|
+
const A = e.feicoes[v];
|
|
1756
|
+
A && A.layerId === i && h.set(A.id, A);
|
|
1757
|
+
}
|
|
1758
|
+
b.forEach((v) => {
|
|
1759
|
+
if (v.getAttribute("data-feat-layer") !== i) return;
|
|
1760
|
+
const A = v.querySelector(".ui-col-colorbar");
|
|
1761
|
+
A && (A.style.backgroundColor = c);
|
|
1762
|
+
const I = h.get(v.getAttribute("data-feat-row") || "");
|
|
1763
|
+
if (!I || I.color) return;
|
|
1764
|
+
const w = v.querySelector(".ui-thumb-box");
|
|
1765
|
+
w && (w.innerHTML = la(I.type || I.geometryType, c, I.coordinates));
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1685
1768
|
}
|
|
1686
|
-
n ? e.salvarLembrancaEstado() : e.agendarSalvarLembranca(), e.dispararEvento("ui-camada-cor", { camadaId: s.id, cor:
|
|
1769
|
+
n ? e.salvarLembrancaEstado() : e.agendarSalvarLembranca(), e.dispararEvento("ui-camada-cor", { camadaId: s.id, cor: c });
|
|
1687
1770
|
};
|
|
1688
1771
|
t.querySelectorAll("[data-layer-color-picker]").forEach((i) => {
|
|
1689
|
-
const o = i, n = (s) => (
|
|
1772
|
+
const o = i, n = (s) => (c) => {
|
|
1690
1773
|
const l = o.getAttribute("data-layer-color-picker");
|
|
1691
1774
|
if (!l) return;
|
|
1692
|
-
const
|
|
1693
|
-
a(l,
|
|
1775
|
+
const d = c.target.value;
|
|
1776
|
+
a(l, d, s);
|
|
1694
1777
|
};
|
|
1695
1778
|
o.addEventListener("input", n(!1)), o.addEventListener("change", n(!0));
|
|
1696
1779
|
}), t.querySelectorAll("[data-layer-color]").forEach((i) => {
|
|
1697
1780
|
const o = (n) => {
|
|
1698
1781
|
n.stopPropagation();
|
|
1699
|
-
const s = i.getAttribute("data-layer-color"),
|
|
1700
|
-
!s || !
|
|
1782
|
+
const s = i.getAttribute("data-layer-color"), c = e.camadas.find((l) => l.id === s);
|
|
1783
|
+
!s || !c || Qa({
|
|
1701
1784
|
ancora: i,
|
|
1702
|
-
titulo: `Cor · ${
|
|
1785
|
+
titulo: `Cor · ${c.name || "Camada"}`,
|
|
1703
1786
|
modo: "simples",
|
|
1704
|
-
cor:
|
|
1787
|
+
cor: J(c.color, "#00E08A"),
|
|
1705
1788
|
mostrarOpacidade: !1,
|
|
1706
1789
|
aoAlterar: (l) => a(s, l.cor, !1),
|
|
1707
1790
|
aoConfirmar: (l) => a(s, l.cor, !0),
|
|
@@ -1719,8 +1802,8 @@ function At(e, t) {
|
|
|
1719
1802
|
n.opacity = o;
|
|
1720
1803
|
const s = t.getElementById(`badge-op-${i}`);
|
|
1721
1804
|
s && (s.textContent = `${Math.round(o * 100)}%`);
|
|
1722
|
-
const
|
|
1723
|
-
|
|
1805
|
+
const c = D(t, "data-layer-opacity-slider", i);
|
|
1806
|
+
c && parseFloat(c.value) !== o && (c.value = String(o)), e.agendarSalvarLembranca(), e.dispararEvento("ui-camada-opacidade", { camadaId: n.id, opacidade: o });
|
|
1724
1807
|
};
|
|
1725
1808
|
t.querySelectorAll("[data-layer-opacity-slider]").forEach((i) => {
|
|
1726
1809
|
i.addEventListener("input", (o) => {
|
|
@@ -1738,33 +1821,35 @@ function At(e, t) {
|
|
|
1738
1821
|
};
|
|
1739
1822
|
i.addEventListener("ui-cancelar-confirmacao", n), i.addEventListener("click", (s) => {
|
|
1740
1823
|
s.stopPropagation();
|
|
1741
|
-
const
|
|
1742
|
-
if (!
|
|
1824
|
+
const c = i.getAttribute("data-delete-layer");
|
|
1825
|
+
if (!c) return;
|
|
1743
1826
|
if (i.classList.contains("confirming")) {
|
|
1744
|
-
n(), e.dispararEvento("ui-camada-excluida", { camadaId:
|
|
1745
|
-
const
|
|
1827
|
+
n(), e.dispararEvento("ui-camada-excluida", { camadaId: c });
|
|
1828
|
+
const d = e.selectedFeatureIds.size;
|
|
1746
1829
|
e.camadas.forEach((p) => {
|
|
1747
|
-
p.parentId ===
|
|
1748
|
-
}), e.removerCamada(
|
|
1830
|
+
p.parentId === c && (p.parentId = null);
|
|
1831
|
+
}), e.removerCamada(c), e.selectedFeatureIds.size !== d && e.notificarMudancaSelecao();
|
|
1749
1832
|
} else {
|
|
1750
1833
|
i.classList.add("confirming");
|
|
1751
|
-
const
|
|
1752
|
-
|
|
1834
|
+
const d = i.querySelector(".ui-btn-label");
|
|
1835
|
+
d && (d.textContent = "Confirmar Exclusão?"), o = setTimeout(() => {
|
|
1836
|
+
o = null, i.isConnected && n();
|
|
1837
|
+
}, 3500);
|
|
1753
1838
|
}
|
|
1754
1839
|
});
|
|
1755
1840
|
}), t.querySelectorAll("[data-layer-parent-select]").forEach((i) => {
|
|
1756
1841
|
i.addEventListener("change", (o) => {
|
|
1757
|
-
const n = o.target, s = n.getAttribute("data-layer-parent-select"),
|
|
1842
|
+
const n = o.target, s = n.getAttribute("data-layer-parent-select"), c = n.value || null, l = e.camadas.find((d) => d.id === s);
|
|
1758
1843
|
if (l) {
|
|
1759
|
-
if (
|
|
1844
|
+
if (c && (c === l.id || N(e.camadas, c, l.id))) {
|
|
1760
1845
|
n.value = l.parentId || "";
|
|
1761
1846
|
return;
|
|
1762
1847
|
}
|
|
1763
|
-
const
|
|
1764
|
-
l.parentId =
|
|
1848
|
+
const d = l.parentId ?? null;
|
|
1849
|
+
l.parentId = c, c && e.expandedLayers.add(c), e.salvarLembrancaEstado(), e.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1765
1850
|
camadaId: l.id,
|
|
1766
|
-
novoParentId:
|
|
1767
|
-
parentAnteriorId:
|
|
1851
|
+
novoParentId: c,
|
|
1852
|
+
parentAnteriorId: d,
|
|
1768
1853
|
camada: l
|
|
1769
1854
|
}), e.solicitarRenderizacao();
|
|
1770
1855
|
}
|
|
@@ -1775,18 +1860,18 @@ function At(e, t) {
|
|
|
1775
1860
|
const n = i.getAttribute("data-add-sublayer");
|
|
1776
1861
|
e.dispararEvento("ui-camada-adicionar", { parentId: n });
|
|
1777
1862
|
});
|
|
1778
|
-
}),
|
|
1863
|
+
}), wa(e, t), t.querySelectorAll("[data-layer-target]").forEach((i) => {
|
|
1779
1864
|
i.addEventListener("click", (o) => {
|
|
1780
1865
|
o.stopPropagation();
|
|
1781
1866
|
const n = o, s = i.getAttribute("data-layer-target");
|
|
1782
1867
|
if (!s) return;
|
|
1783
|
-
const
|
|
1784
|
-
if (
|
|
1785
|
-
|
|
1868
|
+
const c = pt(e.camadas, e.feicoes, s, e.searchQuery);
|
|
1869
|
+
if (c.length === 0) return;
|
|
1870
|
+
c.every((d) => e.selectedFeatureIds.has(d.id)) ? c.forEach((d) => e.selectedFeatureIds.delete(d.id)) : (!n.ctrlKey && !n.metaKey && e.selectedFeatureIds.clear(), c.forEach((d) => e.selectedFeatureIds.add(d.id))), e.lastClickedFeatureId = c[c.length - 1].id, e.sincronizarSelecaoDOM(), e.notificarMudancaSelecao();
|
|
1786
1871
|
});
|
|
1787
1872
|
});
|
|
1788
1873
|
}
|
|
1789
|
-
function
|
|
1874
|
+
function wa(e, t) {
|
|
1790
1875
|
t.querySelectorAll("[data-layer-show-more]").forEach((a) => {
|
|
1791
1876
|
a.addEventListener("click", (r) => {
|
|
1792
1877
|
r.stopPropagation();
|
|
@@ -1795,43 +1880,46 @@ function ha(e, t) {
|
|
|
1795
1880
|
});
|
|
1796
1881
|
});
|
|
1797
1882
|
}
|
|
1798
|
-
function
|
|
1883
|
+
function Ft(e, t) {
|
|
1799
1884
|
const a = t.getElementById("btn-toggle-all-expand");
|
|
1800
1885
|
if (!a) return;
|
|
1801
1886
|
const r = e.camadas.length > 0 && e.camadas.every((o) => e.expandedLayers.has(o.id)), i = a.querySelector(".ui-chevron-icon");
|
|
1802
|
-
i && i.classList.toggle("open", r),
|
|
1887
|
+
i && i.classList.toggle("open", r), j(
|
|
1803
1888
|
a,
|
|
1804
1889
|
r ? "Recolher Todos os Grupos" : "Expandir Todos os Grupos"
|
|
1805
1890
|
);
|
|
1806
1891
|
}
|
|
1807
|
-
function
|
|
1892
|
+
function $t(e, t) {
|
|
1808
1893
|
const a = t.getElementById("btn-toggle-all-vis");
|
|
1809
1894
|
if (!a) return;
|
|
1810
1895
|
const r = e.camadas.every((i) => i.visible !== !1);
|
|
1811
|
-
a.innerHTML = r ?
|
|
1896
|
+
a.innerHTML = r ? y.olhoAberto : y.olhoFechado, j(a, r ? "Ocultar Todas as Camadas" : "Exibir Todas as Camadas");
|
|
1812
1897
|
}
|
|
1813
|
-
function
|
|
1898
|
+
function Mt(e, t) {
|
|
1814
1899
|
const a = t.getElementById("select-footer-move");
|
|
1815
1900
|
a && a.addEventListener("change", (n) => {
|
|
1816
1901
|
const s = n.target.value;
|
|
1817
1902
|
if (!s) return;
|
|
1818
|
-
const
|
|
1819
|
-
if (
|
|
1903
|
+
const c = fe(e.camadas);
|
|
1904
|
+
if (c.has(s)) {
|
|
1820
1905
|
a.value = "";
|
|
1821
1906
|
return;
|
|
1822
1907
|
}
|
|
1823
1908
|
const l = e.feicoes.filter(
|
|
1824
|
-
(p) => e.selectedFeatureIds.has(p.id) && !
|
|
1909
|
+
(p) => e.selectedFeatureIds.has(p.id) && !c.has(p.layerId) && p.locked !== !0
|
|
1825
1910
|
);
|
|
1826
1911
|
if (l.length === 0) {
|
|
1827
1912
|
a.value = "";
|
|
1828
1913
|
return;
|
|
1829
1914
|
}
|
|
1830
|
-
const
|
|
1831
|
-
l.forEach((p) =>
|
|
1832
|
-
u
|
|
1915
|
+
const d = new Map(l.map((p) => [p.id, p.layerId]));
|
|
1916
|
+
l.forEach((p) => {
|
|
1917
|
+
const u = p.layerId;
|
|
1918
|
+
p.layerId = s, e.ordemFilhosPorPai && u !== s && ga(e.ordemFilhosPorPai, p.id, u, s);
|
|
1919
|
+
}), l.forEach((p) => {
|
|
1920
|
+
d.get(p.id) !== s && e.dispararEvento("ui-feicao-movida", {
|
|
1833
1921
|
feicaoId: p.id,
|
|
1834
|
-
camadaOrigemId:
|
|
1922
|
+
camadaOrigemId: d.get(p.id),
|
|
1835
1923
|
camadaDestinoId: s,
|
|
1836
1924
|
feicao: p
|
|
1837
1925
|
});
|
|
@@ -1840,7 +1928,7 @@ function kt(e, t) {
|
|
|
1840
1928
|
feicoesIds: l.map((p) => p.id),
|
|
1841
1929
|
feicoes: l,
|
|
1842
1930
|
valor: s
|
|
1843
|
-
}), e.solicitarRenderizacao();
|
|
1931
|
+
}), e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
1844
1932
|
});
|
|
1845
1933
|
const r = t.getElementById("btn-footer-new-layer");
|
|
1846
1934
|
r && r.addEventListener("click", () => {
|
|
@@ -1853,46 +1941,50 @@ function kt(e, t) {
|
|
|
1853
1941
|
const o = t.getElementById("btn-footer-del");
|
|
1854
1942
|
if (o) {
|
|
1855
1943
|
let n = null;
|
|
1856
|
-
const s = "Excluir selecionados",
|
|
1857
|
-
n && (clearTimeout(n), n = null), o.classList.remove("confirming"),
|
|
1944
|
+
const s = "Excluir selecionados", c = () => {
|
|
1945
|
+
n && (clearTimeout(n), n = null), o.classList.remove("confirming"), j(o, s);
|
|
1858
1946
|
};
|
|
1859
|
-
o.addEventListener("ui-cancelar-confirmacao",
|
|
1860
|
-
const l =
|
|
1947
|
+
o.addEventListener("ui-cancelar-confirmacao", c), o.addEventListener("click", () => {
|
|
1948
|
+
const l = fe(e.camadas), d = e.feicoes.filter(
|
|
1861
1949
|
(f) => e.selectedFeatureIds.has(f.id) && !l.has(f.layerId) && f.locked !== !0
|
|
1862
1950
|
);
|
|
1863
|
-
if (
|
|
1864
|
-
const p =
|
|
1951
|
+
if (d.length === 0) return;
|
|
1952
|
+
const p = d.map((f) => f.id);
|
|
1865
1953
|
if (!o.classList.contains("confirming")) {
|
|
1866
|
-
o.classList.add("confirming"),
|
|
1954
|
+
o.classList.add("confirming"), j(o, `Clique novamente para excluir ${p.length} selecionado(s)`), n = setTimeout(() => {
|
|
1955
|
+
n = null, o.isConnected && c();
|
|
1956
|
+
}, 3500);
|
|
1867
1957
|
return;
|
|
1868
1958
|
}
|
|
1869
|
-
|
|
1870
|
-
const
|
|
1871
|
-
e.
|
|
1959
|
+
c();
|
|
1960
|
+
const u = new Set(p);
|
|
1961
|
+
e.ordemFilhosPorPai && d.forEach((f) => {
|
|
1962
|
+
G(e.ordemFilhosPorPai, f.layerId, O(f.id));
|
|
1963
|
+
}), e.feicoes = e.feicoes.filter((f) => !u.has(f.id)), p.forEach((f) => e.selectedFeatureIds.delete(f)), e.lastClickedFeatureId && u.has(e.lastClickedFeatureId) && (e.lastClickedFeatureId = null), e.dispararEvento("ui-acao-massa", {
|
|
1872
1964
|
acao: "excluir",
|
|
1873
1965
|
feicoesIds: p,
|
|
1874
|
-
feicoes:
|
|
1875
|
-
}), e.notificarMudancaSelecao(), e.solicitarRenderizacao();
|
|
1966
|
+
feicoes: d
|
|
1967
|
+
}), e.salvarLembrancaEstado(), e.notificarMudancaSelecao(), e.solicitarRenderizacao();
|
|
1876
1968
|
});
|
|
1877
1969
|
}
|
|
1878
1970
|
}
|
|
1879
|
-
const
|
|
1971
|
+
const zt = [
|
|
1880
1972
|
{ tipo: "olho", atributo: "data-layer-eye", entidade: "camada" },
|
|
1881
1973
|
{ tipo: "olho", atributo: "data-feat-eye", entidade: "feicao" },
|
|
1882
1974
|
{ tipo: "cadeado", atributo: "data-layer-lock", entidade: "camada" },
|
|
1883
1975
|
{ tipo: "cadeado", atributo: "data-feat-lock", entidade: "feicao" },
|
|
1884
1976
|
{ tipo: "selecao", atributo: "data-layer-target", entidade: "camada" },
|
|
1885
1977
|
{ tipo: "selecao", atributo: "data-feat-target", entidade: "feicao" }
|
|
1886
|
-
],
|
|
1978
|
+
], ze = {
|
|
1887
1979
|
olho: "[data-layer-eye], [data-feat-eye]",
|
|
1888
1980
|
cadeado: "[data-layer-lock], [data-feat-lock]",
|
|
1889
1981
|
selecao: "[data-layer-target], [data-feat-target]"
|
|
1890
|
-
},
|
|
1891
|
-
function
|
|
1892
|
-
return
|
|
1982
|
+
}, Pt = 3;
|
|
1983
|
+
function Bt(e) {
|
|
1984
|
+
return zt.find((t) => e.hasAttribute(t.atributo)) ?? null;
|
|
1893
1985
|
}
|
|
1894
|
-
function
|
|
1895
|
-
const a =
|
|
1986
|
+
function Le(e, t) {
|
|
1987
|
+
const a = Bt(t);
|
|
1896
1988
|
if (!a) return null;
|
|
1897
1989
|
const r = t.getAttribute(a.atributo);
|
|
1898
1990
|
if (!r) return null;
|
|
@@ -1906,13 +1998,13 @@ function Ce(e, t) {
|
|
|
1906
1998
|
return o ? o.locked === !0 : null;
|
|
1907
1999
|
}
|
|
1908
2000
|
if (a.entidade === "feicao") return e.selectedFeatureIds.has(r);
|
|
1909
|
-
const i =
|
|
1910
|
-
|
|
2001
|
+
const i = $e(
|
|
2002
|
+
at(e.camadas, e.feicoes, r),
|
|
1911
2003
|
e.searchQuery
|
|
1912
2004
|
);
|
|
1913
2005
|
return i.length === 0 ? null : i.every((o) => e.selectedFeatureIds.has(o.id));
|
|
1914
2006
|
}
|
|
1915
|
-
function
|
|
2007
|
+
function Je(e, t, a = !1) {
|
|
1916
2008
|
e.dispatchEvent(
|
|
1917
2009
|
new MouseEvent("click", {
|
|
1918
2010
|
bubbles: !0,
|
|
@@ -1922,54 +2014,54 @@ function Qe(e, t, a = !1) {
|
|
|
1922
2014
|
})
|
|
1923
2015
|
);
|
|
1924
2016
|
}
|
|
1925
|
-
let
|
|
1926
|
-
function
|
|
1927
|
-
(
|
|
2017
|
+
let q = null;
|
|
2018
|
+
function qt(e) {
|
|
2019
|
+
(q == null ? void 0 : q.host) === e && q.cancelar();
|
|
1928
2020
|
}
|
|
1929
|
-
function
|
|
1930
|
-
Object.keys(
|
|
1931
|
-
a.querySelectorAll(
|
|
1932
|
-
i.addEventListener("pointerdown", (o) =>
|
|
2021
|
+
function Aa(e, t, a = t) {
|
|
2022
|
+
Object.keys(ze).forEach((r) => {
|
|
2023
|
+
a.querySelectorAll(ze[r]).forEach((i) => {
|
|
2024
|
+
i.addEventListener("pointerdown", (o) => Dt(e, t, r, i, o));
|
|
1933
2025
|
});
|
|
1934
2026
|
});
|
|
1935
2027
|
}
|
|
1936
|
-
function
|
|
1937
|
-
if (i.pointerType === "mouse" && i.button !== 0 || e.editingLayerId || e.editingFeatureId ||
|
|
1938
|
-
|
|
1939
|
-
const o =
|
|
1940
|
-
let
|
|
1941
|
-
const p = /* @__PURE__ */ new Set([r]),
|
|
1942
|
-
|
|
1943
|
-
}, f = (
|
|
1944
|
-
|
|
1945
|
-
}, m = (
|
|
1946
|
-
p.has(
|
|
1947
|
-
},
|
|
1948
|
-
|
|
1949
|
-
},
|
|
1950
|
-
var
|
|
1951
|
-
if (!
|
|
1952
|
-
if (Math.hypot(
|
|
1953
|
-
const
|
|
1954
|
-
if (!
|
|
1955
|
-
|
|
2028
|
+
function Dt(e, t, a, r, i) {
|
|
2029
|
+
if (i.pointerType === "mouse" && i.button !== 0 || e.editingLayerId || e.editingFeatureId || Le(e, r) === null) return;
|
|
2030
|
+
q == null || q.cancelar();
|
|
2031
|
+
const o = ze[a], n = i.ctrlKey || i.metaKey, s = i.shiftKey;
|
|
2032
|
+
let c = !1, l = !1, d = i.clientY;
|
|
2033
|
+
const p = /* @__PURE__ */ new Set([r]), u = (w) => {
|
|
2034
|
+
w.preventDefault(), w.stopImmediatePropagation();
|
|
2035
|
+
}, f = (w) => {
|
|
2036
|
+
w.stopPropagation(), w.preventDefault();
|
|
2037
|
+
}, m = (w) => w.preventDefault(), g = (w) => {
|
|
2038
|
+
p.has(w) || (p.add(w), Le(e, w) !== l && Je(w, a === "selecao"));
|
|
2039
|
+
}, b = () => {
|
|
2040
|
+
c = !0, Je(r, n, s), l = Le(e, r) === !0, t.addEventListener("selectstart", m), document.body.style.userSelect = "none";
|
|
2041
|
+
}, h = (w) => {
|
|
2042
|
+
var P, C;
|
|
2043
|
+
if (!c) {
|
|
2044
|
+
if (Math.hypot(w.clientX - i.clientX, w.clientY - i.clientY) < Pt) return;
|
|
2045
|
+
const z = (P = t.elementFromPoint(w.clientX, w.clientY)) == null ? void 0 : P.closest(o);
|
|
2046
|
+
if (!z || z === r) return;
|
|
2047
|
+
b();
|
|
1956
2048
|
}
|
|
1957
|
-
|
|
1958
|
-
const
|
|
1959
|
-
t.querySelectorAll(o).forEach((
|
|
1960
|
-
const
|
|
1961
|
-
if (
|
|
1962
|
-
const
|
|
1963
|
-
|
|
2049
|
+
w.preventDefault();
|
|
2050
|
+
const L = Math.min(d, w.clientY), S = Math.max(d, w.clientY);
|
|
2051
|
+
t.querySelectorAll(o).forEach((z) => {
|
|
2052
|
+
const T = z.getBoundingClientRect();
|
|
2053
|
+
if (T.height === 0) return;
|
|
2054
|
+
const Z = T.top + T.height / 2;
|
|
2055
|
+
Z >= L && Z <= S && g(z);
|
|
1964
2056
|
});
|
|
1965
|
-
const
|
|
1966
|
-
|
|
1967
|
-
},
|
|
1968
|
-
(
|
|
1969
|
-
},
|
|
1970
|
-
|
|
1971
|
-
}
|
|
1972
|
-
function
|
|
2057
|
+
const x = (C = t.elementFromPoint(w.clientX, w.clientY)) == null ? void 0 : C.closest(o);
|
|
2058
|
+
x && g(x), d = w.clientY;
|
|
2059
|
+
}, v = (w = !1) => {
|
|
2060
|
+
(q == null ? void 0 : q.cancelar) === I && (q = null), window.removeEventListener("pointermove", h), window.removeEventListener("pointerup", A), window.removeEventListener("pointercancel", A), window.removeEventListener("dragstart", u, !0), t.removeEventListener("selectstart", m), c && (document.body.style.userSelect = "", w || (window.addEventListener("click", f, { capture: !0, once: !0 }), setTimeout(() => window.removeEventListener("click", f, !0), 0)));
|
|
2061
|
+
}, A = () => v(), I = () => v(!0);
|
|
2062
|
+
q = { host: e, cancelar: I }, window.addEventListener("dragstart", u, !0), window.addEventListener("pointermove", h, { passive: !1 }), window.addEventListener("pointerup", A), window.addEventListener("pointercancel", A);
|
|
2063
|
+
}
|
|
2064
|
+
function Tt(e, t) {
|
|
1973
2065
|
const a = t.getElementById("btn-toggle-all-vis");
|
|
1974
2066
|
a && a.addEventListener("click", () => e.alternarVisibilidadeTodas(!0));
|
|
1975
2067
|
const r = t.getElementById("btn-toggle-all-expand");
|
|
@@ -1977,15 +2069,17 @@ function Mt(e, t) {
|
|
|
1977
2069
|
o.stopPropagation(), e.camadas.length > 0 && e.camadas.every((s) => e.expandedLayers.has(s.id)) ? e.colapsarTodas() : e.expandirTodas();
|
|
1978
2070
|
});
|
|
1979
2071
|
const i = t.getElementById("btn-colapsar");
|
|
1980
|
-
i && i.addEventListener("click", () => e.colapsar(!0)),
|
|
2072
|
+
i && i.addEventListener("click", () => e.colapsar(!0)), Rt(e, t);
|
|
1981
2073
|
}
|
|
1982
|
-
function
|
|
2074
|
+
function Rt(e, t) {
|
|
1983
2075
|
const a = t.getElementById("input-layer-search"), r = t.getElementById("btn-clear-layer-search"), i = () => {
|
|
1984
2076
|
var o;
|
|
1985
2077
|
e.searchQuery = "", e.solicitarRenderizacao(), (o = t.getElementById("input-layer-search")) == null || o.focus();
|
|
1986
2078
|
};
|
|
1987
2079
|
if (a) {
|
|
1988
|
-
const o =
|
|
2080
|
+
const o = ta(() => {
|
|
2081
|
+
a.isConnected && e.solicitarRenderizacao();
|
|
2082
|
+
}, 75);
|
|
1989
2083
|
a.addEventListener("input", (n) => {
|
|
1990
2084
|
e.searchQuery = n.target.value, o();
|
|
1991
2085
|
}), a.addEventListener("keydown", (n) => {
|
|
@@ -1994,7 +2088,7 @@ function zt(e, t) {
|
|
|
1994
2088
|
}
|
|
1995
2089
|
r && r.addEventListener("click", i);
|
|
1996
2090
|
}
|
|
1997
|
-
function
|
|
2091
|
+
function Ea(e, t) {
|
|
1998
2092
|
t.querySelectorAll("[data-feat-select]").forEach((a) => {
|
|
1999
2093
|
a.addEventListener("click", (r) => {
|
|
2000
2094
|
if (e.editingFeatureId) return;
|
|
@@ -2019,7 +2113,7 @@ function ba(e, t) {
|
|
|
2019
2113
|
if (o) {
|
|
2020
2114
|
o.visible = o.visible === !1;
|
|
2021
2115
|
const n = o.visible !== !1;
|
|
2022
|
-
a.innerHTML = n ?
|
|
2116
|
+
a.innerHTML = n ? y.olhoAberto : y.olhoFechado, j(a, n ? "Ocultar Feição" : "Exibir Feição");
|
|
2023
2117
|
const s = a.closest(".ui-feat-row");
|
|
2024
2118
|
s && s.classList.toggle("hidden-row", !n), e.dispararEvento("ui-feicao-visibilidade", {
|
|
2025
2119
|
feicaoId: o.id,
|
|
@@ -2031,7 +2125,7 @@ function ba(e, t) {
|
|
|
2031
2125
|
a.addEventListener("click", (r) => {
|
|
2032
2126
|
if (r.stopPropagation(), a.hasAttribute("data-locked-by-layer")) return;
|
|
2033
2127
|
const i = a.getAttribute("data-feat-lock"), o = e.feicoes.find((n) => n.id === i);
|
|
2034
|
-
o && (o.locked = !o.locked, a.innerHTML = o.locked ?
|
|
2128
|
+
o && (o.locked = !o.locked, a.innerHTML = o.locked ? y.cadeadoTrancado : y.cadeadoAberto, a.classList.toggle("ui-lock-open", !o.locked), j(a, o.locked ? "Desbloquear Feição" : "Bloquear Feição"), e.dispararEvento("ui-feicao-bloqueio", {
|
|
2035
2129
|
feicaoId: o.id,
|
|
2036
2130
|
bloqueado: o.locked
|
|
2037
2131
|
}));
|
|
@@ -2044,7 +2138,7 @@ function ba(e, t) {
|
|
|
2044
2138
|
});
|
|
2045
2139
|
});
|
|
2046
2140
|
}
|
|
2047
|
-
function
|
|
2141
|
+
function Ot(e, t) {
|
|
2048
2142
|
var a;
|
|
2049
2143
|
(a = t.querySelector("[data-basemap-toggle]")) == null || a.addEventListener("click", () => {
|
|
2050
2144
|
e.alternarMapasBaseRecolhido(!0);
|
|
@@ -2055,10 +2149,10 @@ function Pt(e, t) {
|
|
|
2055
2149
|
});
|
|
2056
2150
|
});
|
|
2057
2151
|
}
|
|
2058
|
-
function
|
|
2059
|
-
|
|
2152
|
+
function jt(e, t) {
|
|
2153
|
+
Tt(e, t), St(e, t), Ea(e, t), Ot(e, t), Mt(e, t), Aa(e, t);
|
|
2060
2154
|
}
|
|
2061
|
-
function
|
|
2155
|
+
function Nt(e) {
|
|
2062
2156
|
if (!e.arvoreRenderizada) return { incremental: !1, motivo: "arvore-nao-renderizada" };
|
|
2063
2157
|
if (e.buscaAtiva) return { incremental: !1, motivo: "busca-ativa" };
|
|
2064
2158
|
if (e.editandoCamada || e.editandoFeicao) return { incremental: !1, motivo: "edicao-inline" };
|
|
@@ -2069,12 +2163,12 @@ function qt(e) {
|
|
|
2069
2163
|
}
|
|
2070
2164
|
return e.idsDuplicados ? { incremental: !1, motivo: "ids-duplicados" } : { incremental: !0 };
|
|
2071
2165
|
}
|
|
2072
|
-
function
|
|
2166
|
+
function Ia(e, t = /* @__PURE__ */ new Map()) {
|
|
2073
2167
|
for (const a of e)
|
|
2074
|
-
t.set(a.camada.id, a),
|
|
2168
|
+
t.set(a.camada.id, a), Ia(a.subcamadas, t);
|
|
2075
2169
|
return t;
|
|
2076
2170
|
}
|
|
2077
|
-
function
|
|
2171
|
+
function Ht(e) {
|
|
2078
2172
|
const t = /* @__PURE__ */ new Map();
|
|
2079
2173
|
for (let a = 0; a < e.length; a++) {
|
|
2080
2174
|
const r = e[a];
|
|
@@ -2084,24 +2178,24 @@ function Dt(e) {
|
|
|
2084
2178
|
}
|
|
2085
2179
|
return t;
|
|
2086
2180
|
}
|
|
2087
|
-
function
|
|
2181
|
+
function te(e, t) {
|
|
2088
2182
|
for (let a = e.firstElementChild; a; a = a.nextElementSibling)
|
|
2089
2183
|
if (a.classList.contains(t)) return a;
|
|
2090
2184
|
return null;
|
|
2091
2185
|
}
|
|
2092
|
-
function
|
|
2186
|
+
function Gt(e) {
|
|
2093
2187
|
const t = /* @__PURE__ */ new Map(), a = (r) => {
|
|
2094
2188
|
for (let i = r.firstElementChild; i; i = i.nextElementSibling) {
|
|
2095
2189
|
if (!i.classList.contains("ui-layer-group")) continue;
|
|
2096
2190
|
const o = i.getAttribute("data-layer-id");
|
|
2097
2191
|
o !== null && t.set(o, i);
|
|
2098
|
-
const n =
|
|
2192
|
+
const n = te(i, "ui-children-container");
|
|
2099
2193
|
n && a(n);
|
|
2100
2194
|
}
|
|
2101
2195
|
};
|
|
2102
2196
|
return a(e), t;
|
|
2103
2197
|
}
|
|
2104
|
-
function
|
|
2198
|
+
function _t(e) {
|
|
2105
2199
|
if (!e || e.length < 2) return !1;
|
|
2106
2200
|
const t = /* @__PURE__ */ new Set();
|
|
2107
2201
|
for (const a of e) {
|
|
@@ -2110,7 +2204,7 @@ function Rt(e) {
|
|
|
2110
2204
|
}
|
|
2111
2205
|
return !1;
|
|
2112
2206
|
}
|
|
2113
|
-
function
|
|
2207
|
+
function Vt(e, t) {
|
|
2114
2208
|
var i;
|
|
2115
2209
|
const a = new Map(t.map((o) => [o.id, o])), r = /* @__PURE__ */ new Set();
|
|
2116
2210
|
for (const o of e) {
|
|
@@ -2120,119 +2214,133 @@ function Ot(e, t) {
|
|
|
2120
2214
|
}
|
|
2121
2215
|
return r;
|
|
2122
2216
|
}
|
|
2123
|
-
function
|
|
2217
|
+
function me(e) {
|
|
2124
2218
|
const t = document.createElement("template");
|
|
2125
2219
|
return t.innerHTML = e, { modelo: t, elementos: Array.from(t.content.children) };
|
|
2126
2220
|
}
|
|
2127
|
-
function
|
|
2221
|
+
function ge(e) {
|
|
2128
2222
|
var a;
|
|
2129
2223
|
const t = e.nextSibling;
|
|
2130
2224
|
t && t.nodeType === 3 && !(t.textContent ?? "").trim() && ((a = t.parentNode) == null || a.removeChild(t)), e.remove();
|
|
2131
2225
|
}
|
|
2132
|
-
function
|
|
2226
|
+
function Ut(e, t) {
|
|
2133
2227
|
if (!e || !t.contains(e)) return null;
|
|
2134
2228
|
const a = Array.from(e.attributes).find((r) => r.name.startsWith("data-") && r.value !== "");
|
|
2135
2229
|
return a ? { nome: a.name, valor: a.value } : null;
|
|
2136
2230
|
}
|
|
2137
|
-
function
|
|
2138
|
-
var
|
|
2231
|
+
function Yt(e, t) {
|
|
2232
|
+
var L, S;
|
|
2139
2233
|
const { host: a, shadow: r, mudanca: i } = e;
|
|
2140
|
-
if ((
|
|
2141
|
-
const o = e.grupos.get(t), n = e.nodos.get(t), s = o ?
|
|
2234
|
+
if ((S = (L = a.ordemFilhosPorPai) == null ? void 0 : L.get(t)) != null && S.length) return !1;
|
|
2235
|
+
const o = e.grupos.get(t), n = e.nodos.get(t), s = o ? te(o, "ui-children-container") : null;
|
|
2142
2236
|
if (!o || !n || !s) return !1;
|
|
2143
|
-
const
|
|
2144
|
-
let
|
|
2145
|
-
for (let
|
|
2146
|
-
|
|
2147
|
-
const
|
|
2148
|
-
if (
|
|
2149
|
-
!
|
|
2237
|
+
const c = n.camada, l = e.porCamada.get(t) ?? [], d = a.expandedFeatureLimits.get(t) ?? qe, p = l.slice(0, d), u = new Set(p.map((x) => x.id)), f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), g = r.activeElement;
|
|
2238
|
+
let b = null;
|
|
2239
|
+
for (let x = s.firstElementChild, P; x; x = P) {
|
|
2240
|
+
P = x.nextElementSibling;
|
|
2241
|
+
const C = x.getAttribute("data-feat-row");
|
|
2242
|
+
if (C === null) {
|
|
2243
|
+
!b && !x.classList.contains("ui-layer-group") && (b = x);
|
|
2150
2244
|
continue;
|
|
2151
2245
|
}
|
|
2152
|
-
const
|
|
2153
|
-
!
|
|
2154
|
-
}
|
|
2155
|
-
const
|
|
2156
|
-
let
|
|
2157
|
-
if (
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2246
|
+
const z = i.idsAlterados.has(C) && u.has(C) && !f.has(C);
|
|
2247
|
+
!u.has(C) || f.has(C) || z ? (z && m.set(C, { tabindex: x.getAttribute("tabindex"), foco: Ut(g, x) }), ge(x)) : (f.set(C, x), b || (b = x));
|
|
2248
|
+
}
|
|
2249
|
+
const h = p.filter((x) => !f.has(x.id));
|
|
2250
|
+
let v = [];
|
|
2251
|
+
if (h.length > 0) {
|
|
2252
|
+
e.herdado || (e.herdado = he(a.camadas));
|
|
2253
|
+
const x = Se(c, n.depth, e.herdado.get(t)), P = h.map(
|
|
2254
|
+
(T) => Fe(T, x, a.selectedFeatureIds.has(T.id), a.editingFeatureId === T.id)
|
|
2255
|
+
).join(""), { modelo: C, elementos: z } = me(P);
|
|
2256
|
+
if (z.length !== h.length) return !1;
|
|
2257
|
+
e.ligar(C.content), v = z;
|
|
2258
|
+
}
|
|
2259
|
+
let A = b, I = 0;
|
|
2260
|
+
const w = /* @__PURE__ */ new Map();
|
|
2261
|
+
for (const x of p) {
|
|
2262
|
+
const P = f.get(x.id);
|
|
2263
|
+
if (P)
|
|
2264
|
+
P === A ? A = P.nextElementSibling : s.insertBefore(P, A);
|
|
2170
2265
|
else {
|
|
2171
|
-
const
|
|
2172
|
-
s.insertBefore(
|
|
2266
|
+
const C = v[I++];
|
|
2267
|
+
s.insertBefore(C, A), w.set(x.id, C);
|
|
2173
2268
|
}
|
|
2174
2269
|
}
|
|
2175
|
-
return m.forEach((
|
|
2176
|
-
const
|
|
2177
|
-
if (!
|
|
2178
|
-
const
|
|
2179
|
-
(
|
|
2270
|
+
return m.forEach((x, P) => {
|
|
2271
|
+
const C = w.get(P);
|
|
2272
|
+
if (!C || (x.tabindex !== null && C.setAttribute("tabindex", x.tabindex), !x.foco)) return;
|
|
2273
|
+
const z = C.getAttribute(x.foco.nome) === x.foco.valor ? C : Array.from(C.querySelectorAll(`[${x.foco.nome}]`)).find(
|
|
2274
|
+
(T) => T.getAttribute(x.foco.nome) === x.foco.valor
|
|
2180
2275
|
);
|
|
2181
|
-
|
|
2182
|
-
}),
|
|
2276
|
+
z == null || z.focus({ preventScroll: !0 });
|
|
2277
|
+
}), Kt(e, s, n, d, l.length);
|
|
2183
2278
|
}
|
|
2184
|
-
function
|
|
2185
|
-
const o =
|
|
2186
|
-
if (
|
|
2279
|
+
function Kt(e, t, a, r, i) {
|
|
2280
|
+
const o = M(a.camada.id), n = !!(a.camada.isGroup || a.subcamadas.length > 0), s = i > r, c = a.subcamadas.length === 0 && i === 0, l = te(t, "ui-truncate-notice"), d = te(t, "ui-empty-row");
|
|
2281
|
+
if (d && !c && ge(d), l && !s && ge(l), s)
|
|
2187
2282
|
if (l) {
|
|
2188
|
-
const p =
|
|
2189
|
-
if (!
|
|
2190
|
-
|
|
2283
|
+
const p = ua(r, i), u = l.querySelector("span"), f = l.querySelector(".ui-truncate-more-btn");
|
|
2284
|
+
if (!u || !f) return !1;
|
|
2285
|
+
u.textContent !== p.resumo && (u.textContent = p.resumo), f.textContent !== p.botao && (f.textContent = p.botao);
|
|
2191
2286
|
} else {
|
|
2192
|
-
const { modelo: p, elementos:
|
|
2193
|
-
if (
|
|
2194
|
-
e.ligar(p.content), t.appendChild(
|
|
2287
|
+
const { modelo: p, elementos: u } = me(pa(o, r, i));
|
|
2288
|
+
if (u.length !== 1) return !1;
|
|
2289
|
+
e.ligar(p.content), t.appendChild(u[0]);
|
|
2195
2290
|
}
|
|
2196
|
-
if (
|
|
2197
|
-
const { elementos: p } =
|
|
2291
|
+
if (c && !d) {
|
|
2292
|
+
const { elementos: p } = me(fa(n));
|
|
2198
2293
|
if (p.length !== 1) return !1;
|
|
2199
2294
|
t.appendChild(p[0]);
|
|
2200
2295
|
}
|
|
2201
2296
|
return !0;
|
|
2202
2297
|
}
|
|
2203
|
-
function
|
|
2204
|
-
|
|
2298
|
+
function ka(e, t, a) {
|
|
2299
|
+
let r = 0, i = 0;
|
|
2300
|
+
const o = t.get(e.camada.id);
|
|
2301
|
+
if (o && (r += o.length, a.size > 0))
|
|
2302
|
+
for (let n = 0; n < o.length; n++)
|
|
2303
|
+
a.has(o[n].id) && i++;
|
|
2304
|
+
for (const n of e.subcamadas) {
|
|
2305
|
+
const s = ka(n, t, a);
|
|
2306
|
+
r += s.total, i += s.sel;
|
|
2307
|
+
}
|
|
2308
|
+
return { total: r, sel: i };
|
|
2309
|
+
}
|
|
2310
|
+
function Qt(e, t) {
|
|
2311
|
+
const a = e.grupos.get(t), r = e.nodos.get(t), i = a ? te(a, "ui-layer-row") : null, o = i == null ? void 0 : i.querySelector(".ui-col-name");
|
|
2205
2312
|
if (!a || !r || !i || !o) return !1;
|
|
2206
|
-
const { host: n } = e, s =
|
|
2207
|
-
if (
|
|
2208
|
-
if (s
|
|
2209
|
-
|
|
2313
|
+
const { host: n } = e, { total: s, sel: c } = ka(r, e.porCamada, n.selectedFeatureIds), l = (e.porCamada.get(t) ?? []).length, d = r.subcamadas.length, p = !!(r.camada.isGroup || d > 0), u = o.querySelector(".ui-count-chip");
|
|
2314
|
+
if (u)
|
|
2315
|
+
if (s === 0 && p)
|
|
2316
|
+
ge(u);
|
|
2210
2317
|
else {
|
|
2211
|
-
const
|
|
2212
|
-
|
|
2318
|
+
const f = String(s), m = ca(s, l, d);
|
|
2319
|
+
u.textContent !== f && (u.textContent = f), u.getAttribute("title") !== m && u.setAttribute("title", m);
|
|
2213
2320
|
}
|
|
2214
2321
|
else {
|
|
2215
|
-
const
|
|
2216
|
-
if (
|
|
2217
|
-
const { elementos:
|
|
2218
|
-
if (
|
|
2219
|
-
o.appendChild(
|
|
2322
|
+
const f = da(s, l, d, p);
|
|
2323
|
+
if (f) {
|
|
2324
|
+
const { elementos: m } = me(f);
|
|
2325
|
+
if (m.length !== 1) return !1;
|
|
2326
|
+
o.appendChild(m[0]);
|
|
2220
2327
|
}
|
|
2221
2328
|
}
|
|
2222
|
-
return
|
|
2329
|
+
return ya(i.querySelector(".ui-target-circle"), s, c), !0;
|
|
2223
2330
|
}
|
|
2224
|
-
function
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2331
|
+
function Xt(e, t, a, r) {
|
|
2332
|
+
if (e.camadas.length === 0) return !1;
|
|
2333
|
+
const i = t.getElementById("ui-layer-tree-mount"), o = Ia(oe(e.camadas)), n = i ? Gt(i) : /* @__PURE__ */ new Map(), s = Ht(e.feicoes), c = a.camadas === "todas" ? Array.from(o.keys()) : Array.from(a.camadas), l = c.map((u) => ({
|
|
2334
|
+
existeNoModelo: o.has(u),
|
|
2335
|
+
renderizadaNoDom: n.has(u),
|
|
2336
|
+
drawerAberto: e.activeSettingsLayerId === u
|
|
2229
2337
|
}));
|
|
2230
|
-
if (!
|
|
2338
|
+
if (!Nt({
|
|
2231
2339
|
arvoreRenderizada: i !== null,
|
|
2232
2340
|
buscaAtiva: (e.searchQuery || "").trim() !== "",
|
|
2233
2341
|
editandoCamada: e.editingLayerId !== null,
|
|
2234
2342
|
editandoFeicao: e.editingFeatureId !== null,
|
|
2235
|
-
idsDuplicados:
|
|
2343
|
+
idsDuplicados: c.some((u) => _t(s.get(u))),
|
|
2236
2344
|
camadasAfetadas: l
|
|
2237
2345
|
}).incremental) return !1;
|
|
2238
2346
|
const p = {
|
|
@@ -2242,23 +2350,23 @@ function Vt(e, t, a, r) {
|
|
|
2242
2350
|
porCamada: s,
|
|
2243
2351
|
nodos: o,
|
|
2244
2352
|
grupos: n,
|
|
2245
|
-
herdado:
|
|
2353
|
+
herdado: null,
|
|
2246
2354
|
ligar: r
|
|
2247
2355
|
};
|
|
2248
|
-
for (const
|
|
2249
|
-
if (!
|
|
2250
|
-
for (const
|
|
2251
|
-
if (!
|
|
2252
|
-
return (a.selecaoAfetada || e.selectedFeatureIds.size > 0) &&
|
|
2356
|
+
for (const u of c)
|
|
2357
|
+
if (!Yt(p, u)) return !1;
|
|
2358
|
+
for (const u of Vt(c, e.camadas))
|
|
2359
|
+
if (!Qt(p, u)) return !1;
|
|
2360
|
+
return (a.selecaoAfetada || e.selectedFeatureIds.size > 0) && xa(e, t), !0;
|
|
2253
2361
|
}
|
|
2254
|
-
function
|
|
2362
|
+
function Wt(e) {
|
|
2255
2363
|
if (!e.isConnected) return;
|
|
2256
2364
|
const t = document.createElement("div");
|
|
2257
|
-
t.className = "ui-basemap-preview-none", t.innerHTML =
|
|
2365
|
+
t.className = "ui-basemap-preview-none", t.innerHTML = y.gradeCad, e.replaceWith(t);
|
|
2258
2366
|
}
|
|
2259
|
-
function
|
|
2260
|
-
var
|
|
2261
|
-
const i =
|
|
2367
|
+
function Jt(e, t, a, r) {
|
|
2368
|
+
var g, b;
|
|
2369
|
+
const i = mt({
|
|
2262
2370
|
camadas: e.camadas,
|
|
2263
2371
|
feicoes: e.feicoes,
|
|
2264
2372
|
camadaAtivaId: e.camadaAtivaId,
|
|
@@ -2273,49 +2381,49 @@ function Ut(e, t, a, r) {
|
|
|
2273
2381
|
limitesPorCamada: e.expandedFeatureLimits,
|
|
2274
2382
|
mostrarBotaoColapsar: e.flutuante && e.getAttribute("colapsavel") !== "false",
|
|
2275
2383
|
ordemFilhosPorPai: e.ordemFilhosPorPai
|
|
2276
|
-
}), o = e.mostrarMapasBase ?
|
|
2384
|
+
}), o = e.mostrarMapasBase ? et(e.mapasBase, e.mapaBaseAtivo, e.mapasBaseRecolhido) : "", n = e.mostrarRodape ? tt(e.camadas, e.feicoes, e.selectedFeatureIds) : "", s = t.getElementById("ui-layer-tree-mount"), c = a.scrollTop, l = s ? s.scrollTop : 0, d = t.activeElement, p = d && a.contains(d) ? d.id : "", u = d && !p && a.contains(d) ? Array.from(d.attributes).find((h) => h.name.startsWith("data-") && h.value !== "") : void 0, f = d && "selectionStart" in d ? d.selectionStart : null;
|
|
2277
2385
|
a.innerHTML = `
|
|
2278
2386
|
${i}
|
|
2279
2387
|
${n}
|
|
2280
2388
|
${o}
|
|
2281
|
-
`, a.scrollTop =
|
|
2389
|
+
`, a.scrollTop = c;
|
|
2282
2390
|
const m = t.getElementById("ui-layer-tree-mount");
|
|
2283
2391
|
if (m && (m.scrollTop = l), p) {
|
|
2284
|
-
const
|
|
2285
|
-
if (
|
|
2392
|
+
const h = t.getElementById(p);
|
|
2393
|
+
if (h && (h.focus({ preventScroll: !0 }), f !== null && typeof h.setSelectionRange == "function"))
|
|
2286
2394
|
try {
|
|
2287
|
-
|
|
2395
|
+
h.setSelectionRange(f, f);
|
|
2288
2396
|
} catch {
|
|
2289
2397
|
}
|
|
2290
2398
|
}
|
|
2291
|
-
!p &&
|
|
2292
|
-
const
|
|
2293
|
-
|
|
2294
|
-
}),
|
|
2399
|
+
!p && u && ((g = D(a, u.name, u.value)) == null || g.focus({ preventScroll: !0 })), (b = t.querySelector("[data-layer-row], [data-feat-row]")) == null || b.setAttribute("tabindex", "0"), a.querySelectorAll("img[data-basemap-thumb]").forEach((h) => {
|
|
2400
|
+
const v = () => Wt(h);
|
|
2401
|
+
h.addEventListener("error", v, { once: !0 }), h.complete && h.naturalWidth === 0 && h.getAttribute("src") && v();
|
|
2402
|
+
}), jt(e, t), r.bindAll();
|
|
2295
2403
|
}
|
|
2296
|
-
function
|
|
2404
|
+
function Zt(e, t, a, r) {
|
|
2297
2405
|
try {
|
|
2298
|
-
return
|
|
2299
|
-
|
|
2406
|
+
return Xt(e, t, r, (i) => {
|
|
2407
|
+
Ea(e, i), wa(e, i), Aa(e, t, i), a.bindLinhasFeicao(i);
|
|
2300
2408
|
});
|
|
2301
2409
|
} catch (i) {
|
|
2302
2410
|
return console.warn("[UI-Camadas] atualização incremental falhou; redesenhando o painel.", i), !1;
|
|
2303
2411
|
}
|
|
2304
2412
|
}
|
|
2305
|
-
const
|
|
2306
|
-
function
|
|
2307
|
-
return !e || !(e instanceof Element) || e instanceof HTMLInputElement &&
|
|
2413
|
+
const er = '[role="button"][tabindex]', re = "[data-layer-row], [data-feat-row]", ar = ["color", "range", "checkbox", "radio", "button"];
|
|
2414
|
+
function Ca(e) {
|
|
2415
|
+
return !e || !(e instanceof Element) || e instanceof HTMLInputElement && ar.includes(e.type) ? !1 : Va({ composedPath: () => [e] });
|
|
2308
2416
|
}
|
|
2309
|
-
function
|
|
2310
|
-
return Array.from(e.querySelectorAll(
|
|
2417
|
+
function tr(e) {
|
|
2418
|
+
return Array.from(e.querySelectorAll(re)).filter((t) => {
|
|
2311
2419
|
const a = t.closest(".ui-children-container");
|
|
2312
2420
|
return !(a && a.style.display === "none") && !t.classList.contains("ui-search-hidden");
|
|
2313
2421
|
});
|
|
2314
2422
|
}
|
|
2315
|
-
function
|
|
2316
|
-
t && (e.querySelectorAll(
|
|
2423
|
+
function K(e, t) {
|
|
2424
|
+
t && (e.querySelectorAll(re).forEach((a) => a.setAttribute("tabindex", "-1")), t.setAttribute("tabindex", "0"), t.focus());
|
|
2317
2425
|
}
|
|
2318
|
-
function
|
|
2426
|
+
function rr(e, t) {
|
|
2319
2427
|
e.dispatchEvent(
|
|
2320
2428
|
new MouseEvent("click", {
|
|
2321
2429
|
bubbles: !0,
|
|
@@ -2324,9 +2432,9 @@ function Wt(e, t) {
|
|
|
2324
2432
|
})
|
|
2325
2433
|
);
|
|
2326
2434
|
}
|
|
2327
|
-
function
|
|
2435
|
+
function ir(e, t, a) {
|
|
2328
2436
|
var i;
|
|
2329
|
-
if (
|
|
2437
|
+
if (Ca(a.composedPath()[0])) return;
|
|
2330
2438
|
const r = t.querySelector(".confirming");
|
|
2331
2439
|
if (r) {
|
|
2332
2440
|
a.preventDefault(), r.dispatchEvent(new Event("ui-cancelar-confirmacao")), r.classList.remove("confirming");
|
|
@@ -2335,106 +2443,108 @@ function Jt(e, t, a) {
|
|
|
2335
2443
|
if (e.activeSettingsLayerId) {
|
|
2336
2444
|
a.preventDefault();
|
|
2337
2445
|
const o = e.activeSettingsLayerId;
|
|
2338
|
-
e.activeSettingsLayerId = null, e.solicitarRenderizacao(), (i =
|
|
2446
|
+
e.activeSettingsLayerId = null, e.solicitarRenderizacao(), (i = D(t, "data-layer-settings", o)) == null || i.focus();
|
|
2339
2447
|
return;
|
|
2340
2448
|
}
|
|
2341
2449
|
e.selectedFeatureIds.size > 0 && (a.preventDefault(), e.limparSelecao(!0));
|
|
2342
2450
|
}
|
|
2343
|
-
function
|
|
2344
|
-
var s,
|
|
2451
|
+
function or(e, t, a, r) {
|
|
2452
|
+
var s, c, l;
|
|
2345
2453
|
const i = r.composedPath()[0];
|
|
2346
|
-
if (!(i instanceof HTMLElement) ||
|
|
2347
|
-
if ((r.key === "Enter" || r.key === " ") && i.matches(
|
|
2454
|
+
if (!(i instanceof HTMLElement) || Ca(i)) return;
|
|
2455
|
+
if ((r.key === "Enter" || r.key === " ") && i.matches(er)) {
|
|
2348
2456
|
r.preventDefault(), i.click();
|
|
2349
2457
|
return;
|
|
2350
2458
|
}
|
|
2351
|
-
if (!i.matches(
|
|
2352
|
-
const o =
|
|
2459
|
+
if (!i.matches(re)) return;
|
|
2460
|
+
const o = tr(t), n = o.indexOf(i);
|
|
2353
2461
|
if (r.key === "F2") {
|
|
2354
2462
|
r.preventDefault();
|
|
2355
|
-
const
|
|
2356
|
-
|
|
2463
|
+
const d = i.getAttribute("data-layer-row"), p = i.getAttribute("data-feat-row"), u = d ? D(i, "data-layer-name-trigger", d) : p ? D(i, "data-feat-name-trigger", p) : null;
|
|
2464
|
+
u && u.dispatchEvent(new MouseEvent("dblclick", { bubbles: !0 }));
|
|
2357
2465
|
return;
|
|
2358
2466
|
}
|
|
2359
2467
|
if ((r.ctrlKey || r.metaKey) && (r.key === "a" || r.key === "A")) {
|
|
2360
2468
|
r.preventDefault();
|
|
2361
|
-
const
|
|
2469
|
+
const d = va(
|
|
2362
2470
|
e.camadas,
|
|
2363
2471
|
e.feicoes,
|
|
2364
2472
|
e.expandedLayers,
|
|
2365
2473
|
e.searchQuery,
|
|
2366
2474
|
void 0,
|
|
2367
|
-
e.expandedFeatureLimits
|
|
2475
|
+
e.expandedFeatureLimits,
|
|
2476
|
+
e.ordemFilhosPorPai
|
|
2368
2477
|
);
|
|
2369
|
-
|
|
2478
|
+
d.length > 0 && e.selecionarFeicoes(d, !0);
|
|
2370
2479
|
return;
|
|
2371
2480
|
}
|
|
2372
2481
|
if (r.key === "Delete") {
|
|
2373
|
-
const
|
|
2374
|
-
if (
|
|
2375
|
-
r.preventDefault(),
|
|
2482
|
+
const d = a.getElementById("btn-footer-del");
|
|
2483
|
+
if (d && !d.hasAttribute("disabled") && e.selectedFeatureIds.size > 0) {
|
|
2484
|
+
r.preventDefault(), d.click();
|
|
2376
2485
|
return;
|
|
2377
2486
|
}
|
|
2378
2487
|
}
|
|
2379
2488
|
switch (r.key) {
|
|
2380
2489
|
case "ArrowDown":
|
|
2381
|
-
r.preventDefault(),
|
|
2490
|
+
r.preventDefault(), K(t, o[Math.min(o.length - 1, n + 1)]);
|
|
2382
2491
|
break;
|
|
2383
2492
|
case "ArrowUp":
|
|
2384
|
-
r.preventDefault(),
|
|
2493
|
+
r.preventDefault(), K(t, o[Math.max(0, n - 1)]);
|
|
2385
2494
|
break;
|
|
2386
2495
|
case "Home":
|
|
2387
|
-
r.preventDefault(),
|
|
2496
|
+
r.preventDefault(), K(t, o[0]);
|
|
2388
2497
|
break;
|
|
2389
2498
|
case "End":
|
|
2390
|
-
r.preventDefault(),
|
|
2499
|
+
r.preventDefault(), K(t, o[o.length - 1]);
|
|
2391
2500
|
break;
|
|
2392
2501
|
case "ArrowRight": {
|
|
2393
|
-
const
|
|
2394
|
-
if (!
|
|
2502
|
+
const d = i.getAttribute("data-layer-row");
|
|
2503
|
+
if (!d) return;
|
|
2395
2504
|
const p = i.closest(".ui-layer-group");
|
|
2396
|
-
(p == null ? void 0 : p.getAttribute("aria-expanded")) === "true" ? n + 1 < o.length && (p != null && p.contains(o[n + 1])) && (r.preventDefault(),
|
|
2505
|
+
(p == null ? void 0 : p.getAttribute("aria-expanded")) === "true" ? n + 1 < o.length && (p != null && p.contains(o[n + 1])) && (r.preventDefault(), K(t, o[n + 1])) : (r.preventDefault(), (s = D(a, "data-layer-expand", d)) == null || s.click());
|
|
2397
2506
|
break;
|
|
2398
2507
|
}
|
|
2399
2508
|
case "ArrowLeft": {
|
|
2400
|
-
const
|
|
2401
|
-
if (
|
|
2509
|
+
const d = i.getAttribute("data-layer-row");
|
|
2510
|
+
if (d) {
|
|
2402
2511
|
const f = i.closest(".ui-layer-group");
|
|
2403
2512
|
if ((f == null ? void 0 : f.getAttribute("aria-expanded")) === "true")
|
|
2404
|
-
r.preventDefault(), (
|
|
2513
|
+
r.preventDefault(), (c = D(a, "data-layer-expand", d)) == null || c.click();
|
|
2405
2514
|
else {
|
|
2406
|
-
const
|
|
2407
|
-
|
|
2515
|
+
const g = (l = f == null ? void 0 : f.parentElement) == null ? void 0 : l.closest(".ui-layer-group"), b = g == null ? void 0 : g.getAttribute("data-layer-id"), h = b ? D(t, "data-layer-row", b) : null;
|
|
2516
|
+
h && (r.preventDefault(), K(t, h));
|
|
2408
2517
|
}
|
|
2409
2518
|
return;
|
|
2410
2519
|
}
|
|
2411
|
-
const p = i.getAttribute("data-feat-layer"),
|
|
2412
|
-
|
|
2520
|
+
const p = i.getAttribute("data-feat-layer"), u = p ? D(t, "data-layer-row", p) : null;
|
|
2521
|
+
u && (r.preventDefault(), K(t, u));
|
|
2413
2522
|
break;
|
|
2414
2523
|
}
|
|
2415
2524
|
case "Enter":
|
|
2416
2525
|
case " ":
|
|
2417
|
-
r.preventDefault(),
|
|
2526
|
+
r.preventDefault(), rr(i, r);
|
|
2418
2527
|
break;
|
|
2419
2528
|
}
|
|
2420
2529
|
}
|
|
2421
|
-
function
|
|
2530
|
+
function nr(e, t, a, r, i) {
|
|
2422
2531
|
i.add(t, "keydown", (o) => {
|
|
2423
|
-
o.key === "Escape" &&
|
|
2424
|
-
}), i.add(r, "keydown", (o) =>
|
|
2532
|
+
o.key === "Escape" && ir(e, a, o);
|
|
2533
|
+
}), i.add(r, "keydown", (o) => or(e, r, a, o)), i.add(r, "focusin", (o) => {
|
|
2425
2534
|
const n = o.composedPath()[0];
|
|
2426
|
-
n instanceof HTMLElement && n.matches(
|
|
2535
|
+
n instanceof HTMLElement && n.matches(re) && (r.querySelectorAll(re).forEach((s) => s.setAttribute("tabindex", "-1")), n.setAttribute("tabindex", "0"));
|
|
2427
2536
|
});
|
|
2428
2537
|
}
|
|
2429
|
-
function
|
|
2430
|
-
const o =
|
|
2538
|
+
function sr(e, t, a, r, i) {
|
|
2539
|
+
const o = va(
|
|
2431
2540
|
e.camadas,
|
|
2432
2541
|
e.feicoes,
|
|
2433
2542
|
e.expandedLayers,
|
|
2434
2543
|
e.searchQuery,
|
|
2435
2544
|
void 0,
|
|
2436
|
-
e.expandedFeatureLimits
|
|
2437
|
-
|
|
2545
|
+
e.expandedFeatureLimits,
|
|
2546
|
+
e.ordemFilhosPorPai
|
|
2547
|
+
), n = !r && !o.includes(t) && e.feicoes.some((c) => c.id === t), s = ft(
|
|
2438
2548
|
n ? [...o, t] : o,
|
|
2439
2549
|
e.selectedFeatureIds,
|
|
2440
2550
|
e.lastClickedFeatureId,
|
|
@@ -2444,33 +2554,33 @@ function ar(e, t, a, r, i) {
|
|
|
2444
2554
|
);
|
|
2445
2555
|
s && (e.selectedFeatureIds = s.selecionados, e.lastClickedFeatureId = s.ultimoClicadoId, e.sincronizarSelecaoDOM(), i && e.notificarMudancaSelecao());
|
|
2446
2556
|
}
|
|
2447
|
-
function
|
|
2557
|
+
function lr(e, t, a) {
|
|
2448
2558
|
const r = t || [];
|
|
2449
2559
|
r.length === e.selectedFeatureIds.size && r.every((n) => e.selectedFeatureIds.has(n)) || (e.selectedFeatureIds.clear(), r.forEach((n) => e.selectedFeatureIds.add(n)), e.lastClickedFeatureId = r.length > 0 ? r[r.length - 1] : null, e.sincronizarSelecaoDOM(), a && e.notificarMudancaSelecao());
|
|
2450
2560
|
}
|
|
2451
|
-
function
|
|
2561
|
+
function cr(e, t) {
|
|
2452
2562
|
e.selectedFeatureIds.size !== 0 && (e.selectedFeatureIds.clear(), e.lastClickedFeatureId = null, e.sincronizarSelecaoDOM(), t && e.notificarMudancaSelecao());
|
|
2453
2563
|
}
|
|
2454
|
-
function
|
|
2564
|
+
function dr(e) {
|
|
2455
2565
|
const t = e.feicoes.filter((a) => e.selectedFeatureIds.has(a.id));
|
|
2456
2566
|
e.dispararEvento("ui-feicoes-selecionadas", {
|
|
2457
2567
|
feicoesIds: Array.from(e.selectedFeatureIds),
|
|
2458
2568
|
feicoes: t
|
|
2459
2569
|
}), t.length === 1 ? e.dispararEvento("ui-feicao-selecionada", { feicaoId: t[0].id, feicao: t[0] }) : t.length === 0 && e.dispararEvento("ui-feicao-selecionada", { feicaoId: null, feicao: null });
|
|
2460
2570
|
}
|
|
2461
|
-
class
|
|
2571
|
+
class ur {
|
|
2462
2572
|
constructor(t) {
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2573
|
+
E(this, "origens", /* @__PURE__ */ new Map());
|
|
2574
|
+
E(this, "removidas", /* @__PURE__ */ new Set());
|
|
2575
|
+
E(this, "salvarComDebounce", ta(() => this.salvar(), 200));
|
|
2466
2576
|
this.instantaneo = t;
|
|
2467
2577
|
}
|
|
2468
2578
|
chaveAtual() {
|
|
2469
2579
|
const t = this.instantaneo();
|
|
2470
|
-
return
|
|
2580
|
+
return yt(t.storageKey, t.id);
|
|
2471
2581
|
}
|
|
2472
2582
|
carregar() {
|
|
2473
|
-
return
|
|
2583
|
+
return Me(this.chaveAtual());
|
|
2474
2584
|
}
|
|
2475
2585
|
/** Versão com debounce, para interações contínuas (seletor de cor, slider de opacidade). */
|
|
2476
2586
|
agendar() {
|
|
@@ -2479,8 +2589,8 @@ class or {
|
|
|
2479
2589
|
salvar() {
|
|
2480
2590
|
const t = this.instantaneo();
|
|
2481
2591
|
if (!t.persistir || !t.conectado) return;
|
|
2482
|
-
const a = this.chaveAtual(), r =
|
|
2483
|
-
estadoAnterior:
|
|
2592
|
+
const a = this.chaveAtual(), r = It({
|
|
2593
|
+
estadoAnterior: Me(a),
|
|
2484
2594
|
origensCamadas: this.origens,
|
|
2485
2595
|
camadas: t.camadas,
|
|
2486
2596
|
expandedLayers: t.expandedLayers,
|
|
@@ -2492,29 +2602,29 @@ class or {
|
|
|
2492
2602
|
camadasRemovidas: this.removidas,
|
|
2493
2603
|
ordemFilhosPorPai: t.ordemFilhosPorPai
|
|
2494
2604
|
});
|
|
2495
|
-
this.removidas.clear(),
|
|
2605
|
+
this.removidas.clear(), wt(a, r);
|
|
2496
2606
|
}
|
|
2497
2607
|
limpar() {
|
|
2498
|
-
|
|
2608
|
+
At(this.chaveAtual());
|
|
2499
2609
|
}
|
|
2500
2610
|
// --- Origens (como a camada chegou do consumidor) e remoções ---
|
|
2501
2611
|
limparOrigens() {
|
|
2502
2612
|
this.origens.clear();
|
|
2503
2613
|
}
|
|
2504
2614
|
registrarOrigem(t) {
|
|
2505
|
-
this.origens.set(t.id,
|
|
2615
|
+
this.origens.set(t.id, ba(t));
|
|
2506
2616
|
}
|
|
2507
2617
|
esquecerCamada(t) {
|
|
2508
2618
|
this.origens.delete(t), this.removidas.add(t);
|
|
2509
2619
|
}
|
|
2510
2620
|
/** Aplica por cima de `camadas` o que foi lembrado (expansão, visibilidade, travas, opacidade, cor, ordem). */
|
|
2511
2621
|
reidratar(t, a, r, i) {
|
|
2512
|
-
if (
|
|
2622
|
+
if (Et(t, a, r, this.origens), i && (i.clear(), a != null && a.ordemFilhosPorPai))
|
|
2513
2623
|
for (const [o, n] of Object.entries(a.ordemFilhosPorPai))
|
|
2514
2624
|
Array.isArray(n) && n.length > 0 && i.set(o, [...n]);
|
|
2515
2625
|
}
|
|
2516
2626
|
}
|
|
2517
|
-
function
|
|
2627
|
+
function Te(e, t = null, a = /* @__PURE__ */ new Set()) {
|
|
2518
2628
|
const r = [];
|
|
2519
2629
|
if (!Array.isArray(e)) return r;
|
|
2520
2630
|
for (const i of e) {
|
|
@@ -2523,15 +2633,15 @@ function qe(e, t = null, a = /* @__PURE__ */ new Set()) {
|
|
|
2523
2633
|
if (a.has(o)) continue;
|
|
2524
2634
|
a.add(o);
|
|
2525
2635
|
const n = { ...i, id: o };
|
|
2526
|
-
delete n.children, t && n.parentId === void 0 && (n.parentId = t), r.push(n), Array.isArray(i.children) && i.children.length > 0 && r.push(...
|
|
2636
|
+
delete n.children, t && n.parentId === void 0 && (n.parentId = t), r.push(n), Array.isArray(i.children) && i.children.length > 0 && r.push(...Te(i.children, o, a));
|
|
2527
2637
|
}
|
|
2528
2638
|
return r;
|
|
2529
2639
|
}
|
|
2530
|
-
function
|
|
2640
|
+
function La(e) {
|
|
2531
2641
|
const t = e.lastClickedFeatureId;
|
|
2532
2642
|
t && !e.feicoes.some((a) => a.id === t) && (e.lastClickedFeatureId = null);
|
|
2533
2643
|
}
|
|
2534
|
-
function
|
|
2644
|
+
function Sa(e) {
|
|
2535
2645
|
if (!Array.isArray(e)) return [];
|
|
2536
2646
|
const t = /* @__PURE__ */ new Set(), a = [];
|
|
2537
2647
|
for (const r of e) {
|
|
@@ -2541,8 +2651,8 @@ function Aa(e) {
|
|
|
2541
2651
|
}
|
|
2542
2652
|
return a;
|
|
2543
2653
|
}
|
|
2544
|
-
function
|
|
2545
|
-
if (e.camadas = Array.isArray(t) ?
|
|
2654
|
+
function pr(e, t, a) {
|
|
2655
|
+
if (e.camadas = Array.isArray(t) ? Te(t) : [], e.lembranca.limparOrigens(), e.persistir) {
|
|
2546
2656
|
const o = e.lembranca.carregar();
|
|
2547
2657
|
e.lembranca.reidratar(e.camadas, o, e.expandedLayers, e.ordemFilhosPorPai), o != null && o.camadaAtivaId && e.camadas.some((n) => n.id === o.camadaAtivaId) && (e.camadaAtivaId = o.camadaAtivaId);
|
|
2548
2658
|
} else
|
|
@@ -2550,12 +2660,12 @@ function nr(e, t, a) {
|
|
|
2550
2660
|
e.lembranca.registrarOrigem(o), e.expandedLayers.has(o.id) || e.expandedLayers.add(o.id);
|
|
2551
2661
|
});
|
|
2552
2662
|
if (Array.isArray(a)) {
|
|
2553
|
-
e.feicoes =
|
|
2663
|
+
e.feicoes = Sa(a);
|
|
2554
2664
|
const o = new Set(e.camadas.map((s) => s.id)), n = e.feicoes.filter((s) => s.layerId && !o.has(s.layerId));
|
|
2555
2665
|
n.length > 0 && console.warn(
|
|
2556
2666
|
`[UI-Camadas] ${n.length} feição(ões) possuem 'layerId' não cadastrado nas camadas:`,
|
|
2557
2667
|
n.map((s) => ({ id: s.id, nome: s.name, layerId: s.layerId }))
|
|
2558
|
-
),
|
|
2668
|
+
), De(e.selectedFeatureIds, e.feicoes), La(e);
|
|
2559
2669
|
}
|
|
2560
2670
|
const r = new Set(e.camadas.map((o) => o.id));
|
|
2561
2671
|
if (e.activeSettingsLayerId && !r.has(e.activeSettingsLayerId) && (e.activeSettingsLayerId = null), e.editingLayerId && !r.has(e.editingLayerId) && (e.editingLayerId = null), e.expandedFeatureLimits)
|
|
@@ -2564,32 +2674,32 @@ function nr(e, t, a) {
|
|
|
2564
2674
|
const i = e.getAttribute("camada-ativa");
|
|
2565
2675
|
e.camadas.length > 0 && (!i || !r.has(i)) && (e.camadaAtivaId = e.camadas[0].id), e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
2566
2676
|
}
|
|
2567
|
-
function
|
|
2677
|
+
function fr(e, t) {
|
|
2568
2678
|
const a = new Map(e.map((i) => [i.id, i])), r = /* @__PURE__ */ new Set();
|
|
2569
2679
|
for (const i of t) {
|
|
2570
2680
|
const o = a.get(i.id);
|
|
2571
|
-
(!o || !
|
|
2681
|
+
(!o || !ot(o, i)) && r.add(i.id);
|
|
2572
2682
|
}
|
|
2573
2683
|
return r;
|
|
2574
2684
|
}
|
|
2575
|
-
function
|
|
2685
|
+
function mr(e, t) {
|
|
2576
2686
|
const a = e.feicoes;
|
|
2577
|
-
e.feicoes =
|
|
2687
|
+
e.feicoes = Sa(t);
|
|
2578
2688
|
const r = e.selectedFeatureIds.size;
|
|
2579
|
-
|
|
2689
|
+
De(e.selectedFeatureIds, e.feicoes), La(e), e.editingFeatureId && !e.feicoes.some((i) => i.id === e.editingFeatureId) && (e.editingFeatureId = null), e.solicitarAtualizacaoFeicoes({
|
|
2580
2690
|
camadas: "todas",
|
|
2581
|
-
idsAlterados:
|
|
2691
|
+
idsAlterados: fr(a, e.feicoes),
|
|
2582
2692
|
selecaoAfetada: e.selectedFeatureIds.size !== r
|
|
2583
2693
|
});
|
|
2584
2694
|
}
|
|
2585
|
-
function
|
|
2695
|
+
function gr(e, t) {
|
|
2586
2696
|
if (!t || !t.id) return;
|
|
2587
2697
|
if (e.camadas.some((r) => r.id === t.id)) {
|
|
2588
2698
|
console.warn(`[UI-Camadas] adicionarCamada ignorado: já existe uma camada com id '${t.id}'.`);
|
|
2589
2699
|
return;
|
|
2590
2700
|
}
|
|
2591
2701
|
const a = new Set(e.camadas.map((r) => r.id));
|
|
2592
|
-
for (const r of
|
|
2702
|
+
for (const r of Te([t])) {
|
|
2593
2703
|
if (a.has(r.id)) {
|
|
2594
2704
|
console.warn(`[UI-Camadas] adicionarCamada: subcamada '${r.id}' ignorada, o id já existe.`);
|
|
2595
2705
|
continue;
|
|
@@ -2598,14 +2708,14 @@ function dr(e, t) {
|
|
|
2598
2708
|
}
|
|
2599
2709
|
e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
2600
2710
|
}
|
|
2601
|
-
function
|
|
2711
|
+
function hr(e, t) {
|
|
2602
2712
|
var r, i;
|
|
2603
2713
|
const a = e.camadas.find((o) => o.id === t);
|
|
2604
2714
|
e.camadas.forEach((o) => {
|
|
2605
2715
|
o.parentId === t && (o.parentId = null);
|
|
2606
|
-
}), e.camadas = e.camadas.filter((o) => o.id !== t), e.feicoes = e.feicoes.filter((o) => o.layerId !== t), e.ordemFilhosPorPai && (e.ordemFilhosPorPai.delete(t), a != null && a.parentId &&
|
|
2716
|
+
}), e.camadas = e.camadas.filter((o) => o.id !== t), e.feicoes = e.feicoes.filter((o) => o.layerId !== t), e.ordemFilhosPorPai && (e.ordemFilhosPorPai.delete(t), a != null && a.parentId && G(e.ordemFilhosPorPai, a.parentId, H(t))), e.lembranca.esquecerCamada(t), e.expandedLayers.delete(t), (r = e.expandedFeatureLimits) == null || r.delete(t), e.activeSettingsLayerId === t && (e.activeSettingsLayerId = null), e.editingLayerId === t && (e.editingLayerId = null), e.editingFeatureId && !e.feicoes.some((o) => o.id === e.editingFeatureId) && (e.editingFeatureId = null), De(e.selectedFeatureIds, e.feicoes), e.selectedFeatureIds.size === 0 && (e.lastClickedFeatureId = null), e.camadaAtivaId === t && (e.camadaAtivaId = ((i = e.camadas[0]) == null ? void 0 : i.id) ?? null), e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
2607
2717
|
}
|
|
2608
|
-
function
|
|
2718
|
+
function vr(e, t) {
|
|
2609
2719
|
if (!(!t || !t.id)) {
|
|
2610
2720
|
if (e.feicoes.some((a) => a.id === t.id)) {
|
|
2611
2721
|
console.warn(`[UI-Camadas] adicionarFeicao ignorado: já existe uma feição com id '${t.id}'.`);
|
|
@@ -2618,7 +2728,7 @@ function ur(e, t) {
|
|
|
2618
2728
|
});
|
|
2619
2729
|
}
|
|
2620
2730
|
}
|
|
2621
|
-
function
|
|
2731
|
+
function br(e, t) {
|
|
2622
2732
|
if (!t || typeof t != "object" || !t.id) return;
|
|
2623
2733
|
const a = e.feicoes.findIndex((r) => r.id === t.id);
|
|
2624
2734
|
if (a !== -1) {
|
|
@@ -2630,9 +2740,9 @@ function pr(e, t) {
|
|
|
2630
2740
|
});
|
|
2631
2741
|
}
|
|
2632
2742
|
}
|
|
2633
|
-
function
|
|
2743
|
+
function yr(e, t) {
|
|
2634
2744
|
const a = e.feicoes.find((i) => i.id === t);
|
|
2635
|
-
e.feicoes = e.feicoes.filter((i) => i.id !== t), a != null && a.layerId && e.ordemFilhosPorPai &&
|
|
2745
|
+
e.feicoes = e.feicoes.filter((i) => i.id !== t), a != null && a.layerId && e.ordemFilhosPorPai && G(e.ordemFilhosPorPai, a.layerId, O(t));
|
|
2636
2746
|
const r = e.selectedFeatureIds.delete(t);
|
|
2637
2747
|
e.lastClickedFeatureId === t && (e.lastClickedFeatureId = null), e.editingFeatureId === t && (e.editingFeatureId = null), e.solicitarAtualizacaoFeicoes({
|
|
2638
2748
|
camadas: new Set(a ? [a.layerId || ""] : []),
|
|
@@ -2640,16 +2750,16 @@ function fr(e, t) {
|
|
|
2640
2750
|
selecaoAfetada: r
|
|
2641
2751
|
});
|
|
2642
2752
|
}
|
|
2643
|
-
function
|
|
2753
|
+
function xr(e) {
|
|
2644
2754
|
function r() {
|
|
2645
2755
|
return e.getMinAltura ? e.getMinAltura() : 140;
|
|
2646
2756
|
}
|
|
2647
2757
|
function i() {
|
|
2648
2758
|
return e.getMaxAltura ? e.getMaxAltura() : 1600;
|
|
2649
2759
|
}
|
|
2650
|
-
function o(l,
|
|
2760
|
+
function o(l, d = !1) {
|
|
2651
2761
|
if (l == null || l === "") {
|
|
2652
|
-
e.hostElement.style.removeProperty("height"), e.hostElement.style.removeProperty("--ui-camadas-altura"),
|
|
2762
|
+
e.hostElement.style.removeProperty("height"), e.hostElement.style.removeProperty("--ui-camadas-altura"), d && e.hostElement.dispatchEvent(
|
|
2653
2763
|
new CustomEvent("ui-redimensionar-altura", {
|
|
2654
2764
|
bubbles: !0,
|
|
2655
2765
|
composed: !0,
|
|
@@ -2660,88 +2770,87 @@ function mr(e) {
|
|
|
2660
2770
|
}
|
|
2661
2771
|
const p = typeof l == "number" ? l : parseFloat(String(l));
|
|
2662
2772
|
if (isNaN(p)) return;
|
|
2663
|
-
const
|
|
2664
|
-
e.hostElement.style.height = `${
|
|
2773
|
+
const u = Math.max(r(), Math.min(i(), Math.round(p)));
|
|
2774
|
+
e.hostElement.style.height = `${u}px`, e.hostElement.style.setProperty("--ui-camadas-altura", `${u}px`), d && e.hostElement.dispatchEvent(
|
|
2665
2775
|
new CustomEvent("ui-redimensionar-altura", {
|
|
2666
2776
|
bubbles: !0,
|
|
2667
2777
|
composed: !0,
|
|
2668
|
-
detail: { altura:
|
|
2778
|
+
detail: { altura: u }
|
|
2669
2779
|
})
|
|
2670
2780
|
);
|
|
2671
2781
|
}
|
|
2672
2782
|
let n = null;
|
|
2673
2783
|
function s() {
|
|
2674
2784
|
if (!e.resizerElement) return;
|
|
2675
|
-
let l = !1,
|
|
2676
|
-
const
|
|
2785
|
+
let l = !1, d = 0, p = 0;
|
|
2786
|
+
const u = (m) => {
|
|
2677
2787
|
if (m.button !== 0) return;
|
|
2678
|
-
m.preventDefault(), m.stopPropagation(), l = !0,
|
|
2788
|
+
m.preventDefault(), m.stopPropagation(), l = !0, d = m.clientY, p = e.hostElement.getBoundingClientRect().height, e.resizerElement.classList.add("ui-camadas-resizer--ativo"), e.hostElement.classList.add("ui-camadas--redimensionando");
|
|
2679
2789
|
try {
|
|
2680
2790
|
e.resizerElement.setPointerCapture(m.pointerId);
|
|
2681
2791
|
} catch {
|
|
2682
2792
|
}
|
|
2683
|
-
const
|
|
2793
|
+
const g = (v) => {
|
|
2684
2794
|
if (!l) return;
|
|
2685
|
-
|
|
2686
|
-
const
|
|
2687
|
-
e.hostElement.style.height = `${
|
|
2795
|
+
v.preventDefault();
|
|
2796
|
+
const A = v.clientY - d, I = Math.max(r(), Math.min(i(), Math.round(p + A)));
|
|
2797
|
+
e.hostElement.style.height = `${I}px`, e.hostElement.style.setProperty("--ui-camadas-altura", `${I}px`), e.onRedimensionando && e.onRedimensionando(I), e.hostElement.dispatchEvent(
|
|
2688
2798
|
new CustomEvent("ui-redimensionando-altura", {
|
|
2689
2799
|
bubbles: !0,
|
|
2690
2800
|
composed: !0,
|
|
2691
|
-
detail: { altura:
|
|
2801
|
+
detail: { altura: I }
|
|
2692
2802
|
})
|
|
2693
2803
|
);
|
|
2694
|
-
},
|
|
2695
|
-
var
|
|
2696
|
-
l = !1, n = null, window.removeEventListener("pointermove",
|
|
2697
|
-
},
|
|
2804
|
+
}, b = () => {
|
|
2805
|
+
var v;
|
|
2806
|
+
l = !1, n = null, window.removeEventListener("pointermove", g), window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", h), (v = e.resizerElement) == null || v.classList.remove("ui-camadas-resizer--ativo"), e.hostElement.classList.remove("ui-camadas--redimensionando");
|
|
2807
|
+
}, h = (v) => {
|
|
2698
2808
|
if (!l) return;
|
|
2699
|
-
l = !1, e.resizerElement.classList.remove("ui-camadas-resizer--ativo"), e.hostElement.classList.remove("ui-camadas--redimensionando");
|
|
2700
2809
|
try {
|
|
2701
|
-
e.resizerElement.hasPointerCapture(
|
|
2810
|
+
e.resizerElement.hasPointerCapture(v.pointerId) && e.resizerElement.releasePointerCapture(v.pointerId);
|
|
2702
2811
|
} catch {
|
|
2703
2812
|
}
|
|
2704
|
-
|
|
2705
|
-
const
|
|
2706
|
-
e.onAlturaAlterada && e.onAlturaAlterada(
|
|
2813
|
+
b();
|
|
2814
|
+
const A = e.hostElement.getBoundingClientRect().height, I = Math.round(A);
|
|
2815
|
+
e.onAlturaAlterada && e.onAlturaAlterada(I), e.hostElement.dispatchEvent(
|
|
2707
2816
|
new CustomEvent("ui-redimensionar-altura", {
|
|
2708
2817
|
bubbles: !0,
|
|
2709
2818
|
composed: !0,
|
|
2710
|
-
detail: { altura:
|
|
2819
|
+
detail: { altura: I }
|
|
2711
2820
|
})
|
|
2712
2821
|
);
|
|
2713
2822
|
};
|
|
2714
|
-
n =
|
|
2823
|
+
n = b, window.addEventListener("pointermove", g), window.addEventListener("pointerup", h), window.addEventListener("pointercancel", h);
|
|
2715
2824
|
}, f = (m) => {
|
|
2716
2825
|
m.preventDefault(), m.stopPropagation(), o(null, !0), e.onAlturaAlterada && e.onAlturaAlterada(null);
|
|
2717
2826
|
};
|
|
2718
|
-
e.listeners.add(e.resizerElement, "pointerdown",
|
|
2827
|
+
e.listeners.add(e.resizerElement, "pointerdown", u), e.listeners.add(e.resizerElement, "dblclick", f);
|
|
2719
2828
|
}
|
|
2720
|
-
function
|
|
2829
|
+
function c() {
|
|
2721
2830
|
n == null || n(), e.listeners.cleanup();
|
|
2722
2831
|
}
|
|
2723
2832
|
return {
|
|
2724
2833
|
init: s,
|
|
2725
2834
|
definirAltura: o,
|
|
2726
|
-
destruir:
|
|
2835
|
+
destruir: c
|
|
2727
2836
|
};
|
|
2728
2837
|
}
|
|
2729
|
-
const
|
|
2838
|
+
const W = class W extends Ua {
|
|
2730
2839
|
constructor() {
|
|
2731
2840
|
super();
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2841
|
+
E(this, "shadow");
|
|
2842
|
+
E(this, "listeners", new Ne());
|
|
2843
|
+
E(this, "dragDropManager");
|
|
2844
|
+
E(this, "resizerController");
|
|
2845
|
+
E(this, "bordaResizeObserver", null);
|
|
2846
|
+
E(this, "alturaCustomizada", null);
|
|
2847
|
+
E(this, "conectado", !1);
|
|
2848
|
+
E(this, "profundidadeLote", 0);
|
|
2849
|
+
E(this, "renderPendente", !1);
|
|
2741
2850
|
/** Mudança de feições à espera do `render()` (consumida nele): permite atualizar só as linhas afetadas. */
|
|
2742
|
-
|
|
2851
|
+
E(this, "mudancaFeicoes", null);
|
|
2743
2852
|
/** @internal */
|
|
2744
|
-
|
|
2853
|
+
E(this, "lembranca", new ur(() => ({
|
|
2745
2854
|
persistir: this.persistir,
|
|
2746
2855
|
conectado: this.conectado,
|
|
2747
2856
|
storageKey: this.storageKey,
|
|
@@ -2756,37 +2865,37 @@ const X = class X extends Ra {
|
|
|
2756
2865
|
ordemFilhosPorPai: this.ordemFilhosPorPai
|
|
2757
2866
|
})));
|
|
2758
2867
|
// Estado interno
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2868
|
+
E(this, "camadas", []);
|
|
2869
|
+
E(this, "feicoes", []);
|
|
2870
|
+
E(this, "mapasBase", [...ra]);
|
|
2871
|
+
E(this, "expandedLayers", /* @__PURE__ */ new Set());
|
|
2872
|
+
E(this, "expandedFeatureLimits", /* @__PURE__ */ new Map());
|
|
2873
|
+
E(this, "ordemFilhosPorPai", /* @__PURE__ */ new Map());
|
|
2874
|
+
E(this, "selectedFeatureIds", /* @__PURE__ */ new Set());
|
|
2875
|
+
E(this, "lastClickedFeatureId", null);
|
|
2876
|
+
E(this, "activeSettingsLayerId", null);
|
|
2877
|
+
E(this, "editingLayerId", null);
|
|
2878
|
+
E(this, "editingFeatureId", null);
|
|
2879
|
+
E(this, "searchQuery", "");
|
|
2880
|
+
E(this, "corpoElement");
|
|
2881
|
+
E(this, "btnExpandirFlutuante");
|
|
2773
2882
|
this.shadow = this.attachShadow({ mode: "open" }), this.shadow.innerHTML = `
|
|
2774
|
-
<style>${
|
|
2883
|
+
<style>${kt}</style>
|
|
2775
2884
|
<div class="ui-camadas-container" id="panel-container" part="base" role="region" aria-label="Painel de Camadas">
|
|
2776
2885
|
<div class="ui-camadas-corpo" id="painel-corpo" part="corpo"></div>
|
|
2777
2886
|
<div class="ui-camadas-resizer-altura" id="resizer-altura" part="resizer" title="Arraste para redimensionar a altura (duplo-clique para resetar)" aria-label="Redimensionar altura">
|
|
2778
2887
|
<span class="ui-camadas-resizer-grip"></span>
|
|
2779
2888
|
</div>
|
|
2780
2889
|
</div>
|
|
2781
|
-
<button class="ui-camadas-toggle-flutuante" id="btn-expandir-flutuante" part="botao-expandir" title="Expandir Painel de Camadas" aria-label="Expandir Painel de Camadas">
|
|
2782
|
-
${
|
|
2890
|
+
<button type="button" class="ui-camadas-toggle-flutuante" id="btn-expandir-flutuante" part="botao-expandir" title="Expandir Painel de Camadas" aria-label="Expandir Painel de Camadas">
|
|
2891
|
+
${y.camadas}
|
|
2783
2892
|
</button>
|
|
2784
|
-
`, this.corpoElement = this.shadow.getElementById("painel-corpo"), this.btnExpandirFlutuante = this.shadow.getElementById("btn-expandir-flutuante"), this.dragDropManager = new
|
|
2893
|
+
`, this.corpoElement = this.shadow.getElementById("painel-corpo"), this.btnExpandirFlutuante = this.shadow.getElementById("btn-expandir-flutuante"), this.dragDropManager = new vt(this, this.shadow);
|
|
2785
2894
|
const a = this.shadow.getElementById("resizer-altura");
|
|
2786
|
-
this.resizerController =
|
|
2895
|
+
this.resizerController = xr({
|
|
2787
2896
|
hostElement: this,
|
|
2788
2897
|
resizerElement: a,
|
|
2789
|
-
listeners:
|
|
2898
|
+
listeners: new Ne(),
|
|
2790
2899
|
getMinAltura: () => {
|
|
2791
2900
|
const r = this.getAttribute("min-altura");
|
|
2792
2901
|
return r && parseFloat(r) || 140;
|
|
@@ -2805,7 +2914,6 @@ const X = class X extends Ra {
|
|
|
2805
2914
|
"titulo",
|
|
2806
2915
|
"mapa-base-ativo",
|
|
2807
2916
|
"camada-ativa",
|
|
2808
|
-
"aba-ativa",
|
|
2809
2917
|
"colapsavel",
|
|
2810
2918
|
"colapsado",
|
|
2811
2919
|
"flutuante",
|
|
@@ -2822,31 +2930,31 @@ const X = class X extends Ra {
|
|
|
2822
2930
|
"min-altura",
|
|
2823
2931
|
"max-altura",
|
|
2824
2932
|
"borda-canvas",
|
|
2825
|
-
...
|
|
2933
|
+
...Ya
|
|
2826
2934
|
];
|
|
2827
2935
|
}
|
|
2828
2936
|
connectedCallback() {
|
|
2829
2937
|
var a;
|
|
2830
2938
|
if (this.persistir) {
|
|
2831
|
-
const r =
|
|
2939
|
+
const r = Me(this.obterChaveStorageAtual());
|
|
2832
2940
|
r && (r.painelColapsado === !0 && !this.hasAttribute("colapsado") && (this.colapsado = !0), r.camadaAtivaId && !this.getAttribute("camada-ativa") && (this.camadaAtivaId = r.camadaAtivaId), r.mapaBaseAtivo && !this.getAttribute("mapa-base-ativo") && (this.mapaBaseAtivo = r.mapaBaseAtivo), r.densidade && !this.getAttribute("densidade") && (this.densidade = r.densidade), typeof r.altura == "number" && !this.getAttribute("altura") && !this.style.height && (this.resizerController.definirAltura(r.altura, !1), this.alturaCustomizada = r.altura));
|
|
2833
2941
|
}
|
|
2834
|
-
this.hasAttribute("altura") && this.resizerController.definirAltura(this.getAttribute("altura"), !1), this.persistir && !this.storageKey && !this.id && (
|
|
2942
|
+
this.hasAttribute("altura") && this.resizerController.definirAltura(this.getAttribute("altura"), !1), this.persistir && !this.storageKey && !this.id && (W.instanciasChavePadrao.size > 0 && console.warn(
|
|
2835
2943
|
"[UI-Camadas] Mais de um painel sem 'id' nem 'storage-key' divide a mesma chave de persistência e um sobrescreve o estado do outro. Defina 'storage-key' (ou 'id') em cada um."
|
|
2836
|
-
),
|
|
2944
|
+
), W.instanciasChavePadrao.add(this)), this.resizerController.init(), He(this, this.shadow.getElementById("panel-container")), this.atualizarBordaCanvas(), typeof window < "u" && this.listeners.add(window, "resize", () => this.atualizarBordaCanvas()), typeof ResizeObserver < "u" && ((a = this.bordaResizeObserver) == null || a.disconnect(), this.bordaResizeObserver = new ResizeObserver(() => this.atualizarBordaCanvas()), this.bordaResizeObserver.observe(this)), this.render(), this.conectarEventosGerais(), nr(this, this, this.shadow, this.corpoElement, this.listeners), this.conectado = !0, this.camadas.length > 0 && this.salvarLembrancaEstado();
|
|
2837
2945
|
}
|
|
2838
2946
|
disconnectedCallback() {
|
|
2839
2947
|
var a, r, i;
|
|
2840
|
-
this.conectado = !1,
|
|
2948
|
+
this.conectado = !1, W.instanciasChavePadrao.delete(this), (a = this.bordaResizeObserver) == null || a.disconnect(), this.bordaResizeObserver = null, (r = this.resizerController) == null || r.destruir(), (i = this.dragDropManager) == null || i.destruir(), qt(this), this.listeners.cleanup();
|
|
2841
2949
|
}
|
|
2842
2950
|
attributeChangedCallback(a, r, i) {
|
|
2843
2951
|
var o, n;
|
|
2844
2952
|
if (r !== i) {
|
|
2845
|
-
if (
|
|
2846
|
-
|
|
2953
|
+
if (Ka(a)) {
|
|
2954
|
+
He(this, this.shadow.getElementById("panel-container"));
|
|
2847
2955
|
return;
|
|
2848
2956
|
}
|
|
2849
|
-
a === "colapsado" ? this.salvarLembrancaEstado() : a === "camada-ativa" ? (this.sincronizarCamadaAtivaDOM(), this.salvarLembrancaEstado()) : a === "densidade" ? this.salvarLembrancaEstado() : a === "mapa-base-ativo" ? i && this.marcarMapaBaseAtivoNoDOM(i) : a === "titulo" || a === "mostrar-mapas-base" || a === "mapas-base-recolhido" || a === "mostrar-rodape" || a === "mostrar-busca" || a === "colapsavel" || a === "flutuante" ? this.solicitarRenderizacao() : a === "altura" ? (o = this.resizerController) == null || o.definirAltura(i, !1) : a === "min-altura" || a === "max-altura" ? this.alturaCustomizada !== null && ((n = this.resizerController) == null || n.definirAltura(this.alturaCustomizada, !1)) : a === "borda-canvas" && this.atualizarBordaCanvas();
|
|
2957
|
+
a === "colapsado" ? this.salvarLembrancaEstado() : a === "camada-ativa" ? (this.sincronizarCamadaAtivaDOM(), this.salvarLembrancaEstado()) : a === "densidade" ? this.salvarLembrancaEstado() : a === "mapa-base-ativo" ? (i && this.marcarMapaBaseAtivoNoDOM(i), this.salvarLembrancaEstado()) : a === "titulo" || a === "mostrar-mapas-base" || a === "mapas-base-recolhido" || a === "mostrar-rodape" || a === "mostrar-busca" || a === "colapsavel" || a === "flutuante" ? this.solicitarRenderizacao() : a === "altura" ? (o = this.resizerController) == null || o.definirAltura(i, !1) : a === "min-altura" || a === "max-altura" ? this.alturaCustomizada !== null && ((n = this.resizerController) == null || n.definirAltura(this.alturaCustomizada, !1)) : a === "borda-canvas" && this.atualizarBordaCanvas();
|
|
2850
2958
|
}
|
|
2851
2959
|
}
|
|
2852
2960
|
/**
|
|
@@ -2865,8 +2973,8 @@ const X = class X extends Ra {
|
|
|
2865
2973
|
if (typeof window < "u" && typeof this.getBoundingClientRect == "function") {
|
|
2866
2974
|
const o = this.getBoundingClientRect(), n = window.innerWidth || 0;
|
|
2867
2975
|
if (o.width > 0 && n > 0) {
|
|
2868
|
-
const s = o.left <= 2,
|
|
2869
|
-
|
|
2976
|
+
const s = o.left <= 2, c = n - o.right <= 2;
|
|
2977
|
+
c && !s ? i = "esquerda" : s && !c ? i = "direita" : s && c ? i = "nenhuma" : i = "ambas";
|
|
2870
2978
|
}
|
|
2871
2979
|
}
|
|
2872
2980
|
a.setAttribute("data-borda-canvas", i);
|
|
@@ -2892,7 +3000,7 @@ const X = class X extends Ra {
|
|
|
2892
3000
|
this.setAttribute("mapa-base-ativo", a);
|
|
2893
3001
|
}
|
|
2894
3002
|
selecionarMapaBase(a, r = !1) {
|
|
2895
|
-
!a || this.mapaBaseAtivo === a || (this.mapaBaseAtivo = a,
|
|
3003
|
+
!a || this.mapaBaseAtivo === a || (this.mapaBaseAtivo = a, r && this.dispararEvento("ui-mapa-base-alterado", { mapaBaseId: a }));
|
|
2896
3004
|
}
|
|
2897
3005
|
marcarMapaBaseAtivoNoDOM(a) {
|
|
2898
3006
|
this.shadow.querySelectorAll("[data-basemap-id]").forEach((i) => {
|
|
@@ -2900,7 +3008,7 @@ const X = class X extends Ra {
|
|
|
2900
3008
|
i.classList.toggle("active", o), i.setAttribute("aria-pressed", String(o));
|
|
2901
3009
|
});
|
|
2902
3010
|
const r = this.shadow.querySelector("[data-basemap-atual]");
|
|
2903
|
-
r && (r.textContent =
|
|
3011
|
+
r && (r.textContent = ia(this.mapasBase, a));
|
|
2904
3012
|
}
|
|
2905
3013
|
/** Seção "Mapa Base" recolhida (só o cabeçalho com o mapa ativo). Atributo `mapas-base-recolhido`. */
|
|
2906
3014
|
get mapasBaseRecolhido() {
|
|
@@ -2913,9 +3021,11 @@ const X = class X extends Ra {
|
|
|
2913
3021
|
alternarMapasBaseRecolhido(a = !1) {
|
|
2914
3022
|
this.mapasBaseRecolhido = !this.mapasBaseRecolhido, a && this.dispararEvento("ui-mapas-base-recolhimento", { recolhido: this.mapasBaseRecolhido });
|
|
2915
3023
|
}
|
|
3024
|
+
/** @deprecated Propriedade mantida apenas para compatibilidade; o painel exibe diretamente a árvore de camadas. */
|
|
2916
3025
|
get abaAtiva() {
|
|
2917
3026
|
return this.getAttribute("aba-ativa") || "camadas";
|
|
2918
3027
|
}
|
|
3028
|
+
/** @deprecated Propriedade mantida apenas para compatibilidade; o painel exibe diretamente a árvore de camadas. */
|
|
2919
3029
|
set abaAtiva(a) {
|
|
2920
3030
|
this.setAttribute("aba-ativa", a);
|
|
2921
3031
|
}
|
|
@@ -3034,10 +3144,10 @@ const X = class X extends Ra {
|
|
|
3034
3144
|
this.definirMapasBase(a);
|
|
3035
3145
|
}
|
|
3036
3146
|
definirCamadas(a, r) {
|
|
3037
|
-
|
|
3147
|
+
pr(this, a, r);
|
|
3038
3148
|
}
|
|
3039
3149
|
definirFeicoes(a) {
|
|
3040
|
-
|
|
3150
|
+
mr(this, a);
|
|
3041
3151
|
}
|
|
3042
3152
|
definirMapasBase(a) {
|
|
3043
3153
|
this.mapasBase = Array.isArray(a) ? [...a] : [], this.solicitarRenderizacao();
|
|
@@ -3061,28 +3171,28 @@ const X = class X extends Ra {
|
|
|
3061
3171
|
return this.feicoes.filter((a) => this.selectedFeatureIds.has(a.id));
|
|
3062
3172
|
}
|
|
3063
3173
|
adicionarCamada(a) {
|
|
3064
|
-
|
|
3174
|
+
gr(this, a);
|
|
3065
3175
|
}
|
|
3066
3176
|
removerCamada(a) {
|
|
3067
|
-
|
|
3177
|
+
hr(this, a);
|
|
3068
3178
|
}
|
|
3069
3179
|
adicionarFeicao(a) {
|
|
3070
|
-
|
|
3180
|
+
vr(this, a);
|
|
3071
3181
|
}
|
|
3072
3182
|
atualizarFeicao(a) {
|
|
3073
|
-
|
|
3183
|
+
br(this, a);
|
|
3074
3184
|
}
|
|
3075
3185
|
removerFeicao(a) {
|
|
3076
|
-
|
|
3186
|
+
yr(this, a);
|
|
3077
3187
|
}
|
|
3078
3188
|
selecionarFeicao(a, r = !1, i = !1, o = !1) {
|
|
3079
|
-
|
|
3189
|
+
sr(this, a, r, i, o);
|
|
3080
3190
|
}
|
|
3081
3191
|
selecionarFeicoes(a, r = !1) {
|
|
3082
|
-
|
|
3192
|
+
lr(this, a, r);
|
|
3083
3193
|
}
|
|
3084
3194
|
limparSelecao(a = !1) {
|
|
3085
|
-
|
|
3195
|
+
cr(this, a);
|
|
3086
3196
|
}
|
|
3087
3197
|
expandirTodas() {
|
|
3088
3198
|
this.expandedLayers = new Set(this.camadas.map((a) => a.id)), this.salvarLembrancaEstado(), this.solicitarRenderizacao();
|
|
@@ -3160,7 +3270,7 @@ const X = class X extends Ra {
|
|
|
3160
3270
|
}
|
|
3161
3271
|
render() {
|
|
3162
3272
|
const a = this.mudancaFeicoes;
|
|
3163
|
-
this.mudancaFeicoes = null, this.corpoElement && (a &&
|
|
3273
|
+
this.mudancaFeicoes = null, this.corpoElement && (a && Zt(this, this.shadow, this.dragDropManager, a) || Jt(this, this.shadow, this.corpoElement, this.dragDropManager));
|
|
3164
3274
|
}
|
|
3165
3275
|
// --- Conexão de Eventos ---
|
|
3166
3276
|
conectarEventosGerais() {
|
|
@@ -3168,27 +3278,27 @@ const X = class X extends Ra {
|
|
|
3168
3278
|
}
|
|
3169
3279
|
// --- Sincronização de DOM (delegada) ---
|
|
3170
3280
|
sincronizarCamadaAtivaDOM() {
|
|
3171
|
-
|
|
3281
|
+
Ct(this, this.shadow);
|
|
3172
3282
|
}
|
|
3173
3283
|
sincronizarSelecaoDOM() {
|
|
3174
|
-
|
|
3284
|
+
Lt(this, this.shadow);
|
|
3175
3285
|
}
|
|
3176
3286
|
// --- Auxiliares Internos ---
|
|
3177
3287
|
notificarMudancaSelecao() {
|
|
3178
|
-
|
|
3288
|
+
dr(this);
|
|
3179
3289
|
}
|
|
3180
3290
|
};
|
|
3181
3291
|
/** Painéis conectados sem `id` nem `storage-key`: dividem a mesma chave de persistência. */
|
|
3182
|
-
|
|
3183
|
-
let
|
|
3184
|
-
class
|
|
3292
|
+
E(W, "instanciasChavePadrao", /* @__PURE__ */ new Set());
|
|
3293
|
+
let ie = W;
|
|
3294
|
+
class wr extends ie {
|
|
3185
3295
|
}
|
|
3186
|
-
class
|
|
3296
|
+
class Ar extends ie {
|
|
3187
3297
|
}
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
function
|
|
3298
|
+
Pe("ui-camadas", ie);
|
|
3299
|
+
Pe("ui-painel-camadas", wr);
|
|
3300
|
+
Pe("ui-layer-panel", Ar);
|
|
3301
|
+
function Fr(e) {
|
|
3192
3302
|
var t;
|
|
3193
3303
|
return {
|
|
3194
3304
|
id: e.id,
|
|
@@ -3205,7 +3315,7 @@ function Er(e) {
|
|
|
3205
3315
|
dados: e.dados
|
|
3206
3316
|
};
|
|
3207
3317
|
}
|
|
3208
|
-
function
|
|
3318
|
+
function $r(e, t = "levantamento", a = "feicoes") {
|
|
3209
3319
|
return {
|
|
3210
3320
|
id: e.id,
|
|
3211
3321
|
nome: e.name,
|
|
@@ -3224,9 +3334,9 @@ function Ir(e, t = "levantamento", a = "feicoes") {
|
|
|
3224
3334
|
dados: typeof e.dados == "object" && e.dados !== null ? e.dados : void 0
|
|
3225
3335
|
};
|
|
3226
3336
|
}
|
|
3227
|
-
function
|
|
3228
|
-
var o, n, s,
|
|
3229
|
-
const a = ((o = e.geometria) == null ? void 0 : o.tipo) || ((n = e.geometria) == null ? void 0 : n.type) || e.tipo || e.type || "Polygon", r = ((s = e.geometria) == null ? void 0 : s.coordenadas) || ((
|
|
3337
|
+
function Mr(e, t = "") {
|
|
3338
|
+
var o, n, s, c;
|
|
3339
|
+
const a = ((o = e.geometria) == null ? void 0 : o.tipo) || ((n = e.geometria) == null ? void 0 : n.type) || e.tipo || e.type || "Polygon", r = ((s = e.geometria) == null ? void 0 : s.coordenadas) || ((c = e.geometria) == null ? void 0 : c.coordinates) || e.coordinates, i = e.cor || e.color;
|
|
3230
3340
|
return {
|
|
3231
3341
|
id: String(e.id),
|
|
3232
3342
|
name: e.nome || e.name || `Feição ${e.id}`,
|
|
@@ -3243,43 +3353,45 @@ function kr(e, t = "") {
|
|
|
3243
3353
|
};
|
|
3244
3354
|
}
|
|
3245
3355
|
export {
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3356
|
+
vt as CamadasDragDropManager,
|
|
3357
|
+
y as ICONES,
|
|
3358
|
+
qe as LIMITE_FEICOES_POR_CAMADA,
|
|
3359
|
+
ra as MAPAS_BASE_PADRAO,
|
|
3360
|
+
ie as UICamadas,
|
|
3361
|
+
Ar as UILayerPanel,
|
|
3362
|
+
Br as UIMapaBase,
|
|
3363
|
+
wr as UIPainelCamadas,
|
|
3364
|
+
qr as UISeletorMapaBase,
|
|
3255
3365
|
Ae as calcularAreaAnelSimples,
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3366
|
+
aa as calcularAreaPoligono,
|
|
3367
|
+
ea as calcularComprimentoLinha,
|
|
3368
|
+
Xa as calcularDistanciaPontos,
|
|
3369
|
+
ft as calcularSelecaoFeicao,
|
|
3370
|
+
Me as carregarEstadoPersistido,
|
|
3371
|
+
oe as construirHierarquiaCamadas,
|
|
3372
|
+
$r as converterCamadaItemParaCanvasLayer,
|
|
3373
|
+
Fr as converterCanvasLayerParaCamadaItem,
|
|
3374
|
+
Mr as converterFeicaoParaItem,
|
|
3375
|
+
M as escapeHtml,
|
|
3376
|
+
ye as filtrarCamadasPorBusca,
|
|
3377
|
+
$e as filtrarFeicoesPorBusca,
|
|
3378
|
+
Sr as formatarMetricaFeicoes,
|
|
3379
|
+
oa as formatarOpcoesCamadasHierarquicas,
|
|
3380
|
+
yt as gerarChaveStorage,
|
|
3381
|
+
ha as indexarMetricasEscopo,
|
|
3382
|
+
At as limparEstadoPersistido,
|
|
3383
|
+
It as montarEstadoPersistido,
|
|
3384
|
+
ia as nomeDoMapaBase,
|
|
3385
|
+
xt as normalizarEstadoPersistido,
|
|
3386
|
+
pt as obterFeicoesVisiveisNoEscopo,
|
|
3387
|
+
va as obterIdsVisiveisFeicoes,
|
|
3388
|
+
Et as reidratarCamadasComOverrides,
|
|
3389
|
+
De as removerSelecoesInvalidas,
|
|
3390
|
+
mt as renderizarArvoreCamadas,
|
|
3391
|
+
et as renderizarGridMapasBase,
|
|
3392
|
+
tt as renderizarRodapeAcoes,
|
|
3393
|
+
la as renderizarThumbGeometria,
|
|
3394
|
+
na as rotuloRodape,
|
|
3395
|
+
wt as salvarEstadoPersistido,
|
|
3396
|
+
ba as snapshotCamada
|
|
3285
3397
|
};
|